asheeui 0.6.3 → 0.6.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.
Files changed (70) hide show
  1. package/dist/components/accordion/Accordion.js +10 -10
  2. package/dist/components/autocomplete/Autocomplete.d.ts +8 -0
  3. package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -1
  4. package/dist/components/autocomplete/Autocomplete.js +120 -118
  5. package/dist/components/autocomplete/autocomplete-config.d.ts +29 -3
  6. package/dist/components/autocomplete/autocomplete-config.d.ts.map +1 -1
  7. package/dist/components/autocomplete/autocomplete-config.js +14 -6
  8. package/dist/components/date-picker/DatePicker.d.ts +20 -0
  9. package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
  10. package/dist/components/date-picker/DatePicker.js +230 -229
  11. package/dist/components/date-picker/date-picker-config.d.ts +16 -0
  12. package/dist/components/date-picker/date-picker-config.d.ts.map +1 -1
  13. package/dist/components/date-picker/date-picker-config.js +14 -10
  14. package/dist/components/keyboard/OnScreenKeyboard.d.ts +16 -6
  15. package/dist/components/keyboard/OnScreenKeyboard.d.ts.map +1 -1
  16. package/dist/components/keyboard/OnScreenKeyboard.js +96 -90
  17. package/dist/components/keyboard/index.js +1 -0
  18. package/dist/components/keyboard/keyboard-config.d.ts +27 -1
  19. package/dist/components/keyboard/keyboard-config.d.ts.map +1 -1
  20. package/dist/components/keyboard/keyboard-config.js +12 -8
  21. package/dist/components/keyboard/keyboard-context.d.ts +4 -7
  22. package/dist/components/keyboard/keyboard-context.d.ts.map +1 -1
  23. package/dist/components/keyboard/keyboard-context.js +61 -58
  24. package/dist/components/keyboard/keyboard-styles.d.ts +13 -0
  25. package/dist/components/keyboard/keyboard-styles.d.ts.map +1 -0
  26. package/dist/components/keyboard/keyboard-styles.js +14 -0
  27. package/dist/components/multi-select/MultiSelect.d.ts +8 -0
  28. package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
  29. package/dist/components/multi-select/MultiSelect.js +186 -184
  30. package/dist/components/multi-select/multi-select-config.d.ts +18 -0
  31. package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
  32. package/dist/components/multi-select/multi-select-config.js +14 -10
  33. package/dist/components/resizable-screen/ResizableScreen.d.ts +23 -11
  34. package/dist/components/resizable-screen/ResizableScreen.d.ts.map +1 -1
  35. package/dist/components/resizable-screen/ResizableScreen.js +69 -60
  36. package/dist/components/select/Select.d.ts +8 -6
  37. package/dist/components/select/Select.d.ts.map +1 -1
  38. package/dist/components/select/Select.js +135 -135
  39. package/dist/components/select/select-config.d.ts +27 -1
  40. package/dist/components/select/select-config.d.ts.map +1 -1
  41. package/dist/components/select/select-config.js +14 -6
  42. package/dist/components/select-menu/SelectMenu.d.ts +23 -1
  43. package/dist/components/select-menu/SelectMenu.d.ts.map +1 -1
  44. package/dist/components/select-menu/SelectMenu.js +72 -67
  45. package/dist/components/select-menu/index.d.ts +1 -0
  46. package/dist/components/select-menu/index.d.ts.map +1 -1
  47. package/dist/components/select-menu/index.js +1 -0
  48. package/dist/components/select-menu/select-menu-config.d.ts +1 -1
  49. package/dist/components/select-menu/select-menu-config.js +3 -3
  50. package/dist/components/select-menu/use-select-floating.d.ts +95 -0
  51. package/dist/components/select-menu/use-select-floating.d.ts.map +1 -0
  52. package/dist/components/select-menu/use-select-floating.js +36 -0
  53. package/dist/components/toast/toast-config.d.ts +11 -0
  54. package/dist/components/toast/toast-config.d.ts.map +1 -1
  55. package/dist/components/toast/toast-config.js +4 -2
  56. package/dist/components/toast/toast-context.d.ts +21 -1
  57. package/dist/components/toast/toast-context.d.ts.map +1 -1
  58. package/dist/components/toast/toast-context.js +134 -114
  59. package/dist/components/tooltip/Tooltip.d.ts +19 -0
  60. package/dist/components/tooltip/Tooltip.d.ts.map +1 -1
  61. package/dist/components/tooltip/Tooltip.js +129 -121
  62. package/dist/components/tooltip/tooltip-config.d.ts +7 -3
  63. package/dist/components/tooltip/tooltip-config.d.ts.map +1 -1
  64. package/dist/components/tooltip/tooltip-config.js +5 -4
  65. package/dist/config/resolve-config.d.ts.map +1 -1
  66. package/dist/utils/merge-object.d.ts +7 -1
  67. package/dist/utils/merge-object.d.ts.map +1 -1
  68. package/dist/utils/types.d.ts +16 -4
  69. package/dist/utils/types.d.ts.map +1 -1
  70. package/package.json +1 -1
@@ -1,26 +1,27 @@
1
1
  "use client";
2
2
  import { jsx as l, jsxs as S } from "react/jsx-runtime";
3
- import { useFloating as Oe, autoUpdate as Fe, offset as Ue, flip as Pe, shift as Re, size as je, useClick as Ve, useDismiss as Be, useRole as Ge, useInteractions as He } from "@floating-ui/react";
4
- import { forwardRef as $e, useId as Qe, useState as U, useMemo as P, useCallback as L } from "react";
5
- import { ChevronDownIcon as he } from "../../icons/ChevronDownIcon.js";
6
- import { CloseIcon as qe } from "../../icons/CloseIcon.js";
7
- import { useAsheeConfig as Je } from "../../libs/context.js";
8
- import { resolveCascade as d, resolveRadiusKey as R, resolveClassKey as g } from "../../utils/resolve-token.js";
9
- import { Button as We } from "../button/Button.js";
10
- import { Chip as Xe } from "../chip/Chip.js";
11
- import { FieldShell as Ye } from "../field/FieldShell.js";
12
- import { SelectMenu as Ze } from "../select-menu/SelectMenu.js";
13
- import { FALLBACK_MULTI_SELECT_CONFIG as t } from "./multi-select-config.js";
14
- import { MULTI_SELECT_HEIGHT_CLASS as Ce, MULTI_SELECT_PADDING_CLASS as es, MULTI_SELECT_FONT_CLASS as ss, STATUS_BORDER_CLASS as rs } from "./multi-select-styles.js";
15
- import { RADIUS_CLASS as ts } from "../../shared/radius.js";
16
- import { cn as w } from "../../utils/cn.js";
17
- const ls = $e(
3
+ import { useClick as Ue, useDismiss as Ve, useRole as je, useInteractions as Be } from "@floating-ui/react";
4
+ import { forwardRef as Ge, useId as He, useState as P, useMemo as R, useCallback as L } from "react";
5
+ import { ChevronDownIcon as Qe } from "../../icons/ChevronDownIcon.js";
6
+ import { CloseIcon as $e } from "../../icons/CloseIcon.js";
7
+ import { useAsheeConfig as qe } from "../../libs/context.js";
8
+ import { resolveCascade as c, resolveRadiusKey as U, resolveClassKey as g } from "../../utils/resolve-token.js";
9
+ import { Button as Je } from "../button/Button.js";
10
+ import { Chip as We } from "../chip/Chip.js";
11
+ import { FieldShell as Xe } from "../field/FieldShell.js";
12
+ import { SelectMenu as Ye } from "../select-menu/SelectMenu.js";
13
+ import { FALLBACK_MULTI_SELECT_CONFIG as s } from "./multi-select-config.js";
14
+ import { MULTI_SELECT_HEIGHT_CLASS as Ze, MULTI_SELECT_PADDING_CLASS as he, MULTI_SELECT_FONT_CLASS as Ce, STATUS_BORDER_CLASS as er } from "./multi-select-styles.js";
15
+ import { RADIUS_CLASS as rr } from "../../shared/radius.js";
16
+ import { useSelectFloating as sr } from "../select-menu/use-select-floating.js";
17
+ import { cn as T } from "../../utils/cn.js";
18
+ const tr = Ge(
18
19
  ({
19
20
  options: I = [],
20
- value: a,
21
- onChange: u,
22
- InputLabel: j = "Select Options...",
23
- isSearch: V = !0,
21
+ value: o,
22
+ onChange: m,
23
+ InputLabel: V = "Select Options...",
24
+ isSearch: j = !0,
24
25
  searchPlaceholder: B = "Search...",
25
26
  searchInputName: G = "multiselect-search",
26
27
  belowList: H,
@@ -28,180 +29,179 @@ const ls = $e(
28
29
  handleRemoveChip: n,
29
30
  handleAddChip: f,
30
31
  chipLabel: _,
31
- disableChipDisplay: $ = !1,
32
- variant: Q,
33
- color: h,
34
- size: q,
35
- radius: J,
36
- status: W,
37
- label: X,
38
- labelAlign: Y,
39
- description: Z,
32
+ disableChipDisplay: Q = !1,
33
+ variant: $,
34
+ color: q,
35
+ size: J,
36
+ radius: W,
37
+ status: X,
38
+ label: Y,
39
+ labelAlign: Z,
40
+ description: h,
40
41
  message: C,
41
42
  required: ee,
42
- isLoading: se,
43
- disabled: c,
44
- containerClassName: re,
43
+ isLoading: re,
44
+ disabled: u,
45
+ containerClassName: se,
45
46
  dropdownClassName: te,
46
47
  id: le,
47
- className: oe,
48
- menu: ae,
49
- chip: o,
50
- style: ne,
51
- ...ie
48
+ className: ae,
49
+ menu: oe,
50
+ chip: a,
51
+ portal: ne,
52
+ portalTarget: ie,
53
+ style: ce,
54
+ ...ue
52
55
  }, p) => {
53
- var D, K, M, O;
54
- const x = Je(), s = (D = x.components) == null ? void 0 : D.multiSelect, ce = Qe(), ue = le ?? ce, [v, me] = U(!1), [de, fe] = U(""), { refs: z, floatingStyles: Se, context: y } = Oe({
55
- open: v,
56
- onOpenChange: (e) => !c && me(e),
57
- placement: "bottom-start",
58
- whileElementsMounted: Fe,
59
- middleware: [
60
- Ue(4),
61
- Pe(),
62
- Re({ padding: 8 }),
63
- je({
64
- apply({ availableHeight: e, elements: r }) {
65
- Object.assign(r.floating.style, {
66
- maxHeight: `${e}px`
67
- });
68
- }
69
- })
70
- ]
71
- }), pe = Ve(y, { enabled: !c }), xe = Be(y), ve = Ge(y, { role: "listbox" }), { getReferenceProps: ye, getFloatingProps: be } = He([
72
- pe,
73
- xe,
74
- ve
75
- ]), b = d(
56
+ var D, K, F, M;
57
+ const v = qe(), e = (D = v.components) == null ? void 0 : D.multiSelect, me = He(), de = le ?? me, [x, fe] = P(!1), [Se, pe] = P(""), y = c(
58
+ J,
59
+ e == null ? void 0 : e.size,
60
+ void 0,
61
+ s.size
62
+ ), ve = c(
63
+ $,
64
+ e == null ? void 0 : e.variant,
65
+ v.defaultVariant,
66
+ s.variant
67
+ ), w = c(
76
68
  q,
77
- s == null ? void 0 : s.size,
69
+ e == null ? void 0 : e.color,
70
+ v.defaultColor,
71
+ s.color
72
+ ), A = U(
73
+ W,
74
+ e == null ? void 0 : e.radius,
75
+ v.defaultRadius,
76
+ s.radius
77
+ ), xe = c(
78
+ a == null ? void 0 : a.color,
79
+ (K = e == null ? void 0 : e.chip) == null ? void 0 : K.color,
80
+ w,
81
+ s.chip.color
82
+ ), ye = c(
83
+ a == null ? void 0 : a.size,
84
+ (F = e == null ? void 0 : e.chip) == null ? void 0 : F.size,
78
85
  void 0,
79
- t.size
80
- ), ge = d(
81
- Q,
82
- s == null ? void 0 : s.variant,
83
- x.defaultVariant,
84
- t.variant
85
- ), A = d(
86
- h,
87
- s == null ? void 0 : s.color,
88
- x.defaultColor,
89
- t.color
90
- ), E = R(
91
- J,
92
- s == null ? void 0 : s.radius,
93
- x.defaultRadius,
94
- t.radius
95
- ), we = d(
96
- o == null ? void 0 : o.color,
97
- (K = s == null ? void 0 : s.chip) == null ? void 0 : K.color,
86
+ s.chip.size
87
+ ), be = U(
88
+ a == null ? void 0 : a.radius,
89
+ (M = e == null ? void 0 : e.chip) == null ? void 0 : M.radius,
98
90
  A,
99
- t.chip.color
100
- ), Ie = d(
101
- o == null ? void 0 : o.size,
102
- (M = s == null ? void 0 : s.chip) == null ? void 0 : M.size,
91
+ s.chip.radius
92
+ ), d = X ?? "default", ge = d === "error" ? "danger" : d === "success" ? "success" : d === "warning" ? "warning" : w, Te = c(
93
+ Z,
94
+ e == null ? void 0 : e.labelAlign,
103
95
  void 0,
104
- t.chip.size
105
- ), Ne = R(
106
- o == null ? void 0 : o.radius,
107
- (O = s == null ? void 0 : s.chip) == null ? void 0 : O.radius,
108
- E,
109
- t.chip.radius
110
- ), m = W ?? "default", Le = m === "error" ? "danger" : m === "success" ? "success" : m === "warning" ? "warning" : A, _e = d(
111
- Y,
112
- s == null ? void 0 : s.labelAlign,
96
+ s.labelAlign
97
+ ), Ie = c(
98
+ ne,
99
+ e == null ? void 0 : e.portal,
113
100
  void 0,
114
- t.labelAlign
115
- ), ze = g(
116
- b,
101
+ s.portal
102
+ ), Ne = c(
103
+ ie,
104
+ e == null ? void 0 : e.portalTarget,
105
+ void 0,
106
+ s.portalTarget
107
+ ), Le = g(
108
+ y,
109
+ Ze,
110
+ s.size
111
+ ), _e = g(
112
+ y,
113
+ he,
114
+ s.size
115
+ ), we = g(
116
+ y,
117
117
  Ce,
118
- t.size
118
+ s.size
119
119
  ), Ae = g(
120
- b,
121
- es,
122
- t.size
123
- ), Ee = g(
124
- b,
125
- ss,
126
- t.size
127
- ), Te = g(
128
- Ne,
129
- ts,
130
- t.chip.radius
131
- ), i = P(() => N !== void 0 ? N : Array.isArray(a) ? I.filter((e) => a.includes(e.value)) : [], [N, a, I]), T = L(
132
- (e) => i.some((r) => r.value === e),
120
+ be,
121
+ rr,
122
+ s.chip.radius
123
+ ), { refs: z, floatingStyles: ze, context: b } = sr({
124
+ isOpen: x,
125
+ onOpenChange: fe,
126
+ disabled: u
127
+ }), Ee = Ue(b, { enabled: !u }), ke = Ve(b), De = je(b, { role: "listbox" }), { getReferenceProps: Ke, getFloatingProps: Fe } = Be([
128
+ Ee,
129
+ ke,
130
+ De
131
+ ]), i = R(() => N !== void 0 ? N : Array.isArray(o) ? I.filter((r) => o.includes(r.value)) : [], [N, o, I]), E = L(
132
+ (r) => i.some((t) => t.value === r),
133
133
  [i]
134
- ), ke = L(
135
- (e) => {
136
- const r = T(e.value);
134
+ ), Me = L(
135
+ (r) => {
136
+ const t = E(r.value);
137
137
  if (f || n)
138
- r ? n == null || n(e.value) : f == null || f(e);
139
- else if (u) {
140
- const F = a ?? [], Ke = r ? F.filter((Me) => Me !== e.value) : [...F, e.value];
141
- u(Ke);
138
+ t ? n == null || n(r.value) : f == null || f(r);
139
+ else if (m) {
140
+ const O = o ?? [], Pe = t ? O.filter((Re) => Re !== r.value) : [...O, r.value];
141
+ m(Pe);
142
142
  }
143
143
  },
144
- [T, f, n, u, a]
144
+ [E, f, n, m, o]
145
145
  ), k = L(
146
- (e) => {
147
- n ? n(e) : u && Array.isArray(a) && u(a.filter((r) => r !== e));
146
+ (r) => {
147
+ n ? n(r) : m && Array.isArray(o) && m(o.filter((t) => t !== r));
148
148
  },
149
- [n, u, a]
150
- ), De = P(
151
- () => i.map((e) => e.value),
149
+ [n, m, o]
150
+ ), Oe = R(
151
+ () => i.map((r) => r.value),
152
152
  [i]
153
153
  );
154
154
  return /* @__PURE__ */ l(
155
- Ye,
155
+ Xe,
156
156
  {
157
- id: ue,
158
- label: X,
159
- labelAlign: _e,
160
- description: Z,
157
+ id: de,
158
+ label: Y,
159
+ labelAlign: Te,
160
+ description: h,
161
161
  message: C,
162
- status: m,
162
+ status: d,
163
163
  required: ee,
164
- isLoading: se,
164
+ isLoading: re,
165
165
  children: /* @__PURE__ */ S(
166
166
  "div",
167
167
  {
168
- className: w("w-full flex flex-col gap-3", re),
169
- style: ne,
170
- ...ie,
168
+ className: T("w-full flex flex-col gap-3", se),
169
+ style: ce,
170
+ ...ue,
171
171
  children: [
172
172
  /* @__PURE__ */ S("div", { className: "relative w-full", children: [
173
173
  /* @__PURE__ */ S(
174
- We,
174
+ Je,
175
175
  {
176
- ref: (e) => {
177
- z.setReference(e), typeof p == "function" ? p(e) : p && (p.current = e);
176
+ ref: (r) => {
177
+ z.setReference(r), typeof p == "function" ? p(r) : p && (p.current = r);
178
178
  },
179
- variant: ge,
180
- color: Le,
181
- radius: E,
179
+ variant: ve,
180
+ color: ge,
181
+ radius: A,
182
182
  animate: !1,
183
- size: b,
184
- isDisabled: c,
185
- "aria-expanded": v,
183
+ size: y,
184
+ isDisabled: u,
185
+ "aria-expanded": x,
186
186
  "aria-haspopup": "listbox",
187
- "aria-invalid": m === "error",
188
- className: w(
187
+ "aria-invalid": d === "error",
188
+ className: T(
189
189
  "w-full flex items-center justify-between font-normal text-left transition-all duration-200 outline-none select-none",
190
- rs[m],
191
- ze,
192
- Ae,
193
- Ee,
194
- oe
190
+ er[d],
191
+ Le,
192
+ _e,
193
+ we,
194
+ ae
195
195
  ),
196
- ...ye(),
196
+ ...Ke(),
197
197
  children: [
198
- /* @__PURE__ */ l("span", { children: i.length > 0 ? `${i.length} selected` : j }),
198
+ /* @__PURE__ */ l("span", { children: i.length > 0 ? `${i.length} selected` : V }),
199
199
  /* @__PURE__ */ l(
200
- he,
200
+ Qe,
201
201
  {
202
- className: w(
202
+ className: T(
203
203
  "ml-2 shrink-0 transition-transform duration-200",
204
- v && "rotate-180"
204
+ x && "rotate-180"
205
205
  )
206
206
  }
207
207
  )
@@ -209,62 +209,64 @@ const ls = $e(
209
209
  }
210
210
  ),
211
211
  /* @__PURE__ */ l(
212
- Ze,
212
+ Ye,
213
213
  {
214
- isOpen: v,
215
- context: y,
216
- floatingStyles: Se,
217
- getFloatingProps: be,
214
+ isOpen: x,
215
+ context: b,
216
+ floatingStyles: ze,
217
+ getFloatingProps: Fe,
218
218
  setFloatingRef: z.setFloating,
219
219
  options: I,
220
- selectedValues: De,
221
- onSelectOption: ke,
222
- isSearch: V,
220
+ selectedValues: Oe,
221
+ onSelectOption: Me,
222
+ isSearch: j,
223
223
  searchPlaceholder: B,
224
224
  searchInputName: G,
225
- searchQuery: de,
226
- onSearchChange: fe,
225
+ searchQuery: Se,
226
+ onSearchChange: pe,
227
227
  belowList: H,
228
228
  dropdownClassName: te,
229
- menuProps: ae,
230
- menuConfig: s == null ? void 0 : s.menu
229
+ menuProps: oe,
230
+ menuConfig: e == null ? void 0 : e.menu,
231
+ portal: Ie,
232
+ portalTarget: Ne
231
233
  }
232
234
  )
233
235
  ] }),
234
- !$ && /* @__PURE__ */ S("div", { className: "flex flex-col gap-1.5", children: [
236
+ !Q && /* @__PURE__ */ S("div", { className: "flex flex-col gap-1.5", children: [
235
237
  _ && /* @__PURE__ */ l("span", { className: "text-xs font-medium text-foreground/70", children: _ }),
236
- /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-1.5 p-2 min-h-12 bg-secondary/20 border border-dashed border-border rounded-lg items-center", children: i.length === 0 ? /* @__PURE__ */ l("span", { className: "text-xs text-foreground/70 px-2 py-1", children: "No selections made" }) : i.map((e) => /* @__PURE__ */ S(
237
- Xe,
238
+ /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-1.5 p-2 min-h-12 bg-secondary/20 border border-dashed border-border rounded-lg items-center", children: i.length === 0 ? /* @__PURE__ */ l("span", { className: "text-xs text-foreground/70 px-2 py-1", children: "No selections made" }) : i.map((r) => /* @__PURE__ */ S(
239
+ We,
238
240
  {
239
241
  variant: "bordered",
240
- color: we,
241
- size: Ie,
242
- isDisabled: c,
243
- className: w(
242
+ color: xe,
243
+ size: ye,
244
+ isDisabled: u,
245
+ className: T(
244
246
  "inline-flex items-center gap-1.5 font-medium shadow-xs",
245
- Te
247
+ Ae
246
248
  ),
247
249
  children: [
248
- /* @__PURE__ */ l("span", { children: e.label }),
250
+ /* @__PURE__ */ l("span", { children: r.label }),
249
251
  /* @__PURE__ */ l(
250
252
  "button",
251
253
  {
252
254
  type: "button",
253
- tabIndex: c ? -1 : 0,
254
- onClick: (r) => {
255
- r.stopPropagation(), c || k(e.value);
255
+ tabIndex: u ? -1 : 0,
256
+ onClick: (t) => {
257
+ t.stopPropagation(), u || k(r.value);
256
258
  },
257
- onKeyDown: (r) => {
258
- (r.key === "Enter" || r.key === " ") && !c && (r.stopPropagation(), k(e.value));
259
+ onKeyDown: (t) => {
260
+ (t.key === "Enter" || t.key === " ") && !u && (t.stopPropagation(), k(r.value));
259
261
  },
260
- "aria-label": `Remove ${e.label}`,
262
+ "aria-label": `Remove ${r.label}`,
261
263
  className: "inline-flex items-center justify-center h-3.5 w-3.5 rounded-full hover:bg-black/20 dark:hover:bg-white/20 transition-colors cursor-pointer shrink-0",
262
- children: /* @__PURE__ */ l(qe, { className: "w-3 h-3" })
264
+ children: /* @__PURE__ */ l($e, { className: "w-3 h-3" })
263
265
  }
264
266
  )
265
267
  ]
266
268
  },
267
- String(e.value)
269
+ String(r.value)
268
270
  )) })
269
271
  ] })
270
272
  ]
@@ -274,7 +276,7 @@ const ls = $e(
274
276
  );
275
277
  }
276
278
  );
277
- ls.displayName = "MultiSelect";
279
+ tr.displayName = "MultiSelect";
278
280
  export {
279
- ls as MultiSelect
281
+ tr as MultiSelect
280
282
  };
@@ -35,6 +35,22 @@ export interface MultiSelectConfig extends FieldConfig {
35
35
  */
36
36
  size?: Size;
37
37
  };
38
+ /**
39
+ * Whether to render the dropdown menu in a React portal.
40
+ * When true, the menu is rendered at the document body level,
41
+ * escaping any parent DOM hierarchy. This prevents CSS containment
42
+ * and stacking context issues. Defaults to true because dropdowns
43
+ * should always appear above other content.
44
+ *
45
+ * @default true
46
+ */
47
+ portal?: boolean;
48
+ /**
49
+ * Custom portal target element for the dropdown menu.
50
+ * When portal is enabled, the menu is rendered into this element.
51
+ * Defaults to document.body.
52
+ */
53
+ portalTarget?: HTMLElement | null;
38
54
  }
39
55
  /**
40
56
  * Default config values registered for the MultiSelect component.
@@ -53,6 +69,8 @@ export declare const FALLBACK_MULTI_SELECT_CONFIG: {
53
69
  readonly radius: "sm";
54
70
  readonly variant: "solid";
55
71
  };
72
+ readonly portal: true;
73
+ readonly portalTarget: null;
56
74
  readonly size: import('../field').FieldSizeKey;
57
75
  readonly radius: Radius;
58
76
  readonly variant: Variant;
@@ -1 +1 @@
1
- {"version":3,"file":"multi-select-config.d.ts","sourceRoot":"","sources":["../../../src/components/multi-select/multi-select-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IAExB;;;OAGG;IACH,IAAI,CAAC,EAAE;QACL;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAElB;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC;QAEd;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,IAAI,CAAC,EAAE,IAAI,CAAC;KACb,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAKtC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;CAQ/B,CAAC;AAEX,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,WAAW,EAAE,iBAAiB,CAAC;KAChC;CACF"}
1
+ {"version":3,"file":"multi-select-config.d.ts","sourceRoot":"","sources":["../../../src/components/multi-select/multi-select-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IAExB;;;OAGG;IACH,IAAI,CAAC,EAAE;QACL;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAElB;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC;QAEd;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,IAAI,CAAC,EAAE,IAAI,CAAC;KACb,CAAC;IAEF;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CACnC;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAOtC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;CAU/B,CAAC;AAEX,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,WAAW,EAAE,iBAAiB,CAAC;KAChC;CACF"}
@@ -1,22 +1,26 @@
1
1
  "use client";
2
- import { registerComponentDefaults as i } from "../../libs/registry.js";
3
- import { FALLBACK_FIELD_CONFIG as e, defaultFieldConfig as t } from "../field/field-config.js";
4
- const o = {
5
- ...t,
2
+ import { registerComponentDefaults as t } from "../../libs/registry.js";
3
+ import { FALLBACK_FIELD_CONFIG as e, defaultFieldConfig as r } from "../field/field-config.js";
4
+ const l = {
5
+ ...r,
6
6
  chip: {
7
7
  size: "sm"
8
- }
9
- }, l = {
8
+ },
9
+ portal: !0,
10
+ portalTarget: null
11
+ }, a = {
10
12
  ...e,
11
13
  chip: {
12
14
  size: "sm",
13
15
  color: "primary",
14
16
  radius: "sm",
15
17
  variant: "solid"
16
- }
18
+ },
19
+ portal: !0,
20
+ portalTarget: null
17
21
  };
18
- i("multiSelect", o);
22
+ t("multiSelect", l);
19
23
  export {
20
- l as FALLBACK_MULTI_SELECT_CONFIG,
21
- o as defaultMultiSelectConfig
24
+ a as FALLBACK_MULTI_SELECT_CONFIG,
25
+ l as defaultMultiSelectConfig
22
26
  };
@@ -29,6 +29,18 @@ export interface ResizableScreenProps extends BaseResizableScreenProps {
29
29
  * Additional custom styling for the resize handle bar container.
30
30
  */
31
31
  handleClassName?: string;
32
+ /**
33
+ * Minimum height of the resizable container in pixels.
34
+ * Used when the container has no explicit height from its parent.
35
+ * @default 200
36
+ */
37
+ minContainerHeight?: number;
38
+ /**
39
+ * Minimum width of the resizable container in pixels.
40
+ * Used when the container has no explicit width from its parent.
41
+ * @default 200
42
+ */
43
+ minContainerWidth?: number;
32
44
  }
33
45
  /**
34
46
  * A split panel layout with a draggable handle for resizing the primary panel.
@@ -55,6 +67,8 @@ export interface ResizableScreenProps extends BaseResizableScreenProps {
55
67
  * @param props.orientation - Layout orientation. Defaults to "horizontal".
56
68
  * @param props.hideHandle - Whether to hide the resize handle. Defaults to false.
57
69
  * @param props.handleClassName - Extra classes for the handle bar.
70
+ * @param props.minContainerHeight - Minimum container height in pixels. Defaults to 200.
71
+ * @param props.minContainerWidth - Minimum container width in pixels. Defaults to 200.
58
72
  * @param props.className - Extra classes for the container.
59
73
  *
60
74
  * @example
@@ -63,17 +77,15 @@ export interface ResizableScreenProps extends BaseResizableScreenProps {
63
77
  *
64
78
  * export function Example() {
65
79
  * return (
66
- * <div className="h-96">
67
- * <ResizableScreen
68
- * defaultSize={60}
69
- * minSize={30}
70
- * maxSize={70}
71
- * orientation="horizontal"
72
- * >
73
- * <div className="bg-blue-100 p-4">Left Panel</div>
74
- * <div className="bg-green-100 p-4">Right Panel</div>
75
- * </ResizableScreen>
76
- * </div>
80
+ * <ResizableScreen
81
+ * defaultSize={60}
82
+ * minSize={30}
83
+ * maxSize={70}
84
+ * orientation="horizontal"
85
+ * >
86
+ * <div className="bg-blue-100 p-4">Left Panel</div>
87
+ * <div className="bg-green-100 p-4">Right Panel</div>
88
+ * </ResizableScreen>
77
89
  * );
78
90
  * }
79
91
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"ResizableScreen.d.ts","sourceRoot":"","sources":["../../../src/components/resizable-screen/ResizableScreen.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAIf,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAC;AAEnC,KAAK,wBAAwB,GAAG,qBAAqB,GACnD,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;IACpE;;;OAGG;IACH,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAEjC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,eAAO,MAAM,eAAe,iHAoP3B,CAAC"}
1
+ {"version":3,"file":"ResizableScreen.d.ts","sourceRoot":"","sources":["../../../src/components/resizable-screen/ResizableScreen.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAIf,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAC;AAEnC,KAAK,wBAAwB,GAAG,qBAAqB,GACnD,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;IACpE;;;OAGG;IACH,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAEjC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,eAAO,MAAM,eAAe,iHAiQ3B,CAAC"}