@apia/theme 3.0.17 → 3.0.20

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,11 +1,12 @@
1
1
  import cloneDeep from 'lodash-es/cloneDeep';
2
2
  import tinycolor from 'tinycolor2';
3
3
  import merge from 'lodash-es/merge';
4
- import '@theme-ui/match-media';
5
4
  import { jsx, Fragment } from 'theme-ui/jsx-runtime';
6
- import { ThemeUIProvider, useThemeUI, Box, ThemeProvider } from 'theme-ui';
5
+ import { Box, ThemeUIProvider, useThemeUI, ThemeProvider } from 'theme-ui';
6
+ import '@theme-ui/match-media';
7
7
  import { useState, useRef, useMemo, Suspense } from 'react';
8
8
  import { useMount, setValueByPath, EventEmitter } from '@apia/util';
9
+ import { keyframes } from '@emotion/react';
9
10
  import { spacing as spacing$1, responsive as responsive$2 } from '@apia/theme';
10
11
 
11
12
  function defaultLighten(color, ratio) {
@@ -1224,6 +1225,8 @@ function getThemeColorsObject(theme) {
1224
1225
  return colors;
1225
1226
  }
1226
1227
 
1228
+ const Form = (props) => /* @__PURE__ */ jsx(Box, { as: "form", ...props });
1229
+
1227
1230
  const alerts = {
1228
1231
  primary: {
1229
1232
  border: "1px solid",
@@ -1867,8 +1870,48 @@ const menu = {
1867
1870
  };
1868
1871
  var menu$1 = menu;
1869
1872
 
1873
+ const vibrate = keyframes`
1874
+ 0% {
1875
+ transform: rotate(0);
1876
+ }
1877
+
1878
+ 25% {
1879
+ transform: rotate(1.5deg);
1880
+ }
1881
+
1882
+ 75% {
1883
+ transform: rotate(-1.5deg);
1884
+ }
1885
+
1886
+ 100% {
1887
+ transform: rotate(0);
1888
+ }`;
1889
+ const fadeInFromBottom = keyframes`
1890
+ 0% {
1891
+ transform: translateY(400px) scale(0.1);
1892
+ opacity: 0;
1893
+ }
1894
+ 100% {
1895
+ transform: translateY(0) scale(1);
1896
+ opacity: 1;
1897
+ }
1898
+ `;
1899
+ const fadeInFromTop = keyframes`
1900
+ 0% {
1901
+ transform: translateY(-800px) scale(0.1);
1902
+ opacity: 0;
1903
+ }
1904
+ 100% {
1905
+ transform: translateY(0) scale(1);
1906
+ opacity: 1;
1907
+ }
1908
+ `;
1909
+ const animations = { vibrate, fadeInFromBottom, fadeInFromTop };
1910
+ var animations$1 = animations;
1911
+
1870
1912
  const root = {
1871
1913
  ...menu$1,
1914
+ ...animations$1,
1872
1915
  height: "100%",
1873
1916
  "*": {
1874
1917
  fontFamily: "body",
@@ -2060,7 +2103,8 @@ const baseTheme = () => {
2060
2103
  default: 0,
2061
2104
  panel: "7px",
2062
2105
  modals: "7px",
2063
- tooltips: "7px"
2106
+ tooltips: "7px",
2107
+ chatMessage: "16px"
2064
2108
  },
2065
2109
  shadows: {
2066
2110
  dataGridHeader: "2px 2px 4px 0px #0008",
@@ -3748,6 +3792,11 @@ const clean = (theme) => {
3748
3792
  rowGap: 2,
3749
3793
  ".listPanel__details": {
3750
3794
  pl: 6
3795
+ },
3796
+ ".responsiveTable__additionalInfoItem": {
3797
+ whiteSpace: "break-spaces",
3798
+ overflow: "hidden",
3799
+ wordBreak: "break-all"
3751
3800
  }
3752
3801
  },
3753
3802
  ".responsiveTable__additionalInfoContainer .responsiveTable__additionalInfoItem.separator": {
@@ -4368,12 +4417,14 @@ const accordion = {
4368
4417
  }
4369
4418
  };
4370
4419
 
4371
- const chat = {
4420
+ const chat$1 = {
4372
4421
  /* PREPEND HERE */
4373
4422
  height: "calc(100vh - 300px)",
4423
+ minHeight: "25vh",
4374
4424
  width: "100%",
4375
- border: "1px solid",
4376
- borderColor: "palette.border.section",
4425
+ flexShrink: 1,
4426
+ // border: '1px solid',
4427
+ // borderColor: 'palette.border.section',
4377
4428
  ".autoscrollContainer": {
4378
4429
  display: "flex",
4379
4430
  flexDirection: "column",
@@ -4383,32 +4434,50 @@ const chat = {
4383
4434
  },
4384
4435
  ".history__message": {
4385
4436
  borderRadius: "2px",
4386
- p: 3,
4437
+ px: 4,
4438
+ py: 5,
4387
4439
  width: "80%",
4388
4440
  wordWrap: "break-word",
4389
4441
  whiteSpace: "pre-wrap",
4390
4442
  "&.user": {
4391
- alignSelf: "end",
4392
- backgroundColor: "#90ee902b"
4443
+ borderRadius: "20px 2px 20px 20px",
4444
+ backgroundColor: "rgb(108 166 203)",
4445
+ //rgb(117 163 192)', //rgb(92, 143, 174)',
4446
+ color: "white",
4447
+ boxShadow: "rgba(50, 50, 93, 0.15) 1px 1px 2px 1px",
4448
+ border: "1px solid rgb(113 145 193)",
4449
+ alignSelf: "end"
4393
4450
  },
4394
4451
  "&.system": {
4395
- alignSelf: "start",
4396
- backgroundColor: "#5701f52b"
4452
+ borderRadius: "2px 20px 20px 20px",
4453
+ backgroundColor: "#00bcff14",
4454
+ boxShadow: "rgba(50, 50, 93, 0.15) 1px 1px 2px 1px",
4455
+ border: "1px solid rgb(0 28 38 / 18%)"
4397
4456
  },
4398
4457
  "&.warning": {
4458
+ borderRadius: "2px 20px 20px 20px",
4399
4459
  alignSelf: "start",
4400
4460
  backgroundColor: "#ffff0024",
4401
- width: "100%"
4461
+ width: "100%",
4462
+ boxShadow: "rgba(50, 50, 93, 0.15) 1px 1px 2px 1px",
4463
+ border: "1px solid rgb(0 28 38 / 18%)"
4402
4464
  },
4403
4465
  "&.error": {
4466
+ borderRadius: "2px 20px 20px 20px",
4404
4467
  alignSelf: "start",
4405
4468
  backgroundColor: "#fd84212b",
4406
- width: "100%"
4469
+ width: "100%",
4470
+ boxShadow: "rgba(50, 50, 93, 0.15) 1px 1px 2px 1px",
4471
+ border: "1px solid rgb(0 28 38 / 18%)"
4407
4472
  },
4408
4473
  "&.information": {
4474
+ borderRadius: "2px 20px 20px 20px",
4409
4475
  alignSelf: "start",
4410
- backgroundColor: "#2222cc2b",
4411
- width: "100%"
4476
+ backgroundColor: "#00bcff14",
4477
+ //'#2222cc2b',
4478
+ width: "100%",
4479
+ boxShadow: "rgba(50, 50, 93, 0.15) 1px 1px 2px 1px",
4480
+ border: "1px solid rgb(0 28 38 / 18%)"
4412
4481
  },
4413
4482
  "&.multipleChoice": {
4414
4483
  p: 0
@@ -4445,11 +4514,13 @@ const chat = {
4445
4514
  }
4446
4515
  },
4447
4516
  ".help__container": {
4517
+ borderRadius: "2px 20px 20px 20px",
4448
4518
  display: "flex",
4449
4519
  flexDirection: "column",
4450
4520
  gap: 4
4451
4521
  },
4452
4522
  ".functionHelp": {
4523
+ borderRadius: "2px 20px 20px 20px",
4453
4524
  display: "flex",
4454
4525
  flexDirection: "column",
4455
4526
  gap: 3,
@@ -4549,19 +4620,32 @@ const toolbar = {
4549
4620
  const autocomplete = {
4550
4621
  "&:focus-within": focusOutline,
4551
4622
  ".autocomplete__inputWrapper": {
4552
- position: "relative"
4623
+ display: "flex",
4624
+ alignItems: "center",
4625
+ border: "1px solid",
4626
+ borderColor: "palette.border.field"
4627
+ },
4628
+ ".autocomplete__input": {
4629
+ textAlign: "left",
4630
+ whiteSpace: "nowrap",
4631
+ overflow: "hidden",
4632
+ textOverflow: "ellipsis",
4633
+ border: "none",
4634
+ outline: "none !important"
4553
4635
  },
4554
4636
  ".autocomplete__icons": {
4555
4637
  alignItems: "center",
4556
4638
  display: "flex",
4557
4639
  gap: 2,
4558
4640
  height: "24px",
4559
- position: "absolute",
4560
- right: "12px",
4561
- top: "calc(50% - 12px)",
4641
+ p: 3,
4642
+ position: "relative",
4643
+ width: "30px",
4562
4644
  ".autocomplete__loadingSpinner": {
4563
- width: "24px",
4564
- height: "24px"
4645
+ position: "absolute",
4646
+ right: "7px",
4647
+ width: "20px",
4648
+ height: "20px"
4565
4649
  },
4566
4650
  ".autocomplete__downArrow": {
4567
4651
  cursor: "pointer",
@@ -4599,6 +4683,8 @@ const datePicker = {
4599
4683
 
4600
4684
  const aiMessage = {
4601
4685
  position: "relative",
4686
+ display: "flex",
4687
+ flexDirection: "column",
4602
4688
  ".closeButton": {
4603
4689
  borderRadius: "5px",
4604
4690
  right: "0px",
@@ -4665,7 +4751,7 @@ const components = {
4665
4751
  autocomplete: autocomplete$1,
4666
4752
  datePicker,
4667
4753
  pagination: pagination$1,
4668
- chat,
4754
+ chat: chat$1,
4669
4755
  toolbar,
4670
4756
  aiMessage
4671
4757
  };
@@ -4701,9 +4787,167 @@ const boxes = {
4701
4787
  /* PREPEND HERE */
4702
4788
  };
4703
4789
 
4790
+ const form = {
4791
+ /* PREPEND HERE */
4792
+ ".search_controls": {
4793
+ alignItems: "center",
4794
+ justifyContent: "center",
4795
+ display: "flex",
4796
+ gap: 0,
4797
+ mx: "auto",
4798
+ background: "palette.background.paper",
4799
+ border: "1px solid",
4800
+ borderColor: "palette.border.section",
4801
+ borderRadius: "panel",
4802
+ boxShadow: "0px 2px 6px #0002",
4803
+ width: "100%",
4804
+ p: spacing(3),
4805
+ "&:focus-within": focusOutline,
4806
+ "& > *:focus": {
4807
+ outline: "none"
4808
+ },
4809
+ ".filter_button_box": {
4810
+ position: "relative"
4811
+ },
4812
+ ".applied_filters_label": {
4813
+ position: "absolute",
4814
+ bottom: "21px",
4815
+ left: "20px",
4816
+ minWidth: "10px",
4817
+ maxHeight: "10px",
4818
+ border: "2px solid white",
4819
+ borderRadius: "100%",
4820
+ display: "inline-flex",
4821
+ alignItems: "center",
4822
+ justifyContent: "center",
4823
+ backgroundColor: "palette.error.main"
4824
+ }
4825
+ },
4826
+ ".searchTextArea": {
4827
+ minHeight: "34px",
4828
+ height: "34px",
4829
+ resize: "none",
4830
+ py: spacing(2),
4831
+ background: "transparent",
4832
+ border: "none"
4833
+ },
4834
+ ".SearchButton": {
4835
+ borderRadius: "panel",
4836
+ height: "34px",
4837
+ width: "34px",
4838
+ flexShrink: 0,
4839
+ background: "transparent",
4840
+ border: "none",
4841
+ color: "palette.text.primary"
4842
+ }
4843
+ };
4844
+
4845
+ const history = {
4846
+ /* PREPEND HERE */
4847
+ width: "100%",
4848
+ flexShrink: 1,
4849
+ height: "calc(100vh - 300px)",
4850
+ minHeight: "25vh",
4851
+ flexGrow: 1,
4852
+ ".messages_box": { fontSize: "22px", minHeight: "88vh" },
4853
+ ".history__message": {
4854
+ borderRadius: "2px",
4855
+ px: 4,
4856
+ py: 5,
4857
+ width: "80%",
4858
+ wordWrap: "break-word",
4859
+ whiteSpace: "pre-wrap",
4860
+ "&.user": {
4861
+ borderRadius: "chatMessage",
4862
+ borderTopRightRadius: "0px",
4863
+ backgroundColor: "rgb(108 166 203)",
4864
+ //rgb(117 163 192)', //rgb(92, 143, 174)',
4865
+ color: "white",
4866
+ boxShadow: "rgba(50, 50, 93, 0.15) 1px 1px 2px 1px",
4867
+ border: "1px solid rgb(113 145 193)",
4868
+ alignSelf: "end",
4869
+ display: "flex",
4870
+ flexDirection: "column",
4871
+ // gap: '16px',
4872
+ width: "max-content",
4873
+ ".additionalContent_wrapper": {
4874
+ display: "flex",
4875
+ justifyContent: "flex-end",
4876
+ ".labelBox": {
4877
+ width: "max-content",
4878
+ background: "#fafafa",
4879
+ color: "palette.text.primary",
4880
+ fontSize: "14px",
4881
+ ".labelAndIcon ": {
4882
+ fontSize: "14px"
4883
+ }
4884
+ }
4885
+ }
4886
+ },
4887
+ "&.system": {
4888
+ borderRadius: "chatMessage",
4889
+ borderTopLeftRadius: "0px",
4890
+ backgroundColor: "#00bcff14",
4891
+ boxShadow: "rgba(50, 50, 93, 0.15) 1px 1px 2px 1px",
4892
+ border: "1px solid rgb(0 28 38 / 18%)"
4893
+ },
4894
+ "&.warning": {
4895
+ borderRadius: "2px 20px 20px 20px",
4896
+ alignSelf: "start",
4897
+ backgroundColor: "#ffff0024",
4898
+ width: "100%",
4899
+ boxShadow: "rgba(50, 50, 93, 0.15) 1px 1px 2px 1px",
4900
+ border: "1px solid rgb(0 28 38 / 18%)"
4901
+ },
4902
+ "&.error": {
4903
+ borderRadius: "2px 20px 20px 20px",
4904
+ alignSelf: "start",
4905
+ backgroundColor: "#fd84212b",
4906
+ width: "100%",
4907
+ boxShadow: "rgba(50, 50, 93, 0.15) 1px 1px 2px 1px",
4908
+ border: "1px solid rgb(0 28 38 / 18%)"
4909
+ },
4910
+ "&.information": {
4911
+ borderRadius: "2px 20px 20px 20px",
4912
+ alignSelf: "start",
4913
+ backgroundColor: "#00bcff14",
4914
+ //'#2222cc2b',
4915
+ width: "100%",
4916
+ boxShadow: "rgba(50, 50, 93, 0.15) 1px 1px 2px 1px",
4917
+ border: "1px solid rgb(0 28 38 / 18%)"
4918
+ }
4919
+ },
4920
+ ".history": {
4921
+ animation: `${animations$1.fadeInFromBottom} 0.3s`,
4922
+ padding: "100px 32px 80px 32px",
4923
+ border: "none",
4924
+ height: "unset"
4925
+ },
4926
+ ".help__container": {
4927
+ borderRadius: "2px 20px 20px 20px",
4928
+ display: "flex",
4929
+ flexDirection: "column",
4930
+ gap: 4
4931
+ },
4932
+ ".autoscrollContainer": {
4933
+ display: "flex",
4934
+ flexDirection: "column",
4935
+ width: "100%",
4936
+ gap: 3,
4937
+ p: 3
4938
+ }
4939
+ };
4940
+
4941
+ const chat = {
4942
+ /* PREPEND HERE */
4943
+ form,
4944
+ history
4945
+ };
4946
+
4704
4947
  const common = (theme) => {
4705
4948
  return {
4706
4949
  boxes,
4950
+ chat,
4707
4951
  forms,
4708
4952
  modals,
4709
4953
  tables: tables(theme),
@@ -5469,7 +5713,7 @@ async function getRemarkable(extensions) {
5469
5713
 
5470
5714
  const parseMarkdown = async (options) => {
5471
5715
  const markdownLibrary = await getRemarkable(options.extensions);
5472
- const css = (await import('./styles-LVUMy7Mt.js')).markdownParserStyles ?? new ErrorImporting();
5716
+ const css = (await import('./styles-CHGH27gK.js')).markdownParserStyles ?? new ErrorImporting();
5473
5717
  if (css instanceof ErrorImporting)
5474
5718
  throw new Error("Could not import css, cannot continue");
5475
5719
  const html = options.htmlTemplate ?? (await import('./html-B-K0BIiw.js')).markdownHtml ?? new ErrorImporting();
@@ -5926,5 +6170,5 @@ class MarkdownBuilder {
5926
6170
  }
5927
6171
  }
5928
6172
 
5929
- export { ApiaThemeProvider as A, MarkdownBlock as M, getColorStates as a, getColorsAndStatesByDefinition as b, getColorsAndStatesByPath as c, getColorsByDefinition as d, getColorsByPath as e, getOneColorState as f, getColorState as g, applyStatesGetColor as h, makeStyledComponent as i, injectStyles as j, getSpacingLayouts as k, spacing as l, markdownExtensions as m, smallButton as n, focusOutline as o, parsePalette as p, getVariant as q, responsive$1 as r, spacingLayouts as s, MarkdownBuilder as t, useMainTheme as u, parseMarkdown as v, MarkdownList as w, MarkdownParagraph as x, MarkdownTable as y, MarkdownTableOfContents as z };
5930
- //# sourceMappingURL=index-BkIq8Zxt.js.map
6173
+ export { ApiaThemeProvider as A, Form as F, MarkdownBlock as M, getColorStates as a, getColorsAndStatesByDefinition as b, getColorsAndStatesByPath as c, getColorsByDefinition as d, getColorsByPath as e, getOneColorState as f, getColorState as g, applyStatesGetColor as h, makeStyledComponent as i, injectStyles as j, getSpacingLayouts as k, spacing as l, markdownExtensions as m, smallButton as n, focusOutline as o, parsePalette as p, getVariant as q, responsive$1 as r, spacingLayouts as s, MarkdownBuilder as t, useMainTheme as u, parseMarkdown as v, MarkdownList as w, MarkdownParagraph as x, MarkdownTable as y, MarkdownTableOfContents as z };
6174
+ //# sourceMappingURL=index-DGezuU-i.js.map