@jobber/components 8.22.0 → 8.23.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/dist/CSPContext-cjs.js +69 -0
- package/dist/CSPContext-es.js +46 -0
- package/dist/Card/index.cjs +2 -0
- package/dist/Card/index.mjs +2 -0
- package/dist/ComboboxChipRemove-cjs.js +54 -211
- package/dist/ComboboxChipRemove-es.js +8 -164
- package/dist/DataDump/index.cjs +2 -0
- package/dist/DataDump/index.mjs +2 -0
- package/dist/Dialog/index.cjs +1 -0
- package/dist/Dialog/index.mjs +1 -0
- package/dist/DrawerDescription-cjs.js +2 -1
- package/dist/DrawerDescription-es.js +3 -2
- package/dist/DrawerTitle-es.js +1 -1
- package/dist/InputNumberExperimental-cjs.js +24 -23
- package/dist/InputNumberExperimental-es.js +3 -2
- package/dist/InternalBackdrop-es.js +3 -3
- package/dist/Menu/index.cjs +2 -0
- package/dist/Menu/index.mjs +2 -0
- package/dist/Menu-cjs.js +1 -1
- package/dist/Menu-es.js +1 -1
- package/dist/MenuSubmenuTrigger-cjs.js +5 -13
- package/dist/MenuSubmenuTrigger-es.js +8 -16
- package/dist/NumberFieldInput-cjs.js +9 -9
- package/dist/NumberFieldInput-es.js +3 -3
- package/dist/Page/index.cjs +2 -0
- package/dist/Page/index.mjs +2 -0
- package/dist/ScrollAreaViewport-cjs.js +5 -47
- package/dist/ScrollAreaViewport-es.js +5 -46
- package/dist/SelectGroupLabel-cjs.js +1924 -0
- package/dist/SelectGroupLabel-es.js +1888 -0
- package/dist/SelectPrimitive-cjs.js +112 -0
- package/dist/SelectPrimitive-es.js +110 -0
- package/dist/ToolbarRootContext-cjs.js +35 -0
- package/dist/ToolbarRootContext-es.js +14 -0
- package/dist/docs/SelectPrimitive/SelectPrimitive.md +326 -0
- package/dist/docs/index.md +1 -0
- package/dist/floating-ui.react-dom-cjs.js +1 -0
- package/dist/floating-ui.react-dom-es.js +2 -2
- package/dist/floating-ui.utils.dom-es.js +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.mjs +2 -0
- package/dist/primitives/BottomSheet/index.cjs +1 -0
- package/dist/primitives/BottomSheet/index.mjs +1 -0
- package/dist/primitives/ComboboxPrimitive/index.cjs +3 -1
- package/dist/primitives/ComboboxPrimitive/index.mjs +3 -1
- package/dist/primitives/InputNumberExperimental/index.cjs +2 -1
- package/dist/primitives/InputNumberExperimental/index.mjs +2 -1
- package/dist/primitives/SelectPrimitive/SelectPrimitive.d.ts +63 -0
- package/dist/primitives/SelectPrimitive/index.cjs +29 -0
- package/dist/primitives/SelectPrimitive/index.d.ts +2 -0
- package/dist/primitives/SelectPrimitive/index.mjs +23 -0
- package/dist/primitives/SelectPrimitive/types.d.ts +16 -0
- package/dist/primitives/index.cjs +8 -1
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.mjs +7 -1
- package/dist/primitives/mergeClassName.d.ts +12 -0
- package/dist/resolveAriaLabelledBy-cjs.js +195 -0
- package/dist/resolveAriaLabelledBy-es.js +162 -0
- package/dist/styles.css +325 -0
- package/dist/unstyledPrimitives/index.cjs +416 -24
- package/dist/unstyledPrimitives/index.d.ts +1 -0
- package/dist/unstyledPrimitives/index.mjs +417 -26
- package/dist/useButton-cjs.js +2 -0
- package/dist/useButton-es.js +3 -2
- package/dist/useCompositeListItem-es.js +3 -3
- package/dist/useLabel-cjs.js +3 -329
- package/dist/useLabel-es.js +4 -299
- package/dist/useLabelableId-cjs.js +332 -0
- package/dist/useLabelableId-es.js +300 -0
- package/dist/useRenderElement-cjs.js +3 -0
- package/dist/useRenderElement-es.js +4 -1
- package/package.json +2 -2
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { a as useRefWithInit, f as formatErrorMessage, u as useRenderElement, m as mergeProps, b as useMergedRefs, E as EMPTY_OBJECT,
|
|
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, c as EMPTY_ARRAY } from './useRenderElement-es.js';
|
|
3
|
+
import { H as createAttribute, b as useFloatingTree, u as useFloatingParentNodeId, J as getNodeChildren, p as popupStateMapping, F as FloatingFocusManager, y as FloatingPortal, K as POPUP_COLLISION_AVOIDANCE, I as InternalBackdrop, A as inertValue, L as FloatingNode, B as DROPDOWN_COLLISION_AVOIDANCE, o as createSelector, R as ReactStore, P as PopupTriggerMap, M as FloatingTreeStore, N as fastComponent, w as useOnFirstRender, O as useFloatingNodeId, q as useOpenInteractionType, z as useScrollLock, t as useDismiss, n as useDirection, T as TYPEAHEAD_RESET_MS, v as useInteractions, Q as FloatingTree, U as fastComponentRef, s as useClick, V as getTabbableBeforeElement, W as isOutsideEvent, X as getTabbableAfterElement, Y as getNextTabbable, x as pressableTriggerOpenStateMapping, Z as FocusGuard, _ as PATIENT_CLICK_THRESHOLD, G as triggerOpenStateMapping } from './InternalBackdrop-es.js';
|
|
4
|
+
import { a0 as isMouseLikePointerType, h as useTimeout, g as getTarget, a1 as isTypeableElement, a2 as matchesFocusVisible, a3 as isTargetInsideEnabledTrigger, d as createChangeEventDetails, a4 as triggerFocus, q as activeElement, r as contains, a5 as isMac, a6 as isSafari, o as ownerDocument, a7 as triggerPress, a8 as escapeKey, D as useOnMount, a9 as TYPEABLE_SELECTOR, T as Timeout, b as useStableCallback, a as useIsoLayoutEffect, aa as triggerHover, n as useValueAsRef, t as transitionStatusMapping, Z as itemPress, c as useButton, u as useBaseUiId, f as useOpenChangeComplete, U as outsidePress, ab as useAnimationsFinished, ac as siblingOpen, E as useControlled, k as useTransitionStatus, l as useId, y as focusOut, v as listNavigation, i as imperativeAction, ad as useCompositeRootContext, V as cancelOpen } from './useButton-es.js';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { e as useCompositeListItem, d as getDisabledMountTransitionStyles, c as useAnchorPositioning, f as adaptiveOrigin, C as CompositeList, a as useListNavigation, b as useTypeahead, g as getPseudoElementBounds } from './useCompositeListItem-es.js';
|
|
7
|
+
import { u as useToolbarRootContext } from './ToolbarRootContext-es.js';
|
|
8
|
+
import { C as COMPOSITE_KEYS } from './CSPContext-es.js';
|
|
9
|
+
import { o as getWindow, b as isElement, a as isHTMLElement, d as isLastTraversableNode, e as getParentNode } from './floating-ui.utils.dom-es.js';
|
|
10
|
+
import { 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';
|
|
9
11
|
import * as ReactDOM from 'react-dom';
|
|
10
12
|
|
|
11
13
|
function resolveValue(value, pointerType) {
|
|
@@ -1328,16 +1330,6 @@ const MenuLinkItem = /*#__PURE__*/React.forwardRef(function MenuLinkItem(compone
|
|
|
1328
1330
|
});
|
|
1329
1331
|
if (process.env.NODE_ENV !== "production") MenuLinkItem.displayName = "MenuLinkItem";
|
|
1330
1332
|
|
|
1331
|
-
const ToolbarRootContext = /*#__PURE__*/React.createContext(undefined);
|
|
1332
|
-
if (process.env.NODE_ENV !== "production") ToolbarRootContext.displayName = "ToolbarRootContext";
|
|
1333
|
-
function useToolbarRootContext(optional) {
|
|
1334
|
-
const context = React.useContext(ToolbarRootContext);
|
|
1335
|
-
if (context === undefined && !optional) {
|
|
1336
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.' : formatErrorMessage(69));
|
|
1337
|
-
}
|
|
1338
|
-
return context;
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
1333
|
const stateAttributesMapping = {
|
|
1342
1334
|
...popupStateMapping,
|
|
1343
1335
|
...transitionStatusMapping
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var useButton = require('./useButton-cjs.js');
|
|
5
5
|
var useRenderElement = require('./useRenderElement-cjs.js');
|
|
6
|
-
var
|
|
6
|
+
var useLabelableId = require('./useLabelableId-cjs.js');
|
|
7
7
|
var clamp = require('./clamp-cjs.js');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
var floatingUi_utils_dom = require('./floating-ui.utils.dom-cjs.js');
|
|
@@ -109,7 +109,7 @@ function useNumberFieldRootContext() {
|
|
|
109
109
|
const stateAttributesMapping$1 = {
|
|
110
110
|
inputValue: () => null,
|
|
111
111
|
value: () => null,
|
|
112
|
-
...
|
|
112
|
+
...useLabelableId.fieldValidityMapping
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
const HAN_NUMERALS = ['零', '〇', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
|
@@ -444,7 +444,7 @@ const NumberFieldRoot = /*#__PURE__*/React__namespace.forwardRef(function Number
|
|
|
444
444
|
state: fieldState,
|
|
445
445
|
validation,
|
|
446
446
|
shouldValidateOnChange
|
|
447
|
-
} =
|
|
447
|
+
} = useLabelableId.useFieldRootContext();
|
|
448
448
|
const disabled = fieldDisabled || disabledProp;
|
|
449
449
|
const name = fieldName ?? nameProp;
|
|
450
450
|
const step = stepProp === 'any' ? 1 : stepProp;
|
|
@@ -455,7 +455,7 @@ const NumberFieldRoot = /*#__PURE__*/React__namespace.forwardRef(function Number
|
|
|
455
455
|
const formatStyle = format?.style;
|
|
456
456
|
const inputRef = React__namespace.useRef(null);
|
|
457
457
|
const hiddenInputRef = useRenderElement.useMergedRefs(inputRefProp, validation.inputRef);
|
|
458
|
-
const id =
|
|
458
|
+
const id = useLabelableId.useLabelableId({
|
|
459
459
|
id: idProp
|
|
460
460
|
});
|
|
461
461
|
const [valueUnwrapped, setValueUnwrapped] = useButton.useControlled({
|
|
@@ -1204,7 +1204,7 @@ const NumberFieldDecrement = /*#__PURE__*/React__namespace.forwardRef(function N
|
|
|
1204
1204
|
if (process.env.NODE_ENV !== "production") NumberFieldDecrement.displayName = "NumberFieldDecrement";
|
|
1205
1205
|
|
|
1206
1206
|
const stateAttributesMapping = {
|
|
1207
|
-
...
|
|
1207
|
+
...useLabelableId.fieldValidityMapping,
|
|
1208
1208
|
...stateAttributesMapping$1
|
|
1209
1209
|
};
|
|
1210
1210
|
const NAVIGATE_KEYS = new Set(['Backspace', 'Delete', 'ArrowLeft', 'ArrowRight', 'Tab', 'Enter', 'Escape']);
|
|
@@ -1249,7 +1249,7 @@ const NumberFieldInput = /*#__PURE__*/React__namespace.forwardRef(function Numbe
|
|
|
1249
1249
|
} = useNumberFieldRootContext();
|
|
1250
1250
|
const {
|
|
1251
1251
|
clearErrors
|
|
1252
|
-
} =
|
|
1252
|
+
} = useLabelableId.useFormContext();
|
|
1253
1253
|
const {
|
|
1254
1254
|
validationMode,
|
|
1255
1255
|
setTouched,
|
|
@@ -1257,13 +1257,13 @@ const NumberFieldInput = /*#__PURE__*/React__namespace.forwardRef(function Numbe
|
|
|
1257
1257
|
invalid,
|
|
1258
1258
|
shouldValidateOnChange,
|
|
1259
1259
|
validation
|
|
1260
|
-
} =
|
|
1260
|
+
} = useLabelableId.useFieldRootContext();
|
|
1261
1261
|
const {
|
|
1262
1262
|
labelId
|
|
1263
|
-
} =
|
|
1263
|
+
} = useLabelableId.useLabelableContext();
|
|
1264
1264
|
const hasTouchedInputRef = React__namespace.useRef(false);
|
|
1265
1265
|
const blockRevalidationRef = React__namespace.useRef(false);
|
|
1266
|
-
|
|
1266
|
+
useLabelableId.useField({
|
|
1267
1267
|
id,
|
|
1268
1268
|
commit: validation.commit,
|
|
1269
1269
|
value,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { D as useOnMount, T as Timeout, E as useControlled, n as useValueAsRef,
|
|
2
|
+
import { D as useOnMount, T as Timeout, E as useControlled, n as useValueAsRef, a as useIsoLayoutEffect, b as useStableCallback, h as useTimeout, F as isIOS, d 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, c 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
|
-
import { f as fieldValidityMapping, b as useFieldRootContext,
|
|
4
|
+
import { f as fieldValidityMapping, b as useFieldRootContext, c as useLabelableId, a as useFormContext, u as useLabelableContext, d as useField } from './useLabelableId-es.js';
|
|
5
5
|
import { c as clamp } from './clamp-es.js';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
-
import {
|
|
7
|
+
import { o as getWindow } from './floating-ui.utils.dom-es.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Returns a function that forces a rerender.
|
package/dist/Page/index.cjs
CHANGED
|
@@ -32,12 +32,14 @@ require('../BottomSheet-cjs.js');
|
|
|
32
32
|
require('../ScrollAreaViewport-cjs.js');
|
|
33
33
|
require('../InternalBackdrop-cjs.js');
|
|
34
34
|
require('../useButton-cjs.js');
|
|
35
|
+
require('../CSPContext-cjs.js');
|
|
35
36
|
require('../clamp-cjs.js');
|
|
36
37
|
require('../OverlaySeparator-cjs.js');
|
|
37
38
|
require('../Separator-cjs.js');
|
|
38
39
|
require('../DrawerTitle-cjs.js');
|
|
39
40
|
require('../MenuSubmenuTrigger-cjs.js');
|
|
40
41
|
require('../useCompositeListItem-cjs.js');
|
|
42
|
+
require('../ToolbarRootContext-cjs.js');
|
|
41
43
|
require('../filterDataAttributes-cjs.js');
|
|
42
44
|
|
|
43
45
|
|
package/dist/Page/index.mjs
CHANGED
|
@@ -30,10 +30,12 @@ import '../BottomSheet-es.js';
|
|
|
30
30
|
import '../ScrollAreaViewport-es.js';
|
|
31
31
|
import '../InternalBackdrop-es.js';
|
|
32
32
|
import '../useButton-es.js';
|
|
33
|
+
import '../CSPContext-es.js';
|
|
33
34
|
import '../clamp-es.js';
|
|
34
35
|
import '../OverlaySeparator-es.js';
|
|
35
36
|
import '../Separator-es.js';
|
|
36
37
|
import '../DrawerTitle-es.js';
|
|
37
38
|
import '../MenuSubmenuTrigger-es.js';
|
|
38
39
|
import '../useCompositeListItem-es.js';
|
|
40
|
+
import '../ToolbarRootContext-es.js';
|
|
39
41
|
import '../filterDataAttributes-es.js';
|
|
@@ -4,6 +4,7 @@ var React = require('react');
|
|
|
4
4
|
var useRenderElement = require('./useRenderElement-cjs.js');
|
|
5
5
|
var InternalBackdrop = require('./InternalBackdrop-cjs.js');
|
|
6
6
|
var useButton = require('./useButton-cjs.js');
|
|
7
|
+
var CSPContext = require('./CSPContext-cjs.js');
|
|
7
8
|
var clamp = require('./clamp-cjs.js');
|
|
8
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
10
|
var floatingUi_utils_dom = require('./floating-ui.utils.dom-cjs.js');
|
|
@@ -424,18 +425,6 @@ function useDialogPortalContext() {
|
|
|
424
425
|
return value;
|
|
425
426
|
}
|
|
426
427
|
|
|
427
|
-
const ARROW_UP = 'ArrowUp';
|
|
428
|
-
const ARROW_DOWN = 'ArrowDown';
|
|
429
|
-
const ARROW_LEFT = 'ArrowLeft';
|
|
430
|
-
const ARROW_RIGHT = 'ArrowRight';
|
|
431
|
-
const HOME = 'Home';
|
|
432
|
-
const END = 'End';
|
|
433
|
-
const HORIZONTAL_KEYS = new Set([ARROW_LEFT, ARROW_RIGHT]);
|
|
434
|
-
const VERTICAL_KEYS = new Set([ARROW_UP, ARROW_DOWN]);
|
|
435
|
-
const ARROW_KEYS = new Set([...HORIZONTAL_KEYS, ...VERTICAL_KEYS]);
|
|
436
|
-
new Set([...ARROW_KEYS, HOME, END]);
|
|
437
|
-
const COMPOSITE_KEYS = new Set([ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, HOME, END]);
|
|
438
|
-
|
|
439
428
|
const DialogPortal = /*#__PURE__*/React__namespace.forwardRef(function DialogPortal(props, forwardedRef) {
|
|
440
429
|
const {
|
|
441
430
|
keepMounted = false,
|
|
@@ -1416,7 +1405,7 @@ const DrawerPopup = /*#__PURE__*/React__namespace.forwardRef(function DrawerPopu
|
|
|
1416
1405
|
tabIndex: -1,
|
|
1417
1406
|
hidden: !mounted,
|
|
1418
1407
|
onKeyDown(event) {
|
|
1419
|
-
if (COMPOSITE_KEYS.has(event.key)) {
|
|
1408
|
+
if (CSPContext.COMPOSITE_KEYS.has(event.key)) {
|
|
1420
1409
|
event.stopPropagation();
|
|
1421
1410
|
}
|
|
1422
1411
|
},
|
|
@@ -1766,20 +1755,6 @@ let ScrollAreaScrollbarDataAttributes = /*#__PURE__*/function (ScrollAreaScrollb
|
|
|
1766
1755
|
return ScrollAreaScrollbarDataAttributes;
|
|
1767
1756
|
}({});
|
|
1768
1757
|
|
|
1769
|
-
const DISABLE_SCROLLBAR_CLASS_NAME = 'base-ui-disable-scrollbar';
|
|
1770
|
-
const styleDisableScrollbar = {
|
|
1771
|
-
className: DISABLE_SCROLLBAR_CLASS_NAME,
|
|
1772
|
-
getElement(nonce) {
|
|
1773
|
-
return /*#__PURE__*/jsxRuntime.jsx("style", {
|
|
1774
|
-
nonce: nonce,
|
|
1775
|
-
href: DISABLE_SCROLLBAR_CLASS_NAME,
|
|
1776
|
-
precedence: "base-ui:low",
|
|
1777
|
-
children: `.${DISABLE_SCROLLBAR_CLASS_NAME}{scrollbar-width:none}.${DISABLE_SCROLLBAR_CLASS_NAME}::-webkit-scrollbar{display:none}`
|
|
1778
|
-
});
|
|
1779
|
-
}
|
|
1780
|
-
};
|
|
1781
|
-
if (process.env.NODE_ENV !== "production") styleDisableScrollbar.getElement.displayName = "styleDisableScrollbar.getElement";
|
|
1782
|
-
|
|
1783
1758
|
let ScrollAreaRootDataAttributes = /*#__PURE__*/function (ScrollAreaRootDataAttributes) {
|
|
1784
1759
|
/**
|
|
1785
1760
|
* Present when the user scrolls inside the scroll area.
|
|
@@ -1834,22 +1809,6 @@ const scrollAreaStateAttributesMapping = {
|
|
|
1834
1809
|
cornerHidden: () => null
|
|
1835
1810
|
};
|
|
1836
1811
|
|
|
1837
|
-
/**
|
|
1838
|
-
* @internal
|
|
1839
|
-
*/
|
|
1840
|
-
const CSPContext = /*#__PURE__*/React__namespace.createContext(undefined);
|
|
1841
|
-
if (process.env.NODE_ENV !== "production") CSPContext.displayName = "CSPContext";
|
|
1842
|
-
const DEFAULT_CSP_CONTEXT_VALUE = {
|
|
1843
|
-
disableStyleElements: false
|
|
1844
|
-
};
|
|
1845
|
-
|
|
1846
|
-
/**
|
|
1847
|
-
* @internal
|
|
1848
|
-
*/
|
|
1849
|
-
function useCSPContext() {
|
|
1850
|
-
return React__namespace.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE;
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
1812
|
const DEFAULT_COORDS = {
|
|
1854
1813
|
x: 0,
|
|
1855
1814
|
y: 0
|
|
@@ -1889,7 +1848,7 @@ const ScrollAreaRoot = /*#__PURE__*/React__namespace.forwardRef(function ScrollA
|
|
|
1889
1848
|
const {
|
|
1890
1849
|
nonce,
|
|
1891
1850
|
disableStyleElements
|
|
1892
|
-
} = useCSPContext();
|
|
1851
|
+
} = CSPContext.useCSPContext();
|
|
1893
1852
|
const [hovering, setHovering] = React__namespace.useState(false);
|
|
1894
1853
|
const [scrollingX, setScrollingX] = React__namespace.useState(false);
|
|
1895
1854
|
const [scrollingY, setScrollingY] = React__namespace.useState(false);
|
|
@@ -2072,7 +2031,7 @@ const ScrollAreaRoot = /*#__PURE__*/React__namespace.forwardRef(function ScrollA
|
|
|
2072
2031
|
}), [handlePointerDown, handlePointerMove, handlePointerUp, handleScroll, cornerSize, thumbSize, hasMeasuredScrollbar, touchModality, scrollingX, setScrollingX, scrollingY, setScrollingY, hovering, setHovering, rootId, hiddenState, overflowEdges, state, overflowEdgeThreshold]);
|
|
2073
2032
|
return /*#__PURE__*/jsxRuntime.jsxs(ScrollAreaRootContext.Provider, {
|
|
2074
2033
|
value: contextValue,
|
|
2075
|
-
children: [!disableStyleElements && styleDisableScrollbar.getElement(nonce), element]
|
|
2034
|
+
children: [!disableStyleElements && CSPContext.styleDisableScrollbar.getElement(nonce), element]
|
|
2076
2035
|
});
|
|
2077
2036
|
});
|
|
2078
2037
|
if (process.env.NODE_ENV !== "production") ScrollAreaRoot.displayName = "ScrollAreaRoot";
|
|
@@ -2459,7 +2418,7 @@ const ScrollAreaViewport = /*#__PURE__*/React__namespace.forwardRef(function Scr
|
|
|
2459
2418
|
// https://accessibilityinsights.io/info-examples/web/scrollable-region-focusable/
|
|
2460
2419
|
// Keep non-scrollable viewports out of tab order.
|
|
2461
2420
|
tabIndex: hiddenState.x && hiddenState.y ? -1 : 0,
|
|
2462
|
-
className: styleDisableScrollbar.className,
|
|
2421
|
+
className: CSPContext.styleDisableScrollbar.className,
|
|
2463
2422
|
style: {
|
|
2464
2423
|
overflow: 'scroll'
|
|
2465
2424
|
},
|
|
@@ -2532,7 +2491,6 @@ function mergeHiddenState(prevState, nextState) {
|
|
|
2532
2491
|
return nextState;
|
|
2533
2492
|
}
|
|
2534
2493
|
|
|
2535
|
-
exports.COMPOSITE_KEYS = COMPOSITE_KEYS;
|
|
2536
2494
|
exports.DRAWER_CONTENT_ATTRIBUTE = DRAWER_CONTENT_ATTRIBUTE;
|
|
2537
2495
|
exports.DialogPortal = DialogPortal;
|
|
2538
2496
|
exports.DialogRoot = DialogRoot;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { E as EMPTY_OBJECT, a as useRefWithInit, f as formatErrorMessage, u as useRenderElement } from './useRenderElement-es.js';
|
|
3
|
-
import { a as FloatingRootStore, P as PopupTriggerMap,
|
|
4
|
-
import {
|
|
3
|
+
import { a as FloatingRootStore, P as PopupTriggerMap, o as createSelector, u as useFloatingParentNodeId, y as FloatingPortal, I as InternalBackdrop, A as inertValue, q as useOpenInteractionType, t as useDismiss, z as useScrollLock, v as useInteractions, R as ReactStore, w as useOnFirstRender, s as useClick, E as CLICK_TRIGGER_IDENTIFIER, G as triggerOpenStateMapping, p as popupStateMapping, C as CommonPopupDataAttributes, F as FloatingFocusManager, n as useDirection } from './InternalBackdrop-es.js';
|
|
4
|
+
import { b as useStableCallback, a as useIsoLayoutEffect, k as useTransitionStatus, f as useOpenChangeComplete, l as useId, m as getFloatingFocusElement, d as createChangeEventDetails, i as imperativeAction, g as getTarget, r as contains, u as useBaseUiId, c as useButton, t as transitionStatusMapping, o as ownerDocument, E as useControlled, G as none, _ as isAndroid, $ as closeWatcher, h as useTimeout, X as isWebKit } from './useButton-es.js';
|
|
5
|
+
import { C as COMPOSITE_KEYS, u as useCSPContext, s as styleDisableScrollbar } from './CSPContext-es.js';
|
|
5
6
|
import { c as clamp } from './clamp-es.js';
|
|
6
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
import { b as isElement,
|
|
8
|
+
import { b as isElement, o as getWindow } from './floating-ui.utils.dom-es.js';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Returns a callback ref that registers/unregisters the trigger element in the store.
|
|
@@ -403,18 +404,6 @@ function useDialogPortalContext() {
|
|
|
403
404
|
return value;
|
|
404
405
|
}
|
|
405
406
|
|
|
406
|
-
const ARROW_UP = 'ArrowUp';
|
|
407
|
-
const ARROW_DOWN = 'ArrowDown';
|
|
408
|
-
const ARROW_LEFT = 'ArrowLeft';
|
|
409
|
-
const ARROW_RIGHT = 'ArrowRight';
|
|
410
|
-
const HOME = 'Home';
|
|
411
|
-
const END = 'End';
|
|
412
|
-
const HORIZONTAL_KEYS = new Set([ARROW_LEFT, ARROW_RIGHT]);
|
|
413
|
-
const VERTICAL_KEYS = new Set([ARROW_UP, ARROW_DOWN]);
|
|
414
|
-
const ARROW_KEYS = new Set([...HORIZONTAL_KEYS, ...VERTICAL_KEYS]);
|
|
415
|
-
new Set([...ARROW_KEYS, HOME, END]);
|
|
416
|
-
const COMPOSITE_KEYS = new Set([ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, HOME, END]);
|
|
417
|
-
|
|
418
407
|
const DialogPortal = /*#__PURE__*/React.forwardRef(function DialogPortal(props, forwardedRef) {
|
|
419
408
|
const {
|
|
420
409
|
keepMounted = false,
|
|
@@ -1745,20 +1734,6 @@ let ScrollAreaScrollbarDataAttributes = /*#__PURE__*/function (ScrollAreaScrollb
|
|
|
1745
1734
|
return ScrollAreaScrollbarDataAttributes;
|
|
1746
1735
|
}({});
|
|
1747
1736
|
|
|
1748
|
-
const DISABLE_SCROLLBAR_CLASS_NAME = 'base-ui-disable-scrollbar';
|
|
1749
|
-
const styleDisableScrollbar = {
|
|
1750
|
-
className: DISABLE_SCROLLBAR_CLASS_NAME,
|
|
1751
|
-
getElement(nonce) {
|
|
1752
|
-
return /*#__PURE__*/jsx("style", {
|
|
1753
|
-
nonce: nonce,
|
|
1754
|
-
href: DISABLE_SCROLLBAR_CLASS_NAME,
|
|
1755
|
-
precedence: "base-ui:low",
|
|
1756
|
-
children: `.${DISABLE_SCROLLBAR_CLASS_NAME}{scrollbar-width:none}.${DISABLE_SCROLLBAR_CLASS_NAME}::-webkit-scrollbar{display:none}`
|
|
1757
|
-
});
|
|
1758
|
-
}
|
|
1759
|
-
};
|
|
1760
|
-
if (process.env.NODE_ENV !== "production") styleDisableScrollbar.getElement.displayName = "styleDisableScrollbar.getElement";
|
|
1761
|
-
|
|
1762
1737
|
let ScrollAreaRootDataAttributes = /*#__PURE__*/function (ScrollAreaRootDataAttributes) {
|
|
1763
1738
|
/**
|
|
1764
1739
|
* Present when the user scrolls inside the scroll area.
|
|
@@ -1813,22 +1788,6 @@ const scrollAreaStateAttributesMapping = {
|
|
|
1813
1788
|
cornerHidden: () => null
|
|
1814
1789
|
};
|
|
1815
1790
|
|
|
1816
|
-
/**
|
|
1817
|
-
* @internal
|
|
1818
|
-
*/
|
|
1819
|
-
const CSPContext = /*#__PURE__*/React.createContext(undefined);
|
|
1820
|
-
if (process.env.NODE_ENV !== "production") CSPContext.displayName = "CSPContext";
|
|
1821
|
-
const DEFAULT_CSP_CONTEXT_VALUE = {
|
|
1822
|
-
disableStyleElements: false
|
|
1823
|
-
};
|
|
1824
|
-
|
|
1825
|
-
/**
|
|
1826
|
-
* @internal
|
|
1827
|
-
*/
|
|
1828
|
-
function useCSPContext() {
|
|
1829
|
-
return React.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE;
|
|
1830
|
-
}
|
|
1831
|
-
|
|
1832
1791
|
const DEFAULT_COORDS = {
|
|
1833
1792
|
x: 0,
|
|
1834
1793
|
y: 0
|
|
@@ -2511,4 +2470,4 @@ function mergeHiddenState(prevState, nextState) {
|
|
|
2511
2470
|
return nextState;
|
|
2512
2471
|
}
|
|
2513
2472
|
|
|
2514
|
-
export { useDrawerSnapPoints as A, DrawerViewportContext as B,
|
|
2473
|
+
export { useDrawerSnapPoints as A, DrawerViewportContext as B, DRAWER_CONTENT_ATTRIBUTE as C, DrawerTrigger as D, useScrollAreaRootContext as E, getOffset as F, ScrollAreaRootCssVars as G, scrollAreaStateAttributesMapping as H, useScrollAreaViewportContext as I, ScrollAreaRoot as S, DrawerRoot as a, DrawerPortal as b, DrawerBackdrop as c, DrawerPopup as d, ScrollAreaViewport as e, DrawerContent as f, DialogRoot as g, DialogTrigger as h, DialogPortal as i, useDialogPortalContext as j, DialogStore as k, createInitialPopupStoreState as l, useImplicitActiveTrigger as m, useOpenStateTransitions as n, useSyncedFloatingRootContext as o, popupStoreSelectors as p, useRole as q, useTriggerDataForwarding as r, useTriggerRegistration as s, useDrawerProviderContext as t, useDialogRootContext as u, DrawerBackdropCssVars as v, DrawerPopupCssVars as w, DrawerProviderContext as x, useDrawerRootContext as y, DrawerPopupDataAttributes as z };
|