vrfi-design-system 1.1.29 → 1.1.30

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/dist/index.d.ts CHANGED
@@ -309,7 +309,7 @@ export declare interface CheckboxProps {
309
309
  maxRows?: number;
310
310
  }
311
311
 
312
- export declare const CheckboxSelectField: ({ name, label, options, selectedOptions, handleCheckboxChange, className, size, type, required, customInput, ...props }: CheckboxSelectFieldProps) => default_2.JSX.Element;
312
+ export declare const CheckboxSelectField: ({ name, label, options, handleCheckboxChange, className, size, type, required, customInput, ...props }: CheckboxSelectFieldProps) => default_2.JSX.Element;
313
313
 
314
314
  export declare interface CheckboxSelectFieldProps extends SelectPropsBase {
315
315
  selectedOptions?: (string | number)[];
package/dist/main.es.js CHANGED
@@ -64381,7 +64381,7 @@ const ihe = ({
64381
64381
  mode: "onBlur",
64382
64382
  /**
64383
64383
  * This is an open issue in yup
64384
- * https://github.com/react-hook-form/resolvers/issues/648
64384
+ * https://github.com/react-hook-form/resolvers/issues/648
64385
64385
  */
64386
64386
  resolver: e ? ahe(e) : void 0,
64387
64387
  ...t
@@ -65704,107 +65704,110 @@ const nEe = ({
65704
65704
  name: e,
65705
65705
  label: t,
65706
65706
  options: n,
65707
- selectedOptions: r = [],
65708
- handleCheckboxChange: o = () => {
65707
+ handleCheckboxChange: r = () => {
65709
65708
  },
65710
- className: a,
65711
- size: i,
65712
- type: l,
65713
- required: s,
65714
- customInput: A,
65715
- ...u
65709
+ className: o,
65710
+ size: a,
65711
+ type: i,
65712
+ required: l,
65713
+ customInput: s,
65714
+ ...A
65716
65715
  }) => {
65717
- const d = (p, m, b) => {
65718
- const { label: h, value: w } = p;
65719
- return w ? /* @__PURE__ */ z.jsxs("div", { className: Wi.customSelectOption, children: [
65720
- /* @__PURE__ */ z.jsx(
65721
- yne,
65722
- {
65723
- checked: m.includes(w),
65724
- onChange: () => b(String(w)),
65725
- label: String(h)
65726
- }
65727
- ),
65728
- /* @__PURE__ */ z.jsx("span", { onClick: () => b(String(h)), children: String(h) })
65729
- ] }) : null;
65730
- }, f = gt(
65731
- l === Uo.SECONDARY || i ? [
65716
+ const u = gt(
65717
+ i === Uo.SECONDARY || a ? [
65732
65718
  cr.BUTTON_CLASS,
65733
- l === Uo.SECONDARY && cr.BUTTON_CLASS_SECONDARY,
65734
- i && `${cr.BUTTON_CLASS}-${i}`
65719
+ i === Uo.SECONDARY && cr.BUTTON_CLASS_SECONDARY,
65720
+ a && `${cr.BUTTON_CLASS}-${a}`
65735
65721
  ] : cr.DEFAULT,
65736
65722
  !t && cr.HAS_NO_LABEL
65737
- ), [v, g] = Pt(!1);
65723
+ ), [d, f] = Pt(!1);
65738
65724
  return /* @__PURE__ */ z.jsx(
65739
65725
  Hf,
65740
65726
  {
65741
65727
  name: e,
65742
- render: ({ field: p, fieldState: m }) => /* @__PURE__ */ z.jsxs(
65743
- "div",
65744
- {
65745
- className: l && `${cr.BUTTON_CLASS_SECONDARY}-${cr.LABEL}`,
65746
- children: [
65728
+ render: ({ field: v, fieldState: g }) => {
65729
+ const p = v.value || [], m = (h) => {
65730
+ let w;
65731
+ p.includes(h) ? w = p.filter(
65732
+ (C) => C !== h
65733
+ ) : w = [...p, h], v.onChange(w), r(String(h));
65734
+ }, b = (h) => {
65735
+ const { label: w, value: C } = h;
65736
+ return C ? /* @__PURE__ */ z.jsxs("div", { className: Wi.customSelectOption, children: [
65747
65737
  /* @__PURE__ */ z.jsx(
65748
- $a,
65738
+ yne,
65749
65739
  {
65750
- type: l === Uo.TERTIARY ? Jv.PRIMARY : void 0,
65751
- label: t,
65752
- value: (u == null ? void 0 : u.value) || p.value,
65753
- required: s,
65754
- customInput: A,
65755
- children: /* @__PURE__ */ z.jsx(
65756
- Lr,
65757
- {
65758
- ...p,
65759
- value: p.value,
65760
- onChange: (b) => p.onChange(b),
65761
- mode: kR.MULTIPLE,
65762
- maxTagCount: 1,
65763
- tagRender: () => /* @__PURE__ */ z.jsx(mi, { children: r.map(
65764
- (b) => {
65765
- var h;
65766
- return (h = n == null ? void 0 : n.find(
65767
- (w) => w.value === b
65768
- )) == null ? void 0 : h.label;
65769
- }
65770
- ).join(", ") }),
65771
- status: m.invalid ? cr.ERROR : void 0,
65772
- options: n,
65773
- optionRender: (b) => d(
65774
- b,
65775
- r,
65776
- o
65777
- ),
65778
- className: gt(
65779
- "selectedItemClass",
65780
- f,
65781
- a,
65782
- {
65783
- [Wi.tertiary]: l === Uo.TERTIARY,
65784
- [Wi.customInputDropdown]: A === !0
65785
- }
65786
- ),
65787
- size: i,
65788
- optionFilterProp: cr.LABEL,
65789
- onDropdownVisibleChange: g,
65790
- suffixIcon: /* @__PURE__ */ z.jsx(
65791
- "i",
65792
- {
65793
- className: gt(
65794
- mt.CANDIDATE_DOWN_ARROW,
65795
- v && Wi.rotateArrowIcon
65796
- )
65797
- }
65798
- ),
65799
- ...u
65800
- }
65801
- )
65740
+ checked: p.includes(C),
65741
+ onChange: () => m(C),
65742
+ label: String(w)
65802
65743
  }
65803
65744
  ),
65804
- /* @__PURE__ */ z.jsx(ko, { fieldName: e })
65805
- ]
65806
- }
65807
- )
65745
+ /* @__PURE__ */ z.jsx("span", { onClick: () => m(C), children: String(w) })
65746
+ ] }) : null;
65747
+ };
65748
+ return /* @__PURE__ */ z.jsxs(
65749
+ "div",
65750
+ {
65751
+ className: i && `${cr.BUTTON_CLASS_SECONDARY}-${cr.LABEL}`,
65752
+ children: [
65753
+ /* @__PURE__ */ z.jsx(
65754
+ $a,
65755
+ {
65756
+ type: i === Uo.TERTIARY ? Jv.PRIMARY : void 0,
65757
+ label: t,
65758
+ value: (A == null ? void 0 : A.value) || v.value,
65759
+ required: l,
65760
+ customInput: s,
65761
+ children: /* @__PURE__ */ z.jsx(
65762
+ Lr,
65763
+ {
65764
+ ...v,
65765
+ value: v.value,
65766
+ onChange: (h) => v.onChange(h),
65767
+ mode: kR.MULTIPLE,
65768
+ maxTagCount: 1,
65769
+ tagRender: () => /* @__PURE__ */ z.jsx(mi, { children: (v.value || []).map(
65770
+ (h) => {
65771
+ var w;
65772
+ return (w = n == null ? void 0 : n.find(
65773
+ (C) => C.value === h
65774
+ )) == null ? void 0 : w.label;
65775
+ }
65776
+ ).filter(Boolean).join(", ") }),
65777
+ status: g.invalid ? cr.ERROR : void 0,
65778
+ options: n,
65779
+ optionRender: b,
65780
+ className: gt(
65781
+ "selectedItemClass",
65782
+ u,
65783
+ o,
65784
+ {
65785
+ [Wi.tertiary]: i === Uo.TERTIARY,
65786
+ [Wi.customInputDropdown]: s === !0
65787
+ }
65788
+ ),
65789
+ size: a,
65790
+ optionFilterProp: cr.LABEL,
65791
+ onDropdownVisibleChange: f,
65792
+ suffixIcon: /* @__PURE__ */ z.jsx(
65793
+ "i",
65794
+ {
65795
+ className: gt(
65796
+ mt.CANDIDATE_DOWN_ARROW,
65797
+ d && Wi.rotateArrowIcon
65798
+ )
65799
+ }
65800
+ ),
65801
+ ...A
65802
+ }
65803
+ )
65804
+ }
65805
+ ),
65806
+ /* @__PURE__ */ z.jsx(ko, { fieldName: e })
65807
+ ]
65808
+ }
65809
+ );
65810
+ }
65808
65811
  }
65809
65812
  );
65810
65813
  }, mbe = "_applicationHeader_1yznv_24", gbe = "_headerLeft_1yznv_44", pbe = "_headerRight_1yznv_50", hbe = "_candidateProfile_1yznv_56", bbe = "_userProfileDropdown_1yznv_56", Cbe = "_userNameText_1yznv_64", ybe = "_logo_1yznv_71", wbe = "_icon_1yznv_76", xbe = "_jobTrackLabel_1yznv_80", Ebe = "_searchField_1yznv_176", Ga = {