@jobber/components 8.21.1 → 8.22.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/Dialog.d.ts +1 -0
- package/Dialog.js +17 -0
- package/dist/BottomSheet-cjs.js +34 -7
- package/dist/BottomSheet-es.js +34 -8
- package/dist/Card/index.cjs +1 -0
- package/dist/Card/index.mjs +1 -0
- package/dist/ComboboxChipRemove-es.js +3 -3
- package/dist/DataDump/index.cjs +1 -0
- package/dist/DataDump/index.mjs +1 -0
- package/dist/Dialog/Dialog.d.ts +3 -0
- package/dist/Dialog/Dialog.types.d.ts +205 -0
- package/dist/Dialog/DialogBottomSheet.d.ts +28 -0
- package/dist/Dialog/DialogModal.d.ts +20 -0
- package/dist/Dialog/constants.d.ts +1 -0
- package/dist/Dialog/dialogComposableShared.d.ts +53 -0
- package/dist/Dialog/dialogReturnFocus.d.ts +43 -0
- package/dist/Dialog/index.cjs +32 -0
- package/dist/Dialog/index.d.ts +4 -0
- package/dist/Dialog/index.mjs +24 -0
- package/dist/DrawerDescription-cjs.js +409 -0
- package/dist/DrawerDescription-es.js +382 -0
- package/dist/DrawerTitle-cjs.js +116 -0
- package/dist/DrawerTitle-es.js +92 -0
- package/dist/InputNumberExperimental-es.js +1 -1
- package/dist/InternalBackdrop-es.js +2 -2
- package/dist/Menu/index.cjs +1 -0
- package/dist/Menu/index.mjs +1 -0
- package/dist/Menu-cjs.js +5 -3
- package/dist/Menu-es.js +5 -3
- package/dist/MenuSubmenuTrigger-cjs.js +49 -91
- package/dist/MenuSubmenuTrigger-es.js +51 -91
- package/dist/NumberFieldInput-es.js +1 -1
- package/dist/Page/index.cjs +1 -0
- package/dist/Page/index.mjs +1 -0
- package/dist/ScrollAreaViewport-cjs.js +938 -935
- package/dist/ScrollAreaViewport-es.js +938 -938
- package/dist/dialogReturnFocus-cjs.js +427 -0
- package/dist/dialogReturnFocus-es.js +423 -0
- package/dist/index.cjs +13 -7
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +10 -7
- package/dist/primitives/BottomSheet/BottomSheet.d.ts +19 -1
- package/dist/primitives/BottomSheet/BottomSheet.types.d.ts +8 -0
- package/dist/primitives/BottomSheet/index.cjs +1 -0
- package/dist/primitives/BottomSheet/index.d.ts +1 -1
- package/dist/primitives/BottomSheet/index.mjs +1 -1
- package/dist/primitives/index.cjs +1 -0
- package/dist/primitives/index.mjs +1 -1
- package/dist/styles.css +360 -0
- package/dist/unstyledPrimitives/index.cjs +32 -249
- package/dist/unstyledPrimitives/index.d.ts +1 -0
- package/dist/unstyledPrimitives/index.mjs +30 -248
- package/dist/useButton-es.js +1 -1
- package/dist/useCompositeListItem-es.js +2 -2
- package/dist/useLabel-es.js +1 -1
- package/dist/utils/meta/meta.json +11 -1
- package/package.json +2 -2
package/dist/Menu-cjs.js
CHANGED
|
@@ -16,6 +16,7 @@ var buttonRenderAdapter = require('./buttonRenderAdapter-cjs.js');
|
|
|
16
16
|
var BottomSheet = require('./BottomSheet-cjs.js');
|
|
17
17
|
var OverlaySeparator = require('./OverlaySeparator-cjs.js');
|
|
18
18
|
var ScrollAreaViewport = require('./ScrollAreaViewport-cjs.js');
|
|
19
|
+
var DrawerTitle = require('./DrawerTitle-cjs.js');
|
|
19
20
|
var MenuSubmenuTrigger$1 = require('./MenuSubmenuTrigger-cjs.js');
|
|
20
21
|
|
|
21
22
|
var styles$2 = {"wrapper":"h-nk89U2n6Q-","floatingContainer":"krpkWzoaVcc-","menu":"_7sU7mp1w0jM-","legacySection":"_4x-vvEmn4gM-","separator":"i0QNcs4S-wk-","triggerWrapper":"_7CsejipGrzM-","ariaMenu":"bO7lGVQC42c-","ariaItem":"u6fDgbWmPck-","ariaSection":"-TSNrZBKZJI-","ariaSectionHeader":"zs7dS2pKjEw-","sectionHeader":"MZJgunQcmdQ-","legacyAction":"_-1GOlrzd098-","action":"NYXV5w4pd0c-","destructive":"baYK2zQ6-GA-","overlay":"A7T14ALVEKg-","fullWidth":"Lgbn9IRPI5Y-","screenReaderOnly":"o-ps580KdWI-","spinning":"f1oTdSTeUOM-"};
|
|
@@ -201,7 +202,7 @@ function MenuPortal({ children }) {
|
|
|
201
202
|
|
|
202
203
|
var styles$1 = {"submenuHeader":"Vw9MFreevMU-","submenuTitle":"wpNMcBuNwwY-","spinning":"nOEBQCC4Cos-"};
|
|
203
204
|
|
|
204
|
-
var styles = {"wrapper":"fpi0W91w2ag-","floatingContainer":"ba-Kj6mvQUw-","menu":"-DayvgvIcVo-","legacySection":"VsRRunpS6Yo-","separator":"jnggqK3YTIU-","triggerWrapper":"oRQQVVq-yxA-","composableMenu":"atokGnmWVls-","composableDropdownPopup":"Uk14qmg-Fqc-","composableDropdownScroller":"CJKnGqldjF0-","bottomSheetMenuContent":"J3CW8IU48RM-","composableItem":"zSMkwrZodBk-","composableItemNoLeadingSlot":"qbDWOwkPouM-","composableSection":"_353OIWGazfE-","composableGroup":"Q0ssxff-Qo4-","composableRadioGroup":"_2VyPM45lQBE-","composableSectionHeader":"efA-ozx9w0w-","composableGroupHeader":"BklkzNPbJ5Q-","composableGroupLabel":"_5-p9DbyRav4-","sectionHeader":"Bq7pLWj3jm4-","legacyAction":"P4Sdaq0-lZs-","action":"M1BgN-oCmKw-","destructive":"U9ihZZavz9w-","overlay":"_7we5hh6kYs8-","bottomSheetSubmenuPopup":"nf47GCAYI-c-","menuHidden":"cuw8ct7rX6s-","bottomSheetSubmenuBody":"a6uZEXgX8sg-","fullWidth":"_5OJ7B6mFcwk-","screenReaderOnly":"Bzvkz60bwWE-","spinning":"_0-VzuzHdi8o-"};
|
|
205
|
+
var styles = {"wrapper":"fpi0W91w2ag-","floatingContainer":"ba-Kj6mvQUw-","composableBackdrop":"wqvf3hcDMM0-","menu":"-DayvgvIcVo-","legacySection":"VsRRunpS6Yo-","separator":"jnggqK3YTIU-","triggerWrapper":"oRQQVVq-yxA-","composableMenu":"atokGnmWVls-","composableDropdownPopup":"Uk14qmg-Fqc-","composableDropdownScroller":"CJKnGqldjF0-","bottomSheetMenuContent":"J3CW8IU48RM-","composableItem":"zSMkwrZodBk-","composableItemNoLeadingSlot":"qbDWOwkPouM-","composableSection":"_353OIWGazfE-","composableGroup":"Q0ssxff-Qo4-","composableRadioGroup":"_2VyPM45lQBE-","composableSectionHeader":"efA-ozx9w0w-","composableGroupHeader":"BklkzNPbJ5Q-","composableGroupLabel":"_5-p9DbyRav4-","sectionHeader":"Bq7pLWj3jm4-","legacyAction":"P4Sdaq0-lZs-","action":"M1BgN-oCmKw-","destructive":"U9ihZZavz9w-","overlay":"_7we5hh6kYs8-","bottomSheetSubmenuPopup":"nf47GCAYI-c-","menuHidden":"cuw8ct7rX6s-","bottomSheetSubmenuBody":"a6uZEXgX8sg-","fullWidth":"_5OJ7B6mFcwk-","screenReaderOnly":"Bzvkz60bwWE-","spinning":"_0-VzuzHdi8o-"};
|
|
205
206
|
|
|
206
207
|
function mergeUnsafeProps(props) {
|
|
207
208
|
return useRenderElement.mergeProps({
|
|
@@ -652,9 +653,9 @@ function BottomSheetSubmenuContent({ children, className, style, UNSAFE_style, U
|
|
|
652
653
|
const bottomSheetStyle = getBottomSheetContentStyle(resolvedBaseProps.style);
|
|
653
654
|
return (React.createElement(BottomSheet.BottomSheet.Popup, { initialFocus: getInitialBottomSheetFocus(menuRef, focusModalityRef), className: classnames(styles.menu, styles.bottomSheetSubmenuPopup) },
|
|
654
655
|
React.createElement(BottomSheet.BottomSheet.Content, { style: bottomSheetStyle },
|
|
655
|
-
title ? (React.createElement(
|
|
656
|
+
title ? (React.createElement(DrawerTitle.DrawerTitle, { className: styles.screenReaderOnly }, title)) : null,
|
|
656
657
|
React.createElement("div", { className: styles$1.submenuHeader },
|
|
657
|
-
React.createElement(
|
|
658
|
+
React.createElement(DrawerTitle.DrawerClose, { "aria-label": title ? `Back to ${title}` : "Back", render: React.createElement(Button.Button, { ariaLabel: title ? `Back to ${title}` : "Back", icon: "arrowLeft", type: "tertiary", variation: "subtle" }) }),
|
|
658
659
|
title ? (React.createElement("div", { className: styles$1.submenuTitle },
|
|
659
660
|
React.createElement(Typography.Typography, { element: "span", size: "base", fontWeight: "semiBold", textColor: "text" }, title))) : null),
|
|
660
661
|
React.createElement(BottomSheetMenuSurface, { menuRef: menuRef, className: classnames(styles.bottomSheetSubmenuBody, styles.composableSection, resolvedBaseProps.className) }, children))));
|
|
@@ -743,6 +744,7 @@ function MenuDropdownContent({ children, style, className, preferredPlacement, U
|
|
|
743
744
|
const floatingLayerStyle = getFloatingLayerStyle(resolvedBaseProps.style);
|
|
744
745
|
const popupStyle = getMenuPopupStyle(resolvedBaseProps.style);
|
|
745
746
|
return (React.createElement(MenuSubmenuTrigger$1.MenuPortal, null,
|
|
747
|
+
React.createElement(MenuSubmenuTrigger$1.MenuBackdrop, { className: styles.composableBackdrop }),
|
|
746
748
|
React.createElement(MenuSubmenuTrigger$1.MenuPositioner, { className: styles.floatingContainer, style: floatingLayerStyle, align: align, side: side, sideOffset: MENU_OFFSET },
|
|
747
749
|
React.createElement(MenuSubmenuTrigger$1.MenuPopup, { className: classnames(styles.menu, styles.composableDropdownPopup, resolvedBaseProps.className), style: popupStyle },
|
|
748
750
|
React.createElement("div", { className: classnames(styles.composableMenu, styles.composableDropdownScroller) }, children)))));
|
package/dist/Menu-es.js
CHANGED
|
@@ -11,10 +11,11 @@ import { c as calculateMaxHeight } from './maxHeight-es.js';
|
|
|
11
11
|
import { o as offset, f as flip, d as size, b as autoUpdate } from './floating-ui.react-dom-es.js';
|
|
12
12
|
import { m as mergeProps } from './useRenderElement-es.js';
|
|
13
13
|
import { n as normalizeBaseUiButtonProps, i as isAtlantisButtonRenderTarget, s as stripNativeTypeFromButtonRenderTarget, r as renderAtlantisButtonTarget } from './buttonRenderAdapter-es.js';
|
|
14
|
-
import {
|
|
14
|
+
import { a as BottomSheet } from './BottomSheet-es.js';
|
|
15
15
|
import { O as OverlaySeparator } from './OverlaySeparator-es.js';
|
|
16
16
|
import { D as DrawerTrigger } from './ScrollAreaViewport-es.js';
|
|
17
|
-
import { D as DrawerTitle, a as DrawerClose
|
|
17
|
+
import { D as DrawerTitle, a as DrawerClose } from './DrawerTitle-es.js';
|
|
18
|
+
import { M as MenuTrigger$1, a as MenuLinkItem, b as MenuItem$1, c as MenuRadioItem$1, d as MenuRadioItemIndicator, e as MenuSubmenuTrigger$1, f as MenuRoot, g as MenuPortal$1, h as MenuBackdrop, i as MenuPositioner, j as MenuPopup, k as MenuRadioGroup$1, l as MenuGroup$1, m as MenuSubmenuRoot, n as MenuGroupLabel$1 } from './MenuSubmenuTrigger-es.js';
|
|
18
19
|
|
|
19
20
|
var styles$2 = {"wrapper":"h-nk89U2n6Q-","floatingContainer":"krpkWzoaVcc-","menu":"_7sU7mp1w0jM-","legacySection":"_4x-vvEmn4gM-","separator":"i0QNcs4S-wk-","triggerWrapper":"_7CsejipGrzM-","ariaMenu":"bO7lGVQC42c-","ariaItem":"u6fDgbWmPck-","ariaSection":"-TSNrZBKZJI-","ariaSectionHeader":"zs7dS2pKjEw-","sectionHeader":"MZJgunQcmdQ-","legacyAction":"_-1GOlrzd098-","action":"NYXV5w4pd0c-","destructive":"baYK2zQ6-GA-","overlay":"A7T14ALVEKg-","fullWidth":"Lgbn9IRPI5Y-","screenReaderOnly":"o-ps580KdWI-","spinning":"f1oTdSTeUOM-"};
|
|
20
21
|
|
|
@@ -199,7 +200,7 @@ function MenuPortal({ children }) {
|
|
|
199
200
|
|
|
200
201
|
var styles$1 = {"submenuHeader":"Vw9MFreevMU-","submenuTitle":"wpNMcBuNwwY-","spinning":"nOEBQCC4Cos-"};
|
|
201
202
|
|
|
202
|
-
var styles = {"wrapper":"fpi0W91w2ag-","floatingContainer":"ba-Kj6mvQUw-","menu":"-DayvgvIcVo-","legacySection":"VsRRunpS6Yo-","separator":"jnggqK3YTIU-","triggerWrapper":"oRQQVVq-yxA-","composableMenu":"atokGnmWVls-","composableDropdownPopup":"Uk14qmg-Fqc-","composableDropdownScroller":"CJKnGqldjF0-","bottomSheetMenuContent":"J3CW8IU48RM-","composableItem":"zSMkwrZodBk-","composableItemNoLeadingSlot":"qbDWOwkPouM-","composableSection":"_353OIWGazfE-","composableGroup":"Q0ssxff-Qo4-","composableRadioGroup":"_2VyPM45lQBE-","composableSectionHeader":"efA-ozx9w0w-","composableGroupHeader":"BklkzNPbJ5Q-","composableGroupLabel":"_5-p9DbyRav4-","sectionHeader":"Bq7pLWj3jm4-","legacyAction":"P4Sdaq0-lZs-","action":"M1BgN-oCmKw-","destructive":"U9ihZZavz9w-","overlay":"_7we5hh6kYs8-","bottomSheetSubmenuPopup":"nf47GCAYI-c-","menuHidden":"cuw8ct7rX6s-","bottomSheetSubmenuBody":"a6uZEXgX8sg-","fullWidth":"_5OJ7B6mFcwk-","screenReaderOnly":"Bzvkz60bwWE-","spinning":"_0-VzuzHdi8o-"};
|
|
203
|
+
var styles = {"wrapper":"fpi0W91w2ag-","floatingContainer":"ba-Kj6mvQUw-","composableBackdrop":"wqvf3hcDMM0-","menu":"-DayvgvIcVo-","legacySection":"VsRRunpS6Yo-","separator":"jnggqK3YTIU-","triggerWrapper":"oRQQVVq-yxA-","composableMenu":"atokGnmWVls-","composableDropdownPopup":"Uk14qmg-Fqc-","composableDropdownScroller":"CJKnGqldjF0-","bottomSheetMenuContent":"J3CW8IU48RM-","composableItem":"zSMkwrZodBk-","composableItemNoLeadingSlot":"qbDWOwkPouM-","composableSection":"_353OIWGazfE-","composableGroup":"Q0ssxff-Qo4-","composableRadioGroup":"_2VyPM45lQBE-","composableSectionHeader":"efA-ozx9w0w-","composableGroupHeader":"BklkzNPbJ5Q-","composableGroupLabel":"_5-p9DbyRav4-","sectionHeader":"Bq7pLWj3jm4-","legacyAction":"P4Sdaq0-lZs-","action":"M1BgN-oCmKw-","destructive":"U9ihZZavz9w-","overlay":"_7we5hh6kYs8-","bottomSheetSubmenuPopup":"nf47GCAYI-c-","menuHidden":"cuw8ct7rX6s-","bottomSheetSubmenuBody":"a6uZEXgX8sg-","fullWidth":"_5OJ7B6mFcwk-","screenReaderOnly":"Bzvkz60bwWE-","spinning":"_0-VzuzHdi8o-"};
|
|
203
204
|
|
|
204
205
|
function mergeUnsafeProps(props) {
|
|
205
206
|
return mergeProps({
|
|
@@ -741,6 +742,7 @@ function MenuDropdownContent({ children, style, className, preferredPlacement, U
|
|
|
741
742
|
const floatingLayerStyle = getFloatingLayerStyle(resolvedBaseProps.style);
|
|
742
743
|
const popupStyle = getMenuPopupStyle(resolvedBaseProps.style);
|
|
743
744
|
return (React__default.createElement(MenuPortal$1, null,
|
|
745
|
+
React__default.createElement(MenuBackdrop, { className: styles.composableBackdrop }),
|
|
744
746
|
React__default.createElement(MenuPositioner, { className: styles.floatingContainer, style: floatingLayerStyle, align: align, side: side, sideOffset: MENU_OFFSET },
|
|
745
747
|
React__default.createElement(MenuPopup, { className: classnames(styles.menu, styles.composableDropdownPopup, resolvedBaseProps.className), style: popupStyle },
|
|
746
748
|
React__default.createElement("div", { className: classnames(styles.composableMenu, styles.composableDropdownScroller) }, children)))));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var ScrollAreaViewport = require('./ScrollAreaViewport-cjs.js');
|
|
5
4
|
var useRenderElement = require('./useRenderElement-cjs.js');
|
|
5
|
+
var InternalBackdrop = require('./InternalBackdrop-cjs.js');
|
|
6
6
|
var useButton = require('./useButton-cjs.js');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var useCompositeListItem = require('./useCompositeListItem-cjs.js');
|
|
9
|
-
var
|
|
9
|
+
var ScrollAreaViewport = require('./ScrollAreaViewport-cjs.js');
|
|
10
10
|
var floatingUi_utils_dom = require('./floating-ui.utils.dom-cjs.js');
|
|
11
11
|
var ReactDOM = require('react-dom');
|
|
12
12
|
|
|
@@ -934,92 +934,6 @@ function safePolygon(options = {}) {
|
|
|
934
934
|
return fn;
|
|
935
935
|
}
|
|
936
936
|
|
|
937
|
-
/**
|
|
938
|
-
* A button that closes the dialog.
|
|
939
|
-
* Renders a `<button>` element.
|
|
940
|
-
*
|
|
941
|
-
* Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
|
|
942
|
-
*/
|
|
943
|
-
const DialogClose = /*#__PURE__*/React__namespace.forwardRef(function DialogClose(componentProps, forwardedRef) {
|
|
944
|
-
const {
|
|
945
|
-
render,
|
|
946
|
-
className,
|
|
947
|
-
disabled = false,
|
|
948
|
-
nativeButton = true,
|
|
949
|
-
...elementProps
|
|
950
|
-
} = componentProps;
|
|
951
|
-
const {
|
|
952
|
-
store
|
|
953
|
-
} = ScrollAreaViewport.useDialogRootContext();
|
|
954
|
-
const open = store.useState('open');
|
|
955
|
-
function handleClick(event) {
|
|
956
|
-
if (open) {
|
|
957
|
-
store.setOpen(false, useButton.createChangeEventDetails(useButton.closePress, event.nativeEvent));
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
const {
|
|
961
|
-
getButtonProps,
|
|
962
|
-
buttonRef
|
|
963
|
-
} = useButton.useButton({
|
|
964
|
-
disabled,
|
|
965
|
-
native: nativeButton
|
|
966
|
-
});
|
|
967
|
-
const state = {
|
|
968
|
-
disabled
|
|
969
|
-
};
|
|
970
|
-
return useRenderElement.useRenderElement('button', componentProps, {
|
|
971
|
-
state,
|
|
972
|
-
ref: [forwardedRef, buttonRef],
|
|
973
|
-
props: [{
|
|
974
|
-
onClick: handleClick
|
|
975
|
-
}, elementProps, getButtonProps]
|
|
976
|
-
});
|
|
977
|
-
});
|
|
978
|
-
if (process.env.NODE_ENV !== "production") DialogClose.displayName = "DialogClose";
|
|
979
|
-
|
|
980
|
-
/**
|
|
981
|
-
* A button that closes the drawer.
|
|
982
|
-
* Renders a `<button>` element.
|
|
983
|
-
*
|
|
984
|
-
* Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)
|
|
985
|
-
*/
|
|
986
|
-
const DrawerClose = DialogClose;
|
|
987
|
-
|
|
988
|
-
/**
|
|
989
|
-
* A heading that labels the dialog.
|
|
990
|
-
* Renders an `<h2>` element.
|
|
991
|
-
*
|
|
992
|
-
* Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
|
|
993
|
-
*/
|
|
994
|
-
const DialogTitle = /*#__PURE__*/React__namespace.forwardRef(function DialogTitle(componentProps, forwardedRef) {
|
|
995
|
-
const {
|
|
996
|
-
render,
|
|
997
|
-
className,
|
|
998
|
-
id: idProp,
|
|
999
|
-
...elementProps
|
|
1000
|
-
} = componentProps;
|
|
1001
|
-
const {
|
|
1002
|
-
store
|
|
1003
|
-
} = ScrollAreaViewport.useDialogRootContext();
|
|
1004
|
-
const id = useButton.useBaseUiId(idProp);
|
|
1005
|
-
store.useSyncedValueWithCleanup('titleElementId', id);
|
|
1006
|
-
return useRenderElement.useRenderElement('h2', componentProps, {
|
|
1007
|
-
ref: forwardedRef,
|
|
1008
|
-
props: [{
|
|
1009
|
-
id
|
|
1010
|
-
}, elementProps]
|
|
1011
|
-
});
|
|
1012
|
-
});
|
|
1013
|
-
if (process.env.NODE_ENV !== "production") DialogTitle.displayName = "DialogTitle";
|
|
1014
|
-
|
|
1015
|
-
/**
|
|
1016
|
-
* A heading that labels the drawer.
|
|
1017
|
-
* Renders an `<h2>` element.
|
|
1018
|
-
*
|
|
1019
|
-
* Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)
|
|
1020
|
-
*/
|
|
1021
|
-
const DrawerTitle = DialogTitle;
|
|
1022
|
-
|
|
1023
937
|
const MenuPositionerContext = /*#__PURE__*/React__namespace.createContext(undefined);
|
|
1024
938
|
if (process.env.NODE_ENV !== "production") MenuPositionerContext.displayName = "MenuPositionerContext";
|
|
1025
939
|
function useMenuPositionerContext(optional) {
|
|
@@ -1050,6 +964,52 @@ function useContextMenuRootContext(optional = true) {
|
|
|
1050
964
|
return context;
|
|
1051
965
|
}
|
|
1052
966
|
|
|
967
|
+
const stateAttributesMapping$1 = {
|
|
968
|
+
...InternalBackdrop.popupStateMapping,
|
|
969
|
+
...useButton.transitionStatusMapping
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* An overlay displayed beneath the menu popup.
|
|
974
|
+
* Renders a `<div>` element.
|
|
975
|
+
*
|
|
976
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
977
|
+
*/
|
|
978
|
+
const MenuBackdrop = /*#__PURE__*/React__namespace.forwardRef(function MenuBackdrop(componentProps, forwardedRef) {
|
|
979
|
+
const {
|
|
980
|
+
className,
|
|
981
|
+
render,
|
|
982
|
+
...elementProps
|
|
983
|
+
} = componentProps;
|
|
984
|
+
const {
|
|
985
|
+
store
|
|
986
|
+
} = useMenuRootContext();
|
|
987
|
+
const open = store.useState('open');
|
|
988
|
+
const mounted = store.useState('mounted');
|
|
989
|
+
const transitionStatus = store.useState('transitionStatus');
|
|
990
|
+
const lastOpenChangeReason = store.useState('lastOpenChangeReason');
|
|
991
|
+
const contextMenuContext = useContextMenuRootContext();
|
|
992
|
+
const state = {
|
|
993
|
+
open,
|
|
994
|
+
transitionStatus
|
|
995
|
+
};
|
|
996
|
+
return useRenderElement.useRenderElement('div', componentProps, {
|
|
997
|
+
ref: contextMenuContext?.backdropRef ? [forwardedRef, contextMenuContext.backdropRef] : forwardedRef,
|
|
998
|
+
state,
|
|
999
|
+
stateAttributesMapping: stateAttributesMapping$1,
|
|
1000
|
+
props: [{
|
|
1001
|
+
role: 'presentation',
|
|
1002
|
+
hidden: !mounted,
|
|
1003
|
+
style: {
|
|
1004
|
+
pointerEvents: lastOpenChangeReason === useButton.triggerHover ? 'none' : undefined,
|
|
1005
|
+
userSelect: 'none',
|
|
1006
|
+
WebkitUserSelect: 'none'
|
|
1007
|
+
}
|
|
1008
|
+
}, elementProps]
|
|
1009
|
+
});
|
|
1010
|
+
});
|
|
1011
|
+
if (process.env.NODE_ENV !== "production") MenuBackdrop.displayName = "MenuBackdrop";
|
|
1012
|
+
|
|
1053
1013
|
/**
|
|
1054
1014
|
* Returns common props shared by all menu item types.
|
|
1055
1015
|
* This hook extracts the shared logic for id, role, tabIndex, onKeyDown,
|
|
@@ -3067,8 +3027,7 @@ const MenuSubmenuTrigger = /*#__PURE__*/React__namespace.forwardRef(function Sub
|
|
|
3067
3027
|
});
|
|
3068
3028
|
if (process.env.NODE_ENV !== "production") MenuSubmenuTrigger.displayName = "MenuSubmenuTrigger";
|
|
3069
3029
|
|
|
3070
|
-
exports.
|
|
3071
|
-
exports.DrawerTitle = DrawerTitle;
|
|
3030
|
+
exports.MenuBackdrop = MenuBackdrop;
|
|
3072
3031
|
exports.MenuGroup = MenuGroup;
|
|
3073
3032
|
exports.MenuGroupLabel = MenuGroupLabel;
|
|
3074
3033
|
exports.MenuItem = MenuItem;
|
|
@@ -3086,7 +3045,6 @@ exports.MenuSubmenuTrigger = MenuSubmenuTrigger;
|
|
|
3086
3045
|
exports.MenuTrigger = MenuTrigger;
|
|
3087
3046
|
exports.REGULAR_ITEM = REGULAR_ITEM;
|
|
3088
3047
|
exports.itemMapping = itemMapping;
|
|
3089
|
-
exports.useContextMenuRootContext = useContextMenuRootContext;
|
|
3090
3048
|
exports.useMenuItem = useMenuItem;
|
|
3091
3049
|
exports.useMenuPositionerContext = useMenuPositionerContext;
|
|
3092
3050
|
exports.useMenuRootContext = useMenuRootContext;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { a as useRefWithInit, f as formatErrorMessage, u as useRenderElement, m as mergeProps, b as useMergedRefs, E as EMPTY_OBJECT, d as EMPTY_ARRAY } from './useRenderElement-es.js';
|
|
3
|
+
import { o as createAttribute, b as useFloatingTree, u as useFloatingParentNodeId, q as getNodeChildren, p as popupStateMapping, F as FloatingFocusManager, r as FloatingPortal, s as POPUP_COLLISION_AVOIDANCE, I as InternalBackdrop, t as inertValue, v as FloatingNode, w as DROPDOWN_COLLISION_AVOIDANCE, x as createSelector, R as ReactStore, P as PopupTriggerMap, y as FloatingTreeStore, z as fastComponent, A as useOnFirstRender, B as useFloatingNodeId, E as useOpenInteractionType, G as useScrollLock, H as useDismiss, n as useDirection, T as TYPEAHEAD_RESET_MS, J as useInteractions, K as FloatingTree, L as fastComponentRef, M as useClick, N as getTabbableBeforeElement, O as isOutsideEvent, Q as getTabbableAfterElement, S as getNextTabbable, U as pressableTriggerOpenStateMapping, V as FocusGuard, W as PATIENT_CLICK_THRESHOLD, X as triggerOpenStateMapping } from './InternalBackdrop-es.js';
|
|
4
|
+
import { U as isMouseLikePointerType, f as useTimeout, k as getTarget, V as isTypeableElement, W as matchesFocusVisible, X as isTargetInsideEnabledTrigger, c as createChangeEventDetails, Y as triggerFocus, q as activeElement, r as contains, Z as isMac, _ as isSafari, o as ownerDocument, $ as triggerPress, a0 as escapeKey, D as useOnMount, a1 as TYPEABLE_SELECTOR, T as Timeout, e as useStableCallback, j as useIsoLayoutEffect, a2 as triggerHover, n as useValueAsRef, t as transitionStatusMapping, a3 as itemPress, u as useButton, b as useBaseUiId, d as useOpenChangeComplete, a4 as outsidePress, a5 as useAnimationsFinished, a6 as siblingOpen, E as useControlled, h as useTransitionStatus, l as useId, y as focusOut, v as listNavigation, i as imperativeAction, a7 as useCompositeRootContext, a8 as cancelOpen } from './useButton-es.js';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
import { u as useCompositeListItem, g as getDisabledMountTransitionStyles, a as useAnchorPositioning, b as adaptiveOrigin, C as CompositeList, c as useListNavigation, d as useTypeahead, e as getPseudoElementBounds } from './useCompositeListItem-es.js';
|
|
7
|
-
import {
|
|
7
|
+
import { C as COMPOSITE_KEYS, p as popupStoreSelectors, l as createInitialPopupStoreState, m as useImplicitActiveTrigger, n as useOpenStateTransitions, o as useSyncedFloatingRootContext, q as useRole, r as useTriggerDataForwarding, s as useTriggerRegistration } from './ScrollAreaViewport-es.js';
|
|
8
8
|
import { k as getWindow, b as isElement, a as isHTMLElement, d as isLastTraversableNode, e as getParentNode } from './floating-ui.utils.dom-es.js';
|
|
9
9
|
import * as ReactDOM from 'react-dom';
|
|
10
10
|
|
|
@@ -912,92 +912,6 @@ function safePolygon(options = {}) {
|
|
|
912
912
|
return fn;
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
-
/**
|
|
916
|
-
* A button that closes the dialog.
|
|
917
|
-
* Renders a `<button>` element.
|
|
918
|
-
*
|
|
919
|
-
* Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
|
|
920
|
-
*/
|
|
921
|
-
const DialogClose = /*#__PURE__*/React.forwardRef(function DialogClose(componentProps, forwardedRef) {
|
|
922
|
-
const {
|
|
923
|
-
render,
|
|
924
|
-
className,
|
|
925
|
-
disabled = false,
|
|
926
|
-
nativeButton = true,
|
|
927
|
-
...elementProps
|
|
928
|
-
} = componentProps;
|
|
929
|
-
const {
|
|
930
|
-
store
|
|
931
|
-
} = useDialogRootContext();
|
|
932
|
-
const open = store.useState('open');
|
|
933
|
-
function handleClick(event) {
|
|
934
|
-
if (open) {
|
|
935
|
-
store.setOpen(false, createChangeEventDetails(closePress, event.nativeEvent));
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
const {
|
|
939
|
-
getButtonProps,
|
|
940
|
-
buttonRef
|
|
941
|
-
} = useButton({
|
|
942
|
-
disabled,
|
|
943
|
-
native: nativeButton
|
|
944
|
-
});
|
|
945
|
-
const state = {
|
|
946
|
-
disabled
|
|
947
|
-
};
|
|
948
|
-
return useRenderElement('button', componentProps, {
|
|
949
|
-
state,
|
|
950
|
-
ref: [forwardedRef, buttonRef],
|
|
951
|
-
props: [{
|
|
952
|
-
onClick: handleClick
|
|
953
|
-
}, elementProps, getButtonProps]
|
|
954
|
-
});
|
|
955
|
-
});
|
|
956
|
-
if (process.env.NODE_ENV !== "production") DialogClose.displayName = "DialogClose";
|
|
957
|
-
|
|
958
|
-
/**
|
|
959
|
-
* A button that closes the drawer.
|
|
960
|
-
* Renders a `<button>` element.
|
|
961
|
-
*
|
|
962
|
-
* Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)
|
|
963
|
-
*/
|
|
964
|
-
const DrawerClose = DialogClose;
|
|
965
|
-
|
|
966
|
-
/**
|
|
967
|
-
* A heading that labels the dialog.
|
|
968
|
-
* Renders an `<h2>` element.
|
|
969
|
-
*
|
|
970
|
-
* Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
|
|
971
|
-
*/
|
|
972
|
-
const DialogTitle = /*#__PURE__*/React.forwardRef(function DialogTitle(componentProps, forwardedRef) {
|
|
973
|
-
const {
|
|
974
|
-
render,
|
|
975
|
-
className,
|
|
976
|
-
id: idProp,
|
|
977
|
-
...elementProps
|
|
978
|
-
} = componentProps;
|
|
979
|
-
const {
|
|
980
|
-
store
|
|
981
|
-
} = useDialogRootContext();
|
|
982
|
-
const id = useBaseUiId(idProp);
|
|
983
|
-
store.useSyncedValueWithCleanup('titleElementId', id);
|
|
984
|
-
return useRenderElement('h2', componentProps, {
|
|
985
|
-
ref: forwardedRef,
|
|
986
|
-
props: [{
|
|
987
|
-
id
|
|
988
|
-
}, elementProps]
|
|
989
|
-
});
|
|
990
|
-
});
|
|
991
|
-
if (process.env.NODE_ENV !== "production") DialogTitle.displayName = "DialogTitle";
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* A heading that labels the drawer.
|
|
995
|
-
* Renders an `<h2>` element.
|
|
996
|
-
*
|
|
997
|
-
* Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)
|
|
998
|
-
*/
|
|
999
|
-
const DrawerTitle = DialogTitle;
|
|
1000
|
-
|
|
1001
915
|
const MenuPositionerContext = /*#__PURE__*/React.createContext(undefined);
|
|
1002
916
|
if (process.env.NODE_ENV !== "production") MenuPositionerContext.displayName = "MenuPositionerContext";
|
|
1003
917
|
function useMenuPositionerContext(optional) {
|
|
@@ -1028,6 +942,52 @@ function useContextMenuRootContext(optional = true) {
|
|
|
1028
942
|
return context;
|
|
1029
943
|
}
|
|
1030
944
|
|
|
945
|
+
const stateAttributesMapping$1 = {
|
|
946
|
+
...popupStateMapping,
|
|
947
|
+
...transitionStatusMapping
|
|
948
|
+
};
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* An overlay displayed beneath the menu popup.
|
|
952
|
+
* Renders a `<div>` element.
|
|
953
|
+
*
|
|
954
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
955
|
+
*/
|
|
956
|
+
const MenuBackdrop = /*#__PURE__*/React.forwardRef(function MenuBackdrop(componentProps, forwardedRef) {
|
|
957
|
+
const {
|
|
958
|
+
className,
|
|
959
|
+
render,
|
|
960
|
+
...elementProps
|
|
961
|
+
} = componentProps;
|
|
962
|
+
const {
|
|
963
|
+
store
|
|
964
|
+
} = useMenuRootContext();
|
|
965
|
+
const open = store.useState('open');
|
|
966
|
+
const mounted = store.useState('mounted');
|
|
967
|
+
const transitionStatus = store.useState('transitionStatus');
|
|
968
|
+
const lastOpenChangeReason = store.useState('lastOpenChangeReason');
|
|
969
|
+
const contextMenuContext = useContextMenuRootContext();
|
|
970
|
+
const state = {
|
|
971
|
+
open,
|
|
972
|
+
transitionStatus
|
|
973
|
+
};
|
|
974
|
+
return useRenderElement('div', componentProps, {
|
|
975
|
+
ref: contextMenuContext?.backdropRef ? [forwardedRef, contextMenuContext.backdropRef] : forwardedRef,
|
|
976
|
+
state,
|
|
977
|
+
stateAttributesMapping: stateAttributesMapping$1,
|
|
978
|
+
props: [{
|
|
979
|
+
role: 'presentation',
|
|
980
|
+
hidden: !mounted,
|
|
981
|
+
style: {
|
|
982
|
+
pointerEvents: lastOpenChangeReason === triggerHover ? 'none' : undefined,
|
|
983
|
+
userSelect: 'none',
|
|
984
|
+
WebkitUserSelect: 'none'
|
|
985
|
+
}
|
|
986
|
+
}, elementProps]
|
|
987
|
+
});
|
|
988
|
+
});
|
|
989
|
+
if (process.env.NODE_ENV !== "production") MenuBackdrop.displayName = "MenuBackdrop";
|
|
990
|
+
|
|
1031
991
|
/**
|
|
1032
992
|
* Returns common props shared by all menu item types.
|
|
1033
993
|
* This hook extracts the shared logic for id, role, tabIndex, onKeyDown,
|
|
@@ -3045,4 +3005,4 @@ const MenuSubmenuTrigger = /*#__PURE__*/React.forwardRef(function SubmenuTrigger
|
|
|
3045
3005
|
});
|
|
3046
3006
|
if (process.env.NODE_ENV !== "production") MenuSubmenuTrigger.displayName = "MenuSubmenuTrigger";
|
|
3047
3007
|
|
|
3048
|
-
export {
|
|
3008
|
+
export { MenuTrigger as M, REGULAR_ITEM as R, MenuLinkItem as a, MenuItem as b, MenuRadioItem as c, MenuRadioItemIndicator as d, MenuSubmenuTrigger as e, MenuRoot as f, MenuPortal as g, MenuBackdrop as h, MenuPositioner as i, MenuPopup as j, MenuRadioGroup as k, MenuGroup as l, MenuSubmenuRoot as m, MenuGroupLabel as n, useMenuPositionerContext as o, useMenuItem as p, itemMapping as q, MenuStore as r, useMenuRootContext as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { D as useOnMount, T as Timeout, E as useControlled, n as useValueAsRef, j as useIsoLayoutEffect, e as useStableCallback, f as useTimeout, F as isIOS, c as createChangeEventDetails, G as none, H as visuallyHiddenInput, I as visuallyHidden, J as inputChange, K as inputClear, L as inputBlur, M as inputPaste, N as createGenericEventDetails, o as ownerDocument, O as incrementPress, P as decrementPress, u as useButton, Q as useValueChanged, s as stopEvent, R as keyboard } from './useButton-es.js';
|
|
3
3
|
import { a as useRefWithInit, f as formatErrorMessage, b as useMergedRefs, u as useRenderElement } from './useRenderElement-es.js';
|
|
4
4
|
import { f as fieldValidityMapping, b as useFieldRootContext, d as useLabelableId, a as useFormContext, u as useLabelableContext, e as useField } from './useLabel-es.js';
|
|
5
5
|
import { c as clamp } from './clamp-es.js';
|
package/dist/Page/index.cjs
CHANGED
|
@@ -35,6 +35,7 @@ require('../useButton-cjs.js');
|
|
|
35
35
|
require('../clamp-cjs.js');
|
|
36
36
|
require('../OverlaySeparator-cjs.js');
|
|
37
37
|
require('../Separator-cjs.js');
|
|
38
|
+
require('../DrawerTitle-cjs.js');
|
|
38
39
|
require('../MenuSubmenuTrigger-cjs.js');
|
|
39
40
|
require('../useCompositeListItem-cjs.js');
|
|
40
41
|
require('../filterDataAttributes-cjs.js');
|
package/dist/Page/index.mjs
CHANGED
|
@@ -33,6 +33,7 @@ import '../useButton-es.js';
|
|
|
33
33
|
import '../clamp-es.js';
|
|
34
34
|
import '../OverlaySeparator-es.js';
|
|
35
35
|
import '../Separator-es.js';
|
|
36
|
+
import '../DrawerTitle-es.js';
|
|
36
37
|
import '../MenuSubmenuTrigger-es.js';
|
|
37
38
|
import '../useCompositeListItem-es.js';
|
|
38
39
|
import '../filterDataAttributes-es.js';
|