@darajs/components 1.8.4 → 1.8.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../js/common/markdown/markdown.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAA8C,MAAM,cAAc,CAAC;AAG1G,UAAU,aAAc,SAAQ,oBAAoB;IAChD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CACvC;AAuKD;;GAEG;AACH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAiBnD;AAED,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../js/common/markdown/markdown.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAA8C,MAAM,cAAc,CAAC;AAG1G,UAAU,aAAc,SAAQ,oBAAoB;IAChD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CACvC;AAID;;GAEG;AACH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAoBnD;AAED,eAAe,QAAQ,CAAC"}
@@ -1,173 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import ReactMarkdown from 'react-markdown';
3
2
  import rehypeRaw from 'rehype-raw';
4
- import remarkGfm from 'remark-gfm';
5
3
  import { injectCss, useComponentStyles, useVariable } from '@darajs/core';
6
- import styled from '@darajs/styled-components';
7
- const _CustomMarkdown = styled.div `
8
- /*
9
- * Apply some base styles to the markdown content so it looks good by default
10
- * Inspired by https://tailwindcss.com/docs/typography-plugin
11
- */
12
- p {
13
- margin-top: 1.25rem;
14
- margin-bottom: 1.25rem;
15
- }
16
-
17
- blockquote {
18
- /* stylelint-disable declaration-property-value-no-unknown */
19
- quotes: '"\\201C""\\201D""\\2018""\\2019"';
20
- /* stylelint-enable declaration-property-value-no-unknown */
21
-
22
- margin-top: 1.5rem;
23
- margin-bottom: 1.5rem;
24
- padding-left: 1rem;
25
-
26
- font-weight: 500;
27
- font-style: italic;
28
- color: ${(props) => props.theme.colors.grey6};
29
-
30
- border-left: 0.25rem solid ${(props) => props.theme.colors.grey3};
31
- }
32
-
33
- h1 {
34
- margin-top: 2rem;
35
- margin-bottom: 1rem;
36
- font-size: 2.5rem;
37
- line-height: 1.1;
38
- }
39
-
40
- h2 {
41
- margin-top: 2rem;
42
- margin-bottom: 1rem;
43
- font-size: 1.5rem;
44
- line-height: 1.3;
45
- }
46
-
47
- h3 {
48
- margin-top: 1.6rem;
49
- margin-bottom: 0.6rem;
50
- font-size: 1.25rem;
51
- line-height: 1.25;
52
- }
53
-
54
- h4 {
55
- margin-top: 1.5rem;
56
- margin-bottom: 0.5rem;
57
- line-height: 1.5;
58
- }
59
-
60
- img,
61
- figure,
62
- video {
63
- margin-top: 1.5rem;
64
- margin-bottom: 1.5rem;
65
-
66
- * {
67
- margin-top: 0;
68
- margin-bottom: 0;
69
- }
70
- }
71
-
72
- code {
73
- font-size: 0.9rem;
74
- }
75
-
76
- h2 code {
77
- font-size: 0.875rem;
78
- }
79
-
80
- h3 code {
81
- font-size: 0.9rem;
82
- }
83
-
84
- pre {
85
- overflow-x: auto;
86
-
87
- margin-top: 1.7rem;
88
- margin-bottom: 1.7rem;
89
- padding: 0.85rem 1.15rem;
90
-
91
- font-size: 0.9rem;
92
- line-height: 1.7;
93
-
94
- border-radius: 0.375rem;
95
- }
96
-
97
- hr {
98
- margin-top: 3rem;
99
- margin-bottom: 3rem;
100
- }
101
-
102
- hr + *,
103
- h2 + *,
104
- h3 + *,
105
- h4 + * {
106
- margin-top: 0;
107
- }
108
-
109
- ol,
110
- ul {
111
- margin-top: 1.25rem;
112
- margin-bottom: 1.25rem;
113
- padding-left: 1.625rem;
114
-
115
- li {
116
- margin-top: 0.5rem;
117
- margin-bottom: 0.5rem;
118
- padding-left: 0.375rem;
119
-
120
- p {
121
- margin-top: 0.75rem;
122
- margin-bottom: 0.75rem;
123
- }
124
-
125
- *:first-child {
126
- margin-top: 1.25rem;
127
- }
128
-
129
- *:last-child {
130
- margin-bottom: 1.25rem;
131
- }
132
- }
133
- }
134
-
135
- table {
136
- font-size: 0.875rem;
137
- line-height: 1.7;
138
-
139
- thead {
140
- th {
141
- padding-right: 0.5rem;
142
- padding-bottom: 0.5rem;
143
- padding-left: 0.5rem;
144
- }
145
-
146
- th:first-child {
147
- padding-left: 0;
148
- }
149
-
150
- th:last-child {
151
- padding-right: 0;
152
- }
153
- }
154
-
155
- tbody {
156
- td {
157
- padding: 0.5rem;
158
- }
159
-
160
- td:first-child {
161
- padding-left: 0;
162
- }
163
-
164
- td:last-child {
165
- padding-right: 0;
166
- }
167
- }
168
- }
169
- `;
170
- const CustomMarkdown = injectCss(_CustomMarkdown);
4
+ import { Markdown as UiMarkdown } from '@darajs/ui-components';
5
+ const CustomMarkdown = injectCss(UiMarkdown);
171
6
  /**
172
7
  * A component for rendering markdown
173
8
  */
@@ -178,7 +13,9 @@ function Markdown(props) {
178
13
  if (props.html_raw) {
179
14
  rehypePlugins.push(rehypeRaw);
180
15
  }
181
- return (_jsx(CustomMarkdown, { "$rawCss": css, className: props.className, style: style, children: _jsx(ReactMarkdown, { rehypePlugins: rehypePlugins, remarkPlugins: [remarkGfm], children: markdown }) }));
16
+ return (_jsx(CustomMarkdown, { "$rawCss": css, className: props.className, style: style, markdown: markdown,
17
+ // @ts-expect-error rehype type
18
+ rehypePlugins: rehypePlugins }));
182
19
  }
183
20
  export default Markdown;
184
21
  //# sourceMappingURL=markdown.js.map
@@ -1 +1 @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AAC,aAAa,IAAC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC,SAAS,CAAC,YAClE,QAAQ,GACG,GACH,CACpB,CAAC;AACN,CAAC;AAED,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../../js/common/markdown/markdown.tsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAkC,SAAS,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC1G,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAa/D,MAAM,cAAc,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;AAE7C;;GAEG;AACH,SAAS,QAAQ,CAAC,KAAoB;IAClC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/C,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAE/C,MAAM,aAAa,GAAG,EAAE,CAAC;IAEzB,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,CACH,KAAC,cAAc,eACF,GAAG,EACZ,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ;QAClB,+BAA+B;QAC/B,aAAa,EAAE,aAAa,GAC9B,CACL,CAAC;AACN,CAAC;AAED,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../js/smart/chat/chat.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEH,oBAAoB,EAEpB,QAAQ,EAQX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAA0C,MAAM,uBAAuB,CAAC;AAGxF,UAAU,SAAU,SAAQ,oBAAoB;IAC5C,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;CAC/B;AAiGD;;;;GAIG;AACH,iBAAS,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAgF3C;AAED,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../js/smart/chat/chat.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEH,oBAAoB,EAEpB,QAAQ,EAQX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAA0C,MAAM,uBAAuB,CAAC;AAGxF,UAAU,SAAU,SAAQ,oBAAoB;IAC5C,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;CAC/B;AAkID;;;;GAIG;AACH,iBAAS,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAyF3C;AAED,eAAe,IAAI,CAAC"}
@@ -7,31 +7,37 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
11
  import * as React from 'react';
12
12
  import { handleAuthErrors, injectCss, request, useComponentStyles, useRequestExtras, useUser, useVariable, } from '@darajs/core';
13
13
  import styled, { useTheme } from '@darajs/styled-components';
14
14
  import { Chat as UiChat } from '@darajs/ui-components';
15
15
  import { HTTP_METHOD, validateResponse } from '@darajs/ui-utils';
16
- const ChatWrapper = styled.div `
16
+ const ThreadWrapper = styled.div `
17
17
  pointer-events: auto;
18
18
 
19
19
  position: fixed;
20
- z-index: 999;
21
20
  right: 1rem;
22
21
  bottom: -0.1rem;
22
+
23
+ margin: 1rem;
24
+
25
+ border-radius: 0.4rem;
23
26
  `;
24
27
  const ChatButton = styled.button `
25
- width: 3.5rem;
26
- height: 3.5rem;
27
- margin: 0 2rem 2rem 0;
28
- padding-top: 0.5rem;
28
+ position: absolute;
29
+ right: 0.5rem;
30
+ bottom: 0.5rem;
31
+
32
+ width: 32px;
33
+ height: 32px;
34
+ padding: 7px 6px;
29
35
 
30
36
  color: ${(props) => props.theme.colors.background};
31
37
 
32
38
  background-color: ${(props) => props.theme.colors.primary};
33
39
  border: none;
34
- border-radius: 3rem;
40
+ border-radius: 2rem;
35
41
 
36
42
  :hover {
37
43
  background-color: ${(props) => props.theme.colors.primaryHover};
@@ -92,6 +98,31 @@ function sendNewMessage(payload, extras) {
92
98
  }
93
99
  });
94
100
  }
101
+ /**
102
+ * Check if the given selector has been rendered more than once in the document
103
+ *
104
+ * @param selector the selector to check
105
+ */
106
+ function checkMoreThanOneRenderedElement(selector) {
107
+ const elements = document.querySelectorAll(selector);
108
+ return elements.length > 1;
109
+ }
110
+ /**
111
+ * Get the highest z-index of the elements with the given selector
112
+ *
113
+ * @param selector the selector to get the z-index from
114
+ */
115
+ function getHighestZIndex(selector) {
116
+ const elements = document.querySelectorAll(selector);
117
+ let highest = 998; // Start with 998
118
+ elements.forEach((element) => {
119
+ const zIndex = parseInt(window.getComputedStyle(element).zIndex);
120
+ if (zIndex > highest) {
121
+ highest = zIndex;
122
+ }
123
+ });
124
+ return highest;
125
+ }
95
126
  /**
96
127
  * The Chat component switches between a chat button and a chat sidebar, allowing the user to interact with a chat.
97
128
  *
@@ -102,6 +133,8 @@ function Chat(props) {
102
133
  const [style, css] = useComponentStyles(props);
103
134
  const [value, setValue] = useVariable(props.value);
104
135
  const [showChat, setShowChat] = React.useState(false);
136
+ const [areThereOtherChats, setAreThereOtherChats] = React.useState(false);
137
+ const [zIndex, setZIndex] = React.useState(998);
105
138
  const user = useUser();
106
139
  const theme = useTheme();
107
140
  const extras = useRequestExtras();
@@ -121,7 +154,23 @@ function Chat(props) {
121
154
  }
122
155
  setValue(newValue);
123
156
  };
124
- return (_jsxs(ChatWrapper, { children: [showChat && (_jsx(StyledChat, { "$rawCss": css, className: props.className, onClose: () => setShowChat(false), onUpdate: onUpdate, style: style, value: value, activeUser: parseUserData(userData) })), !showChat && (_jsx(ChatButton, { onClick: () => setShowChat(true), children: _jsxs("svg", { fill: "none", height: "32", viewBox: "0 0 32 32", width: "32", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { fill: "none", height: "24", rx: "3", width: "30", x: "1", y: "1.33594" }), _jsx("rect", { height: "24", rx: "3", stroke: theme.colors.background, strokeWidth: "2", width: "30", x: "1", y: "1.33594" }), _jsx("path", { d: "M8 8.33594H24", stroke: theme.colors.background, strokeLinecap: "round", strokeWidth: "2" }), _jsx("path", { d: "M8 13.3359H24", stroke: theme.colors.background, strokeLinecap: "round", strokeWidth: "2" }), _jsx("path", { d: "M8 18.3359H24", stroke: theme.colors.background, strokeLinecap: "round", strokeWidth: "2" }), _jsx("path", { d: "M18.5981 26.1641L16 30.6641L13.4019 26.1641L18.5981 26.1641Z", fill: theme.colors.background, stroke: theme.colors.background }), _jsx("path", { d: "M16 28.3359L13.4019 23.8359L18.5981 23.8359L16 28.3359Z", fill: "none" })] }) }))] }));
157
+ const onClickChatButton = () => {
158
+ setShowChat(true);
159
+ setZIndex(getHighestZIndex('.chat-thread') + 1);
160
+ // we need to update here so that if the chat button is clicked again when it is already open, the background color is updated
161
+ setAreThereOtherChats(checkMoreThanOneRenderedElement('.chat-thread'));
162
+ };
163
+ React.useLayoutEffect(() => {
164
+ setAreThereOtherChats(checkMoreThanOneRenderedElement('.chat-thread'));
165
+ }, [showChat]);
166
+ return (_jsxs(_Fragment, { children: [showChat && (
167
+ // we set the z-index so that the latest chat thread opened is always on top, and if there is a chat thread open, we set the background color so that the transparency does not show the thread behind
168
+ _jsx(ThreadWrapper, { className: "chat-thread", style: {
169
+ zIndex,
170
+ backgroundColor: areThereOtherChats ? theme.colors.background : 'transparent',
171
+ }, children: _jsx(StyledChat, { "$rawCss": css, className: props.className, onClose: () => setShowChat(false), onUpdate: onUpdate,
172
+ // TODO: remove margin 0 when dara-ui is updated to not set it
173
+ style: Object.assign({ margin: 0 }, style), value: value, activeUser: parseUserData(userData) }) })), _jsx(ChatButton, { onClick: onClickChatButton, children: _jsxs("svg", { fill: "none", height: "20", viewBox: "0 0 32 32", width: "20", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { fill: "none", height: "24", rx: "3", width: "30", x: "1", y: "1.33594" }), _jsx("rect", { height: "24", rx: "3", stroke: theme.colors.background, strokeWidth: "2", width: "30", x: "1", y: "1.33594" }), _jsx("path", { d: "M8 8.33594H24", stroke: theme.colors.background, strokeLinecap: "round", strokeWidth: "2" }), _jsx("path", { d: "M8 13.3359H24", stroke: theme.colors.background, strokeLinecap: "round", strokeWidth: "2" }), _jsx("path", { d: "M8 18.3359H24", stroke: theme.colors.background, strokeLinecap: "round", strokeWidth: "2" }), _jsx("path", { d: "M18.5981 26.1641L16 30.6641L13.4019 26.1641L18.5981 26.1641Z", fill: theme.colors.background, stroke: theme.colors.background }), _jsx("path", { d: "M16 28.3359L13.4019 23.8359L18.5981 23.8359L16 28.3359Z", fill: "none" })] }) })] }));
125
174
  }
126
175
  export default Chat;
127
176
  //# sourceMappingURL=chat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../js/smart/chat/chat.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAKH,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,WAAW,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,MAAM,EAAE,EAA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