@hitachivantara/uikit-react-core 3.67.6 → 3.67.7
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/BaseInput/styles.js +32 -6
- package/dist/BaseInput/styles.js.map +1 -1
- package/dist/Forms/WarningText/WarningText.d.ts +1 -2
- package/dist/Forms/WarningText/WarningText.js +1 -6
- package/dist/Forms/WarningText/WarningText.js.map +1 -1
- package/dist/Forms/WarningText/styles.js +0 -6
- package/dist/Forms/WarningText/styles.js.map +1 -1
- package/dist/Input/styles.js +0 -6
- package/dist/Input/styles.js.map +1 -1
- package/dist/Provider/Provider.d.ts +15 -0
- package/dist/Provider/Provider.js +34 -6
- package/dist/Provider/Provider.js.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/legacy/BaseInput/styles.js +32 -6
- package/dist/legacy/BaseInput/styles.js.map +1 -1
- package/dist/legacy/Forms/WarningText/WarningText.d.ts +1 -2
- package/dist/legacy/Forms/WarningText/WarningText.js +1 -6
- package/dist/legacy/Forms/WarningText/WarningText.js.map +1 -1
- package/dist/legacy/Forms/WarningText/styles.js +0 -6
- package/dist/legacy/Forms/WarningText/styles.js.map +1 -1
- package/dist/legacy/Input/styles.js +0 -6
- package/dist/legacy/Input/styles.js.map +1 -1
- package/dist/legacy/Provider/Provider.d.ts +15 -0
- package/dist/legacy/Provider/Provider.js +34 -7
- package/dist/legacy/Provider/Provider.js.map +1 -1
- package/dist/legacy/index.js +2 -1
- package/dist/legacy/index.js.map +1 -1
- package/dist/legacy/theme/CssBaseline.d.ts +1 -0
- package/dist/legacy/theme/CssBaseline.js +11 -32
- package/dist/legacy/theme/CssBaseline.js.map +1 -1
- package/dist/legacy/theme/ScopedCssBaseline.d.ts +13 -0
- package/dist/legacy/theme/ScopedCssBaseline.js +67 -0
- package/dist/legacy/theme/ScopedCssBaseline.js.map +1 -0
- package/dist/legacy/theme/index.d.ts +2 -1
- package/dist/legacy/theme/index.js +2 -1
- package/dist/legacy/theme/index.js.map +1 -1
- package/dist/modern/BaseInput/styles.js +32 -6
- package/dist/modern/BaseInput/styles.js.map +1 -1
- package/dist/modern/Forms/WarningText/WarningText.d.ts +1 -2
- package/dist/modern/Forms/WarningText/WarningText.js +1 -6
- package/dist/modern/Forms/WarningText/WarningText.js.map +1 -1
- package/dist/modern/Forms/WarningText/styles.js +0 -6
- package/dist/modern/Forms/WarningText/styles.js.map +1 -1
- package/dist/modern/Input/styles.js +0 -6
- package/dist/modern/Input/styles.js.map +1 -1
- package/dist/modern/Provider/Provider.d.ts +15 -0
- package/dist/modern/Provider/Provider.js +32 -7
- package/dist/modern/Provider/Provider.js.map +1 -1
- package/dist/modern/index.js +2 -1
- package/dist/modern/index.js.map +1 -1
- package/dist/modern/theme/CssBaseline.d.ts +1 -0
- package/dist/modern/theme/CssBaseline.js +11 -32
- package/dist/modern/theme/CssBaseline.js.map +1 -1
- package/dist/modern/theme/ScopedCssBaseline.d.ts +13 -0
- package/dist/modern/theme/ScopedCssBaseline.js +59 -0
- package/dist/modern/theme/ScopedCssBaseline.js.map +1 -0
- package/dist/modern/theme/index.d.ts +2 -1
- package/dist/modern/theme/index.js +2 -1
- package/dist/modern/theme/index.js.map +1 -1
- package/dist/theme/CssBaseline.d.ts +1 -0
- package/dist/theme/CssBaseline.js +12 -29
- package/dist/theme/CssBaseline.js.map +1 -1
- package/dist/theme/ScopedCssBaseline.d.ts +13 -0
- package/dist/theme/ScopedCssBaseline.js +105 -0
- package/dist/theme/ScopedCssBaseline.js.map +1 -0
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/index.js +9 -1
- package/dist/theme/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["createTheme","dawnTheme","wickedTheme","muiAppBarOverrides","muiToolbarOverrides","muiIconButtonOverrides","createTypography","createPalette","createSpacing","hvSpacing","getTheme","uiKitTheme","themeBuilder","theme","themeSpacing","themePalette","themeTypography","shadows","Array","fill","spacing","palette","typography","shape","borderRadius","breakpoints","values","xs","sm","md","lg","xl","props","MuiButtonBase","disableRipple","MuiInput","disableUnderline","overrides","MuiPaper","root","backgroundColor","atmosphere","atmo1","MuiAppBar","MuiToolbar","MuiIconButton","hv","defaultTheme","default","createGenerateClassName","
|
|
1
|
+
{"version":3,"file":"index.js","names":["createTheme","dawnTheme","wickedTheme","muiAppBarOverrides","muiToolbarOverrides","muiIconButtonOverrides","createTypography","createPalette","createSpacing","hvSpacing","getTheme","uiKitTheme","themeBuilder","theme","themeSpacing","themePalette","themeTypography","shadows","Array","fill","spacing","palette","typography","shape","borderRadius","breakpoints","values","xs","sm","md","lg","xl","props","MuiButtonBase","disableRipple","MuiInput","disableUnderline","overrides","MuiPaper","root","backgroundColor","atmosphere","atmo1","MuiAppBar","MuiToolbar","MuiIconButton","hv","defaultTheme","default","createGenerateClassName","HvCssBaseline","HvScopedCssBaseline"],"sources":["../../../src/theme/index.js"],"sourcesContent":["import { createTheme } from \"@material-ui/core/styles\";\nimport dawnTheme from \"@hitachivantara/uikit-common-themes/dist/dawn\";\nimport wickedTheme from \"@hitachivantara/uikit-common-themes/dist/wicked\";\nimport muiAppBarOverrides from \"./overrides/muiAppBar\";\nimport muiToolbarOverrides from \"./overrides/muiToolbar\";\nimport muiIconButtonOverrides from \"./overrides/muiIconButton\";\nimport createTypography from \"./typography\";\nimport createPalette from \"./palette\";\nimport createSpacing, { hvSpacing } from \"./spacing\";\n\nconst getTheme = (uiKitTheme) => {\n switch (uiKitTheme) {\n default:\n case \"dawn\":\n return dawnTheme;\n case \"wicked\":\n return wickedTheme;\n }\n};\n\nconst themeBuilder = (theme) => {\n const themeSpacing = createSpacing(theme);\n const themePalette = createPalette(theme);\n const themeTypography = createTypography(themePalette, theme);\n\n return createTheme({\n shadows: Array(25).fill(\"none\"),\n\n // MUI's spacing doesn't cover our use cases because of regression:\n // https://github.com/mui-org/material-ui/issues/21278\n spacing: themeSpacing,\n hvSpacing: hvSpacing(themeSpacing),\n\n palette: themePalette,\n typography: themeTypography,\n shape: {\n borderRadius: 0,\n },\n breakpoints: {\n values: {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1270,\n xl: 1920,\n },\n },\n props: {\n MuiButtonBase: {\n disableRipple: true,\n },\n MuiInput: {\n disableUnderline: true,\n },\n },\n overrides: {\n MuiPaper: {\n root: {\n backgroundColor: theme.palette.atmosphere.atmo1,\n },\n },\n MuiAppBar: {\n ...muiAppBarOverrides(theme),\n },\n MuiToolbar: {\n ...muiToolbarOverrides(theme),\n },\n MuiIconButton: {\n ...muiIconButtonOverrides(theme),\n },\n },\n hv: theme,\n });\n};\n\nconst defaultTheme = themeBuilder(getTheme(\"dawn\"));\n\nexport { default as createGenerateClassName } from \"./createGenerateClassName\";\nexport { default as HvCssBaseline } from \"./CssBaseline\";\nexport { default as HvScopedCssBaseline } from \"./ScopedCssBaseline\";\nexport { getTheme };\n\nexport { themeBuilder };\nexport default defaultTheme;\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAASA,WAAT,QAA4B,0BAA5B;AACA,OAAOC,SAAP,MAAsB,+CAAtB;AACA,OAAOC,WAAP,MAAwB,iDAAxB;AACA,OAAOC,kBAAP,MAA+B,uBAA/B;AACA,OAAOC,mBAAP,MAAgC,wBAAhC;AACA,OAAOC,sBAAP,MAAmC,2BAAnC;AACA,OAAOC,gBAAP,MAA6B,cAA7B;AACA,OAAOC,aAAP,MAA0B,WAA1B;AACA,OAAOC,aAAP,IAAwBC,SAAxB,QAAyC,WAAzC;;AAEA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,UAAD,EAAgB;EAC/B,QAAQA,UAAR;IACE;IACA,KAAK,MAAL;MACE,OAAOV,SAAP;;IACF,KAAK,QAAL;MACE,OAAOC,WAAP;EALJ;AAOD,CARD;;AAUA,IAAMU,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAAW;EAC9B,IAAMC,YAAY,GAAGN,aAAa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ApB,QAAyC,eAAzC;AACA,SAASF,OAAO,IAAIG,mBAApB,QAA+C,qBAA/C;AACA,SAASzC,QAAT;AAEA,SAASE,YAAT;AACA,eAAemC,YAAf"}
|
|
@@ -40,6 +40,38 @@ const styles = theme => ({
|
|
|
40
40
|
"& $input": {
|
|
41
41
|
border: `1px solid ${theme.hv.palette.accent.acce1}`
|
|
42
42
|
}
|
|
43
|
+
},
|
|
44
|
+
"@global": {
|
|
45
|
+
"input:-webkit-autofill": {
|
|
46
|
+
"-webkit-box-shadow": `0 0 0px 1000px ${theme.hv.palette.atmosphere.atmo1} inset`,
|
|
47
|
+
"-webkit-text-fill-color": theme.hv.typography.normalText.color
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
/* clears input's clear and reveal buttons from IE */
|
|
51
|
+
"input[type=search]::-ms-clear": {
|
|
52
|
+
display: "none",
|
|
53
|
+
width: 0,
|
|
54
|
+
height: 0
|
|
55
|
+
},
|
|
56
|
+
"input[type=search]::-ms-reveal": {
|
|
57
|
+
display: "none",
|
|
58
|
+
width: 0,
|
|
59
|
+
height: 0
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
/* clears input's clear button from Chrome */
|
|
63
|
+
"input[type=search]::-webkit-search-decoration": {
|
|
64
|
+
display: "none"
|
|
65
|
+
},
|
|
66
|
+
"input[type=search]::-webkit-search-cancel-button": {
|
|
67
|
+
display: "none"
|
|
68
|
+
},
|
|
69
|
+
"input[type=search]::-webkit-search-results-button": {
|
|
70
|
+
display: "none"
|
|
71
|
+
},
|
|
72
|
+
"input[type=search]::-webkit-search-results-decoration": {
|
|
73
|
+
display: "none"
|
|
74
|
+
}
|
|
43
75
|
}
|
|
44
76
|
},
|
|
45
77
|
resizable: {
|
|
@@ -191,12 +223,6 @@ const styles = theme => ({
|
|
|
191
223
|
top: "31px",
|
|
192
224
|
left: "2px",
|
|
193
225
|
backgroundColor: theme.hv.palette.atmosphere.atmo4
|
|
194
|
-
},
|
|
195
|
-
"@global": {
|
|
196
|
-
"input:-webkit-autofill": {
|
|
197
|
-
"-webkit-box-shadow": `0 0 0px 1000px ${theme.hv.palette.atmosphere.atmo1} inset`,
|
|
198
|
-
"-webkit-text-fill-color": theme.hv.typography.normalText.color
|
|
199
|
-
}
|
|
200
226
|
}
|
|
201
227
|
});
|
|
202
228
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["outlineStyles","styles","theme","root","display","width","position","overflow","border","hv","palette","accent","acce1","backgroundColor","resizable","readOnly","disabled","atmosphere","atmo4","atmo3","invalid","semantic","sema4","inputRoot","margin","borderRadius","atmo1","inputRootFocused","background","inputRootDisabled","cursor","inputRootMultiline","padding","height","minHeight","marginLeft","marginRight","input","spacing","xs","typography","normalText","textOverflow","outline","placeholderText","opacity","flexGrow","inputDisabled","color","atmo5","inputResizable","resize","inputBorderContainer","top","left"],"sources":["../../../src/BaseInput/styles.js"],"sourcesContent":["import { outlineStyles } from \"../Focus/styles\";\n\nconst styles = (theme) => ({\n root: {\n display: \"inline-block\",\n width: \"100%\",\n position: \"relative\",\n \"& $inputRootMultiline\": {\n overflow: \"auto\",\n border: \"none\",\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"&:focus-within $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n },\n resizable: {\n width: \"auto\",\n },\n readOnly: {\n \"& $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n \"&:focus-within $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n\n // multiline\n \"& $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n },\n disabled: {\n \"& $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n \"& $inputRootMultiline\": {\n \"& $input\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n },\n },\n },\n invalid: {\n \"&:not($disabled)\": {\n \"& $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.semantic.sema4,\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.semantic.sema4,\n },\n \"& $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n },\n },\n\n inputRoot: {\n margin: 0,\n width: \"100%\",\n borderRadius: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n },\n inputRootFocused: {\n background: theme.hv.palette.atmosphere.atmo1,\n ...outlineStyles,\n \"&:hover\": {\n background: theme.hv.palette.atmosphere.atmo1,\n },\n },\n inputRootDisabled: {\n background: theme.hv.palette.atmosphere.atmo3,\n \"&:hover\": {\n background: theme.hv.palette.atmosphere.atmo3,\n cursor: \"not-allowed\",\n },\n cursor: \"not-allowed\",\n },\n inputRootMultiline: {\n padding: 0,\n backgroundColor: \"transparent\",\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n borderRadius: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n height: \"auto\",\n minHeight: \"21px\",\n padding: \"5px 10px\",\n overflow: \"auto\",\n marginLeft: \"0px\",\n marginRight: \"0px\",\n },\n },\n\n input: {\n height: \"21px\",\n marginLeft: theme.hv.spacing.xs,\n marginRight: theme.hv.spacing.xs,\n padding: \"6px 0 5px\",\n ...theme.hv.typography.normalText,\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n outline: \"none\",\n \"&::placeholder\": {\n ...theme.hv.typography.placeholderText,\n opacity: 1,\n },\n \"&::-ms-clear\": {\n display: \"none\",\n },\n width: \"initial\",\n flexGrow: 1,\n },\n inputDisabled: {\n color: theme.hv.palette.atmosphere.atmo5,\n },\n inputResizable: {\n resize: \"both\",\n width: \"100%\",\n },\n\n inputBorderContainer: {\n position: \"absolute\",\n width: \"calc(100% - 4px)\",\n height: \"1px\",\n top: \"31px\",\n left: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n\n \"@global\": {\n \"input:-webkit-autofill\": {\n \"-webkit-box-shadow\": `0 0 0px 1000px ${theme.hv.palette.atmosphere.atmo1} inset`,\n \"-webkit-text-fill-color\": theme.hv.typography.normalText.color,\n },\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;AAAA,SAASA,aAAT,QAA8B,iBAA9B;;AAEA,MAAMC,MAAM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B,kBAAiBhB,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBO,UAAjB,CAA4BS,KAAM,QADlD;MAExB,2BAA2BxB,KAAK,CAACO,EAAN,CAAS+B,UAAT,CAAoBC,UAApB,CAA+BO;IAFlC;EADjB;AAhMc,CAAZ,CAAf;;AAwMA,eAAe/C,MAAf"}
|
|
1
|
+
{"version":3,"file":"styles.js","names":["outlineStyles","styles","theme","root","display","width","position","overflow","border","hv","palette","accent","acce1","backgroundColor","atmosphere","atmo1","typography","normalText","color","height","resizable","readOnly","disabled","atmo4","atmo3","invalid","semantic","sema4","inputRoot","margin","borderRadius","inputRootFocused","background","inputRootDisabled","cursor","inputRootMultiline","padding","minHeight","marginLeft","marginRight","input","spacing","xs","textOverflow","outline","placeholderText","opacity","flexGrow","inputDisabled","atmo5","inputResizable","resize","inputBorderContainer","top","left"],"sources":["../../../src/BaseInput/styles.js"],"sourcesContent":["import { outlineStyles } from \"../Focus/styles\";\n\nconst styles = (theme) => ({\n root: {\n display: \"inline-block\",\n width: \"100%\",\n position: \"relative\",\n \"& $inputRootMultiline\": {\n overflow: \"auto\",\n border: \"none\",\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"&:focus-within $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n\n \"@global\": {\n \"input:-webkit-autofill\": {\n \"-webkit-box-shadow\": `0 0 0px 1000px ${theme.hv.palette.atmosphere.atmo1} inset`,\n \"-webkit-text-fill-color\": theme.hv.typography.normalText.color,\n },\n\n /* clears input's clear and reveal buttons from IE */\n \"input[type=search]::-ms-clear\": { display: \"none\", width: 0, height: 0 },\n \"input[type=search]::-ms-reveal\": { display: \"none\", width: 0, height: 0 },\n\n /* clears input's clear button from Chrome */\n \"input[type=search]::-webkit-search-decoration\": { display: \"none\" },\n \"input[type=search]::-webkit-search-cancel-button\": { display: \"none\" },\n \"input[type=search]::-webkit-search-results-button\": { display: \"none\" },\n \"input[type=search]::-webkit-search-results-decoration\": { display: \"none\" },\n },\n },\n resizable: {\n width: \"auto\",\n },\n readOnly: {\n \"& $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n \"&:focus-within $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n\n // multiline\n \"& $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n },\n disabled: {\n \"& $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n \"& $inputRootMultiline\": {\n \"& $input\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n },\n },\n },\n invalid: {\n \"&:not($disabled)\": {\n \"& $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.semantic.sema4,\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.semantic.sema4,\n },\n \"& $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n },\n },\n\n inputRoot: {\n margin: 0,\n width: \"100%\",\n borderRadius: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n },\n inputRootFocused: {\n background: theme.hv.palette.atmosphere.atmo1,\n ...outlineStyles,\n \"&:hover\": {\n background: theme.hv.palette.atmosphere.atmo1,\n },\n },\n inputRootDisabled: {\n background: theme.hv.palette.atmosphere.atmo3,\n \"&:hover\": {\n background: theme.hv.palette.atmosphere.atmo3,\n cursor: \"not-allowed\",\n },\n cursor: \"not-allowed\",\n },\n inputRootMultiline: {\n padding: 0,\n backgroundColor: \"transparent\",\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n borderRadius: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n height: \"auto\",\n minHeight: \"21px\",\n padding: \"5px 10px\",\n overflow: \"auto\",\n marginLeft: \"0px\",\n marginRight: \"0px\",\n },\n },\n\n input: {\n height: \"21px\",\n marginLeft: theme.hv.spacing.xs,\n marginRight: theme.hv.spacing.xs,\n padding: \"6px 0 5px\",\n ...theme.hv.typography.normalText,\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n outline: \"none\",\n \"&::placeholder\": {\n ...theme.hv.typography.placeholderText,\n opacity: 1,\n },\n \"&::-ms-clear\": {\n display: \"none\",\n },\n width: \"initial\",\n flexGrow: 1,\n },\n inputDisabled: {\n color: theme.hv.palette.atmosphere.atmo5,\n },\n inputResizable: {\n resize: \"both\",\n width: \"100%\",\n },\n\n inputBorderContainer: {\n position: \"absolute\",\n width: \"calc(100% - 4px)\",\n height: \"1px\",\n top: \"31px\",\n left: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;AAAA,SAASA,aAAT,QAA8B,iBAA9B;;AAEA,MAAMC,MAAM,GAAIC,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAE,cADL;IAEJC,KAAK,EAAE,MAFH;IAGJC,QAAQ,EAAE,UAHN;IAIJ,yBAAyB;MACvBC,QAAQ,EAAE,MADa;MAEvBC,MAAM,EAAE;IAFe,CAJrB;IAQJ,+BAA+B;MAC7B,YAAY;QACVA,MAAM,EAAG,aAAYN,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC,KAAM;MADzC;IADiB,CAR3B;IAaJ,iCAAiC;MAC/BC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC;IADV,CAb7B;IAgBJ,wCAAwC;MACtCC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC;IADH,CAhBpC;IAmBJ;IACA,wCAAwC;MACtCC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC;IADH,CApBpC;IAuBJ,sCAAsC;MACpC,YAAY;QACVJ,MAAM,EAAG,aAAYN,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC,KAAM;MADzC;IADwB,CAvBlC;IA4BJ;IACA,sCAAsC;MACpC,YAAY;QACVJ,MAAM,EAAG,aAAYN,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC,KAAM;MADzC;IADwB,CA7BlC;IAmCJ,WAAW;MACT,0BAA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AT,CAAiBC,EAF1B;IAGHH,WAAW,EAAErC,KAAK,CAACO,EAAN,CAASgC,OAAT,CAAiBC,EAH3B;IAIHN,OAAO,EAAE;EAJN,GAKAlC,KAAK,CAACO,EAAN,CAASO,UAAT,CAAoBC,UALpB;IAMHV,QAAQ,EAAE,QANP;IAOHoC,YAAY,EAAE,UAPX;IAQHC,OAAO,EAAE,MARN;IASH,kDACK1C,KAAK,CAACO,EAAN,CAASO,UAAT,CAAoB6B,eADzB;MAEEC,OAAO,EAAE;IAFX,EATG;IAaH,gBAAgB;MACd1C,OAAO,EAAE;IADK,CAbb;IAgBHC,KAAK,EAAE,SAhBJ;IAiBH0C,QAAQ,EAAE;EAjBP,EA7KoB;EAgMzBC,aAAa,EAAE;IACb9B,KAAK,EAAEhB,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBI,UAAjB,CAA4BmC;EADtB,CAhMU;EAmMzBC,cAAc,EAAE;IACdC,MAAM,EAAE,MADM;IAEd9C,KAAK,EAAE;EAFO,CAnMS;EAwMzB+C,oBAAoB,EAAE;IACpB9C,QAAQ,EAAE,UADU;IAEpBD,KAAK,EAAE,kBAFa;IAGpBc,MAAM,EAAE,KAHY;IAIpBkC,GAAG,EAAE,MAJe;IAKpBC,IAAI,EAAE,KALc;IAMpBzC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBI,UAAjB,CAA4BS;EANzB;AAxMG,CAAZ,CAAf;;AAkNA,eAAetB,MAAf"}
|
|
@@ -6,8 +6,7 @@ export type HvWarningTextClassKey =
|
|
|
6
6
|
| "topBorder"
|
|
7
7
|
| "topGutter"
|
|
8
8
|
| "showText"
|
|
9
|
-
| "defaultIcon"
|
|
10
|
-
| "@global";
|
|
9
|
+
| "defaultIcon";
|
|
11
10
|
|
|
12
11
|
export interface HvWarningTextProps
|
|
13
12
|
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvWarningTextClassKey> {
|
|
@@ -111,12 +111,7 @@ process.env.NODE_ENV !== "production" ? HvWarningText.propTypes = {
|
|
|
111
111
|
* Styles applied to the text when the error are is active
|
|
112
112
|
* but the text is to be not visible.
|
|
113
113
|
*/
|
|
114
|
-
hideText: PropTypes.string
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* IE11 specific styling.
|
|
118
|
-
*/
|
|
119
|
-
"@global": PropTypes.string
|
|
114
|
+
hideText: PropTypes.string
|
|
120
115
|
}).isRequired,
|
|
121
116
|
|
|
122
117
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningText.js","names":["React","useContext","PropTypes","clsx","isNil","Fail","withStyles","HvFormElementContext","HvTypography","setId","styles","HvWarningText","props","children","adornment","isVisible","classes","className","id","disabled","disableGutter","disableBorder","disableAdornment","hideText","others","elementId","elementStatus","elementDisabled","localDisabled","localVisible","localId","showWarning","content","localAdornment","defaultIcon","root","show","topBorder","warningText","topGutter","formElementType","propTypes","string","node","shape","isRequired","bool","name"],"sources":["../../../../src/Forms/WarningText/WarningText.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport isNil from \"lodash/isNil\";\nimport { Fail } from \"@hitachivantara/uikit-react-icons\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvFormElementContext } from \"../FormElement\";\nimport { HvTypography } from \"../..\";\nimport { setId } from \"../../utils\";\nimport styles from \"./styles\";\n\n/**\n * Provides the user with a descriptive text, signaling an error, for when the form element is in an invalid state.\n */\nconst HvWarningText = (props) => {\n const {\n children,\n adornment,\n isVisible,\n classes,\n className,\n id,\n disabled,\n disableGutter = false,\n disableBorder = false,\n disableAdornment = false,\n hideText = false,\n ...others\n } = props;\n\n const { elementId, elementStatus, elementDisabled } = useContext(HvFormElementContext);\n const localDisabled = disabled || elementDisabled;\n const localVisible = !isNil(isVisible) ? isVisible : elementStatus === \"invalid\";\n const localId = id ?? setId(elementId, \"error\");\n const showWarning = localVisible && !localDisabled;\n const content = showWarning ? children : \"\";\n const localAdornment = adornment || <Fail className={classes.defaultIcon} semantic=\"sema4\" />;\n\n return (\n <div\n className={clsx(className, classes.root, {\n [classes.show]: showWarning,\n [classes.topBorder]: !disableBorder,\n })}\n >\n {!disableAdornment && localAdornment}\n <HvTypography\n id={localId}\n className={clsx(classes.warningText, {\n [classes.topGutter]: !disableGutter,\n [classes.hideText]: hideText,\n })}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n aria-relevant=\"additions text\"\n {...others}\n >\n {showWarning && content}\n </HvTypography>\n </div>\n );\n};\n\nHvWarningText.formElementType = \"errormessage\";\n\nHvWarningText.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * The description to be shown by this helper text\n */\n children: PropTypes.node,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the component styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the default icon.\n */\n defaultIcon: PropTypes.string,\n /**\n * Styles applied to the warning text.\n */\n warningText: PropTypes.string,\n /**\n * Styles applied when the text should be shown.\n */\n show: PropTypes.string,\n /**\n * Separation between text and upper element.\n */\n topGutter: PropTypes.string,\n /**\n * The top border.\n */\n topBorder: PropTypes.string,\n /**\n * Styles applied to the text when the error are is active\n * but the text is to be not visible.\n */\n hideText: PropTypes.string,\n
|
|
1
|
+
{"version":3,"file":"WarningText.js","names":["React","useContext","PropTypes","clsx","isNil","Fail","withStyles","HvFormElementContext","HvTypography","setId","styles","HvWarningText","props","children","adornment","isVisible","classes","className","id","disabled","disableGutter","disableBorder","disableAdornment","hideText","others","elementId","elementStatus","elementDisabled","localDisabled","localVisible","localId","showWarning","content","localAdornment","defaultIcon","root","show","topBorder","warningText","topGutter","formElementType","propTypes","string","node","shape","isRequired","bool","name"],"sources":["../../../../src/Forms/WarningText/WarningText.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport isNil from \"lodash/isNil\";\nimport { Fail } from \"@hitachivantara/uikit-react-icons\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvFormElementContext } from \"../FormElement\";\nimport { HvTypography } from \"../..\";\nimport { setId } from \"../../utils\";\nimport styles from \"./styles\";\n\n/**\n * Provides the user with a descriptive text, signaling an error, for when the form element is in an invalid state.\n */\nconst HvWarningText = (props) => {\n const {\n children,\n adornment,\n isVisible,\n classes,\n className,\n id,\n disabled,\n disableGutter = false,\n disableBorder = false,\n disableAdornment = false,\n hideText = false,\n ...others\n } = props;\n\n const { elementId, elementStatus, elementDisabled } = useContext(HvFormElementContext);\n const localDisabled = disabled || elementDisabled;\n const localVisible = !isNil(isVisible) ? isVisible : elementStatus === \"invalid\";\n const localId = id ?? setId(elementId, \"error\");\n const showWarning = localVisible && !localDisabled;\n const content = showWarning ? children : \"\";\n const localAdornment = adornment || <Fail className={classes.defaultIcon} semantic=\"sema4\" />;\n\n return (\n <div\n className={clsx(className, classes.root, {\n [classes.show]: showWarning,\n [classes.topBorder]: !disableBorder,\n })}\n >\n {!disableAdornment && localAdornment}\n <HvTypography\n id={localId}\n className={clsx(classes.warningText, {\n [classes.topGutter]: !disableGutter,\n [classes.hideText]: hideText,\n })}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n aria-relevant=\"additions text\"\n {...others}\n >\n {showWarning && content}\n </HvTypography>\n </div>\n );\n};\n\nHvWarningText.formElementType = \"errormessage\";\n\nHvWarningText.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * The description to be shown by this helper text\n */\n children: PropTypes.node,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the component styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the default icon.\n */\n defaultIcon: PropTypes.string,\n /**\n * Styles applied to the warning text.\n */\n warningText: PropTypes.string,\n /**\n * Styles applied when the text should be shown.\n */\n show: PropTypes.string,\n /**\n * Separation between text and upper element.\n */\n topGutter: PropTypes.string,\n /**\n * The top border.\n */\n topBorder: PropTypes.string,\n /**\n * Styles applied to the text when the error are is active\n * but the text is to be not visible.\n */\n hideText: PropTypes.string,\n }).isRequired,\n /**\n * Icon to be rendered alongside the warning text.\n */\n adornment: PropTypes.node,\n /**\n * If `true` the text is not rendered.\n */\n isVisible: PropTypes.bool,\n /**\n * If `true` the text is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true` the text won't include a gutter.\n */\n disableGutter: PropTypes.bool,\n /**\n * If `true` the text won't include the top border.\n */\n disableBorder: PropTypes.bool,\n /**\n * If `true` the adornment icon isn't shown.\n */\n disableAdornment: PropTypes.bool,\n /**\n * If `true` the text isn't shown.\n */\n hideText: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvWarningText\" })(HvWarningText);\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,KAAP,MAAkB,cAAlB;AACA,SAASC,IAAT,QAAqB,mCAArB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,SAASC,oBAAT,QAAqC,gBAArC;AACA,SAASC,YAAT,QAA6B,OAA7B;AACA,SAASC,KAAT,QAAsB,aAAtB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA;AACA;AACA;;AACA,MAAMC,aAAa,GAAIC,KAAD,IAAW;EAC/B,MAAM;IACJC,QADI;IAEJC,SAFI;IAGJC,SAHI;IAIJC,OAJI;IAKJC,SALI;IAMJC,EANI;IAOJC,QAPI;IAQJC,aAAa,GAAG,KARZ;IASJC,aAAa,GAAG,KATZ;IAUJC,gBAAgB,GAAG,KAVf;IAWJC,QAAQ,GAAG;EAXP,IAaFX,KAbJ;EAAA,MAYKY,MAZL,4BAaIZ,KAb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 0,
|
|
31
31
|
overflow: "hidden"
|
|
32
|
-
},
|
|
33
|
-
"@global": {
|
|
34
|
-
"input:-webkit-autofill": {
|
|
35
|
-
"-webkit-box-shadow": `0 0 0px 1000px ${theme.hv.palette.atmosphere.atmo1} inset`,
|
|
36
|
-
"-webkit-text-fill-color": theme.hv.typography.normalText.color
|
|
37
|
-
}
|
|
38
32
|
}
|
|
39
33
|
});
|
|
40
34
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","display","topBorder","borderTop","hv","palette","semantic","sema4","topGutter","paddingTop","warningText","color","paddingRight","spacing","xs","paddingLeft","defaultIcon","minWidth","show","hideText","width","height","padding","margin","overflow"
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","display","topBorder","borderTop","hv","palette","semantic","sema4","topGutter","paddingTop","warningText","color","paddingRight","spacing","xs","paddingLeft","defaultIcon","minWidth","show","hideText","width","height","padding","margin","overflow"],"sources":["../../../../src/Forms/WarningText/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n display: \"none\",\n },\n topBorder: {\n borderTop: `solid 1px ${theme.hv.palette.semantic.sema4}`,\n },\n topGutter: { paddingTop: 8 },\n warningText: {\n color: theme.hv.palette.semantic.sema4,\n paddingRight: theme.hv.spacing.xs,\n \"&:first-child\": {\n paddingLeft: theme.hv.spacing.xs,\n },\n },\n defaultIcon: {\n minWidth: \"32px\",\n },\n show: {\n display: \"flex\",\n },\n hideText: {\n // display none or visibility hidden prevents\n // browser to trigger the aria-alert\n width: 0,\n height: 0,\n padding: 0,\n margin: 0,\n overflow: \"hidden\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAIC,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAE;EADL,CADmB;EAIzBC,SAAS,EAAE;IACTC,SAAS,EAAG,aAAYJ,KAAK,CAACK,EAAN,CAASC,OAAT,CAAiBC,QAAjB,CAA0BC,KAAM;EAD/C,CAJc;EAOzBC,SAAS,EAAE;IAAEC,UAAU,EAAE;EAAd,CAPc;EAQzBC,WAAW,EAAE;IACXC,KAAK,EAAEZ,KAAK,CAACK,EAAN,CAASC,OAAT,CAAiBC,QAAjB,CAA0BC,KADtB;IAEXK,YAAY,EAAEb,KAAK,CAACK,EAAN,CAASS,OAAT,CAAiBC,EAFpB;IAGX,iBAAiB;MACfC,WAAW,EAAEhB,KAAK,CAACK,EAAN,CAASS,OAAT,CAAiBC;IADf;EAHN,CARY;EAezBE,WAAW,EAAE;IACXC,QAAQ,EAAE;EADC,CAfY;EAkBzBC,IAAI,EAAE;IACJjB,OAAO,EAAE;EADL,CAlBmB;EAqBzBkB,QAAQ,EAAE;IACR;IACA;IACAC,KAAK,EAAE,CAHC;IAIRC,MAAM,EAAE,CAJA;IAKRC,OAAO,EAAE,CALD;IAMRC,MAAM,EAAE,CANA;IAORC,QAAQ,EAAE;EAPF;AArBe,CAAZ,CAAf;;AAgCA,eAAe1B,MAAf"}
|
|
@@ -85,12 +85,6 @@ const styles = theme => ({
|
|
|
85
85
|
"$hasSuggestions &": {
|
|
86
86
|
display: "none"
|
|
87
87
|
}
|
|
88
|
-
},
|
|
89
|
-
"@global": {
|
|
90
|
-
"input:-webkit-autofill": {
|
|
91
|
-
"-webkit-box-shadow": `0 0 0px 1000px ${theme.hv.palette.atmosphere.atmo1} inset`,
|
|
92
|
-
"-webkit-text-fill-color": theme.hv.typography.normalText.color
|
|
93
|
-
}
|
|
94
88
|
}
|
|
95
89
|
});
|
|
96
90
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","display","hasSuggestions","inputRoot","inputRootFocused","inputRootDisabled","cursor","inputRootMultiline","padding","input","labelContainer","alignItems","label","paddingBottom","description","error","adornmentsBox","flexDirection","height","justifyContent","marginRight","adornmentButton","backgroundColor","border","margin","icon","width","iconClear","suggestionsContainer","position","suggestionList","inputExtension","hv","spacing","xs","palette","atmosphere","atmo1","boxShadow","inputBorderContainer"
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","display","hasSuggestions","inputRoot","inputRootFocused","inputRootDisabled","cursor","inputRootMultiline","padding","input","labelContainer","alignItems","label","paddingBottom","description","error","adornmentsBox","flexDirection","height","justifyContent","marginRight","adornmentButton","backgroundColor","border","margin","icon","width","iconClear","suggestionsContainer","position","suggestionList","inputExtension","hv","spacing","xs","palette","atmosphere","atmo1","boxShadow","inputBorderContainer"],"sources":["../../../src/Input/styles.js"],"sourcesContent":["import \"focus-within-polyfill\";\n\nconst styles = (theme) => ({\n root: {\n display: \"block\",\n },\n\n hasSuggestions: {},\n\n inputRoot: {\n \"&:hover\": {\n \"& $iconClear\": {\n display: \"block\",\n },\n },\n \"&:focus-within $iconClear\": {\n display: \"block\",\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $iconClear\": {\n display: \"block\",\n },\n },\n inputRootFocused: {\n \"& $iconClear\": { display: \"block\" },\n },\n inputRootDisabled: {\n cursor: \"not-allowed\",\n },\n inputRootMultiline: {\n padding: 0,\n },\n input: {\n \"&::-ms-clear\": {\n display: \"none\",\n },\n },\n\n labelContainer: {\n display: \"flex\",\n alignItems: \"flex-start\",\n },\n label: {\n paddingBottom: \"6px\",\n display: \"block\",\n },\n description: {},\n error: {},\n\n adornmentsBox: {\n display: \"flex\",\n flexDirection: \"row\",\n height: \"30px\",\n justifyContent: \"center\",\n marginRight: 1,\n },\n adornmentButton: {\n backgroundColor: \"transparent\",\n border: \"none\",\n padding: 0,\n margin: 0,\n cursor: \"pointer\",\n },\n icon: {\n width: \"30px\",\n height: \"30px\",\n },\n iconClear: {\n display: \"none\",\n },\n\n suggestionsContainer: {\n width: \"100%\",\n position: \"relative\",\n },\n suggestionList: {\n // ensure more specificity than .HvSuggestions-root .HvSuggestions-list\n \"$root $suggestionsContainer &\": {\n width: \"100%\",\n },\n },\n\n inputExtension: {\n height: theme.hv.spacing.xs,\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n boxShadow: `0px 8px 0px ${theme.hv.palette.atmosphere.atmo1}, 0px 0px 9px 0px rgba(65,65,65,.12)`,\n },\n\n inputBorderContainer: {\n \"$hasSuggestions &\": {\n display: \"none\",\n },\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,OAAO,uBAAP;;AAEA,MAAMA,MAAM,GAAIC,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAE;EADL,CADmB;EAKzBC,cAAc,EAAE,EALS;EAOzBC,SAAS,EAAE;IACT,WAAW;MACT,gBAAgB;QACdF,OAAO,EAAE;MADK;IADP,CADF;IAMT,6BAA6B;MAC3BA,OAAO,EAAE;IADkB,CANpB;IAST;IACA,6BAA6B;MAC3BA,OAAO,EAAE;IADkB;EAVpB,CAPc;EAqBzBG,gBAAgB,EAAE;IAChB,gBAAgB;MAAEH,OAAO,EAAE;IAAX;EADA,CArBO;EAwBzBI,iBAAiB,EAAE;IACjBC,MAAM,EAAE;EADS,CAxBM;EA2BzBC,kBAAkB,EAAE;IAClBC,OAAO,EAAE;EADS,CA3BK;EA8BzBC,KAAK,EAAE;IACL,gBAAgB;MACdR,OAAO,EAAE;IADK;EADX,CA9BkB;EAoCzBS,cAAc,EAAE;IACdT,OAAO,EAAE,MADK;IAEdU,UAAU,EAAE;EAFE,CApCS;EAwCzBC,KAAK,EAAE;IACLC,aAAa,EAAE,KADV;IAELZ,OAAO,EAAE;EAFJ,CAxCkB;EA4CzBa,WAAW,EAAE,EA5CY;EA6CzBC,KAAK,EAAE,EA7CkB;EA+CzBC,aAAa,EAAE;IACbf,OAAO,EAAE,MADI;IAEbgB,aAAa,EAAE,KAFF;IAGbC,MAAM,EAAE,MAHK;IAIbC,cAAc,EAAE,QAJH;IAKbC,WAAW,EAAE;EALA,CA/CU;EAsDzBC,eAAe,EAAE;IACfC,eAAe,EAAE,aADF;IAEfC,MAAM,EAAE,MAFO;IAGff,OAAO,EAAE,CAHM;IAIfgB,MAAM,EAAE,CAJO;IAKflB,MAAM,EAAE;EALO,CAtDQ;EA6DzBmB,IAAI,EAAE;IACJC,KAAK,EAAE,MADH;IAEJR,MAAM,EAAE;EAFJ,CA7DmB;EAiEzBS,SAAS,EAAE;IACT1B,OAAO,EAAE;EADA,CAjEc;EAqEzB2B,oBAAoB,EAAE;IACpBF,KAAK,EAAE,MADa;IAEpBG,QAAQ,EAAE;EAFU,CArEG;EAyEzBC,cAAc,EAAE;IACd;IACA,iCAAiC;MAC/BJ,KAAK,EAAE;IADwB;EAFnB,CAzES;EAgFzBK,cAAc,EAAE;IACdb,MAAM,EAAEnB,KAAK,CAACiC,EAAN,CAASC,OAAT,CAAiBC,EADX;IAEdZ,eAAe,EAAEvB,KAAK,CAACiC,EAAN,CAASG,OAAT,CAAiBC,UAAjB,CAA4BC,KAF/B;IAGdC,SAAS,EAAG,eAAcvC,KAAK,CAACiC,EAAN,CAASG,OAAT,CAAiBC,UAAjB,CAA4BC,KAAM;EAH9C,CAhFS;EAsFzBE,oBAAoB,EAAE;IACpB,qBAAqB;MACnBtC,OAAO,EAAE;IADU;EADD;AAtFG,CAAZ,CAAf;;AA6FA,eAAeH,MAAf"}
|
|
@@ -63,6 +63,21 @@ export interface HvProviderProps {
|
|
|
63
63
|
* Disables the generation of the styles.
|
|
64
64
|
*/
|
|
65
65
|
disableStylesGeneration?: boolean;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Disables the generation of the baseline css styles.
|
|
69
|
+
*
|
|
70
|
+
* This will be the default behavior in the future.
|
|
71
|
+
*
|
|
72
|
+
* The application using UI Kit should be responsible for adding the baseline css styles, by
|
|
73
|
+
* either using the `<HvCssBaseline />` component, using the `<HvScopedCssBaseline />` component,
|
|
74
|
+
* or ensuring that the necessary base styles are applied.
|
|
75
|
+
*
|
|
76
|
+
* Defaults to `false`. Will be removed in the next major release.
|
|
77
|
+
*
|
|
78
|
+
* @see https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main
|
|
79
|
+
*/
|
|
80
|
+
disableCssBaseline?: boolean;
|
|
66
81
|
}
|
|
67
82
|
|
|
68
83
|
export default function HvProvider(props: HvProviderProps): JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _HvCssBaseline;
|
|
2
2
|
|
|
3
3
|
import React, { useMemo } from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
@@ -11,8 +11,9 @@ import "focus-within-polyfill";
|
|
|
11
11
|
import "focus-visible";
|
|
12
12
|
import { ThemeProvider as MuiThemeProvider, StylesProvider as MuiStylesProvider } from "@material-ui/core";
|
|
13
13
|
import { createTheme } from "@material-ui/core/styles";
|
|
14
|
-
import { themeBuilder, createGenerateClassName,
|
|
14
|
+
import { themeBuilder, createGenerateClassName, HvCssBaseline, getTheme } from "../theme";
|
|
15
15
|
import ConfigContext from "./context";
|
|
16
|
+
let warnedOnce = false;
|
|
16
17
|
/**
|
|
17
18
|
* Augments the target theme with the differences found in the source theme.
|
|
18
19
|
*
|
|
@@ -54,8 +55,8 @@ const applyCustomTheme = (InputTargetTheme, InputSourceTheme) => {
|
|
|
54
55
|
* <HvProvider/>
|
|
55
56
|
* ```
|
|
56
57
|
*
|
|
57
|
-
* If several `HvProvider`'s are used, either nested or in
|
|
58
|
-
* must be tweaked to avoid CSS classnames
|
|
58
|
+
* If several `HvProvider`'s are used, either nested or in parallel, the `generateClassNameOptions`
|
|
59
|
+
* must be tweaked to avoid CSS classnames collision. Or a custom JSS's class name generator can
|
|
59
60
|
* be provided via the `generateClassName` property.
|
|
60
61
|
*
|
|
61
62
|
* **UI Kit components will not work at all if the `HvProvider` is not configured correctly**,
|
|
@@ -73,10 +74,19 @@ const HvProvider = ({
|
|
|
73
74
|
generateClassName: generateClassNameProp,
|
|
74
75
|
generateClassNameOptions,
|
|
75
76
|
injectStylesFirst = false,
|
|
76
|
-
disableStylesGeneration = false
|
|
77
|
+
disableStylesGeneration = false,
|
|
78
|
+
disableCssBaseline = false
|
|
77
79
|
}) => {
|
|
78
80
|
var _navigator$language, _navigator;
|
|
79
81
|
|
|
82
|
+
if (process.env.NODE_ENV !== "production") {
|
|
83
|
+
if (!warnedOnce && !disableCssBaseline) {
|
|
84
|
+
warnedOnce = true; // eslint-disable-next-line no-console
|
|
85
|
+
|
|
86
|
+
console.warn("UI Kit HvProvider's automatic definition of a css styles baseline will be removed in the next major version.\n" + "You can use the `disableCssBaseline` property to disable it already.\n" + "See https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main");
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
80
90
|
const localeSetting = locale || ((_navigator$language = (_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.language) !== null && _navigator$language !== void 0 ? _navigator$language : "en-US");
|
|
81
91
|
const rawUiKitTheme = getTheme(uiKitTheme);
|
|
82
92
|
const customTheme = applyCustomTheme(themeBuilder(rawUiKitTheme), theme);
|
|
@@ -91,7 +101,7 @@ const HvProvider = ({
|
|
|
91
101
|
disableGeneration: disableStylesGeneration
|
|
92
102
|
}, /*#__PURE__*/React.createElement(MuiThemeProvider, {
|
|
93
103
|
theme: customTheme
|
|
94
|
-
},
|
|
104
|
+
}, !disableCssBaseline && (_HvCssBaseline || (_HvCssBaseline = /*#__PURE__*/React.createElement(HvCssBaseline, null))), /*#__PURE__*/React.createElement(ConfigContext.Provider, {
|
|
95
105
|
value: pConfig
|
|
96
106
|
}, children)));
|
|
97
107
|
};
|
|
@@ -169,7 +179,22 @@ process.env.NODE_ENV !== "production" ? HvProvider.propTypes = {
|
|
|
169
179
|
/**
|
|
170
180
|
* Disables the generation of the styles.
|
|
171
181
|
*/
|
|
172
|
-
disableStylesGeneration: PropTypes.bool
|
|
182
|
+
disableStylesGeneration: PropTypes.bool,
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Disables the generation of the baseline css styles.
|
|
186
|
+
*
|
|
187
|
+
* This will be the default behavior in the future.
|
|
188
|
+
*
|
|
189
|
+
* The application using UI Kit should be responsible for adding the baseline css styles, by
|
|
190
|
+
* either using the `<HvCssBaseline />` component, using the `<HvScopedCssBaseline />` component,
|
|
191
|
+
* or ensuring that the necessary base styles are applied.
|
|
192
|
+
*
|
|
193
|
+
* Defaults to `false`. Will be removed in the next major release.
|
|
194
|
+
*
|
|
195
|
+
* @see https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main
|
|
196
|
+
*/
|
|
197
|
+
disableCssBaseline: PropTypes.bool
|
|
173
198
|
} : void 0;
|
|
174
199
|
export default HvProvider;
|
|
175
200
|
//# sourceMappingURL=Provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","names":["React","useMemo","PropTypes","set","merge","isEmpty","cloneDeep","diff","ThemeProvider","MuiThemeProvider","StylesProvider","MuiStylesProvider","createTheme","themeBuilder","createGenerateClassName","CssBaseline","getTheme","ConfigContext","applyCustomTheme","InputTargetTheme","InputSourceTheme","muiDefaultTheme","targetTheme","sourceTheme","deleteDifference","observableDiff","difference","partialCustomTheme","path","rhs","kind","HvProvider","children","uiKitTheme","theme","changeTheme","locale","generateClassName","generateClassNameProp","generateClassNameOptions","injectStylesFirst","disableStylesGeneration","localeSetting","navigator","language","rawUiKitTheme","customTheme","pConfig","propTypes","node","isRequired","oneOf","instanceOf","Object","func","string","shape","disableGlobal","bool","productionPrefix","seed"],"sources":["../../../src/Provider/Provider.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport set from \"lodash/set\";\nimport merge from \"lodash/merge\";\nimport isEmpty from \"lodash/isEmpty\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport diff from \"deep-diff\";\n\nimport \"focus-within-polyfill\";\nimport \"focus-visible\";\n\nimport {\n ThemeProvider as MuiThemeProvider,\n StylesProvider as MuiStylesProvider,\n} from \"@material-ui/core\";\nimport { createTheme } from \"@material-ui/core/styles\";\n\nimport { themeBuilder, createGenerateClassName, CssBaseline, getTheme } from \"../theme\";\n\nimport ConfigContext from \"./context\";\n\n/**\n * Augments the target theme with the differences found in the source theme.\n *\n * @param {Object} InputTargetTheme - A material UI Theme to be changed.\n * @param {Object} InputSourceTheme - A material UI Theme to apply on top.\n * @returns {Object} - A new modified material UI theme.\n */\nconst applyCustomTheme = (InputTargetTheme, InputSourceTheme) => {\n const muiDefaultTheme = createTheme();\n const targetTheme = cloneDeep(InputTargetTheme);\n const sourceTheme = cloneDeep(InputSourceTheme);\n const deleteDifference = \"D\";\n if (!isEmpty(targetTheme) && !isEmpty(sourceTheme)) {\n diff.observableDiff(muiDefaultTheme, sourceTheme, (difference) => {\n const partialCustomTheme = set({}, difference.path, difference.rhs);\n if (difference.kind !== deleteDifference) {\n // Do not include the differences of type \"delete\"\n merge(targetTheme, partialCustomTheme);\n }\n });\n return targetTheme;\n }\n return targetTheme;\n};\n\n/**\n * This component makes cross-component properties, like the active `theme` and `locale`,\n * available down the React tree thanks to React context.\n *\n * This component should preferably be used at **the root of your component tree** and\n * be unique in the App in most cases.\n *\n * ```jsx\n * <HvProvider>\n * <MyApp />\n * <HvProvider/>\n * ```\n *\n * If several `HvProvider`'s are used, either nested or in paralel, the `generateClassNameOptions`\n * must be tweaked to avoid CSS classnames colision. Or a custom JSS's class name generator can\n * be provided via the `generateClassName` property.\n *\n * **UI Kit components will not work at all if the `HvProvider` is not configured correctly**,\n * as they will not be able to access the properties of the active theme..\n *\n */\nconst HvProvider = ({\n children,\n\n uiKitTheme = \"dawn\",\n theme = null,\n changeTheme = () => {},\n\n locale,\n\n generateClassName: generateClassNameProp,\n generateClassNameOptions,\n injectStylesFirst = false,\n disableStylesGeneration = false,\n}) => {\n const localeSetting = locale || (navigator?.language ?? \"en-US\");\n\n const rawUiKitTheme = getTheme(uiKitTheme);\n const customTheme = applyCustomTheme(themeBuilder(rawUiKitTheme), theme);\n\n const generateClassName =\n generateClassNameProp || createGenerateClassName(generateClassNameOptions);\n\n const pConfig = useMemo(\n () => ({ changeTheme, locale: localeSetting }),\n [changeTheme, localeSetting]\n );\n\n return (\n <MuiStylesProvider\n generateClassName={generateClassName}\n injectFirst={injectStylesFirst}\n disableGeneration={disableStylesGeneration}\n >\n <MuiThemeProvider theme={customTheme}>\n <CssBaseline />\n <ConfigContext.Provider value={pConfig}>{children}</ConfigContext.Provider>\n </MuiThemeProvider>\n </MuiStylesProvider>\n );\n};\n\nHvProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * The Design System base theme in use. Defaults to `\"dawn\"`.\n */\n uiKitTheme: PropTypes.oneOf([\"dawn\", \"wicked\"]),\n /**\n * The UI Kit theme object to be applied on top of the base theme.\n */\n theme: PropTypes.instanceOf(Object),\n /**\n * Function stored in the provider's context to allow runtime switching of the active theme.\n * The implementation is up to each App.\n */\n changeTheme: PropTypes.func,\n\n /**\n * The locale to be used.\n * Defaults to the browser's configured locale or \"en-US\" if not available.\n */\n locale: PropTypes.string,\n\n /**\n * Custom JSS's class name generator.\n */\n generateClassName: PropTypes.func,\n /**\n * Built-in JSS's class name generator options.\n * Ignored if a custom `generateClassName` is provided.\n *\n * `disableGlobal`: Disable the generation of deterministic class names. Defaults to `false`.\n *\n * `productionPrefix`: The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n *\n * `seed`: The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n generateClassNameOptions: PropTypes.shape({\n /**\n * Disable the generation of deterministic class names. Defaults to `false`.\n */\n disableGlobal: PropTypes.bool,\n /**\n * The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n */\n productionPrefix: PropTypes.string,\n /**\n * The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n seed: PropTypes.string,\n }),\n /**\n * Injects the generated stylesheets at the top of the `<head>` element of the page.\n * This can ease the override of UI Kit components styles.\n *\n * By default, the styles are injected last in the `<head>` element of the page.\n */\n injectStylesFirst: PropTypes.bool,\n /**\n * Disables the generation of the styles.\n */\n disableStylesGeneration: PropTypes.bool,\n};\n\nexport default HvProvider;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,OAAhB,QAA+B,OAA/B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,GAAP,MAAgB,YAAhB;AACA,OAAOC,KAAP,MAAkB,cAAlB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,SAAP,MAAsB,kBAAtB;AACA,OAAOC,IAAP,MAAiB,WAAjB;AAEA,OAAO,uBAAP;AACA,OAAO,eAAP;AAEA,SACEC,aAAa,IAAIC,gBADnB,EAEEC,cAAc,IAAIC,iBAFpB,QAGO,mBAHP;AAIA,SAASC,WAAT,QAA4B,0BAA5B;AAEA,SAASC,YAAT,EAAuBC,uBAAvB,EAAgDC,WAAhD,EAA6DC,QAA7D,QAA6E,UAA7E;AAEA,OAAOC,aAAP,MAA0B,WAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,gBAAgB,GAAG,CAACC,gBAAD,EAAmBC,gBAAnB,KAAwC;EAC/D,MAAMC,eAAe,GAAGT,WAAW,EAAnC;EACA,MAAMU,WAAW,GAAGhB,SAAS,CAACa,gBAAD,CAA7B;EACA,MAAMI,WAAW,GAAGjB,SAAS,CAACc,gBAAD,CAA7B;EACA,MAAMI,gBAAgB,GAAG,GAAzB;;EACA,IAAI,CAACnB,OAAO,CAACiB,WAAD,CAAR,IAAyB,CAACjB,OAAO,CAACkB,WAAD,CAArC,EAAoD;IAClDhB,IAAI,CAACkB,cAAL,CAAoBJ,eAApB,EAAqCE,WAArC,EAAmDG,UAAD,IAAgB;MAChE,MAAMC,kBAAkB,GAAGxB,GAAG,CAAC,EAAD,EAAKuB,UAAU,CAACE,IAAhB,EAAsBF,UAAU,CAACG,GAAjC,CAA9B;;MACA,IAAIH,UAAU,CAACI,IAAX,KAAoBN,gBA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CALF,CADF;AAYD,CAvCD;;AAyCA,wCAAAD,UAAU,CAACiB,SAAX,GAAuB;EACrB;AACF;AACA;EACEhB,QAAQ,EAAE9B,SAAS,CAAC+C,IAAV,CAAeC,UAJJ;;EAMrB;AACF;AACA;EACEjB,UAAU,EAAE/B,SAAS,CAACiD,KAAV,CAAgB,CAAC,MAAD,EAAS,QAAT,CAAhB,CATS;;EAUrB;AACF;AACA;EACEjB,KAAK,EAAEhC,SAAS,CAACkD,UAAV,CAAqBC,MAArB,CAbc;;EAcrB;AACF;AACA;AACA;EACElB,WAAW,EAAEjC,SAAS,CAACoD,IAlBF;;EAoBrB;AACF;AACA;AACA;EACElB,MAAM,EAAElC,SAAS,CAACqD,MAxBG;;EA0BrB;AACF;AACA;EACElB,iBAAiB,EAAEnC,SAAS,CAACoD,IA7BR;;EA8BrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEf,wBAAwB,EAAErC,SAAS,CAACsD,KAAV,CAAgB;IACxC;AACJ;AACA;IACIC,aAAa,EAAEvD,SAAS,CAACwD,IAJe;;IAKxC;AACJ;AACA;IACIC,gBAAgB,EAAEzD,SAAS,CAACqD,MARY;;IASxC;AACJ;AACA;AACA;IACIK,IAAI,EAAE1D,SAAS,CAACqD;EAbwB,CAAhB,CAzCL;;EAwDrB;AACF;AACA;AACA;AACA;AACA;EACEf,iBAAiB,EAAEtC,SAAS,CAACwD,IA9DR;;EA+DrB;AACF;AACA;EACEjB,uBAAuB,EAAEvC,SAAS,CAACwD;AAlEd,CAAvB;AAqEA,eAAe3B,UAAf"}
|
|
1
|
+
{"version":3,"file":"Provider.js","names":["React","useMemo","PropTypes","set","merge","isEmpty","cloneDeep","diff","ThemeProvider","MuiThemeProvider","StylesProvider","MuiStylesProvider","createTheme","themeBuilder","createGenerateClassName","HvCssBaseline","getTheme","ConfigContext","warnedOnce","applyCustomTheme","InputTargetTheme","InputSourceTheme","muiDefaultTheme","targetTheme","sourceTheme","deleteDifference","observableDiff","difference","partialCustomTheme","path","rhs","kind","HvProvider","children","uiKitTheme","theme","changeTheme","locale","generateClassName","generateClassNameProp","generateClassNameOptions","injectStylesFirst","disableStylesGeneration","disableCssBaseline","process","env","NODE_ENV","console","warn","localeSetting","navigator","language","rawUiKitTheme","customTheme","pConfig","propTypes","node","isRequired","oneOf","instanceOf","Object","func","string","shape","disableGlobal","bool","productionPrefix","seed"],"sources":["../../../src/Provider/Provider.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport set from \"lodash/set\";\nimport merge from \"lodash/merge\";\nimport isEmpty from \"lodash/isEmpty\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport diff from \"deep-diff\";\n\nimport \"focus-within-polyfill\";\nimport \"focus-visible\";\n\nimport {\n ThemeProvider as MuiThemeProvider,\n StylesProvider as MuiStylesProvider,\n} from \"@material-ui/core\";\nimport { createTheme } from \"@material-ui/core/styles\";\n\nimport { themeBuilder, createGenerateClassName, HvCssBaseline, getTheme } from \"../theme\";\n\nimport ConfigContext from \"./context\";\n\nlet warnedOnce = false;\n\n/**\n * Augments the target theme with the differences found in the source theme.\n *\n * @param {Object} InputTargetTheme - A material UI Theme to be changed.\n * @param {Object} InputSourceTheme - A material UI Theme to apply on top.\n * @returns {Object} - A new modified material UI theme.\n */\nconst applyCustomTheme = (InputTargetTheme, InputSourceTheme) => {\n const muiDefaultTheme = createTheme();\n const targetTheme = cloneDeep(InputTargetTheme);\n const sourceTheme = cloneDeep(InputSourceTheme);\n const deleteDifference = \"D\";\n if (!isEmpty(targetTheme) && !isEmpty(sourceTheme)) {\n diff.observableDiff(muiDefaultTheme, sourceTheme, (difference) => {\n const partialCustomTheme = set({}, difference.path, difference.rhs);\n if (difference.kind !== deleteDifference) {\n // Do not include the differences of type \"delete\"\n merge(targetTheme, partialCustomTheme);\n }\n });\n return targetTheme;\n }\n return targetTheme;\n};\n\n/**\n * This component makes cross-component properties, like the active `theme` and `locale`,\n * available down the React tree thanks to React context.\n *\n * This component should preferably be used at **the root of your component tree** and\n * be unique in the App in most cases.\n *\n * ```jsx\n * <HvProvider>\n * <MyApp />\n * <HvProvider/>\n * ```\n *\n * If several `HvProvider`'s are used, either nested or in parallel, the `generateClassNameOptions`\n * must be tweaked to avoid CSS classnames collision. Or a custom JSS's class name generator can\n * be provided via the `generateClassName` property.\n *\n * **UI Kit components will not work at all if the `HvProvider` is not configured correctly**,\n * as they will not be able to access the properties of the active theme..\n *\n */\nconst HvProvider = ({\n children,\n\n uiKitTheme = \"dawn\",\n theme = null,\n changeTheme = () => {},\n\n locale,\n\n generateClassName: generateClassNameProp,\n generateClassNameOptions,\n injectStylesFirst = false,\n disableStylesGeneration = false,\n\n disableCssBaseline = false,\n}) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!warnedOnce && !disableCssBaseline) {\n warnedOnce = true;\n // eslint-disable-next-line no-console\n console.warn(\n \"UI Kit HvProvider's automatic definition of a css styles baseline will be removed in the next major version.\\n\" +\n \"You can use the `disableCssBaseline` property to disable it already.\\n\" +\n \"See https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\"\n );\n }\n }\n\n const localeSetting = locale || (navigator?.language ?? \"en-US\");\n\n const rawUiKitTheme = getTheme(uiKitTheme);\n const customTheme = applyCustomTheme(themeBuilder(rawUiKitTheme), theme);\n\n const generateClassName =\n generateClassNameProp || createGenerateClassName(generateClassNameOptions);\n\n const pConfig = useMemo(\n () => ({ changeTheme, locale: localeSetting }),\n [changeTheme, localeSetting]\n );\n\n return (\n <MuiStylesProvider\n generateClassName={generateClassName}\n injectFirst={injectStylesFirst}\n disableGeneration={disableStylesGeneration}\n >\n <MuiThemeProvider theme={customTheme}>\n {!disableCssBaseline && <HvCssBaseline />}\n <ConfigContext.Provider value={pConfig}>{children}</ConfigContext.Provider>\n </MuiThemeProvider>\n </MuiStylesProvider>\n );\n};\n\nHvProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * The Design System base theme in use. Defaults to `\"dawn\"`.\n */\n uiKitTheme: PropTypes.oneOf([\"dawn\", \"wicked\"]),\n /**\n * The UI Kit theme object to be applied on top of the base theme.\n */\n theme: PropTypes.instanceOf(Object),\n /**\n * Function stored in the provider's context to allow runtime switching of the active theme.\n * The implementation is up to each App.\n */\n changeTheme: PropTypes.func,\n\n /**\n * The locale to be used.\n * Defaults to the browser's configured locale or \"en-US\" if not available.\n */\n locale: PropTypes.string,\n\n /**\n * Custom JSS's class name generator.\n */\n generateClassName: PropTypes.func,\n /**\n * Built-in JSS's class name generator options.\n * Ignored if a custom `generateClassName` is provided.\n *\n * `disableGlobal`: Disable the generation of deterministic class names. Defaults to `false`.\n *\n * `productionPrefix`: The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n *\n * `seed`: The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n generateClassNameOptions: PropTypes.shape({\n /**\n * Disable the generation of deterministic class names. Defaults to `false`.\n */\n disableGlobal: PropTypes.bool,\n /**\n * The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n */\n productionPrefix: PropTypes.string,\n /**\n * The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n seed: PropTypes.string,\n }),\n /**\n * Injects the generated stylesheets at the top of the `<head>` element of the page.\n * This can ease the override of UI Kit components styles.\n *\n * By default, the styles are injected last in the `<head>` element of the page.\n */\n injectStylesFirst: PropTypes.bool,\n /**\n * Disables the generation of the styles.\n */\n disableStylesGeneration: PropTypes.bool,\n\n /**\n * Disables the generation of the baseline css styles.\n *\n * This will be the default behavior in the future.\n *\n * The application using UI Kit should be responsible for adding the baseline css styles, by\n * either using the `<HvCssBaseline />` component, using the `<HvScopedCssBaseline />` component,\n * or ensuring that the necessary base styles are applied.\n *\n * Defaults to `false`. Will be removed in the next major release.\n *\n * @see https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\n */\n disableCssBaseline: PropTypes.bool,\n};\n\nexport default HvProvider;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,OAAhB,QAA+B,OAA/B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,GAAP,MAAgB,YAAhB;AACA,OAAOC,KAAP,MAAkB,cAAlB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,SAAP,MAAsB,kBAAtB;AACA,OAAOC,IAAP,MAAiB,WAAjB;AAEA,OAAO,uBAAP;AACA,OAAO,eAAP;AAEA,SACEC,aAAa,IAAIC,gBADnB,EAEEC,cAAc,IAAIC,iBAFpB,QAGO,mBAHP;AAIA,SAASC,WAAT,QAA4B,0BAA5B;AAEA,SAASC,YAAT,EAAuBC,uBAAvB,EAAgDC,aAAhD,EAA+DC,QAA/D,QAA+E,UAA/E;AAEA,OAAOC,aAAP,MAA0B,WAA1B;AAEA,IAAIC,UAAU,GAAG,KAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,gBAAgB,GAAG,CAACC,gBAAD,EAAmBC,gBAAnB,KAAwC;EAC/D,MAAMC,eAAe,GAAGV,WAAW,EAAnC;EACA,MAAMW,WAAW,GAAGjB,SAAS,CAACc,gBAAD,CAA7B;EACA,MAAMI,WAAW,GAAGlB,SAAS,CAACe,gBAAD,CAA7B;EACA,MAAMI,gBAAgB,GAAG,GAAzB;;EACA,IAAI,CAACpB,OAAO,CAACkB,WAAD,CAAR,IAAyB,CAAClB,OAAO,CAACmB,WAAD,CAArC,EAAoD;IAClDjB,IAAI,CAACmB,cAAL,CAAoBJ,eAApB,EAAqCE,WAArC,EAAmDG,UAAD,IAAgB;MAChE,MAAMC,kBAAkB,GAAGzB,GAAG,CAAC,EAAD,EAAKwB,UAAU,CAACE,IAAhB,EAAsBF,UAAU,CAACG,GAAjC,CAA9B;;MACA,IAAIH,UAAU,CAACI,IAAX,KAAoBN,gBAAxB,EAA0C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IAlEd;;EAoErB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEtB,kBAAkB,EAAEzC,SAAS,CAAC+D;AAjFT,CAAvB;AAoFA,eAAejC,UAAf"}
|
package/dist/modern/index.js
CHANGED
|
@@ -90,7 +90,8 @@ export { default as withTooltip } from "./withTooltip"; // Hooks
|
|
|
90
90
|
export { default as useUniqueId } from "./useUniqueId"; // theme
|
|
91
91
|
|
|
92
92
|
export { default as hvTheme } from "./theme";
|
|
93
|
-
export { themeBuilder, getTheme } from "./theme";
|
|
93
|
+
export { themeBuilder, getTheme } from "./theme";
|
|
94
|
+
export { HvCssBaseline, HvScopedCssBaseline } from "./theme"; // provider
|
|
94
95
|
|
|
95
96
|
export { default as HvProvider } from "./Provider";
|
|
96
97
|
export * from "./Provider"; // utils
|
package/dist/modern/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","HvAccordion","HvActionsGeneric","HvActionBar","HvAppSwitcher","HvAssetInventory","HvAvatar","HvBadge","HvBanner","HvBarchart","HvBaseDropdown","HvBreadcrumb","HvBulkActions","HvButton","HvCard","HvContainer","HvDatePicker","HvDonutchart","HvDropdown","HvDropDownMenu","HvEmptyState","HvFilterGroup","HvFileUploader","HvFooter","HvGrid","HvGlobalActions","HvHeader","HvBaseInput","HvInput","HvSlider","HvKpi","HvLinechart","HvLink","HvListContainer","HvList","HvSelectionList","HvLoading","HvLogin","HvDialog","HvMultiButton","HvPagination","HvBaseCheckBox","HvCheckBox","HvCheckBoxGroup","HvBaseRadio","HvRadio","HvRadioGroup","HvBaseSwitch","HvSwitch","HvSnackbar","HvSnackbarContent","HvSnackbarProvider","useHvSnackbar","HvStack","HvTab","HvTag","HvTable","HvTabs","HvTextArea","HvTagsInput","HvToggleButton","HvTooltip","HvOverflowTooltip","HvTypography","HvUserPreferences","Actions","HvUserPreferencesActions","Action","HvUserPreferencesAction","Options","HvUserPreferencesOptions","Option","HvUserPreferencesOption","Group","HvUserPreferencesOptionsGroup","Label","HvUserPreferencesOptionsGroupLabel","HvScrollToHorizontal","HvScrollToVertical","useScrollTo","HvVerticalNavigation","Navigation","HvVerticalNavigationTree","TreeView","HvTreeView","TreeViewItem","HvTreeViewItem","HvVerticalNavigationActions","HvVerticalNavigationAction","HvPanel","withId","withTooltip","useUniqueId","hvTheme","themeBuilder","getTheme","HvProvider"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvAccordion } from \"./Accordion\";\nexport { default as HvActionsGeneric } from \"./ActionsGeneric\";\nexport { default as HvActionBar } from \"./ActionBar\";\nexport { default as HvAppSwitcher } from \"./AppSwitcher\";\nexport { default as HvAssetInventory } from \"./AssetInventory\";\nexport * from \"./AssetInventory\";\nexport { default as HvAvatar } from \"./Avatar\";\nexport { default as HvBadge } from \"./Badge\";\nexport { default as HvBanner } from \"./Banner\";\nexport * from \"./Banner\";\nexport { default as HvBarchart } from \"./Barchart\";\nexport { default as HvBaseDropdown } from \"./BaseDropdown\";\nexport { default as HvBreadcrumb } from \"./BreadCrumb\";\nexport { default as HvBulkActions } from \"./BulkActions\";\nexport { default as HvButton } from \"./Button\";\nexport { default as HvCard } from \"./Card\";\nexport * from \"./Card\";\nexport * from \"./Calendar\";\nexport { default as HvContainer } from \"./Container\";\nexport { default as HvDatePicker } from \"./DatePicker\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvDropdown } from \"./Dropdown\";\nexport { default as HvDropDownMenu } from \"./DropDownMenu\";\nexport { default as HvEmptyState } from \"./EmptyState\";\nexport { default as HvFilterGroup } from \"./FilterGroup\";\nexport { default as HvFileUploader } from \"./FileUploader\";\nexport * from \"./FileUploader\";\nexport { default as HvFooter } from \"./Footer\";\nexport * from \"./Forms\";\n\nexport { default as HvGrid } from \"./Grid\";\nexport { default as HvGlobalActions } from \"./GlobalActions\";\n\nexport { default as HvHeader } from \"./Header\";\nexport * from \"./Header\";\n\nexport { default as HvBaseInput } from \"./BaseInput\";\nexport { default as HvInput } from \"./Input\";\n\nexport { default as HvSlider } from \"./Slider\";\n\nexport { default as HvKpi } from \"./Kpi\";\n\nexport { default as HvLinechart } from \"./Linechart\";\nexport { default as HvLink } from \"./Link\";\nexport { default as HvListContainer } from \"./ListContainer\";\nexport * from \"./ListContainer\";\n\nexport { default as HvList } from \"./List\";\n\nexport { default as HvSelectionList } from \"./SelectionList\";\n\nexport { default as HvLoading } from \"./Loading\";\nexport { default as HvLogin } from \"./Login\";\nexport { default as HvDialog } from \"./Dialog\";\nexport * from \"./Dialog\";\nexport { default as HvMultiButton } from \"./MultiButton\";\nexport { default as HvPagination } from \"./Pagination\";\n\nexport { default as HvBaseCheckBox } from \"./BaseCheckBox\";\nexport { default as HvCheckBox } from \"./CheckBox\";\nexport { default as HvCheckBoxGroup } from \"./CheckBoxGroup\";\n\nexport { default as HvBaseRadio } from \"./BaseRadio\";\nexport { default as HvRadio } from \"./Radio\";\nexport { default as HvRadioGroup } from \"./RadioGroup\";\n\nexport { default as HvBaseSwitch } from \"./BaseSwitch\";\nexport { default as HvSwitch } from \"./Switch\";\n\nexport { default as HvSnackbar } from \"./Snackbar\";\nexport { default as HvSnackbarContent } from \"./Snackbar/SnackbarContentWrapper\";\nexport { default as HvSnackbarProvider, useHvSnackbar } from \"./Snackbar/SnackbarProvider\";\nexport { default as HvStack } from \"./Stack\";\n\nexport { default as HvTab } from \"./Tab\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvTable } from \"./Table\";\nexport { default as HvTabs } from \"./Tabs\";\nexport { default as HvTextArea } from \"./TextArea\";\nexport { default as HvTagsInput } from \"./TagsInput\";\nexport { default as HvToggleButton } from \"./ToggleButton\";\nexport { default as HvTooltip } from \"./Tooltip\";\nexport { default as HvOverflowTooltip } from \"./OverflowTooltip\";\nexport { default as HvTypography } from \"./Typography\";\nexport { default as HvUserPreferences } from \"./UserPreferences\";\n// TODO refactor the HvUserPreferences subcomponents' names\nexport {\n Actions as HvUserPreferencesActions,\n Action as HvUserPreferencesAction,\n} from \"./UserPreferences\";\nexport {\n Options as HvUserPreferencesOptions,\n Option as HvUserPreferencesOption,\n Group as HvUserPreferencesOptionsGroup,\n Label as HvUserPreferencesOptionsGroupLabel,\n} from \"./UserPreferences\";\n\nexport { default as HvScrollToHorizontal } from \"./ScrollTo/Horizontal\";\nexport { default as HvScrollToVertical } from \"./ScrollTo/Vertical\";\nexport { default as useScrollTo } from \"./ScrollTo/useScrollTo\";\n\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n// TODO refactor the HvVerticalNavigation subcomponents' names\nexport { Navigation as HvVerticalNavigationTree } from \"./VerticalNavigation\";\nexport { TreeView as HvTreeView, TreeViewItem as HvTreeViewItem } from \"./VerticalNavigation\";\nexport {\n Actions as HvVerticalNavigationActions,\n Action as HvVerticalNavigationAction,\n} from \"./VerticalNavigation\";\n\nexport { default as HvPanel } from \"./Panel\";\n\n// HOCs\nexport { default as withId } from \"./withId\";\nexport { default as withTooltip } from \"./withTooltip\";\n\n// Hooks\nexport { default as useUniqueId } from \"./useUniqueId\";\n\n// theme\nexport { default as hvTheme } from \"./theme\";\nexport { themeBuilder, getTheme } from \"./theme\";\n\n// provider\nexport { default as HvProvider } from \"./Provider\";\nexport * from \"./Provider\";\n\n// utils\nexport * from \"./utils\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,WAApB,QAAuC,aAAvC;AACA,SAASD,OAAO,IAAIE,gBAApB,QAA4C,kBAA5C;AACA,SAASF,OAAO,IAAIG,WAApB,QAAuC,aAAvC;AACA,SAASH,OAAO,IAAII,aAApB,QAAyC,eAAzC;AACA,SAASJ,OAAO,IAAIK,gBAApB,QAA4C,kBAA5C;AACA,cAAc,kBAAd;AACA,SAASL,OAAO,IAAIM,QAApB,QAAoC,UAApC;AACA,SAASN,OAAO,IAAIO,OAApB,QAAmC,SAAnC;AACA,SAASP,OAAO,IAAIQ,QAApB,QAAoC,UAApC;AACA,cAAc,UAAd;AACA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/F,OAAO,IAAIgG,UAApB,QAAsC,YAAtC;AACA,cAAc,YAAd,C,CAEA;;AACA,cAAc,SAAd"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","HvAccordion","HvActionsGeneric","HvActionBar","HvAppSwitcher","HvAssetInventory","HvAvatar","HvBadge","HvBanner","HvBarchart","HvBaseDropdown","HvBreadcrumb","HvBulkActions","HvButton","HvCard","HvContainer","HvDatePicker","HvDonutchart","HvDropdown","HvDropDownMenu","HvEmptyState","HvFilterGroup","HvFileUploader","HvFooter","HvGrid","HvGlobalActions","HvHeader","HvBaseInput","HvInput","HvSlider","HvKpi","HvLinechart","HvLink","HvListContainer","HvList","HvSelectionList","HvLoading","HvLogin","HvDialog","HvMultiButton","HvPagination","HvBaseCheckBox","HvCheckBox","HvCheckBoxGroup","HvBaseRadio","HvRadio","HvRadioGroup","HvBaseSwitch","HvSwitch","HvSnackbar","HvSnackbarContent","HvSnackbarProvider","useHvSnackbar","HvStack","HvTab","HvTag","HvTable","HvTabs","HvTextArea","HvTagsInput","HvToggleButton","HvTooltip","HvOverflowTooltip","HvTypography","HvUserPreferences","Actions","HvUserPreferencesActions","Action","HvUserPreferencesAction","Options","HvUserPreferencesOptions","Option","HvUserPreferencesOption","Group","HvUserPreferencesOptionsGroup","Label","HvUserPreferencesOptionsGroupLabel","HvScrollToHorizontal","HvScrollToVertical","useScrollTo","HvVerticalNavigation","Navigation","HvVerticalNavigationTree","TreeView","HvTreeView","TreeViewItem","HvTreeViewItem","HvVerticalNavigationActions","HvVerticalNavigationAction","HvPanel","withId","withTooltip","useUniqueId","hvTheme","themeBuilder","getTheme","HvCssBaseline","HvScopedCssBaseline","HvProvider"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvAccordion } from \"./Accordion\";\nexport { default as HvActionsGeneric } from \"./ActionsGeneric\";\nexport { default as HvActionBar } from \"./ActionBar\";\nexport { default as HvAppSwitcher } from \"./AppSwitcher\";\nexport { default as HvAssetInventory } from \"./AssetInventory\";\nexport * from \"./AssetInventory\";\nexport { default as HvAvatar } from \"./Avatar\";\nexport { default as HvBadge } from \"./Badge\";\nexport { default as HvBanner } from \"./Banner\";\nexport * from \"./Banner\";\nexport { default as HvBarchart } from \"./Barchart\";\nexport { default as HvBaseDropdown } from \"./BaseDropdown\";\nexport { default as HvBreadcrumb } from \"./BreadCrumb\";\nexport { default as HvBulkActions } from \"./BulkActions\";\nexport { default as HvButton } from \"./Button\";\nexport { default as HvCard } from \"./Card\";\nexport * from \"./Card\";\nexport * from \"./Calendar\";\nexport { default as HvContainer } from \"./Container\";\nexport { default as HvDatePicker } from \"./DatePicker\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvDropdown } from \"./Dropdown\";\nexport { default as HvDropDownMenu } from \"./DropDownMenu\";\nexport { default as HvEmptyState } from \"./EmptyState\";\nexport { default as HvFilterGroup } from \"./FilterGroup\";\nexport { default as HvFileUploader } from \"./FileUploader\";\nexport * from \"./FileUploader\";\nexport { default as HvFooter } from \"./Footer\";\nexport * from \"./Forms\";\n\nexport { default as HvGrid } from \"./Grid\";\nexport { default as HvGlobalActions } from \"./GlobalActions\";\n\nexport { default as HvHeader } from \"./Header\";\nexport * from \"./Header\";\n\nexport { default as HvBaseInput } from \"./BaseInput\";\nexport { default as HvInput } from \"./Input\";\n\nexport { default as HvSlider } from \"./Slider\";\n\nexport { default as HvKpi } from \"./Kpi\";\n\nexport { default as HvLinechart } from \"./Linechart\";\nexport { default as HvLink } from \"./Link\";\nexport { default as HvListContainer } from \"./ListContainer\";\nexport * from \"./ListContainer\";\n\nexport { default as HvList } from \"./List\";\n\nexport { default as HvSelectionList } from \"./SelectionList\";\n\nexport { default as HvLoading } from \"./Loading\";\nexport { default as HvLogin } from \"./Login\";\nexport { default as HvDialog } from \"./Dialog\";\nexport * from \"./Dialog\";\nexport { default as HvMultiButton } from \"./MultiButton\";\nexport { default as HvPagination } from \"./Pagination\";\n\nexport { default as HvBaseCheckBox } from \"./BaseCheckBox\";\nexport { default as HvCheckBox } from \"./CheckBox\";\nexport { default as HvCheckBoxGroup } from \"./CheckBoxGroup\";\n\nexport { default as HvBaseRadio } from \"./BaseRadio\";\nexport { default as HvRadio } from \"./Radio\";\nexport { default as HvRadioGroup } from \"./RadioGroup\";\n\nexport { default as HvBaseSwitch } from \"./BaseSwitch\";\nexport { default as HvSwitch } from \"./Switch\";\n\nexport { default as HvSnackbar } from \"./Snackbar\";\nexport { default as HvSnackbarContent } from \"./Snackbar/SnackbarContentWrapper\";\nexport { default as HvSnackbarProvider, useHvSnackbar } from \"./Snackbar/SnackbarProvider\";\nexport { default as HvStack } from \"./Stack\";\n\nexport { default as HvTab } from \"./Tab\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvTable } from \"./Table\";\nexport { default as HvTabs } from \"./Tabs\";\nexport { default as HvTextArea } from \"./TextArea\";\nexport { default as HvTagsInput } from \"./TagsInput\";\nexport { default as HvToggleButton } from \"./ToggleButton\";\nexport { default as HvTooltip } from \"./Tooltip\";\nexport { default as HvOverflowTooltip } from \"./OverflowTooltip\";\nexport { default as HvTypography } from \"./Typography\";\nexport { default as HvUserPreferences } from \"./UserPreferences\";\n// TODO refactor the HvUserPreferences subcomponents' names\nexport {\n Actions as HvUserPreferencesActions,\n Action as HvUserPreferencesAction,\n} from \"./UserPreferences\";\nexport {\n Options as HvUserPreferencesOptions,\n Option as HvUserPreferencesOption,\n Group as HvUserPreferencesOptionsGroup,\n Label as HvUserPreferencesOptionsGroupLabel,\n} from \"./UserPreferences\";\n\nexport { default as HvScrollToHorizontal } from \"./ScrollTo/Horizontal\";\nexport { default as HvScrollToVertical } from \"./ScrollTo/Vertical\";\nexport { default as useScrollTo } from \"./ScrollTo/useScrollTo\";\n\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n// TODO refactor the HvVerticalNavigation subcomponents' names\nexport { Navigation as HvVerticalNavigationTree } from \"./VerticalNavigation\";\nexport { TreeView as HvTreeView, TreeViewItem as HvTreeViewItem } from \"./VerticalNavigation\";\nexport {\n Actions as HvVerticalNavigationActions,\n Action as HvVerticalNavigationAction,\n} from \"./VerticalNavigation\";\n\nexport { default as HvPanel } from \"./Panel\";\n\n// HOCs\nexport { default as withId } from \"./withId\";\nexport { default as withTooltip } from \"./withTooltip\";\n\n// Hooks\nexport { default as useUniqueId } from \"./useUniqueId\";\n\n// theme\nexport { default as hvTheme } from \"./theme\";\nexport { themeBuilder, getTheme } from \"./theme\";\nexport { HvCssBaseline, HvScopedCssBaseline } from \"./theme\";\n\n// provider\nexport { default as HvProvider } from \"./Provider\";\nexport * from \"./Provider\";\n\n// utils\nexport * from \"./utils\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,WAApB,QAAuC,aAAvC;AACA,SAASD,OAAO,IAAIE,gBAApB,QAA4C,kBAA5C;AACA,SAASF,OAAO,IAAIG,WAApB,QAAuC,aAAvC;AACA,SAASH,OAAO,IAAII,aAApB,QAAyC,eAAzC;AACA,SAASJ,OAAO,IAAIK,gBAApB,QAA4C,kBAA5C;AACA,cAAc,kBAAd;AACA,SAASL,OAAO,IAAIM,QAApB,QAAoC,UAApC;AACA,SAASN,OAAO,IAAIO,OAApB,QAAmC,SAAnC;AACA,SAASP,OAAO,IAAIQ,QAApB,QAAoC,UAApC;AACA,cAAc,UAAd;AACA,SAASR,OAAO,IAAIS,UAApB,QAAsC,YAAtC;AACA,SAAST,OAAO,IAAIU,cAApB,QAA0C,gBAA1C;AACA,SAASV,OAAO,IAAIW,YAApB,QAAwC,cAAxC;AACA,SAASX,OAAO,IAAIY,aAApB,QAAyC,eAAzC;AACA,SAASZ,OAAO,IAAIa,QAApB,QAAoC,UAApC;AACA,SAASb,OAAO,IAAIc,MAApB,QAAkC,QAAlC;AACA,cAAc,QAAd;AACA,cAAc,YAAd;AACA,SAASd,OAAO,IAAIe,WAApB,QAAuC,aAAvC;AACA,SAASf,OAAO,IAAIgB,YAApB,QAAwC,cAAxC;AACA,SAAShB,OAAO,IAAIiB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FZ,EAGEC,KAAK,IAAIC,6BAHX,EAIEC,KAAK,IAAIC,kCAJX,QAKO,mBALP;AAOA,SAAS5E,OAAO,IAAI6E,oBAApB,QAAgD,uBAAhD;AACA,SAAS7E,OAAO,IAAI8E,kBAApB,QAA8C,qBAA9C;AACA,SAAS9E,OAAO,IAAI+E,WAApB,QAAuC,wBAAvC;AAEA,SAAS/E,OAAO,IAAIgF,oBAApB,QAAgD,sBAAhD,C,CACA;;AACA,SAASC,UAAU,IAAIC,wBAAvB,QAAuD,sBAAvD;AACA,SAASC,QAAQ,IAAIC,UAArB,EAAiCC,YAAY,IAAIC,cAAjD,QAAuE,sBAAvE;AACA,SACErB,OAAO,IAAIsB,2BADb,EAEEpB,MAAM,IAAIqB,0BAFZ,QAGO,sBAHP;AAKA,SAASxF,OAAO,IAAIyF,OAApB,QAAmC,SAAnC,C,CAEA;;AACA,SAASzF,OAAO,IAAI0F,MAApB,QAAkC,UAAlC;AACA,SAAS1F,OAAO,IAAI2F,WAApB,QAAuC,eAAvC,C,CAEA;;AACA,SAAS3F,OAAO,IAAI4F,WAApB,QAAuC,eAAvC,C,CAEA;;AACA,SAAS5F,OAAO,IAAI6F,OAApB,QAAmC,SAAnC;AACA,SAASC,YAAT,EAAuBC,QAAvB,QAAuC,SAAvC;AACA,SAASC,aAAT,EAAwBC,mBAAxB,QAAmD,SAAnD,C,CAEA;;AACA,SAASjG,OAAO,IAAIkG,UAApB,QAAsC,YAAtC;AACA,cAAc,YAAd,C,CAEA;;AACA,cAAc,SAAd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function HvCssBaseline(): null;
|
|
@@ -5,25 +5,30 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
7
|
import { makeStyles } from "@material-ui/core/styles";
|
|
8
|
-
const html = {
|
|
8
|
+
export const html = {
|
|
9
9
|
WebkitFontSmoothing: "antialiased",
|
|
10
10
|
// Antialiasing.
|
|
11
11
|
MozOsxFontSmoothing: "grayscale",
|
|
12
12
|
// Antialiasing.
|
|
13
13
|
// Change from `box-sizing: content-box` so that `width`
|
|
14
14
|
// is not affected by `padding` or `border`.
|
|
15
|
-
boxSizing: "border-box"
|
|
15
|
+
boxSizing: "border-box",
|
|
16
|
+
// Prevent adjustments of font size after orientation changes in iOS.
|
|
17
|
+
TextSizeAdjust: "none",
|
|
18
|
+
WebkitTextSizeAdjust: "none",
|
|
19
|
+
MozTextSizeAdjust: "none"
|
|
16
20
|
};
|
|
17
|
-
|
|
18
|
-
const body = theme => _objectSpread(_objectSpread({
|
|
21
|
+
export const body = theme => _objectSpread(_objectSpread({
|
|
19
22
|
fontFamily: theme.hv.typography.fontFamily
|
|
20
23
|
}, theme.hv.typography.normalText), {}, {
|
|
24
|
+
color: theme.hv.palette.accent.acce1,
|
|
21
25
|
backgroundColor: theme.hv.palette.atmosphere.atmo2,
|
|
26
|
+
colorScheme: theme.hv.type,
|
|
27
|
+
accentColor: theme.hv.palette.accent.acce1,
|
|
22
28
|
"@media print": {
|
|
23
29
|
backgroundColor: "white"
|
|
24
30
|
}
|
|
25
31
|
});
|
|
26
|
-
|
|
27
32
|
const useStyles = makeStyles(theme => ({
|
|
28
33
|
"@global": {
|
|
29
34
|
html,
|
|
@@ -41,33 +46,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
41
46
|
"&::backdrop": {
|
|
42
47
|
backgroundColor: theme.hv.palette.atmosphere.atmo3
|
|
43
48
|
}
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
/* clears input's clear and reveal buttons from IE */
|
|
47
|
-
"input[type=search]::-ms-clear": {
|
|
48
|
-
display: "none",
|
|
49
|
-
width: 0,
|
|
50
|
-
height: 0
|
|
51
|
-
},
|
|
52
|
-
"input[type=search]::-ms-reveal": {
|
|
53
|
-
display: "none",
|
|
54
|
-
width: 0,
|
|
55
|
-
height: 0
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
/* clears input's clear button from Chrome */
|
|
59
|
-
'input[type="search"]::-webkit-search-decoration': {
|
|
60
|
-
display: "none"
|
|
61
|
-
},
|
|
62
|
-
'input[type="search"]::-webkit-search-cancel-button': {
|
|
63
|
-
display: "none"
|
|
64
|
-
},
|
|
65
|
-
'input[type="search"]::-webkit-search-results-button': {
|
|
66
|
-
display: "none"
|
|
67
|
-
},
|
|
68
|
-
'input[type="search"]::-webkit-search-results-decoration': {
|
|
69
|
-
display: "none"
|
|
70
|
-
}
|
|
49
|
+
})
|
|
71
50
|
}
|
|
72
51
|
}));
|
|
73
52
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CssBaseline.js","names":["makeStyles","html","WebkitFontSmoothing","MozOsxFontSmoothing","boxSizing","body","theme","fontFamily","hv","typography","normalText","
|
|
1
|
+
{"version":3,"file":"CssBaseline.js","names":["makeStyles","html","WebkitFontSmoothing","MozOsxFontSmoothing","boxSizing","TextSizeAdjust","WebkitTextSizeAdjust","MozTextSizeAdjust","body","theme","fontFamily","hv","typography","normalText","color","palette","accent","acce1","backgroundColor","atmosphere","atmo2","colorScheme","type","accentColor","useStyles","fontWeight","highlightText","margin","atmo3","CssBaseline"],"sources":["../../../src/theme/CssBaseline.js"],"sourcesContent":["import { makeStyles } from \"@material-ui/core/styles\";\n\nexport const html = {\n WebkitFontSmoothing: \"antialiased\", // Antialiasing.\n MozOsxFontSmoothing: \"grayscale\", // Antialiasing.\n // Change from `box-sizing: content-box` so that `width`\n // is not affected by `padding` or `border`.\n boxSizing: \"border-box\",\n\n // Prevent adjustments of font size after orientation changes in iOS.\n TextSizeAdjust: \"none\",\n WebkitTextSizeAdjust: \"none\",\n MozTextSizeAdjust: \"none\",\n};\n\nexport const body = (theme) => ({\n fontFamily: theme.hv.typography.fontFamily,\n ...theme.hv.typography.normalText,\n\n color: theme.hv.palette.accent.acce1,\n backgroundColor: theme.hv.palette.atmosphere.atmo2,\n\n colorScheme: theme.hv.type,\n accentColor: theme.hv.palette.accent.acce1,\n\n \"@media print\": {\n backgroundColor: \"white\",\n },\n});\n\nconst useStyles = makeStyles((theme) => ({\n \"@global\": {\n html,\n \"*, *::before, *::after\": {\n boxSizing: \"inherit\",\n },\n \"strong, b\": {\n fontWeight: theme.hv.typography.highlightText.fontWeight,\n },\n body: {\n margin: 0,\n ...body(theme),\n // Add support for document.body.requestFullScreen().\n // Other elements, if background transparent, are not supported.\n \"&::backdrop\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n },\n },\n },\n}));\n\n/**\n * Kickstart an elegant, consistent, and simple baseline to build upon.\n */\nfunction CssBaseline() {\n useStyles();\n\n return null;\n}\n\nexport default CssBaseline;\n"],"mappings":";;;;;;AAAA,SAASA,UAAT,QAA2B,0BAA3B;AAEA,OAAO,MAAMC,IAAI,GAAG;EAClBC,mBAAmB,EAAE,aADH;EACkB;EACpCC,mBAAmB,EAAE,WAFH;EAEgB;EAClC;EACA;EACAC,SAAS,EAAE,YALO;EAOlB;EACAC,cAAc,EAAE,MARE;EASlBC,oBAAoB,EAAE,MATJ;EAUlBC,iBAAiB,EAAE;AAVD,CAAb;AAaP,OAAO,MAAMC,IAAI,GAAIC,KAAD;EAClBC,UAAU,EAAED,KAAK,CAACE,EAAN,CAASC,UAAT,CAAoBF;AADd,GAEfD,KAAK,CAACE,EAAN,CAASC,UAAT,CAAoBC,UAFL;EAIlBC,KAAK,EAAEL,KAAK,CAACE,EAAN,CAASI,OAAT,CAAiBC,MAAjB,CAAwBC,KAJb;EAKlBC,eAAe,EAAET,KAAK,CAACE,EAAN,CAASI,O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