@apia/theme 4.0.45 → 4.0.46

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.
@@ -6,7 +6,7 @@ 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';
9
- import { spacing as spacing$1, responsive as responsive$2, getOneColorState as getOneColorState$1, focusOutline as focusOutline$1, getColorsAndStatesByPath as getColorsAndStatesByPath$1 } from '@apia/theme';
9
+ import { spacing as spacing$1, responsive as responsive$2, getOneColorState as getOneColorState$1, focusOutline as focusOutline$1, getColorsAndStatesByPath as getColorsAndStatesByPath$1, get } from '@apia/theme';
10
10
  import { keyframes } from '@emotion/react';
11
11
 
12
12
  function defaultLighten(color, ratio) {
@@ -2762,12 +2762,14 @@ const apiaApi = {
2762
2762
  };
2763
2763
 
2764
2764
  const confirm = {
2765
- display: "flex",
2766
- flexDirection: "column",
2767
- gap: spacing$1(6),
2768
- height: "100%",
2769
- width: "100%",
2770
- overflow: "auto",
2765
+ "&.confirm[class]": {
2766
+ display: "flex",
2767
+ flexDirection: "column",
2768
+ gap: spacing$1(6),
2769
+ height: "100%",
2770
+ width: "100%",
2771
+ overflow: "auto"
2772
+ },
2771
2773
  ".confirm__content": {
2772
2774
  overflow: "auto",
2773
2775
  flexBasis: "100%",
@@ -5346,6 +5348,590 @@ const scheduler = {
5346
5348
  /* PREPEND HERE */
5347
5349
  };
5348
5350
 
5351
+ const permissions = {
5352
+ ".uploader__permissions_selection": {
5353
+ display: "flex",
5354
+ flexDirection: "row",
5355
+ alignItems: "end",
5356
+ gap: 4,
5357
+ div: {
5358
+ width: "100%"
5359
+ },
5360
+ select: {
5361
+ width: "100%"
5362
+ },
5363
+ button: {
5364
+ width: "70%"
5365
+ },
5366
+ span: {
5367
+ fontWeight: "normal"
5368
+ }
5369
+ },
5370
+ ".permissions__list": {
5371
+ display: "flex",
5372
+ flexDirection: "column",
5373
+ gap: 3,
5374
+ ul: {
5375
+ borderRadius: "default",
5376
+ border: "1px solid",
5377
+ borderColor: "palette.border.field",
5378
+ background: "palette.background.paper"
5379
+ }
5380
+ }
5381
+ };
5382
+
5383
+ const collapsiblePanel = {
5384
+ ".collapsiblePanel": {
5385
+ display: "flex",
5386
+ flexDirection: "column"
5387
+ },
5388
+ ".collapsiblePanel__label": {
5389
+ "& span": {
5390
+ fontWeight: 700
5391
+ },
5392
+ "& button > span": {
5393
+ fontWeight: "normal"
5394
+ }
5395
+ },
5396
+ ".collapsiblePanel__label__button": {
5397
+ display: "flex",
5398
+ alignItems: "center",
5399
+ width: "100%",
5400
+ justifyContent: "space-between",
5401
+ '&[aria-expanded="false"]': {
5402
+ borderBottom: "1px solid #e1e1e1"
5403
+ }
5404
+ },
5405
+ ".collapsiblePanel__content": {
5406
+ "&>div": {
5407
+ display: "flex",
5408
+ flexDirection: "column",
5409
+ gap: 3,
5410
+ border: "1px solid",
5411
+ borderColor: "palette.border.field",
5412
+ padding: 4,
5413
+ borderRadius: "default",
5414
+ background: "inherit",
5415
+ boxShadow: "neum"
5416
+ }
5417
+ }
5418
+ };
5419
+ const defaultView = {
5420
+ "&.uploader__container": {
5421
+ display: "flex",
5422
+ flexDirection: "column",
5423
+ gap: 4,
5424
+ overflow: "auto",
5425
+ 'button[data-variant="outline"]': {
5426
+ boxShadow: "sharp"
5427
+ }
5428
+ },
5429
+ ".uploader__content": {
5430
+ display: "flex",
5431
+ flexDirection: "column",
5432
+ gap: 4,
5433
+ overflow: "auto",
5434
+ p: 2,
5435
+ overflowX: "hidden"
5436
+ },
5437
+ "& label": {
5438
+ display: "flex",
5439
+ flexDirection: "column",
5440
+ gap: 2,
5441
+ span: {
5442
+ fontWeight: 700
5443
+ }
5444
+ },
5445
+ ".uploader__file_selection": {
5446
+ display: "flex",
5447
+ flexDirection: "row",
5448
+ gap: 3,
5449
+ alignItems: "center",
5450
+ alignContent: "center",
5451
+ width: "100%",
5452
+ ".autocomplete": {
5453
+ width: "100%"
5454
+ },
5455
+ ".uploader__file_infoBtn": {
5456
+ height: "48px",
5457
+ width: "48px",
5458
+ p: 0,
5459
+ display: "flex"
5460
+ }
5461
+ },
5462
+ ".uploader__dropzone_description_section": {
5463
+ display: "flex",
5464
+ flexDirection: "column",
5465
+ gap: 3,
5466
+ background: "inherit",
5467
+ padding: 4,
5468
+ borderRadius: "default",
5469
+ border: "1px solid",
5470
+ borderColor: "palette.border.field",
5471
+ boxShadow: "neum"
5472
+ },
5473
+ ".uploader__dropzone": {
5474
+ display: "grid",
5475
+ flexDirection: "column",
5476
+ gap: 3,
5477
+ width: " 100%",
5478
+ position: "relative",
5479
+ ".dropzone__container[class]": {
5480
+ height: "100%"
5481
+ },
5482
+ ".dropzone": {
5483
+ height: "50px"
5484
+ },
5485
+ ".uploader__dropzone_actions": {
5486
+ display: "flex",
5487
+ flexDirection: "row",
5488
+ gap: 3,
5489
+ button: {
5490
+ width: "50%"
5491
+ }
5492
+ }
5493
+ },
5494
+ ".uploader__directory": {
5495
+ ".collapsiblePanel__content": {
5496
+ "&>div": {
5497
+ position: "relative"
5498
+ },
5499
+ ".uploader__directory__clear-directory": {
5500
+ position: "sticky",
5501
+ top: 0,
5502
+ alignSelf: "end",
5503
+ width: "20px",
5504
+ height: "20px",
5505
+ p: 3
5506
+ }
5507
+ }
5508
+ },
5509
+ ...collapsiblePanel,
5510
+ ...permissions,
5511
+ ".mobxtree": {
5512
+ background: "white",
5513
+ border: "1px solid",
5514
+ borderColor: "palette.border.field",
5515
+ borderRadius: "default",
5516
+ padding: "5px"
5517
+ },
5518
+ ".metadata__container": {
5519
+ outline: "none!important",
5520
+ display: "flex",
5521
+ flexDirection: "column",
5522
+ gap: "12px",
5523
+ background: "palette.background.paper",
5524
+ padding: 3,
5525
+ borderRadius: "default",
5526
+ border: "1px solid",
5527
+ borderColor: "palette.border.field",
5528
+ ".metadata__table_container": {
5529
+ width: "100%",
5530
+ maxHeight: "310px",
5531
+ overflowY: "auto",
5532
+ display: "block",
5533
+ boxSizing: "border-box",
5534
+ position: "relative",
5535
+ table: {
5536
+ width: "100%",
5537
+ borderCollapse: "collapse",
5538
+ tableLayout: "fixed",
5539
+ boxSizing: "border-box",
5540
+ td: { borderLeft: 0, borderRight: 0 },
5541
+ "tr:last-child td:first-child": {
5542
+ borderBottomLeftRadius: "default"
5543
+ },
5544
+ "tr:last-child td:last-child": {
5545
+ borderBottomRightRadius: "default"
5546
+ }
5547
+ },
5548
+ th: {
5549
+ position: "sticky",
5550
+ top: 0,
5551
+ backgroundColor: "palette.background.paper",
5552
+ zIndex: 2,
5553
+ border: "none",
5554
+ borderBottom: "1px solid #ccc",
5555
+ padding: "8px",
5556
+ textAlign: "left"
5557
+ },
5558
+ tbody: {
5559
+ ".selected": {
5560
+ background: "palette.gray.900"
5561
+ },
5562
+ td: {
5563
+ padding: 3,
5564
+ borderBottom: "1px solid #ececec",
5565
+ verticalAlign: "top"
5566
+ },
5567
+ ".iconButton": {
5568
+ border: "none"
5569
+ }
5570
+ },
5571
+ ".metadata__render_container": {
5572
+ display: "flex",
5573
+ flexDirection: "column",
5574
+ alignItems: "start",
5575
+ position: "relative",
5576
+ minHeight: "50px",
5577
+ ".requiredMark": {
5578
+ color: "danger",
5579
+ position: "absolute",
5580
+ left: "-9px"
5581
+ },
5582
+ ".errorRequired": {
5583
+ color: "danger"
5584
+ }
5585
+ }
5586
+ },
5587
+ ".metadata__actions": {
5588
+ display: "flex",
5589
+ flexDirection: "row",
5590
+ gap: 3
5591
+ },
5592
+ ".addMetadata, .deleteMetadata": {
5593
+ height: "30px",
5594
+ width: "30px",
5595
+ p: "0px"
5596
+ }
5597
+ }
5598
+ };
5599
+
5600
+ const infoModal = {
5601
+ minWidth: "550px",
5602
+ display: "flex",
5603
+ flexDirection: "column",
5604
+ gap: 3,
5605
+ ...collapsiblePanel,
5606
+ button: {
5607
+ cursor: "pointer"
5608
+ },
5609
+ table: {
5610
+ width: "100%",
5611
+ span: {
5612
+ fontWeight: "bold"
5613
+ },
5614
+ button: {
5615
+ boxShadow: "none",
5616
+ color: "palette.text.primary",
5617
+ background: "inherit"
5618
+ },
5619
+ "tr > td:first-of-type": {
5620
+ width: "50%"
5621
+ },
5622
+ ".table__buttons": {
5623
+ display: "flex",
5624
+ gap: 3
5625
+ }
5626
+ },
5627
+ ".allPermissions": {
5628
+ background: "palette.background.paper",
5629
+ display: "flex",
5630
+ flexDirection: "row",
5631
+ gap: 3,
5632
+ alignItems: "center",
5633
+ borderRadius: "default",
5634
+ border: "1px solid",
5635
+ borderColor: "palette.gray.800",
5636
+ p: 4,
5637
+ width: "100%",
5638
+ div: { width: "100%" },
5639
+ select: { width: "100%" }
5640
+ },
5641
+ ".permissions__list": {
5642
+ display: "flex",
5643
+ flexDirection: "column",
5644
+ gap: 3,
5645
+ ul: {
5646
+ borderRadius: "default",
5647
+ border: "1px solid",
5648
+ borderColor: "palette.gray.800",
5649
+ background: "palette.background.paper"
5650
+ }
5651
+ },
5652
+ ".doc_info_table_container": {
5653
+ display: "flex",
5654
+ flexDirection: "column",
5655
+ gap: "12px",
5656
+ background: "palette.background.paper",
5657
+ padding: 3,
5658
+ borderRadius: "default",
5659
+ border: "1px solid",
5660
+ borderColor: "palette.gray.800"
5661
+ },
5662
+ ".doc_info_table": {
5663
+ width: "100%",
5664
+ maxHeight: "310px",
5665
+ overflowY: "auto",
5666
+ boxSizing: "border-box",
5667
+ position: "relative",
5668
+ th: {
5669
+ position: "sticky",
5670
+ top: 0,
5671
+ backgroundColor: "palette.background.paper",
5672
+ zIndex: 2,
5673
+ border: "none",
5674
+ borderBottom: "1px solid #ccc",
5675
+ padding: "8px",
5676
+ textAlign: "left",
5677
+ width: "50%"
5678
+ },
5679
+ tbody: {
5680
+ ".selected": {
5681
+ background: "palette.gray.900"
5682
+ },
5683
+ td: {
5684
+ padding: 3,
5685
+ borderBottom: "1px solid #ececec",
5686
+ verticalAlign: "top"
5687
+ },
5688
+ ".iconButton": {
5689
+ border: "none"
5690
+ }
5691
+ },
5692
+ button: {
5693
+ justifyContent: "start",
5694
+ width: "100%"
5695
+ }
5696
+ },
5697
+ ".versions_table": {
5698
+ "thead tr th:first-of-type, tbody tr td:first-of-type": {
5699
+ width: "100px",
5700
+ textAlign: "center"
5701
+ }
5702
+ }
5703
+ };
5704
+
5705
+ const dropzone = {
5706
+ display: "flex",
5707
+ flexDirection: "row",
5708
+ p: 4,
5709
+ borderRadius: "default",
5710
+ padding: "0px!important",
5711
+ border: "1px solid",
5712
+ borderColor: "palette.border.field",
5713
+ height: "51px",
5714
+ alignItems: "center",
5715
+ width: "100%",
5716
+ background: "palette.background.paper",
5717
+ position: "relative",
5718
+ backgroundImage: (t) => `repeating-linear-gradient(45deg,
5719
+ ${get(t, "colors.dropzone.color")},
5720
+ ${get(t, "colors.dropzone.color")} 3px,
5721
+ ${get(t, "colors.dropzone.backgroundColor")} 3px,
5722
+ ${get(t, "colors.dropzone.backgroundColor")} 12px)`,
5723
+ ":focus-within": {
5724
+ outlineColor: "outlineColor",
5725
+ outlineWidth: "3px",
5726
+ outlineOffset: "-3px",
5727
+ outlineStyle: "solid",
5728
+ borderColor: "transparent"
5729
+ },
5730
+ ".dropzone": {
5731
+ backgroundSize: "200% 200%",
5732
+ display: "flex",
5733
+ flex: "1",
5734
+ flexDirection: "column",
5735
+ alignItems: "center",
5736
+ justifyContent: "center",
5737
+ fontWeight: "normal",
5738
+ border: "none",
5739
+ wordBreak: "break-word",
5740
+ overflow: "hidden",
5741
+ margin: "3px",
5742
+ height: "calc( 100% - 6px)",
5743
+ padding: 0,
5744
+ width: "inherit",
5745
+ borderTopLeftRadius: "7px",
5746
+ borderBottomLeftRadius: "7px",
5747
+ ":hover": {
5748
+ cursor: "pointer",
5749
+ animation: `${keyframes({
5750
+ "100%": { backgroundPosition: "100% 100%" }
5751
+ })} 20s linear infinite`,
5752
+ "&:disabled": { animation: "none" }
5753
+ },
5754
+ ":focus": {
5755
+ outline: "none"
5756
+ },
5757
+ ".progressBar": {
5758
+ position: "absolute",
5759
+ top: 0,
5760
+ left: 0,
5761
+ right: 0,
5762
+ borderRadius: "7px",
5763
+ backgroundColor: "#8080807a",
5764
+ transition: "width 0.5s ease-in-out"
5765
+ }
5766
+ },
5767
+ ".info": {
5768
+ height: "100%",
5769
+ border: "none",
5770
+ borderTopLeftRadius: "0px",
5771
+ borderBottomLeftRadius: "0px",
5772
+ boxShadow: "none",
5773
+ width: "49px",
5774
+ ...getColorsAndStatesByPath$1("buttons.outline"),
5775
+ background: "transparent",
5776
+ svg: {
5777
+ color: "#9f9f9f"
5778
+ },
5779
+ "&:focus": {
5780
+ outline: "none"
5781
+ }
5782
+ }
5783
+ /* PREPEND HERE */
5784
+ };
5785
+
5786
+ const verifySignModal = {
5787
+ minWidth: "550px",
5788
+ display: "flex",
5789
+ flexDirection: "column",
5790
+ gap: 3,
5791
+ "&.verifysign__container": {
5792
+ outline: "none!important",
5793
+ display: "flex",
5794
+ flexDirection: "column",
5795
+ gap: "12px",
5796
+ background: "palette.background.paper",
5797
+ padding: 3,
5798
+ borderRadius: "default",
5799
+ border: "1px solid",
5800
+ borderColor: "palette.gray.800",
5801
+ ".verifysign__table_container": {
5802
+ width: "100%",
5803
+ maxHeight: "310px",
5804
+ overflowY: "auto",
5805
+ display: "block",
5806
+ boxSizing: "border-box",
5807
+ position: "relative",
5808
+ table: {
5809
+ borderCollapse: "collapse",
5810
+ tableLayout: "fixed",
5811
+ boxSizing: "border-box",
5812
+ td: { borderLeft: 0, borderRight: 0 },
5813
+ "tr:last-child td:first-child": {
5814
+ borderBottomLeftRadius: "default"
5815
+ },
5816
+ "tr:last-child td:last-child": {
5817
+ borderBottomRightRadius: "default"
5818
+ }
5819
+ },
5820
+ th: {
5821
+ position: "sticky",
5822
+ top: 0,
5823
+ backgroundColor: "palette.background.paper",
5824
+ zIndex: 2,
5825
+ border: "none",
5826
+ borderBottom: "1px solid #ccc",
5827
+ padding: "8px",
5828
+ textAlign: "left"
5829
+ },
5830
+ "th:first-of-type": {
5831
+ width: "200px"
5832
+ },
5833
+ tbody: {
5834
+ ".selected": {
5835
+ background: "palette.gray.900"
5836
+ },
5837
+ "tr > td:first-of-type": {
5838
+ width: "20%"
5839
+ },
5840
+ td: {
5841
+ padding: 3,
5842
+ borderBottom: "1px solid #ececec",
5843
+ verticalAlign: "top"
5844
+ },
5845
+ ".iconButton": {
5846
+ border: "none"
5847
+ }
5848
+ }
5849
+ }
5850
+ }
5851
+ };
5852
+
5853
+ const filesList = {
5854
+ display: "flex",
5855
+ flexDirection: "row",
5856
+ gap: "10px",
5857
+ alignItems: "center",
5858
+ flexWrap: "wrap",
5859
+ "&.uploadedFiles": {
5860
+ display: "grid",
5861
+ gridTemplateColumns: "repeat(3, 1fr)",
5862
+ gap: 3
5863
+ },
5864
+ ".file__icon": {
5865
+ flexShrink: 0
5866
+ }
5867
+ /* PREPEND HERE */
5868
+ };
5869
+
5870
+ const uploader = {
5871
+ defaultView,
5872
+ dropzone,
5873
+ infoModal,
5874
+ filesList,
5875
+ permissions,
5876
+ verifySignModal,
5877
+ tooltip: {
5878
+ display: "flex",
5879
+ flexDirection: "column",
5880
+ gap: 3,
5881
+ ".head": {
5882
+ textDecoration: "underline"
5883
+ },
5884
+ ".fileBtn": {
5885
+ "&.disabled": {
5886
+ cursor: "not-allowed",
5887
+ backgroundColor: "form.fields.disabled.backgroundColor"
5888
+ },
5889
+ "&.readonly, &:redonly": {
5890
+ // backgroundColor: 'form.fields.readonly.backgroundColor',
5891
+ backgroundColor: "red!important"
5892
+ }
5893
+ }
5894
+ }
5895
+ /* PREPEND HERE */
5896
+ };
5897
+
5898
+ const switchCard = {
5899
+ "&.switch__card": {
5900
+ display: "flex",
5901
+ flexDirection: "row",
5902
+ justifyContent: "space-between",
5903
+ width: "100%",
5904
+ borderBottom: "1px solid",
5905
+ borderColor: "palette.border.field",
5906
+ p: 4,
5907
+ ".label__container": {
5908
+ display: "flex",
5909
+ flexDirection: "row",
5910
+ gap: 3,
5911
+ alignItems: "center",
5912
+ whiteSpace: "nowrap",
5913
+ overflow: "hidden",
5914
+ textOverflow: "ellipsis",
5915
+ span: {
5916
+ flexShrink: 0
5917
+ }
5918
+ },
5919
+ ".switch__container": {
5920
+ display: "flex",
5921
+ flexDirection: "row",
5922
+ gap: 3,
5923
+ alignItems: "center",
5924
+ "& label": {
5925
+ height: "21px"
5926
+ },
5927
+ input: {
5928
+ display: "none"
5929
+ }
5930
+ }
5931
+ }
5932
+ /* PREPEND HERE */
5933
+ };
5934
+
5349
5935
  const components = {
5350
5936
  /* PREPEND HERE */
5351
5937
  accordion,
@@ -5358,7 +5944,9 @@ const components = {
5358
5944
  aiMessage,
5359
5945
  infoButton,
5360
5946
  filters,
5361
- fileCard
5947
+ fileCard,
5948
+ uploader,
5949
+ switchCard
5362
5950
  };
5363
5951
 
5364
5952
  const labelBox = {
@@ -8316,7 +8904,7 @@ async function getRemarkable(extensions) {
8316
8904
 
8317
8905
  const parseMarkdown = async (options) => {
8318
8906
  const markdownLibrary = await getRemarkable(options.extensions);
8319
- const css = (await import('./styles-lzrkBfXz.js')).markdownParserStyles ?? new ErrorImporting();
8907
+ const css = (await import('./styles-JuqAJl1O.js')).markdownParserStyles ?? new ErrorImporting();
8320
8908
  if (css instanceof ErrorImporting)
8321
8909
  throw new Error("Could not import css, cannot continue");
8322
8910
  const html = options.htmlTemplate ?? (await import('./html-B-K0BIiw.js')).markdownHtml ?? new ErrorImporting();
@@ -8828,4 +9416,4 @@ ${pageBreakTag}`;
8828
9416
  }
8829
9417
 
8830
9418
  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 };
8831
- //# sourceMappingURL=index-Xe8KO81h.js.map
9419
+ //# sourceMappingURL=index-BOvGFjjE.js.map