ingeniuscliq-core 0.3.39 → 0.3.40
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseStyleProps } from '../../../types/ui/main';
|
|
2
2
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
3
|
+
import { Select } from '../../../ui';
|
|
3
4
|
interface FormSelectProps<T extends FieldValues = FieldValues> extends BaseStyleProps {
|
|
4
5
|
readonly control: Control<T>;
|
|
5
6
|
readonly name: Path<T>;
|
|
@@ -11,6 +12,7 @@ interface FormSelectProps<T extends FieldValues = FieldValues> extends BaseStyle
|
|
|
11
12
|
readonly className: string;
|
|
12
13
|
readonly selectClassName: string;
|
|
13
14
|
onValueChange?: (value: string) => void;
|
|
15
|
+
readonly selectProps?: React.ComponentProps<typeof Select>;
|
|
14
16
|
}
|
|
15
|
-
export declare function FormSelect<T extends FieldValues = FieldValues>({ control, name, placeholder, className, options, selectClassName, onValueChange }: FormSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function FormSelect<T extends FieldValues = FieldValues>({ control, name, placeholder, className, options, selectClassName, onValueChange, selectProps }: FormSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -5426,8 +5426,8 @@ function c4({ control: e, name: t, placeholder: n, className: r = "", checkboxPr
|
|
|
5426
5426
|
);
|
|
5427
5427
|
}
|
|
5428
5428
|
function l4({ control: e, name: t, placeholder: n, className: r = "", options: o, selectClassName: a, onValueChange: s = () => {
|
|
5429
|
-
} }) {
|
|
5430
|
-
const { t:
|
|
5429
|
+
}, selectProps: i }) {
|
|
5430
|
+
const { t: c } = kr(), u = () => n || (t ? c(`fields.${t}`) : "");
|
|
5431
5431
|
return /* @__PURE__ */ f(
|
|
5432
5432
|
jo,
|
|
5433
5433
|
{
|
|
@@ -5435,16 +5435,17 @@ function l4({ control: e, name: t, placeholder: n, className: r = "", options: o
|
|
|
5435
5435
|
name: t,
|
|
5436
5436
|
className: r,
|
|
5437
5437
|
withinControl: !0,
|
|
5438
|
-
render: (
|
|
5438
|
+
render: (d) => /* @__PURE__ */ Q(
|
|
5439
5439
|
Pd,
|
|
5440
5440
|
{
|
|
5441
|
-
onValueChange: (
|
|
5442
|
-
|
|
5441
|
+
onValueChange: (l) => {
|
|
5442
|
+
d.onChange(l), s(l);
|
|
5443
5443
|
},
|
|
5444
|
-
defaultValue:
|
|
5444
|
+
defaultValue: d.value,
|
|
5445
|
+
...i,
|
|
5445
5446
|
children: [
|
|
5446
|
-
/* @__PURE__ */ f(fu, { children: /* @__PURE__ */ f(kd, { className: a, children: /* @__PURE__ */ f(Ad, { placeholder:
|
|
5447
|
-
/* @__PURE__ */ f(Id, { children: o.map((
|
|
5447
|
+
/* @__PURE__ */ f(fu, { children: /* @__PURE__ */ f(kd, { className: a, children: /* @__PURE__ */ f(Ad, { placeholder: u() }) }) }),
|
|
5448
|
+
/* @__PURE__ */ f(Id, { children: o.map((l) => /* @__PURE__ */ f(Ld, { value: l.value, children: l.label }, l.value)) })
|
|
5448
5449
|
]
|
|
5449
5450
|
}
|
|
5450
5451
|
)
|