@hitachivantara/uikit-react-core 5.96.0 → 5.96.2
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/cjs/Calendar/model.cjs +1 -1
- package/dist/cjs/Dropdown/List/List.cjs +4 -17
- package/dist/cjs/Slider/utils.cjs +2 -2
- package/dist/cjs/TagsInput/TagsInput.styles.cjs +5 -2
- package/dist/cjs/themes/pentahoPlus.cjs +13 -1
- package/dist/esm/Calendar/model.js +1 -1
- package/dist/esm/Dropdown/List/List.js +4 -17
- package/dist/esm/Slider/utils.js +2 -2
- package/dist/esm/TagsInput/TagsInput.styles.js +5 -2
- package/dist/esm/themes/pentahoPlus.js +13 -1
- package/dist/types/index.d.ts +3 -3
- package/package.json +2 -2
|
@@ -67,23 +67,10 @@ const HvDropdownList = (props) => {
|
|
|
67
67
|
}
|
|
68
68
|
}, [values, notifyChangesOnFirstRender, onChange]);
|
|
69
69
|
const handleSearch = (str) => {
|
|
70
|
-
const results = list
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
value
|
|
75
|
-
}) => {
|
|
76
|
-
let stringValue = "";
|
|
77
|
-
if (typeof searchValue === "string" || searchValue instanceof String) {
|
|
78
|
-
stringValue = searchValue.toLowerCase();
|
|
79
|
-
} else if (typeof label === "string" || label instanceof String) {
|
|
80
|
-
stringValue = label.toLowerCase();
|
|
81
|
-
} else if (typeof value === "string" || value instanceof String) {
|
|
82
|
-
stringValue = value.toLowerCase();
|
|
83
|
-
}
|
|
84
|
-
return stringValue.indexOf(str.toLowerCase()) >= 0;
|
|
85
|
-
}
|
|
86
|
-
) : null;
|
|
70
|
+
const results = list?.filter(({ searchValue, label, value }) => {
|
|
71
|
+
const stringValue = typeof searchValue === "string" && searchValue || typeof label === "string" && label || typeof value === "string" && value || "";
|
|
72
|
+
return stringValue.toLowerCase().indexOf(str.toLowerCase()) >= 0;
|
|
73
|
+
});
|
|
87
74
|
if (results != null) {
|
|
88
75
|
const newList = list.map((elem) => {
|
|
89
76
|
const isResult = results.find((result) => result.label === elem.label);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
4
4
|
const Slider_styles = require("./Slider.styles.cjs");
|
|
5
5
|
const knobsPositionToScaledValue = (sliderValue, minPointValue, stepValue) => minPointValue + stepValue * sliderValue;
|
|
6
|
-
const scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) => typeof scaledValue === "number" ? Math.floor((scaledValue - minPointValue) * inverseStepValue) : NaN;
|
|
6
|
+
const scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) => typeof scaledValue === "number" ? Math.floor((scaledValue - minPointValue) * inverseStepValue) : Number.NaN;
|
|
7
7
|
const knobsValuesToKnobsPositions = (values, inverseStepValue, minPointValue) => {
|
|
8
8
|
const knobsPositions = [];
|
|
9
9
|
values.forEach((value, index) => {
|
|
@@ -227,7 +227,7 @@ const statusArrayToFormStatus = (arrayStatus) => {
|
|
|
227
227
|
const knobsValuesToString = (knobsValues, markDigits) => knobsValues.map(
|
|
228
228
|
(knobValue) => Number.isNaN(knobValue) ? "" : knobValue.toFixed(markDigits)
|
|
229
229
|
);
|
|
230
|
-
const stringValuesToKnobs = (inputsValues) => inputsValues.map((inputValue) => parseFloat(inputValue));
|
|
230
|
+
const stringValuesToKnobs = (inputsValues) => inputsValues.map((inputValue) => Number.parseFloat(inputValue));
|
|
231
231
|
exports.calculateStepValue = calculateStepValue;
|
|
232
232
|
exports.convertStatusToArray = convertStatusToArray;
|
|
233
233
|
exports.createKnobStyles = createKnobStyles;
|
|
@@ -83,10 +83,13 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvTagsInput
|
|
|
83
83
|
border: "none",
|
|
84
84
|
margin: 0,
|
|
85
85
|
padding: 0,
|
|
86
|
-
...uikitStyles.theme.typography.
|
|
86
|
+
...uikitStyles.theme.typography.body,
|
|
87
87
|
backgroundColor: "transparent",
|
|
88
88
|
outline: "none",
|
|
89
|
-
boxShadow: "none"
|
|
89
|
+
boxShadow: "none",
|
|
90
|
+
"&::placeholder": {
|
|
91
|
+
color: uikitStyles.theme.colors.textSubtle
|
|
92
|
+
}
|
|
90
93
|
},
|
|
91
94
|
/** @deprecated unused. use `:focus` or `:focus-visible` instead */
|
|
92
95
|
tagSelected: {},
|
|
@@ -194,10 +194,22 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
194
194
|
classes: {
|
|
195
195
|
tagsList: {
|
|
196
196
|
backgroundColor: inputColors.bg,
|
|
197
|
-
padding: uikitStyles.theme.space.xxs
|
|
197
|
+
padding: uikitStyles.theme.space.xxs,
|
|
198
|
+
borderColor: uikitStyles.theme.colors.textDimmed
|
|
198
199
|
},
|
|
199
200
|
singleLine: {
|
|
200
201
|
height: 32
|
|
202
|
+
},
|
|
203
|
+
disabled: {
|
|
204
|
+
"& .HvTagsInput-tagsList": {
|
|
205
|
+
backgroundColor: uikitStyles.theme.colors.bgDisabled,
|
|
206
|
+
"&,:hover": {
|
|
207
|
+
borderColor: uikitStyles.theme.colors.textDisabled
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"& .HvTagsInput-chipRoot": {
|
|
211
|
+
outlineColor: uikitStyles.theme.colors.textDisabled
|
|
212
|
+
}
|
|
201
213
|
}
|
|
202
214
|
}
|
|
203
215
|
},
|
|
@@ -66,23 +66,10 @@ const HvDropdownList = (props) => {
|
|
|
66
66
|
}
|
|
67
67
|
}, [values, notifyChangesOnFirstRender, onChange]);
|
|
68
68
|
const handleSearch = (str) => {
|
|
69
|
-
const results = list
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
value
|
|
74
|
-
}) => {
|
|
75
|
-
let stringValue = "";
|
|
76
|
-
if (typeof searchValue === "string" || searchValue instanceof String) {
|
|
77
|
-
stringValue = searchValue.toLowerCase();
|
|
78
|
-
} else if (typeof label === "string" || label instanceof String) {
|
|
79
|
-
stringValue = label.toLowerCase();
|
|
80
|
-
} else if (typeof value === "string" || value instanceof String) {
|
|
81
|
-
stringValue = value.toLowerCase();
|
|
82
|
-
}
|
|
83
|
-
return stringValue.indexOf(str.toLowerCase()) >= 0;
|
|
84
|
-
}
|
|
85
|
-
) : null;
|
|
69
|
+
const results = list?.filter(({ searchValue, label, value }) => {
|
|
70
|
+
const stringValue = typeof searchValue === "string" && searchValue || typeof label === "string" && label || typeof value === "string" && value || "";
|
|
71
|
+
return stringValue.toLowerCase().indexOf(str.toLowerCase()) >= 0;
|
|
72
|
+
});
|
|
86
73
|
if (results != null) {
|
|
87
74
|
const newList = list.map((elem) => {
|
|
88
75
|
const isResult = results.find((result) => result.label === elem.label);
|
package/dist/esm/Slider/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
2
2
|
import { sliderStyles } from "./Slider.styles.js";
|
|
3
3
|
const knobsPositionToScaledValue = (sliderValue, minPointValue, stepValue) => minPointValue + stepValue * sliderValue;
|
|
4
|
-
const scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) => typeof scaledValue === "number" ? Math.floor((scaledValue - minPointValue) * inverseStepValue) : NaN;
|
|
4
|
+
const scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) => typeof scaledValue === "number" ? Math.floor((scaledValue - minPointValue) * inverseStepValue) : Number.NaN;
|
|
5
5
|
const knobsValuesToKnobsPositions = (values, inverseStepValue, minPointValue) => {
|
|
6
6
|
const knobsPositions = [];
|
|
7
7
|
values.forEach((value, index) => {
|
|
@@ -225,7 +225,7 @@ const statusArrayToFormStatus = (arrayStatus) => {
|
|
|
225
225
|
const knobsValuesToString = (knobsValues, markDigits) => knobsValues.map(
|
|
226
226
|
(knobValue) => Number.isNaN(knobValue) ? "" : knobValue.toFixed(markDigits)
|
|
227
227
|
);
|
|
228
|
-
const stringValuesToKnobs = (inputsValues) => inputsValues.map((inputValue) => parseFloat(inputValue));
|
|
228
|
+
const stringValuesToKnobs = (inputsValues) => inputsValues.map((inputValue) => Number.parseFloat(inputValue));
|
|
229
229
|
export {
|
|
230
230
|
calculateStepValue,
|
|
231
231
|
convertStatusToArray,
|
|
@@ -81,10 +81,13 @@ const { staticClasses, useClasses } = createClasses("HvTagsInput", {
|
|
|
81
81
|
border: "none",
|
|
82
82
|
margin: 0,
|
|
83
83
|
padding: 0,
|
|
84
|
-
...theme.typography.
|
|
84
|
+
...theme.typography.body,
|
|
85
85
|
backgroundColor: "transparent",
|
|
86
86
|
outline: "none",
|
|
87
|
-
boxShadow: "none"
|
|
87
|
+
boxShadow: "none",
|
|
88
|
+
"&::placeholder": {
|
|
89
|
+
color: theme.colors.textSubtle
|
|
90
|
+
}
|
|
88
91
|
},
|
|
89
92
|
/** @deprecated unused. use `:focus` or `:focus-visible` instead */
|
|
90
93
|
tagSelected: {},
|
|
@@ -192,10 +192,22 @@ const pentahoPlus = mergeTheme(pentahoPlus$1, {
|
|
|
192
192
|
classes: {
|
|
193
193
|
tagsList: {
|
|
194
194
|
backgroundColor: inputColors.bg,
|
|
195
|
-
padding: theme.space.xxs
|
|
195
|
+
padding: theme.space.xxs,
|
|
196
|
+
borderColor: theme.colors.textDimmed
|
|
196
197
|
},
|
|
197
198
|
singleLine: {
|
|
198
199
|
height: 32
|
|
200
|
+
},
|
|
201
|
+
disabled: {
|
|
202
|
+
"& .HvTagsInput-tagsList": {
|
|
203
|
+
backgroundColor: theme.colors.bgDisabled,
|
|
204
|
+
"&,:hover": {
|
|
205
|
+
borderColor: theme.colors.textDisabled
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"& .HvTagsInput-chipRoot": {
|
|
209
|
+
outlineColor: theme.colors.textDisabled
|
|
210
|
+
}
|
|
199
211
|
}
|
|
200
212
|
}
|
|
201
213
|
},
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4669,8 +4669,8 @@ export declare function hvNumberColumn<D extends object = Record<string, unknown
|
|
|
4669
4669
|
export declare const hvNumberFallback: (value: any) => number | "—";
|
|
4670
4670
|
|
|
4671
4671
|
/**
|
|
4672
|
-
*A Number Input lets users enter numeric values and provides buttons to increment or decrement the value.
|
|
4673
|
-
*It extends the HvInput component—refer to its documentation for additional available props.
|
|
4672
|
+
* A Number Input lets users enter numeric values and provides buttons to increment or decrement the value.
|
|
4673
|
+
* It extends the HvInput component—refer to its documentation for additional available props.
|
|
4674
4674
|
*
|
|
4675
4675
|
* @extends HvInput
|
|
4676
4676
|
*/
|
|
@@ -4683,7 +4683,7 @@ export declare const HvOption: <OptionValue extends {}>(props: HvOptionProps<Opt
|
|
|
4683
4683
|
|
|
4684
4684
|
/**
|
|
4685
4685
|
* Optional
|
|
4686
|
-
* @
|
|
4686
|
+
* @description From `T` make a set of properties by key `K` become optional
|
|
4687
4687
|
* @example
|
|
4688
4688
|
* type Props = {
|
|
4689
4689
|
* name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.96.
|
|
3
|
+
"version": "5.96.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"access": "public",
|
|
62
62
|
"directory": "package"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "7c14c1cfb05319faf3d647bb806d25655363cbc5",
|
|
65
65
|
"exports": {
|
|
66
66
|
".": {
|
|
67
67
|
"types": "./dist/types/index.d.ts",
|