@hitachivantara/uikit-react-core 3.66.1-next.4 → 3.67.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/Barchart/Barchart.d.ts +14 -0
- package/dist/Barchart/Barchart.js +239 -0
- package/dist/Barchart/Barchart.js.map +1 -0
- package/dist/Barchart/barchartPlotlyOverrides.js +59 -0
- package/dist/Barchart/barchartPlotlyOverrides.js.map +1 -0
- package/dist/Barchart/index.d.ts +2 -0
- package/dist/Barchart/index.js +16 -0
- package/dist/Barchart/index.js.map +1 -0
- package/dist/Barchart/styles.js +10 -0
- package/dist/Barchart/styles.js.map +1 -0
- package/dist/BaseInput/BaseInput.js +6 -1
- package/dist/BaseInput/BaseInput.js.map +1 -1
- package/dist/BaseInput/styles.js +3 -0
- package/dist/BaseInput/styles.js.map +1 -1
- package/dist/Chart/Chart.d.ts +25 -0
- package/dist/Chart/Chart.js +215 -0
- package/dist/Chart/Chart.js.map +1 -0
- package/dist/Chart/Plot/Plot.d.ts +43 -0
- package/dist/Chart/Plot/Plot.js +131 -0
- package/dist/Chart/Plot/Plot.js.map +1 -0
- package/dist/Chart/Plot/index.d.ts +2 -0
- package/dist/Chart/Plot/index.js +16 -0
- package/dist/Chart/Plot/index.js.map +1 -0
- package/dist/Chart/Plot/styles.js +10 -0
- package/dist/Chart/Plot/styles.js.map +1 -0
- package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js +162 -0
- package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -0
- package/dist/Chart/Tooltip/MultiTooltip/index.js +16 -0
- package/dist/Chart/Tooltip/MultiTooltip/index.js.map +1 -0
- package/dist/Chart/Tooltip/MultiTooltip/styles.js +51 -0
- package/dist/Chart/Tooltip/MultiTooltip/styles.js.map +1 -0
- package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js +87 -0
- package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -0
- package/dist/Chart/Tooltip/SingleTooltip/index.js +16 -0
- package/dist/Chart/Tooltip/SingleTooltip/index.js.map +1 -0
- package/dist/Chart/Tooltip/SingleTooltip/styles.js +26 -0
- package/dist/Chart/Tooltip/SingleTooltip/styles.js.map +1 -0
- package/dist/Chart/Tooltip/Tooltip.js +165 -0
- package/dist/Chart/Tooltip/Tooltip.js.map +1 -0
- package/dist/Chart/Tooltip/index.js +16 -0
- package/dist/Chart/Tooltip/index.js.map +1 -0
- package/dist/Chart/Tooltip/styles.js +16 -0
- package/dist/Chart/Tooltip/styles.js.map +1 -0
- package/dist/Chart/chartPlotlyOverrides.js +169 -0
- package/dist/Chart/chartPlotlyOverrides.js.map +1 -0
- package/dist/Chart/index.d.ts +5 -0
- package/dist/Chart/index.js +16 -0
- package/dist/Chart/index.js.map +1 -0
- package/dist/Chart/styles.js +49 -0
- package/dist/Chart/styles.js.map +1 -0
- package/dist/Donutchart/Donutchart.d.ts +10 -0
- package/dist/Donutchart/Donutchart.js +124 -0
- package/dist/Donutchart/Donutchart.js.map +1 -0
- package/dist/Donutchart/donutchartPlotlyOverrides.js +56 -0
- package/dist/Donutchart/donutchartPlotlyOverrides.js.map +1 -0
- package/dist/Donutchart/index.d.ts +2 -0
- package/dist/Donutchart/index.js +16 -0
- package/dist/Donutchart/index.js.map +1 -0
- package/dist/Donutchart/styles.js +10 -0
- package/dist/Donutchart/styles.js.map +1 -0
- package/dist/FilterGroup/FilterGroup.d.ts +3 -3
- package/dist/Forms/FormElement/index.d.ts +4 -0
- package/dist/Forms/FormElement/index.js +14 -0
- package/dist/Forms/FormElement/index.js.map +1 -1
- package/dist/Linechart/Linechart.d.ts +14 -0
- package/dist/Linechart/Linechart.js +130 -0
- package/dist/Linechart/Linechart.js.map +1 -0
- package/dist/Linechart/index.d.ts +2 -0
- package/dist/Linechart/index.js +16 -0
- package/dist/Linechart/index.js.map +1 -0
- package/dist/Linechart/lineChartPlotlyOverrides.js +79 -0
- package/dist/Linechart/lineChartPlotlyOverrides.js.map +1 -0
- package/dist/Linechart/styles.js +10 -0
- package/dist/Linechart/styles.js.map +1 -0
- package/dist/Provider/Provider.js +3 -14
- package/dist/Provider/Provider.js.map +1 -1
- package/dist/Slider/Slider.d.ts +185 -0
- package/dist/Slider/Slider.js +803 -0
- package/dist/Slider/Slider.js.map +1 -0
- package/dist/Slider/SliderInput/SliderInput.js +194 -0
- package/dist/Slider/SliderInput/SliderInput.js.map +1 -0
- package/dist/Slider/SliderInput/index.d.ts +1 -0
- package/dist/Slider/SliderInput/index.js +16 -0
- package/dist/Slider/SliderInput/index.js.map +1 -0
- package/dist/Slider/SliderInput/styles.js +24 -0
- package/dist/Slider/SliderInput/styles.js.map +1 -0
- package/dist/Slider/index.d.ts +2 -0
- package/dist/Slider/index.js +16 -0
- package/dist/Slider/index.js.map +1 -0
- package/dist/Slider/styles.js +238 -0
- package/dist/Slider/styles.js.map +1 -0
- package/dist/Slider/utils.js +413 -0
- package/dist/Slider/utils.js.map +1 -0
- package/dist/Stack/Stack.js +14 -14
- package/dist/Stack/Stack.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -1
- package/dist/legacy/Barchart/Barchart.d.ts +14 -0
- package/dist/legacy/Barchart/Barchart.js +195 -0
- package/dist/legacy/Barchart/Barchart.js.map +1 -0
- package/dist/legacy/Barchart/barchartPlotlyOverrides.js +43 -0
- package/dist/legacy/Barchart/barchartPlotlyOverrides.js.map +1 -0
- package/dist/legacy/Barchart/index.d.ts +2 -0
- package/dist/legacy/Barchart/index.js +2 -0
- package/dist/legacy/Barchart/index.js.map +1 -0
- package/dist/legacy/Barchart/styles.js +3 -0
- package/dist/legacy/Barchart/styles.js.map +1 -0
- package/dist/legacy/BaseInput/BaseInput.js +6 -1
- package/dist/legacy/BaseInput/BaseInput.js.map +1 -1
- package/dist/legacy/BaseInput/styles.js +3 -0
- package/dist/legacy/BaseInput/styles.js.map +1 -1
- package/dist/legacy/Chart/Chart.d.ts +25 -0
- package/dist/legacy/Chart/Chart.js +174 -0
- package/dist/legacy/Chart/Chart.js.map +1 -0
- package/dist/legacy/Chart/Plot/Plot.d.ts +43 -0
- package/dist/legacy/Chart/Plot/Plot.js +93 -0
- package/dist/legacy/Chart/Plot/Plot.js.map +1 -0
- package/dist/legacy/Chart/Plot/index.d.ts +2 -0
- package/dist/legacy/Chart/Plot/index.js +2 -0
- package/dist/legacy/Chart/Plot/index.js.map +1 -0
- package/dist/legacy/Chart/Plot/styles.js +3 -0
- package/dist/legacy/Chart/Plot/styles.js.map +1 -0
- package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js +130 -0
- package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -0
- package/dist/legacy/Chart/Tooltip/MultiTooltip/index.js +2 -0
- package/dist/legacy/Chart/Tooltip/MultiTooltip/index.js.map +1 -0
- package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js +43 -0
- package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js.map +1 -0
- package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js +54 -0
- package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -0
- package/dist/legacy/Chart/Tooltip/SingleTooltip/index.js +2 -0
- package/dist/legacy/Chart/Tooltip/SingleTooltip/index.js.map +1 -0
- package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js +18 -0
- package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js.map +1 -0
- package/dist/legacy/Chart/Tooltip/Tooltip.js +128 -0
- package/dist/legacy/Chart/Tooltip/Tooltip.js.map +1 -0
- package/dist/legacy/Chart/Tooltip/index.js +2 -0
- package/dist/legacy/Chart/Tooltip/index.js.map +1 -0
- package/dist/legacy/Chart/Tooltip/styles.js +9 -0
- package/dist/legacy/Chart/Tooltip/styles.js.map +1 -0
- package/dist/legacy/Chart/chartPlotlyOverrides.js +147 -0
- package/dist/legacy/Chart/chartPlotlyOverrides.js.map +1 -0
- package/dist/legacy/Chart/index.d.ts +5 -0
- package/dist/legacy/Chart/index.js +2 -0
- package/dist/legacy/Chart/index.js.map +1 -0
- package/dist/legacy/Chart/styles.js +32 -0
- package/dist/legacy/Chart/styles.js.map +1 -0
- package/dist/legacy/Donutchart/Donutchart.d.ts +10 -0
- package/dist/legacy/Donutchart/Donutchart.js +86 -0
- package/dist/legacy/Donutchart/Donutchart.js.map +1 -0
- package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js +40 -0
- package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js.map +1 -0
- package/dist/legacy/Donutchart/index.d.ts +2 -0
- package/dist/legacy/Donutchart/index.js +2 -0
- package/dist/legacy/Donutchart/index.js.map +1 -0
- package/dist/legacy/Donutchart/styles.js +3 -0
- package/dist/legacy/Donutchart/styles.js.map +1 -0
- package/dist/legacy/FilterGroup/FilterGroup.d.ts +3 -3
- package/dist/legacy/Forms/FormElement/index.d.ts +4 -0
- package/dist/legacy/Forms/FormElement/index.js +1 -0
- package/dist/legacy/Forms/FormElement/index.js.map +1 -1
- package/dist/legacy/Linechart/Linechart.d.ts +14 -0
- package/dist/legacy/Linechart/Linechart.js +92 -0
- package/dist/legacy/Linechart/Linechart.js.map +1 -0
- package/dist/legacy/Linechart/index.d.ts +2 -0
- package/dist/legacy/Linechart/index.js +2 -0
- package/dist/legacy/Linechart/index.js.map +1 -0
- package/dist/legacy/Linechart/lineChartPlotlyOverrides.js +63 -0
- package/dist/legacy/Linechart/lineChartPlotlyOverrides.js.map +1 -0
- package/dist/legacy/Linechart/styles.js +3 -0
- package/dist/legacy/Linechart/styles.js.map +1 -0
- package/dist/legacy/Provider/Provider.js +4 -15
- package/dist/legacy/Provider/Provider.js.map +1 -1
- package/dist/legacy/Slider/Slider.d.ts +185 -0
- package/dist/legacy/Slider/Slider.js +752 -0
- package/dist/legacy/Slider/Slider.js.map +1 -0
- package/dist/legacy/Slider/SliderInput/SliderInput.js +151 -0
- package/dist/legacy/Slider/SliderInput/SliderInput.js.map +1 -0
- package/dist/legacy/Slider/SliderInput/index.d.ts +1 -0
- package/dist/legacy/Slider/SliderInput/index.js +2 -0
- package/dist/legacy/Slider/SliderInput/index.js.map +1 -0
- package/dist/legacy/Slider/SliderInput/styles.js +16 -0
- package/dist/legacy/Slider/SliderInput/styles.js.map +1 -0
- package/dist/legacy/Slider/index.d.ts +2 -0
- package/dist/legacy/Slider/index.js +2 -0
- package/dist/legacy/Slider/index.js.map +1 -0
- package/dist/legacy/Slider/styles.js +221 -0
- package/dist/legacy/Slider/styles.js.map +1 -0
- package/dist/legacy/Slider/utils.js +347 -0
- package/dist/legacy/Slider/utils.js.map +1 -0
- package/dist/legacy/Stack/Stack.js +14 -14
- package/dist/legacy/Stack/Stack.js.map +1 -1
- package/dist/legacy/index.d.ts +12 -0
- package/dist/legacy/index.js +4 -0
- package/dist/legacy/index.js.map +1 -1
- package/dist/modern/Barchart/Barchart.d.ts +14 -0
- package/dist/modern/Barchart/Barchart.js +176 -0
- package/dist/modern/Barchart/Barchart.js.map +1 -0
- package/dist/modern/Barchart/barchartPlotlyOverrides.js +41 -0
- package/dist/modern/Barchart/barchartPlotlyOverrides.js.map +1 -0
- package/dist/modern/Barchart/index.d.ts +2 -0
- package/dist/modern/Barchart/index.js +2 -0
- package/dist/modern/Barchart/index.js.map +1 -0
- package/dist/modern/Barchart/styles.js +3 -0
- package/dist/modern/Barchart/styles.js.map +1 -0
- package/dist/modern/BaseInput/BaseInput.js +6 -1
- package/dist/modern/BaseInput/BaseInput.js.map +1 -1
- package/dist/modern/BaseInput/styles.js +3 -0
- package/dist/modern/BaseInput/styles.js.map +1 -1
- package/dist/modern/Chart/Chart.d.ts +25 -0
- package/dist/modern/Chart/Chart.js +158 -0
- package/dist/modern/Chart/Chart.js.map +1 -0
- package/dist/modern/Chart/Plot/Plot.d.ts +43 -0
- package/dist/modern/Chart/Plot/Plot.js +94 -0
- package/dist/modern/Chart/Plot/Plot.js.map +1 -0
- package/dist/modern/Chart/Plot/index.d.ts +2 -0
- package/dist/modern/Chart/Plot/index.js +2 -0
- package/dist/modern/Chart/Plot/index.js.map +1 -0
- package/dist/modern/Chart/Plot/styles.js +3 -0
- package/dist/modern/Chart/Plot/styles.js.map +1 -0
- package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js +123 -0
- package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -0
- package/dist/modern/Chart/Tooltip/MultiTooltip/index.js +2 -0
- package/dist/modern/Chart/Tooltip/MultiTooltip/index.js.map +1 -0
- package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js +41 -0
- package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js.map +1 -0
- package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js +51 -0
- package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -0
- package/dist/modern/Chart/Tooltip/SingleTooltip/index.js +2 -0
- package/dist/modern/Chart/Tooltip/SingleTooltip/index.js.map +1 -0
- package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js +16 -0
- package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js.map +1 -0
- package/dist/modern/Chart/Tooltip/Tooltip.js +125 -0
- package/dist/modern/Chart/Tooltip/Tooltip.js.map +1 -0
- package/dist/modern/Chart/Tooltip/index.js +2 -0
- package/dist/modern/Chart/Tooltip/index.js.map +1 -0
- package/dist/modern/Chart/Tooltip/styles.js +9 -0
- package/dist/modern/Chart/Tooltip/styles.js.map +1 -0
- package/dist/modern/Chart/chartPlotlyOverrides.js +137 -0
- package/dist/modern/Chart/chartPlotlyOverrides.js.map +1 -0
- package/dist/modern/Chart/index.d.ts +5 -0
- package/dist/modern/Chart/index.js +2 -0
- package/dist/modern/Chart/index.js.map +1 -0
- package/dist/modern/Chart/styles.js +23 -0
- package/dist/modern/Chart/styles.js.map +1 -0
- package/dist/modern/Donutchart/Donutchart.d.ts +10 -0
- package/dist/modern/Donutchart/Donutchart.js +82 -0
- package/dist/modern/Donutchart/Donutchart.js.map +1 -0
- package/dist/modern/Donutchart/donutchartPlotlyOverrides.js +38 -0
- package/dist/modern/Donutchart/donutchartPlotlyOverrides.js.map +1 -0
- package/dist/modern/Donutchart/index.d.ts +2 -0
- package/dist/modern/Donutchart/index.js +2 -0
- package/dist/modern/Donutchart/index.js.map +1 -0
- package/dist/modern/Donutchart/styles.js +3 -0
- package/dist/modern/Donutchart/styles.js.map +1 -0
- package/dist/modern/FilterGroup/FilterGroup.d.ts +3 -3
- package/dist/modern/Forms/FormElement/index.d.ts +4 -0
- package/dist/modern/Forms/FormElement/index.js +1 -0
- package/dist/modern/Forms/FormElement/index.js.map +1 -1
- package/dist/modern/Linechart/Linechart.d.ts +14 -0
- package/dist/modern/Linechart/Linechart.js +87 -0
- package/dist/modern/Linechart/Linechart.js.map +1 -0
- package/dist/modern/Linechart/index.d.ts +2 -0
- package/dist/modern/Linechart/index.js +2 -0
- package/dist/modern/Linechart/index.js.map +1 -0
- package/dist/modern/Linechart/lineChartPlotlyOverrides.js +59 -0
- package/dist/modern/Linechart/lineChartPlotlyOverrides.js.map +1 -0
- package/dist/modern/Linechart/styles.js +3 -0
- package/dist/modern/Linechart/styles.js.map +1 -0
- package/dist/modern/Provider/Provider.js +3 -8
- package/dist/modern/Provider/Provider.js.map +1 -1
- package/dist/modern/Slider/Slider.d.ts +185 -0
- package/dist/modern/Slider/Slider.js +689 -0
- package/dist/modern/Slider/Slider.js.map +1 -0
- package/dist/modern/Slider/SliderInput/SliderInput.js +129 -0
- package/dist/modern/Slider/SliderInput/SliderInput.js.map +1 -0
- package/dist/modern/Slider/SliderInput/index.d.ts +1 -0
- package/dist/modern/Slider/SliderInput/index.js +2 -0
- package/dist/modern/Slider/SliderInput/index.js.map +1 -0
- package/dist/modern/Slider/SliderInput/styles.js +16 -0
- package/dist/modern/Slider/SliderInput/styles.js.map +1 -0
- package/dist/modern/Slider/index.d.ts +2 -0
- package/dist/modern/Slider/index.js +2 -0
- package/dist/modern/Slider/index.js.map +1 -0
- package/dist/modern/Slider/styles.js +214 -0
- package/dist/modern/Slider/styles.js.map +1 -0
- package/dist/modern/Slider/utils.js +302 -0
- package/dist/modern/Slider/utils.js.map +1 -0
- package/dist/modern/Stack/Stack.js +4 -4
- package/dist/modern/Stack/Stack.js.map +1 -1
- package/dist/modern/index.d.ts +12 -0
- package/dist/modern/index.js +4 -0
- package/dist/modern/index.js.map +1 -1
- package/package.json +9 -6
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var _exportNames = {
|
|
|
32
32
|
HvAvatar: true,
|
|
33
33
|
HvBadge: true,
|
|
34
34
|
HvBanner: true,
|
|
35
|
+
HvBarchart: true,
|
|
35
36
|
HvBaseDropdown: true,
|
|
36
37
|
HvBreadcrumb: true,
|
|
37
38
|
HvBulkActions: true,
|
|
@@ -39,6 +40,7 @@ var _exportNames = {
|
|
|
39
40
|
HvCard: true,
|
|
40
41
|
HvContainer: true,
|
|
41
42
|
HvDatePicker: true,
|
|
43
|
+
HvDonutchart: true,
|
|
42
44
|
HvDropdown: true,
|
|
43
45
|
HvDropDownMenu: true,
|
|
44
46
|
HvEmptyState: true,
|
|
@@ -50,7 +52,9 @@ var _exportNames = {
|
|
|
50
52
|
HvHeader: true,
|
|
51
53
|
HvBaseInput: true,
|
|
52
54
|
HvInput: true,
|
|
55
|
+
HvSlider: true,
|
|
53
56
|
HvKpi: true,
|
|
57
|
+
HvLinechart: true,
|
|
54
58
|
HvLink: true,
|
|
55
59
|
HvListContainer: true,
|
|
56
60
|
HvList: true,
|
|
@@ -156,6 +160,12 @@ Object.defineProperty(exports, "HvBanner", {
|
|
|
156
160
|
return _Banner.default;
|
|
157
161
|
}
|
|
158
162
|
});
|
|
163
|
+
Object.defineProperty(exports, "HvBarchart", {
|
|
164
|
+
enumerable: true,
|
|
165
|
+
get: function get() {
|
|
166
|
+
return _Barchart.default;
|
|
167
|
+
}
|
|
168
|
+
});
|
|
159
169
|
Object.defineProperty(exports, "HvBaseCheckBox", {
|
|
160
170
|
enumerable: true,
|
|
161
171
|
get: function get() {
|
|
@@ -240,6 +250,12 @@ Object.defineProperty(exports, "HvDialog", {
|
|
|
240
250
|
return _Dialog.default;
|
|
241
251
|
}
|
|
242
252
|
});
|
|
253
|
+
Object.defineProperty(exports, "HvDonutchart", {
|
|
254
|
+
enumerable: true,
|
|
255
|
+
get: function get() {
|
|
256
|
+
return _Donutchart.default;
|
|
257
|
+
}
|
|
258
|
+
});
|
|
243
259
|
Object.defineProperty(exports, "HvDropDownMenu", {
|
|
244
260
|
enumerable: true,
|
|
245
261
|
get: function get() {
|
|
@@ -306,6 +322,12 @@ Object.defineProperty(exports, "HvKpi", {
|
|
|
306
322
|
return _Kpi.default;
|
|
307
323
|
}
|
|
308
324
|
});
|
|
325
|
+
Object.defineProperty(exports, "HvLinechart", {
|
|
326
|
+
enumerable: true,
|
|
327
|
+
get: function get() {
|
|
328
|
+
return _Linechart.default;
|
|
329
|
+
}
|
|
330
|
+
});
|
|
309
331
|
Object.defineProperty(exports, "HvLink", {
|
|
310
332
|
enumerable: true,
|
|
311
333
|
get: function get() {
|
|
@@ -396,6 +418,12 @@ Object.defineProperty(exports, "HvSelectionList", {
|
|
|
396
418
|
return _SelectionList.default;
|
|
397
419
|
}
|
|
398
420
|
});
|
|
421
|
+
Object.defineProperty(exports, "HvSlider", {
|
|
422
|
+
enumerable: true,
|
|
423
|
+
get: function get() {
|
|
424
|
+
return _Slider.default;
|
|
425
|
+
}
|
|
426
|
+
});
|
|
399
427
|
Object.defineProperty(exports, "HvSnackbar", {
|
|
400
428
|
enumerable: true,
|
|
401
429
|
get: function get() {
|
|
@@ -647,6 +675,8 @@ Object.keys(_Banner).forEach(function (key) {
|
|
|
647
675
|
});
|
|
648
676
|
});
|
|
649
677
|
|
|
678
|
+
var _Barchart = _interopRequireDefault(require("./Barchart"));
|
|
679
|
+
|
|
650
680
|
var _BaseDropdown = _interopRequireDefault(require("./BaseDropdown"));
|
|
651
681
|
|
|
652
682
|
var _BreadCrumb = _interopRequireDefault(require("./BreadCrumb"));
|
|
@@ -687,6 +717,8 @@ var _Container = _interopRequireDefault(require("./Container"));
|
|
|
687
717
|
|
|
688
718
|
var _DatePicker = _interopRequireDefault(require("./DatePicker"));
|
|
689
719
|
|
|
720
|
+
var _Donutchart = _interopRequireDefault(require("./Donutchart"));
|
|
721
|
+
|
|
690
722
|
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
691
723
|
|
|
692
724
|
var _DropDownMenu = _interopRequireDefault(require("./DropDownMenu"));
|
|
@@ -747,8 +779,12 @@ var _BaseInput = _interopRequireDefault(require("./BaseInput"));
|
|
|
747
779
|
|
|
748
780
|
var _Input = _interopRequireDefault(require("./Input"));
|
|
749
781
|
|
|
782
|
+
var _Slider = _interopRequireDefault(require("./Slider"));
|
|
783
|
+
|
|
750
784
|
var _Kpi = _interopRequireDefault(require("./Kpi"));
|
|
751
785
|
|
|
786
|
+
var _Linechart = _interopRequireDefault(require("./Linechart"));
|
|
787
|
+
|
|
752
788
|
var _Link = _interopRequireDefault(require("./Link"));
|
|
753
789
|
|
|
754
790
|
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 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 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 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\";\n\nexport { default as HvTab } from \"./Tab\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvTable } from \"./Table\";\nexport { default as HvTabs } from \"./Tabs\";\nexport { default as HvTextArea } from \"./TextArea\";\nexport { default as HvTagsInput } from \"./TagsInput\";\nexport { default as HvToggleButton } from \"./ToggleButton\";\nexport { default as HvTooltip } from \"./Tooltip\";\nexport { default as HvOverflowTooltip } from \"./OverflowTooltip\";\nexport { default as HvTypography } from \"./Typography\";\nexport { default as HvUserPreferences } from \"./UserPreferences\";\n// TODO refactor the HvUserPreferences subcomponents' names\nexport {\n Actions as HvUserPreferencesActions,\n Action as HvUserPreferencesAction,\n} from \"./UserPreferences\";\nexport {\n Options as HvUserPreferencesOptions,\n Option as HvUserPreferencesOption,\n Group as HvUserPreferencesOptionsGroup,\n Label as HvUserPreferencesOptionsGroupLabel,\n} from \"./UserPreferences\";\n\nexport { default as HvScrollToHorizontal } from \"./ScrollTo/Horizontal\";\nexport { default as HvScrollToVertical } from \"./ScrollTo/Vertical\";\nexport { default as useScrollTo } from \"./ScrollTo/useScrollTo\";\n\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n// TODO refactor the HvVerticalNavigation subcomponents' names\nexport { Navigation as HvVerticalNavigationTree } from \"./VerticalNavigation\";\nexport { TreeView as HvTreeView, TreeViewItem as HvTreeViewItem } from \"./VerticalNavigation\";\nexport {\n Actions as HvVerticalNavigationActions,\n Action as HvVerticalNavigationAction,\n} from \"./VerticalNavigation\";\n\nexport { default as HvPanel } from \"./Panel\";\n\n// HOCs\nexport { default as withId } from \"./withId\";\nexport { default as withTooltip } from \"./withTooltip\";\n\n// Hooks\nexport { default as useUniqueId } from \"./useUniqueId\";\n\n// theme\nexport { default as hvTheme } from \"./theme\";\nexport { themeBuilder, getTheme } from \"./theme\";\n\n// provider\nexport { default as HvProvider } from \"./Provider\";\nexport * from \"./Provider\";\n\n// utils\nexport * from \"./utils\";\n"],"mappings":"
|
|
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 HvBarchart } from \"./Barchart\";\nexport { default as HvBaseDropdown } from \"./BaseDropdown\";\nexport { default as HvBreadcrumb } from \"./BreadCrumb\";\nexport { default as HvBulkActions } from \"./BulkActions\";\nexport { default as HvButton } from \"./Button\";\nexport { default as HvCard } from \"./Card\";\nexport * from \"./Card\";\nexport * from \"./Calendar\";\nexport { default as HvContainer } from \"./Container\";\nexport { default as HvDatePicker } from \"./DatePicker\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvDropdown } from \"./Dropdown\";\nexport { default as HvDropDownMenu } from \"./DropDownMenu\";\nexport { default as HvEmptyState } from \"./EmptyState\";\nexport { default as HvFilterGroup } from \"./FilterGroup\";\nexport { default as HvFileUploader } from \"./FileUploader\";\nexport * from \"./FileUploader\";\nexport { default as HvFooter } from \"./Footer\";\nexport * from \"./Forms\";\n\nexport { default as HvGrid } from \"./Grid\";\nexport { default as HvGlobalActions } from \"./GlobalActions\";\n\nexport { default as HvHeader } from \"./Header\";\nexport * from \"./Header\";\n\nexport { default as HvBaseInput } from \"./BaseInput\";\nexport { default as HvInput } from \"./Input\";\n\nexport { default as HvSlider } from \"./Slider\";\n\nexport { default as HvKpi } from \"./Kpi\";\n\nexport { default as HvLinechart } from \"./Linechart\";\nexport { default as HvLink } from \"./Link\";\nexport { default as HvListContainer } from \"./ListContainer\";\nexport * from \"./ListContainer\";\n\nexport { default as HvList } from \"./List\";\n\nexport { default as HvSelectionList } from \"./SelectionList\";\n\nexport { default as HvLoading } from \"./Loading\";\nexport { default as HvLogin } from \"./Login\";\nexport { default as HvDialog } from \"./Dialog\";\nexport * from \"./Dialog\";\nexport { default as HvMultiButton } from \"./MultiButton\";\nexport { default as HvPagination } from \"./Pagination\";\n\nexport { default as HvBaseCheckBox } from \"./BaseCheckBox\";\nexport { default as HvCheckBox } from \"./CheckBox\";\nexport { default as HvCheckBoxGroup } from \"./CheckBoxGroup\";\n\nexport { default as HvBaseRadio } from \"./BaseRadio\";\nexport { default as HvRadio } from \"./Radio\";\nexport { default as HvRadioGroup } from \"./RadioGroup\";\n\nexport { default as HvBaseSwitch } from \"./BaseSwitch\";\nexport { default as HvSwitch } from \"./Switch\";\n\nexport { default as HvSnackbar } from \"./Snackbar\";\nexport { default as HvSnackbarContent } from \"./Snackbar/SnackbarContentWrapper\";\nexport { default as HvSnackbarProvider, useHvSnackbar } from \"./Snackbar/SnackbarProvider\";\nexport { default as HvStack } from \"./Stack\";\n\nexport { default as HvTab } from \"./Tab\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvTable } from \"./Table\";\nexport { default as HvTabs } from \"./Tabs\";\nexport { default as HvTextArea } from \"./TextArea\";\nexport { default as HvTagsInput } from \"./TagsInput\";\nexport { default as HvToggleButton } from \"./ToggleButton\";\nexport { default as HvTooltip } from \"./Tooltip\";\nexport { default as HvOverflowTooltip } from \"./OverflowTooltip\";\nexport { default as HvTypography } from \"./Typography\";\nexport { default as HvUserPreferences } from \"./UserPreferences\";\n// TODO refactor the HvUserPreferences subcomponents' names\nexport {\n Actions as HvUserPreferencesActions,\n Action as HvUserPreferencesAction,\n} from \"./UserPreferences\";\nexport {\n Options as HvUserPreferencesOptions,\n Option as HvUserPreferencesOption,\n Group as HvUserPreferencesOptionsGroup,\n Label as HvUserPreferencesOptionsGroupLabel,\n} from \"./UserPreferences\";\n\nexport { default as HvScrollToHorizontal } from \"./ScrollTo/Horizontal\";\nexport { default as HvScrollToVertical } from \"./ScrollTo/Vertical\";\nexport { default as useScrollTo } from \"./ScrollTo/useScrollTo\";\n\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n// TODO refactor the HvVerticalNavigation subcomponents' names\nexport { Navigation as HvVerticalNavigationTree } from \"./VerticalNavigation\";\nexport { TreeView as HvTreeView, TreeViewItem as HvTreeViewItem } from \"./VerticalNavigation\";\nexport {\n Actions as HvVerticalNavigationActions,\n Action as HvVerticalNavigationAction,\n} from \"./VerticalNavigation\";\n\nexport { default as HvPanel } from \"./Panel\";\n\n// HOCs\nexport { default as withId } from \"./withId\";\nexport { default as withTooltip } from \"./withTooltip\";\n\n// Hooks\nexport { default as useUniqueId } from \"./useUniqueId\";\n\n// theme\nexport { default as hvTheme } from \"./theme\";\nexport { themeBuilder, getTheme } from \"./theme\";\n\n// provider\nexport { default as HvProvider } from \"./Provider\";\nexport * from \"./Provider\";\n\n// utils\nexport * from \"./utils\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;AAGA;;AAIA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAGA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HvChartProps } from "../Chart";
|
|
2
|
+
|
|
3
|
+
export interface HvBarchartProps extends HvChartProps {
|
|
4
|
+
/**
|
|
5
|
+
* Sets if the chart is stack.
|
|
6
|
+
*/
|
|
7
|
+
stack?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Sets if the chart is horizontal.
|
|
10
|
+
*/
|
|
11
|
+
horizontal?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default function HvBarchart(props: HvBarchartProps): JSX.Element | null;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["id", "classes", "data", "layout", "config", "tooltipType", "stack", "horizontal"];
|
|
6
|
+
|
|
7
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
|
+
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
|
+
|
|
11
|
+
import "core-js/modules/es.array.map.js";
|
|
12
|
+
import "core-js/modules/es.object.keys.js";
|
|
13
|
+
import "core-js/modules/es.symbol.js";
|
|
14
|
+
import "core-js/modules/es.array.filter.js";
|
|
15
|
+
import "core-js/modules/es.object.to-string.js";
|
|
16
|
+
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
|
17
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
|
18
|
+
import "core-js/modules/es.object.get-own-property-descriptors.js";
|
|
19
|
+
import React, { useMemo, useEffect, useState, useCallback, useRef } from "react";
|
|
20
|
+
import PropTypes from "prop-types";
|
|
21
|
+
import { withStyles } from "@material-ui/core";
|
|
22
|
+
import Chart from "../Chart";
|
|
23
|
+
import { applyLayoutDefaults, applyDataDefaults } from "./barchartPlotlyOverrides";
|
|
24
|
+
import styles from "./styles";
|
|
25
|
+
var MARGIN = 50;
|
|
26
|
+
var MAX_BAR_WIDTH = 90;
|
|
27
|
+
var MIN_BAR_WIDTH = 3;
|
|
28
|
+
/**
|
|
29
|
+
* A Bar chart is a chart or graph that presents categorical data with rectangular bars.
|
|
30
|
+
*
|
|
31
|
+
* Our implementation leverages the Plotly charting library. If you have a specific case
|
|
32
|
+
* that we don't cover, the Plotly [documentation](https://plotly.com/javascript/) is a good starting point.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
var Barchart = function Barchart(_ref) {
|
|
36
|
+
var id = _ref.id,
|
|
37
|
+
classes = _ref.classes,
|
|
38
|
+
data = _ref.data,
|
|
39
|
+
layout = _ref.layout,
|
|
40
|
+
config = _ref.config,
|
|
41
|
+
_ref$tooltipType = _ref.tooltipType,
|
|
42
|
+
tooltipType = _ref$tooltipType === void 0 ? "multiple" : _ref$tooltipType,
|
|
43
|
+
_ref$stack = _ref.stack,
|
|
44
|
+
stack = _ref$stack === void 0 ? false : _ref$stack,
|
|
45
|
+
_ref$horizontal = _ref.horizontal,
|
|
46
|
+
horizontal = _ref$horizontal === void 0 ? false : _ref$horizontal,
|
|
47
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
48
|
+
|
|
49
|
+
/* Values derived from props */
|
|
50
|
+
var dataWithDefaults = useMemo(function () {
|
|
51
|
+
return applyDataDefaults(data, horizontal);
|
|
52
|
+
}, [data, horizontal]);
|
|
53
|
+
var chartLayout = useMemo(function () {
|
|
54
|
+
return applyLayoutDefaults(layout, stack, horizontal);
|
|
55
|
+
}, [layout, stack, horizontal]);
|
|
56
|
+
/* State */
|
|
57
|
+
|
|
58
|
+
var _useState = useState(dataWithDefaults),
|
|
59
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
60
|
+
chartData = _useState2[0],
|
|
61
|
+
setChartData = _useState2[1];
|
|
62
|
+
/* Effects */
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
var firstRender = useRef(true);
|
|
66
|
+
useEffect(function () {
|
|
67
|
+
// only setChartData when prop value changes
|
|
68
|
+
// not needed on first render because the
|
|
69
|
+
// initial state is already properly set
|
|
70
|
+
if (!firstRender.current) {
|
|
71
|
+
setChartData(dataWithDefaults);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
firstRender.current = false;
|
|
75
|
+
}, [dataWithDefaults]);
|
|
76
|
+
/**
|
|
77
|
+
* Used to force the max width of each bar with 90px.
|
|
78
|
+
*
|
|
79
|
+
* (this is effectively more an effect than a callback)
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
var recalculateBarWidth = useCallback(function (ref) {
|
|
83
|
+
// use the data and layout info directly from the plotly ref
|
|
84
|
+
// as it's always the most uptodate version.
|
|
85
|
+
var plotData = ref.current.props.data;
|
|
86
|
+
var plotLayout = ref.current.props.layout;
|
|
87
|
+
|
|
88
|
+
if (plotData.length > 0) {
|
|
89
|
+
var barmode = plotLayout.barmode,
|
|
90
|
+
bargap = plotLayout.bargap,
|
|
91
|
+
bargroupgap = plotLayout.bargroupgap;
|
|
92
|
+
var isStack = barmode === "stack";
|
|
93
|
+
var numberOfBarsByGroup = isStack ? 1 : plotData.length;
|
|
94
|
+
var numberOfGroup = plotData[0].x.length;
|
|
95
|
+
|
|
96
|
+
var _ref$current$el$getBo = ref.current.el.getBoundingClientRect(),
|
|
97
|
+
width = _ref$current$el$getBo.width;
|
|
98
|
+
|
|
99
|
+
var plotWidth = width - MARGIN;
|
|
100
|
+
var groupWidth = plotWidth / numberOfGroup;
|
|
101
|
+
var colWidth = groupWidth * (1 - bargap) - groupWidth * (1 - bargap) * bargroupgap;
|
|
102
|
+
var calculatedBarWidth = colWidth / numberOfBarsByGroup;
|
|
103
|
+
var greaterThan90 = calculatedBarWidth > MAX_BAR_WIDTH;
|
|
104
|
+
var lessThan3 = calculatedBarWidth < MIN_BAR_WIDTH;
|
|
105
|
+
var isAlreadyGreaterThan90 = plotData[0].width !== undefined;
|
|
106
|
+
|
|
107
|
+
if (greaterThan90 && !isAlreadyGreaterThan90) {
|
|
108
|
+
var newWidth = MAX_BAR_WIDTH / plotWidth * numberOfGroup;
|
|
109
|
+
var newData = plotData.map(function (subData) {
|
|
110
|
+
return _objectSpread(_objectSpread({}, subData), {}, {
|
|
111
|
+
width: newWidth
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
setChartData(newData);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (lessThan3 && !isAlreadyGreaterThan90) {
|
|
118
|
+
var _newWidth = MIN_BAR_WIDTH / plotWidth * numberOfGroup;
|
|
119
|
+
|
|
120
|
+
var _newData = plotData.map(function (subData) {
|
|
121
|
+
return _objectSpread(_objectSpread({}, subData), {}, {
|
|
122
|
+
width: _newWidth
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
setChartData(_newData);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (!greaterThan90 && isAlreadyGreaterThan90) {
|
|
130
|
+
var _newData2 = plotData.map(function (subData) {
|
|
131
|
+
return _objectSpread(_objectSpread({}, subData), {}, {
|
|
132
|
+
width: undefined
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
setChartData(_newData2);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}, []);
|
|
140
|
+
return /*#__PURE__*/React.createElement(Chart, _extends({
|
|
141
|
+
id: id,
|
|
142
|
+
classes: classes,
|
|
143
|
+
data: chartData,
|
|
144
|
+
layout: chartLayout,
|
|
145
|
+
config: config,
|
|
146
|
+
tooltipType: tooltipType,
|
|
147
|
+
afterPlot: recalculateBarWidth
|
|
148
|
+
}, others));
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
process.env.NODE_ENV !== "production" ? Barchart.propTypes = {
|
|
152
|
+
/**
|
|
153
|
+
* An Id passed on to the component
|
|
154
|
+
*/
|
|
155
|
+
id: PropTypes.string,
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* A Jss Object used to override or extend the styles applied.
|
|
159
|
+
*/
|
|
160
|
+
classes: PropTypes.instanceOf(Object),
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Plotly data object (see https://plot.ly/javascript/reference/).
|
|
164
|
+
*/
|
|
165
|
+
data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Plotly layout object (see https://plot.ly/javascript/reference/#layout).
|
|
169
|
+
*/
|
|
170
|
+
layout: PropTypes.instanceOf(Object),
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Plotly config object (see https://plot.ly/javascript/configuration-options/).
|
|
174
|
+
*/
|
|
175
|
+
config: PropTypes.instanceOf(Object),
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Defines if should use a single or multiline tooltip.
|
|
179
|
+
*/
|
|
180
|
+
tooltipType: PropTypes.oneOf(["single", "multiple"]),
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Sets is the chart is stack.
|
|
184
|
+
*/
|
|
185
|
+
stack: PropTypes.bool,
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Sets is the chart is horizontal.
|
|
189
|
+
*/
|
|
190
|
+
horizontal: PropTypes.bool
|
|
191
|
+
} : void 0;
|
|
192
|
+
export default withStyles(styles, {
|
|
193
|
+
name: "HvBarchart"
|
|
194
|
+
})(Barchart);
|
|
195
|
+
//# sourceMappingURL=Barchart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Barchart.js","names":["React","useMemo","useEffect","useState","useCallback","useRef","PropTypes","withStyles","Chart","applyLayoutDefaults","applyDataDefaults","styles","MARGIN","MAX_BAR_WIDTH","MIN_BAR_WIDTH","Barchart","id","classes","data","layout","config","tooltipType","stack","horizontal","others","dataWithDefaults","chartLayout","chartData","setChartData","firstRender","current","recalculateBarWidth","ref","plotData","props","plotLayout","length","barmode","bargap","bargroupgap","isStack","numberOfBarsByGroup","numberOfGroup","x","el","getBoundingClientRect","width","plotWidth","groupWidth","colWidth","calculatedBarWidth","greaterThan90","lessThan3","isAlreadyGreaterThan90","undefined","newWidth","newData","map","subData","propTypes","string","instanceOf","Object","arrayOf","isRequired","oneOf","bool","name"],"sources":["../../../src/Barchart/Barchart.js"],"sourcesContent":["import React, { useMemo, useEffect, useState, useCallback, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport Chart from \"../Chart\";\nimport { applyLayoutDefaults, applyDataDefaults } from \"./barchartPlotlyOverrides\";\nimport styles from \"./styles\";\n\nconst MARGIN = 50;\nconst MAX_BAR_WIDTH = 90;\nconst MIN_BAR_WIDTH = 3;\n\n/**\n * A Bar chart is a chart or graph that presents categorical data with rectangular bars.\n *\n * Our implementation leverages the Plotly charting library. If you have a specific case\n * that we don't cover, the Plotly [documentation](https://plotly.com/javascript/) is a good starting point.\n */\nconst Barchart = ({\n id,\n classes,\n data,\n layout,\n config,\n tooltipType = \"multiple\",\n stack = false,\n horizontal = false,\n ...others\n}) => {\n /* Values derived from props */\n\n const dataWithDefaults = useMemo(() => applyDataDefaults(data, horizontal), [data, horizontal]);\n const chartLayout = useMemo(\n () => applyLayoutDefaults(layout, stack, horizontal),\n [layout, stack, horizontal]\n );\n\n /* State */\n\n const [chartData, setChartData] = useState(dataWithDefaults);\n\n /* Effects */\n\n const firstRender = useRef(true);\n useEffect(() => {\n // only setChartData when prop value changes\n // not needed on first render because the\n // initial state is already properly set\n if (!firstRender.current) {\n setChartData(dataWithDefaults);\n }\n\n firstRender.current = false;\n }, [dataWithDefaults]);\n\n /**\n * Used to force the max width of each bar with 90px.\n *\n * (this is effectively more an effect than a callback)\n */\n const recalculateBarWidth = useCallback((ref) => {\n // use the data and layout info directly from the plotly ref\n // as it's always the most uptodate version.\n const plotData = ref.current.props.data;\n const plotLayout = ref.current.props.layout;\n\n if (plotData.length > 0) {\n const { barmode, bargap, bargroupgap } = plotLayout;\n\n const isStack = barmode === \"stack\";\n const numberOfBarsByGroup = isStack ? 1 : plotData.length;\n const numberOfGroup = plotData[0].x.length;\n\n const { width } = ref.current.el.getBoundingClientRect();\n const plotWidth = width - MARGIN;\n const groupWidth = plotWidth / numberOfGroup;\n const colWidth = groupWidth * (1 - bargap) - groupWidth * (1 - bargap) * bargroupgap;\n\n const calculatedBarWidth = colWidth / numberOfBarsByGroup;\n const greaterThan90 = calculatedBarWidth > MAX_BAR_WIDTH;\n const lessThan3 = calculatedBarWidth < MIN_BAR_WIDTH;\n const isAlreadyGreaterThan90 = plotData[0].width !== undefined;\n\n if (greaterThan90 && !isAlreadyGreaterThan90) {\n const newWidth = (MAX_BAR_WIDTH / plotWidth) * numberOfGroup;\n\n const newData = plotData.map((subData) => {\n return { ...subData, width: newWidth };\n });\n\n setChartData(newData);\n }\n\n if (lessThan3 && !isAlreadyGreaterThan90) {\n const newWidth = (MIN_BAR_WIDTH / plotWidth) * numberOfGroup;\n\n const newData = plotData.map((subData) => {\n return { ...subData, width: newWidth };\n });\n\n setChartData(newData);\n }\n\n if (!greaterThan90 && isAlreadyGreaterThan90) {\n const newData = plotData.map((subData) => {\n return { ...subData, width: undefined };\n });\n\n setChartData(newData);\n }\n }\n }, []);\n\n return (\n <Chart\n id={id}\n classes={classes}\n data={chartData}\n layout={chartLayout}\n config={config}\n tooltipType={tooltipType}\n afterPlot={recalculateBarWidth}\n {...others}\n />\n );\n};\nBarchart.propTypes = {\n /**\n * An Id passed on to the component\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.instanceOf(Object),\n /**\n * Plotly data object (see https://plot.ly/javascript/reference/).\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n * Plotly layout object (see https://plot.ly/javascript/reference/#layout).\n */\n layout: PropTypes.instanceOf(Object),\n /**\n * Plotly config object (see https://plot.ly/javascript/configuration-options/).\n */\n config: PropTypes.instanceOf(Object),\n /**\n * Defines if should use a single or multiline tooltip.\n */\n tooltipType: PropTypes.oneOf([\"single\", \"multiple\"]),\n /**\n * Sets is the chart is stack.\n */\n stack: PropTypes.bool,\n /**\n * Sets is the chart is horizontal.\n */\n horizontal: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvBarchart\" })(Barchart);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,OAAhB,EAAyBC,SAAzB,EAAoCC,QAApC,EAA8CC,WAA9C,EAA2DC,MAA3D,QAAyE,OAAzE;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,OAAOC,KAAP,MAAkB,UAAlB;AACA,SAASC,mBAAT,EAA8BC,iBAA9B,QAAuD,2BAAvD;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,IAAMC,MAAM,GAAG,EAAf;AACA,IAAMC,aAAa,GAAG,EAAtB;AACA,IAAMC,aAAa,GAAG,CAAtB;AAEA;AACA;AACA;AACA;AACA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;;EAanB;AACF;AACA;EACE7C,MAAM,EAAEb,SAAS,CAACuD,UAAV,CAAqBC,MAArB,CAhBW;;EAiBnB;AACF;AACA;EACE1C,MAAM,EAAEd,SAAS,CAACuD,UAAV,CAAqBC,MAArB,CApBW;;EAqBnB;AACF;AACA;EACEzC,WAAW,EAAEf,SAAS,CAAC2D,KAAV,CAAgB,CAAC,QAAD,EAAW,UAAX,CAAhB,CAxBM;;EAyBnB;AACF;AACA;EACE3C,KAAK,EAAEhB,SAAS,CAAC4D,IA5BE;;EA6BnB;AACF;AACA;EACE3C,UAAU,EAAEjB,SAAS,CAAC4D;AAhCH,CAArB;AAmCA,eAAe3D,UAAU,CAACI,MAAD,EAAS;EAAEwD,IAAI,EAAE;AAAR,CAAT,CAAV,CAA2CpD,QAA3C,CAAf"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "core-js/modules/es.object.to-string.js";
|
|
2
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
|
3
|
+
import clone from "lodash/cloneDeep";
|
|
4
|
+
|
|
5
|
+
var setterIfNil = function setterIfNil(object, property, value) {
|
|
6
|
+
var _object$property;
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line no-param-reassign
|
|
9
|
+
object[property] = (_object$property = object[property]) !== null && _object$property !== void 0 ? _object$property : value;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Auxiliary functions to set the layout in order to follow the DS guideline.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export var applyLayoutDefaults = function applyLayoutDefaults(inputLayout, stack, isHorizontal) {
|
|
17
|
+
var layout = inputLayout === undefined ? {} : clone(inputLayout);
|
|
18
|
+
setterIfNil(layout, "bargap", 0.25);
|
|
19
|
+
setterIfNil(layout, "bargroupgap", 0.25);
|
|
20
|
+
setterIfNil(layout, "hovermode", "closest");
|
|
21
|
+
if (stack) setterIfNil(layout, "barmode", "stack");
|
|
22
|
+
setterIfNil(layout, "yaxis", {});
|
|
23
|
+
setterIfNil(layout, "xaxis", {});
|
|
24
|
+
|
|
25
|
+
if (isHorizontal) {
|
|
26
|
+
setterIfNil(layout.yaxis, "showline", true);
|
|
27
|
+
setterIfNil(layout.xaxis, "showline", false);
|
|
28
|
+
} else {
|
|
29
|
+
setterIfNil(layout.yaxis, "showline", false);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return layout;
|
|
33
|
+
};
|
|
34
|
+
export var applyDataDefaults = function applyDataDefaults(inputData, isHorizontal) {
|
|
35
|
+
var data = inputData;
|
|
36
|
+
data.forEach(function (trace) {
|
|
37
|
+
setterIfNil(trace, "type", "bar");
|
|
38
|
+
setterIfNil(trace, "hoverinfo", "none");
|
|
39
|
+
if (isHorizontal) setterIfNil(trace, "orientation", "h");
|
|
40
|
+
});
|
|
41
|
+
return data;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=barchartPlotlyOverrides.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barchartPlotlyOverrides.js","names":["clone","setterIfNil","object","property","value","applyLayoutDefaults","inputLayout","stack","isHorizontal","layout","undefined","yaxis","xaxis","applyDataDefaults","inputData","data","forEach","trace"],"sources":["../../../src/Barchart/barchartPlotlyOverrides.js"],"sourcesContent":["import clone from \"lodash/cloneDeep\";\n\nconst setterIfNil = (object, property, value) => {\n // eslint-disable-next-line no-param-reassign\n object[property] = object[property] ?? value;\n};\n\n/**\n * Auxiliary functions to set the layout in order to follow the DS guideline.\n */\nexport const applyLayoutDefaults = (inputLayout, stack, isHorizontal) => {\n const layout = inputLayout === undefined ? {} : clone(inputLayout);\n setterIfNil(layout, \"bargap\", 0.25);\n setterIfNil(layout, \"bargroupgap\", 0.25);\n setterIfNil(layout, \"hovermode\", \"closest\");\n if (stack) setterIfNil(layout, \"barmode\", \"stack\");\n\n setterIfNil(layout, \"yaxis\", {});\n setterIfNil(layout, \"xaxis\", {});\n\n if (isHorizontal) {\n setterIfNil(layout.yaxis, \"showline\", true);\n setterIfNil(layout.xaxis, \"showline\", false);\n } else {\n setterIfNil(layout.yaxis, \"showline\", false);\n }\n\n return layout;\n};\n\nexport const applyDataDefaults = (inputData, isHorizontal) => {\n const data = inputData;\n\n data.forEach((trace) => {\n setterIfNil(trace, \"type\", \"bar\");\n setterIfNil(trace, \"hoverinfo\", \"none\");\n if (isHorizontal) setterIfNil(trace, \"orientation\", \"h\");\n });\n\n return data;\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,kBAAlB;;AAEA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,MAAD,EAASC,QAAT,EAAmBC,KAAnB,EAA6B;EAAA;;EAC/C;EACAF,MAAM,CAACC,QAAD,CAAN,uBAAmBD,MAAM,CAACC,QAAD,CAAzB,+DAAuCC,KAAvC;AACD,CAHD;AAKA;AACA;AACA;;;AACA,OAAO,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACC,WAAD,EAAcC,KAAd,EAAqBC,YAArB,EAAsC;EACvE,IAAMC,MAAM,GAAGH,WAAW,KAAKI,SAAhB,GAA4B,EAA5B,GAAiCV,KAAK,CAACM,WAAD,CAArD;EACAL,WAAW,CAACQ,MAAD,EAAS,QAAT,EAAmB,IAAnB,CAAX;EACAR,WAAW,CAACQ,MAAD,EAAS,aAAT,EAAwB,IAAxB,CAAX;EACAR,WAAW,CAACQ,MAAD,EAAS,WAAT,EAAsB,SAAtB,CAAX;EACA,IAAIF,KAAJ,EAAWN,WAAW,CAACQ,MAAD,EAAS,SAAT,EAAoB,OAApB,CAAX;EAEXR,WAAW,CAACQ,MAAD,EAAS,OAAT,EAAkB,EAAlB,CAAX;EACAR,WAAW,CAACQ,MAAD,EAAS,OAAT,EAAkB,EAAlB,CAAX;;EAEA,IAAID,YAAJ,EAAkB;IAChBP,WAAW,CAACQ,MAAM,CAACE,KAAR,EAAe,UAAf,EAA2B,IAA3B,CAAX;IACAV,WAAW,CAACQ,MAAM,CAACG,KAAR,EAAe,UAAf,EAA2B,KAA3B,CAAX;EACD,CAHD,MAGO;IACLX,WAAW,CAACQ,MAAM,CAACE,KAAR,EAAe,UAAf,EAA2B,KAA3B,CAAX;EACD;;EAED,OAAOF,MAAP;AACD,CAlBM;AAoBP,OAAO,IAAMI,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,SAAD,EAAYN,YAAZ,EAA6B;EAC5D,IAAMO,IAAI,GAAGD,SAAb;EAEAC,IAAI,CAACC,OAAL,CAAa,UAACC,KAAD,EAAW;IACtBhB,WAAW,CAACgB,KAAD,EAAQ,MAAR,EAAgB,KAAhB,CAAX;IACAhB,WAAW,CAACgB,KAAD,EAAQ,WAAR,EAAqB,MAArB,CAAX;IACA,IAAIT,YAAJ,EAAkBP,WAAW,CAACgB,KAAD,EAAQ,aAAR,EAAuB,GAAvB,CAAX;EACnB,CAJD;EAMA,OAAOF,IAAP;AACD,CAVM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/Barchart/index.js"],"sourcesContent":["export { default } from \"./Barchart\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,YAAxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles"],"sources":["../../../src/Barchart/styles.js"],"sourcesContent":["const styles = {};\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,EAAf;AAEA,eAAeA,MAAf"}
|
|
@@ -80,7 +80,7 @@ var HvBaseInput = function HvBaseInput(props) {
|
|
|
80
80
|
focused: classes.inputRootFocused,
|
|
81
81
|
disabled: classes.inputRootDisabled,
|
|
82
82
|
multiline: classes.inputRootMultiline,
|
|
83
|
-
input: clsx(classes.input, !formElementProps.disabled && resizable && classes.inputResizable)
|
|
83
|
+
input: clsx(classes.input, !formElementProps.disabled && resizable && classes.inputResizable, disabled && classes.inputDisabled)
|
|
84
84
|
},
|
|
85
85
|
inputProps: _objectSpread(_objectSpread({
|
|
86
86
|
// avoid the required attribute at the root node
|
|
@@ -151,6 +151,11 @@ process.env.NODE_ENV !== "production" ? HvBaseInput.propTypes = {
|
|
|
151
151
|
*/
|
|
152
152
|
input: PropTypes.string,
|
|
153
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Styles applied to input html element when is disabled.
|
|
156
|
+
*/
|
|
157
|
+
inputDisabled: PropTypes.string,
|
|
158
|
+
|
|
154
159
|
/**
|
|
155
160
|
* Styles applied to input html element when it is resizable.
|
|
156
161
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput.js","names":["React","useContext","PropTypes","clsx","Input","withStyles","refType","styles","HvFormElementContext","HvFormElementDescriptorsContext","buildFormElementPropsFromContext","buildAriaPropsFromContext","HvBaseInput","props","classes","className","id","name","value","defaultValue","required","readOnly","disabled","onChange","type","placeholder","multiline","resizable","invalid","inputRef","inputProps","others","formElementContext","formElementProps","localInvalid","status","formElementDescriptorsContext","ariaProps","onChangeHandler","event","target","root","inputRoot","focused","inputRootFocused","inputRootDisabled","inputRootMultiline","input","inputResizable","inputBorderContainer","formElementType","propTypes","string","shape","isRequired","bool","func","instanceOf","Object"],"sources":["../../../src/BaseInput/BaseInput.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { Input, withStyles } from \"@material-ui/core\";\nimport { refType } from \"../utils\";\nimport styles from \"./styles\";\n\nimport {\n HvFormElementContext,\n HvFormElementDescriptorsContext,\n buildFormElementPropsFromContext,\n buildAriaPropsFromContext,\n} from \"../Forms/FormElement\";\n\n/**\n * An Input component that only posses the most basic functionalities.\n * It should be used alongside the other form elements to construct a proper accessible form.\n */\nconst HvBaseInput = (props) => {\n const {\n classes,\n className = \"\",\n\n id,\n name,\n\n value,\n defaultValue,\n\n required,\n readOnly,\n disabled,\n\n onChange,\n\n type = \"text\",\n\n placeholder,\n\n multiline = false,\n resizable = false,\n invalid = false,\n\n inputRef,\n inputProps = {},\n\n ...others\n } = props;\n\n const formElementContext = useContext(HvFormElementContext);\n const formElementProps = buildFormElementPropsFromContext(props, formElementContext);\n\n const localInvalid = invalid || formElementProps.status === \"invalid\";\n\n const formElementDescriptorsContext = useContext(HvFormElementDescriptorsContext);\n const ariaProps = buildAriaPropsFromContext(\n inputProps,\n formElementDescriptorsContext,\n localInvalid,\n id\n );\n\n const onChangeHandler = (event) => {\n onChange?.(event, event.target.value);\n };\n\n return (\n <div\n className={clsx(classes.root, className, {\n [classes.disabled]: formElementProps.disabled,\n [classes.invalid]: localInvalid,\n [classes.resizable]: multiline && resizable,\n [classes.readOnly]: readOnly,\n })}\n >\n <Input\n id={id}\n name={formElementProps.name}\n value={value}\n defaultValue={defaultValue}\n type={type}\n placeholder={placeholder}\n readOnly={formElementProps.readOnly}\n disabled={formElementProps.disabled}\n onChange={onChangeHandler}\n classes={{\n root: classes.inputRoot,\n focused: classes.inputRootFocused,\n disabled: classes.inputRootDisabled,\n multiline: classes.inputRootMultiline,\n input: clsx(classes.input, {\n [classes.inputResizable]: !formElementProps.disabled && resizable,\n }),\n }}\n inputProps={{\n // avoid the required attribute at the root node\n required: formElementProps.required,\n ...inputProps,\n ...ariaProps,\n }}\n inputRef={inputRef}\n multiline={multiline}\n rows={10}\n {...others}\n />\n {!multiline && <div role=\"presentation\" className={classes.inputBorderContainer} />}\n </div>\n );\n};\n\nHvBaseInput.formElementType = \"input\";\n\nHvBaseInput.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the component styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the root container of the input.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the root container of the input when it is disabled.\n */\n disabled: PropTypes.string,\n /**\n * Styles applied to the root container of the input when it is invalid.\n */\n invalid: PropTypes.string,\n /**\n * Styles applied to the root container of the input when it is resizable.\n */\n resizable: PropTypes.string,\n\n /**\n * Styles applied to input root which is the input that encloses all the other elements.\n */\n inputRoot: PropTypes.string,\n /**\n * Styles applied to input root when it is focused.\n */\n inputRootFocused: PropTypes.string,\n /**\n * Styles applied to input html element when it is disabled.\n */\n inputRootDisabled: PropTypes.string,\n /**\n * Styles applied to input html element when it is multiline mode.\n */\n inputRootMultiline: PropTypes.string,\n\n /**\n * Styles applied to input html element.\n */\n input: PropTypes.string,\n /**\n * Styles applied to input html element when it is resizable.\n */\n inputResizable: PropTypes.string,\n\n /**\n * Styles applied to the container of the border element.\n */\n inputBorderContainer: PropTypes.string,\n /**\n * Styles applied to the container of the border element, when in read only mode.\n */\n readOnly: PropTypes.string,\n }).isRequired,\n\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * The input name.\n */\n name: PropTypes.string,\n\n /**\n * The value of the input, when controlled.\n */\n value: PropTypes.string,\n /**\n * The initial value of the input, when uncontrolled.\n */\n defaultValue: PropTypes.string,\n\n /**\n * If `true` the input is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * Indicates that the input is not editable.\n */\n readOnly: PropTypes.bool,\n /**\n * If true, the input element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The function that will be executed onChange, allows modification of the input,\n * it receives the value. If a new value should be presented it must returned it.\n */\n onChange: PropTypes.func,\n\n /**\n * The input type.\n */\n type: PropTypes.string,\n\n /**\n * Label inside the input used to help user.\n */\n placeholder: PropTypes.string,\n\n /**\n * If true, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n /**\n * If true and multiline is also true the textarea element will be resizable.\n */\n resizable: PropTypes.bool,\n /**\n * Denotes if the input is in an invalid state.\n */\n invalid: PropTypes.bool,\n\n /**\n * Attributes applied to the input element.\n */\n inputProps: PropTypes.instanceOf(Object),\n /**\n * Allows passing a ref to the underlying input\n */\n inputRef: refType,\n};\n\nexport default withStyles(styles, { name: \"HvBaseInput\" })(HvBaseInput);\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAA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EAAE5B,SAAS,CAACuD,UAAV,CAAqBC,MAArB,CA7HU;;EA8HtB;AACF;AACA;EACE7B,QAAQ,EAAEvB;AAjIY,CAAxB;AAoIA,eAAeD,UAAU,CAACE,MAAD,EAAS;EAAEU,IAAI,EAAE;AAAR,CAAT,CAAV,CAA4CL,WAA5C,CAAf"}
|
|
1
|
+
{"version":3,"file":"BaseInput.js","names":["React","useContext","PropTypes","clsx","Input","withStyles","refType","styles","HvFormElementContext","HvFormElementDescriptorsContext","buildFormElementPropsFromContext","buildAriaPropsFromContext","HvBaseInput","props","classes","className","id","name","value","defaultValue","required","readOnly","disabled","onChange","type","placeholder","multiline","resizable","invalid","inputRef","inputProps","others","formElementContext","formElementProps","localInvalid","status","formElementDescriptorsContext","ariaProps","onChangeHandler","event","target","root","inputRoot","focused","inputRootFocused","inputRootDisabled","inputRootMultiline","input","inputResizable","inputDisabled","inputBorderContainer","formElementType","propTypes","string","shape","isRequired","bool","func","instanceOf","Object"],"sources":["../../../src/BaseInput/BaseInput.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { Input, withStyles } from \"@material-ui/core\";\nimport { refType } from \"../utils\";\nimport styles from \"./styles\";\n\nimport {\n HvFormElementContext,\n HvFormElementDescriptorsContext,\n buildFormElementPropsFromContext,\n buildAriaPropsFromContext,\n} from \"../Forms/FormElement\";\n\n/**\n * An Input component that only posses the most basic functionalities.\n * It should be used alongside the other form elements to construct a proper accessible form.\n */\nconst HvBaseInput = (props) => {\n const {\n classes,\n className = \"\",\n\n id,\n name,\n\n value,\n defaultValue,\n\n required,\n readOnly,\n disabled,\n\n onChange,\n\n type = \"text\",\n\n placeholder,\n\n multiline = false,\n resizable = false,\n invalid = false,\n\n inputRef,\n inputProps = {},\n\n ...others\n } = props;\n\n const formElementContext = useContext(HvFormElementContext);\n const formElementProps = buildFormElementPropsFromContext(props, formElementContext);\n\n const localInvalid = invalid || formElementProps.status === \"invalid\";\n\n const formElementDescriptorsContext = useContext(HvFormElementDescriptorsContext);\n const ariaProps = buildAriaPropsFromContext(\n inputProps,\n formElementDescriptorsContext,\n localInvalid,\n id\n );\n\n const onChangeHandler = (event) => {\n onChange?.(event, event.target.value);\n };\n\n return (\n <div\n className={clsx(classes.root, className, {\n [classes.disabled]: formElementProps.disabled,\n [classes.invalid]: localInvalid,\n [classes.resizable]: multiline && resizable,\n [classes.readOnly]: readOnly,\n })}\n >\n <Input\n id={id}\n name={formElementProps.name}\n value={value}\n defaultValue={defaultValue}\n type={type}\n placeholder={placeholder}\n readOnly={formElementProps.readOnly}\n disabled={formElementProps.disabled}\n onChange={onChangeHandler}\n classes={{\n root: classes.inputRoot,\n focused: classes.inputRootFocused,\n disabled: classes.inputRootDisabled,\n multiline: classes.inputRootMultiline,\n input: clsx(classes.input, {\n [classes.inputResizable]: !formElementProps.disabled && resizable,\n [classes.inputDisabled]: disabled,\n }),\n }}\n inputProps={{\n // avoid the required attribute at the root node\n required: formElementProps.required,\n ...inputProps,\n ...ariaProps,\n }}\n inputRef={inputRef}\n multiline={multiline}\n rows={10}\n {...others}\n />\n {!multiline && <div role=\"presentation\" className={classes.inputBorderContainer} />}\n </div>\n );\n};\n\nHvBaseInput.formElementType = \"input\";\n\nHvBaseInput.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the component styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the root container of the input.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the root container of the input when it is disabled.\n */\n disabled: PropTypes.string,\n /**\n * Styles applied to the root container of the input when it is invalid.\n */\n invalid: PropTypes.string,\n /**\n * Styles applied to the root container of the input when it is resizable.\n */\n resizable: PropTypes.string,\n\n /**\n * Styles applied to input root which is the input that encloses all the other elements.\n */\n inputRoot: PropTypes.string,\n /**\n * Styles applied to input root when it is focused.\n */\n inputRootFocused: PropTypes.string,\n /**\n * Styles applied to input html element when it is disabled.\n */\n inputRootDisabled: PropTypes.string,\n /**\n * Styles applied to input html element when it is multiline mode.\n */\n inputRootMultiline: PropTypes.string,\n\n /**\n * Styles applied to input html element.\n */\n input: PropTypes.string,\n /**\n * Styles applied to input html element when is disabled.\n */\n inputDisabled: PropTypes.string,\n /**\n * Styles applied to input html element when it is resizable.\n */\n inputResizable: PropTypes.string,\n\n /**\n * Styles applied to the container of the border element.\n */\n inputBorderContainer: PropTypes.string,\n /**\n * Styles applied to the container of the border element, when in read only mode.\n */\n readOnly: PropTypes.string,\n }).isRequired,\n\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * The input name.\n */\n name: PropTypes.string,\n\n /**\n * The value of the input, when controlled.\n */\n value: PropTypes.string,\n /**\n * The initial value of the input, when uncontrolled.\n */\n defaultValue: PropTypes.string,\n\n /**\n * If `true` the input is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * Indicates that the input is not editable.\n */\n readOnly: PropTypes.bool,\n /**\n * If true, the input element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The function that will be executed onChange, allows modification of the input,\n * it receives the value. If a new value should be presented it must returned it.\n */\n onChange: PropTypes.func,\n\n /**\n * The input type.\n */\n type: PropTypes.string,\n\n /**\n * Label inside the input used to help user.\n */\n placeholder: PropTypes.string,\n\n /**\n * If true, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n /**\n * If true and multiline is also true the textarea element will be resizable.\n */\n resizable: PropTypes.bool,\n /**\n * Denotes if the input is in an invalid state.\n */\n invalid: PropTypes.bool,\n\n /**\n * Attributes applied to the input element.\n */\n inputProps: PropTypes.instanceOf(Object),\n /**\n * Allows passing a ref to the underlying input\n */\n inputRef: refType,\n};\n\nexport default withStyles(styles, { name: \"HvBaseInput\" })(HvBaseInput);\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MA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S,CAACsD,IA5HG;;EA8HtB;AACF;AACA;EACE1B,UAAU,EAAE5B,SAAS,CAACwD,UAAV,CAAqBC,MAArB,CAjIU;;EAkItB;AACF;AACA;EACE9B,QAAQ,EAAEvB;AArIY,CAAxB;AAwIA,eAAeD,UAAU,CAACE,MAAD,EAAS;EAAEU,IAAI,EAAE;AAAR,CAAT,CAAV,CAA4CL,WAA5C,CAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["outlineStyles","styles","theme","root","display","width","position","overflow","border","hv","palette","accent","acce1","backgroundColor","resizable","readOnly","disabled","atmosphere","atmo4","atmo3","invalid","semantic","sema4","inputRoot","margin","borderRadius","atmo1","inputRootFocused","background","inputRootDisabled","cursor","inputRootMultiline","padding","height","minHeight","marginLeft","marginRight","input","spacing","xs","typography","normalText","textOverflow","outline","placeholderText","opacity","flexGrow","inputResizable","resize","inputBorderContainer","top","left","color"],"sources":["../../../src/BaseInput/styles.js"],"sourcesContent":["import { outlineStyles } from \"../Focus/styles\";\n\nconst styles = (theme) => ({\n root: {\n display: \"inline-block\",\n width: \"100%\",\n position: \"relative\",\n \"& $inputRootMultiline\": {\n overflow: \"auto\",\n border: \"none\",\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"&:focus-within $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n },\n resizable: {\n width: \"auto\",\n },\n readOnly: {\n \"& $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n \"&:focus-within $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n\n // multiline\n \"& $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n },\n disabled: {\n \"& $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n \"& $inputRootMultiline\": {\n \"& $input\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n },\n },\n },\n invalid: {\n \"&:not($disabled)\": {\n \"& $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.semantic.sema4,\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.semantic.sema4,\n },\n \"& $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n },\n },\n\n inputRoot: {\n margin: 0,\n width: \"100%\",\n borderRadius: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n },\n inputRootFocused: {\n background: theme.hv.palette.atmosphere.atmo1,\n ...outlineStyles,\n \"&:hover\": {\n background: theme.hv.palette.atmosphere.atmo1,\n },\n },\n inputRootDisabled: {\n background: theme.hv.palette.atmosphere.atmo3,\n \"&:hover\": {\n background: theme.hv.palette.atmosphere.atmo3,\n cursor: \"not-allowed\",\n },\n cursor: \"not-allowed\",\n },\n inputRootMultiline: {\n padding: 0,\n backgroundColor: \"transparent\",\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n borderRadius: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n height: \"auto\",\n minHeight: \"21px\",\n padding: \"5px 10px\",\n overflow: \"auto\",\n marginLeft: \"0px\",\n marginRight: \"0px\",\n },\n },\n\n input: {\n height: \"21px\",\n marginLeft: theme.hv.spacing.xs,\n marginRight: theme.hv.spacing.xs,\n padding: \"6px 0 5px\",\n ...theme.hv.typography.normalText,\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n outline: \"none\",\n \"&::placeholder\": {\n ...theme.hv.typography.placeholderText,\n opacity: 1,\n },\n \"&::-ms-clear\": {\n display: \"none\",\n },\n width: \"initial\",\n flexGrow: 1,\n },\n inputResizable: {\n resize: \"both\",\n width: \"100%\",\n },\n\n inputBorderContainer: {\n position: \"absolute\",\n width: \"calc(100% - 4px)\",\n height: \"1px\",\n top: \"31px\",\n left: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n\n \"@global\": {\n \"input:-webkit-autofill\": {\n \"-webkit-box-shadow\": `0 0 0px 1000px ${theme.hv.palette.atmosphere.atmo1} inset`,\n \"-webkit-text-fill-color\": theme.hv.typography.normalText.color,\n },\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,aAAT,QAA8B,iBAA9B;;AAEA,IAAMC,M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W;MAFlC;IADjB;EA7Lc,CAAZ;AAAA,CAAf;;AAqMA,eAAenD,MAAf"}
|
|
1
|
+
{"version":3,"file":"styles.js","names":["outlineStyles","styles","theme","root","display","width","position","overflow","border","hv","palette","accent","acce1","backgroundColor","resizable","readOnly","disabled","atmosphere","atmo4","atmo3","invalid","semantic","sema4","inputRoot","margin","borderRadius","atmo1","inputRootFocused","background","inputRootDisabled","cursor","inputRootMultiline","padding","height","minHeight","marginLeft","marginRight","input","spacing","xs","typography","normalText","textOverflow","outline","placeholderText","opacity","flexGrow","inputDisabled","color","atmo5","inputResizable","resize","inputBorderContainer","top","left"],"sources":["../../../src/BaseInput/styles.js"],"sourcesContent":["import { outlineStyles } from \"../Focus/styles\";\n\nconst styles = (theme) => ({\n root: {\n display: \"inline-block\",\n width: \"100%\",\n position: \"relative\",\n \"& $inputRootMultiline\": {\n overflow: \"auto\",\n border: \"none\",\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"&:focus-within $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.accent.acce1}`,\n },\n },\n },\n resizable: {\n width: \"auto\",\n },\n readOnly: {\n \"& $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n \"&:focus-within $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n\n // multiline\n \"& $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: \"1px solid transparent\",\n },\n },\n },\n disabled: {\n \"& $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n \"& $inputRootMultiline\": {\n \"& $input\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n },\n },\n },\n invalid: {\n \"&:not($disabled)\": {\n \"& $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.semantic.sema4,\n },\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.hv.palette.semantic.sema4,\n },\n \"& $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.semantic.sema4}`,\n },\n },\n },\n },\n\n inputRoot: {\n margin: 0,\n width: \"100%\",\n borderRadius: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n },\n inputRootFocused: {\n background: theme.hv.palette.atmosphere.atmo1,\n ...outlineStyles,\n \"&:hover\": {\n background: theme.hv.palette.atmosphere.atmo1,\n },\n },\n inputRootDisabled: {\n background: theme.hv.palette.atmosphere.atmo3,\n \"&:hover\": {\n background: theme.hv.palette.atmosphere.atmo3,\n cursor: \"not-allowed\",\n },\n cursor: \"not-allowed\",\n },\n inputRootMultiline: {\n padding: 0,\n backgroundColor: \"transparent\",\n \"& $input\": {\n border: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n borderRadius: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n height: \"auto\",\n minHeight: \"21px\",\n padding: \"5px 10px\",\n overflow: \"auto\",\n marginLeft: \"0px\",\n marginRight: \"0px\",\n },\n },\n\n input: {\n height: \"21px\",\n marginLeft: theme.hv.spacing.xs,\n marginRight: theme.hv.spacing.xs,\n padding: \"6px 0 5px\",\n ...theme.hv.typography.normalText,\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n outline: \"none\",\n \"&::placeholder\": {\n ...theme.hv.typography.placeholderText,\n opacity: 1,\n },\n \"&::-ms-clear\": {\n display: \"none\",\n },\n width: \"initial\",\n flexGrow: 1,\n },\n inputDisabled: {\n color: theme.hv.palette.atmosphere.atmo5,\n },\n inputResizable: {\n resize: \"both\",\n width: \"100%\",\n },\n\n inputBorderContainer: {\n position: \"absolute\",\n width: \"calc(100% - 4px)\",\n height: \"1px\",\n top: \"31px\",\n left: \"2px\",\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n\n \"@global\": {\n \"input:-webkit-autofill\": {\n \"-webkit-box-shadow\": `0 0 0px 1000px ${theme.hv.palette.atmosphere.atmo1} inset`,\n \"-webkit-text-fill-color\": theme.hv.typography.normalText.color,\n },\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,aAAT,QAA8B,iBAA9B;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAE,cADL;MAEJC,KAAK,EAAE,MAFH;MAGJC,QAAQ,EAAE,UAHN;MAIJ,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CAAf;;AAwMA,eAAe/C,MAAf"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StandardProps } from "@material-ui/core";
|
|
2
|
+
import { HvPlotProps } from "./Plot";
|
|
3
|
+
|
|
4
|
+
export type HvChartClassKey = "root";
|
|
5
|
+
|
|
6
|
+
export interface HvChartProps extends StandardProps<HvPlotProps, HvChartClassKey> {
|
|
7
|
+
/**
|
|
8
|
+
* Defines if should use a single or multiline tooltip.
|
|
9
|
+
*/
|
|
10
|
+
tooltipType?: "single" | "multiple";
|
|
11
|
+
/**
|
|
12
|
+
* Defines the X axis title.
|
|
13
|
+
*/
|
|
14
|
+
xAxisTitle?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Defines the Y axis title.
|
|
17
|
+
*/
|
|
18
|
+
yAxisTitle?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Defines the chart subtitle.
|
|
21
|
+
*/
|
|
22
|
+
subtitle?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default function HvChart(props: HvChartProps): JSX.Element | null;
|