@apia/theme 4.0.58 → 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/dist/{index-BJp5z7uE.js → index-DXtlqaS1.js} +98 -14
- package/dist/index-DXtlqaS1.js.map +1 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +2 -2
- package/dist/{styles-C4AklZvX.js → styles-Kd1kkp6i.js} +53 -8
- package/dist/styles-Kd1kkp6i.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",
|
|
@@ -4801,8 +4843,20 @@ const toolbar = {
|
|
|
4801
4843
|
|
|
4802
4844
|
const autocomplete = {
|
|
4803
4845
|
"&:focus-within": focusOutline,
|
|
4846
|
+
background: "palette.background.paper",
|
|
4804
4847
|
".autocomplete__inputWrapper": {
|
|
4805
|
-
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
|
+
}
|
|
4806
4860
|
},
|
|
4807
4861
|
".autocomplete__search.disabled": {
|
|
4808
4862
|
cursor: "not-allowed",
|
|
@@ -4818,10 +4872,10 @@ const autocomplete = {
|
|
|
4818
4872
|
display: "flex",
|
|
4819
4873
|
gap: 2,
|
|
4820
4874
|
height: "24px",
|
|
4821
|
-
position: "absolute",
|
|
4822
4875
|
right: "20px",
|
|
4823
4876
|
top: "calc(50% - 12px)",
|
|
4824
4877
|
pointerEvents: "none",
|
|
4878
|
+
pr: 4,
|
|
4825
4879
|
".autocomplete__loadingSpinner": {
|
|
4826
4880
|
width: "24px",
|
|
4827
4881
|
height: "24px"
|
|
@@ -5732,11 +5786,6 @@ const dropzone = {
|
|
|
5732
5786
|
width: "100%",
|
|
5733
5787
|
background: "palette.background.paper",
|
|
5734
5788
|
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
5789
|
":focus-within": {
|
|
5741
5790
|
outlineColor: "outlineColor",
|
|
5742
5791
|
outlineWidth: "3px",
|
|
@@ -5761,6 +5810,11 @@ const dropzone = {
|
|
|
5761
5810
|
width: "inherit",
|
|
5762
5811
|
borderTopLeftRadius: "7px",
|
|
5763
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)`,
|
|
5764
5818
|
":hover": {
|
|
5765
5819
|
cursor: "pointer",
|
|
5766
5820
|
animation: `${keyframes({
|
|
@@ -5949,6 +6003,13 @@ const switchCard = {
|
|
|
5949
6003
|
/* PREPEND HERE */
|
|
5950
6004
|
};
|
|
5951
6005
|
|
|
6006
|
+
const switchBase = {
|
|
6007
|
+
'input[type="checkbox"]': {
|
|
6008
|
+
position: "absolute",
|
|
6009
|
+
transform: "translateX(-9999px)"
|
|
6010
|
+
}
|
|
6011
|
+
};
|
|
6012
|
+
|
|
5952
6013
|
const components = {
|
|
5953
6014
|
/* PREPEND HERE */
|
|
5954
6015
|
accordion,
|
|
@@ -5963,7 +6024,8 @@ const components = {
|
|
|
5963
6024
|
filters,
|
|
5964
6025
|
fileCard,
|
|
5965
6026
|
uploader,
|
|
5966
|
-
switchCard
|
|
6027
|
+
switchCard,
|
|
6028
|
+
switchBase
|
|
5967
6029
|
};
|
|
5968
6030
|
|
|
5969
6031
|
const labelBox = {
|
|
@@ -7117,11 +7179,27 @@ const collector = {
|
|
|
7117
7179
|
minWidth: "min(400px, calc(100vw - 52px))",
|
|
7118
7180
|
overflow: "hidden",
|
|
7119
7181
|
pr: 2,
|
|
7182
|
+
"h1, h2, h3, h4, h5, h6, .separator": {
|
|
7183
|
+
py: 5
|
|
7184
|
+
},
|
|
7120
7185
|
".collector__fields": {
|
|
7121
7186
|
overflow: "auto",
|
|
7122
7187
|
gap: "8px",
|
|
7123
7188
|
display: "flex",
|
|
7124
|
-
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 })
|
|
7125
7203
|
},
|
|
7126
7204
|
".collector__buttons": {
|
|
7127
7205
|
display: "flex",
|
|
@@ -7136,11 +7214,17 @@ const collector = {
|
|
|
7136
7214
|
alignItems: "start",
|
|
7137
7215
|
justifyContent: "start"
|
|
7138
7216
|
},
|
|
7217
|
+
".switch .fieldWrapper.checkbox": {
|
|
7218
|
+
alignItems: "center"
|
|
7219
|
+
},
|
|
7139
7220
|
".validationsForm": {
|
|
7140
7221
|
display: "flex",
|
|
7141
7222
|
flexDirection: "column",
|
|
7142
7223
|
gap: 4,
|
|
7143
7224
|
overflow: "hidden"
|
|
7225
|
+
},
|
|
7226
|
+
":disabled": {
|
|
7227
|
+
backgroundColor: "form.fields.disabled.backgroundColor"
|
|
7144
7228
|
}
|
|
7145
7229
|
},
|
|
7146
7230
|
modal: {
|
|
@@ -8921,7 +9005,7 @@ async function getRemarkable(extensions) {
|
|
|
8921
9005
|
|
|
8922
9006
|
const parseMarkdown = async (options) => {
|
|
8923
9007
|
const markdownLibrary = await getRemarkable(options.extensions);
|
|
8924
|
-
const css = (await import('./styles-
|
|
9008
|
+
const css = (await import('./styles-Kd1kkp6i.js')).markdownParserStyles ?? new ErrorImporting();
|
|
8925
9009
|
if (css instanceof ErrorImporting)
|
|
8926
9010
|
throw new Error("Could not import css, cannot continue");
|
|
8927
9011
|
const html = options.htmlTemplate ?? (await import('./html-B-K0BIiw.js')).markdownHtml ?? new ErrorImporting();
|
|
@@ -9236,7 +9320,7 @@ class MarkdownTableOfContents extends MarkdownParagraph {
|
|
|
9236
9320
|
const parser = new DOMParser();
|
|
9237
9321
|
const parsedDocument = parser.parseFromString(html, "text/html");
|
|
9238
9322
|
const headers = parsedDocument.querySelectorAll(
|
|
9239
|
-
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(", ")
|
|
9240
9324
|
);
|
|
9241
9325
|
const root = document.createElement("ul");
|
|
9242
9326
|
root.id = "TableOfContents";
|
|
@@ -9432,5 +9516,5 @@ ${pageBreakTag}`;
|
|
|
9432
9516
|
}
|
|
9433
9517
|
}
|
|
9434
9518
|
|
|
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-
|
|
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
|