@hitachivantara/uikit-react-core 3.66.2 → 3.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/BaseInput/BaseInput.js +6 -1
  2. package/dist/BaseInput/BaseInput.js.map +1 -1
  3. package/dist/BaseInput/styles.js +3 -0
  4. package/dist/BaseInput/styles.js.map +1 -1
  5. package/dist/FilterGroup/FilterGroup.d.ts +3 -3
  6. package/dist/Forms/FormElement/index.d.ts +4 -0
  7. package/dist/Forms/FormElement/index.js +14 -0
  8. package/dist/Forms/FormElement/index.js.map +1 -1
  9. package/dist/Slider/Slider.d.ts +185 -0
  10. package/dist/Slider/Slider.js +803 -0
  11. package/dist/Slider/Slider.js.map +1 -0
  12. package/dist/Slider/SliderInput/SliderInput.js +194 -0
  13. package/dist/Slider/SliderInput/SliderInput.js.map +1 -0
  14. package/dist/Slider/SliderInput/index.d.ts +1 -0
  15. package/dist/Slider/SliderInput/index.js +16 -0
  16. package/dist/Slider/SliderInput/index.js.map +1 -0
  17. package/dist/Slider/SliderInput/styles.js +24 -0
  18. package/dist/Slider/SliderInput/styles.js.map +1 -0
  19. package/dist/Slider/index.d.ts +2 -0
  20. package/dist/Slider/index.js +16 -0
  21. package/dist/Slider/index.js.map +1 -0
  22. package/dist/Slider/styles.js +238 -0
  23. package/dist/Slider/styles.js.map +1 -0
  24. package/dist/Slider/utils.js +413 -0
  25. package/dist/Slider/utils.js.map +1 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.js +9 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/legacy/BaseInput/BaseInput.js +6 -1
  30. package/dist/legacy/BaseInput/BaseInput.js.map +1 -1
  31. package/dist/legacy/BaseInput/styles.js +3 -0
  32. package/dist/legacy/BaseInput/styles.js.map +1 -1
  33. package/dist/legacy/FilterGroup/FilterGroup.d.ts +3 -3
  34. package/dist/legacy/Forms/FormElement/index.d.ts +4 -0
  35. package/dist/legacy/Forms/FormElement/index.js +1 -0
  36. package/dist/legacy/Forms/FormElement/index.js.map +1 -1
  37. package/dist/legacy/Slider/Slider.d.ts +185 -0
  38. package/dist/legacy/Slider/Slider.js +752 -0
  39. package/dist/legacy/Slider/Slider.js.map +1 -0
  40. package/dist/legacy/Slider/SliderInput/SliderInput.js +151 -0
  41. package/dist/legacy/Slider/SliderInput/SliderInput.js.map +1 -0
  42. package/dist/legacy/Slider/SliderInput/index.d.ts +1 -0
  43. package/dist/legacy/Slider/SliderInput/index.js +2 -0
  44. package/dist/legacy/Slider/SliderInput/index.js.map +1 -0
  45. package/dist/legacy/Slider/SliderInput/styles.js +16 -0
  46. package/dist/legacy/Slider/SliderInput/styles.js.map +1 -0
  47. package/dist/legacy/Slider/index.d.ts +2 -0
  48. package/dist/legacy/Slider/index.js +2 -0
  49. package/dist/legacy/Slider/index.js.map +1 -0
  50. package/dist/legacy/Slider/styles.js +221 -0
  51. package/dist/legacy/Slider/styles.js.map +1 -0
  52. package/dist/legacy/Slider/utils.js +347 -0
  53. package/dist/legacy/Slider/utils.js.map +1 -0
  54. package/dist/legacy/index.d.ts +3 -0
  55. package/dist/legacy/index.js +1 -0
  56. package/dist/legacy/index.js.map +1 -1
  57. package/dist/modern/BaseInput/BaseInput.js +6 -1
  58. package/dist/modern/BaseInput/BaseInput.js.map +1 -1
  59. package/dist/modern/BaseInput/styles.js +3 -0
  60. package/dist/modern/BaseInput/styles.js.map +1 -1
  61. package/dist/modern/FilterGroup/FilterGroup.d.ts +3 -3
  62. package/dist/modern/Forms/FormElement/index.d.ts +4 -0
  63. package/dist/modern/Forms/FormElement/index.js +1 -0
  64. package/dist/modern/Forms/FormElement/index.js.map +1 -1
  65. package/dist/modern/Slider/Slider.d.ts +185 -0
  66. package/dist/modern/Slider/Slider.js +689 -0
  67. package/dist/modern/Slider/Slider.js.map +1 -0
  68. package/dist/modern/Slider/SliderInput/SliderInput.js +129 -0
  69. package/dist/modern/Slider/SliderInput/SliderInput.js.map +1 -0
  70. package/dist/modern/Slider/SliderInput/index.d.ts +1 -0
  71. package/dist/modern/Slider/SliderInput/index.js +2 -0
  72. package/dist/modern/Slider/SliderInput/index.js.map +1 -0
  73. package/dist/modern/Slider/SliderInput/styles.js +16 -0
  74. package/dist/modern/Slider/SliderInput/styles.js.map +1 -0
  75. package/dist/modern/Slider/index.d.ts +2 -0
  76. package/dist/modern/Slider/index.js +2 -0
  77. package/dist/modern/Slider/index.js.map +1 -0
  78. package/dist/modern/Slider/styles.js +214 -0
  79. package/dist/modern/Slider/styles.js.map +1 -0
  80. package/dist/modern/Slider/utils.js +302 -0
  81. package/dist/modern/Slider/utils.js.map +1 -0
  82. package/dist/modern/index.d.ts +3 -0
  83. package/dist/modern/index.js +1 -0
  84. package/dist/modern/index.js.map +1 -1
  85. package/package.json +4 -2
@@ -8,16 +8,16 @@ interface FilterValue {
8
8
  }
9
9
 
10
10
  export interface HvFilterGroupProps
11
- extends StandardProps<HvFormElementProps, HvFilterGroupClassKey> {
11
+ extends StandardProps<HvFormElementProps, HvFilterGroupClassKey, "defaultValue"> {
12
12
  /**
13
13
  * The callback fired when the cancel button is clicked.
14
14
  */
15
- onCancel: (event: Event) => void;
15
+ onCancel?: (event: Event) => void;
16
16
 
17
17
  /**
18
18
  * The callback fired when the clear filters button is clicked.
19
19
  */
20
- onClear: (event: Event) => void;
20
+ onClear?: (event: Event) => void;
21
21
 
22
22
  /**
23
23
  * The callback fired when the value changes.
@@ -1,3 +1,7 @@
1
1
  export { default } from "./FormElement";
2
2
  export * from "./FormElement";
3
3
  export * from "./context/FormElementContext";
4
+ export * from "./context/FormElementValueContext";
5
+ export * from "./context/FormElementDescriptorsContext";
6
+ export * from "./utils/FormUtils";
7
+ export * from "./validationStates";
@@ -3,4 +3,5 @@ export * from "./context/FormElementContext";
3
3
  export * from "./context/FormElementValueContext";
4
4
  export * from "./context/FormElementDescriptorsContext";
5
5
  export * from "./utils/FormUtils";
6
+ export * from "./validationStates";
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Forms/FormElement/index.js"],"sourcesContent":["export { default } from \"./FormElement\";\nexport * from \"./context/FormElementContext\";\nexport * from \"./context/FormElementValueContext\";\nexport * from \"./context/FormElementDescriptorsContext\";\nexport * from \"./utils/FormUtils\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,eAAxB;AACA,cAAc,8BAAd;AACA,cAAc,mCAAd;AACA,cAAc,yCAAd;AACA,cAAc,mBAAd"}
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Forms/FormElement/index.js"],"sourcesContent":["export { default } from \"./FormElement\";\nexport * from \"./context/FormElementContext\";\nexport * from \"./context/FormElementValueContext\";\nexport * from \"./context/FormElementDescriptorsContext\";\nexport * from \"./utils/FormUtils\";\nexport * from \"./validationStates\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,eAAxB;AACA,cAAc,8BAAd;AACA,cAAc,mCAAd;AACA,cAAc,yCAAd;AACA,cAAc,mBAAd;AACA,cAAc,oBAAd"}
@@ -0,0 +1,185 @@
1
+ import * as React from "react";
2
+ import { StandardProps } from "@material-ui/core";
3
+ import { SliderProps, RangeProps } from "rc-slider";
4
+ import { HvFormStatus } from "../Forms/FormElement";
5
+ import { HvInputProps } from "..";
6
+
7
+ export interface KnobProperty {
8
+ color?: string;
9
+ defaultValue?: number;
10
+ hidden?: boolean;
11
+ fixed?: boolean;
12
+ hoverColor?: string;
13
+ trackColor?: string;
14
+ dragColor?: string;
15
+ }
16
+
17
+ export interface MarkProperty {
18
+ position?: number;
19
+ label?: string;
20
+ }
21
+
22
+ export type HvSliderClassKey =
23
+ | "root"
24
+ | "rootRange"
25
+ | "labelContainer"
26
+ | "label"
27
+ | "handleContainer"
28
+ | "sliderRoot"
29
+ | "trackDragging"
30
+ | "rootDisabled"
31
+ | "trackStandBy"
32
+ | "error"
33
+ | "handleHiddenContainer"
34
+ | "handleContainerDisabled"
35
+ | "labelIncluded"
36
+ | "onlyInput"
37
+ | "dot"
38
+ | "rail"
39
+ | "knobInner"
40
+ | "knobOuter"
41
+ | "knobHidden"
42
+ | "knobHiddenLast"
43
+ | "track"
44
+ | "mark"
45
+ | "sliderTooltip"
46
+ | "sliderContainer";
47
+
48
+ export interface HvSliderProps
49
+ extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvSliderClassKey, "onChange"> {
50
+ /**
51
+ * The label of the slider element.
52
+ *
53
+ * The form element must be labeled for accessibility reasons.
54
+ * If not provided, an aria-label or aria-labelledby must be provided instead.
55
+ */
56
+ label?: React.ReactNode;
57
+
58
+ /**
59
+ * The status of the slider element.
60
+ *
61
+ * Valid is correct, invalid is incorrect and standBy means no validations have run.
62
+ *
63
+ * When uncontrolled and unspecified it will default to "standBy" and change to either "valid"
64
+ * or "invalid" after any change to the state.
65
+ */
66
+ status?: HvFormStatus;
67
+ /**
68
+ * The error message to show when `status` is "invalid".
69
+ */
70
+ statusMessage?: React.ReactNode;
71
+
72
+ /**
73
+ * Whether the slider is disabled.
74
+ */
75
+ disabled?: boolean;
76
+
77
+ /**
78
+ * The object created by material to apply to the component.
79
+ */
80
+ theme?: any;
81
+
82
+ /**
83
+ * Name of the form element.
84
+ *
85
+ * Part of a name/value pair, should be the name property of the undelying native input.
86
+ */
87
+ name?: string;
88
+
89
+ /**
90
+ * The values array to apply to the component
91
+ */
92
+ values?: number[];
93
+
94
+ /**
95
+ * The default values array to apply to the component
96
+ */
97
+ defaultValues?: number[];
98
+
99
+ /**
100
+ * The object used to set the knob properties,
101
+ * for every item in the array a new knob will be created.
102
+ */
103
+ knobProperties?: KnobProperty[];
104
+
105
+ /**
106
+ * The object used to set the mark properties individually.
107
+ */
108
+ markProperties?: MarkProperty[];
109
+
110
+ /**
111
+ * the function executed before a change will occur in the slider.
112
+ */
113
+ onBeforeChange?: (value: number[]) => any;
114
+
115
+ /**
116
+ * the function executed while a change is occurring in the slider.
117
+ */
118
+ onChange?: (value: number[]) => any;
119
+
120
+ /**
121
+ * the function executed after a change ocurred in the slider.
122
+ */
123
+ onAfterChange?: (value: number[]) => any;
124
+
125
+ /**
126
+ * the separation in points between marks.
127
+ * example: if 10 divisions and a markstep of 2 there will be 5 marks.
128
+ */
129
+ markStep?: number;
130
+
131
+ /**
132
+ * how many subdivisions there are in the slider.
133
+ */
134
+ divisionQuantity?: number;
135
+
136
+ /**
137
+ * the value of the first point in the slider from left to right.
138
+ */
139
+ minPointValue?: number;
140
+
141
+ /**
142
+ * the value of the last point in the slider from left to right.
143
+ */
144
+ maxPointValue?: number;
145
+
146
+ /**
147
+ * the nax number of decimals if no format function is applied
148
+ */
149
+ markDigits?: number;
150
+
151
+ /**
152
+ * a formatting function used to add format to the marks in the track,
153
+ * the function receives the mark text
154
+ */
155
+ formatMark?: (label: React.ReactNode | string) => React.ReactNode | string;
156
+
157
+ /**
158
+ * a formatting function used to add format to the tooltip in the track,
159
+ * the function receives the mark text
160
+ */
161
+ formatTooltip?: (label: React.ReactNode | string) => React.ReactNode | string;
162
+ /**
163
+ * if `true` the input that controls the slider is hidden.
164
+ */
165
+ hideInput?: boolean;
166
+
167
+ /**
168
+ * if `true` the knobs can't have the same value, if `false` knobs can have the same value.
169
+ */
170
+ noOverlap?: boolean;
171
+ /**
172
+ * Attributes applied to the input element.
173
+ */
174
+ inputProps?: HvInputProps[];
175
+ /**
176
+ * Attributes applied to the knob element.
177
+ */
178
+ knobProps?: React.HTMLAttributes<HTMLDivElement>[];
179
+ /**
180
+ * Attributes applied to the input element.
181
+ */
182
+ sliderProps?: RangeProps | SliderProps;
183
+ }
184
+
185
+ export default function HvSlider(props: HvSliderProps): JSX.Element | null;