ingeniuscliq-core 0.3.21 → 0.3.23

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.
@@ -5,9 +5,12 @@ interface FormSelectProps<T extends FieldValues = FieldValues> extends BaseStyle
5
5
  readonly control: Control<T>;
6
6
  readonly name: Path<T>;
7
7
  readonly placeholder?: string;
8
+ readonly defaultValue: CustomSelectProps['defaultValue'];
9
+ readonly value: CustomSelectProps['value'];
10
+ readonly onValueChange: CustomSelectProps['onValueChange'];
8
11
  readonly options: CustomSelectProps['options'];
9
12
  readonly className: string;
10
- readonly selectProps?: Omit<CustomSelectProps, 'options' | 'placeholder'>;
13
+ readonly selectProps?: Omit<CustomSelectProps, 'options' | 'placeholder' | 'defaultValue' | 'value' | 'onValueChange'>;
11
14
  }
12
- export declare function FormSelect<T extends FieldValues = FieldValues>({ control, name, placeholder, className, options, selectProps }: FormSelectProps<T>): import("react/jsx-runtime").JSX.Element;
15
+ export declare function FormSelect<T extends FieldValues = FieldValues>({ control, name, placeholder, className, defaultValue, value, onValueChange, options, selectProps }: FormSelectProps<T>): import("react/jsx-runtime").JSX.Element;
13
16
  export {};
@@ -5,5 +5,8 @@ export interface CustomSelectProps extends BaseStyleProps {
5
5
  readonly label: string | React.ReactNode;
6
6
  }[];
7
7
  readonly placeholder?: string;
8
+ readonly defaultValue?: string;
9
+ readonly value?: string;
10
+ readonly onValueChange?: (value: string) => void;
8
11
  }
9
- export declare function CustomSelect({ options, placeholder, className }: CustomSelectProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function CustomSelect({ options, placeholder, defaultValue, value, onValueChange, className }: CustomSelectProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.js CHANGED
@@ -8730,21 +8730,21 @@ function U1({
8730
8730
  }
8731
8731
  );
8732
8732
  }
8733
- function j1({ options: e, placeholder: t, className: n = "" }) {
8734
- return /* @__PURE__ */ Q(F1, { children: [
8735
- /* @__PURE__ */ f(W1, { className: n, children: /* @__PURE__ */ f(B1, { placeholder: t }) }),
8736
- /* @__PURE__ */ f(H1, { children: e.map((r) => /* @__PURE__ */ f(z1, { value: r.value, children: r.label }, r.value)) })
8733
+ function j1({ options: e, placeholder: t, defaultValue: n, value: r, onValueChange: o, className: a = "" }) {
8734
+ return /* @__PURE__ */ Q(F1, { defaultValue: n, value: r, onValueChange: o, children: [
8735
+ /* @__PURE__ */ f(W1, { className: a, children: /* @__PURE__ */ f(B1, { placeholder: t }) }),
8736
+ /* @__PURE__ */ f(H1, { children: e.map((s) => /* @__PURE__ */ f(z1, { value: s.value, children: s.label }, s.value)) })
8737
8737
  ] });
8738
8738
  }
8739
- function m4({ control: e, name: t, placeholder: n, className: r = "", options: o, selectProps: a }) {
8740
- const { t: s } = Zn(), i = () => n || (t ? s(`fields.${t}`) : "");
8739
+ function m4({ control: e, name: t, placeholder: n, className: r = "", defaultValue: o, value: a, onValueChange: s, options: i, selectProps: c }) {
8740
+ const { t: u } = Zn(), d = () => n || (t ? u(`fields.${t}`) : "");
8741
8741
  return /* @__PURE__ */ f(
8742
8742
  Yo,
8743
8743
  {
8744
8744
  control: e,
8745
8745
  className: r,
8746
8746
  name: t,
8747
- render: (c) => /* @__PURE__ */ f(j1, { ...c, ...a, options: o, placeholder: i() })
8747
+ render: (l) => /* @__PURE__ */ f(j1, { ...l, ...c, options: i, defaultValue: o, value: a, onValueChange: s, placeholder: d() })
8748
8748
  }
8749
8749
  );
8750
8750
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ingeniuscliq-core",
3
- "version": "0.3.21",
3
+ "version": "0.3.23",
4
4
  "description": "IngeniusCliq Core UI y lógica compartida",
5
5
  "license": "MIT",
6
6
  "type": "module",