@vertigis/react-ui 9.13.0 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/AdapterDateFns/index.d.ts +3 -0
  2. package/AdapterDateFns/index.js +3 -0
  3. package/AdapterLuxon/index.d.ts +3 -0
  4. package/AdapterLuxon/index.js +3 -0
  5. package/AdapterMoment/index.d.ts +3 -0
  6. package/AdapterMoment/index.js +3 -0
  7. package/Checkbox/Checkbox.d.ts +3 -2
  8. package/ColorInput/ColorInput.d.ts +57 -0
  9. package/ColorInput/ColorInput.js +122 -0
  10. package/ColorInput/index.d.ts +2 -0
  11. package/ColorInput/index.js +2 -0
  12. package/CopyableText/CopyableText.d.ts +35 -0
  13. package/CopyableText/CopyableText.js +80 -0
  14. package/CopyableText/index.d.ts +2 -0
  15. package/CopyableText/index.js +2 -0
  16. package/DataGrid/index.d.ts +1 -0
  17. package/DataGrid/index.js +1 -0
  18. package/DatePicker/index.d.ts +3 -0
  19. package/DatePicker/index.js +3 -0
  20. package/DateRangePicker/index.d.ts +3 -0
  21. package/DateRangePicker/index.js +3 -0
  22. package/DateTimePicker/index.d.ts +3 -0
  23. package/DateTimePicker/index.js +3 -0
  24. package/FormControl/FormControl.d.ts +42 -0
  25. package/FormControl/FormControl.js +30 -0
  26. package/FormControl/index.d.ts +2 -2
  27. package/FormControl/index.js +2 -2
  28. package/FormLabel/FormLabel.d.ts +1 -1
  29. package/FormLabel/FormLabel.js +2 -2
  30. package/FormLabelTextField/FormLabelTextField.d.ts +15 -0
  31. package/FormLabelTextField/FormLabelTextField.js +34 -0
  32. package/FormLabelTextField/index.d.ts +2 -0
  33. package/FormLabelTextField/index.js +2 -0
  34. package/IconButton/IconButton.d.ts +1 -1
  35. package/IconMenu/IconMenu.d.ts +37 -0
  36. package/IconMenu/IconMenu.js +21 -0
  37. package/IconMenu/index.d.ts +2 -0
  38. package/IconMenu/index.js +2 -0
  39. package/InlineFormControl/InlineFormControl.d.ts +38 -0
  40. package/InlineFormControl/InlineFormControl.js +44 -0
  41. package/InlineFormControl/index.d.ts +2 -0
  42. package/InlineFormControl/index.js +2 -0
  43. package/InlineHelp/InlineHelp.d.ts +48 -0
  44. package/InlineHelp/InlineHelp.js +41 -0
  45. package/InlineHelp/index.d.ts +2 -0
  46. package/InlineHelp/index.js +2 -0
  47. package/LicenseInfo/index.d.ts +1 -0
  48. package/LicenseInfo/index.js +1 -0
  49. package/LicenseInfo/index.ts +1 -0
  50. package/Link/Link.d.ts +4 -7
  51. package/Link/Link.js +2 -3
  52. package/Loader/Loader.d.ts +33 -0
  53. package/Loader/Loader.js +75 -0
  54. package/Loader/index.d.ts +2 -0
  55. package/Loader/index.js +2 -0
  56. package/LocalizationProvider/index.d.ts +3 -0
  57. package/LocalizationProvider/index.js +3 -0
  58. package/Markdown/Markdown.d.ts +9 -10
  59. package/Markdown/Markdown.js +2 -1
  60. package/MenuItemSecondaryAction/MenuItemSecondaryAction.d.ts +2 -2
  61. package/MenuItemSecondaryAction/MenuItemSecondaryAction.js +4 -5
  62. package/Radio/Radio.d.ts +3 -2
  63. package/Switch/Switch.d.ts +1 -1
  64. package/Tab/Tab.d.ts +3 -3
  65. package/Tab/Tab.js +1 -1
  66. package/TableCell/TableCell.d.ts +1 -1
  67. package/Tabs/Tabs.d.ts +1 -1
  68. package/Tabs/Tabs.js +1 -1
  69. package/TimePicker/index.d.ts +3 -0
  70. package/TimePicker/index.js +3 -0
  71. package/ToggleButton/ToggleButton.d.ts +1 -1
  72. package/colors/blue.d.ts +1 -1
  73. package/colors/burntOrange.d.ts +1 -1
  74. package/colors/darkBurntOrange.d.ts +1 -1
  75. package/colors/darkRed.d.ts +1 -1
  76. package/colors/green.d.ts +1 -1
  77. package/colors/grey.d.ts +1 -1
  78. package/colors/orange.d.ts +1 -1
  79. package/colors/purple.d.ts +1 -1
  80. package/colors/red.d.ts +1 -1
  81. package/colors/teal.d.ts +1 -1
  82. package/colors/woodlandGreen.d.ts +1 -1
  83. package/icons/BufferIdentify.js +2 -2
  84. package/icons/BufferMeasure.js +2 -2
  85. package/icons/BufferShape.js +2 -2
  86. package/icons/SwapView.d.ts +4 -0
  87. package/icons/SwapView.js +3 -0
  88. package/icons/ViewSwitchList.js +2 -2
  89. package/icons/ViewSwitchTable.js +2 -2
  90. package/icons/index.d.ts +1 -0
  91. package/icons/index.js +1 -0
  92. package/icons/utils/createSvgIcon.d.ts +5 -4
  93. package/icons/utils/createSvgIcon.js +4 -3
  94. package/package.json +14 -5
  95. package/styles/CacheProvider.d.ts +1 -1
  96. package/styles/createTheme.js +27 -3
  97. package/styles/index.js +1 -1
  98. package/styles/themeAugmentation.d.ts +22 -0
  99. package/utils/color.d.ts +11 -0
  100. package/utils/color.js +39 -0
  101. package/utils/generateId.d.ts +1 -0
  102. package/utils/generateId.js +1 -0
  103. package/utils/html.d.ts +16 -0
  104. package/utils/html.js +105 -0
  105. package/utils/intl.d.ts +9 -6
  106. package/utils/intl.js +9 -6
  107. package/utils/markdown.d.ts +11 -3
  108. package/utils/markdown.js +11 -1
  109. package/utils/react.d.ts +15 -0
  110. package/utils/react.js +42 -0
  111. package/utils/url.d.ts +19 -0
  112. package/utils/url.js +74 -0
  113. package/CircularProgress/CircularProgress.d.ts +0 -2
  114. package/CircularProgress/CircularProgress.js +0 -2
@@ -0,0 +1,2 @@
1
+ export * from "./FormLabelTextField.js";
2
+ export { default } from "./FormLabelTextField.js";
@@ -0,0 +1,2 @@
1
+ export * from "./FormLabelTextField.js";
2
+ export { default } from "./FormLabelTextField.js";
@@ -1,5 +1,5 @@
1
1
  import type { ButtonBaseClasses } from "@mui/material/ButtonBase";
2
- import { IconButtonProps as MUIIconButtonProps, IconButtonClasses as MUIIconButtonClasses } from "@mui/material/IconButton";
2
+ import type { IconButtonProps as MUIIconButtonProps, IconButtonClasses as MUIIconButtonClasses } from "@mui/material/IconButton";
3
3
  import type { OverridableComponent } from "@mui/material/OverridableComponent";
4
4
  import "../styles/themeAugmentation.js";
5
5
  export * from "@mui/material/IconButton";
@@ -0,0 +1,37 @@
1
+ import type { BoxProps } from "@mui/system";
2
+ import type { ReactNode } from "react";
3
+ import type { IconButtonProps } from "../IconButton/index.js";
4
+ import type { MenuProps } from "../Menu/index.js";
5
+ export declare const iconMenuClasses: {
6
+ root: string;
7
+ iconButton: string;
8
+ };
9
+ export interface IconMenuClasses {
10
+ root: string;
11
+ iconButton: string;
12
+ }
13
+ export declare type IconMenuClassKey = keyof IconMenuClasses;
14
+ export interface IconMenuProps extends BoxProps {
15
+ /**
16
+ * Additional CSS classes to be applied to the component.
17
+ */
18
+ classes?: Partial<IconMenuClasses>;
19
+ /**
20
+ * Whether the icon button should be disabled.
21
+ */
22
+ disabled?: boolean;
23
+ /**
24
+ * The icon to show.
25
+ */
26
+ icon: ReactNode;
27
+ /**
28
+ * Attributes applied to the `IconButton` component.
29
+ */
30
+ IconButtonProps?: Partial<IconButtonProps>;
31
+ /**
32
+ * Attributes applied to the `Menu` component.
33
+ */
34
+ MenuProps?: Partial<MenuProps>;
35
+ }
36
+ declare const IconMenu: import("react").ForwardRefExoticComponent<Pick<IconMenuProps, "id" | "dir" | "p" | "slot" | "style" | "title" | "resource" | "results" | "role" | "key" | "classes" | "color" | "icon" | "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" | "disabled" | "sx" | "zIndex" | "typography" | "fontFamily" | "fontSize" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "component" | "MenuProps" | "IconButtonProps"> & import("react").RefAttributes<HTMLDivElement>>;
37
+ export default IconMenu;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { forwardRef, useRef, useState } from "react";
4
+ import Box from "../Box/index.js";
5
+ import IconButton from "../IconButton/index.js";
6
+ import Menu from "../Menu/index.js";
7
+ import { mergeStyles } from "../styles/index.js";
8
+ import { useId } from "../utils/react.js";
9
+ const PREFIX = "GcxIconMenu";
10
+ export const iconMenuClasses = {
11
+ root: `${PREFIX}-root`,
12
+ iconButton: `${PREFIX}-iconButton`,
13
+ };
14
+ const IconMenu = forwardRef(function IconMenu({ id: idProp, children, icon, className, classes: classesProp, disabled, IconButtonProps, MenuProps, ...others }, ref) {
15
+ const anchorRef = useRef();
16
+ const [open, setOpen] = useState(false);
17
+ const id = useId(idProp);
18
+ const classes = mergeStyles(iconMenuClasses, classesProp);
19
+ return (_jsxs(Box, Object.assign({ className: clsx(classes.root, className), ref: ref }, others, { children: [_jsx(IconButton, Object.assign({ "aria-label": "More", "aria-owns": open ? id : undefined, "aria-haspopup": "true", "data-test": "IconMenu-btn", disabled: disabled, className: classes.iconButton, onClick: () => setOpen(true), ref: ref => (anchorRef.current = anchorRef.current ?? ref) }, IconButtonProps, { children: icon }), void 0), _jsx(Menu, Object.assign({ id: id, "data-test": "IconMenu-menu", anchorEl: anchorRef.current, open: open, onClose: () => setOpen(false), onClick: () => setOpen(false) }, MenuProps, { children: children }), void 0)] }), void 0));
20
+ });
21
+ export default IconMenu;
@@ -0,0 +1,2 @@
1
+ export { default } from "./IconMenu.js";
2
+ export * from "./IconMenu.js";
@@ -0,0 +1,2 @@
1
+ export { default } from "./IconMenu.js";
2
+ export * from "./IconMenu.js";
@@ -0,0 +1,38 @@
1
+ import type { FC, ReactElement } from "react";
2
+ import type { FormControlProps, FormControlClasses } from "../FormControl/index.js";
3
+ declare const gcxInlineFormControlClasses: {
4
+ formControlLabelRoot: string;
5
+ formControl: string;
6
+ formControlLabelLabel: string;
7
+ };
8
+ export declare const inlineFormControlClasses: {
9
+ formControlLabelRoot: string;
10
+ formControl: string;
11
+ formControlLabelLabel: string;
12
+ inlineHelp: string;
13
+ root: string;
14
+ marginNormal: string;
15
+ marginDense: string;
16
+ fullWidth: string;
17
+ };
18
+ export declare type InlineFormControlClasses = FormControlClasses & Record<keyof typeof gcxInlineFormControlClasses, string>;
19
+ export declare type InlineFormControlClassKey = keyof InlineFormControlClasses;
20
+ export declare type InlineFormControlProps = Omit<FormControlProps, "classes"> & {
21
+ /**
22
+ * Additional CSS classes to be applied to the component.
23
+ */
24
+ classes?: Partial<InlineFormControlClasses>;
25
+ /**
26
+ * The control to render
27
+ */
28
+ control: ReactElement;
29
+ /**
30
+ * The label for the control
31
+ */
32
+ label: string | number | ReactElement;
33
+ };
34
+ /**
35
+ * Used for displaying a checkbox, switch, or Link with inline help.
36
+ */
37
+ declare const InlineFormControl: FC<InlineFormControlProps>;
38
+ export default InlineFormControl;
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import FormControl, { formControlClasses } from "../FormControl/index.js";
4
+ import FormControlLabel from "../FormControlLabel/index.js";
5
+ import { styled, mergeStyles } from "../styles/index.js";
6
+ const PREFIX = "GcxInlineFormControl";
7
+ const gcxInlineFormControlClasses = {
8
+ formControlLabelRoot: `${PREFIX}-formControlLabelRoot`,
9
+ formControl: `${PREFIX}-formControl`,
10
+ formControlLabelLabel: `${PREFIX}-formControlLabelLabel`,
11
+ };
12
+ export const inlineFormControlClasses = {
13
+ ...formControlClasses,
14
+ ...gcxInlineFormControlClasses,
15
+ };
16
+ const StyledFormControl = styled(FormControl)({
17
+ [`& .${inlineFormControlClasses.inlineHelp}`]: {
18
+ display: "flex",
19
+ position: "inherit",
20
+ },
21
+ [`& .${inlineFormControlClasses.formControlLabelRoot}`]: {
22
+ display: "flex",
23
+ flex: 1,
24
+ },
25
+ [`&.${inlineFormControlClasses.formControl}`]: {
26
+ display: "flex",
27
+ /**
28
+ * Override Mui's flexDirection
29
+ */
30
+ flexDirection: "row",
31
+ alignItems: "center",
32
+ },
33
+ [`& .${inlineFormControlClasses.formControlLabelLabel}`]: {
34
+ fontWeight: 500,
35
+ },
36
+ });
37
+ /**
38
+ * Used for displaying a checkbox, switch, or Link with inline help.
39
+ */
40
+ const InlineFormControl = ({ children, className, classes, control, label, ...props }) => {
41
+ const { formControlLabelRoot: formControlLabelRootClass, formControlLabelLabel: formControlLabelLabelClass, formControl: formControlClass, ...otherClasses } = mergeStyles(inlineFormControlClasses, classes);
42
+ return (_jsxs(StyledFormControl, Object.assign({ className: clsx("GcxInlineFormControl", formControlClass, className) }, props, { classes: otherClasses }, { children: [_jsx(FormControlLabel, { classes: { root: formControlLabelRootClass, label: formControlLabelLabelClass }, control: control, label: label }, void 0), children] }), void 0));
43
+ };
44
+ export default InlineFormControl;
@@ -0,0 +1,2 @@
1
+ export { default } from "./InlineFormControl.js";
2
+ export * from "./InlineFormControl.js";
@@ -0,0 +1,2 @@
1
+ export { default } from "./InlineFormControl.js";
2
+ export * from "./InlineFormControl.js";
@@ -0,0 +1,48 @@
1
+ import type { ReactNode } from "react";
2
+ export declare const inlineHelpClasses: {
3
+ root: string;
4
+ paper: string;
5
+ };
6
+ export declare type InlineHelpClassKey = keyof typeof inlineHelpClasses;
7
+ export declare type InlineHelpClasses = Record<InlineHelpClassKey, string>;
8
+ export interface InlineHelpProps {
9
+ /**
10
+ * Optionally the children to be rendered by the InlineHelp.
11
+ */
12
+ children?: ReactNode;
13
+ /**
14
+ * The CSS class name of the root element.
15
+ */
16
+ className?: string;
17
+ /**
18
+ * Additional CSS classes to be applied to the component.
19
+ */
20
+ classes?: Partial<InlineHelpClasses>;
21
+ /**
22
+ * The help icon node to show.
23
+ */
24
+ icon?: ReactNode;
25
+ /**
26
+ * The title of the IconButton
27
+ */
28
+ title?: string;
29
+ /**
30
+ * The link displayed in the inline help.
31
+ */
32
+ url?: {
33
+ /**
34
+ * The label to be displayed for the link .
35
+ */
36
+ label: string;
37
+ /**
38
+ * The href of the link.
39
+ */
40
+ href: string;
41
+ /**
42
+ * A callback function for when the link is clicked.
43
+ */
44
+ onClick?: (link: string) => void;
45
+ };
46
+ }
47
+ declare const InlineHelp: import("react").ForwardRefExoticComponent<InlineHelpProps & import("react").RefAttributes<HTMLDivElement>>;
48
+ export default InlineHelp;
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { forwardRef, useState } from "react";
4
+ import Box from "../Box/index.js";
5
+ import IconButton from "../IconButton/index.js";
6
+ import Link from "../Link/index.js";
7
+ import Popover from "../Popover/index.js";
8
+ import Typography from "../Typography/index.js";
9
+ import HelpIcon from "../icons/Help.js";
10
+ import { styled, mergeStyles, useTheme } from "../styles/index.js";
11
+ const PREFIX = "GcxInlineHelp";
12
+ export const inlineHelpClasses = {
13
+ root: `${PREFIX}-root`,
14
+ paper: `${PREFIX}-paper`,
15
+ };
16
+ const LTR_ORIGIN = {
17
+ vertical: "top",
18
+ horizontal: "left",
19
+ };
20
+ const RTL_ORIGIN = {
21
+ vertical: "top",
22
+ horizontal: "right",
23
+ };
24
+ // Popover styling needs to be applied separately here, since the popover will
25
+ // not be a child of the Root in the DOM due to use of a React portal.
26
+ const StyledPopover = styled(Popover)(({ theme: { spacing } }) => ({
27
+ [`& .${inlineHelpClasses.paper}`]: {
28
+ maxWidth: "21.875em",
29
+ padding: spacing(2),
30
+ wordWrap: "break-word",
31
+ },
32
+ }));
33
+ const InlineHelp = forwardRef(function InlineHelp({ children, classes: classesProp, className, icon, title, url, ...other }, ref) {
34
+ const [iconBtnEl, setIconBtnEl] = useState();
35
+ const theme = useTheme();
36
+ const classes = mergeStyles(inlineHelpClasses, classesProp);
37
+ const handleIconPopoverOpen = (event) => setIconBtnEl(event.currentTarget);
38
+ const handleIconPopoverClose = () => setIconBtnEl(undefined);
39
+ return (_jsxs(Box, Object.assign({ className: clsx(classes.root, className), ref: ref }, other, { children: [_jsx(IconButton, Object.assign({ onClick: handleIconPopoverOpen, title: title, size: "small", "data-test": `${PREFIX}-button` }, { children: icon ? icon : _jsx(HelpIcon, {}, void 0) }), void 0), _jsxs(StyledPopover, Object.assign({ anchorEl: iconBtnEl, open: !!iconBtnEl, classes: { paper: classes.paper }, anchorOrigin: theme.direction === "rtl" ? RTL_ORIGIN : LTR_ORIGIN, transformOrigin: theme.direction === "rtl" ? RTL_ORIGIN : LTR_ORIGIN, onClose: handleIconPopoverClose }, { children: [_jsx(Typography, { children: children }, void 0), url && (_jsx(Link, Object.assign({ align: "right", display: "block", href: url.href, onClick: () => url.onClick?.(url.href), target: "_blank", variant: "body2" }, { children: url.label }), void 0))] }), void 0)] }), void 0));
40
+ });
41
+ export default InlineHelp;
@@ -0,0 +1,2 @@
1
+ export { default } from "./InlineHelp.js";
2
+ export * from "./InlineHelp.js";
@@ -0,0 +1,2 @@
1
+ export { default } from "./InlineHelp.js";
2
+ export * from "./InlineHelp.js";
@@ -0,0 +1 @@
1
+ export * from "@mui/x-license-pro";
@@ -0,0 +1 @@
1
+ export * from "@mui/x-license-pro";
@@ -0,0 +1 @@
1
+ export * from "@mui/x-license-pro";
package/Link/Link.d.ts CHANGED
@@ -1,17 +1,15 @@
1
- import { LinkProps as MUILinkProps, LinkClasses as MUILinkClasses } from "@mui/material/Link";
1
+ import type { LinkProps as MUILinkProps, LinkClasses as MUILinkClasses } from "@mui/material/Link";
2
2
  import type { OverridableComponent } from "@mui/material/OverridableComponent";
3
3
  export * from "@mui/material/Link";
4
4
  declare const gcxLinkClasses: {
5
5
  /**
6
- * Styles applied to the external link icon when `showExternalLinkIcon` is
7
- * `true`.
6
+ * Styles applied to the external link icon when `showExternalLinkIcon` is `true`.
8
7
  */
9
8
  externalLinkIcon: string;
10
9
  };
11
10
  export declare const linkClasses: {
12
11
  /**
13
- * Styles applied to the external link icon when `showExternalLinkIcon` is
14
- * `true`.
12
+ * Styles applied to the external link icon when `showExternalLinkIcon` is `true`.
15
13
  */
16
14
  externalLinkIcon: string;
17
15
  root: string;
@@ -29,8 +27,7 @@ export interface LinkProps extends Omit<MUILinkProps, "classes"> {
29
27
  */
30
28
  classes?: Partial<LinkClasses>;
31
29
  /**
32
- * Determines whether or not to show an icon hinting that the link will be
33
- * external.
30
+ * Determines whether or not to show an icon hinting that the link will be external.
34
31
  */
35
32
  showExternalLinkIcon?: boolean;
36
33
  }
package/Link/Link.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import MUILink, { linkClasses as muiLinkClasses, } from "@mui/material/Link";
2
+ import MUILink, { linkClasses as muiLinkClasses } from "@mui/material/Link";
3
3
  import { forwardRef } from "react";
4
4
  import LinkExternal from "../icons/LinkExternal.js";
5
5
  import { styled, mergeStyles } from "../styles/index.js";
@@ -8,8 +8,7 @@ export * from "@mui/material/Link";
8
8
  const PREFIX = "GcxLink";
9
9
  const gcxLinkClasses = {
10
10
  /**
11
- * Styles applied to the external link icon when `showExternalLinkIcon` is
12
- * `true`.
11
+ * Styles applied to the external link icon when `showExternalLinkIcon` is `true`.
13
12
  */
14
13
  externalLinkIcon: `${PREFIX}-externalLinkIcon`,
15
14
  };
@@ -0,0 +1,33 @@
1
+ import type { ReactNode } from "react";
2
+ export declare const loaderClasses: {
3
+ root: string;
4
+ dot: string;
5
+ showBackground: string;
6
+ visible: string;
7
+ };
8
+ export declare type LoaderClassKey = keyof typeof loaderClasses;
9
+ export declare type LoaderClasses = Record<LoaderClassKey, string>;
10
+ export interface LoaderProps {
11
+ /**
12
+ * Optionally the children to be rendered by the Loader.
13
+ */
14
+ children?: ReactNode;
15
+ /**
16
+ * The CSS class name of the root element.
17
+ */
18
+ className?: string;
19
+ /**
20
+ * Additional CSS classes to be applied to the component.
21
+ */
22
+ classes?: Partial<LoaderClasses>;
23
+ /**
24
+ * Whether a semi-transparent background should be rendered.
25
+ */
26
+ showBackground?: boolean;
27
+ /**
28
+ * Whether the overlay is visible.
29
+ */
30
+ visible: boolean;
31
+ }
32
+ declare const Loader: import("react").ForwardRefExoticComponent<LoaderProps & import("react").RefAttributes<HTMLDivElement>>;
33
+ export default Loader;
@@ -0,0 +1,75 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { forwardRef } from "react";
4
+ import Fade from "../Fade/index.js";
5
+ import { alpha, keyframes, styled, mergeStyles } from "../styles/index.js";
6
+ const PREFIX = "GcxLoader";
7
+ export const loaderClasses = {
8
+ root: `${PREFIX}-root`,
9
+ dot: `${PREFIX}-dot`,
10
+ showBackground: `${PREFIX}-showBackground`,
11
+ visible: `${PREFIX}-visible`,
12
+ };
13
+ const loaderAnimation = keyframes({
14
+ "50%": {
15
+ transform: "scale(1)",
16
+ opacity: 1,
17
+ },
18
+ "100%": {
19
+ opacity: 0,
20
+ },
21
+ });
22
+ const Root = styled("div")(({ theme: { palette } }) => ({
23
+ position: "absolute",
24
+ top: 0,
25
+ left: 0,
26
+ width: "100%",
27
+ height: "100%",
28
+ visibility: "hidden",
29
+ display: "flex",
30
+ flexDirection: "column",
31
+ justifyContent: "center",
32
+ alignItems: "center",
33
+ zIndex: 1,
34
+ "&, &:focus": {
35
+ // Prevent blue outline of overlay when element is focused
36
+ outline: "none !important",
37
+ },
38
+ [`& .${loaderClasses.dot}`]: {
39
+ width: 32,
40
+ height: 32,
41
+ border: `6px solid ${palette.grey[600]}`,
42
+ backgroundColor: palette.grey[600],
43
+ borderRadius: "50%",
44
+ float: "left",
45
+ margin: "0 16px",
46
+ transform: "scale(0)",
47
+ animation: `${loaderAnimation} 1500ms ease infinite 0ms`,
48
+ "&:nth-of-type(2)": {
49
+ animation: `${loaderAnimation} 1500ms ease infinite 100ms`,
50
+ },
51
+ "&:nth-of-type(3)": {
52
+ animation: `${loaderAnimation} 1500ms ease infinite 200ms`,
53
+ },
54
+ },
55
+ [`&.${loaderClasses.showBackground}`]: {
56
+ backgroundColor: palette.mode === "dark"
57
+ ? alpha(palette.common.white, 0.15)
58
+ : alpha(palette.common.black, 0.4),
59
+ [`& .${loaderClasses.dot}`]: {
60
+ borderColor: palette.common.white,
61
+ backgroundColor: palette.common.white,
62
+ },
63
+ },
64
+ [`&.${loaderClasses.visible}`]: {
65
+ visibility: "visible",
66
+ },
67
+ }));
68
+ const Loader = forwardRef(function Loader({ className, classes: classesProp, showBackground, visible, children }, ref) {
69
+ const classes = mergeStyles(loaderClasses, classesProp);
70
+ return (_jsx(Fade, Object.assign({ in: visible, ref: ref }, { children: _jsxs(Root, Object.assign({ "aria-hidden": "true", className: clsx(classes.root, className, {
71
+ [classes.showBackground]: showBackground,
72
+ [classes.visible]: visible,
73
+ }), "data-test": "Loader-root", tabIndex: -1 }, { children: [_jsxs("div", { children: [_jsx("div", { className: classes.dot }, void 0), _jsx("div", { className: classes.dot }, void 0), _jsx("div", { className: classes.dot }, void 0)] }, void 0), children && _jsx("div", Object.assign({ "data-test": "Loader-children" }, { children: children }), void 0)] }), void 0) }), void 0));
74
+ });
75
+ export default Loader;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Loader.js";
2
+ export * from "./Loader.js";
@@ -0,0 +1,2 @@
1
+ export { default } from "./Loader.js";
2
+ export * from "./Loader.js";
@@ -0,0 +1,3 @@
1
+ export * from "@mui/x-date-pickers/LocalizationProvider";
2
+ import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
3
+ export default LocalizationProvider;
@@ -0,0 +1,3 @@
1
+ export * from "@mui/x-date-pickers/LocalizationProvider";
2
+ import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
3
+ export default LocalizationProvider;
@@ -1,5 +1,5 @@
1
- import { FC } from "react";
2
- import { BoxProps } from "../Box/index.js";
1
+ import type { FC } from "react";
2
+ import type { BoxProps } from "../Box/index.js";
3
3
  /**
4
4
  * Properties for the `Markdown` component.
5
5
  */
@@ -9,23 +9,22 @@ export interface MarkdownProps extends BoxProps {
9
9
  */
10
10
  markdown: string;
11
11
  /**
12
- * A caller-supplied sanitization function to ensure that the resulting HTML
13
- * is safe to insert into the DOM. Required.
12
+ * Override the default sanitization behaviour with a caller-supplied
13
+ * sanitization function that ensures that the resulting HTML is safe to
14
+ * insert into the DOM.
14
15
  */
15
- sanitize: (unsafeHtml: string) => string;
16
+ sanitize?: (unsafeHtml: string) => string;
16
17
  /**
17
18
  * 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.
19
+ * content is allowed (e.g. inside `<h1>` or `<span>` tags). HTML tags for
20
+ * block-level elements will be removed, but any text content will be preserved.
21
21
  */
22
22
  inline?: boolean;
23
23
  /**
24
24
  * If true, any HTML in the markdown will be escaped rather than passed
25
25
  * through directly to the output as normal (since Markdown is a superset of
26
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`.
27
+ * Markdown syntax without also supporting HTML syntax. The default is `false`.
29
28
  *
30
29
  * IMPORTANT: The resulting HTML still needs to be sanitized whether or not
31
30
  * this option is set.
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
3
  import Box from "../Box/index.js";
4
+ import { sanitizeHtml } from "../utils/html.js";
4
5
  import { markdownToHtml } from "../utils/markdown.js";
5
6
  /**
6
7
  * A component that renders markdown as HTML.
7
8
  */
8
- const Markdown = ({ markdown, inline, escapeHtml, sanitize, className, ...otherProps }) => {
9
+ const Markdown = ({ markdown, inline, escapeHtml, sanitize = sanitizeHtml, className, ...otherProps }) => {
9
10
  return (_jsx(Box, Object.assign({ component: inline ? "span" : "div", className: clsx("GcxMarkdown", className), dangerouslySetInnerHTML: {
10
11
  __html: sanitize(markdownToHtml(markdown, { inline, escapeHtml })),
11
12
  } }, otherProps), void 0));
@@ -1,5 +1,5 @@
1
- import { FC } from "react";
2
- import { ListItemSecondaryActionProps } from "../ListItemSecondaryAction/index.js";
1
+ import type { FC } from "react";
2
+ import type { ListItemSecondaryActionProps } from "../ListItemSecondaryAction/index.js";
3
3
  /**
4
4
  * For use within a MenuList (or other list that implements arrow key
5
5
  * navigation). The standard ListItemSecondaryAction will break keyboard
@@ -13,25 +13,24 @@ const StyledListItemSecondaryAction = styled(GcxListItemSecondaryAction)({
13
13
  *
14
14
  * @param props The component properties.
15
15
  */
16
- const MenuItemSecondaryAction = (props) => {
16
+ const MenuItemSecondaryAction = props => {
17
17
  const ref = useRef(null);
18
18
  const { className, ...otherProps } = props;
19
19
  const onKeyDown = (event) => {
20
- var _a, _b;
21
20
  const { key } = event;
22
21
  if (key === "ArrowUp" || key === "ArrowDown" || key === "Home" || key === "End") {
23
22
  // Switch focus to the parent list item, then let the key event
24
23
  // 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();
24
+ ref.current?.parentElement?.focus();
26
25
  }
27
26
  else if (key !== "Escape") {
28
27
  // Prevent propagation to the primary action.
29
28
  event.stopPropagation();
30
29
  }
31
30
  };
32
- return (_jsx(StyledListItemSecondaryAction, Object.assign({ className: className, onClick: (event) => {
31
+ return (_jsx(StyledListItemSecondaryAction, Object.assign({ className: className, onClick: event => {
33
32
  event.stopPropagation();
34
- }, onKeyDown: onKeyDown, onMouseDown: (event) => {
33
+ }, onKeyDown: onKeyDown, onMouseDown: event => {
35
34
  // This will stop child ripples from propagating.
36
35
  event.stopPropagation();
37
36
  }, ref: ref }, otherProps), void 0));
package/Radio/Radio.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { ButtonBaseClasses } from "@mui/material/ButtonBase";
2
- import Radio, { RadioProps as MUIRadioProps, RadioClasses as MUIRadioClasses } from "@mui/material/Radio";
1
+ import type { ButtonBaseClasses } from "@mui/material/ButtonBase";
2
+ import type { RadioProps as MUIRadioProps, RadioClasses as MUIRadioClasses } from "@mui/material/Radio";
3
+ import Radio from "@mui/material/Radio";
3
4
  export * from "@mui/material/Radio";
4
5
  export interface RadioClasses extends MUIRadioClasses, ButtonBaseClasses {
5
6
  }
@@ -1,6 +1,6 @@
1
1
  import type { ButtonBaseClasses } from "@mui/material/ButtonBase";
2
2
  import type { IconButtonClasses } from "@mui/material/IconButton";
3
- import { SwitchProps as MUISwitchProps, SwitchClasses as MUISwitchClasses } from "@mui/material/Switch";
3
+ import type { SwitchProps as MUISwitchProps, SwitchClasses as MUISwitchClasses } from "@mui/material/Switch";
4
4
  export * from "@mui/material/Switch";
5
5
  export interface SwitchClasses extends MUISwitchClasses, IconButtonClasses, ButtonBaseClasses {
6
6
  }
package/Tab/Tab.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { OverridableComponent } from "@mui/material/OverridableComponent";
2
- import { TabProps as MUITabProps, TabClasses as MUITabClasses } from "@mui/material/Tab";
3
- import { ReactNode } from "react";
4
- import { ButtonBaseClasses } from "../ButtonBase/index.js";
2
+ import type { TabProps as MUITabProps, TabClasses as MUITabClasses } from "@mui/material/Tab";
3
+ import type { ReactNode } from "react";
4
+ import type { ButtonBaseClasses } from "../ButtonBase/index.js";
5
5
  export * from "@mui/material/Tab";
6
6
  declare const gcxTabClasses: {
7
7
  endAdornment: string;
package/Tab/Tab.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import MUITab, { tabClasses as muiTabClasses, } from "@mui/material/Tab";
2
+ import MUITab, { tabClasses as muiTabClasses } from "@mui/material/Tab";
3
3
  import clsx from "clsx";
4
4
  import { forwardRef } from "react";
5
5
  import { mergeStyles, styled } from "../styles/index.js";
@@ -1,5 +1,5 @@
1
1
  import type { OverridableComponent } from "@mui/material/OverridableComponent";
2
- import { TableCellProps } from "@mui/material/TableCell";
2
+ import type { TableCellProps } from "@mui/material/TableCell";
3
3
  declare const _default: OverridableComponent<{
4
4
  props: Omit<TableCellProps, "component">;
5
5
  defaultComponent: "td";
package/Tabs/Tabs.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { TabsProps as MUITabsProps, TabsClasses as MUITabsClasses } from "@mui/material/Tabs";
2
+ import type { TabsProps as MUITabsProps, TabsClasses as MUITabsClasses } from "@mui/material/Tabs";
3
3
  export * from "@mui/material/Tabs";
4
4
  declare const gcxTabsClasses: {
5
5
  /**