@apia/theme 4.0.50 → 4.0.60
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/LICENSE.md +6 -0
- package/dist/{index-Cqjlpeez.js → index-DXtlqaS1.js} +104 -15
- package/dist/index-DXtlqaS1.js.map +1 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +2 -2
- package/dist/{styles-CioSWz4-.js → styles-Kd1kkp6i.js} +53 -8
- package/dist/styles-Kd1kkp6i.js.map +1 -0
- package/package.json +4 -3
- package/dist/index-Cqjlpeez.js.map +0 -1
- package/dist/styles-CioSWz4-.js.map +0 -1
package/LICENSE.md
ADDED
|
@@ -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",
|
|
@@ -1959,6 +2001,11 @@ const root = {
|
|
|
1959
2001
|
body: {
|
|
1960
2002
|
// minHeight: '100vh',
|
|
1961
2003
|
},
|
|
2004
|
+
".requiredFilter__Border": {
|
|
2005
|
+
borderLeftStyle: "solid",
|
|
2006
|
+
borderLeftWidth: "4px",
|
|
2007
|
+
borderLeftColor: "palette.error.main"
|
|
2008
|
+
},
|
|
1962
2009
|
//cambia el estilo del scroll
|
|
1963
2010
|
"div::-webkit-scrollbar": {
|
|
1964
2011
|
width: "8px",
|
|
@@ -4796,8 +4843,20 @@ const toolbar = {
|
|
|
4796
4843
|
|
|
4797
4844
|
const autocomplete = {
|
|
4798
4845
|
"&:focus-within": focusOutline,
|
|
4846
|
+
background: "palette.background.paper",
|
|
4799
4847
|
".autocomplete__inputWrapper": {
|
|
4800
|
-
position: "relative"
|
|
4848
|
+
position: "relative",
|
|
4849
|
+
display: "flex",
|
|
4850
|
+
flexDirection: "row",
|
|
4851
|
+
alignItems: "center",
|
|
4852
|
+
border: " 1px solid",
|
|
4853
|
+
borderColor: "palette.border.field",
|
|
4854
|
+
p: "2px",
|
|
4855
|
+
input: {
|
|
4856
|
+
border: "none",
|
|
4857
|
+
outline: "none!important",
|
|
4858
|
+
height: "46px"
|
|
4859
|
+
}
|
|
4801
4860
|
},
|
|
4802
4861
|
".autocomplete__search.disabled": {
|
|
4803
4862
|
cursor: "not-allowed",
|
|
@@ -4813,10 +4872,10 @@ const autocomplete = {
|
|
|
4813
4872
|
display: "flex",
|
|
4814
4873
|
gap: 2,
|
|
4815
4874
|
height: "24px",
|
|
4816
|
-
position: "absolute",
|
|
4817
4875
|
right: "20px",
|
|
4818
4876
|
top: "calc(50% - 12px)",
|
|
4819
4877
|
pointerEvents: "none",
|
|
4878
|
+
pr: 4,
|
|
4820
4879
|
".autocomplete__loadingSpinner": {
|
|
4821
4880
|
width: "24px",
|
|
4822
4881
|
height: "24px"
|
|
@@ -5727,11 +5786,6 @@ const dropzone = {
|
|
|
5727
5786
|
width: "100%",
|
|
5728
5787
|
background: "palette.background.paper",
|
|
5729
5788
|
position: "relative",
|
|
5730
|
-
backgroundImage: (t) => `repeating-linear-gradient(45deg,
|
|
5731
|
-
${get(t, "colors.dropzone.color")},
|
|
5732
|
-
${get(t, "colors.dropzone.color")} 3px,
|
|
5733
|
-
${get(t, "colors.dropzone.backgroundColor")} 3px,
|
|
5734
|
-
${get(t, "colors.dropzone.backgroundColor")} 12px)`,
|
|
5735
5789
|
":focus-within": {
|
|
5736
5790
|
outlineColor: "outlineColor",
|
|
5737
5791
|
outlineWidth: "3px",
|
|
@@ -5756,6 +5810,11 @@ const dropzone = {
|
|
|
5756
5810
|
width: "inherit",
|
|
5757
5811
|
borderTopLeftRadius: "7px",
|
|
5758
5812
|
borderBottomLeftRadius: "7px",
|
|
5813
|
+
backgroundImage: (t) => `repeating-linear-gradient(45deg,
|
|
5814
|
+
${get(t, "colors.dropzone.color")},
|
|
5815
|
+
${get(t, "colors.dropzone.color")} 3px,
|
|
5816
|
+
${get(t, "colors.dropzone.backgroundColor")} 3px,
|
|
5817
|
+
${get(t, "colors.dropzone.backgroundColor")} 12px)`,
|
|
5759
5818
|
":hover": {
|
|
5760
5819
|
cursor: "pointer",
|
|
5761
5820
|
animation: `${keyframes({
|
|
@@ -5944,6 +6003,13 @@ const switchCard = {
|
|
|
5944
6003
|
/* PREPEND HERE */
|
|
5945
6004
|
};
|
|
5946
6005
|
|
|
6006
|
+
const switchBase = {
|
|
6007
|
+
'input[type="checkbox"]': {
|
|
6008
|
+
position: "absolute",
|
|
6009
|
+
transform: "translateX(-9999px)"
|
|
6010
|
+
}
|
|
6011
|
+
};
|
|
6012
|
+
|
|
5947
6013
|
const components = {
|
|
5948
6014
|
/* PREPEND HERE */
|
|
5949
6015
|
accordion,
|
|
@@ -5958,7 +6024,8 @@ const components = {
|
|
|
5958
6024
|
filters,
|
|
5959
6025
|
fileCard,
|
|
5960
6026
|
uploader,
|
|
5961
|
-
switchCard
|
|
6027
|
+
switchCard,
|
|
6028
|
+
switchBase
|
|
5962
6029
|
};
|
|
5963
6030
|
|
|
5964
6031
|
const labelBox = {
|
|
@@ -7112,11 +7179,27 @@ const collector = {
|
|
|
7112
7179
|
minWidth: "min(400px, calc(100vw - 52px))",
|
|
7113
7180
|
overflow: "hidden",
|
|
7114
7181
|
pr: 2,
|
|
7182
|
+
"h1, h2, h3, h4, h5, h6, .separator": {
|
|
7183
|
+
py: 5
|
|
7184
|
+
},
|
|
7115
7185
|
".collector__fields": {
|
|
7116
7186
|
overflow: "auto",
|
|
7117
7187
|
gap: "8px",
|
|
7118
7188
|
display: "flex",
|
|
7119
|
-
flexDirection: "column"
|
|
7189
|
+
flexDirection: "column",
|
|
7190
|
+
"& > *:first-child": {
|
|
7191
|
+
"& h1, h2, h3, h4, h5, h6, .separator": {
|
|
7192
|
+
pt: 0
|
|
7193
|
+
}
|
|
7194
|
+
}
|
|
7195
|
+
},
|
|
7196
|
+
".autogrow_textarea": {
|
|
7197
|
+
maxHeight: "20vh",
|
|
7198
|
+
width: "100%",
|
|
7199
|
+
border: "1px solid",
|
|
7200
|
+
borderColor: "palette.border.field",
|
|
7201
|
+
borderRadius: "default",
|
|
7202
|
+
padding: responsive$1({ 0: 3, 3: 4 })
|
|
7120
7203
|
},
|
|
7121
7204
|
".collector__buttons": {
|
|
7122
7205
|
display: "flex",
|
|
@@ -7131,11 +7214,17 @@ const collector = {
|
|
|
7131
7214
|
alignItems: "start",
|
|
7132
7215
|
justifyContent: "start"
|
|
7133
7216
|
},
|
|
7217
|
+
".switch .fieldWrapper.checkbox": {
|
|
7218
|
+
alignItems: "center"
|
|
7219
|
+
},
|
|
7134
7220
|
".validationsForm": {
|
|
7135
7221
|
display: "flex",
|
|
7136
7222
|
flexDirection: "column",
|
|
7137
7223
|
gap: 4,
|
|
7138
7224
|
overflow: "hidden"
|
|
7225
|
+
},
|
|
7226
|
+
":disabled": {
|
|
7227
|
+
backgroundColor: "form.fields.disabled.backgroundColor"
|
|
7139
7228
|
}
|
|
7140
7229
|
},
|
|
7141
7230
|
modal: {
|
|
@@ -7267,7 +7356,7 @@ const form = {
|
|
|
7267
7356
|
".touched": {
|
|
7268
7357
|
borderStyle: "solid",
|
|
7269
7358
|
borderWidth: "1px",
|
|
7270
|
-
borderColor: "
|
|
7359
|
+
borderColor: "touchedBorderColor",
|
|
7271
7360
|
"&.radio-label": {
|
|
7272
7361
|
border: "none",
|
|
7273
7362
|
"input[role]:checked~svg": {
|
|
@@ -8916,7 +9005,7 @@ async function getRemarkable(extensions) {
|
|
|
8916
9005
|
|
|
8917
9006
|
const parseMarkdown = async (options) => {
|
|
8918
9007
|
const markdownLibrary = await getRemarkable(options.extensions);
|
|
8919
|
-
const css = (await import('./styles-
|
|
9008
|
+
const css = (await import('./styles-Kd1kkp6i.js')).markdownParserStyles ?? new ErrorImporting();
|
|
8920
9009
|
if (css instanceof ErrorImporting)
|
|
8921
9010
|
throw new Error("Could not import css, cannot continue");
|
|
8922
9011
|
const html = options.htmlTemplate ?? (await import('./html-B-K0BIiw.js')).markdownHtml ?? new ErrorImporting();
|
|
@@ -9231,7 +9320,7 @@ class MarkdownTableOfContents extends MarkdownParagraph {
|
|
|
9231
9320
|
const parser = new DOMParser();
|
|
9232
9321
|
const parsedDocument = parser.parseFromString(html, "text/html");
|
|
9233
9322
|
const headers = parsedDocument.querySelectorAll(
|
|
9234
|
-
new Array(props.maxLevel || 3).fill(1).map((_, i) => `h${i}`).join(", ")
|
|
9323
|
+
new Array((props.maxLevel || 3) - (props.minLevel || 1) + 1).fill(1).map((_, i) => `h${i + (props.minLevel || 1)}`).join(", ")
|
|
9235
9324
|
);
|
|
9236
9325
|
const root = document.createElement("ul");
|
|
9237
9326
|
root.id = "TableOfContents";
|
|
@@ -9427,5 +9516,5 @@ ${pageBreakTag}`;
|
|
|
9427
9516
|
}
|
|
9428
9517
|
}
|
|
9429
9518
|
|
|
9430
|
-
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 };
|
|
9431
|
-
//# sourceMappingURL=index-
|
|
9519
|
+
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 };
|
|
9520
|
+
//# sourceMappingURL=index-DXtlqaS1.js.map
|