@hitachivantara/uikit-react-core 3.67.5 → 3.67.8
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/Dialog/Dialog.js +3 -3
- package/dist/Dialog/Dialog.js.map +1 -1
- package/dist/Dialog/DialogActions/styles.js +3 -1
- package/dist/Dialog/DialogActions/styles.js.map +1 -1
- package/dist/Dialog/DialogContent/styles.js +3 -1
- package/dist/Dialog/DialogContent/styles.js.map +1 -1
- package/dist/Dialog/DialogTitle/DialogTitle.js +3 -2
- package/dist/Dialog/DialogTitle/DialogTitle.js.map +1 -1
- package/dist/Dialog/DialogTitle/styles.js +3 -2
- package/dist/Dialog/DialogTitle/styles.js.map +1 -1
- package/dist/Dialog/styles.js +3 -1
- package/dist/Dialog/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/VerticalNavigation/Navigation/Navigation.d.ts +8 -0
- package/dist/VerticalNavigation/Navigation/Navigation.js +4 -2
- package/dist/VerticalNavigation/Navigation/Navigation.js.map +1 -1
- package/dist/VerticalNavigation/TreeView/TreeViewItem.js +5 -2
- package/dist/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
- package/dist/VerticalNavigation/TreeView/styles.js +0 -1
- package/dist/VerticalNavigation/TreeView/styles.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/Dialog/Dialog.js +3 -3
- package/dist/legacy/Dialog/Dialog.js.map +1 -1
- package/dist/legacy/Dialog/DialogActions/styles.js +3 -1
- package/dist/legacy/Dialog/DialogActions/styles.js.map +1 -1
- package/dist/legacy/Dialog/DialogContent/styles.js +3 -1
- package/dist/legacy/Dialog/DialogContent/styles.js.map +1 -1
- package/dist/legacy/Dialog/DialogTitle/DialogTitle.js +3 -2
- package/dist/legacy/Dialog/DialogTitle/DialogTitle.js.map +1 -1
- package/dist/legacy/Dialog/DialogTitle/styles.js +3 -2
- package/dist/legacy/Dialog/DialogTitle/styles.js.map +1 -1
- package/dist/legacy/Dialog/styles.js +3 -1
- package/dist/legacy/Dialog/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/VerticalNavigation/Navigation/Navigation.d.ts +8 -0
- package/dist/legacy/VerticalNavigation/Navigation/Navigation.js +4 -2
- package/dist/legacy/VerticalNavigation/Navigation/Navigation.js.map +1 -1
- package/dist/legacy/VerticalNavigation/TreeView/TreeViewItem.js +5 -2
- package/dist/legacy/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
- package/dist/legacy/VerticalNavigation/TreeView/styles.js +0 -1
- package/dist/legacy/VerticalNavigation/TreeView/styles.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/Dialog/Dialog.js +3 -3
- package/dist/modern/Dialog/Dialog.js.map +1 -1
- package/dist/modern/Dialog/DialogActions/styles.js +3 -1
- package/dist/modern/Dialog/DialogActions/styles.js.map +1 -1
- package/dist/modern/Dialog/DialogContent/styles.js +3 -1
- package/dist/modern/Dialog/DialogContent/styles.js.map +1 -1
- package/dist/modern/Dialog/DialogTitle/DialogTitle.js +5 -2
- package/dist/modern/Dialog/DialogTitle/DialogTitle.js.map +1 -1
- package/dist/modern/Dialog/DialogTitle/styles.js +3 -2
- package/dist/modern/Dialog/DialogTitle/styles.js.map +1 -1
- package/dist/modern/Dialog/styles.js +3 -1
- package/dist/modern/Dialog/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/VerticalNavigation/Navigation/Navigation.d.ts +8 -0
- package/dist/modern/VerticalNavigation/Navigation/Navigation.js +4 -2
- package/dist/modern/VerticalNavigation/Navigation/Navigation.js.map +1 -1
- package/dist/modern/VerticalNavigation/TreeView/TreeViewItem.js +5 -2
- package/dist/modern/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
- package/dist/modern/VerticalNavigation/TreeView/styles.js +0 -1
- package/dist/modern/VerticalNavigation/TreeView/styles.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
|
@@ -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,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,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ACO,EAAN,CAAS+B,UAAT,CAAoBI,eADzB;MAEEC,OAAO,EAAE;IAFX,EATG;IAaH,gBAAgB;MACdzC,OAAO,EAAE;IADK,CAbb;IAgBHC,KAAK,EAAE,SAhBJ;IAiBHyC,QAAQ,EAAE;EAjBP,EA5JoB;EA+KzBC,aAAa,EAAE;IACbC,KAAK,EAAE9C,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBO,UAAjB,CAA4BgC;EADtB,CA/KU;EAkLzBC,cAAc,EAAE;IACdC,MAAM,EAAE,MADM;IAEd9C,KAAK,EAAE;EAFO,CAlLS;EAuLzB+C,oBAAoB,EAAE;IACpB9C,QAAQ,EAAE,UADU;IAEpBD,KAAK,EAAE,kBAFa;IAGpB4B,MAAM,EAAE,KAHY;IAIpBoB,GAAG,EAAE,MAJe;IAKpBC,IAAI,EAAE,KALc;IAMpBzC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBO,UAAjB,CAA4BC;EANzB,CAvLG;EAgMzB,WAAW;IACT,0BAA0B;MACxB,sBAAuB,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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E;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"}
|
|
@@ -105,9 +105,9 @@ const HvDialog = _ref => {
|
|
|
105
105
|
},
|
|
106
106
|
onClose: (event, reason) => onClose(event, reason),
|
|
107
107
|
onKeyDown: keyDownHandler
|
|
108
|
-
}, others
|
|
108
|
+
}, others, {
|
|
109
109
|
"aria-modal": true
|
|
110
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
110
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
111
111
|
id: setId(id, "close"),
|
|
112
112
|
className: classes.closeButton,
|
|
113
113
|
category: "ghost",
|
|
@@ -115,7 +115,7 @@ const HvDialog = _ref => {
|
|
|
115
115
|
"aria-label": buttonTitle
|
|
116
116
|
}, /*#__PURE__*/React.createElement(CloseButtonTooltipWrapper, null)), children && typeof children === "object" ? React.Children.map(children, c => /*#__PURE__*/React.cloneElement(c, {
|
|
117
117
|
fullscreen
|
|
118
|
-
})) : children)
|
|
118
|
+
})) : children);
|
|
119
119
|
};
|
|
120
120
|
|
|
121
121
|
process.env.NODE_ENV !== "production" ? HvDialog.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","names":["React","useCallback","useState","clsx","PropTypes","Dialog","withStyles","Close","isNil","Button","isKeypress","KeyboardCodes","setId","styles","withTooltip","getFocusableList","HvDialog","classes","className","id","children","open","onClose","firstFocusable","buttonTitle","fullscreen","others","focusableQueue","setFocusableQueue","measuredRef","node","focusableList","first","last","length","focus","element","document","getElementById","console","warn","keyDownHandler","event","Tab","target","shiftKey","preventDefault","Esc","onEscapeKeyDown","disableEscapeKeyDown","stopPropagation","closeButtonDisplay","CloseButtonTooltipWrapper","root","paper","background","reason","closeButton","Children","map","c","cloneElement","propTypes","string","shape","isRequired","bool","func","name"],"sources":["../../../src/Dialog/Dialog.js"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { Dialog, withStyles } from \"@material-ui/core\";\nimport { Close } from \"@hitachivantara/uikit-react-icons\";\nimport isNil from \"lodash/isNil\";\nimport Button from \"../Button\";\nimport { isKeypress, KeyboardCodes, setId } from \"../utils\";\nimport styles from \"./styles\";\nimport withTooltip from \"../withTooltip\";\nimport { getFocusableList } from \"../utils/focusableElementFinder\";\n\n/**\n * The Dialog component provides a solid foundation for creating dialogs, popovers, lightboxes, etc.\n * It is created by the composition of DialogTitle, DialogContent and DialogActions components, passed as child elements.\n */\nconst HvDialog = ({\n classes,\n className,\n id,\n children,\n open,\n onClose,\n firstFocusable,\n buttonTitle = \"Close\",\n fullscreen = false,\n ...others\n}) => {\n const [focusableQueue, setFocusableQueue] = useState(null);\n\n const measuredRef = useCallback(\n (node) => {\n if (node) {\n const focusableList = getFocusableList(node);\n setFocusableQueue({\n first: focusableList[1],\n last: focusableList[focusableList.length - 2],\n });\n if (isNil(firstFocusable)) focusableList[1].focus();\n else {\n const element = document.getElementById(firstFocusable);\n if (element) element.focus();\n else {\n // eslint-disable-next-line no-console\n console.warn(`firstFocusable element ${firstFocusable} not found.`);\n focusableList[1].focus();\n }\n }\n }\n },\n [firstFocusable]\n );\n\n const keyDownHandler = (event) => {\n if (isKeypress(event, KeyboardCodes.Tab) && !isNil(event.target) && !isNil(focusableQueue)) {\n if (event.shiftKey && event.target === focusableQueue.first) {\n focusableQueue.last.focus();\n event.preventDefault();\n }\n if (!event.shiftKey && event.target === focusableQueue.last) {\n focusableQueue.first.focus();\n event.preventDefault();\n }\n }\n // Needed as this handler overrides the one in the material ui Modal.\n else if (isKeypress(event, KeyboardCodes.Esc)) {\n if (others.onEscapeKeyDown) {\n others.onEscapeKeyDown(event);\n }\n\n if (!others.disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n\n if (onClose) {\n onClose(event, \"escapeKeyDown\");\n }\n }\n }\n };\n\n const closeButtonDisplay = () => <Close role=\"presentation\" />;\n\n const CloseButtonTooltipWrapper = buttonTitle\n ? withTooltip(closeButtonDisplay, buttonTitle, \"top\")\n : closeButtonDisplay;\n\n return (\n <Dialog\n className={clsx(classes.root, className)}\n id={id}\n ref={measuredRef}\n open={open}\n PaperProps={{\n classes: {\n root: clsx(classes.paper, fullscreen ? \"fullscreen\" : \"\"),\n },\n }}\n fullScreen={fullscreen}\n BackdropProps={{\n classes: {\n root: classes.background,\n },\n }}\n onClose={(event, reason) => onClose(event, reason)}\n onKeyDown={keyDownHandler}\n {...others}\n >\n <div aria-modal>\n <Button\n id={setId(id, \"close\")}\n className={classes.closeButton}\n category=\"ghost\"\n onClick={(event) => onClose(event)}\n aria-label={buttonTitle}\n >\n <CloseButtonTooltipWrapper />\n </Button>\n {children && typeof children === \"object\"\n ? React.Children.map(children, (c) => React.cloneElement(c, { fullscreen }))\n : children}\n </div>\n </Dialog>\n );\n};\n\nHvDialog.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\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 styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the background (outside) of the component.\n */\n background: PropTypes.string,\n /**\n * Style applied to the component (root).\n */\n paper: PropTypes.string,\n /**\n * Style applied to the close button.\n */\n closeButton: PropTypes.string,\n }).isRequired,\n /**\n * Components of the Dialog.\n */\n children: PropTypes.node.isRequired,\n /**\n * Current state of the Dialog.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Function executed on close.\n */\n onClose: PropTypes.func.isRequired,\n /**\n * Element id that should be focus when the Dialog opens.\n */\n firstFocusable: PropTypes.string,\n /**\n * Title for the button close.\n */\n buttonTitle: PropTypes.string,\n /**\n * Set the dialog to fullscreen mode.\n */\n fullscreen: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvDialog\" })(HvDialog);\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,QAA7B,QAA6C,OAA7C;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,MAAT,EAAiBC,UAAjB,QAAmC,mBAAnC;AACA,SAASC,KAAT,QAAsB,mCAAtB;AACA,OAAOC,KAAP,MAAkB,cAAlB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,UAAT,EAAqBC,aAArB,EAAoCC,KAApC,QAAiD,UAAjD;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,WAAP,MAAwB,gBAAxB;AACA,SAASC,gBAAT,QAAiC,iCAAjC;AAEA;AACA;AACA;AACA;;AACA,MAAMC,QAAQ,GAAG,QAWX;EAAA,IAXY;IAChBC,OADgB;IAEhBC,SAFgB;IAGhBC,EAHgB;IAIhBC,QAJgB;IAKhBC,IALgB;IAMhBC,OANgB;IAOhBC,cAPgB;IAQhBC,WAAW,GAAG,OARE;IAShBC,UAAU,GAAG;EATG,CAWZ;EAAA,IADDC,MACC;;EACJ,MAAM,CAACC,cAAD,EAAiBC,iBAAjB,IAAsC1B,QAAQ,CAAC,IAAD,CAApD;EAEA,MAAM2B,WAAW,GAAG5B,WAAW,CAC5B6B,IAAD,IAAU;IACR,IAAIA,IAAJ,EAAU;MACR,MAAMC,aAAa,GAAGhB,gBAAgB,CAACe,IAAD,CAAtC;MACAF,iBAAiB,CAAC;QAChBI,KAAK,EAAED,aAAa,CAAC,CAAD,CADJ;QAEhBE,IAA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dialog.js","names":["React","useCallback","useState","clsx","PropTypes","Dialog","withStyles","Close","isNil","Button","isKeypress","KeyboardCodes","setId","styles","withTooltip","getFocusableList","HvDialog","classes","className","id","children","open","onClose","firstFocusable","buttonTitle","fullscreen","others","focusableQueue","setFocusableQueue","measuredRef","node","focusableList","first","last","length","focus","element","document","getElementById","console","warn","keyDownHandler","event","Tab","target","shiftKey","preventDefault","Esc","onEscapeKeyDown","disableEscapeKeyDown","stopPropagation","closeButtonDisplay","CloseButtonTooltipWrapper","root","paper","background","reason","closeButton","Children","map","c","cloneElement","propTypes","string","shape","isRequired","bool","func","name"],"sources":["../../../src/Dialog/Dialog.js"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { Dialog, withStyles } from \"@material-ui/core\";\nimport { Close } from \"@hitachivantara/uikit-react-icons\";\nimport isNil from \"lodash/isNil\";\nimport Button from \"../Button\";\nimport { isKeypress, KeyboardCodes, setId } from \"../utils\";\nimport styles from \"./styles\";\nimport withTooltip from \"../withTooltip\";\nimport { getFocusableList } from \"../utils/focusableElementFinder\";\n\n/**\n * The Dialog component provides a solid foundation for creating dialogs, popovers, lightboxes, etc.\n * It is created by the composition of DialogTitle, DialogContent and DialogActions components, passed as child elements.\n */\nconst HvDialog = ({\n classes,\n className,\n id,\n children,\n open,\n onClose,\n firstFocusable,\n buttonTitle = \"Close\",\n fullscreen = false,\n ...others\n}) => {\n const [focusableQueue, setFocusableQueue] = useState(null);\n\n const measuredRef = useCallback(\n (node) => {\n if (node) {\n const focusableList = getFocusableList(node);\n setFocusableQueue({\n first: focusableList[1],\n last: focusableList[focusableList.length - 2],\n });\n if (isNil(firstFocusable)) focusableList[1].focus();\n else {\n const element = document.getElementById(firstFocusable);\n if (element) element.focus();\n else {\n // eslint-disable-next-line no-console\n console.warn(`firstFocusable element ${firstFocusable} not found.`);\n focusableList[1].focus();\n }\n }\n }\n },\n [firstFocusable]\n );\n\n const keyDownHandler = (event) => {\n if (isKeypress(event, KeyboardCodes.Tab) && !isNil(event.target) && !isNil(focusableQueue)) {\n if (event.shiftKey && event.target === focusableQueue.first) {\n focusableQueue.last.focus();\n event.preventDefault();\n }\n if (!event.shiftKey && event.target === focusableQueue.last) {\n focusableQueue.first.focus();\n event.preventDefault();\n }\n }\n // Needed as this handler overrides the one in the material ui Modal.\n else if (isKeypress(event, KeyboardCodes.Esc)) {\n if (others.onEscapeKeyDown) {\n others.onEscapeKeyDown(event);\n }\n\n if (!others.disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n\n if (onClose) {\n onClose(event, \"escapeKeyDown\");\n }\n }\n }\n };\n\n const closeButtonDisplay = () => <Close role=\"presentation\" />;\n\n const CloseButtonTooltipWrapper = buttonTitle\n ? withTooltip(closeButtonDisplay, buttonTitle, \"top\")\n : closeButtonDisplay;\n\n return (\n <Dialog\n className={clsx(classes.root, className)}\n id={id}\n ref={measuredRef}\n open={open}\n PaperProps={{\n classes: {\n root: clsx(classes.paper, fullscreen ? \"fullscreen\" : \"\"),\n },\n }}\n fullScreen={fullscreen}\n BackdropProps={{\n classes: {\n root: classes.background,\n },\n }}\n onClose={(event, reason) => onClose(event, reason)}\n onKeyDown={keyDownHandler}\n {...others}\n aria-modal\n >\n <Button\n id={setId(id, \"close\")}\n className={classes.closeButton}\n category=\"ghost\"\n onClick={(event) => onClose(event)}\n aria-label={buttonTitle}\n >\n <CloseButtonTooltipWrapper />\n </Button>\n {children && typeof children === \"object\"\n ? React.Children.map(children, (c) => React.cloneElement(c, { fullscreen }))\n : children}\n </Dialog>\n );\n};\n\nHvDialog.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\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 styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the background (outside) of the component.\n */\n background: PropTypes.string,\n /**\n * Style applied to the component (root).\n */\n paper: PropTypes.string,\n /**\n * Style applied to the close button.\n */\n closeButton: PropTypes.string,\n }).isRequired,\n /**\n * Components of the Dialog.\n */\n children: PropTypes.node.isRequired,\n /**\n * Current state of the Dialog.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Function executed on close.\n */\n onClose: PropTypes.func.isRequired,\n /**\n * Element id that should be focus when the Dialog opens.\n */\n firstFocusable: PropTypes.string,\n /**\n * Title for the button close.\n */\n buttonTitle: PropTypes.string,\n /**\n * Set the dialog to fullscreen mode.\n */\n fullscreen: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvDialog\" })(HvDialog);\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,QAA7B,QAA6C,OAA7C;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,MAAT,EAAiBC,UAAjB,QAAmC,mBAAnC;AACA,SAASC,KAAT,QAAsB,mCAAtB;AACA,OAAOC,KAAP,MAAkB,cAAlB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,UAAT,EAAqBC,aAArB,EAAoCC,KAApC,QAAiD,UAAjD;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,WAAP,MAAwB,gBAAxB;AACA,SAASC,gBAAT,QAAiC,iCAAjC;AAEA;AACA;AACA;AACA;;AACA,MAAMC,QAAQ,GAAG,QAWX;EAAA,IAXY;IAChBC,OADgB;IAEhBC,SAFgB;IAGhBC,EAHgB;IAIhBC,QAJgB;IAKhBC,IALgB;IAMhBC,OANgB;IAOhBC,cAPgB;IAQhBC,WAAW,GAAG,OARE;IAShBC,UAAU,GAAG;EATG,CAWZ;EAAA,IADDC,MACC;;EACJ,MAAM,CAACC,cAAD,EAAiBC,iBAAjB,IAAsC1B,QAAQ,CAAC,IAAD,CAApD;EAEA,MAAM2B,WAAW,GAAG5B,W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EACEtC,UAAU,EAAErB,SAAS,CAAC8D;AArDH,CAArB;AAwDA,eAAe5D,UAAU,CAACO,MAAD,EAAS;EAAEuD,IAAI,EAAE;AAAR,CAAT,CAAV,CAAyCpD,QAAzC,CAAf"}
|
|
@@ -2,7 +2,9 @@ const styles = theme => ({
|
|
|
2
2
|
root: {
|
|
3
3
|
margin: "0",
|
|
4
4
|
padding: theme.hv.spacing.sm,
|
|
5
|
-
borderTop: `3px solid ${theme.hv.palette.atmosphere.atmo2}
|
|
5
|
+
borderTop: `3px solid ${theme.hv.palette.atmosphere.atmo2}`,
|
|
6
|
+
height: 100,
|
|
7
|
+
flex: 1
|
|
6
8
|
},
|
|
7
9
|
spacing: {
|
|
8
10
|
"& > :not(:first-child)": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","margin","padding","hv","spacing","sm","borderTop","palette","atmosphere","atmo2","marginLeft","xs","fullscreen","position","width","bottom","left"],"sources":["../../../../src/Dialog/DialogActions/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n margin: \"0\",\n padding: theme.hv.spacing.sm,\n borderTop: `3px solid ${theme.hv.palette.atmosphere.atmo2}`,\n },\n spacing: {\n \"& > :not(:first-child)\": {\n marginLeft: theme.hv.spacing.xs,\n },\n },\n fullscreen: {\n position: \"fixed\",\n width: \"100%\",\n bottom: 0,\n left: 0,\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAIC,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,MAAM,EAAE,GADJ;IAEJC,OAAO,EAAEH,KAAK,CAACI,EAAN,CAASC,OAAT,CAAiBC,EAFtB;IAGJC,SAAS,EAAG,aAAYP,KAAK,CAACI,EAAN,CAASI,OAAT,CAAiBC,UAAjB,CAA4BC,KAAM;
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","margin","padding","hv","spacing","sm","borderTop","palette","atmosphere","atmo2","height","flex","marginLeft","xs","fullscreen","position","width","bottom","left"],"sources":["../../../../src/Dialog/DialogActions/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n margin: \"0\",\n padding: theme.hv.spacing.sm,\n borderTop: `3px solid ${theme.hv.palette.atmosphere.atmo2}`,\n height: 100,\n flex: 1,\n },\n spacing: {\n \"& > :not(:first-child)\": {\n marginLeft: theme.hv.spacing.xs,\n },\n },\n fullscreen: {\n position: \"fixed\",\n width: \"100%\",\n bottom: 0,\n left: 0,\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAIC,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,MAAM,EAAE,GADJ;IAEJC,OAAO,EAAEH,KAAK,CAACI,EAAN,CAASC,OAAT,CAAiBC,EAFtB;IAGJC,SAAS,EAAG,aAAYP,KAAK,CAACI,EAAN,CAASI,OAAT,CAAiBC,UAAjB,CAA4BC,KAAM,EAHtD;IAIJC,MAAM,EAAE,GAJJ;IAKJC,IAAI,EAAE;EALF,CADmB;EAQzBP,OAAO,EAAE;IACP,0BAA0B;MACxBQ,UAAU,EAAEb,KAAK,CAACI,EAAN,CAASC,OAAT,CAAiBS;IADL;EADnB,CARgB;EAazBC,UAAU,EAAE;IACVC,QAAQ,EAAE,OADA;IAEVC,KAAK,EAAE,MAFG;IAGVC,MAAM,EAAE,CAHE;IAIVC,IAAI,EAAE;EAJI;AAba,CAAZ,CAAf;;AAqBA,eAAepB,MAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","padding","hvSpacing","flex","textContent","marginLeft","
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","padding","hvSpacing","flex","textContent","marginLeft","paddingRight","overflowY"],"sources":["../../../../src/Dialog/DialogContent/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: theme.hvSpacing(0, \"sm\", \"sm\", \"sm\"),\n flex: \"none\",\n },\n textContent: {\n marginLeft: \"42px\",\n paddingRight: \"62px\",\n flex: 1,\n overflowY: \"auto\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAIC,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAEF,KAAK,CAACG,SAAN,CAAgB,CAAhB,EAAmB,IAAnB,EAAyB,IAAzB,EAA+B,IAA/B,CADL;IAEJC,IAAI,EAAE;EAFF,CADmB;EAKzBC,WAAW,EAAE;IACXC,UAAU,EAAE,MADD;IAEXC,YAAY,EAAE,MAFH;IAGXH,IAAI,EAAE,CAHK;IAIXI,SAAS,EAAE;EAJA;AALY,CAAZ,CAAf;;AAaA,eAAeT,MAAf"}
|
|
@@ -20,13 +20,16 @@ const HvDialogTitle = _ref => {
|
|
|
20
20
|
} = _ref,
|
|
21
21
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
22
22
|
|
|
23
|
-
const isString = typeof children === "string";
|
|
23
|
+
const isString = typeof children === "string";
|
|
24
|
+
const {
|
|
25
|
+
fullscreen
|
|
26
|
+
} = others; // prevent the `fullscreen` prop from being passed to the `DialogTitle` component
|
|
24
27
|
// eslint-disable-next-line no-param-reassign
|
|
25
28
|
|
|
26
29
|
delete others.fullscreen;
|
|
27
30
|
const icon = customIcon || showIcon && iconVariant(variant);
|
|
28
31
|
return /*#__PURE__*/React.createElement(DialogTitle, _extends({
|
|
29
|
-
className: clsx(classes.root, className),
|
|
32
|
+
className: clsx(classes.root, className, fullscreen && "fullscreen"),
|
|
30
33
|
disableTypography: true
|
|
31
34
|
}, others), /*#__PURE__*/React.createElement("div", {
|
|
32
35
|
className: classes.messageContainer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTitle.js","names":["React","PropTypes","clsx","DialogTitle","withStyles","HvTypography","iconVariant","styles","HvDialogTitle","classes","className","children","variant","showIcon","customIcon","others","isString","fullscreen","icon","root","messageContainer","textWithIcon","propTypes","string","shape","closeButton","isRequired","oneOf","bool","node","name"],"sources":["../../../../src/Dialog/DialogTitle/DialogTitle.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { DialogTitle, withStyles } from \"@material-ui/core\";\nimport HvTypography from \"../../Typography\";\nimport iconVariant from \"../../utils/iconVariant\";\nimport styles from \"./styles\";\n\nconst HvDialogTitle = ({\n classes,\n className,\n children,\n variant = \"default\",\n showIcon = true,\n customIcon = null,\n ...others\n}) => {\n const isString = typeof children === \"string\";\n // prevent the `fullscreen` prop from being passed to the `DialogTitle` component\n // eslint-disable-next-line no-param-reassign\n delete others.fullscreen;\n\n const icon = customIcon || (showIcon && iconVariant(variant));\n\n return (\n <DialogTitle
|
|
1
|
+
{"version":3,"file":"DialogTitle.js","names":["React","PropTypes","clsx","DialogTitle","withStyles","HvTypography","iconVariant","styles","HvDialogTitle","classes","className","children","variant","showIcon","customIcon","others","isString","fullscreen","icon","root","messageContainer","textWithIcon","propTypes","string","shape","closeButton","isRequired","oneOf","bool","node","name"],"sources":["../../../../src/Dialog/DialogTitle/DialogTitle.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { DialogTitle, withStyles } from \"@material-ui/core\";\nimport HvTypography from \"../../Typography\";\nimport iconVariant from \"../../utils/iconVariant\";\nimport styles from \"./styles\";\n\nconst HvDialogTitle = ({\n classes,\n className,\n children,\n variant = \"default\",\n showIcon = true,\n customIcon = null,\n ...others\n}) => {\n const isString = typeof children === \"string\";\n const { fullscreen } = others;\n\n // prevent the `fullscreen` prop from being passed to the `DialogTitle` component\n // eslint-disable-next-line no-param-reassign\n delete others.fullscreen;\n\n const icon = customIcon || (showIcon && iconVariant(variant));\n\n return (\n <DialogTitle\n className={clsx(classes.root, className, fullscreen ? \"fullscreen\" : \"\")}\n disableTypography\n {...others}\n >\n <div className={classes.messageContainer}>\n {icon}\n <div className={clsx({ [classes.textWithIcon]: icon })}>\n {!isString && children}\n {isString && <HvTypography variant=\"xxsTitle\">{children}</HvTypography>}\n </div>\n </div>\n </DialogTitle>\n );\n};\n\nHvDialogTitle.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component (container for the title).\n */\n root: PropTypes.string,\n /**\n * Style applied to the container of the title\n */\n messageContainer: PropTypes.string,\n /**\n * Style applied to the text when the icon is present.\n */\n textWithIcon: PropTypes.string,\n /**\n * Style applied to the icon.\n */\n icon: PropTypes.string,\n /**\n * Style applied to the close button.\n */\n closeButton: PropTypes.string,\n }).isRequired,\n /**\n * Variant of the Dialog.\n */\n variant: PropTypes.oneOf([\"success\", \"warning\", \"error\", \"info\", \"default\"]),\n /**\n * Controls if the associated icon to the variant should be shown.\n */\n showIcon: PropTypes.bool,\n /**\n * Custom icon to replace the variant default.\n */\n customIcon: PropTypes.node,\n /**\n * Node to be render.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvDialogTitle\" })(HvDialogTitle);\n"],"mappings":";;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,WAAT,EAAsBC,UAAtB,QAAwC,mBAAxC;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AAEA,MAAMC,aAAa,GAAG,QAQhB;EAAA,IARiB;IACrBC,OADqB;IAErBC,SAFqB;IAGrBC,QAHqB;IAIrBC,OAAO,GAAG,SAJW;IAKrBC,QAAQ,GAAG,IALU;IAMrBC,UAAU,GAAG;EANQ,CAQjB;EAAA,IADDC,MACC;;EACJ,MAAMC,QAAQ,GAAG,OAAOL,QAAP,KAAoB,QAArC;EACA,MAAM;IAAEM;EAAF,IAAiBF,MAAvB,CAFI,CAIJ;EACA;;EACA,OAAOA,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F;AACA;EACEd,UAAU,EAAEb,SAAS,CAAC4B,IAzCE;;EA0CxB;AACF;AACA;EACElB,QAAQ,EAAEV,SAAS,CAAC4B,IAAV,CAAeH;AA7CD,CAA1B;AAgDA,eAAetB,UAAU,CAACG,MAAD,EAAS;EAAEuB,IAAI,EAAE;AAAR,CAAT,CAAV,CAA8CtB,aAA9C,CAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","padding","hvSpacing","margin","
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","padding","hvSpacing","margin","flex","messageContainer","display","alignItems","textWithIcon","marginLeft","marginRight","icon","hv","spacing","md","width","height"],"sources":["../../../../src/Dialog/DialogTitle/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: theme.hvSpacing(\"sm\"),\n margin: 0,\n \"&:not(.fullscreen)\": {\n flex: 1,\n },\n },\n messageContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n textWithIcon: {\n marginLeft: theme.hvSpacing(\"xs\"),\n // 32px is the icon width\n marginRight: `calc(32px + ${theme.hvSpacing(\"xs\")})`,\n },\n icon: {\n marginRight: theme.hv.spacing.md,\n width: 48,\n height: 48,\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAIC,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAEF,KAAK,CAACG,SAAN,CAAgB,IAAhB,CADL;IAEJC,MAAM,EAAE,CAFJ;IAGJ,sBAAsB;MACpBC,IAAI,EAAE;IADc;EAHlB,CADmB;EAQzBC,gBAAgB,EAAE;IAChBC,OAAO,EAAE,MADO;IAEhBC,UAAU,EAAE;EAFI,CARO;EAYzBC,YAAY,EAAE;IACZC,UAAU,EAAEV,KAAK,CAACG,SAAN,CAAgB,IAAhB,CADA;IAEZ;IACAQ,WAAW,EAAG,eAAcX,KAAK,CAACG,SAAN,CAAgB,IAAhB,CAAsB;EAHtC,CAZW;EAiBzBS,IAAI,EAAE;IACJD,WAAW,EAAEX,KAAK,CAACa,EAAN,CAASC,OAAT,CAAiBC,EAD1B;IAEJC,KAAK,EAAE,EAFH;IAGJC,MAAM,EAAE;EAHJ;AAjBmB,CAAZ,CAAf;;AAwBA,eAAelB,MAAf"}
|
|
@@ -10,7 +10,9 @@ const styles = theme => ({
|
|
|
10
10
|
overflow: "auto",
|
|
11
11
|
boxShadow: theme.hv.shadows[1],
|
|
12
12
|
"&:not(.fullscreen)": {
|
|
13
|
-
maxHeight: "calc(100% - 200px)"
|
|
13
|
+
maxHeight: "calc(100% - 200px)",
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexDirection: "column"
|
|
14
16
|
}
|
|
15
17
|
},
|
|
16
18
|
closeButton: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["fade","styles","theme","background","hv","palette","atmosphere","atmo4","paper","atmo1","padding","overflow","boxShadow","shadows","maxHeight","closeButton","minWidth","position","top","hvSpacing","right"],"sources":["../../../src/Dialog/styles.js"],"sourcesContent":["import fade from \"../utils/hexToRgbA\";\n\nconst styles = (theme) => ({\n background: {\n background: fade(theme.hv.palette.atmosphere.atmo4, 0.8),\n },\n paper: {\n background: `${theme.hv.palette.atmosphere.atmo1}`,\n padding: \"0px\",\n overflow: \"auto\",\n boxShadow: theme.hv.shadows[1],\n \"&:not(.fullscreen)\": {\n maxHeight: \"calc(100% - 200px)\",\n },\n },\n closeButton: {\n padding: 0,\n minWidth: \"inherit\",\n position: \"absolute\",\n top: theme.hvSpacing(\"sm\"),\n right: theme.hvSpacing(\"sm\"),\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,oBAAjB;;AAEA,MAAMC,MAAM,GAAIC,KAAD,KAAY;EACzBC,UAAU,EAAE;IACVA,UAAU,EAAEH,IAAI,CAACE,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KAA7B,EAAoC,GAApC;EADN,CADa;EAIzBC,KAAK,EAAE;IACLL,UAAU,EAAG,GAAED,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BG,KAAM,EAD5C;IAELC,OAAO,EAAE,KAFJ;IAGLC,QAAQ,EAAE,MAHL;IAILC,SAAS,EAAEV,KAAK,CAACE,EAAN,CAASS,OAAT,CAAiB,CAAjB,CAJN;IAKL,sBAAsB;MACpBC,SAAS,EAAE;
|
|
1
|
+
{"version":3,"file":"styles.js","names":["fade","styles","theme","background","hv","palette","atmosphere","atmo4","paper","atmo1","padding","overflow","boxShadow","shadows","maxHeight","display","flexDirection","closeButton","minWidth","position","top","hvSpacing","right"],"sources":["../../../src/Dialog/styles.js"],"sourcesContent":["import fade from \"../utils/hexToRgbA\";\n\nconst styles = (theme) => ({\n background: {\n background: fade(theme.hv.palette.atmosphere.atmo4, 0.8),\n },\n paper: {\n background: `${theme.hv.palette.atmosphere.atmo1}`,\n padding: \"0px\",\n overflow: \"auto\",\n boxShadow: theme.hv.shadows[1],\n \"&:not(.fullscreen)\": {\n maxHeight: \"calc(100% - 200px)\",\n display: \"flex\",\n flexDirection: \"column\",\n },\n },\n closeButton: {\n padding: 0,\n minWidth: \"inherit\",\n position: \"absolute\",\n top: theme.hvSpacing(\"sm\"),\n right: theme.hvSpacing(\"sm\"),\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,oBAAjB;;AAEA,MAAMC,MAAM,GAAIC,KAAD,KAAY;EACzBC,UAAU,EAAE;IACVA,UAAU,EAAEH,IAAI,CAACE,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KAA7B,EAAoC,GAApC;EADN,CADa;EAIzBC,KAAK,EAAE;IACLL,UAAU,EAAG,GAAED,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BG,KAAM,EAD5C;IAELC,OAAO,EAAE,KAFJ;IAGLC,QAAQ,EAAE,MAHL;IAILC,SAAS,EAAEV,KAAK,CAACE,EAAN,CAASS,OAAT,CAAiB,CAAjB,CAJN;IAKL,sBAAsB;MACpBC,SAAS,EAAE,oBADS;MAEpBC,OAAO,EAAE,MAFW;MAGpBC,aAAa,EAAE;IAHK;EALjB,CAJkB;EAezBC,WAAW,EAAE;IACXP,OAAO,EAAE,CADE;IAEXQ,QAAQ,EAAE,SAFC;IAGXC,QAAQ,EAAE,UAHC;IAIXC,GAAG,EAAElB,KAAK,CAACmB,SAAN,CAAgB,IAAhB,CAJM;IAKXC,KAAK,EAAEpB,KAAK,CAACmB,SAAN,CAAgB,IAAhB;EALI;AAfY,CAAZ,CAAf;;AAwBA,eAAepB,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,KAbJ;;EAeA,MAAM;IAAEa,SAAF;IAAaC,aAAb;IAA4BC;EAA5B,IAAgD1B,UAAU,CAACM,oBAAD,CAAhE;EACA,MAAMqB,aAAa,GAAGT,QAAQ,IAAIQ,eAAlC;EACA,MAAME,YAAY,GAAG,CAACzB,KAAK,CAACW,SAAD,CAAN,GAAoBA,SAApB,GAAgCW,aAAa,KAAK,SAAvE;EACA,MAAMI,OAAO,GAAGZ,EAAH,aAAGA,EAAH,cAAGA,EAAH,GAAST,KAAK,CAACgB,SAAD,EAAY,OAAZ,CAA3B;EACA,MAAMM,WAAW,GAAGF,YAAY,IAAI,CAACD,aAArC;EACA,MAAMI,OAAO,GAAGD,WAAW,GAAGlB,QAAH,GAAc,EAAzC;EACA,MAAMoB,cAAc,GAAGnB,SAAS,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,SAAS,EAAEnC,SAAS,CAACwC,MAxBE;;IAyBvB;AACJ;AACA;AACA;IACInB,QAAQ,EAAErB,SAAS,CAACwC;EA7BG,CAAhB,EA8BNG,UA9CqB;;EA+CxB;AACF;AACA;EACE/B,SAAS,EAAEZ,SAAS,CAACyC,IAlDG;;EAmDxB;AACF;AACA;EACE5B,SAAS,EAAEb,SAAS,CAAC4C,IAtDG;;EAuDxB;AACF;AACA;EACE3B,QAAQ,EAAEjB,SAAS,CAAC4C,IA1DI;;EA2DxB;AACF;AACA;EACE1B,aAAa,EAAElB,SAAS,CAAC4C,IA9DD;;EA+DxB;AACF;AACA;EACEzB,aAAa,EAAEnB,SAAS,CAAC4C,IAlED;;EAmExB;AACF;AACA;EACExB,gBAAgB,EAAEpB,SAAS,CAAC4C,IAtEJ;;EAuExB;AACF;AACA;EACEvB,QAAQ,EAAErB,SAAS,CAAC4C;AA1EI,CAA1B;AA6EA,eAAexC,UAAU,CAACI,MAAD,EAAS;EAAEqC,IAAI,EAAE;AAAR,CAAT,CAAV,CAA8CpC,aAA9C,CAAf"}
|
|
@@ -29,12 +29,6 @@ const styles = theme => ({
|
|
|
29
29
|
padding: 0,
|
|
30
30
|
margin: 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;IADk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AiBC,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
|