@reltio/design 0.0.2 → 0.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 (208) hide show
  1. package/components/AssistantLoader/AssistantLoader.d.ts +7 -0
  2. package/components/AssistantLoader/AssistantLoader.js +15 -0
  3. package/components/AssistantLoader/AssistantLoader.module.css.d.ts +2 -0
  4. package/components/AssistantLoader/AssistantLoader.module.css.js +101 -0
  5. package/components/AssistantLoader/AssistantLoader.module.css.json +1 -0
  6. package/components/AssistantLoader/AssistantLoader.types.d.ts +16 -0
  7. package/components/AssistantLoader/AssistantLoader.types.js +1 -0
  8. package/components/AssistantLoader/index.d.ts +2 -0
  9. package/components/AssistantLoader/index.js +1 -0
  10. package/components/Chat/Chat.d.ts +14 -0
  11. package/components/Chat/Chat.js +84 -0
  12. package/components/Chat/Chat.module.css.d.ts +2 -0
  13. package/components/Chat/Chat.module.css.js +78 -0
  14. package/components/Chat/Chat.module.css.json +1 -0
  15. package/components/Chat/Chat.types.d.ts +58 -0
  16. package/components/Chat/Chat.types.js +1 -0
  17. package/components/Chat/components/AssistantMessage/AssistantMessage.d.ts +7 -0
  18. package/components/Chat/components/AssistantMessage/AssistantMessage.js +24 -0
  19. package/components/Chat/components/AssistantMessage/AssistantMessage.module.css.d.ts +2 -0
  20. package/components/Chat/components/AssistantMessage/AssistantMessage.module.css.js +26 -0
  21. package/components/Chat/components/AssistantMessage/AssistantMessage.module.css.json +1 -0
  22. package/components/Chat/components/AssistantMessage/AssistantMessage.types.d.ts +20 -0
  23. package/components/Chat/components/AssistantMessage/AssistantMessage.types.js +1 -0
  24. package/components/Chat/components/AssistantMessage/index.d.ts +2 -0
  25. package/components/Chat/components/AssistantMessage/index.js +1 -0
  26. package/components/Chat/components/UserMessage/UserMessage.d.ts +6 -0
  27. package/components/Chat/components/UserMessage/UserMessage.js +12 -0
  28. package/components/Chat/components/UserMessage/UserMessage.module.css.d.ts +2 -0
  29. package/components/Chat/components/UserMessage/UserMessage.module.css.js +11 -0
  30. package/components/Chat/components/UserMessage/UserMessage.module.css.json +1 -0
  31. package/components/Chat/components/UserMessage/UserMessage.types.d.ts +16 -0
  32. package/components/Chat/components/UserMessage/UserMessage.types.js +1 -0
  33. package/components/Chat/components/UserMessage/index.d.ts +2 -0
  34. package/components/Chat/components/UserMessage/index.js +1 -0
  35. package/components/Chat/index.d.ts +2 -0
  36. package/components/Chat/index.js +1 -0
  37. package/components/Details/Details.d.ts +7 -0
  38. package/components/Details/Details.js +40 -0
  39. package/components/Details/Details.module.css.d.ts +2 -0
  40. package/components/Details/Details.module.css.js +105 -0
  41. package/components/Details/Details.module.css.json +1 -0
  42. package/components/Details/Details.types.d.ts +55 -0
  43. package/components/Details/Details.types.js +1 -0
  44. package/components/Details/index.d.ts +2 -0
  45. package/components/Details/index.js +1 -0
  46. package/components/ErrorBoundary/ErrorBoundary.d.ts +12 -0
  47. package/components/ErrorBoundary/ErrorBoundary.js +23 -0
  48. package/components/ErrorBoundary/ErrorBoundary.types.d.ts +25 -0
  49. package/components/ErrorBoundary/ErrorBoundary.types.js +1 -0
  50. package/components/ErrorBoundary/index.d.ts +2 -0
  51. package/components/ErrorBoundary/index.js +1 -0
  52. package/components/ErrorMessage/ErrorMessage.d.ts +6 -0
  53. package/components/ErrorMessage/ErrorMessage.js +12 -0
  54. package/components/ErrorMessage/ErrorMessage.module.css.d.ts +2 -0
  55. package/components/ErrorMessage/ErrorMessage.module.css.js +50 -0
  56. package/components/ErrorMessage/ErrorMessage.module.css.json +1 -0
  57. package/components/ErrorMessage/ErrorMessage.types.d.ts +14 -0
  58. package/components/ErrorMessage/ErrorMessage.types.js +1 -0
  59. package/components/ErrorMessage/index.d.ts +2 -0
  60. package/components/ErrorMessage/index.js +1 -0
  61. package/components/Markdown/Markdown.d.ts +8 -0
  62. package/components/Markdown/Markdown.js +26 -0
  63. package/components/Markdown/Markdown.module.css.d.ts +2 -0
  64. package/components/Markdown/Markdown.module.css.js +228 -0
  65. package/components/Markdown/Markdown.module.css.json +1 -0
  66. package/components/Markdown/Markdown.types.d.ts +54 -0
  67. package/components/Markdown/Markdown.types.js +1 -0
  68. package/components/Markdown/index.d.ts +2 -0
  69. package/components/Markdown/index.js +1 -0
  70. package/components/Markdown/markdownOverrides.d.ts +19 -0
  71. package/components/Markdown/markdownOverrides.js +36 -0
  72. package/components/Skeleton/Skeleton.d.ts +7 -0
  73. package/components/Skeleton/Skeleton.js +16 -0
  74. package/components/Skeleton/Skeleton.module.css.d.ts +2 -0
  75. package/components/Skeleton/Skeleton.module.css.js +73 -0
  76. package/components/Skeleton/Skeleton.module.css.json +1 -0
  77. package/components/Skeleton/Skeleton.types.d.ts +31 -0
  78. package/components/Skeleton/Skeleton.types.js +1 -0
  79. package/components/Skeleton/index.d.ts +2 -0
  80. package/components/Skeleton/index.js +1 -0
  81. package/components/TextArea/TextArea.d.ts +22 -0
  82. package/components/TextArea/TextArea.js +13 -0
  83. package/components/TextArea/TextArea.module.css.d.ts +2 -0
  84. package/components/TextArea/TextArea.module.css.js +159 -0
  85. package/components/TextArea/TextArea.module.css.json +1 -0
  86. package/components/TextArea/TextArea.types.d.ts +39 -0
  87. package/components/TextArea/TextArea.types.js +1 -0
  88. package/components/TextArea/index.d.ts +2 -0
  89. package/components/TextArea/index.js +1 -0
  90. package/components/TreeList/TreeList.js +8 -9
  91. package/components/TreeList/TreeList.types.d.ts +5 -3
  92. package/components/TreeList/components/TreeNode/TreeNode.js +4 -4
  93. package/components/TreeList/components/TreeNode/TreeNode.module.css.js +33 -5
  94. package/components/TreeList/components/TreeNode/TreeNode.module.css.json +1 -1
  95. package/components/TreeList/components/TreeNode/TreeNode.types.d.ts +1 -1
  96. package/components/TreeList/helpers.js +1 -1
  97. package/components/index.d.ts +10 -0
  98. package/components/index.js +10 -0
  99. package/icons/AccountCircle.d.ts +2 -0
  100. package/icons/AccountCircle.js +6 -0
  101. package/icons/Add.d.ts +2 -0
  102. package/icons/Add.js +6 -0
  103. package/icons/ArrowBack.d.ts +2 -0
  104. package/icons/ArrowBack.js +6 -0
  105. package/icons/ArrowDropDown.d.ts +2 -0
  106. package/icons/ArrowDropDown.js +6 -0
  107. package/icons/ArrowDropUp.d.ts +2 -0
  108. package/icons/ArrowDropUp.js +6 -0
  109. package/icons/ArrowForward.d.ts +2 -0
  110. package/icons/ArrowForward.js +6 -0
  111. package/icons/ArrowLeft.d.ts +2 -0
  112. package/icons/ArrowLeft.js +6 -0
  113. package/icons/ArrowRight.d.ts +2 -0
  114. package/icons/ArrowRight.js +6 -0
  115. package/icons/Attachment.d.ts +2 -0
  116. package/icons/Attachment.js +6 -0
  117. package/icons/Chat.d.ts +2 -0
  118. package/icons/Chat.js +6 -0
  119. package/icons/Check.d.ts +2 -0
  120. package/icons/Check.js +6 -0
  121. package/icons/CheckCircle.d.ts +2 -0
  122. package/icons/CheckCircle.js +6 -0
  123. package/icons/ChevronLeft.d.ts +2 -0
  124. package/icons/ChevronLeft.js +6 -0
  125. package/icons/ChevronRight.d.ts +2 -0
  126. package/icons/ChevronRight.js +6 -0
  127. package/icons/Close.d.ts +2 -0
  128. package/icons/Close.js +6 -0
  129. package/icons/CodeBrackets.d.ts +2 -0
  130. package/icons/CodeBrackets.js +6 -0
  131. package/icons/Comment.d.ts +2 -0
  132. package/icons/Comment.js +6 -0
  133. package/icons/ContentCopy.d.ts +2 -0
  134. package/icons/ContentCopy.js +6 -0
  135. package/icons/ContentPaste.d.ts +2 -0
  136. package/icons/ContentPaste.js +6 -0
  137. package/icons/Delete.d.ts +2 -0
  138. package/icons/Delete.js +6 -0
  139. package/icons/Description.d.ts +2 -0
  140. package/icons/Description.js +6 -0
  141. package/icons/Download.d.ts +2 -0
  142. package/icons/Download.js +6 -0
  143. package/icons/Edit.d.ts +2 -0
  144. package/icons/Edit.js +6 -0
  145. package/icons/Email.d.ts +2 -0
  146. package/icons/Email.js +6 -0
  147. package/icons/ErrorCircle.d.ts +2 -0
  148. package/icons/ErrorCircle.js +6 -0
  149. package/icons/ExpandLess.d.ts +2 -0
  150. package/icons/ExpandLess.js +6 -0
  151. package/icons/ExpandMore.d.ts +2 -0
  152. package/icons/ExpandMore.js +6 -0
  153. package/icons/FilterList.d.ts +2 -0
  154. package/icons/FilterList.js +6 -0
  155. package/icons/Folder.d.ts +2 -0
  156. package/icons/Folder.js +6 -0
  157. package/icons/Help.d.ts +2 -0
  158. package/icons/Help.js +6 -0
  159. package/icons/Icon.module.css.d.ts +2 -0
  160. package/icons/Icon.module.css.js +70 -0
  161. package/icons/Icon.module.css.json +1 -0
  162. package/icons/Icon.types.d.ts +13 -0
  163. package/icons/Icon.types.js +1 -0
  164. package/icons/Info.d.ts +2 -0
  165. package/icons/Info.js +6 -0
  166. package/icons/KeyboardArrowDown.d.ts +2 -0
  167. package/icons/KeyboardArrowDown.js +6 -0
  168. package/icons/KeyboardArrowUp.d.ts +2 -0
  169. package/icons/KeyboardArrowUp.js +6 -0
  170. package/icons/Logout.d.ts +2 -0
  171. package/icons/Logout.js +6 -0
  172. package/icons/Menu.d.ts +2 -0
  173. package/icons/Menu.js +6 -0
  174. package/icons/Notifications.d.ts +2 -0
  175. package/icons/Notifications.js +6 -0
  176. package/icons/People.d.ts +2 -0
  177. package/icons/People.js +6 -0
  178. package/icons/Person.d.ts +2 -0
  179. package/icons/Person.js +6 -0
  180. package/icons/Refresh.d.ts +2 -0
  181. package/icons/Refresh.js +6 -0
  182. package/icons/Remove.d.ts +2 -0
  183. package/icons/Remove.js +6 -0
  184. package/icons/Save.d.ts +2 -0
  185. package/icons/Save.js +6 -0
  186. package/icons/Search.d.ts +2 -0
  187. package/icons/Search.js +6 -0
  188. package/icons/Settings.d.ts +2 -0
  189. package/icons/Settings.js +6 -0
  190. package/icons/Share.d.ts +2 -0
  191. package/icons/Share.js +6 -0
  192. package/icons/Sort.d.ts +2 -0
  193. package/icons/Sort.js +6 -0
  194. package/icons/Upload.d.ts +2 -0
  195. package/icons/Upload.js +6 -0
  196. package/icons/Visibility.d.ts +2 -0
  197. package/icons/Visibility.js +6 -0
  198. package/icons/VisibilityOff.d.ts +2 -0
  199. package/icons/VisibilityOff.js +6 -0
  200. package/icons/Warning.d.ts +2 -0
  201. package/icons/Warning.js +6 -0
  202. package/icons/index.d.ts +52 -0
  203. package/icons/index.js +101 -0
  204. package/package.json +8 -7
  205. package/packages/design/index.d.ts +1 -2
  206. package/packages/design/index.js +1 -2
  207. package/components/TreeList/components/ChevronIcon.d.ts +0 -5
  208. package/components/TreeList/components/ChevronIcon.js +0 -8
@@ -0,0 +1,105 @@
1
+ import styleInject from 'style-inject';
2
+ import json from './Details.module.css.json';
3
+ styleInject(`
4
+ /* Override via --reltio-details-* on .root or parent; fallbacks = light values */
5
+ ._root_1njq6_1 {
6
+ margin: 1rem 0;
7
+ background-color: var(--reltio-details-background-color, #fff);
8
+ border: var(--reltio-details-border-width, 0.5px) solid
9
+ var(--reltio-details-border-color, #e3e3f2);
10
+ border-radius: var(--reltio-details-border-radius, 12px);
11
+ overflow: hidden;
12
+ padding: 0;
13
+ font-family: var(--reltio-details-font-family, "Roboto Flex", sans-serif);
14
+ font-size: var(--reltio-details-font-size, 14px);
15
+ }
16
+
17
+ ._summary_1njq6_14 {
18
+ display: flex;
19
+ align-items: center;
20
+ gap: var(--reltio-details-summary-gap, 8px);
21
+ cursor: pointer;
22
+ user-select: none;
23
+ list-style: none;
24
+ color: var(--reltio-details-summary-text-color, #0e0e25);
25
+ line-height: var(--reltio-details-summary-line-height, 1.71);
26
+ padding: var(--reltio-details-summary-padding, 12px);
27
+ margin: 0;
28
+ border-bottom-left-radius: 0;
29
+ border-bottom-right-radius: 0;
30
+ outline: none;
31
+ font-weight: 500;
32
+ }
33
+
34
+ ._summary_1njq6_14:hover {
35
+ background-color: var(--reltio-details-summary-hover-bg, #b2b2ff4d);
36
+ }
37
+
38
+ ._summary_1njq6_14::-webkit-details-marker {
39
+ display: none;
40
+ }
41
+
42
+ ._summary_1njq6_14::marker {
43
+ display: none;
44
+ }
45
+
46
+ ._icon_1njq6_43 {
47
+ display: flex;
48
+ align-items: center;
49
+ justify-content: center;
50
+ background-color: transparent;
51
+ flex-shrink: 0;
52
+ }
53
+
54
+ ._summaryText_1njq6_51 {
55
+ flex: 1;
56
+ font-weight: var(--reltio-details-title-font-weight, 500);
57
+ letter-spacing: var(--reltio-details-title-letter-spacing, 0.045px);
58
+ }
59
+
60
+ ._chevron_1njq6_57 {
61
+ flex-shrink: 0;
62
+ transition: transform var(--reltio-details-transition-duration, 195ms)
63
+ var(--reltio-details-transition-ease, cubic-bezier(0.4, 0, 0.2, 1));
64
+ color: var(--reltio-details-chevron-color, #0e0e25);
65
+ width: var(--reltio-details-chevron-size, 24px);
66
+ height: var(--reltio-details-chevron-size, 24px);
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ }
71
+
72
+ ._chevronOpen_1njq6_69 {
73
+ transform: rotate(180deg);
74
+ }
75
+
76
+ ._content_1njq6_73 {
77
+ padding: 0 var(--reltio-details-content-padding, 12px)
78
+ var(--reltio-details-content-padding, 12px)
79
+ var(--reltio-details-content-padding, 12px);
80
+ color: var(--reltio-details-content-text-color, #0e0e25);
81
+ line-height: var(--reltio-details-content-line-height, 1.71);
82
+ }
83
+
84
+ ._content_1njq6_73 pre {
85
+ margin: 0;
86
+ background-color: var(--reltio-details-code-background-color, #f5f5fa);
87
+ border-radius: var(--reltio-details-content-pre-radius, 8px);
88
+ padding: var(--reltio-details-content-pre-padding, 16px);
89
+ }
90
+
91
+ ._content_1njq6_73 code {
92
+ color: var(--reltio-details-content-code-color, #0e0e25);
93
+ background-color: #f5f5f5;
94
+ padding: 0.2em 0.4em;
95
+ border-radius: 3px;
96
+ font-family: monospace;
97
+ font-size: 0.9em;
98
+ }
99
+
100
+ ._content_1njq6_73 p {
101
+ margin-top: var(--reltio-details-content-p-margin, 8px);
102
+ margin-bottom: var(--reltio-details-content-p-margin, 8px);
103
+ }
104
+ `);
105
+ export default json;
@@ -0,0 +1 @@
1
+ { "root": "_root_1njq6_1", "summary": "_summary_1njq6_14", "icon": "_icon_1njq6_43", "summaryText": "_summaryText_1njq6_51", "chevron": "_chevron_1njq6_57", "chevronOpen": "_chevronOpen_1njq6_69", "content": "_content_1njq6_73" }
@@ -0,0 +1,55 @@
1
+ import type React from "react";
2
+ /**
3
+ * CSS custom properties supported by Details (for style overrides).
4
+ * Values are CSS strings (e.g. colors, lengths, var(...)).
5
+ */
6
+ /** Order matches Details.module.css (.root → .summary → .chevron → .content). */
7
+ export type DetailsStyleVars = {
8
+ "--reltio-details-background-color"?: string;
9
+ "--reltio-details-border-color"?: string;
10
+ "--reltio-details-border-radius"?: string;
11
+ "--reltio-details-border-width"?: string;
12
+ "--reltio-details-font-family"?: string;
13
+ "--reltio-details-font-size"?: string;
14
+ "--reltio-details-summary-text-color"?: string;
15
+ "--reltio-details-summary-hover-bg"?: string;
16
+ "--reltio-details-summary-padding"?: string;
17
+ "--reltio-details-summary-gap"?: string;
18
+ "--reltio-details-summary-line-height"?: string;
19
+ "--reltio-details-title-font-weight"?: string;
20
+ "--reltio-details-title-letter-spacing"?: string;
21
+ "--reltio-details-chevron-size"?: string;
22
+ "--reltio-details-chevron-color"?: string;
23
+ "--reltio-details-transition-duration"?: string;
24
+ "--reltio-details-transition-ease"?: string;
25
+ "--reltio-details-content-text-color"?: string;
26
+ "--reltio-details-content-line-height"?: string;
27
+ "--reltio-details-content-padding"?: string;
28
+ "--reltio-details-content-code-color"?: string;
29
+ "--reltio-details-content-pre-padding"?: string;
30
+ "--reltio-details-content-pre-radius"?: string;
31
+ "--reltio-details-content-p-margin"?: string;
32
+ "--reltio-details-code-background-color"?: string;
33
+ };
34
+ /**
35
+ * Props for the Details component
36
+ */
37
+ export type DetailsProps = {
38
+ /**
39
+ * Whether the details element is initially open
40
+ * @default false
41
+ */
42
+ open?: boolean;
43
+ /**
44
+ * Content of the details element (can include summary and other content)
45
+ */
46
+ children: React.ReactNode;
47
+ /**
48
+ * Additional CSS class names
49
+ */
50
+ className?: string;
51
+ /**
52
+ * Additional CSS variables (and standard style props)
53
+ */
54
+ style?: React.CSSProperties & DetailsStyleVars;
55
+ } & Omit<React.DetailsHTMLAttributes<HTMLDetailsElement>, "open" | "className" | "style" | "children">;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./Details";
2
+ export type * from "./Details.types";
@@ -0,0 +1 @@
1
+ export * from "./Details";
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import type { ErrorBoundaryProps, ErrorBoundaryState } from "./ErrorBoundary.types";
3
+ /**
4
+ * Reusable React Error Boundary (class component).
5
+ * Catches render-time errors from descendants, renders fallback UI, and optionally calls onError.
6
+ */
7
+ export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
8
+ constructor(props: ErrorBoundaryProps);
9
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState;
10
+ componentDidCatch(error: Error, info: React.ErrorInfo): void;
11
+ render(): React.ReactNode;
12
+ }
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ /**
3
+ * Reusable React Error Boundary (class component).
4
+ * Catches render-time errors from descendants, renders fallback UI, and optionally calls onError.
5
+ */
6
+ export class ErrorBoundary extends React.Component {
7
+ constructor(props) {
8
+ super(props);
9
+ this.state = { hasError: false, error: null };
10
+ }
11
+ static getDerivedStateFromError(error) {
12
+ return { hasError: true, error };
13
+ }
14
+ componentDidCatch(error, info) {
15
+ this.props.onError?.(error, info);
16
+ }
17
+ render() {
18
+ if (this.state.error) {
19
+ return this.props.fallback;
20
+ }
21
+ return this.props.children;
22
+ }
23
+ }
@@ -0,0 +1,25 @@
1
+ import type React from "react";
2
+ /**
3
+ * Props for the ErrorBoundary component.
4
+ */
5
+ export type ErrorBoundaryProps = {
6
+ /**
7
+ * Content to render when no error occurs.
8
+ */
9
+ children: React.ReactNode;
10
+ /**
11
+ * Content to render when an error is caught from a descendant.
12
+ */
13
+ fallback: React.ReactNode;
14
+ /**
15
+ * Optional callback invoked in componentDidCatch with the caught error and React.ErrorInfo.
16
+ */
17
+ onError?: (error: Error, info: React.ErrorInfo) => void;
18
+ };
19
+ /**
20
+ * Internal state for the ErrorBoundary class component.
21
+ */
22
+ export type ErrorBoundaryState = {
23
+ hasError: boolean;
24
+ error: Error | null;
25
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { ErrorBoundary } from "./ErrorBoundary";
2
+ export type * from "./ErrorBoundary.types";
@@ -0,0 +1 @@
1
+ export { ErrorBoundary } from "./ErrorBoundary";
@@ -0,0 +1,6 @@
1
+ import type { ErrorMessageProps } from "./ErrorMessage.types";
2
+ /**
3
+ * Displays a standardized error message.
4
+ * Uses role="alert" and aria-live for screen reader announcements.
5
+ */
6
+ export declare const ErrorMessage: ({ children, className, ...rest }: ErrorMessageProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ErrorCircle } from "../../icons";
3
+ import { classNames } from "../../utils/classNames";
4
+ import styles from "./ErrorMessage.module.css";
5
+ const DEFAULT_MESSAGE = "Something went wrong. Please try again.";
6
+ /**
7
+ * Displays a standardized error message.
8
+ * Uses role="alert" and aria-live for screen reader announcements.
9
+ */
10
+ export const ErrorMessage = ({ children, className, ...rest }) => {
11
+ return (_jsxs("div", { className: classNames(styles.root, className), role: "alert", "aria-live": "polite", ...rest, children: [_jsx("span", { className: styles.iconWrapper, "aria-hidden": "true", children: _jsx(ErrorCircle, { size: "small", color: "error" }) }), _jsx("p", { className: styles.text, children: children || DEFAULT_MESSAGE })] }));
12
+ };
@@ -0,0 +1,2 @@
1
+ import json from './ErrorMessage.module.css.json';
2
+ export default json;
@@ -0,0 +1,50 @@
1
+ import styleInject from 'style-inject';
2
+ import json from './ErrorMessage.module.css.json';
3
+ styleInject(`
4
+ /* CSS Custom Properties - All defined on .root with --reltio-error-message- prefix */
5
+ ._root_gqx9m_1 {
6
+ --reltio-error-message-bg: #fef2f2;
7
+ --reltio-error-message-border-color: #fecaca;
8
+ --reltio-error-message-text-color: #b91c1c;
9
+ --reltio-error-message-icon-color: #dc2626;
10
+ --reltio-error-message-padding: 12px 16px;
11
+ --reltio-error-message-gap: 8px;
12
+ --reltio-error-message-border-radius: 8px;
13
+ --reltio-error-message-border-width: 1px;
14
+ --reltio-error-message-icon-size: 20px;
15
+
16
+ display: flex;
17
+ align-items: flex-start;
18
+ gap: var(--reltio-error-message-gap, 8px);
19
+ padding: var(--reltio-error-message-padding, 12px 16px);
20
+ background-color: var(--reltio-error-message-bg, #fef2f2);
21
+ border: var(--reltio-error-message-border-width, 1px) solid
22
+ var(--reltio-error-message-border-color, #fecaca);
23
+ border-radius: var(--reltio-error-message-border-radius, 8px);
24
+ box-sizing: border-box;
25
+ }
26
+
27
+ ._text_gqx9m_24 {
28
+ color: var(--reltio-error-message-text-color, #b91c1c);
29
+ font-size: 14px;
30
+ line-height: 1.5;
31
+ margin: 0;
32
+ flex: 1;
33
+ min-width: 0;
34
+ }
35
+
36
+ ._iconWrapper_gqx9m_33 {
37
+ flex-shrink: 0;
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ width: var(--reltio-error-message-icon-size, 20px);
42
+ height: var(--reltio-error-message-icon-size, 20px);
43
+ }
44
+
45
+ ._iconWrapper_gqx9m_33 svg {
46
+ width: 100%;
47
+ height: 100%;
48
+ }
49
+ `);
50
+ export default json;
@@ -0,0 +1 @@
1
+ { "root": "_root_gqx9m_1", "text": "_text_gqx9m_24", "iconWrapper": "_iconWrapper_gqx9m_33" }
@@ -0,0 +1,14 @@
1
+ import type React from "react";
2
+ /**
3
+ * Props for the ErrorMessage component
4
+ */
5
+ export type ErrorMessageProps = {
6
+ /**
7
+ * Custom error message text. When not provided or empty, a default message is shown.
8
+ */
9
+ children?: React.ReactNode | null;
10
+ /**
11
+ * Additional CSS class names
12
+ */
13
+ className?: string;
14
+ } & Omit<React.ComponentPropsWithoutRef<"div">, "children" | "className">;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./ErrorMessage";
2
+ export type * from "./ErrorMessage.types";
@@ -0,0 +1 @@
1
+ export * from "./ErrorMessage";
@@ -0,0 +1,8 @@
1
+ import type { MarkdownProps } from "./Markdown.types";
2
+ /**
3
+ * Safely renders Markdown-formatted text content with robust error handling
4
+ * for invalid or malformed Markdown input. Supports GitHub Flavored Markdown
5
+ * (GFM), raw HTML rendering with proper sanitization, and optional
6
+ * tag-to-component overrides via the components prop.
7
+ */
8
+ export declare const Markdown: ({ children, className, style, }: React.PropsWithChildren<MarkdownProps>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import MarkdownToJsx, { sanitizer } from "markdown-to-jsx";
3
+ import { ErrorBoundary } from "../../components/ErrorBoundary";
4
+ import { classNames } from "../../utils/classNames";
5
+ import styles from "./Markdown.module.css";
6
+ import { allowedOverrides, baseOverrides } from "./markdownOverrides";
7
+ /**
8
+ * Safely renders Markdown-formatted text content with robust error handling
9
+ * for invalid or malformed Markdown input. Supports GitHub Flavored Markdown
10
+ * (GFM), raw HTML rendering with proper sanitization, and optional
11
+ * tag-to-component overrides via the components prop.
12
+ */
13
+ export const Markdown = ({ children, className, style, }) => {
14
+ if (children === null || children === undefined) {
15
+ return null;
16
+ }
17
+ const composedClassName = classNames(styles.root, className);
18
+ return (_jsx("div", { className: composedClassName, style: style, children: _jsx(ErrorBoundary, { fallback: _jsx("pre", { className: styles.error, children: children }), children: _jsx(MarkdownToJsx, { options: {
19
+ overrides: {
20
+ ...baseOverrides,
21
+ ...allowedOverrides,
22
+ },
23
+ tagfilter: true,
24
+ sanitizer,
25
+ }, children: typeof children === "string" ? children : String(children) }) }) }));
26
+ };
@@ -0,0 +1,2 @@
1
+ import json from './Markdown.module.css.json';
2
+ export default json;
@@ -0,0 +1,228 @@
1
+ import styleInject from 'style-inject';
2
+ import json from './Markdown.module.css.json';
3
+ styleInject(`
4
+ /* Error fallback when markdown fails to parse */
5
+ ._error_1ixrx_2 {
6
+ white-space: pre-wrap;
7
+ word-break: break-word;
8
+ }
9
+
10
+ /* ── Root ── */
11
+ ._root_1ixrx_8 {
12
+ word-wrap: break-word;
13
+ line-height: var(--reltio-markdown-line-height, 1.5);
14
+ font-family: var(--reltio-markdown-font-family, "Roboto Flex", sans-serif);
15
+ font-size: var(--reltio-markdown-font-size, 14px);
16
+ font-weight: var(--reltio-markdown-font-weight, 400);
17
+ letter-spacing: var(--reltio-markdown-letter-spacing, 0.15px);
18
+ color: var(--reltio-markdown-color-text, #0e0e25);
19
+ }
20
+
21
+ /* ── Paragraphs ── */
22
+ ._root_1ixrx_8 p {
23
+ margin: 8px 0 7px 0;
24
+ line-height: var(--reltio-markdown-line-height, 1.5);
25
+ }
26
+
27
+ ._root_1ixrx_8 p:not(:last-child) {
28
+ margin-bottom: var(--reltio-markdown-paragraph-margin-bottom, 0.5rem);
29
+ }
30
+
31
+ /* ── Headings ── */
32
+ ._root_1ixrx_8 h1,
33
+ ._root_1ixrx_8 h2,
34
+ ._root_1ixrx_8 h3,
35
+ ._root_1ixrx_8 h4,
36
+ ._root_1ixrx_8 h5,
37
+ ._root_1ixrx_8 h6 {
38
+ margin: var(--reltio-markdown-heading-margin, 1rem 0 0.5rem 0);
39
+ font-weight: 600;
40
+ font-family: "Libre Franklin", sans-serif;
41
+ }
42
+
43
+ ._root_1ixrx_8 h1 {
44
+ font-size: var(--reltio-markdown-heading1-size, 1.5rem);
45
+ }
46
+
47
+ ._root_1ixrx_8 h2 {
48
+ font-size: var(--reltio-markdown-heading2-size, 1.25rem);
49
+ }
50
+
51
+ ._root_1ixrx_8 h3 {
52
+ font-size: var(--reltio-markdown-heading3-size, 1.1rem);
53
+ }
54
+
55
+ ._root_1ixrx_8 h4 {
56
+ font-size: var(--reltio-markdown-heading4-size, 1rem);
57
+ }
58
+
59
+ ._root_1ixrx_8 h5 {
60
+ font-size: var(--reltio-markdown-heading5-size, 0.95rem);
61
+ }
62
+
63
+ ._root_1ixrx_8 h6 {
64
+ font-size: var(--reltio-markdown-heading6-size, 0.9rem);
65
+ }
66
+
67
+ /* ── Emphasis ── */
68
+ ._root_1ixrx_8 strong {
69
+ font-weight: 600;
70
+ }
71
+
72
+ ._root_1ixrx_8 em {
73
+ font-style: italic;
74
+ }
75
+
76
+ /* ── Lists ── */
77
+ ._root_1ixrx_8 ul,
78
+ ._root_1ixrx_8 ol {
79
+ margin: var(--reltio-markdown-list-margin, 0.5rem 0);
80
+ padding-left: var(--reltio-markdown-list-padding-left, 1.5rem);
81
+ }
82
+
83
+ ._root_1ixrx_8 li {
84
+ margin: var(--reltio-markdown-list-item-margin, 0.25rem 0);
85
+ }
86
+
87
+ /* ── Code ── */
88
+ ._root_1ixrx_8 pre {
89
+ overflow-x: auto;
90
+ margin: 0;
91
+ background-color: #e3e3f2;
92
+ border-radius: 8px;
93
+ padding: 16px;
94
+ border: 1px solid #e3e3f2;
95
+ }
96
+
97
+ ._root_1ixrx_8 code {
98
+ font-family: var(--reltio-markdown-code-font-family, monospace);
99
+ font-size: var(--reltio-markdown-code-font-size, 0.9em);
100
+ background-color: var(--reltio-markdown-color-code-background, #f5f5f5);
101
+ padding: var(--reltio-markdown-code-padding, 0.2em 0.4em);
102
+ border-radius: var(--reltio-markdown-code-border-radius, 3px);
103
+ }
104
+
105
+ ._root_1ixrx_8 pre code {
106
+ background-color: transparent;
107
+ padding: 0;
108
+ }
109
+
110
+ /* ── Links ── */
111
+ ._root_1ixrx_8 a {
112
+ color: var(--reltio-markdown-color-link, #0000cc);
113
+ text-decoration: underline;
114
+ }
115
+
116
+ ._root_1ixrx_8 a:hover {
117
+ text-decoration: none;
118
+ }
119
+
120
+ /* ── Blockquote ── */
121
+ ._root_1ixrx_8 blockquote {
122
+ border-left: var(--reltio-markdown-blockquote-border-width, 4px) solid
123
+ var(--reltio-markdown-color-blockquote-border, #ddd);
124
+ margin: var(--reltio-markdown-blockquote-margin, 1rem 0);
125
+ padding-left: var(--reltio-markdown-blockquote-padding-left, 1rem);
126
+ color: var(--reltio-markdown-color-blockquote-text, #666);
127
+ }
128
+
129
+ /* ── Tables ── */
130
+ ._tableWrapper_1ixrx_127 {
131
+ font-family: var(--reltio-markdown-base-font, "Roboto Flex", sans-serif);
132
+ width: 100%;
133
+ border-collapse: collapse;
134
+ position: relative;
135
+ color: var(--color-text, #0e0e25);
136
+ background-color: #ffffff;
137
+ border: 1px solid #9898b34d;
138
+ border-radius: 16px;
139
+ overflow: auto;
140
+ box-sizing: border-box;
141
+ font-size: 14px;
142
+ }
143
+
144
+ ._tableWrapper_1ixrx_127 table {
145
+ width: 100%;
146
+ border-collapse: collapse;
147
+ }
148
+
149
+ ._tableWrapper_1ixrx_127 thead {
150
+ position: sticky;
151
+ top: 0;
152
+ z-index: 1;
153
+ box-shadow: 0 1px 0 #9898b34d;
154
+ }
155
+
156
+ ._tableWrapper_1ixrx_127 th {
157
+ padding: 16px;
158
+ font-weight: 600;
159
+ text-align: left;
160
+ border-right: 1px solid #9898b34d;
161
+ background-color: #e3e3f2;
162
+ }
163
+
164
+ ._tableWrapper_1ixrx_127 th:last-child {
165
+ border-right: none;
166
+ }
167
+
168
+ ._tableWrapper_1ixrx_127 td {
169
+ padding: 8px 16px;
170
+ border-bottom: 1px solid #9898b34d;
171
+ border-right: 1px solid #9898b34d;
172
+ text-align: left;
173
+ background-color: var(--reltio-markdown-color-table-cell-background, #ffffff);
174
+ }
175
+
176
+ ._tableWrapper_1ixrx_127 td:last-child {
177
+ border-right: none;
178
+ }
179
+
180
+ ._tableWrapper_1ixrx_127 tr:hover td {
181
+ background-color: var(--color-table-row-hover, #f5f5fa);
182
+ }
183
+
184
+ ._tableWrapper_1ixrx_127 tr:last-child td {
185
+ border-bottom: none;
186
+ }
187
+
188
+ /* ── Strikethrough ── */
189
+ ._root_1ixrx_8 del {
190
+ text-decoration: line-through;
191
+ color: var(--reltio-markdown-color-del, #595972);
192
+ }
193
+
194
+ /* ── Checkboxes ── */
195
+ ._root_1ixrx_8 input[type="checkbox"] {
196
+ margin-right: var(--reltio-spacing-xs, 8px);
197
+ cursor: not-allowed;
198
+ }
199
+
200
+ /* ── Horizontal rule ── */
201
+ ._root_1ixrx_8 hr {
202
+ border: none;
203
+ border-top: 1px solid var(--color-border, #ddd);
204
+ margin: 1.5rem 0;
205
+ }
206
+
207
+ /* ── Responsive ── */
208
+ @media (max-width: 768px) {
209
+ ._tableWrapper_1ixrx_127 table {
210
+ display: block;
211
+ overflow-x: auto;
212
+ -webkit-overflow-scrolling: touch;
213
+ }
214
+
215
+ ._root_1ixrx_8 h1 {
216
+ font-size: 1.3rem;
217
+ }
218
+
219
+ ._root_1ixrx_8 h2 {
220
+ font-size: 1.15rem;
221
+ }
222
+
223
+ ._root_1ixrx_8 h3 {
224
+ font-size: 1.05rem;
225
+ }
226
+ }
227
+ `);
228
+ export default json;
@@ -0,0 +1 @@
1
+ { "error": "_error_1ixrx_2", "root": "_root_1ixrx_8", "tableWrapper": "_tableWrapper_1ixrx_127" }
@@ -0,0 +1,54 @@
1
+ import type React from "react";
2
+ /**
3
+ * CSS custom properties for the Markdown component.
4
+ */
5
+ export type MarkdownCSSVariables = {
6
+ /** Base typography */
7
+ "--reltio-markdown-font-family"?: string;
8
+ "--reltio-markdown-font-size"?: string;
9
+ "--reltio-markdown-font-weight"?: string;
10
+ "--reltio-markdown-line-height"?: string;
11
+ "--reltio-markdown-letter-spacing"?: string;
12
+ "--reltio-markdown-base-font"?: string;
13
+ /** Heading sizes */
14
+ "--reltio-markdown-heading1-size"?: string;
15
+ "--reltio-markdown-heading2-size"?: string;
16
+ "--reltio-markdown-heading3-size"?: string;
17
+ "--reltio-markdown-heading4-size"?: string;
18
+ "--reltio-markdown-heading5-size"?: string;
19
+ "--reltio-markdown-heading6-size"?: string;
20
+ /** Code */
21
+ "--reltio-markdown-code-font-family"?: string;
22
+ "--reltio-markdown-code-font-size"?: string;
23
+ "--reltio-markdown-color-code-background"?: string;
24
+ "--reltio-markdown-code-padding"?: string;
25
+ "--reltio-markdown-code-border-radius"?: string;
26
+ /** Colors */
27
+ "--reltio-markdown-color-text"?: string;
28
+ "--reltio-markdown-color-link"?: string;
29
+ "--reltio-markdown-color-blockquote-border"?: string;
30
+ "--reltio-markdown-color-blockquote-text"?: string;
31
+ "--reltio-markdown-color-table-cell-background"?: string;
32
+ /** Spacing */
33
+ "--reltio-markdown-paragraph-margin-bottom"?: string;
34
+ "--reltio-markdown-heading-margin"?: string;
35
+ "--reltio-markdown-list-margin"?: string;
36
+ "--reltio-markdown-list-padding-left"?: string;
37
+ "--reltio-markdown-list-item-margin"?: string;
38
+ "--reltio-markdown-blockquote-margin"?: string;
39
+ "--reltio-markdown-blockquote-padding-left"?: string;
40
+ "--reltio-markdown-blockquote-border-width"?: string;
41
+ };
42
+ /**
43
+ * Props for the Markdown component
44
+ */
45
+ export type MarkdownProps = {
46
+ /**
47
+ * Additional CSS class names
48
+ */
49
+ className?: string;
50
+ /**
51
+ * Additional inline styles and CSS variable overrides
52
+ */
53
+ style?: React.CSSProperties & MarkdownCSSVariables;
54
+ };