@orbitcommerce/constellation 1.3.0 → 1.6.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 (219) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/index.cjs +1807 -1591
  3. package/dist/index.d.cts +65 -9
  4. package/dist/index.d.ts +65 -9
  5. package/dist/modules/charts/BarChart.js +4 -3
  6. package/dist/modules/chunks/{chunk-S232CFQU.js → chunk-235JELUM.js} +1 -1
  7. package/dist/modules/chunks/{chunk-TSLWTTQC.js → chunk-2X7GDWRI.js} +1 -1
  8. package/dist/modules/chunks/{chunk-CG5SXXYK.js → chunk-2YL6WDRC.js} +1 -1
  9. package/dist/modules/chunks/{chunk-ZWLXFJSB.js → chunk-3MPC53GY.js} +3 -3
  10. package/dist/modules/chunks/{chunk-T7Y6VU4F.js → chunk-3NZN54VW.js} +10 -7
  11. package/dist/modules/chunks/{chunk-XEJORWIC.js → chunk-3ZN6AC3M.js} +32 -3
  12. package/dist/modules/chunks/{chunk-JCNIKI4N.js → chunk-46TBVWXT.js} +2 -2
  13. package/dist/modules/chunks/{chunk-O34IV7O7.js → chunk-4BBECMFT.js} +2 -2
  14. package/dist/modules/chunks/{chunk-X6AGAAEL.js → chunk-5LKQQZ4T.js} +2 -2
  15. package/dist/modules/chunks/{chunk-5SGUHHUD.js → chunk-63B67WFG.js} +1 -1
  16. package/dist/modules/chunks/{chunk-T5XBIQ5C.js → chunk-6SJQ3ZRX.js} +2 -2
  17. package/dist/modules/chunks/{chunk-T4URSDXR.js → chunk-7RU3UNBI.js} +7 -6
  18. package/dist/modules/chunks/{chunk-5TVKJLSP.js → chunk-AYPDPYCT.js} +1 -1
  19. package/dist/modules/chunks/{chunk-G7OBJV5U.js → chunk-C3VVLKL7.js} +5 -5
  20. package/dist/modules/chunks/{chunk-PKANW3SX.js → chunk-D5HYV7XX.js} +10 -7
  21. package/dist/modules/chunks/{chunk-CG65BUMB.js → chunk-FFHCIIPT.js} +7 -7
  22. package/dist/modules/chunks/{chunk-OVBFLH52.js → chunk-FPGIRIYV.js} +7 -4
  23. package/dist/modules/chunks/{chunk-M5NVIQ6V.js → chunk-GCY7DIKT.js} +2 -2
  24. package/dist/modules/chunks/{chunk-KUWUH34C.js → chunk-GGC533YU.js} +1 -1
  25. package/dist/modules/chunks/chunk-GWHK2UME.js +46 -0
  26. package/dist/modules/chunks/{chunk-LY2FMTW5.js → chunk-HEOHMVYX.js} +3 -3
  27. package/dist/modules/chunks/{chunk-DD2HCDXR.js → chunk-HPOHK3AH.js} +2 -2
  28. package/dist/modules/chunks/{chunk-V7LFKDIO.js → chunk-I5ISEEYS.js} +2 -2
  29. package/dist/modules/chunks/{chunk-HZHVJ6BL.js → chunk-IBI7TXPK.js} +2 -2
  30. package/dist/modules/chunks/{chunk-AP35LMXV.js → chunk-IEY5MUSU.js} +2 -2
  31. package/dist/modules/chunks/{chunk-3TJJMIED.js → chunk-JG5JXT2T.js} +1 -1
  32. package/dist/modules/chunks/{chunk-GVZRHUKZ.js → chunk-JNVHWDKU.js} +1 -1
  33. package/dist/modules/chunks/{chunk-YCS3IVCC.js → chunk-JVBEOEPM.js} +1 -1
  34. package/dist/modules/chunks/{chunk-LWZNQ5D2.js → chunk-KFXMK7EN.js} +42 -13
  35. package/dist/modules/chunks/{chunk-GDN4BIBD.js → chunk-KUIT3YF5.js} +1 -1
  36. package/dist/modules/chunks/{chunk-L66XCV4Q.js → chunk-L2RDEOSH.js} +2 -2
  37. package/dist/modules/chunks/{chunk-F45EHC7Z.js → chunk-L5XFXYEI.js} +7 -5
  38. package/dist/modules/chunks/{chunk-RYXMMARS.js → chunk-L6CJ6Q6O.js} +2 -2
  39. package/dist/modules/chunks/{chunk-RFEZFKI2.js → chunk-LTM4RGJD.js} +1 -1
  40. package/dist/modules/chunks/{chunk-MJ6RMGBN.js → chunk-MM6K7U26.js} +2 -2
  41. package/dist/modules/chunks/{chunk-TV6TK45W.js → chunk-MUDYZWUI.js} +2 -2
  42. package/dist/modules/chunks/{chunk-YQLMCZAU.js → chunk-MVCOR756.js} +3 -3
  43. package/dist/modules/chunks/chunk-MX6Q7VVR.js +35 -0
  44. package/dist/modules/chunks/{chunk-A7DZQNQP.js → chunk-NGBEWQS5.js} +1 -1
  45. package/dist/modules/chunks/{chunk-E43TEFHQ.js → chunk-NMRHKOJI.js} +2 -2
  46. package/dist/modules/chunks/{chunk-G7I2MU2G.js → chunk-NN6GABIZ.js} +1 -1
  47. package/dist/modules/chunks/{chunk-Z2QNWQME.js → chunk-NOUIUH7N.js} +1 -1
  48. package/dist/modules/chunks/{chunk-QJDMT2X6.js → chunk-O3U2DOBQ.js} +1 -1
  49. package/dist/modules/chunks/{chunk-L4BFJQUU.js → chunk-OCAD2MFA.js} +2 -2
  50. package/dist/modules/chunks/{chunk-QYZ5S64O.js → chunk-PHYKB4VS.js} +1 -1
  51. package/dist/modules/chunks/{chunk-5AJJKEPJ.js → chunk-PYZWY6PQ.js} +1 -1
  52. package/dist/modules/chunks/{chunk-WM5KOSDK.js → chunk-Q6PEBYPV.js} +8 -4
  53. package/dist/modules/chunks/{chunk-GFC44YRX.js → chunk-R23WKKHG.js} +1 -1
  54. package/dist/modules/chunks/{chunk-3PFBTYPP.js → chunk-R5P6PTKK.js} +1 -1
  55. package/dist/modules/chunks/{chunk-XGKIOBY6.js → chunk-RGTMBLKB.js} +2 -2
  56. package/dist/modules/chunks/{chunk-U3EOGBZ7.js → chunk-RK36Z2I5.js} +3 -1
  57. package/dist/modules/chunks/{chunk-4ZTGSHGE.js → chunk-RQ6WILQS.js} +7 -7
  58. package/dist/modules/chunks/{chunk-JOJWFWIF.js → chunk-SR6PPYIX.js} +1 -1
  59. package/dist/modules/chunks/{chunk-CVXG3GYS.js → chunk-UTMJTNSR.js} +2 -2
  60. package/dist/modules/chunks/{chunk-WAVDSHPC.js → chunk-UUY3OZYL.js} +1 -1
  61. package/dist/modules/chunks/{chunk-LM74WTYW.js → chunk-VNGZPEUN.js} +2 -2
  62. package/dist/modules/chunks/{chunk-7DNZLQW6.js → chunk-W6ZI3QJZ.js} +4 -4
  63. package/dist/modules/chunks/{chunk-UPE3TIY3.js → chunk-WLVJ5KTF.js} +4 -4
  64. package/dist/modules/chunks/{chunk-NYXMCKSQ.js → chunk-WMIGI5HM.js} +40 -5
  65. package/dist/modules/chunks/{chunk-KT3NYSJR.js → chunk-XU4EF276.js} +6 -6
  66. package/dist/modules/chunks/{chunk-IJ34OAQ4.js → chunk-XUQURQTL.js} +5 -5
  67. package/dist/modules/chunks/{chunk-NR6LFMY7.js → chunk-YUHONUXY.js} +2 -2
  68. package/dist/modules/chunks/{chunk-3CFDUXGR.js → chunk-ZLCWEGWD.js} +1 -1
  69. package/dist/modules/chunks/{chunk-HW6KLO3K.js → chunk-ZQZWDN4C.js} +2 -2
  70. package/dist/modules/components/AddFilter.js +4 -4
  71. package/dist/modules/components/AddressAutocomplete.js +6 -6
  72. package/dist/modules/components/AddressFields.js +13 -11
  73. package/dist/modules/components/Alert.js +7 -7
  74. package/dist/modules/components/Avatar.js +3 -2
  75. package/dist/modules/components/AvatarUpload.js +7 -7
  76. package/dist/modules/components/BoardCard.js +3 -2
  77. package/dist/modules/components/Button.js +3 -2
  78. package/dist/modules/components/Calendar.js +4 -3
  79. package/dist/modules/components/CaretSuggestions.js +3 -3
  80. package/dist/modules/components/ChatComposer.js +71 -24
  81. package/dist/modules/components/Checkbox.js +7 -7
  82. package/dist/modules/components/ChecklistCard.js +3 -2
  83. package/dist/modules/components/ChipList.js +3 -3
  84. package/dist/modules/components/Coachmark.js +4 -4
  85. package/dist/modules/components/CodeBlock.js +4 -3
  86. package/dist/modules/components/ColorField.js +9 -9
  87. package/dist/modules/components/ColorPicker.js +7 -7
  88. package/dist/modules/components/ColumnMapper.js +8 -8
  89. package/dist/modules/components/Combobox.js +10 -8
  90. package/dist/modules/components/CommentBox.js +7 -7
  91. package/dist/modules/components/Composer.js +12 -12
  92. package/dist/modules/components/ConditionBuilder.js +26 -24
  93. package/dist/modules/components/ContextMenu.js +2 -2
  94. package/dist/modules/components/CopyButton.js +4 -3
  95. package/dist/modules/components/CopyField.js +12 -8
  96. package/dist/modules/components/DangerZone.js +3 -2
  97. package/dist/modules/components/DateInput.js +13 -11
  98. package/dist/modules/components/DatePicker.js +12 -10
  99. package/dist/modules/components/DescriptionList.js +4 -3
  100. package/dist/modules/components/DeviceSwitcher.js +8 -8
  101. package/dist/modules/components/Dialog.js +8 -8
  102. package/dist/modules/components/DrillMenu.js +7 -7
  103. package/dist/modules/components/Dropzone.js +5 -5
  104. package/dist/modules/components/EmojiPicker.js +6 -6
  105. package/dist/modules/components/EmptyState.js +4 -3
  106. package/dist/modules/components/FacetFilters.js +51 -16
  107. package/dist/modules/components/FieldHelp.js +3 -3
  108. package/dist/modules/components/FigurePanel.js +4 -3
  109. package/dist/modules/components/FigureStrip.js +5 -4
  110. package/dist/modules/components/FigureTabs.js +5 -4
  111. package/dist/modules/components/FileChip.js +7 -7
  112. package/dist/modules/components/FilterEditors.js +14 -12
  113. package/dist/modules/components/FilterPill.js +5 -5
  114. package/dist/modules/components/FontPicker.js +12 -12
  115. package/dist/modules/components/Gallery.js +4 -4
  116. package/dist/modules/components/GifPicker.js +6 -6
  117. package/dist/modules/components/GradientEditor.js +13 -11
  118. package/dist/modules/components/GroupedChecklist.js +8 -8
  119. package/dist/modules/components/IconPicker.js +7 -7
  120. package/dist/modules/components/ImageCropper.js +11 -9
  121. package/dist/modules/components/ImageField.js +13 -11
  122. package/dist/modules/components/ImportResult.js +7 -7
  123. package/dist/modules/components/InlineConfirm.js +6 -6
  124. package/dist/modules/components/InlineEdit.js +9 -9
  125. package/dist/modules/components/Input.js +4 -4
  126. package/dist/modules/components/JobIndicator.js +6 -6
  127. package/dist/modules/components/Kanban.js +8 -8
  128. package/dist/modules/components/LinkPicker.js +9 -9
  129. package/dist/modules/components/LogViewer.js +3 -2
  130. package/dist/modules/components/MarkdownField.js +6 -6
  131. package/dist/modules/components/Menu.js +2 -2
  132. package/dist/modules/components/MessageBubble.js +7 -7
  133. package/dist/modules/components/MessageThread.js +6 -6
  134. package/dist/modules/components/MonthCalendar.js +7 -7
  135. package/dist/modules/components/NumberInput.js +7 -5
  136. package/dist/modules/components/OtpInput.js +9 -5
  137. package/dist/modules/components/PackageDimensions.js +5 -5
  138. package/dist/modules/components/Pagination.js +4 -3
  139. package/dist/modules/components/PasswordField.js +7 -7
  140. package/dist/modules/components/PersonCell.js +3 -2
  141. package/dist/modules/components/PhoneInput.js +4 -4
  142. package/dist/modules/components/PlanCard.js +3 -2
  143. package/dist/modules/components/PlanComparison.js +4 -3
  144. package/dist/modules/components/PlanGrid.js +9 -9
  145. package/dist/modules/components/Popover.js +2 -2
  146. package/dist/modules/components/PreviewFrame.js +8 -8
  147. package/dist/modules/components/PrintPage.js +8 -8
  148. package/dist/modules/components/RadioGroup.js +4 -4
  149. package/dist/modules/components/RadiusControl.js +11 -9
  150. package/dist/modules/components/RecordPager.js +6 -6
  151. package/dist/modules/components/Repeater.js +7 -7
  152. package/dist/modules/components/ReplyFeedback.js +3 -2
  153. package/dist/modules/components/RichTextEditor.js +15 -15
  154. package/dist/modules/components/RowList.js +4 -4
  155. package/dist/modules/components/RuleList.js +10 -10
  156. package/dist/modules/components/Schedule.js +14 -12
  157. package/dist/modules/components/SearchField.js +5 -5
  158. package/dist/modules/components/SearchMenu.js +3 -3
  159. package/dist/modules/components/SecretField.js +7 -7
  160. package/dist/modules/components/SegmentedControl.js +6 -6
  161. package/dist/modules/components/Select.js +5 -5
  162. package/dist/modules/components/SettingRow.js +14 -12
  163. package/dist/modules/components/Sheet.js +5 -5
  164. package/dist/modules/components/SidePanel.js +3 -2
  165. package/dist/modules/components/SkeletonRow.js +4 -3
  166. package/dist/modules/components/Slider.js +7 -5
  167. package/dist/modules/components/SortableGroup.js +3 -3
  168. package/dist/modules/components/SortableList.js +3 -3
  169. package/dist/modules/components/SortableTree.js +6 -6
  170. package/dist/modules/components/SpacingBox.js +14 -10
  171. package/dist/modules/components/SplitButton.js +4 -4
  172. package/dist/modules/components/SplitPane.js +3 -2
  173. package/dist/modules/components/Stepper.js +3 -2
  174. package/dist/modules/components/Table.js +4 -3
  175. package/dist/modules/components/TableReorder.js +7 -7
  176. package/dist/modules/components/Tabs.js +5 -5
  177. package/dist/modules/components/TagInput.js +9 -9
  178. package/dist/modules/components/TaskCard.js +6 -6
  179. package/dist/modules/components/Textarea.js +5 -5
  180. package/dist/modules/components/Thumbnail.js +7 -7
  181. package/dist/modules/components/TimeInput.js +8 -6
  182. package/dist/modules/components/TimeRangeInput.js +9 -7
  183. package/dist/modules/components/TimeZoneSelect.js +11 -9
  184. package/dist/modules/components/Toast.js +4 -3
  185. package/dist/modules/components/Toolbar.js +8 -8
  186. package/dist/modules/components/Tooltip.js +2 -1
  187. package/dist/modules/components/TranslationField.js +7 -7
  188. package/dist/modules/components/TreeChecklist.js +9 -9
  189. package/dist/modules/components/TreeSelect.js +13 -11
  190. package/dist/modules/components/TreeView.js +5 -4
  191. package/dist/modules/components/UnitInput.js +9 -7
  192. package/dist/modules/components/UrlUploadInput.js +4 -4
  193. package/dist/modules/components/ValueChange.js +4 -3
  194. package/dist/modules/components/WeeklyHours.js +14 -12
  195. package/dist/modules/components/WorkingStatus.js +7 -7
  196. package/dist/modules/components/builder/CanvasChrome.js +11 -11
  197. package/dist/modules/components/builder/DropIndicator.js +2 -2
  198. package/dist/modules/components/builder/ElementToolbar.js +17 -17
  199. package/dist/modules/components/builder/PaletteTile.js +2 -1
  200. package/dist/modules/components/builder/SaveStatus.js +2 -1
  201. package/dist/modules/components/presence/CollabField.js +8 -8
  202. package/dist/modules/components/presence/CollisionWarning.js +7 -7
  203. package/dist/modules/components/presence/ConflictChooser.js +8 -8
  204. package/dist/modules/components/presence/PresenceAvatars.js +3 -2
  205. package/dist/modules/components/sortable/scope.js +2 -2
  206. package/dist/modules/shell/Sidebar.js +2 -1
  207. package/dist/modules/shell/TopBar.js +2 -1
  208. package/dist/modules/stripe/HostedEmbed.js +4 -3
  209. package/dist/modules/utils/anchoredOverlay.js +3 -1
  210. package/dist/modules/utils/portalContainer.js +3 -1
  211. package/dist/styles/components/combobox.css +4 -0
  212. package/dist/styles/components/command.css +8 -1
  213. package/dist/styles/components/composer.css +6 -0
  214. package/dist/styles/components/dialog.css +1 -1
  215. package/dist/styles/components/message-bubble.css +5 -0
  216. package/dist/styles/components/tooltip.css +16 -0
  217. package/dist/styles.css +40 -2
  218. package/package.json +1 -1
  219. package/dist/modules/chunks/chunk-YKTVZWSO.js +0 -19
@@ -5,10 +5,10 @@ import {
5
5
  import {
6
6
  Button,
7
7
  IconButton
8
- } from "./chunk-5TVKJLSP.js";
8
+ } from "./chunk-AYPDPYCT.js";
9
9
  import {
10
10
  Tooltip
11
- } from "./chunk-XEJORWIC.js";
11
+ } from "./chunk-3ZN6AC3M.js";
12
12
  import {
13
13
  cx
14
14
  } from "./chunk-J6N72GZR.js";
@@ -1,16 +1,16 @@
1
1
  'use client';
2
2
  import {
3
3
  Textarea
4
- } from "./chunk-G7I2MU2G.js";
4
+ } from "./chunk-NN6GABIZ.js";
5
5
  import {
6
6
  Input,
7
7
  useMergedRef
8
- } from "./chunk-RFEZFKI2.js";
8
+ } from "./chunk-LTM4RGJD.js";
9
9
  import {
10
10
  Popover,
11
11
  PopoverAnchor,
12
12
  PopoverContent
13
- } from "./chunk-GDN4BIBD.js";
13
+ } from "./chunk-KUIT3YF5.js";
14
14
  import {
15
15
  withDefaultLabels
16
16
  } from "./chunk-IZLKBJTU.js";
@@ -0,0 +1,35 @@
1
+ 'use client';
2
+
3
+ // src/utils/portalContainer.ts
4
+ import { createContext, useContext } from "react";
5
+ var DialogPortalContainerContext = createContext(null);
6
+ var DialogPortalContainerProvider = DialogPortalContainerContext.Provider;
7
+ function useDialogPortalContainer() {
8
+ return useContext(DialogPortalContainerContext);
9
+ }
10
+ function usePortalContainer(container) {
11
+ const inherited = useContext(DialogPortalContainerContext);
12
+ return container === void 0 ? inherited ?? void 0 : container;
13
+ }
14
+ var MOVES = ["transform", "translate", "scale", "rotate", "filter", "backdropFilter", "webkitBackdropFilter"];
15
+ function isLayerMoving(layer) {
16
+ const doc = layer.ownerDocument;
17
+ if (typeof doc.getAnimations !== "function") return false;
18
+ return doc.getAnimations().some((animation) => {
19
+ const effect = animation.effect;
20
+ const target = effect?.target;
21
+ if (!effect || typeof effect.getKeyframes !== "function" || !target || effect.pseudoElement) return false;
22
+ if (target === layer || !target.contains(layer)) return false;
23
+ if (animation.playState !== "running") return false;
24
+ const end = effect.getComputedTiming().endTime;
25
+ if (typeof end !== "number" || !Number.isFinite(end)) return false;
26
+ return effect.getKeyframes().some((frame) => MOVES.some((property) => property in frame));
27
+ });
28
+ }
29
+
30
+ export {
31
+ DialogPortalContainerProvider,
32
+ useDialogPortalContainer,
33
+ usePortalContainer,
34
+ isLayerMoving
35
+ };
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  focusFromFrame,
4
4
  useMergedRef
5
- } from "./chunk-RFEZFKI2.js";
5
+ } from "./chunk-LTM4RGJD.js";
6
6
  import {
7
7
  fieldRequiredProps,
8
8
  useFieldControl
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-HDF2KESV.js";
5
5
  import {
6
6
  useMergedRef
7
- } from "./chunk-RFEZFKI2.js";
7
+ } from "./chunk-LTM4RGJD.js";
8
8
  import {
9
9
  MessageGlyph
10
10
  } from "./chunk-WK2WAJLO.js";
11
11
  import {
12
12
  Button,
13
13
  IconButton
14
- } from "./chunk-5TVKJLSP.js";
14
+ } from "./chunk-AYPDPYCT.js";
15
15
  import {
16
16
  withDefaultLabels
17
17
  } from "./chunk-IZLKBJTU.js";
@@ -17,7 +17,7 @@ import {
17
17
  fieldCount,
18
18
  textOfValue,
19
19
  useMergedRef
20
- } from "./chunk-RFEZFKI2.js";
20
+ } from "./chunk-LTM4RGJD.js";
21
21
  import {
22
22
  fieldRequiredProps,
23
23
  useFieldControl
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  Tooltip
4
- } from "./chunk-XEJORWIC.js";
4
+ } from "./chunk-3ZN6AC3M.js";
5
5
  import {
6
6
  cx,
7
7
  dataFlag
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  usePortalContainer
4
- } from "./chunk-YKTVZWSO.js";
4
+ } from "./chunk-MX6Q7VVR.js";
5
5
  import {
6
6
  Kbd
7
7
  } from "./chunk-UINRMWFZ.js";
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  SegmentedControl
4
- } from "./chunk-JCNIKI4N.js";
4
+ } from "./chunk-46TBVWXT.js";
5
5
  import {
6
6
  Skeleton
7
7
  } from "./chunk-DEBQQLOX.js";
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  Button,
14
14
  IconButton
15
- } from "./chunk-5TVKJLSP.js";
15
+ } from "./chunk-AYPDPYCT.js";
16
16
  import {
17
17
  withDefaultLabels
18
18
  } from "./chunk-IZLKBJTU.js";
@@ -3,7 +3,7 @@ import {
3
3
  Popover,
4
4
  PopoverContent,
5
5
  PopoverTrigger
6
- } from "./chunk-GDN4BIBD.js";
6
+ } from "./chunk-KUIT3YF5.js";
7
7
  import {
8
8
  isFilled,
9
9
  useFieldControl
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  Combobox,
7
7
  comboboxLabels
8
- } from "./chunk-T7Y6VU4F.js";
8
+ } from "./chunk-3NZN54VW.js";
9
9
  import {
10
10
  withDefaultLabels
11
11
  } from "./chunk-IZLKBJTU.js";
@@ -2,9 +2,13 @@
2
2
  import {
3
3
  dateFormatter
4
4
  } from "./chunk-TNIU2PZL.js";
5
+ import {
6
+ holdsFocus,
7
+ selectFieldOnFocus
8
+ } from "./chunk-GWHK2UME.js";
5
9
  import {
6
10
  useMergedRef
7
- } from "./chunk-RFEZFKI2.js";
11
+ } from "./chunk-LTM4RGJD.js";
8
12
 
9
13
  // src/components/timeSegments.tsx
10
14
  import { forwardRef, useMemo, useRef, useState } from "react";
@@ -17,7 +21,7 @@ function dayPeriodNames(locale) {
17
21
  var EMPTY = "--";
18
22
  var selectAll = (input) => {
19
23
  requestAnimationFrame(() => {
20
- if (document.activeElement === input) input.select();
24
+ if (holdsFocus(input)) input.select();
21
25
  });
22
26
  };
23
27
  var TimeSegment = forwardRef(function TimeSegment2({
@@ -89,7 +93,7 @@ var TimeSegment = forwardRef(function TimeSegment2({
89
93
  readOnly,
90
94
  "data-empty": value === null && draft === null ? "" : void 0,
91
95
  value: draft ?? padded,
92
- onFocus: (event) => selectAll(event.currentTarget),
96
+ onFocus: (event) => selectFieldOnFocus(event.currentTarget),
93
97
  onClick: (event) => selectAll(event.currentTarget),
94
98
  onBlur: () => setDraft(null),
95
99
  onChange: (event) => {
@@ -197,7 +201,7 @@ var PeriodSegment = forwardRef(function PeriodSegment2({ label, value, names, on
197
201
  readOnly,
198
202
  "data-empty": value === null ? "" : void 0,
199
203
  value: shown,
200
- onFocus: (event) => selectAll(event.currentTarget),
204
+ onFocus: (event) => selectFieldOnFocus(event.currentTarget),
201
205
  onClick: (event) => selectAll(event.currentTarget),
202
206
  onChange: (event) => {
203
207
  if (readOnly) return;
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-DEBQQLOX.js";
5
5
  import {
6
6
  IconButton
7
- } from "./chunk-5TVKJLSP.js";
7
+ } from "./chunk-AYPDPYCT.js";
8
8
  import {
9
9
  dataFlag
10
10
  } from "./chunk-J6N72GZR.js";
@@ -4,7 +4,7 @@ import {
4
4
  useSortableList,
5
5
  useSortableScope,
6
6
  useSortableScopeContext
7
- } from "./chunk-ZWLXFJSB.js";
7
+ } from "./chunk-3MPC53GY.js";
8
8
  import {
9
9
  withDefaultLabels
10
10
  } from "./chunk-IZLKBJTU.js";
@@ -5,10 +5,10 @@ import {
5
5
  SelectItem,
6
6
  SelectTrigger,
7
7
  SelectValue
8
- } from "./chunk-CVXG3GYS.js";
8
+ } from "./chunk-UTMJTNSR.js";
9
9
  import {
10
10
  NumberInput
11
- } from "./chunk-T4URSDXR.js";
11
+ } from "./chunk-7RU3UNBI.js";
12
12
  import {
13
13
  clampNumber
14
14
  } from "./chunk-VIFF3FNJ.js";
@@ -94,9 +94,10 @@ var CLIPPING = /* @__PURE__ */ new Set(["auto", "scroll", "overlay", "hidden", "
94
94
  var overflowsOf = (style) => [style.overflowX, style.overflowY, ...style.overflow.split(" ")];
95
95
  var scrolls = (style) => overflowsOf(style).some((value) => SCROLLING.has(value));
96
96
  var clipsContent = (style) => overflowsOf(style).some((value) => CLIPPING.has(value));
97
+ var parentOf = (element) => element.parentElement ?? element.getRootNode().host ?? null;
97
98
  function clippingFrom(element) {
98
99
  const chain = [element];
99
- for (let cur = element.parentElement; cur && cur !== document.body && cur !== document.documentElement; cur = cur.parentElement) {
100
+ for (let cur = parentOf(element); cur && cur !== document.body && cur !== document.documentElement; cur = parentOf(cur)) {
100
101
  if (clipsContent(getComputedStyle(cur))) chain.push(cur);
101
102
  }
102
103
  return chain;
@@ -231,5 +232,6 @@ export {
231
232
  placeAnchoredOverlay,
232
233
  visibleArea,
233
234
  boundaryWithout,
235
+ clippingFrom,
234
236
  useAnchoredOverlay
235
237
  };
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  Alert
4
- } from "./chunk-LM74WTYW.js";
4
+ } from "./chunk-VNGZPEUN.js";
5
5
  import {
6
6
  isThenable
7
7
  } from "./chunk-BACB7AM2.js";
@@ -15,17 +15,17 @@ import {
15
15
  Field,
16
16
  Input,
17
17
  useMergedRef
18
- } from "./chunk-RFEZFKI2.js";
19
- import {
20
- DialogPortalContainerProvider
21
- } from "./chunk-YKTVZWSO.js";
18
+ } from "./chunk-LTM4RGJD.js";
22
19
  import {
23
20
  Button,
24
21
  IconButton
25
- } from "./chunk-5TVKJLSP.js";
22
+ } from "./chunk-AYPDPYCT.js";
26
23
  import {
27
24
  Tooltip
28
- } from "./chunk-XEJORWIC.js";
25
+ } from "./chunk-3ZN6AC3M.js";
26
+ import {
27
+ DialogPortalContainerProvider
28
+ } from "./chunk-MX6Q7VVR.js";
29
29
  import {
30
30
  Kbd
31
31
  } from "./chunk-UINRMWFZ.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  TimeInputCore,
4
4
  timeInputLabels
5
- } from "./chunk-MJ6RMGBN.js";
5
+ } from "./chunk-MM6K7U26.js";
6
6
  import {
7
7
  formatTimeOfDay,
8
8
  hourCycleOf,
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-GC6UJB65.js";
5
5
  import {
6
6
  useMergedRef
7
- } from "./chunk-RFEZFKI2.js";
7
+ } from "./chunk-LTM4RGJD.js";
8
8
  import {
9
9
  fieldRequiredProps,
10
10
  useFieldControl
11
11
  } from "./chunk-EZ3ZLKQV.js";
12
12
  import {
13
13
  usePortalContainer
14
- } from "./chunk-YKTVZWSO.js";
14
+ } from "./chunk-MX6Q7VVR.js";
15
15
  import {
16
16
  useThemeScope
17
17
  } from "./chunk-BLQNM3DQ.js";
@@ -4,7 +4,7 @@ import {
4
4
  FigurePanel,
5
5
  FigureTrend,
6
6
  useFigurePreview
7
- } from "./chunk-GFC44YRX.js";
7
+ } from "./chunk-R23WKKHG.js";
8
8
  import {
9
9
  StatusDot
10
10
  } from "./chunk-N2XN2HVK.js";
@@ -8,10 +8,10 @@ import {
8
8
  } from "./chunk-EOTCMAM5.js";
9
9
  import {
10
10
  useMergedRef
11
- } from "./chunk-RFEZFKI2.js";
11
+ } from "./chunk-LTM4RGJD.js";
12
12
  import {
13
13
  IconButton
14
- } from "./chunk-5TVKJLSP.js";
14
+ } from "./chunk-AYPDPYCT.js";
15
15
  import {
16
16
  cx,
17
17
  dataFlag
@@ -5,21 +5,21 @@ import {
5
5
  MenuRadioGroup,
6
6
  MenuRadioItem,
7
7
  MenuTrigger
8
- } from "./chunk-QJDMT2X6.js";
8
+ } from "./chunk-O3U2DOBQ.js";
9
9
  import {
10
10
  focusIsLost
11
11
  } from "./chunk-HDF2KESV.js";
12
12
  import {
13
13
  useMergedRef
14
- } from "./chunk-RFEZFKI2.js";
14
+ } from "./chunk-LTM4RGJD.js";
15
15
  import {
16
16
  Button,
17
17
  IconButton
18
- } from "./chunk-5TVKJLSP.js";
18
+ } from "./chunk-AYPDPYCT.js";
19
19
  import {
20
20
  Tooltip,
21
21
  TooltipProvider
22
- } from "./chunk-XEJORWIC.js";
22
+ } from "./chunk-3ZN6AC3M.js";
23
23
  import {
24
24
  cx,
25
25
  dataFlag
@@ -1,20 +1,20 @@
1
1
  'use client';
2
2
  import {
3
3
  dropLineRect
4
- } from "./chunk-3TJJMIED.js";
4
+ } from "./chunk-JG5JXT2T.js";
5
5
  import {
6
6
  useAnchoredOverlay
7
- } from "./chunk-U3EOGBZ7.js";
7
+ } from "./chunk-RK36Z2I5.js";
8
8
  import {
9
9
  Dialog
10
- } from "./chunk-4ZTGSHGE.js";
10
+ } from "./chunk-RQ6WILQS.js";
11
11
  import {
12
12
  NoteOpener,
13
13
  useFocusReturn
14
14
  } from "./chunk-HDF2KESV.js";
15
15
  import {
16
16
  DialogPortalContainerProvider
17
- } from "./chunk-YKTVZWSO.js";
17
+ } from "./chunk-MX6Q7VVR.js";
18
18
  import {
19
19
  useThemeScope
20
20
  } from "./chunk-BLQNM3DQ.js";
@@ -6,6 +6,9 @@ var DETACH_BELOW = 280;
6
6
  var PANEL_MAX_HEIGHT = 420;
7
7
  var DEFAULT_RESERVE = 16;
8
8
  var TOP_CLEARANCE = 104;
9
+ var SHORT_WINDOW = 480;
10
+ var SHORT_FRAME_CLEARANCE = 16;
11
+ var SHORT_WINDOW_CLEARANCE = 72;
9
12
  var MIN_ROOM_BELOW = 220;
10
13
  function reserveBelow(el) {
11
14
  const raw = getComputedStyle(el).getPropertyValue("--o-combobox-reserve").trim();
@@ -20,6 +23,13 @@ function clippingFrame(el) {
20
23
  }
21
24
  return null;
22
25
  }
26
+ function highestField(frameTop) {
27
+ if (window.innerHeight >= SHORT_WINDOW) return frameTop + TOP_CLEARANCE;
28
+ return Math.max(frameTop + SHORT_FRAME_CLEARANCE, SHORT_WINDOW_CLEARANCE);
29
+ }
30
+ function opensAboveField(top, roomBelow) {
31
+ return window.innerHeight < SHORT_WINDOW && roomBelow < MIN_ROOM_BELOW && top > roomBelow;
32
+ }
23
33
  function scrollParent(el) {
24
34
  let node = el?.parentElement ?? null;
25
35
  while (node && node !== document.body) {
@@ -33,6 +43,7 @@ var reducedMotion = () => typeof window.matchMedia === "function" && window.matc
33
43
  function useComboboxPlacement(fieldRef, open, floating) {
34
44
  const [narrow, setNarrow] = useState(false);
35
45
  const [cramped, setCramped] = useState(false);
46
+ const [above, setAbove] = useState(false);
36
47
  const [alignEnd, setAlignEnd] = useState(false);
37
48
  const measureAlign = useCallback(() => {
38
49
  const el = fieldRef.current;
@@ -54,26 +65,50 @@ function useComboboxPlacement(fieldRef, open, floating) {
54
65
  useEffect(() => {
55
66
  if (!open) {
56
67
  setCramped(false);
68
+ setAbove(false);
57
69
  return;
58
70
  }
59
71
  const el = fieldRef.current;
60
72
  if (!el) return;
61
73
  const box = el.getBoundingClientRect();
62
- const shortBy = box.bottom + PANEL_MAX_HEIGHT + reserveBelow(el) - window.innerHeight;
74
+ const reserve = reserveBelow(el);
75
+ const shortBy = box.bottom + PANEL_MAX_HEIGHT + reserve - window.innerHeight;
63
76
  if (shortBy <= 0) {
64
77
  setCramped(false);
78
+ setAbove(false);
65
79
  return;
66
80
  }
67
81
  const scroller = scrollParent(el);
68
82
  const frameTop = scroller ? scroller.getBoundingClientRect().top : 0;
69
- const by = Math.min(shortBy, box.top - frameTop - TOP_CLEARANCE);
83
+ const by = Math.min(shortBy, box.top - highestField(frameTop));
70
84
  const reach = scroller ? scroller.scrollHeight - scroller.clientHeight - scroller.scrollTop : document.documentElement.scrollHeight - window.innerHeight - window.scrollY;
71
85
  const moved = Math.min(Math.max(0, by), Math.max(0, reach));
72
- setCramped(window.innerHeight - (box.bottom - moved) - reserveBelow(el) < MIN_ROOM_BELOW);
73
- if (by > 0) (scroller ?? window).scrollBy?.({ top: by, behavior: reducedMotion() ? "auto" : "smooth" });
86
+ const roomBelow = window.innerHeight - (box.bottom - moved) - reserve;
87
+ const tight = roomBelow < MIN_ROOM_BELOW;
88
+ const opensAbove = opensAboveField(box.top, roomBelow);
89
+ setCramped(tight);
90
+ setAbove(opensAbove);
91
+ if (by > 0 && !opensAbove) (scroller ?? window).scrollBy?.({ top: by, behavior: reducedMotion() ? "auto" : "smooth" });
74
92
  }, [open]);
93
+ useEffect(() => {
94
+ if (!open) return void 0;
95
+ const readRoom = () => {
96
+ const el = fieldRef.current;
97
+ if (!el) return;
98
+ if (window.innerHeight >= SHORT_WINDOW) {
99
+ setAbove(false);
100
+ return;
101
+ }
102
+ const box = el.getBoundingClientRect();
103
+ const roomBelow = window.innerHeight - box.bottom - reserveBelow(el);
104
+ setCramped(roomBelow < MIN_ROOM_BELOW);
105
+ setAbove(opensAboveField(box.top, roomBelow));
106
+ };
107
+ window.addEventListener("resize", readRoom);
108
+ return () => window.removeEventListener("resize", readRoom);
109
+ }, [fieldRef, open]);
75
110
  const detached = floating || narrow || cramped;
76
- return { detached, alignEnd: detached && alignEnd, measureAlign };
111
+ return { detached, alignEnd: detached && alignEnd, side: above ? "top" : "bottom", measureAlign };
77
112
  }
78
113
 
79
114
  export {
@@ -6,11 +6,11 @@ import {
6
6
  dayPeriodNames,
7
7
  minutesOfParts,
8
8
  partsOfMinutes
9
- } from "./chunk-WM5KOSDK.js";
9
+ } from "./chunk-Q6PEBYPV.js";
10
10
  import {
11
11
  Calendar,
12
12
  calendarLabels
13
- } from "./chunk-5SGUHHUD.js";
13
+ } from "./chunk-63B67WFG.js";
14
14
  import {
15
15
  addDays,
16
16
  addMonths,
@@ -27,24 +27,24 @@ import {
27
27
  } from "./chunk-TNIU2PZL.js";
28
28
  import {
29
29
  SegmentedControl
30
- } from "./chunk-JCNIKI4N.js";
30
+ } from "./chunk-46TBVWXT.js";
31
31
  import {
32
32
  focusFromFrame,
33
33
  useMergedRef
34
- } from "./chunk-RFEZFKI2.js";
34
+ } from "./chunk-LTM4RGJD.js";
35
35
  import {
36
36
  Popover,
37
37
  PopoverAnchor,
38
38
  PopoverContent,
39
39
  PopoverTrigger
40
- } from "./chunk-GDN4BIBD.js";
40
+ } from "./chunk-KUIT3YF5.js";
41
41
  import {
42
42
  fieldRequiredProps,
43
43
  useFieldControl
44
44
  } from "./chunk-EZ3ZLKQV.js";
45
45
  import {
46
46
  Button
47
- } from "./chunk-5TVKJLSP.js";
47
+ } from "./chunk-AYPDPYCT.js";
48
48
  import {
49
49
  withDefaultLabels
50
50
  } from "./chunk-IZLKBJTU.js";
@@ -4,29 +4,29 @@ import {
4
4
  TabsContent,
5
5
  TabsList,
6
6
  TabsTrigger
7
- } from "./chunk-YCS3IVCC.js";
7
+ } from "./chunk-JVBEOEPM.js";
8
8
  import {
9
9
  ColorPicker
10
- } from "./chunk-RYXMMARS.js";
10
+ } from "./chunk-L6CJ6Q6O.js";
11
11
  import {
12
12
  Switch
13
13
  } from "./chunk-4SMTZLPN.js";
14
14
  import {
15
15
  focusFromFrame,
16
16
  useMergedRef
17
- } from "./chunk-RFEZFKI2.js";
17
+ } from "./chunk-LTM4RGJD.js";
18
18
  import {
19
19
  Popover,
20
20
  PopoverContent,
21
21
  PopoverTrigger
22
- } from "./chunk-GDN4BIBD.js";
22
+ } from "./chunk-KUIT3YF5.js";
23
23
  import {
24
24
  FieldContext,
25
25
  useFieldControl
26
26
  } from "./chunk-EZ3ZLKQV.js";
27
27
  import {
28
28
  Button
29
- } from "./chunk-5TVKJLSP.js";
29
+ } from "./chunk-AYPDPYCT.js";
30
30
  import {
31
31
  withDefaultLabels
32
32
  } from "./chunk-IZLKBJTU.js";
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
  import {
3
3
  useMergedRef
4
- } from "./chunk-RFEZFKI2.js";
4
+ } from "./chunk-LTM4RGJD.js";
5
5
  import {
6
6
  Popover,
7
7
  PopoverContent,
8
8
  PopoverTrigger
9
- } from "./chunk-GDN4BIBD.js";
9
+ } from "./chunk-KUIT3YF5.js";
10
10
  import {
11
11
  cx,
12
12
  dataFlag
@@ -3,7 +3,7 @@ import {
3
3
  Popover,
4
4
  PopoverContent,
5
5
  PopoverTrigger
6
- } from "./chunk-GDN4BIBD.js";
6
+ } from "./chunk-KUIT3YF5.js";
7
7
  import {
8
8
  cx,
9
9
  dataFlag
@@ -15,11 +15,11 @@ import {
15
15
  } from "./chunk-2EDZHFFD.js";
16
16
  import {
17
17
  useMergedRef
18
- } from "./chunk-RFEZFKI2.js";
18
+ } from "./chunk-LTM4RGJD.js";
19
19
  import {
20
20
  Button,
21
21
  IconButton
22
- } from "./chunk-5TVKJLSP.js";
22
+ } from "./chunk-AYPDPYCT.js";
23
23
  import {
24
24
  withDefaultLabels
25
25
  } from "./chunk-IZLKBJTU.js";
@@ -4,15 +4,15 @@ import {
4
4
  MenuContent,
5
5
  MenuItem,
6
6
  MenuTrigger
7
- } from "../chunks/chunk-QJDMT2X6.js";
8
- import "../chunks/chunk-YKTVZWSO.js";
7
+ } from "../chunks/chunk-O3U2DOBQ.js";
9
8
  import {
10
9
  Button
11
- } from "../chunks/chunk-5TVKJLSP.js";
10
+ } from "../chunks/chunk-AYPDPYCT.js";
12
11
  import "../chunks/chunk-VRSE2UOE.js";
13
12
  import "../chunks/chunk-IZLKBJTU.js";
14
13
  import "../chunks/chunk-6AXW5D3E.js";
15
- import "../chunks/chunk-XEJORWIC.js";
14
+ import "../chunks/chunk-3ZN6AC3M.js";
15
+ import "../chunks/chunk-MX6Q7VVR.js";
16
16
  import "../chunks/chunk-UINRMWFZ.js";
17
17
  import "../chunks/chunk-5X4PSA4M.js";
18
18
  import "../chunks/chunk-BLQNM3DQ.js";
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  AddressAutocomplete,
4
4
  addressAutocompleteLabels
5
- } from "../chunks/chunk-YQLMCZAU.js";
6
- import "../chunks/chunk-G7I2MU2G.js";
5
+ } from "../chunks/chunk-MVCOR756.js";
6
+ import "../chunks/chunk-NN6GABIZ.js";
7
7
  import "../chunks/chunk-IO3JRJYC.js";
8
8
  import "../chunks/chunk-4YQLOFYE.js";
9
- import "../chunks/chunk-RFEZFKI2.js";
9
+ import "../chunks/chunk-LTM4RGJD.js";
10
10
  import "../chunks/chunk-WK2WAJLO.js";
11
- import "../chunks/chunk-QYZ5S64O.js";
12
- import "../chunks/chunk-GDN4BIBD.js";
11
+ import "../chunks/chunk-PHYKB4VS.js";
12
+ import "../chunks/chunk-KUIT3YF5.js";
13
13
  import "../chunks/chunk-EZ3ZLKQV.js";
14
- import "../chunks/chunk-YKTVZWSO.js";
15
14
  import "../chunks/chunk-IZLKBJTU.js";
15
+ import "../chunks/chunk-MX6Q7VVR.js";
16
16
  import "../chunks/chunk-BLQNM3DQ.js";
17
17
  import "../chunks/chunk-YLBEJ4N7.js";
18
18
  import "../chunks/chunk-KAGZEQRE.js";