@hitachivantara/uikit-react-core 3.66.2 → 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.
Files changed (85) hide show
  1. package/dist/BaseInput/BaseInput.js +6 -1
  2. package/dist/BaseInput/BaseInput.js.map +1 -1
  3. package/dist/BaseInput/styles.js +3 -0
  4. package/dist/BaseInput/styles.js.map +1 -1
  5. package/dist/FilterGroup/FilterGroup.d.ts +3 -3
  6. package/dist/Forms/FormElement/index.d.ts +4 -0
  7. package/dist/Forms/FormElement/index.js +14 -0
  8. package/dist/Forms/FormElement/index.js.map +1 -1
  9. package/dist/Slider/Slider.d.ts +185 -0
  10. package/dist/Slider/Slider.js +803 -0
  11. package/dist/Slider/Slider.js.map +1 -0
  12. package/dist/Slider/SliderInput/SliderInput.js +194 -0
  13. package/dist/Slider/SliderInput/SliderInput.js.map +1 -0
  14. package/dist/Slider/SliderInput/index.d.ts +1 -0
  15. package/dist/Slider/SliderInput/index.js +16 -0
  16. package/dist/Slider/SliderInput/index.js.map +1 -0
  17. package/dist/Slider/SliderInput/styles.js +24 -0
  18. package/dist/Slider/SliderInput/styles.js.map +1 -0
  19. package/dist/Slider/index.d.ts +2 -0
  20. package/dist/Slider/index.js +16 -0
  21. package/dist/Slider/index.js.map +1 -0
  22. package/dist/Slider/styles.js +238 -0
  23. package/dist/Slider/styles.js.map +1 -0
  24. package/dist/Slider/utils.js +413 -0
  25. package/dist/Slider/utils.js.map +1 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.js +9 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/legacy/BaseInput/BaseInput.js +6 -1
  30. package/dist/legacy/BaseInput/BaseInput.js.map +1 -1
  31. package/dist/legacy/BaseInput/styles.js +3 -0
  32. package/dist/legacy/BaseInput/styles.js.map +1 -1
  33. package/dist/legacy/FilterGroup/FilterGroup.d.ts +3 -3
  34. package/dist/legacy/Forms/FormElement/index.d.ts +4 -0
  35. package/dist/legacy/Forms/FormElement/index.js +1 -0
  36. package/dist/legacy/Forms/FormElement/index.js.map +1 -1
  37. package/dist/legacy/Slider/Slider.d.ts +185 -0
  38. package/dist/legacy/Slider/Slider.js +752 -0
  39. package/dist/legacy/Slider/Slider.js.map +1 -0
  40. package/dist/legacy/Slider/SliderInput/SliderInput.js +151 -0
  41. package/dist/legacy/Slider/SliderInput/SliderInput.js.map +1 -0
  42. package/dist/legacy/Slider/SliderInput/index.d.ts +1 -0
  43. package/dist/legacy/Slider/SliderInput/index.js +2 -0
  44. package/dist/legacy/Slider/SliderInput/index.js.map +1 -0
  45. package/dist/legacy/Slider/SliderInput/styles.js +16 -0
  46. package/dist/legacy/Slider/SliderInput/styles.js.map +1 -0
  47. package/dist/legacy/Slider/index.d.ts +2 -0
  48. package/dist/legacy/Slider/index.js +2 -0
  49. package/dist/legacy/Slider/index.js.map +1 -0
  50. package/dist/legacy/Slider/styles.js +221 -0
  51. package/dist/legacy/Slider/styles.js.map +1 -0
  52. package/dist/legacy/Slider/utils.js +347 -0
  53. package/dist/legacy/Slider/utils.js.map +1 -0
  54. package/dist/legacy/index.d.ts +3 -0
  55. package/dist/legacy/index.js +1 -0
  56. package/dist/legacy/index.js.map +1 -1
  57. package/dist/modern/BaseInput/BaseInput.js +6 -1
  58. package/dist/modern/BaseInput/BaseInput.js.map +1 -1
  59. package/dist/modern/BaseInput/styles.js +3 -0
  60. package/dist/modern/BaseInput/styles.js.map +1 -1
  61. package/dist/modern/FilterGroup/FilterGroup.d.ts +3 -3
  62. package/dist/modern/Forms/FormElement/index.d.ts +4 -0
  63. package/dist/modern/Forms/FormElement/index.js +1 -0
  64. package/dist/modern/Forms/FormElement/index.js.map +1 -1
  65. package/dist/modern/Slider/Slider.d.ts +185 -0
  66. package/dist/modern/Slider/Slider.js +689 -0
  67. package/dist/modern/Slider/Slider.js.map +1 -0
  68. package/dist/modern/Slider/SliderInput/SliderInput.js +129 -0
  69. package/dist/modern/Slider/SliderInput/SliderInput.js.map +1 -0
  70. package/dist/modern/Slider/SliderInput/index.d.ts +1 -0
  71. package/dist/modern/Slider/SliderInput/index.js +2 -0
  72. package/dist/modern/Slider/SliderInput/index.js.map +1 -0
  73. package/dist/modern/Slider/SliderInput/styles.js +16 -0
  74. package/dist/modern/Slider/SliderInput/styles.js.map +1 -0
  75. package/dist/modern/Slider/index.d.ts +2 -0
  76. package/dist/modern/Slider/index.js +2 -0
  77. package/dist/modern/Slider/index.js.map +1 -0
  78. package/dist/modern/Slider/styles.js +214 -0
  79. package/dist/modern/Slider/styles.js.map +1 -0
  80. package/dist/modern/Slider/utils.js +302 -0
  81. package/dist/modern/Slider/utils.js.map +1 -0
  82. package/dist/modern/index.d.ts +3 -0
  83. package/dist/modern/index.js +1 -0
  84. package/dist/modern/index.js.map +1 -1
  85. package/package.json +4 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["styles","theme","ring","width","height","borderRadius","border","hv","palette","accent","acce1","opacity","content","position","top","left","atmosphere","atmo1","dragSquare","cursor","background","borderTop","atmo3","borderBottom","zIndex","dot","bottom","marginLeft","backgroundColor","atmo4","verticalAlign","root","rootDisabled","sliderContainer","marginBottom","padding","error","trackDragging","trackStandBy","sliderRoot","rootRange","handleContainer","marginTop","handle","handleContainerDisabled","handleHiddenContainer","display","labelContainer","alignItems","justifyContent","marginRight","labelIncluded","onlyInput","label","dotDisabled","rail","knobInner","borderColor","boxShadow","knobOuter","knobHidden","knobHiddenLast","touchAction","track","mark","typography","vizText","fontFamily","disabledMark","color","atmo5","sliderTooltip","maxWidth","spacing","sm","normalText","visibility"],"sources":["../../src/Slider/styles.js"],"sourcesContent":["const styles = (theme) => {\n const ring = {\n width: \"32px\",\n height: \"32px\",\n borderRadius: \"50%\",\n border: `9px solid ${theme.hv.palette.accent.acce1}`,\n opacity: \"20%\",\n content: \"''\",\n position: \"absolute\",\n top: \"-10px\",\n left: \"-10px\",\n };\n const border = {\n width: \"20px\",\n height: \"20px\",\n borderRadius: \"50%\",\n border: `2px solid ${theme.hv.palette.atmosphere.atmo1}`,\n content: \"''\",\n position: \"absolute\",\n top: \"-4px\",\n left: \"-4px\",\n };\n const dragSquare = {\n cursor: \"grab\",\n width: \"calc(100% - 40px)\",\n left: \"20px\",\n height: \"27px\",\n position: \"absolute\",\n top: \"-12px\",\n content: \"''\",\n background: \"transparent\",\n borderTop: `12px solid ${theme.hv.palette.atmosphere.atmo3}`,\n borderBottom: `12px solid ${theme.hv.palette.atmosphere.atmo3}`,\n zIndex: \"-2\",\n };\n const dot = {\n position: \"absolute\",\n bottom: \"-1px\",\n marginLeft: \"0px\",\n width: \"1px\",\n height: \"4px\",\n border: \"none\",\n borderRadius: \"0%\",\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n cursor: \"pointer\",\n verticalAlign: \"middle\",\n zIndex: \"-3\",\n };\n\n return {\n root: {},\n rootDisabled: {\n cursor: \"not-allowed\",\n \"& .rc-slider-disabled\": {\n background: \"transparent\",\n },\n },\n sliderContainer: {\n marginBottom: \"18px\",\n padding: \"0 23px\",\n },\n error: {\n padding: \"0 8px\",\n },\n trackDragging: {\n cursor: \"grabbing\",\n \"& .rc-slider-track\": {\n \"&::before\": {\n ...dragSquare,\n cursor: \"grabbing\",\n },\n },\n },\n trackStandBy: {\n \"& .rc-slider-track\": {\n \"&:hover\": {\n \"&::before\": {\n ...dragSquare,\n },\n },\n },\n },\n sliderRoot: {\n zIndex: 0,\n },\n rootRange: {},\n handleContainer: {\n \"& .rc-slider-handle\": {\n cursor: \"pointer\",\n marginTop: \"-8px\",\n opacity: 1,\n \"&:active\": {\n cursor: \"grab\",\n \"&::before\": {\n ...ring,\n },\n \"&::after\": {\n ...border,\n },\n },\n \"&:hover\": {\n \"&::before\": {\n ...ring,\n },\n \"&::after\": {\n ...border,\n },\n },\n },\n },\n handle: {},\n handleContainerDisabled: {\n \"& .rc-slider-handle\": {\n cursor: \"not-allowed\",\n marginTop: \"-8px\",\n \"&:active\": {\n cursor: \"not-allowed\",\n },\n \"&:hover\": {\n cursor: \"not-allowed\",\n },\n },\n },\n handleHiddenContainer: {\n display: \"none\",\n },\n labelContainer: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n marginBottom: \"12px\",\n marginLeft: \"20px\",\n marginRight: \"20px\",\n },\n labelIncluded: {\n justifyContent: \"space-between\",\n },\n onlyInput: {\n justifyContent: \"flex-end\",\n },\n label: {},\n dot: {\n ...dot,\n },\n dotDisabled: {\n ...dot,\n cursor: \"not-allowed\",\n },\n rail: {\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n height: \"1px\",\n zIndex: \"-3\",\n },\n knobInner: {\n borderColor: \"transparent\",\n boxShadow: \"none\",\n backgroundColor: theme.hv.palette.accent.acce1,\n width: \"16px\",\n height: \"16px\",\n },\n knobOuter: {\n position: \"relative\",\n borderColor: \"transparent\",\n borderRadius: \"50%\",\n boxShadow: \"none\",\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n width: \"32px\",\n height: \"32px\",\n top: \"-80%\",\n left: \"-80%\",\n zIndex: \"-1\",\n },\n knobHidden: {\n display: \"none\",\n },\n knobHiddenLast: {\n borderColor: \"transparent\",\n height: \"3px\",\n width: \"2px\",\n marginLeft: \"-1px\",\n border: \"none\",\n borderRadius: \"0\",\n marginTop: \"0px\",\n left: \"100%\",\n touchAction: \"none\",\n cursor: \"default\",\n },\n track: {\n backgroundColor: theme.hv.palette.accent.acce1,\n height: \"3px\",\n zIndex: \"-1\",\n marginTop: \"-1px\",\n },\n mark: {\n ...theme.hv.typography.vizText,\n fontFamily: theme.hv.typography.fontFamily,\n top: \"-2px\",\n },\n disabledMark: {\n ...theme.hv.typography.vizText,\n fontFamily: theme.hv.typography.fontFamily,\n color: `${theme.hv.palette.atmosphere.atmo5}`,\n cursor: \"not-allowed\",\n top: \"-2px\",\n },\n sliderTooltip: {\n \"& .rc-slider-tooltip-inner\": {\n background: theme.hv.palette.atmosphere.atmo1,\n borderRadius: 0,\n maxWidth: \"532px\",\n height: \"100%\",\n padding: `${theme.hv.spacing.sm}px`,\n ...theme.hv.typography.normalText,\n fontFamily: theme.hv.typography.fontFamily,\n boxShadow: \"none\",\n },\n \"& .rc-slider-tooltip-arrow\": {\n visibility: \"hidden\",\n },\n },\n };\n};\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD,EAAW;EACxB,IAAMC,IAAI,GAAG;IACXC,KAAK,EAAE,MADI;IAEXC,MAAM,EAAE,MAFG;IAGXC,YAAY,EAAE,KAHH;IAIXC,MAAM,sBAAeL,KAAK,CAACM,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC,KAAvC,CAJK;IAKXC,OAAO,EAAE,KALE;IAMXC,OAAO,EAAE,IANE;IAOXC,QAAQ,EAAE,UAPC;IAQXC,GAAG,EAAE,OARM;IASXC,IAAI,EAAE;EATK,CAAb;EAWA,IAAMT,MAAM,GAAG;IACbH,KAAK,EAAE,MADM;IAEbC,MAAM,EAAE,MAFK;IAGbC,YAAY,EAAE,KAHD;IAIbC,MAAM,sBAAeL,KAAK,CAACM,EAAN,CAASC,OAAT,CAAiBQ,UAAjB,CAA4BC,KAA3C,CAJO;IAKbL,OAAO,EAAE,IALI;IAMbC,QAAQ,EAAE,UANG;IAObC,GAAG,EAAE,MAPQ;IAQbC,IAAI,EAAE;EARO,CAAf;EAUA,IAAMG,UAAU,GAAG;IACjBC,MAAM,EAAE,MADS;IAEjBhB,KAAK,EAAE,mBAFU;IAGjBY,IAAI,EAAE,MAHW;IAIjBX,MAAM,EAAE,MAJS;IAKjBS,QAAQ,EAAE,UALO;IAMjBC,GAAG,EAAE,OANY;IAOjBF,OAAO,EAAE,IAPQ;IAQjBQ,UAAU,EAAE,aARK;IASjBC,SAAS,uBAAgBpB,KAAK,CAACM,EAAN,CAASC,OAAT,CAAiBQ,UAAjB,CAA4BM,KAA5C,CATQ;IAUjB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;MACb;QACEnD,UAAU,EAAEnB,KAAK,CAACM,EAAN,CAASC,OAAT,CAAiBQ,UAAjB,CAA4BC,KAD1C;QAEEZ,YAAY,EAAE,CAFhB;QAGEmE,QAAQ,EAAE,OAHZ;QAIEpE,MAAM,EAAE,MAJV;QAKE+B,OAAO,YAAKlC,KAAK,CAACM,EAAN,CAASkE,OAAT,CAAiBC,EAAtB;MALT,GAMKzE,KAAK,CAACM,EAAN,CAAS0D,UAAT,CAAoBU,UANzB;QAOER,UAAU,EAAElE,KAAK,CAACM,EAAN,CAAS0D,UAAT,CAAoBE,UAPlC;QAQET,SAAS,EAAE;MARb,EADa;MAWb,8BAA8B;QAC5BkB,UAAU,EAAE;MADgB;IAXjB;EA5JV,CAAP;AA4KD,CA7ND;;eA+Ne5E,M"}
@@ -0,0 +1,413 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.keys.js");
4
+
5
+ require("core-js/modules/es.symbol.js");
6
+
7
+ require("core-js/modules/es.array.filter.js");
8
+
9
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
10
+
11
+ require("core-js/modules/es.object.get-own-property-descriptors.js");
12
+
13
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
14
+
15
+ Object.defineProperty(exports, "__esModule", {
16
+ value: true
17
+ });
18
+ exports.stringValuesToKnobs = exports.statusArrayToFormStatus = exports.scaledValueToKnobsPositionValue = exports.knobsValuesToString = exports.knobsValuesToKnobsPositions = exports.knobsPositionsToKnobsValues = exports.knobsPositionToScaledValue = exports.isSingleSlider = exports.generateDefaultKnobProperties = exports.ensureValuesConsistency = exports.createTrackStyles = exports.createMark = exports.createKnobStyles = exports.convertStatusToArray = exports.calculateStepValue = void 0;
19
+
20
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
21
+
22
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
23
+
24
+ require("core-js/modules/es.object.to-string.js");
25
+
26
+ require("core-js/modules/web.dom-collections.for-each.js");
27
+
28
+ require("core-js/modules/es.number.to-fixed.js");
29
+
30
+ require("core-js/modules/es.array.slice.js");
31
+
32
+ require("core-js/modules/es.array.map.js");
33
+
34
+ require("core-js/modules/es.number.is-nan.js");
35
+
36
+ require("core-js/modules/es.number.constructor.js");
37
+
38
+ require("core-js/modules/es.array.from.js");
39
+
40
+ require("core-js/modules/es.string.iterator.js");
41
+
42
+ var _validationStates = _interopRequireDefault(require("../Forms/FormElement/validationStates"));
43
+
44
+ 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; }
45
+
46
+ 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) { (0, _defineProperty2.default)(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; }
47
+
48
+ /**
49
+ * Transform the scaled values into knobs positions.
50
+ *
51
+ * @param {*} sliderValue - the value of the slider to be scaled
52
+ * @param {*} minPointVlue - The value of the first point in the slider from left to right.
53
+ * @param {*} stepVlue - The calculated separation between the values of the slider.
54
+ */
55
+ var knobsPositionToScaledValue = function knobsPositionToScaledValue(sliderValue, minPointVlue, stepVlue) {
56
+ return minPointVlue + stepVlue * sliderValue;
57
+ };
58
+ /**
59
+ * Transform the scaled values into knobs positions.
60
+ *
61
+ * @param {*} scaledValue - the value of the slider to be scaled
62
+ * @param {*} minPointValue - The value of the first point in
63
+ * the slider from left to right.
64
+ * @param {*} inverseStepValue - The inverse of calculated separation between
65
+ * the value of the points that compose the slider.
66
+ */
67
+
68
+
69
+ exports.knobsPositionToScaledValue = knobsPositionToScaledValue;
70
+
71
+ var scaledValueToKnobsPositionValue = function scaledValueToKnobsPositionValue(scaledValue, minPointValue, inverseStepValue) {
72
+ return Math.floor((scaledValue - minPointValue) * inverseStepValue);
73
+ };
74
+ /**
75
+ * Transform the received knobs values into knob positions
76
+ *
77
+ * @param {Object} values - The values of the slider.
78
+ * @param {Number} inverseStepValue - The inverse of calculated separation between
79
+ * the value of the points that compose the slider.
80
+ * @param {Integer} minPointValue - The value of the first point in the slider from
81
+ * left to right.
82
+ * @returns {Array} - The position of the knobs.
83
+ */
84
+
85
+
86
+ exports.scaledValueToKnobsPositionValue = scaledValueToKnobsPositionValue;
87
+
88
+ var knobsValuesToKnobsPositions = function knobsValuesToKnobsPositions(values, inverseStepValue, minPointValue) {
89
+ var knobsPositions = [];
90
+ values.forEach(function (value, index) {
91
+ knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);
92
+ });
93
+ return knobsPositions;
94
+ };
95
+ /**
96
+ * Transform the received knobs positions into knob values
97
+ *
98
+ * @param {Object} knobPositions - The values of the slider.
99
+ * @param {Number} stepValue - The calculated separation between
100
+ * the value of the points that compose the slider.
101
+ * @param {Integer} minPointValue - The value of the first point in the slider from
102
+ * left to right.
103
+ * @returns {Array} - The position of the knobs.
104
+ */
105
+
106
+
107
+ exports.knobsValuesToKnobsPositions = knobsValuesToKnobsPositions;
108
+
109
+ var knobsPositionsToKnobsValues = function knobsPositionsToKnobsValues(knobPositions, stepValue, minPointValue) {
110
+ var knobsValues = [];
111
+ knobPositions.forEach(function (value, index) {
112
+ knobsValues[index] = knobsPositionToScaledValue(value, minPointValue, stepValue);
113
+ });
114
+ return knobsValues;
115
+ };
116
+ /**
117
+ * Calculates the separation between each value in the slider.
118
+ *
119
+ * @param {*} maxPointValue - The value of the last point in the slider from left to right.
120
+ * @param {*} minPointValue - The value of the first point in the slider from left to right.
121
+ * @param {*} divisionQuantity - How many subdivisions there are in the slider.
122
+ */
123
+
124
+
125
+ exports.knobsPositionsToKnobsValues = knobsPositionsToKnobsValues;
126
+
127
+ var calculateStepValue = function calculateStepValue(maxPointValue, minPointValue, divisionQuantity) {
128
+ return Math.abs(maxPointValue - minPointValue) / divisionQuantity;
129
+ };
130
+ /**
131
+ * Generates the inline styles used for the track of each knob, applying colors if necessary.
132
+ *
133
+ * @param {Object} markProperties - The object provided by the user with
134
+ * the desired configuration for the marks.
135
+ * @param {Integer} markstep - The separation between marks.
136
+ * @param {Integer} divisionQuantity - How many subdivisions there are in the slider.
137
+ * @param {Integer} minPointValue - The value of the first point in the slider from
138
+ * left to right.
139
+ * @param {Integer} stepValue - The calculated separation between the values of the slider.
140
+ * @param {Integer} markDigits - How many decimals the mark will show.
141
+ * @param {Function} formatMark - A function provided by the user that is going to
142
+ * be executed to format the mark text.
143
+ * @param {Object} styles - the default styles for the marks.
144
+ * @returns {Object} - An object with the for the marks.
145
+ * @memberof HvSlider
146
+ */
147
+
148
+
149
+ exports.calculateStepValue = calculateStepValue;
150
+
151
+ var createMark = function createMark(markProperties, markstep, divisionQuantity, minPointValue, stepValue, markDigits) {
152
+ var formatMark = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : function (mark) {
153
+ return mark;
154
+ };
155
+ var disabled = arguments.length > 7 ? arguments[7] : undefined;
156
+ var styles = arguments.length > 8 ? arguments[8] : undefined;
157
+ var marks = {};
158
+
159
+ if (markProperties.length > 0) {
160
+ markProperties.forEach(function (markProperty) {
161
+ marks[markProperty.position] = disabled ? {
162
+ label: "".concat(markProperty.label),
163
+ style: _objectSpread({}, styles.disabledMark)
164
+ } : {
165
+ label: "".concat(markProperty.label),
166
+ style: _objectSpread({}, styles.mark)
167
+ };
168
+ });
169
+ } else {
170
+ var roundedMarkStep = Math.floor(markstep);
171
+
172
+ for (var index = 0; index <= divisionQuantity; index += roundedMarkStep) {
173
+ var labelValue = knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(markDigits);
174
+ labelValue = (formatMark === null || formatMark === void 0 ? void 0 : formatMark(labelValue)) || labelValue;
175
+ marks[index] = disabled ? {
176
+ label: "".concat(labelValue),
177
+ style: _objectSpread({}, styles.disabledMark)
178
+ } : {
179
+ label: "".concat(labelValue),
180
+ style: _objectSpread({}, styles.mark)
181
+ };
182
+ }
183
+ }
184
+
185
+ return marks;
186
+ };
187
+ /**
188
+ * Generates the inline styles used for the track of each knob, applying colors if necessary.
189
+ *
190
+ * @param {Object} knobProperties - The object provided by the user with
191
+ * the desired configuration for the knobs.
192
+ * @param {Object} styles - the default styles for the tracks.
193
+ * @returns {Object} - An object with the style for each track.
194
+ * @memberof HvSlider
195
+ */
196
+
197
+
198
+ exports.createMark = createMark;
199
+
200
+ var createTrackStyles = function createTrackStyles(knobProperties, styles) {
201
+ var trackStyles = [];
202
+
203
+ if (knobProperties.length > 0) {
204
+ knobProperties.forEach(function (knobProperty, index) {
205
+ trackStyles[index] = _objectSpread({}, styles.track);
206
+
207
+ if (knobProperty.color) {
208
+ trackStyles[index].backgroundColor = knobProperty.trackColor;
209
+ }
210
+ });
211
+ }
212
+
213
+ return trackStyles;
214
+ };
215
+ /**
216
+ * Generates the inline styles used for each knob, applying colors if specified.
217
+ *
218
+ * @param {Object} knobProperties - The object provided by the user with
219
+ * the desired configuration for the knobs.
220
+ * @param {Object} styles - the default styles for the knobs.
221
+ * @returns {Object} - An object with both the inner and outer styles for the knob.
222
+ * @memberof HvSlider
223
+ */
224
+
225
+
226
+ exports.createTrackStyles = createTrackStyles;
227
+
228
+ var createKnobStyles = function createKnobStyles(knobProperties, styles) {
229
+ var knobInner = [];
230
+ var knobOuterStyle = [];
231
+ var lastItem = knobProperties.length - 1;
232
+
233
+ if (knobProperties.length > 0) {
234
+ knobProperties.forEach(function (knobProperty, index) {
235
+ knobInner[index] = _objectSpread({}, styles.knobInner);
236
+ knobOuterStyle[index] = _objectSpread({}, styles.knobOuter);
237
+
238
+ if (knobProperty.color) {
239
+ knobInner[index].backgroundColor = knobProperty.color;
240
+ knobOuterStyle[index].backgroundColor = "transparent";
241
+ }
242
+
243
+ if (knobProperty.hidden) {
244
+ knobInner[index] = styles.knobHidden;
245
+
246
+ if (index === lastItem) {
247
+ knobInner[index] = _objectSpread({}, styles.knobHiddenLast);
248
+ knobInner[index].backgroundColor = knobProperty.color;
249
+ knobOuterStyle[index] = _objectSpread({}, styles.knobHidden);
250
+ knobOuterStyle[index].backgroundColor = knobProperty.color;
251
+ }
252
+ }
253
+ });
254
+ }
255
+
256
+ return {
257
+ knobInner: knobInner,
258
+ knobOuterStyle: knobOuterStyle
259
+ };
260
+ };
261
+ /**
262
+ * Analyzes both the values and the default values to determine whether the slider is working in single mode.
263
+ *
264
+ * @param {Array} values - the values where the knobs are positioned when controlled.
265
+ * @param {Array} defaultValues - the values where the knobs start when uncontrolled.
266
+ * @returns {Boolean} - if true the slider should work as single slider
267
+ */
268
+
269
+
270
+ exports.createKnobStyles = createKnobStyles;
271
+
272
+ var isSingleSlider = function isSingleSlider(values, defaultValues) {
273
+ if (!((values === null || values === void 0 ? void 0 : values.length) > 1)) {
274
+ return defaultValues.length === 1;
275
+ }
276
+
277
+ return values.length === 1;
278
+ };
279
+ /**
280
+ * Generates the default knob styles for each knob
281
+ *
282
+ * @param {Object} knobProperties - The object provided by the user with
283
+ * the desired configuration for the knobs.
284
+ * @param {Integer} numberOfKnobs - the default styles for the knobs.
285
+ * @param {Object} theme - The theme to extract the colors.
286
+ *
287
+ * @returns {Object} - An object with both the inner and outer styles for the knob.
288
+ * @memberof HvSlider
289
+ */
290
+
291
+
292
+ exports.isSingleSlider = isSingleSlider;
293
+
294
+ var generateDefaultKnobProperties = function generateDefaultKnobProperties(knobPropertiesProp) {
295
+ var numberOfKnobs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
296
+ var disabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
297
+ var theme = arguments.length > 3 ? arguments[3] : undefined;
298
+ var knobProperties = knobPropertiesProp || [];
299
+ var defaultKnobStyles = {
300
+ color: theme.hv.palette.accent.acce1,
301
+ hoverColor: theme.hv.palette.accent.acce1,
302
+ trackColor: theme.hv.palette.accent.acce1,
303
+ dragColor: theme.hv.palette.accent.acce1,
304
+ knobRingColor: theme.hv.palette.atmosphere.atmo1
305
+ };
306
+ var disabledKnobStyles = {
307
+ color: theme.hv.palette.atmosphere.atmo5,
308
+ hoverColor: theme.hv.palette.atmosphere.atmo5,
309
+ trackColor: theme.hv.palette.atmosphere.atmo5,
310
+ dragColor: theme.hv.palette.atmosphere.atmo5,
311
+ knobRingColor: theme.hv.palette.atmosphere.atmo5
312
+ };
313
+
314
+ if (knobProperties.length > 0) {
315
+ knobProperties = knobProperties.slice(0, numberOfKnobs);
316
+ knobProperties = knobProperties.map(function (knobProperty) {
317
+ if (!disabled) {
318
+ return _objectSpread(_objectSpread({}, disabledKnobStyles), knobProperty);
319
+ }
320
+
321
+ return _objectSpread(_objectSpread({}, defaultKnobStyles), knobProperty);
322
+ });
323
+ } else {
324
+ for (var i = 0; i < numberOfKnobs; i += 1) {
325
+ if (!disabled) knobProperties.push(defaultKnobStyles);
326
+ if (disabled) knobProperties.push(disabledKnobStyles);
327
+ }
328
+ }
329
+
330
+ return knobProperties;
331
+ };
332
+
333
+ exports.generateDefaultKnobProperties = generateDefaultKnobProperties;
334
+
335
+ var pushSlider = function pushSlider(index, inputIndex, inputValue) {
336
+ var difference = index - inputIndex;
337
+ return inputValue + difference;
338
+ };
339
+
340
+ var ensureValuesConsistency = function ensureValuesConsistency(knobPositions, inputIndex) {
341
+ var newKnobsPosition = (0, _toConsumableArray2.default)(knobPositions); // const valueToTest = newKnobsPosition[index];
342
+
343
+ newKnobsPosition.forEach(function (value, index) {
344
+ if (Number.isNaN(value) || value == null) {
345
+ newKnobsPosition[index] = pushSlider(index, inputIndex, newKnobsPosition[inputIndex]);
346
+ } else if (index < inputIndex && value > newKnobsPosition[inputIndex]) {
347
+ newKnobsPosition[index] = pushSlider(index, inputIndex, newKnobsPosition[inputIndex]);
348
+ } else if (index > inputIndex && value < newKnobsPosition[inputIndex]) {
349
+ newKnobsPosition[index] = pushSlider(index, inputIndex, newKnobsPosition[inputIndex]);
350
+ }
351
+ });
352
+ return newKnobsPosition;
353
+ };
354
+
355
+ exports.ensureValuesConsistency = ensureValuesConsistency;
356
+
357
+ var convertStatusToArray = function convertStatusToArray(status, length) {
358
+ var result = {};
359
+ result.arrayDefaultStatus = Array.from({
360
+ length: length
361
+ }, function () {
362
+ return _validationStates.default.standBy;
363
+ });
364
+
365
+ if (status == null) {
366
+ return result;
367
+ }
368
+
369
+ if (!Array.isArray(status)) {
370
+ result.arrayStatus = Array.from({
371
+ length: length
372
+ }, function () {
373
+ return status;
374
+ });
375
+ return result;
376
+ }
377
+
378
+ result.arrayStatus = status;
379
+ return result;
380
+ };
381
+
382
+ exports.convertStatusToArray = convertStatusToArray;
383
+
384
+ var statusArrayToFormStatus = function statusArrayToFormStatus(arrayStatus) {
385
+ var invalid = arrayStatus.some(function (status) {
386
+ return status === _validationStates.default.invalid;
387
+ });
388
+ if (invalid) return _validationStates.default.invalid;
389
+ var valid = arrayStatus.some(function (status) {
390
+ return status === _validationStates.default.valid;
391
+ });
392
+ if (valid) return _validationStates.default.valid;
393
+ return _validationStates.default.standBy;
394
+ };
395
+
396
+ exports.statusArrayToFormStatus = statusArrayToFormStatus;
397
+
398
+ var knobsValuesToString = function knobsValuesToString(knobsValues, markDigits) {
399
+ return knobsValues.map(function (knobValue) {
400
+ return Number.isNaN(knobValue) ? "" : knobValue.toFixed(markDigits);
401
+ });
402
+ };
403
+
404
+ exports.knobsValuesToString = knobsValuesToString;
405
+
406
+ var stringValuesToKnobs = function stringValuesToKnobs(inputsValues) {
407
+ return inputsValues.map(function (inputValue) {
408
+ return parseFloat(inputValue);
409
+ });
410
+ };
411
+
412
+ exports.stringValuesToKnobs = stringValuesToKnobs;
413
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":["knobsPositionToScaledValue","sliderValue","minPointVlue","stepVlue","scaledValueToKnobsPositionValue","scaledValue","minPointValue","inverseStepValue","Math","floor","knobsValuesToKnobsPositions","values","knobsPositions","forEach","value","index","knobsPositionsToKnobsValues","knobPositions","stepValue","knobsValues","calculateStepValue","maxPointValue","divisionQuantity","abs","createMark","markProperties","markstep","markDigits","formatMark","mark","disabled","styles","marks","length","markProperty","position","label","style","disabledMark","roundedMarkStep","labelValue","toFixed","createTrackStyles","knobProperties","trackStyles","knobProperty","track","color","backgroundColor","trackColor","createKnobStyles","knobInner","knobOuterStyle","lastItem","knobOuter","hidden","knobHidden","knobHiddenLast","isSingleSlider","defaultValues","generateDefaultKnobProperties","knobPropertiesProp","numberOfKnobs","theme","defaultKnobStyles","hv","palette","accent","acce1","hoverColor","dragColor","knobRingColor","atmosphere","atmo1","disabledKnobStyles","atmo5","slice","map","i","push","pushSlider","inputIndex","inputValue","difference","ensureValuesConsistency","newKnobsPosition","Number","isNaN","convertStatusToArray","status","result","arrayDefaultStatus","Array","from","validationStates","standBy","isArray","arrayStatus","statusArrayToFormStatus","invalid","some","valid","knobsValuesToString","knobValue","stringValuesToKnobs","inputsValues","parseFloat"],"sources":["../../src/Slider/utils.js"],"sourcesContent":["import validationStates from \"../Forms/FormElement/validationStates\";\n\n/**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} sliderValue - the value of the slider to be scaled\n * @param {*} minPointVlue - The value of the first point in the slider from left to right.\n * @param {*} stepVlue - The calculated separation between the values of the slider.\n */\nexport const knobsPositionToScaledValue = (sliderValue, minPointVlue, stepVlue) =>\n minPointVlue + stepVlue * sliderValue;\n\n/**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} scaledValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in\n * the slider from left to right.\n * @param {*} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n */\nexport const scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) =>\n Math.floor((scaledValue - minPointValue) * inverseStepValue);\n\n/**\n * Transform the received knobs values into knob positions\n *\n * @param {Object} values - The values of the slider.\n * @param {Number} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @returns {Array} - The position of the knobs.\n */\nexport const knobsValuesToKnobsPositions = (values, inverseStepValue, minPointValue) => {\n const knobsPositions = [];\n values.forEach((value, index) => {\n knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);\n });\n return knobsPositions;\n};\n\n/**\n * Transform the received knobs positions into knob values\n *\n * @param {Object} knobPositions - The values of the slider.\n * @param {Number} stepValue - The calculated separation between\n * the value of the points that compose the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @returns {Array} - The position of the knobs.\n */\nexport const knobsPositionsToKnobsValues = (knobPositions, stepValue, minPointValue) => {\n const knobsValues = [];\n knobPositions.forEach((value, index) => {\n knobsValues[index] = knobsPositionToScaledValue(value, minPointValue, stepValue);\n });\n return knobsValues;\n};\n\n/**\n * Calculates the separation between each value in the slider.\n *\n * @param {*} maxPointValue - The value of the last point in the slider from left to right.\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} divisionQuantity - How many subdivisions there are in the slider.\n */\nexport const calculateStepValue = (maxPointValue, minPointValue, divisionQuantity) =>\n Math.abs(maxPointValue - minPointValue) / divisionQuantity;\n\n/**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} markProperties - The object provided by the user with\n * the desired configuration for the marks.\n * @param {Integer} markstep - The separation between marks.\n * @param {Integer} divisionQuantity - How many subdivisions there are in the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @param {Integer} stepValue - The calculated separation between the values of the slider.\n * @param {Integer} markDigits - How many decimals the mark will show.\n * @param {Function} formatMark - A function provided by the user that is going to\n * be executed to format the mark text.\n * @param {Object} styles - the default styles for the marks.\n * @returns {Object} - An object with the for the marks.\n * @memberof HvSlider\n */\nexport const createMark = (\n markProperties,\n markstep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark = (mark) => mark,\n disabled,\n styles\n) => {\n const marks = {};\n if (markProperties.length > 0) {\n markProperties.forEach((markProperty) => {\n marks[markProperty.position] = disabled\n ? {\n label: `${markProperty.label}`,\n style: {\n ...styles.disabledMark,\n },\n }\n : {\n label: `${markProperty.label}`,\n style: {\n ...styles.mark,\n },\n };\n });\n } else {\n const roundedMarkStep = Math.floor(markstep);\n for (let index = 0; index <= divisionQuantity; index += roundedMarkStep) {\n let labelValue = knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(\n markDigits\n );\n labelValue = formatMark?.(labelValue) || labelValue;\n marks[index] = disabled\n ? {\n label: `${labelValue}`,\n style: {\n ...styles.disabledMark,\n },\n }\n : {\n label: `${labelValue}`,\n style: {\n ...styles.mark,\n },\n };\n }\n }\n return marks;\n};\n\n/**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the tracks.\n * @returns {Object} - An object with the style for each track.\n * @memberof HvSlider\n */\nexport const createTrackStyles = (knobProperties, styles) => {\n const trackStyles = [];\n if (knobProperties.length > 0) {\n knobProperties.forEach((knobProperty, index) => {\n trackStyles[index] = { ...styles.track };\n if (knobProperty.color) {\n trackStyles[index].backgroundColor = knobProperty.trackColor;\n }\n });\n }\n return trackStyles;\n};\n\n/**\n * Generates the inline styles used for each knob, applying colors if specified.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the knobs.\n * @returns {Object} - An object with both the inner and outer styles for the knob.\n * @memberof HvSlider\n */\nexport const createKnobStyles = (knobProperties, styles) => {\n const knobInner = [];\n const knobOuterStyle = [];\n\n const lastItem = knobProperties.length - 1;\n if (knobProperties.length > 0) {\n knobProperties.forEach((knobProperty, index) => {\n knobInner[index] = { ...styles.knobInner };\n knobOuterStyle[index] = { ...styles.knobOuter };\n\n if (knobProperty.color) {\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index].backgroundColor = \"transparent\";\n }\n\n if (knobProperty.hidden) {\n knobInner[index] = styles.knobHidden;\n if (index === lastItem) {\n knobInner[index] = { ...styles.knobHiddenLast };\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index] = { ...styles.knobHidden };\n knobOuterStyle[index].backgroundColor = knobProperty.color;\n }\n }\n });\n }\n\n return {\n knobInner,\n knobOuterStyle,\n };\n};\n\n/**\n * Analyzes both the values and the default values to determine whether the slider is working in single mode.\n *\n * @param {Array} values - the values where the knobs are positioned when controlled.\n * @param {Array} defaultValues - the values where the knobs start when uncontrolled.\n * @returns {Boolean} - if true the slider should work as single slider\n */\nexport const isSingleSlider = (values, defaultValues) => {\n if (!(values?.length > 1)) {\n return defaultValues.length === 1;\n }\n return values.length === 1;\n};\n\n/**\n * Generates the default knob styles for each knob\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Integer} numberOfKnobs - the default styles for the knobs.\n * @param {Object} theme - The theme to extract the colors.\n *\n * @returns {Object} - An object with both the inner and outer styles for the knob.\n * @memberof HvSlider\n */\nexport const generateDefaultKnobProperties = (\n knobPropertiesProp,\n numberOfKnobs = 1,\n disabled = false,\n theme\n) => {\n let knobProperties = knobPropertiesProp || [];\n const defaultKnobStyles = {\n color: theme.hv.palette.accent.acce1,\n hoverColor: theme.hv.palette.accent.acce1,\n trackColor: theme.hv.palette.accent.acce1,\n dragColor: theme.hv.palette.accent.acce1,\n knobRingColor: theme.hv.palette.atmosphere.atmo1,\n };\n\n const disabledKnobStyles = {\n color: theme.hv.palette.atmosphere.atmo5,\n hoverColor: theme.hv.palette.atmosphere.atmo5,\n trackColor: theme.hv.palette.atmosphere.atmo5,\n dragColor: theme.hv.palette.atmosphere.atmo5,\n knobRingColor: theme.hv.palette.atmosphere.atmo5,\n };\n\n if (knobProperties.length > 0) {\n knobProperties = knobProperties.slice(0, numberOfKnobs);\n knobProperties = knobProperties.map((knobProperty) => {\n if (!disabled) {\n return {\n ...disabledKnobStyles,\n ...knobProperty,\n };\n }\n return {\n ...defaultKnobStyles,\n ...knobProperty,\n };\n });\n } else {\n for (let i = 0; i < numberOfKnobs; i += 1) {\n if (!disabled) knobProperties.push(defaultKnobStyles);\n if (disabled) knobProperties.push(disabledKnobStyles);\n }\n }\n return knobProperties;\n};\n\nconst pushSlider = (index, inputIndex, inputValue) => {\n const difference = index - inputIndex;\n return inputValue + difference;\n};\n\nexport const ensureValuesConsistency = (knobPositions, inputIndex) => {\n const newKnobsPosition = [...knobPositions];\n // const valueToTest = newKnobsPosition[index];\n newKnobsPosition.forEach((value, index) => {\n if (Number.isNaN(value) || value == null) {\n newKnobsPosition[index] = pushSlider(index, inputIndex, newKnobsPosition[inputIndex]);\n } else if (index < inputIndex && value > newKnobsPosition[inputIndex]) {\n newKnobsPosition[index] = pushSlider(index, inputIndex, newKnobsPosition[inputIndex]);\n } else if (index > inputIndex && value < newKnobsPosition[inputIndex]) {\n newKnobsPosition[index] = pushSlider(index, inputIndex, newKnobsPosition[inputIndex]);\n }\n });\n return newKnobsPosition;\n};\n\nexport const convertStatusToArray = (status, length) => {\n const result = {};\n result.arrayDefaultStatus = Array.from({ length }, () => validationStates.standBy);\n if (status == null) {\n return result;\n }\n if (!Array.isArray(status)) {\n result.arrayStatus = Array.from({ length }, () => status);\n return result;\n }\n result.arrayStatus = status;\n return result;\n};\n\nexport const statusArrayToFormStatus = (arrayStatus) => {\n const invalid = arrayStatus.some((status) => status === validationStates.invalid);\n if (invalid) return validationStates.invalid;\n const valid = arrayStatus.some((status) => status === validationStates.valid);\n if (valid) return validationStates.valid;\n return validationStates.standBy;\n};\n\nexport const knobsValuesToString = (knobsValues, markDigits) =>\n knobsValues.map((knobValue) => (Number.isNaN(knobValue) ? \"\" : knobValue.toFixed(markDigits)));\n\nexport const stringValuesToKnobs = (inputsValues) =>\n inputsValues.map((inputValue) => parseFloat(inputValue));\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMA,0BAA0B,GAAG,SAA7BA,0BAA6B,CAACC,WAAD,EAAcC,YAAd,EAA4BC,QAA5B;EAAA,OACxCD,YAAY,GAAGC,QAAQ,GAAGF,WADc;AAAA,CAAnC;AAGP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACO,IAAMG,+BAA+B,GAAG,SAAlCA,+BAAkC,CAACC,WAAD,EAAcC,aAAd,EAA6BC,gBAA7B;EAAA,OAC7CC,IAAI,CAACC,KAAL,CAAW,CAACJ,WAAW,GAAGC,aAAf,IAAgCC,gBAA3C,CAD6C;AAAA,CAAxC;AAGP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACO,IAAMG,2BAA2B,GAAG,SAA9BA,2BAA8B,CAACC,MAAD,EAASJ,gBAAT,EAA2BD,aAA3B,EAA6C;EACtF,IAAMM,cAAc,GAAG,EAAvB;EACAD,MAAM,CAACE,OAAP,CAAe,UAACC,KAAD,EAAQC,KAAR,EAAkB;IAC/BH,cAAc,CAACG,KAAD,CAAd,GAAwBX,+BAA+B,CAACU,KAAD,EAAQR,aAAR,EAAuBC,gBAAvB,CAAvD;EACD,CAFD;EAGA,OAAOK,cAAP;AACD,CANM;AAQP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACO,IAAMI,2BAA2B,GAAG,SAA9BA,2BAA8B,CAACC,aAAD,EAAgBC,SAAhB,EAA2BZ,aAA3B,EAA6C;EACtF,IAAMa,WAAW,GAAG,EAApB;EACAF,aAAa,CAACJ,OAAd,CAAsB,UAACC,KAAD,EAAQC,KAAR,EAAkB;IACtCI,WAAW,CAACJ,KAAD,CAAX,GAAqBf,0BAA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Z,CAAiB,UAACX,MAAD;IAAA,OAAYA,MAAM,KAAKK,0BAAiBK,OAAxC;EAAA,CAAjB,CAAhB;EACA,IAAIA,OAAJ,EAAa,OAAOL,0BAAiBK,OAAxB;EACb,IAAME,KAAK,GAAGJ,WAAW,CAACG,IAAZ,CAAiB,UAACX,MAAD;IAAA,OAAYA,MAAM,KAAKK,0BAAiBO,KAAxC;EAAA,CAAjB,CAAd;EACA,IAAIA,KAAJ,EAAW,OAAOP,0BAAiBO,KAAxB;EACX,OAAOP,0BAAiBC,OAAxB;AACD,CANM;;;;AAQA,IAAMO,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACnF,WAAD,EAAcQ,UAAd;EAAA,OACjCR,WAAW,CAAC0D,GAAZ,CAAgB,UAAC0B,SAAD;IAAA,OAAgBjB,MAAM,CAACC,KAAP,CAAagB,SAAb,IAA0B,EAA1B,GAA+BA,SAAS,CAAC9D,OAAV,CAAkBd,UAAlB,CAA/C;EAAA,CAAhB,CADiC;AAAA,CAA5B;;;;AAGA,IAAM6E,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACC,YAAD;EAAA,OACjCA,YAAY,CAAC5B,GAAb,CAAiB,UAACK,UAAD;IAAA,OAAgBwB,UAAU,CAACxB,UAAD,CAA1B;EAAA,CAAjB,CADiC;AAAA,CAA5B"}
package/dist/index.d.ts CHANGED
@@ -84,6 +84,9 @@ export * from "./BaseInput";
84
84
  export { default as HvInput } from "./Input";
85
85
  export * from "./Input";
86
86
 
87
+ export { default as HvSlider } from "./Slider";
88
+ export * from "./Slider";
89
+
87
90
  export * from "./Forms";
88
91
 
89
92
  export { default as HvLabel } from "./Forms/Label";
package/dist/index.js CHANGED
@@ -52,6 +52,7 @@ var _exportNames = {
52
52
  HvHeader: true,
53
53
  HvBaseInput: true,
54
54
  HvInput: true,
55
+ HvSlider: true,
55
56
  HvKpi: true,
56
57
  HvLinechart: true,
57
58
  HvLink: true,
@@ -417,6 +418,12 @@ Object.defineProperty(exports, "HvSelectionList", {
417
418
  return _SelectionList.default;
418
419
  }
419
420
  });
421
+ Object.defineProperty(exports, "HvSlider", {
422
+ enumerable: true,
423
+ get: function get() {
424
+ return _Slider.default;
425
+ }
426
+ });
420
427
  Object.defineProperty(exports, "HvSnackbar", {
421
428
  enumerable: true,
422
429
  get: function get() {
@@ -772,6 +779,8 @@ var _BaseInput = _interopRequireDefault(require("./BaseInput"));
772
779
 
773
780
  var _Input = _interopRequireDefault(require("./Input"));
774
781
 
782
+ var _Slider = _interopRequireDefault(require("./Slider"));
783
+
775
784
  var _Kpi = _interopRequireDefault(require("./Kpi"));
776
785
 
777
786
  var _Linechart = _interopRequireDefault(require("./Linechart"));
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 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 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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;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;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAaA;;AACA;;AACA;;AAEA;;AASA;;AAGA;;AACA;;AAGA;;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"}
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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;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;;AAEA;;AAEA;;AAEA;;AACA;;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;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAaA;;AACA;;AACA;;AAEA;;AASA;;AAGA;;AACA;;AAGA;;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"}
@@ -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
  */