@hitachivantara/uikit-react-core 3.67.18 → 3.68.0
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/Provider/Provider.js +15 -4
- package/dist/Provider/Provider.js.map +1 -1
- package/dist/index.d.ts +0 -9
- package/dist/index.js +0 -27
- package/dist/index.js.map +1 -1
- package/dist/legacy/Provider/Provider.js +16 -5
- package/dist/legacy/Provider/Provider.js.map +1 -1
- package/dist/legacy/index.d.ts +0 -9
- package/dist/legacy/index.js +0 -3
- package/dist/legacy/index.js.map +1 -1
- package/dist/modern/Provider/Provider.js +10 -5
- package/dist/modern/Provider/Provider.js.map +1 -1
- package/dist/modern/index.d.ts +0 -9
- package/dist/modern/index.js +0 -3
- package/dist/modern/index.js.map +1 -1
- package/package.json +22 -32
- package/dist/Barchart/Barchart.d.ts +0 -14
- package/dist/Barchart/Barchart.js +0 -241
- package/dist/Barchart/Barchart.js.map +0 -1
- package/dist/Barchart/barchartPlotlyOverrides.js +0 -59
- package/dist/Barchart/barchartPlotlyOverrides.js.map +0 -1
- package/dist/Barchart/index.d.ts +0 -2
- package/dist/Barchart/index.js +0 -16
- package/dist/Barchart/index.js.map +0 -1
- package/dist/Barchart/styles.js +0 -10
- package/dist/Barchart/styles.js.map +0 -1
- package/dist/Chart/Chart.d.ts +0 -25
- package/dist/Chart/Chart.js +0 -215
- package/dist/Chart/Chart.js.map +0 -1
- package/dist/Chart/Plot/Plot.d.ts +0 -43
- package/dist/Chart/Plot/Plot.js +0 -131
- package/dist/Chart/Plot/Plot.js.map +0 -1
- package/dist/Chart/Plot/index.d.ts +0 -2
- package/dist/Chart/Plot/index.js +0 -16
- package/dist/Chart/Plot/index.js.map +0 -1
- package/dist/Chart/Plot/styles.js +0 -10
- package/dist/Chart/Plot/styles.js.map +0 -1
- package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js +0 -162
- package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +0 -1
- package/dist/Chart/Tooltip/MultiTooltip/index.js +0 -16
- package/dist/Chart/Tooltip/MultiTooltip/index.js.map +0 -1
- package/dist/Chart/Tooltip/MultiTooltip/styles.js +0 -51
- package/dist/Chart/Tooltip/MultiTooltip/styles.js.map +0 -1
- package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js +0 -87
- package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +0 -1
- package/dist/Chart/Tooltip/SingleTooltip/index.js +0 -16
- package/dist/Chart/Tooltip/SingleTooltip/index.js.map +0 -1
- package/dist/Chart/Tooltip/SingleTooltip/styles.js +0 -26
- package/dist/Chart/Tooltip/SingleTooltip/styles.js.map +0 -1
- package/dist/Chart/Tooltip/Tooltip.js +0 -165
- package/dist/Chart/Tooltip/Tooltip.js.map +0 -1
- package/dist/Chart/Tooltip/index.js +0 -16
- package/dist/Chart/Tooltip/index.js.map +0 -1
- package/dist/Chart/Tooltip/styles.js +0 -16
- package/dist/Chart/Tooltip/styles.js.map +0 -1
- package/dist/Chart/chartPlotlyOverrides.js +0 -169
- package/dist/Chart/chartPlotlyOverrides.js.map +0 -1
- package/dist/Chart/index.d.ts +0 -5
- package/dist/Chart/index.js +0 -16
- package/dist/Chart/index.js.map +0 -1
- package/dist/Chart/styles.js +0 -49
- package/dist/Chart/styles.js.map +0 -1
- package/dist/Donutchart/Donutchart.d.ts +0 -10
- package/dist/Donutchart/Donutchart.js +0 -124
- package/dist/Donutchart/Donutchart.js.map +0 -1
- package/dist/Donutchart/donutchartPlotlyOverrides.js +0 -56
- package/dist/Donutchart/donutchartPlotlyOverrides.js.map +0 -1
- package/dist/Donutchart/index.d.ts +0 -2
- package/dist/Donutchart/index.js +0 -16
- package/dist/Donutchart/index.js.map +0 -1
- package/dist/Donutchart/styles.js +0 -10
- package/dist/Donutchart/styles.js.map +0 -1
- package/dist/Linechart/Linechart.d.ts +0 -14
- package/dist/Linechart/Linechart.js +0 -130
- package/dist/Linechart/Linechart.js.map +0 -1
- package/dist/Linechart/index.d.ts +0 -2
- package/dist/Linechart/index.js +0 -16
- package/dist/Linechart/index.js.map +0 -1
- package/dist/Linechart/lineChartPlotlyOverrides.js +0 -79
- package/dist/Linechart/lineChartPlotlyOverrides.js.map +0 -1
- package/dist/Linechart/styles.js +0 -10
- package/dist/Linechart/styles.js.map +0 -1
- package/dist/legacy/Barchart/Barchart.d.ts +0 -14
- package/dist/legacy/Barchart/Barchart.js +0 -197
- package/dist/legacy/Barchart/Barchart.js.map +0 -1
- package/dist/legacy/Barchart/barchartPlotlyOverrides.js +0 -43
- package/dist/legacy/Barchart/barchartPlotlyOverrides.js.map +0 -1
- package/dist/legacy/Barchart/index.d.ts +0 -2
- package/dist/legacy/Barchart/index.js +0 -2
- package/dist/legacy/Barchart/index.js.map +0 -1
- package/dist/legacy/Barchart/styles.js +0 -3
- package/dist/legacy/Barchart/styles.js.map +0 -1
- package/dist/legacy/Chart/Chart.d.ts +0 -25
- package/dist/legacy/Chart/Chart.js +0 -174
- package/dist/legacy/Chart/Chart.js.map +0 -1
- package/dist/legacy/Chart/Plot/Plot.d.ts +0 -43
- package/dist/legacy/Chart/Plot/Plot.js +0 -93
- package/dist/legacy/Chart/Plot/Plot.js.map +0 -1
- package/dist/legacy/Chart/Plot/index.d.ts +0 -2
- package/dist/legacy/Chart/Plot/index.js +0 -2
- package/dist/legacy/Chart/Plot/index.js.map +0 -1
- package/dist/legacy/Chart/Plot/styles.js +0 -3
- package/dist/legacy/Chart/Plot/styles.js.map +0 -1
- package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js +0 -130
- package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +0 -1
- package/dist/legacy/Chart/Tooltip/MultiTooltip/index.js +0 -2
- package/dist/legacy/Chart/Tooltip/MultiTooltip/index.js.map +0 -1
- package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js +0 -43
- package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js.map +0 -1
- package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js +0 -54
- package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +0 -1
- package/dist/legacy/Chart/Tooltip/SingleTooltip/index.js +0 -2
- package/dist/legacy/Chart/Tooltip/SingleTooltip/index.js.map +0 -1
- package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js +0 -18
- package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js.map +0 -1
- package/dist/legacy/Chart/Tooltip/Tooltip.js +0 -128
- package/dist/legacy/Chart/Tooltip/Tooltip.js.map +0 -1
- package/dist/legacy/Chart/Tooltip/index.js +0 -2
- package/dist/legacy/Chart/Tooltip/index.js.map +0 -1
- package/dist/legacy/Chart/Tooltip/styles.js +0 -9
- package/dist/legacy/Chart/Tooltip/styles.js.map +0 -1
- package/dist/legacy/Chart/chartPlotlyOverrides.js +0 -147
- package/dist/legacy/Chart/chartPlotlyOverrides.js.map +0 -1
- package/dist/legacy/Chart/index.d.ts +0 -5
- package/dist/legacy/Chart/index.js +0 -2
- package/dist/legacy/Chart/index.js.map +0 -1
- package/dist/legacy/Chart/styles.js +0 -32
- package/dist/legacy/Chart/styles.js.map +0 -1
- package/dist/legacy/Donutchart/Donutchart.d.ts +0 -10
- package/dist/legacy/Donutchart/Donutchart.js +0 -86
- package/dist/legacy/Donutchart/Donutchart.js.map +0 -1
- package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js +0 -40
- package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js.map +0 -1
- package/dist/legacy/Donutchart/index.d.ts +0 -2
- package/dist/legacy/Donutchart/index.js +0 -2
- package/dist/legacy/Donutchart/index.js.map +0 -1
- package/dist/legacy/Donutchart/styles.js +0 -3
- package/dist/legacy/Donutchart/styles.js.map +0 -1
- package/dist/legacy/Linechart/Linechart.d.ts +0 -14
- package/dist/legacy/Linechart/Linechart.js +0 -92
- package/dist/legacy/Linechart/Linechart.js.map +0 -1
- package/dist/legacy/Linechart/index.d.ts +0 -2
- package/dist/legacy/Linechart/index.js +0 -2
- package/dist/legacy/Linechart/index.js.map +0 -1
- package/dist/legacy/Linechart/lineChartPlotlyOverrides.js +0 -63
- package/dist/legacy/Linechart/lineChartPlotlyOverrides.js.map +0 -1
- package/dist/legacy/Linechart/styles.js +0 -3
- package/dist/legacy/Linechart/styles.js.map +0 -1
- package/dist/modern/Barchart/Barchart.d.ts +0 -14
- package/dist/modern/Barchart/Barchart.js +0 -178
- package/dist/modern/Barchart/Barchart.js.map +0 -1
- package/dist/modern/Barchart/barchartPlotlyOverrides.js +0 -41
- package/dist/modern/Barchart/barchartPlotlyOverrides.js.map +0 -1
- package/dist/modern/Barchart/index.d.ts +0 -2
- package/dist/modern/Barchart/index.js +0 -2
- package/dist/modern/Barchart/index.js.map +0 -1
- package/dist/modern/Barchart/styles.js +0 -3
- package/dist/modern/Barchart/styles.js.map +0 -1
- package/dist/modern/Chart/Chart.d.ts +0 -25
- package/dist/modern/Chart/Chart.js +0 -158
- package/dist/modern/Chart/Chart.js.map +0 -1
- package/dist/modern/Chart/Plot/Plot.d.ts +0 -43
- package/dist/modern/Chart/Plot/Plot.js +0 -94
- package/dist/modern/Chart/Plot/Plot.js.map +0 -1
- package/dist/modern/Chart/Plot/index.d.ts +0 -2
- package/dist/modern/Chart/Plot/index.js +0 -2
- package/dist/modern/Chart/Plot/index.js.map +0 -1
- package/dist/modern/Chart/Plot/styles.js +0 -3
- package/dist/modern/Chart/Plot/styles.js.map +0 -1
- package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js +0 -123
- package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +0 -1
- package/dist/modern/Chart/Tooltip/MultiTooltip/index.js +0 -2
- package/dist/modern/Chart/Tooltip/MultiTooltip/index.js.map +0 -1
- package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js +0 -41
- package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js.map +0 -1
- package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js +0 -51
- package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +0 -1
- package/dist/modern/Chart/Tooltip/SingleTooltip/index.js +0 -2
- package/dist/modern/Chart/Tooltip/SingleTooltip/index.js.map +0 -1
- package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js +0 -16
- package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js.map +0 -1
- package/dist/modern/Chart/Tooltip/Tooltip.js +0 -125
- package/dist/modern/Chart/Tooltip/Tooltip.js.map +0 -1
- package/dist/modern/Chart/Tooltip/index.js +0 -2
- package/dist/modern/Chart/Tooltip/index.js.map +0 -1
- package/dist/modern/Chart/Tooltip/styles.js +0 -9
- package/dist/modern/Chart/Tooltip/styles.js.map +0 -1
- package/dist/modern/Chart/chartPlotlyOverrides.js +0 -137
- package/dist/modern/Chart/chartPlotlyOverrides.js.map +0 -1
- package/dist/modern/Chart/index.d.ts +0 -5
- package/dist/modern/Chart/index.js +0 -2
- package/dist/modern/Chart/index.js.map +0 -1
- package/dist/modern/Chart/styles.js +0 -23
- package/dist/modern/Chart/styles.js.map +0 -1
- package/dist/modern/Donutchart/Donutchart.d.ts +0 -10
- package/dist/modern/Donutchart/Donutchart.js +0 -82
- package/dist/modern/Donutchart/Donutchart.js.map +0 -1
- package/dist/modern/Donutchart/donutchartPlotlyOverrides.js +0 -38
- package/dist/modern/Donutchart/donutchartPlotlyOverrides.js.map +0 -1
- package/dist/modern/Donutchart/index.d.ts +0 -2
- package/dist/modern/Donutchart/index.js +0 -2
- package/dist/modern/Donutchart/index.js.map +0 -1
- package/dist/modern/Donutchart/styles.js +0 -3
- package/dist/modern/Donutchart/styles.js.map +0 -1
- package/dist/modern/Linechart/Linechart.d.ts +0 -14
- package/dist/modern/Linechart/Linechart.js +0 -87
- package/dist/modern/Linechart/Linechart.js.map +0 -1
- package/dist/modern/Linechart/index.d.ts +0 -2
- package/dist/modern/Linechart/index.js +0 -2
- package/dist/modern/Linechart/index.js.map +0 -1
- package/dist/modern/Linechart/lineChartPlotlyOverrides.js +0 -59
- package/dist/modern/Linechart/lineChartPlotlyOverrides.js.map +0 -1
- package/dist/modern/Linechart/styles.js +0 -3
- package/dist/modern/Linechart/styles.js.map +0 -1
|
@@ -21,6 +21,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
});
|
|
22
22
|
exports.default = void 0;
|
|
23
23
|
|
|
24
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
25
|
+
|
|
24
26
|
var _react = _interopRequireWildcard(require("react"));
|
|
25
27
|
|
|
26
28
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -107,8 +109,6 @@ var applyCustomTheme = function applyCustomTheme(InputTargetTheme, InputSourceTh
|
|
|
107
109
|
|
|
108
110
|
|
|
109
111
|
var HvProvider = function HvProvider(_ref) {
|
|
110
|
-
var _navigator$language, _navigator;
|
|
111
|
-
|
|
112
112
|
var children = _ref.children,
|
|
113
113
|
_ref$uiKitTheme = _ref.uiKitTheme,
|
|
114
114
|
uiKitTheme = _ref$uiKitTheme === void 0 ? "dawn" : _ref$uiKitTheme,
|
|
@@ -116,7 +116,8 @@ var HvProvider = function HvProvider(_ref) {
|
|
|
116
116
|
theme = _ref$theme === void 0 ? null : _ref$theme,
|
|
117
117
|
_ref$changeTheme = _ref.changeTheme,
|
|
118
118
|
changeTheme = _ref$changeTheme === void 0 ? function () {} : _ref$changeTheme,
|
|
119
|
-
locale = _ref.locale,
|
|
119
|
+
_ref$locale = _ref.locale,
|
|
120
|
+
locale = _ref$locale === void 0 ? "en-US" : _ref$locale,
|
|
120
121
|
generateClassNameProp = _ref.generateClassName,
|
|
121
122
|
generateClassNameOptions = _ref.generateClassNameOptions,
|
|
122
123
|
_ref$injectStylesFirs = _ref.injectStylesFirst,
|
|
@@ -134,7 +135,17 @@ var HvProvider = function HvProvider(_ref) {
|
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
137
|
|
|
137
|
-
var
|
|
138
|
+
var _useState = (0, _react.useState)(locale),
|
|
139
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
140
|
+
localeSetting = _useState2[0],
|
|
141
|
+
setLocaleStting = _useState2[1];
|
|
142
|
+
|
|
143
|
+
(0, _react.useEffect)(function () {
|
|
144
|
+
var _navigator;
|
|
145
|
+
|
|
146
|
+
// ssr - only runs at the rendering phase, so it won't run on the server
|
|
147
|
+
setLocaleStting(locale || ((_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.language));
|
|
148
|
+
}, [locale]);
|
|
138
149
|
var rawUiKitTheme = (0, _theme.getTheme)(uiKitTheme);
|
|
139
150
|
var customTheme = applyCustomTheme((0, _theme.themeBuilder)(rawUiKitTheme), theme);
|
|
140
151
|
var generateClassName = generateClassNameProp || (0, _theme.createGenerateClassName)(generateClassNameOptions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","names":["warnedOnce","applyCustomTheme","InputTargetTheme","InputSourceTheme","muiDefaultTheme","targetTheme","sourceTheme","deleteDifference","diff","observableDiff","difference","partialCustomTheme","path","rhs","kind","HvProvider","children","uiKitTheme","theme","changeTheme","locale","generateClassNameProp","generateClassName","generateClassNameOptions","injectStylesFirst","disableStylesGeneration","disableCssBaseline","process","env","NODE_ENV","console","warn","localeSetting","navigator","language","rawUiKitTheme","customTheme","pConfig","propTypes","PropTypes","node","isRequired","oneOf","instanceOf","Object","func","string","shape","disableGlobal","bool","productionPrefix","seed"],"sources":["../../src/Provider/Provider.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport set from \"lodash/set\";\nimport merge from \"lodash/merge\";\nimport isEmpty from \"lodash/isEmpty\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport diff from \"deep-diff\";\n\nimport \"focus-within-polyfill\";\nimport \"focus-visible\";\n\nimport {\n ThemeProvider as MuiThemeProvider,\n StylesProvider as MuiStylesProvider,\n} from \"@material-ui/core\";\nimport { createTheme } from \"@material-ui/core/styles\";\n\nimport { themeBuilder, createGenerateClassName, HvCssBaseline, getTheme } from \"../theme\";\n\nimport ConfigContext from \"./context\";\n\nlet warnedOnce = false;\n\n/**\n * Augments the target theme with the differences found in the source theme.\n *\n * @param {Object} InputTargetTheme - A material UI Theme to be changed.\n * @param {Object} InputSourceTheme - A material UI Theme to apply on top.\n * @returns {Object} - A new modified material UI theme.\n */\nconst applyCustomTheme = (InputTargetTheme, InputSourceTheme) => {\n const muiDefaultTheme = createTheme();\n const targetTheme = cloneDeep(InputTargetTheme);\n const sourceTheme = cloneDeep(InputSourceTheme);\n const deleteDifference = \"D\";\n if (!isEmpty(targetTheme) && !isEmpty(sourceTheme)) {\n diff.observableDiff(muiDefaultTheme, sourceTheme, (difference) => {\n const partialCustomTheme = set({}, difference.path, difference.rhs);\n if (difference.kind !== deleteDifference) {\n // Do not include the differences of type \"delete\"\n merge(targetTheme, partialCustomTheme);\n }\n });\n return targetTheme;\n }\n return targetTheme;\n};\n\n/**\n * This component makes cross-component properties, like the active `theme` and `locale`,\n * available down the React tree thanks to React context.\n *\n * This component should preferably be used at **the root of your component tree** and\n * be unique in the App in most cases.\n *\n * ```jsx\n * <HvProvider>\n * <MyApp />\n * <HvProvider/>\n * ```\n *\n * If several `HvProvider`'s are used, either nested or in parallel, the `generateClassNameOptions`\n * must be tweaked to avoid CSS classnames collision. Or a custom JSS's class name generator can\n * be provided via the `generateClassName` property.\n *\n * **UI Kit components will not work at all if the `HvProvider` is not configured correctly**,\n * as they will not be able to access the properties of the active theme..\n *\n */\nconst HvProvider = ({\n children,\n\n uiKitTheme = \"dawn\",\n theme = null,\n changeTheme = () => {},\n\n locale,\n\n generateClassName: generateClassNameProp,\n generateClassNameOptions,\n injectStylesFirst = false,\n disableStylesGeneration = false,\n\n disableCssBaseline = false,\n}) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!warnedOnce && !disableCssBaseline) {\n warnedOnce = true;\n // eslint-disable-next-line no-console\n console.warn(\n \"UI Kit HvProvider's automatic definition of a css styles baseline will be removed in the next major version.\\n\" +\n \"You can use the `disableCssBaseline` property to disable it already.\\n\" +\n \"See https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\"\n );\n }\n }\n\n const localeSetting = locale || (navigator?.language ?? \"en-US\");\n\n const rawUiKitTheme = getTheme(uiKitTheme);\n const customTheme = applyCustomTheme(themeBuilder(rawUiKitTheme), theme);\n\n const generateClassName =\n generateClassNameProp || createGenerateClassName(generateClassNameOptions);\n\n const pConfig = useMemo(\n () => ({ changeTheme, locale: localeSetting }),\n [changeTheme, localeSetting]\n );\n\n return (\n <MuiStylesProvider\n generateClassName={generateClassName}\n injectFirst={injectStylesFirst}\n disableGeneration={disableStylesGeneration}\n >\n <MuiThemeProvider theme={customTheme}>\n {!disableCssBaseline && <HvCssBaseline />}\n <ConfigContext.Provider value={pConfig}>{children}</ConfigContext.Provider>\n </MuiThemeProvider>\n </MuiStylesProvider>\n );\n};\n\nHvProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * The Design System base theme in use. Defaults to `\"dawn\"`.\n */\n uiKitTheme: PropTypes.oneOf([\"dawn\", \"wicked\"]),\n /**\n * The UI Kit theme object to be applied on top of the base theme.\n */\n theme: PropTypes.instanceOf(Object),\n /**\n * Function stored in the provider's context to allow runtime switching of the active theme.\n * The implementation is up to each App.\n */\n changeTheme: PropTypes.func,\n\n /**\n * The locale to be used.\n * Defaults to the browser's configured locale or \"en-US\" if not available.\n */\n locale: PropTypes.string,\n\n /**\n * Custom JSS's class name generator.\n */\n generateClassName: PropTypes.func,\n /**\n * Built-in JSS's class name generator options.\n * Ignored if a custom `generateClassName` is provided.\n *\n * `disableGlobal`: Disable the generation of deterministic class names. Defaults to `false`.\n *\n * `productionPrefix`: The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n *\n * `seed`: The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n generateClassNameOptions: PropTypes.shape({\n /**\n * Disable the generation of deterministic class names. Defaults to `false`.\n */\n disableGlobal: PropTypes.bool,\n /**\n * The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n */\n productionPrefix: PropTypes.string,\n /**\n * The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n seed: PropTypes.string,\n }),\n /**\n * Injects the generated stylesheets at the top of the `<head>` element of the page.\n * This can ease the override of UI Kit components styles.\n *\n * By default, the styles are injected last in the `<head>` element of the page.\n */\n injectStylesFirst: PropTypes.bool,\n /**\n * Disables the generation of the styles.\n */\n disableStylesGeneration: PropTypes.bool,\n\n /**\n * Disables the generation of the baseline css styles.\n *\n * This will be the default behavior in the future.\n *\n * The application using UI Kit should be responsible for adding the baseline css styles, by\n * either using the `<HvCssBaseline />` component, using the `<HvScopedCssBaseline />` component,\n * or ensuring that the necessary base styles are applied.\n *\n * Defaults to `false`. Will be removed in the next major release.\n *\n * @see https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\n */\n disableCssBaseline: PropTypes.bool,\n};\n\nexport default HvProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AAIA;;AAEA;;AAEA;;;;;;;;AAEA,IAAIA,UAAU,GAAG,KAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,gBAAD,EAAmBC,gBAAnB,EAAwC;EAC/D,IAAMC,eAAe,GAAG,0BAAxB;EACA,IAAMC,WAAW,GAAG,wBAAUH,gBAAV,CAApB;EACA,IAAMI,WAAW,GAAG,wBAAUH,gBAAV,CAApB;EACA,IAAMI,gBAAgB,GAAG,GAAzB;;EACA,IAAI,CAAC,sBAAQ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iB,mBAAUM,IA7BR;;EA8BrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEtB,wBAAwB,EAAEgB,mBAAUQ,KAAV,CAAgB;IACxC;AACJ;AACA;IACIC,aAAa,EAAET,mBAAUU,IAJe;;IAKxC;AACJ;AACA;IACIC,gBAAgB,EAAEX,mBAAUO,MARY;;IASxC;AACJ;AACA;AACA;IACIK,IAAI,EAAEZ,mBAAUO;EAbwB,CAAhB,CAzCL;;EAwDrB;AACF;AACA;AACA;AACA;AACA;EACEtB,iBAAiB,EAAEe,mBAAUU,IA9DR;;EA+DrB;AACF;AACA;EACExB,uBAAuB,EAAEc,mBAAUU,IAlEd;;EAoErB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEvB,kBAAkB,EAAEa,mBAAUU;AAjFT,CAAvB;eAoFelC,U"}
|
|
1
|
+
{"version":3,"file":"Provider.js","names":["warnedOnce","applyCustomTheme","InputTargetTheme","InputSourceTheme","muiDefaultTheme","targetTheme","sourceTheme","deleteDifference","diff","observableDiff","difference","partialCustomTheme","path","rhs","kind","HvProvider","children","uiKitTheme","theme","changeTheme","locale","generateClassNameProp","generateClassName","generateClassNameOptions","injectStylesFirst","disableStylesGeneration","disableCssBaseline","process","env","NODE_ENV","console","warn","localeSetting","setLocaleStting","navigator","language","rawUiKitTheme","customTheme","pConfig","propTypes","PropTypes","node","isRequired","oneOf","instanceOf","Object","func","string","shape","disableGlobal","bool","productionPrefix","seed"],"sources":["../../src/Provider/Provider.js"],"sourcesContent":["import React, { useState, useEffect, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport set from \"lodash/set\";\nimport merge from \"lodash/merge\";\nimport isEmpty from \"lodash/isEmpty\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport diff from \"deep-diff\";\n\nimport \"focus-within-polyfill\";\nimport \"focus-visible\";\n\nimport {\n ThemeProvider as MuiThemeProvider,\n StylesProvider as MuiStylesProvider,\n} from \"@material-ui/core\";\nimport { createTheme } from \"@material-ui/core/styles\";\n\nimport { themeBuilder, createGenerateClassName, HvCssBaseline, getTheme } from \"../theme\";\n\nimport ConfigContext from \"./context\";\n\nlet warnedOnce = false;\n\n/**\n * Augments the target theme with the differences found in the source theme.\n *\n * @param {Object} InputTargetTheme - A material UI Theme to be changed.\n * @param {Object} InputSourceTheme - A material UI Theme to apply on top.\n * @returns {Object} - A new modified material UI theme.\n */\nconst applyCustomTheme = (InputTargetTheme, InputSourceTheme) => {\n const muiDefaultTheme = createTheme();\n const targetTheme = cloneDeep(InputTargetTheme);\n const sourceTheme = cloneDeep(InputSourceTheme);\n const deleteDifference = \"D\";\n if (!isEmpty(targetTheme) && !isEmpty(sourceTheme)) {\n diff.observableDiff(muiDefaultTheme, sourceTheme, (difference) => {\n const partialCustomTheme = set({}, difference.path, difference.rhs);\n if (difference.kind !== deleteDifference) {\n // Do not include the differences of type \"delete\"\n merge(targetTheme, partialCustomTheme);\n }\n });\n return targetTheme;\n }\n return targetTheme;\n};\n\n/**\n * This component makes cross-component properties, like the active `theme` and `locale`,\n * available down the React tree thanks to React context.\n *\n * This component should preferably be used at **the root of your component tree** and\n * be unique in the App in most cases.\n *\n * ```jsx\n * <HvProvider>\n * <MyApp />\n * <HvProvider/>\n * ```\n *\n * If several `HvProvider`'s are used, either nested or in parallel, the `generateClassNameOptions`\n * must be tweaked to avoid CSS classnames collision. Or a custom JSS's class name generator can\n * be provided via the `generateClassName` property.\n *\n * **UI Kit components will not work at all if the `HvProvider` is not configured correctly**,\n * as they will not be able to access the properties of the active theme..\n *\n */\nconst HvProvider = ({\n children,\n\n uiKitTheme = \"dawn\",\n theme = null,\n changeTheme = () => {},\n\n locale = \"en-US\",\n\n generateClassName: generateClassNameProp,\n generateClassNameOptions,\n injectStylesFirst = false,\n disableStylesGeneration = false,\n\n disableCssBaseline = false,\n}) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!warnedOnce && !disableCssBaseline) {\n warnedOnce = true;\n // eslint-disable-next-line no-console\n console.warn(\n \"UI Kit HvProvider's automatic definition of a css styles baseline will be removed in the next major version.\\n\" +\n \"You can use the `disableCssBaseline` property to disable it already.\\n\" +\n \"See https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\"\n );\n }\n }\n\n const [localeSetting, setLocaleStting] = useState(locale);\n\n useEffect(() => {\n // ssr - only runs at the rendering phase, so it won't run on the server\n setLocaleStting(locale || navigator?.language);\n }, [locale]);\n\n const rawUiKitTheme = getTheme(uiKitTheme);\n const customTheme = applyCustomTheme(themeBuilder(rawUiKitTheme), theme);\n\n const generateClassName =\n generateClassNameProp || createGenerateClassName(generateClassNameOptions);\n\n const pConfig = useMemo(\n () => ({ changeTheme, locale: localeSetting }),\n [changeTheme, localeSetting]\n );\n\n return (\n <MuiStylesProvider\n generateClassName={generateClassName}\n injectFirst={injectStylesFirst}\n disableGeneration={disableStylesGeneration}\n >\n <MuiThemeProvider theme={customTheme}>\n {!disableCssBaseline && <HvCssBaseline />}\n <ConfigContext.Provider value={pConfig}>{children}</ConfigContext.Provider>\n </MuiThemeProvider>\n </MuiStylesProvider>\n );\n};\n\nHvProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * The Design System base theme in use. Defaults to `\"dawn\"`.\n */\n uiKitTheme: PropTypes.oneOf([\"dawn\", \"wicked\"]),\n /**\n * The UI Kit theme object to be applied on top of the base theme.\n */\n theme: PropTypes.instanceOf(Object),\n /**\n * Function stored in the provider's context to allow runtime switching of the active theme.\n * The implementation is up to each App.\n */\n changeTheme: PropTypes.func,\n\n /**\n * The locale to be used.\n * Defaults to the browser's configured locale or \"en-US\" if not available.\n */\n locale: PropTypes.string,\n\n /**\n * Custom JSS's class name generator.\n */\n generateClassName: PropTypes.func,\n /**\n * Built-in JSS's class name generator options.\n * Ignored if a custom `generateClassName` is provided.\n *\n * `disableGlobal`: Disable the generation of deterministic class names. Defaults to `false`.\n *\n * `productionPrefix`: The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n *\n * `seed`: The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n generateClassNameOptions: PropTypes.shape({\n /**\n * Disable the generation of deterministic class names. Defaults to `false`.\n */\n disableGlobal: PropTypes.bool,\n /**\n * The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n */\n productionPrefix: PropTypes.string,\n /**\n * The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n seed: PropTypes.string,\n }),\n /**\n * Injects the generated stylesheets at the top of the `<head>` element of the page.\n * This can ease the override of UI Kit components styles.\n *\n * By default, the styles are injected last in the `<head>` element of the page.\n */\n injectStylesFirst: PropTypes.bool,\n /**\n * Disables the generation of the styles.\n */\n disableStylesGeneration: PropTypes.bool,\n\n /**\n * Disables the generation of the baseline css styles.\n *\n * This will be the default behavior in the future.\n *\n * The application using UI Kit should be responsible for adding the baseline css styles, by\n * either using the `<HvCssBaseline />` component, using the `<HvScopedCssBaseline />` component,\n * or ensuring that the necessary base styles are applied.\n *\n * Defaults to `false`. Will be removed in the next major release.\n *\n * @see https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\n */\n disableCssBaseline: PropTypes.bool,\n};\n\nexport default HvProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AAIA;;AAEA;;AAEA;;;;;;;;AAEA,IAAIA,UAAU,GAAG,KAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,gBAAD,EAAmBC,gBAAnB,EAAwC;EAC/D,IAAMC,eAAe,GAAG,0BAAxB;EACA,IAAMC,WAAW,GAAG,wBAAUH,gBAAV,CAApB;EACA,IAAMI,WAAW,GA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rB;AACF;AACA;EACEzB,KAAK,EAAEsB,mBAAUI,UAAV,CAAqBC,MAArB,CAbc;;EAcrB;AACF;AACA;AACA;EACE1B,WAAW,EAAEqB,mBAAUM,IAlBF;;EAoBrB;AACF;AACA;AACA;EACE1B,MAAM,EAAEoB,mBAAUO,MAxBG;;EA0BrB;AACF;AACA;EACEzB,iBAAiB,EAAEkB,mBAAUM,IA7BR;;EA8BrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEvB,wBAAwB,EAAEiB,mBAAUQ,KAAV,CAAgB;IACxC;AACJ;AACA;IACIC,aAAa,EAAET,mBAAUU,IAJe;;IAKxC;AACJ;AACA;IACIC,gBAAgB,EAAEX,mBAAUO,MARY;;IASxC;AACJ;AACA;AACA;IACIK,IAAI,EAAEZ,mBAAUO;EAbwB,CAAhB,CAzCL;;EAwDrB;AACF;AACA;AACA;AACA;AACA;EACEvB,iBAAiB,EAAEgB,mBAAUU,IA9DR;;EA+DrB;AACF;AACA;EACEzB,uBAAuB,EAAEe,mBAAUU,IAlEd;;EAoErB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACExB,kBAAkB,EAAEc,mBAAUU;AAjFT,CAAvB;eAoFenC,U"}
|
package/dist/index.d.ts
CHANGED
|
@@ -22,9 +22,6 @@ export * from "./Badge";
|
|
|
22
22
|
export { default as HvBanner } from "./Banner";
|
|
23
23
|
export * from "./Banner";
|
|
24
24
|
|
|
25
|
-
export { default as HvBarchart } from "./Barchart";
|
|
26
|
-
export * from "./Barchart";
|
|
27
|
-
|
|
28
25
|
export { default as HvBreadcrumb } from "./BreadCrumb";
|
|
29
26
|
export * from "./BreadCrumb";
|
|
30
27
|
|
|
@@ -45,9 +42,6 @@ export * from "./Container";
|
|
|
45
42
|
export { default as HvDatePicker } from "./DatePicker";
|
|
46
43
|
export * from "./DatePicker";
|
|
47
44
|
|
|
48
|
-
export { default as HvDonutchart } from "./Donutchart";
|
|
49
|
-
export * from "./Donutchart";
|
|
50
|
-
|
|
51
45
|
export { default as HvDropdown } from "./Dropdown";
|
|
52
46
|
export * from "./Dropdown";
|
|
53
47
|
|
|
@@ -98,9 +92,6 @@ export * from "./Forms/Label";
|
|
|
98
92
|
export { default as HvKpi } from "./Kpi";
|
|
99
93
|
export * from "./Kpi";
|
|
100
94
|
|
|
101
|
-
export { default as HvLinechart } from "./Linechart";
|
|
102
|
-
export * from "./Linechart";
|
|
103
|
-
|
|
104
95
|
export { default as HvLink } from "./Link";
|
|
105
96
|
export * from "./Link";
|
|
106
97
|
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,6 @@ var _exportNames = {
|
|
|
32
32
|
HvAvatar: true,
|
|
33
33
|
HvBadge: true,
|
|
34
34
|
HvBanner: true,
|
|
35
|
-
HvBarchart: true,
|
|
36
35
|
HvBaseDropdown: true,
|
|
37
36
|
HvBreadcrumb: true,
|
|
38
37
|
HvBulkActions: true,
|
|
@@ -40,7 +39,6 @@ var _exportNames = {
|
|
|
40
39
|
HvCard: true,
|
|
41
40
|
HvContainer: true,
|
|
42
41
|
HvDatePicker: true,
|
|
43
|
-
HvDonutchart: true,
|
|
44
42
|
HvDropdown: true,
|
|
45
43
|
HvDropDownMenu: true,
|
|
46
44
|
HvEmptyState: true,
|
|
@@ -55,7 +53,6 @@ var _exportNames = {
|
|
|
55
53
|
HvInput: true,
|
|
56
54
|
HvSlider: true,
|
|
57
55
|
HvKpi: true,
|
|
58
|
-
HvLinechart: true,
|
|
59
56
|
HvLink: true,
|
|
60
57
|
HvListContainer: true,
|
|
61
58
|
HvList: true,
|
|
@@ -165,12 +162,6 @@ Object.defineProperty(exports, "HvBanner", {
|
|
|
165
162
|
return _Banner.default;
|
|
166
163
|
}
|
|
167
164
|
});
|
|
168
|
-
Object.defineProperty(exports, "HvBarchart", {
|
|
169
|
-
enumerable: true,
|
|
170
|
-
get: function get() {
|
|
171
|
-
return _Barchart.default;
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
165
|
Object.defineProperty(exports, "HvBaseCheckBox", {
|
|
175
166
|
enumerable: true,
|
|
176
167
|
get: function get() {
|
|
@@ -261,12 +252,6 @@ Object.defineProperty(exports, "HvDialog", {
|
|
|
261
252
|
return _Dialog.default;
|
|
262
253
|
}
|
|
263
254
|
});
|
|
264
|
-
Object.defineProperty(exports, "HvDonutchart", {
|
|
265
|
-
enumerable: true,
|
|
266
|
-
get: function get() {
|
|
267
|
-
return _Donutchart.default;
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
255
|
Object.defineProperty(exports, "HvDropDownMenu", {
|
|
271
256
|
enumerable: true,
|
|
272
257
|
get: function get() {
|
|
@@ -339,12 +324,6 @@ Object.defineProperty(exports, "HvKpi", {
|
|
|
339
324
|
return _Kpi.default;
|
|
340
325
|
}
|
|
341
326
|
});
|
|
342
|
-
Object.defineProperty(exports, "HvLinechart", {
|
|
343
|
-
enumerable: true,
|
|
344
|
-
get: function get() {
|
|
345
|
-
return _Linechart.default;
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
327
|
Object.defineProperty(exports, "HvLink", {
|
|
349
328
|
enumerable: true,
|
|
350
329
|
get: function get() {
|
|
@@ -710,8 +689,6 @@ Object.keys(_Banner).forEach(function (key) {
|
|
|
710
689
|
});
|
|
711
690
|
});
|
|
712
691
|
|
|
713
|
-
var _Barchart = _interopRequireDefault(require("./Barchart"));
|
|
714
|
-
|
|
715
692
|
var _BaseDropdown = _interopRequireDefault(require("./BaseDropdown"));
|
|
716
693
|
|
|
717
694
|
var _BreadCrumb = _interopRequireDefault(require("./BreadCrumb"));
|
|
@@ -752,8 +729,6 @@ var _Container = _interopRequireDefault(require("./Container"));
|
|
|
752
729
|
|
|
753
730
|
var _DatePicker = _interopRequireDefault(require("./DatePicker"));
|
|
754
731
|
|
|
755
|
-
var _Donutchart = _interopRequireDefault(require("./Donutchart"));
|
|
756
|
-
|
|
757
732
|
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
758
733
|
|
|
759
734
|
var _DropDownMenu = _interopRequireDefault(require("./DropDownMenu"));
|
|
@@ -820,8 +795,6 @@ var _Slider = _interopRequireDefault(require("./Slider"));
|
|
|
820
795
|
|
|
821
796
|
var _Kpi = _interopRequireDefault(require("./Kpi"));
|
|
822
797
|
|
|
823
|
-
var _Linechart = _interopRequireDefault(require("./Linechart"));
|
|
824
|
-
|
|
825
798
|
var _Link = _interopRequireDefault(require("./Link"));
|
|
826
799
|
|
|
827
800
|
var _ListContainer = _interopRequireWildcard(require("./ListContainer"));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.js"],"sourcesContent":["// components\nexport { default as HvAccordion } from \"./Accordion\";\nexport { default as HvActionsGeneric } from \"./ActionsGeneric\";\nexport { default as HvActionBar } from \"./ActionBar\";\nexport { default as HvAppSwitcher } from \"./AppSwitcher\";\nexport { default as HvAssetInventory } from \"./AssetInventory\";\nexport * from \"./AssetInventory\";\nexport { default as HvAvatar } from \"./Avatar\";\nexport { default as HvBadge } from \"./Badge\";\nexport { default as HvBanner } from \"./Banner\";\nexport * from \"./Banner\";\nexport { default as
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.js"],"sourcesContent":["// components\nexport { default as HvAccordion } from \"./Accordion\";\nexport { default as HvActionsGeneric } from \"./ActionsGeneric\";\nexport { default as HvActionBar } from \"./ActionBar\";\nexport { default as HvAppSwitcher } from \"./AppSwitcher\";\nexport { default as HvAssetInventory } from \"./AssetInventory\";\nexport * from \"./AssetInventory\";\nexport { default as HvAvatar } from \"./Avatar\";\nexport { default as HvBadge } from \"./Badge\";\nexport { default as HvBanner } from \"./Banner\";\nexport * from \"./Banner\";\nexport { default as HvBaseDropdown } from \"./BaseDropdown\";\nexport { default as HvBreadcrumb } from \"./BreadCrumb\";\nexport { default as HvBulkActions } from \"./BulkActions\";\nexport { default as HvButton } from \"./Button\";\nexport { default as HvCard } from \"./Card\";\nexport * from \"./Card\";\nexport * from \"./Calendar\";\nexport { default as HvContainer } from \"./Container\";\nexport { default as HvDatePicker } from \"./DatePicker\";\nexport { default as HvDropdown } from \"./Dropdown\";\nexport { default as HvDropDownMenu } from \"./DropDownMenu\";\nexport { default as HvEmptyState } from \"./EmptyState\";\nexport { default as HvFilterGroup } from \"./FilterGroup\";\nexport { default as HvFileUploader } from \"./FileUploader\";\nexport * from \"./FileUploader\";\nexport { default as HvFocus } from \"./Focus\";\nexport { default as HvFooter } from \"./Footer\";\nexport * from \"./Forms\";\n\nexport { default as HvGrid } from \"./Grid\";\nexport { default as HvGlobalActions } from \"./GlobalActions\";\n\nexport { default as HvHeader } from \"./Header\";\nexport * from \"./Header\";\n\nexport { default as HvBaseInput } from \"./BaseInput\";\nexport { default as HvInput } from \"./Input\";\n\nexport { default as HvSlider } from \"./Slider\";\n\nexport { default as HvKpi } from \"./Kpi\";\n\nexport { default as HvLink } from \"./Link\";\nexport { default as HvListContainer } from \"./ListContainer\";\nexport * from \"./ListContainer\";\n\nexport { default as HvList } from \"./List\";\n\nexport { default as HvSelectionList } from \"./SelectionList\";\n\nexport { default as HvLoading } from \"./Loading\";\nexport { default as HvLogin } from \"./Login\";\nexport { default as HvDialog } from \"./Dialog\";\nexport * from \"./Dialog\";\nexport { default as HvMultiButton } from \"./MultiButton\";\nexport { default as HvPagination } from \"./Pagination\";\n\nexport { default as HvBaseCheckBox } from \"./BaseCheckBox\";\nexport { default as HvCheckBox } from \"./CheckBox\";\nexport { default as HvCheckBoxGroup } from \"./CheckBoxGroup\";\n\nexport { default as HvBaseRadio } from \"./BaseRadio\";\nexport { default as HvRadio } from \"./Radio\";\nexport { default as HvRadioGroup } from \"./RadioGroup\";\n\nexport { default as HvBaseSwitch } from \"./BaseSwitch\";\nexport { default as HvSwitch } from \"./Switch\";\n\nexport { default as HvSnackbar } from \"./Snackbar\";\nexport { default as HvSnackbarContent } from \"./Snackbar/SnackbarContentWrapper\";\nexport { default as HvSnackbarProvider, useHvSnackbar } from \"./Snackbar/SnackbarProvider\";\nexport { default as HvStack } from \"./Stack\";\nexport { default as HvSimpleGrid } from \"./SimpleGrid\";\n\nexport { default as HvTab } from \"./Tab\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvTable } from \"./Table\";\nexport { default as HvTabs } from \"./Tabs\";\nexport { default as HvTextArea } from \"./TextArea\";\nexport { default as HvTagsInput } from \"./TagsInput\";\nexport { default as HvToggleButton } from \"./ToggleButton\";\nexport { default as HvTooltip } from \"./Tooltip\";\nexport { default as HvOverflowTooltip } from \"./OverflowTooltip\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTypography } from \"./Typography\";\nexport { default as HvUserPreferences } from \"./UserPreferences\";\n// TODO refactor the HvUserPreferences subcomponents' names\nexport {\n Actions as HvUserPreferencesActions,\n Action as HvUserPreferencesAction,\n} from \"./UserPreferences\";\nexport {\n Options as HvUserPreferencesOptions,\n Option as HvUserPreferencesOption,\n Group as HvUserPreferencesOptionsGroup,\n Label as HvUserPreferencesOptionsGroupLabel,\n} from \"./UserPreferences\";\n\nexport { default as HvScrollToHorizontal } from \"./ScrollTo/Horizontal\";\nexport { default as HvScrollToVertical } from \"./ScrollTo/Vertical\";\nexport { default as useScrollTo } from \"./ScrollTo/useScrollTo\";\n\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n// TODO refactor the HvVerticalNavigation subcomponents' names\nexport { Navigation as HvVerticalNavigationTree } from \"./VerticalNavigation\";\nexport { TreeView as HvTreeView, TreeViewItem as HvTreeViewItem } from \"./VerticalNavigation\";\nexport {\n Actions as HvVerticalNavigationActions,\n Action as HvVerticalNavigationAction,\n} from \"./VerticalNavigation\";\n\nexport { default as HvPanel } from \"./Panel\";\n\n// HOCs\nexport { default as withId } from \"./withId\";\nexport { default as withTooltip } from \"./withTooltip\";\n\n// Hooks\nexport { default as useUniqueId } from \"./useUniqueId\";\n\n// theme\nexport { default as hvTheme } from \"./theme\";\nexport { themeBuilder, getTheme } from \"./theme\";\nexport { HvCssBaseline, HvScopedCssBaseline } from \"./theme\";\n\n// provider\nexport { default as HvProvider } from \"./Provider\";\nexport * from \"./Provider\";\n\n// utils\nexport * from \"./utils\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AACA;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AACA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;;AAEA;;AAEA;;AAEA;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAEA;;AAEA;;AACA;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAaA;;AACA;;AACA;;AAEA;;AASA;;AAGA;;AACA;;AAGA;;AAGA;;AAKA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAGA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
|
|
1
3
|
var _HvCssBaseline;
|
|
2
4
|
|
|
3
|
-
import React, { useMemo } from "react";
|
|
5
|
+
import React, { useState, useEffect, useMemo } from "react";
|
|
4
6
|
import PropTypes from "prop-types";
|
|
5
7
|
import set from "lodash/set";
|
|
6
8
|
import merge from "lodash/merge";
|
|
@@ -66,8 +68,6 @@ var applyCustomTheme = function applyCustomTheme(InputTargetTheme, InputSourceTh
|
|
|
66
68
|
|
|
67
69
|
|
|
68
70
|
var HvProvider = function HvProvider(_ref) {
|
|
69
|
-
var _navigator$language, _navigator;
|
|
70
|
-
|
|
71
71
|
var children = _ref.children,
|
|
72
72
|
_ref$uiKitTheme = _ref.uiKitTheme,
|
|
73
73
|
uiKitTheme = _ref$uiKitTheme === void 0 ? "dawn" : _ref$uiKitTheme,
|
|
@@ -75,7 +75,8 @@ var HvProvider = function HvProvider(_ref) {
|
|
|
75
75
|
theme = _ref$theme === void 0 ? null : _ref$theme,
|
|
76
76
|
_ref$changeTheme = _ref.changeTheme,
|
|
77
77
|
changeTheme = _ref$changeTheme === void 0 ? function () {} : _ref$changeTheme,
|
|
78
|
-
locale = _ref.locale,
|
|
78
|
+
_ref$locale = _ref.locale,
|
|
79
|
+
locale = _ref$locale === void 0 ? "en-US" : _ref$locale,
|
|
79
80
|
generateClassNameProp = _ref.generateClassName,
|
|
80
81
|
generateClassNameOptions = _ref.generateClassNameOptions,
|
|
81
82
|
_ref$injectStylesFirs = _ref.injectStylesFirst,
|
|
@@ -93,7 +94,17 @@ var HvProvider = function HvProvider(_ref) {
|
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
var
|
|
97
|
+
var _useState = useState(locale),
|
|
98
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
99
|
+
localeSetting = _useState2[0],
|
|
100
|
+
setLocaleStting = _useState2[1];
|
|
101
|
+
|
|
102
|
+
useEffect(function () {
|
|
103
|
+
var _navigator;
|
|
104
|
+
|
|
105
|
+
// ssr - only runs at the rendering phase, so it won't run on the server
|
|
106
|
+
setLocaleStting(locale || ((_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.language));
|
|
107
|
+
}, [locale]);
|
|
97
108
|
var rawUiKitTheme = getTheme(uiKitTheme);
|
|
98
109
|
var customTheme = applyCustomTheme(themeBuilder(rawUiKitTheme), theme);
|
|
99
110
|
var generateClassName = generateClassNameProp || createGenerateClassName(generateClassNameOptions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","names":["React","useMemo","PropTypes","set","merge","isEmpty","cloneDeep","diff","ThemeProvider","MuiThemeProvider","StylesProvider","MuiStylesProvider","createTheme","themeBuilder","createGenerateClassName","HvCssBaseline","getTheme","ConfigContext","warnedOnce","applyCustomTheme","InputTargetTheme","InputSourceTheme","muiDefaultTheme","targetTheme","sourceTheme","deleteDifference","observableDiff","difference","partialCustomTheme","path","rhs","kind","HvProvider","children","uiKitTheme","theme","changeTheme","locale","generateClassNameProp","generateClassName","generateClassNameOptions","injectStylesFirst","disableStylesGeneration","disableCssBaseline","process","env","NODE_ENV","console","warn","localeSetting","navigator","language","rawUiKitTheme","customTheme","pConfig","propTypes","node","isRequired","oneOf","instanceOf","Object","func","string","shape","disableGlobal","bool","productionPrefix","seed"],"sources":["../../../src/Provider/Provider.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport set from \"lodash/set\";\nimport merge from \"lodash/merge\";\nimport isEmpty from \"lodash/isEmpty\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport diff from \"deep-diff\";\n\nimport \"focus-within-polyfill\";\nimport \"focus-visible\";\n\nimport {\n ThemeProvider as MuiThemeProvider,\n StylesProvider as MuiStylesProvider,\n} from \"@material-ui/core\";\nimport { createTheme } from \"@material-ui/core/styles\";\n\nimport { themeBuilder, createGenerateClassName, HvCssBaseline, getTheme } from \"../theme\";\n\nimport ConfigContext from \"./context\";\n\nlet warnedOnce = false;\n\n/**\n * Augments the target theme with the differences found in the source theme.\n *\n * @param {Object} InputTargetTheme - A material UI Theme to be changed.\n * @param {Object} InputSourceTheme - A material UI Theme to apply on top.\n * @returns {Object} - A new modified material UI theme.\n */\nconst applyCustomTheme = (InputTargetTheme, InputSourceTheme) => {\n const muiDefaultTheme = createTheme();\n const targetTheme = cloneDeep(InputTargetTheme);\n const sourceTheme = cloneDeep(InputSourceTheme);\n const deleteDifference = \"D\";\n if (!isEmpty(targetTheme) && !isEmpty(sourceTheme)) {\n diff.observableDiff(muiDefaultTheme, sourceTheme, (difference) => {\n const partialCustomTheme = set({}, difference.path, difference.rhs);\n if (difference.kind !== deleteDifference) {\n // Do not include the differences of type \"delete\"\n merge(targetTheme, partialCustomTheme);\n }\n });\n return targetTheme;\n }\n return targetTheme;\n};\n\n/**\n * This component makes cross-component properties, like the active `theme` and `locale`,\n * available down the React tree thanks to React context.\n *\n * This component should preferably be used at **the root of your component tree** and\n * be unique in the App in most cases.\n *\n * ```jsx\n * <HvProvider>\n * <MyApp />\n * <HvProvider/>\n * ```\n *\n * If several `HvProvider`'s are used, either nested or in parallel, the `generateClassNameOptions`\n * must be tweaked to avoid CSS classnames collision. Or a custom JSS's class name generator can\n * be provided via the `generateClassName` property.\n *\n * **UI Kit components will not work at all if the `HvProvider` is not configured correctly**,\n * as they will not be able to access the properties of the active theme..\n *\n */\nconst HvProvider = ({\n children,\n\n uiKitTheme = \"dawn\",\n theme = null,\n changeTheme = () => {},\n\n locale,\n\n generateClassName: generateClassNameProp,\n generateClassNameOptions,\n injectStylesFirst = false,\n disableStylesGeneration = false,\n\n disableCssBaseline = false,\n}) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!warnedOnce && !disableCssBaseline) {\n warnedOnce = true;\n // eslint-disable-next-line no-console\n console.warn(\n \"UI Kit HvProvider's automatic definition of a css styles baseline will be removed in the next major version.\\n\" +\n \"You can use the `disableCssBaseline` property to disable it already.\\n\" +\n \"See https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\"\n );\n }\n }\n\n const localeSetting = locale || (navigator?.language ?? \"en-US\");\n\n const rawUiKitTheme = getTheme(uiKitTheme);\n const customTheme = applyCustomTheme(themeBuilder(rawUiKitTheme), theme);\n\n const generateClassName =\n generateClassNameProp || createGenerateClassName(generateClassNameOptions);\n\n const pConfig = useMemo(\n () => ({ changeTheme, locale: localeSetting }),\n [changeTheme, localeSetting]\n );\n\n return (\n <MuiStylesProvider\n generateClassName={generateClassName}\n injectFirst={injectStylesFirst}\n disableGeneration={disableStylesGeneration}\n >\n <MuiThemeProvider theme={customTheme}>\n {!disableCssBaseline && <HvCssBaseline />}\n <ConfigContext.Provider value={pConfig}>{children}</ConfigContext.Provider>\n </MuiThemeProvider>\n </MuiStylesProvider>\n );\n};\n\nHvProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * The Design System base theme in use. Defaults to `\"dawn\"`.\n */\n uiKitTheme: PropTypes.oneOf([\"dawn\", \"wicked\"]),\n /**\n * The UI Kit theme object to be applied on top of the base theme.\n */\n theme: PropTypes.instanceOf(Object),\n /**\n * Function stored in the provider's context to allow runtime switching of the active theme.\n * The implementation is up to each App.\n */\n changeTheme: PropTypes.func,\n\n /**\n * The locale to be used.\n * Defaults to the browser's configured locale or \"en-US\" if not available.\n */\n locale: PropTypes.string,\n\n /**\n * Custom JSS's class name generator.\n */\n generateClassName: PropTypes.func,\n /**\n * Built-in JSS's class name generator options.\n * Ignored if a custom `generateClassName` is provided.\n *\n * `disableGlobal`: Disable the generation of deterministic class names. Defaults to `false`.\n *\n * `productionPrefix`: The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n *\n * `seed`: The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n generateClassNameOptions: PropTypes.shape({\n /**\n * Disable the generation of deterministic class names. Defaults to `false`.\n */\n disableGlobal: PropTypes.bool,\n /**\n * The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n */\n productionPrefix: PropTypes.string,\n /**\n * The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n seed: PropTypes.string,\n }),\n /**\n * Injects the generated stylesheets at the top of the `<head>` element of the page.\n * This can ease the override of UI Kit components styles.\n *\n * By default, the styles are injected last in the `<head>` element of the page.\n */\n injectStylesFirst: PropTypes.bool,\n /**\n * Disables the generation of the styles.\n */\n disableStylesGeneration: PropTypes.bool,\n\n /**\n * Disables the generation of the baseline css styles.\n *\n * This will be the default behavior in the future.\n *\n * The application using UI Kit should be responsible for adding the baseline css styles, by\n * either using the `<HvCssBaseline />` component, using the `<HvScopedCssBaseline />` component,\n * or ensuring that the necessary base styles are applied.\n *\n * Defaults to `false`. Will be removed in the next major release.\n *\n * @see https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\n */\n disableCssBaseline: PropTypes.bool,\n};\n\nexport default HvProvider;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,OAAhB,QAA+B,OAA/B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,GAAP,MAAgB,YAAhB;AACA,OAAOC,KAAP,MAAkB,cAAlB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,SAAP,MAAsB,kBAAtB;AACA,OAAOC,IAAP,MAAiB,WAAjB;AAEA,OAAO,uBAAP;AACA,OAAO,eAAP;AAEA,SACEC,aAAa,IAAIC,gBADnB,EAEEC,cAAc,IAAIC,iBAFpB,QAGO,mBAHP;AAIA,SAASC,WAAT,QAA4B,0BAA5B;AAEA,SAASC,YAAT,EAAuBC,uBAAvB,EAAgDC,aAAhD,EAA+DC,QAA/D,QAA+E,UAA/E;AAEA,OAAOC,aAAP,MAA0B,WAA1B;AAEA,IAAIC,UAAU,GAAG,KAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,gBAAD,EAAmBC,gBAAnB,EAAwC;EAC/D,IAAMC,eAAe,GAAGV,WAAW,EAAnC;EACA,IAAMW,WAAW,GAAGjB,SAAS,CAACc,gBAAD,CAA7B;EACA,IAAMI,WAAW,GAAGlB,SAAS,CAACe,gBAAD,CAA7B;EACA,IAAMI,gBAAgB,GAAG,GAAzB;;EACA,IAAI,CAAC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rB;AACF;AACA;AACA;EACExB,MAAM,EAAEnC,SAAS,CAAC4D,MAxBG;;EA0BrB;AACF;AACA;EACEvB,iBAAiB,EAAErC,SAAS,CAAC2D,IA7BR;;EA8BrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACErB,wBAAwB,EAAEtC,SAAS,CAAC6D,KAAV,CAAgB;IACxC;AACJ;AACA;IACIC,aAAa,EAAE9D,SAAS,CAAC+D,IAJe;;IAKxC;AACJ;AACA;IACIC,gBAAgB,EAAEhE,SAAS,CAAC4D,MARY;;IASxC;AACJ;AACA;AACA;IACIK,IAAI,EAAEjE,SAAS,CAAC4D;EAbwB,CAAhB,CAzCL;;EAwDrB;AACF;AACA;AACA;AACA;AACA;EACErB,iBAAiB,EAAEvC,SAAS,CAAC+D,IA9DR;;EA+DrB;AACF;AACA;EACEvB,uBAAuB,EAAExC,SAAS,CAAC+D,IAlEd;;EAoErB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEtB,kBAAkB,EAAEzC,SAAS,CAAC+D;AAjFT,CAAvB;AAoFA,eAAejC,UAAf"}
|
|
1
|
+
{"version":3,"file":"Provider.js","names":["React","useState","useEffect","useMemo","PropTypes","set","merge","isEmpty","cloneDeep","diff","ThemeProvider","MuiThemeProvider","StylesProvider","MuiStylesProvider","createTheme","themeBuilder","createGenerateClassName","HvCssBaseline","getTheme","ConfigContext","warnedOnce","applyCustomTheme","InputTargetTheme","InputSourceTheme","muiDefaultTheme","targetTheme","sourceTheme","deleteDifference","observableDiff","difference","partialCustomTheme","path","rhs","kind","HvProvider","children","uiKitTheme","theme","changeTheme","locale","generateClassNameProp","generateClassName","generateClassNameOptions","injectStylesFirst","disableStylesGeneration","disableCssBaseline","process","env","NODE_ENV","console","warn","localeSetting","setLocaleStting","navigator","language","rawUiKitTheme","customTheme","pConfig","propTypes","node","isRequired","oneOf","instanceOf","Object","func","string","shape","disableGlobal","bool","productionPrefix","seed"],"sources":["../../../src/Provider/Provider.js"],"sourcesContent":["import React, { useState, useEffect, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport set from \"lodash/set\";\nimport merge from \"lodash/merge\";\nimport isEmpty from \"lodash/isEmpty\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport diff from \"deep-diff\";\n\nimport \"focus-within-polyfill\";\nimport \"focus-visible\";\n\nimport {\n ThemeProvider as MuiThemeProvider,\n StylesProvider as MuiStylesProvider,\n} from \"@material-ui/core\";\nimport { createTheme } from \"@material-ui/core/styles\";\n\nimport { themeBuilder, createGenerateClassName, HvCssBaseline, getTheme } from \"../theme\";\n\nimport ConfigContext from \"./context\";\n\nlet warnedOnce = false;\n\n/**\n * Augments the target theme with the differences found in the source theme.\n *\n * @param {Object} InputTargetTheme - A material UI Theme to be changed.\n * @param {Object} InputSourceTheme - A material UI Theme to apply on top.\n * @returns {Object} - A new modified material UI theme.\n */\nconst applyCustomTheme = (InputTargetTheme, InputSourceTheme) => {\n const muiDefaultTheme = createTheme();\n const targetTheme = cloneDeep(InputTargetTheme);\n const sourceTheme = cloneDeep(InputSourceTheme);\n const deleteDifference = \"D\";\n if (!isEmpty(targetTheme) && !isEmpty(sourceTheme)) {\n diff.observableDiff(muiDefaultTheme, sourceTheme, (difference) => {\n const partialCustomTheme = set({}, difference.path, difference.rhs);\n if (difference.kind !== deleteDifference) {\n // Do not include the differences of type \"delete\"\n merge(targetTheme, partialCustomTheme);\n }\n });\n return targetTheme;\n }\n return targetTheme;\n};\n\n/**\n * This component makes cross-component properties, like the active `theme` and `locale`,\n * available down the React tree thanks to React context.\n *\n * This component should preferably be used at **the root of your component tree** and\n * be unique in the App in most cases.\n *\n * ```jsx\n * <HvProvider>\n * <MyApp />\n * <HvProvider/>\n * ```\n *\n * If several `HvProvider`'s are used, either nested or in parallel, the `generateClassNameOptions`\n * must be tweaked to avoid CSS classnames collision. Or a custom JSS's class name generator can\n * be provided via the `generateClassName` property.\n *\n * **UI Kit components will not work at all if the `HvProvider` is not configured correctly**,\n * as they will not be able to access the properties of the active theme..\n *\n */\nconst HvProvider = ({\n children,\n\n uiKitTheme = \"dawn\",\n theme = null,\n changeTheme = () => {},\n\n locale = \"en-US\",\n\n generateClassName: generateClassNameProp,\n generateClassNameOptions,\n injectStylesFirst = false,\n disableStylesGeneration = false,\n\n disableCssBaseline = false,\n}) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!warnedOnce && !disableCssBaseline) {\n warnedOnce = true;\n // eslint-disable-next-line no-console\n console.warn(\n \"UI Kit HvProvider's automatic definition of a css styles baseline will be removed in the next major version.\\n\" +\n \"You can use the `disableCssBaseline` property to disable it already.\\n\" +\n \"See https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\"\n );\n }\n }\n\n const [localeSetting, setLocaleStting] = useState(locale);\n\n useEffect(() => {\n // ssr - only runs at the rendering phase, so it won't run on the server\n setLocaleStting(locale || navigator?.language);\n }, [locale]);\n\n const rawUiKitTheme = getTheme(uiKitTheme);\n const customTheme = applyCustomTheme(themeBuilder(rawUiKitTheme), theme);\n\n const generateClassName =\n generateClassNameProp || createGenerateClassName(generateClassNameOptions);\n\n const pConfig = useMemo(\n () => ({ changeTheme, locale: localeSetting }),\n [changeTheme, localeSetting]\n );\n\n return (\n <MuiStylesProvider\n generateClassName={generateClassName}\n injectFirst={injectStylesFirst}\n disableGeneration={disableStylesGeneration}\n >\n <MuiThemeProvider theme={customTheme}>\n {!disableCssBaseline && <HvCssBaseline />}\n <ConfigContext.Provider value={pConfig}>{children}</ConfigContext.Provider>\n </MuiThemeProvider>\n </MuiStylesProvider>\n );\n};\n\nHvProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * The Design System base theme in use. Defaults to `\"dawn\"`.\n */\n uiKitTheme: PropTypes.oneOf([\"dawn\", \"wicked\"]),\n /**\n * The UI Kit theme object to be applied on top of the base theme.\n */\n theme: PropTypes.instanceOf(Object),\n /**\n * Function stored in the provider's context to allow runtime switching of the active theme.\n * The implementation is up to each App.\n */\n changeTheme: PropTypes.func,\n\n /**\n * The locale to be used.\n * Defaults to the browser's configured locale or \"en-US\" if not available.\n */\n locale: PropTypes.string,\n\n /**\n * Custom JSS's class name generator.\n */\n generateClassName: PropTypes.func,\n /**\n * Built-in JSS's class name generator options.\n * Ignored if a custom `generateClassName` is provided.\n *\n * `disableGlobal`: Disable the generation of deterministic class names. Defaults to `false`.\n *\n * `productionPrefix`: The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n *\n * `seed`: The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n generateClassNameOptions: PropTypes.shape({\n /**\n * Disable the generation of deterministic class names. Defaults to `false`.\n */\n disableGlobal: PropTypes.bool,\n /**\n * The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n */\n productionPrefix: PropTypes.string,\n /**\n * The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n seed: PropTypes.string,\n }),\n /**\n * Injects the generated stylesheets at the top of the `<head>` element of the page.\n * This can ease the override of UI Kit components styles.\n *\n * By default, the styles are injected last in the `<head>` element of the page.\n */\n injectStylesFirst: PropTypes.bool,\n /**\n * Disables the generation of the styles.\n */\n disableStylesGeneration: PropTypes.bool,\n\n /**\n * Disables the generation of the baseline css styles.\n *\n * This will be the default behavior in the future.\n *\n * The application using UI Kit should be responsible for adding the baseline css styles, by\n * either using the `<HvCssBaseline />` component, using the `<HvScopedCssBaseline />` component,\n * or ensuring that the necessary base styles are applied.\n *\n * Defaults to `false`. Will be removed in the next major release.\n *\n * @see https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\n */\n disableCssBaseline: PropTypes.bool,\n};\n\nexport default HvProvider;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,EAAqCC,OAArC,QAAoD,OAAp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a,EAAE/D,SAAS,CAACgE,IAJe;;IAKxC;AACJ;AACA;IACIC,gBAAgB,EAAEjE,SAAS,CAAC6D,MARY;;IASxC;AACJ;AACA;AACA;IACIK,IAAI,EAAElE,SAAS,CAAC6D;EAbwB,CAAhB,CAzCL;;EAwDrB;AACF;AACA;AACA;AACA;AACA;EACEtB,iBAAiB,EAAEvC,SAAS,CAACgE,IA9DR;;EA+DrB;AACF;AACA;EACExB,uBAAuB,EAAExC,SAAS,CAACgE,IAlEd;;EAoErB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEvB,kBAAkB,EAAEzC,SAAS,CAACgE;AAjFT,CAAvB;AAoFA,eAAelC,UAAf"}
|
package/dist/legacy/index.d.ts
CHANGED
|
@@ -22,9 +22,6 @@ export * from "./Badge";
|
|
|
22
22
|
export { default as HvBanner } from "./Banner";
|
|
23
23
|
export * from "./Banner";
|
|
24
24
|
|
|
25
|
-
export { default as HvBarchart } from "./Barchart";
|
|
26
|
-
export * from "./Barchart";
|
|
27
|
-
|
|
28
25
|
export { default as HvBreadcrumb } from "./BreadCrumb";
|
|
29
26
|
export * from "./BreadCrumb";
|
|
30
27
|
|
|
@@ -45,9 +42,6 @@ export * from "./Container";
|
|
|
45
42
|
export { default as HvDatePicker } from "./DatePicker";
|
|
46
43
|
export * from "./DatePicker";
|
|
47
44
|
|
|
48
|
-
export { default as HvDonutchart } from "./Donutchart";
|
|
49
|
-
export * from "./Donutchart";
|
|
50
|
-
|
|
51
45
|
export { default as HvDropdown } from "./Dropdown";
|
|
52
46
|
export * from "./Dropdown";
|
|
53
47
|
|
|
@@ -98,9 +92,6 @@ export * from "./Forms/Label";
|
|
|
98
92
|
export { default as HvKpi } from "./Kpi";
|
|
99
93
|
export * from "./Kpi";
|
|
100
94
|
|
|
101
|
-
export { default as HvLinechart } from "./Linechart";
|
|
102
|
-
export * from "./Linechart";
|
|
103
|
-
|
|
104
95
|
export { default as HvLink } from "./Link";
|
|
105
96
|
export * from "./Link";
|
|
106
97
|
|
package/dist/legacy/index.js
CHANGED
|
@@ -9,7 +9,6 @@ export { default as HvAvatar } from "./Avatar";
|
|
|
9
9
|
export { default as HvBadge } from "./Badge";
|
|
10
10
|
export { default as HvBanner } from "./Banner";
|
|
11
11
|
export * from "./Banner";
|
|
12
|
-
export { default as HvBarchart } from "./Barchart";
|
|
13
12
|
export { default as HvBaseDropdown } from "./BaseDropdown";
|
|
14
13
|
export { default as HvBreadcrumb } from "./BreadCrumb";
|
|
15
14
|
export { default as HvBulkActions } from "./BulkActions";
|
|
@@ -19,7 +18,6 @@ export * from "./Card";
|
|
|
19
18
|
export * from "./Calendar";
|
|
20
19
|
export { default as HvContainer } from "./Container";
|
|
21
20
|
export { default as HvDatePicker } from "./DatePicker";
|
|
22
|
-
export { default as HvDonutchart } from "./Donutchart";
|
|
23
21
|
export { default as HvDropdown } from "./Dropdown";
|
|
24
22
|
export { default as HvDropDownMenu } from "./DropDownMenu";
|
|
25
23
|
export { default as HvEmptyState } from "./EmptyState";
|
|
@@ -37,7 +35,6 @@ export { default as HvBaseInput } from "./BaseInput";
|
|
|
37
35
|
export { default as HvInput } from "./Input";
|
|
38
36
|
export { default as HvSlider } from "./Slider";
|
|
39
37
|
export { default as HvKpi } from "./Kpi";
|
|
40
|
-
export { default as HvLinechart } from "./Linechart";
|
|
41
38
|
export { default as HvLink } from "./Link";
|
|
42
39
|
export { default as HvListContainer } from "./ListContainer";
|
|
43
40
|
export * from "./ListContainer";
|
package/dist/legacy/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","HvAccordion","HvActionsGeneric","HvActionBar","HvAppSwitcher","HvAssetInventory","HvAvatar","HvBadge","HvBanner","HvBarchart","HvBaseDropdown","HvBreadcrumb","HvBulkActions","HvButton","HvCard","HvContainer","HvDatePicker","HvDonutchart","HvDropdown","HvDropDownMenu","HvEmptyState","HvFilterGroup","HvFileUploader","HvFocus","HvFooter","HvGrid","HvGlobalActions","HvHeader","HvBaseInput","HvInput","HvSlider","HvKpi","HvLinechart","HvLink","HvListContainer","HvList","HvSelectionList","HvLoading","HvLogin","HvDialog","HvMultiButton","HvPagination","HvBaseCheckBox","HvCheckBox","HvCheckBoxGroup","HvBaseRadio","HvRadio","HvRadioGroup","HvBaseSwitch","HvSwitch","HvSnackbar","HvSnackbarContent","HvSnackbarProvider","useHvSnackbar","HvStack","HvSimpleGrid","HvTab","HvTag","HvTable","HvTabs","HvTextArea","HvTagsInput","HvToggleButton","HvTooltip","HvOverflowTooltip","HvTimePicker","HvTypography","HvUserPreferences","Actions","HvUserPreferencesActions","Action","HvUserPreferencesAction","Options","HvUserPreferencesOptions","Option","HvUserPreferencesOption","Group","HvUserPreferencesOptionsGroup","Label","HvUserPreferencesOptionsGroupLabel","HvScrollToHorizontal","HvScrollToVertical","useScrollTo","HvVerticalNavigation","Navigation","HvVerticalNavigationTree","TreeView","HvTreeView","TreeViewItem","HvTreeViewItem","HvVerticalNavigationActions","HvVerticalNavigationAction","HvPanel","withId","withTooltip","useUniqueId","hvTheme","themeBuilder","getTheme","HvCssBaseline","HvScopedCssBaseline","HvProvider"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvAccordion } from \"./Accordion\";\nexport { default as HvActionsGeneric } from \"./ActionsGeneric\";\nexport { default as HvActionBar } from \"./ActionBar\";\nexport { default as HvAppSwitcher } from \"./AppSwitcher\";\nexport { default as HvAssetInventory } from \"./AssetInventory\";\nexport * from \"./AssetInventory\";\nexport { default as HvAvatar } from \"./Avatar\";\nexport { default as HvBadge } from \"./Badge\";\nexport { default as HvBanner } from \"./Banner\";\nexport * from \"./Banner\";\nexport { default as HvBarchart } from \"./Barchart\";\nexport { default as HvBaseDropdown } from \"./BaseDropdown\";\nexport { default as HvBreadcrumb } from \"./BreadCrumb\";\nexport { default as HvBulkActions } from \"./BulkActions\";\nexport { default as HvButton } from \"./Button\";\nexport { default as HvCard } from \"./Card\";\nexport * from \"./Card\";\nexport * from \"./Calendar\";\nexport { default as HvContainer } from \"./Container\";\nexport { default as HvDatePicker } from \"./DatePicker\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvDropdown } from \"./Dropdown\";\nexport { default as HvDropDownMenu } from \"./DropDownMenu\";\nexport { default as HvEmptyState } from \"./EmptyState\";\nexport { default as HvFilterGroup } from \"./FilterGroup\";\nexport { default as HvFileUploader } from \"./FileUploader\";\nexport * from \"./FileUploader\";\nexport { default as HvFocus } from \"./Focus\";\nexport { default as HvFooter } from \"./Footer\";\nexport * from \"./Forms\";\n\nexport { default as HvGrid } from \"./Grid\";\nexport { default as HvGlobalActions } from \"./GlobalActions\";\n\nexport { default as HvHeader } from \"./Header\";\nexport * from \"./Header\";\n\nexport { default as HvBaseInput } from \"./BaseInput\";\nexport { default as HvInput } from \"./Input\";\n\nexport { default as HvSlider } from \"./Slider\";\n\nexport { default as HvKpi } from \"./Kpi\";\n\nexport { default as HvLinechart } from \"./Linechart\";\nexport { default as HvLink } from \"./Link\";\nexport { default as HvListContainer } from \"./ListContainer\";\nexport * from \"./ListContainer\";\n\nexport { default as HvList } from \"./List\";\n\nexport { default as HvSelectionList } from \"./SelectionList\";\n\nexport { default as HvLoading } from \"./Loading\";\nexport { default as HvLogin } from \"./Login\";\nexport { default as HvDialog } from \"./Dialog\";\nexport * from \"./Dialog\";\nexport { default as HvMultiButton } from \"./MultiButton\";\nexport { default as HvPagination } from \"./Pagination\";\n\nexport { default as HvBaseCheckBox } from \"./BaseCheckBox\";\nexport { default as HvCheckBox } from \"./CheckBox\";\nexport { default as HvCheckBoxGroup } from \"./CheckBoxGroup\";\n\nexport { default as HvBaseRadio } from \"./BaseRadio\";\nexport { default as HvRadio } from \"./Radio\";\nexport { default as HvRadioGroup } from \"./RadioGroup\";\n\nexport { default as HvBaseSwitch } from \"./BaseSwitch\";\nexport { default as HvSwitch } from \"./Switch\";\n\nexport { default as HvSnackbar } from \"./Snackbar\";\nexport { default as HvSnackbarContent } from \"./Snackbar/SnackbarContentWrapper\";\nexport { default as HvSnackbarProvider, useHvSnackbar } from \"./Snackbar/SnackbarProvider\";\nexport { default as HvStack } from \"./Stack\";\nexport { default as HvSimpleGrid } from \"./SimpleGrid\";\n\nexport { default as HvTab } from \"./Tab\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvTable } from \"./Table\";\nexport { default as HvTabs } from \"./Tabs\";\nexport { default as HvTextArea } from \"./TextArea\";\nexport { default as HvTagsInput } from \"./TagsInput\";\nexport { default as HvToggleButton } from \"./ToggleButton\";\nexport { default as HvTooltip } from \"./Tooltip\";\nexport { default as HvOverflowTooltip } from \"./OverflowTooltip\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTypography } from \"./Typography\";\nexport { default as HvUserPreferences } from \"./UserPreferences\";\n// TODO refactor the HvUserPreferences subcomponents' names\nexport {\n Actions as HvUserPreferencesActions,\n Action as HvUserPreferencesAction,\n} from \"./UserPreferences\";\nexport {\n Options as HvUserPreferencesOptions,\n Option as HvUserPreferencesOption,\n Group as HvUserPreferencesOptionsGroup,\n Label as HvUserPreferencesOptionsGroupLabel,\n} from \"./UserPreferences\";\n\nexport { default as HvScrollToHorizontal } from \"./ScrollTo/Horizontal\";\nexport { default as HvScrollToVertical } from \"./ScrollTo/Vertical\";\nexport { default as useScrollTo } from \"./ScrollTo/useScrollTo\";\n\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n// TODO refactor the HvVerticalNavigation subcomponents' names\nexport { Navigation as HvVerticalNavigationTree } from \"./VerticalNavigation\";\nexport { TreeView as HvTreeView, TreeViewItem as HvTreeViewItem } from \"./VerticalNavigation\";\nexport {\n Actions as HvVerticalNavigationActions,\n Action as HvVerticalNavigationAction,\n} from \"./VerticalNavigation\";\n\nexport { default as HvPanel } from \"./Panel\";\n\n// HOCs\nexport { default as withId } from \"./withId\";\nexport { default as withTooltip } from \"./withTooltip\";\n\n// Hooks\nexport { default as useUniqueId } from \"./useUniqueId\";\n\n// theme\nexport { default as hvTheme } from \"./theme\";\nexport { themeBuilder, getTheme } from \"./theme\";\nexport { HvCssBaseline, HvScopedCssBaseline } from \"./theme\";\n\n// provider\nexport { default as HvProvider } from \"./Provider\";\nexport * from \"./Provider\";\n\n// utils\nexport * from \"./utils\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,WAApB,QAAuC,aAAvC;AACA,SAASD,OAAO,IAAIE,gBAApB,QAA4C,kBAA5C;AACA,SAASF,OAAO,IAAIG,WAApB,QAAuC,aAAvC;AACA,SAASH,OAAO,IAAII,aAApB,QAAyC,eAAzC;AACA,SAASJ,OAAO,IAAIK,gBAApB,QAA4C,kBAA5C;AACA,cAAc,kBAAd;AACA,SAASL,OAAO,IAAIM,QAApB,QAAoC,UAApC;AACA,SAASN,OAAO,IAAIO,OAApB,QAAmC,SAAnC;AACA,SAASP,OAAO,IAAIQ,QAApB,QAAoC,UAApC;AACA,cAAc,UAAd;AACA,SAASR,OAAO,IAAIS,UAApB,QAAsC,YAAtC;AACA,SAAST,OAAO,IAAIU,cAApB,QAA0C,gBAA1C;AACA,SAASV,OAAO,IAAIW,YAApB,QAAwC,cAAxC;AACA,SAASX,OAAO,IAAIY,aAApB,QAAyC,eAAzC;AACA,SAASZ,OAAO,IAAIa,QAApB,QAAoC,UAApC;AACA,SAASb,OAAO,IAAIc,MAApB,QAAkC,QAAlC;AACA,cAAc,QAAd;AACA,cAAc,YAAd;AACA,SAASd,OAAO,IAAIe,WAApB,QAAuC,aAAvC;AACA,SAASf,OAAO,IAAIgB,YAApB,QAAwC,cAAxC;AACA,SAAShB,OAAO,IAAIiB,YAApB,QAAwC,cAAxC;AACA,SAASjB,OAAO,IAAIkB,UAApB,QAAsC,YAAtC;AACA,SAASlB,OAAO,IAAImB,cAApB,QAA0C,gBAA1C;AACA,SAASnB,OAAO,IAAIoB,YAApB,QAAwC,cAAxC;AACA,SAASpB,OAAO,IAAIqB,aAApB,QAAyC,eAAzC;AACA,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OA,SAAS/E,OAAO,IAAIgF,oBAApB,QAAgD,uBAAhD;AACA,SAAShF,OAAO,IAAIiF,kBAApB,QAA8C,qBAA9C;AACA,SAASjF,OAAO,IAAIkF,WAApB,QAAuC,wBAAvC;AAEA,SAASlF,OAAO,IAAImF,oBAApB,QAAgD,sBAAhD,C,CACA;;AACA,SAASC,UAAU,IAAIC,wBAAvB,QAAuD,sBAAvD;AACA,SAASC,QAAQ,IAAIC,UAArB,EAAiCC,YAAY,IAAIC,cAAjD,QAAuE,sBAAvE;AACA,SACErB,OAAO,IAAIsB,2BADb,EAEEpB,MAAM,IAAIqB,0BAFZ,QAGO,sBAHP;AAKA,SAAS3F,OAAO,IAAI4F,OAApB,QAAmC,SAAnC,C,CAEA;;AACA,SAAS5F,OAAO,IAAI6F,MAApB,QAAkC,UAAlC;AACA,SAAS7F,OAAO,IAAI8F,WAApB,QAAuC,eAAvC,C,CAEA;;AACA,SAAS9F,OAAO,IAAI+F,WAApB,QAAuC,eAAvC,C,CAEA;;AACA,SAAS/F,OAAO,IAAIgG,OAApB,QAAmC,SAAnC;AACA,SAASC,YAAT,EAAuBC,QAAvB,QAAuC,SAAvC;AACA,SAASC,aAAT,EAAwBC,mBAAxB,QAAmD,SAAnD,C,CAEA;;AACA,SAASpG,OAAO,IAAIqG,UAApB,QAAsC,YAAtC;AACA,cAAc,YAAd,C,CAEA;;AACA,cAAc,SAAd"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","HvAccordion","HvActionsGeneric","HvActionBar","HvAppSwitcher","HvAssetInventory","HvAvatar","HvBadge","HvBanner","HvBaseDropdown","HvBreadcrumb","HvBulkActions","HvButton","HvCard","HvContainer","HvDatePicker","HvDropdown","HvDropDownMenu","HvEmptyState","HvFilterGroup","HvFileUploader","HvFocus","HvFooter","HvGrid","HvGlobalActions","HvHeader","HvBaseInput","HvInput","HvSlider","HvKpi","HvLink","HvListContainer","HvList","HvSelectionList","HvLoading","HvLogin","HvDialog","HvMultiButton","HvPagination","HvBaseCheckBox","HvCheckBox","HvCheckBoxGroup","HvBaseRadio","HvRadio","HvRadioGroup","HvBaseSwitch","HvSwitch","HvSnackbar","HvSnackbarContent","HvSnackbarProvider","useHvSnackbar","HvStack","HvSimpleGrid","HvTab","HvTag","HvTable","HvTabs","HvTextArea","HvTagsInput","HvToggleButton","HvTooltip","HvOverflowTooltip","HvTimePicker","HvTypography","HvUserPreferences","Actions","HvUserPreferencesActions","Action","HvUserPreferencesAction","Options","HvUserPreferencesOptions","Option","HvUserPreferencesOption","Group","HvUserPreferencesOptionsGroup","Label","HvUserPreferencesOptionsGroupLabel","HvScrollToHorizontal","HvScrollToVertical","useScrollTo","HvVerticalNavigation","Navigation","HvVerticalNavigationTree","TreeView","HvTreeView","TreeViewItem","HvTreeViewItem","HvVerticalNavigationActions","HvVerticalNavigationAction","HvPanel","withId","withTooltip","useUniqueId","hvTheme","themeBuilder","getTheme","HvCssBaseline","HvScopedCssBaseline","HvProvider"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvAccordion } from \"./Accordion\";\nexport { default as HvActionsGeneric } from \"./ActionsGeneric\";\nexport { default as HvActionBar } from \"./ActionBar\";\nexport { default as HvAppSwitcher } from \"./AppSwitcher\";\nexport { default as HvAssetInventory } from \"./AssetInventory\";\nexport * from \"./AssetInventory\";\nexport { default as HvAvatar } from \"./Avatar\";\nexport { default as HvBadge } from \"./Badge\";\nexport { default as HvBanner } from \"./Banner\";\nexport * from \"./Banner\";\nexport { default as HvBaseDropdown } from \"./BaseDropdown\";\nexport { default as HvBreadcrumb } from \"./BreadCrumb\";\nexport { default as HvBulkActions } from \"./BulkActions\";\nexport { default as HvButton } from \"./Button\";\nexport { default as HvCard } from \"./Card\";\nexport * from \"./Card\";\nexport * from \"./Calendar\";\nexport { default as HvContainer } from \"./Container\";\nexport { default as HvDatePicker } from \"./DatePicker\";\nexport { default as HvDropdown } from \"./Dropdown\";\nexport { default as HvDropDownMenu } from \"./DropDownMenu\";\nexport { default as HvEmptyState } from \"./EmptyState\";\nexport { default as HvFilterGroup } from \"./FilterGroup\";\nexport { default as HvFileUploader } from \"./FileUploader\";\nexport * from \"./FileUploader\";\nexport { default as HvFocus } from \"./Focus\";\nexport { default as HvFooter } from \"./Footer\";\nexport * from \"./Forms\";\n\nexport { default as HvGrid } from \"./Grid\";\nexport { default as HvGlobalActions } from \"./GlobalActions\";\n\nexport { default as HvHeader } from \"./Header\";\nexport * from \"./Header\";\n\nexport { default as HvBaseInput } from \"./BaseInput\";\nexport { default as HvInput } from \"./Input\";\n\nexport { default as HvSlider } from \"./Slider\";\n\nexport { default as HvKpi } from \"./Kpi\";\n\nexport { default as HvLink } from \"./Link\";\nexport { default as HvListContainer } from \"./ListContainer\";\nexport * from \"./ListContainer\";\n\nexport { default as HvList } from \"./List\";\n\nexport { default as HvSelectionList } from \"./SelectionList\";\n\nexport { default as HvLoading } from \"./Loading\";\nexport { default as HvLogin } from \"./Login\";\nexport { default as HvDialog } from \"./Dialog\";\nexport * from \"./Dialog\";\nexport { default as HvMultiButton } from \"./MultiButton\";\nexport { default as HvPagination } from \"./Pagination\";\n\nexport { default as HvBaseCheckBox } from \"./BaseCheckBox\";\nexport { default as HvCheckBox } from \"./CheckBox\";\nexport { default as HvCheckBoxGroup } from \"./CheckBoxGroup\";\n\nexport { default as HvBaseRadio } from \"./BaseRadio\";\nexport { default as HvRadio } from \"./Radio\";\nexport { default as HvRadioGroup } from \"./RadioGroup\";\n\nexport { default as HvBaseSwitch } from \"./BaseSwitch\";\nexport { default as HvSwitch } from \"./Switch\";\n\nexport { default as HvSnackbar } from \"./Snackbar\";\nexport { default as HvSnackbarContent } from \"./Snackbar/SnackbarContentWrapper\";\nexport { default as HvSnackbarProvider, useHvSnackbar } from \"./Snackbar/SnackbarProvider\";\nexport { default as HvStack } from \"./Stack\";\nexport { default as HvSimpleGrid } from \"./SimpleGrid\";\n\nexport { default as HvTab } from \"./Tab\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvTable } from \"./Table\";\nexport { default as HvTabs } from \"./Tabs\";\nexport { default as HvTextArea } from \"./TextArea\";\nexport { default as HvTagsInput } from \"./TagsInput\";\nexport { default as HvToggleButton } from \"./ToggleButton\";\nexport { default as HvTooltip } from \"./Tooltip\";\nexport { default as HvOverflowTooltip } from \"./OverflowTooltip\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTypography } from \"./Typography\";\nexport { default as HvUserPreferences } from \"./UserPreferences\";\n// TODO refactor the HvUserPreferences subcomponents' names\nexport {\n Actions as HvUserPreferencesActions,\n Action as HvUserPreferencesAction,\n} from \"./UserPreferences\";\nexport {\n Options as HvUserPreferencesOptions,\n Option as HvUserPreferencesOption,\n Group as HvUserPreferencesOptionsGroup,\n Label as HvUserPreferencesOptionsGroupLabel,\n} from \"./UserPreferences\";\n\nexport { default as HvScrollToHorizontal } from \"./ScrollTo/Horizontal\";\nexport { default as HvScrollToVertical } from \"./ScrollTo/Vertical\";\nexport { default as useScrollTo } from \"./ScrollTo/useScrollTo\";\n\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n// TODO refactor the HvVerticalNavigation subcomponents' names\nexport { Navigation as HvVerticalNavigationTree } from \"./VerticalNavigation\";\nexport { TreeView as HvTreeView, TreeViewItem as HvTreeViewItem } from \"./VerticalNavigation\";\nexport {\n Actions as HvVerticalNavigationActions,\n Action as HvVerticalNavigationAction,\n} from \"./VerticalNavigation\";\n\nexport { default as HvPanel } from \"./Panel\";\n\n// HOCs\nexport { default as withId } from \"./withId\";\nexport { default as withTooltip } from \"./withTooltip\";\n\n// Hooks\nexport { default as useUniqueId } from \"./useUniqueId\";\n\n// theme\nexport { default as hvTheme } from \"./theme\";\nexport { themeBuilder, getTheme } from \"./theme\";\nexport { HvCssBaseline, HvScopedCssBaseline } from \"./theme\";\n\n// provider\nexport { default as HvProvider } from \"./Provider\";\nexport * from \"./Provider\";\n\n// utils\nexport * from \"./utils\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,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b,EAEEpB,MAAM,IAAIqB,0BAFZ,QAGO,sBAHP;AAKA,SAASxF,OAAO,IAAIyF,OAApB,QAAmC,SAAnC,C,CAEA;;AACA,SAASzF,OAAO,IAAI0F,MAApB,QAAkC,UAAlC;AACA,SAAS1F,OAAO,IAAI2F,WAApB,QAAuC,eAAvC,C,CAEA;;AACA,SAAS3F,OAAO,IAAI4F,WAApB,QAAuC,eAAvC,C,CAEA;;AACA,SAAS5F,OAAO,IAAI6F,OAApB,QAAmC,SAAnC;AACA,SAASC,YAAT,EAAuBC,QAAvB,QAAuC,SAAvC;AACA,SAASC,aAAT,EAAwBC,mBAAxB,QAAmD,SAAnD,C,CAEA;;AACA,SAASjG,OAAO,IAAIkG,UAApB,QAAsC,YAAtC;AACA,cAAc,YAAd,C,CAEA;;AACA,cAAc,SAAd"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
var _HvCssBaseline;
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
4
|
+
import React, { useState, useEffect, useMemo } from "react";
|
|
4
5
|
import PropTypes from "prop-types";
|
|
5
6
|
import set from "lodash/set";
|
|
6
7
|
import merge from "lodash/merge";
|
|
@@ -70,15 +71,13 @@ const HvProvider = ({
|
|
|
70
71
|
uiKitTheme = "dawn",
|
|
71
72
|
theme = null,
|
|
72
73
|
changeTheme = () => {},
|
|
73
|
-
locale,
|
|
74
|
+
locale = "en-US",
|
|
74
75
|
generateClassName: generateClassNameProp,
|
|
75
76
|
generateClassNameOptions,
|
|
76
77
|
injectStylesFirst = false,
|
|
77
78
|
disableStylesGeneration = false,
|
|
78
79
|
disableCssBaseline = false
|
|
79
80
|
}) => {
|
|
80
|
-
var _navigator$language, _navigator;
|
|
81
|
-
|
|
82
81
|
if (process.env.NODE_ENV !== "production") {
|
|
83
82
|
if (!warnedOnce && !disableCssBaseline) {
|
|
84
83
|
warnedOnce = true; // eslint-disable-next-line no-console
|
|
@@ -87,7 +86,13 @@ const HvProvider = ({
|
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
88
|
|
|
90
|
-
const localeSetting
|
|
89
|
+
const [localeSetting, setLocaleStting] = useState(locale);
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
var _navigator;
|
|
92
|
+
|
|
93
|
+
// ssr - only runs at the rendering phase, so it won't run on the server
|
|
94
|
+
setLocaleStting(locale || ((_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.language));
|
|
95
|
+
}, [locale]);
|
|
91
96
|
const rawUiKitTheme = getTheme(uiKitTheme);
|
|
92
97
|
const customTheme = applyCustomTheme(themeBuilder(rawUiKitTheme), theme);
|
|
93
98
|
const generateClassName = generateClassNameProp || createGenerateClassName(generateClassNameOptions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","names":["React","useMemo","PropTypes","set","merge","isEmpty","cloneDeep","diff","ThemeProvider","MuiThemeProvider","StylesProvider","MuiStylesProvider","createTheme","themeBuilder","createGenerateClassName","HvCssBaseline","getTheme","ConfigContext","warnedOnce","applyCustomTheme","InputTargetTheme","InputSourceTheme","muiDefaultTheme","targetTheme","sourceTheme","deleteDifference","observableDiff","difference","partialCustomTheme","path","rhs","kind","HvProvider","children","uiKitTheme","theme","changeTheme","locale","generateClassName","generateClassNameProp","generateClassNameOptions","injectStylesFirst","disableStylesGeneration","disableCssBaseline","process","env","NODE_ENV","console","warn","localeSetting","navigator","language","rawUiKitTheme","customTheme","pConfig","propTypes","node","isRequired","oneOf","instanceOf","Object","func","string","shape","disableGlobal","bool","productionPrefix","seed"],"sources":["../../../src/Provider/Provider.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport set from \"lodash/set\";\nimport merge from \"lodash/merge\";\nimport isEmpty from \"lodash/isEmpty\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport diff from \"deep-diff\";\n\nimport \"focus-within-polyfill\";\nimport \"focus-visible\";\n\nimport {\n ThemeProvider as MuiThemeProvider,\n StylesProvider as MuiStylesProvider,\n} from \"@material-ui/core\";\nimport { createTheme } from \"@material-ui/core/styles\";\n\nimport { themeBuilder, createGenerateClassName, HvCssBaseline, getTheme } from \"../theme\";\n\nimport ConfigContext from \"./context\";\n\nlet warnedOnce = false;\n\n/**\n * Augments the target theme with the differences found in the source theme.\n *\n * @param {Object} InputTargetTheme - A material UI Theme to be changed.\n * @param {Object} InputSourceTheme - A material UI Theme to apply on top.\n * @returns {Object} - A new modified material UI theme.\n */\nconst applyCustomTheme = (InputTargetTheme, InputSourceTheme) => {\n const muiDefaultTheme = createTheme();\n const targetTheme = cloneDeep(InputTargetTheme);\n const sourceTheme = cloneDeep(InputSourceTheme);\n const deleteDifference = \"D\";\n if (!isEmpty(targetTheme) && !isEmpty(sourceTheme)) {\n diff.observableDiff(muiDefaultTheme, sourceTheme, (difference) => {\n const partialCustomTheme = set({}, difference.path, difference.rhs);\n if (difference.kind !== deleteDifference) {\n // Do not include the differences of type \"delete\"\n merge(targetTheme, partialCustomTheme);\n }\n });\n return targetTheme;\n }\n return targetTheme;\n};\n\n/**\n * This component makes cross-component properties, like the active `theme` and `locale`,\n * available down the React tree thanks to React context.\n *\n * This component should preferably be used at **the root of your component tree** and\n * be unique in the App in most cases.\n *\n * ```jsx\n * <HvProvider>\n * <MyApp />\n * <HvProvider/>\n * ```\n *\n * If several `HvProvider`'s are used, either nested or in parallel, the `generateClassNameOptions`\n * must be tweaked to avoid CSS classnames collision. Or a custom JSS's class name generator can\n * be provided via the `generateClassName` property.\n *\n * **UI Kit components will not work at all if the `HvProvider` is not configured correctly**,\n * as they will not be able to access the properties of the active theme..\n *\n */\nconst HvProvider = ({\n children,\n\n uiKitTheme = \"dawn\",\n theme = null,\n changeTheme = () => {},\n\n locale,\n\n generateClassName: generateClassNameProp,\n generateClassNameOptions,\n injectStylesFirst = false,\n disableStylesGeneration = false,\n\n disableCssBaseline = false,\n}) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!warnedOnce && !disableCssBaseline) {\n warnedOnce = true;\n // eslint-disable-next-line no-console\n console.warn(\n \"UI Kit HvProvider's automatic definition of a css styles baseline will be removed in the next major version.\\n\" +\n \"You can use the `disableCssBaseline` property to disable it already.\\n\" +\n \"See https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\"\n );\n }\n }\n\n const localeSetting = locale || (navigator?.language ?? \"en-US\");\n\n const rawUiKitTheme = getTheme(uiKitTheme);\n const customTheme = applyCustomTheme(themeBuilder(rawUiKitTheme), theme);\n\n const generateClassName =\n generateClassNameProp || createGenerateClassName(generateClassNameOptions);\n\n const pConfig = useMemo(\n () => ({ changeTheme, locale: localeSetting }),\n [changeTheme, localeSetting]\n );\n\n return (\n <MuiStylesProvider\n generateClassName={generateClassName}\n injectFirst={injectStylesFirst}\n disableGeneration={disableStylesGeneration}\n >\n <MuiThemeProvider theme={customTheme}>\n {!disableCssBaseline && <HvCssBaseline />}\n <ConfigContext.Provider value={pConfig}>{children}</ConfigContext.Provider>\n </MuiThemeProvider>\n </MuiStylesProvider>\n );\n};\n\nHvProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * The Design System base theme in use. Defaults to `\"dawn\"`.\n */\n uiKitTheme: PropTypes.oneOf([\"dawn\", \"wicked\"]),\n /**\n * The UI Kit theme object to be applied on top of the base theme.\n */\n theme: PropTypes.instanceOf(Object),\n /**\n * Function stored in the provider's context to allow runtime switching of the active theme.\n * The implementation is up to each App.\n */\n changeTheme: PropTypes.func,\n\n /**\n * The locale to be used.\n * Defaults to the browser's configured locale or \"en-US\" if not available.\n */\n locale: PropTypes.string,\n\n /**\n * Custom JSS's class name generator.\n */\n generateClassName: PropTypes.func,\n /**\n * Built-in JSS's class name generator options.\n * Ignored if a custom `generateClassName` is provided.\n *\n * `disableGlobal`: Disable the generation of deterministic class names. Defaults to `false`.\n *\n * `productionPrefix`: The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n *\n * `seed`: The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n generateClassNameOptions: PropTypes.shape({\n /**\n * Disable the generation of deterministic class names. Defaults to `false`.\n */\n disableGlobal: PropTypes.bool,\n /**\n * The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n */\n productionPrefix: PropTypes.string,\n /**\n * The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n seed: PropTypes.string,\n }),\n /**\n * Injects the generated stylesheets at the top of the `<head>` element of the page.\n * This can ease the override of UI Kit components styles.\n *\n * By default, the styles are injected last in the `<head>` element of the page.\n */\n injectStylesFirst: PropTypes.bool,\n /**\n * Disables the generation of the styles.\n */\n disableStylesGeneration: PropTypes.bool,\n\n /**\n * Disables the generation of the baseline css styles.\n *\n * This will be the default behavior in the future.\n *\n * The application using UI Kit should be responsible for adding the baseline css styles, by\n * either using the `<HvCssBaseline />` component, using the `<HvScopedCssBaseline />` component,\n * or ensuring that the necessary base styles are applied.\n *\n * Defaults to `false`. Will be removed in the next major release.\n *\n * @see https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\n */\n disableCssBaseline: PropTypes.bool,\n};\n\nexport default HvProvider;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,OAAhB,QAA+B,OAA/B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,GAAP,MAAgB,YAAhB;AACA,OAAOC,KAAP,MAAkB,cAAlB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,SAAP,MAAsB,kBAAtB;AACA,OAAOC,IAAP,MAAiB,WAAjB;AAEA,OAAO,uBAAP;AACA,OAAO,eAAP;AAEA,SACEC,aAAa,IAAIC,gBADnB,EAEEC,cAAc,IAAIC,iBAFpB,QAGO,mBAHP;AAIA,SAASC,WAAT,QAA4B,0BAA5B;AAEA,SAASC,YAAT,EAAuBC,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AS,QAAT,CAAhB,CATS;;EAUrB;AACF;AACA;EACEvB,KAAK,EAAEjC,SAAS,CAACyD,UAAV,CAAqBC,MAArB,CAbc;;EAcrB;AACF;AACA;AACA;EACExB,WAAW,EAAElC,SAAS,CAAC2D,IAlBF;;EAoBrB;AACF;AACA;AACA;EACExB,MAAM,EAAEnC,SAAS,CAAC4D,MAxBG;;EA0BrB;AACF;AACA;EACExB,iBAAiB,EAAEpC,SAAS,CAAC2D,IA7BR;;EA8BrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACErB,wBAAwB,EAAEtC,SAAS,CAAC6D,KAAV,CAAgB;IACxC;AACJ;AACA;IACIC,aAAa,EAAE9D,SAAS,CAAC+D,IAJe;;IAKxC;AACJ;AACA;IACIC,gBAAgB,EAAEhE,SAAS,CAAC4D,MARY;;IASxC;AACJ;AACA;AACA;IACIK,IAAI,EAAEjE,SAAS,CAAC4D;EAbwB,CAAhB,CAzCL;;EAwDrB;AACF;AACA;AACA;AACA;AACA;EACErB,iBAAiB,EAAEvC,SAAS,CAAC+D,IA9DR;;EA+DrB;AACF;AACA;EACEvB,uBAAuB,EAAExC,SAAS,CAAC+D,IAlEd;;EAoErB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEtB,kBAAkB,EAAEzC,SAAS,CAAC+D;AAjFT,CAAvB;AAoFA,eAAejC,UAAf"}
|
|
1
|
+
{"version":3,"file":"Provider.js","names":["React","useState","useEffect","useMemo","PropTypes","set","merge","isEmpty","cloneDeep","diff","ThemeProvider","MuiThemeProvider","StylesProvider","MuiStylesProvider","createTheme","themeBuilder","createGenerateClassName","HvCssBaseline","getTheme","ConfigContext","warnedOnce","applyCustomTheme","InputTargetTheme","InputSourceTheme","muiDefaultTheme","targetTheme","sourceTheme","deleteDifference","observableDiff","difference","partialCustomTheme","path","rhs","kind","HvProvider","children","uiKitTheme","theme","changeTheme","locale","generateClassName","generateClassNameProp","generateClassNameOptions","injectStylesFirst","disableStylesGeneration","disableCssBaseline","process","env","NODE_ENV","console","warn","localeSetting","setLocaleStting","navigator","language","rawUiKitTheme","customTheme","pConfig","propTypes","node","isRequired","oneOf","instanceOf","Object","func","string","shape","disableGlobal","bool","productionPrefix","seed"],"sources":["../../../src/Provider/Provider.js"],"sourcesContent":["import React, { useState, useEffect, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport set from \"lodash/set\";\nimport merge from \"lodash/merge\";\nimport isEmpty from \"lodash/isEmpty\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport diff from \"deep-diff\";\n\nimport \"focus-within-polyfill\";\nimport \"focus-visible\";\n\nimport {\n ThemeProvider as MuiThemeProvider,\n StylesProvider as MuiStylesProvider,\n} from \"@material-ui/core\";\nimport { createTheme } from \"@material-ui/core/styles\";\n\nimport { themeBuilder, createGenerateClassName, HvCssBaseline, getTheme } from \"../theme\";\n\nimport ConfigContext from \"./context\";\n\nlet warnedOnce = false;\n\n/**\n * Augments the target theme with the differences found in the source theme.\n *\n * @param {Object} InputTargetTheme - A material UI Theme to be changed.\n * @param {Object} InputSourceTheme - A material UI Theme to apply on top.\n * @returns {Object} - A new modified material UI theme.\n */\nconst applyCustomTheme = (InputTargetTheme, InputSourceTheme) => {\n const muiDefaultTheme = createTheme();\n const targetTheme = cloneDeep(InputTargetTheme);\n const sourceTheme = cloneDeep(InputSourceTheme);\n const deleteDifference = \"D\";\n if (!isEmpty(targetTheme) && !isEmpty(sourceTheme)) {\n diff.observableDiff(muiDefaultTheme, sourceTheme, (difference) => {\n const partialCustomTheme = set({}, difference.path, difference.rhs);\n if (difference.kind !== deleteDifference) {\n // Do not include the differences of type \"delete\"\n merge(targetTheme, partialCustomTheme);\n }\n });\n return targetTheme;\n }\n return targetTheme;\n};\n\n/**\n * This component makes cross-component properties, like the active `theme` and `locale`,\n * available down the React tree thanks to React context.\n *\n * This component should preferably be used at **the root of your component tree** and\n * be unique in the App in most cases.\n *\n * ```jsx\n * <HvProvider>\n * <MyApp />\n * <HvProvider/>\n * ```\n *\n * If several `HvProvider`'s are used, either nested or in parallel, the `generateClassNameOptions`\n * must be tweaked to avoid CSS classnames collision. Or a custom JSS's class name generator can\n * be provided via the `generateClassName` property.\n *\n * **UI Kit components will not work at all if the `HvProvider` is not configured correctly**,\n * as they will not be able to access the properties of the active theme..\n *\n */\nconst HvProvider = ({\n children,\n\n uiKitTheme = \"dawn\",\n theme = null,\n changeTheme = () => {},\n\n locale = \"en-US\",\n\n generateClassName: generateClassNameProp,\n generateClassNameOptions,\n injectStylesFirst = false,\n disableStylesGeneration = false,\n\n disableCssBaseline = false,\n}) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!warnedOnce && !disableCssBaseline) {\n warnedOnce = true;\n // eslint-disable-next-line no-console\n console.warn(\n \"UI Kit HvProvider's automatic definition of a css styles baseline will be removed in the next major version.\\n\" +\n \"You can use the `disableCssBaseline` property to disable it already.\\n\" +\n \"See https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\"\n );\n }\n }\n\n const [localeSetting, setLocaleStting] = useState(locale);\n\n useEffect(() => {\n // ssr - only runs at the rendering phase, so it won't run on the server\n setLocaleStting(locale || navigator?.language);\n }, [locale]);\n\n const rawUiKitTheme = getTheme(uiKitTheme);\n const customTheme = applyCustomTheme(themeBuilder(rawUiKitTheme), theme);\n\n const generateClassName =\n generateClassNameProp || createGenerateClassName(generateClassNameOptions);\n\n const pConfig = useMemo(\n () => ({ changeTheme, locale: localeSetting }),\n [changeTheme, localeSetting]\n );\n\n return (\n <MuiStylesProvider\n generateClassName={generateClassName}\n injectFirst={injectStylesFirst}\n disableGeneration={disableStylesGeneration}\n >\n <MuiThemeProvider theme={customTheme}>\n {!disableCssBaseline && <HvCssBaseline />}\n <ConfigContext.Provider value={pConfig}>{children}</ConfigContext.Provider>\n </MuiThemeProvider>\n </MuiStylesProvider>\n );\n};\n\nHvProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * The Design System base theme in use. Defaults to `\"dawn\"`.\n */\n uiKitTheme: PropTypes.oneOf([\"dawn\", \"wicked\"]),\n /**\n * The UI Kit theme object to be applied on top of the base theme.\n */\n theme: PropTypes.instanceOf(Object),\n /**\n * Function stored in the provider's context to allow runtime switching of the active theme.\n * The implementation is up to each App.\n */\n changeTheme: PropTypes.func,\n\n /**\n * The locale to be used.\n * Defaults to the browser's configured locale or \"en-US\" if not available.\n */\n locale: PropTypes.string,\n\n /**\n * Custom JSS's class name generator.\n */\n generateClassName: PropTypes.func,\n /**\n * Built-in JSS's class name generator options.\n * Ignored if a custom `generateClassName` is provided.\n *\n * `disableGlobal`: Disable the generation of deterministic class names. Defaults to `false`.\n *\n * `productionPrefix`: The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n *\n * `seed`: The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n generateClassNameOptions: PropTypes.shape({\n /**\n * Disable the generation of deterministic class names. Defaults to `false`.\n */\n disableGlobal: PropTypes.bool,\n /**\n * The string used to prefix the class names in production. Defaults to `\"jss-uikit\"`.\n */\n productionPrefix: PropTypes.string,\n /**\n * The string used to uniquely identify the generator. Defaults to `\"\"`.\n * It can be used to avoid class name collisions when using multiple generators in the same document.\n */\n seed: PropTypes.string,\n }),\n /**\n * Injects the generated stylesheets at the top of the `<head>` element of the page.\n * This can ease the override of UI Kit components styles.\n *\n * By default, the styles are injected last in the `<head>` element of the page.\n */\n injectStylesFirst: PropTypes.bool,\n /**\n * Disables the generation of the styles.\n */\n disableStylesGeneration: PropTypes.bool,\n\n /**\n * Disables the generation of the baseline css styles.\n *\n * This will be the default behavior in the future.\n *\n * The application using UI Kit should be responsible for adding the baseline css styles, by\n * either using the `<HvCssBaseline />` component, using the `<HvScopedCssBaseline />` component,\n * or ensuring that the necessary base styles are applied.\n *\n * Defaults to `false`. Will be removed in the next major release.\n *\n * @see https://lumada-design.github.io/uikit/master/?path=/docs/foundation-css-baseline--main\n */\n disableCssBaseline: PropTypes.bool,\n};\n\nexport default HvProvider;\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,EAAqCC,OAArC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,GAAP,MAAgB,YAAhB;AACA,OAAOC,KAAP,MAAkB,cAAlB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,SAAP,MAAsB,kBAAtB;AACA,OAAOC,IAAP,MAAiB,WAAjB;AAEA,OAAO,uBAAP;AACA,OAAO,eAAP;AAEA,SACEC,aAAa,IAAIC,gBADnB,EAEEC,cAAc,IAAIC,iBAFpB,QAGO,mBAHP;AAIA,SAASC,WAAT,QAA4B,0BAA5B;AAEA,SAASC,YAAT,EAAuBC,uBAAvB,EAAgDC,aAAhD,EAA+DC,QAA/D,QAA+E,UAA/E;AAEA,OAAOC,aAAP,MAA0B,WAA1B;AAEA,IAAIC,UAAU,GAAG,KAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,gBAAgB,GAAG,CAACC,gBAAD,EAAmBC,gBAAnB,KAAwC;EAC/D,MAAMC,eAAe,GAAGV,WAAW,EAAnC;EACA,MAAMW,WAAW,GAAGjB,SAAS,CAACc,gBAAD,CAA7B;EACA,MAAMI,WAAW,GAAGlB,SAAS,CAACe,gBAAD,CAA7B;EACA,MAAMI,gBAAgB,GAAG,GAAzB;;EACA,IAAI,CAACpB,OAAO,CAACkB,WAAD,CAAR,IAAyB,CAAClB,OAAO,CAACmB,WAAD,CAArC,EAAoD;IAClDjB,IAAI,CAACmB,cAAL,CAAoBJ,eAApB,EAAqCE,WAArC,EAAmDG,UAAD,IAAgB;MAChE,MAAMC,kBAAkB,GAAGzB,GAAG,CAAC,EAAD,EAAKwB,UAAU,CAACE,IAAhB,EAAsBF,UAAU,CAACG,GAAjC,CAA9B;;MACA,IAA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