@slotted/react 0.1.0-beta.4 → 0.1.0-beta.5

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 (183) hide show
  1. package/README.md +16 -1
  2. package/dist/{action-bar-OACchRZw.js → action-bar-ti3e6FK1.js} +1 -1
  3. package/dist/action-bar.js +1 -1
  4. package/dist/{app-shell-CmYvnu_7.js → app-shell-nnSP44OO.js} +271 -267
  5. package/dist/app-shell.js +1 -1
  6. package/dist/bin/slotted-agent-docs.mjs +297 -0
  7. package/dist/{cascader-D1AhTyBL.js → cascader-Cn2Acpcv.js} +227 -210
  8. package/dist/cascader.js +1 -1
  9. package/dist/chart-04i6NZQA.js +968 -0
  10. package/dist/chart.js +1 -1
  11. package/dist/{checkbox-DfxFHZaU.js → checkbox-B4Sb1eXj.js} +3 -3
  12. package/dist/{checkbox-group-9sDgrV5Z.js → checkbox-group-LpGMuq9w.js} +2 -2
  13. package/dist/checkbox-group.js +1 -1
  14. package/dist/checkbox.js +1 -1
  15. package/dist/{code-block-CFHf8uTm.js → code-block-CTNiyt0U.js} +1 -1
  16. package/dist/code-block.js +1 -1
  17. package/dist/{color-picker-CwbWzCKg.js → color-picker-BcRCeISx.js} +4 -4
  18. package/dist/color-picker.js +1 -1
  19. package/dist/{column-manager-CTtizVhm.js → column-manager-BtkYLs5G.js} +4 -4
  20. package/dist/column-manager.js +1 -1
  21. package/dist/{combobox-BVMI9lg8.js → combobox-C1D5doWM.js} +227 -198
  22. package/dist/combobox.js +1 -1
  23. package/dist/{context-menu-BuST6W94.js → context-menu-B00UIBVC.js} +1 -1
  24. package/dist/context-menu.js +1 -1
  25. package/dist/{currency-field-DD9A5U3D.js → currency-field-Dti9JFu0.js} +1 -1
  26. package/dist/currency-field.js +1 -1
  27. package/dist/{dashboard-grid-CBMP_-JV.js → dashboard-grid-CoLKLvYL.js} +1 -1
  28. package/dist/dashboard-grid.js +1 -1
  29. package/dist/{data-grid-Eb-a4jg3.js → data-grid-DX95Y7mY.js} +18 -18
  30. package/dist/data-grid.js +1 -1
  31. package/dist/{data-list-oICmxGkA.js → data-list-CWYTPNm-.js} +2 -2
  32. package/dist/data-list.js +1 -1
  33. package/dist/{date-field-Hr-OCU-H.js → date-field-BxEpqAPg.js} +1 -1
  34. package/dist/date-field.js +1 -1
  35. package/dist/date-picker-DRk9SZp1.js +308 -0
  36. package/dist/date-picker.js +1 -1
  37. package/dist/date-range-picker-6Yz7avTS.js +483 -0
  38. package/dist/date-range-picker.js +1 -1
  39. package/dist/{datetime-field-B8TrmsDK.js → datetime-field-D2f9u6im.js} +1 -1
  40. package/dist/datetime-field.js +1 -1
  41. package/dist/datetime-picker-STqSWMkH.js +645 -0
  42. package/dist/datetime-picker.js +1 -1
  43. package/dist/datetime-range-picker-DQNQwr3K.js +1000 -0
  44. package/dist/datetime-range-picker.js +1 -1
  45. package/dist/{detail-panel-CW53lUjp.js → detail-panel-z6WGleP4.js} +1 -1
  46. package/dist/detail-panel.js +1 -1
  47. package/dist/docs/AGENTS.snippet.md +2 -0
  48. package/dist/docs/app-shell.examples.md +1 -1
  49. package/dist/docs/app-shell.json +4 -4
  50. package/dist/docs/app-shell.md +2 -2
  51. package/dist/docs/guidelines/README.md +2 -2
  52. package/dist/docs/guidelines/index.md +1 -1
  53. package/dist/docs/guidelines/own-elements.md +1 -1
  54. package/dist/docs/page-header.json +1 -0
  55. package/dist/docs/page-header.md +1 -1
  56. package/dist/docs/skills/build-own-element/SKILL.md +6 -6
  57. package/dist/docs/skills/compose-screen/SKILL.md +6 -6
  58. package/dist/docs/skills/review-screen/SKILL.md +6 -6
  59. package/dist/docs/skills/theme-app/SKILL.md +1 -1
  60. package/dist/docs/skills/waiting-states/SKILL.md +2 -2
  61. package/dist/docs/tabs.json +13 -3
  62. package/dist/docs/tabs.md +3 -2
  63. package/dist/{entity-picker-Dn1T7JCq.js → entity-picker-BdySwW8F.js} +274 -256
  64. package/dist/entity-picker.js +1 -1
  65. package/dist/{event-calendar-CnF3iIZD.js → event-calendar-CiphPXdV.js} +4 -4
  66. package/dist/event-calendar.js +1 -1
  67. package/dist/{field-NJaCxl2h.js → field-BxQFpOXS.js} +1 -1
  68. package/dist/{field-group-hAzVa2O9.js → field-group-DcN_hiZN.js} +1 -1
  69. package/dist/field-group.js +1 -1
  70. package/dist/field.js +1 -1
  71. package/dist/{filter-bar-CHyy1o--.js → filter-bar-C_dXljI_.js} +10 -10
  72. package/dist/filter-bar.js +1 -1
  73. package/dist/{hover-card-BJE5dtaQ.js → hover-card-DpVzwvDJ.js} +1 -1
  74. package/dist/hover-card.js +1 -1
  75. package/dist/{import-export-center-jF37b909.js → import-export-center-BQnMJz4g.js} +3 -3
  76. package/dist/import-export-center.js +1 -1
  77. package/dist/index.js +63 -63
  78. package/dist/{listbox-Dv856z9I.js → listbox-D0MJcAMm.js} +1 -1
  79. package/dist/listbox.js +1 -1
  80. package/dist/{markdown-CeG8mUbI.js → markdown-IiVoh6yi.js} +2 -2
  81. package/dist/markdown.js +1 -1
  82. package/dist/menu-parts-D6v_mz6O.js +809 -0
  83. package/dist/menu.js +1 -1
  84. package/dist/{menubar-b2CruimJ.js → menubar-DApIg1eR.js} +1 -1
  85. package/dist/menubar.js +1 -1
  86. package/dist/{multi-select-DQ5ds0fX.js → multi-select-B8z6ApgW.js} +286 -257
  87. package/dist/multi-select.js +1 -1
  88. package/dist/{notification-center-C1iWWl5Y.js → notification-center-CGEEHcRA.js} +2 -2
  89. package/dist/notification-center.js +1 -1
  90. package/dist/{number-field-BFIAmv-z.js → number-field-DXk1TAXA.js} +1 -1
  91. package/dist/number-field.js +1 -1
  92. package/dist/{otp-input-BNQhuKaT.js → otp-input-CI-kdNgx.js} +1 -1
  93. package/dist/otp-input.js +1 -1
  94. package/dist/{popover-Be7JWbGJ.js → popover-DEp8Bf3e.js} +186 -166
  95. package/dist/popover.js +1 -1
  96. package/dist/{prompt-composer-BxpdkTpZ.js → prompt-composer-DdcU3S3L.js} +1 -1
  97. package/dist/prompt-composer.js +1 -1
  98. package/dist/{radio-group-BaVIP9UH.js → radio-group-D8csBZ8Z.js} +2 -2
  99. package/dist/radio-group.js +1 -1
  100. package/dist/{rating-DYBQBzwB.js → rating-rI3b5zII.js} +1 -1
  101. package/dist/rating.js +1 -1
  102. package/dist/{saved-views-DlE_--Z9.js → saved-views-B3brBTD9.js} +4 -4
  103. package/dist/saved-views.js +1 -1
  104. package/dist/scroll-area-DQ_ansLu.js +112 -0
  105. package/dist/scroll-area.js +1 -1
  106. package/dist/{segmented-control-DmuOGiu6.js → segmented-control-C-PzkTtg.js} +2 -2
  107. package/dist/segmented-control.js +1 -1
  108. package/dist/{select-M7Io4UL9.js → select-BUylPwpb.js} +241 -203
  109. package/dist/select.js +1 -1
  110. package/dist/{side-navigation-CBLtCzuJ.js → side-navigation-Bm-BZma1.js} +156 -140
  111. package/dist/side-navigation.js +1 -1
  112. package/dist/{slider-DTes4HLF.js → slider-fp7kyg-6.js} +1 -1
  113. package/dist/slider.js +1 -1
  114. package/dist/{split-button-CPgHiy9G.js → split-button-DKRm0j5c.js} +1 -1
  115. package/dist/split-button.js +1 -1
  116. package/dist/styles.css +1 -1
  117. package/dist/{switch-DQzuIhPX.js → switch-aVoc4C2F.js} +1 -1
  118. package/dist/switch.js +1 -1
  119. package/dist/{table-U9eJYCuB.js → table-BYEvFr4P.js} +276 -275
  120. package/dist/table.js +1 -1
  121. package/dist/{tabs-BtHmjlnM.js → tabs-HWmvOKM4.js} +109 -102
  122. package/dist/tabs.js +1 -1
  123. package/dist/{tags-input-CcOkm0AW.js → tags-input-pbv6x1Pi.js} +1 -1
  124. package/dist/tags-input.js +1 -1
  125. package/dist/{text-field-DLfIZ0fk.js → text-field-CbQ6UCAP.js} +1 -1
  126. package/dist/text-field.js +1 -1
  127. package/dist/{textarea-CBJBJBi6.js → textarea-DJSfhrXH.js} +1 -1
  128. package/dist/textarea.js +1 -1
  129. package/dist/{time-field-DrhiCtUl.js → time-field-BI9n607q.js} +1 -1
  130. package/dist/time-field.js +1 -1
  131. package/dist/time-picker-D6SlQWNF.js +402 -0
  132. package/dist/time-picker.js +1 -1
  133. package/dist/time-range-picker-CcV3_45h.js +751 -0
  134. package/dist/time-range-picker.js +1 -1
  135. package/dist/{toggle-group-7iBR9Rn1.js → toggle-group-i7JPO8BM.js} +1 -1
  136. package/dist/toggle-group.js +1 -1
  137. package/dist/{toolbar-DDZpEftQ.js → toolbar-B9knmgHA.js} +1 -1
  138. package/dist/toolbar.js +1 -1
  139. package/dist/tooltip-CgjIROUy.js +410 -0
  140. package/dist/tooltip.js +1 -1
  141. package/dist/{top-navigation-e-tWMGNr.js → top-navigation-DiG2PF5W.js} +2 -2
  142. package/dist/top-navigation.js +1 -1
  143. package/dist/{transfer-CqZOTLMP.js → transfer--UOQVeKE.js} +5 -5
  144. package/dist/transfer.js +1 -1
  145. package/dist/types/app-shell/app-shell-parts.d.ts +6 -4
  146. package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
  147. package/dist/types/app-shell/app-shell.d.ts.map +1 -1
  148. package/dist/types/cascader/cascader.d.ts.map +1 -1
  149. package/dist/types/chart/chart.d.ts.map +1 -1
  150. package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
  151. package/dist/types/date-picker/date-picker.d.ts.map +1 -1
  152. package/dist/types/date-range-picker/date-range-picker.d.ts.map +1 -1
  153. package/dist/types/datetime-picker/datetime-picker.d.ts.map +1 -1
  154. package/dist/types/datetime-range-picker/datetime-range-picker.d.ts.map +1 -1
  155. package/dist/types/entity-picker/entity-picker-popup.d.ts.map +1 -1
  156. package/dist/types/menu/menu-parts.d.ts.map +1 -1
  157. package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
  158. package/dist/types/popover/popover-parts.d.ts.map +1 -1
  159. package/dist/types/scroll-area/scroll-area.d.ts.map +1 -1
  160. package/dist/types/select/select-parts.d.ts.map +1 -1
  161. package/dist/types/side-navigation/side-navigation-parts.d.ts.map +1 -1
  162. package/dist/types/stat-card/stat-card.types.d.ts +2 -2
  163. package/dist/types/stat-card/stat-card.types.d.ts.map +1 -1
  164. package/dist/types/table/table-content.d.ts.map +1 -1
  165. package/dist/types/tabs/tabs-parts.d.ts +2 -4
  166. package/dist/types/tabs/tabs-parts.d.ts.map +1 -1
  167. package/dist/types/tabs/tabs.d.ts.map +1 -1
  168. package/dist/types/time-picker/time-picker.d.ts.map +1 -1
  169. package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
  170. package/dist/types/tooltip/tooltip-parts.d.ts.map +1 -1
  171. package/dist/{upload-DjnlVR8y.js → upload-CLX5cURk.js} +1 -1
  172. package/dist/upload.js +1 -1
  173. package/package.json +10 -7
  174. package/dist/chart-O0ZhkzJe.js +0 -966
  175. package/dist/date-picker-D3-y2Jxw.js +0 -295
  176. package/dist/date-range-picker-y3b82Wmf.js +0 -471
  177. package/dist/datetime-picker-CIRHVLQp.js +0 -629
  178. package/dist/datetime-range-picker-DM-1m98z.js +0 -994
  179. package/dist/menu-parts-W58pVNUt.js +0 -786
  180. package/dist/scroll-area-BriwmvYY.js +0 -111
  181. package/dist/time-picker-CRQsMJbQ.js +0 -396
  182. package/dist/time-range-picker-DlZJsj1e.js +0 -745
  183. package/dist/tooltip-DbKTPe_i.js +0 -392
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./multi-select-DQ5ds0fX.js";
1
+ import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./multi-select-B8z6ApgW.js";
2
2
  export { i as MULTI_SELECT_FALLBACK, c as MultiSelect, r as MultiSelectContent, e as MultiSelectControl, u as MultiSelectDefaultsProvider, l as MultiSelectGroup, a as MultiSelectItem, s as MultiSelectSeparator, o as NARROW_WIDTH, t as useMultiSelect, n as useMultiSelectDefaults };
@@ -1,9 +1,9 @@
1
1
  import { n as e, t } from "./icon-T9Yt4tnm.js";
2
2
  import { n, r } from "./i18n-DpW8lqJ1.js";
3
3
  import { n as i } from "./icon-button-CCWkCDMs.js";
4
- import { a, i as o, n as s, r as c } from "./tooltip-DbKTPe_i.js";
4
+ import { a, i as o, n as s, r as c } from "./tooltip-CgjIROUy.js";
5
5
  import { i as l, t as ee } from "./skeleton-2LSpg84Z.js";
6
- import { a as u, r as d, t as te } from "./tabs-BtHmjlnM.js";
6
+ import { a as u, r as d, t as te } from "./tabs-HWmvOKM4.js";
7
7
  import { tabbables as ne } from "@slotted/core/focus";
8
8
  import { createControllable as re } from "@slotted/core/state";
9
9
  import { createContext as ie, useCallback as f, useContext as ae, useEffect as p, useId as oe, useImperativeHandle as se, useLayoutEffect as ce, useMemo as m, useRef as h, useState as g } from "react";
@@ -1,2 +1,2 @@
1
- import { n as e, r as t, t as n } from "./notification-center-C1iWWl5Y.js";
1
+ import { n as e, r as t, t as n } from "./notification-center-CGEEHcRA.js";
2
2
  export { n as NotificationCenter, e as NotificationCenterDefaultsProvider, t as useNotificationCenterDefaults };
@@ -1,6 +1,6 @@
1
1
  import { n as e, t } from "./icon-T9Yt4tnm.js";
2
2
  import { n, r } from "./i18n-DpW8lqJ1.js";
3
- import { b as i } from "./field-NJaCxl2h.js";
3
+ import { b as i } from "./field-BxQFpOXS.js";
4
4
  import { createControllable as a } from "@slotted/core/state";
5
5
  import { createContext as o, useCallback as s, useContext as c, useEffect as l, useImperativeHandle as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
6
6
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "./number-field-BFIAmv-z.js";
1
+ import { i as e, n as t, r as n, t as r } from "./number-field-DXk1TAXA.js";
2
2
  export { r as NumberField, n as NumberFieldDefaultsProvider, t as NumberFieldScrub, e as useNumberFieldDefaults };
@@ -1,4 +1,4 @@
1
- import { b as e } from "./field-NJaCxl2h.js";
1
+ import { b as e } from "./field-BxQFpOXS.js";
2
2
  import { createControllable as t } from "@slotted/core/state";
3
3
  import { createContext as n, useContext as r, useEffect as i, useRef as a, useState as o } from "react";
4
4
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
package/dist/otp-input.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, r as t, t as n } from "./otp-input-BNQhuKaT.js";
1
+ import { n as e, r as t, t as n } from "./otp-input-CI-kdNgx.js";
2
2
  export { n as OtpInput, e as OtpInputDefaultsProvider, t as useOtpInputDefaults };
@@ -4,13 +4,13 @@ import { createControllable as r } from "@slotted/core/state";
4
4
  import { Children as i, createContext as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useImperativeHandle as d, useLayoutEffect as f, useRef as p, useState as m } from "react";
5
5
  import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
6
6
  import { createPresence as v } from "@slotted/core/presence";
7
- import { createPortalRoot as y, setPortalContainer as b } from "@slotted/core/portal";
8
- import { createDismissableLayer as x } from "@slotted/core/dismissable-layer";
9
- import { createPositioner as S } from "@slotted/core/positioner";
10
- import { createPortal as C } from "react-dom";
11
- import { popoverMessages as w } from "@slotted/core/i18n";
7
+ import { createPortalRoot as ee, setPortalContainer as y } from "@slotted/core/portal";
8
+ import { createDismissableLayer as te } from "@slotted/core/dismissable-layer";
9
+ import { createPositioner as ne } from "@slotted/core/positioner";
10
+ import { createPortal as re } from "react-dom";
11
+ import { popoverMessages as b } from "@slotted/core/i18n";
12
12
  //#region src/popover/popover-defaults.tsx
13
- var T = {
13
+ var x = {
14
14
  align: "center",
15
15
  alignOffset: 0,
16
16
  arrow: !0,
@@ -29,49 +29,49 @@ var T = {
29
29
  size: "md",
30
30
  strategy: "absolute",
31
31
  width: "auto"
32
- }, E = a(T);
33
- function D() {
34
- return c(E);
32
+ }, S = a(x);
33
+ function C() {
34
+ return c(S);
35
35
  }
36
- function O({ children: e, container: t, ...n }) {
36
+ function w({ children: e, container: t, ...n }) {
37
37
  let r = {
38
- ...D(),
39
- ...k(n)
38
+ ...C(),
39
+ ...T(n)
40
40
  };
41
41
  return l(() => {
42
- if (t !== void 0) return b(t), () => b(null);
43
- }, [t]), /* @__PURE__ */ g(E.Provider, {
42
+ if (t !== void 0) return y(t), () => y(null);
43
+ }, [t]), /* @__PURE__ */ g(S.Provider, {
44
44
  value: r,
45
45
  children: e
46
46
  });
47
47
  }
48
- function k(e) {
48
+ function T(e) {
49
49
  let t = Object.entries(e).filter(([, e]) => e !== void 0);
50
50
  return Object.fromEntries(t);
51
51
  }
52
52
  //#endregion
53
53
  //#region src/popover/popover.tsx
54
- var A = a(void 0), j = a({ current: void 0 });
55
- function ee() {
56
- return c(j);
54
+ var E = a(void 0), D = a({ current: void 0 });
55
+ function ie() {
56
+ return c(D);
57
57
  }
58
- function M() {
59
- let e = c(A);
58
+ function O() {
59
+ let e = c(E);
60
60
  if (e === void 0) throw Error("Every Popover part has to be inside a Popover.");
61
61
  return e;
62
62
  }
63
- function N({ align: e, alignOffset: t, arrow: i, arrowPadding: a, autoFocus: o, children: c, closeOnEscape: l, closeOnOutsidePress: f, collisionPadding: h, defaultOpen: _, disabled: v, finalFocus: y, flip: b, hideWhenDetached: x, initialFocus: S, messages: C, mount: T, onOpenChange: E, open: O, portal: k, ref: ee, shift: M, side: N, sideOffset: P, size: F, strategy: I, width: L }) {
64
- let R = D(), z = n(w, C), B = u(), [V, H] = m(_ ?? !1), [U, W] = m(null), [G, K] = m(null), [q, J] = m(null), [Y, X] = m(null), [Z, te] = m(!1), [ne, re] = m(!1), ie = p(void 0), ae = v === !0, Q = (O ?? V) && !ae, oe = p(Q);
63
+ function k({ align: e, alignOffset: t, arrow: i, arrowPadding: a, autoFocus: o, children: c, closeOnEscape: l, closeOnOutsidePress: f, collisionPadding: h, defaultOpen: _, disabled: v, finalFocus: ee, flip: y, hideWhenDetached: te, initialFocus: ne, messages: re, mount: x, onOpenChange: S, open: w, portal: T, ref: ie, shift: O, side: k, sideOffset: A, size: j, strategy: M, width: ae }) {
64
+ let N = C(), P = n(b, re), F = u(), [I, L] = m(_ ?? !1), [R, z] = m(null), [B, V] = m(null), [H, U] = m(null), [W, G] = m(null), [K, q] = m(!1), [J, Y] = m(!1), X = p(void 0), Z = v === !0, Q = (w ?? I) && !Z, oe = p(Q);
65
65
  Q && (oe.current = !0);
66
66
  let se = p({
67
67
  current: Q,
68
- onOpenChange: E,
69
- open: O
68
+ onOpenChange: S,
69
+ open: w
70
70
  });
71
71
  se.current = {
72
72
  current: Q,
73
- onOpenChange: E,
74
- open: O
73
+ onOpenChange: S,
74
+ open: w
75
75
  };
76
76
  let $ = s((e, t, n) => {
77
77
  let i = se.current;
@@ -83,83 +83,83 @@ function N({ align: e, alignOffset: t, arrow: i, arrowPadding: a, autoFocus: o,
83
83
  a = e.cancelled, i.onOpenChange?.(e.value, e);
84
84
  }
85
85
  }).request(e, t, n);
86
- a || o && H(e);
86
+ a || o && L(e);
87
87
  }, []);
88
- d(ee, () => ({
88
+ d(ie, () => ({
89
89
  close: () => $(!1, "programmatic"),
90
90
  open: () => $(!0, "programmatic"),
91
- reposition: () => ie.current?.()
91
+ reposition: () => X.current?.()
92
92
  }), [$]);
93
93
  let ce = {
94
- align: e ?? R.align,
95
- alignOffset: t ?? R.alignOffset,
96
- anchorNode: G,
97
- arrowNode: q,
98
- arrowPadding: a ?? R.arrowPadding,
99
- autoFocus: o ?? R.autoFocus,
100
- closeOnEscape: l ?? R.closeOnEscape,
101
- closeOnOutsidePress: f ?? R.closeOnOutsidePress,
102
- collisionPadding: h ?? R.collisionPadding,
103
- contentId: `${B}panel`,
104
- contentNode: Y,
105
- descriptionId: `${B}description`,
106
- disabled: ae,
107
- finalFocus: y,
108
- flip: b ?? R.flip,
109
- hasDescription: ne,
110
- hasTitle: Z,
111
- hideWhenDetached: x ?? R.hideWhenDetached,
112
- initialFocus: S,
113
- mount: T ?? R.mount,
94
+ align: e ?? N.align,
95
+ alignOffset: t ?? N.alignOffset,
96
+ anchorNode: B,
97
+ arrowNode: H,
98
+ arrowPadding: a ?? N.arrowPadding,
99
+ autoFocus: o ?? N.autoFocus,
100
+ closeOnEscape: l ?? N.closeOnEscape,
101
+ closeOnOutsidePress: f ?? N.closeOnOutsidePress,
102
+ collisionPadding: h ?? N.collisionPadding,
103
+ contentId: `${F}panel`,
104
+ contentNode: W,
105
+ descriptionId: `${F}description`,
106
+ disabled: Z,
107
+ finalFocus: ee,
108
+ flip: y ?? N.flip,
109
+ hasDescription: J,
110
+ hasTitle: K,
111
+ hideWhenDetached: te ?? N.hideWhenDetached,
112
+ initialFocus: ne,
113
+ mount: x ?? N.mount,
114
114
  open: Q,
115
- portal: k ?? R.portal,
115
+ portal: T ?? N.portal,
116
116
  seen: oe.current,
117
- setAnchorNode: K,
118
- setArrowNode: J,
119
- setContentNode: X,
120
- setHasDescription: re,
121
- setHasTitle: te,
122
- setTriggerNode: W,
123
- shift: M ?? R.shift,
124
- showArrow: i ?? R.arrow,
125
- side: N ?? R.side,
126
- sideOffset: P ?? R.sideOffset,
127
- size: F ?? R.size,
128
- strategy: I ?? R.strategy,
129
- t: z,
130
- titleId: `${B}title`,
117
+ setAnchorNode: V,
118
+ setArrowNode: U,
119
+ setContentNode: G,
120
+ setHasDescription: Y,
121
+ setHasTitle: q,
122
+ setTriggerNode: z,
123
+ shift: O ?? N.shift,
124
+ showArrow: i ?? N.arrow,
125
+ side: k ?? N.side,
126
+ sideOffset: A ?? N.sideOffset,
127
+ size: j ?? N.size,
128
+ strategy: M ?? N.strategy,
129
+ t: P,
130
+ titleId: `${F}title`,
131
131
  toggle: $,
132
- triggerNode: U,
133
- width: L ?? R.width
132
+ triggerNode: R,
133
+ width: ae ?? N.width
134
134
  };
135
- return /* @__PURE__ */ g(A.Provider, {
135
+ return /* @__PURE__ */ g(E.Provider, {
136
136
  value: ce,
137
- children: /* @__PURE__ */ g(j.Provider, {
138
- value: ie,
137
+ children: /* @__PURE__ */ g(D.Provider, {
138
+ value: X,
139
139
  children: c
140
140
  })
141
141
  });
142
142
  }
143
143
  //#endregion
144
144
  //#region src/popover/popover-parts.tsx
145
- function P(e, t) {
145
+ function A(e, t) {
146
146
  return (n) => {
147
147
  e?.(n), n.defaultPrevented || t(n);
148
148
  };
149
149
  }
150
- function F(e, ...t) {
150
+ function j(e, ...t) {
151
151
  for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
152
152
  }
153
- function I(e, t) {
153
+ function M(e, t) {
154
154
  return e === void 0 ? null : typeof e == "string" ? t?.querySelector(e) ?? null : e instanceof Element ? e : e.current ?? null;
155
155
  }
156
- function L(e, t, n, r) {
156
+ function ae(e, t, n, r) {
157
157
  if (n === "center" || r === "anchor" && (t === "top" || t === "bottom")) return 0;
158
158
  let i = Number.parseFloat(e.ownerDocument.defaultView?.getComputedStyle(e).paddingTop ?? "") || 0;
159
159
  return n === "start" ? -i : i;
160
160
  }
161
- function R({ children: e, ref: t, render: n, ...r }) {
162
- let i = M(), a = (e) => {
161
+ function N({ children: e, ref: t, render: n, ...r }) {
162
+ let i = O(), a = (e) => {
163
163
  i.toggle(!i.open, e.detail === 0 ? "keyboard" : "pointer", e.nativeEvent);
164
164
  }, o = {
165
165
  ...r,
@@ -168,9 +168,9 @@ function R({ children: e, ref: t, render: n, ...r }) {
168
168
  "aria-expanded": i.open,
169
169
  "aria-haspopup": "dialog",
170
170
  ...i.open ? { "data-open": "" } : {},
171
- onClick: P(r.onClick, a)
171
+ onClick: A(r.onClick, a)
172
172
  }, c = s((e) => {
173
- i.setTriggerNode(e), F(e, t);
173
+ i.setTriggerNode(e), j(e, t);
174
174
  }, [t, i.setTriggerNode]);
175
175
  return n === void 0 ? /* @__PURE__ */ g("button", {
176
176
  type: "button",
@@ -181,9 +181,9 @@ function R({ children: e, ref: t, render: n, ...r }) {
181
181
  ref: c
182
182
  });
183
183
  }
184
- function z({ children: e, ref: t, render: n, ...r }) {
185
- let i = M(), a = s((e) => {
186
- i.setAnchorNode(e), F(e, t);
184
+ function P({ children: e, ref: t, render: n, ...r }) {
185
+ let i = O(), a = s((e) => {
186
+ i.setAnchorNode(e), j(e, t);
187
187
  }, [t, i.setAnchorNode]), o = {
188
188
  ...r,
189
189
  children: e
@@ -196,81 +196,113 @@ function z({ children: e, ref: t, render: n, ...r }) {
196
196
  ref: a
197
197
  });
198
198
  }
199
- function B({ children: e, ref: t, render: n, ...r }) {
200
- let i = M(), a = ee(), [o, c] = m(null), [u, d] = m(null), [f, b] = m("unmounted"), [w, T] = m(!1), E = p(null), D = p(i);
201
- D.current = i, l(() => {
199
+ function F({ children: e, ref: t, render: n, ...r }) {
200
+ let i = O(), a = ie(), [o, c] = m(null), [u, d] = m(null), [y, b] = m("unmounted"), [x, S] = m(!1), C = p(null), w = p(i);
201
+ w.current = i, l(() => {
202
202
  let e = v({
203
- present: D.current.open,
203
+ present: w.current.open,
204
204
  onStatusChange: b
205
205
  });
206
- return E.current = e, b(e.status), () => {
207
- e.destroy(), E.current = null;
206
+ return C.current = e, b(e.status), () => {
207
+ e.destroy(), C.current = null;
208
208
  };
209
209
  }, []), l(() => {
210
- E.current?.sync(i.open);
210
+ C.current?.sync(i.open);
211
211
  }, [i.open]), l(() => {
212
- E.current?.setNode(o);
212
+ C.current?.setNode(o);
213
213
  }, [o]);
214
- let O = i.mount === "eager" || i.mount === "lazy" && i.seen || f !== "unmounted";
214
+ let T = i.mount === "eager" || i.mount === "lazy" && i.seen || i.open || y !== "unmounted";
215
215
  l(() => {
216
- if (!O) {
216
+ let e = i.triggerNode;
217
+ if (e === null || x) return;
218
+ let t = () => S(!0);
219
+ return e.addEventListener("focusin", t), e.addEventListener("pointerdown", t), () => {
220
+ e.removeEventListener("focusin", t), e.removeEventListener("pointerdown", t);
221
+ };
222
+ }, [i.triggerNode, x]);
223
+ let E = T || x;
224
+ f(() => {
225
+ if (!E) {
217
226
  d(null);
218
227
  return;
219
228
  }
220
- let e = y({
229
+ let e = ee({
221
230
  origin: i.anchorNode ?? i.triggerNode,
222
231
  disabled: !i.portal
223
232
  });
224
233
  return d(e.container), () => e.release();
225
234
  }, [
226
- O,
235
+ E,
227
236
  i.anchorNode,
228
237
  i.portal,
229
238
  i.triggerNode
230
239
  ]);
231
- let { align: k, alignOffset: A, arrowNode: j, arrowPadding: N, collisionPadding: P, flip: R, hideWhenDetached: z, shift: B, side: V, sideOffset: H, strategy: U, width: W } = i, G = i.anchorNode ?? i.triggerNode;
232
- l(() => {
233
- if (o === null || G === null) return;
234
- let e = !0, t = S(G, o, {
235
- align: k,
236
- alignOffset: A + L(o, V, k, W),
240
+ let { align: D, alignOffset: k, arrowNode: A, arrowPadding: N, collisionPadding: P, flip: F, hideWhenDetached: I, shift: L, side: R, sideOffset: z, strategy: B, width: V } = i, H = i.anchorNode ?? i.triggerNode, U = p(null), W = p(0), G = p(!1), K = s((e, t) => {
241
+ e.update().then(() => {
242
+ if (U.current !== e || !w.current.open || (t.setAttribute("data-open", ""), G.current)) return;
243
+ G.current = !0;
244
+ let n = t.ownerDocument.defaultView;
245
+ n !== null && w.current.autoFocus && W.current === 0 && (W.current = n.requestAnimationFrame(() => {
246
+ W.current = 0;
247
+ let { contentNode: e, initialFocus: t, open: n } = w.current;
248
+ n && (M(t, e) ?? e)?.focus();
249
+ }));
250
+ });
251
+ }, []);
252
+ f(() => {
253
+ if (o === null || H === null) return;
254
+ let e = ne(H, o, {
255
+ align: D,
256
+ alignOffset: k + ae(o, R, D, V),
237
257
  boundaryPadding: P,
238
- flip: R,
239
- hideWhenDetached: z,
240
- matchWidth: W === "anchor",
241
- shift: B,
242
- side: V,
243
- sideOffset: H,
244
- strategy: U,
245
- ...j ? {
246
- arrow: j,
258
+ flip: F,
259
+ hideWhenDetached: I,
260
+ matchWidth: V === "anchor",
261
+ shift: L,
262
+ side: R,
263
+ sideOffset: z,
264
+ strategy: B,
265
+ ...A ? {
266
+ arrow: A,
247
267
  arrowPadding: N
248
268
  } : {}
249
269
  });
250
- return a.current = () => void t.update(), t.update().then(() => {
251
- e && T(!0);
252
- }), () => {
253
- e = !1, a.current = void 0, t.destroy(), T(!1);
270
+ return a.current = () => void e.update(), U.current = e, w.current.open && K(e, o), () => {
271
+ a.current = void 0, e.destroy(), U.current = null, o.removeAttribute("data-open");
254
272
  };
255
273
  }, [
274
+ D,
256
275
  k,
276
+ H,
257
277
  A,
258
- G,
259
- j,
260
278
  N,
261
279
  P,
262
- R,
263
- z,
280
+ F,
281
+ I,
264
282
  o,
265
283
  a,
284
+ L,
285
+ R,
286
+ z,
266
287
  B,
267
288
  V,
268
- H,
269
- U,
270
- W
289
+ K
290
+ ]), f(() => {
291
+ let e = U.current;
292
+ if (e !== null && o !== null) {
293
+ if (i.open) {
294
+ K(e, o);
295
+ return;
296
+ }
297
+ o.removeAttribute("data-open"), W.current !== 0 && (o.ownerDocument.defaultView?.cancelAnimationFrame(W.current), W.current = 0);
298
+ }
299
+ }, [
300
+ o,
301
+ K,
302
+ i.open
271
303
  ]), l(() => {
272
304
  if (o === null || !i.open) return;
273
- let e = [i.triggerNode, i.anchorNode].filter((e) => e !== null), t = x(o, {
305
+ let e = [i.triggerNode, i.anchorNode].filter((e) => e !== null), t = te(o, {
274
306
  escape: i.closeOnEscape,
275
307
  focusOutside: !1,
276
308
  modal: !1,
@@ -278,7 +310,7 @@ function B({ children: e, ref: t, render: n, ...r }) {
278
310
  scrollLock: !1,
279
311
  ...e.length > 0 ? { branches: e } : {},
280
312
  onDismiss: (e) => {
281
- D.current.toggle(!1, e.reason === "escape" ? "escape" : "outsidePress", e.source);
313
+ w.current.toggle(!1, e.reason === "escape" ? "escape" : "outsidePress", e.source);
282
314
  }
283
315
  });
284
316
  return () => t.destroy();
@@ -289,33 +321,22 @@ function B({ children: e, ref: t, render: n, ...r }) {
289
321
  i.closeOnOutsidePress,
290
322
  i.open,
291
323
  i.triggerNode
292
- ]);
293
- let K = p(!1);
294
- l(() => {
295
- let { autoFocus: e, contentNode: t, finalFocus: n, initialFocus: r, open: i, triggerNode: a } = D.current;
296
- if (i && w && !K.current) {
297
- if (K.current = !0, !e) return;
298
- (I(r, t) ?? t)?.focus();
299
- return;
300
- }
301
- if (!i && K.current) {
302
- K.current = !1;
303
- let e = o?.ownerDocument.activeElement ?? null;
304
- if (o !== null && e !== null && !o.contains(e)) return;
305
- (I(n, t) ?? a)?.focus();
324
+ ]), l(() => {
325
+ let { contentNode: e, finalFocus: t, open: n, triggerNode: r } = w.current;
326
+ if (!n && G.current) {
327
+ G.current = !1;
328
+ let n = o?.ownerDocument.activeElement ?? null;
329
+ if (o !== null && n !== null && !o.contains(n)) return;
330
+ (M(t, e) ?? r)?.focus();
306
331
  }
307
- }, [
308
- o,
309
- i.open,
310
- w
311
- ]);
332
+ }, [o, i.open]);
312
333
  let q = () => {
313
- let { toggle: e, triggerNode: t } = D.current;
334
+ let { toggle: e, triggerNode: t } = w.current;
314
335
  e(!1, "keyboard"), t?.focus();
315
336
  }, J = s((e) => {
316
- c(e), F(e, t);
337
+ c(e), j(e, t);
317
338
  }, [t]);
318
- if (!O || i.portal && u === null) return null;
339
+ if (!T || i.portal && u === null) return null;
319
340
  let Y = /* @__PURE__ */ g("span", {
320
341
  "aria-hidden": "true",
321
342
  "data-part": "focus-guard",
@@ -328,8 +349,7 @@ function B({ children: e, ref: t, render: n, ...r }) {
328
349
  e,
329
350
  Y
330
351
  ] }),
331
- "data-align": k,
332
- ...i.open && w ? { "data-open": "" } : {},
352
+ "data-align": D,
333
353
  "data-part": "root",
334
354
  "data-size": i.size,
335
355
  "data-ui": "popover",
@@ -341,11 +361,11 @@ function B({ children: e, ref: t, render: n, ...r }) {
341
361
  ...X,
342
362
  ref: J
343
363
  });
344
- return u === null ? Z : C(Z, u);
364
+ return u === null ? Z : re(Z, u);
345
365
  }
346
- function V({ children: e, ref: t, render: n, ...r }) {
347
- let i = M(), a = s((e) => {
348
- i.setContentNode(e), F(e, t);
366
+ function I({ children: e, ref: t, render: n, ...r }) {
367
+ let i = O(), a = s((e) => {
368
+ i.setContentNode(e), j(e, t);
349
369
  }, [t, i.setContentNode]), o = {
350
370
  ...r,
351
371
  children: e,
@@ -364,7 +384,7 @@ function V({ children: e, ref: t, render: n, ...r }) {
364
384
  ref: a
365
385
  });
366
386
  }
367
- function H({ children: e, ref: t, render: n, ...r }) {
387
+ function L({ children: e, ref: t, render: n, ...r }) {
368
388
  let i = {
369
389
  ...r,
370
390
  children: e,
@@ -375,8 +395,8 @@ function H({ children: e, ref: t, render: n, ...r }) {
375
395
  ref: t
376
396
  }) : n(i);
377
397
  }
378
- function U({ children: e, ref: t, render: n, ...r }) {
379
- let i = M(), { setHasTitle: a } = i;
398
+ function R({ children: e, ref: t, render: n, ...r }) {
399
+ let i = O(), { setHasTitle: a } = i;
380
400
  l(() => (a(!0), () => a(!1)), [a]);
381
401
  let o = {
382
402
  ...r,
@@ -389,8 +409,8 @@ function U({ children: e, ref: t, render: n, ...r }) {
389
409
  ref: t
390
410
  }) : n(o);
391
411
  }
392
- function W({ children: e, ref: t, render: n, ...r }) {
393
- let i = M(), { setHasDescription: a } = i;
412
+ function z({ children: e, ref: t, render: n, ...r }) {
413
+ let i = O(), { setHasDescription: a } = i;
394
414
  l(() => (a(!0), () => a(!1)), [a]);
395
415
  let o = {
396
416
  ...r,
@@ -403,7 +423,7 @@ function W({ children: e, ref: t, render: n, ...r }) {
403
423
  ref: t
404
424
  }) : n(o);
405
425
  }
406
- function G({ children: e, ref: t, render: n, ...r }) {
426
+ function B({ children: e, ref: t, render: n, ...r }) {
407
427
  let i = {
408
428
  ...r,
409
429
  children: e,
@@ -414,7 +434,7 @@ function G({ children: e, ref: t, render: n, ...r }) {
414
434
  ref: t
415
435
  }) : n(i);
416
436
  }
417
- function K({ children: e, ref: t, render: n, ...r }) {
437
+ function V({ children: e, ref: t, render: n, ...r }) {
418
438
  let i = {
419
439
  ...r,
420
440
  children: e,
@@ -425,15 +445,15 @@ function K({ children: e, ref: t, render: n, ...r }) {
425
445
  ref: t
426
446
  }) : n(i);
427
447
  }
428
- function q({ children: n, ref: r, render: i, ...a }) {
429
- let o = M(), c = p(null), [l, u] = m(null);
448
+ function H({ children: n, ref: r, render: i, ...a }) {
449
+ let o = O(), c = p(null), [l, u] = m(null);
430
450
  f(() => {
431
451
  c.current !== null && u((c.current.textContent ?? "").trim() !== "");
432
452
  });
433
- let d = l ?? J(n), h = (e) => {
453
+ let d = l ?? U(n), h = (e) => {
434
454
  o.toggle(!1, "dismiss", e.nativeEvent);
435
455
  }, _ = s((e) => {
436
- c.current = e, F(e, r);
456
+ c.current = e, j(e, r);
437
457
  }, [r]), v = {
438
458
  ...a,
439
459
  "aria-label": a["aria-label"] ?? (d ? void 0 : o.t("close")),
@@ -442,7 +462,7 @@ function q({ children: n, ref: r, render: i, ...a }) {
442
462
  children: /* @__PURE__ */ g(e, { name: "x" })
443
463
  }),
444
464
  "data-part": "close",
445
- onClick: P(a.onClick, h)
465
+ onClick: A(a.onClick, h)
446
466
  };
447
467
  return i === void 0 ? /* @__PURE__ */ g("button", {
448
468
  type: "button",
@@ -453,12 +473,12 @@ function q({ children: n, ref: r, render: i, ...a }) {
453
473
  ref: _
454
474
  });
455
475
  }
456
- function J(e) {
457
- return i.toArray(e).some((e) => typeof e == "string" || typeof e == "number" ? String(e).trim() !== "" : o(e) && J(e.props.children));
476
+ function U(e) {
477
+ return i.toArray(e).some((e) => typeof e == "string" || typeof e == "number" ? String(e).trim() !== "" : o(e) && U(e.props.children));
458
478
  }
459
- function Y({ ref: e, render: t, ...n }) {
460
- let r = M(), i = s((t) => {
461
- r.setArrowNode(t), F(t, e);
479
+ function W({ ref: e, render: t, ...n }) {
480
+ let r = O(), i = s((t) => {
481
+ r.setArrowNode(t), j(t, e);
462
482
  }, [e, r.setArrowNode]);
463
483
  if (!r.showArrow) return null;
464
484
  let a = {
@@ -472,4 +492,4 @@ function Y({ ref: e, render: t, ...n }) {
472
492
  }) : t(a);
473
493
  }
474
494
  //#endregion
475
- export { V as a, H as c, R as d, N as f, D as g, O as h, q as i, B as l, T as m, Y as n, W as o, M as p, G as r, K as s, z as t, U as u };
495
+ export { I as a, L as c, N as d, k as f, C as g, w as h, H as i, F as l, x as m, W as n, z as o, O as p, B as r, V as s, P as t, R as u };
package/dist/popover.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./popover-Be7JWbGJ.js";
1
+ import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./popover-DEp8Bf3e.js";
2
2
  export { c as POPOVER_FALLBACK, r as Popover, m as PopoverAnchor, l as PopoverArrow, f as PopoverBody, o as PopoverClose, e as PopoverContent, a as PopoverDefaultsProvider, u as PopoverDescription, p as PopoverFooter, t as PopoverHeader, s as PopoverLayer, h as PopoverTitle, n as PopoverTrigger, d as usePopover, i as usePopoverDefaults };
@@ -1,7 +1,7 @@
1
1
  import { n as e, t } from "./icon-T9Yt4tnm.js";
2
2
  import { r as n } from "./i18n-DpW8lqJ1.js";
3
3
  /* empty css */
4
- import { b as r } from "./field-NJaCxl2h.js";
4
+ import { b as r } from "./field-BxQFpOXS.js";
5
5
  import { createControllable as i } from "@slotted/core/state";
6
6
  import { createContext as a, useContext as o, useEffect as s, useRef as c, useState as l } from "react";
7
7
  import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./prompt-composer-BxpdkTpZ.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./prompt-composer-DdcU3S3L.js";
2
2
  export { c as PromptComposer, i as PromptComposerAction, o as PromptComposerAttach, t as PromptComposerDefaultsProvider, n as PromptComposerFooter, e as PromptComposerHeader, a as PromptComposerInput, s as PromptComposerSubmit, r as usePromptComposerDefaults };
@@ -1,6 +1,6 @@
1
1
  import { n as e, t } from "./icon-T9Yt4tnm.js";
2
- import { b as n, f as r } from "./field-NJaCxl2h.js";
3
- import { r as i } from "./field-group-hAzVa2O9.js";
2
+ import { b as n, f as r } from "./field-BxQFpOXS.js";
3
+ import { r as i } from "./field-group-DcN_hiZN.js";
4
4
  import { createControllable as a } from "@slotted/core/state";
5
5
  import { createContext as o, useContext as s, useEffect as c, useId as l, useState as u } from "react";
6
6
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";