@apia/theme 4.0.44 → 4.0.45

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,8 +1,8 @@
1
- import { Box, ThemeUIProvider, useThemeUI, ThemeProvider } from 'theme-ui';
2
1
  import cloneDeep from 'lodash-es/cloneDeep';
3
2
  import tinycolor from 'tinycolor2';
4
3
  import merge from 'lodash-es/merge';
5
4
  import { jsxs, jsx, Fragment } from 'theme-ui/jsx-runtime';
5
+ import { Box, ThemeUIProvider, useThemeUI, ThemeProvider } from 'theme-ui';
6
6
  import { forwardRef, useState, useRef, useMemo, Suspense } from 'react';
7
7
  import '@theme-ui/match-media';
8
8
  import { useMount, setValueByPath, EventEmitter } from '@apia/util';
@@ -2616,38 +2616,12 @@ const deletableInput = {
2616
2616
  }
2617
2617
  };
2618
2618
 
2619
- const formGrid = {
2620
- display: "grid",
2621
- gridTemplateColumns: "1fr 1fr 1fr",
2622
- gap: 5,
2623
- ".span_all": {
2624
- gridColumn: "span 3"
2625
- },
2626
- ".extra_gap": {
2627
- marginY: 6
2628
- },
2629
- ".gap_before": {
2630
- marginTop: 6
2631
- },
2632
- ".gap_after": {
2633
- marginBottom: 6
2634
- },
2635
- ".checkbox": {
2636
- display: "flex",
2637
- gap: 4,
2638
- flexDirection: "row-reverse",
2639
- alignItems: "center",
2640
- justifyContent: "start"
2641
- }
2642
- };
2643
-
2644
2619
  const forms$1 = (theme) => {
2645
2620
  return {
2646
2621
  checkbox,
2647
2622
  customCheckbox,
2648
2623
  dateInput,
2649
2624
  deletableInput,
2650
- formGrid,
2651
2625
  iconInput,
2652
2626
  input,
2653
2627
  label,
@@ -3490,14 +3464,7 @@ const primary$4 = (theme) => {
3490
3464
  height: "30px",
3491
3465
  padding: "3px",
3492
3466
  border: "none",
3493
- background: "transparent",
3494
- svg: {
3495
- transform: "rotate(0deg)",
3496
- transition: "transform 200ms"
3497
- },
3498
- "&.expanded svg": {
3499
- transform: `rotate(90deg)`
3500
- }
3467
+ background: "transparent"
3501
3468
  }
3502
3469
  },
3503
3470
  "&.locked": {
@@ -4583,9 +4550,6 @@ const accordion = {
4583
4550
  borderTop: "1px solid",
4584
4551
  borderTopColor: "palette.border.ghost"
4585
4552
  },
4586
- ".accordion__item__content": {
4587
- background: "palette.background.paper"
4588
- },
4589
4553
  ".accordion__item__content > *": {
4590
4554
  p: 4,
4591
4555
  boxShadow: "default",
@@ -6523,482 +6487,12 @@ const markdown = {
6523
6487
  }
6524
6488
  };
6525
6489
 
6526
- const observations = {
6527
- bg: "white",
6528
- display: "flex",
6529
- flexDirection: "column",
6530
- gap: spacing$1(5),
6531
- background: "transparent",
6532
- borderRadius: "default",
6533
- ".currentObservations": {
6534
- display: "flex",
6535
- gap: spacing$1(5),
6536
- flexDirection: "column",
6537
- borderRadius: "default",
6538
- ".observation": {
6539
- border: "1px solid",
6540
- borderColor: "palette.border.article",
6541
- borderRadius: "default",
6542
- ".observation__header": {
6543
- display: "flex",
6544
- flexWrap: "wrap",
6545
- gap: spacing$1(3),
6546
- alignItems: "center",
6547
- borderBottom: "1px solid",
6548
- borderColor: "palette.border.article",
6549
- p: spacing$1(5),
6550
- backgroundColor: "palette.background.paper",
6551
- ".icon__wrapper": {
6552
- svg: {
6553
- color: "favorite"
6554
- }
6555
- },
6556
- img: {
6557
- width: "18px",
6558
- height: "18px"
6559
- },
6560
- ".observation__header__block": {
6561
- display: "flex",
6562
- flexWrap: "nowrap",
6563
- gap: spacing$1(3)
6564
- },
6565
- ".observation__label": {
6566
- fontWeight: "900"
6567
- }
6568
- },
6569
- "&.marked .observation__header": {
6570
- borderLeft: "4px solid",
6571
- borderLeftColor: "notifications.warning.backgroundColor",
6572
- borderColor: "notifications.warning.backgroundColor",
6573
- backgroundColor: "notifications.warning.backgroundColor",
6574
- borderRadius: "default"
6575
- },
6576
- ".observation__body": {
6577
- display: "flex",
6578
- gap: spacing$1(5),
6579
- p: spacing$1(5),
6580
- alignItems: "start",
6581
- ".observation__comment": {
6582
- width: "100%",
6583
- maxHeight: "calc(100vh - 130px)",
6584
- resize: "vertical",
6585
- '&[style*="height"]': {
6586
- maxHeight: "unset"
6587
- },
6588
- overflow: "auto",
6589
- pr: spacing$1(4)
6590
- }
6591
- }
6592
- }
6593
- },
6594
- ".checkboxes": {
6595
- alignItems: "center",
6596
- display: "flex",
6597
- flexWrap: "wrap",
6598
- gap: spacing$1(6),
6599
- ".checkbox": {
6600
- alignItems: "center",
6601
- display: "flex",
6602
- gap: spacing$1(3)
6603
- }
6604
- },
6605
- ".observation": {
6606
- display: "flex",
6607
- flexDirection: "column",
6608
- span: {
6609
- fontWeight: "bold"
6610
- },
6611
- textarea: {
6612
- height: "140px"
6613
- }
6614
- },
6615
- ".alert": {
6616
- color: "palette.warning.main"
6617
- }
6618
- /* PREPEND HERE */
6619
- };
6620
-
6621
- const dataGrid = {
6622
- variant: "grids.form",
6623
- display: responsive$2({ 0: "flex", 2: "grid" }),
6624
- flexDirection: "column",
6625
- gap: spacing$1(6),
6626
- alignItems: "start",
6627
- gridAutoRows: "none",
6628
- gridTemplateColumns: responsive$2({
6629
- 0: "repeat(1, 1fr)",
6630
- 2: "repeat(3, 1fr)",
6631
- 4: "repeat(3, 1fr)",
6632
- 5: "repeat(5, 1fr)"
6633
- }),
6634
- "& label": {
6635
- display: "block",
6636
- ".elementValue": {
6637
- fontWeight: "normal",
6638
- ".errorContainer": {
6639
- flexDirection: "column",
6640
- alignItems: "center",
6641
- div: {
6642
- position: "relative"
6643
- }
6644
- }
6645
- },
6646
- "&.identifier, &.calendar": {
6647
- gridColumn: responsive$2({ 0: "span 2", 5: "span 3", 6: "span 2" }),
6648
- div: {
6649
- display: "flex",
6650
- gap: spacing$1(1),
6651
- alignItems: "center",
6652
- ".separator": {
6653
- alignSelf: "center"
6654
- },
6655
- input: {
6656
- minWidth: "60px"
6657
- },
6658
- ".body": {
6659
- width: "100%"
6660
- },
6661
- ".identifier__body": {
6662
- flexShrink: 0
6663
- }
6664
- }
6665
- },
6666
- "strong + div": {
6667
- wordBreak: "break-all"
6668
- }
6669
- }
6670
- };
6671
- const entityAndProcessData = {
6672
- display: "flex",
6673
- flexDirection: "column",
6674
- // p: spacing(7),
6675
- gap: 7,
6676
- ".collapsiblePanel__label": {
6677
- display: "flex",
6678
- alignItems: "anchor-center",
6679
- gap: 3,
6680
- h3: {
6681
- m: spacing$1(0),
6682
- fontSize: 18
6683
- }
6684
- },
6685
- ".collapsiblePanel__content": {
6686
- borderRadius: "default",
6687
- '&:not([aria-hidden="true"])': {
6688
- border: "1px solid",
6689
- borderColor: "palette.border.article"
6690
- },
6691
- "& > div > *:not(.noPadding, button, .uploadedFiles__container)": {
6692
- p: spacing$1(5)
6693
- }
6694
- },
6695
- ".dataGrid": dataGrid,
6696
- ".dropzone": {
6697
- border: "none"
6698
- },
6699
- ".uploadedFiles__container[class]": {
6700
- display: "flex",
6701
- gap: 3,
6702
- p: 0,
6703
- flexDirection: "column",
6704
- ".download_Button": {
6705
- width: "fit-content"
6706
- }
6707
- }
6708
- };
6709
- const entityData = {
6710
- ...entityAndProcessData,
6711
- "& h2": {
6712
- "&.visibilitiesTitle": {
6713
- display: "flex",
6714
- justifyContent: "start",
6715
- gap: spacing$1(3)
6716
- }
6717
- },
6718
- ".imageSelector": {
6719
- button: {
6720
- border: "none",
6721
- cursor: "pointer",
6722
- p: spacing$1(0),
6723
- width: "75px",
6724
- img: {
6725
- width: "100%"
6726
- }
6727
- }
6728
- },
6729
- ".EntityDataDocuments, .ProcessDataDocuments": {
6730
- ".entityData__actions": {
6731
- p: spacing$1(3)
6732
- }
6733
- },
6734
- ".categories__tree__label": {
6735
- display: "flex",
6736
- alignItems: "center",
6737
- gap: spacing$1(3),
6738
- "& > div": {
6739
- display: "flex",
6740
- py: spacing$1(2)
6741
- }
6742
- },
6743
- ".entity__visibilities__container": {
6744
- display: "flex",
6745
- flexDirection: "column",
6746
- gap: spacing$1(4),
6747
- ".entity__visibilities__grid": {
6748
- display: "grid",
6749
- gridTemplateColumns: "repeat(2, 1fr)",
6750
- gap: "1rem",
6751
- ".switch__card": {
6752
- border: "1px solid",
6753
- borderColor: "palette.border.field",
6754
- borderRadius: "default"
6755
- }
6756
- }
6757
- }
6758
- /* PREPEND HERE */
6759
- };
6760
-
6761
- const processData = {
6762
- ...entityAndProcessData,
6763
- ".ProcessDataDocuments": {
6764
- ".processData__actions": {
6765
- p: spacing$1(3)
6766
- }
6767
- }
6768
- /* PREPEND HERE */
6769
- };
6770
-
6771
- const documents = {
6772
- display: "flex",
6773
- flexDirection: "column",
6774
- gap: spacing$1(7),
6775
- ".collapsiblePanel__label": {
6776
- mb: spacing$1(3),
6777
- h2: {
6778
- m: spacing$1(0)
6779
- }
6780
- },
6781
- ".collapsiblePanel__content": {
6782
- '&:not([aria-hidden="true"])': {
6783
- border: "1px solid",
6784
- borderColor: "palette.border.article"
6785
- },
6786
- "& > div > *:not(.noPadding)": {
6787
- p: spacing$1(7)
6788
- }
6789
- },
6790
- ".dropzone": {
6791
- borderTop: "none",
6792
- borderLeft: "none",
6793
- borderRight: "none"
6794
- },
6795
- ".entityData__actions, .processData__actions": {
6796
- p: spacing$1(3)
6797
- }
6798
- /* PREPEND HERE */
6799
- };
6800
-
6801
- const taskMonitor = {
6802
- table: {
6803
- variant: "layout.common.tables.secondary",
6804
- border: "1px solid",
6805
- borderColor: "palette.border.article",
6806
- borderRadius: "default",
6807
- overflow: "hidden"
6808
- },
6809
- ".taskMonitor__warning": {
6810
- backgroundColor: "palette.warning.light",
6811
- color: "palette.warning.contrastText"
6812
- },
6813
- ".taskMonitor__overdue": {
6814
- backgroundColor: "palette.error.light",
6815
- color: "palette.error.contrastText"
6816
- },
6817
- "& > div": {
6818
- maxHeight: "500px",
6819
- "& > div": {
6820
- height: "100%",
6821
- overflowX: "auto",
6822
- "&.noFixedWidth": {
6823
- overflowX: "auto"
6824
- }
6825
- }
6826
- }
6827
- /* PREPEND HERE */
6828
- };
6829
-
6830
- const tab = {
6831
- list: {
6832
- ".tabs__list": {
6833
- borderRadius: "7px",
6834
- display: "flex",
6835
- flexDirection: "column"
6836
- },
6837
- ".tabs__item__wrapper": {
6838
- display: "flex",
6839
- alignItems: "center",
6840
- background: "palette.background.paper",
6841
- padding: "4px 10px",
6842
- border: "none",
6843
- borderBottom: "1px solid #ccc",
6844
- boxShadow: "sharp",
6845
- cursor: "pointer",
6846
- ".tabs__item__button": {
6847
- width: "100%",
6848
- p: 3,
6849
- background: "transparent",
6850
- justifyContent: "start",
6851
- color: "palette.text.primary",
6852
- ".button__content": {
6853
- display: "flex",
6854
- alignItems: "center",
6855
- gap: spacing$1(1),
6856
- textAlign: "start"
6857
- }
6858
- },
6859
- "&:hover": {
6860
- background: "palette.gray.900"
6861
- },
6862
- // First item: apply top border radii
6863
- "&:first-of-type": {
6864
- borderTopLeftRadius: "default",
6865
- borderTopRightRadius: "default"
6866
- },
6867
- // Last item: apply bottom border radii
6868
- "&:last-of-type": {
6869
- borderBottomLeftRadius: "default",
6870
- borderBottomRightRadius: "default"
6871
- }
6872
- },
6873
- ".warning-icon[class]": {
6874
- svg: {
6875
- // color: '#ffa600',
6876
- color: "favorite",
6877
- width: "18px",
6878
- height: "18px"
6879
- }
6880
- }
6881
- },
6882
- content: {
6883
- display: "flex",
6884
- flexDirection: "column",
6885
- gap: "15px",
6886
- ".tabs__content": {
6887
- ".accordion__item": {
6888
- boxShadow: "default"
6889
- }
6890
- },
6891
- ".accordion__item__button[class]": {
6892
- width: "100%",
6893
- p: "10px 15px",
6894
- borderRadius: "default",
6895
- userSelect: "unset",
6896
- ".button__content": {
6897
- display: "flex",
6898
- flexDirection: "row",
6899
- justifyContent: "space-between",
6900
- width: "100%",
6901
- alignItems: "center"
6902
- }
6903
- },
6904
- ".accordion__item__content": {
6905
- borderRadius: "default",
6906
- background: "palette.background.paper",
6907
- '&:not(:has([data-variant="layout.execution.form"])) > div': {
6908
- p: spacing$1(7)
6909
- }
6910
- },
6911
- ".accordion__item__button__label": {
6912
- color: "palette.primary.contrastText"
6913
- },
6914
- ".accordion__item__button__rightGroup": {
6915
- display: "flex"
6916
- },
6917
- ".tabs__Item": {
6918
- height: "100%",
6919
- display: "flex",
6920
- gap: "15px",
6921
- flexDirection: "column"
6922
- },
6923
- ".collapsiblePanel__container": {
6924
- background: "palette.background.paper",
6925
- p: spacing$1(0),
6926
- ".collapsiblePanel__label__button": {
6927
- display: "flex"
6928
- }
6929
- }
6930
- }
6931
- /* PREPEND HERE */
6932
- };
6933
-
6934
- const associations = {
6935
- display: "flex",
6936
- flexDirection: "column",
6937
- gap: 4,
6938
- ".associations__table_container": {
6939
- height: "400px",
6940
- overflowY: "auto",
6941
- overflowX: "hidden"
6942
- },
6943
- table: {
6944
- variant: "layout.common.tables.secondary",
6945
- border: "1px solid",
6946
- borderColor: "palette.border.article",
6947
- borderRadius: "default"
6948
- },
6949
- ".associations__buttons": {
6950
- display: "flex",
6951
- flexDirection: "row",
6952
- gap: 2,
6953
- justifyContent: "flex-end"
6954
- },
6955
- ".errorRequired": {
6956
- color: "palette.error.main"
6957
- },
6958
- ".association__errorRequired": {
6959
- input: {
6960
- color: "palette.error.main",
6961
- borderLeft: "3px solid !important",
6962
- borderLeftColor: "palette.error.main"
6963
- }
6964
- },
6965
- ".associationSpinner": {
6966
- position: "absolute",
6967
- width: "20px",
6968
- height: "20px",
6969
- right: "55px",
6970
- top: "15px"
6971
- },
6972
- ".association__cell_content": {
6973
- position: "relative"
6974
- },
6975
- ".associationReq__after": { position: "absolute", left: "2px", top: "-3px" },
6976
- ".associationReq__before": {
6977
- position: "absolute",
6978
- right: "2px",
6979
- top: "-3px"
6980
- }
6981
- /* PREPEND HERE */
6982
- };
6983
-
6984
- const tabs = {
6985
- observations,
6986
- entityData,
6987
- processData,
6988
- documents,
6989
- taskMonitor,
6990
- associations,
6991
- ...tab
6992
- /* PREPEND HERE */
6993
- };
6994
-
6995
6490
  const common = (theme) => {
6996
6491
  return {
6997
6492
  boxes,
6998
6493
  forms,
6999
6494
  modals,
7000
6495
  tables: tables(theme),
7001
- tabs,
7002
6496
  components,
7003
6497
  trees,
7004
6498
  tooltips,
@@ -8822,7 +8316,7 @@ async function getRemarkable(extensions) {
8822
8316
 
8823
8317
  const parseMarkdown = async (options) => {
8824
8318
  const markdownLibrary = await getRemarkable(options.extensions);
8825
- const css = (await import('./styles-avriBVzL.js')).markdownParserStyles ?? new ErrorImporting();
8319
+ const css = (await import('./styles-lzrkBfXz.js')).markdownParserStyles ?? new ErrorImporting();
8826
8320
  if (css instanceof ErrorImporting)
8827
8321
  throw new Error("Could not import css, cannot continue");
8828
8322
  const html = options.htmlTemplate ?? (await import('./html-B-K0BIiw.js')).markdownHtml ?? new ErrorImporting();
@@ -9334,4 +8828,4 @@ ${pageBreakTag}`;
9334
8828
  }
9335
8829
 
9336
8830
  export { ApiaThemeProvider as A, MarkdownTableOfContents as B, Form as F, MaterialInput as M, Table as T, 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, MarkdownBlock as t, useMainTheme as u, MarkdownBuilder as v, parseMarkdown as w, MarkdownList as x, MarkdownParagraph as y, MarkdownTable as z };
9337
- //# sourceMappingURL=index-DpVqNvc_.js.map
8831
+ //# sourceMappingURL=index-Xe8KO81h.js.map