solace-ui-components 16.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 (171) hide show
  1. package/LICENSE +200 -0
  2. package/NOTICE +35 -0
  3. package/README.md +60 -0
  4. package/THIRD_PARTY_LICENSES.txt +1144 -0
  5. package/dist/components/NoAccess.d.ts +4 -0
  6. package/dist/components/SolaceAccordion.d.ts +61 -0
  7. package/dist/components/SolaceAttributeBadge.d.ts +68 -0
  8. package/dist/components/SolaceBackDrop.d.ts +3 -0
  9. package/dist/components/SolaceBreadcrumb.d.ts +50 -0
  10. package/dist/components/SolaceCard.d.ts +10 -0
  11. package/dist/components/SolaceCardHeader.d.ts +10 -0
  12. package/dist/components/SolaceCategorizedSearch.d.ts +4 -0
  13. package/dist/components/SolaceChip.d.ts +91 -0
  14. package/dist/components/SolaceCircularProgress.d.ts +37 -0
  15. package/dist/components/SolaceComponentProps.d.ts +14 -0
  16. package/dist/components/SolaceDatePicker.d.ts +46 -0
  17. package/dist/components/SolaceDetailMessage.d.ts +22 -0
  18. package/dist/components/SolaceDonutChart.d.ts +40 -0
  19. package/dist/components/SolaceDrawer.d.ts +49 -0
  20. package/dist/components/SolaceEmptyStateBanner.d.ts +3 -0
  21. package/dist/components/SolaceEnvironmentChip.d.ts +33 -0
  22. package/dist/components/SolaceEnvironmentLabel.d.ts +11 -0
  23. package/dist/components/SolaceEnvironmentSelectChip.d.ts +56 -0
  24. package/dist/components/SolaceErrorBox.d.ts +22 -0
  25. package/dist/components/SolaceFeatureTag.d.ts +13 -0
  26. package/dist/components/SolaceHTMLAttributesProps.d.ts +4 -0
  27. package/dist/components/SolaceLearningBanner.d.ts +26 -0
  28. package/dist/components/SolaceLinearProgress.d.ts +3 -0
  29. package/dist/components/SolaceMenu.d.ts +60 -0
  30. package/dist/components/SolaceMenuItem.d.ts +78 -0
  31. package/dist/components/SolaceMessageBox.d.ts +38 -0
  32. package/dist/components/SolaceNotificationCounter.d.ts +38 -0
  33. package/dist/components/SolacePagination.d.ts +38 -0
  34. package/dist/components/SolacePopover.d.ts +7 -0
  35. package/dist/components/SolaceResponsiveItemList.d.ts +80 -0
  36. package/dist/components/SolaceSearchAndFilter.d.ts +69 -0
  37. package/dist/components/SolaceTag.d.ts +39 -0
  38. package/dist/components/SolaceTextDiff.d.ts +40 -0
  39. package/dist/components/SolaceToasts.d.ts +19 -0
  40. package/dist/components/SolaceToolTip.d.ts +63 -0
  41. package/dist/components/SolaceTree.d.ts +45 -0
  42. package/dist/components/SolaceTruncatableLink.d.ts +29 -0
  43. package/dist/components/SolaceTypography.d.ts +3 -0
  44. package/dist/components/dialog/SolaceConfirmationDialog.d.ts +36 -0
  45. package/dist/components/fileuploader/SolaceFileUploader.d.ts +30 -0
  46. package/dist/components/fileuploader/fileUploaderUtils.d.ts +17 -0
  47. package/dist/components/form/Button/SolaceLearningButton.d.ts +4 -0
  48. package/dist/components/form/ErrorText.d.ts +7 -0
  49. package/dist/components/form/FormChildBase.d.ts +68 -0
  50. package/dist/components/form/HelperText.d.ts +7 -0
  51. package/dist/components/form/SolaceAttributeValuePair.d.ts +87 -0
  52. package/dist/components/form/SolaceAttributeValuePairForm.d.ts +109 -0
  53. package/dist/components/form/SolaceAutoCompleteTextField.d.ts +11 -0
  54. package/dist/components/form/SolaceButton.d.ts +23 -0
  55. package/dist/components/form/SolaceCheckBox.d.ts +73 -0
  56. package/dist/components/form/SolaceChipTextArea/SolaceChipTextArea.d.ts +4 -0
  57. package/dist/components/form/SolaceChipTextArea/SolaceChipTextArea.styles.d.ts +9 -0
  58. package/dist/components/form/SolaceCodeEditor.d.ts +56 -0
  59. package/dist/components/form/SolaceLabel.d.ts +33 -0
  60. package/dist/components/form/SolacePicker.d.ts +146 -0
  61. package/dist/components/form/SolaceRadio.d.ts +62 -0
  62. package/dist/components/form/SolaceRadioGroup.d.ts +75 -0
  63. package/dist/components/form/SolaceSelect.d.ts +99 -0
  64. package/dist/components/form/SolaceSelectAutocomplete.d.ts +188 -0
  65. package/dist/components/form/SolaceSelectAutocompleteItem.d.ts +45 -0
  66. package/dist/components/form/SolaceSelectAutocompleteResponsiveTags.d.ts +20 -0
  67. package/dist/components/form/SolaceStackLabel.d.ts +41 -0
  68. package/dist/components/form/SolaceStepper/SolaceStepIcon.d.ts +14 -0
  69. package/dist/components/form/SolaceStepper/SolaceStepper.d.ts +10 -0
  70. package/dist/components/form/SolaceStepper/SolaceStepperFooter.d.ts +3 -0
  71. package/dist/components/form/SolaceTextArea.d.ts +108 -0
  72. package/dist/components/form/SolaceTextField.d.ts +126 -0
  73. package/dist/components/form/SolaceToggle.d.ts +58 -0
  74. package/dist/components/form/SolaceToggleButtonGroup.d.ts +15 -0
  75. package/dist/components/form/WarningText.d.ts +7 -0
  76. package/dist/components/jsonschemaform/SolaceJsonSchemaForm.d.ts +79 -0
  77. package/dist/components/jsonschemaform/jsonSchemaFormUtils.d.ts +11 -0
  78. package/dist/components/layout/SolaceGrid.d.ts +8 -0
  79. package/dist/components/layout/SolaceGridList.d.ts +26 -0
  80. package/dist/components/layout/SolaceGridListMultiSelect.d.ts +26 -0
  81. package/dist/components/layout/SolaceIconTabs.d.ts +30 -0
  82. package/dist/components/layout/SolaceList.d.ts +4 -0
  83. package/dist/components/layout/SolaceListItem.d.ts +4 -0
  84. package/dist/components/layout/SolaceListItemButton.d.ts +4 -0
  85. package/dist/components/layout/SolacePageHeader.d.ts +60 -0
  86. package/dist/components/layout/SolaceSidePanelLayout.d.ts +64 -0
  87. package/dist/components/layout/SolaceSplitPane.d.ts +13 -0
  88. package/dist/components/layout/SolaceStack.d.ts +3 -0
  89. package/dist/components/layout/SolaceTabs.d.ts +53 -0
  90. package/dist/components/table/SolaceTable.d.ts +187 -0
  91. package/dist/components/table/components/ContentControlMenu.d.ts +15 -0
  92. package/dist/components/table/hooks/useClickedOutside.d.ts +1 -0
  93. package/dist/components/table/hooks/useExpandableRows.d.ts +28 -0
  94. package/dist/components/table/hooks/useSolaceTable.d.ts +35 -0
  95. package/dist/components/table/hooks/useTableBodyRenderHelper.d.ts +24 -0
  96. package/dist/components/table/hooks/useTableHeaderRenderHelper.d.ts +28 -0
  97. package/dist/components/table/table-utils.d.ts +51 -0
  98. package/dist/constants.d.ts +10 -0
  99. package/dist/hooks/useScrollIndicator.d.ts +6 -0
  100. package/dist/index.d.ts +141 -0
  101. package/dist/index.js +6 -0
  102. package/dist/index.js.map +1 -0
  103. package/dist/index.modern.mjs +37 -0
  104. package/dist/index.modern.mjs.map +1 -0
  105. package/dist/index.test.d.ts +1 -0
  106. package/dist/resources/icons/ArrowLeft.d.ts +4 -0
  107. package/dist/resources/icons/ArrowRight.d.ts +4 -0
  108. package/dist/resources/icons/CheckBoxIcons.d.ts +4 -0
  109. package/dist/resources/icons/CheckCircleIcon.d.ts +5 -0
  110. package/dist/resources/icons/CheckFilled16Icon.d.ts +3 -0
  111. package/dist/resources/icons/CloseIcon.d.ts +5 -0
  112. package/dist/resources/icons/CollapseIcon.d.ts +4 -0
  113. package/dist/resources/icons/DeleteIcon.d.ts +6 -0
  114. package/dist/resources/icons/EllipsisIcon.d.ts +4 -0
  115. package/dist/resources/icons/Error16Icon.d.ts +3 -0
  116. package/dist/resources/icons/ErrorIcon.d.ts +3 -0
  117. package/dist/resources/icons/ExpandIcon.d.ts +4 -0
  118. package/dist/resources/icons/FilterIcon.d.ts +5 -0
  119. package/dist/resources/icons/IconProps.d.ts +4 -0
  120. package/dist/resources/icons/InfoIcon.d.ts +3 -0
  121. package/dist/resources/icons/MoreHorizOutlinedIcon.d.ts +2 -0
  122. package/dist/resources/icons/MoveIcon.d.ts +6 -0
  123. package/dist/resources/icons/OpenExternalIcon.d.ts +2 -0
  124. package/dist/resources/icons/RadioIcons.d.ts +3 -0
  125. package/dist/resources/icons/SearchIcon.d.ts +5 -0
  126. package/dist/resources/icons/SelectIcons.d.ts +3 -0
  127. package/dist/resources/icons/SortIcons.d.ts +7 -0
  128. package/dist/resources/icons/SuccessIcon.d.ts +3 -0
  129. package/dist/resources/icons/UploadIcon.d.ts +3 -0
  130. package/dist/resources/icons/VerticalDotsIcon.d.ts +4 -0
  131. package/dist/resources/icons/VisibilityHideIcon.d.ts +5 -0
  132. package/dist/resources/icons/VisibilityShowIcon.d.ts +5 -0
  133. package/dist/resources/icons/WarnIcon.d.ts +3 -0
  134. package/dist/resources/theme.d.ts +68 -0
  135. package/dist/resources/trackingapi.d.ts +8 -0
  136. package/dist/resources/typography.d.ts +12 -0
  137. package/dist/theming/base/themeMapping.d.ts +6 -0
  138. package/dist/theming/boomi/themeMapping.d.ts +5 -0
  139. package/dist/theming/sap/themeMapping.d.ts +5 -0
  140. package/dist/theming/solace/themeMapping.d.ts +5 -0
  141. package/dist/theming/themeUtils.d.ts +10 -0
  142. package/dist/types/ThemeMapping.d.ts +224 -0
  143. package/dist/types/fieldTypes.d.ts +5 -0
  144. package/dist/types/index.d.ts +25 -0
  145. package/dist/types/modes.d.ts +4 -0
  146. package/dist/types/numericTypes.d.ts +6 -0
  147. package/dist/types/sizing.d.ts +13 -0
  148. package/dist/types/solaceCard.d.ts +87 -0
  149. package/dist/types/solaceCardHeader.d.ts +36 -0
  150. package/dist/types/solaceCategorizedSearch.d.ts +87 -0
  151. package/dist/types/solaceChip.d.ts +26 -0
  152. package/dist/types/solaceChipTextArea.d.ts +89 -0
  153. package/dist/types/solaceDatePicker.d.ts +16 -0
  154. package/dist/types/solaceEmptyStateBanner.d.ts +18 -0
  155. package/dist/types/solaceGrid.d.ts +9 -0
  156. package/dist/types/solaceLearningButton.d.ts +4 -0
  157. package/dist/types/solaceList.d.ts +130 -0
  158. package/dist/types/solacePageHeader.d.ts +62 -0
  159. package/dist/types/solacePopover.d.ts +71 -0
  160. package/dist/types/solaceProgress.d.ts +22 -0
  161. package/dist/types/solaceStack.d.ts +8 -0
  162. package/dist/types/solaceStepper.d.ts +81 -0
  163. package/dist/types/solaceTooltip.d.ts +8 -0
  164. package/dist/types/solaceTypography.d.ts +10 -0
  165. package/dist/types/solacefileUploader.d.ts +60 -0
  166. package/dist/types/states.d.ts +4 -0
  167. package/dist/types/statuses.d.ts +7 -0
  168. package/dist/types/supportedThemes.d.ts +6 -0
  169. package/dist/types/sx.d.ts +16 -0
  170. package/dist/utils.d.ts +4 -0
  171. package/package.json +113 -0
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import SolaceComponentProps from "./SolaceComponentProps";
3
+ export interface SolaceTruncatableLinkProps extends SolaceComponentProps {
4
+ /**
5
+ * Unique identifier for the component
6
+ */
7
+ id: string;
8
+ /**
9
+ * This is the text that will be displayed in the button
10
+ */
11
+ text: string | JSX.Element;
12
+ /**
13
+ * This is the function that will be called when the button/link is clicked
14
+ */
15
+ onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
16
+ /**
17
+ * This is the data-qa attribute for the component to identify it in tests
18
+ */
19
+ dataQa?: string;
20
+ /**
21
+ * This is the href for the external link
22
+ */
23
+ href?: string;
24
+ }
25
+ /**
26
+ * This component allows the SolaceButton ("link") to truncate its text with an ellipsis and provide a tooltip
27
+ */
28
+ declare function SolaceTruncatableLink({ id, text, onClick, dataQa, href }: SolaceTruncatableLinkProps): JSX.Element;
29
+ export default SolaceTruncatableLink;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { SolaceTypographyProps } from "../types";
3
+ export default function SolaceTypography(props: SolaceTypographyProps): JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { Breakpoint } from "@mui/material";
2
+ import { ReactNode } from "react";
3
+ import { SolaceButtonProps } from "../form/SolaceButton";
4
+ export declare type actionProps = Partial<SolaceButtonProps> & {
5
+ label: string;
6
+ id?: string;
7
+ };
8
+ export interface SolaceConfirmationDialogProps {
9
+ title?: string | JSX.Element;
10
+ contentText?: string;
11
+ actions?: actionProps[];
12
+ customAction?: JSX.Element;
13
+ /**
14
+ * whether to disable the default padding of Dialog and Dialog Title components
15
+ * @default false
16
+ */
17
+ disableDefaultPadding?: boolean;
18
+ isOpen: boolean;
19
+ /**
20
+ * whether to show an indeterminate linear progress indicator at the bottom border of the dialog
21
+ */
22
+ linearProgressIndicator?: boolean;
23
+ /**
24
+ * To override the display attribute of DialogContent, default: block
25
+ * currently supports block, contents, and flex
26
+ */
27
+ contentLayout?: "block" | "contents" | "flex";
28
+ maxWidth?: Breakpoint;
29
+ children?: ReactNode;
30
+ /**
31
+ * Footer content to be displayed at the bottom of the dialog
32
+ */
33
+ footer?: ReactNode;
34
+ }
35
+ declare function SolaceConfirmationDialog({ title, contentText, actions, customAction, disableDefaultPadding, isOpen, maxWidth, contentLayout, linearProgressIndicator, children, footer }: SolaceConfirmationDialogProps): JSX.Element;
36
+ export default SolaceConfirmationDialog;
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ import { SolaceFileUploaderProps } from "../../types";
3
+ /**
4
+ * SolaceFileUploader component allows users to upload files by dragging and dropping or selecting files from their device.
5
+ *
6
+ * @component
7
+ * @example
8
+ * ```tsx
9
+ * <SolaceFileUploader
10
+ * maxFiles={3}
11
+ * readOnly={false}
12
+ * fileNames={[]}
13
+ * onFileChange={(files) => console.log(files)}
14
+ * label="Drag and drop file here"
15
+ * errorText="Invalid file format"
16
+ * dataQa="fileUploader"
17
+ * id="fileUploader"
18
+ * minSize={0}
19
+ * maxSize={1024}
20
+ * accept:
21
+ * {
22
+ * 'image/png': ['.png'],
23
+ * 'text/html': ['.html', '.htm']
24
+ * 'image/*': []
25
+ * }
26
+ * />
27
+ * ```
28
+ * @returns {JSX.Element} The rendered SolaceFileUploader component.
29
+ */
30
+ export default function SolaceFileUploader(props: SolaceFileUploaderProps): JSX.Element;
@@ -0,0 +1,17 @@
1
+ export declare const strings: {
2
+ maxFilesErrorMessage: string;
3
+ maxSizeErrorMessage: string;
4
+ minSizeErrorMessage: string;
5
+ defaultSize: string;
6
+ sizeInKb: string;
7
+ sizeInMb: string;
8
+ };
9
+ export declare function isMIMEType(value: string): boolean;
10
+ /**
11
+ * Check if v is a file extension.
12
+ * @param {string} v
13
+ */
14
+ export declare function isExt(value: string): boolean;
15
+ export declare function acceptPropAsAcceptAttr(acceptedFiles: Record<string, string[]>): string;
16
+ export declare const validateFiles: (maxFiles: number, minSize: number, files: File[], maxSize?: number, acceptedFiles?: string) => string | null;
17
+ export declare function readableFileSize(bytes: number): string;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { SolaceLearningButtonProps } from "../../../types";
3
+ declare function SolaceLearningButton({ id, variant, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, isDisabled, title, component, type, startIcon, endIcon, onClick, dataQa, dataTags, children }: SolaceLearningButtonProps): JSX.Element;
4
+ export default SolaceLearningButton;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import SolaceComponentProps from "../SolaceComponentProps";
3
+ export interface ErrorTextProps extends SolaceComponentProps {
4
+ children: string | JSX.Element;
5
+ }
6
+ declare function ErrorText({ children }: ErrorTextProps): JSX.Element;
7
+ export default ErrorText;
@@ -0,0 +1,68 @@
1
+ /// <reference types="react" />
2
+ import SolaceComponentProps from "../SolaceComponentProps";
3
+ import { SX } from "../../types/sx";
4
+ export interface FormChildBaseProps extends SolaceComponentProps {
5
+ /**
6
+ * Unique identifier ... if `id` is not specified, `name` value will be used in order to make `label` and `helperText` accessible for screen readers
7
+ */
8
+ id: string;
9
+ /**
10
+ * the label content to display on the screen
11
+ */
12
+ label?: string | JSX.Element;
13
+ /**
14
+ * Boolean flag to allow labels to be rendered as SolaceStackLabel component, which provides more props, such as large, bold
15
+ */
16
+ stackLabel?: boolean;
17
+ /**
18
+ * Boolean flag to allow StackSolaceLabel component to be rendered with larger font size of 16px (default to 14px)
19
+ */
20
+ large?: boolean;
21
+ /**
22
+ * Boolean flag to allow StackSolaceLabel component to be rendered with font weight of medium (default to regular)
23
+ */
24
+ bold?: boolean;
25
+ /**
26
+ * The value of the `input` element, required for controlled component
27
+ */
28
+ value?: string;
29
+ /**
30
+ * Content to display as supportive/explanatory text
31
+ */
32
+ helperText?: string | JSX.Element;
33
+ /**
34
+ * HelperText when the `input` in error state
35
+ */
36
+ errorText?: string | JSX.Element;
37
+ /**
38
+ * HelperText when the `input` in warning state
39
+ */
40
+ warningText?: string | JSX.Element;
41
+ /**
42
+ * Boolean flag used to display an indicator of whether or not this `input` is mandatory
43
+ */
44
+ required: boolean;
45
+ /**
46
+ * Boolean flag to disable the `input`
47
+ */
48
+ disabled: boolean;
49
+ /**
50
+ * Boolean flag to set the `input` in a read-only state
51
+ */
52
+ readOnly: boolean;
53
+ /**
54
+ * Display the label horizontally
55
+ */
56
+ inlineLabel: boolean;
57
+ /**
58
+ * Center align the inline label, this will e used only for single line field label
59
+ */
60
+ centerInlineLabel?: boolean;
61
+ children: JSX.Element;
62
+ /**
63
+ * The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.
64
+ */
65
+ sx?: SX;
66
+ }
67
+ declare function FormChildBase({ id, label, stackLabel, large, bold, required, disabled, readOnly, inlineLabel, centerInlineLabel, helperText, errorText, warningText, children, sx }: FormChildBaseProps): JSX.Element;
68
+ export default FormChildBase;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import SolaceComponentProps from "../SolaceComponentProps";
3
+ export interface HelperTextProps extends SolaceComponentProps {
4
+ children: string | JSX.Element;
5
+ }
6
+ declare function HelperText({ children }: HelperTextProps): JSX.Element;
7
+ export default HelperText;
@@ -0,0 +1,87 @@
1
+ import React from "react";
2
+ import { SolaceTextFieldChangeEvent } from "./SolaceTextField";
3
+ export declare enum valueInputTypes {
4
+ textfield = "textfield",
5
+ select = "select",
6
+ autocomplete = "autocomplete"
7
+ }
8
+ export interface SolaceAttributeValuePairProps {
9
+ /**
10
+ * unique id for each Attribute Value Pair (AVP) item
11
+ */
12
+ id: string;
13
+ /**
14
+ * index for each Attribute Value Pair (AVP) item in the list, used to updated the list in response to delete and onchange events
15
+ */
16
+ index: number;
17
+ /**
18
+ * key for Attribute Value Pair (AVP)
19
+ */
20
+ avpKey: string;
21
+ /**
22
+ * value for Attribute Value Pair (AVP)
23
+ */
24
+ avpValue: string;
25
+ /**
26
+ *
27
+ */
28
+ dataTags: string;
29
+ /**
30
+ * TODO: implementation required
31
+ * specifies the type of the value providing component: types can be input, select etc. component, default to SolaceTextField if no type provided
32
+ */
33
+ type?: valueInputTypes;
34
+ /**
35
+ * specifies whether the Attribute Value Pair (AVP) component is rendered in ghost state
36
+ */
37
+ ghostItem: boolean;
38
+ /**
39
+ * callback for delete action
40
+ */
41
+ onDelete: (event: React.MouseEvent<HTMLElement>, index: number) => void;
42
+ /**
43
+ * callback for input onchange event
44
+ */
45
+ onChange: (event: SolaceTextFieldChangeEvent, index: number) => void;
46
+ /**
47
+ * callback for keyup event
48
+ */
49
+ onKeyUp: (event: React.KeyboardEvent<HTMLInputElement>) => void;
50
+ /**
51
+ * callback for onblur event
52
+ */
53
+ onBlur: (event: React.FocusEvent<HTMLInputElement>, index: number) => void;
54
+ /**
55
+ * validation error on an AVP value input value
56
+ */
57
+ keyErrorText?: string;
58
+ /**
59
+ * validation error on an AVP value input value
60
+ */
61
+ valueErrorText?: string;
62
+ /**
63
+ * An optional string to be displayed when an AVP key or value is empty when set to read-only.
64
+ */
65
+ emptyFieldDisplayValue?: string;
66
+ /**
67
+ * index of the element that is being dragged over with
68
+ * the index is updated on dragging
69
+ */
70
+ dropOverIndex: number | null;
71
+ /**
72
+ * dropping over state with three possible values:
73
+ * true: dropping from top to bottom
74
+ * false: dropping from bottom to top
75
+ * null: dropping back to the same position or outside of the droppable container
76
+ */
77
+ dropFromTop: boolean | null;
78
+ /**
79
+ * read only flag
80
+ */
81
+ readOnly?: boolean;
82
+ /**
83
+ * Boolean flag to disable re-ordering of items
84
+ */
85
+ disableReorder?: boolean;
86
+ }
87
+ export declare const SolaceAttributeValuePair: ({ id, index, avpKey, avpValue, dataTags, ghostItem, onDelete, onChange, onKeyUp, onBlur, keyErrorText, valueErrorText, dropOverIndex, dropFromTop, readOnly, emptyFieldDisplayValue, disableReorder }: SolaceAttributeValuePairProps) => JSX.Element;
@@ -0,0 +1,109 @@
1
+ /// <reference types="react" />
2
+ import { valueInputTypes } from "./SolaceAttributeValuePair";
3
+ export interface VirtualizeAvpListOptions {
4
+ minHeight?: number | string;
5
+ height?: number | string;
6
+ useWindowScrolling?: boolean;
7
+ increaseViewportBy?: number | {
8
+ top: number;
9
+ bottom: number;
10
+ };
11
+ initialTopMostItemIndex?: number;
12
+ }
13
+ export interface AVPItem {
14
+ id?: string;
15
+ key: string;
16
+ value: string;
17
+ keyErrorText?: string;
18
+ valueErrorText?: string;
19
+ }
20
+ export interface SolaceAttributeValuePairFormProps {
21
+ /**
22
+ * Unique identifier, if `id` is not specified, `name` value will be used
23
+ */
24
+ id?: string;
25
+ /**
26
+ * Name attribute to assign to the AVP form
27
+ */
28
+ name: string;
29
+ /**
30
+ * read only flag
31
+ */
32
+ readOnly?: boolean;
33
+ /**
34
+ * label for the key column
35
+ */
36
+ labelForKeys?: string | JSX.Element;
37
+ /**
38
+ * label for the value column
39
+ */
40
+ labelForValues?: string | JSX.Element;
41
+ /**
42
+ * TODO: implementation required
43
+ * specifies the type of the value providing component: types can be input, select etc. component, default to SolaceTextField if no type provided
44
+ */
45
+ type?: valueInputTypes;
46
+ /**
47
+ * initial AVP list of key/value pairs, it can be an empty array e.g.[]
48
+ */
49
+ avpList?: Array<AVPItem>;
50
+ /**
51
+ * callback function that returns the current AVP list
52
+ */
53
+ onAVPListUpdate?: (list: Array<AVPItem>) => void;
54
+ /**
55
+ * validate individual AVP values, the function is triggered onBlur event
56
+ */
57
+ avpKeyValidationCallback?: (input: string, values: Array<AVPItem>) => string;
58
+ /**
59
+ * validate individual AVP values, the function is triggered onBlur event
60
+ */
61
+ avpValueValidationCallback?: (input: string, values: Array<AVPItem>) => string;
62
+ /**
63
+ * Boolean flag used to display an indicator of whether or not `input` for key field is mandatory
64
+ */
65
+ enableRequiredKeyFieldIndicator?: boolean;
66
+ /**
67
+ * Boolean flag used to display an indicator of whether or not `input` for value field is mandatory
68
+ */
69
+ enableRequiredValueFieldIndicator?: boolean;
70
+ /**
71
+ * An optional string to be displayed when an AVP key or value is empty when set to read-only.
72
+ */
73
+ emptyFieldDisplayValue?: string;
74
+ /**
75
+ *
76
+ * This boolean allows user to toggle whether keys are mandatory or not (i.e. if set to false, you can have a value without an associated key)
77
+ */
78
+ keyRequired?: boolean;
79
+ /**
80
+ * String message to display if an AVP value is specified without an associated key (unless allowedKeyToBeEmpty is true, then no validation check done)
81
+ */
82
+ keyIsRequiredMessage?: string;
83
+ /**
84
+ * Content to display as supportive/explanitory text
85
+ */
86
+ helperText?: string | JSX.Element;
87
+ /**
88
+ * Boolean flag to mark the `input` in error state
89
+ */
90
+ hasErrors?: boolean;
91
+ /**
92
+ * Boolean flag to mark the `input` in warn state
93
+ */
94
+ hasWarnings?: boolean;
95
+ /**
96
+ * Boolean flag to disable re-ordering of items
97
+ */
98
+ disableReorder?: boolean;
99
+ /**
100
+ * AVP values maximum height if virtualizedAvpListOption is not set
101
+ */
102
+ avpListMaxHeight?: string;
103
+ /**
104
+ * If option is set, only render part of a large data set to fill the viewport
105
+ */
106
+ virtualizedAvpListOption?: VirtualizeAvpListOptions;
107
+ }
108
+ declare const SolaceAttributeValuePairForm: ({ id, name, readOnly, labelForKeys, labelForValues, avpList, onAVPListUpdate, avpKeyValidationCallback, avpValueValidationCallback, enableRequiredKeyFieldIndicator, enableRequiredValueFieldIndicator, emptyFieldDisplayValue, keyRequired, keyIsRequiredMessage, helperText, hasErrors, hasWarnings, disableReorder, avpListMaxHeight, virtualizedAvpListOption }: SolaceAttributeValuePairFormProps) => JSX.Element;
109
+ export default SolaceAttributeValuePairForm;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { TextFieldProps } from "@mui/material";
3
+ declare type CommonAutoCompleteTextFieldProps = TextFieldProps;
4
+ declare function SolaceAutoCompleteTextField(props: CommonAutoCompleteTextFieldProps): JSX.Element;
5
+ declare namespace SolaceAutoCompleteTextField {
6
+ var defaultProps: {
7
+ variant: string;
8
+ fullWidth: boolean;
9
+ };
10
+ }
11
+ export default SolaceAutoCompleteTextField;
@@ -0,0 +1,23 @@
1
+ /// <reference types="react" />
2
+ import SolaceComponentProps from "../SolaceComponentProps";
3
+ export interface SolaceButtonProps extends SolaceComponentProps {
4
+ id?: string;
5
+ variant: "call-to-action" | "outline" | "text" | "icon" | "link";
6
+ "aria-label"?: string;
7
+ "aria-labelledby"?: string;
8
+ isDisabled?: boolean;
9
+ underline?: "none" | "hover" | "always";
10
+ title?: string;
11
+ href?: string;
12
+ component?: "button" | "span";
13
+ type?: "button" | "submit" | "reset";
14
+ startIcon?: symbol | JSX.Element;
15
+ endIcon?: symbol | JSX.Element;
16
+ onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
17
+ children?: string | JSX.Element;
18
+ dense?: boolean;
19
+ openLinkInNewTab?: boolean;
20
+ disabledFocusState?: boolean;
21
+ }
22
+ declare function SolaceButton({ id, variant, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, isDisabled, underline, title, href, component, type, startIcon, endIcon, onClick, dataQa, dataTags, children, dense, openLinkInNewTab, eventName, disabledFocusState }: SolaceButtonProps): JSX.Element;
23
+ export default SolaceButton;
@@ -0,0 +1,73 @@
1
+ /// <reference types="react" />
2
+ import SolaceComponentProps from "../SolaceComponentProps";
3
+ export interface SolaceCheckboxChangeEvent {
4
+ name: string;
5
+ value: boolean;
6
+ }
7
+ export interface SolaceCheckBoxProps extends SolaceComponentProps {
8
+ /**
9
+ * Unique identifier ... if `id` is not specified, `name` value will be used in order to make `label` accessible for screen readers
10
+ */
11
+ id?: string;
12
+ /**
13
+ * Name attribute to assign to the `checkbox` element
14
+ */
15
+ name: string;
16
+ /**
17
+ * the label content to display on the screen
18
+ */
19
+ label?: string | JSX.Element;
20
+ /**
21
+ * The text to display as the tooltip hint
22
+ */
23
+ title?: string;
24
+ /**
25
+ * Content to display as supportive/explanitory text
26
+ */
27
+ subTextProps?: {
28
+ label?: string | JSX.Element;
29
+ light?: boolean;
30
+ };
31
+ /**
32
+ * Content to display as supportive/explanitory text
33
+ */
34
+ helperText?: string | JSX.Element;
35
+ /**
36
+ * Boolean flag to mark the `input` in error state
37
+ */
38
+ hasErrors?: boolean;
39
+ /**
40
+ * Boolean flag to check or uncheck the `checkbox`
41
+ */
42
+ checked?: boolean;
43
+ /**
44
+ * Boolean flag used to display an indicator of whether or not this `checkbox` is mandatory
45
+ */
46
+ required?: boolean;
47
+ /**
48
+ * Boolean flag to disable the `checkbox`
49
+ */
50
+ disabled?: boolean;
51
+ /**
52
+ * Callback function to trigger whenever the value of the `checkbox` is changed
53
+ */
54
+ onChange?: (event: SolaceCheckboxChangeEvent) => void;
55
+ /**
56
+ * Boolean flag to set the checkbox to indeterminate
57
+ */
58
+ indeterminate?: boolean;
59
+ /**
60
+ * Boolean flag to set the checkbox to readOnly
61
+ */
62
+ readOnly?: boolean;
63
+ /**
64
+ * Boolean flag to allow font weight of medium (default to regular) for label
65
+ */
66
+ boldLabel?: boolean;
67
+ /**
68
+ * Display the label with a larger font
69
+ */
70
+ largeLabel?: boolean;
71
+ }
72
+ declare const SolaceCheckBox: ({ id, name, label, title, helperText, hasErrors, checked, required, disabled, indeterminate, readOnly, boldLabel, largeLabel, subTextProps, onChange, dataQa, dataTags }: SolaceCheckBoxProps) => JSX.Element;
73
+ export default SolaceCheckBox;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { SolaceChipTextAreaProps } from "@src/types/solaceChipTextArea";
3
+ declare const SolaceChipTextArea: React.FC<SolaceChipTextAreaProps>;
4
+ export default SolaceChipTextArea;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export declare const ChipInputContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
5
+ export declare const ChipItem: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
8
+ export declare const InputWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
+ export declare const StyledInputBase: import("@emotion/styled").StyledComponent<import("@mui/material").InputBaseProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,56 @@
1
+ /// <reference types="react" />
2
+ import { Controlled as CodeMirror } from "react-codemirror2";
3
+ import SolaceComponentProps from "../SolaceComponentProps";
4
+ import "codemirror/mode/xml/xml";
5
+ import "codemirror/mode/javascript/javascript";
6
+ import "codemirror/mode/protobuf/protobuf";
7
+ import "codemirror/theme/material.css";
8
+ import "codemirror/lib/codemirror.css";
9
+ import "codemirror/addon/lint/json-lint";
10
+ import "codemirror/keymap/sublime";
11
+ import "codemirror/addon/display/fullscreen";
12
+ import "codemirror/addon/display/fullscreen.css";
13
+ export interface SolaceCodeEditorProps extends SolaceComponentProps {
14
+ /**
15
+ * Unique identifier for the button
16
+ */
17
+ id?: string;
18
+ /**
19
+ * The value to initialize the content with
20
+ */
21
+ value?: string;
22
+ /**
23
+ * Renders the button disabled
24
+ */
25
+ readOnly?: boolean;
26
+ /**
27
+ * render SolaceCodeEditor in fullscreen state
28
+ */
29
+ fullScreen?: boolean;
30
+ /**
31
+ * The formatting style to render the content as
32
+ */
33
+ mode?: "json" | "xml" | "protobuf";
34
+ /**
35
+ * Content to display as supportive/explanitory text
36
+ */
37
+ helperText?: string | JSX.Element;
38
+ /**
39
+ * Boolean flag to mark the SolaceCodeEditor in error state
40
+ */
41
+ hasErrors?: boolean;
42
+ /**
43
+ * Boolean flag to mark the SolaceCodeEditor in warning state
44
+ */
45
+ hasWarnings?: boolean;
46
+ /**
47
+ * whether to allow CodeEditor to be expandable
48
+ */
49
+ expandable?: boolean;
50
+ /**
51
+ * Callback function to trigger whenever the value of the `input` is changed
52
+ */
53
+ onChange?: (editor: CodeMirror, data: any, value: string) => void;
54
+ }
55
+ declare function SolaceCodeEditor({ id, mode, value, readOnly, fullScreen, expandable, helperText, hasErrors, hasWarnings, onChange }: SolaceCodeEditorProps): JSX.Element;
56
+ export default SolaceCodeEditor;
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ export interface SolaceLabelProps {
3
+ /**
4
+ * Unique identifier of the label
5
+ */
6
+ id: string;
7
+ /**
8
+ * identifier used for specifying which form element this label is bound to
9
+ */
10
+ htmlForId?: string;
11
+ /**
12
+ * Boolean flag used to display an indicator of whether or not this `input` is mandatory
13
+ */
14
+ required?: boolean;
15
+ /**
16
+ * Boolean flag to disable the `input`
17
+ */
18
+ disabled?: boolean;
19
+ /**
20
+ * Boolean flag for readOnly labels, changes font color to 55% black
21
+ */
22
+ readOnly?: boolean;
23
+ /**
24
+ * Boolean flag to suppress line breaks (text wrapping) within the label
25
+ */
26
+ noWrap?: boolean;
27
+ /**
28
+ *
29
+ */
30
+ children?: React.ReactNode;
31
+ }
32
+ declare function SolaceLabel({ id, htmlForId, required, disabled, readOnly, noWrap, children }: SolaceLabelProps): JSX.Element;
33
+ export default SolaceLabel;