@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
package/dist/BaseInput/styles.js
CHANGED
|
@@ -64,6 +64,38 @@ var styles = function styles(theme) {
|
|
|
64
64
|
"& $input": {
|
|
65
65
|
border: "1px solid ".concat(theme.hv.palette.accent.acce1)
|
|
66
66
|
}
|
|
67
|
+
},
|
|
68
|
+
"@global": {
|
|
69
|
+
"input:-webkit-autofill": {
|
|
70
|
+
"-webkit-box-shadow": "0 0 0px 1000px ".concat(theme.hv.palette.atmosphere.atmo1, " inset"),
|
|
71
|
+
"-webkit-text-fill-color": theme.hv.typography.normalText.color
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
/* clears input's clear and reveal buttons from IE */
|
|
75
|
+
"input[type=search]::-ms-clear": {
|
|
76
|
+
display: "none",
|
|
77
|
+
width: 0,
|
|
78
|
+
height: 0
|
|
79
|
+
},
|
|
80
|
+
"input[type=search]::-ms-reveal": {
|
|
81
|
+
display: "none",
|
|
82
|
+
width: 0,
|
|
83
|
+
height: 0
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
/* clears input's clear button from Chrome */
|
|
87
|
+
"input[type=search]::-webkit-search-decoration": {
|
|
88
|
+
display: "none"
|
|
89
|
+
},
|
|
90
|
+
"input[type=search]::-webkit-search-cancel-button": {
|
|
91
|
+
display: "none"
|
|
92
|
+
},
|
|
93
|
+
"input[type=search]::-webkit-search-results-button": {
|
|
94
|
+
display: "none"
|
|
95
|
+
},
|
|
96
|
+
"input[type=search]::-webkit-search-results-decoration": {
|
|
97
|
+
display: "none"
|
|
98
|
+
}
|
|
67
99
|
}
|
|
68
100
|
},
|
|
69
101
|
resizable: {
|
|
@@ -215,12 +247,6 @@ var styles = function styles(theme) {
|
|
|
215
247
|
top: "31px",
|
|
216
248
|
left: "2px",
|
|
217
249
|
backgroundColor: theme.hv.palette.atmosphere.atmo4
|
|
218
|
-
},
|
|
219
|
-
"@global": {
|
|
220
|
-
"input:-webkit-autofill": {
|
|
221
|
-
"-webkit-box-shadow": "0 0 0px 1000px ".concat(theme.hv.palette.atmosphere.atmo1, " inset"),
|
|
222
|
-
"-webkit-text-fill-color": theme.hv.typography.normalText.color
|
|
223
|
-
}
|
|
224
250
|
}
|
|
225
251
|
};
|
|
226
252
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["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","outlineStyles","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;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAE,cADL;MAEJC,KAAK,EAAE,MAFH;MAGJC,QAAQ,EAAE,UAHN;MAIJ,yBAAyB;QACvBC,QAAQ,EAAE,MADa;QAEvBC,MAAM,EAAE;MAFe,CAJrB;MAQJ,+BAA+B;QAC7B,YAAY;UACVA,MAAM,sBAAeN,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC,KAAvC;QADI;MADiB,CAR3B;MAaJ,iCAAiC;QAC/BC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC;MADV,CAb7B;MAgBJ,wCAAwC;QACtCC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB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ACK1C,KAAK,CAACO,EAAN,CAASgC,UAAT,CAAoBI,eADzB;QAEEC,OAAO,EAAE;MAFX,EATG;MAaH,gBAAgB;QACd1C,OAAO,EAAE;MADK,CAbb;MAgBHC,KAAK,EAAE,SAhBJ;MAiBH0C,QAAQ,EAAE;IAjBP,EA5JoB;IA+KzBC,aAAa,EAAE;MACbC,KAAK,EAAE/C,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBO,UAAjB,CAA4BiC;IADtB,CA/KU;IAkLzBC,cAAc,EAAE;MACdC,MAAM,EAAE,MADM;MAEd/C,KAAK,EAAE;IAFO,CAlLS;IAuLzBgD,oBAAoB,EAAE;MACpB/C,QAAQ,EAAE,UADU;MAEpBD,KAAK,EAAE,kBAFa;MAGpB6B,MAAM,EAAE,KAHY;MAIpBoB,GAAG,EAAE,MAJe;MAKpBC,IAAI,EAAE,KALc;MAMpB1C,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBO,UAAjB,CAA4BC;IANzB,CAvLG;IAgMzB,WAAW;MACT,0BAA0B;QACxB,+CAAwChB,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBO,UAAjB,CAA4BS,KAApE,WADwB;QAExB,2BAA2BxB,KAAK,CAACO,EAAN,CAASgC,UAAT,CAAoBC,UAApB,CAA+BO;MAFlC;IADjB;EAhMc,CAAZ;AAAA,CAAf;;eAwMehD,M"}
|
|
1
|
+
{"version":3,"file":"styles.js","names":["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","outlineStyles","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;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAE,cADL;MAEJC,KAAK,EAAE,MAFH;MAGJC,QAAQ,EAAE,UAHN;MAIJ,yBAAyB;QACvBC,QAAQ,EAAE,MADa;QAEvBC,MAAM,EAAE;MAFe,CAJrB;MAQJ,+BAA+B;QAC7B,YAAY;UACVA,MAAM,sBAAeN,KAAK,CAACO,EAAN,CAASC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AE;IAFO,CAnMS;IAwMzBgD,oBAAoB,EAAE;MACpB/C,QAAQ,EAAE,UADU;MAEpBD,KAAK,EAAE,kBAFa;MAGpBc,MAAM,EAAE,KAHY;MAIpBmC,GAAG,EAAE,MAJe;MAKpBC,IAAI,EAAE,KALc;MAMpB1C,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBI,UAAjB,CAA4BS;IANzB;EAxMG,CAAZ;AAAA,CAAf;;eAkNetB,M"}
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -157,9 +157,9 @@ var HvDialog = function HvDialog(_ref) {
|
|
|
157
157
|
return _onClose(event, reason);
|
|
158
158
|
},
|
|
159
159
|
onKeyDown: keyDownHandler
|
|
160
|
-
}, others
|
|
160
|
+
}, others, {
|
|
161
161
|
"aria-modal": true
|
|
162
|
-
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
162
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
163
163
|
id: (0, _utils.setId)(id, "close"),
|
|
164
164
|
className: classes.closeButton,
|
|
165
165
|
category: "ghost",
|
|
@@ -171,7 +171,7 @@ var HvDialog = function HvDialog(_ref) {
|
|
|
171
171
|
return /*#__PURE__*/_react.default.cloneElement(c, {
|
|
172
172
|
fullscreen: fullscreen
|
|
173
173
|
});
|
|
174
|
-
}) : children)
|
|
174
|
+
}) : children);
|
|
175
175
|
};
|
|
176
176
|
|
|
177
177
|
process.env.NODE_ENV !== "production" ? HvDialog.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","names":["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","KeyboardCodes","Tab","target","shiftKey","preventDefault","Esc","onEscapeKeyDown","disableEscapeKeyDown","stopPropagation","closeButtonDisplay","CloseButtonTooltipWrapper","root","paper","background","reason","closeButton","React","Children","map","c","cloneElement","propTypes","PropTypes","string","shape","isRequired","bool","func","styles","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
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":["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","KeyboardCodes","Tab","target","shiftKey","preventDefault","Esc","onEscapeKeyDown","disableEscapeKeyDown","stopPropagation","closeButtonDisplay","CloseButtonTooltipWrapper","root","paper","background","reason","closeButton","React","Children","map","c","cloneElement","propTypes","PropTypes","string","shape","isRequired","bool","func","styles","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;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,OAWX;EAAA,IAVJC,OAUI,QAVJA,OAUI;EAAA,IATJC,SASI,QATJA,SASI;EAAA,IARJC,EAQI,QARJA,EAQI;EAAA,IAPJC,QAOI,QAPJA,QAOI;EAAA,IANJC,IAMI,QANJA,IAMI;EAAA,IALJC,QAK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AE4C,mBAAUI,IAAV,CAAeD,UArCF;;EAsCnB;AACF;AACA;EACE9C,OAAO,EAAE2C,mBAAUK,IAAV,CAAeF,UAzCL;;EA0CnB;AACF;AACA;EACE7C,cAAc,EAAE0C,mBAAUC,MA7CP;;EA8CnB;AACF;AACA;EACE1C,WAAW,EAAEyC,mBAAUC,MAjDJ;;EAkDnB;AACF;AACA;EACEzC,UAAU,EAAEwC,mBAAUI;AArDH,CAArB;;eAwDe,sBAAWE,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAyCxD,QAAzC,C"}
|
|
@@ -10,7 +10,9 @@ var styles = function styles(theme) {
|
|
|
10
10
|
root: {
|
|
11
11
|
margin: "0",
|
|
12
12
|
padding: theme.hv.spacing.sm,
|
|
13
|
-
borderTop: "3px solid ".concat(theme.hv.palette.atmosphere.atmo2)
|
|
13
|
+
borderTop: "3px solid ".concat(theme.hv.palette.atmosphere.atmo2),
|
|
14
|
+
height: 100,
|
|
15
|
+
flex: 1
|
|
14
16
|
},
|
|
15
17
|
spacing: {
|
|
16
18
|
"& > :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,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJC,MAAM,EAAE,GADJ;MAEJC,OAAO,EAAEH,KAAK,CAACI,EAAN,CAASC,OAAT,CAAiBC,EAFtB;MAGJC,SAAS,sBAAeP,KAAK,CAACI,EAAN,CAASI,OAAT,CAAiBC,UAAjB,CAA4BC,KAA3C;
|
|
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,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJC,MAAM,EAAE,GADJ;MAEJC,OAAO,EAAEH,KAAK,CAACI,EAAN,CAASC,OAAT,CAAiBC,EAFtB;MAGJC,SAAS,sBAAeP,KAAK,CAACI,EAAN,CAASI,OAAT,CAAiBC,UAAjB,CAA4BC,KAA3C,CAHL;MAIJC,MAAM,EAAE,GAJJ;MAKJC,IAAI,EAAE;IALF,CADmB;IAQzBP,OAAO,EAAE;MACP,0BAA0B;QACxBQ,UAAU,EAAEb,KAAK,CAACI,EAAN,CAASC,OAAT,CAAiBS;MADL;IADnB,CARgB;IAazBC,UAAU,EAAE;MACVC,QAAQ,EAAE,OADA;MAEVC,KAAK,EAAE,MAFG;MAGVC,MAAM,EAAE,CAHE;MAIVC,IAAI,EAAE;IAJI;EAba,CAAZ;AAAA,CAAf;;eAqBepB,M"}
|
|
@@ -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,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAEF,KAAK,CAACG,SAAN,CAAgB,CAAhB,EAAmB,IAAnB,EAAyB,IAAzB,EAA+B,IAA/B,CADL;MAEJC,IAAI,EAAE;IAFF,CADmB;IAKzBC,WAAW,EAAE;MACXC,UAAU,EAAE,MADD;MAEXC,YAAY,EAAE,MAFH;MAGXH,IAAI,EAAE,CAHK;MAIXI,SAAS,EAAE;IAJA;EALY,CAAZ;AAAA,CAAf;;eAaeT,M"}
|
|
@@ -38,13 +38,14 @@ var HvDialogTitle = function HvDialogTitle(_ref) {
|
|
|
38
38
|
_ref$customIcon = _ref.customIcon,
|
|
39
39
|
customIcon = _ref$customIcon === void 0 ? null : _ref$customIcon,
|
|
40
40
|
others = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
41
|
-
var isString = typeof children === "string";
|
|
41
|
+
var isString = typeof children === "string";
|
|
42
|
+
var fullscreen = others.fullscreen; // prevent the `fullscreen` prop from being passed to the `DialogTitle` component
|
|
42
43
|
// eslint-disable-next-line no-param-reassign
|
|
43
44
|
|
|
44
45
|
delete others.fullscreen;
|
|
45
46
|
var icon = customIcon || showIcon && (0, _iconVariant.default)(variant);
|
|
46
47
|
return /*#__PURE__*/_react.default.createElement(_core.DialogTitle, (0, _extends2.default)({
|
|
47
|
-
className: (0, _clsx.default)(classes.root, className),
|
|
48
|
+
className: (0, _clsx.default)(classes.root, className, fullscreen && "fullscreen"),
|
|
48
49
|
disableTypography: true
|
|
49
50
|
}, others), /*#__PURE__*/_react.default.createElement("div", {
|
|
50
51
|
className: classes.messageContainer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTitle.js","names":["HvDialogTitle","classes","className","children","variant","showIcon","customIcon","others","isString","fullscreen","icon","root","messageContainer","textWithIcon","propTypes","PropTypes","string","shape","closeButton","isRequired","oneOf","bool","node","styles","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":["HvDialogTitle","classes","className","children","variant","showIcon","customIcon","others","isString","fullscreen","icon","root","messageContainer","textWithIcon","propTypes","PropTypes","string","shape","closeButton","isRequired","oneOf","bool","node","styles","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;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,OAQhB;EAAA,IAPJC,OAOI,QAPJA,OAOI;EAAA,IANJC,SAMI,QANJA,SAMI;EAAA,IALJC,QAKI,QALJA,QAKI;EAAA,wBAJJC,OAII;EAAA,IAJJA,OAII,6BAJM,SAIN;E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A;EACEf,OAAO,EAAEW,mBAAUK,KAAV,CAAgB,CAAC,SAAD,EAAY,SAAZ,EAAuB,OAAvB,EAAgC,MAAhC,EAAwC,SAAxC,CAAhB,CAjCe;;EAkCxB;AACF;AACA;EACEf,QAAQ,EAAEU,mBAAUM,IArCI;;EAsCxB;AACF;AACA;EACEf,UAAU,EAAES,mBAAUO,IAzCE;;EA0CxB;AACF;AACA;EACEnB,QAAQ,EAAEY,mBAAUO,IAAV,CAAeH;AA7CD,CAA1B;;eAgDe,sBAAWI,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA8CxB,aAA9C,C"}
|
|
@@ -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,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAEF,KAAK,CAACG,SAAN,CAAgB,IAAhB,CADL;MAEJC,MAAM,EAAE,CAFJ;MAGJ,sBAAsB;QACpBC,IAAI,EAAE;MADc;IAHlB,CADmB;IAQzBC,gBAAgB,EAAE;MAChBC,OAAO,EAAE,MADO;MAEhBC,UAAU,EAAE;IAFI,CARO;IAYzBC,YAAY,EAAE;MACZC,UAAU,EAAEV,KAAK,CAACG,SAAN,CAAgB,IAAhB,CADA;MAEZ;MACAQ,WAAW,wBAAiBX,KAAK,CAACG,SAAN,CAAgB,IAAhB,CAAjB;IAHC,CAZW;IAiBzBS,IAAI,EAAE;MACJD,WAAW,EAAEX,KAAK,CAACa,EAAN,CAASC,OAAT,CAAiBC,EAD1B;MAEJC,KAAK,EAAE,EAFH;MAGJC,MAAM,EAAE;IAHJ;EAjBmB,CAAZ;AAAA,CAAf;;eAwBelB,M"}
|
package/dist/Dialog/styles.js
CHANGED
|
@@ -20,7 +20,9 @@ var styles = function styles(theme) {
|
|
|
20
20
|
overflow: "auto",
|
|
21
21
|
boxShadow: theme.hv.shadows[1],
|
|
22
22
|
"&:not(.fullscreen)": {
|
|
23
|
-
maxHeight: "calc(100% - 200px)"
|
|
23
|
+
maxHeight: "calc(100% - 200px)",
|
|
24
|
+
display: "flex",
|
|
25
|
+
flexDirection: "column"
|
|
24
26
|
}
|
|
25
27
|
},
|
|
26
28
|
closeButton: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["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;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,UAAU,EAAE;MACVA,UAAU,EAAE,wBAAKD,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KAAjC,EAAwC,GAAxC;IADF,CADa;IAIzBC,KAAK,EAAE;MACLL,UAAU,YAAKD,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BG,KAAjC,CADL;MAELC,OAAO,EAAE,KAFJ;MAGLC,QAAQ,EAAE,MAHL;MAILC,SAAS,EAAEV,KAAK,CAACE,EAAN,CAASS,OAAT,CAAiB,CAAjB,CAJN;MAKL,sBAAsB;QACpBC,SAAS,EAAE;
|
|
1
|
+
{"version":3,"file":"styles.js","names":["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;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,UAAU,EAAE;MACVA,UAAU,EAAE,wBAAKD,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KAAjC,EAAwC,GAAxC;IADF,CADa;IAIzBC,KAAK,EAAE;MACLL,UAAU,YAAKD,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BG,KAAjC,CADL;MAELC,OAAO,EAAE,KAFJ;MAGLC,QAAQ,EAAE,MAHL;MAILC,SAAS,EAAEV,KAAK,CAACE,EAAN,CAASS,OAAT,CAAiB,CAAjB,CAJN;MAKL,sBAAsB;QACpBC,SAAS,EAAE,oBADS;QAEpBC,OAAO,EAAE,MAFW;QAGpBC,aAAa,EAAE;MAHK;IALjB,CAJkB;IAezBC,WAAW,EAAE;MACXP,OAAO,EAAE,CADE;MAEXQ,QAAQ,EAAE,SAFC;MAGXC,QAAQ,EAAE,UAHC;MAIXC,GAAG,EAAElB,KAAK,CAACmB,SAAN,CAAgB,IAAhB,CAJM;MAKXC,KAAK,EAAEpB,KAAK,CAACmB,SAAN,CAAgB,IAAhB;IALI;EAfY,CAAZ;AAAA,CAAf;;eAwBepB,M"}
|
|
@@ -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> {
|
|
@@ -154,12 +154,7 @@ process.env.NODE_ENV !== "production" ? HvWarningText.propTypes = {
|
|
|
154
154
|
* Styles applied to the text when the error are is active
|
|
155
155
|
* but the text is to be not visible.
|
|
156
156
|
*/
|
|
157
|
-
hideText: _propTypes.default.string
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* IE11 specific styling.
|
|
161
|
-
*/
|
|
162
|
-
"@global": _propTypes.default.string
|
|
157
|
+
hideText: _propTypes.default.string
|
|
163
158
|
}).isRequired,
|
|
164
159
|
|
|
165
160
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningText.js","names":["HvWarningText","props","children","adornment","isVisible","classes","className","id","disabled","disableGutter","disableBorder","disableAdornment","hideText","others","HvFormElementContext","elementId","elementStatus","elementDisabled","localDisabled","localVisible","localId","showWarning","content","localAdornment","defaultIcon","root","show","topBorder","warningText","topGutter","formElementType","propTypes","PropTypes","string","node","shape","isRequired","bool","styles","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":["HvWarningText","props","children","adornment","isVisible","classes","className","id","disabled","disableGutter","disableBorder","disableAdornment","hideText","others","HvFormElementContext","elementId","elementStatus","elementDisabled","localDisabled","localVisible","localId","showWarning","content","localAdornment","defaultIcon","root","show","topBorder","warningText","topGutter","formElementType","propTypes","PropTypes","string","node","shape","isRequired","bool","styles","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;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAW;EAC/B,IACEC,QADF,GAaID,KAbJ,CACEC,QADF;EAAA,IAEEC,SAFF,GAaIF,KAbJ,CAEEE,SAFF;EAAA,IAGEC,SAHF,GAaIH,KAbJ,CAGEG,SAHF;EAAA,IAIEC,OAJF,GAaIJ,KAbJ,CAIEI,OAJF;EAAA,IAKEC,SALF,GAaIL,KAbJ,CAKEK,SALF;EAAA,IAMEC,EANF,GAaIN,KAbJ,CAMEM,EANF;EAAA,IAOEC,QAPF,GAaIP,KAbJ,CAOEO,QAPF;EAAA,2BAaIP,KAbJ,CAQEQ,aARF;EAAA,IAQEA,aARF,qCAQkB,KARlB;EAAA,2BAaIR,KAbJ,CASES,aATF;EAAA,IASEA,aATF,qCASkB,KATlB;EAAA,4BAaIT,KAbJ,CAUEU,gBAVF;EAAA,IAUEA,gBAVF,sCAUqB,KAVrB;EAAA,sBAaIV,KAbJ,CAWEW,QAXF;EAAA,IAWEA,QAXF,gCAWa,KAXb;EAAA,IAYKC,MAZL,0CAaIZ,KAbJ;;EAeA,kBAAsD,uBAAWa,iCAAX,CAAtD;EAAA,IAAQC,SAAR,eAAQA,SAAR;EAAA,IAAmBC,aAAnB,eAAmBA,aAAnB;EAAA,IAAkCC,eAAlC,eAAkCA,eAAlC;;EACA,IAAMC,aAAa,GAAGV,QAAQ,IAAIS,eAAlC;EACA,IAAME,YAAY,GAAG,CAAC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AAEO,mBAAUC,MAJO;;IAKvB;AACJ;AACA;IACIT,WAAW,EAAEQ,mBAAUC,MARA;;IASvB;AACJ;AACA;IACIL,WAAW,EAAEI,mBAAUC,MAZA;;IAavB;AACJ;AACA;IACIP,IAAI,EAAEM,mBAAUC,MAhBO;;IAiBvB;AACJ;AACA;IACIJ,SAAS,EAAEG,mBAAUC,MApBE;;IAqBvB;AACJ;AACA;IACIN,SAAS,EAAEK,mBAAUC,MAxBE;;IAyBvB;AACJ;AACA;AACA;IACIrB,QAAQ,EAAEoB,mBAAUC;EA7BG,CAAhB,EA8BNG,UA9CqB;;EA+CxB;AACF;AACA;EACEjC,SAAS,EAAE6B,mBAAUE,IAlDG;;EAmDxB;AACF;AACA;EACE9B,SAAS,EAAE4B,mBAAUK,IAtDG;;EAuDxB;AACF;AACA;EACE7B,QAAQ,EAAEwB,mBAAUK,IA1DI;;EA2DxB;AACF;AACA;EACE5B,aAAa,EAAEuB,mBAAUK,IA9DD;;EA+DxB;AACF;AACA;EACE3B,aAAa,EAAEsB,mBAAUK,IAlED;;EAmExB;AACF;AACA;EACE1B,gBAAgB,EAAEqB,mBAAUK,IAtEJ;;EAuExB;AACF;AACA;EACEzB,QAAQ,EAAEoB,mBAAUK;AA1EI,CAA1B;;eA6Ee,sBAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA8CvC,aAA9C,C"}
|
|
@@ -37,12 +37,6 @@ var styles = function styles(theme) {
|
|
|
37
37
|
padding: 0,
|
|
38
38
|
margin: 0,
|
|
39
39
|
overflow: "hidden"
|
|
40
|
-
},
|
|
41
|
-
"@global": {
|
|
42
|
-
"input:-webkit-autofill": {
|
|
43
|
-
"-webkit-box-shadow": "0 0 0px 1000px ".concat(theme.hv.palette.atmosphere.atmo1, " inset"),
|
|
44
|
-
"-webkit-text-fill-color": theme.hv.typography.normalText.color
|
|
45
|
-
}
|
|
46
40
|
}
|
|
47
41
|
};
|
|
48
42
|
};
|
|
@@ -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,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAE;IADL,CADmB;IAIzBC,SAAS,EAAE;MACTC,SAAS,sBAAeJ,KAAK,CAACK,EAAN,CAASC,OAAT,CAAiBC,QAAjB,CAA0BC,KAAzC;IADA,CAJc;IAOzBC,SAAS,EAAE;MAAEC,UAAU,EAAE;IAAd,CAPc;IAQzBC,WAAW,EAAE;MACXC,KAAK,EAAEZ,KAAK,CAACK,EAAN,CAASC,OAAT,CAAiBC,QAAjB,CAA0BC,KADtB;MAEXK,YAAY,EAAEb,KAAK,CAACK,EAAN,CAASS,OAAT,CAAiBC,EAFpB;MAGX,iBAAiB;QACfC,WAAW,EAAEhB,KAAK,CAACK,EAAN,CAASS,OAAT,CAAiBC;MADf;IAHN,CARY;IAezBE,WAAW,EAAE;MACXC,QAAQ,EAAE;IADC,CAfY;IAkBzBC,IAAI,EAAE;MACJjB,OAAO,EAAE;IADL,CAlBmB;IAqBzBkB,QAAQ,EAAE;MACR;MACA;MACAC,KAAK,EAAE,CAHC;MAIRC,MAAM,EAAE,CAJA;MAKRC,OAAO,EAAE,CALD;MAMRC,MAAM,EAAE,CANA;MAORC,QAAQ,EAAE;IAPF;EArBe,CAAZ;AAAA,CAAf;;eAgCe1B,M"}
|
package/dist/Input/styles.js
CHANGED
|
@@ -93,12 +93,6 @@ var styles = function styles(theme) {
|
|
|
93
93
|
"$hasSuggestions &": {
|
|
94
94
|
display: "none"
|
|
95
95
|
}
|
|
96
|
-
},
|
|
97
|
-
"@global": {
|
|
98
|
-
"input:-webkit-autofill": {
|
|
99
|
-
"-webkit-box-shadow": "0 0 0px 1000px ".concat(theme.hv.palette.atmosphere.atmo1, " inset"),
|
|
100
|
-
"-webkit-text-fill-color": theme.hv.typography.normalText.color
|
|
101
|
-
}
|
|
102
96
|
}
|
|
103
97
|
};
|
|
104
98
|
};
|
package/dist/Input/styles.js.map
CHANGED
|
@@ -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;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zB2B,oBAAoB,EAAE;MACpBF,KAAK,EAAE,MADa;MAEpBG,QAAQ,EAAE;IAFU,CArEG;IAyEzBC,cAAc,EAAE;MACd;MACA,iCAAiC;QAC/BJ,KAAK,EAAE;MADwB;IAFnB,CAzES;IAgFzBK,cAAc,EAAE;MACdb,MAAM,EAAEnB,KAAK,CAACiC,EAAN,CAASC,OAAT,CAAiBC,EADX;MAEdZ,eAAe,EAAEvB,KAAK,CAACiC,EAAN,CAASG,OAAT,CAAiBC,UAAjB,CAA4BC,KAF/B;MAGdC,SAAS,wBAAiBvC,KAAK,CAACiC,EAAN,CAASG,OAAT,CAAiBC,UAAjB,CAA4BC,KAA7C;IAHK,CAhFS;IAsFzBE,oBAAoB,EAAE;MACpB,qBAAqB;QACnBtC,OAAO,EAAE;MADU;IADD;EAtFG,CAAZ;AAAA,CAAf;;eA6FeH,M"}
|
|
@@ -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;
|
|
@@ -47,12 +47,13 @@ var _theme = require("../theme");
|
|
|
47
47
|
|
|
48
48
|
var _context = _interopRequireDefault(require("./context"));
|
|
49
49
|
|
|
50
|
-
var
|
|
50
|
+
var _HvCssBaseline;
|
|
51
51
|
|
|
52
52
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
53
53
|
|
|
54
54
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
55
55
|
|
|
56
|
+
var warnedOnce = false;
|
|
56
57
|
/**
|
|
57
58
|
* Augments the target theme with the differences found in the source theme.
|
|
58
59
|
*
|
|
@@ -60,6 +61,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
60
61
|
* @param {Object} InputSourceTheme - A material UI Theme to apply on top.
|
|
61
62
|
* @returns {Object} - A new modified material UI theme.
|
|
62
63
|
*/
|
|
64
|
+
|
|
63
65
|
var applyCustomTheme = function applyCustomTheme(InputTargetTheme, InputSourceTheme) {
|
|
64
66
|
var muiDefaultTheme = (0, _styles.createTheme)();
|
|
65
67
|
var targetTheme = (0, _cloneDeep.default)(InputTargetTheme);
|
|
@@ -94,8 +96,8 @@ var applyCustomTheme = function applyCustomTheme(InputTargetTheme, InputSourceTh
|
|
|
94
96
|
* <HvProvider/>
|
|
95
97
|
* ```
|
|
96
98
|
*
|
|
97
|
-
* If several `HvProvider`'s are used, either nested or in
|
|
98
|
-
* must be tweaked to avoid CSS classnames
|
|
99
|
+
* If several `HvProvider`'s are used, either nested or in parallel, the `generateClassNameOptions`
|
|
100
|
+
* must be tweaked to avoid CSS classnames collision. Or a custom JSS's class name generator can
|
|
99
101
|
* be provided via the `generateClassName` property.
|
|
100
102
|
*
|
|
101
103
|
* **UI Kit components will not work at all if the `HvProvider` is not configured correctly**,
|
|
@@ -120,7 +122,18 @@ var HvProvider = function HvProvider(_ref) {
|
|
|
120
122
|
_ref$injectStylesFirs = _ref.injectStylesFirst,
|
|
121
123
|
injectStylesFirst = _ref$injectStylesFirs === void 0 ? false : _ref$injectStylesFirs,
|
|
122
124
|
_ref$disableStylesGen = _ref.disableStylesGeneration,
|
|
123
|
-
disableStylesGeneration = _ref$disableStylesGen === void 0 ? false : _ref$disableStylesGen
|
|
125
|
+
disableStylesGeneration = _ref$disableStylesGen === void 0 ? false : _ref$disableStylesGen,
|
|
126
|
+
_ref$disableCssBaseli = _ref.disableCssBaseline,
|
|
127
|
+
disableCssBaseline = _ref$disableCssBaseli === void 0 ? false : _ref$disableCssBaseli;
|
|
128
|
+
|
|
129
|
+
if (process.env.NODE_ENV !== "production") {
|
|
130
|
+
if (!warnedOnce && !disableCssBaseline) {
|
|
131
|
+
warnedOnce = true; // eslint-disable-next-line no-console
|
|
132
|
+
|
|
133
|
+
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");
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
124
137
|
var localeSetting = locale || ((_navigator$language = (_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.language) !== null && _navigator$language !== void 0 ? _navigator$language : "en-US");
|
|
125
138
|
var rawUiKitTheme = (0, _theme.getTheme)(uiKitTheme);
|
|
126
139
|
var customTheme = applyCustomTheme((0, _theme.themeBuilder)(rawUiKitTheme), theme);
|
|
@@ -137,7 +150,7 @@ var HvProvider = function HvProvider(_ref) {
|
|
|
137
150
|
disableGeneration: disableStylesGeneration
|
|
138
151
|
}, /*#__PURE__*/_react.default.createElement(_core.ThemeProvider, {
|
|
139
152
|
theme: customTheme
|
|
140
|
-
},
|
|
153
|
+
}, !disableCssBaseline && (_HvCssBaseline || (_HvCssBaseline = /*#__PURE__*/_react.default.createElement(_theme.HvCssBaseline, null))), /*#__PURE__*/_react.default.createElement(_context.default.Provider, {
|
|
141
154
|
value: pConfig
|
|
142
155
|
}, children)));
|
|
143
156
|
};
|
|
@@ -215,7 +228,22 @@ process.env.NODE_ENV !== "production" ? HvProvider.propTypes = {
|
|
|
215
228
|
/**
|
|
216
229
|
* Disables the generation of the styles.
|
|
217
230
|
*/
|
|
218
|
-
disableStylesGeneration: _propTypes.default.bool
|
|
231
|
+
disableStylesGeneration: _propTypes.default.bool,
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Disables the generation of the baseline css styles.
|
|
235
|
+
*
|
|
236
|
+
* This will be the default behavior in the future.
|
|
237
|
+
*
|
|
238
|
+
* The application using UI Kit should be responsible for adding the baseline css styles, by
|
|
239
|
+
* either using the `<HvCssBaseline />` component, using the `<HvScopedCssBaseline />` component,
|
|
240
|
+
* or ensuring that the necessary base styles are applied.
|
|
241
|
+
*
|
|
242
|
+
* Defaults to `false`. Will be removed in the next major release.
|
|
243
|
+
*
|
|
244
|
+
* @see https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main
|
|
245
|
+
*/
|
|
246
|
+
disableCssBaseline: _propTypes.default.bool
|
|
219
247
|
} : void 0;
|
|
220
248
|
var _default = HvProvider;
|
|
221
249
|
exports.default = _default;
|