@darajs/components 0.4.8

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 (302) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +37 -0
  3. package/dist/common/accordion/accordion.d.ts +17 -0
  4. package/dist/common/accordion/accordion.d.ts.map +1 -0
  5. package/dist/common/accordion/accordion.js +36 -0
  6. package/dist/common/accordion/accordion.js.map +1 -0
  7. package/dist/common/anchor/anchor.d.ts +17 -0
  8. package/dist/common/anchor/anchor.d.ts.map +1 -0
  9. package/dist/common/anchor/anchor.js +40 -0
  10. package/dist/common/anchor/anchor.js.map +1 -0
  11. package/dist/common/bullet-list/bullet_list.d.ts +16 -0
  12. package/dist/common/bullet-list/bullet_list.d.ts.map +1 -0
  13. package/dist/common/bullet-list/bullet_list.js +17 -0
  14. package/dist/common/bullet-list/bullet_list.js.map +1 -0
  15. package/dist/common/button/button.d.ts +27 -0
  16. package/dist/common/button/button.d.ts.map +1 -0
  17. package/dist/common/button/button.js +47 -0
  18. package/dist/common/button/button.js.map +1 -0
  19. package/dist/common/button-bar/button-bar.d.ts +22 -0
  20. package/dist/common/button-bar/button-bar.d.ts.map +1 -0
  21. package/dist/common/button-bar/button-bar.js +27 -0
  22. package/dist/common/button-bar/button-bar.js.map +1 -0
  23. package/dist/common/card/card.d.ts +24 -0
  24. package/dist/common/card/card.d.ts.map +1 -0
  25. package/dist/common/card/card.js +58 -0
  26. package/dist/common/card/card.js.map +1 -0
  27. package/dist/common/carousel/carousel.d.ts +27 -0
  28. package/dist/common/carousel/carousel.d.ts.map +1 -0
  29. package/dist/common/carousel/carousel.js +42 -0
  30. package/dist/common/carousel/carousel.js.map +1 -0
  31. package/dist/common/checkbox-group/checkbox-group.d.ts +24 -0
  32. package/dist/common/checkbox-group/checkbox-group.d.ts.map +1 -0
  33. package/dist/common/checkbox-group/checkbox-group.js +37 -0
  34. package/dist/common/checkbox-group/checkbox-group.js.map +1 -0
  35. package/dist/common/code/code.d.ts +12 -0
  36. package/dist/common/code/code.d.ts.map +1 -0
  37. package/dist/common/code/code.js +11 -0
  38. package/dist/common/code/code.js.map +1 -0
  39. package/dist/common/component-select-list/component-select-list.d.ts +23 -0
  40. package/dist/common/component-select-list/component-select-list.d.ts.map +1 -0
  41. package/dist/common/component-select-list/component-select-list.js +29 -0
  42. package/dist/common/component-select-list/component-select-list.js.map +1 -0
  43. package/dist/common/constants.d.ts +19 -0
  44. package/dist/common/constants.d.ts.map +1 -0
  45. package/dist/common/constants.js +21 -0
  46. package/dist/common/constants.js.map +1 -0
  47. package/dist/common/context/form-context.d.ts +20 -0
  48. package/dist/common/context/form-context.d.ts.map +1 -0
  49. package/dist/common/context/form-context.js +28 -0
  50. package/dist/common/context/form-context.js.map +1 -0
  51. package/dist/common/context/index.d.ts +2 -0
  52. package/dist/common/context/index.d.ts.map +1 -0
  53. package/dist/common/context/index.js +2 -0
  54. package/dist/common/context/index.js.map +1 -0
  55. package/dist/common/datepicker/datepicker.d.ts +31 -0
  56. package/dist/common/datepicker/datepicker.d.ts.map +1 -0
  57. package/dist/common/datepicker/datepicker.js +70 -0
  58. package/dist/common/datepicker/datepicker.js.map +1 -0
  59. package/dist/common/dropzone/dropzone.d.ts +21 -0
  60. package/dist/common/dropzone/dropzone.d.ts.map +1 -0
  61. package/dist/common/dropzone/dropzone.js +101 -0
  62. package/dist/common/dropzone/dropzone.js.map +1 -0
  63. package/dist/common/form/form.d.ts +11 -0
  64. package/dist/common/form/form.d.ts.map +1 -0
  65. package/dist/common/form/form.js +46 -0
  66. package/dist/common/form/form.js.map +1 -0
  67. package/dist/common/form-page/form-page.d.ts +12 -0
  68. package/dist/common/form-page/form-page.d.ts.map +1 -0
  69. package/dist/common/form-page/form-page.js +18 -0
  70. package/dist/common/form-page/form-page.js.map +1 -0
  71. package/dist/common/grid/column.d.ts +20 -0
  72. package/dist/common/grid/column.d.ts.map +1 -0
  73. package/dist/common/grid/column.js +22 -0
  74. package/dist/common/grid/column.js.map +1 -0
  75. package/dist/common/grid/grid.d.ts +18 -0
  76. package/dist/common/grid/grid.d.ts.map +1 -0
  77. package/dist/common/grid/grid.js +31 -0
  78. package/dist/common/grid/grid.js.map +1 -0
  79. package/dist/common/grid/row.d.ts +22 -0
  80. package/dist/common/grid/row.d.ts.map +1 -0
  81. package/dist/common/grid/row.js +236 -0
  82. package/dist/common/grid/row.js.map +1 -0
  83. package/dist/common/heading/heading.d.ts +9 -0
  84. package/dist/common/heading/heading.d.ts.map +1 -0
  85. package/dist/common/heading/heading.js +14 -0
  86. package/dist/common/heading/heading.js.map +1 -0
  87. package/dist/common/html-raw/html-raw.d.ts +15 -0
  88. package/dist/common/html-raw/html-raw.d.ts.map +1 -0
  89. package/dist/common/html-raw/html-raw.js +22 -0
  90. package/dist/common/html-raw/html-raw.js.map +1 -0
  91. package/dist/common/icon/icon.d.ts +8 -0
  92. package/dist/common/icon/icon.d.ts.map +1 -0
  93. package/dist/common/icon/icon.js +11 -0
  94. package/dist/common/icon/icon.js.map +1 -0
  95. package/dist/common/if/if.d.ts +27 -0
  96. package/dist/common/if/if.d.ts.map +1 -0
  97. package/dist/common/if/if.js +53 -0
  98. package/dist/common/if/if.js.map +1 -0
  99. package/dist/common/image/image.d.ts +15 -0
  100. package/dist/common/image/image.d.ts.map +1 -0
  101. package/dist/common/image/image.js +19 -0
  102. package/dist/common/image/image.js.map +1 -0
  103. package/dist/common/index.d.ts +43 -0
  104. package/dist/common/index.d.ts.map +1 -0
  105. package/dist/common/index.js +41 -0
  106. package/dist/common/index.js.map +1 -0
  107. package/dist/common/input/input.d.ts +20 -0
  108. package/dist/common/input/input.d.ts.map +1 -0
  109. package/dist/common/input/input.js +57 -0
  110. package/dist/common/input/input.js.map +1 -0
  111. package/dist/common/label/label.d.ts +21 -0
  112. package/dist/common/label/label.d.ts.map +1 -0
  113. package/dist/common/label/label.js +30 -0
  114. package/dist/common/label/label.js.map +1 -0
  115. package/dist/common/markdown/markdown.d.ts +17 -0
  116. package/dist/common/markdown/markdown.d.ts.map +1 -0
  117. package/dist/common/markdown/markdown.js +19 -0
  118. package/dist/common/markdown/markdown.js.map +1 -0
  119. package/dist/common/modal/modal.d.ts +15 -0
  120. package/dist/common/modal/modal.d.ts.map +1 -0
  121. package/dist/common/modal/modal.js +19 -0
  122. package/dist/common/modal/modal.js.map +1 -0
  123. package/dist/common/overlay/overlay.d.ts +16 -0
  124. package/dist/common/overlay/overlay.d.ts.map +1 -0
  125. package/dist/common/overlay/overlay.js +31 -0
  126. package/dist/common/overlay/overlay.js.map +1 -0
  127. package/dist/common/paragraph/paragraph.d.ts +9 -0
  128. package/dist/common/paragraph/paragraph.d.ts.map +1 -0
  129. package/dist/common/paragraph/paragraph.js +10 -0
  130. package/dist/common/paragraph/paragraph.js.map +1 -0
  131. package/dist/common/progress-bar/progress-bar.d.ts +17 -0
  132. package/dist/common/progress-bar/progress-bar.d.ts.map +1 -0
  133. package/dist/common/progress-bar/progress-bar.js +23 -0
  134. package/dist/common/progress-bar/progress-bar.js.map +1 -0
  135. package/dist/common/radio-group/radio-group.d.ts +21 -0
  136. package/dist/common/radio-group/radio-group.d.ts.map +1 -0
  137. package/dist/common/radio-group/radio-group.js +30 -0
  138. package/dist/common/radio-group/radio-group.js.map +1 -0
  139. package/dist/common/select/select.d.ts +31 -0
  140. package/dist/common/select/select.d.ts.map +1 -0
  141. package/dist/common/select/select.js +129 -0
  142. package/dist/common/select/select.js.map +1 -0
  143. package/dist/common/slider/slider.d.ts +29 -0
  144. package/dist/common/slider/slider.d.ts.map +1 -0
  145. package/dist/common/slider/slider.js +38 -0
  146. package/dist/common/slider/slider.js.map +1 -0
  147. package/dist/common/spacer/spacer.d.ts +10 -0
  148. package/dist/common/spacer/spacer.d.ts.map +1 -0
  149. package/dist/common/spacer/spacer.js +30 -0
  150. package/dist/common/spacer/spacer.js.map +1 -0
  151. package/dist/common/stack/stack.d.ts +12 -0
  152. package/dist/common/stack/stack.d.ts.map +1 -0
  153. package/dist/common/stack/stack.js +42 -0
  154. package/dist/common/stack/stack.js.map +1 -0
  155. package/dist/common/switch/switch.d.ts +14 -0
  156. package/dist/common/switch/switch.d.ts.map +1 -0
  157. package/dist/common/switch/switch.js +31 -0
  158. package/dist/common/switch/switch.js.map +1 -0
  159. package/dist/common/tabbed-card/tabbed-card.d.ts +24 -0
  160. package/dist/common/tabbed-card/tabbed-card.d.ts.map +1 -0
  161. package/dist/common/tabbed-card/tabbed-card.js +62 -0
  162. package/dist/common/tabbed-card/tabbed-card.js.map +1 -0
  163. package/dist/common/table/cells/adaptive-precision-cell.d.ts +9 -0
  164. package/dist/common/table/cells/adaptive-precision-cell.d.ts.map +1 -0
  165. package/dist/common/table/cells/adaptive-precision-cell.js +30 -0
  166. package/dist/common/table/cells/adaptive-precision-cell.js.map +1 -0
  167. package/dist/common/table/cells/badge-formatter-cell.d.ts +19 -0
  168. package/dist/common/table/cells/badge-formatter-cell.d.ts.map +1 -0
  169. package/dist/common/table/cells/badge-formatter-cell.js +18 -0
  170. package/dist/common/table/cells/badge-formatter-cell.js.map +1 -0
  171. package/dist/common/table/cells/code-cell.d.ts +12 -0
  172. package/dist/common/table/cells/code-cell.d.ts.map +1 -0
  173. package/dist/common/table/cells/code-cell.js +19 -0
  174. package/dist/common/table/cells/code-cell.js.map +1 -0
  175. package/dist/common/table/cells/compare-cell.d.ts +13 -0
  176. package/dist/common/table/cells/compare-cell.d.ts.map +1 -0
  177. package/dist/common/table/cells/compare-cell.js +34 -0
  178. package/dist/common/table/cells/compare-cell.js.map +1 -0
  179. package/dist/common/table/cells/formatted-text-cell.d.ts +9 -0
  180. package/dist/common/table/cells/formatted-text-cell.d.ts.map +1 -0
  181. package/dist/common/table/cells/formatted-text-cell.js +15 -0
  182. package/dist/common/table/cells/formatted-text-cell.js.map +1 -0
  183. package/dist/common/table/cells/index.d.ts +11 -0
  184. package/dist/common/table/cells/index.d.ts.map +1 -0
  185. package/dist/common/table/cells/index.js +11 -0
  186. package/dist/common/table/cells/index.js.map +1 -0
  187. package/dist/common/table/cells/link-cell.d.ts +10 -0
  188. package/dist/common/table/cells/link-cell.d.ts.map +1 -0
  189. package/dist/common/table/cells/link-cell.js +15 -0
  190. package/dist/common/table/cells/link-cell.js.map +1 -0
  191. package/dist/common/table/cells/number-cell.d.ts +11 -0
  192. package/dist/common/table/cells/number-cell.d.ts.map +1 -0
  193. package/dist/common/table/cells/number-cell.js +16 -0
  194. package/dist/common/table/cells/number-cell.js.map +1 -0
  195. package/dist/common/table/cells/number-intl-cell.d.ts +11 -0
  196. package/dist/common/table/cells/number-intl-cell.d.ts.map +1 -0
  197. package/dist/common/table/cells/number-intl-cell.js +16 -0
  198. package/dist/common/table/cells/number-intl-cell.js.map +1 -0
  199. package/dist/common/table/cells/percentage-cell.d.ts +11 -0
  200. package/dist/common/table/cells/percentage-cell.d.ts.map +1 -0
  201. package/dist/common/table/cells/percentage-cell.js +16 -0
  202. package/dist/common/table/cells/percentage-cell.js.map +1 -0
  203. package/dist/common/table/cells/threshold-formatted-cell.d.ts +15 -0
  204. package/dist/common/table/cells/threshold-formatted-cell.d.ts.map +1 -0
  205. package/dist/common/table/cells/threshold-formatted-cell.js +20 -0
  206. package/dist/common/table/cells/threshold-formatted-cell.js.map +1 -0
  207. package/dist/common/table/table.d.ts +60 -0
  208. package/dist/common/table/table.d.ts.map +1 -0
  209. package/dist/common/table/table.js +456 -0
  210. package/dist/common/table/table.js.map +1 -0
  211. package/dist/common/text/text.d.ts +12 -0
  212. package/dist/common/text/text.d.ts.map +1 -0
  213. package/dist/common/text/text.js +23 -0
  214. package/dist/common/text/text.js.map +1 -0
  215. package/dist/common/textarea/textarea.d.ts +19 -0
  216. package/dist/common/textarea/textarea.d.ts.map +1 -0
  217. package/dist/common/textarea/textarea.js +42 -0
  218. package/dist/common/textarea/textarea.js.map +1 -0
  219. package/dist/common/tooltip/tooltip.d.ts +18 -0
  220. package/dist/common/tooltip/tooltip.d.ts.map +1 -0
  221. package/dist/common/tooltip/tooltip.js +18 -0
  222. package/dist/common/tooltip/tooltip.js.map +1 -0
  223. package/dist/common/types.d.ts +26 -0
  224. package/dist/common/types.d.ts.map +1 -0
  225. package/dist/common/types.js +9 -0
  226. package/dist/common/types.js.map +1 -0
  227. package/dist/dara_components-0.4.8-py3-none-any.whl +0 -0
  228. package/dist/graphs/causal-graph-viewer.d.ts +55 -0
  229. package/dist/graphs/causal-graph-viewer.d.ts.map +1 -0
  230. package/dist/graphs/causal-graph-viewer.js +44 -0
  231. package/dist/graphs/causal-graph-viewer.js.map +1 -0
  232. package/dist/graphs/graph-layout.d.ts +65 -0
  233. package/dist/graphs/graph-layout.d.ts.map +1 -0
  234. package/dist/graphs/graph-layout.js +152 -0
  235. package/dist/graphs/graph-layout.js.map +1 -0
  236. package/dist/graphs/index.d.ts +8 -0
  237. package/dist/graphs/index.d.ts.map +1 -0
  238. package/dist/graphs/index.js +6 -0
  239. package/dist/graphs/index.js.map +1 -0
  240. package/dist/graphs/node-hierarchy-builder.d.ts +24 -0
  241. package/dist/graphs/node-hierarchy-builder.d.ts.map +1 -0
  242. package/dist/graphs/node-hierarchy-builder.js +40 -0
  243. package/dist/graphs/node-hierarchy-builder.js.map +1 -0
  244. package/dist/graphs/utils.d.ts +10 -0
  245. package/dist/graphs/utils.d.ts.map +1 -0
  246. package/dist/graphs/utils.js +31 -0
  247. package/dist/graphs/utils.js.map +1 -0
  248. package/dist/graphs/visual-edge-encoder.d.ts +38 -0
  249. package/dist/graphs/visual-edge-encoder.d.ts.map +1 -0
  250. package/dist/graphs/visual-edge-encoder.js +94 -0
  251. package/dist/graphs/visual-edge-encoder.js.map +1 -0
  252. package/dist/index.d.ts +5 -0
  253. package/dist/index.d.ts.map +1 -0
  254. package/dist/index.js +5 -0
  255. package/dist/index.js.map +1 -0
  256. package/dist/plotting/bokeh/bokeh.d.ts +28 -0
  257. package/dist/plotting/bokeh/bokeh.d.ts.map +1 -0
  258. package/dist/plotting/bokeh/bokeh.js +125 -0
  259. package/dist/plotting/bokeh/bokeh.js.map +1 -0
  260. package/dist/plotting/index.d.ts +4 -0
  261. package/dist/plotting/index.d.ts.map +1 -0
  262. package/dist/plotting/index.js +5 -0
  263. package/dist/plotting/index.js.map +1 -0
  264. package/dist/plotting/matplotlib/matplotlib.d.ts +12 -0
  265. package/dist/plotting/matplotlib/matplotlib.d.ts.map +1 -0
  266. package/dist/plotting/matplotlib/matplotlib.js +14 -0
  267. package/dist/plotting/matplotlib/matplotlib.js.map +1 -0
  268. package/dist/plotting/plotly/plotly.d.ts +60 -0
  269. package/dist/plotting/plotly/plotly.d.ts.map +1 -0
  270. package/dist/plotting/plotly/plotly.js +235 -0
  271. package/dist/plotting/plotly/plotly.js.map +1 -0
  272. package/dist/smart/chat/chat.d.ts +16 -0
  273. package/dist/smart/chat/chat.d.ts.map +1 -0
  274. package/dist/smart/chat/chat.js +174 -0
  275. package/dist/smart/chat/chat.js.map +1 -0
  276. package/dist/smart/code-editor.d.ts +12 -0
  277. package/dist/smart/code-editor.d.ts.map +1 -0
  278. package/dist/smart/code-editor.js +15 -0
  279. package/dist/smart/code-editor.js.map +1 -0
  280. package/dist/smart/data-slicer-filter/data-slicer-filter.d.ts +47 -0
  281. package/dist/smart/data-slicer-filter/data-slicer-filter.d.ts.map +1 -0
  282. package/dist/smart/data-slicer-filter/data-slicer-filter.js +124 -0
  283. package/dist/smart/data-slicer-filter/data-slicer-filter.js.map +1 -0
  284. package/dist/smart/filter-status-button/filter-status-button.d.ts +14 -0
  285. package/dist/smart/filter-status-button/filter-status-button.d.ts.map +1 -0
  286. package/dist/smart/filter-status-button/filter-status-button.js +49 -0
  287. package/dist/smart/filter-status-button/filter-status-button.js.map +1 -0
  288. package/dist/smart/hierarchy-selector/hierarchy-selector.d.ts +23 -0
  289. package/dist/smart/hierarchy-selector/hierarchy-selector.d.ts.map +1 -0
  290. package/dist/smart/hierarchy-selector/hierarchy-selector.js +17 -0
  291. package/dist/smart/hierarchy-selector/hierarchy-selector.js.map +1 -0
  292. package/dist/smart/hierarchy-viewer/hierarchy-viewer.d.ts +16 -0
  293. package/dist/smart/hierarchy-viewer/hierarchy-viewer.d.ts.map +1 -0
  294. package/dist/smart/hierarchy-viewer/hierarchy-viewer.js +17 -0
  295. package/dist/smart/hierarchy-viewer/hierarchy-viewer.js.map +1 -0
  296. package/dist/smart/index.d.ts +7 -0
  297. package/dist/smart/index.d.ts.map +1 -0
  298. package/dist/smart/index.js +8 -0
  299. package/dist/smart/index.js.map +1 -0
  300. package/dist/umd/dara.components.umd.js +387222 -0
  301. package/dist/umd/style.css +745 -0
  302. package/package.json +87 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../js/common/heading/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAA8C,MAAM,cAAc,CAAC;AAG1G,UAAU,YAAa,SAAQ,oBAAoB;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACjB;AAMD,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAgBjD;AAED,eAAe,OAAO,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { injectCss, useComponentStyles, useVariable } from '@darajs/core';
3
+ import { useTheme } from '@darajs/styled-components';
4
+ const StyledTag = injectCss('h1');
5
+ const anchorName = (text) => text.toLowerCase().replace(/\s+/g, '-');
6
+ function Heading(props) {
7
+ const theme = useTheme();
8
+ const [style, css] = useComponentStyles(props);
9
+ const [heading] = useVariable(props.heading);
10
+ const tag = `h${props.level}`;
11
+ return (_jsx(StyledTag, { "$rawCss": css, as: tag, className: props.className, id: anchorName(heading), style: Object.assign({ color: theme.colors.text, textAlign: props.align }, style), children: heading }));
12
+ }
13
+ export default Heading;
14
+ //# sourceMappingURL=heading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heading.js","sourceRoot":"","sources":["../../../js/common/heading/heading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkC,SAAS,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC1G,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAQrD,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAElC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAErF,SAAS,OAAO,CAAC,KAAmB;IAChC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/C,MAAM,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,KAAK,EAAiC,CAAC;IAC7D,OAAO,CACH,KAAC,SAAS,eACG,GAAG,EACZ,EAAE,EAAE,GAAG,EACP,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,EACvB,KAAK,kBAAI,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,KAAY,IAAK,KAAK,aAEzE,OAAO,GACA,CACf,CAAC;AACN,CAAC;AAED,eAAe,OAAO,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { StyledComponentProps } from '@darajs/core';
2
+ interface HtmlRawProps extends StyledComponentProps {
3
+ /** Pass through the className property */
4
+ className: string;
5
+ /** The raw html to display, should be string */
6
+ html: string;
7
+ }
8
+ /**
9
+ * A component to display a raw HTML. It stretches to fit the container.
10
+ *
11
+ * @param props - the component props
12
+ */
13
+ declare function HtmlRaw(props: HtmlRawProps): JSX.Element;
14
+ export default HtmlRaw;
15
+ //# sourceMappingURL=html-raw.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-raw.d.ts","sourceRoot":"","sources":["../../../js/common/html-raw/html-raw.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAiC,MAAM,cAAc,CAAC;AAUnF,UAAU,YAAa,SAAQ,oBAAoB;IAC/C,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAWjD;AAED,eAAe,OAAO,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { injectCss, useComponentStyles } from '@darajs/core';
3
+ import styled from '@darajs/styled-components';
4
+ const _Wrapper = styled.div `
5
+ display: flex;
6
+ width: 100%;
7
+ height: 100%;
8
+ `;
9
+ const Wrapper = injectCss(_Wrapper);
10
+ /**
11
+ * A component to display a raw HTML. It stretches to fit the container.
12
+ *
13
+ * @param props - the component props
14
+ */
15
+ function HtmlRaw(props) {
16
+ const [style, css] = useComponentStyles(props);
17
+ return (_jsx(Wrapper, { "$rawCss": css, className: props.className,
18
+ // bearer:disable javascript_react_dangerously_set_inner_html
19
+ dangerouslySetInnerHTML: { __html: props.html }, style: style }));
20
+ }
21
+ export default HtmlRaw;
22
+ //# sourceMappingURL=html-raw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-raw.js","sourceRoot":"","sources":["../../../js/common/html-raw/html-raw.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAwB,SAAS,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAI1B,CAAC;AACF,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AASpC;;;;GAIG;AACH,SAAS,OAAO,CAAC,KAAmB;IAChC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/C,OAAO,CACH,KAAC,OAAO,eACK,GAAG,EACZ,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,6DAA6D;QAC7D,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,EAC/C,KAAK,EAAE,KAAK,GACd,CACL,CAAC;AACN,CAAC;AAED,eAAe,OAAO,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { StyledComponentProps } from '@darajs/core';
2
+ interface IconProps extends StyledComponentProps {
3
+ color?: string;
4
+ icon: string;
5
+ }
6
+ declare function Icon(props: IconProps): JSX.Element;
7
+ export default Icon;
8
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../js/common/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA+B,MAAM,cAAc,CAAC;AAEjF,UAAU,SAAU,SAAQ,oBAAoB;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,iBAAS,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAa3C;AAED,eAAe,IAAI,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getIcon, useComponentStyles } from '@darajs/core';
3
+ function Icon(props) {
4
+ const [style, css] = useComponentStyles(props);
5
+ const IconComponent = getIcon(props.icon);
6
+ const validStyle = Object.assign({}, style);
7
+ delete validStyle.fontWeight;
8
+ return (_jsx(IconComponent, { "$rawCss": css, style: Object.assign(Object.assign({ alignItems: 'center', display: 'flex' }, validStyle), { color: props.color }) }));
9
+ }
10
+ export default Icon;
11
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../js/common/icon/icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAwB,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAOjF,SAAS,IAAI,CAAC,KAAgB;IAC1B,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/C,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE1C,MAAM,UAAU,qBAAa,KAAK,CAAE,CAAC;IACrC,OAAO,UAAU,CAAC,UAAU,CAAC;IAE7B,OAAO,CACH,KAAC,aAAa,eACD,GAAG,EACZ,KAAK,gCAAI,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,IAAK,UAAU,KAAE,KAAK,EAAE,KAAK,CAAC,KAAK,MACnF,CACL,CAAC;AACN,CAAC;AAED,eAAe,IAAI,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { ComponentInstance, Condition, ConditionOperator, StyledComponentProps } from '@darajs/core';
2
+ interface IfProps extends StyledComponentProps {
3
+ /** The condition def to evaluate */
4
+ condition: Condition<any>;
5
+ /** Children to render if the condition is false */
6
+ false_children: Array<ComponentInstance>;
7
+ /** Children to render if the condition is true */
8
+ true_children: Array<ComponentInstance>;
9
+ }
10
+ /**
11
+ * This function takes the operator and both values and performs the appropriate comparison between the two and returns
12
+ * the result
13
+ *
14
+ * @param operator the operator defined in the condition
15
+ * @param value the value on the lhs of the condition
16
+ * @param other the value on the rhs of the condition
17
+ */
18
+ export declare function isConditionTrue(operator: ConditionOperator, value: unknown, other: unknown): boolean;
19
+ /**
20
+ * The if component conditionally renders either the falsey or truthy children depending on the evaluation of the
21
+ * condition def object, with the values pulled from the recoil state
22
+ *
23
+ * @param props the component props
24
+ */
25
+ declare function If(props: IfProps): JSX.Element;
26
+ export default If;
27
+ //# sourceMappingURL=if.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"if.d.ts","sourceRoot":"","sources":["../../../js/common/if/if.tsx"],"names":[],"mappings":"AAGA,OAAO,EACH,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EAEjB,oBAAoB,EAEvB,MAAM,cAAc,CAAC;AAEtB,UAAU,OAAQ,SAAQ,oBAAoB;IAC1C,oCAAoC;IACpC,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1B,mDAAmD;IACnD,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACzC,kDAAkD;IAClD,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;CAC3C;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAuBpG;AAED;;;;;GAKG;AACH,iBAAS,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,GAAG,CAAC,OAAO,CAmBvC;AAED,eAAe,EAAE,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /* eslint-disable react-hooks/exhaustive-deps */
3
+ import { useMemo } from 'react';
4
+ import { ConditionOperator, DynamicComponent, useAnyVariable, } from '@darajs/core';
5
+ /**
6
+ * This function takes the operator and both values and performs the appropriate comparison between the two and returns
7
+ * the result
8
+ *
9
+ * @param operator the operator defined in the condition
10
+ * @param value the value on the lhs of the condition
11
+ * @param other the value on the rhs of the condition
12
+ */
13
+ export function isConditionTrue(operator, value, other) {
14
+ if (operator === ConditionOperator.EQUAL) {
15
+ return value === other;
16
+ }
17
+ if (operator === ConditionOperator.NOT_EQUAL) {
18
+ return value !== other;
19
+ }
20
+ if (operator === ConditionOperator.GREATER_EQUAL) {
21
+ return value >= other;
22
+ }
23
+ if (operator === ConditionOperator.GREATER_THAN) {
24
+ return value > other;
25
+ }
26
+ if (operator === ConditionOperator.LESS_EQUAL) {
27
+ return value <= other;
28
+ }
29
+ if (operator === ConditionOperator.LESS_THAN) {
30
+ return value < other;
31
+ }
32
+ if (operator === ConditionOperator.TRUTHY) {
33
+ return !!value;
34
+ }
35
+ throw new Error(`Unexpected operator ${String(operator)} passed to conditional (If) component`);
36
+ }
37
+ /**
38
+ * The if component conditionally renders either the falsey or truthy children depending on the evaluation of the
39
+ * condition def object, with the values pulled from the recoil state
40
+ *
41
+ * @param props the component props
42
+ */
43
+ function If(props) {
44
+ const value = useAnyVariable(props.condition.variable);
45
+ const other = useAnyVariable(props.condition.other);
46
+ const conditionResult = useMemo(() => isConditionTrue(props.condition.operator, value, other), [props.condition, value, other]);
47
+ const children = useMemo(() => {
48
+ return conditionResult ? props.true_children : props.false_children;
49
+ }, [conditionResult]);
50
+ return (_jsx(_Fragment, { children: children.map((child, idx) => (_jsx(DynamicComponent, { component: child }, `if-${idx}-${child.name}-${String(conditionResult)}`))) }));
51
+ }
52
+ export default If;
53
+ //# sourceMappingURL=if.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"if.js","sourceRoot":"","sources":["../../../js/common/if/if.tsx"],"names":[],"mappings":";AAAA,gDAAgD;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAGH,iBAAiB,EACjB,gBAAgB,EAEhB,cAAc,GACjB,MAAM,cAAc,CAAC;AAWtB;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,QAA2B,EAAE,KAAc,EAAE,KAAc;IACvF,IAAI,QAAQ,KAAK,iBAAiB,CAAC,KAAK,EAAE,CAAC;QACvC,OAAO,KAAK,KAAK,KAAK,CAAC;IAC3B,CAAC;IACD,IAAI,QAAQ,KAAK,iBAAiB,CAAC,SAAS,EAAE,CAAC;QAC3C,OAAO,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CAAC,eAAe,CAAC,CAAC,CAAC;IAEtB,OAAO,CACH,4BACK,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAC1B,KAAC,gBAAgB,IAAC,SAAS,EAAE,KAAK,IAAO,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,IAAI,MAAM,CAAC,eAAe,CAAC,EAAE,CAAI,CACpG,CAAC,GACH,CACN,CAAC;AACN,CAAC;AAED,eAAe,EAAE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { StyledComponentProps } from '@darajs/core';
2
+ interface ImageProps extends StyledComponentProps {
3
+ /**
4
+ * Src URL
5
+ */
6
+ src?: string;
7
+ }
8
+ /**
9
+ * A component for displaying images files.
10
+ *
11
+ * @param {ImageProps} props - the component props
12
+ */
13
+ declare function Image(props: ImageProps): JSX.Element;
14
+ export default Image;
15
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../js/common/image/image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAiD,MAAM,cAAc,CAAC;AAGnG,UAAU,UAAW,SAAQ,oBAAoB;IAC7C;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAQD;;;;GAIG;AACH,iBAAS,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAU7C;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { injectCss, prependBaseUrl, useComponentStyles } from '@darajs/core';
3
+ import styled from '@darajs/styled-components';
4
+ const ImageComponent = styled.div `
5
+ display: flex;
6
+ `;
7
+ const StyledImg = injectCss(ImageComponent);
8
+ /**
9
+ * A component for displaying images files.
10
+ *
11
+ * @param {ImageProps} props - the component props
12
+ */
13
+ function Image(props) {
14
+ const [style, css] = useComponentStyles(props);
15
+ const source = prependBaseUrl(props.src);
16
+ return (_jsx(StyledImg, { "$rawCss": css, style: style, children: _jsx("img", { alt: `Could not load ${source}`, loading: "lazy", src: source }) }));
17
+ }
18
+ export default Image;
19
+ //# sourceMappingURL=image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.js","sourceRoot":"","sources":["../../../js/common/image/image.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAwB,SAAS,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAS/C,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAsB;;CAEtD,CAAC;AAEF,MAAM,SAAS,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;AAE5C;;;;GAIG;AACH,SAAS,KAAK,CAAC,KAAiB;IAC5B,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAE/C,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEzC,OAAO,CACH,KAAC,SAAS,eAAU,GAAG,EAAE,KAAK,EAAE,KAAK,YACjC,cAAK,GAAG,EAAE,kBAAkB,MAAM,EAAE,EAAE,OAAO,EAAC,MAAM,EAAC,GAAG,EAAE,MAAM,GAAI,GAC5D,CACf,CAAC;AACN,CAAC;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,43 @@
1
+ import type { ComponentItem } from './types';
2
+ export type { ComponentItem };
3
+ export { default as Accordion } from './accordion/accordion';
4
+ export { default as Anchor } from './anchor/anchor';
5
+ export { default as BulletList } from './bullet-list/bullet_list';
6
+ export { default as Button } from './button/button';
7
+ export { default as ButtonBar } from './button-bar/button-bar';
8
+ export { default as Card } from './card/card';
9
+ export { default as Carousel } from './carousel/carousel';
10
+ export { default as Column } from './grid/column';
11
+ export { default as CheckboxGroup } from './checkbox-group/checkbox-group';
12
+ export { default as Code } from './code/code';
13
+ export { default as ComponentSelectList } from './component-select-list/component-select-list';
14
+ export { default as Datepicker } from './datepicker/datepicker';
15
+ export { default as UploadDropzone } from './dropzone/dropzone';
16
+ export { default as Grid } from './grid/grid';
17
+ export { default as Heading } from './heading/heading';
18
+ export { default as HtmlRaw } from './html-raw/html-raw';
19
+ export { default as Form } from './form/form';
20
+ export { default as FormPage } from './form-page/form-page';
21
+ export { default as Icon } from './icon/icon';
22
+ export { default as If } from './if/if';
23
+ export { default as Image } from './image/image';
24
+ export { default as Input } from './input/input';
25
+ export { default as Label } from './label/label';
26
+ export { default as Markdown } from './markdown/markdown';
27
+ export { default as Modal } from './modal/modal';
28
+ export { default as Overlay } from './overlay/overlay';
29
+ export { default as Paragraph } from './paragraph/paragraph';
30
+ export { default as ProgressBar } from './progress-bar/progress-bar';
31
+ export { default as Row } from './grid/row';
32
+ export { default as RadioGroup } from './radio-group/radio-group';
33
+ export { default as Select } from './select/select';
34
+ export { default as Slider } from './slider/slider';
35
+ export { default as Spacer } from './spacer/spacer';
36
+ export { default as Stack } from './stack/stack';
37
+ export { default as Switch } from './switch/switch';
38
+ export { default as TabbedCard } from './tabbed-card/tabbed-card';
39
+ export { default as Table } from './table/table';
40
+ export { default as Text } from './text/text';
41
+ export { default as Textarea } from './textarea/textarea';
42
+ export { default as Tooltip } from './tooltip/tooltip';
43
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../js/common/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,E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ACjD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,41 @@
1
+ export { default as Accordion } from './accordion/accordion';
2
+ export { default as Anchor } from './anchor/anchor';
3
+ export { default as BulletList } from './bullet-list/bullet_list';
4
+ export { default as Button } from './button/button';
5
+ export { default as ButtonBar } from './button-bar/button-bar';
6
+ export { default as Card } from './card/card';
7
+ export { default as Carousel } from './carousel/carousel';
8
+ export { default as Column } from './grid/column';
9
+ export { default as CheckboxGroup } from './checkbox-group/checkbox-group';
10
+ export { default as Code } from './code/code';
11
+ export { default as ComponentSelectList } from './component-select-list/component-select-list';
12
+ export { default as Datepicker } from './datepicker/datepicker';
13
+ export { default as UploadDropzone } from './dropzone/dropzone';
14
+ export { default as Grid } from './grid/grid';
15
+ export { default as Heading } from './heading/heading';
16
+ export { default as HtmlRaw } from './html-raw/html-raw';
17
+ export { default as Form } from './form/form';
18
+ export { default as FormPage } from './form-page/form-page';
19
+ export { default as Icon } from './icon/icon';
20
+ export { default as If } from './if/if';
21
+ export { default as Image } from './image/image';
22
+ export { default as Input } from './input/input';
23
+ export { default as Label } from './label/label';
24
+ export { default as Markdown } from './markdown/markdown';
25
+ export { default as Modal } from './modal/modal';
26
+ export { default as Overlay } from './overlay/overlay';
27
+ export { default as Paragraph } from './paragraph/paragraph';
28
+ export { default as ProgressBar } from './progress-bar/progress-bar';
29
+ export { default as Row } from './grid/row';
30
+ export { default as RadioGroup } from './radio-group/radio-group';
31
+ export { default as Select } from './select/select';
32
+ export { default as Slider } from './slider/slider';
33
+ export { default as Spacer } from './spacer/spacer';
34
+ export { default as Stack } from './stack/stack';
35
+ export { default as Switch } from './switch/switch';
36
+ export { default as TabbedCard } from './tabbed-card/tabbed-card';
37
+ export { default as Table } from './table/table';
38
+ export { default as Text } from './text/text';
39
+ export { default as Textarea } from './textarea/textarea';
40
+ export { default as Tooltip } from './tooltip/tooltip';
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../js/common/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,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O,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Variable } from '@darajs/core';
2
+ import { FormComponentProps } from '../types';
3
+ interface InputProps extends FormComponentProps {
4
+ /** Passthrough the className property */
5
+ className: string;
6
+ /** Placeholder to show when inputs is empty */
7
+ placeholder?: string;
8
+ /** Input type attribute */
9
+ type?: string;
10
+ /** The value Variable to display and update */
11
+ value?: Variable<string>;
12
+ }
13
+ /**
14
+ * The input component accepts a value Variable from the backend and allows the user to view and edit that variable.
15
+ *
16
+ * @param props the component props
17
+ */
18
+ declare function Input(props: InputProps): JSX.Element;
19
+ export default Input;
20
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../js/common/input/input.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAyD,MAAM,cAAc,CAAC;AAI/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,UAAW,SAAQ,kBAAkB;IAC3C,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAE/C,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC5B;AAQD;;;;GAIG;AACH,iBAAS,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CA8D7C;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /* eslint-disable react-hooks/exhaustive-deps */
3
+ import _debounce from 'lodash/debounce';
4
+ import { useEffect, useMemo, useState } from 'react';
5
+ import { injectCss, useAction, useComponentStyles, useVariable } from '@darajs/core';
6
+ import { Input as UiInput, NumericInput as UiNumericInput } from '@darajs/ui-components';
7
+ import { useFormContext } from '../context';
8
+ const StyledInput = injectCss(UiInput);
9
+ const StyledNumericInput = injectCss(UiNumericInput);
10
+ function getNumericValue(value) {
11
+ return value == null || Number.isNaN(Number(value)) ? null : Number(value);
12
+ }
13
+ /**
14
+ * The input component accepts a value Variable from the backend and allows the user to view and edit that variable.
15
+ *
16
+ * @param props the component props
17
+ */
18
+ function Input(props) {
19
+ const formCtx = useFormContext(props);
20
+ const [style, css] = useComponentStyles(props);
21
+ const [value, setValue] = useVariable(formCtx.resolveInitialValue());
22
+ const [internalValue, setInternalValue] = useState(value);
23
+ const onInputAction = useAction(props.onchange);
24
+ const debouncedAction = useMemo(() => _debounce(onInputAction, 300), [onInputAction]);
25
+ const debouncedSetValue = useMemo(() => _debounce(setValue, 300), [setValue]);
26
+ const debouncedUpdateForm = useMemo(() => _debounce(formCtx.updateForm, 300), [formCtx.updateForm]);
27
+ function handleChange(val) {
28
+ let newValue = val;
29
+ if (props.type === 'number') {
30
+ newValue = getNumericValue(newValue);
31
+ }
32
+ // Immediately update internal state
33
+ setInternalValue(newValue);
34
+ // Debounce the update to the variable and the form to prevent multiple updates being fired at once
35
+ debouncedSetValue(newValue);
36
+ debouncedAction(newValue);
37
+ debouncedUpdateForm(newValue);
38
+ }
39
+ useEffect(() => {
40
+ // cancel in-progress debounced updates to make sure the variable value takes precedence
41
+ debouncedSetValue.cancel();
42
+ debouncedUpdateForm.cancel();
43
+ // If value has been coerced to string convert it back to number for NumericInput
44
+ let newValue = value;
45
+ if (props.type === 'number') {
46
+ newValue = getNumericValue(newValue);
47
+ }
48
+ // Sync the internal value with the variable value when the variable value changes
49
+ setInternalValue(newValue);
50
+ }, [value]);
51
+ if (props.type === 'number') {
52
+ return (_jsx(StyledNumericInput, { "$rawCss": css, className: props.className, onChange: (e) => handleChange(String(e)), placeholder: props.placeholder, stepper: true, style: style, value: internalValue }));
53
+ }
54
+ return (_jsx(StyledInput, { "$rawCss": css, className: props.className, onChange: handleChange, placeholder: props.placeholder, style: style, type: props.type, value: internalValue }));
55
+ }
56
+ export default Input;
57
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../js/common/input/input.tsx"],"names":[],"mappings":";AAAA,gDAAg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E,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EACxC,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,QACP,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,aAAuB,GAChC,CACL,CAAC;IACN,CAAC;IACD,OAAO,CACH,KAAC,WAAW,eACC,GAAG,EACZ,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,KAAK,EAAE,aAAuB,GAChC,CACL,CAAC;AACN,CAAC;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { ComponentInstance, StyledComponentProps } from '@darajs/core';
2
+ export interface LabelProps extends StyledComponentProps {
3
+ /** children to add label to */
4
+ children: Array<ComponentInstance>;
5
+ /** Pass through the className property */
6
+ className: string;
7
+ /** An optional value which determines the label placement */
8
+ direction?: 'horizontal' | 'vertical';
9
+ /** An optional value which determines the width of the label */
10
+ label_width?: string;
11
+ /** An optional value to be displayed next to or above children */
12
+ value: string | ComponentInstance;
13
+ }
14
+ /**
15
+ * Label component, adds a Label to an Interactive component
16
+ *
17
+ * @param props Label component props
18
+ */
19
+ declare function Label(props: LabelProps): JSX.Element;
20
+ export default Label;
21
+ //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../js/common/label/label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAoB,oBAAoB,EAAiC,MAAM,cAAc,CAAC;AAIxH,MAAM,WAAW,UAAW,SAAQ,oBAAoB;IACpD,+BAA+B;IAC/B,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACnC,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAAC;CACrC;AAWD;;;;GAIG;AACH,iBAAS,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CA4B7C;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { DynamicComponent, injectCss, useComponentStyles } from '@darajs/core';
3
+ import styled from '@darajs/styled-components';
4
+ const StyledLabel = injectCss(styled.label `
5
+ display: flex;
6
+ flex-grow: 0 !important;
7
+ gap: 0.5rem;
8
+ align-items: flex-start;
9
+
10
+ font-size: 1rem;
11
+ `);
12
+ /**
13
+ * Label component, adds a Label to an Interactive component
14
+ *
15
+ * @param props Label component props
16
+ */
17
+ function Label(props) {
18
+ var _a;
19
+ const [style, css] = useComponentStyles(props);
20
+ return (_jsxs(StyledLabel, { "$rawCss": css, className: props.className, style: Object.assign({ flexDirection: props.direction === 'horizontal' ? 'row' : 'column' }, style), children: [typeof props.value === 'string' ?
21
+ _jsx("span", { style: {
22
+ alignItems: 'center',
23
+ display: 'flex',
24
+ height: props.direction === 'horizontal' ? '2.5rem' : 'auto',
25
+ width: (_a = props.label_width) !== null && _a !== void 0 ? _a : 'auto',
26
+ }, children: props.value })
27
+ : _jsx(DynamicComponent, { component: props.value }), props.children.map((child, idx) => (_jsx(DynamicComponent, { component: child }, `cell-${idx}-${child.uid}`)))] }));
28
+ }
29
+ export default Label;
30
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.js","sourceRoot":"","sources":["../../../js/common/label/label.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,gBAAgB,EAAwB,SAAS,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACxH,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAgB/C,MAAM,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAA;;;;;;;CAOzC,CAAC,CAAC;AAEH;;;;GAIG;AACH,SAAS,KAAK,CAAC,KAAiB;;IAC5B,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/C,OAAO,CACH,MAAC,WAAW,eACC,GAAG,EACZ,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,kBACD,aAAa,EAAE,KAAK,CAAC,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,IAC/D,KAAK,cAGX,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC;gBAC9B,eACI,KAAK,EAAE;wBACH,UAAU,EAAE,QAAQ;wBACpB,OAAO,EAAE,MAAM;wBACf,MAAM,EAAE,KAAK,CAAC,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM;wBAC5D,KAAK,EAAE,MAAA,KAAK,CAAC,WAAW,mCAAI,MAAM;qBACrC,YAEA,KAAK,CAAC,KAAK,GACT;gBACX,CAAC,CAAG,KAAC,gBAAgB,IAAC,SAAS,EAAE,KAAK,CAAC,KAAK,GAAI,EAC/C,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,KAAC,gBAAgB,IAAC,SAAS,EAAE,KAAK,IAAO,QAAQ,GAAG,IAAI,KAAK,CAAC,GAAG,EAAE,CAAI,CAC1E,CAAC,IACQ,CACjB,CAAC;AACN,CAAC;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { StyledComponentProps, Variable } from '@darajs/core';
2
+ interface MarkdownProps extends StyledComponentProps {
3
+ /**
4
+ * Whether to render raw HTML
5
+ */
6
+ html_raw?: boolean;
7
+ /**
8
+ * The markdown to render
9
+ */
10
+ markdown: Variable<string> | string;
11
+ }
12
+ /**
13
+ * A component for rendering markdown
14
+ */
15
+ declare function Markdown(props: MarkdownProps): JSX.Element;
16
+ export default Markdown;
17
+ //# sourceMappingURL=markdown.d.ts.map
@@ -0,0 +1 @@
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,CAmBnD;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import rehypeRaw from 'rehype-raw';
3
+ import { injectCss, useComponentStyles, useVariable } from '@darajs/core';
4
+ import { Markdown as UiMarkdown } from '@darajs/ui-components';
5
+ const CustomMarkdown = injectCss(UiMarkdown);
6
+ /**
7
+ * A component for rendering markdown
8
+ */
9
+ function Markdown(props) {
10
+ const [style, css] = useComponentStyles(props);
11
+ const [markdown] = useVariable(props.markdown);
12
+ const rehypePlugins = [];
13
+ if (props.html_raw) {
14
+ rehypePlugins.push(rehypeRaw);
15
+ }
16
+ return (_jsx(CustomMarkdown, { "$rawCss": css, className: props.className, style: style, markdown: markdown, rehypePlugins: rehypePlugins }));
17
+ }
18
+ export default Markdown;
19
+ //# sourceMappingURL=markdown.js.map
@@ -0,0 +1 @@
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,EAClB,aAAa,EAAE,aAAa,GAC9B,CACL,CAAC;AACN,CAAC;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { ComponentInstance, LayoutComponentProps, Variable } from '@darajs/core';
2
+ interface ModalProps extends LayoutComponentProps {
3
+ /** The children to be rendered within the modal */
4
+ children: Array<ComponentInstance>;
5
+ /** The show flag, tells the modal whether or not to display */
6
+ show: Variable<boolean>;
7
+ }
8
+ /**
9
+ * The modal component accepts a set of children and renders them within a modal depending on the value of the render flag.
10
+ *
11
+ * @param props the component props
12
+ */
13
+ declare function Modal(props: ModalProps): JSX.Element;
14
+ export default Modal;
15
+ //# sourceMappingURL=modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../js/common/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAEjB,oBAAoB,EACpB,QAAQ,EAIX,MAAM,cAAc,CAAC;AAGtB,UAAU,UAAW,SAAQ,oBAAoB;IAC7C,mDAAmD;IACnD,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACnC,+DAA+D;IAC/D,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC3B;AAID;;;;GAIG;AACH,iBAAS,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAoB7C;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DynamicComponent, injectCss, useComponentStyles, useVariable, } from '@darajs/core';
3
+ import { Modal as UiModal } from '@darajs/ui-components';
4
+ const StyledModal = injectCss(UiModal);
5
+ /**
6
+ * The modal component accepts a set of children and renders them within a modal depending on the value of the render flag.
7
+ *
8
+ * @param props the component props
9
+ */
10
+ function Modal(props) {
11
+ const [style, css] = useComponentStyles(props, false);
12
+ const [show, setShow] = useVariable(props.show);
13
+ function onAttemptClose() {
14
+ setShow(false);
15
+ }
16
+ return (_jsx(StyledModal, { "$rawCss": css, onAttemptClose: onAttemptClose, render: show, style: Object.assign({ alignItems: props.align, gap: '0.75rem', justifyContent: props.justify }, style), children: props.children.map((child, idx) => (_jsx(DynamicComponent, { component: child }, `modal-${idx}-${child.uid}`))) }));
17
+ }
18
+ export default Modal;
19
+ //# sourceMappingURL=modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../js/common/modal/modal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEH,gBAAgB,EAGhB,SAAS,EACT,kBAAkB,EAClB,WAAW,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AASzD,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;AAEvC;;;;GAIG;AACH,SAAS,KAAK,CAAC,KAAiB;IAC5B,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACtD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEhD,SAAS,cAAc;QACnB,OAAO,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAED,OAAO,CACH,KAAC,WAAW,eACC,GAAG,EACZ,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,IAAI,EACZ,KAAK,kBAAI,UAAU,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,CAAC,OAAO,IAAK,KAAK,aAExF,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,KAAC,gBAAgB,IAAC,SAAS,EAAE,KAAK,IAAO,SAAS,GAAG,IAAI,KAAK,CAAC,GAAG,EAAE,CAAI,CAC3E,CAAC,GACQ,CACjB,CAAC;AACN,CAAC;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ComponentInstance, StyledComponentProps, Variable } from '@darajs/core';
2
+ interface OverlayProps extends StyledComponentProps {
3
+ children: Array<ComponentInstance>;
4
+ margin?: string;
5
+ padding?: string;
6
+ position?: string;
7
+ show: Variable<boolean>;
8
+ }
9
+ /**
10
+ * The overlay component accepts a set of children and renders them as an overlay depending on the value of the render flag.
11
+ *
12
+ * @param props the component props
13
+ */
14
+ declare function Overlay(props: OverlayProps): JSX.Element;
15
+ export default Overlay;
16
+ //# sourceMappingURL=overlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../js/common/overlay/overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAEjB,oBAAoB,EACpB,QAAQ,EAIX,MAAM,cAAc,CAAC;AA2BtB,UAAU,YAAa,SAAQ,oBAAoB;IAE/C,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAEnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC3B;AAED;;;;GAIG;AACH,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAiBjD;AAED,eAAe,OAAO,CAAC"}