lawgic-dev-kit 0.21.0 → 0.21.6

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,4 +1,4 @@
1
1
  import { FieldValues } from 'react-hook-form';
2
2
  import { SelectInputProps } from './SelectInput.types';
3
- declare const SelectInput: <T extends FieldValues>({ options, name, control, label, placeholder, className, input, }: SelectInputProps<T>) => import("react/jsx-runtime").JSX.Element;
3
+ declare const SelectInput: <T extends FieldValues>({ options, name, control, label, placeholder, className, input, dropdownStyle, innerClassName, showChevron, }: SelectInputProps<T>) => import("react/jsx-runtime").JSX.Element;
4
4
  export default SelectInput;
@@ -1,115 +1,124 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- import { useFloating as D, useClick as H, useDismiss as U, useInteractions as Y, useTransitionStyles as _ } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
3
- import { useState as k, useRef as N, useEffect as q } from "react";
4
- import { Controller as G } from "react-hook-form";
5
- import { useTheme as J } from "../../../hooks/useTheme.js";
6
- import { autoUpdate as K } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
7
- import { offset as Q, flip as V, shift as X, size as Z, arrow as ee } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
8
- const ce = ({
2
+ import { useFloating as Y, useClick as _, useDismiss as q, useInteractions as G, useTransitionStyles as J } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
3
+ import { useState as N, useRef as S, useEffect as K } from "react";
4
+ import { Controller as Q } from "react-hook-form";
5
+ import { useTheme as V } from "../../../hooks/useTheme.js";
6
+ import { autoUpdate as X } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
7
+ import { offset as Z, flip as ee, shift as te, size as se, arrow as re } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
8
+ const pe = ({
9
9
  options: c,
10
10
  name: l,
11
11
  control: p,
12
- label: m = "Select an option",
13
- placeholder: x = "Type to search...",
12
+ label: x = "Select an option",
13
+ placeholder: m = "Type to search...",
14
14
  className: r = "",
15
- input: h = !0
15
+ input: h = !0,
16
+ dropdownStyle: f = {},
17
+ innerClassName: g = "",
18
+ showChevron: b = !0
16
19
  }) => /* @__PURE__ */ e.jsx(
17
- G,
20
+ Q,
18
21
  {
19
22
  name: l,
20
23
  control: p,
21
- render: ({ field: { onChange: f, value: o }, fieldState: { error: s } }) => /* @__PURE__ */ e.jsx(
22
- te,
24
+ render: ({ field: { onChange: y, value: n }, fieldState: { error: s } }) => /* @__PURE__ */ e.jsx(
25
+ ne,
23
26
  {
24
27
  options: c,
25
- value: o,
26
- onChange: f,
27
- label: m,
28
- placeholder: x,
28
+ value: n,
29
+ onChange: y,
30
+ label: x,
31
+ placeholder: m,
29
32
  error: s == null ? void 0 : s.message,
30
33
  className: r,
31
- input: h
34
+ input: h,
35
+ dropdownStyle: f,
36
+ innerClassName: g,
37
+ showChevron: b
32
38
  }
33
39
  )
34
40
  }
35
- ), te = ({
41
+ ), ne = ({
36
42
  options: c,
37
43
  value: l,
38
44
  onChange: p,
39
- label: m = "Select an option",
40
- placeholder: x = "Type to search...",
45
+ label: x = "Select an option",
46
+ placeholder: m = "Type to search...",
41
47
  error: r,
42
- className: h = "",
43
- input: f = !0
48
+ input: h = !0,
49
+ className: f = "",
50
+ dropdownStyle: g = {},
51
+ innerClassName: b = "",
52
+ showChevron: y = !0
44
53
  }) => {
45
- const { t: o } = J(), [s, g] = k(!1), [a, y] = k(""), [i, v] = k(
54
+ const { t: n } = V(), [s, j] = N(!1), [a, k] = N(""), [i, C] = N(
46
55
  l || null
47
- ), b = N(null), C = N(null), { x: L, y: S, strategy: M, refs: d, context: j } = D({
56
+ ), v = S(null), M = S(null), { x: T, y: $, strategy: O, refs: d, context: w } = Y({
48
57
  open: s,
49
- onOpenChange: g,
58
+ onOpenChange: j,
50
59
  middleware: [
51
- Q(8),
52
- V(),
53
- X({ padding: 8 }),
54
- Z({
55
- apply({ availableHeight: t, elements: n }) {
56
- Object.assign(n.floating.style, {
60
+ Z(8),
61
+ ee(),
62
+ te({ padding: 8 }),
63
+ se({
64
+ apply({ availableHeight: t, elements: o }) {
65
+ Object.assign(o.floating.style, {
57
66
  maxHeight: `${Math.min(t - 10, 300)}px`
58
67
  });
59
68
  },
60
69
  padding: 8
61
70
  }),
62
- ee({ element: C })
71
+ re({ element: M })
63
72
  ],
64
73
  placement: "bottom-start",
65
- whileElementsMounted: K
66
- }), T = H(j), $ = U(j), { getReferenceProps: O, getFloatingProps: P } = Y([
67
- T,
68
- $
69
- ]), { isMounted: R, styles: z } = _(j, {
74
+ whileElementsMounted: X
75
+ }), P = _(w), R = q(w), { getReferenceProps: z, getFloatingProps: F } = G([
76
+ P,
77
+ R
78
+ ]), { isMounted: I, styles: W } = J(w, {
70
79
  duration: { open: 200, close: 150 },
71
80
  initial: { opacity: 0, transform: "translateY(-4px)" }
72
- }), w = (() => {
81
+ }), L = (() => {
73
82
  const t = Array.isArray(c) ? c : [];
74
83
  if (!a.trim()) return t;
75
- const n = a.toLowerCase();
84
+ const o = a.toLowerCase();
76
85
  return t.filter((u) => {
77
- const E = u.label.toLowerCase(), A = u.key.toLowerCase();
78
- return E.includes(n) || A.includes(n);
86
+ const H = u.label.toLowerCase(), U = u.key.toLowerCase();
87
+ return H.includes(o) || U.includes(o);
79
88
  });
80
- })(), F = (t) => {
81
- v(t), g(!1), y(""), p(t);
82
- }, I = () => {
83
- g(!s), !s && b.current && setTimeout(() => {
89
+ })(), B = (t) => {
90
+ C(t), j(!1), k(""), p(t);
91
+ }, E = () => {
92
+ j(!s), !s && v.current && setTimeout(() => {
84
93
  var t;
85
- return (t = b.current) == null ? void 0 : t.focus();
94
+ return (t = v.current) == null ? void 0 : t.focus();
86
95
  }, 100);
87
96
  };
88
- q(() => {
89
- v(l);
97
+ K(() => {
98
+ C(l);
90
99
  }, [l]);
91
- const W = O({
92
- onClick: I
93
- }), B = o(x);
94
- return /* @__PURE__ */ e.jsxs("div", { className: `w-full relative flex flex-col gap-8 ${h}`, children: [
100
+ const A = z({
101
+ onClick: E
102
+ }), D = n(m);
103
+ return /* @__PURE__ */ e.jsxs("div", { className: `w-full relative flex flex-col gap-8 ${f}`, children: [
95
104
  /* @__PURE__ */ e.jsx(
96
105
  "h6",
97
106
  {
98
107
  className: `text-gray-600 font-600 group ${r ? "!text-red-500" : ""} text-label`,
99
- children: m
108
+ children: x
100
109
  }
101
110
  ),
102
111
  /* @__PURE__ */ e.jsxs(
103
112
  "div",
104
113
  {
105
114
  ref: d.setReference,
106
- className: `flex items-center justify-between bg-light rounded-full p-16 cursor-pointer
115
+ className: `${b} flex items-center justify-between bg-light rounded-full p-16 cursor-pointer
107
116
  border transition-all duration-200 hover:border-blue-400
108
117
  ${r ? "border-red-500 hover:border-red-600" : ""} ${s ? "border-blue-400" : "border-blue-100"}`,
109
- ...W,
118
+ ...A,
110
119
  children: [
111
- i ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center w-full", children: /* @__PURE__ */ e.jsx("span", { className: "flex-grow font-600 text-body-m", children: o(i.label) }) }) : /* @__PURE__ */ e.jsx("span", { className: "text-gray-400 font-600 text-body-m", children: B }),
112
- /* @__PURE__ */ e.jsx(
120
+ i ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center w-full", children: /* @__PURE__ */ e.jsx("span", { className: "flex-grow font-600 text-body-m", children: n(i.label) }) }) : /* @__PURE__ */ e.jsx("span", { className: "text-gray-400 font-600 text-body-m", children: D }),
121
+ y && /* @__PURE__ */ e.jsx(
113
122
  "svg",
114
123
  {
115
124
  className: `w-16 h-16 transition-transform ${s ? "transform rotate-180" : ""}`,
@@ -131,32 +140,33 @@ const ce = ({
131
140
  }
132
141
  ),
133
142
  r && /* @__PURE__ */ e.jsx("p", { className: "mt-1 text-sm text-red-600", children: r }),
134
- R && /* @__PURE__ */ e.jsxs(
143
+ I && /* @__PURE__ */ e.jsxs(
135
144
  "div",
136
145
  {
137
146
  ref: d.setFloating,
138
147
  style: {
139
- position: M,
140
- top: S ?? 0,
141
- left: L ?? 0,
142
- ...z,
148
+ position: O,
149
+ top: $ ?? 0,
150
+ left: T ?? 0,
151
+ ...W,
143
152
  width: d.reference.current instanceof Element ? d.reference.current.clientWidth : void 0,
144
- zIndex: 50
153
+ zIndex: 50,
154
+ ...g
145
155
  },
146
156
  className: "bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",
147
- ...P(),
157
+ ...F(),
148
158
  children: [
149
- f && /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 bg-white p-8 border-b border-gray-100 z-20", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
159
+ h && /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 bg-white p-8 border-b border-gray-100 z-20", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
150
160
  /* @__PURE__ */ e.jsx("div", { className: "absolute inset-y-0 left-0 pl-12 flex items-center pointer-events-none", children: /* @__PURE__ */ e.jsx("svg", { className: "h-16 w-16 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }) }),
151
161
  /* @__PURE__ */ e.jsx(
152
162
  "input",
153
163
  {
154
- ref: b,
164
+ ref: v,
155
165
  type: "text",
156
166
  className: "w-full py-8 pl-40 pr-12 rounded-full focus:outline-none text-body-s",
157
- placeholder: o("search_options"),
167
+ placeholder: n("search_options"),
158
168
  value: a,
159
- onChange: (t) => y(t.target.value),
169
+ onChange: (t) => k(t.target.value),
160
170
  onClick: (t) => t.stopPropagation(),
161
171
  autoFocus: !0
162
172
  }
@@ -166,22 +176,22 @@ const ce = ({
166
176
  {
167
177
  className: "absolute inset-y-0 right-0 pr-12 flex items-center",
168
178
  onClick: (t) => {
169
- t.stopPropagation(), y("");
179
+ t.stopPropagation(), k("");
170
180
  },
171
181
  children: /* @__PURE__ */ e.jsx("svg", { className: "h-16 w-16 text-gray-400 hover:text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })
172
182
  }
173
183
  )
174
184
  ] }) }),
175
- /* @__PURE__ */ e.jsx("div", { className: "max-h-[250px] overflow-y-auto", children: w.length > 0 ? /* @__PURE__ */ e.jsx("ul", { className: "py-4", children: w.map((t, n) => /* @__PURE__ */ e.jsx(
185
+ /* @__PURE__ */ e.jsx("div", { className: "max-h-[250px] overflow-y-auto", children: L.length > 0 ? /* @__PURE__ */ e.jsx("ul", { className: "py-4", children: L.map((t, o) => /* @__PURE__ */ e.jsx(
176
186
  "li",
177
187
  {
178
188
  className: `flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer ${(i == null ? void 0 : i.key) === t.key ? "bg-blue-100/30 text-blue-500 font-medium" : ""}`,
179
189
  onClick: (u) => {
180
- u.stopPropagation(), F(t);
190
+ u.stopPropagation(), B(t);
181
191
  },
182
- children: /* @__PURE__ */ e.jsx("span", { children: o(t.label) })
192
+ children: /* @__PURE__ */ e.jsx("span", { children: typeof t.label == "string" ? n(t.label) : t.expandedLabel || t.label })
183
193
  },
184
- `${t.key}-${n}`
194
+ `${t.key}-${o}`
185
195
  )) }) : /* @__PURE__ */ e.jsxs("div", { className: "px-16 py-16 text-center text-gray-500", children: [
186
196
  /* @__PURE__ */ e.jsx("svg", { className: "mx-auto h-24 w-24 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
187
197
  /* @__PURE__ */ e.jsxs("p", { className: "mt-8 text-body-s", children: [
@@ -196,5 +206,5 @@ const ce = ({
196
206
  ] });
197
207
  };
198
208
  export {
199
- ce as default
209
+ pe as default
200
210
  };
@@ -2,6 +2,7 @@ import { Control, FieldValues, Path } from 'react-hook-form';
2
2
  export interface Option {
3
3
  key: string;
4
4
  label: string;
5
+ expandedLabel?: string | React.ReactNode;
5
6
  }
6
7
  export interface SelectInputProps<T extends FieldValues> {
7
8
  options: Option[];
@@ -9,8 +10,11 @@ export interface SelectInputProps<T extends FieldValues> {
9
10
  control: Control<T>;
10
11
  label?: string;
11
12
  placeholder?: string;
12
- className?: string;
13
13
  input?: boolean;
14
+ className?: string;
15
+ innerClassName?: string;
16
+ dropdownStyle?: React.CSSProperties;
17
+ showChevron?: boolean;
14
18
  }
15
19
  export interface SelectInputFieldProps {
16
20
  options: Option[];
@@ -19,6 +23,9 @@ export interface SelectInputFieldProps {
19
23
  label?: string;
20
24
  placeholder?: string;
21
25
  error?: string;
22
- className?: string;
23
26
  input?: boolean;
27
+ className?: string;
28
+ innerClassName?: string;
29
+ dropdownStyle?: React.CSSProperties;
30
+ showChevron?: boolean;
24
31
  }
@@ -1,7 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  interface Option {
3
- label: string | React.ReactNode;
4
3
  value: number | string;
4
+ label: string | React.ReactNode;
5
+ expandedLabel?: string | React.ReactNode;
5
6
  }
6
7
  interface UncontrolledSelectorProps {
7
8
  value: number | string;
@@ -11,8 +12,11 @@ interface UncontrolledSelectorProps {
11
12
  label?: string;
12
13
  error?: string;
13
14
  disabled?: boolean;
14
- className?: string;
15
15
  allowSearch?: boolean;
16
+ className?: string;
17
+ innerClassName?: string;
18
+ dropdownStyle?: React.CSSProperties;
19
+ showChevron?: boolean;
16
20
  }
17
21
  declare const UncontrolledSelector: React.FC<UncontrolledSelectorProps>;
18
22
  export default UncontrolledSelector;
@@ -1,26 +1,29 @@
1
1
  import { j as t } from "../../../_virtual/jsx-runtime.js";
2
- import M, { useState as k, useRef as N, useMemo as f } from "react";
3
- import { useFloating as D, useClick as I, useDismiss as U, useInteractions as _, useTransitionStyles as H } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
4
- import Y from "fuse.js";
5
- import { autoUpdate as q } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
6
- import { offset as G, flip as J, shift as K, size as Q, arrow as X } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
7
- const le = ({
2
+ import M, { useState as k, useRef as N, useMemo as p } from "react";
3
+ import { useFloating as _, useClick as H, useDismiss as Y, useInteractions as q, useTransitionStyles as G } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
4
+ import J from "fuse.js";
5
+ import { autoUpdate as K } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
6
+ import { offset as Q, flip as X, shift as Z, size as ee, arrow as te } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
7
+ const ce = ({
8
8
  options: r,
9
9
  onChange: x,
10
10
  value: s,
11
11
  disabled: d,
12
- error: a,
13
- label: g = "Select an option",
14
- placeholder: L = "Select an option...",
15
- className: S = "",
16
- allowSearch: b = !1
12
+ error: o,
13
+ label: g = "",
14
+ placeholder: L = "",
15
+ allowSearch: b = !1,
16
+ className: C = "",
17
+ innerClassName: $ = "",
18
+ dropdownStyle: S = {},
19
+ showChevron: O = !0
17
20
  }) => {
18
- const [l, u] = k(!1), [o, m] = k(""), p = N(null), C = N(null), y = r.find((e) => e.value === s), j = f(() => r.map((e) => ({
21
+ const [a, u] = k(!1), [l, m] = k(""), h = N(null), R = N(null), y = r.find((e) => e.value === s), j = p(() => r.map((e) => ({
19
22
  ...e,
20
23
  // Extract text from React nodes if needed
21
24
  searchableLabel: typeof e.label == "string" ? e.label : M.isValidElement(e.label) ? c(e.label) : String(e.label),
22
25
  searchableValue: String(e.value)
23
- })), [r]), v = f(() => {
26
+ })), [r]), v = p(() => {
24
27
  const e = {
25
28
  keys: [
26
29
  { name: "searchableLabel", weight: 2 },
@@ -38,15 +41,15 @@ const le = ({
38
41
  shouldSort: !0,
39
42
  findAllMatches: !0
40
43
  };
41
- return new Y(j, e);
42
- }, [j]), { x: $, y: O, strategy: R, refs: i, context: h } = D({
43
- open: l,
44
+ return new J(j, e);
45
+ }, [j]), { x: T, y: F, strategy: P, refs: i, context: f } = _({
46
+ open: a,
44
47
  onOpenChange: u,
45
48
  middleware: [
46
- G(8),
47
- J(),
48
- K({ padding: 8 }),
49
- Q({
49
+ Q(8),
50
+ X(),
51
+ Z({ padding: 8 }),
52
+ ee({
50
53
  apply({ availableHeight: e, elements: n }) {
51
54
  Object.assign(n.floating.style, {
52
55
  maxHeight: `${Math.min(e - 10, 300)}px`
@@ -54,35 +57,35 @@ const le = ({
54
57
  },
55
58
  padding: 8
56
59
  }),
57
- X({ element: C })
60
+ te({ element: R })
58
61
  ],
59
62
  placement: "bottom-start",
60
- whileElementsMounted: q
61
- }), T = I(h), F = U(h), { getReferenceProps: P, getFloatingProps: z } = _([
62
- T,
63
- F
64
- ]), { isMounted: A, styles: E } = H(h, {
63
+ whileElementsMounted: K
64
+ }), z = H(f), A = Y(f), { getReferenceProps: E, getFloatingProps: W } = q([
65
+ z,
66
+ A
67
+ ]), { isMounted: B, styles: V } = G(f, {
65
68
  duration: { open: 200, close: 150 },
66
69
  initial: { opacity: 0, transform: "translateY(-4px)" }
67
- }), w = f(() => o.trim() ? v.search(o).map((n) => ({
70
+ }), w = p(() => l.trim() ? v.search(l).map((n) => ({
68
71
  ...n.item,
69
72
  score: n.score,
70
73
  matches: n.matches
71
- })) : r, [o, v, r]), W = (e) => {
74
+ })) : r, [l, v, r]), D = (e) => {
72
75
  x(e.value), u(!1), m("");
73
- }, B = P({
76
+ }, I = E({
74
77
  onClick: () => {
75
- d || (u(!l), !l && p.current && b && setTimeout(() => {
78
+ d || (u(!a), !a && h.current && b && setTimeout(() => {
76
79
  var e;
77
- return (e = p.current) == null ? void 0 : e.focus();
80
+ return (e = h.current) == null ? void 0 : e.focus();
78
81
  }, 100));
79
82
  }
80
83
  });
81
- return /* @__PURE__ */ t.jsxs("div", { className: `w-full relative flex flex-col gap-8 ${S}`, children: [
84
+ return /* @__PURE__ */ t.jsxs("div", { className: `w-full relative flex flex-col gap-8 ${C}`, children: [
82
85
  g && /* @__PURE__ */ t.jsx(
83
86
  "h6",
84
87
  {
85
- className: `text-gray-600 font-600 group ${a ? "!text-red-500" : ""} text-label ${d ? "text-gray-300" : ""}`,
88
+ className: `text-gray-600 font-600 group ${o ? "!text-red-500" : ""} text-label ${d ? "text-gray-300" : ""}`,
86
89
  children: g
87
90
  }
88
91
  ),
@@ -90,16 +93,16 @@ const le = ({
90
93
  "div",
91
94
  {
92
95
  ref: i.setReference,
93
- className: `flex items-center justify-between bg-light rounded-full p-16 cursor-pointer
96
+ className: `${$} flex items-center justify-between bg-light rounded-full p-16 cursor-pointer
94
97
  border transition-all duration-200 ${d ? "opacity-60 cursor-not-allowed" : "hover:border-blue-400"}
95
- ${a ? "border-red-500 hover:border-red-600" : ""} ${l ? "border-blue-400" : "border-blue-100"}`,
96
- ...B,
98
+ ${o ? "border-red-500 hover:border-red-600" : ""} ${a ? "border-blue-400" : "border-blue-100"}`,
99
+ ...I,
97
100
  children: [
98
101
  y ? /* @__PURE__ */ t.jsx("div", { className: "flex items-center w-full", children: /* @__PURE__ */ t.jsx("span", { className: "flex-grow font-600 text-body-m", children: y.label }) }) : /* @__PURE__ */ t.jsx("span", { className: "text-gray-400 font-600 text-body-m", children: L }),
99
- /* @__PURE__ */ t.jsx(
102
+ O && /* @__PURE__ */ t.jsx(
100
103
  "svg",
101
104
  {
102
- className: `w-16 h-16 transition-transform ${l ? "transform rotate-180" : ""}`,
105
+ className: `w-16 h-16 transition-transform ${a ? "transform rotate-180" : ""}`,
103
106
  fill: "none",
104
107
  stroke: "currentColor",
105
108
  viewBox: "0 0 24 24",
@@ -117,38 +120,39 @@ const le = ({
117
120
  ]
118
121
  }
119
122
  ),
120
- a && /* @__PURE__ */ t.jsx("p", { className: "mt-1 text-sm text-red-600", children: a }),
121
- A && /* @__PURE__ */ t.jsxs(
123
+ o && /* @__PURE__ */ t.jsx("p", { className: "mt-1 text-sm text-red-600", children: o }),
124
+ B && /* @__PURE__ */ t.jsxs(
122
125
  "div",
123
126
  {
124
127
  ref: i.setFloating,
125
128
  style: {
126
- position: R,
127
- top: O ?? 0,
128
- left: $ ?? 0,
129
- ...E,
129
+ position: P,
130
+ top: F ?? 0,
131
+ left: T ?? 0,
132
+ ...V,
130
133
  width: i.reference.current instanceof Element ? i.reference.current.clientWidth : void 0,
131
- zIndex: 50
134
+ zIndex: 50,
135
+ ...S
132
136
  },
133
137
  className: "bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",
134
- ...z(),
138
+ ...W(),
135
139
  children: [
136
140
  b && /* @__PURE__ */ t.jsx("div", { className: "sticky top-0 bg-white p-8 border-b border-gray-100 z-20", children: /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
137
141
  /* @__PURE__ */ t.jsx("div", { className: "absolute inset-y-0 left-0 pl-12 flex items-center pointer-events-none", children: /* @__PURE__ */ t.jsx("svg", { className: "h-16 w-16 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ t.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }) }),
138
142
  /* @__PURE__ */ t.jsx(
139
143
  "input",
140
144
  {
141
- ref: p,
145
+ ref: h,
142
146
  type: "text",
143
147
  className: "w-full py-8 pl-40 pr-12 rounded-full focus:outline-none text-body-s",
144
148
  placeholder: "Search options...",
145
- value: o,
149
+ value: l,
146
150
  onChange: (e) => m(e.target.value),
147
151
  onClick: (e) => e.stopPropagation(),
148
152
  autoFocus: !0
149
153
  }
150
154
  ),
151
- o && /* @__PURE__ */ t.jsx(
155
+ l && /* @__PURE__ */ t.jsx(
152
156
  "button",
153
157
  {
154
158
  className: "absolute inset-y-0 right-0 pr-12 flex items-center",
@@ -163,17 +167,17 @@ const le = ({
163
167
  "li",
164
168
  {
165
169
  className: `flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer ${s === e.value ? "bg-blue-100/30 text-blue-500 font-medium" : ""}`,
166
- onClick: (V) => {
167
- V.stopPropagation(), W(e);
170
+ onClick: (U) => {
171
+ U.stopPropagation(), D(e);
168
172
  },
169
- children: /* @__PURE__ */ t.jsx("span", { children: e.label })
173
+ children: /* @__PURE__ */ t.jsx("span", { children: (e == null ? void 0 : e.expandedLabel) || e.label })
170
174
  },
171
175
  `${e.value}-${n}`
172
176
  )) }) : /* @__PURE__ */ t.jsxs("div", { className: "px-16 py-16 text-center text-gray-500", children: [
173
177
  /* @__PURE__ */ t.jsx("svg", { className: "mx-auto h-24 w-24 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ t.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
174
178
  /* @__PURE__ */ t.jsxs("p", { className: "mt-8 text-body-s", children: [
175
179
  'No matches found for "',
176
- o,
180
+ l,
177
181
  '"'
178
182
  ] })
179
183
  ] }) })
@@ -192,5 +196,5 @@ const le = ({
192
196
  return Array.isArray(r) ? r.map(c).join(" ") : "";
193
197
  };
194
198
  export {
195
- le as default
199
+ ce as default
196
200
  };