@hybr1d-tech/charizard 0.6.76 → 0.6.77

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.
@@ -8,6 +8,7 @@ import { SelectV2Props } from './types';
8
8
  * - `variant` (SELECT_VARIANT, optional): Defines the variant of the select component (e.g., 'default', 'users', 'checkbox', 'tags') to control the styling and behavior.
9
9
  * - `errorMsg` (string, optional): An error message to display below the select component for validation purposes.
10
10
  * - `onChange` (function): A callback function that is triggered when the selected value(s) change. It receives the selected value(s) and action meta information.
11
+ * - `customStyles` (StylesConfig<any>): custom styles for react select. it will override default styles
11
12
  * @returns The SelectV2 component.
12
13
  */
13
14
  export declare function SelectV2(props: SelectV2Props): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { MultiValue, SingleValue, ActionMeta, Props as ReactSelectProps } from 'react-select';
1
+ import { MultiValue, SingleValue, ActionMeta, StylesConfig, Props as ReactSelectProps } from 'react-select';
2
2
 
3
3
  export type OptionBase = {
4
4
  label: string;
@@ -30,4 +30,5 @@ export interface SelectV2Props extends ReactSelectProps<any, boolean> {
30
30
  mainContainerClassName?: string;
31
31
  variant?: SELECT_VARIANT;
32
32
  errorMsg?: string;
33
+ customStyles?: StylesConfig<any>;
33
34
  }
package/dist/hybr1d-ui.js CHANGED
@@ -11030,14 +11030,15 @@ function jx(e) {
11030
11030
  variant: o = Ye.DEFAULT,
11031
11031
  errorMsg: s,
11032
11032
  onChange: r,
11033
- ...l
11034
- } = e, c = (i, u) => {
11035
- if (l.isMulti) {
11036
- const p = i.map((d) => d.value);
11037
- r(p, u);
11033
+ customStyles: l = {},
11034
+ ...c
11035
+ } = e, i = (u, p) => {
11036
+ if (c.isMulti) {
11037
+ const d = u.map((m) => m.value);
11038
+ r(d, p);
11038
11039
  return;
11039
11040
  }
11040
- r((i == null ? void 0 : i.value) || "", u);
11041
+ r((u == null ? void 0 : u.value) || "", p);
11041
11042
  };
11042
11043
  return /* @__PURE__ */ n.jsxs("div", { className: I(oe.mainContainer, "zap-content-medium", a), children: [
11043
11044
  /* @__PURE__ */ n.jsx(
@@ -11046,22 +11047,22 @@ function jx(e) {
11046
11047
  classNamePrefix: "react-select",
11047
11048
  options: t,
11048
11049
  unstyled: !0,
11049
- styles: yf,
11050
+ styles: { ...yf, ...l },
11050
11051
  isClearable: !0,
11051
11052
  isSearchable: !0,
11052
11053
  hideSelectedOptions: !1,
11053
11054
  components: {
11054
- Option: (i) => /* @__PURE__ */ n.jsx(zf, { ...i, variant: o }),
11055
- MultiValue: (i) => /* @__PURE__ */ n.jsx(Yf, { ...i, variant: o }),
11056
- MultiValueRemove: (i) => /* @__PURE__ */ n.jsx(Jf, { ...i, variant: o }),
11057
- DropdownIndicator: (i) => /* @__PURE__ */ n.jsx(Wf, { ...i, variant: o }),
11058
- ClearIndicator: (i) => /* @__PURE__ */ n.jsx(Uf, { ...i, variant: o }),
11059
- SingleValue: (i) => /* @__PURE__ */ n.jsx($f, { ...i, variant: o }),
11060
- Menu: (i) => /* @__PURE__ */ n.jsx(Xf, { ...i, variant: o }),
11061
- IndicatorsContainer: (i) => /* @__PURE__ */ n.jsx(Zf, { ...i, variant: o })
11055
+ Option: (u) => /* @__PURE__ */ n.jsx(zf, { ...u, variant: o }),
11056
+ MultiValue: (u) => /* @__PURE__ */ n.jsx(Yf, { ...u, variant: o }),
11057
+ MultiValueRemove: (u) => /* @__PURE__ */ n.jsx(Jf, { ...u, variant: o }),
11058
+ DropdownIndicator: (u) => /* @__PURE__ */ n.jsx(Wf, { ...u, variant: o }),
11059
+ ClearIndicator: (u) => /* @__PURE__ */ n.jsx(Uf, { ...u, variant: o }),
11060
+ SingleValue: (u) => /* @__PURE__ */ n.jsx($f, { ...u, variant: o }),
11061
+ Menu: (u) => /* @__PURE__ */ n.jsx(Xf, { ...u, variant: o }),
11062
+ IndicatorsContainer: (u) => /* @__PURE__ */ n.jsx(Zf, { ...u, variant: o })
11062
11063
  },
11063
- onChange: c,
11064
- ...l
11064
+ onChange: i,
11065
+ ...c
11065
11066
  }
11066
11067
  ),
11067
11068
  s && /* @__PURE__ */ n.jsx("span", { className: I(oe.errorMsg, "zap-subcontent-regular"), children: s })