tfy-web-components 0.0.34 → 0.0.36
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/README.md +49 -58
- package/dist/Button-C77b7jpW.js +284 -0
- package/dist/Button-C77b7jpW.js.map +1 -0
- package/dist/CompositeItem-BGwD51jI.js +33 -0
- package/dist/CompositeItem-BGwD51jI.js.map +1 -0
- package/dist/CompositeList-D4xmSZ5V.js +291 -0
- package/dist/CompositeList-D4xmSZ5V.js.map +1 -0
- package/dist/CompositeRoot-BxrPc7F6.js +351 -0
- package/dist/CompositeRoot-BxrPc7F6.js.map +1 -0
- package/dist/DirectionContext-Pb9yafF5.js +11 -0
- package/dist/DirectionContext-Pb9yafF5.js.map +1 -0
- package/dist/FieldItemContext-DRVgx-D1.js +13 -0
- package/dist/FieldItemContext-DRVgx-D1.js.map +1 -0
- package/dist/{Input-BvwIpntS.js → Input-Dhmo6L2n.js} +100 -78
- package/dist/Input-Dhmo6L2n.js.map +1 -0
- package/dist/Modal-C4MUy9GD.js +696 -0
- package/dist/Modal-C4MUy9GD.js.map +1 -0
- package/dist/{MonacoEditorCore-xfpJ6z-E.js → MonacoEditorCore-n-df5f7I.js} +2 -2
- package/dist/{MonacoEditorCore-xfpJ6z-E.js.map → MonacoEditorCore-n-df5f7I.js.map} +1 -1
- package/dist/Popover-eC_vX5By.js +1074 -0
- package/dist/Popover-eC_vX5By.js.map +1 -0
- package/dist/ToolbarRootContext-B_HxjkNI.js +11 -0
- package/dist/ToolbarRootContext-B_HxjkNI.js.map +1 -0
- package/dist/Tooltip-BuGLP-PU.js +4096 -0
- package/dist/Tooltip-BuGLP-PU.js.map +1 -0
- package/dist/classNames-B1XpQHle.js +44 -0
- package/dist/classNames-B1XpQHle.js.map +1 -0
- package/dist/components/atoms/Accordion.d.ts +19 -37
- package/dist/components/atoms/Accordion.es.js +847 -78
- package/dist/components/atoms/Accordion.es.js.map +1 -1
- package/dist/components/atoms/AudioPlayer.es.js +9 -9
- package/dist/components/atoms/AudioPlayer.es.js.map +1 -1
- package/dist/components/atoms/Avatar.d.ts +42 -9
- package/dist/components/atoms/Avatar.es.js +491 -36
- package/dist/components/atoms/Avatar.es.js.map +1 -1
- package/dist/components/atoms/Badge.d.ts +40 -35
- package/dist/components/atoms/Badge.es.js +163 -53
- package/dist/components/atoms/Badge.es.js.map +1 -1
- package/dist/components/atoms/Button.d.ts +37 -16
- package/dist/components/atoms/Button.es.js +16 -221
- package/dist/components/atoms/Button.es.js.map +1 -1
- package/dist/components/atoms/ButtonGroup.d.ts +53 -0
- package/dist/components/atoms/ButtonGroup.es.js +349 -0
- package/dist/components/atoms/ButtonGroup.es.js.map +1 -0
- package/dist/components/atoms/IconButton.d.ts +23 -9
- package/dist/components/atoms/IconButton.es.js +82 -16
- package/dist/components/atoms/IconButton.es.js.map +1 -1
- package/dist/components/atoms/IconProvider.d.ts +5 -2
- package/dist/components/atoms/IconProvider.es.js +69 -10
- package/dist/components/atoms/IconProvider.es.js.map +1 -1
- package/dist/components/atoms/Logo.d.ts +18 -0
- package/dist/components/atoms/Logo.es.js +79 -0
- package/dist/components/atoms/Logo.es.js.map +1 -0
- package/dist/components/atoms/Modal.d.ts +27 -3
- package/dist/components/atoms/Modal.es.js +15 -16
- package/dist/components/atoms/Modal.es.js.map +1 -1
- package/dist/components/atoms/Notification.d.ts +1 -1
- package/dist/components/atoms/Notification.es.js +26 -3
- package/dist/components/atoms/Notification.es.js.map +1 -1
- package/dist/components/atoms/OutlinedRadio.d.ts +6 -2
- package/dist/components/atoms/OutlinedRadio.es.js +12 -25
- package/dist/components/atoms/OutlinedRadio.es.js.map +1 -1
- package/dist/components/atoms/Progress.d.ts +48 -0
- package/dist/components/atoms/Progress.es.js +279 -0
- package/dist/components/atoms/Progress.es.js.map +1 -0
- package/dist/components/atoms/Skeleton.d.ts +9 -3
- package/dist/components/atoms/Skeleton.es.js +33 -3
- package/dist/components/atoms/Skeleton.es.js.map +1 -1
- package/dist/components/atoms/Spinner.d.ts +15 -4
- package/dist/components/atoms/Spinner.es.js +86 -22
- package/dist/components/atoms/Spinner.es.js.map +1 -1
- package/dist/components/atoms/Switch.d.ts +19 -7
- package/dist/components/atoms/Switch.es.js +288 -50
- package/dist/components/atoms/Switch.es.js.map +1 -1
- package/dist/components/atoms/TabButton.d.ts +17 -3
- package/dist/components/atoms/TabButton.es.js +647 -25
- package/dist/components/atoms/TabButton.es.js.map +1 -1
- package/dist/components/atoms/TabPanel.es.js +1 -1
- package/dist/components/atoms/Tag.d.ts +43 -0
- package/dist/components/atoms/Tag.es.js +219 -0
- package/dist/components/atoms/Tag.es.js.map +1 -0
- package/dist/components/atoms/Tooltip.d.ts +36 -14
- package/dist/components/atoms/Tooltip.es.js +7 -114
- package/dist/components/atoms/Tooltip.es.js.map +1 -1
- package/dist/components/molecules/Alert.d.ts +1 -1
- package/dist/components/molecules/Alert.es.js +13 -9
- package/dist/components/molecules/Alert.es.js.map +1 -1
- package/dist/components/molecules/CopyField.d.ts +2 -2
- package/dist/components/molecules/CopyField.es.js +3 -4
- package/dist/components/molecules/CopyField.es.js.map +1 -1
- package/dist/components/molecules/CustomDrawer.d.ts +5 -4
- package/dist/components/molecules/CustomDrawer.es.js +141 -82
- package/dist/components/molecules/CustomDrawer.es.js.map +1 -1
- package/dist/components/molecules/Dialog.d.ts +16 -8
- package/dist/components/molecules/Dialog.es.js +33 -31
- package/dist/components/molecules/Dialog.es.js.map +1 -1
- package/dist/components/molecules/ImagesPreview.es.js +15 -11
- package/dist/components/molecules/ImagesPreview.es.js.map +1 -1
- package/dist/components/molecules/Input.d.ts +1 -1
- package/dist/components/molecules/Input.es.js +3 -5
- package/dist/components/molecules/Input.es.js.map +1 -1
- package/dist/components/molecules/Markdown/ExpandableMarkdown.d.ts +8 -8
- package/dist/components/molecules/Markdown/components.d.ts +12 -11
- package/dist/components/molecules/Markdown.es.js +26 -49
- package/dist/components/molecules/Markdown.es.js.map +1 -1
- package/dist/components/molecules/Notify.d.ts +30 -1
- package/dist/components/molecules/Notify.es.js +91 -36
- package/dist/components/molecules/Notify.es.js.map +1 -1
- package/dist/components/molecules/SimpleCodeEditor.es.js +32 -19
- package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
- package/dist/components/molecules/ToggleButton.d.ts +3 -2
- package/dist/components/molecules/ToggleButton.es.js +155 -57
- package/dist/components/molecules/ToggleButton.es.js.map +1 -1
- package/dist/components/molecules/agent-chat/UserMessage.es.js +2 -2
- package/dist/components/molecules/agent-chat/UserMessage.es.js.map +1 -1
- package/dist/components/molecules/agent-chat/UserMessageEdit.es.js +5 -5
- package/dist/components/molecules/agent-chat/UserMessageEdit.es.js.map +1 -1
- package/dist/components/molecules/agent-chat/index.d.ts +0 -6
- package/dist/components/molecules/agent-chat.es.js +76 -407
- package/dist/components/molecules/agent-chat.es.js.map +1 -1
- package/dist/components/molecules/monacoEditorCore/MonacoEditorCore.d.ts +0 -1
- package/dist/components/theme/colors.d.ts +17 -53
- package/dist/components/theme/colors.es.js +384 -180
- package/dist/components/theme/colors.es.js.map +1 -1
- package/dist/components/theme/theme.d.ts +14 -11
- package/dist/components/theme/theme.es.js +3 -64
- package/dist/components/theme/theme.es.js.map +1 -1
- package/dist/components/theme/useTheme.es.js +1 -4
- package/dist/components/theme/useTheme.es.js.map +1 -1
- package/dist/composite-CrCQWAKA.js +108 -0
- package/dist/composite-CrCQWAKA.js.map +1 -0
- package/dist/composite-DCpXNxz9.js +66 -0
- package/dist/composite-DCpXNxz9.js.map +1 -0
- package/dist/conversions-CbWPvHRE.js +14 -0
- package/dist/conversions-CbWPvHRE.js.map +1 -0
- package/dist/error-FX4R42W-.js +6 -0
- package/dist/error-FX4R42W-.js.map +1 -0
- package/dist/fonts.css +7 -0
- package/dist/hooks/useContainerDimensions.d.ts +1 -1
- package/dist/index-B806bfA-.js +257 -0
- package/dist/index-B806bfA-.js.map +1 -0
- package/dist/index-DSVg79g-.js +45 -0
- package/dist/index-DSVg79g-.js.map +1 -0
- package/dist/index.d.ts +21 -4
- package/dist/index.es.js +58 -9
- package/dist/index.es.js.map +1 -1
- package/dist/inertValue-IJM5NA30.js +11 -0
- package/dist/inertValue-IJM5NA30.js.map +1 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/markdown.css +13 -14
- package/dist/new-components/atoms/Checkbox.d.ts +6 -0
- package/dist/new-components/atoms/Checkbox.es.js +423 -0
- package/dist/new-components/atoms/Checkbox.es.js.map +1 -0
- package/dist/new-components/atoms/Chip.d.ts +38 -0
- package/dist/new-components/atoms/Chip.es.js +269 -0
- package/dist/new-components/atoms/Chip.es.js.map +1 -0
- package/dist/new-components/atoms/Popover.d.ts +87 -0
- package/dist/new-components/atoms/Popover.es.js +21 -0
- package/dist/new-components/atoms/Popover.es.js.map +1 -0
- package/dist/new-components/atoms/Radio.d.ts +14 -0
- package/dist/new-components/atoms/Radio.es.js +536 -0
- package/dist/new-components/atoms/Radio.es.js.map +1 -0
- package/dist/new-components/atoms/SegmentedControl.d.ts +28 -0
- package/dist/new-components/atoms/SegmentedControl.es.js +326 -0
- package/dist/new-components/atoms/SegmentedControl.es.js.map +1 -0
- package/dist/new-components/atoms/Slider.d.ts +8 -0
- package/dist/new-components/atoms/Slider.es.js +1415 -0
- package/dist/new-components/atoms/Slider.es.js.map +1 -0
- package/dist/new-components/atoms/Toggletip.d.ts +43 -0
- package/dist/new-components/atoms/Toggletip.es.js +216 -0
- package/dist/new-components/atoms/Toggletip.es.js.map +1 -0
- package/dist/new-components/atoms/stories/ThemeComparison.d.ts +8 -0
- package/dist/shadowDom-Bq4g0Qeu.js +52 -0
- package/dist/shadowDom-Bq4g0Qeu.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tfy-YZ5zY9Jw.js +6 -0
- package/dist/tfy-YZ5zY9Jw.js.map +1 -0
- package/dist/theme.css +9 -154
- package/dist/tokens.css +1124 -0
- package/dist/useAnimationFrame-DwhymJoW.js +108 -0
- package/dist/useAnimationFrame-DwhymJoW.js.map +1 -0
- package/dist/useAriaLabelledBy-B6n92QBS.js +49 -0
- package/dist/useAriaLabelledBy-B6n92QBS.js.map +1 -0
- package/dist/useBaseUiId-Ch7ujXpo.js +281 -0
- package/dist/useBaseUiId-Ch7ujXpo.js.map +1 -0
- package/dist/useButton-PUBhT4Vo.js +235 -0
- package/dist/useButton-PUBhT4Vo.js.map +1 -0
- package/dist/useControlled-BSyYkg5C.js +65 -0
- package/dist/useControlled-BSyYkg5C.js.map +1 -0
- package/dist/useIsoLayoutEffect-e9VA-ICd.js +499 -0
- package/dist/useIsoLayoutEffect-e9VA-ICd.js.map +1 -0
- package/dist/useLabelableId-DCLzrdD-.js +241 -0
- package/dist/useLabelableId-DCLzrdD-.js.map +1 -0
- package/dist/useOpenInteractionType-DGWLoAqp.js +1086 -0
- package/dist/useOpenInteractionType-DGWLoAqp.js.map +1 -0
- package/dist/usePopupHandleStore-BdS-xYID.js +2372 -0
- package/dist/usePopupHandleStore-BdS-xYID.js.map +1 -0
- package/dist/useTimeout-BXf1hDIL.js +46 -0
- package/dist/useTimeout-BXf1hDIL.js.map +1 -0
- package/dist/useTransitionStatus-C9gg_XJ-.js +202 -0
- package/dist/useTransitionStatus-C9gg_XJ-.js.map +1 -0
- package/dist/useValueAsRef-BfFRcMg6.js +28 -0
- package/dist/useValueAsRef-BfFRcMg6.js.map +1 -0
- package/dist/utils/classNames.d.ts +3 -2
- package/dist/visuallyHidden-B6H2X3_Y.js +26 -0
- package/dist/visuallyHidden-B6H2X3_Y.js.map +1 -0
- package/dist/vite-env.d.ts +18 -0
- package/package.json +30 -22
- package/dist/Input-BvwIpntS.js.map +0 -1
- package/dist/Notification-BT4CZ69U.js +0 -39
- package/dist/Notification-BT4CZ69U.js.map +0 -1
- package/dist/RootFontSizeContext-7vgn7Y_k.js +0 -22
- package/dist/RootFontSizeContext-7vgn7Y_k.js.map +0 -1
- package/dist/classNames-Dy-RXSjS.js +0 -9
- package/dist/classNames-Dy-RXSjS.js.map +0 -1
- package/dist/components/molecules/DropdownMenu.d.ts +0 -18
- package/dist/components/molecules/DropdownMenu.es.js +0 -104
- package/dist/components/molecules/DropdownMenu.es.js.map +0 -1
- package/dist/components/molecules/ThumbsFeedback.d.ts +0 -13
- package/dist/components/molecules/ThumbsFeedback.es.js +0 -98
- package/dist/components/molecules/ThumbsFeedback.es.js.map +0 -1
- package/dist/components/molecules/agent-chat/SandboxToolCall.d.ts +0 -15
- package/dist/components/molecules/agent-chat/ToolCallCard.d.ts +0 -26
- package/dist/components/molecules/agent-chat/ToolCallContentBlock.d.ts +0 -17
- package/dist/components/theme/lightColorPlugin.d.ts +0 -1
- package/dist/components/theme/lightColorPlugin.es.js +0 -92
- package/dist/components/theme/lightColorPlugin.es.js.map +0 -1
- package/dist/tailwindPreset.d.ts +0 -144
- package/dist/tailwindPreset.es.js +0 -100
- package/dist/tailwindPreset.es.js.map +0 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { E as EMPTY_ARRAY, e as useRefWithInit } from "./useIsoLayoutEffect-e9VA-ICd.js";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
function useOnMount(fn) {
|
|
7
|
+
React.useEffect(fn, EMPTY_ARRAY);
|
|
8
|
+
}
|
|
9
|
+
const EMPTY = null;
|
|
10
|
+
let LAST_RAF = globalThis.requestAnimationFrame;
|
|
11
|
+
class Scheduler {
|
|
12
|
+
constructor() {
|
|
13
|
+
/* This implementation uses an array as a backing data-structure for frame callbacks.
|
|
14
|
+
* It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
|
|
15
|
+
* never calls the native `cancelAnimationFrame` if there are no frames left. This can
|
|
16
|
+
* be much more efficient if there is a call pattern that alterns as
|
|
17
|
+
* "request-cancel-request-cancel-…".
|
|
18
|
+
* But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
|
|
19
|
+
* frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
|
|
20
|
+
__publicField(this, "callbacks", []);
|
|
21
|
+
__publicField(this, "callbacksCount", 0);
|
|
22
|
+
__publicField(this, "nextId", 1);
|
|
23
|
+
__publicField(this, "startId", 1);
|
|
24
|
+
__publicField(this, "isScheduled", false);
|
|
25
|
+
__publicField(this, "tick", (timestamp) => {
|
|
26
|
+
var _a;
|
|
27
|
+
this.isScheduled = false;
|
|
28
|
+
const currentCallbacks = this.callbacks;
|
|
29
|
+
const currentCallbacksCount = this.callbacksCount;
|
|
30
|
+
this.callbacks = [];
|
|
31
|
+
this.callbacksCount = 0;
|
|
32
|
+
this.startId = this.nextId;
|
|
33
|
+
if (currentCallbacksCount > 0) {
|
|
34
|
+
for (let i = 0; i < currentCallbacks.length; i += 1) {
|
|
35
|
+
(_a = currentCallbacks[i]) == null ? void 0 : _a.call(currentCallbacks, timestamp);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
request(fn) {
|
|
41
|
+
const id = this.nextId;
|
|
42
|
+
this.nextId += 1;
|
|
43
|
+
this.callbacks.push(fn);
|
|
44
|
+
this.callbacksCount += 1;
|
|
45
|
+
const didRAFChange = process.env.NODE_ENV !== "production" && LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
|
|
46
|
+
if (!this.isScheduled || didRAFChange) {
|
|
47
|
+
requestAnimationFrame(this.tick);
|
|
48
|
+
this.isScheduled = true;
|
|
49
|
+
}
|
|
50
|
+
return id;
|
|
51
|
+
}
|
|
52
|
+
cancel(id) {
|
|
53
|
+
const index = id - this.startId;
|
|
54
|
+
if (index < 0 || index >= this.callbacks.length) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (this.callbacks[index] === null) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
this.callbacks[index] = null;
|
|
61
|
+
this.callbacksCount -= 1;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
let scheduler = new Scheduler();
|
|
65
|
+
class AnimationFrame {
|
|
66
|
+
constructor() {
|
|
67
|
+
__publicField(this, "currentId", EMPTY);
|
|
68
|
+
__publicField(this, "cancel", () => {
|
|
69
|
+
if (this.currentId !== EMPTY) {
|
|
70
|
+
scheduler.cancel(this.currentId);
|
|
71
|
+
this.currentId = EMPTY;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
__publicField(this, "disposeEffect", () => {
|
|
75
|
+
return this.cancel;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
static create() {
|
|
79
|
+
return new AnimationFrame();
|
|
80
|
+
}
|
|
81
|
+
static request(fn) {
|
|
82
|
+
return scheduler.request(fn);
|
|
83
|
+
}
|
|
84
|
+
static cancel(id) {
|
|
85
|
+
return scheduler.cancel(id);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
89
|
+
*/
|
|
90
|
+
request(fn) {
|
|
91
|
+
this.cancel();
|
|
92
|
+
this.currentId = scheduler.request(() => {
|
|
93
|
+
this.currentId = EMPTY;
|
|
94
|
+
fn();
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function useAnimationFrame() {
|
|
99
|
+
const timeout = useRefWithInit(AnimationFrame.create).current;
|
|
100
|
+
useOnMount(timeout.disposeEffect);
|
|
101
|
+
return timeout;
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
AnimationFrame as A,
|
|
105
|
+
useOnMount as a,
|
|
106
|
+
useAnimationFrame as u
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=useAnimationFrame-DwhymJoW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnimationFrame-DwhymJoW.js","sources":["../node_modules/@base-ui/utils/useOnMount.mjs","../node_modules/@base-ui/utils/useAnimationFrame.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { EMPTY_ARRAY } from \"./empty.mjs\";\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY_ARRAY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport { useRefWithInit } from \"./useRefWithInit.mjs\";\nimport { useOnMount } from \"./useOnMount.mjs\";\n/** Unlike `setTimeout`, rAF doesn't guarantee a positive integer return value, so we can't have\n * a monomorphic `uint` type with `0` meaning empty.\n * See warning note at:\n * https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame#return_value */\nconst EMPTY = null;\nlet LAST_RAF = globalThis.requestAnimationFrame;\nclass Scheduler {\n /* This implementation uses an array as a backing data-structure for frame callbacks.\n * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it\n * never calls the native `cancelAnimationFrame` if there are no frames left. This can\n * be much more efficient if there is a call pattern that alterns as\n * \"request-cancel-request-cancel-…\".\n * But in the case of \"request-request-…-cancel-cancel-…\", it leaves the final animation\n * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */\n\n callbacks = [];\n callbacksCount = 0;\n nextId = 1;\n startId = 1;\n isScheduled = false;\n tick = timestamp => {\n this.isScheduled = false;\n const currentCallbacks = this.callbacks;\n const currentCallbacksCount = this.callbacksCount;\n\n // Update these before iterating, callbacks could call `requestAnimationFrame` again.\n this.callbacks = [];\n this.callbacksCount = 0;\n this.startId = this.nextId;\n if (currentCallbacksCount > 0) {\n for (let i = 0; i < currentCallbacks.length; i += 1) {\n currentCallbacks[i]?.(timestamp);\n }\n }\n };\n request(fn) {\n const id = this.nextId;\n this.nextId += 1;\n this.callbacks.push(fn);\n this.callbacksCount += 1;\n\n /* In a test environment with fake timers, a fake `requestAnimationFrame` can be called\n * but there's no guarantee that the animation frame will actually run before the fake\n * timers are teared, which leaves `isScheduled` set, but won't run our `tick()`. */\n const didRAFChange = process.env.NODE_ENV !== 'production' && LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);\n if (!this.isScheduled || didRAFChange) {\n requestAnimationFrame(this.tick);\n this.isScheduled = true;\n }\n return id;\n }\n cancel(id) {\n const index = id - this.startId;\n if (index < 0 || index >= this.callbacks.length) {\n return;\n }\n if (this.callbacks[index] === null) {\n return;\n }\n this.callbacks[index] = null;\n this.callbacksCount -= 1;\n }\n}\nlet scheduler = new Scheduler();\n\n/**\n * Replaces the shared scheduler and drops all pending animation frame callbacks.\n *\n * For test environments only. The scheduler is process-global, so a callback scheduled in one test\n * but never run (e.g. requested under fake timers that were torn down before the frame fired) would\n * otherwise survive into a later test and run there against stale state. Call between tests to drop\n * such leftovers.\n */\nexport function resetAnimationFrameScheduler() {\n const previous = scheduler;\n scheduler = new Scheduler();\n // Continue the id sequence so `cancel()` calls from `AnimationFrame` instances created before the\n // reset cannot cancel callbacks scheduled after it.\n scheduler.nextId = previous.nextId;\n scheduler.startId = previous.nextId;\n // A frame requested before the reset may still be pending and holds the previous scheduler's\n // `tick`; empty its queue in place so that frame runs nothing when it eventually fires.\n previous.callbacks = [];\n previous.callbacksCount = 0;\n}\nexport class AnimationFrame {\n static create() {\n return new AnimationFrame();\n }\n static request(fn) {\n return scheduler.request(fn);\n }\n static cancel(id) {\n return scheduler.cancel(id);\n }\n currentId = EMPTY;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n request(fn) {\n this.cancel();\n this.currentId = scheduler.request(() => {\n this.currentId = EMPTY;\n fn();\n });\n }\n cancel = () => {\n if (this.currentId !== EMPTY) {\n scheduler.cancel(this.currentId);\n this.currentId = EMPTY;\n }\n };\n disposeEffect = () => {\n return this.cancel;\n };\n}\n\n/**\n * A `requestAnimationFrame` with automatic cleanup and guard.\n */\nexport function useAnimationFrame() {\n const timeout = useRefWithInit(AnimationFrame.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}"],"names":[],"mappings":";;;;;AAQO,SAAS,WAAW,IAAI;AAG7B,QAAM,UAAU,IAAI,WAAW;AAEjC;ACLA,MAAM,QAAQ;AACd,IAAI,WAAW,WAAW;AAC1B,MAAM,UAAU;AAAA,EAAhB;AASE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qCAAY,CAAA;AACZ,0CAAiB;AACjB,kCAAS;AACT,mCAAU;AACV,uCAAc;AACd,gCAAO,eAAa;;AAClB,WAAK,cAAc;AACnB,YAAM,mBAAmB,KAAK;AAC9B,YAAM,wBAAwB,KAAK;AAGnC,WAAK,YAAY,CAAA;AACjB,WAAK,iBAAiB;AACtB,WAAK,UAAU,KAAK;AACpB,UAAI,wBAAwB,GAAG;AAC7B,iBAAS,IAAI,GAAG,IAAI,iBAAiB,QAAQ,KAAK,GAAG;AACnD,iCAAiB,OAAjB,0CAAsB;AAAA,QACxB;AAAA,MACF;AAAA,IACF;AAAA;AAAA,EACA,QAAQ,IAAI;AACV,UAAM,KAAK,KAAK;AAChB,SAAK,UAAU;AACf,SAAK,UAAU,KAAK,EAAE;AACtB,SAAK,kBAAkB;AAKvB,UAAM,eAAe,QAAQ,IAAI,aAAa,gBAAgB,aAAa,0BAA0B,WAAW,uBAAuB;AACvI,QAAI,CAAC,KAAK,eAAe,cAAc;AACrC,4BAAsB,KAAK,IAAI;AAC/B,WAAK,cAAc;AAAA,IACrB;AACA,WAAO;AAAA,EACT;AAAA,EACA,OAAO,IAAI;AACT,UAAM,QAAQ,KAAK,KAAK;AACxB,QAAI,QAAQ,KAAK,SAAS,KAAK,UAAU,QAAQ;AAC/C;AAAA,IACF;AACA,QAAI,KAAK,UAAU,KAAK,MAAM,MAAM;AAClC;AAAA,IACF;AACA,SAAK,UAAU,KAAK,IAAI;AACxB,SAAK,kBAAkB;AAAA,EACzB;AACF;AACA,IAAI,YAAY,IAAI,UAAS;AAsBtB,MAAM,eAAe;AAAA,EAArB;AAUL,qCAAY;AAYZ,kCAAS,MAAM;AACb,UAAI,KAAK,cAAc,OAAO;AAC5B,kBAAU,OAAO,KAAK,SAAS;AAC/B,aAAK,YAAY;AAAA,MACnB;AAAA,IACF;AACA,yCAAgB,MAAM;AACpB,aAAO,KAAK;AAAA,IACd;AAAA;AAAA,EA7BA,OAAO,SAAS;AACd,WAAO,IAAI,eAAc;AAAA,EAC3B;AAAA,EACA,OAAO,QAAQ,IAAI;AACjB,WAAO,UAAU,QAAQ,EAAE;AAAA,EAC7B;AAAA,EACA,OAAO,OAAO,IAAI;AAChB,WAAO,UAAU,OAAO,EAAE;AAAA,EAC5B;AAAA;AAAA;AAAA;AAAA,EAMA,QAAQ,IAAI;AACV,SAAK,OAAM;AACX,SAAK,YAAY,UAAU,QAAQ,MAAM;AACvC,WAAK,YAAY;AACjB,SAAE;AAAA,IACJ,CAAC;AAAA,EACH;AAUF;AAKO,SAAS,oBAAoB;AAClC,QAAM,UAAU,eAAe,eAAe,MAAM,EAAE;AACtD,aAAW,QAAQ,aAAa;AAChC,SAAO;AACT;","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { u as useIsoLayoutEffect } from "./useIsoLayoutEffect-e9VA-ICd.js";
|
|
3
|
+
import { u as useBaseUiId } from "./useBaseUiId-Ch7ujXpo.js";
|
|
4
|
+
function useAriaLabelledBy(explicitAriaLabelledBy, labelId, labelSourceRef, enableFallback = true, labelSourceId, ariaLabel) {
|
|
5
|
+
const [fallbackAriaLabelledBy, setFallbackAriaLabelledBy] = React.useState();
|
|
6
|
+
const generatedLabelId = useBaseUiId(labelSourceId ? `${labelSourceId}-label` : void 0);
|
|
7
|
+
const hasAriaLabel = Boolean(ariaLabel == null ? void 0 : ariaLabel.trim());
|
|
8
|
+
const implicitLabelId = hasAriaLabel ? void 0 : labelId;
|
|
9
|
+
const ariaLabelledBy = explicitAriaLabelledBy ?? implicitLabelId ?? fallbackAriaLabelledBy;
|
|
10
|
+
useIsoLayoutEffect(() => {
|
|
11
|
+
const nextAriaLabelledBy = explicitAriaLabelledBy || labelId || hasAriaLabel || !enableFallback ? void 0 : getAriaLabelledBy(labelSourceRef.current, generatedLabelId);
|
|
12
|
+
if (fallbackAriaLabelledBy !== nextAriaLabelledBy) {
|
|
13
|
+
setFallbackAriaLabelledBy(nextAriaLabelledBy);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
return ariaLabelledBy;
|
|
17
|
+
}
|
|
18
|
+
function getAriaLabelledBy(labelSource, generatedLabelId) {
|
|
19
|
+
const label = findAssociatedLabel(labelSource);
|
|
20
|
+
if (!label) {
|
|
21
|
+
return void 0;
|
|
22
|
+
}
|
|
23
|
+
if (!label.id && generatedLabelId) {
|
|
24
|
+
label.id = generatedLabelId;
|
|
25
|
+
}
|
|
26
|
+
return label.id || void 0;
|
|
27
|
+
}
|
|
28
|
+
function findAssociatedLabel(labelSource) {
|
|
29
|
+
if (!labelSource) {
|
|
30
|
+
return void 0;
|
|
31
|
+
}
|
|
32
|
+
const parent = labelSource.parentElement;
|
|
33
|
+
if (parent && parent.tagName === "LABEL") {
|
|
34
|
+
return parent;
|
|
35
|
+
}
|
|
36
|
+
const controlId = labelSource.id;
|
|
37
|
+
if (controlId) {
|
|
38
|
+
const nextSibling = labelSource.nextElementSibling;
|
|
39
|
+
if (nextSibling && nextSibling.htmlFor === controlId) {
|
|
40
|
+
return nextSibling;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const labels = labelSource.labels;
|
|
44
|
+
return labels && labels[0];
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
useAriaLabelledBy as u
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=useAriaLabelledBy-B6n92QBS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAriaLabelledBy-B6n92QBS.js","sources":["../node_modules/@base-ui/react/internals/labelable-provider/useAriaLabelledBy.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../useBaseUiId.mjs\";\nexport function useAriaLabelledBy(explicitAriaLabelledBy, labelId, labelSourceRef, enableFallback = true, labelSourceId, ariaLabel) {\n const [fallbackAriaLabelledBy, setFallbackAriaLabelledBy] = React.useState();\n const generatedLabelId = useBaseUiId(labelSourceId ? `${labelSourceId}-label` : undefined);\n // A non-blank `aria-label` wins over any associated label, as it does on native inputs.\n const hasAriaLabel = Boolean(ariaLabel?.trim());\n const implicitLabelId = hasAriaLabel ? undefined : labelId;\n const ariaLabelledBy = explicitAriaLabelledBy ?? implicitLabelId ?? fallbackAriaLabelledBy;\n\n // Fallback for <span> controls labelled by wrapping/sibling native <label>.\n // Run after every commit so DOM association changes (e.g. label mount/unmount)\n // are reflected even when props/state deps are unchanged.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useIsoLayoutEffect(() => {\n const nextAriaLabelledBy = explicitAriaLabelledBy || labelId || hasAriaLabel || !enableFallback ? undefined : getAriaLabelledBy(labelSourceRef.current, generatedLabelId);\n if (fallbackAriaLabelledBy !== nextAriaLabelledBy) {\n setFallbackAriaLabelledBy(nextAriaLabelledBy);\n }\n });\n return ariaLabelledBy;\n}\nfunction getAriaLabelledBy(labelSource, generatedLabelId) {\n const label = findAssociatedLabel(labelSource);\n if (!label) {\n return undefined;\n }\n if (!label.id && generatedLabelId) {\n label.id = generatedLabelId;\n }\n return label.id || undefined;\n}\nfunction findAssociatedLabel(labelSource) {\n if (!labelSource) {\n return undefined;\n }\n\n // Fast path before the expensive `.labels` read.\n const parent = labelSource.parentElement;\n if (parent && parent.tagName === 'LABEL') {\n return parent;\n }\n const controlId = labelSource.id;\n if (controlId) {\n const nextSibling = labelSource.nextElementSibling;\n if (nextSibling && nextSibling.htmlFor === controlId) {\n return nextSibling;\n }\n }\n const labels = labelSource.labels;\n return labels && labels[0];\n}"],"names":[],"mappings":";;;AAKO,SAAS,kBAAkB,wBAAwB,SAAS,gBAAgB,iBAAiB,MAAM,eAAe,WAAW;AAClI,QAAM,CAAC,wBAAwB,yBAAyB,IAAI,MAAM,SAAQ;AAC1E,QAAM,mBAAmB,YAAY,gBAAgB,GAAG,aAAa,WAAW,MAAS;AAEzF,QAAM,eAAe,QAAQ,uCAAW,MAAM;AAC9C,QAAM,kBAAkB,eAAe,SAAY;AACnD,QAAM,iBAAiB,0BAA0B,mBAAmB;AAMpE,qBAAmB,MAAM;AACvB,UAAM,qBAAqB,0BAA0B,WAAW,gBAAgB,CAAC,iBAAiB,SAAY,kBAAkB,eAAe,SAAS,gBAAgB;AACxK,QAAI,2BAA2B,oBAAoB;AACjD,gCAA0B,kBAAkB;AAAA,IAC9C;AAAA,EACF,CAAC;AACD,SAAO;AACT;AACA,SAAS,kBAAkB,aAAa,kBAAkB;AACxD,QAAM,QAAQ,oBAAoB,WAAW;AAC7C,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AACA,MAAI,CAAC,MAAM,MAAM,kBAAkB;AACjC,UAAM,KAAK;AAAA,EACb;AACA,SAAO,MAAM,MAAM;AACrB;AACA,SAAS,oBAAoB,aAAa;AACxC,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AAGA,QAAM,SAAS,YAAY;AAC3B,MAAI,UAAU,OAAO,YAAY,SAAS;AACxC,WAAO;AAAA,EACT;AACA,QAAM,YAAY,YAAY;AAC9B,MAAI,WAAW;AACb,UAAM,cAAc,YAAY;AAChC,QAAI,eAAe,YAAY,YAAY,WAAW;AACpD,aAAO;AAAA,IACT;AAAA,EACF;AACA,QAAM,SAAS,YAAY;AAC3B,SAAO,UAAU,OAAO,CAAC;AAC3B;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { d as EMPTY_OBJECT, S as SafeReact } from "./useIsoLayoutEffect-e9VA-ICd.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
function hasWindow() {
|
|
4
|
+
return typeof window !== "undefined";
|
|
5
|
+
}
|
|
6
|
+
function getNodeName(node) {
|
|
7
|
+
if (isNode(node)) {
|
|
8
|
+
return (node.nodeName || "").toLowerCase();
|
|
9
|
+
}
|
|
10
|
+
return "#document";
|
|
11
|
+
}
|
|
12
|
+
function getWindow(node) {
|
|
13
|
+
var _node$ownerDocument;
|
|
14
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
15
|
+
}
|
|
16
|
+
function getDocumentElement(node) {
|
|
17
|
+
var _ref;
|
|
18
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
19
|
+
}
|
|
20
|
+
function isNode(value) {
|
|
21
|
+
if (!hasWindow()) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
25
|
+
}
|
|
26
|
+
function isElement(value) {
|
|
27
|
+
if (!hasWindow()) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
31
|
+
}
|
|
32
|
+
function isHTMLElement(value) {
|
|
33
|
+
if (!hasWindow()) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
37
|
+
}
|
|
38
|
+
function isShadowRoot(value) {
|
|
39
|
+
if (!hasWindow() || typeof ShadowRoot === "undefined") {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
43
|
+
}
|
|
44
|
+
function isOverflowElement(element) {
|
|
45
|
+
const {
|
|
46
|
+
overflow,
|
|
47
|
+
overflowX,
|
|
48
|
+
overflowY,
|
|
49
|
+
display
|
|
50
|
+
} = getComputedStyle(element);
|
|
51
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
|
|
52
|
+
}
|
|
53
|
+
function isTableElement(element) {
|
|
54
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
55
|
+
}
|
|
56
|
+
function isTopLayer(element) {
|
|
57
|
+
try {
|
|
58
|
+
if (element.matches(":popover-open")) {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
} catch (_e) {
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
return element.matches(":modal");
|
|
65
|
+
} catch (_e) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
70
|
+
const containRe = /paint|layout|strict|content/;
|
|
71
|
+
const isNotNone = (value) => !!value && value !== "none";
|
|
72
|
+
let isWebKitValue;
|
|
73
|
+
function isContainingBlock(elementOrCss) {
|
|
74
|
+
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
75
|
+
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
|
|
76
|
+
}
|
|
77
|
+
function getContainingBlock(element) {
|
|
78
|
+
let currentNode = getParentNode(element);
|
|
79
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
80
|
+
if (isContainingBlock(currentNode)) {
|
|
81
|
+
return currentNode;
|
|
82
|
+
} else if (isTopLayer(currentNode)) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
currentNode = getParentNode(currentNode);
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
function isWebKit() {
|
|
90
|
+
if (isWebKitValue == null) {
|
|
91
|
+
isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
|
|
92
|
+
}
|
|
93
|
+
return isWebKitValue;
|
|
94
|
+
}
|
|
95
|
+
function isLastTraversableNode(node) {
|
|
96
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
97
|
+
}
|
|
98
|
+
function getComputedStyle(element) {
|
|
99
|
+
return getWindow(element).getComputedStyle(element);
|
|
100
|
+
}
|
|
101
|
+
function getNodeScroll(element) {
|
|
102
|
+
if (isElement(element)) {
|
|
103
|
+
return {
|
|
104
|
+
scrollLeft: element.scrollLeft,
|
|
105
|
+
scrollTop: element.scrollTop
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
scrollLeft: element.scrollX,
|
|
110
|
+
scrollTop: element.scrollY
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function getParentNode(node) {
|
|
114
|
+
if (getNodeName(node) === "html") {
|
|
115
|
+
return node;
|
|
116
|
+
}
|
|
117
|
+
const result = (
|
|
118
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
119
|
+
node.assignedSlot || // DOM Element detected.
|
|
120
|
+
node.parentNode || // ShadowRoot detected.
|
|
121
|
+
isShadowRoot(node) && node.host || // Fallback.
|
|
122
|
+
getDocumentElement(node)
|
|
123
|
+
);
|
|
124
|
+
return isShadowRoot(result) ? result.host : result;
|
|
125
|
+
}
|
|
126
|
+
function getNearestOverflowAncestor(node) {
|
|
127
|
+
const parentNode = getParentNode(node);
|
|
128
|
+
if (isLastTraversableNode(parentNode)) {
|
|
129
|
+
return (node.ownerDocument || node).body;
|
|
130
|
+
}
|
|
131
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
132
|
+
return parentNode;
|
|
133
|
+
}
|
|
134
|
+
return getNearestOverflowAncestor(parentNode);
|
|
135
|
+
}
|
|
136
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
137
|
+
var _node$ownerDocument2;
|
|
138
|
+
if (list === void 0) {
|
|
139
|
+
list = [];
|
|
140
|
+
}
|
|
141
|
+
if (traverseIframes === void 0) {
|
|
142
|
+
traverseIframes = true;
|
|
143
|
+
}
|
|
144
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
145
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
146
|
+
const win = getWindow(scrollableAncestor);
|
|
147
|
+
if (isBody) {
|
|
148
|
+
const frameElement = getFrameElement(win);
|
|
149
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
150
|
+
} else {
|
|
151
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function getFrameElement(win) {
|
|
155
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
156
|
+
}
|
|
157
|
+
function createChangeEventDetails(reason, event, trigger, customProperties) {
|
|
158
|
+
let canceled = false;
|
|
159
|
+
let allowPropagation = false;
|
|
160
|
+
const custom = customProperties ?? EMPTY_OBJECT;
|
|
161
|
+
const details = {
|
|
162
|
+
reason,
|
|
163
|
+
event: event ?? new Event("base-ui"),
|
|
164
|
+
cancel() {
|
|
165
|
+
canceled = true;
|
|
166
|
+
},
|
|
167
|
+
allowPropagation() {
|
|
168
|
+
allowPropagation = true;
|
|
169
|
+
},
|
|
170
|
+
get isCanceled() {
|
|
171
|
+
return canceled;
|
|
172
|
+
},
|
|
173
|
+
get isPropagationAllowed() {
|
|
174
|
+
return allowPropagation;
|
|
175
|
+
},
|
|
176
|
+
trigger,
|
|
177
|
+
...custom
|
|
178
|
+
};
|
|
179
|
+
return details;
|
|
180
|
+
}
|
|
181
|
+
function createGenericEventDetails(reason, event, customProperties) {
|
|
182
|
+
const custom = EMPTY_OBJECT;
|
|
183
|
+
const details = {
|
|
184
|
+
reason,
|
|
185
|
+
event: event ?? new Event("base-ui"),
|
|
186
|
+
...custom
|
|
187
|
+
};
|
|
188
|
+
return details;
|
|
189
|
+
}
|
|
190
|
+
const none = "none";
|
|
191
|
+
const triggerPress = "trigger-press";
|
|
192
|
+
const triggerHover = "trigger-hover";
|
|
193
|
+
const triggerFocus = "trigger-focus";
|
|
194
|
+
const outsidePress = "outside-press";
|
|
195
|
+
const closePress = "close-press";
|
|
196
|
+
const trackPress = "track-press";
|
|
197
|
+
const inputChange = "input-change";
|
|
198
|
+
const focusOut = "focus-out";
|
|
199
|
+
const escapeKey = "escape-key";
|
|
200
|
+
const keyboard = "keyboard";
|
|
201
|
+
const drag = "drag";
|
|
202
|
+
const disabled = "disabled";
|
|
203
|
+
const missing = "missing";
|
|
204
|
+
const initial = "initial";
|
|
205
|
+
const imperativeAction = "imperative-action";
|
|
206
|
+
function useForcedRerendering() {
|
|
207
|
+
const [, setState] = React.useState({});
|
|
208
|
+
return React.useCallback(() => {
|
|
209
|
+
setState({});
|
|
210
|
+
}, []);
|
|
211
|
+
}
|
|
212
|
+
let globalId = 0;
|
|
213
|
+
function useGlobalId(idOverride, prefix = "mui") {
|
|
214
|
+
const defaultId = React.useRef(void 0);
|
|
215
|
+
const forceRerender = useForcedRerendering();
|
|
216
|
+
const id = idOverride ?? defaultId.current;
|
|
217
|
+
React.useEffect(() => {
|
|
218
|
+
if (defaultId.current == null) {
|
|
219
|
+
globalId += 1;
|
|
220
|
+
defaultId.current = `${prefix}-${globalId}`;
|
|
221
|
+
if (idOverride == null) {
|
|
222
|
+
forceRerender();
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}, [idOverride, prefix, forceRerender]);
|
|
226
|
+
return id;
|
|
227
|
+
}
|
|
228
|
+
const maybeReactUseId = SafeReact.useId;
|
|
229
|
+
function useId(idOverride, prefix) {
|
|
230
|
+
if (maybeReactUseId !== void 0) {
|
|
231
|
+
const reactId = maybeReactUseId();
|
|
232
|
+
return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);
|
|
233
|
+
}
|
|
234
|
+
return useGlobalId(idOverride, prefix);
|
|
235
|
+
}
|
|
236
|
+
function useBaseUiId(idOverride) {
|
|
237
|
+
return useId(idOverride, "base-ui");
|
|
238
|
+
}
|
|
239
|
+
export {
|
|
240
|
+
getParentNode as A,
|
|
241
|
+
outsidePress as B,
|
|
242
|
+
useForcedRerendering as C,
|
|
243
|
+
triggerFocus as D,
|
|
244
|
+
isOverflowElement as E,
|
|
245
|
+
getOverflowAncestors as F,
|
|
246
|
+
getDocumentElement as G,
|
|
247
|
+
isTopLayer as H,
|
|
248
|
+
isTableElement as I,
|
|
249
|
+
isContainingBlock as J,
|
|
250
|
+
getContainingBlock as K,
|
|
251
|
+
getNodeScroll as L,
|
|
252
|
+
isWebKit as M,
|
|
253
|
+
getFrameElement as N,
|
|
254
|
+
closePress as a,
|
|
255
|
+
imperativeAction as b,
|
|
256
|
+
createChangeEventDetails as c,
|
|
257
|
+
disabled as d,
|
|
258
|
+
triggerPress as e,
|
|
259
|
+
focusOut as f,
|
|
260
|
+
getWindow as g,
|
|
261
|
+
escapeKey as h,
|
|
262
|
+
initial as i,
|
|
263
|
+
isHTMLElement as j,
|
|
264
|
+
createGenericEventDetails as k,
|
|
265
|
+
keyboard as l,
|
|
266
|
+
missing as m,
|
|
267
|
+
none as n,
|
|
268
|
+
inputChange as o,
|
|
269
|
+
isElement as p,
|
|
270
|
+
drag as q,
|
|
271
|
+
trackPress as r,
|
|
272
|
+
getNodeName as s,
|
|
273
|
+
triggerHover as t,
|
|
274
|
+
useBaseUiId as u,
|
|
275
|
+
isShadowRoot as v,
|
|
276
|
+
getComputedStyle as w,
|
|
277
|
+
useId as x,
|
|
278
|
+
isNode as y,
|
|
279
|
+
isLastTraversableNode as z
|
|
280
|
+
};
|
|
281
|
+
//# sourceMappingURL=useBaseUiId-Ch7ujXpo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBaseUiId-Ch7ujXpo.js","sources":["../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs","../node_modules/@base-ui/react/internals/reason-parts.mjs","../node_modules/@base-ui/utils/useForcedRerendering.mjs","../node_modules/@base-ui/utils/useId.mjs","../node_modules/@base-ui/react/internals/useBaseUiId.mjs"],"sourcesContent":["function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return (node.ownerDocument || node).body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { EMPTY_OBJECT } from '@base-ui/utils/empty';\n\n/**\n * Maps a change `reason` string to the corresponding native event type.\n */\n\n/**\n * Details of custom change events emitted by Base UI components.\n */\n\n/**\n * Details of custom generic events emitted by Base UI components.\n */\n\n/** Highlight navigation uses mouse events for hover and pointer events for leaving an item. */\n\n/**\n * Creates a Base UI event details object with the given reason and utilities\n * for preventing Base UI's internal event handling.\n */\nexport function createChangeEventDetails(reason, event, trigger, customProperties) {\n let canceled = false;\n let allowPropagation = false;\n const custom = customProperties ?? EMPTY_OBJECT;\n const details = {\n reason,\n event: event ?? new Event('base-ui'),\n cancel() {\n canceled = true;\n },\n allowPropagation() {\n allowPropagation = true;\n },\n get isCanceled() {\n return canceled;\n },\n get isPropagationAllowed() {\n return allowPropagation;\n },\n trigger,\n ...custom\n };\n return details;\n}\nexport function createGenericEventDetails(reason, event, customProperties) {\n const custom = customProperties ?? EMPTY_OBJECT;\n const details = {\n reason,\n event: event ?? new Event('base-ui'),\n ...custom\n };\n return details;\n}","export const none = 'none';\nexport const triggerPress = 'trigger-press';\nexport const triggerHover = 'trigger-hover';\nexport const triggerFocus = 'trigger-focus';\nexport const outsidePress = 'outside-press';\nexport const itemPress = 'item-press';\nexport const closePress = 'close-press';\nexport const linkPress = 'link-press';\nexport const clearPress = 'clear-press';\nexport const chipRemovePress = 'chip-remove-press';\nexport const trackPress = 'track-press';\nexport const incrementPress = 'increment-press';\nexport const decrementPress = 'decrement-press';\nexport const inputChange = 'input-change';\nexport const inputClear = 'input-clear';\nexport const inputBlur = 'input-blur';\nexport const inputPaste = 'input-paste';\nexport const inputPress = 'input-press';\nexport const focusOut = 'focus-out';\nexport const escapeKey = 'escape-key';\nexport const closeWatcher = 'close-watcher';\nexport const listNavigation = 'list-navigation';\nexport const keyboard = 'keyboard';\nexport const pointer = 'pointer';\nexport const drag = 'drag';\nexport const wheel = 'wheel';\nexport const scrub = 'scrub';\nexport const popupClose = 'popup-close';\nexport const cancelOpen = 'cancel-open';\nexport const siblingOpen = 'sibling-open';\nexport const disabled = 'disabled';\nexport const missing = 'missing';\nexport const initial = 'initial';\nexport const imperativeAction = 'imperative-action';\nexport const swipe = 'swipe';\nexport const windowResize = 'window-resize';","'use client';\n\nimport * as React from 'react';\n\n/**\n * Returns a function that forces a rerender.\n */\nexport function useForcedRerendering() {\n const [, setState] = React.useState({});\n return React.useCallback(() => {\n setState({});\n }, []);\n}","'use client';\n\nimport * as React from 'react';\nimport { SafeReact } from \"./safeReact.mjs\";\nimport { useForcedRerendering } from \"./useForcedRerendering.mjs\";\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride, prefix = 'mui') {\n const defaultId = React.useRef(undefined);\n const forceRerender = useForcedRerendering();\n const id = idOverride ?? defaultId.current;\n React.useEffect(() => {\n if (defaultId.current == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n defaultId.current = `${prefix}-${globalId}`;\n // Generate the fallback even while `idOverride` is set.\n // Removing the override then swaps in the existing id within the same commit.\n // Deferring generation would leave one commit with no id, breaking `htmlFor` and `aria-labelledby` links.\n // Only rerender when the fallback is the value being rendered.\n if (idOverride == null) {\n forceRerender();\n }\n }\n }, [idOverride, prefix, forceRerender]);\n return id;\n}\nconst maybeReactUseId = SafeReact.useId;\n\n/**\n *\n * @example <div id={useId()} />\n * @param {string | undefined} idOverride overrides the generated id when provided\n * @param {string | undefined} prefix prefixes the generated id when provided\n * @returns {string | undefined}\n */\nexport function useId(idOverride, prefix) {\n // React.useId() is only available from React 18.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride, prefix);\n}","'use client';\n\nimport { useId } from '@base-ui/utils/useId';\n\n/**\n * Wraps `useId` and prefixes generated `id`s with `base-ui-`\n * @param {string | undefined} idOverride overrides the generated id when provided\n * @returns {string | undefined}\n */\nexport function useBaseUiId(idOverride) {\n return useId(idOverride, 'base-ui');\n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