@apia/theme 4.0.58 → 4.0.63
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.
- package/dist/{index-BJp5z7uE.js → index-B5IemJX6.js} +235 -32
- package/dist/index-B5IemJX6.js.map +1 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +2 -2
- package/dist/{styles-C4AklZvX.js → styles-SJODSvxM.js} +100 -9
- package/dist/styles-SJODSvxM.js.map +1 -0
- package/package.json +3 -3
- package/dist/index-BJp5z7uE.js.map +0 -1
- package/dist/styles-C4AklZvX.js.map +0 -1
|
@@ -2,7 +2,7 @@ import cloneDeep from 'lodash-es/cloneDeep';
|
|
|
2
2
|
import tinycolor from 'tinycolor2';
|
|
3
3
|
import merge from 'lodash-es/merge';
|
|
4
4
|
import { jsxs, jsx, Fragment } from 'theme-ui/jsx-runtime';
|
|
5
|
-
import { Box, ThemeUIProvider, useThemeUI, ThemeProvider } from 'theme-ui';
|
|
5
|
+
import { Box, Switch as Switch$2, 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';
|
|
@@ -1272,6 +1272,15 @@ const MaterialInput = ({ title, label, boxProperties, ...props }) => /* @__PURE_
|
|
|
1272
1272
|
}
|
|
1273
1273
|
);
|
|
1274
1274
|
|
|
1275
|
+
const Switch$1 = forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
1276
|
+
Box,
|
|
1277
|
+
{
|
|
1278
|
+
...getVariant("layout.common.components.switchBase"),
|
|
1279
|
+
className: "apia__switch",
|
|
1280
|
+
children: /* @__PURE__ */ jsx(Switch$2, { ...props, ref })
|
|
1281
|
+
}
|
|
1282
|
+
));
|
|
1283
|
+
|
|
1275
1284
|
const Form = (props) => /* @__PURE__ */ jsx(Box, { as: "form", ...props });
|
|
1276
1285
|
const Table = forwardRef(
|
|
1277
1286
|
(props, ref) => /* @__PURE__ */ jsx(Box, { as: "table", ref, ...props })
|
|
@@ -1945,8 +1954,41 @@ const menu = {
|
|
|
1945
1954
|
})
|
|
1946
1955
|
};
|
|
1947
1956
|
|
|
1957
|
+
const scrollbars = {
|
|
1958
|
+
"::-webkit-scrollbar, * ::-webkit-scrollbar": {
|
|
1959
|
+
width: "16px",
|
|
1960
|
+
borderRadius: 0
|
|
1961
|
+
},
|
|
1962
|
+
"::-webkit-scrollbar:horizontal, * ::-webkit-scrollbar:horizontal": {
|
|
1963
|
+
height: "8px"
|
|
1964
|
+
},
|
|
1965
|
+
"::-webkit-scrollbar-track, * ::-webkit-scrollbar-track": {
|
|
1966
|
+
backgroundColor: "var(--theme-ui-colors-scrollbars-bar-backgroundColor)",
|
|
1967
|
+
borderLeft: "8px solid white"
|
|
1968
|
+
},
|
|
1969
|
+
"::-webkit-scrollbar-track:hover, * ::-webkit-scrollbar-track:hover": {
|
|
1970
|
+
backgroundColor: "var(--theme-ui-colors-scrollbars-bar-hover-backgroundColor)"
|
|
1971
|
+
},
|
|
1972
|
+
"::-webkit-scrollbar-track:active, * ::-webkit-scrollbar-track:active": {
|
|
1973
|
+
backgroundColor: "var(--theme-ui-colors-scrollbars-bar-active-backgroundColor)"
|
|
1974
|
+
},
|
|
1975
|
+
"::-webkit-scrollbar-thumb, * ::-webkit-scrollbar-thumb": {
|
|
1976
|
+
backgroundColor: "var(--theme-ui-colors-scrollbars-bar-color)",
|
|
1977
|
+
borderLeft: "8px solid white"
|
|
1978
|
+
},
|
|
1979
|
+
"::-webkit-scrollbar-thumb:hover, * ::-webkit-scrollbar-thumb:hover": {
|
|
1980
|
+
backgroundColor: "var(--theme-ui-colors-scrollbars-bar-hover-color)"
|
|
1981
|
+
},
|
|
1982
|
+
"::-webkit-scrollbar-thumb:active, * ::-webkit-scrollbar-thumb:active": {
|
|
1983
|
+
backgroundColor: "var(--theme-ui-colors-scrollbars-bar-active-color)"
|
|
1984
|
+
},
|
|
1985
|
+
".noScrollbar::-webkit-scrollbar": { display: "none" },
|
|
1986
|
+
".noScrollbar": { msOverflowStyle: "none", scrollbarWidth: "none" }
|
|
1987
|
+
};
|
|
1988
|
+
|
|
1948
1989
|
const root = {
|
|
1949
1990
|
...menu,
|
|
1991
|
+
...scrollbars,
|
|
1950
1992
|
height: "100%",
|
|
1951
1993
|
"*": {
|
|
1952
1994
|
fontFamily: "body",
|
|
@@ -1964,23 +2006,6 @@ const root = {
|
|
|
1964
2006
|
borderLeftWidth: "4px",
|
|
1965
2007
|
borderLeftColor: "palette.error.main"
|
|
1966
2008
|
},
|
|
1967
|
-
//cambia el estilo del scroll
|
|
1968
|
-
"div::-webkit-scrollbar": {
|
|
1969
|
-
width: "8px",
|
|
1970
|
-
height: "8px!important"
|
|
1971
|
-
},
|
|
1972
|
-
"div::-webkit-scrollbar-track": {
|
|
1973
|
-
background: "#f1f1f1",
|
|
1974
|
-
borderRadius: "7px"
|
|
1975
|
-
},
|
|
1976
|
-
"div::-webkit-scrollbar-thumb": {
|
|
1977
|
-
background: "#888",
|
|
1978
|
-
borderRadius: "7px"
|
|
1979
|
-
},
|
|
1980
|
-
"::-webkit-scrollbar:hover, * ::-webkit-scrollbar:hover": {
|
|
1981
|
-
width: "12px",
|
|
1982
|
-
height: "12px!important"
|
|
1983
|
-
},
|
|
1984
2009
|
h1: {
|
|
1985
2010
|
fontSize: responsive$1({ 0: 26, 3: 32 })
|
|
1986
2011
|
},
|
|
@@ -4801,8 +4826,26 @@ const toolbar = {
|
|
|
4801
4826
|
|
|
4802
4827
|
const autocomplete = {
|
|
4803
4828
|
"&:focus-within": focusOutline,
|
|
4829
|
+
background: "palette.background.paper",
|
|
4804
4830
|
".autocomplete__inputWrapper": {
|
|
4805
|
-
position: "relative"
|
|
4831
|
+
position: "relative",
|
|
4832
|
+
display: "flex",
|
|
4833
|
+
flexDirection: "row",
|
|
4834
|
+
alignItems: "center",
|
|
4835
|
+
border: " 1px solid",
|
|
4836
|
+
borderColor: "palette.border.field",
|
|
4837
|
+
p: "2px",
|
|
4838
|
+
borderRadius: "default",
|
|
4839
|
+
input: {
|
|
4840
|
+
border: "none",
|
|
4841
|
+
outline: "none!important",
|
|
4842
|
+
height: "46px"
|
|
4843
|
+
}
|
|
4844
|
+
},
|
|
4845
|
+
".autocomplete__search": {
|
|
4846
|
+
overflow: "hidden",
|
|
4847
|
+
whiteSpace: "nowrap",
|
|
4848
|
+
textOverflow: "ellipsis"
|
|
4806
4849
|
},
|
|
4807
4850
|
".autocomplete__search.disabled": {
|
|
4808
4851
|
cursor: "not-allowed",
|
|
@@ -4818,10 +4861,11 @@ const autocomplete = {
|
|
|
4818
4861
|
display: "flex",
|
|
4819
4862
|
gap: 2,
|
|
4820
4863
|
height: "24px",
|
|
4821
|
-
position: "absolute",
|
|
4822
4864
|
right: "20px",
|
|
4823
4865
|
top: "calc(50% - 12px)",
|
|
4824
4866
|
pointerEvents: "none",
|
|
4867
|
+
pr: 4,
|
|
4868
|
+
maxWidth: "30px",
|
|
4825
4869
|
".autocomplete__loadingSpinner": {
|
|
4826
4870
|
width: "24px",
|
|
4827
4871
|
height: "24px"
|
|
@@ -5007,6 +5051,7 @@ const fileCard = {
|
|
|
5007
5051
|
borderColor: "palette.border.field",
|
|
5008
5052
|
borderRadius: "default",
|
|
5009
5053
|
boxShadow: `0px 1px 1px #c7c7c7`,
|
|
5054
|
+
background: "palette.background.paper",
|
|
5010
5055
|
p: 3,
|
|
5011
5056
|
".fileCard__container": {
|
|
5012
5057
|
display: "flex",
|
|
@@ -5732,11 +5777,6 @@ const dropzone = {
|
|
|
5732
5777
|
width: "100%",
|
|
5733
5778
|
background: "palette.background.paper",
|
|
5734
5779
|
position: "relative",
|
|
5735
|
-
backgroundImage: (t) => `repeating-linear-gradient(45deg,
|
|
5736
|
-
${get(t, "colors.dropzone.color")},
|
|
5737
|
-
${get(t, "colors.dropzone.color")} 3px,
|
|
5738
|
-
${get(t, "colors.dropzone.backgroundColor")} 3px,
|
|
5739
|
-
${get(t, "colors.dropzone.backgroundColor")} 12px)`,
|
|
5740
5780
|
":focus-within": {
|
|
5741
5781
|
outlineColor: "outlineColor",
|
|
5742
5782
|
outlineWidth: "3px",
|
|
@@ -5761,6 +5801,11 @@ const dropzone = {
|
|
|
5761
5801
|
width: "inherit",
|
|
5762
5802
|
borderTopLeftRadius: "7px",
|
|
5763
5803
|
borderBottomLeftRadius: "7px",
|
|
5804
|
+
backgroundImage: (t) => `repeating-linear-gradient(45deg,
|
|
5805
|
+
${get(t, "colors.dropzone.color")},
|
|
5806
|
+
${get(t, "colors.dropzone.color")} 3px,
|
|
5807
|
+
${get(t, "colors.dropzone.backgroundColor")} 3px,
|
|
5808
|
+
${get(t, "colors.dropzone.backgroundColor")} 12px)`,
|
|
5764
5809
|
":hover": {
|
|
5765
5810
|
cursor: "pointer",
|
|
5766
5811
|
animation: `${keyframes({
|
|
@@ -5949,6 +5994,79 @@ const switchCard = {
|
|
|
5949
5994
|
/* PREPEND HERE */
|
|
5950
5995
|
};
|
|
5951
5996
|
|
|
5997
|
+
const switchBase = {
|
|
5998
|
+
'input[type="checkbox"]': {
|
|
5999
|
+
position: "absolute",
|
|
6000
|
+
transform: "translateX(-9999px)"
|
|
6001
|
+
}
|
|
6002
|
+
};
|
|
6003
|
+
|
|
6004
|
+
const freeDayCard = {
|
|
6005
|
+
"&.fileCard": {
|
|
6006
|
+
display: "flex",
|
|
6007
|
+
alignItems: "center",
|
|
6008
|
+
position: "relative",
|
|
6009
|
+
border: "1px solid",
|
|
6010
|
+
borderColor: "palette.gray.800",
|
|
6011
|
+
height: "50px",
|
|
6012
|
+
// borderRadius: 'default',
|
|
6013
|
+
borderRadius: "7px",
|
|
6014
|
+
boxShadow: "0px 1px 1px #c7c7c7",
|
|
6015
|
+
background: "palette.background.paper",
|
|
6016
|
+
cursor: "pointer",
|
|
6017
|
+
".fileCard__content": {
|
|
6018
|
+
display: "flex",
|
|
6019
|
+
alignItems: "center",
|
|
6020
|
+
p: 3,
|
|
6021
|
+
gap: 3,
|
|
6022
|
+
width: "100%"
|
|
6023
|
+
},
|
|
6024
|
+
button: {
|
|
6025
|
+
boxShadow: "none"
|
|
6026
|
+
}
|
|
6027
|
+
},
|
|
6028
|
+
"&.selected": (theme) => {
|
|
6029
|
+
return {
|
|
6030
|
+
backgroundColor: theme.palette.getColor("transparent", "selected")
|
|
6031
|
+
};
|
|
6032
|
+
},
|
|
6033
|
+
"&.fileList__modal": {
|
|
6034
|
+
// pr: 7,
|
|
6035
|
+
},
|
|
6036
|
+
".file__icon": {
|
|
6037
|
+
flexShrink: 0
|
|
6038
|
+
},
|
|
6039
|
+
".fileCard__name": {
|
|
6040
|
+
whiteSpace: "nowrap",
|
|
6041
|
+
overflow: "hidden",
|
|
6042
|
+
textOverflow: "ellipsis"
|
|
6043
|
+
},
|
|
6044
|
+
".fileCard__additionalButtons": {
|
|
6045
|
+
flexShrink: 0,
|
|
6046
|
+
display: "flex",
|
|
6047
|
+
height: "100%",
|
|
6048
|
+
ml: 3
|
|
6049
|
+
},
|
|
6050
|
+
".fileCard__additionalButtons:hover": {
|
|
6051
|
+
color: "palette.text.primary"
|
|
6052
|
+
},
|
|
6053
|
+
".fileCard__delete, .fileCard__additionalButton": {
|
|
6054
|
+
width: "auto",
|
|
6055
|
+
height: "100%",
|
|
6056
|
+
borderTopLeftRadius: 0,
|
|
6057
|
+
borderBottomLeftRadius: 0,
|
|
6058
|
+
m: 0,
|
|
6059
|
+
flexShrink: 0,
|
|
6060
|
+
px: 3,
|
|
6061
|
+
color: "palette.text.primary",
|
|
6062
|
+
backgroundColor: "palette.background.paper",
|
|
6063
|
+
svg: {
|
|
6064
|
+
width: "20px",
|
|
6065
|
+
height: "20px"
|
|
6066
|
+
}
|
|
6067
|
+
}
|
|
6068
|
+
};
|
|
6069
|
+
|
|
5952
6070
|
const components = {
|
|
5953
6071
|
/* PREPEND HERE */
|
|
5954
6072
|
accordion,
|
|
@@ -5962,8 +6080,10 @@ const components = {
|
|
|
5962
6080
|
infoButton,
|
|
5963
6081
|
filters,
|
|
5964
6082
|
fileCard,
|
|
6083
|
+
freeDayCard,
|
|
5965
6084
|
uploader,
|
|
5966
|
-
switchCard
|
|
6085
|
+
switchCard,
|
|
6086
|
+
switchBase
|
|
5967
6087
|
};
|
|
5968
6088
|
|
|
5969
6089
|
const labelBox = {
|
|
@@ -7117,11 +7237,27 @@ const collector = {
|
|
|
7117
7237
|
minWidth: "min(400px, calc(100vw - 52px))",
|
|
7118
7238
|
overflow: "hidden",
|
|
7119
7239
|
pr: 2,
|
|
7240
|
+
"h1, h2, h3, h4, h5, h6, .separator": {
|
|
7241
|
+
py: 5
|
|
7242
|
+
},
|
|
7120
7243
|
".collector__fields": {
|
|
7121
7244
|
overflow: "auto",
|
|
7122
7245
|
gap: "8px",
|
|
7123
7246
|
display: "flex",
|
|
7124
|
-
flexDirection: "column"
|
|
7247
|
+
flexDirection: "column",
|
|
7248
|
+
"& > *:first-child": {
|
|
7249
|
+
"& h1, h2, h3, h4, h5, h6, .separator": {
|
|
7250
|
+
pt: 0
|
|
7251
|
+
}
|
|
7252
|
+
}
|
|
7253
|
+
},
|
|
7254
|
+
".autogrow_textarea": {
|
|
7255
|
+
maxHeight: "20vh",
|
|
7256
|
+
width: "100%",
|
|
7257
|
+
border: "1px solid",
|
|
7258
|
+
borderColor: "palette.border.field",
|
|
7259
|
+
borderRadius: "default",
|
|
7260
|
+
padding: responsive$1({ 0: 3, 3: 4 })
|
|
7125
7261
|
},
|
|
7126
7262
|
".collector__buttons": {
|
|
7127
7263
|
display: "flex",
|
|
@@ -7136,11 +7272,17 @@ const collector = {
|
|
|
7136
7272
|
alignItems: "start",
|
|
7137
7273
|
justifyContent: "start"
|
|
7138
7274
|
},
|
|
7275
|
+
".switch .fieldWrapper.checkbox": {
|
|
7276
|
+
alignItems: "center"
|
|
7277
|
+
},
|
|
7139
7278
|
".validationsForm": {
|
|
7140
7279
|
display: "flex",
|
|
7141
7280
|
flexDirection: "column",
|
|
7142
7281
|
gap: 4,
|
|
7143
7282
|
overflow: "hidden"
|
|
7283
|
+
},
|
|
7284
|
+
":disabled": {
|
|
7285
|
+
backgroundColor: "form.fields.disabled.backgroundColor"
|
|
7144
7286
|
}
|
|
7145
7287
|
},
|
|
7146
7288
|
modal: {
|
|
@@ -7284,8 +7426,69 @@ const form = {
|
|
|
7284
7426
|
}
|
|
7285
7427
|
};
|
|
7286
7428
|
|
|
7429
|
+
const switchMultiple = {
|
|
7430
|
+
height: "53px",
|
|
7431
|
+
display: "inline-flex",
|
|
7432
|
+
borderColor: "pallete.border.field",
|
|
7433
|
+
backgroundColor: "#e0e0e0",
|
|
7434
|
+
borderRadius: "default",
|
|
7435
|
+
boxShadow: "none",
|
|
7436
|
+
p: "4px",
|
|
7437
|
+
"&.touched": { borderColor: "pallete.border.field" },
|
|
7438
|
+
".switchButton": (theme) => {
|
|
7439
|
+
const colorState = getOneColorState(
|
|
7440
|
+
"palette.primary.main",
|
|
7441
|
+
"disabled",
|
|
7442
|
+
theme.palette
|
|
7443
|
+
);
|
|
7444
|
+
return {
|
|
7445
|
+
boxShadow: "none",
|
|
7446
|
+
flex: 1,
|
|
7447
|
+
minWidth: 0,
|
|
7448
|
+
borderRadius: "default",
|
|
7449
|
+
textTransform: "none",
|
|
7450
|
+
px: 2,
|
|
7451
|
+
py: 1,
|
|
7452
|
+
backgroundColor: colorState,
|
|
7453
|
+
color: "palette.text.disabled",
|
|
7454
|
+
"&:hover": {
|
|
7455
|
+
backgroundColor: colorState,
|
|
7456
|
+
color: "palette.text.disabled"
|
|
7457
|
+
},
|
|
7458
|
+
"&:hover:not(.active)": {
|
|
7459
|
+
backgroundColor: colorState,
|
|
7460
|
+
color: "palette.text.disabled"
|
|
7461
|
+
},
|
|
7462
|
+
"&.active": {
|
|
7463
|
+
backgroundColor: "palette.primary.main",
|
|
7464
|
+
color: "palette.primary.contrastText",
|
|
7465
|
+
"&:hover": {
|
|
7466
|
+
backgroundColor: "palette.primary.main",
|
|
7467
|
+
color: "palette.text.secondary"
|
|
7468
|
+
}
|
|
7469
|
+
},
|
|
7470
|
+
"&.first": {
|
|
7471
|
+
borderTopRightRadius: "0px",
|
|
7472
|
+
borderBottomRightRadius: "0px"
|
|
7473
|
+
},
|
|
7474
|
+
"&.last": { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px" },
|
|
7475
|
+
"&.middle": {
|
|
7476
|
+
borderTopLeftRadius: "0px",
|
|
7477
|
+
borderBottomLeftRadius: "0px",
|
|
7478
|
+
borderTopRightRadius: "0px",
|
|
7479
|
+
borderBottomRightRadius: "0px"
|
|
7480
|
+
}
|
|
7481
|
+
};
|
|
7482
|
+
}
|
|
7483
|
+
};
|
|
7484
|
+
|
|
7485
|
+
const fields = {
|
|
7486
|
+
switchMultiple
|
|
7487
|
+
};
|
|
7488
|
+
|
|
7287
7489
|
const validations = {
|
|
7288
|
-
form
|
|
7490
|
+
form,
|
|
7491
|
+
fields
|
|
7289
7492
|
};
|
|
7290
7493
|
|
|
7291
7494
|
const oneColumnAside = {
|
|
@@ -8921,7 +9124,7 @@ async function getRemarkable(extensions) {
|
|
|
8921
9124
|
|
|
8922
9125
|
const parseMarkdown = async (options) => {
|
|
8923
9126
|
const markdownLibrary = await getRemarkable(options.extensions);
|
|
8924
|
-
const css = (await import('./styles-
|
|
9127
|
+
const css = (await import('./styles-SJODSvxM.js')).markdownParserStyles ?? new ErrorImporting();
|
|
8925
9128
|
if (css instanceof ErrorImporting)
|
|
8926
9129
|
throw new Error("Could not import css, cannot continue");
|
|
8927
9130
|
const html = options.htmlTemplate ?? (await import('./html-B-K0BIiw.js')).markdownHtml ?? new ErrorImporting();
|
|
@@ -9236,7 +9439,7 @@ class MarkdownTableOfContents extends MarkdownParagraph {
|
|
|
9236
9439
|
const parser = new DOMParser();
|
|
9237
9440
|
const parsedDocument = parser.parseFromString(html, "text/html");
|
|
9238
9441
|
const headers = parsedDocument.querySelectorAll(
|
|
9239
|
-
new Array(props.maxLevel || 3).fill(1).map((_, i) => `h${i}`).join(", ")
|
|
9442
|
+
new Array((props.maxLevel || 3) - (props.minLevel || 1) + 1).fill(1).map((_, i) => `h${i + (props.minLevel || 1)}`).join(", ")
|
|
9240
9443
|
);
|
|
9241
9444
|
const root = document.createElement("ul");
|
|
9242
9445
|
root.id = "TableOfContents";
|
|
@@ -9432,5 +9635,5 @@ ${pageBreakTag}`;
|
|
|
9432
9635
|
}
|
|
9433
9636
|
}
|
|
9434
9637
|
|
|
9435
|
-
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 };
|
|
9436
|
-
//# sourceMappingURL=index-
|
|
9638
|
+
export { ApiaThemeProvider as A, MarkdownTableOfContents as B, Form as F, MaterialInput as M, Switch$1 as S, 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 };
|
|
9639
|
+
//# sourceMappingURL=index-B5IemJX6.js.map
|