@overdoser/react-toolkit 0.15.0 → 0.17.0

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.
Files changed (41) hide show
  1. package/AGENTS.md +2 -0
  2. package/CHANGELOG.md +87 -0
  3. package/components/Chart/AreaChart.d.ts +5 -1
  4. package/components/Chart/AreaChart.js +155 -144
  5. package/components/Chart/BarChart.js +5 -5
  6. package/components/Chart/PieChart.js +2 -5
  7. package/components/Chart/RadarChart.js +2 -5
  8. package/components/Chart/TradingChart.js +258 -257
  9. package/components/Drawer/Drawer.js +69 -70
  10. package/components/Dropdown/Dropdown.js +51 -56
  11. package/components/Modal/Modal.js +42 -47
  12. package/components/Popover/Popover.js +52 -55
  13. package/components/SplitButton/SplitButton.js +50 -55
  14. package/components/inputs/DatePicker/CalendarPanel.d.ts +40 -0
  15. package/components/inputs/DatePicker/CalendarPanel.js +287 -0
  16. package/components/inputs/DatePicker/CalendarPanel.module.scss.js +41 -0
  17. package/components/inputs/DatePicker/DatePicker.d.ts +3 -1
  18. package/components/inputs/DatePicker/DatePicker.js +105 -192
  19. package/components/inputs/DatePicker/DatePicker.module.scss.js +20 -40
  20. package/components/inputs/DateTimePicker/DateTimePicker.d.ts +141 -0
  21. package/components/inputs/DateTimePicker/DateTimePicker.js +232 -0
  22. package/components/inputs/DateTimePicker/DateTimePicker.module.scss.js +37 -0
  23. package/components/inputs/DateTimePicker/DateTimeSegments.d.ts +48 -0
  24. package/components/inputs/DateTimePicker/DateTimeSegments.js +252 -0
  25. package/components/inputs/DateTimePicker/TimeField.d.ts +18 -0
  26. package/components/inputs/DateTimePicker/TimeField.js +135 -0
  27. package/components/inputs/DateTimePicker/index.d.ts +3 -0
  28. package/components/inputs/DateTimePicker/timeZoneUtils.d.ts +44 -0
  29. package/components/inputs/DateTimePicker/timeZoneUtils.js +102 -0
  30. package/components/inputs/NumberInput/NumberInput.js +79 -81
  31. package/components/inputs/Select/Select.d.ts +5 -0
  32. package/components/inputs/Select/Select.js +340 -285
  33. package/hooks/useEscapeLayer.d.ts +36 -0
  34. package/hooks/useEscapeLayer.js +33 -0
  35. package/index.css +1 -1
  36. package/index.d.ts +2 -0
  37. package/index.js +108 -106
  38. package/index.layered.css +1 -1
  39. package/llms.txt +29 -4
  40. package/manifest.json +127 -1
  41. package/package.json +1 -1
@@ -0,0 +1,135 @@
1
+ import { jsxs as H, jsx as d } from "react/jsx-runtime";
2
+ import { useMemo as b, useRef as g, useEffect as w } from "react";
3
+ import x from "clsx";
4
+ import S from "./DateTimePicker.module.scss.js";
5
+ const y = (n) => String(n).padStart(2, "0");
6
+ function A(n, r, l) {
7
+ const a = /* @__PURE__ */ new Set();
8
+ for (let o = 0; o <= n; o += Math.max(1, Math.floor(r))) a.add(o);
9
+ return a.add(l), Array.from(a).sort((o, f) => o - f).map((o) => ({ value: o, label: y(o) }));
10
+ }
11
+ function v({ label: n, items: r, selected: l, onSelect: a, disabled: o, classes: f }) {
12
+ const m = g(null), u = g(!1);
13
+ w(() => {
14
+ const e = m.current, t = e?.querySelector('[aria-selected="true"]');
15
+ e && t && (e.scrollTop = t.offsetTop - e.clientHeight / 2 + t.offsetHeight / 2);
16
+ }, []), w(() => {
17
+ if (!u.current) return;
18
+ u.current = !1;
19
+ const e = m.current?.querySelector('[aria-selected="true"]');
20
+ e?.focus(), e?.scrollIntoView?.({ block: "nearest" });
21
+ }, [l]);
22
+ const i = (e) => {
23
+ const t = r.findIndex((h) => h.value === l);
24
+ let s = t;
25
+ switch (e.key) {
26
+ case "ArrowDown":
27
+ s = (t + 1) % r.length;
28
+ break;
29
+ case "ArrowUp":
30
+ s = (t - 1 + r.length) % r.length;
31
+ break;
32
+ case "Home":
33
+ s = 0;
34
+ break;
35
+ case "End":
36
+ s = r.length - 1;
37
+ break;
38
+ default:
39
+ return;
40
+ }
41
+ e.preventDefault(), s !== t && (u.current = !0, a(r[s].value));
42
+ };
43
+ return (
44
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
45
+ /* @__PURE__ */ d(
46
+ "div",
47
+ {
48
+ ref: m,
49
+ role: "listbox",
50
+ "aria-label": n,
51
+ className: x(S.column, f?.column),
52
+ onKeyDown: i,
53
+ children: r.map((e) => {
54
+ const t = e.value === l;
55
+ return /* @__PURE__ */ d(
56
+ "button",
57
+ {
58
+ type: "button",
59
+ role: "option",
60
+ "aria-selected": t,
61
+ tabIndex: t ? 0 : -1,
62
+ disabled: o,
63
+ className: x(S.option, t && S.optionSelected, f?.option, t && f?.optionSelected),
64
+ onClick: () => a(e.value),
65
+ children: e.label
66
+ },
67
+ e.value
68
+ );
69
+ })
70
+ }
71
+ )
72
+ );
73
+ }
74
+ function j({
75
+ hour: n,
76
+ minute: r,
77
+ second: l,
78
+ onChange: a,
79
+ hourCycle: o,
80
+ showSeconds: f,
81
+ minuteStep: m,
82
+ disabled: u,
83
+ classes: i
84
+ }) {
85
+ const e = o === 12, t = n >= 12, s = b(() => e ? Array.from({ length: 12 }, (c, p) => ({ value: p + (t ? 12 : 0), label: y(p === 0 ? 12 : p) })) : Array.from({ length: 24 }, (c, p) => ({ value: p, label: y(p) })), [e, t]), h = b(() => A(59, m, r), [m, r]), M = b(() => A(59, 1, l), [l]), k = b(() => [{ value: 0, label: "AM" }, { value: 1, label: "PM" }], []);
86
+ return /* @__PURE__ */ H("div", { className: x(S.time, i?.time), role: "group", "aria-label": "Time", children: [
87
+ /* @__PURE__ */ d(
88
+ v,
89
+ {
90
+ label: "Hours",
91
+ items: s,
92
+ selected: n,
93
+ onSelect: (c) => a({ hour: c, minute: r, second: l }),
94
+ disabled: u,
95
+ classes: i
96
+ }
97
+ ),
98
+ /* @__PURE__ */ d(
99
+ v,
100
+ {
101
+ label: "Minutes",
102
+ items: h,
103
+ selected: r,
104
+ onSelect: (c) => a({ hour: n, minute: c, second: l }),
105
+ disabled: u,
106
+ classes: i
107
+ }
108
+ ),
109
+ f && /* @__PURE__ */ d(
110
+ v,
111
+ {
112
+ label: "Seconds",
113
+ items: M,
114
+ selected: l,
115
+ onSelect: (c) => a({ hour: n, minute: r, second: c }),
116
+ disabled: u,
117
+ classes: i
118
+ }
119
+ ),
120
+ e && /* @__PURE__ */ d(
121
+ v,
122
+ {
123
+ label: "AM/PM",
124
+ items: k,
125
+ selected: t ? 1 : 0,
126
+ onSelect: (c) => a({ hour: n % 12 + (c ? 12 : 0), minute: r, second: l }),
127
+ disabled: u,
128
+ classes: i
129
+ }
130
+ )
131
+ ] });
132
+ }
133
+ export {
134
+ j as TimeField
135
+ };
@@ -0,0 +1,3 @@
1
+ export { DateTimePicker } from './DateTimePicker';
2
+ export type { DateTimePickerProps, DateTimePickerClasses } from './DateTimePicker';
3
+ export type { TimeZoneNameStyle } from './timeZoneUtils';
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Wall-clock ⇄ instant conversion for an arbitrary IANA time zone, built on
3
+ * `Intl.DateTimeFormat` only (no date library). When `timeZone` is undefined
4
+ * every helper falls back to the plain local `Date` getters/constructor, so
5
+ * the default path is byte-for-byte what `DatePicker` does.
6
+ */
7
+ export interface WallClock {
8
+ year: number;
9
+ /** 0-based, like `Date#getMonth`. */
10
+ month: number;
11
+ day: number;
12
+ hour: number;
13
+ minute: number;
14
+ second: number;
15
+ }
16
+ export interface TimeParts {
17
+ hour: number;
18
+ minute: number;
19
+ second: number;
20
+ }
21
+ /** `true` when `Intl` accepts `timeZone` (IANA name, `'UTC'`, or an alias). */
22
+ export declare function isValidTimeZone(timeZone: string): boolean;
23
+ /** The runtime's local IANA zone (e.g. `'Europe/Bucharest'`). */
24
+ export declare function localTimeZone(): string;
25
+ /** Wall-clock fields of `date` as seen in `timeZone` (local zone when omitted). */
26
+ export declare function getWallClock(date: Date, timeZone?: string): WallClock;
27
+ /**
28
+ * The instant whose wall clock in `timeZone` reads `wc` (local zone when
29
+ * omitted). In a DST overlap (a wall-clock time that happens twice) the
30
+ * earlier instant wins; in a gap (a time that never happens) the result is
31
+ * shifted forward by the gap — the resolution most date libraries use.
32
+ */
33
+ export declare function fromWallClock(wc: WallClock, timeZone?: string): Date;
34
+ /** Local-midnight `Date` for the wall-clock day — the key the calendar grid works with. */
35
+ export declare function wallClockDay(wc: WallClock): Date;
36
+ export type TimeZoneNameStyle = 'short' | 'long' | 'shortOffset' | 'longOffset';
37
+ /**
38
+ * Localized zone name for `timeZone` at `date` (e.g. `'EDT'`, `'GMT+3'`,
39
+ * `'Coordinated Universal Time'`). Offset styles fall back to `'short'` on
40
+ * older ICU builds that don't support them.
41
+ */
42
+ export declare function timeZoneName(date: Date, timeZone: string | undefined, locale?: string, style?: TimeZoneNameStyle): string;
43
+ /** Default hour cycle for `locale` (12 for en-US, 24 for most of Europe). */
44
+ export declare function localeHourCycle(locale?: string): 12 | 24;
@@ -0,0 +1,102 @@
1
+ const i = /* @__PURE__ */ new Map();
2
+ function c(e) {
3
+ let t = i.get(e);
4
+ return t || (t = new Intl.DateTimeFormat("en-US", {
5
+ timeZone: e,
6
+ hourCycle: "h23",
7
+ year: "numeric",
8
+ month: "numeric",
9
+ day: "numeric",
10
+ hour: "numeric",
11
+ minute: "numeric",
12
+ second: "numeric"
13
+ }), i.set(e, t)), t;
14
+ }
15
+ function h(e) {
16
+ try {
17
+ return c(e), !0;
18
+ } catch {
19
+ return !1;
20
+ }
21
+ }
22
+ function y() {
23
+ return new Intl.DateTimeFormat().resolvedOptions().timeZone;
24
+ }
25
+ function f(e, t) {
26
+ if (!t)
27
+ return {
28
+ year: e.getFullYear(),
29
+ month: e.getMonth(),
30
+ day: e.getDate(),
31
+ hour: e.getHours(),
32
+ minute: e.getMinutes(),
33
+ second: e.getSeconds()
34
+ };
35
+ const n = { year: 0, month: 0, day: 1, hour: 0, minute: 0, second: 0 };
36
+ for (const r of c(t).formatToParts(e))
37
+ switch (r.type) {
38
+ case "year":
39
+ n.year = Number(r.value);
40
+ break;
41
+ case "month":
42
+ n.month = Number(r.value) - 1;
43
+ break;
44
+ case "day":
45
+ n.day = Number(r.value);
46
+ break;
47
+ case "hour":
48
+ n.hour = Number(r.value) % 24;
49
+ break;
50
+ case "minute":
51
+ n.minute = Number(r.value);
52
+ break;
53
+ case "second":
54
+ n.second = Number(r.value);
55
+ break;
56
+ }
57
+ return n;
58
+ }
59
+ function l(e) {
60
+ const t = /* @__PURE__ */ new Date(0);
61
+ return t.setUTCFullYear(e.year, e.month, e.day), t.setUTCHours(e.hour, e.minute, e.second, 0), t.getTime();
62
+ }
63
+ function s(e, t) {
64
+ return l(f(e, t)) - Math.floor(e.getTime() / 1e3) * 1e3;
65
+ }
66
+ function d(e, t) {
67
+ if (!t) {
68
+ const a = new Date(e.year, e.month, e.day, e.hour, e.minute, e.second, 0);
69
+ return e.year >= 0 && e.year < 100 && a.setFullYear(e.year), a;
70
+ }
71
+ const n = l(e), r = 864e5, u = new Set([n - r, n, n + r].map((a) => s(new Date(a), t))), o = [];
72
+ for (const a of u) {
73
+ const m = n - a;
74
+ s(new Date(m), t) === a && o.push(m);
75
+ }
76
+ return o.length > 0 ? new Date(Math.min(...o)) : new Date(n - s(new Date(n - r), t));
77
+ }
78
+ function D(e) {
79
+ const t = new Date(e.year, e.month, e.day);
80
+ return e.year >= 0 && e.year < 100 && t.setFullYear(e.year), t;
81
+ }
82
+ function b(e, t, n, r = "short") {
83
+ const u = (o) => new Intl.DateTimeFormat(n, { timeZone: t, timeZoneName: o }).formatToParts(e).find((a) => a.type === "timeZoneName")?.value ?? "";
84
+ try {
85
+ return u(r);
86
+ } catch {
87
+ return u("short");
88
+ }
89
+ }
90
+ function T(e) {
91
+ const t = new Intl.DateTimeFormat(e, { hour: "numeric" }).resolvedOptions().hourCycle;
92
+ return t === "h11" || t === "h12" ? 12 : 24;
93
+ }
94
+ export {
95
+ d as fromWallClock,
96
+ f as getWallClock,
97
+ h as isValidTimeZone,
98
+ y as localTimeZone,
99
+ T as localeHourCycle,
100
+ b as timeZoneName,
101
+ D as wallClockDay
102
+ };
@@ -1,125 +1,123 @@
1
- import { jsxs as S, jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as T, useState as U, useRef as V, useEffect as q, useCallback as M } from "react";
3
- import f from "clsx";
4
- import r from "./NumberInput.module.scss.js";
5
- const g = (n) => {
1
+ import { jsxs as B, jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as q, useState as z, useRef as L, useEffect as G, useCallback as S } from "react";
3
+ import m from "clsx";
4
+ import l from "./NumberInput.module.scss.js";
5
+ const x = (n) => {
6
6
  if (n.trim() === "") return null;
7
- const p = Number(n);
8
- return Number.isNaN(p) ? null : p;
9
- }, z = T(
7
+ const h = Number(n);
8
+ return Number.isNaN(h) ? null : h;
9
+ }, H = q(
10
10
  ({
11
11
  value: n,
12
- defaultValue: p,
13
- onChange: b,
14
- min: o,
15
- max: s,
16
- step: x = 1,
17
- precision: k,
18
- inputSize: j = "md",
19
- error: D = !1,
20
- hideControls: B = !1,
21
- disabled: l,
12
+ defaultValue: h,
13
+ onChange: v,
14
+ min: u,
15
+ max: a,
16
+ step: D = 1,
17
+ precision: N,
18
+ inputSize: R = "md",
19
+ error: C = !1,
20
+ hideControls: A = !1,
21
+ disabled: i,
22
+ readOnly: f,
22
23
  classes: d,
23
- className: L,
24
- style: R,
25
- onKeyDown: A,
26
- onBlur: F,
27
- ...C
28
- }, K) => {
29
- const u = n !== void 0, I = (u ? n : p) ?? null, [v, m] = U(I != null ? String(I) : ""), N = V(!1), a = u ? n ?? null : g(v);
30
- q(() => {
31
- u && !N.current && m(n != null ? String(n) : "");
32
- }, [u, n]);
33
- const y = M(
24
+ className: F,
25
+ style: K,
26
+ onKeyDown: W,
27
+ onBlur: E,
28
+ ...I
29
+ }, P) => {
30
+ const c = n !== void 0, j = (c ? n : h) ?? null, [g, p] = z(j != null ? String(j) : ""), w = L(!1), b = L(!1), r = c ? n ?? null : x(g);
31
+ G(() => {
32
+ c && (!w.current || b.current) && p(n != null ? String(n) : ""), b.current = !1;
33
+ }, [c, n]);
34
+ const M = S(
34
35
  (t) => {
35
36
  let e = t;
36
- if (o != null && (e = Math.max(o, e)), s != null && (e = Math.min(s, e)), k != null) {
37
- const c = 10 ** k;
38
- e = Math.round(e * c) / c;
37
+ if (u != null && (e = Math.max(u, e)), a != null && (e = Math.min(a, e)), N != null) {
38
+ const o = 10 ** N;
39
+ e = Math.round(e * o) / o;
39
40
  }
40
41
  return e;
41
42
  },
42
- [o, s, k]
43
- ), w = M(
43
+ [u, a, N]
44
+ ), y = S(
44
45
  (t) => {
45
- u || m(t != null ? String(t) : ""), b?.(t);
46
+ c ? b.current = !0 : p(t != null ? String(t) : ""), v?.(t);
46
47
  },
47
- [u, b]
48
- ), h = M(
48
+ [c, v]
49
+ ), k = S(
49
50
  (t) => {
50
- if (l) return;
51
- w(y((a ?? o ?? 0) + t * x));
51
+ if (i || f) return;
52
+ y(M((r ?? u ?? 0) + t * D));
52
53
  },
53
- [l, a, o, x, y, w]
54
- ), W = s != null && a != null && a >= s, E = o != null && a != null && a <= o, P = (t) => {
55
- A?.(t), !t.defaultPrevented && (t.key === "ArrowUp" ? (t.preventDefault(), h(1)) : t.key === "ArrowDown" && (t.preventDefault(), h(-1)));
54
+ [i, f, r, u, D, M, y]
55
+ ), T = a != null && r != null && r >= a, U = u != null && r != null && r <= u, V = (t) => {
56
+ W?.(t), !t.defaultPrevented && (t.key === "ArrowUp" ? (t.preventDefault(), k(1)) : t.key === "ArrowDown" && (t.preventDefault(), k(-1)));
56
57
  };
57
- return /* @__PURE__ */ S(
58
+ return /* @__PURE__ */ B(
58
59
  "div",
59
60
  {
60
- className: f(
61
- r.root,
62
- r[j],
63
- D && r.error,
64
- l && r.disabled,
61
+ className: m(
62
+ l.root,
63
+ l[R],
64
+ C && l.error,
65
+ i && l.disabled,
65
66
  d?.root,
66
- L
67
+ F
67
68
  ),
68
- style: R,
69
- "data-disabled": l || void 0,
69
+ style: K,
70
+ "data-disabled": i || void 0,
70
71
  children: [
71
- /* @__PURE__ */ i(
72
+ /* @__PURE__ */ s(
72
73
  "input",
73
74
  {
74
- ref: K,
75
+ ref: P,
75
76
  type: "text",
76
77
  inputMode: "decimal",
77
- className: f(r.input, d?.input),
78
- value: v,
79
- disabled: l,
80
- "aria-invalid": D || void 0,
78
+ className: m(l.input, d?.input),
79
+ value: g,
80
+ disabled: i,
81
+ readOnly: f,
82
+ "aria-invalid": C || void 0,
81
83
  onChange: (t) => {
82
- m(t.target.value), b?.(g(t.target.value));
84
+ b.current = !1, p(t.target.value), v?.(x(t.target.value));
83
85
  },
84
- onKeyDown: P,
86
+ onKeyDown: V,
85
87
  onFocus: (t) => {
86
- N.current = !0, C.onFocus?.(t);
88
+ w.current = !0, I.onFocus?.(t);
87
89
  },
88
90
  onBlur: (t) => {
89
- N.current = !1;
90
- const e = g(v);
91
- if (e != null) {
92
- const c = y(e);
93
- c !== e ? w(c) : m(String(c));
94
- }
95
- F?.(t);
91
+ w.current = !1;
92
+ const e = x(g), o = e != null ? M(e) : null;
93
+ o !== e && y(o), c ? p(r != null ? String(r) : "") : o != null && o === e && p(String(o)), E?.(t);
96
94
  },
97
- ...C
95
+ ...I
98
96
  }
99
97
  ),
100
- !B && /* @__PURE__ */ S("div", { className: f(r.controls, d?.controls), children: [
101
- /* @__PURE__ */ i(
98
+ !A && /* @__PURE__ */ B("div", { className: m(l.controls, d?.controls), children: [
99
+ /* @__PURE__ */ s(
102
100
  "button",
103
101
  {
104
102
  type: "button",
105
103
  tabIndex: -1,
106
- className: f(r.increment, d?.increment),
107
- onClick: () => h(1),
108
- disabled: l || W,
104
+ className: m(l.increment, d?.increment),
105
+ onClick: () => k(1),
106
+ disabled: i || f || T,
109
107
  "aria-label": "Increment",
110
- children: /* @__PURE__ */ i("svg", { viewBox: "0 0 10 6", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M1 5l4-4 4 4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
108
+ children: /* @__PURE__ */ s("svg", { viewBox: "0 0 10 6", "aria-hidden": "true", children: /* @__PURE__ */ s("path", { d: "M1 5l4-4 4 4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
111
109
  }
112
110
  ),
113
- /* @__PURE__ */ i(
111
+ /* @__PURE__ */ s(
114
112
  "button",
115
113
  {
116
114
  type: "button",
117
115
  tabIndex: -1,
118
- className: f(r.decrement, d?.decrement),
119
- onClick: () => h(-1),
120
- disabled: l || E,
116
+ className: m(l.decrement, d?.decrement),
117
+ onClick: () => k(-1),
118
+ disabled: i || f || U,
121
119
  "aria-label": "Decrement",
122
- children: /* @__PURE__ */ i("svg", { viewBox: "0 0 10 6", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M1 1l4 4 4-4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
120
+ children: /* @__PURE__ */ s("svg", { viewBox: "0 0 10 6", "aria-hidden": "true", children: /* @__PURE__ */ s("path", { d: "M1 1l4 4 4-4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
123
121
  }
124
122
  )
125
123
  ] })
@@ -128,7 +126,7 @@ const g = (n) => {
128
126
  );
129
127
  }
130
128
  );
131
- z.displayName = "NumberInput";
129
+ H.displayName = "NumberInput";
132
130
  export {
133
- z as NumberInput
131
+ H as NumberInput
134
132
  };
@@ -86,6 +86,11 @@ export interface SelectProps extends Omit<ComponentPropsWithRef<'select'>, 'onCh
86
86
  * - **Searchable**: set `searchable`. Custom dropdown with text filter.
87
87
  * - **Multi**: set `multiple`. Chip-based multi-select with text filter.
88
88
  *
89
+ * In the searchable and multi modes `name` / `form` go to a hidden native
90
+ * `<select>` (so the value is submitted with `FormData`), `aria-*` / `data-*`
91
+ * go to the visible control, `required` becomes `aria-required`, and
92
+ * `onFocus` / `onBlur` fire when focus enters / leaves the whole widget.
93
+ *
89
94
  * @example Native: <Select options={[{ value: 'a', label: 'A' }]} onValueChange={setValue} />
90
95
  * @example Searchable: <Select searchable options={users} value={id} onValueChange={setId} />
91
96
  * @example Multi: <Select multiple options={tags} value={selected} onValuesChange={setSelected} />