@reltio/design 0.0.3 → 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 (205) 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.types.d.ts +1 -1
  91. package/components/TreeList/components/TreeNode/TreeNode.js +2 -2
  92. package/components/TreeList/components/TreeNode/TreeNode.module.css.js +16 -8
  93. package/components/TreeList/components/TreeNode/TreeNode.module.css.json +1 -1
  94. package/components/index.d.ts +10 -0
  95. package/components/index.js +10 -0
  96. package/icons/AccountCircle.d.ts +2 -0
  97. package/icons/AccountCircle.js +6 -0
  98. package/icons/Add.d.ts +2 -0
  99. package/icons/Add.js +6 -0
  100. package/icons/ArrowBack.d.ts +2 -0
  101. package/icons/ArrowBack.js +6 -0
  102. package/icons/ArrowDropDown.d.ts +2 -0
  103. package/icons/ArrowDropDown.js +6 -0
  104. package/icons/ArrowDropUp.d.ts +2 -0
  105. package/icons/ArrowDropUp.js +6 -0
  106. package/icons/ArrowForward.d.ts +2 -0
  107. package/icons/ArrowForward.js +6 -0
  108. package/icons/ArrowLeft.d.ts +2 -0
  109. package/icons/ArrowLeft.js +6 -0
  110. package/icons/ArrowRight.d.ts +2 -0
  111. package/icons/ArrowRight.js +6 -0
  112. package/icons/Attachment.d.ts +2 -0
  113. package/icons/Attachment.js +6 -0
  114. package/icons/Chat.d.ts +2 -0
  115. package/icons/Chat.js +6 -0
  116. package/icons/Check.d.ts +2 -0
  117. package/icons/Check.js +6 -0
  118. package/icons/CheckCircle.d.ts +2 -0
  119. package/icons/CheckCircle.js +6 -0
  120. package/icons/ChevronLeft.d.ts +2 -0
  121. package/icons/ChevronLeft.js +6 -0
  122. package/icons/ChevronRight.d.ts +2 -0
  123. package/icons/ChevronRight.js +6 -0
  124. package/icons/Close.d.ts +2 -0
  125. package/icons/Close.js +6 -0
  126. package/icons/CodeBrackets.d.ts +2 -0
  127. package/icons/CodeBrackets.js +6 -0
  128. package/icons/Comment.d.ts +2 -0
  129. package/icons/Comment.js +6 -0
  130. package/icons/ContentCopy.d.ts +2 -0
  131. package/icons/ContentCopy.js +6 -0
  132. package/icons/ContentPaste.d.ts +2 -0
  133. package/icons/ContentPaste.js +6 -0
  134. package/icons/Delete.d.ts +2 -0
  135. package/icons/Delete.js +6 -0
  136. package/icons/Description.d.ts +2 -0
  137. package/icons/Description.js +6 -0
  138. package/icons/Download.d.ts +2 -0
  139. package/icons/Download.js +6 -0
  140. package/icons/Edit.d.ts +2 -0
  141. package/icons/Edit.js +6 -0
  142. package/icons/Email.d.ts +2 -0
  143. package/icons/Email.js +6 -0
  144. package/icons/ErrorCircle.d.ts +2 -0
  145. package/icons/ErrorCircle.js +6 -0
  146. package/icons/ExpandLess.d.ts +2 -0
  147. package/icons/ExpandLess.js +6 -0
  148. package/icons/ExpandMore.d.ts +2 -0
  149. package/icons/ExpandMore.js +6 -0
  150. package/icons/FilterList.d.ts +2 -0
  151. package/icons/FilterList.js +6 -0
  152. package/icons/Folder.d.ts +2 -0
  153. package/icons/Folder.js +6 -0
  154. package/icons/Help.d.ts +2 -0
  155. package/icons/Help.js +6 -0
  156. package/icons/Icon.module.css.d.ts +2 -0
  157. package/icons/Icon.module.css.js +70 -0
  158. package/icons/Icon.module.css.json +1 -0
  159. package/icons/Icon.types.d.ts +13 -0
  160. package/icons/Icon.types.js +1 -0
  161. package/icons/Info.d.ts +2 -0
  162. package/icons/Info.js +6 -0
  163. package/icons/KeyboardArrowDown.d.ts +2 -0
  164. package/icons/KeyboardArrowDown.js +6 -0
  165. package/icons/KeyboardArrowUp.d.ts +2 -0
  166. package/icons/KeyboardArrowUp.js +6 -0
  167. package/icons/Logout.d.ts +2 -0
  168. package/icons/Logout.js +6 -0
  169. package/icons/Menu.d.ts +2 -0
  170. package/icons/Menu.js +6 -0
  171. package/icons/Notifications.d.ts +2 -0
  172. package/icons/Notifications.js +6 -0
  173. package/icons/People.d.ts +2 -0
  174. package/icons/People.js +6 -0
  175. package/icons/Person.d.ts +2 -0
  176. package/icons/Person.js +6 -0
  177. package/icons/Refresh.d.ts +2 -0
  178. package/icons/Refresh.js +6 -0
  179. package/icons/Remove.d.ts +2 -0
  180. package/icons/Remove.js +6 -0
  181. package/icons/Save.d.ts +2 -0
  182. package/icons/Save.js +6 -0
  183. package/icons/Search.d.ts +2 -0
  184. package/icons/Search.js +6 -0
  185. package/icons/Settings.d.ts +2 -0
  186. package/icons/Settings.js +6 -0
  187. package/icons/Share.d.ts +2 -0
  188. package/icons/Share.js +6 -0
  189. package/icons/Sort.d.ts +2 -0
  190. package/icons/Sort.js +6 -0
  191. package/icons/Upload.d.ts +2 -0
  192. package/icons/Upload.js +6 -0
  193. package/icons/Visibility.d.ts +2 -0
  194. package/icons/Visibility.js +6 -0
  195. package/icons/VisibilityOff.d.ts +2 -0
  196. package/icons/VisibilityOff.js +6 -0
  197. package/icons/Warning.d.ts +2 -0
  198. package/icons/Warning.js +6 -0
  199. package/icons/index.d.ts +52 -0
  200. package/icons/index.js +101 -0
  201. package/package.json +8 -7
  202. package/packages/design/index.d.ts +1 -2
  203. package/packages/design/index.js +1 -2
  204. package/components/TreeList/components/ChevronIcon.d.ts +0 -5
  205. package/components/TreeList/components/ChevronIcon.js +0 -8
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./Markdown";
2
+ export type * from "./Markdown.types";
@@ -0,0 +1 @@
1
+ export * from "./Markdown";
@@ -0,0 +1,19 @@
1
+ import type { MarkdownToJSX } from "markdown-to-jsx";
2
+ import type React from "react";
3
+ type OverrideProps<T extends keyof React.JSX.IntrinsicElements> = React.ComponentPropsWithoutRef<T> & {
4
+ node?: unknown;
5
+ };
6
+ /**
7
+ * Markdown tag overrides — only elements that require React component
8
+ * replacement or extra attributes/logic. Standard HTML elements are
9
+ * styled via `.root` descendant selectors in Markdown.module.css.
10
+ */
11
+ export declare const baseOverrides: {
12
+ a: ({ node: _node, href, ...props }: OverrideProps<"a">) => import("react/jsx-runtime").JSX.Element;
13
+ table: ({ node: _node, ...props }: OverrideProps<"table">) => import("react/jsx-runtime").JSX.Element;
14
+ button: ({ node: _node, ...props }: OverrideProps<"button">) => import("react/jsx-runtime").JSX.Element;
15
+ details: ({ node: _node, ...props }: OverrideProps<"details">) => import("react/jsx-runtime").JSX.Element;
16
+ li: ({ node: _node, children, ...props }: OverrideProps<"li">) => import("react/jsx-runtime").JSX.Element;
17
+ };
18
+ export declare const allowedOverrides: MarkdownToJSX.Overrides;
19
+ export {};
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Children, isValidElement } from "react";
3
+ import { Button } from "../../components/Button";
4
+ import { Details } from "../../components/Details";
5
+ import { classNames } from "../../utils/classNames";
6
+ import styles from "./Markdown.module.css";
7
+ /**
8
+ * Markdown tag overrides — only elements that require React component
9
+ * replacement or extra attributes/logic. Standard HTML elements are
10
+ * styled via `.root` descendant selectors in Markdown.module.css.
11
+ */
12
+ export const baseOverrides = {
13
+ // Links — external detection, target/rel attributes
14
+ a: ({ node: _node, href, ...props }) => {
15
+ const isExternal = href && (href.startsWith("http") || href.startsWith("//"));
16
+ return (_jsx("a", { ...props, href: href, target: isExternal ? "_blank" : undefined, rel: isExternal ? "noopener noreferrer" : undefined }));
17
+ },
18
+ // Tables — wrapped in a div for overflow scrolling
19
+ table: ({ node: _node, ...props }) => (_jsx("div", { className: classNames(styles.tableWrapper), children: _jsx("table", { ...props }) })),
20
+ // Button — replaced with design system Button component
21
+ button: ({ node: _node, ...props }) => (_jsx(Button, { ...props, className: classNames(props.className) })),
22
+ // Details/Summary — replaced with Details component
23
+ details: ({ node: _node, ...props }) => (_jsx(Details, { ...props, children: props.children })),
24
+ // Task list items — wrap checkbox + text in <label> for accessibility
25
+ li: ({ node: _node, children, ...props }) => {
26
+ const childArray = Children.toArray(children);
27
+ const firstChild = childArray[0];
28
+ const isTaskItem = isValidElement(firstChild) &&
29
+ firstChild.props?.type === "checkbox";
30
+ if (isTaskItem) {
31
+ return (_jsx("li", { ...props, children: _jsx("label", { children: children }) }));
32
+ }
33
+ return _jsx("li", { ...props, children: children });
34
+ },
35
+ };
36
+ export const allowedOverrides = { Button };
@@ -0,0 +1,7 @@
1
+ import type { SkeletonProps } from "./Skeleton.types";
2
+ /**
3
+ * Displays a configurable number of rectangular placeholder bars with a shimmer
4
+ * (moving gradient) animation. Used as a loading placeholder to reserve space
5
+ * and indicate that content is loading. Full width by default.
6
+ */
7
+ export declare const Skeleton: ({ rows, className, ...rest }: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "../../utils/classNames";
3
+ import styles from "./Skeleton.module.css";
4
+ const DEFAULT_LABEL = "Loading content";
5
+ const DEFAULT_ROWS = 3;
6
+ /**
7
+ * Displays a configurable number of rectangular placeholder bars with a shimmer
8
+ * (moving gradient) animation. Used as a loading placeholder to reserve space
9
+ * and indicate that content is loading. Full width by default.
10
+ */
11
+ export const Skeleton = ({ rows = DEFAULT_ROWS, className, ...rest }) => {
12
+ const rowCount = Math.max(1, Math.floor(Number(rows)) || DEFAULT_ROWS);
13
+ return (
14
+ // biome-ignore lint/a11y/useSemanticElements: status role is correct for loading placeholder; output is for calculation results
15
+ _jsx("div", { className: classNames(styles.skeletonRoot, className), "aria-busy": "true", "aria-label": DEFAULT_LABEL, role: "status", ...rest, children: Array.from({ length: rowCount }, (_, i) => (_jsx("div", { className: styles.row, "aria-hidden": "true" }, i))) }));
16
+ };
@@ -0,0 +1,2 @@
1
+ import json from './Skeleton.module.css.json';
2
+ export default json;
@@ -0,0 +1,73 @@
1
+ import styleInject from 'style-inject';
2
+ import json from './Skeleton.module.css.json';
3
+ styleInject(`
4
+ ._skeletonRoot_1e8wa_1 {
5
+ --reltio-skeleton-row-height: 16px;
6
+ --reltio-skeleton-row-gap: 12px;
7
+ width: 100%;
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: var(--reltio-skeleton-row-gap, 12px);
11
+ }
12
+
13
+ ._row_1e8wa_10 {
14
+ width: 100%;
15
+ height: var(--reltio-skeleton-row-height, 16px);
16
+ background-color: #f5f5fa;
17
+ overflow: hidden;
18
+ position: relative;
19
+ }
20
+
21
+ ._row_1e8wa_10::before {
22
+ content: "";
23
+ position: absolute;
24
+ top: 0;
25
+ left: 0;
26
+ bottom: 0;
27
+ background-color: #9898b34d;
28
+ animation: _indeterminate1_1e8wa_1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395)
29
+ infinite;
30
+ }
31
+
32
+ ._row_1e8wa_10::after {
33
+ content: "";
34
+ position: absolute;
35
+ top: 0;
36
+ left: 0;
37
+ bottom: 0;
38
+ background-color: #9898b34d;
39
+ animation: _indeterminate2_1e8wa_1 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
40
+ animation-delay: 1.15s;
41
+ }
42
+
43
+ @keyframes _indeterminate1_1e8wa_1 {
44
+ 0% {
45
+ left: -35%;
46
+ right: 100%;
47
+ }
48
+ 60% {
49
+ left: 100%;
50
+ right: -90%;
51
+ }
52
+ 100% {
53
+ left: 100%;
54
+ right: -90%;
55
+ }
56
+ }
57
+
58
+ @keyframes _indeterminate2_1e8wa_1 {
59
+ 0% {
60
+ left: -200%;
61
+ right: 100%;
62
+ }
63
+ 60% {
64
+ left: 107%;
65
+ right: -8%;
66
+ }
67
+ 100% {
68
+ left: 107%;
69
+ right: -8%;
70
+ }
71
+ }
72
+ `);
73
+ export default json;
@@ -0,0 +1 @@
1
+ { "skeletonRoot": "_skeletonRoot_1e8wa_1", "row": "_row_1e8wa_10", "indeterminate1": "_indeterminate1_1e8wa_1", "indeterminate2": "_indeterminate2_1e8wa_1" }
@@ -0,0 +1,31 @@
1
+ import type React from "react";
2
+ /**
3
+ * Props for the Skeleton component
4
+ */
5
+ export type SkeletonProps = {
6
+ /**
7
+ * Number of rectangular placeholder bars to display
8
+ * @default 3
9
+ */
10
+ rows?: number;
11
+ /**
12
+ * Size (number) passed to styles; affects line height and line gap of placeholder bars (e.g. pixels).
13
+ * @default 16
14
+ */
15
+ size?: number;
16
+ /**
17
+ * Accessible label for screen readers. When not provided, a default label is used.
18
+ */
19
+ label?: string;
20
+ /**
21
+ * Additional CSS class names
22
+ */
23
+ className?: string;
24
+ /**
25
+ * Inline styles (e.g. for CSS variable overrides)
26
+ */
27
+ style?: React.CSSProperties & {
28
+ "--reltio-skeleton-row-height"?: string;
29
+ "--reltio-skeleton-row-gap"?: string;
30
+ };
31
+ } & Omit<React.ComponentPropsWithoutRef<"div">, "children" | "className" | "style">;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./Skeleton";
2
+ export type * from "./Skeleton.types";
@@ -0,0 +1 @@
1
+ export * from "./Skeleton";
@@ -0,0 +1,22 @@
1
+ export declare const TextArea: import("react").ForwardRefExoticComponent<{
2
+ label?: string;
3
+ error?: boolean;
4
+ supportingText?: string;
5
+ toolbar?: import("react").ReactNode;
6
+ style?: import("react").CSSProperties & {
7
+ "--reltio-textarea-font-family"?: string;
8
+ "--reltio-textarea-font-size"?: string;
9
+ "--reltio-textarea-line-height"?: string;
10
+ "--reltio-textarea-color-text"?: string;
11
+ "--reltio-textarea-color-border"?: string;
12
+ "--reltio-textarea-color-border-focus"?: string;
13
+ "--reltio-textarea-color-background"?: string;
14
+ "--reltio-textarea-color-error"?: string;
15
+ "--reltio-textarea-color-label"?: string;
16
+ "--reltio-textarea-color-supporting-text"?: string;
17
+ "--reltio-textarea-border-radius"?: string;
18
+ "--reltio-textarea-padding"?: string;
19
+ "--reltio-textarea-min-height"?: string;
20
+ "--reltio-textarea-max-height"?: string;
21
+ };
22
+ } & Omit<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, "style"> & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { forwardRef, useId } from "react";
4
+ import { classNames } from "../../utils/classNames";
5
+ import styles from "./TextArea.module.css";
6
+ export const TextArea = forwardRef(({ label, error, supportingText, toolbar, className, id: providedId, ...rest }, ref) => {
7
+ const generatedId = useId();
8
+ const textareaId = providedId || generatedId;
9
+ const supportingTextId = `${textareaId}-supporting`;
10
+ const hasValue = String(rest.value ?? rest.defaultValue ?? "").length > 0;
11
+ return (_jsxs("div", { "data-error": error || undefined, "data-disabled": rest.disabled || undefined, "data-has-value": hasValue || undefined, className: classNames(styles.root, className), children: [_jsxs("label", { htmlFor: textareaId, className: classNames(styles.inputContainer), children: [_jsx("textarea", { ref: ref, id: textareaId, className: classNames(styles.textarea), placeholder: label || rest.placeholder, "aria-invalid": error || undefined, "aria-describedby": supportingText ? supportingTextId : undefined, ...rest }), label && _jsx("span", { className: classNames(styles.label), children: label }), toolbar && (_jsx("div", { className: classNames(styles.toolbar), children: toolbar }))] }), supportingText && (_jsx("div", { id: supportingTextId, className: classNames(styles.supportingText), children: supportingText }))] }));
12
+ });
13
+ TextArea.displayName = "TextArea";
@@ -0,0 +1,2 @@
1
+ import json from './TextArea.module.css.json';
2
+ export default json;
@@ -0,0 +1,159 @@
1
+ import styleInject from 'style-inject';
2
+ import json from './TextArea.module.css.json';
3
+ styleInject(`
4
+ ._root_1k56p_1 {
5
+ --reltio-textarea-font-family: var(
6
+ --reltio-font-family-body,
7
+ "Roboto",
8
+ sans-serif
9
+ );
10
+ --reltio-textarea-font-size: var(--reltio-font-size-body, 16px);
11
+ --reltio-textarea-line-height: var(--reltio-line-height-body, 1.5);
12
+ --reltio-textarea-color-text: var(--reltio-color-text, #1d1b20);
13
+ --reltio-textarea-color-border: var(--reltio-color-border, #79747e);
14
+ --reltio-textarea-color-border-focus: var(--reltio-color-primary, #6750a4);
15
+ --reltio-textarea-color-background: var(--reltio-color-background, #fff);
16
+ --reltio-textarea-color-error: var(--reltio-color-error, #b3261e);
17
+ --reltio-textarea-color-label: var(--reltio-color-text-secondary, #49454f);
18
+ --reltio-textarea-color-supporting-text: var(
19
+ --reltio-color-text-secondary,
20
+ #49454f
21
+ );
22
+ --reltio-textarea-border-radius: var(--reltio-spacing-xs, 4px);
23
+ --reltio-textarea-padding: var(--reltio-spacing-md, 16px);
24
+ --reltio-textarea-min-height: var(--reltio-spacing-3xl, 56px);
25
+ --reltio-textarea-max-height: min(500px, 50cqh);
26
+ --reltio-textarea-border-width: 1px;
27
+ --reltio-textarea-border-width-focus: 2px;
28
+
29
+ --_border-color: var(--reltio-textarea-color-border);
30
+ --_border-width: var(--reltio-textarea-border-width);
31
+ --_label-color: var(--reltio-textarea-color-label);
32
+ --_supporting-text-color: var(--reltio-textarea-color-supporting-text);
33
+
34
+ font-family: var(--reltio-textarea-font-family);
35
+ container-type: inline-size;
36
+ }
37
+
38
+ ._root_1k56p_1:focus-within {
39
+ --_border-color: var(--reltio-textarea-color-border-focus);
40
+ --_border-width: var(--reltio-textarea-border-width-focus);
41
+ --_label-color: var(--reltio-textarea-color-border-focus);
42
+ }
43
+
44
+ ._root_1k56p_1[data-error="true"] {
45
+ --_border-color: var(--reltio-textarea-color-error);
46
+ --_label-color: var(--reltio-textarea-color-error);
47
+ --_supporting-text-color: var(--reltio-textarea-color-error);
48
+ }
49
+
50
+ ._root_1k56p_1[data-error="true"]:focus-within {
51
+ --_border-color: var(--reltio-textarea-color-error);
52
+ --_label-color: var(--reltio-textarea-color-error);
53
+ }
54
+
55
+ ._root_1k56p_1[data-disabled="true"] {
56
+ opacity: 0.38;
57
+ cursor: not-allowed;
58
+ }
59
+
60
+ ._inputContainer_1k56p_57 {
61
+ position: relative;
62
+ display: grid;
63
+ grid-template-columns: 1fr;
64
+ grid-template-rows: 1fr auto;
65
+ grid-template-areas:
66
+ "textarea"
67
+ "toolbar";
68
+ margin: 0;
69
+ box-sizing: border-box;
70
+ border-radius: var(--reltio-textarea-border-radius);
71
+ outline: var(--_border-width) solid var(--_border-color);
72
+ cursor: text;
73
+ transition:
74
+ outline-color 0.1s ease,
75
+ outline-width 0.1s ease;
76
+ background: var(--reltio-textarea-color-background);
77
+ }
78
+
79
+ ._root_1k56p_1[data-disabled="true"] ._inputContainer_1k56p_57 {
80
+ cursor: not-allowed;
81
+ }
82
+
83
+ ._textarea_1k56p_80 {
84
+ grid-area: textarea;
85
+ position: relative;
86
+ display: block;
87
+ z-index: 1;
88
+ border: none;
89
+ outline: none;
90
+ background: none;
91
+ width: 100%;
92
+ min-height: var(--reltio-textarea-min-height);
93
+ max-height: var(--reltio-textarea-max-height);
94
+ border-radius: var(--reltio-textarea-border-radius);
95
+ box-sizing: border-box;
96
+ font-size: var(--reltio-textarea-font-size);
97
+ font-family: var(--reltio-textarea-font-family);
98
+ line-height: var(--reltio-textarea-line-height);
99
+ resize: none;
100
+ color: var(--reltio-textarea-color-text);
101
+ padding: var(--reltio-textarea-padding);
102
+ overflow-y: auto;
103
+ field-sizing: content;
104
+ }
105
+
106
+ ._textarea_1k56p_80::placeholder {
107
+ color: var(--reltio-textarea-color-label);
108
+ }
109
+
110
+ ._textarea_1k56p_80:disabled {
111
+ cursor: not-allowed;
112
+ }
113
+
114
+ ._label_1k56p_111 {
115
+ position: absolute;
116
+ opacity: 0;
117
+ top: 16px;
118
+ left: 8px;
119
+ transform: translateY(-50%);
120
+ transition: all 0.2s ease;
121
+ background-color: var(--reltio-textarea-color-background);
122
+ padding: 4px 8px;
123
+ border-radius: var(--reltio-textarea-border-radius);
124
+ color: var(--_label-color);
125
+ z-index: 2;
126
+ font-size: var(--reltio-textarea-font-size);
127
+ font-family: var(--reltio-textarea-font-family);
128
+ pointer-events: none;
129
+ }
130
+
131
+ ._textarea_1k56p_80:not(:placeholder-shown) + ._label_1k56p_111 {
132
+ top: -1px;
133
+ font-size: 12px;
134
+ opacity: 1;
135
+ }
136
+
137
+ ._textarea_1k56p_80:focus + ._label_1k56p_111 {
138
+ top: -1px;
139
+ font-size: 12px;
140
+ opacity: 1;
141
+ }
142
+
143
+ ._supportingText_1k56p_140 {
144
+ font-size: 12px;
145
+ padding: 4px var(--reltio-textarea-padding);
146
+ color: var(--_supporting-text-color);
147
+ font-family: var(--reltio-textarea-font-family);
148
+ }
149
+
150
+ ._toolbar_1k56p_147 {
151
+ grid-area: toolbar;
152
+ display: flex;
153
+ flex-direction: row;
154
+ align-items: center;
155
+ gap: 12px;
156
+ padding: 8px 12px;
157
+ }
158
+ `);
159
+ export default json;
@@ -0,0 +1 @@
1
+ { "root": "_root_1k56p_1", "inputContainer": "_inputContainer_1k56p_57", "textarea": "_textarea_1k56p_80", "label": "_label_1k56p_111", "supportingText": "_supportingText_1k56p_140", "toolbar": "_toolbar_1k56p_147" }
@@ -0,0 +1,39 @@
1
+ import type React from "react";
2
+ export type TextAreaProps = {
3
+ /**
4
+ * Floating label text displayed above the textarea
5
+ */
6
+ label?: string;
7
+ /**
8
+ * Whether the textarea is in an error state
9
+ * @default false
10
+ */
11
+ error?: boolean;
12
+ /**
13
+ * Helper text displayed below the textarea
14
+ */
15
+ supportingText?: string;
16
+ /**
17
+ * Toolbar content rendered below the textarea input
18
+ */
19
+ toolbar?: React.ReactNode;
20
+ /**
21
+ * Custom styles including CSS custom properties for theming
22
+ */
23
+ style?: React.CSSProperties & {
24
+ "--reltio-textarea-font-family"?: string;
25
+ "--reltio-textarea-font-size"?: string;
26
+ "--reltio-textarea-line-height"?: string;
27
+ "--reltio-textarea-color-text"?: string;
28
+ "--reltio-textarea-color-border"?: string;
29
+ "--reltio-textarea-color-border-focus"?: string;
30
+ "--reltio-textarea-color-background"?: string;
31
+ "--reltio-textarea-color-error"?: string;
32
+ "--reltio-textarea-color-label"?: string;
33
+ "--reltio-textarea-color-supporting-text"?: string;
34
+ "--reltio-textarea-border-radius"?: string;
35
+ "--reltio-textarea-padding"?: string;
36
+ "--reltio-textarea-min-height"?: string;
37
+ "--reltio-textarea-max-height"?: string;
38
+ };
39
+ } & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "style">;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./TextArea";
2
+ export type * from "./TextArea.types";
@@ -0,0 +1 @@
1
+ export * from "./TextArea";
@@ -35,7 +35,7 @@ export type RcTreeNodeData<T> = {
35
35
  */
36
36
  export type TreeListProps = {
37
37
  /** Hierarchical data to render.
38
- * `type TreeItem = {id: TreeKey; label: string; children?: TreeItem[]}` `type TreeKey = string | number`
38
+ * `type TreeItem = {id: TreeKey; label: string; children?: TreeItem[]; isLoading?: boolean}` `type TreeKey = string | number`
39
39
  * @example
40
40
  * [
41
41
  * { id: "1", label: "Node 1", children: [
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { memo, useCallback } from "react";
3
+ import { ArrowRight } from "../../../../icons/ArrowRight";
3
4
  import { classNames } from "../../../../utils/classNames";
4
- import { ChevronIcon } from "../ChevronIcon";
5
5
  import { TreeLevelLines } from "../TreeLevelLines/TreeLevelLines";
6
6
  import styles from "./TreeNode.module.css";
7
7
  export const TreeNode = memo(({ id, node, depth, isLeaf, isExpanded, levelLines, isLast, onToggle, LabelComponent, }) => {
@@ -9,6 +9,6 @@ export const TreeNode = memo(({ id, node, depth, isLeaf, isExpanded, levelLines,
9
9
  event.stopPropagation();
10
10
  onToggle(id, isExpanded, node);
11
11
  }, [onToggle, id, isExpanded, node]);
12
- return (_jsxs("div", { className: classNames(styles.wrapper), "data-depth": depth, children: [_jsx(TreeLevelLines, { levelLines: levelLines, isLast: isLast }), _jsx("span", { className: classNames(styles.indent), style: { ["--depth"]: `${depth}` } }), isLeaf ? (_jsx("span", { className: classNames(styles.toggle), "aria-hidden": "true" })) : node.isLoading ? (_jsx("span", { className: classNames(styles.toggle), "aria-hidden": "true", children: _jsx("span", { className: classNames(styles.spinner) }) })) : (_jsx("button", { type: "button", className: classNames(styles.toggle), "aria-label": isExpanded ? "Collapse" : "Expand", onClick: handleToggleClick, children: _jsx(ChevronIcon, { expanded: isExpanded }) })), LabelComponent ? _jsx(LabelComponent, { data: node }) : node.label] }));
12
+ return (_jsxs("div", { className: classNames(styles.wrapper), "data-depth": depth, children: [_jsx(TreeLevelLines, { levelLines: levelLines, isLast: isLast }), _jsx("span", { className: classNames(styles.indent), style: { ["--depth"]: `${depth}` } }), isLeaf ? (_jsx("span", { className: classNames(styles.toggle), "aria-hidden": "true" })) : node.isLoading ? (_jsx("span", { className: classNames(styles.toggle), "aria-hidden": "true", children: _jsx("span", { className: classNames(styles.spinner) }) })) : (_jsx("button", { type: "button", className: classNames(styles.toggle), "aria-label": isExpanded ? "Collapse" : "Expand", onClick: handleToggleClick, children: _jsx(ArrowRight, { size: "small", className: classNames(styles.chevron, isExpanded && styles.expanded) }) })), LabelComponent ? _jsx(LabelComponent, { data: node }) : node.label] }));
13
13
  });
14
14
  TreeNode.displayName = "TreeNode";
@@ -1,7 +1,7 @@
1
1
  import styleInject from 'style-inject';
2
2
  import json from './TreeNode.module.css.json';
3
3
  styleInject(`
4
- ._wrapper_9wzlc_1 {
4
+ ._wrapper_xk2s6_1 {
5
5
  display: flex;
6
6
  align-items: center;
7
7
  line-height: var(--reltio-tree-list-line-height, 1.5);
@@ -11,13 +11,13 @@ styleInject(`
11
11
  z-index: 1;
12
12
  }
13
13
 
14
- ._indent_9wzlc_11 {
14
+ ._indent_xk2s6_11 {
15
15
  display: inline-block;
16
16
  width: calc(var(--depth, 1) * var(--reltio-tree-list-indent-size, 16px));
17
17
  flex: 0 0 auto;
18
18
  }
19
19
 
20
- ._toggle_9wzlc_17 {
20
+ ._toggle_xk2s6_17 {
21
21
  display: inline-flex;
22
22
  align-items: center;
23
23
  justify-content: center;
@@ -29,7 +29,15 @@ styleInject(`
29
29
  cursor: pointer;
30
30
  }
31
31
 
32
- ._spinner_9wzlc_29 {
32
+ ._chevron_xk2s6_29 {
33
+ transition: transform 0.2s ease;
34
+ }
35
+
36
+ ._expanded_xk2s6_33 {
37
+ transform: rotate(90deg);
38
+ }
39
+
40
+ ._spinner_xk2s6_37 {
33
41
  display: inline-block;
34
42
  width: var(--reltio-tree-list-spinner-size, 10px);
35
43
  height: var(--reltio-tree-list-spinner-size, 10px);
@@ -37,10 +45,10 @@ styleInject(`
37
45
  border: var(--reltio-tree-list-spinner-width, 2px) solid
38
46
  var(--reltio-tree-list-spinner-color, currentColor);
39
47
  border-top-color: transparent;
40
- animation: _spin_9wzlc_29 0.8s linear infinite;
48
+ animation: _spin_xk2s6_37 0.8s linear infinite;
41
49
  }
42
50
 
43
- @keyframes _spin_9wzlc_29 {
51
+ @keyframes _spin_xk2s6_37 {
44
52
  from {
45
53
  transform: rotate(0deg);
46
54
  }
@@ -49,13 +57,13 @@ styleInject(`
49
57
  }
50
58
  }
51
59
 
52
- ._actions_9wzlc_49 {
60
+ ._actions_xk2s6_57 {
53
61
  margin-left: auto;
54
62
  opacity: 0;
55
63
  transition: opacity 0.12s ease;
56
64
  }
57
65
 
58
- ._wrapper_9wzlc_1:hover ._actions_9wzlc_49 {
66
+ ._wrapper_xk2s6_1:hover ._actions_xk2s6_57 {
59
67
  opacity: 1;
60
68
  }
61
69
  `);
@@ -1 +1 @@
1
- { "wrapper": "_wrapper_9wzlc_1", "indent": "_indent_9wzlc_11", "toggle": "_toggle_9wzlc_17", "spinner": "_spinner_9wzlc_29", "spin": "_spin_9wzlc_29", "actions": "_actions_9wzlc_49" }
1
+ { "wrapper": "_wrapper_xk2s6_1", "indent": "_indent_xk2s6_11", "toggle": "_toggle_xk2s6_17", "chevron": "_chevron_xk2s6_29", "expanded": "_expanded_xk2s6_33", "spinner": "_spinner_xk2s6_37", "spin": "_spin_xk2s6_37", "actions": "_actions_xk2s6_57" }
@@ -0,0 +1,10 @@
1
+ export * from "./AssistantLoader";
2
+ export * from "./Button";
3
+ export * from "./Chat";
4
+ export * from "./Details";
5
+ export * from "./ErrorBoundary";
6
+ export * from "./ErrorMessage";
7
+ export * from "./Markdown";
8
+ export * from "./Skeleton";
9
+ export * from "./TextArea";
10
+ export * from "./TreeList";
@@ -0,0 +1,10 @@
1
+ export * from "./AssistantLoader";
2
+ export * from "./Button";
3
+ export * from "./Chat";
4
+ export * from "./Details";
5
+ export * from "./ErrorBoundary";
6
+ export * from "./ErrorMessage";
7
+ export * from "./Markdown";
8
+ export * from "./Skeleton";
9
+ export * from "./TextArea";
10
+ export * from "./TreeList";
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from "./Icon.types";
2
+ export declare const AccountCircle: ({ size, color, className, style, "aria-label": ariaLabel, }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "../utils/classNames";
3
+ import styles from "./Icon.module.css";
4
+ export const AccountCircle = ({ size = "medium", color = "inherited", className, style, "aria-label": ariaLabel, }) => {
5
+ return (_jsx("svg", { className: classNames(styles.root, styles[size], styles[color], className), style: style, viewBox: "0 -960 960 960", "aria-hidden": !ariaLabel, "aria-label": ariaLabel, role: ariaLabel ? "img" : undefined, children: _jsx("path", { d: "M234-276q51-39 114-61.5T480-360q69 0 132 22.5T726-276q35-41 54.5-93T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 59 19.5 111t54.5 93Zm246-164q-59 0-99.5-40.5T340-580q0-59 40.5-99.5T480-720q59 0 99.5 40.5T620-580q0 59-40.5 99.5T480-440Zm0 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q53 0 100-15.5t86-44.5q-39-29-86-44.5T480-280q-53 0-100 15.5T294-220q39 29 86 44.5T480-160Zm0-360q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm0-60Zm0 360Z" }) }));
6
+ };
package/icons/Add.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from "./Icon.types";
2
+ export declare const Add: ({ size, color, className, style, "aria-label": ariaLabel, }: IconProps) => import("react/jsx-runtime").JSX.Element;
package/icons/Add.js ADDED
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "../utils/classNames";
3
+ import styles from "./Icon.module.css";
4
+ export const Add = ({ size = "medium", color = "inherited", className, style, "aria-label": ariaLabel, }) => {
5
+ return (_jsx("svg", { className: classNames(styles.root, styles[size], styles[color], className), style: style, viewBox: "0 -960 960 960", "aria-hidden": !ariaLabel, "aria-label": ariaLabel, role: ariaLabel ? "img" : undefined, children: _jsx("path", { d: "M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z" }) }));
6
+ };
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from "./Icon.types";
2
+ export declare const ArrowBack: ({ size, color, className, style, "aria-label": ariaLabel, }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "../utils/classNames";
3
+ import styles from "./Icon.module.css";
4
+ export const ArrowBack = ({ size = "medium", color = "inherited", className, style, "aria-label": ariaLabel, }) => {
5
+ return (_jsx("svg", { className: classNames(styles.root, styles[size], styles[color], className), style: style, viewBox: "0 -960 960 960", "aria-hidden": !ariaLabel, "aria-label": ariaLabel, role: ariaLabel ? "img" : undefined, children: _jsx("path", { d: "m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z" }) }));
6
+ };
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from "./Icon.types";
2
+ export declare const ArrowDropDown: ({ size, color, className, style, "aria-label": ariaLabel, }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "../utils/classNames";
3
+ import styles from "./Icon.module.css";
4
+ export const ArrowDropDown = ({ size = "medium", color = "inherited", className, style, "aria-label": ariaLabel, }) => {
5
+ return (_jsx("svg", { className: classNames(styles.root, styles[size], styles[color], className), style: style, viewBox: "0 -960 960 960", "aria-hidden": !ariaLabel, "aria-label": ariaLabel, role: ariaLabel ? "img" : undefined, children: _jsx("path", { d: "M480-360 280-560h400L480-360Z" }) }));
6
+ };