kelt-ui-kit-react 1.3.6 → 1.3.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kelt-ui-kit-react",
3
3
  "type": "module",
4
- "version": "1.3.6",
4
+ "version": "1.3.7",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
package/src/form/Form.tsx CHANGED
@@ -174,10 +174,12 @@ export const DynamicForm = forwardRef(
174
174
  <Select
175
175
  id={v.name}
176
176
  label={undefined}
177
+ name={v.name}
177
178
  options={v.options ?? []}
178
179
  disabled={disabled}
179
180
  multiple={v.multiple}
180
181
  value={values[v.name] as any}
182
+ required={required}
181
183
  defaultValue={v.value as string | string[]}
182
184
  placeholder={v.placeholder}
183
185
  onChangeMultiple={(newValue) =>
@@ -52,7 +52,7 @@ export const Input = ({
52
52
  const [showPassword, setShowPassword] = useState(false);
53
53
  return (
54
54
  <div className="input-container">
55
- <input type="text" style={{ display: "none" }} />
55
+ <input name={`hide-${name}`} type="text" style={{ display: "none" }} />
56
56
 
57
57
  <input
58
58
  ref={ref}
@@ -8,8 +8,10 @@ export interface SelectProps {
8
8
  label?: string;
9
9
  title?: string;
10
10
  disabled?: boolean;
11
+ name?: string;
11
12
  defaultValue?: string | string[];
12
13
  multiple?: boolean;
14
+ required?: boolean;
13
15
  value?: string | string[];
14
16
  className?: string;
15
17
  options: SelectOptionInterface[];
@@ -25,7 +27,9 @@ export const Select = ({
25
27
  className,
26
28
  disabled,
27
29
  multiple = false,
30
+ required = false,
28
31
  defaultValue,
32
+ name,
29
33
  onChange,
30
34
  onChangeMultiple,
31
35
  value,
@@ -64,7 +68,8 @@ export const Select = ({
64
68
  )}
65
69
  <select
66
70
  defaultValue=""
67
- required
71
+ required={required}
72
+ name={name}
68
73
  disabled={disabled}
69
74
  id={`select-${id}`}
70
75
  className="select-container-select"
@@ -8,7 +8,7 @@
8
8
  right: 1rem;
9
9
  pointer-events: none;
10
10
  }
11
- select:invalid {
11
+ select:has(option[value=""]:checked) {
12
12
  color: gray;
13
13
  }
14
14
  option {