@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.
- 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/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/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/index.d.ts +3 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- 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/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/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/index.d.ts +3 -0
- package/dist/legacy/index.js +1 -0
- package/dist/legacy/index.js.map +1 -1
- 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/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/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/index.d.ts +3 -0
- package/dist/modern/index.js +1 -0
- package/dist/modern/index.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import "core-js/modules/es.object.keys.js";
|
|
2
|
+
import "core-js/modules/es.symbol.js";
|
|
3
|
+
import "core-js/modules/es.array.filter.js";
|
|
4
|
+
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
|
5
|
+
import "core-js/modules/es.object.get-own-property-descriptors.js";
|
|
6
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
+
|
|
9
|
+
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; }
|
|
10
|
+
|
|
11
|
+
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; }
|
|
12
|
+
|
|
13
|
+
import "core-js/modules/es.object.to-string.js";
|
|
14
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
|
15
|
+
import "core-js/modules/es.number.to-fixed.js";
|
|
16
|
+
import "core-js/modules/es.array.slice.js";
|
|
17
|
+
import "core-js/modules/es.array.map.js";
|
|
18
|
+
import "core-js/modules/es.number.is-nan.js";
|
|
19
|
+
import "core-js/modules/es.number.constructor.js";
|
|
20
|
+
import "core-js/modules/es.array.from.js";
|
|
21
|
+
import "core-js/modules/es.string.iterator.js";
|
|
22
|
+
import validationStates from "../Forms/FormElement/validationStates";
|
|
23
|
+
/**
|
|
24
|
+
* Transform the scaled values into knobs positions.
|
|
25
|
+
*
|
|
26
|
+
* @param {*} sliderValue - the value of the slider to be scaled
|
|
27
|
+
* @param {*} minPointVlue - The value of the first point in the slider from left to right.
|
|
28
|
+
* @param {*} stepVlue - The calculated separation between the values of the slider.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
export var knobsPositionToScaledValue = function knobsPositionToScaledValue(sliderValue, minPointVlue, stepVlue) {
|
|
32
|
+
return minPointVlue + stepVlue * sliderValue;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Transform the scaled values into knobs positions.
|
|
36
|
+
*
|
|
37
|
+
* @param {*} scaledValue - the value of the slider to be scaled
|
|
38
|
+
* @param {*} minPointValue - The value of the first point in
|
|
39
|
+
* the slider from left to right.
|
|
40
|
+
* @param {*} inverseStepValue - The inverse of calculated separation between
|
|
41
|
+
* the value of the points that compose the slider.
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
export var scaledValueToKnobsPositionValue = function scaledValueToKnobsPositionValue(scaledValue, minPointValue, inverseStepValue) {
|
|
45
|
+
return Math.floor((scaledValue - minPointValue) * inverseStepValue);
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Transform the received knobs values into knob positions
|
|
49
|
+
*
|
|
50
|
+
* @param {Object} values - The values of the slider.
|
|
51
|
+
* @param {Number} inverseStepValue - The inverse of calculated separation between
|
|
52
|
+
* the value of the points that compose the slider.
|
|
53
|
+
* @param {Integer} minPointValue - The value of the first point in the slider from
|
|
54
|
+
* left to right.
|
|
55
|
+
* @returns {Array} - The position of the knobs.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
export var knobsValuesToKnobsPositions = function knobsValuesToKnobsPositions(values, inverseStepValue, minPointValue) {
|
|
59
|
+
var knobsPositions = [];
|
|
60
|
+
values.forEach(function (value, index) {
|
|
61
|
+
knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);
|
|
62
|
+
});
|
|
63
|
+
return knobsPositions;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Transform the received knobs positions into knob values
|
|
67
|
+
*
|
|
68
|
+
* @param {Object} knobPositions - The values of the slider.
|
|
69
|
+
* @param {Number} stepValue - The calculated separation between
|
|
70
|
+
* the value of the points that compose the slider.
|
|
71
|
+
* @param {Integer} minPointValue - The value of the first point in the slider from
|
|
72
|
+
* left to right.
|
|
73
|
+
* @returns {Array} - The position of the knobs.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
export var knobsPositionsToKnobsValues = function knobsPositionsToKnobsValues(knobPositions, stepValue, minPointValue) {
|
|
77
|
+
var knobsValues = [];
|
|
78
|
+
knobPositions.forEach(function (value, index) {
|
|
79
|
+
knobsValues[index] = knobsPositionToScaledValue(value, minPointValue, stepValue);
|
|
80
|
+
});
|
|
81
|
+
return knobsValues;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Calculates the separation between each value in the slider.
|
|
85
|
+
*
|
|
86
|
+
* @param {*} maxPointValue - The value of the last point in the slider from left to right.
|
|
87
|
+
* @param {*} minPointValue - The value of the first point in the slider from left to right.
|
|
88
|
+
* @param {*} divisionQuantity - How many subdivisions there are in the slider.
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
export var calculateStepValue = function calculateStepValue(maxPointValue, minPointValue, divisionQuantity) {
|
|
92
|
+
return Math.abs(maxPointValue - minPointValue) / divisionQuantity;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Generates the inline styles used for the track of each knob, applying colors if necessary.
|
|
96
|
+
*
|
|
97
|
+
* @param {Object} markProperties - The object provided by the user with
|
|
98
|
+
* the desired configuration for the marks.
|
|
99
|
+
* @param {Integer} markstep - The separation between marks.
|
|
100
|
+
* @param {Integer} divisionQuantity - How many subdivisions there are in the slider.
|
|
101
|
+
* @param {Integer} minPointValue - The value of the first point in the slider from
|
|
102
|
+
* left to right.
|
|
103
|
+
* @param {Integer} stepValue - The calculated separation between the values of the slider.
|
|
104
|
+
* @param {Integer} markDigits - How many decimals the mark will show.
|
|
105
|
+
* @param {Function} formatMark - A function provided by the user that is going to
|
|
106
|
+
* be executed to format the mark text.
|
|
107
|
+
* @param {Object} styles - the default styles for the marks.
|
|
108
|
+
* @returns {Object} - An object with the for the marks.
|
|
109
|
+
* @memberof HvSlider
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
export var createMark = function createMark(markProperties, markstep, divisionQuantity, minPointValue, stepValue, markDigits) {
|
|
113
|
+
var formatMark = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : function (mark) {
|
|
114
|
+
return mark;
|
|
115
|
+
};
|
|
116
|
+
var disabled = arguments.length > 7 ? arguments[7] : undefined;
|
|
117
|
+
var styles = arguments.length > 8 ? arguments[8] : undefined;
|
|
118
|
+
var marks = {};
|
|
119
|
+
|
|
120
|
+
if (markProperties.length > 0) {
|
|
121
|
+
markProperties.forEach(function (markProperty) {
|
|
122
|
+
marks[markProperty.position] = disabled ? {
|
|
123
|
+
label: "".concat(markProperty.label),
|
|
124
|
+
style: _objectSpread({}, styles.disabledMark)
|
|
125
|
+
} : {
|
|
126
|
+
label: "".concat(markProperty.label),
|
|
127
|
+
style: _objectSpread({}, styles.mark)
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
} else {
|
|
131
|
+
var roundedMarkStep = Math.floor(markstep);
|
|
132
|
+
|
|
133
|
+
for (var index = 0; index <= divisionQuantity; index += roundedMarkStep) {
|
|
134
|
+
var labelValue = knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(markDigits);
|
|
135
|
+
labelValue = (formatMark === null || formatMark === void 0 ? void 0 : formatMark(labelValue)) || labelValue;
|
|
136
|
+
marks[index] = disabled ? {
|
|
137
|
+
label: "".concat(labelValue),
|
|
138
|
+
style: _objectSpread({}, styles.disabledMark)
|
|
139
|
+
} : {
|
|
140
|
+
label: "".concat(labelValue),
|
|
141
|
+
style: _objectSpread({}, styles.mark)
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return marks;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Generates the inline styles used for the track of each knob, applying colors if necessary.
|
|
150
|
+
*
|
|
151
|
+
* @param {Object} knobProperties - The object provided by the user with
|
|
152
|
+
* the desired configuration for the knobs.
|
|
153
|
+
* @param {Object} styles - the default styles for the tracks.
|
|
154
|
+
* @returns {Object} - An object with the style for each track.
|
|
155
|
+
* @memberof HvSlider
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
export var createTrackStyles = function createTrackStyles(knobProperties, styles) {
|
|
159
|
+
var trackStyles = [];
|
|
160
|
+
|
|
161
|
+
if (knobProperties.length > 0) {
|
|
162
|
+
knobProperties.forEach(function (knobProperty, index) {
|
|
163
|
+
trackStyles[index] = _objectSpread({}, styles.track);
|
|
164
|
+
|
|
165
|
+
if (knobProperty.color) {
|
|
166
|
+
trackStyles[index].backgroundColor = knobProperty.trackColor;
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return trackStyles;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* Generates the inline styles used for each knob, applying colors if specified.
|
|
175
|
+
*
|
|
176
|
+
* @param {Object} knobProperties - The object provided by the user with
|
|
177
|
+
* the desired configuration for the knobs.
|
|
178
|
+
* @param {Object} styles - the default styles for the knobs.
|
|
179
|
+
* @returns {Object} - An object with both the inner and outer styles for the knob.
|
|
180
|
+
* @memberof HvSlider
|
|
181
|
+
*/
|
|
182
|
+
|
|
183
|
+
export var createKnobStyles = function createKnobStyles(knobProperties, styles) {
|
|
184
|
+
var knobInner = [];
|
|
185
|
+
var knobOuterStyle = [];
|
|
186
|
+
var lastItem = knobProperties.length - 1;
|
|
187
|
+
|
|
188
|
+
if (knobProperties.length > 0) {
|
|
189
|
+
knobProperties.forEach(function (knobProperty, index) {
|
|
190
|
+
knobInner[index] = _objectSpread({}, styles.knobInner);
|
|
191
|
+
knobOuterStyle[index] = _objectSpread({}, styles.knobOuter);
|
|
192
|
+
|
|
193
|
+
if (knobProperty.color) {
|
|
194
|
+
knobInner[index].backgroundColor = knobProperty.color;
|
|
195
|
+
knobOuterStyle[index].backgroundColor = "transparent";
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (knobProperty.hidden) {
|
|
199
|
+
knobInner[index] = styles.knobHidden;
|
|
200
|
+
|
|
201
|
+
if (index === lastItem) {
|
|
202
|
+
knobInner[index] = _objectSpread({}, styles.knobHiddenLast);
|
|
203
|
+
knobInner[index].backgroundColor = knobProperty.color;
|
|
204
|
+
knobOuterStyle[index] = _objectSpread({}, styles.knobHidden);
|
|
205
|
+
knobOuterStyle[index].backgroundColor = knobProperty.color;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return {
|
|
212
|
+
knobInner: knobInner,
|
|
213
|
+
knobOuterStyle: knobOuterStyle
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Analyzes both the values and the default values to determine whether the slider is working in single mode.
|
|
218
|
+
*
|
|
219
|
+
* @param {Array} values - the values where the knobs are positioned when controlled.
|
|
220
|
+
* @param {Array} defaultValues - the values where the knobs start when uncontrolled.
|
|
221
|
+
* @returns {Boolean} - if true the slider should work as single slider
|
|
222
|
+
*/
|
|
223
|
+
|
|
224
|
+
export var isSingleSlider = function isSingleSlider(values, defaultValues) {
|
|
225
|
+
if (!((values === null || values === void 0 ? void 0 : values.length) > 1)) {
|
|
226
|
+
return defaultValues.length === 1;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return values.length === 1;
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* Generates the default knob styles for each knob
|
|
233
|
+
*
|
|
234
|
+
* @param {Object} knobProperties - The object provided by the user with
|
|
235
|
+
* the desired configuration for the knobs.
|
|
236
|
+
* @param {Integer} numberOfKnobs - the default styles for the knobs.
|
|
237
|
+
* @param {Object} theme - The theme to extract the colors.
|
|
238
|
+
*
|
|
239
|
+
* @returns {Object} - An object with both the inner and outer styles for the knob.
|
|
240
|
+
* @memberof HvSlider
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
export var generateDefaultKnobProperties = function generateDefaultKnobProperties(knobPropertiesProp) {
|
|
244
|
+
var numberOfKnobs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
245
|
+
var disabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
246
|
+
var theme = arguments.length > 3 ? arguments[3] : undefined;
|
|
247
|
+
var knobProperties = knobPropertiesProp || [];
|
|
248
|
+
var defaultKnobStyles = {
|
|
249
|
+
color: theme.hv.palette.accent.acce1,
|
|
250
|
+
hoverColor: theme.hv.palette.accent.acce1,
|
|
251
|
+
trackColor: theme.hv.palette.accent.acce1,
|
|
252
|
+
dragColor: theme.hv.palette.accent.acce1,
|
|
253
|
+
knobRingColor: theme.hv.palette.atmosphere.atmo1
|
|
254
|
+
};
|
|
255
|
+
var disabledKnobStyles = {
|
|
256
|
+
color: theme.hv.palette.atmosphere.atmo5,
|
|
257
|
+
hoverColor: theme.hv.palette.atmosphere.atmo5,
|
|
258
|
+
trackColor: theme.hv.palette.atmosphere.atmo5,
|
|
259
|
+
dragColor: theme.hv.palette.atmosphere.atmo5,
|
|
260
|
+
knobRingColor: theme.hv.palette.atmosphere.atmo5
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
if (knobProperties.length > 0) {
|
|
264
|
+
knobProperties = knobProperties.slice(0, numberOfKnobs);
|
|
265
|
+
knobProperties = knobProperties.map(function (knobProperty) {
|
|
266
|
+
if (!disabled) {
|
|
267
|
+
return _objectSpread(_objectSpread({}, disabledKnobStyles), knobProperty);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
return _objectSpread(_objectSpread({}, defaultKnobStyles), knobProperty);
|
|
271
|
+
});
|
|
272
|
+
} else {
|
|
273
|
+
for (var i = 0; i < numberOfKnobs; i += 1) {
|
|
274
|
+
if (!disabled) knobProperties.push(defaultKnobStyles);
|
|
275
|
+
if (disabled) knobProperties.push(disabledKnobStyles);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return knobProperties;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
var pushSlider = function pushSlider(index, inputIndex, inputValue) {
|
|
283
|
+
var difference = index - inputIndex;
|
|
284
|
+
return inputValue + difference;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
export var ensureValuesConsistency = function ensureValuesConsistency(knobPositions, inputIndex) {
|
|
288
|
+
var newKnobsPosition = _toConsumableArray(knobPositions); // const valueToTest = newKnobsPosition[index];
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
newKnobsPosition.forEach(function (value, index) {
|
|
292
|
+
if (Number.isNaN(value) || value == null) {
|
|
293
|
+
newKnobsPosition[index] = pushSlider(index, inputIndex, newKnobsPosition[inputIndex]);
|
|
294
|
+
} else if (index < inputIndex && value > newKnobsPosition[inputIndex]) {
|
|
295
|
+
newKnobsPosition[index] = pushSlider(index, inputIndex, newKnobsPosition[inputIndex]);
|
|
296
|
+
} else if (index > inputIndex && value < newKnobsPosition[inputIndex]) {
|
|
297
|
+
newKnobsPosition[index] = pushSlider(index, inputIndex, newKnobsPosition[inputIndex]);
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
return newKnobsPosition;
|
|
301
|
+
};
|
|
302
|
+
export var convertStatusToArray = function convertStatusToArray(status, length) {
|
|
303
|
+
var result = {};
|
|
304
|
+
result.arrayDefaultStatus = Array.from({
|
|
305
|
+
length: length
|
|
306
|
+
}, function () {
|
|
307
|
+
return validationStates.standBy;
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
if (status == null) {
|
|
311
|
+
return result;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
if (!Array.isArray(status)) {
|
|
315
|
+
result.arrayStatus = Array.from({
|
|
316
|
+
length: length
|
|
317
|
+
}, function () {
|
|
318
|
+
return status;
|
|
319
|
+
});
|
|
320
|
+
return result;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
result.arrayStatus = status;
|
|
324
|
+
return result;
|
|
325
|
+
};
|
|
326
|
+
export var statusArrayToFormStatus = function statusArrayToFormStatus(arrayStatus) {
|
|
327
|
+
var invalid = arrayStatus.some(function (status) {
|
|
328
|
+
return status === validationStates.invalid;
|
|
329
|
+
});
|
|
330
|
+
if (invalid) return validationStates.invalid;
|
|
331
|
+
var valid = arrayStatus.some(function (status) {
|
|
332
|
+
return status === validationStates.valid;
|
|
333
|
+
});
|
|
334
|
+
if (valid) return validationStates.valid;
|
|
335
|
+
return validationStates.standBy;
|
|
336
|
+
};
|
|
337
|
+
export var knobsValuesToString = function knobsValuesToString(knobsValues, markDigits) {
|
|
338
|
+
return knobsValues.map(function (knobValue) {
|
|
339
|
+
return Number.isNaN(knobValue) ? "" : knobValue.toFixed(markDigits);
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
export var stringValuesToKnobs = function stringValuesToKnobs(inputsValues) {
|
|
343
|
+
return inputsValues.map(function (inputValue) {
|
|
344
|
+
return parseFloat(inputValue);
|
|
345
|
+
});
|
|
346
|
+
};
|
|
347
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":["validationStates","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","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)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ACV,MAAD;IAAA,OAAYA,MAAM,KAAK1F,gBAAgB,CAACmG,OAAxC;EAAA,CAAjB,CAAhB;EACA,IAAIA,OAAJ,EAAa,OAAOnG,gBAAgB,CAACmG,OAAxB;EACb,IAAME,KAAK,GAAGJ,WAAW,CAACG,IAAZ,CAAiB,UAACV,MAAD;IAAA,OAAYA,MAAM,KAAK1F,gBAAgB,CAACqG,KAAxC;EAAA,CAAjB,CAAd;EACA,IAAIA,KAAJ,EAAW,OAAOrG,gBAAgB,CAACqG,KAAxB;EACX,OAAOrG,gBAAgB,CAAC+F,OAAxB;AACD,CANM;AAQP,OAAO,IAAMO,mBAAmB,GAAG,SAAtBA,mBAAsB,CAAClF,WAAD,EAAcQ,UAAd;EAAA,OACjCR,WAAW,CAAC0D,GAAZ,CAAgB,UAACyB,SAAD;IAAA,OAAgBhB,MAAM,CAACC,KAAP,CAAae,SAAb,IAA0B,EAA1B,GAA+BA,SAAS,CAAC7D,OAAV,CAAkBd,UAAlB,CAA/C;EAAA,CAAhB,CADiC;AAAA,CAA5B;AAGP,OAAO,IAAM4E,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACC,YAAD;EAAA,OACjCA,YAAY,CAAC3B,GAAb,CAAiB,UAACK,UAAD;IAAA,OAAgBuB,UAAU,CAACvB,UAAD,CAA1B;EAAA,CAAjB,CADiC;AAAA,CAA5B"}
|
package/dist/legacy/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/legacy/index.js
CHANGED
|
@@ -34,6 +34,7 @@ export { default as HvHeader } from "./Header";
|
|
|
34
34
|
export * from "./Header";
|
|
35
35
|
export { default as HvBaseInput } from "./BaseInput";
|
|
36
36
|
export { default as HvInput } from "./Input";
|
|
37
|
+
export { default as HvSlider } from "./Slider";
|
|
37
38
|
export { default as HvKpi } from "./Kpi";
|
|
38
39
|
export { default as HvLinechart } from "./Linechart";
|
|
39
40
|
export { default as HvLink } from "./Link";
|
package/dist/legacy/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","HvAccordion","HvActionsGeneric","HvActionBar","HvAppSwitcher","HvAssetInventory","HvAvatar","HvBadge","HvBanner","HvBarchart","HvBaseDropdown","HvBreadcrumb","HvBulkActions","HvButton","HvCard","HvContainer","HvDatePicker","HvDonutchart","HvDropdown","HvDropDownMenu","HvEmptyState","HvFilterGroup","HvFileUploader","HvFooter","HvGrid","HvGlobalActions","HvHeader","HvBaseInput","HvInput","HvKpi","HvLinechart","HvLink","HvListContainer","HvList","HvSelectionList","HvLoading","HvLogin","HvDialog","HvMultiButton","HvPagination","HvBaseCheckBox","HvCheckBox","HvCheckBoxGroup","HvBaseRadio","HvRadio","HvRadioGroup","HvBaseSwitch","HvSwitch","HvSnackbar","HvSnackbarContent","HvSnackbarProvider","useHvSnackbar","HvStack","HvTab","HvTag","HvTable","HvTabs","HvTextArea","HvTagsInput","HvToggleButton","HvTooltip","HvOverflowTooltip","HvTypography","HvUserPreferences","Actions","HvUserPreferencesActions","Action","HvUserPreferencesAction","Options","HvUserPreferencesOptions","Option","HvUserPreferencesOption","Group","HvUserPreferencesOptionsGroup","Label","HvUserPreferencesOptionsGroupLabel","HvScrollToHorizontal","HvScrollToVertical","useScrollTo","HvVerticalNavigation","Navigation","HvVerticalNavigationTree","TreeView","HvTreeView","TreeViewItem","HvTreeViewItem","HvVerticalNavigationActions","HvVerticalNavigationAction","HvPanel","withId","withTooltip","useUniqueId","hvTheme","themeBuilder","getTheme","HvProvider"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvAccordion } from \"./Accordion\";\nexport { default as HvActionsGeneric } from \"./ActionsGeneric\";\nexport { default as HvActionBar } from \"./ActionBar\";\nexport { default as HvAppSwitcher } from \"./AppSwitcher\";\nexport { default as HvAssetInventory } from \"./AssetInventory\";\nexport * from \"./AssetInventory\";\nexport { default as HvAvatar } from \"./Avatar\";\nexport { default as HvBadge } from \"./Badge\";\nexport { default as HvBanner } from \"./Banner\";\nexport * from \"./Banner\";\nexport { default as HvBarchart } from \"./Barchart\";\nexport { default as HvBaseDropdown } from \"./BaseDropdown\";\nexport { default as HvBreadcrumb } from \"./BreadCrumb\";\nexport { default as HvBulkActions } from \"./BulkActions\";\nexport { default as HvButton } from \"./Button\";\nexport { default as HvCard } from \"./Card\";\nexport * from \"./Card\";\nexport * from \"./Calendar\";\nexport { default as HvContainer } from \"./Container\";\nexport { default as HvDatePicker } from \"./DatePicker\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvDropdown } from \"./Dropdown\";\nexport { default as HvDropDownMenu } from \"./DropDownMenu\";\nexport { default as HvEmptyState } from \"./EmptyState\";\nexport { default as HvFilterGroup } from \"./FilterGroup\";\nexport { default as HvFileUploader } from \"./FileUploader\";\nexport * from \"./FileUploader\";\nexport { default as 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":"AAAA;AACA,SAASA,OAAO,IAAIC,WAApB,QAAuC,aAAvC;AACA,SAASD,OAAO,IAAIE,gBAApB,QAA4C,kBAA5C;AACA,SAASF,OAAO,IAAIG,WAApB,QAAuC,aAAvC;AACA,SAASH,OAAO,IAAII,aAApB,QAAyC,eAAzC;AACA,SAASJ,OAAO,IAAIK,gBAApB,QAA4C,kBAA5C;AACA,cAAc,kBAAd;AACA,SAASL,OAAO,IAAIM,QAApB,QAAoC,UAApC;AACA,SAASN,OAAO,IAAIO,OAApB,QAAmC,SAAnC;AACA,SAASP,OAAO,IAAIQ,QAApB,QAAoC,UAApC;AACA,cAAc,UAAd;AACA,SAASR,OAAO,IAAIS,UAApB,QAAsC,YAAtC;AACA,SAAST,OAAO,IAAIU,cAApB,QAA0C,gBAA1C;AACA,SAASV,OAAO,IAAIW,YAApB,QAAwC,cAAxC;AACA,SAASX,OAAO,IAAIY,aAApB,QAAyC,eAAzC;AACA,SAASZ,OAAO,IAAIa,QAApB,QAAoC,UAApC;AACA,SAASb,OAAO,IAAIc,MAApB,QAAkC,QAAlC;AACA,cAAc,QAAd;AACA,cAAc,YAAd;AACA,SAASd,OAAO,IAAIe,WAApB,QAAuC,aAAvC;AACA,SAASf,OAAO,IAAI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BAFZ,EAGEC,KAAK,IAAIC,6BAHX,EAIEC,KAAK,IAAIC,kCAJX,QAKO,mBALP;AAOA,SAAS3E,OAAO,IAAI4E,oBAApB,QAAgD,uBAAhD;AACA,SAAS5E,OAAO,IAAI6E,kBAApB,QAA8C,qBAA9C;AACA,SAAS7E,OAAO,IAAI8E,WAApB,QAAuC,wBAAvC;AAEA,SAAS9E,OAAO,IAAI+E,oBAApB,QAAgD,sBAAhD,C,CACA;;AACA,SAASC,UAAU,IAAIC,wBAAvB,QAAuD,sBAAvD;AACA,SAASC,QAAQ,IAAIC,UAArB,EAAiCC,YAAY,IAAIC,cAAjD,QAAuE,sBAAvE;AACA,SACErB,OAAO,IAAIsB,2BADb,EAEEpB,MAAM,IAAIqB,0BAFZ,QAGO,sBAHP;AAKA,SAASvF,OAAO,IAAIwF,OAApB,QAAmC,SAAnC,C,CAEA;;AACA,SAASxF,OAAO,IAAIyF,MAApB,QAAkC,UAAlC;AACA,SAASzF,OAAO,IAAI0F,WAApB,QAAuC,eAAvC,C,CAEA;;AACA,SAAS1F,OAAO,IAAI2F,WAApB,QAAuC,eAAvC,C,CAEA;;AACA,SAAS3F,OAAO,IAAI4F,OAApB,QAAmC,SAAnC;AACA,SAASC,YAAT,EAAuBC,QAAvB,QAAuC,SAAvC,C,CAEA;;AACA,SAAS9F,OAAO,IAAI+F,UAApB,QAAsC,YAAtC;AACA,cAAc,YAAd,C,CAEA;;AACA,cAAc,SAAd"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","HvAccordion","HvActionsGeneric","HvActionBar","HvAppSwitcher","HvAssetInventory","HvAvatar","HvBadge","HvBanner","HvBarchart","HvBaseDropdown","HvBreadcrumb","HvBulkActions","HvButton","HvCard","HvContainer","HvDatePicker","HvDonutchart","HvDropdown","HvDropDownMenu","HvEmptyState","HvFilterGroup","HvFileUploader","HvFooter","HvGrid","HvGlobalActions","HvHeader","HvBaseInput","HvInput","HvSlider","HvKpi","HvLinechart","HvLink","HvListContainer","HvList","HvSelectionList","HvLoading","HvLogin","HvDialog","HvMultiButton","HvPagination","HvBaseCheckBox","HvCheckBox","HvCheckBoxGroup","HvBaseRadio","HvRadio","HvRadioGroup","HvBaseSwitch","HvSwitch","HvSnackbar","HvSnackbarContent","HvSnackbarProvider","useHvSnackbar","HvStack","HvTab","HvTag","HvTable","HvTabs","HvTextArea","HvTagsInput","HvToggleButton","HvTooltip","HvOverflowTooltip","HvTypography","HvUserPreferences","Actions","HvUserPreferencesActions","Action","HvUserPreferencesAction","Options","HvUserPreferencesOptions","Option","HvUserPreferencesOption","Group","HvUserPreferencesOptionsGroup","Label","HvUserPreferencesOptionsGroupLabel","HvScrollToHorizontal","HvScrollToVertical","useScrollTo","HvVerticalNavigation","Navigation","HvVerticalNavigationTree","TreeView","HvTreeView","TreeViewItem","HvTreeViewItem","HvVerticalNavigationActions","HvVerticalNavigationAction","HvPanel","withId","withTooltip","useUniqueId","hvTheme","themeBuilder","getTheme","HvProvider"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvAccordion } from \"./Accordion\";\nexport { default as HvActionsGeneric } from \"./ActionsGeneric\";\nexport { default as HvActionBar } from \"./ActionBar\";\nexport { default as HvAppSwitcher } from \"./AppSwitcher\";\nexport { default as HvAssetInventory } from \"./AssetInventory\";\nexport * from \"./AssetInventory\";\nexport { default as HvAvatar } from \"./Avatar\";\nexport { default as HvBadge } from \"./Badge\";\nexport { default as HvBanner } from \"./Banner\";\nexport * from \"./Banner\";\nexport { default as HvBarchart } from \"./Barchart\";\nexport { default as HvBaseDropdown } from \"./BaseDropdown\";\nexport { default as HvBreadcrumb } from \"./BreadCrumb\";\nexport { default as HvBulkActions } from \"./BulkActions\";\nexport { default as HvButton } from \"./Button\";\nexport { default as HvCard } from \"./Card\";\nexport * from \"./Card\";\nexport * from \"./Calendar\";\nexport { default as HvContainer } from \"./Container\";\nexport { default as HvDatePicker } from \"./DatePicker\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvDropdown } from \"./Dropdown\";\nexport { default as HvDropDownMenu } from \"./DropDownMenu\";\nexport { default as HvEmptyState } from \"./EmptyState\";\nexport { default as HvFilterGroup } from \"./FilterGroup\";\nexport { default as HvFileUploader } from \"./FileUploader\";\nexport * from \"./FileUploader\";\nexport { default as 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":"AAAA;AACA,SAASA,OAAO,IAAIC,WAApB,QAAuC,aAAvC;AACA,SAASD,OAA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AHP;AAKA,SAASxF,OAAO,IAAIyF,OAApB,QAAmC,SAAnC,C,CAEA;;AACA,SAASzF,OAAO,IAAI0F,MAApB,QAAkC,UAAlC;AACA,SAAS1F,OAAO,IAAI2F,WAApB,QAAuC,eAAvC,C,CAEA;;AACA,SAAS3F,OAAO,IAAI4F,WAApB,QAAuC,eAAvC,C,CAEA;;AACA,SAAS5F,OAAO,IAAI6F,OAApB,QAAmC,SAAnC;AACA,SAASC,YAAT,EAAuBC,QAAvB,QAAuC,SAAvC,C,CAEA;;AACA,SAAS/F,OAAO,IAAIgG,UAApB,QAAsC,YAAtC;AACA,cAAc,YAAd,C,CAEA;;AACA,cAAc,SAAd"}
|
|
@@ -68,7 +68,7 @@ const HvBaseInput = props => {
|
|
|
68
68
|
focused: classes.inputRootFocused,
|
|
69
69
|
disabled: classes.inputRootDisabled,
|
|
70
70
|
multiline: classes.inputRootMultiline,
|
|
71
|
-
input: clsx(classes.input, !formElementProps.disabled && resizable && classes.inputResizable)
|
|
71
|
+
input: clsx(classes.input, !formElementProps.disabled && resizable && classes.inputResizable, disabled && classes.inputDisabled)
|
|
72
72
|
},
|
|
73
73
|
inputProps: _objectSpread(_objectSpread({
|
|
74
74
|
// avoid the required attribute at the root node
|
|
@@ -139,6 +139,11 @@ process.env.NODE_ENV !== "production" ? HvBaseInput.propTypes = {
|
|
|
139
139
|
*/
|
|
140
140
|
input: PropTypes.string,
|
|
141
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Styles applied to input html element when is disabled.
|
|
144
|
+
*/
|
|
145
|
+
inputDisabled: PropTypes.string,
|
|
146
|
+
|
|
142
147
|
/**
|
|
143
148
|
* Styles applied to input html element when it is resizable.
|
|
144
149
|
*/
|
|
@@ -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,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,KAAT,EAAgBC,UAAhB,QAAkC,mBAAlC;AACA,SAASC,OAAT,QAAwB,UAAxB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,SACEC,oBADF,EAEEC,+BAFF,EAGEC,gCAHF,EAIEC,yBAJF,QAKO,sBALP;AAOA;AACA;AACA;AACA;;AACA,MAAMC,WAAW,GAAIC,KAAD,IAAW;EAC7B,MAAM;IACJC,OADI;IAEJC,SAAS,GAAG,EAFR;IAIJC,EAJI;IAKJC,IALI;IAOJC,KAPI;IAQJC,YARI;IAUJC,QAVI;IAWJC,QAXI;IAYJC,QAZI;IAcJC,QAdI;IAgBJC,IAAI,GAAG,MAhBH;IAkBJC,WAlBI;IA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HG;;EA0HtB;AACF;AACA;EACEzB,UAAU,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;A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B,SAAS,CAACmD,MAlFF;;EAoFtB;AACF;AACA;EACE/B,QAAQ,EAAEpB,SAAS,CAACsD,IAvFE;;EAwFtB;AACF;AACA;EACEnC,QAAQ,EAAEnB,SAAS,CAACsD,IA3FE;;EA4FtB;AACF;AACA;EACEpC,QAAQ,EAAElB,SAAS,CAACsD,IA/FE;;EAiGtB;AACF;AACA;AACA;EACEjC,QAAQ,EAAErB,SAAS,CAACuD,IArGE;;EAuGtB;AACF;AACA;EACEjC,IAAI,EAAEtB,SAAS,CAACmD,MA1GM;;EA4GtB;AACF;AACA;EACE5B,WAAW,EAAEvB,SAAS,CAACmD,MA/GD;;EAiHtB;AACF;AACA;EACE3B,SAAS,EAAExB,SAAS,CAACsD,IApHC;;EAqHtB;AACF;AACA;EACE7B,SAAS,EAAEzB,SAAS,CAACsD,IAxHC;;EAyHtB;AACF;AACA;EACE5B,OAAO,EAAE1B,SAAS,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,MAAMC,MAAM,GAAIC,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAE,cADL;IAEJC,KAAK,EAAE,MAFH;IAGJC,QAAQ,EAAE,UAHN;IAIJ,yBAAyB;MACvBC,QAAQ,EAAE,MADa;MAEvBC,MAAM,EAAE;IAFe,CAJrB;IAQJ,+BAA+B;MAC7B,YAAY;QACVA,MAAM,EAAG,aAAYN,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC,KAAM;MADzC;IADiB,CAR3B;IAaJ,iCAAiC;MAC/BC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC;IADV,CAb7B;IAgBJ,wCAAwC;MACtCC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC;IADH,CAhBpC;IAmBJ;IACA,wCAAwC;MACtCC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC;IADH,CApBpC;IAuBJ,sCAAsC;MACpC,YAAY;QACVJ,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IADK,CAbb;IAgBHC,KAAK,EAAE,SAhBJ;IAiBHyC,QAAQ,EAAE;EAjBP,EA5JoB;EA+KzBC,cAAc,EAAE;IACdC,MAAM,EAAE,MADM;IAEd3C,KAAK,EAAE;EAFO,CA/KS;EAoLzB4C,oBAAoB,EAAE;IACpB3C,QAAQ,EAAE,UADU;IAEpBD,KAAK,EAAE,kBAFa;IAGpB4B,MAAM,EAAE,KAHY;IAIpBiB,GAAG,EAAE,MAJe;IAKpBC,IAAI,EAAE,KALc;IAMpBtC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBO,UAAjB,CAA4BC;EANzB,CApLG;EA6LzB,WAAW;IACT,0BAA0B;MACxB,sBAAuB,kBAAiBhB,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBO,UAAjB,CAA4BS,KAAM,QADlD;MAExB,2BAA2BxB,KAAK,CAACO,EAAN,CAAS+B,UAAT,CAAoBC,UAApB,CAA+BW;IAFlC;EADjB;AA7Lc,CAAZ,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,MAAMC,MAAM,GAAIC,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAE,cADL;IAEJC,KAAK,EAAE,MAFH;IAGJC,QAAQ,EAAE,UAHN;IAIJ,yBAAyB;MACvBC,QAAQ,EAAE,MADa;MAEvBC,MAAM,EAAE;IAFe,CAJrB;IAQJ,+BAA+B;MAC7B,YAAY;QACVA,MAAM,EAAG,aAAYN,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC,KAAM;MADzC;IADiB,CAR3B;IAaJ,iCAAiC;MAC/BC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC;IADV,CAb7B;IAgBJ,wCAAwC;MACtCC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC;IADH,CAhBpC;IAmBJ;IACA,wCAAwC;MACtCC,eAAe,EAAEX,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC;IADH,CApBpC;IAuBJ,sCAAsC;MACpC,YAAY;QACVJ,MAAM,EAAG,aAAYN,KAAK,CAACO,EAAN,CAASC,OAAT,CAAiBC,MAAjB,CAAwBC,KAAM;MADzC;IADwB,CAvBlC;IA4BJ;IACA,sCAAsC;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