@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.
- package/CHANGELOG.md +50 -0
- package/dist/index.cjs +1807 -1591
- package/dist/index.d.cts +65 -9
- package/dist/index.d.ts +65 -9
- package/dist/modules/charts/BarChart.js +4 -3
- package/dist/modules/chunks/{chunk-S232CFQU.js → chunk-235JELUM.js} +1 -1
- package/dist/modules/chunks/{chunk-TSLWTTQC.js → chunk-2X7GDWRI.js} +1 -1
- package/dist/modules/chunks/{chunk-CG5SXXYK.js → chunk-2YL6WDRC.js} +1 -1
- package/dist/modules/chunks/{chunk-ZWLXFJSB.js → chunk-3MPC53GY.js} +3 -3
- package/dist/modules/chunks/{chunk-T7Y6VU4F.js → chunk-3NZN54VW.js} +10 -7
- package/dist/modules/chunks/{chunk-XEJORWIC.js → chunk-3ZN6AC3M.js} +32 -3
- package/dist/modules/chunks/{chunk-JCNIKI4N.js → chunk-46TBVWXT.js} +2 -2
- package/dist/modules/chunks/{chunk-O34IV7O7.js → chunk-4BBECMFT.js} +2 -2
- package/dist/modules/chunks/{chunk-X6AGAAEL.js → chunk-5LKQQZ4T.js} +2 -2
- package/dist/modules/chunks/{chunk-5SGUHHUD.js → chunk-63B67WFG.js} +1 -1
- package/dist/modules/chunks/{chunk-T5XBIQ5C.js → chunk-6SJQ3ZRX.js} +2 -2
- package/dist/modules/chunks/{chunk-T4URSDXR.js → chunk-7RU3UNBI.js} +7 -6
- package/dist/modules/chunks/{chunk-5TVKJLSP.js → chunk-AYPDPYCT.js} +1 -1
- package/dist/modules/chunks/{chunk-G7OBJV5U.js → chunk-C3VVLKL7.js} +5 -5
- package/dist/modules/chunks/{chunk-PKANW3SX.js → chunk-D5HYV7XX.js} +10 -7
- package/dist/modules/chunks/{chunk-CG65BUMB.js → chunk-FFHCIIPT.js} +7 -7
- package/dist/modules/chunks/{chunk-OVBFLH52.js → chunk-FPGIRIYV.js} +7 -4
- package/dist/modules/chunks/{chunk-M5NVIQ6V.js → chunk-GCY7DIKT.js} +2 -2
- package/dist/modules/chunks/{chunk-KUWUH34C.js → chunk-GGC533YU.js} +1 -1
- package/dist/modules/chunks/chunk-GWHK2UME.js +46 -0
- package/dist/modules/chunks/{chunk-LY2FMTW5.js → chunk-HEOHMVYX.js} +3 -3
- package/dist/modules/chunks/{chunk-DD2HCDXR.js → chunk-HPOHK3AH.js} +2 -2
- package/dist/modules/chunks/{chunk-V7LFKDIO.js → chunk-I5ISEEYS.js} +2 -2
- package/dist/modules/chunks/{chunk-HZHVJ6BL.js → chunk-IBI7TXPK.js} +2 -2
- package/dist/modules/chunks/{chunk-AP35LMXV.js → chunk-IEY5MUSU.js} +2 -2
- package/dist/modules/chunks/{chunk-3TJJMIED.js → chunk-JG5JXT2T.js} +1 -1
- package/dist/modules/chunks/{chunk-GVZRHUKZ.js → chunk-JNVHWDKU.js} +1 -1
- package/dist/modules/chunks/{chunk-YCS3IVCC.js → chunk-JVBEOEPM.js} +1 -1
- package/dist/modules/chunks/{chunk-LWZNQ5D2.js → chunk-KFXMK7EN.js} +42 -13
- package/dist/modules/chunks/{chunk-GDN4BIBD.js → chunk-KUIT3YF5.js} +1 -1
- package/dist/modules/chunks/{chunk-L66XCV4Q.js → chunk-L2RDEOSH.js} +2 -2
- package/dist/modules/chunks/{chunk-F45EHC7Z.js → chunk-L5XFXYEI.js} +7 -5
- package/dist/modules/chunks/{chunk-RYXMMARS.js → chunk-L6CJ6Q6O.js} +2 -2
- package/dist/modules/chunks/{chunk-RFEZFKI2.js → chunk-LTM4RGJD.js} +1 -1
- package/dist/modules/chunks/{chunk-MJ6RMGBN.js → chunk-MM6K7U26.js} +2 -2
- package/dist/modules/chunks/{chunk-TV6TK45W.js → chunk-MUDYZWUI.js} +2 -2
- package/dist/modules/chunks/{chunk-YQLMCZAU.js → chunk-MVCOR756.js} +3 -3
- package/dist/modules/chunks/chunk-MX6Q7VVR.js +35 -0
- package/dist/modules/chunks/{chunk-A7DZQNQP.js → chunk-NGBEWQS5.js} +1 -1
- package/dist/modules/chunks/{chunk-E43TEFHQ.js → chunk-NMRHKOJI.js} +2 -2
- package/dist/modules/chunks/{chunk-G7I2MU2G.js → chunk-NN6GABIZ.js} +1 -1
- package/dist/modules/chunks/{chunk-Z2QNWQME.js → chunk-NOUIUH7N.js} +1 -1
- package/dist/modules/chunks/{chunk-QJDMT2X6.js → chunk-O3U2DOBQ.js} +1 -1
- package/dist/modules/chunks/{chunk-L4BFJQUU.js → chunk-OCAD2MFA.js} +2 -2
- package/dist/modules/chunks/{chunk-QYZ5S64O.js → chunk-PHYKB4VS.js} +1 -1
- package/dist/modules/chunks/{chunk-5AJJKEPJ.js → chunk-PYZWY6PQ.js} +1 -1
- package/dist/modules/chunks/{chunk-WM5KOSDK.js → chunk-Q6PEBYPV.js} +8 -4
- package/dist/modules/chunks/{chunk-GFC44YRX.js → chunk-R23WKKHG.js} +1 -1
- package/dist/modules/chunks/{chunk-3PFBTYPP.js → chunk-R5P6PTKK.js} +1 -1
- package/dist/modules/chunks/{chunk-XGKIOBY6.js → chunk-RGTMBLKB.js} +2 -2
- package/dist/modules/chunks/{chunk-U3EOGBZ7.js → chunk-RK36Z2I5.js} +3 -1
- package/dist/modules/chunks/{chunk-4ZTGSHGE.js → chunk-RQ6WILQS.js} +7 -7
- package/dist/modules/chunks/{chunk-JOJWFWIF.js → chunk-SR6PPYIX.js} +1 -1
- package/dist/modules/chunks/{chunk-CVXG3GYS.js → chunk-UTMJTNSR.js} +2 -2
- package/dist/modules/chunks/{chunk-WAVDSHPC.js → chunk-UUY3OZYL.js} +1 -1
- package/dist/modules/chunks/{chunk-LM74WTYW.js → chunk-VNGZPEUN.js} +2 -2
- package/dist/modules/chunks/{chunk-7DNZLQW6.js → chunk-W6ZI3QJZ.js} +4 -4
- package/dist/modules/chunks/{chunk-UPE3TIY3.js → chunk-WLVJ5KTF.js} +4 -4
- package/dist/modules/chunks/{chunk-NYXMCKSQ.js → chunk-WMIGI5HM.js} +40 -5
- package/dist/modules/chunks/{chunk-KT3NYSJR.js → chunk-XU4EF276.js} +6 -6
- package/dist/modules/chunks/{chunk-IJ34OAQ4.js → chunk-XUQURQTL.js} +5 -5
- package/dist/modules/chunks/{chunk-NR6LFMY7.js → chunk-YUHONUXY.js} +2 -2
- package/dist/modules/chunks/{chunk-3CFDUXGR.js → chunk-ZLCWEGWD.js} +1 -1
- package/dist/modules/chunks/{chunk-HW6KLO3K.js → chunk-ZQZWDN4C.js} +2 -2
- package/dist/modules/components/AddFilter.js +4 -4
- package/dist/modules/components/AddressAutocomplete.js +6 -6
- package/dist/modules/components/AddressFields.js +13 -11
- package/dist/modules/components/Alert.js +7 -7
- package/dist/modules/components/Avatar.js +3 -2
- package/dist/modules/components/AvatarUpload.js +7 -7
- package/dist/modules/components/BoardCard.js +3 -2
- package/dist/modules/components/Button.js +3 -2
- package/dist/modules/components/Calendar.js +4 -3
- package/dist/modules/components/CaretSuggestions.js +3 -3
- package/dist/modules/components/ChatComposer.js +71 -24
- package/dist/modules/components/Checkbox.js +7 -7
- package/dist/modules/components/ChecklistCard.js +3 -2
- package/dist/modules/components/ChipList.js +3 -3
- package/dist/modules/components/Coachmark.js +4 -4
- package/dist/modules/components/CodeBlock.js +4 -3
- package/dist/modules/components/ColorField.js +9 -9
- package/dist/modules/components/ColorPicker.js +7 -7
- package/dist/modules/components/ColumnMapper.js +8 -8
- package/dist/modules/components/Combobox.js +10 -8
- package/dist/modules/components/CommentBox.js +7 -7
- package/dist/modules/components/Composer.js +12 -12
- package/dist/modules/components/ConditionBuilder.js +26 -24
- package/dist/modules/components/ContextMenu.js +2 -2
- package/dist/modules/components/CopyButton.js +4 -3
- package/dist/modules/components/CopyField.js +12 -8
- package/dist/modules/components/DangerZone.js +3 -2
- package/dist/modules/components/DateInput.js +13 -11
- package/dist/modules/components/DatePicker.js +12 -10
- package/dist/modules/components/DescriptionList.js +4 -3
- package/dist/modules/components/DeviceSwitcher.js +8 -8
- package/dist/modules/components/Dialog.js +8 -8
- package/dist/modules/components/DrillMenu.js +7 -7
- package/dist/modules/components/Dropzone.js +5 -5
- package/dist/modules/components/EmojiPicker.js +6 -6
- package/dist/modules/components/EmptyState.js +4 -3
- package/dist/modules/components/FacetFilters.js +51 -16
- package/dist/modules/components/FieldHelp.js +3 -3
- package/dist/modules/components/FigurePanel.js +4 -3
- package/dist/modules/components/FigureStrip.js +5 -4
- package/dist/modules/components/FigureTabs.js +5 -4
- package/dist/modules/components/FileChip.js +7 -7
- package/dist/modules/components/FilterEditors.js +14 -12
- package/dist/modules/components/FilterPill.js +5 -5
- package/dist/modules/components/FontPicker.js +12 -12
- package/dist/modules/components/Gallery.js +4 -4
- package/dist/modules/components/GifPicker.js +6 -6
- package/dist/modules/components/GradientEditor.js +13 -11
- package/dist/modules/components/GroupedChecklist.js +8 -8
- package/dist/modules/components/IconPicker.js +7 -7
- package/dist/modules/components/ImageCropper.js +11 -9
- package/dist/modules/components/ImageField.js +13 -11
- package/dist/modules/components/ImportResult.js +7 -7
- package/dist/modules/components/InlineConfirm.js +6 -6
- package/dist/modules/components/InlineEdit.js +9 -9
- package/dist/modules/components/Input.js +4 -4
- package/dist/modules/components/JobIndicator.js +6 -6
- package/dist/modules/components/Kanban.js +8 -8
- package/dist/modules/components/LinkPicker.js +9 -9
- package/dist/modules/components/LogViewer.js +3 -2
- package/dist/modules/components/MarkdownField.js +6 -6
- package/dist/modules/components/Menu.js +2 -2
- package/dist/modules/components/MessageBubble.js +7 -7
- package/dist/modules/components/MessageThread.js +6 -6
- package/dist/modules/components/MonthCalendar.js +7 -7
- package/dist/modules/components/NumberInput.js +7 -5
- package/dist/modules/components/OtpInput.js +9 -5
- package/dist/modules/components/PackageDimensions.js +5 -5
- package/dist/modules/components/Pagination.js +4 -3
- package/dist/modules/components/PasswordField.js +7 -7
- package/dist/modules/components/PersonCell.js +3 -2
- package/dist/modules/components/PhoneInput.js +4 -4
- package/dist/modules/components/PlanCard.js +3 -2
- package/dist/modules/components/PlanComparison.js +4 -3
- package/dist/modules/components/PlanGrid.js +9 -9
- package/dist/modules/components/Popover.js +2 -2
- package/dist/modules/components/PreviewFrame.js +8 -8
- package/dist/modules/components/PrintPage.js +8 -8
- package/dist/modules/components/RadioGroup.js +4 -4
- package/dist/modules/components/RadiusControl.js +11 -9
- package/dist/modules/components/RecordPager.js +6 -6
- package/dist/modules/components/Repeater.js +7 -7
- package/dist/modules/components/ReplyFeedback.js +3 -2
- package/dist/modules/components/RichTextEditor.js +15 -15
- package/dist/modules/components/RowList.js +4 -4
- package/dist/modules/components/RuleList.js +10 -10
- package/dist/modules/components/Schedule.js +14 -12
- package/dist/modules/components/SearchField.js +5 -5
- package/dist/modules/components/SearchMenu.js +3 -3
- package/dist/modules/components/SecretField.js +7 -7
- package/dist/modules/components/SegmentedControl.js +6 -6
- package/dist/modules/components/Select.js +5 -5
- package/dist/modules/components/SettingRow.js +14 -12
- package/dist/modules/components/Sheet.js +5 -5
- package/dist/modules/components/SidePanel.js +3 -2
- package/dist/modules/components/SkeletonRow.js +4 -3
- package/dist/modules/components/Slider.js +7 -5
- package/dist/modules/components/SortableGroup.js +3 -3
- package/dist/modules/components/SortableList.js +3 -3
- package/dist/modules/components/SortableTree.js +6 -6
- package/dist/modules/components/SpacingBox.js +14 -10
- package/dist/modules/components/SplitButton.js +4 -4
- package/dist/modules/components/SplitPane.js +3 -2
- package/dist/modules/components/Stepper.js +3 -2
- package/dist/modules/components/Table.js +4 -3
- package/dist/modules/components/TableReorder.js +7 -7
- package/dist/modules/components/Tabs.js +5 -5
- package/dist/modules/components/TagInput.js +9 -9
- package/dist/modules/components/TaskCard.js +6 -6
- package/dist/modules/components/Textarea.js +5 -5
- package/dist/modules/components/Thumbnail.js +7 -7
- package/dist/modules/components/TimeInput.js +8 -6
- package/dist/modules/components/TimeRangeInput.js +9 -7
- package/dist/modules/components/TimeZoneSelect.js +11 -9
- package/dist/modules/components/Toast.js +4 -3
- package/dist/modules/components/Toolbar.js +8 -8
- package/dist/modules/components/Tooltip.js +2 -1
- package/dist/modules/components/TranslationField.js +7 -7
- package/dist/modules/components/TreeChecklist.js +9 -9
- package/dist/modules/components/TreeSelect.js +13 -11
- package/dist/modules/components/TreeView.js +5 -4
- package/dist/modules/components/UnitInput.js +9 -7
- package/dist/modules/components/UrlUploadInput.js +4 -4
- package/dist/modules/components/ValueChange.js +4 -3
- package/dist/modules/components/WeeklyHours.js +14 -12
- package/dist/modules/components/WorkingStatus.js +7 -7
- package/dist/modules/components/builder/CanvasChrome.js +11 -11
- package/dist/modules/components/builder/DropIndicator.js +2 -2
- package/dist/modules/components/builder/ElementToolbar.js +17 -17
- package/dist/modules/components/builder/PaletteTile.js +2 -1
- package/dist/modules/components/builder/SaveStatus.js +2 -1
- package/dist/modules/components/presence/CollabField.js +8 -8
- package/dist/modules/components/presence/CollisionWarning.js +7 -7
- package/dist/modules/components/presence/ConflictChooser.js +8 -8
- package/dist/modules/components/presence/PresenceAvatars.js +3 -2
- package/dist/modules/components/sortable/scope.js +2 -2
- package/dist/modules/shell/Sidebar.js +2 -1
- package/dist/modules/shell/TopBar.js +2 -1
- package/dist/modules/stripe/HostedEmbed.js +4 -3
- package/dist/modules/utils/anchoredOverlay.js +3 -1
- package/dist/modules/utils/portalContainer.js +3 -1
- package/dist/styles/components/combobox.css +4 -0
- package/dist/styles/components/command.css +8 -1
- package/dist/styles/components/composer.css +6 -0
- package/dist/styles/components/dialog.css +1 -1
- package/dist/styles/components/message-bubble.css +5 -0
- package/dist/styles/components/tooltip.css +16 -0
- package/dist/styles.css +40 -2
- package/package.json +1 -1
- package/dist/modules/chunks/chunk-YKTVZWSO.js +0 -19
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Textarea
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NN6GABIZ.js";
|
|
5
5
|
import {
|
|
6
6
|
Input,
|
|
7
7
|
useMergedRef
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LTM4RGJD.js";
|
|
9
9
|
import {
|
|
10
10
|
Popover,
|
|
11
11
|
PopoverAnchor,
|
|
12
12
|
PopoverContent
|
|
13
|
-
} from "./chunk-
|
|
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
|
+
};
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-HDF2KESV.js";
|
|
5
5
|
import {
|
|
6
6
|
useMergedRef
|
|
7
|
-
} from "./chunk-
|
|
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-
|
|
14
|
+
} from "./chunk-AYPDPYCT.js";
|
|
15
15
|
import {
|
|
16
16
|
withDefaultLabels
|
|
17
17
|
} from "./chunk-IZLKBJTU.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
SegmentedControl
|
|
4
|
-
} from "./chunk-
|
|
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-
|
|
15
|
+
} from "./chunk-AYPDPYCT.js";
|
|
16
16
|
import {
|
|
17
17
|
withDefaultLabels
|
|
18
18
|
} 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-
|
|
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 (
|
|
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) =>
|
|
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) =>
|
|
204
|
+
onFocus: (event) => selectFieldOnFocus(event.currentTarget),
|
|
201
205
|
onClick: (event) => selectAll(event.currentTarget),
|
|
202
206
|
onChange: (event) => {
|
|
203
207
|
if (readOnly) return;
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
SelectItem,
|
|
6
6
|
SelectTrigger,
|
|
7
7
|
SelectValue
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UTMJTNSR.js";
|
|
9
9
|
import {
|
|
10
10
|
NumberInput
|
|
11
|
-
} from "./chunk-
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
22
|
+
} from "./chunk-AYPDPYCT.js";
|
|
26
23
|
import {
|
|
27
24
|
Tooltip
|
|
28
|
-
} from "./chunk-
|
|
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";
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-GC6UJB65.js";
|
|
5
5
|
import {
|
|
6
6
|
useMergedRef
|
|
7
|
-
} from "./chunk-
|
|
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-
|
|
14
|
+
} from "./chunk-MX6Q7VVR.js";
|
|
15
15
|
import {
|
|
16
16
|
useThemeScope
|
|
17
17
|
} from "./chunk-BLQNM3DQ.js";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-EOTCMAM5.js";
|
|
9
9
|
import {
|
|
10
10
|
useMergedRef
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LTM4RGJD.js";
|
|
12
12
|
import {
|
|
13
13
|
IconButton
|
|
14
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
14
|
+
} from "./chunk-LTM4RGJD.js";
|
|
15
15
|
import {
|
|
16
16
|
Button,
|
|
17
17
|
IconButton
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AYPDPYCT.js";
|
|
19
19
|
import {
|
|
20
20
|
Tooltip,
|
|
21
21
|
TooltipProvider
|
|
22
|
-
} from "./chunk-
|
|
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-
|
|
4
|
+
} from "./chunk-JG5JXT2T.js";
|
|
5
5
|
import {
|
|
6
6
|
useAnchoredOverlay
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RK36Z2I5.js";
|
|
8
8
|
import {
|
|
9
9
|
Dialog
|
|
10
|
-
} from "./chunk-
|
|
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-
|
|
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
|
|
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
|
|
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
|
-
|
|
73
|
-
|
|
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-
|
|
9
|
+
} from "./chunk-Q6PEBYPV.js";
|
|
10
10
|
import {
|
|
11
11
|
Calendar,
|
|
12
12
|
calendarLabels
|
|
13
|
-
} from "./chunk-
|
|
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-
|
|
30
|
+
} from "./chunk-46TBVWXT.js";
|
|
31
31
|
import {
|
|
32
32
|
focusFromFrame,
|
|
33
33
|
useMergedRef
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-LTM4RGJD.js";
|
|
35
35
|
import {
|
|
36
36
|
Popover,
|
|
37
37
|
PopoverAnchor,
|
|
38
38
|
PopoverContent,
|
|
39
39
|
PopoverTrigger
|
|
40
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
7
|
+
} from "./chunk-JVBEOEPM.js";
|
|
8
8
|
import {
|
|
9
9
|
ColorPicker
|
|
10
|
-
} from "./chunk-
|
|
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-
|
|
17
|
+
} from "./chunk-LTM4RGJD.js";
|
|
18
18
|
import {
|
|
19
19
|
Popover,
|
|
20
20
|
PopoverContent,
|
|
21
21
|
PopoverTrigger
|
|
22
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
4
|
+
} from "./chunk-LTM4RGJD.js";
|
|
5
5
|
import {
|
|
6
6
|
Popover,
|
|
7
7
|
PopoverContent,
|
|
8
8
|
PopoverTrigger
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KUIT3YF5.js";
|
|
10
10
|
import {
|
|
11
11
|
cx,
|
|
12
12
|
dataFlag
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
} from "./chunk-2EDZHFFD.js";
|
|
16
16
|
import {
|
|
17
17
|
useMergedRef
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LTM4RGJD.js";
|
|
19
19
|
import {
|
|
20
20
|
Button,
|
|
21
21
|
IconButton
|
|
22
|
-
} from "./chunk-
|
|
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-
|
|
8
|
-
import "../chunks/chunk-YKTVZWSO.js";
|
|
7
|
+
} from "../chunks/chunk-O3U2DOBQ.js";
|
|
9
8
|
import {
|
|
10
9
|
Button
|
|
11
|
-
} from "../chunks/chunk-
|
|
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-
|
|
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-
|
|
6
|
-
import "../chunks/chunk-
|
|
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-
|
|
9
|
+
import "../chunks/chunk-LTM4RGJD.js";
|
|
10
10
|
import "../chunks/chunk-WK2WAJLO.js";
|
|
11
|
-
import "../chunks/chunk-
|
|
12
|
-
import "../chunks/chunk-
|
|
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";
|