@qualtrics/ui-react 2.85.2 → 2.85.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/__node_modules/@radix-ui/primitive/dist/index.js +14 -3
- package/dist/__node_modules/@radix-ui/primitive/dist/internal/is-development.false.js +4 -0
- package/dist/__node_modules/@radix-ui/react-arrow/dist/index.js +9 -6
- package/dist/__node_modules/@radix-ui/react-collection/dist/index.js +263 -153
- package/dist/__node_modules/@radix-ui/react-compose-refs/dist/index.js +8 -1
- package/dist/__node_modules/@radix-ui/react-context/dist/index.js +35 -12
- package/dist/__node_modules/@radix-ui/react-direction/dist/index.js +16 -6
- package/dist/__node_modules/@radix-ui/react-dismissable-layer/dist/index.js +172 -43
- package/dist/__node_modules/@radix-ui/react-dropdown-menu/dist/index.js +76 -95
- package/dist/__node_modules/@radix-ui/react-focus-guards/dist/index.js +30 -6
- package/dist/__node_modules/@radix-ui/react-focus-scope/dist/index.js +111 -30
- package/dist/__node_modules/@radix-ui/react-id/dist/index.js +6 -0
- package/dist/__node_modules/@radix-ui/react-menu/dist/index.js +232 -197
- package/dist/__node_modules/@radix-ui/react-popper/dist/index.js +104 -49
- package/dist/__node_modules/@radix-ui/react-portal/dist/index.js +10 -8
- package/dist/__node_modules/@radix-ui/react-presence/dist/index.js +72 -14
- package/dist/__node_modules/@radix-ui/react-primitive/dist/index.js +8 -2
- package/dist/__node_modules/@radix-ui/react-roving-focus/dist/index.js +52 -18
- package/dist/__node_modules/@radix-ui/react-slot/dist/index.js +106 -54
- package/dist/__node_modules/@radix-ui/react-use-callback-ref/dist/index.js +17 -4
- package/dist/__node_modules/@radix-ui/react-use-controllable-state/dist/index.js +14 -4
- package/dist/__node_modules/@radix-ui/react-use-effect-event/dist/index.js +6 -1
- package/dist/__node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +37 -0
- package/dist/__node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
- package/dist/__node_modules/@radix-ui/react-use-size/dist/index.js +28 -15
- package/dist/__shared/cjs/{index-e03dac36.js → index-bd03241f.js} +213 -208
- package/dist/__shared/cjs/{index-507024ee.js → index-ccb5282a.js} +12 -3
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Button/Button.js +52 -6
- package/dist/components/Button/Button2.js +6 -52
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/ColorPicker/ColorPickerFlyout.js +1 -1
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/ConfigPane/ConfigPane.js +6 -2
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +1 -1
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/FilePicker/FilePicker.js +1 -1
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/IconTypes.js +1 -0
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Pagination/PaginationNextButton.js +1 -1
- package/dist/components/Pagination/PaginationPreviousButton.js +1 -1
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch.js +1 -1
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +1 -1
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/design-tokens/less/typography.js +3 -3
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/components/PulseIcon.js +11 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.es.js +1 -0
- package/dist/icons/index.js +2 -1
- package/dist/index.d.ts +72 -71
- package/dist/index.es.js +2 -2
- package/dist/index.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/Chat/Loader.js +1 -1
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Form/FormFields/InputField.js +3 -3
- package/dist/next/Indicator/Indicator2.js +3 -3
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/next/Menu/Hooks/useFlyoutNode.js +48 -0
- package/dist/next/Menu/Menu.js +2 -2
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuButton.js +6 -5
- package/dist/next/Menu/MenuItem.js +5 -4
- package/dist/next/Menu/MenuPane.js +20 -19
- package/dist/next/Menu/PaneChildren.js +15 -10
- package/dist/next/Menu/SubMenu.js +22 -21
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/Select/Select2.js +3 -3
- package/dist/next/SplitButton/SplitButton.js +1 -1
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/ToggleButton/ToggleButton.js +1 -1
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.js +1581 -850
- package/dist/translations-en.js +71 -71
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/icons/package.json +4 -4
- package/next/package.json +5 -5
- package/package.json +16 -16
- package/dist/__node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -23
package/dist/next/index.js
CHANGED
|
@@ -7,8 +7,8 @@ var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var classNames = require('classnames');
|
|
9
9
|
var useResizeObserver = require('@react-hook/resize-observer');
|
|
10
|
-
var index = require('../__shared/cjs/index-
|
|
11
|
-
var icons_index = require('../__shared/cjs/index-
|
|
10
|
+
var index = require('../__shared/cjs/index-bd03241f.js');
|
|
11
|
+
var icons_index = require('../__shared/cjs/index-ccb5282a.js');
|
|
12
12
|
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
13
13
|
var core = require('@dnd-kit/core');
|
|
14
14
|
var modifiers = require('@dnd-kit/modifiers');
|
|
@@ -54,13 +54,12 @@ var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
|
54
54
|
var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
|
|
55
55
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
56
56
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
57
|
-
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
58
57
|
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_includesInstanceProperty);
|
|
59
58
|
var ReactFocusLock__default = /*#__PURE__*/_interopDefaultLegacy(ReactFocusLock);
|
|
60
59
|
|
|
61
|
-
var css_248z$k = ".
|
|
62
|
-
var styles$e = {"advancedTable":"
|
|
63
|
-
var stylesheet$k=".
|
|
60
|
+
var css_248z$k = "._B-iai{overflow:auto;position:relative;max-width:100%;max-height:100%}._B-iai,._P-S0z{background-color:#fff}._P-S0z{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._xuItb{margin-bottom:4px}._7EPT7{position:-webkit-sticky;position:sticky;top:0;z-index:100}._heDeG{display:flex}._heDeG:focus{outline:none}._heDeG:focus-visible ._r0sey:after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._heDeG:focus-visible ._r0sey:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._heDeG:focus-visible ._r0sey:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._heDeG:focus-visible ._r0sey._UFZLq:after{right:-3px;bottom:1px}._CgIW5{padding-right:3px}._GHGv2{max-width:100%;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}._qUcu-{display:flex}._qUcu-._ySp2B ._LW0Er,._qUcu-._ySp2B ._r0sey{cursor:pointer}._qUcu-._WeQ-Q ._LW0Er,._qUcu-._WeQ-Q ._r0sey{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._qUcu-._WeQ-Q ._LW0Er._UFZLq,._qUcu-._WeQ-Q ._r0sey._UFZLq{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._qUcu-._WeQ-Q ._LW0Er._UFZLq ._Hghty,._qUcu-._WeQ-Q ._LW0Er._UFZLq ._Hm5k-,._qUcu-._WeQ-Q ._LW0Er._UFZLq ._LW0Er,._qUcu-._WeQ-Q ._r0sey._UFZLq ._Hghty,._qUcu-._WeQ-Q ._r0sey._UFZLq ._Hm5k-,._qUcu-._WeQ-Q ._r0sey._UFZLq ._LW0Er{background-color:rgba(11,110,208,.08)}._qUcu-._ySp2B:hover:not(._WeQ-Q) ._LW0Er,._qUcu-._ySp2B:hover:not(._WeQ-Q) ._r0sey{background-color:#f9f9f9}._qUcu-._ySp2B:active:not(._WeQ-Q):not(._qUcu-._ySp2B:active:not(._WeQ-Q):has(._Hm5k-:active)) ._LW0Er,._qUcu-._ySp2B:active:not(._WeQ-Q):not(._qUcu-._ySp2B:active:not(._WeQ-Q):has(._Hm5k-:active)) ._r0sey{background-color:#f3f3f3}._qUcu-:focus{outline:none}._qUcu-:focus-visible ._r0sey:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._qUcu-:focus-visible ._r0sey:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._qUcu-:focus-visible ._r0sey:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._qUcu-:focus-visible ._r0sey._UFZLq:after{right:-3px;bottom:0}._qUcu-:last-of-type:focus{outline:none}._qUcu-:last-of-type:focus-visible ._r0sey:after{content:\"\";display:block;position:absolute;top:-2px;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._qUcu-:last-of-type:focus-visible ._r0sey:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._qUcu-:last-of-type:focus-visible ._r0sey:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._qUcu-:last-of-type:focus-visible ._r0sey._UFZLq:after{right:-3px;bottom:1px}._qUcu-:last-of-type ._Hghty:focus{outline:none}._qUcu-:last-of-type ._Hghty._XtKuF:focus-visible:after,._qUcu-:last-of-type ._Hghty:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._qUcu-:first-of-type:focus{outline:none}._qUcu-:first-of-type:focus-visible ._r0sey:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._qUcu-:first-of-type:focus-visible ._r0sey:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._qUcu-:first-of-type:focus-visible ._r0sey:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._qUcu-:first-of-type:focus-visible ._r0sey._UFZLq:after{right:-3px;bottom:0}._qUcu-:first-of-type ._Hghty:focus{outline:none}._qUcu-:first-of-type ._Hghty._XtKuF:focus-visible:after,._qUcu-:first-of-type ._Hghty:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._GhSvT{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #d9d9d9;flex-shrink:0;font-size:12px;line-height:16px;font-weight:700;color:#6a6d70;background-color:#fff;position:relative}._GhSvT._Cgolh{flex-grow:1}._GhSvT._R1rRd{cursor:pointer}._GhSvT._R1rRd:hover:not(._XoEcy){background-color:#f9f9f9;border-bottom-color:#6a6d70}._GhSvT._R1rRd:active:not(._XoEcy){background-color:#f3f3f3}._GhSvT._fw5es:not(._XoEcy){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._GhSvT._XoEcy{cursor:move!important;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._GhSvT ._-n2pE{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._GhSvT ._-n2pE._D-c6u{left:-1px}._GhSvT ._-n2pE._-yTX-{right:0}._GhSvT ._ZBI4K{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._GhSvT ._ZBI4K._D-c6u{left:-2px}._GhSvT ._ZBI4K._-yTX-{right:-1px}._GhSvT:first-of-type ._D-c6u._-n2pE{left:0;width:2px;border-left:1px solid #fff}._GhSvT:first-of-type ._D-c6u._ZBI4K{left:0}._GhSvT:last-of-type ._-yTX-._-n2pE{right:0;width:2px;border-right:1px solid #fff}._GhSvT:last-of-type ._-yTX-._ZBI4K{right:0}._GhSvT ._M-gx5{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._GhSvT ._M-gx5 ._VSoXM{position:absolute;width:2px;right:2px;top:0;bottom:0}._GhSvT ._M-gx5 ._VSoXM._IrD63{background-color:#0a6ed1}._GhSvT ._M-gx5:hover ._VSoXM:not(._IrD63){background-color:#d9d9d9}._GhSvT ._fGcGT{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 46px 13px 12px}._GhSvT ._fGcGT._rVRsa{flex-direction:row-reverse;justify-content:flex-start}._GhSvT ._fGcGT._rVRsa ._aMnkg{margin:1px 7px 1px 1px}._GhSvT ._fGcGT ._Qqfnx{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._GhSvT ._fGcGT ._aMnkg{margin:1px 1px 1px 7px;flex-shrink:0}._GhSvT ._kXQ6p{position:absolute;right:4px;top:calc(50% - 18px);flex-shrink:0}._GhSvT ._rlC3j{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._GhSvT:focus{outline:none}._GhSvT._XtKuF:focus-visible:after,._GhSvT:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._6M3CD{margin-right:6px}._UFZLq{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._UFZLq:focus-within{z-index:30}._Hghty{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #eee;flex-shrink:0;font-size:14px;line-height:20px;overflow-wrap:break-word;color:#32363a;position:relative}._Hghty ._-Nk0T{width:100%;padding:12px 12px 11px;overflow:hidden}._Hghty._XoEcy{background-color:#efefef;border-bottom-color:#dfdfe1}._Hghty._Cgolh{flex-grow:1}._Hghty:focus{outline:none}._Hghty._XtKuF:focus-visible:after,._Hghty:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._LW0Er{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0;position:relative}._LW0Er._vYy2B{border-bottom-color:#d9d9d9;background-color:#fff}._Hm5k-{display:flex;align-items:center;justify-content:center;min-height:44px;width:40px;border-bottom:1px solid #eee;padding:12px 12px 11px;flex-shrink:0;cursor:pointer}._Hm5k-._vYy2B{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._Hm5k-:focus input~span,._Hm5k-:hover input~span{border-color:#0b6ed0}._hl90a{justify-content:flex-start}._1lnTO{justify-content:center;text-align:center}._rVRsa{justify-content:flex-end;text-align:right}._sbtay{display:none}._618Hz{position:absolute;opacity:0;height:0;width:0;overflow:hidden}._rDeqk{background-color:rgba(11,110,208,.08);position:absolute;border-radius:4px;z-index:1000}._b-QG5,._rDeqk{cursor:move;pointer-events:none}._Y1Xel{max-width:250px;min-width:150px!important}";
|
|
61
|
+
var styles$e = {"advancedTable":"_B-iai","advancedTablePaginationContainer":"_P-S0z","advancedTablePagination":"_xuItb","advancedTableColumnHeadersRowGroup":"_7EPT7","advancedTableColumnHeaders":"_heDeG","advancedTableRowChild":"_r0sey","pinnedContainer":"_UFZLq","advancedTableRowGroup":"_CgIW5","advancedTableRowRestrictedWidth":"_GHGv2","advancedTableRow":"_qUcu-","hasRowAction":"_ySp2B","advancedTableExpandRowSpacer":"_LW0Er","isSelected":"_WeQ-Q","advancedTableCheckbox":"_Hm5k-","advancedTableCell":"_Hghty","showFocusRing":"_XtKuF","advancedTableColumnHeader":"_GhSvT","fillRemainingSpace":"_Cgolh","isSortable":"_R1rRd","isDragging":"_XoEcy","isSorted":"_fw5es","dropTargetLine":"_-n2pE","dropTargetLeft":"_D-c6u","dropTargetRight":"_-yTX-","dropTargetMarker":"_ZBI4K","resizeHandle":"_M-gx5","resizeLine":"_VSoXM","isResizing":"_IrD63","advancedTableColumnHeaderLabel":"_fGcGT","rightAligned":"_rVRsa","sortIcon":"_aMnkg","advancedTableColumnHeaderLabelText":"_Qqfnx","advancedTableColumnHeaderMenu":"_kXQ6p","advancedTableColumnHeaderMenuHiddenAnchor":"_rlC3j","advancedTableColumnHeaderMenuItemIcon":"_6M3CD","advancedTableCellContainer":"_-Nk0T","header":"_vYy2B","leftAligned":"_hl90a","centerAligned":"_1lnTO","hiddenDescription":"_sbtay","hiddenLiveRegion":"_618Hz","dragPreview":"_rDeqk","isColumnDragging":"_b-QG5","rowActionMenuPane":"_Y1Xel"};
|
|
62
|
+
var stylesheet$k="._B-iai{overflow:auto;position:relative;max-width:100%;max-height:100%}._B-iai,._P-S0z{background-color:#fff}._P-S0z{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._xuItb{margin-bottom:4px}._7EPT7{position:-webkit-sticky;position:sticky;top:0;z-index:100}._heDeG{display:flex}._heDeG:focus{outline:none}._heDeG:focus-visible ._r0sey:after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._heDeG:focus-visible ._r0sey:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._heDeG:focus-visible ._r0sey:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._heDeG:focus-visible ._r0sey._UFZLq:after{right:-3px;bottom:1px}._CgIW5{padding-right:3px}._GHGv2{max-width:100%;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}._qUcu-{display:flex}._qUcu-._ySp2B ._LW0Er,._qUcu-._ySp2B ._r0sey{cursor:pointer}._qUcu-._WeQ-Q ._LW0Er,._qUcu-._WeQ-Q ._r0sey{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._qUcu-._WeQ-Q ._LW0Er._UFZLq,._qUcu-._WeQ-Q ._r0sey._UFZLq{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._qUcu-._WeQ-Q ._LW0Er._UFZLq ._Hghty,._qUcu-._WeQ-Q ._LW0Er._UFZLq ._Hm5k-,._qUcu-._WeQ-Q ._LW0Er._UFZLq ._LW0Er,._qUcu-._WeQ-Q ._r0sey._UFZLq ._Hghty,._qUcu-._WeQ-Q ._r0sey._UFZLq ._Hm5k-,._qUcu-._WeQ-Q ._r0sey._UFZLq ._LW0Er{background-color:rgba(11,110,208,.08)}._qUcu-._ySp2B:hover:not(._WeQ-Q) ._LW0Er,._qUcu-._ySp2B:hover:not(._WeQ-Q) ._r0sey{background-color:#f9f9f9}._qUcu-._ySp2B:active:not(._WeQ-Q):not(._qUcu-._ySp2B:active:not(._WeQ-Q):has(._Hm5k-:active)) ._LW0Er,._qUcu-._ySp2B:active:not(._WeQ-Q):not(._qUcu-._ySp2B:active:not(._WeQ-Q):has(._Hm5k-:active)) ._r0sey{background-color:#f3f3f3}._qUcu-:focus{outline:none}._qUcu-:focus-visible ._r0sey:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._qUcu-:focus-visible ._r0sey:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._qUcu-:focus-visible ._r0sey:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._qUcu-:focus-visible ._r0sey._UFZLq:after{right:-3px;bottom:0}._qUcu-:last-of-type:focus{outline:none}._qUcu-:last-of-type:focus-visible ._r0sey:after{content:\"\";display:block;position:absolute;top:-2px;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._qUcu-:last-of-type:focus-visible ._r0sey:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._qUcu-:last-of-type:focus-visible ._r0sey:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._qUcu-:last-of-type:focus-visible ._r0sey._UFZLq:after{right:-3px;bottom:1px}._qUcu-:last-of-type ._Hghty:focus{outline:none}._qUcu-:last-of-type ._Hghty._XtKuF:focus-visible:after,._qUcu-:last-of-type ._Hghty:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._qUcu-:first-of-type:focus{outline:none}._qUcu-:first-of-type:focus-visible ._r0sey:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._qUcu-:first-of-type:focus-visible ._r0sey:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._qUcu-:first-of-type:focus-visible ._r0sey:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._qUcu-:first-of-type:focus-visible ._r0sey._UFZLq:after{right:-3px;bottom:0}._qUcu-:first-of-type ._Hghty:focus{outline:none}._qUcu-:first-of-type ._Hghty._XtKuF:focus-visible:after,._qUcu-:first-of-type ._Hghty:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._GhSvT{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #d9d9d9;flex-shrink:0;font-size:12px;line-height:16px;font-weight:700;color:#6a6d70;background-color:#fff;position:relative}._GhSvT._Cgolh{flex-grow:1}._GhSvT._R1rRd{cursor:pointer}._GhSvT._R1rRd:hover:not(._XoEcy){background-color:#f9f9f9;border-bottom-color:#6a6d70}._GhSvT._R1rRd:active:not(._XoEcy){background-color:#f3f3f3}._GhSvT._fw5es:not(._XoEcy){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._GhSvT._XoEcy{cursor:move!important;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._GhSvT ._-n2pE{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._GhSvT ._-n2pE._D-c6u{left:-1px}._GhSvT ._-n2pE._-yTX-{right:0}._GhSvT ._ZBI4K{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._GhSvT ._ZBI4K._D-c6u{left:-2px}._GhSvT ._ZBI4K._-yTX-{right:-1px}._GhSvT:first-of-type ._D-c6u._-n2pE{left:0;width:2px;border-left:1px solid #fff}._GhSvT:first-of-type ._D-c6u._ZBI4K{left:0}._GhSvT:last-of-type ._-yTX-._-n2pE{right:0;width:2px;border-right:1px solid #fff}._GhSvT:last-of-type ._-yTX-._ZBI4K{right:0}._GhSvT ._M-gx5{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._GhSvT ._M-gx5 ._VSoXM{position:absolute;width:2px;right:2px;top:0;bottom:0}._GhSvT ._M-gx5 ._VSoXM._IrD63{background-color:#0a6ed1}._GhSvT ._M-gx5:hover ._VSoXM:not(._IrD63){background-color:#d9d9d9}._GhSvT ._fGcGT{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 46px 13px 12px}._GhSvT ._fGcGT._rVRsa{flex-direction:row-reverse;justify-content:flex-start}._GhSvT ._fGcGT._rVRsa ._aMnkg{margin:1px 7px 1px 1px}._GhSvT ._fGcGT ._Qqfnx{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._GhSvT ._fGcGT ._aMnkg{margin:1px 1px 1px 7px;flex-shrink:0}._GhSvT ._kXQ6p{position:absolute;right:4px;top:calc(50% - 18px);flex-shrink:0}._GhSvT ._rlC3j{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._GhSvT:focus{outline:none}._GhSvT._XtKuF:focus-visible:after,._GhSvT:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._6M3CD{margin-right:6px}._UFZLq{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._UFZLq:focus-within{z-index:30}._Hghty{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #eee;flex-shrink:0;font-size:14px;line-height:20px;overflow-wrap:break-word;color:#32363a;position:relative}._Hghty ._-Nk0T{width:100%;padding:12px 12px 11px;overflow:hidden}._Hghty._XoEcy{background-color:#efefef;border-bottom-color:#dfdfe1}._Hghty._Cgolh{flex-grow:1}._Hghty:focus{outline:none}._Hghty._XtKuF:focus-visible:after,._Hghty:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._LW0Er{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0;position:relative}._LW0Er._vYy2B{border-bottom-color:#d9d9d9;background-color:#fff}._Hm5k-{display:flex;align-items:center;justify-content:center;min-height:44px;width:40px;border-bottom:1px solid #eee;padding:12px 12px 11px;flex-shrink:0;cursor:pointer}._Hm5k-._vYy2B{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._Hm5k-:focus input~span,._Hm5k-:hover input~span{border-color:#0b6ed0}._hl90a{justify-content:flex-start}._1lnTO{justify-content:center;text-align:center}._rVRsa{justify-content:flex-end;text-align:right}._sbtay{display:none}._618Hz{position:absolute;opacity:0;height:0;width:0;overflow:hidden}._rDeqk{background-color:rgba(11,110,208,.08);position:absolute;border-radius:4px;z-index:1000}._b-QG5,._rDeqk{cursor:move;pointer-events:none}._Y1Xel{max-width:250px;min-width:150px!important}";
|
|
64
63
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$k);}
|
|
65
64
|
|
|
66
65
|
// TODO: Move the imported types into this file to avoid a ciruclar dependency warning.
|
|
@@ -2144,9 +2143,9 @@ function getExternalRowsWithUpdatedRow(extRows, rowId, depth, updatedRow) {
|
|
|
2144
2143
|
|
|
2145
2144
|
/* eslint-disable import/prefer-default-export */
|
|
2146
2145
|
|
|
2147
|
-
var css_248z$j = ".
|
|
2148
|
-
var styles$d = {"collapsibleSearchInput":"
|
|
2149
|
-
var stylesheet$j=".
|
|
2146
|
+
var css_248z$j = "._yC0JJ{display:inline-block;width:36px;transition:width .25s ease-out}._N9IK9{width:100%}._-Y0z4>input{padding-right:0!important}._jJPxY>svg{fill:#515559}";
|
|
2147
|
+
var styles$d = {"collapsibleSearchInput":"_yC0JJ","searchInput":"_N9IK9","searchInputCollapsed":"_-Y0z4","iconButton":"_jJPxY"};
|
|
2148
|
+
var stylesheet$j="._yC0JJ{display:inline-block;width:36px;transition:width .25s ease-out}._N9IK9{width:100%}._-Y0z4>input{padding-right:0!important}._jJPxY>svg{fill:#515559}";
|
|
2150
2149
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$j);}
|
|
2151
2150
|
|
|
2152
2151
|
const _excluded$s = ["tooltipContent", "tooltipPlacement"];
|
|
@@ -3008,9 +3007,9 @@ function Combobox(_ref) {
|
|
|
3008
3007
|
}, children);
|
|
3009
3008
|
}
|
|
3010
3009
|
|
|
3011
|
-
var css_248z$i = ".
|
|
3012
|
-
var styles$c = {"loadingSpinner":"
|
|
3013
|
-
var stylesheet$i=".
|
|
3010
|
+
var css_248z$i = "._gBQo9 :after{background-color:#515559!important}._aGiWk>input:focus{box-shadow:none!important;border:1px solid #898989!important}._SapdF{max-width:500px;padding:4px 0;background-color:#fff;border:1px solid #eee;border-radius:4px;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);z-index:1000;overflow-x:hidden;overflow-y:auto;overflow:hidden auto}._SapdF ._oFKPX ._BmvTS{display:flex;align-items:center;min-height:40px;padding:10px 12px;color:#32363a;font-size:12px;line-height:16px;font-weight:700;word-break:break-word}._SapdF ._oFKPX:first-child ._2-Nfj{display:none}._SapdF ._VTq-J{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._SapdF ._VTq-J:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._SapdF ._VTq-J:hover._AV9ik{background-color:#e4effa}._SapdF ._VTq-J._AV9ik{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._SapdF ._VTq-J:active:not(._AV9ik){background-color:#e8e9e9}";
|
|
3011
|
+
var styles$c = {"loadingSpinner":"_gBQo9","ignoreFocusStyle":"_aGiWk","flyout":"_SapdF","group":"_oFKPX","header":"_BmvTS","divider":"_2-Nfj","option":"_VTq-J","selected":"_AV9ik"};
|
|
3012
|
+
var stylesheet$i="._gBQo9 :after{background-color:#515559!important}._aGiWk>input:focus{box-shadow:none!important;border:1px solid #898989!important}._SapdF{max-width:500px;padding:4px 0;background-color:#fff;border:1px solid #eee;border-radius:4px;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);z-index:1000;overflow-x:hidden;overflow-y:auto;overflow:hidden auto}._SapdF ._oFKPX ._BmvTS{display:flex;align-items:center;min-height:40px;padding:10px 12px;color:#32363a;font-size:12px;line-height:16px;font-weight:700;word-break:break-word}._SapdF ._oFKPX:first-child ._2-Nfj{display:none}._SapdF ._VTq-J{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._SapdF ._VTq-J:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._SapdF ._VTq-J:hover._AV9ik{background-color:#e4effa}._SapdF ._VTq-J._AV9ik{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._SapdF ._VTq-J:active:not(._AV9ik){background-color:#e8e9e9}";
|
|
3014
3013
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$i);}
|
|
3015
3014
|
|
|
3016
3015
|
const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -3310,9 +3309,9 @@ function ComboboxOption(_ref) {
|
|
|
3310
3309
|
}, label);
|
|
3311
3310
|
}
|
|
3312
3311
|
|
|
3313
|
-
var css_248z$h = ".
|
|
3314
|
-
var styles$b = {"overlay":"
|
|
3315
|
-
var stylesheet$h=".
|
|
3312
|
+
var css_248z$h = "._yuGal{background-color:#000;opacity:.5;width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;place-items:left;overflow-y:auto}._-90sG{visibility:hidden}._VZy-C{position:fixed}._4biFC{overflow:hidden!important}";
|
|
3313
|
+
var styles$b = {"overlay":"_yuGal","hidden":"_-90sG","anchoredToBody":"_VZy-C","blockedScroll":"_4biFC"};
|
|
3314
|
+
var stylesheet$h="._yuGal{background-color:#000;opacity:.5;width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;place-items:left;overflow-y:auto}._-90sG{visibility:hidden}._VZy-C{position:fixed}._4biFC{overflow:hidden!important}";
|
|
3316
3315
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$h);}
|
|
3317
3316
|
|
|
3318
3317
|
const STATUS_MESSAGE_SELECTOR = '[aria-live], [role="status"], output';
|
|
@@ -3386,9 +3385,9 @@ const useOverlay = _ref => {
|
|
|
3386
3385
|
}, [containerRef, isVisible, ignoreIds, overlayId, disableScrollLock]);
|
|
3387
3386
|
};
|
|
3388
3387
|
|
|
3389
|
-
var css_248z$g = ".
|
|
3390
|
-
var styles$a = {"drawer":"
|
|
3391
|
-
var stylesheet$g=".
|
|
3388
|
+
var css_248z$g = "._WgeDT{position:absolute;top:0;height:100%;overflow:auto;color:#32363a;background-color:#fff;border-right:1px solid #eee;z-index:1000;padding:12px 20px 20px;transition:left .5s}._bV-cH{visibility:hidden}._w3sO0{position:fixed}._C71b2{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._apppt{padding-top:8px}._7zaNL{margin-left:12px}";
|
|
3389
|
+
var styles$a = {"drawer":"_WgeDT","hidden":"_bV-cH","anchoredToBody":"_w3sO0","header":"_C71b2","title":"_apppt","closeButton":"_7zaNL"};
|
|
3390
|
+
var stylesheet$g="._WgeDT{position:absolute;top:0;height:100%;overflow:auto;color:#32363a;background-color:#fff;border-right:1px solid #eee;z-index:1000;padding:12px 20px 20px;transition:left .5s}._bV-cH{visibility:hidden}._w3sO0{position:fixed}._C71b2{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._apppt{padding-top:8px}._7zaNL{margin-left:12px}";
|
|
3392
3391
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$g);}
|
|
3393
3392
|
|
|
3394
3393
|
const Drawer = _ref => {
|
|
@@ -3528,9 +3527,9 @@ const Drawer = _ref => {
|
|
|
3528
3527
|
};
|
|
3529
3528
|
Drawer.displayName = 'Drawer';
|
|
3530
3529
|
|
|
3531
|
-
var css_248z$f = ".
|
|
3532
|
-
var styles$9 = {"button":"
|
|
3533
|
-
var stylesheet$f=".
|
|
3530
|
+
var css_248z$f = "._eJzLn{display:flex;justify-content:space-between;align-items:center;max-width:100%;min-width:76px;height:36px;padding:0 6px 0 12px;outline:none;font-size:14px;background-color:#fff;border:1px solid #898989;border-radius:20px;cursor:pointer}._eJzLn:hover:not(._0vn1O){background-color:rgba(50,54,58,.08)}._eJzLn:hover:not(._0vn1O)._2SXKr{border-color:#085caf;background-color:rgba(11,110,208,.04)}._eJzLn:hover:not(._0vn1O)._2SXKr ._tezY7{color:#32363a}._eJzLn:hover:not(._0vn1O)._2SXKr ._4UyZZ{fill:#32363a}._eJzLn:hover:not(._0vn1O)._2SXKr ._OFq9t{fill:#085caf}._eJzLn:hover:not(._0vn1O)._2SXKr ._Kaj-0{background-color:rgba(11,110,208,.11)}._eJzLn:hover:not(._0vn1O)._2SXKr ._Kaj-0 ._43Ecx{color:#085caf}._eJzLn:active:not(._0vn1O){background-color:#e8e9e9}._eJzLn:active:not(._0vn1O)._2SXKr{background-color:rgba(11,110,208,.11);border-color:#0854a1}._eJzLn:active:not(._0vn1O)._2SXKr ._OFq9t{fill:#0854a1}._eJzLn:active:not(._0vn1O)._2SXKr ._Kaj-0{background-color:rgba(11,110,208,.11)}._eJzLn:active:not(._0vn1O)._2SXKr ._Kaj-0 ._43Ecx{color:#0854a1}._eJzLn._0vn1O{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._eJzLn._2SXKr{border-color:#0b6ed0}._4UyZZ{fill:#515559}._4UyZZ,._RFlF7{margin-right:4px}._tezY7{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._tezY7+._Kaj-0{margin-left:6px}._tezY7._0vn1O{color:#74777a}._Kaj-0{display:flex;justify-content:center;align-items:center;max-width:350px;flex:1;min-width:0;height:24px;margin-right:3px;padding:0 10px;background-color:#ebf3fb;border-radius:20px}._43Ecx{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._OFq9t{fill:#515559}._OFq9t._0vn1O,._OFq9t._0vn1O._2SXKr{fill:rgba(116,119,122,.4)}._OFq9t._2SXKr{fill:#0b6ed0}._OFq9t._pP69J{transform:rotate(-180deg)}._eJzLn:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3531
|
+
var styles$9 = {"button":"_eJzLn","disabled":"_0vn1O","selected":"_2SXKr","label":"_tezY7","lockIcon":"_4UyZZ","chevronIcon":"_OFq9t","selectedFiltersContainer":"_Kaj-0","selectedFilters":"_43Ecx","lockIconWrapper":"_RFlF7","open":"_pP69J"};
|
|
3532
|
+
var stylesheet$f="._eJzLn{display:flex;justify-content:space-between;align-items:center;max-width:100%;min-width:76px;height:36px;padding:0 6px 0 12px;outline:none;font-size:14px;background-color:#fff;border:1px solid #898989;border-radius:20px;cursor:pointer}._eJzLn:hover:not(._0vn1O){background-color:rgba(50,54,58,.08)}._eJzLn:hover:not(._0vn1O)._2SXKr{border-color:#085caf;background-color:rgba(11,110,208,.04)}._eJzLn:hover:not(._0vn1O)._2SXKr ._tezY7{color:#32363a}._eJzLn:hover:not(._0vn1O)._2SXKr ._4UyZZ{fill:#32363a}._eJzLn:hover:not(._0vn1O)._2SXKr ._OFq9t{fill:#085caf}._eJzLn:hover:not(._0vn1O)._2SXKr ._Kaj-0{background-color:rgba(11,110,208,.11)}._eJzLn:hover:not(._0vn1O)._2SXKr ._Kaj-0 ._43Ecx{color:#085caf}._eJzLn:active:not(._0vn1O){background-color:#e8e9e9}._eJzLn:active:not(._0vn1O)._2SXKr{background-color:rgba(11,110,208,.11);border-color:#0854a1}._eJzLn:active:not(._0vn1O)._2SXKr ._OFq9t{fill:#0854a1}._eJzLn:active:not(._0vn1O)._2SXKr ._Kaj-0{background-color:rgba(11,110,208,.11)}._eJzLn:active:not(._0vn1O)._2SXKr ._Kaj-0 ._43Ecx{color:#0854a1}._eJzLn._0vn1O{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._eJzLn._2SXKr{border-color:#0b6ed0}._4UyZZ{fill:#515559}._4UyZZ,._RFlF7{margin-right:4px}._tezY7{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._tezY7+._Kaj-0{margin-left:6px}._tezY7._0vn1O{color:#74777a}._Kaj-0{display:flex;justify-content:center;align-items:center;max-width:350px;flex:1;min-width:0;height:24px;margin-right:3px;padding:0 10px;background-color:#ebf3fb;border-radius:20px}._43Ecx{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._OFq9t{fill:#515559}._OFq9t._0vn1O,._OFq9t._0vn1O._2SXKr{fill:rgba(116,119,122,.4)}._OFq9t._2SXKr{fill:#0b6ed0}._OFq9t._pP69J{transform:rotate(-180deg)}._eJzLn:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3534
3533
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$f);}
|
|
3535
3534
|
|
|
3536
3535
|
const _excluded$r = ["label", "selectedFilters", "isOpen", "onClick", "onKeyDown", "isLocked", "lockedIcon", "isDisabled", "isLoading", "aria-labelledby", "loadingSpinnerAriaLabel", "className", "data-testid"];
|
|
@@ -4000,9 +3999,9 @@ const LayoutGridItem = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
4000
3999
|
});
|
|
4001
4000
|
LayoutGridItem.displayName = 'LayoutGridItem';
|
|
4002
4001
|
|
|
4003
|
-
var css_248z$e = ".
|
|
4004
|
-
var styles$8 = {"spinnerContainer":"
|
|
4005
|
-
var stylesheet$e=".
|
|
4002
|
+
var css_248z$e = "._2I-Zx{position:relative;display:inline-block}._2I-Zx._d9y3y{min-height:20px;min-width:20px}._2I-Zx._pDX0u{min-height:25px;min-width:25px}._2I-Zx._cPE9c{min-height:40px;min-width:40px}._2I-Zx._Fo-jO{min-height:64px;min-width:64px}._2I-Zx ._BlJoY{display:inline-block;background-color:initial;position:absolute;z-index:10;width:0;height:0;left:50%;bottom:50%;pointer-events:none}._2I-Zx ._BlJoY._-TKAC{display:none}._2I-Zx ._BlJoY div{position:absolute;transform:rotate(20deg)}._2I-Zx ._BlJoY div div:nth-child(-n+9){background-color:#fff;transform-origin:0 0;animation:_BlJoY .9s linear infinite}._2I-Zx ._BlJoY div div:nth-child(-n+9):after{content:\" \";display:block;position:absolute;top:5px;left:-1px;width:2px;height:10px;border-radius:20%;background:#000}._2I-Zx ._BlJoY div div:first-child{transform:rotate(20deg);animation-delay:-.8s}._2I-Zx ._BlJoY div div:nth-child(2){transform:rotate(60deg);animation-delay:-.7s}._2I-Zx ._BlJoY div div:nth-child(3){transform:rotate(100deg);animation-delay:-.6s}._2I-Zx ._BlJoY div div:nth-child(4){transform:rotate(140deg);animation-delay:-.5s}._2I-Zx ._BlJoY div div:nth-child(5){transform:rotate(180deg);animation-delay:-.4s}._2I-Zx ._BlJoY div div:nth-child(6){transform:rotate(220deg);animation-delay:-.3s}._2I-Zx ._BlJoY div div:nth-child(7){transform:rotate(260deg);animation-delay:-.2s}._2I-Zx ._BlJoY div div:nth-child(8){transform:rotate(300deg);animation-delay:-.1s}._2I-Zx ._BlJoY div div:nth-child(9){transform:rotate(340deg);animation-delay:0s}._2I-Zx ._Fo-jO div div:nth-child(-n+9):after{top:10px;left:-2px;width:4px;height:18px}._2I-Zx ._d9y3y div div:nth-child(-n+9):after{top:2px;left:-1px;width:1.5px;height:6px}._2I-Zx ._pDX0u div div:nth-child(-n+9):after{top:4px;left:-1px;width:2px;height:7px}._2I-Zx ._FYWX6 div div:nth-child(-n+9):after{background:#fff}._2I-Zx ._MHhaX{width:100%;height:100%}._2I-Zx ._MHhaX._X4msX{pointer-events:none}._2I-Zx ._MHhaX._-TKAC{opacity:0}._2I-Zx ._MHhaX._TMS1K{opacity:.8}@keyframes _BlJoY{0%{opacity:1}to{opacity:0}}";
|
|
4003
|
+
var styles$8 = {"spinnerContainer":"_2I-Zx","xs":"_d9y3y","small":"_pDX0u","medium":"_cPE9c","large":"_Fo-jO","spinnerComponent":"_BlJoY","hide":"_-TKAC","inverted":"_FYWX6","spinnerContent":"_MHhaX","disablePointerEvents":"_X4msX","fade":"_TMS1K"};
|
|
4004
|
+
var stylesheet$e="._2I-Zx{position:relative;display:inline-block}._2I-Zx._d9y3y{min-height:20px;min-width:20px}._2I-Zx._pDX0u{min-height:25px;min-width:25px}._2I-Zx._cPE9c{min-height:40px;min-width:40px}._2I-Zx._Fo-jO{min-height:64px;min-width:64px}._2I-Zx ._BlJoY{display:inline-block;background-color:initial;position:absolute;z-index:10;width:0;height:0;left:50%;bottom:50%;pointer-events:none}._2I-Zx ._BlJoY._-TKAC{display:none}._2I-Zx ._BlJoY div{position:absolute;transform:rotate(20deg)}._2I-Zx ._BlJoY div div:nth-child(-n+9){background-color:#fff;transform-origin:0 0;animation:_BlJoY .9s linear infinite}._2I-Zx ._BlJoY div div:nth-child(-n+9):after{content:\" \";display:block;position:absolute;top:5px;left:-1px;width:2px;height:10px;border-radius:20%;background:#000}._2I-Zx ._BlJoY div div:first-child{transform:rotate(20deg);animation-delay:-.8s}._2I-Zx ._BlJoY div div:nth-child(2){transform:rotate(60deg);animation-delay:-.7s}._2I-Zx ._BlJoY div div:nth-child(3){transform:rotate(100deg);animation-delay:-.6s}._2I-Zx ._BlJoY div div:nth-child(4){transform:rotate(140deg);animation-delay:-.5s}._2I-Zx ._BlJoY div div:nth-child(5){transform:rotate(180deg);animation-delay:-.4s}._2I-Zx ._BlJoY div div:nth-child(6){transform:rotate(220deg);animation-delay:-.3s}._2I-Zx ._BlJoY div div:nth-child(7){transform:rotate(260deg);animation-delay:-.2s}._2I-Zx ._BlJoY div div:nth-child(8){transform:rotate(300deg);animation-delay:-.1s}._2I-Zx ._BlJoY div div:nth-child(9){transform:rotate(340deg);animation-delay:0s}._2I-Zx ._Fo-jO div div:nth-child(-n+9):after{top:10px;left:-2px;width:4px;height:18px}._2I-Zx ._d9y3y div div:nth-child(-n+9):after{top:2px;left:-1px;width:1.5px;height:6px}._2I-Zx ._pDX0u div div:nth-child(-n+9):after{top:4px;left:-1px;width:2px;height:7px}._2I-Zx ._FYWX6 div div:nth-child(-n+9):after{background:#fff}._2I-Zx ._MHhaX{width:100%;height:100%}._2I-Zx ._MHhaX._X4msX{pointer-events:none}._2I-Zx ._MHhaX._-TKAC{opacity:0}._2I-Zx ._MHhaX._TMS1K{opacity:.8}@keyframes _BlJoY{0%{opacity:1}to{opacity:0}}";
|
|
4006
4005
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$e);}
|
|
4007
4006
|
|
|
4008
4007
|
const _excluded$p = ["background", "children", "className", "inverted", "show", "size", "role", "aria-label", "aria-labelledby", "aria-live", "aria-hidden"];
|
|
@@ -4056,19 +4055,26 @@ const LoadingSpinner = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
4056
4055
|
});
|
|
4057
4056
|
LoadingSpinner.displayName = 'LoadingSpinner';
|
|
4058
4057
|
|
|
4058
|
+
var __defProp$m = Object.defineProperty;
|
|
4059
|
+
var __name$m = (target, value) => __defProp$m(target, "name", {
|
|
4060
|
+
value,
|
|
4061
|
+
configurable: true
|
|
4062
|
+
});
|
|
4063
|
+
|
|
4059
4064
|
// src/primitive.tsx
|
|
4060
4065
|
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
4061
4066
|
function composeEventHandlers(originalEventHandler, ourEventHandler) {
|
|
4062
4067
|
let _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
4063
4068
|
_ref$checkForDefaultP = _ref.checkForDefaultPrevented,
|
|
4064
4069
|
checkForDefaultPrevented = _ref$checkForDefaultP === void 0 ? true : _ref$checkForDefaultP;
|
|
4065
|
-
return function handleEvent(event) {
|
|
4070
|
+
return /* @__PURE__ */__name$m(function handleEvent(event) {
|
|
4066
4071
|
originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
|
|
4067
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
4072
|
+
if (checkForDefaultPrevented === false || !event || !event.defaultPrevented) {
|
|
4068
4073
|
return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
|
|
4069
4074
|
}
|
|
4070
|
-
};
|
|
4075
|
+
}, "handleEvent");
|
|
4071
4076
|
}
|
|
4077
|
+
__name$m(composeEventHandlers, "composeEventHandlers");
|
|
4072
4078
|
function getOwnerWindow(element) {
|
|
4073
4079
|
var _element$ownerDocumen, _element$ownerDocumen2;
|
|
4074
4080
|
if (!canUseDOM) {
|
|
@@ -4076,6 +4082,7 @@ function getOwnerWindow(element) {
|
|
|
4076
4082
|
}
|
|
4077
4083
|
return (_element$ownerDocumen = element === null || element === void 0 || (_element$ownerDocumen2 = element.ownerDocument) === null || _element$ownerDocumen2 === void 0 ? void 0 : _element$ownerDocumen2.defaultView) !== null && _element$ownerDocumen !== void 0 ? _element$ownerDocumen : window;
|
|
4078
4084
|
}
|
|
4085
|
+
__name$m(getOwnerWindow, "getOwnerWindow");
|
|
4079
4086
|
function getOwnerDocument(element) {
|
|
4080
4087
|
var _element$ownerDocumen3;
|
|
4081
4088
|
if (!canUseDOM) {
|
|
@@ -4083,6 +4090,7 @@ function getOwnerDocument(element) {
|
|
|
4083
4090
|
}
|
|
4084
4091
|
return (_element$ownerDocumen3 = element === null || element === void 0 ? void 0 : element.ownerDocument) !== null && _element$ownerDocumen3 !== void 0 ? _element$ownerDocumen3 : document;
|
|
4085
4092
|
}
|
|
4093
|
+
__name$m(getOwnerDocument, "getOwnerDocument");
|
|
4086
4094
|
function getActiveElement(node) {
|
|
4087
4095
|
let activeDescendant = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4088
4096
|
const _getOwnerDocument = getOwnerDocument(node),
|
|
@@ -4104,18 +4112,25 @@ function getActiveElement(node) {
|
|
|
4104
4112
|
}
|
|
4105
4113
|
return activeElement;
|
|
4106
4114
|
}
|
|
4115
|
+
__name$m(getActiveElement, "getActiveElement");
|
|
4107
4116
|
function isFrame(element) {
|
|
4108
4117
|
return element.tagName === "IFRAME";
|
|
4109
4118
|
}
|
|
4119
|
+
__name$m(isFrame, "isFrame");
|
|
4110
4120
|
|
|
4111
|
-
|
|
4112
|
-
|
|
4121
|
+
var __defProp$l = Object.defineProperty;
|
|
4122
|
+
var __name$l = (target, value) => __defProp$l(target, "name", {
|
|
4123
|
+
value,
|
|
4124
|
+
configurable: true
|
|
4125
|
+
});
|
|
4126
|
+
function setRef$1(ref, value) {
|
|
4113
4127
|
if (typeof ref === "function") {
|
|
4114
4128
|
return ref(value);
|
|
4115
4129
|
} else if (ref !== null && ref !== void 0) {
|
|
4116
4130
|
ref.current = value;
|
|
4117
4131
|
}
|
|
4118
4132
|
}
|
|
4133
|
+
__name$l(setRef$1, "setRef");
|
|
4119
4134
|
function composeRefs() {
|
|
4120
4135
|
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4121
4136
|
refs[_key] = arguments[_key];
|
|
@@ -4123,7 +4138,7 @@ function composeRefs() {
|
|
|
4123
4138
|
return node => {
|
|
4124
4139
|
let hasCleanup = false;
|
|
4125
4140
|
const cleanups = refs.map(ref => {
|
|
4126
|
-
const cleanup = setRef(ref, node);
|
|
4141
|
+
const cleanup = setRef$1(ref, node);
|
|
4127
4142
|
if (!hasCleanup && typeof cleanup == "function") {
|
|
4128
4143
|
hasCleanup = true;
|
|
4129
4144
|
}
|
|
@@ -4136,25 +4151,34 @@ function composeRefs() {
|
|
|
4136
4151
|
if (typeof cleanup == "function") {
|
|
4137
4152
|
cleanup();
|
|
4138
4153
|
} else {
|
|
4139
|
-
setRef(refs[i], null);
|
|
4154
|
+
setRef$1(refs[i], null);
|
|
4140
4155
|
}
|
|
4141
4156
|
}
|
|
4142
4157
|
};
|
|
4143
4158
|
}
|
|
4144
4159
|
};
|
|
4145
4160
|
}
|
|
4161
|
+
__name$l(composeRefs, "composeRefs");
|
|
4146
4162
|
function useComposedRefs() {
|
|
4147
4163
|
for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
4148
4164
|
refs[_key2] = arguments[_key2];
|
|
4149
4165
|
}
|
|
4150
4166
|
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
4151
4167
|
}
|
|
4168
|
+
__name$l(useComposedRefs, "useComposedRefs");
|
|
4152
4169
|
|
|
4153
4170
|
const _excluded$o = ["children"],
|
|
4154
|
-
_excluded2$
|
|
4171
|
+
_excluded2$6 = ["scope", "children"];
|
|
4172
|
+
var __defProp$k = Object.defineProperty;
|
|
4173
|
+
var __name$k = (target, value) => __defProp$k(target, "name", {
|
|
4174
|
+
value,
|
|
4175
|
+
configurable: true
|
|
4176
|
+
});
|
|
4177
|
+
// @__NO_SIDE_EFFECTS__
|
|
4155
4178
|
function createContext2(rootComponentName, defaultContext) {
|
|
4156
4179
|
const Context = /*#__PURE__*/React__namespace.createContext(defaultContext);
|
|
4157
|
-
|
|
4180
|
+
Context.displayName = rootComponentName + "Context";
|
|
4181
|
+
const Provider = /* @__PURE__ */__name$k(props => {
|
|
4158
4182
|
const children = props.children,
|
|
4159
4183
|
context = _objectWithoutProperties__default["default"](props, _excluded$o);
|
|
4160
4184
|
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
@@ -4162,51 +4186,65 @@ function createContext2(rootComponentName, defaultContext) {
|
|
|
4162
4186
|
value,
|
|
4163
4187
|
children
|
|
4164
4188
|
});
|
|
4165
|
-
};
|
|
4189
|
+
}, "Provider");
|
|
4166
4190
|
Provider.displayName = rootComponentName + "Provider";
|
|
4167
4191
|
function useContext2(consumerName) {
|
|
4192
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4193
|
+
const _options$optional = options.optional,
|
|
4194
|
+
optional = _options$optional === void 0 ? false : _options$optional;
|
|
4168
4195
|
const context = React__namespace.useContext(Context);
|
|
4169
4196
|
if (context) return context;
|
|
4170
4197
|
if (defaultContext !== void 0) return defaultContext;
|
|
4198
|
+
if (optional) return void 0;
|
|
4171
4199
|
throw new Error("`".concat(consumerName, "` must be used within `").concat(rootComponentName, "`"));
|
|
4172
4200
|
}
|
|
4201
|
+
__name$k(useContext2, "useContext");
|
|
4173
4202
|
return [Provider, useContext2];
|
|
4174
4203
|
}
|
|
4204
|
+
__name$k(createContext2, "createContext");
|
|
4205
|
+
// @__NO_SIDE_EFFECTS__
|
|
4175
4206
|
function createContextScope(scopeName) {
|
|
4176
4207
|
let createContextScopeDeps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
4177
4208
|
let defaultContexts = [];
|
|
4178
4209
|
function createContext3(rootComponentName, defaultContext) {
|
|
4179
4210
|
const BaseContext = /*#__PURE__*/React__namespace.createContext(defaultContext);
|
|
4211
|
+
BaseContext.displayName = rootComponentName + "Context";
|
|
4180
4212
|
const index = defaultContexts.length;
|
|
4181
4213
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
4182
|
-
const Provider = props => {
|
|
4214
|
+
const Provider = /* @__PURE__ */__name$k(props => {
|
|
4183
4215
|
var _scope$scopeName;
|
|
4184
4216
|
const scope = props.scope,
|
|
4185
4217
|
children = props.children,
|
|
4186
|
-
context = _objectWithoutProperties__default["default"](props, _excluded2$
|
|
4218
|
+
context = _objectWithoutProperties__default["default"](props, _excluded2$6);
|
|
4187
4219
|
const Context = (scope === null || scope === void 0 || (_scope$scopeName = scope[scopeName]) === null || _scope$scopeName === void 0 ? void 0 : _scope$scopeName[index]) || BaseContext;
|
|
4188
4220
|
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
4189
4221
|
return /* @__PURE__ */React__namespace.createElement(Context.Provider, {
|
|
4190
4222
|
value,
|
|
4191
4223
|
children
|
|
4192
4224
|
});
|
|
4193
|
-
};
|
|
4225
|
+
}, "Provider");
|
|
4194
4226
|
Provider.displayName = rootComponentName + "Provider";
|
|
4195
4227
|
function useContext2(consumerName, scope) {
|
|
4196
4228
|
var _scope$scopeName2;
|
|
4229
|
+
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
4230
|
+
const _options$optional2 = options.optional,
|
|
4231
|
+
optional = _options$optional2 === void 0 ? false : _options$optional2;
|
|
4197
4232
|
const Context = (scope === null || scope === void 0 || (_scope$scopeName2 = scope[scopeName]) === null || _scope$scopeName2 === void 0 ? void 0 : _scope$scopeName2[index]) || BaseContext;
|
|
4198
4233
|
const context = React__namespace.useContext(Context);
|
|
4199
4234
|
if (context) return context;
|
|
4200
4235
|
if (defaultContext !== void 0) return defaultContext;
|
|
4236
|
+
if (optional) return void 0;
|
|
4201
4237
|
throw new Error("`".concat(consumerName, "` must be used within `").concat(rootComponentName, "`"));
|
|
4202
4238
|
}
|
|
4239
|
+
__name$k(useContext2, "useContext");
|
|
4203
4240
|
return [Provider, useContext2];
|
|
4204
4241
|
}
|
|
4205
|
-
|
|
4242
|
+
__name$k(createContext3, "createContext");
|
|
4243
|
+
const createScope = /* @__PURE__ */__name$k(() => {
|
|
4206
4244
|
const scopeContexts = defaultContexts.map(defaultContext => {
|
|
4207
4245
|
return /*#__PURE__*/React__namespace.createContext(defaultContext);
|
|
4208
4246
|
});
|
|
4209
|
-
return function useScope(scope) {
|
|
4247
|
+
return /* @__PURE__ */__name$k(function useScope(scope) {
|
|
4210
4248
|
const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
|
|
4211
4249
|
return React__namespace.useMemo(() => ({
|
|
4212
4250
|
["__scope".concat(scopeName)]: {
|
|
@@ -4214,23 +4252,24 @@ function createContextScope(scopeName) {
|
|
|
4214
4252
|
[scopeName]: contexts
|
|
4215
4253
|
}
|
|
4216
4254
|
}), [scope, contexts]);
|
|
4217
|
-
};
|
|
4218
|
-
};
|
|
4255
|
+
}, "useScope");
|
|
4256
|
+
}, "createScope");
|
|
4219
4257
|
createScope.scopeName = scopeName;
|
|
4220
4258
|
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
4221
4259
|
}
|
|
4260
|
+
__name$k(createContextScope, "createContextScope");
|
|
4222
4261
|
function composeContextScopes() {
|
|
4223
4262
|
for (var _len = arguments.length, scopes = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4224
4263
|
scopes[_key] = arguments[_key];
|
|
4225
4264
|
}
|
|
4226
4265
|
const baseScope = scopes[0];
|
|
4227
4266
|
if (scopes.length === 1) return baseScope;
|
|
4228
|
-
const createScope = () => {
|
|
4267
|
+
const createScope = /* @__PURE__ */__name$k(() => {
|
|
4229
4268
|
const scopeHooks = scopes.map(createScope2 => ({
|
|
4230
4269
|
useScope: createScope2(),
|
|
4231
4270
|
scopeName: createScope2.scopeName
|
|
4232
4271
|
}));
|
|
4233
|
-
return function useComposedScopes(overrideScopes) {
|
|
4272
|
+
return /* @__PURE__ */__name$k(function useComposedScopes(overrideScopes) {
|
|
4234
4273
|
const nextScopes = scopeHooks.reduce((nextScopes2, _ref) => {
|
|
4235
4274
|
let useScope = _ref.useScope,
|
|
4236
4275
|
scopeName = _ref.scopeName;
|
|
@@ -4244,18 +4283,26 @@ function composeContextScopes() {
|
|
|
4244
4283
|
return React__namespace.useMemo(() => ({
|
|
4245
4284
|
["__scope".concat(baseScope.scopeName)]: nextScopes
|
|
4246
4285
|
}), [nextScopes]);
|
|
4247
|
-
};
|
|
4248
|
-
};
|
|
4286
|
+
}, "useComposedScopes");
|
|
4287
|
+
}, "createScope");
|
|
4249
4288
|
createScope.scopeName = baseScope.scopeName;
|
|
4250
4289
|
return createScope;
|
|
4251
4290
|
}
|
|
4291
|
+
__name$k(composeContextScopes, "composeContextScopes");
|
|
4252
4292
|
|
|
4253
|
-
//
|
|
4293
|
+
// src/internal/is-development.false.ts
|
|
4294
|
+
var IS_DEVELOPMENT = false;
|
|
4295
|
+
|
|
4296
|
+
// src/use-layout-effect.tsx
|
|
4254
4297
|
var useLayoutEffect2 = globalThis !== null && globalThis !== void 0 && globalThis.document ? React__namespace.useLayoutEffect : () => {};
|
|
4255
4298
|
|
|
4256
|
-
|
|
4299
|
+
var __defProp$j = Object.defineProperty;
|
|
4300
|
+
var __name$j = (target, value) => __defProp$j(target, "name", {
|
|
4301
|
+
value,
|
|
4302
|
+
configurable: true
|
|
4303
|
+
});
|
|
4257
4304
|
var useReactEffectEvent = React__namespace[" useEffectEvent ".trim().toString()];
|
|
4258
|
-
var useReactInsertionEffect = React__namespace[" useInsertionEffect ".trim().toString()];
|
|
4305
|
+
var useReactInsertionEffect$1 = React__namespace[" useInsertionEffect ".trim().toString()];
|
|
4259
4306
|
function useEffectEvent(callback) {
|
|
4260
4307
|
if (typeof useReactEffectEvent === "function") {
|
|
4261
4308
|
return useReactEffectEvent(callback);
|
|
@@ -4263,8 +4310,8 @@ function useEffectEvent(callback) {
|
|
|
4263
4310
|
const ref = React__namespace.useRef(() => {
|
|
4264
4311
|
throw new Error("Cannot call an event handler while rendering.");
|
|
4265
4312
|
});
|
|
4266
|
-
if (typeof useReactInsertionEffect === "function") {
|
|
4267
|
-
useReactInsertionEffect(() => {
|
|
4313
|
+
if (typeof useReactInsertionEffect$1 === "function") {
|
|
4314
|
+
useReactInsertionEffect$1(() => {
|
|
4268
4315
|
ref.current = callback;
|
|
4269
4316
|
});
|
|
4270
4317
|
} else {
|
|
@@ -4280,13 +4327,19 @@ function useEffectEvent(callback) {
|
|
|
4280
4327
|
return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.call(ref, ...args);
|
|
4281
4328
|
}, []);
|
|
4282
4329
|
}
|
|
4330
|
+
__name$j(useEffectEvent, "useEffectEvent");
|
|
4283
4331
|
|
|
4332
|
+
var __defProp$i = Object.defineProperty;
|
|
4333
|
+
var __name$i = (target, value) => __defProp$i(target, "name", {
|
|
4334
|
+
value,
|
|
4335
|
+
configurable: true
|
|
4336
|
+
});
|
|
4284
4337
|
var useInsertionEffect = React__namespace[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
4285
4338
|
function useControllableState(_ref) {
|
|
4286
4339
|
let prop = _ref.prop,
|
|
4287
4340
|
defaultProp = _ref.defaultProp,
|
|
4288
4341
|
_ref$onChange = _ref.onChange,
|
|
4289
|
-
onChange = _ref$onChange === void 0 ? () => {} : _ref$onChange,
|
|
4342
|
+
onChange = _ref$onChange === void 0 ? /* @__PURE__ */__name$i(() => {}, "onChange") : _ref$onChange,
|
|
4290
4343
|
caller = _ref.caller;
|
|
4291
4344
|
const _useUncontrolledState = useUncontrolledState({
|
|
4292
4345
|
defaultProp,
|
|
@@ -4298,7 +4351,7 @@ function useControllableState(_ref) {
|
|
|
4298
4351
|
onChangeRef = _useUncontrolledState2[2];
|
|
4299
4352
|
const isControlled = prop !== void 0;
|
|
4300
4353
|
const value = isControlled ? prop : uncontrolledProp;
|
|
4301
|
-
if (
|
|
4354
|
+
if (IS_DEVELOPMENT) {
|
|
4302
4355
|
const isControlledRef = React__namespace.useRef(prop !== void 0);
|
|
4303
4356
|
React__namespace.useEffect(() => {
|
|
4304
4357
|
const wasControlled = isControlledRef.current;
|
|
@@ -4323,6 +4376,7 @@ function useControllableState(_ref) {
|
|
|
4323
4376
|
}, [isControlled, prop, setUncontrolledProp, onChangeRef]);
|
|
4324
4377
|
return [value, setValue];
|
|
4325
4378
|
}
|
|
4379
|
+
__name$i(useControllableState, "useControllableState");
|
|
4326
4380
|
function useUncontrolledState(_ref2) {
|
|
4327
4381
|
let defaultProp = _ref2.defaultProp,
|
|
4328
4382
|
onChange = _ref2.onChange;
|
|
@@ -4344,9 +4398,11 @@ function useUncontrolledState(_ref2) {
|
|
|
4344
4398
|
}, [value, prevValueRef]);
|
|
4345
4399
|
return [value, setValue, onChangeRef];
|
|
4346
4400
|
}
|
|
4401
|
+
__name$i(useUncontrolledState, "useUncontrolledState");
|
|
4347
4402
|
function isFunction(value) {
|
|
4348
4403
|
return typeof value === "function";
|
|
4349
4404
|
}
|
|
4405
|
+
__name$i(isFunction, "isFunction");
|
|
4350
4406
|
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
4351
4407
|
function useControllableStateReducer(reducer, userArgs, initialArg, init) {
|
|
4352
4408
|
const controlledState = userArgs.prop,
|
|
@@ -4355,7 +4411,7 @@ function useControllableStateReducer(reducer, userArgs, initialArg, init) {
|
|
|
4355
4411
|
caller = userArgs.caller;
|
|
4356
4412
|
const isControlled = controlledState !== void 0;
|
|
4357
4413
|
const onChange = useEffectEvent(onChangeProp);
|
|
4358
|
-
if (
|
|
4414
|
+
if (IS_DEVELOPMENT) {
|
|
4359
4415
|
const isControlledRef = React__namespace.useRef(controlledState !== void 0);
|
|
4360
4416
|
React__namespace.useEffect(() => {
|
|
4361
4417
|
const wasControlled = isControlledRef.current;
|
|
@@ -4399,7 +4455,7 @@ function useControllableStateReducer(reducer, userArgs, initialArg, init) {
|
|
|
4399
4455
|
onChange(uncontrolledState);
|
|
4400
4456
|
}
|
|
4401
4457
|
}
|
|
4402
|
-
}, [
|
|
4458
|
+
}, [uncontrolledState, prevValueRef, isControlled]);
|
|
4403
4459
|
const state = React__namespace.useMemo(() => {
|
|
4404
4460
|
const isControlled2 = controlledState !== void 0;
|
|
4405
4461
|
if (isControlled2) {
|
|
@@ -4420,78 +4476,85 @@ function useControllableStateReducer(reducer, userArgs, initialArg, init) {
|
|
|
4420
4476
|
}, [controlledState, internalState.state, isControlled]);
|
|
4421
4477
|
return [state, dispatch];
|
|
4422
4478
|
}
|
|
4479
|
+
__name$i(useControllableStateReducer, "useControllableStateReducer");
|
|
4423
4480
|
|
|
4424
|
-
const _excluded$n = ["children"]
|
|
4425
|
-
|
|
4481
|
+
const _excluded$n = ["children"];
|
|
4482
|
+
var __defProp$h = Object.defineProperty;
|
|
4483
|
+
var __name$h = (target, value) => __defProp$h(target, "name", {
|
|
4484
|
+
value,
|
|
4485
|
+
configurable: true
|
|
4486
|
+
});
|
|
4426
4487
|
// @__NO_SIDE_EFFECTS__
|
|
4427
4488
|
function createSlot(ownerName) {
|
|
4428
|
-
const SlotClone = /* @__PURE__ */createSlotClone(ownerName);
|
|
4429
4489
|
const Slot2 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
4430
|
-
|
|
4490
|
+
var _slottableElement$pro;
|
|
4491
|
+
let children = props.children,
|
|
4431
4492
|
slotProps = _objectWithoutProperties__default["default"](props, _excluded$n);
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4493
|
+
let slottableElement = null;
|
|
4494
|
+
let hasSlottable = false;
|
|
4495
|
+
const newChildren = [];
|
|
4496
|
+
children = useUnwrappedLazy(children);
|
|
4497
|
+
React__namespace.Children.forEach(children, maybeSlottable => {
|
|
4498
|
+
if (isSlottable(maybeSlottable)) {
|
|
4499
|
+
var _slottableElement;
|
|
4500
|
+
hasSlottable = true;
|
|
4501
|
+
const slottable = maybeSlottable;
|
|
4502
|
+
let child = "child" in slottable.props ? slottable.props.child : slottable.props.children;
|
|
4503
|
+
while (isLazyComponent(child) && typeof use === "function") {
|
|
4504
|
+
child = use(child._payload);
|
|
4442
4505
|
}
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
});
|
|
4449
|
-
}
|
|
4450
|
-
return /* @__PURE__ */React__namespace.createElement(SlotClone, {
|
|
4451
|
-
...slotProps,
|
|
4452
|
-
ref: forwardedRef,
|
|
4453
|
-
children
|
|
4506
|
+
slottableElement = getSlottableElementFromSlottable(slottable, child);
|
|
4507
|
+
newChildren.push((_slottableElement = slottableElement) === null || _slottableElement === void 0 || (_slottableElement = _slottableElement.props) === null || _slottableElement === void 0 ? void 0 : _slottableElement.children);
|
|
4508
|
+
} else {
|
|
4509
|
+
newChildren.push(maybeSlottable);
|
|
4510
|
+
}
|
|
4454
4511
|
});
|
|
4512
|
+
if (slottableElement) {
|
|
4513
|
+
slottableElement = /*#__PURE__*/React__namespace.cloneElement(slottableElement, void 0, newChildren);
|
|
4514
|
+
} else if (
|
|
4515
|
+
// A `Slottable` was found but it didn't resolve to a single element (e.g.
|
|
4516
|
+
// it wrapped multiple elements, text, or a render-prop `child` that
|
|
4517
|
+
// wasn't an element). Don't fall back to treating the `Slottable` wrapper
|
|
4518
|
+
// itself as the slot target — throw a descriptive error below instead.
|
|
4519
|
+
!hasSlottable && React__namespace.Children.count(children) === 1 && /*#__PURE__*/React__namespace.isValidElement(children)) {
|
|
4520
|
+
slottableElement = children;
|
|
4521
|
+
}
|
|
4522
|
+
const slottableElementRef = slottableElement ? getElementRef$1(slottableElement) : void 0;
|
|
4523
|
+
const composedRef = useComposedRefs(forwardedRef, slottableElementRef);
|
|
4524
|
+
if (!slottableElement) {
|
|
4525
|
+
if (children || children === 0) {
|
|
4526
|
+
throw new Error(hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName));
|
|
4527
|
+
}
|
|
4528
|
+
return children;
|
|
4529
|
+
}
|
|
4530
|
+
const mergedProps = mergeProps(slotProps, (_slottableElement$pro = slottableElement.props) !== null && _slottableElement$pro !== void 0 ? _slottableElement$pro : {});
|
|
4531
|
+
if (slottableElement.type !== React__namespace.Fragment) {
|
|
4532
|
+
mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;
|
|
4533
|
+
}
|
|
4534
|
+
return /*#__PURE__*/React__namespace.cloneElement(slottableElement, mergedProps);
|
|
4455
4535
|
});
|
|
4456
4536
|
Slot2.displayName = "".concat(ownerName, ".Slot");
|
|
4457
4537
|
return Slot2;
|
|
4458
4538
|
}
|
|
4539
|
+
__name$h(createSlot, "createSlot");
|
|
4459
4540
|
var Slot$1 = /* @__PURE__ */createSlot("Slot");
|
|
4460
|
-
|
|
4461
|
-
function createSlotClone(ownerName) {
|
|
4462
|
-
const SlotClone = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
4463
|
-
const children = props.children,
|
|
4464
|
-
slotProps = _objectWithoutProperties__default["default"](props, _excluded2$6);
|
|
4465
|
-
if (/*#__PURE__*/React__namespace.isValidElement(children)) {
|
|
4466
|
-
const childrenRef = getElementRef$1(children);
|
|
4467
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
4468
|
-
if (children.type !== React__namespace.Fragment) {
|
|
4469
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
4470
|
-
}
|
|
4471
|
-
return /*#__PURE__*/React__namespace.cloneElement(children, props2);
|
|
4472
|
-
}
|
|
4473
|
-
return React__namespace.Children.count(children) > 1 ? React__namespace.Children.only(null) : null;
|
|
4474
|
-
});
|
|
4475
|
-
SlotClone.displayName = "".concat(ownerName, ".SlotClone");
|
|
4476
|
-
return SlotClone;
|
|
4477
|
-
}
|
|
4478
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
4541
|
+
var SLOTTABLE_IDENTIFIER = Symbol.for("radix.slottable");
|
|
4479
4542
|
// @__NO_SIDE_EFFECTS__
|
|
4480
4543
|
function createSlottable(ownerName) {
|
|
4481
|
-
const Slottable2 =
|
|
4482
|
-
let children = _ref.children;
|
|
4483
|
-
return /* @__PURE__ */React__namespace.createElement(React__namespace.Fragment, {
|
|
4484
|
-
children
|
|
4485
|
-
});
|
|
4486
|
-
};
|
|
4544
|
+
const Slottable2 = /* @__PURE__ */__name$h(props => "child" in props ? props.children(props.child) : props.children, "Slottable");
|
|
4487
4545
|
Slottable2.displayName = "".concat(ownerName, ".Slottable");
|
|
4488
4546
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
4489
4547
|
return Slottable2;
|
|
4490
4548
|
}
|
|
4549
|
+
__name$h(createSlottable, "createSlottable");
|
|
4491
4550
|
var Slottable = /* @__PURE__ */createSlottable("Slottable");
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4551
|
+
var getSlottableElementFromSlottable = /* @__PURE__ */__name$h((slottable, child) => {
|
|
4552
|
+
if ("child" in slottable.props) {
|
|
4553
|
+
if (! /*#__PURE__*/React__namespace.isValidElement(child)) return null;
|
|
4554
|
+
return /*#__PURE__*/React__namespace.cloneElement(child, void 0, slottable.props.children(child.props.children));
|
|
4555
|
+
}
|
|
4556
|
+
return /*#__PURE__*/React__namespace.isValidElement(child) ? child : null;
|
|
4557
|
+
}, "getSlottableElementFromSlottable");
|
|
4495
4558
|
function mergeProps(slotProps, childProps) {
|
|
4496
4559
|
const overrideProps = {
|
|
4497
4560
|
...childProps
|
|
@@ -4517,6 +4580,8 @@ function mergeProps(slotProps, childProps) {
|
|
|
4517
4580
|
};
|
|
4518
4581
|
} else if (propName === "className") {
|
|
4519
4582
|
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
4583
|
+
} else if (propName === "aria-describedby") {
|
|
4584
|
+
overrideProps[propName] = concatAriaDescribedby(childPropValue, slotPropValue);
|
|
4520
4585
|
}
|
|
4521
4586
|
}
|
|
4522
4587
|
return {
|
|
@@ -4524,6 +4589,7 @@ function mergeProps(slotProps, childProps) {
|
|
|
4524
4589
|
...overrideProps
|
|
4525
4590
|
};
|
|
4526
4591
|
}
|
|
4592
|
+
__name$h(mergeProps, "mergeProps");
|
|
4527
4593
|
function getElementRef$1(element) {
|
|
4528
4594
|
var _Object$getOwnPropert, _Object$getOwnPropert2;
|
|
4529
4595
|
let getter = (_Object$getOwnPropert = Object.getOwnPropertyDescriptor(element.props, "ref")) === null || _Object$getOwnPropert === void 0 ? void 0 : _Object$getOwnPropert.get;
|
|
@@ -4538,8 +4604,57 @@ function getElementRef$1(element) {
|
|
|
4538
4604
|
}
|
|
4539
4605
|
return element.props.ref || element.ref;
|
|
4540
4606
|
}
|
|
4607
|
+
__name$h(getElementRef$1, "getElementRef");
|
|
4608
|
+
function isSlottable(child) {
|
|
4609
|
+
return /*#__PURE__*/React__namespace.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
4610
|
+
}
|
|
4611
|
+
__name$h(isSlottable, "isSlottable");
|
|
4612
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
4613
|
+
function isLazyComponent(element) {
|
|
4614
|
+
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
4615
|
+
}
|
|
4616
|
+
__name$h(isLazyComponent, "isLazyComponent");
|
|
4617
|
+
function isPromiseLike(value) {
|
|
4618
|
+
return typeof value === "object" && value !== null && "then" in value;
|
|
4619
|
+
}
|
|
4620
|
+
__name$h(isPromiseLike, "isPromiseLike");
|
|
4621
|
+
function useUnwrappedLazy(value) {
|
|
4622
|
+
let unwrapped = value;
|
|
4623
|
+
while (isLazyComponent(unwrapped) && typeof use === "function") {
|
|
4624
|
+
unwrapped = use(unwrapped._payload);
|
|
4625
|
+
}
|
|
4626
|
+
return unwrapped;
|
|
4627
|
+
}
|
|
4628
|
+
__name$h(useUnwrappedLazy, "useUnwrappedLazy");
|
|
4629
|
+
function concatAriaDescribedby() {
|
|
4630
|
+
const ids = /* @__PURE__ */new Set();
|
|
4631
|
+
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4632
|
+
values[_key] = arguments[_key];
|
|
4633
|
+
}
|
|
4634
|
+
for (const value of values) {
|
|
4635
|
+
if (typeof value !== "string") continue;
|
|
4636
|
+
for (const id of String(value).trim().split(/\s+/)) {
|
|
4637
|
+
if (id) ids.add(id);
|
|
4638
|
+
}
|
|
4639
|
+
}
|
|
4640
|
+
return ids.size > 0 ? Array.from(ids).join(" ") : void 0;
|
|
4641
|
+
}
|
|
4642
|
+
__name$h(concatAriaDescribedby, "concatAriaDescribedby");
|
|
4643
|
+
var createSlotError = /* @__PURE__ */__name$h(ownerName => {
|
|
4644
|
+
return "".concat(ownerName, " failed to slot onto its children. Expected a single React element child or `Slottable`.");
|
|
4645
|
+
}, "createSlotError");
|
|
4646
|
+
var createSlottableError = /* @__PURE__ */__name$h(ownerName => {
|
|
4647
|
+
return "".concat(ownerName, " failed to slot onto its `Slottable`. Expected `Slottable` to receive a single React element child.");
|
|
4648
|
+
}, "createSlottableError");
|
|
4649
|
+
var use = React__namespace[" use ".trim().toString()];
|
|
4541
4650
|
|
|
4651
|
+
"use client";
|
|
4542
4652
|
const _excluded$m = ["asChild"];
|
|
4653
|
+
var __defProp$g = Object.defineProperty;
|
|
4654
|
+
var __name$g = (target, value) => __defProp$g(target, "name", {
|
|
4655
|
+
value,
|
|
4656
|
+
configurable: true
|
|
4657
|
+
});
|
|
4543
4658
|
var NODES = ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul"];
|
|
4544
4659
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
4545
4660
|
const Slot = createSlot("Primitive.".concat(node));
|
|
@@ -4564,10 +4679,10 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
4564
4679
|
function dispatchDiscreteCustomEvent(target, event) {
|
|
4565
4680
|
if (target) ReactDOM__namespace.flushSync(() => target.dispatchEvent(event));
|
|
4566
4681
|
}
|
|
4567
|
-
|
|
4682
|
+
__name$g(dispatchDiscreteCustomEvent, "dispatchDiscreteCustomEvent");
|
|
4568
4683
|
|
|
4569
4684
|
"use client";
|
|
4570
|
-
var _keys;
|
|
4685
|
+
var _OrderedDict2, _keys;
|
|
4571
4686
|
const _excluded$l = ["scope", "children"],
|
|
4572
4687
|
_excluded2$5 = ["state"],
|
|
4573
4688
|
_excluded3$3 = ["scope", "children"];
|
|
@@ -4576,6 +4691,12 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
|
|
|
4576
4691
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
4577
4692
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
4578
4693
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
4694
|
+
var __defProp$f = Object.defineProperty;
|
|
4695
|
+
var __name$f = (target, value) => __defProp$f(target, "name", {
|
|
4696
|
+
value,
|
|
4697
|
+
configurable: true
|
|
4698
|
+
});
|
|
4699
|
+
// @__NO_SIDE_EFFECTS__
|
|
4579
4700
|
function createCollection(name) {
|
|
4580
4701
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
4581
4702
|
const _createContextScope = createContextScope(PROVIDER_NAME),
|
|
@@ -4591,27 +4712,27 @@ function createCollection(name) {
|
|
|
4591
4712
|
_createCollectionCont2 = _slicedToArray__default["default"](_createCollectionCont, 2),
|
|
4592
4713
|
CollectionProviderImpl = _createCollectionCont2[0],
|
|
4593
4714
|
useCollectionContext = _createCollectionCont2[1];
|
|
4594
|
-
const CollectionProvider = props => {
|
|
4715
|
+
const CollectionProvider = /* @__PURE__ */__name$f(props => {
|
|
4595
4716
|
const scope = props.scope,
|
|
4596
4717
|
children = props.children;
|
|
4597
|
-
const ref =
|
|
4598
|
-
const itemMap =
|
|
4599
|
-
return /* @__PURE__ */
|
|
4718
|
+
const ref = React__namespace.useRef(null);
|
|
4719
|
+
const itemMap = React__namespace.useRef(/* @__PURE__ */new Map()).current;
|
|
4720
|
+
return /* @__PURE__ */React__namespace.createElement(CollectionProviderImpl, {
|
|
4600
4721
|
scope,
|
|
4601
4722
|
itemMap,
|
|
4602
4723
|
collectionRef: ref,
|
|
4603
4724
|
children
|
|
4604
4725
|
});
|
|
4605
|
-
};
|
|
4726
|
+
}, "CollectionProvider");
|
|
4606
4727
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
4607
4728
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
4608
4729
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
4609
|
-
const CollectionSlot = /*#__PURE__*/
|
|
4730
|
+
const CollectionSlot = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
4610
4731
|
const scope = props.scope,
|
|
4611
4732
|
children = props.children;
|
|
4612
4733
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
4613
4734
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
4614
|
-
return /* @__PURE__ */
|
|
4735
|
+
return /* @__PURE__ */React__namespace.createElement(CollectionSlotImpl, {
|
|
4615
4736
|
ref: composedRefs,
|
|
4616
4737
|
children
|
|
4617
4738
|
});
|
|
@@ -4620,21 +4741,21 @@ function createCollection(name) {
|
|
|
4620
4741
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
4621
4742
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
4622
4743
|
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
4623
|
-
const CollectionItemSlot = /*#__PURE__*/
|
|
4744
|
+
const CollectionItemSlot = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
4624
4745
|
const scope = props.scope,
|
|
4625
4746
|
children = props.children,
|
|
4626
4747
|
itemData = _objectWithoutProperties__default["default"](props, _excluded$l);
|
|
4627
|
-
const ref =
|
|
4748
|
+
const ref = React__namespace.useRef(null);
|
|
4628
4749
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
4629
4750
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
4630
|
-
|
|
4751
|
+
React__namespace.useEffect(() => {
|
|
4631
4752
|
context.itemMap.set(ref, {
|
|
4632
4753
|
ref,
|
|
4633
4754
|
...itemData
|
|
4634
4755
|
});
|
|
4635
4756
|
return () => void context.itemMap.delete(ref);
|
|
4636
4757
|
});
|
|
4637
|
-
return /* @__PURE__ */
|
|
4758
|
+
return /* @__PURE__ */React__namespace.createElement(CollectionItemSlotImpl, {
|
|
4638
4759
|
...{
|
|
4639
4760
|
[ITEM_DATA_ATTR]: ""
|
|
4640
4761
|
},
|
|
@@ -4645,7 +4766,7 @@ function createCollection(name) {
|
|
|
4645
4766
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
4646
4767
|
function useCollection(scope) {
|
|
4647
4768
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
4648
|
-
const getItems =
|
|
4769
|
+
const getItems = React__namespace.useCallback(() => {
|
|
4649
4770
|
const collectionNode = context.collectionRef.current;
|
|
4650
4771
|
if (!collectionNode) return [];
|
|
4651
4772
|
const orderedNodes = Array.from(collectionNode.querySelectorAll("[".concat(ITEM_DATA_ATTR, "]")));
|
|
@@ -4655,16 +4776,18 @@ function createCollection(name) {
|
|
|
4655
4776
|
}, [context.collectionRef, context.itemMap]);
|
|
4656
4777
|
return getItems;
|
|
4657
4778
|
}
|
|
4779
|
+
__name$f(useCollection, "useCollection");
|
|
4658
4780
|
return [{
|
|
4659
4781
|
Provider: CollectionProvider,
|
|
4660
4782
|
Slot: CollectionSlot,
|
|
4661
4783
|
ItemSlot: CollectionItemSlot
|
|
4662
4784
|
}, useCollection, createCollectionScope];
|
|
4663
4785
|
}
|
|
4786
|
+
__name$f(createCollection, "createCollection");
|
|
4664
4787
|
|
|
4665
4788
|
// src/ordered-dictionary.ts
|
|
4666
4789
|
var __instanciated = /* @__PURE__ */new WeakMap();
|
|
4667
|
-
var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), class _OrderedDict extends Map {
|
|
4790
|
+
var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), _OrderedDict2 = class _OrderedDict extends Map {
|
|
4668
4791
|
constructor(entries) {
|
|
4669
4792
|
super(entries);
|
|
4670
4793
|
_classPrivateFieldInitSpec(this, _keys, void 0);
|
|
@@ -4672,54 +4795,37 @@ var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), class _OrderedDict extend
|
|
|
4672
4795
|
__instanciated.set(this, true);
|
|
4673
4796
|
}
|
|
4674
4797
|
set(key, value) {
|
|
4675
|
-
if (__instanciated.get(this)) {
|
|
4676
|
-
|
|
4677
|
-
_classPrivateFieldGet(_keys, this)[_classPrivateFieldGet(_keys, this).indexOf(key)] = key;
|
|
4678
|
-
} else {
|
|
4679
|
-
_classPrivateFieldGet(_keys, this).push(key);
|
|
4680
|
-
}
|
|
4798
|
+
if (__instanciated.get(this) && !this.has(key)) {
|
|
4799
|
+
_classPrivateFieldGet(_keys, this).push(key);
|
|
4681
4800
|
}
|
|
4682
4801
|
super.set(key, value);
|
|
4683
4802
|
return this;
|
|
4684
4803
|
}
|
|
4804
|
+
/**
|
|
4805
|
+
* Sets a key-value pair so that it ends up at the given index.
|
|
4806
|
+
* - Existing keys are moved
|
|
4807
|
+
* - Negative indices count from the end of the resulting dictionary, so
|
|
4808
|
+
* inserting at -1 makes the item the last one, -2 the second to last, etc.
|
|
4809
|
+
* - Out-of-range indices are clamped
|
|
4810
|
+
*/
|
|
4685
4811
|
insert(index, key, value) {
|
|
4686
4812
|
const has = this.has(key);
|
|
4687
|
-
const
|
|
4813
|
+
const finalSize = has ? this.size : this.size + 1;
|
|
4688
4814
|
const relativeIndex = toSafeInteger(index);
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {
|
|
4815
|
+
const targetIndex = relativeIndex >= 0 ? Math.min(relativeIndex, finalSize - 1) : Math.max(finalSize + relativeIndex, 0);
|
|
4816
|
+
if (has ? _classPrivateFieldGet(_keys, this).indexOf(key) === targetIndex : targetIndex === this.size) {
|
|
4692
4817
|
this.set(key, value);
|
|
4693
4818
|
return this;
|
|
4694
4819
|
}
|
|
4695
|
-
const
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
const
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
let nextKey = keys[i];
|
|
4705
|
-
if (keys[i] === key) {
|
|
4706
|
-
nextKey = keys[i + 1];
|
|
4707
|
-
}
|
|
4708
|
-
if (has) {
|
|
4709
|
-
this.delete(key);
|
|
4710
|
-
}
|
|
4711
|
-
nextValue = this.get(nextKey);
|
|
4712
|
-
this.set(key, value);
|
|
4713
|
-
} else {
|
|
4714
|
-
if (!shouldSkip && keys[i - 1] === key) {
|
|
4715
|
-
shouldSkip = true;
|
|
4716
|
-
}
|
|
4717
|
-
const currentKey = keys[shouldSkip ? i : i - 1];
|
|
4718
|
-
const currentValue = nextValue;
|
|
4719
|
-
nextValue = this.get(currentKey);
|
|
4720
|
-
this.delete(currentKey);
|
|
4721
|
-
this.set(currentKey, currentValue);
|
|
4722
|
-
}
|
|
4820
|
+
const keys = _classPrivateFieldGet(_keys, this).filter(existingKey => existingKey !== key);
|
|
4821
|
+
keys.splice(targetIndex, 0, key);
|
|
4822
|
+
const entries = keys.map(entryKey => [entryKey, entryKey === key ? value : this.get(entryKey)]);
|
|
4823
|
+
this.clear();
|
|
4824
|
+
for (const _ref of entries) {
|
|
4825
|
+
var _ref2 = _slicedToArray__default["default"](_ref, 2);
|
|
4826
|
+
const entryKey = _ref2[0];
|
|
4827
|
+
const entryValue = _ref2[1];
|
|
4828
|
+
this.set(entryKey, entryValue);
|
|
4723
4829
|
}
|
|
4724
4830
|
return this;
|
|
4725
4831
|
}
|
|
@@ -4743,7 +4849,9 @@ var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), class _OrderedDict extend
|
|
|
4743
4849
|
if (index === -1) {
|
|
4744
4850
|
return this;
|
|
4745
4851
|
}
|
|
4746
|
-
|
|
4852
|
+
const currentIndex = _classPrivateFieldGet(_keys, this).indexOf(newKey);
|
|
4853
|
+
const targetIndex = currentIndex !== -1 && currentIndex < index ? index - 1 : index;
|
|
4854
|
+
return this.insert(targetIndex, newKey, value);
|
|
4747
4855
|
}
|
|
4748
4856
|
after(key) {
|
|
4749
4857
|
let index = _classPrivateFieldGet(_keys, this).indexOf(key);
|
|
@@ -4761,7 +4869,9 @@ var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), class _OrderedDict extend
|
|
|
4761
4869
|
if (index === -1) {
|
|
4762
4870
|
return this;
|
|
4763
4871
|
}
|
|
4764
|
-
|
|
4872
|
+
const currentIndex = _classPrivateFieldGet(_keys, this).indexOf(newKey);
|
|
4873
|
+
const targetIndex = currentIndex !== -1 && currentIndex <= index ? index : index + 1;
|
|
4874
|
+
return this.insert(targetIndex, newKey, value);
|
|
4765
4875
|
}
|
|
4766
4876
|
first() {
|
|
4767
4877
|
return this.entryAt(0);
|
|
@@ -4871,10 +4981,14 @@ var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), class _OrderedDict extend
|
|
|
4871
4981
|
}
|
|
4872
4982
|
const callbackfn = args[0],
|
|
4873
4983
|
initialValue = args[1];
|
|
4984
|
+
const hasInitialValue = args.length > 1;
|
|
4985
|
+
if (!hasInitialValue && this.size === 0) {
|
|
4986
|
+
throw new TypeError("Reduce of empty OrderedDict with no initial value");
|
|
4987
|
+
}
|
|
4874
4988
|
let index = 0;
|
|
4875
|
-
let accumulator = initialValue
|
|
4989
|
+
let accumulator = initialValue;
|
|
4876
4990
|
for (const entry of this) {
|
|
4877
|
-
if (index === 0 &&
|
|
4991
|
+
if (index === 0 && !hasInitialValue) {
|
|
4878
4992
|
accumulator = entry;
|
|
4879
4993
|
} else {
|
|
4880
4994
|
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);
|
|
@@ -4889,10 +5003,14 @@ var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), class _OrderedDict extend
|
|
|
4889
5003
|
}
|
|
4890
5004
|
const callbackfn = args[0],
|
|
4891
5005
|
initialValue = args[1];
|
|
4892
|
-
|
|
5006
|
+
const hasInitialValue = args.length > 1;
|
|
5007
|
+
if (!hasInitialValue && this.size === 0) {
|
|
5008
|
+
throw new TypeError("Reduce of empty OrderedDict with no initial value");
|
|
5009
|
+
}
|
|
5010
|
+
let accumulator = initialValue;
|
|
4893
5011
|
for (let index = this.size - 1; index >= 0; index--) {
|
|
4894
|
-
const entry = this.
|
|
4895
|
-
if (index === this.size - 1 &&
|
|
5012
|
+
const entry = this.entryAt(index);
|
|
5013
|
+
if (index === this.size - 1 && !hasInitialValue) {
|
|
4896
5014
|
accumulator = entry;
|
|
4897
5015
|
} else {
|
|
4898
5016
|
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);
|
|
@@ -4900,7 +5018,39 @@ var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), class _OrderedDict extend
|
|
|
4900
5018
|
}
|
|
4901
5019
|
return accumulator;
|
|
4902
5020
|
}
|
|
5021
|
+
/**
|
|
5022
|
+
* Sorts the dictionary in place. This method mutates the dictionary and
|
|
5023
|
+
* returns a reference to the same object
|
|
5024
|
+
*
|
|
5025
|
+
* @param compareFn Function used to determine the order of the elements. It
|
|
5026
|
+
* is expected to return a negative value if the first argument is less than
|
|
5027
|
+
* the second argument, zero if they're equal, and a positive value otherwise.
|
|
5028
|
+
*/
|
|
5029
|
+
sort(compareFn) {
|
|
5030
|
+
if (typeof compareFn !== "function") {
|
|
5031
|
+
throw new TypeError("OrderedDict.sort requires a compare function");
|
|
5032
|
+
}
|
|
5033
|
+
const entries = [...this.entries()].sort(compareFn);
|
|
5034
|
+
this.clear();
|
|
5035
|
+
for (const _ref3 of entries) {
|
|
5036
|
+
var _ref4 = _slicedToArray__default["default"](_ref3, 2);
|
|
5037
|
+
const key = _ref4[0];
|
|
5038
|
+
const value = _ref4[1];
|
|
5039
|
+
this.set(key, value);
|
|
5040
|
+
}
|
|
5041
|
+
return this;
|
|
5042
|
+
}
|
|
5043
|
+
/**
|
|
5044
|
+
* Returns a copy of the dictionary with its elements sorted.
|
|
5045
|
+
*
|
|
5046
|
+
* @param compareFn Function used to determine the order of the elements. It
|
|
5047
|
+
* is expected to return a negative value if the first argument is less than
|
|
5048
|
+
* the second argument, zero if they're equal, and a positive value otherwise.
|
|
5049
|
+
*/
|
|
4903
5050
|
toSorted(compareFn) {
|
|
5051
|
+
if (typeof compareFn !== "function") {
|
|
5052
|
+
throw new TypeError("OrderedDict.toSorted requires a compare function");
|
|
5053
|
+
}
|
|
4904
5054
|
const entries = [...this.entries()].sort(compareFn);
|
|
4905
5055
|
return new _OrderedDict(entries);
|
|
4906
5056
|
}
|
|
@@ -4920,20 +5070,8 @@ var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), class _OrderedDict extend
|
|
|
4920
5070
|
}
|
|
4921
5071
|
slice(start, end) {
|
|
4922
5072
|
const result = new _OrderedDict();
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
return result;
|
|
4926
|
-
}
|
|
4927
|
-
if (start < 0) {
|
|
4928
|
-
start = start + this.size;
|
|
4929
|
-
}
|
|
4930
|
-
if (end !== void 0 && end > 0) {
|
|
4931
|
-
stop = end - 1;
|
|
4932
|
-
}
|
|
4933
|
-
for (let index = start; index <= stop; index++) {
|
|
4934
|
-
const key = this.keyAt(index);
|
|
4935
|
-
const element = this.get(key);
|
|
4936
|
-
result.set(key, element);
|
|
5073
|
+
for (const key of _classPrivateFieldGet(_keys, this).slice(start, end)) {
|
|
5074
|
+
result.set(key, this.get(key));
|
|
4937
5075
|
}
|
|
4938
5076
|
return result;
|
|
4939
5077
|
}
|
|
@@ -4957,7 +5095,7 @@ var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), class _OrderedDict extend
|
|
|
4957
5095
|
}
|
|
4958
5096
|
return false;
|
|
4959
5097
|
}
|
|
4960
|
-
});
|
|
5098
|
+
}, __name$f(_OrderedDict2, "OrderedDict"), _OrderedDict2);
|
|
4961
5099
|
function at(array, index) {
|
|
4962
5100
|
if ("at" in Array.prototype) {
|
|
4963
5101
|
return Array.prototype.at.call(array, index);
|
|
@@ -4965,73 +5103,93 @@ function at(array, index) {
|
|
|
4965
5103
|
const actualIndex = toSafeIndex(array, index);
|
|
4966
5104
|
return actualIndex === -1 ? void 0 : array[actualIndex];
|
|
4967
5105
|
}
|
|
5106
|
+
__name$f(at, "at");
|
|
4968
5107
|
function toSafeIndex(array, index) {
|
|
4969
5108
|
const length = array.length;
|
|
4970
5109
|
const relativeIndex = toSafeInteger(index);
|
|
4971
5110
|
const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;
|
|
4972
5111
|
return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;
|
|
4973
5112
|
}
|
|
5113
|
+
__name$f(toSafeIndex, "toSafeIndex");
|
|
4974
5114
|
function toSafeInteger(number) {
|
|
4975
5115
|
return number !== number || number === 0 ? 0 : Math.trunc(number);
|
|
4976
5116
|
}
|
|
5117
|
+
__name$f(toSafeInteger, "toSafeInteger");
|
|
4977
5118
|
|
|
4978
5119
|
// src/collection.tsx
|
|
4979
5120
|
|
|
5121
|
+
// @__NO_SIDE_EFFECTS__
|
|
4980
5122
|
function createCollection2(name) {
|
|
4981
5123
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
4982
5124
|
const _createContextScope3 = createContextScope(PROVIDER_NAME),
|
|
4983
5125
|
_createContextScope4 = _slicedToArray__default["default"](_createContextScope3, 2),
|
|
4984
5126
|
createCollectionContext = _createContextScope4[0],
|
|
4985
5127
|
createCollectionScope = _createContextScope4[1];
|
|
4986
|
-
const _createCollectionCont3 = createCollectionContext(PROVIDER_NAME,
|
|
4987
|
-
collectionElement: null,
|
|
4988
|
-
collectionRef: {
|
|
4989
|
-
current: null
|
|
4990
|
-
},
|
|
4991
|
-
collectionRefObject: {
|
|
4992
|
-
current: null
|
|
4993
|
-
},
|
|
4994
|
-
itemMap: new OrderedDict(),
|
|
4995
|
-
setItemMap: () => void 0
|
|
4996
|
-
}),
|
|
5128
|
+
const _createCollectionCont3 = createCollectionContext(PROVIDER_NAME),
|
|
4997
5129
|
_createCollectionCont4 = _slicedToArray__default["default"](_createCollectionCont3, 2),
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5130
|
+
CollectionStableContextProvider = _createCollectionCont4[0],
|
|
5131
|
+
useStableCollectionContext = _createCollectionCont4[1];
|
|
5132
|
+
CollectionStableContextProvider.displayName = name + "CollectionStableContextProvider";
|
|
5133
|
+
const _createCollectionCont5 = createCollectionContext(PROVIDER_NAME),
|
|
5134
|
+
_createCollectionCont6 = _slicedToArray__default["default"](_createCollectionCont5, 2),
|
|
5135
|
+
CollectionStatefulContextProvider = _createCollectionCont6[0],
|
|
5136
|
+
useStatefulCollectionContext = _createCollectionCont6[1];
|
|
5137
|
+
CollectionStatefulContextProvider.displayName = name + "CollectionStatefulContextProvider";
|
|
5138
|
+
const CollectionProvider = /* @__PURE__ */__name$f(_ref5 => {
|
|
5139
|
+
let state = _ref5.state,
|
|
5140
|
+
props = _objectWithoutProperties__default["default"](_ref5, _excluded2$5);
|
|
5141
|
+
return state ? /* @__PURE__ */React__namespace.createElement(CollectionProviderImpl, {
|
|
5004
5142
|
...props,
|
|
5005
5143
|
state
|
|
5006
|
-
}) : /* @__PURE__ */
|
|
5144
|
+
}) : /* @__PURE__ */React__namespace.createElement(CollectionInit, {
|
|
5007
5145
|
...props
|
|
5008
5146
|
});
|
|
5009
|
-
};
|
|
5147
|
+
}, "CollectionProvider");
|
|
5010
5148
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
5011
|
-
const CollectionInit = props => {
|
|
5149
|
+
const CollectionInit = /* @__PURE__ */__name$f(props => {
|
|
5012
5150
|
const state = useInitCollection();
|
|
5013
|
-
return /* @__PURE__ */
|
|
5151
|
+
return /* @__PURE__ */React__namespace.createElement(CollectionProviderImpl, {
|
|
5014
5152
|
...props,
|
|
5015
5153
|
state
|
|
5016
5154
|
});
|
|
5017
|
-
};
|
|
5018
|
-
CollectionInit.displayName =
|
|
5019
|
-
const CollectionProviderImpl = props => {
|
|
5155
|
+
}, "CollectionInit");
|
|
5156
|
+
CollectionInit.displayName = name + "CollectionInit";
|
|
5157
|
+
const CollectionProviderImpl = /* @__PURE__ */__name$f(props => {
|
|
5020
5158
|
const scope = props.scope,
|
|
5021
5159
|
children = props.children,
|
|
5022
5160
|
state = props.state;
|
|
5023
|
-
const ref =
|
|
5024
|
-
const _React2$useState =
|
|
5161
|
+
const ref = React__namespace.useRef(null);
|
|
5162
|
+
const _React2$useState = React__namespace.useState(null),
|
|
5025
5163
|
_React2$useState2 = _slicedToArray__default["default"](_React2$useState, 2),
|
|
5026
5164
|
collectionElement = _React2$useState2[0],
|
|
5027
5165
|
setCollectionElement = _React2$useState2[1];
|
|
5028
5166
|
const composeRefs = useComposedRefs(ref, setCollectionElement);
|
|
5029
5167
|
const _state = _slicedToArray__default["default"](state, 2),
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
const
|
|
5168
|
+
collection = _state[0],
|
|
5169
|
+
setCollection = _state[1];
|
|
5170
|
+
const registryRef = React__namespace.useRef(new OrderedDict());
|
|
5171
|
+
const getCollection = React__namespace.useCallback(() => {
|
|
5172
|
+
const registry = registryRef.current;
|
|
5173
|
+
if (!isInDocumentOrder(registry)) {
|
|
5174
|
+
registry.sort(sortByDocumentPosition);
|
|
5175
|
+
}
|
|
5176
|
+
return registry;
|
|
5177
|
+
}, []);
|
|
5178
|
+
React__namespace.useEffect(() => {
|
|
5179
|
+
if (!collectionElement) {
|
|
5180
|
+
return;
|
|
5181
|
+
}
|
|
5182
|
+
const observer = getChildListObserver(() => {
|
|
5183
|
+
setCollection(map => {
|
|
5184
|
+
const sorted = map.toSorted(sortByDocumentPosition);
|
|
5185
|
+
const orderChanged = sorted.some((_ref6, index) => {
|
|
5186
|
+
let _ref7 = _slicedToArray__default["default"](_ref6, 1),
|
|
5187
|
+
key = _ref7[0];
|
|
5188
|
+
return map.keyAt(index) !== key;
|
|
5189
|
+
});
|
|
5190
|
+
return orderChanged ? sorted : map;
|
|
5191
|
+
});
|
|
5192
|
+
});
|
|
5035
5193
|
observer.observe(collectionElement, {
|
|
5036
5194
|
childList: true,
|
|
5037
5195
|
subtree: true
|
|
@@ -5039,26 +5197,31 @@ function createCollection2(name) {
|
|
|
5039
5197
|
return () => {
|
|
5040
5198
|
observer.disconnect();
|
|
5041
5199
|
};
|
|
5042
|
-
}, [collectionElement]);
|
|
5043
|
-
return /* @__PURE__ */
|
|
5200
|
+
}, [collectionElement, setCollection]);
|
|
5201
|
+
return /* @__PURE__ */React__namespace.createElement(CollectionStableContextProvider, {
|
|
5044
5202
|
scope,
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
children
|
|
5203
|
+
collectionElementRef: composeRefs,
|
|
5204
|
+
collectionElementRefObject: ref,
|
|
5205
|
+
getCollection,
|
|
5206
|
+
setCollection,
|
|
5207
|
+
registryRef,
|
|
5208
|
+
children: /* @__PURE__ */React__namespace.createElement(CollectionStatefulContextProvider, {
|
|
5209
|
+
scope,
|
|
5210
|
+
collectionElement,
|
|
5211
|
+
collection,
|
|
5212
|
+
children
|
|
5213
|
+
})
|
|
5051
5214
|
});
|
|
5052
|
-
};
|
|
5053
|
-
CollectionProviderImpl.displayName =
|
|
5215
|
+
}, "CollectionProviderImpl");
|
|
5216
|
+
CollectionProviderImpl.displayName = name + "CollectionProviderImpl";
|
|
5054
5217
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
5055
5218
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
5056
|
-
const CollectionSlot = /*#__PURE__*/
|
|
5219
|
+
const CollectionSlot = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
5057
5220
|
const scope = props.scope,
|
|
5058
5221
|
children = props.children;
|
|
5059
|
-
const context =
|
|
5060
|
-
const composedRefs = useComposedRefs(forwardedRef, context.
|
|
5061
|
-
return /* @__PURE__ */
|
|
5222
|
+
const context = useStableCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
5223
|
+
const composedRefs = useComposedRefs(forwardedRef, context.collectionElementRef);
|
|
5224
|
+
return /* @__PURE__ */React__namespace.createElement(CollectionSlotImpl, {
|
|
5062
5225
|
ref: composedRefs,
|
|
5063
5226
|
children
|
|
5064
5227
|
});
|
|
@@ -5067,52 +5230,85 @@ function createCollection2(name) {
|
|
|
5067
5230
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
5068
5231
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
5069
5232
|
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
5070
|
-
const CollectionItemSlot = /*#__PURE__*/
|
|
5233
|
+
const CollectionItemSlot = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
5071
5234
|
const scope = props.scope,
|
|
5072
5235
|
children = props.children,
|
|
5073
5236
|
itemData = _objectWithoutProperties__default["default"](props, _excluded3$3);
|
|
5074
|
-
const ref =
|
|
5075
|
-
const
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
const composedRefs = useComposedRefs(forwardedRef, ref, setElement);
|
|
5080
|
-
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
5081
|
-
const setItemMap = context.setItemMap;
|
|
5082
|
-
const itemDataRef = React__default["default"].useRef(itemData);
|
|
5237
|
+
const ref = React__namespace.useRef(null);
|
|
5238
|
+
const context = useStableCollectionContext(ITEM_SLOT_NAME, scope);
|
|
5239
|
+
const setCollection = context.setCollection,
|
|
5240
|
+
registryRef = context.registryRef;
|
|
5241
|
+
const itemDataRef = React__namespace.useRef(itemData);
|
|
5083
5242
|
if (!shallowEqual(itemDataRef.current, itemData)) {
|
|
5084
5243
|
itemDataRef.current = itemData;
|
|
5085
5244
|
}
|
|
5086
5245
|
const memoizedItemData = itemDataRef.current;
|
|
5087
|
-
|
|
5088
|
-
const
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5246
|
+
const registerElement = React__namespace.useCallback(node => {
|
|
5247
|
+
const registry = registryRef.current;
|
|
5248
|
+
if (node) {
|
|
5249
|
+
registry.set(node, {
|
|
5250
|
+
...itemDataRef.current,
|
|
5251
|
+
element: node
|
|
5252
|
+
});
|
|
5253
|
+
} else if (ref.current) {
|
|
5254
|
+
registry.delete(ref.current);
|
|
5255
|
+
}
|
|
5256
|
+
}, [registryRef]);
|
|
5257
|
+
const composedRefs = useComposedRefs(forwardedRef, registerElement, ref);
|
|
5258
|
+
useLayoutEffect2(() => {
|
|
5259
|
+
const node = ref.current;
|
|
5260
|
+
const registry = registryRef.current;
|
|
5261
|
+
if (node && registry.has(node)) {
|
|
5262
|
+
registry.set(node, {
|
|
5263
|
+
...memoizedItemData,
|
|
5264
|
+
element: node
|
|
5265
|
+
});
|
|
5266
|
+
}
|
|
5267
|
+
}, [memoizedItemData, registryRef]);
|
|
5268
|
+
const registeredRef = React__namespace.useRef(null);
|
|
5269
|
+
React__namespace.useEffect(() => {
|
|
5270
|
+
var _registered$element;
|
|
5271
|
+
const element = ref.current;
|
|
5272
|
+
const registered = registeredRef.current;
|
|
5273
|
+
if (((_registered$element = registered === null || registered === void 0 ? void 0 : registered.element) !== null && _registered$element !== void 0 ? _registered$element : null) === element && (!element || (registered === null || registered === void 0 ? void 0 : registered.itemData) === memoizedItemData)) {
|
|
5274
|
+
return;
|
|
5275
|
+
}
|
|
5276
|
+
registeredRef.current = element ? {
|
|
5277
|
+
element,
|
|
5278
|
+
itemData: memoizedItemData
|
|
5279
|
+
} : null;
|
|
5280
|
+
setCollection(map => {
|
|
5281
|
+
const next = new OrderedDict(map);
|
|
5282
|
+
if (registered && registered.element !== element) {
|
|
5283
|
+
next.delete(registered.element);
|
|
5092
5284
|
}
|
|
5093
|
-
if (
|
|
5094
|
-
|
|
5095
|
-
...
|
|
5285
|
+
if (element) {
|
|
5286
|
+
next.set(element, {
|
|
5287
|
+
...memoizedItemData,
|
|
5096
5288
|
element
|
|
5097
5289
|
});
|
|
5098
|
-
return map.toSorted(sortByDocumentPosition);
|
|
5099
5290
|
}
|
|
5100
|
-
return
|
|
5101
|
-
...itemData2,
|
|
5102
|
-
element
|
|
5103
|
-
}).toSorted(sortByDocumentPosition);
|
|
5291
|
+
return next.sort(sortByDocumentPosition);
|
|
5104
5292
|
});
|
|
5293
|
+
});
|
|
5294
|
+
React__namespace.useEffect(() => {
|
|
5105
5295
|
return () => {
|
|
5106
|
-
|
|
5107
|
-
|
|
5296
|
+
const registered = registeredRef.current;
|
|
5297
|
+
registeredRef.current = null;
|
|
5298
|
+
if (!registered) {
|
|
5299
|
+
return;
|
|
5300
|
+
}
|
|
5301
|
+
setCollection(map => {
|
|
5302
|
+
if (!map.has(registered.element)) {
|
|
5108
5303
|
return map;
|
|
5109
5304
|
}
|
|
5110
|
-
map
|
|
5111
|
-
|
|
5305
|
+
const next = new OrderedDict(map);
|
|
5306
|
+
next.delete(registered.element);
|
|
5307
|
+
return next;
|
|
5112
5308
|
});
|
|
5113
5309
|
};
|
|
5114
|
-
}, [
|
|
5115
|
-
return /* @__PURE__ */
|
|
5310
|
+
}, [setCollection]);
|
|
5311
|
+
return /* @__PURE__ */React__namespace.createElement(CollectionItemSlotImpl, {
|
|
5116
5312
|
...{
|
|
5117
5313
|
[ITEM_DATA_ATTR]: ""
|
|
5118
5314
|
},
|
|
@@ -5122,16 +5318,25 @@ function createCollection2(name) {
|
|
|
5122
5318
|
});
|
|
5123
5319
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
5124
5320
|
function useInitCollection() {
|
|
5125
|
-
return
|
|
5321
|
+
return React__namespace.useState(new OrderedDict());
|
|
5126
5322
|
}
|
|
5323
|
+
__name$f(useInitCollection, "useInitCollection");
|
|
5127
5324
|
function useCollection(scope) {
|
|
5128
|
-
const
|
|
5129
|
-
|
|
5130
|
-
return
|
|
5325
|
+
const _useStatefulCollectio = useStatefulCollectionContext(name + "CollectionConsumer", scope),
|
|
5326
|
+
collection = _useStatefulCollectio.collection;
|
|
5327
|
+
return collection;
|
|
5328
|
+
}
|
|
5329
|
+
__name$f(useCollection, "useCollection");
|
|
5330
|
+
function useGetCollection(scope) {
|
|
5331
|
+
const _useStableCollectionC = useStableCollectionContext(name + "CollectionConsumer", scope),
|
|
5332
|
+
getCollection = _useStableCollectionC.getCollection;
|
|
5333
|
+
return getCollection;
|
|
5131
5334
|
}
|
|
5335
|
+
__name$f(useGetCollection, "useGetCollection");
|
|
5132
5336
|
const functions = {
|
|
5133
5337
|
createCollectionScope,
|
|
5134
5338
|
useCollection,
|
|
5339
|
+
useGetCollection,
|
|
5135
5340
|
useInitCollection
|
|
5136
5341
|
};
|
|
5137
5342
|
return [{
|
|
@@ -5140,6 +5345,7 @@ function createCollection2(name) {
|
|
|
5140
5345
|
ItemSlot: CollectionItemSlot
|
|
5141
5346
|
}, functions];
|
|
5142
5347
|
}
|
|
5348
|
+
__name$f(createCollection2, "createCollection");
|
|
5143
5349
|
function shallowEqual(a, b) {
|
|
5144
5350
|
if (a === b) return true;
|
|
5145
5351
|
if (typeof a !== "object" || typeof b !== "object") return false;
|
|
@@ -5153,12 +5359,29 @@ function shallowEqual(a, b) {
|
|
|
5153
5359
|
}
|
|
5154
5360
|
return true;
|
|
5155
5361
|
}
|
|
5362
|
+
__name$f(shallowEqual, "shallowEqual");
|
|
5156
5363
|
function isElementPreceding(a, b) {
|
|
5157
5364
|
return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);
|
|
5158
5365
|
}
|
|
5366
|
+
__name$f(isElementPreceding, "isElementPreceding");
|
|
5367
|
+
function isInDocumentOrder(dict) {
|
|
5368
|
+
let previous;
|
|
5369
|
+
for (const element of dict.keys()) {
|
|
5370
|
+
if (previous) {
|
|
5371
|
+
const position = previous.compareDocumentPosition(element);
|
|
5372
|
+
if (!(position & Node.DOCUMENT_POSITION_DISCONNECTED) && position & Node.DOCUMENT_POSITION_PRECEDING) {
|
|
5373
|
+
return false;
|
|
5374
|
+
}
|
|
5375
|
+
}
|
|
5376
|
+
previous = element;
|
|
5377
|
+
}
|
|
5378
|
+
return true;
|
|
5379
|
+
}
|
|
5380
|
+
__name$f(isInDocumentOrder, "isInDocumentOrder");
|
|
5159
5381
|
function sortByDocumentPosition(a, b) {
|
|
5160
5382
|
return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;
|
|
5161
5383
|
}
|
|
5384
|
+
__name$f(sortByDocumentPosition, "sortByDocumentPosition");
|
|
5162
5385
|
function getChildListObserver(callback) {
|
|
5163
5386
|
const observer = new MutationObserver(mutationsList => {
|
|
5164
5387
|
for (const mutation of mutationsList) {
|
|
@@ -5170,29 +5393,51 @@ function getChildListObserver(callback) {
|
|
|
5170
5393
|
});
|
|
5171
5394
|
return observer;
|
|
5172
5395
|
}
|
|
5396
|
+
__name$f(getChildListObserver, "getChildListObserver");
|
|
5397
|
+
|
|
5398
|
+
"use client";
|
|
5173
5399
|
|
|
5174
|
-
|
|
5400
|
+
var __defProp$e = Object.defineProperty;
|
|
5401
|
+
var __name$e = (target, value) => __defProp$e(target, "name", {
|
|
5402
|
+
value,
|
|
5403
|
+
configurable: true
|
|
5404
|
+
});
|
|
5405
|
+
var Direction$2 = {
|
|
5406
|
+
LTR: "ltr",
|
|
5407
|
+
RTL: "rtl"
|
|
5408
|
+
};
|
|
5175
5409
|
var DirectionContext = /*#__PURE__*/React__namespace.createContext(void 0);
|
|
5176
|
-
var DirectionProvider = props => {
|
|
5410
|
+
var DirectionProvider = /* @__PURE__ */__name$e(props => {
|
|
5177
5411
|
const dir = props.dir,
|
|
5178
5412
|
children = props.children;
|
|
5179
5413
|
return /* @__PURE__ */React__namespace.createElement(DirectionContext.Provider, {
|
|
5180
5414
|
value: dir,
|
|
5181
5415
|
children
|
|
5182
5416
|
});
|
|
5183
|
-
};
|
|
5417
|
+
}, "DirectionProvider");
|
|
5184
5418
|
function useDirection(localDir) {
|
|
5185
5419
|
const globalDir = React__namespace.useContext(DirectionContext);
|
|
5186
|
-
return localDir || globalDir ||
|
|
5420
|
+
return localDir || globalDir || Direction$2.LTR;
|
|
5187
5421
|
}
|
|
5188
|
-
|
|
5422
|
+
__name$e(useDirection, "useDirection");
|
|
5189
5423
|
|
|
5190
|
-
|
|
5424
|
+
var __defProp$d = Object.defineProperty;
|
|
5425
|
+
var __name$d = (target, value) => __defProp$d(target, "name", {
|
|
5426
|
+
value,
|
|
5427
|
+
configurable: true
|
|
5428
|
+
});
|
|
5429
|
+
var useReactInsertionEffect = React__namespace[" useInsertionEffect ".trim().toString()];
|
|
5191
5430
|
function useCallbackRef$1(callback) {
|
|
5192
5431
|
const callbackRef = React__namespace.useRef(callback);
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5432
|
+
if (typeof useReactInsertionEffect === "function") {
|
|
5433
|
+
useReactInsertionEffect(() => {
|
|
5434
|
+
callbackRef.current = callback;
|
|
5435
|
+
});
|
|
5436
|
+
} else {
|
|
5437
|
+
useLayoutEffect2(() => {
|
|
5438
|
+
callbackRef.current = callback;
|
|
5439
|
+
});
|
|
5440
|
+
}
|
|
5196
5441
|
return React__namespace.useMemo(() => function () {
|
|
5197
5442
|
var _callbackRef$current;
|
|
5198
5443
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -5201,29 +5446,15 @@ function useCallbackRef$1(callback) {
|
|
|
5201
5446
|
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
5202
5447
|
}, []);
|
|
5203
5448
|
}
|
|
5204
|
-
|
|
5205
|
-
// packages/react/use-escape-keydown/src/use-escape-keydown.tsx
|
|
5206
|
-
function useEscapeKeydown(onEscapeKeyDownProp) {
|
|
5207
|
-
let ownerDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
|
|
5208
|
-
const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
|
|
5209
|
-
React__namespace.useEffect(() => {
|
|
5210
|
-
const handleKeyDown = event => {
|
|
5211
|
-
if (event.key === "Escape") {
|
|
5212
|
-
onEscapeKeyDown(event);
|
|
5213
|
-
}
|
|
5214
|
-
};
|
|
5215
|
-
ownerDocument.addEventListener("keydown", handleKeyDown, {
|
|
5216
|
-
capture: true
|
|
5217
|
-
});
|
|
5218
|
-
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, {
|
|
5219
|
-
capture: true
|
|
5220
|
-
});
|
|
5221
|
-
}, [onEscapeKeyDown, ownerDocument]);
|
|
5222
|
-
}
|
|
5449
|
+
__name$d(useCallbackRef$1, "useCallbackRef");
|
|
5223
5450
|
|
|
5224
5451
|
"use client";
|
|
5225
|
-
const _excluded$k = ["disableOutsidePointerEvents", "onEscapeKeyDown", "onPointerDownOutside", "onFocusOutside", "onInteractOutside", "onDismiss"];
|
|
5226
|
-
var
|
|
5452
|
+
const _excluded$k = ["disableOutsidePointerEvents", "deferPointerDownOutside", "onEscapeKeyDown", "onPointerDownOutside", "onFocusOutside", "onInteractOutside", "onDismiss"];
|
|
5453
|
+
var __defProp$c = Object.defineProperty;
|
|
5454
|
+
var __name$c = (target, value) => __defProp$c(target, "name", {
|
|
5455
|
+
value,
|
|
5456
|
+
configurable: true
|
|
5457
|
+
});
|
|
5227
5458
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
5228
5459
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
5229
5460
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
@@ -5231,12 +5462,23 @@ var originalBodyPointerEvents;
|
|
|
5231
5462
|
var DismissableLayerContext = /*#__PURE__*/React__namespace.createContext({
|
|
5232
5463
|
layers: /* @__PURE__ */new Set(),
|
|
5233
5464
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */new Set(),
|
|
5234
|
-
branches: /* @__PURE__ */new Set()
|
|
5465
|
+
branches: /* @__PURE__ */new Set(),
|
|
5466
|
+
// Outside elements that belong to a layer's own dismiss affordance (eg, a
|
|
5467
|
+
// dialog overlay). Pressing them should dismiss the layer regardless of
|
|
5468
|
+
// whether or not they stop propagation.
|
|
5469
|
+
//
|
|
5470
|
+
// See https://github.com/radix-ui/primitives/issues/3346
|
|
5471
|
+
dismissableSurfaces: /* @__PURE__ */new Set()
|
|
5235
5472
|
});
|
|
5236
|
-
var DismissableLayer =
|
|
5473
|
+
var DismissableLayer = /* @__PURE__ */React__namespace.forwardRef(
|
|
5474
|
+
// blank line to reduce diff noise
|
|
5475
|
+
/* @__PURE__ */
|
|
5476
|
+
__name$c(function DismissableLayer2(props, forwardedRef) {
|
|
5237
5477
|
var _node$ownerDocument;
|
|
5238
5478
|
const _props$disableOutside = props.disableOutsidePointerEvents,
|
|
5239
5479
|
disableOutsidePointerEvents = _props$disableOutside === void 0 ? false : _props$disableOutside,
|
|
5480
|
+
_props$deferPointerDo = props.deferPointerDownOutside,
|
|
5481
|
+
deferPointerDownOutside = _props$deferPointerDo === void 0 ? false : _props$deferPointerDo,
|
|
5240
5482
|
onEscapeKeyDown = props.onEscapeKeyDown,
|
|
5241
5483
|
onPointerDownOutside = props.onPointerDownOutside,
|
|
5242
5484
|
onFocusOutside = props.onFocusOutside,
|
|
@@ -5252,24 +5494,37 @@ var DismissableLayer = /*#__PURE__*/React__namespace.forwardRef((props, forwarde
|
|
|
5252
5494
|
const _React$useState3 = React__namespace.useState({}),
|
|
5253
5495
|
_React$useState4 = _slicedToArray__default["default"](_React$useState3, 2),
|
|
5254
5496
|
force = _React$useState4[1];
|
|
5255
|
-
const composedRefs = useComposedRefs(forwardedRef,
|
|
5497
|
+
const composedRefs = useComposedRefs(forwardedRef, setNode);
|
|
5256
5498
|
const layers = Array.from(context.layers);
|
|
5257
5499
|
const _slice = [...context.layersWithOutsidePointerEventsDisabled].slice(-1),
|
|
5258
5500
|
_slice2 = _slicedToArray__default["default"](_slice, 1),
|
|
5259
5501
|
highestLayerWithOutsidePointerEventsDisabled = _slice2[0];
|
|
5260
|
-
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
5502
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = highestLayerWithOutsidePointerEventsDisabled ? layers.indexOf(highestLayerWithOutsidePointerEventsDisabled) : -1;
|
|
5261
5503
|
const index = node ? layers.indexOf(node) : -1;
|
|
5262
5504
|
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
5263
5505
|
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
5506
|
+
const isDeferredPointerDownOutsideRef = React__namespace.useRef(false);
|
|
5264
5507
|
const pointerDownOutside = usePointerDownOutside(event => {
|
|
5265
|
-
const target = event.target;
|
|
5266
|
-
const isPointerDownOnBranch = [...context.branches].some(branch => branch.contains(target));
|
|
5267
|
-
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
5268
5508
|
onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
|
|
5269
5509
|
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
5270
5510
|
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
5271
|
-
},
|
|
5511
|
+
}, {
|
|
5512
|
+
ownerDocument,
|
|
5513
|
+
deferPointerDownOutside,
|
|
5514
|
+
isDeferredPointerDownOutsideRef,
|
|
5515
|
+
dismissableSurfaces: context.dismissableSurfaces,
|
|
5516
|
+
shouldHandlePointerDownOutside: React__namespace.useCallback(target => {
|
|
5517
|
+
if (!(target instanceof Node)) {
|
|
5518
|
+
return false;
|
|
5519
|
+
}
|
|
5520
|
+
const isPointerDownOnBranch = [...context.branches].some(branch => branch.contains(target));
|
|
5521
|
+
return isPointerEventsEnabled && !isPointerDownOnBranch;
|
|
5522
|
+
}, [context.branches, isPointerEventsEnabled])
|
|
5523
|
+
});
|
|
5272
5524
|
const focusOutside = useFocusOutside(event => {
|
|
5525
|
+
if (deferPointerDownOutside && isDeferredPointerDownOutsideRef.current) {
|
|
5526
|
+
return;
|
|
5527
|
+
}
|
|
5273
5528
|
const target = event.target;
|
|
5274
5529
|
const isFocusInBranch = [...context.branches].some(branch => branch.contains(target));
|
|
5275
5530
|
if (isFocusInBranch) return;
|
|
@@ -5277,15 +5532,28 @@ var DismissableLayer = /*#__PURE__*/React__namespace.forwardRef((props, forwarde
|
|
|
5277
5532
|
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
5278
5533
|
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
5279
5534
|
}, ownerDocument);
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
if (
|
|
5535
|
+
const isHighestLayer = node ? index === layers.length - 1 : false;
|
|
5536
|
+
const handleKeyDown = useCallbackRef$1(event => {
|
|
5537
|
+
if (event.key !== "Escape") {
|
|
5538
|
+
return;
|
|
5539
|
+
}
|
|
5283
5540
|
onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
|
|
5284
5541
|
if (!event.defaultPrevented && onDismiss) {
|
|
5285
5542
|
event.preventDefault();
|
|
5286
5543
|
onDismiss();
|
|
5287
5544
|
}
|
|
5288
|
-
}
|
|
5545
|
+
});
|
|
5546
|
+
React__namespace.useEffect(() => {
|
|
5547
|
+
if (!isHighestLayer) {
|
|
5548
|
+
return;
|
|
5549
|
+
}
|
|
5550
|
+
ownerDocument.addEventListener("keydown", handleKeyDown, {
|
|
5551
|
+
capture: true
|
|
5552
|
+
});
|
|
5553
|
+
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, {
|
|
5554
|
+
capture: true
|
|
5555
|
+
});
|
|
5556
|
+
}, [ownerDocument, isHighestLayer, handleKeyDown]);
|
|
5289
5557
|
React__namespace.useEffect(() => {
|
|
5290
5558
|
if (!node) return;
|
|
5291
5559
|
if (disableOutsidePointerEvents) {
|
|
@@ -5298,8 +5566,11 @@ var DismissableLayer = /*#__PURE__*/React__namespace.forwardRef((props, forwarde
|
|
|
5298
5566
|
context.layers.add(node);
|
|
5299
5567
|
dispatchUpdate();
|
|
5300
5568
|
return () => {
|
|
5301
|
-
if (disableOutsidePointerEvents
|
|
5302
|
-
|
|
5569
|
+
if (disableOutsidePointerEvents) {
|
|
5570
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
5571
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
5572
|
+
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
5573
|
+
}
|
|
5303
5574
|
}
|
|
5304
5575
|
};
|
|
5305
5576
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
@@ -5312,7 +5583,7 @@ var DismissableLayer = /*#__PURE__*/React__namespace.forwardRef((props, forwarde
|
|
|
5312
5583
|
};
|
|
5313
5584
|
}, [node, context]);
|
|
5314
5585
|
React__namespace.useEffect(() => {
|
|
5315
|
-
const handleUpdate = () => force({});
|
|
5586
|
+
const handleUpdate = /* @__PURE__ */__name$c(() => force({}), "handleUpdate");
|
|
5316
5587
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
5317
5588
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
5318
5589
|
}, []);
|
|
@@ -5327,10 +5598,8 @@ var DismissableLayer = /*#__PURE__*/React__namespace.forwardRef((props, forwarde
|
|
|
5327
5598
|
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
5328
5599
|
onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
5329
5600
|
});
|
|
5330
|
-
});
|
|
5331
|
-
|
|
5332
|
-
var BRANCH_NAME = "DismissableLayerBranch";
|
|
5333
|
-
var DismissableLayerBranch = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
5601
|
+
}, "DismissableLayer"));
|
|
5602
|
+
var DismissableLayerBranch = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$c(function DismissableLayerBranch2(props, forwardedRef) {
|
|
5334
5603
|
const context = React__namespace.useContext(DismissableLayerContext);
|
|
5335
5604
|
const ref = React__namespace.useRef(null);
|
|
5336
5605
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
@@ -5347,39 +5616,121 @@ var DismissableLayerBranch = /*#__PURE__*/React__namespace.forwardRef((props, fo
|
|
|
5347
5616
|
...props,
|
|
5348
5617
|
ref: composedRefs
|
|
5349
5618
|
});
|
|
5350
|
-
});
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5619
|
+
}, "DismissableLayerBranch"));
|
|
5620
|
+
function useDismissableLayerSurface() {
|
|
5621
|
+
const context = React__namespace.useContext(DismissableLayerContext);
|
|
5622
|
+
const _React$useState5 = React__namespace.useState(null),
|
|
5623
|
+
_React$useState6 = _slicedToArray__default["default"](_React$useState5, 2),
|
|
5624
|
+
node = _React$useState6[0],
|
|
5625
|
+
setNode = _React$useState6[1];
|
|
5626
|
+
React__namespace.useEffect(() => {
|
|
5627
|
+
if (!node) {
|
|
5628
|
+
return;
|
|
5629
|
+
}
|
|
5630
|
+
context.dismissableSurfaces.add(node);
|
|
5631
|
+
return () => {
|
|
5632
|
+
context.dismissableSurfaces.delete(node);
|
|
5633
|
+
};
|
|
5634
|
+
}, [node, context.dismissableSurfaces]);
|
|
5635
|
+
return setNode;
|
|
5636
|
+
}
|
|
5637
|
+
__name$c(useDismissableLayerSurface, "useDismissableLayerSurface");
|
|
5638
|
+
var IS_TRUE = /* @__PURE__ */__name$c(() => true, "IS_TRUE");
|
|
5639
|
+
function usePointerDownOutside(onPointerDownOutside, args) {
|
|
5640
|
+
const _args$ownerDocument = args.ownerDocument,
|
|
5641
|
+
ownerDocument = _args$ownerDocument === void 0 ? globalThis === null || globalThis === void 0 ? void 0 : globalThis.document : _args$ownerDocument,
|
|
5642
|
+
_args$deferPointerDow = args.deferPointerDownOutside,
|
|
5643
|
+
deferPointerDownOutside = _args$deferPointerDow === void 0 ? false : _args$deferPointerDow,
|
|
5644
|
+
isDeferredPointerDownOutsideRef = args.isDeferredPointerDownOutsideRef,
|
|
5645
|
+
dismissableSurfaces = args.dismissableSurfaces,
|
|
5646
|
+
_args$shouldHandlePoi = args.shouldHandlePointerDownOutside,
|
|
5647
|
+
shouldHandlePointerDownOutside = _args$shouldHandlePoi === void 0 ? IS_TRUE : _args$shouldHandlePoi;
|
|
5354
5648
|
const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
|
|
5355
5649
|
const isPointerInsideReactTreeRef = React__namespace.useRef(false);
|
|
5650
|
+
const isPointerDownOutsideRef = React__namespace.useRef(false);
|
|
5651
|
+
const interceptedOutsideInteractionEventsRef = React__namespace.useRef(/* @__PURE__ */new Map());
|
|
5356
5652
|
const handleClickRef = React__namespace.useRef(() => {});
|
|
5357
5653
|
React__namespace.useEffect(() => {
|
|
5358
|
-
|
|
5654
|
+
function resetOutsideInteraction() {
|
|
5655
|
+
isPointerDownOutsideRef.current = false;
|
|
5656
|
+
isDeferredPointerDownOutsideRef.current = false;
|
|
5657
|
+
interceptedOutsideInteractionEventsRef.current.clear();
|
|
5658
|
+
}
|
|
5659
|
+
__name$c(resetOutsideInteraction, "resetOutsideInteraction");
|
|
5660
|
+
function isOutsideInteractionIntercepted() {
|
|
5661
|
+
return Array.from(interceptedOutsideInteractionEventsRef.current.values()).some(Boolean);
|
|
5662
|
+
}
|
|
5663
|
+
__name$c(isOutsideInteractionIntercepted, "isOutsideInteractionIntercepted");
|
|
5664
|
+
function handleInteractionCapture(event) {
|
|
5665
|
+
if (!isPointerDownOutsideRef.current) {
|
|
5666
|
+
return;
|
|
5667
|
+
}
|
|
5668
|
+
const target = event.target;
|
|
5669
|
+
const isDismissableSurface = target instanceof Node && [...dismissableSurfaces].some(surface => surface.contains(target));
|
|
5670
|
+
if (!isDismissableSurface) {
|
|
5671
|
+
interceptedOutsideInteractionEventsRef.current.set(event.type, true);
|
|
5672
|
+
}
|
|
5673
|
+
if (event.type === "click") {
|
|
5674
|
+
window.setTimeout(() => {
|
|
5675
|
+
if (isPointerDownOutsideRef.current) {
|
|
5676
|
+
handleClickRef.current();
|
|
5677
|
+
}
|
|
5678
|
+
}, 0);
|
|
5679
|
+
}
|
|
5680
|
+
}
|
|
5681
|
+
__name$c(handleInteractionCapture, "handleInteractionCapture");
|
|
5682
|
+
function handleInteractionBubble(event) {
|
|
5683
|
+
if (isPointerDownOutsideRef.current) {
|
|
5684
|
+
interceptedOutsideInteractionEventsRef.current.set(event.type, false);
|
|
5685
|
+
}
|
|
5686
|
+
}
|
|
5687
|
+
__name$c(handleInteractionBubble, "handleInteractionBubble");
|
|
5688
|
+
const handlePointerDown = /* @__PURE__ */__name$c(event => {
|
|
5359
5689
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
5360
5690
|
let handleAndDispatchPointerDownOutsideEvent2 = function () {
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5691
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
5692
|
+
const wasOutsideInteractionIntercepted = isOutsideInteractionIntercepted();
|
|
5693
|
+
resetOutsideInteraction();
|
|
5694
|
+
if (!wasOutsideInteractionIntercepted) {
|
|
5695
|
+
handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
|
|
5696
|
+
discrete: true
|
|
5697
|
+
});
|
|
5698
|
+
}
|
|
5364
5699
|
};
|
|
5365
5700
|
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
|
5701
|
+
__name$c(handleAndDispatchPointerDownOutsideEvent2, "handleAndDispatchPointerDownOutsideEvent");
|
|
5702
|
+
if (!shouldHandlePointerDownOutside(event.target)) {
|
|
5703
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
5704
|
+
resetOutsideInteraction();
|
|
5705
|
+
isPointerInsideReactTreeRef.current = false;
|
|
5706
|
+
return;
|
|
5707
|
+
}
|
|
5366
5708
|
const eventDetail = {
|
|
5367
5709
|
originalEvent: event
|
|
5368
5710
|
};
|
|
5369
|
-
|
|
5711
|
+
isPointerDownOutsideRef.current = true;
|
|
5712
|
+
isDeferredPointerDownOutsideRef.current = deferPointerDownOutside && event.button === 0;
|
|
5713
|
+
interceptedOutsideInteractionEventsRef.current.clear();
|
|
5714
|
+
if (!deferPointerDownOutside || event.button !== 0) {
|
|
5715
|
+
handleAndDispatchPointerDownOutsideEvent2();
|
|
5716
|
+
} else {
|
|
5370
5717
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
5371
5718
|
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
5372
5719
|
ownerDocument.addEventListener("click", handleClickRef.current, {
|
|
5373
5720
|
once: true
|
|
5374
5721
|
});
|
|
5375
|
-
} else {
|
|
5376
|
-
handleAndDispatchPointerDownOutsideEvent2();
|
|
5377
5722
|
}
|
|
5378
5723
|
} else {
|
|
5379
5724
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
5725
|
+
resetOutsideInteraction();
|
|
5380
5726
|
}
|
|
5381
5727
|
isPointerInsideReactTreeRef.current = false;
|
|
5382
|
-
};
|
|
5728
|
+
}, "handlePointerDown");
|
|
5729
|
+
const outsideInteractionEvents = ["pointerup", "mousedown", "mouseup", "touchstart", "touchend", "click"];
|
|
5730
|
+
for (const eventName of outsideInteractionEvents) {
|
|
5731
|
+
ownerDocument.addEventListener(eventName, handleInteractionCapture, true);
|
|
5732
|
+
ownerDocument.addEventListener(eventName, handleInteractionBubble);
|
|
5733
|
+
}
|
|
5383
5734
|
const timerId = window.setTimeout(() => {
|
|
5384
5735
|
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
5385
5736
|
}, 0);
|
|
@@ -5387,19 +5738,24 @@ function usePointerDownOutside(onPointerDownOutside) {
|
|
|
5387
5738
|
window.clearTimeout(timerId);
|
|
5388
5739
|
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
5389
5740
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
5741
|
+
for (const eventName of outsideInteractionEvents) {
|
|
5742
|
+
ownerDocument.removeEventListener(eventName, handleInteractionCapture, true);
|
|
5743
|
+
ownerDocument.removeEventListener(eventName, handleInteractionBubble);
|
|
5744
|
+
}
|
|
5390
5745
|
};
|
|
5391
|
-
}, [ownerDocument, handlePointerDownOutside]);
|
|
5746
|
+
}, [ownerDocument, handlePointerDownOutside, deferPointerDownOutside, isDeferredPointerDownOutsideRef, dismissableSurfaces, shouldHandlePointerDownOutside]);
|
|
5392
5747
|
return {
|
|
5393
5748
|
// ensures we check React component tree (not just DOM tree)
|
|
5394
|
-
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
5749
|
+
onPointerDownCapture: /* @__PURE__ */__name$c(() => isPointerInsideReactTreeRef.current = true, "onPointerDownCapture")
|
|
5395
5750
|
};
|
|
5396
5751
|
}
|
|
5752
|
+
__name$c(usePointerDownOutside, "usePointerDownOutside");
|
|
5397
5753
|
function useFocusOutside(onFocusOutside) {
|
|
5398
5754
|
let ownerDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
|
|
5399
5755
|
const handleFocusOutside = useCallbackRef$1(onFocusOutside);
|
|
5400
5756
|
const isFocusInsideReactTreeRef = React__namespace.useRef(false);
|
|
5401
5757
|
React__namespace.useEffect(() => {
|
|
5402
|
-
const handleFocus = event => {
|
|
5758
|
+
const handleFocus = /* @__PURE__ */__name$c(event => {
|
|
5403
5759
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
5404
5760
|
const eventDetail = {
|
|
5405
5761
|
originalEvent: event
|
|
@@ -5408,19 +5764,21 @@ function useFocusOutside(onFocusOutside) {
|
|
|
5408
5764
|
discrete: false
|
|
5409
5765
|
});
|
|
5410
5766
|
}
|
|
5411
|
-
};
|
|
5767
|
+
}, "handleFocus");
|
|
5412
5768
|
ownerDocument.addEventListener("focusin", handleFocus);
|
|
5413
5769
|
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
5414
5770
|
}, [ownerDocument, handleFocusOutside]);
|
|
5415
5771
|
return {
|
|
5416
|
-
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
5417
|
-
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
5772
|
+
onFocusCapture: /* @__PURE__ */__name$c(() => isFocusInsideReactTreeRef.current = true, "onFocusCapture"),
|
|
5773
|
+
onBlurCapture: /* @__PURE__ */__name$c(() => isFocusInsideReactTreeRef.current = false, "onBlurCapture")
|
|
5418
5774
|
};
|
|
5419
5775
|
}
|
|
5776
|
+
__name$c(useFocusOutside, "useFocusOutside");
|
|
5420
5777
|
function dispatchUpdate() {
|
|
5421
5778
|
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
5422
5779
|
document.dispatchEvent(event);
|
|
5423
5780
|
}
|
|
5781
|
+
__name$c(dispatchUpdate, "dispatchUpdate");
|
|
5424
5782
|
function handleAndDispatchCustomEvent(name, handler, detail, _ref) {
|
|
5425
5783
|
let discrete = _ref.discrete;
|
|
5426
5784
|
const target = detail.originalEvent.target;
|
|
@@ -5438,30 +5796,52 @@ function handleAndDispatchCustomEvent(name, handler, detail, _ref) {
|
|
|
5438
5796
|
target.dispatchEvent(event);
|
|
5439
5797
|
}
|
|
5440
5798
|
}
|
|
5441
|
-
|
|
5442
|
-
var Branch = DismissableLayerBranch;
|
|
5799
|
+
__name$c(handleAndDispatchCustomEvent, "handleAndDispatchCustomEvent");
|
|
5443
5800
|
|
|
5444
5801
|
"use client";
|
|
5802
|
+
|
|
5803
|
+
var __defProp$b = Object.defineProperty;
|
|
5804
|
+
var __name$b = (target, value) => __defProp$b(target, "name", {
|
|
5805
|
+
value,
|
|
5806
|
+
configurable: true
|
|
5807
|
+
});
|
|
5445
5808
|
var count$1 = 0;
|
|
5809
|
+
var guards = null;
|
|
5446
5810
|
function FocusGuards(props) {
|
|
5447
5811
|
useFocusGuards();
|
|
5448
5812
|
return props.children;
|
|
5449
5813
|
}
|
|
5814
|
+
__name$b(FocusGuards, "FocusGuards");
|
|
5450
5815
|
function useFocusGuards() {
|
|
5451
5816
|
React__namespace.useEffect(() => {
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5817
|
+
if (!guards) {
|
|
5818
|
+
guards = {
|
|
5819
|
+
start: createFocusGuard(),
|
|
5820
|
+
end: createFocusGuard()
|
|
5821
|
+
};
|
|
5822
|
+
}
|
|
5823
|
+
const _guards = guards,
|
|
5824
|
+
start = _guards.start,
|
|
5825
|
+
end = _guards.end;
|
|
5826
|
+
if (document.body.firstElementChild !== start) {
|
|
5827
|
+
document.body.insertAdjacentElement("afterbegin", start);
|
|
5828
|
+
}
|
|
5829
|
+
if (document.body.lastElementChild !== end) {
|
|
5830
|
+
document.body.insertAdjacentElement("beforeend", end);
|
|
5831
|
+
}
|
|
5456
5832
|
count$1++;
|
|
5457
5833
|
return () => {
|
|
5458
5834
|
if (count$1 === 1) {
|
|
5459
|
-
|
|
5835
|
+
var _guards2, _guards3;
|
|
5836
|
+
(_guards2 = guards) === null || _guards2 === void 0 || _guards2.start.remove();
|
|
5837
|
+
(_guards3 = guards) === null || _guards3 === void 0 || _guards3.end.remove();
|
|
5838
|
+
guards = null;
|
|
5460
5839
|
}
|
|
5461
|
-
count$1
|
|
5840
|
+
count$1 = Math.max(0, count$1 - 1);
|
|
5462
5841
|
};
|
|
5463
5842
|
}, []);
|
|
5464
5843
|
}
|
|
5844
|
+
__name$b(useFocusGuards, "useFocusGuards");
|
|
5465
5845
|
function createFocusGuard() {
|
|
5466
5846
|
const element = document.createElement("span");
|
|
5467
5847
|
element.setAttribute("data-radix-focus-guard", "");
|
|
@@ -5472,21 +5852,27 @@ function createFocusGuard() {
|
|
|
5472
5852
|
element.style.pointerEvents = "none";
|
|
5473
5853
|
return element;
|
|
5474
5854
|
}
|
|
5855
|
+
__name$b(createFocusGuard, "createFocusGuard");
|
|
5475
5856
|
|
|
5476
5857
|
"use client";
|
|
5477
|
-
const _excluded$j = ["loop", "trapped", "onMountAutoFocus", "onUnmountAutoFocus"];
|
|
5858
|
+
const _excluded$j = ["loop", "trapped", "branches", "onMountAutoFocus", "onUnmountAutoFocus"];
|
|
5859
|
+
var __defProp$a = Object.defineProperty;
|
|
5860
|
+
var __name$a = (target, value) => __defProp$a(target, "name", {
|
|
5861
|
+
value,
|
|
5862
|
+
configurable: true
|
|
5863
|
+
});
|
|
5478
5864
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
5479
5865
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
5480
5866
|
var EVENT_OPTIONS$1 = {
|
|
5481
5867
|
bubbles: false,
|
|
5482
5868
|
cancelable: true
|
|
5483
5869
|
};
|
|
5484
|
-
var
|
|
5485
|
-
var FocusScope = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
5870
|
+
var FocusScope = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$a(function FocusScope2(props, forwardedRef) {
|
|
5486
5871
|
const _props$loop = props.loop,
|
|
5487
5872
|
loop = _props$loop === void 0 ? false : _props$loop,
|
|
5488
5873
|
_props$trapped = props.trapped,
|
|
5489
5874
|
trapped = _props$trapped === void 0 ? false : _props$trapped,
|
|
5875
|
+
branches = props.branches,
|
|
5490
5876
|
onMountAutoFocusProp = props.onMountAutoFocus,
|
|
5491
5877
|
onUnmountAutoFocusProp = props.onUnmountAutoFocus,
|
|
5492
5878
|
scopeProps = _objectWithoutProperties__default["default"](props, _excluded$j);
|
|
@@ -5497,7 +5883,17 @@ var FocusScope = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef)
|
|
|
5497
5883
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
5498
5884
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
5499
5885
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
5500
|
-
const composedRefs = useComposedRefs(forwardedRef,
|
|
5886
|
+
const composedRefs = useComposedRefs(forwardedRef, setContainer);
|
|
5887
|
+
const branchesRef = React__namespace.useRef(branches);
|
|
5888
|
+
React__namespace.useEffect(() => {
|
|
5889
|
+
branchesRef.current = branches;
|
|
5890
|
+
});
|
|
5891
|
+
const isTargetInScope = React__namespace.useCallback(target => {
|
|
5892
|
+
var _branchesRef$current;
|
|
5893
|
+
if (!target) return false;
|
|
5894
|
+
if (container !== null && container !== void 0 && container.contains(target)) return true;
|
|
5895
|
+
return Boolean((_branchesRef$current = branchesRef.current) === null || _branchesRef$current === void 0 ? void 0 : _branchesRef$current.some(branch => branch.contains(target)));
|
|
5896
|
+
}, [container]);
|
|
5501
5897
|
const focusScope = React__namespace.useRef({
|
|
5502
5898
|
paused: false,
|
|
5503
5899
|
pause() {
|
|
@@ -5512,7 +5908,7 @@ var FocusScope = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef)
|
|
|
5512
5908
|
let handleFocusIn2 = function (event) {
|
|
5513
5909
|
if (focusScope.paused || !container) return;
|
|
5514
5910
|
const target = event.target;
|
|
5515
|
-
if (
|
|
5911
|
+
if (isTargetInScope(target)) {
|
|
5516
5912
|
lastFocusedElementRef.current = target;
|
|
5517
5913
|
} else {
|
|
5518
5914
|
focus(lastFocusedElementRef.current, {
|
|
@@ -5524,7 +5920,7 @@ var FocusScope = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef)
|
|
|
5524
5920
|
if (focusScope.paused || !container) return;
|
|
5525
5921
|
const relatedTarget = event.relatedTarget;
|
|
5526
5922
|
if (relatedTarget === null) return;
|
|
5527
|
-
if (!
|
|
5923
|
+
if (!isTargetInScope(relatedTarget)) {
|
|
5528
5924
|
focus(lastFocusedElementRef.current, {
|
|
5529
5925
|
select: true
|
|
5530
5926
|
});
|
|
@@ -5540,6 +5936,9 @@ var FocusScope = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef)
|
|
|
5540
5936
|
var handleFocusIn = handleFocusIn2,
|
|
5541
5937
|
handleFocusOut = handleFocusOut2,
|
|
5542
5938
|
handleMutations = handleMutations2;
|
|
5939
|
+
__name$a(handleFocusIn2, "handleFocusIn");
|
|
5940
|
+
__name$a(handleFocusOut2, "handleFocusOut");
|
|
5941
|
+
__name$a(handleMutations2, "handleMutations");
|
|
5543
5942
|
document.addEventListener("focusin", handleFocusIn2);
|
|
5544
5943
|
document.addEventListener("focusout", handleFocusOut2);
|
|
5545
5944
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
@@ -5553,7 +5952,7 @@ var FocusScope = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef)
|
|
|
5553
5952
|
mutationObserver.disconnect();
|
|
5554
5953
|
};
|
|
5555
5954
|
}
|
|
5556
|
-
}, [trapped, container, focusScope.paused]);
|
|
5955
|
+
}, [trapped, container, focusScope.paused, isTargetInScope]);
|
|
5557
5956
|
React__namespace.useEffect(() => {
|
|
5558
5957
|
if (container) {
|
|
5559
5958
|
focusScopesStack.add(focusScope);
|
|
@@ -5574,12 +5973,14 @@ var FocusScope = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef)
|
|
|
5574
5973
|
}
|
|
5575
5974
|
return () => {
|
|
5576
5975
|
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
5976
|
+
const ownerDocument = container.ownerDocument;
|
|
5977
|
+
const UnmountEvent = CustomEvent;
|
|
5577
5978
|
setTimeout(() => {
|
|
5578
|
-
const unmountEvent = new
|
|
5979
|
+
const unmountEvent = new UnmountEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS$1);
|
|
5579
5980
|
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
5580
5981
|
container.dispatchEvent(unmountEvent);
|
|
5581
5982
|
if (!unmountEvent.defaultPrevented) {
|
|
5582
|
-
focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement :
|
|
5983
|
+
focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : ownerDocument.body, {
|
|
5583
5984
|
select: true
|
|
5584
5985
|
});
|
|
5585
5986
|
}
|
|
@@ -5624,12 +6025,48 @@ var FocusScope = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef)
|
|
|
5624
6025
|
ref: composedRefs,
|
|
5625
6026
|
onKeyDown: handleKeyDown
|
|
5626
6027
|
});
|
|
5627
|
-
});
|
|
5628
|
-
|
|
6028
|
+
}, "FocusScope"));
|
|
6029
|
+
var FocusScopeBranchContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
6030
|
+
function FocusScopeBranchProvider(_ref) {
|
|
6031
|
+
let registry = _ref.registry,
|
|
6032
|
+
children = _ref.children;
|
|
6033
|
+
if (!registry) {
|
|
6034
|
+
return children;
|
|
6035
|
+
}
|
|
6036
|
+
return /* @__PURE__ */React__namespace.createElement(FocusScopeBranchContext.Provider, {
|
|
6037
|
+
value: registry,
|
|
6038
|
+
children
|
|
6039
|
+
});
|
|
6040
|
+
}
|
|
6041
|
+
__name$a(FocusScopeBranchProvider, "FocusScopeBranchProvider");
|
|
6042
|
+
function useFocusScopeBranchRegistry() {
|
|
6043
|
+
const _React$useState3 = React__namespace.useState([]),
|
|
6044
|
+
_React$useState4 = _slicedToArray__default["default"](_React$useState3, 2),
|
|
6045
|
+
nodes = _React$useState4[0],
|
|
6046
|
+
setNodes = _React$useState4[1];
|
|
6047
|
+
const registry = React__namespace.useMemo(() => ({
|
|
6048
|
+
add: /* @__PURE__ */__name$a(node => setNodes(prev => _includesInstanceProperty__default["default"](prev).call(prev, node) ? prev : [...prev, node]), "add"),
|
|
6049
|
+
remove: /* @__PURE__ */__name$a(node => setNodes(prev => prev.filter(current => current !== node)), "remove")
|
|
6050
|
+
}), []);
|
|
6051
|
+
return {
|
|
6052
|
+
nodes,
|
|
6053
|
+
registry
|
|
6054
|
+
};
|
|
6055
|
+
}
|
|
6056
|
+
__name$a(useFocusScopeBranchRegistry, "useFocusScopeBranchRegistry");
|
|
6057
|
+
function useFocusScopeBranch(node) {
|
|
6058
|
+
const registry = React__namespace.useContext(FocusScopeBranchContext);
|
|
6059
|
+
React__namespace.useEffect(() => {
|
|
6060
|
+
if (!node || !registry) return;
|
|
6061
|
+
registry.add(node);
|
|
6062
|
+
return () => registry.remove(node);
|
|
6063
|
+
}, [node, registry]);
|
|
6064
|
+
}
|
|
6065
|
+
__name$a(useFocusScopeBranch, "useFocusScopeBranch");
|
|
5629
6066
|
function focusFirst$2(candidates) {
|
|
5630
|
-
let
|
|
5631
|
-
|
|
5632
|
-
select =
|
|
6067
|
+
let _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
6068
|
+
_ref2$select = _ref2.select,
|
|
6069
|
+
select = _ref2$select === void 0 ? false : _ref2$select;
|
|
5633
6070
|
const previouslyFocusedElement = document.activeElement;
|
|
5634
6071
|
for (const candidate of candidates) {
|
|
5635
6072
|
focus(candidate, {
|
|
@@ -5638,33 +6075,50 @@ function focusFirst$2(candidates) {
|
|
|
5638
6075
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
5639
6076
|
}
|
|
5640
6077
|
}
|
|
6078
|
+
__name$a(focusFirst$2, "focusFirst");
|
|
5641
6079
|
function getTabbableEdges(container) {
|
|
5642
6080
|
const candidates = getTabbableCandidates(container);
|
|
5643
6081
|
const first = findVisible(candidates, container);
|
|
5644
6082
|
const last = findVisible(candidates.reverse(), container);
|
|
5645
6083
|
return [first, last];
|
|
5646
6084
|
}
|
|
6085
|
+
__name$a(getTabbableEdges, "getTabbableEdges");
|
|
5647
6086
|
function getTabbableCandidates(container) {
|
|
5648
6087
|
const nodes = [];
|
|
5649
|
-
const
|
|
5650
|
-
|
|
6088
|
+
const document2 = container.ownerDocument;
|
|
6089
|
+
const walker = document2.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
6090
|
+
acceptNode: /* @__PURE__ */__name$a(node => {
|
|
5651
6091
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
5652
|
-
if (node.disabled || node.hidden || isHiddenInput)
|
|
6092
|
+
if (node.disabled || node.hidden || isHiddenInput) {
|
|
6093
|
+
return NodeFilter.FILTER_SKIP;
|
|
6094
|
+
}
|
|
5653
6095
|
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
5654
|
-
}
|
|
6096
|
+
}, "acceptNode")
|
|
5655
6097
|
});
|
|
5656
|
-
while (walker.nextNode())
|
|
6098
|
+
while (walker.nextNode()) {
|
|
6099
|
+
nodes.push(walker.currentNode);
|
|
6100
|
+
}
|
|
5657
6101
|
return nodes;
|
|
5658
6102
|
}
|
|
6103
|
+
__name$a(getTabbableCandidates, "getTabbableCandidates");
|
|
5659
6104
|
function findVisible(elements, container) {
|
|
6105
|
+
const canUseCheckVisibility = typeof container.checkVisibility === "function" && container.checkVisibility({
|
|
6106
|
+
checkVisibilityCSS: true
|
|
6107
|
+
});
|
|
5660
6108
|
for (const element of elements) {
|
|
5661
|
-
|
|
6109
|
+
const hidden = canUseCheckVisibility ? !element.checkVisibility({
|
|
6110
|
+
checkVisibilityCSS: true
|
|
6111
|
+
}) : isHidden(element, {
|
|
5662
6112
|
upTo: container
|
|
5663
|
-
})
|
|
6113
|
+
});
|
|
6114
|
+
if (!hidden) {
|
|
6115
|
+
return element;
|
|
6116
|
+
}
|
|
5664
6117
|
}
|
|
5665
6118
|
}
|
|
5666
|
-
|
|
5667
|
-
|
|
6119
|
+
__name$a(findVisible, "findVisible");
|
|
6120
|
+
function isHidden(node, _ref3) {
|
|
6121
|
+
let upTo = _ref3.upTo;
|
|
5668
6122
|
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
5669
6123
|
while (node) {
|
|
5670
6124
|
if (upTo !== void 0 && node === upTo) return false;
|
|
@@ -5673,21 +6127,26 @@ function isHidden(node, _ref2) {
|
|
|
5673
6127
|
}
|
|
5674
6128
|
return false;
|
|
5675
6129
|
}
|
|
6130
|
+
__name$a(isHidden, "isHidden");
|
|
5676
6131
|
function isSelectableInput(element) {
|
|
5677
|
-
return element
|
|
6132
|
+
return element.tagName === "INPUT" && typeof element.select === "function";
|
|
5678
6133
|
}
|
|
6134
|
+
__name$a(isSelectableInput, "isSelectableInput");
|
|
5679
6135
|
function focus(element) {
|
|
5680
|
-
let
|
|
5681
|
-
|
|
5682
|
-
select =
|
|
6136
|
+
let _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
6137
|
+
_ref4$select = _ref4.select,
|
|
6138
|
+
select = _ref4$select === void 0 ? false : _ref4$select;
|
|
5683
6139
|
if (element && element.focus) {
|
|
5684
|
-
|
|
6140
|
+
var _element$ownerDocumen;
|
|
6141
|
+
const ownerDocument = (_element$ownerDocumen = element.ownerDocument) !== null && _element$ownerDocumen !== void 0 ? _element$ownerDocumen : document;
|
|
6142
|
+
const previouslyFocusedElement = ownerDocument.activeElement;
|
|
5685
6143
|
element.focus({
|
|
5686
6144
|
preventScroll: true
|
|
5687
6145
|
});
|
|
5688
6146
|
if (element !== previouslyFocusedElement && isSelectableInput(element) && select) element.select();
|
|
5689
6147
|
}
|
|
5690
6148
|
}
|
|
6149
|
+
__name$a(focus, "focus");
|
|
5691
6150
|
var focusScopesStack = createFocusScopesStack();
|
|
5692
6151
|
function createFocusScopesStack() {
|
|
5693
6152
|
let stack = [];
|
|
@@ -5707,6 +6166,7 @@ function createFocusScopesStack() {
|
|
|
5707
6166
|
}
|
|
5708
6167
|
};
|
|
5709
6168
|
}
|
|
6169
|
+
__name$a(createFocusScopesStack, "createFocusScopesStack");
|
|
5710
6170
|
function arrayRemove(array, item) {
|
|
5711
6171
|
const updatedArray = [...array];
|
|
5712
6172
|
const index = updatedArray.indexOf(item);
|
|
@@ -5715,11 +6175,17 @@ function arrayRemove(array, item) {
|
|
|
5715
6175
|
}
|
|
5716
6176
|
return updatedArray;
|
|
5717
6177
|
}
|
|
6178
|
+
__name$a(arrayRemove, "arrayRemove");
|
|
5718
6179
|
function removeLinks(items) {
|
|
5719
6180
|
return items.filter(item => item.tagName !== "A");
|
|
5720
6181
|
}
|
|
5721
|
-
|
|
6182
|
+
__name$a(removeLinks, "removeLinks");
|
|
5722
6183
|
|
|
6184
|
+
var __defProp$9 = Object.defineProperty;
|
|
6185
|
+
var __name$9 = (target, value) => __defProp$9(target, "name", {
|
|
6186
|
+
value,
|
|
6187
|
+
configurable: true
|
|
6188
|
+
});
|
|
5723
6189
|
var useReactId = React__namespace[" useId ".trim().toString()] || (() => void 0);
|
|
5724
6190
|
var count = 0;
|
|
5725
6191
|
function useId(deterministicId) {
|
|
@@ -5732,10 +6198,16 @@ function useId(deterministicId) {
|
|
|
5732
6198
|
}, [deterministicId]);
|
|
5733
6199
|
return deterministicId || (id ? "radix-".concat(id) : "");
|
|
5734
6200
|
}
|
|
6201
|
+
__name$9(useId, "useId");
|
|
5735
6202
|
|
|
6203
|
+
"use client";
|
|
5736
6204
|
const _excluded$i = ["children", "width", "height"];
|
|
5737
|
-
var
|
|
5738
|
-
var
|
|
6205
|
+
var __defProp$8 = Object.defineProperty;
|
|
6206
|
+
var __name$8 = (target, value) => __defProp$8(target, "name", {
|
|
6207
|
+
value,
|
|
6208
|
+
configurable: true
|
|
6209
|
+
});
|
|
6210
|
+
var Arrow = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$8(function Arrow2(props, forwardedRef) {
|
|
5739
6211
|
const children = props.children,
|
|
5740
6212
|
_props$width = props.width,
|
|
5741
6213
|
width = _props$width === void 0 ? 10 : _props$width,
|
|
@@ -5753,10 +6225,13 @@ var Arrow$1 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
5753
6225
|
points: "0,0 30,0 15,10"
|
|
5754
6226
|
})
|
|
5755
6227
|
});
|
|
5756
|
-
});
|
|
5757
|
-
Arrow$1.displayName = NAME;
|
|
5758
|
-
var Root$3 = Arrow$1;
|
|
6228
|
+
}, "Arrow"));
|
|
5759
6229
|
|
|
6230
|
+
var __defProp$7 = Object.defineProperty;
|
|
6231
|
+
var __name$7 = (target, value) => __defProp$7(target, "name", {
|
|
6232
|
+
value,
|
|
6233
|
+
configurable: true
|
|
6234
|
+
});
|
|
5760
6235
|
function useSize(element) {
|
|
5761
6236
|
const _React$useState = React__namespace.useState(void 0),
|
|
5762
6237
|
_React$useState2 = _slicedToArray__default["default"](_React$useState, 2),
|
|
@@ -5768,6 +6243,7 @@ function useSize(element) {
|
|
|
5768
6243
|
width: element.offsetWidth,
|
|
5769
6244
|
height: element.offsetHeight
|
|
5770
6245
|
});
|
|
6246
|
+
let rAF = 0;
|
|
5771
6247
|
const resizeObserver = new ResizeObserver(entries => {
|
|
5772
6248
|
if (!Array.isArray(entries)) {
|
|
5773
6249
|
return;
|
|
@@ -5776,39 +6252,59 @@ function useSize(element) {
|
|
|
5776
6252
|
return;
|
|
5777
6253
|
}
|
|
5778
6254
|
const entry = entries[0];
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
6255
|
+
window.cancelAnimationFrame(rAF);
|
|
6256
|
+
rAF = window.requestAnimationFrame(() => {
|
|
6257
|
+
let width;
|
|
6258
|
+
let height;
|
|
6259
|
+
if ("borderBoxSize" in entry) {
|
|
6260
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
6261
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
6262
|
+
width = borderSize["inlineSize"];
|
|
6263
|
+
height = borderSize["blockSize"];
|
|
6264
|
+
} else {
|
|
6265
|
+
width = element.offsetWidth;
|
|
6266
|
+
height = element.offsetHeight;
|
|
6267
|
+
}
|
|
6268
|
+
setSize({
|
|
6269
|
+
width,
|
|
6270
|
+
height
|
|
6271
|
+
});
|
|
5793
6272
|
});
|
|
5794
6273
|
});
|
|
5795
6274
|
resizeObserver.observe(element, {
|
|
5796
6275
|
box: "border-box"
|
|
5797
6276
|
});
|
|
5798
|
-
return () =>
|
|
6277
|
+
return () => {
|
|
6278
|
+
window.cancelAnimationFrame(rAF);
|
|
6279
|
+
resizeObserver.unobserve(element);
|
|
6280
|
+
};
|
|
5799
6281
|
} else {
|
|
5800
6282
|
setSize(void 0);
|
|
5801
6283
|
}
|
|
5802
6284
|
}, [element]);
|
|
5803
6285
|
return size;
|
|
5804
6286
|
}
|
|
6287
|
+
__name$7(useSize, "useSize");
|
|
5805
6288
|
|
|
5806
6289
|
"use client";
|
|
5807
6290
|
const _excluded$h = ["__scopePopper", "virtualRef"],
|
|
5808
6291
|
_excluded2$4 = ["__scopePopper", "side", "sideOffset", "align", "alignOffset", "arrowPadding", "avoidCollisions", "collisionBoundary", "collisionPadding", "sticky", "hideWhenDetached", "updatePositionStrategy", "onPlaced"],
|
|
5809
6292
|
_excluded3$2 = ["__scopePopper"];
|
|
6293
|
+
var __defProp$6 = Object.defineProperty;
|
|
6294
|
+
var __name$6 = (target, value) => __defProp$6(target, "name", {
|
|
6295
|
+
value,
|
|
6296
|
+
configurable: true
|
|
6297
|
+
});
|
|
5810
6298
|
var SIDE_OPTIONS = ["top", "right", "bottom", "left"];
|
|
5811
6299
|
var ALIGN_OPTIONS = ["start", "center", "end"];
|
|
6300
|
+
var Sticky = {
|
|
6301
|
+
Partial: "partial",
|
|
6302
|
+
Always: "always"
|
|
6303
|
+
};
|
|
6304
|
+
var UpdatePositionStrategy = {
|
|
6305
|
+
Optimized: "optimized",
|
|
6306
|
+
Always: "always"
|
|
6307
|
+
};
|
|
5812
6308
|
var POPPER_NAME = "Popper";
|
|
5813
6309
|
var _createContextScope$3 = createContextScope(POPPER_NAME),
|
|
5814
6310
|
_createContextScope2$3 = _slicedToArray__default["default"](_createContextScope$3, 2),
|
|
@@ -5818,50 +6314,69 @@ var _createPopperContext = createPopperContext(POPPER_NAME),
|
|
|
5818
6314
|
_createPopperContext2 = _slicedToArray__default["default"](_createPopperContext, 2),
|
|
5819
6315
|
PopperProvider = _createPopperContext2[0],
|
|
5820
6316
|
usePopperContext = _createPopperContext2[1];
|
|
5821
|
-
var Popper = props => {
|
|
6317
|
+
var Popper = /* @__PURE__ */__name$6(props => {
|
|
5822
6318
|
const __scopePopper = props.__scopePopper,
|
|
5823
6319
|
children = props.children;
|
|
5824
6320
|
const _React$useState = React__namespace.useState(null),
|
|
5825
6321
|
_React$useState2 = _slicedToArray__default["default"](_React$useState, 2),
|
|
5826
6322
|
anchor = _React$useState2[0],
|
|
5827
6323
|
setAnchor = _React$useState2[1];
|
|
6324
|
+
const _React$useState3 = React__namespace.useState(void 0),
|
|
6325
|
+
_React$useState4 = _slicedToArray__default["default"](_React$useState3, 2),
|
|
6326
|
+
placementState = _React$useState4[0],
|
|
6327
|
+
setPlacementState = _React$useState4[1];
|
|
5828
6328
|
return /* @__PURE__ */React__namespace.createElement(PopperProvider, {
|
|
5829
6329
|
scope: __scopePopper,
|
|
5830
6330
|
anchor,
|
|
5831
6331
|
onAnchorChange: setAnchor,
|
|
6332
|
+
placementState,
|
|
6333
|
+
setPlacementState,
|
|
5832
6334
|
children
|
|
5833
6335
|
});
|
|
5834
|
-
};
|
|
5835
|
-
|
|
5836
|
-
var
|
|
5837
|
-
var PopperAnchor = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
6336
|
+
}, "Popper");
|
|
6337
|
+
var ANCHOR_NAME = "PopperAnchor";
|
|
6338
|
+
var PopperAnchor = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$6(function PopperAnchor2(props, forwardedRef) {
|
|
5838
6339
|
const __scopePopper = props.__scopePopper,
|
|
5839
6340
|
virtualRef = props.virtualRef,
|
|
5840
6341
|
anchorProps = _objectWithoutProperties__default["default"](props, _excluded$h);
|
|
5841
|
-
const context = usePopperContext(ANCHOR_NAME
|
|
6342
|
+
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
5842
6343
|
const ref = React__namespace.useRef(null);
|
|
5843
|
-
const
|
|
6344
|
+
const onAnchorChange = context.onAnchorChange;
|
|
6345
|
+
const callbackRef = React__namespace.useCallback(node => {
|
|
6346
|
+
ref.current = node;
|
|
6347
|
+
if (node) {
|
|
6348
|
+
onAnchorChange(node);
|
|
6349
|
+
}
|
|
6350
|
+
}, [onAnchorChange]);
|
|
6351
|
+
const composedRefs = useComposedRefs(forwardedRef, callbackRef);
|
|
5844
6352
|
const anchorRef = React__namespace.useRef(null);
|
|
5845
6353
|
React__namespace.useEffect(() => {
|
|
6354
|
+
if (!virtualRef) {
|
|
6355
|
+
return;
|
|
6356
|
+
}
|
|
5846
6357
|
const previousAnchor = anchorRef.current;
|
|
5847
|
-
anchorRef.current =
|
|
6358
|
+
anchorRef.current = virtualRef.current;
|
|
5848
6359
|
if (previousAnchor !== anchorRef.current) {
|
|
5849
|
-
|
|
6360
|
+
onAnchorChange(anchorRef.current);
|
|
5850
6361
|
}
|
|
5851
6362
|
});
|
|
6363
|
+
const sideAndAlign = context.placementState && getSideAndAlignFromPlacement(context.placementState);
|
|
6364
|
+
const placedSide = sideAndAlign === null || sideAndAlign === void 0 ? void 0 : sideAndAlign[0];
|
|
6365
|
+
const placedAlign = sideAndAlign === null || sideAndAlign === void 0 ? void 0 : sideAndAlign[1];
|
|
5852
6366
|
return virtualRef ? null : /* @__PURE__ */React__namespace.createElement(Primitive.div, {
|
|
6367
|
+
"data-radix-popper-side": placedSide,
|
|
6368
|
+
"data-radix-popper-align": placedAlign,
|
|
5853
6369
|
...anchorProps,
|
|
5854
6370
|
ref: composedRefs
|
|
5855
6371
|
});
|
|
5856
|
-
});
|
|
5857
|
-
PopperAnchor.displayName = ANCHOR_NAME$1;
|
|
6372
|
+
}, "PopperAnchor"));
|
|
5858
6373
|
var CONTENT_NAME$2 = "PopperContent";
|
|
5859
6374
|
var _createPopperContext3 = createPopperContext(CONTENT_NAME$2),
|
|
5860
6375
|
_createPopperContext4 = _slicedToArray__default["default"](_createPopperContext3, 2),
|
|
5861
6376
|
PopperContentProvider = _createPopperContext4[0],
|
|
5862
6377
|
useContentContext = _createPopperContext4[1];
|
|
5863
|
-
var PopperContent =
|
|
5864
|
-
var _arrowSize$width, _arrowSize$height, _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$arrow3, _middlewareData$trans, _middlewareData$trans2, _middlewareData$hide;
|
|
6378
|
+
var PopperContent = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$6(function PopperContent2(props, forwardedRef) {
|
|
6379
|
+
var _arrowSize$width, _arrowSize$height, _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$arrow3, _middlewareData$trans, _middlewareData$trans2, _middlewareData$hide, _contentProps$style;
|
|
5865
6380
|
const __scopePopper = props.__scopePopper,
|
|
5866
6381
|
_props$side = props.side,
|
|
5867
6382
|
side = _props$side === void 0 ? "bottom" : _props$side,
|
|
@@ -5880,23 +6395,23 @@ var PopperContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRe
|
|
|
5880
6395
|
_props$collisionPaddi = props.collisionPadding,
|
|
5881
6396
|
collisionPaddingProp = _props$collisionPaddi === void 0 ? 0 : _props$collisionPaddi,
|
|
5882
6397
|
_props$sticky = props.sticky,
|
|
5883
|
-
sticky = _props$sticky === void 0 ?
|
|
6398
|
+
sticky = _props$sticky === void 0 ? Sticky.Partial : _props$sticky,
|
|
5884
6399
|
_props$hideWhenDetach = props.hideWhenDetached,
|
|
5885
6400
|
hideWhenDetached = _props$hideWhenDetach === void 0 ? false : _props$hideWhenDetach,
|
|
5886
6401
|
_props$updatePosition = props.updatePositionStrategy,
|
|
5887
|
-
updatePositionStrategy = _props$updatePosition === void 0 ?
|
|
6402
|
+
updatePositionStrategy = _props$updatePosition === void 0 ? UpdatePositionStrategy.Optimized : _props$updatePosition,
|
|
5888
6403
|
onPlaced = props.onPlaced,
|
|
5889
6404
|
contentProps = _objectWithoutProperties__default["default"](props, _excluded2$4);
|
|
5890
6405
|
const context = usePopperContext(CONTENT_NAME$2, __scopePopper);
|
|
5891
|
-
const _React$useState3 = React__namespace.useState(null),
|
|
5892
|
-
_React$useState4 = _slicedToArray__default["default"](_React$useState3, 2),
|
|
5893
|
-
content = _React$useState4[0],
|
|
5894
|
-
setContent = _React$useState4[1];
|
|
5895
|
-
const composedRefs = useComposedRefs(forwardedRef, node => setContent(node));
|
|
5896
6406
|
const _React$useState5 = React__namespace.useState(null),
|
|
5897
6407
|
_React$useState6 = _slicedToArray__default["default"](_React$useState5, 2),
|
|
5898
|
-
|
|
5899
|
-
|
|
6408
|
+
content = _React$useState6[0],
|
|
6409
|
+
setContent = _React$useState6[1];
|
|
6410
|
+
const composedRefs = useComposedRefs(forwardedRef, setContent);
|
|
6411
|
+
const _React$useState7 = React__namespace.useState(null),
|
|
6412
|
+
_React$useState8 = _slicedToArray__default["default"](_React$useState7, 2),
|
|
6413
|
+
arrow = _React$useState8[0],
|
|
6414
|
+
setArrow = _React$useState8[1];
|
|
5900
6415
|
const arrowSize = useSize(arrow);
|
|
5901
6416
|
const arrowWidth = (_arrowSize$width = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.width) !== null && _arrowSize$width !== void 0 ? _arrowSize$width : 0;
|
|
5902
6417
|
const arrowHeight = (_arrowSize$height = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.height) !== null && _arrowSize$height !== void 0 ? _arrowSize$height : 0;
|
|
@@ -5920,15 +6435,15 @@ var PopperContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRe
|
|
|
5920
6435
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
5921
6436
|
strategy: "fixed",
|
|
5922
6437
|
placement: desiredPlacement,
|
|
5923
|
-
whileElementsMounted: function () {
|
|
6438
|
+
whileElementsMounted: /* @__PURE__ */__name$6(function () {
|
|
5924
6439
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5925
6440
|
args[_key] = arguments[_key];
|
|
5926
6441
|
}
|
|
5927
6442
|
const cleanup = reactDom.autoUpdate(...args, {
|
|
5928
|
-
animationFrame: updatePositionStrategy ===
|
|
6443
|
+
animationFrame: updatePositionStrategy === UpdatePositionStrategy.Always
|
|
5929
6444
|
});
|
|
5930
6445
|
return cleanup;
|
|
5931
|
-
},
|
|
6446
|
+
}, "whileElementsMounted"),
|
|
5932
6447
|
elements: {
|
|
5933
6448
|
reference: context.anchor
|
|
5934
6449
|
},
|
|
@@ -5938,13 +6453,17 @@ var PopperContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRe
|
|
|
5938
6453
|
}), avoidCollisions && reactDom.shift({
|
|
5939
6454
|
mainAxis: true,
|
|
5940
6455
|
crossAxis: false,
|
|
5941
|
-
|
|
6456
|
+
// Spread rather than passing `limiter: undefined`, which
|
|
6457
|
+
// `exactOptionalPropertyTypes` rejects for Floating UI's optional option.
|
|
6458
|
+
...(sticky === Sticky.Partial ? {
|
|
6459
|
+
limiter: reactDom.limitShift()
|
|
6460
|
+
} : {}),
|
|
5942
6461
|
...detectOverflowOptions
|
|
5943
6462
|
}), avoidCollisions && reactDom.flip({
|
|
5944
6463
|
...detectOverflowOptions
|
|
5945
6464
|
}), reactDom.size({
|
|
5946
6465
|
...detectOverflowOptions,
|
|
5947
|
-
apply: _ref => {
|
|
6466
|
+
apply: /* @__PURE__ */__name$6(_ref => {
|
|
5948
6467
|
let elements = _ref.elements,
|
|
5949
6468
|
rects = _ref.rects,
|
|
5950
6469
|
availableWidth = _ref.availableWidth,
|
|
@@ -5957,16 +6476,30 @@ var PopperContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRe
|
|
|
5957
6476
|
contentStyle.setProperty("--radix-popper-available-height", "".concat(availableHeight, "px"));
|
|
5958
6477
|
contentStyle.setProperty("--radix-popper-anchor-width", "".concat(anchorWidth, "px"));
|
|
5959
6478
|
contentStyle.setProperty("--radix-popper-anchor-height", "".concat(anchorHeight, "px"));
|
|
5960
|
-
}
|
|
6479
|
+
}, "apply")
|
|
5961
6480
|
}), arrow && reactDom.arrow({
|
|
5962
6481
|
element: arrow,
|
|
5963
6482
|
padding: arrowPadding
|
|
5964
6483
|
}), transformOrigin({
|
|
5965
6484
|
arrowWidth,
|
|
5966
6485
|
arrowHeight
|
|
5967
|
-
}), hideWhenDetached &&
|
|
6486
|
+
}), hideWhenDetached &&
|
|
6487
|
+
// `hide` detects whether the anchor (reference) is clipped, so when
|
|
6488
|
+
// no explicit `collisionBoundary` is set we omit `boundary` entirely
|
|
6489
|
+
// and fall back to Floating UI's default clipping ancestors (e.g. a
|
|
6490
|
+
// scrollable menu). This lets an occluded submenu hide once its anchor
|
|
6491
|
+
// scrolls out of view (#3237). The collision/size middlewares
|
|
6492
|
+
// deliberately keep the viewport-based default to avoid clamping
|
|
6493
|
+
// content rendered inside transformed or overflow-clipping portal
|
|
6494
|
+
// containers. The key is omitted rather than set to `undefined`
|
|
6495
|
+
// because `exactOptionalPropertyTypes` rejects the explicit value.
|
|
6496
|
+
reactDom.hide(hasExplicitBoundaries ? {
|
|
5968
6497
|
strategy: "referenceHidden",
|
|
5969
6498
|
...detectOverflowOptions
|
|
6499
|
+
} : {
|
|
6500
|
+
strategy: "referenceHidden",
|
|
6501
|
+
padding: detectOverflowOptions.padding,
|
|
6502
|
+
altBoundary: detectOverflowOptions.altBoundary
|
|
5970
6503
|
})]
|
|
5971
6504
|
}),
|
|
5972
6505
|
refs = _useFloating.refs,
|
|
@@ -5974,6 +6507,13 @@ var PopperContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRe
|
|
|
5974
6507
|
placement = _useFloating.placement,
|
|
5975
6508
|
isPositioned = _useFloating.isPositioned,
|
|
5976
6509
|
middlewareData = _useFloating.middlewareData;
|
|
6510
|
+
const setPlacementState = context.setPlacementState;
|
|
6511
|
+
useLayoutEffect2(() => {
|
|
6512
|
+
setPlacementState(placement);
|
|
6513
|
+
return () => {
|
|
6514
|
+
setPlacementState(void 0);
|
|
6515
|
+
};
|
|
6516
|
+
}, [placement, setPlacementState]);
|
|
5977
6517
|
const _getSideAndAlignFromP = getSideAndAlignFromPlacement(placement),
|
|
5978
6518
|
_getSideAndAlignFromP2 = _slicedToArray__default["default"](_getSideAndAlignFromP, 2),
|
|
5979
6519
|
placedSide = _getSideAndAlignFromP2[0],
|
|
@@ -5987,10 +6527,10 @@ var PopperContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRe
|
|
|
5987
6527
|
const arrowX = (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x;
|
|
5988
6528
|
const arrowY = (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y;
|
|
5989
6529
|
const cannotCenterArrow = ((_middlewareData$arrow3 = middlewareData.arrow) === null || _middlewareData$arrow3 === void 0 ? void 0 : _middlewareData$arrow3.centerOffset) !== 0;
|
|
5990
|
-
const _React$
|
|
5991
|
-
_React$
|
|
5992
|
-
contentZIndex = _React$
|
|
5993
|
-
setContentZIndex = _React$
|
|
6530
|
+
const _React$useState9 = React__namespace.useState(),
|
|
6531
|
+
_React$useState0 = _slicedToArray__default["default"](_React$useState9, 2),
|
|
6532
|
+
contentZIndex = _React$useState0[0],
|
|
6533
|
+
setContentZIndex = _React$useState0[1];
|
|
5994
6534
|
useLayoutEffect2(() => {
|
|
5995
6535
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
5996
6536
|
}, [content]);
|
|
@@ -6003,7 +6543,7 @@ var PopperContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRe
|
|
|
6003
6543
|
// keep off the page when measuring
|
|
6004
6544
|
minWidth: "max-content",
|
|
6005
6545
|
zIndex: contentZIndex,
|
|
6006
|
-
|
|
6546
|
+
"--radix-popper-transform-origin": [(_middlewareData$trans = middlewareData.transformOrigin) === null || _middlewareData$trans === void 0 ? void 0 : _middlewareData$trans.x, (_middlewareData$trans2 = middlewareData.transformOrigin) === null || _middlewareData$trans2 === void 0 ? void 0 : _middlewareData$trans2.y].join(" "),
|
|
6007
6547
|
// hide the content if using the hide middleware and should be hidden
|
|
6008
6548
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
6009
6549
|
// as if the PopperContent isn't there at all
|
|
@@ -6016,6 +6556,7 @@ var PopperContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRe
|
|
|
6016
6556
|
children: /* @__PURE__ */React__namespace.createElement(PopperContentProvider, {
|
|
6017
6557
|
scope: __scopePopper,
|
|
6018
6558
|
placedSide,
|
|
6559
|
+
placedAlign,
|
|
6019
6560
|
onArrowChange: setArrow,
|
|
6020
6561
|
arrowX,
|
|
6021
6562
|
arrowY,
|
|
@@ -6027,26 +6568,26 @@ var PopperContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRe
|
|
|
6027
6568
|
ref: composedRefs,
|
|
6028
6569
|
style: {
|
|
6029
6570
|
...contentProps.style,
|
|
6030
|
-
// if the PopperContent hasn't been placed yet (not all
|
|
6031
|
-
// we prevent animations so that users'
|
|
6032
|
-
|
|
6571
|
+
// if the PopperContent hasn't been placed yet (not all
|
|
6572
|
+
// measurements done) we prevent animations so that users'
|
|
6573
|
+
// animations don't kick in too early from the wrong sides.
|
|
6574
|
+
animation: !isPositioned ? "none" : (_contentProps$style = contentProps.style) === null || _contentProps$style === void 0 ? void 0 : _contentProps$style.animation
|
|
6033
6575
|
}
|
|
6034
6576
|
})
|
|
6035
6577
|
})
|
|
6036
6578
|
});
|
|
6037
|
-
});
|
|
6038
|
-
|
|
6039
|
-
var ARROW_NAME$2 = "PopperArrow";
|
|
6579
|
+
}, "PopperContent"));
|
|
6580
|
+
var ARROW_NAME = "PopperArrow";
|
|
6040
6581
|
var OPPOSITE_SIDE = {
|
|
6041
6582
|
top: "bottom",
|
|
6042
6583
|
right: "left",
|
|
6043
6584
|
bottom: "top",
|
|
6044
6585
|
left: "right"
|
|
6045
6586
|
};
|
|
6046
|
-
var PopperArrow =
|
|
6587
|
+
var PopperArrow = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$6(function PopperArrow2(props, forwardedRef) {
|
|
6047
6588
|
const __scopePopper = props.__scopePopper,
|
|
6048
6589
|
arrowProps = _objectWithoutProperties__default["default"](props, _excluded3$2);
|
|
6049
|
-
const contentContext = useContentContext(ARROW_NAME
|
|
6590
|
+
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
6050
6591
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
6051
6592
|
return (// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
6052
6593
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -6073,7 +6614,7 @@ var PopperArrow = /*#__PURE__*/React__namespace.forwardRef(function PopperArrow2
|
|
|
6073
6614
|
}[contentContext.placedSide],
|
|
6074
6615
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
6075
6616
|
},
|
|
6076
|
-
children: /* @__PURE__ */React__namespace.createElement(
|
|
6617
|
+
children: /* @__PURE__ */React__namespace.createElement(Arrow, {
|
|
6077
6618
|
...arrowProps,
|
|
6078
6619
|
ref: forwardedRef,
|
|
6079
6620
|
style: {
|
|
@@ -6084,12 +6625,12 @@ var PopperArrow = /*#__PURE__*/React__namespace.forwardRef(function PopperArrow2
|
|
|
6084
6625
|
})
|
|
6085
6626
|
})
|
|
6086
6627
|
);
|
|
6087
|
-
});
|
|
6088
|
-
PopperArrow.displayName = ARROW_NAME$2;
|
|
6628
|
+
}, "PopperArrow"));
|
|
6089
6629
|
function isNotNull(value) {
|
|
6090
6630
|
return value !== null;
|
|
6091
6631
|
}
|
|
6092
|
-
|
|
6632
|
+
__name$6(isNotNull, "isNotNull");
|
|
6633
|
+
var transformOrigin = /* @__PURE__ */__name$6(options => ({
|
|
6093
6634
|
name: "transformOrigin",
|
|
6094
6635
|
options,
|
|
6095
6636
|
fn(data) {
|
|
@@ -6134,7 +6675,7 @@ var transformOrigin = options => ({
|
|
|
6134
6675
|
}
|
|
6135
6676
|
};
|
|
6136
6677
|
}
|
|
6137
|
-
});
|
|
6678
|
+
}), "transformOrigin");
|
|
6138
6679
|
function getSideAndAlignFromPlacement(placement) {
|
|
6139
6680
|
const _placement$split = placement.split("-"),
|
|
6140
6681
|
_placement$split2 = _slicedToArray__default["default"](_placement$split, 2),
|
|
@@ -6143,15 +6684,16 @@ function getSideAndAlignFromPlacement(placement) {
|
|
|
6143
6684
|
align = _placement$split2$ === void 0 ? "center" : _placement$split2$;
|
|
6144
6685
|
return [side, align];
|
|
6145
6686
|
}
|
|
6146
|
-
|
|
6147
|
-
var Anchor = PopperAnchor;
|
|
6148
|
-
var Content = PopperContent;
|
|
6149
|
-
var Arrow = PopperArrow;
|
|
6687
|
+
__name$6(getSideAndAlignFromPlacement, "getSideAndAlignFromPlacement");
|
|
6150
6688
|
|
|
6151
6689
|
"use client";
|
|
6152
6690
|
const _excluded$g = ["container"];
|
|
6153
|
-
var
|
|
6154
|
-
var
|
|
6691
|
+
var __defProp$5 = Object.defineProperty;
|
|
6692
|
+
var __name$5 = (target, value) => __defProp$5(target, "name", {
|
|
6693
|
+
value,
|
|
6694
|
+
configurable: true
|
|
6695
|
+
});
|
|
6696
|
+
var Portal = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$5(function Portal2(props, forwardedRef) {
|
|
6155
6697
|
var _globalThis$document;
|
|
6156
6698
|
const containerProp = props.container,
|
|
6157
6699
|
portalProps = _objectWithoutProperties__default["default"](props, _excluded$g);
|
|
@@ -6161,37 +6703,40 @@ var Portal$1 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
6161
6703
|
setMounted = _React$useState2[1];
|
|
6162
6704
|
useLayoutEffect2(() => setMounted(true), []);
|
|
6163
6705
|
const container = containerProp || mounted && (globalThis === null || globalThis === void 0 || (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body);
|
|
6164
|
-
return container ? /*#__PURE__*/
|
|
6706
|
+
return container ? /*#__PURE__*/ReactDOM__namespace.createPortal(/* @__PURE__ */React__namespace.createElement(Primitive.div, {
|
|
6165
6707
|
...portalProps,
|
|
6166
6708
|
ref: forwardedRef
|
|
6167
6709
|
}), container) : null;
|
|
6168
|
-
});
|
|
6169
|
-
Portal$1.displayName = PORTAL_NAME$2;
|
|
6170
|
-
var Root$2 = Portal$1;
|
|
6710
|
+
}, "Portal"));
|
|
6171
6711
|
|
|
6172
6712
|
"use client";
|
|
6713
|
+
var __defProp$4 = Object.defineProperty;
|
|
6714
|
+
var __name$4 = (target, value) => __defProp$4(target, "name", {
|
|
6715
|
+
value,
|
|
6716
|
+
configurable: true
|
|
6717
|
+
});
|
|
6173
6718
|
function useStateMachine(initialState, machine) {
|
|
6174
6719
|
return React__namespace.useReducer((state, event) => {
|
|
6175
6720
|
const nextState = machine[state][event];
|
|
6176
6721
|
return nextState !== null && nextState !== void 0 ? nextState : state;
|
|
6177
6722
|
}, initialState);
|
|
6178
6723
|
}
|
|
6724
|
+
__name$4(useStateMachine, "useStateMachine");
|
|
6179
6725
|
|
|
6180
6726
|
// src/presence.tsx
|
|
6181
|
-
var Presence = props => {
|
|
6727
|
+
var Presence = /* @__PURE__ */__name$4(props => {
|
|
6182
6728
|
const present = props.present,
|
|
6183
6729
|
children = props.children;
|
|
6184
6730
|
const presence = usePresence(present);
|
|
6185
6731
|
const child = typeof children === "function" ? children({
|
|
6186
6732
|
present: presence.isPresent
|
|
6187
6733
|
}) : React__namespace.Children.only(children);
|
|
6188
|
-
const ref =
|
|
6734
|
+
const ref = useStableComposedRefs(presence.ref, getElementRef(child));
|
|
6189
6735
|
const forceMount = typeof children === "function";
|
|
6190
6736
|
return forceMount || presence.isPresent ? /*#__PURE__*/React__namespace.cloneElement(child, {
|
|
6191
6737
|
ref
|
|
6192
6738
|
}) : null;
|
|
6193
|
-
};
|
|
6194
|
-
Presence.displayName = "Presence";
|
|
6739
|
+
}, "Presence");
|
|
6195
6740
|
function usePresence(present) {
|
|
6196
6741
|
var _context;
|
|
6197
6742
|
const _React2$useState = React__namespace.useState(),
|
|
@@ -6201,6 +6746,7 @@ function usePresence(present) {
|
|
|
6201
6746
|
const stylesRef = React__namespace.useRef(null);
|
|
6202
6747
|
const prevPresentRef = React__namespace.useRef(present);
|
|
6203
6748
|
const prevAnimationNameRef = React__namespace.useRef("none");
|
|
6749
|
+
const mountAnimationNameRef = React__namespace.useRef(void 0);
|
|
6204
6750
|
const initialState = present ? "mounted" : "unmounted";
|
|
6205
6751
|
const _useStateMachine = useStateMachine(initialState, {
|
|
6206
6752
|
mounted: {
|
|
@@ -6219,8 +6765,13 @@ function usePresence(present) {
|
|
|
6219
6765
|
state = _useStateMachine2[0],
|
|
6220
6766
|
send = _useStateMachine2[1];
|
|
6221
6767
|
React__namespace.useEffect(() => {
|
|
6222
|
-
|
|
6223
|
-
|
|
6768
|
+
if (state === "mounted") {
|
|
6769
|
+
var _mountAnimationNameRe;
|
|
6770
|
+
prevAnimationNameRef.current = (_mountAnimationNameRe = mountAnimationNameRef.current) !== null && _mountAnimationNameRe !== void 0 ? _mountAnimationNameRe : getAnimationName(stylesRef.current);
|
|
6771
|
+
mountAnimationNameRef.current = void 0;
|
|
6772
|
+
} else {
|
|
6773
|
+
prevAnimationNameRef.current = "none";
|
|
6774
|
+
}
|
|
6224
6775
|
}, [state]);
|
|
6225
6776
|
useLayoutEffect2(() => {
|
|
6226
6777
|
const styles = stylesRef.current;
|
|
@@ -6230,6 +6781,7 @@ function usePresence(present) {
|
|
|
6230
6781
|
const prevAnimationName = prevAnimationNameRef.current;
|
|
6231
6782
|
const currentAnimationName = getAnimationName(styles);
|
|
6232
6783
|
if (present) {
|
|
6784
|
+
mountAnimationNameRef.current = currentAnimationName;
|
|
6233
6785
|
send("MOUNT");
|
|
6234
6786
|
} else if (currentAnimationName === "none" || (styles === null || styles === void 0 ? void 0 : styles.display) === "none") {
|
|
6235
6787
|
send("UNMOUNT");
|
|
@@ -6249,7 +6801,7 @@ function usePresence(present) {
|
|
|
6249
6801
|
var _node$ownerDocument$d;
|
|
6250
6802
|
let timeoutId;
|
|
6251
6803
|
const ownerWindow = (_node$ownerDocument$d = node.ownerDocument.defaultView) !== null && _node$ownerDocument$d !== void 0 ? _node$ownerDocument$d : window;
|
|
6252
|
-
const handleAnimationEnd = event => {
|
|
6804
|
+
const handleAnimationEnd = /* @__PURE__ */__name$4(event => {
|
|
6253
6805
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
6254
6806
|
const isCurrentAnimation = _includesInstanceProperty__default["default"](currentAnimationName).call(currentAnimationName, CSS.escape(event.animationName));
|
|
6255
6807
|
if (event.target === node && isCurrentAnimation) {
|
|
@@ -6264,12 +6816,12 @@ function usePresence(present) {
|
|
|
6264
6816
|
});
|
|
6265
6817
|
}
|
|
6266
6818
|
}
|
|
6267
|
-
};
|
|
6268
|
-
const handleAnimationStart = event => {
|
|
6819
|
+
}, "handleAnimationEnd");
|
|
6820
|
+
const handleAnimationStart = /* @__PURE__ */__name$4(event => {
|
|
6269
6821
|
if (event.target === node) {
|
|
6270
6822
|
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
6271
6823
|
}
|
|
6272
|
-
};
|
|
6824
|
+
}, "handleAnimationStart");
|
|
6273
6825
|
node.addEventListener("animationstart", handleAnimationStart);
|
|
6274
6826
|
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
6275
6827
|
node.addEventListener("animationend", handleAnimationEnd);
|
|
@@ -6286,14 +6838,61 @@ function usePresence(present) {
|
|
|
6286
6838
|
return {
|
|
6287
6839
|
isPresent: _includesInstanceProperty__default["default"](_context = ["mounted", "unmountSuspended"]).call(_context, state),
|
|
6288
6840
|
ref: React__namespace.useCallback(node2 => {
|
|
6289
|
-
|
|
6841
|
+
if (node2) {
|
|
6842
|
+
const styles = getComputedStyle(node2);
|
|
6843
|
+
stylesRef.current = styles;
|
|
6844
|
+
mountAnimationNameRef.current = getAnimationName(styles);
|
|
6845
|
+
} else {
|
|
6846
|
+
stylesRef.current = null;
|
|
6847
|
+
}
|
|
6290
6848
|
setNode(node2);
|
|
6291
6849
|
}, [])
|
|
6292
6850
|
};
|
|
6293
6851
|
}
|
|
6852
|
+
__name$4(usePresence, "usePresence");
|
|
6853
|
+
function setRef(ref, value) {
|
|
6854
|
+
if (typeof ref === "function") {
|
|
6855
|
+
return ref(value);
|
|
6856
|
+
} else if (ref !== null && ref !== void 0) {
|
|
6857
|
+
ref.current = value;
|
|
6858
|
+
}
|
|
6859
|
+
}
|
|
6860
|
+
__name$4(setRef, "setRef");
|
|
6861
|
+
function useStableComposedRefs() {
|
|
6862
|
+
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
6863
|
+
refs[_key] = arguments[_key];
|
|
6864
|
+
}
|
|
6865
|
+
const refsRef = React__namespace.useRef(refs);
|
|
6866
|
+
refsRef.current = refs;
|
|
6867
|
+
return React__namespace.useCallback(node => {
|
|
6868
|
+
const currentRefs = refsRef.current;
|
|
6869
|
+
let hasCleanup = false;
|
|
6870
|
+
const cleanups = currentRefs.map(ref => {
|
|
6871
|
+
const cleanup = setRef(ref, node);
|
|
6872
|
+
if (!hasCleanup && typeof cleanup === "function") {
|
|
6873
|
+
hasCleanup = true;
|
|
6874
|
+
}
|
|
6875
|
+
return cleanup;
|
|
6876
|
+
});
|
|
6877
|
+
if (hasCleanup) {
|
|
6878
|
+
return () => {
|
|
6879
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
6880
|
+
const cleanup = cleanups[i];
|
|
6881
|
+
if (typeof cleanup === "function") {
|
|
6882
|
+
cleanup();
|
|
6883
|
+
} else {
|
|
6884
|
+
setRef(currentRefs[i], null);
|
|
6885
|
+
}
|
|
6886
|
+
}
|
|
6887
|
+
};
|
|
6888
|
+
}
|
|
6889
|
+
}, []);
|
|
6890
|
+
}
|
|
6891
|
+
__name$4(useStableComposedRefs, "useStableComposedRefs");
|
|
6294
6892
|
function getAnimationName(styles) {
|
|
6295
6893
|
return (styles === null || styles === void 0 ? void 0 : styles.animationName) || "none";
|
|
6296
6894
|
}
|
|
6895
|
+
__name$4(getAnimationName, "getAnimationName");
|
|
6297
6896
|
function getElementRef(element) {
|
|
6298
6897
|
var _Object$getOwnPropert, _Object$getOwnPropert2;
|
|
6299
6898
|
let getter = (_Object$getOwnPropert = Object.getOwnPropertyDescriptor(element.props, "ref")) === null || _Object$getOwnPropert === void 0 ? void 0 : _Object$getOwnPropert.get;
|
|
@@ -6308,31 +6907,80 @@ function getElementRef(element) {
|
|
|
6308
6907
|
}
|
|
6309
6908
|
return element.props.ref || element.ref;
|
|
6310
6909
|
}
|
|
6311
|
-
|
|
6910
|
+
__name$4(getElementRef, "getElementRef");
|
|
6911
|
+
|
|
6912
|
+
var __defProp$3 = Object.defineProperty;
|
|
6913
|
+
var __name$3 = (target, value) => __defProp$3(target, "name", {
|
|
6914
|
+
value,
|
|
6915
|
+
configurable: true
|
|
6916
|
+
});
|
|
6917
|
+
var _isHydrated = false;
|
|
6918
|
+
function useIsHydrated() {
|
|
6919
|
+
const _React$useState = React__namespace.useState(_isHydrated),
|
|
6920
|
+
_React$useState2 = _slicedToArray__default["default"](_React$useState, 2),
|
|
6921
|
+
isHydrated = _React$useState2[0],
|
|
6922
|
+
setIsHydrated = _React$useState2[1];
|
|
6923
|
+
React__namespace.useEffect(() => {
|
|
6924
|
+
if (!_isHydrated) {
|
|
6925
|
+
_isHydrated = true;
|
|
6926
|
+
setIsHydrated(true);
|
|
6927
|
+
}
|
|
6928
|
+
}, []);
|
|
6929
|
+
return isHydrated;
|
|
6930
|
+
}
|
|
6931
|
+
__name$3(useIsHydrated, "useIsHydrated");
|
|
6932
|
+
|
|
6933
|
+
// src/use-is-hydrated.tsx
|
|
6934
|
+
var useReactSyncExternalStore = React__namespace[" useSyncExternalStore ".trim().toString()];
|
|
6935
|
+
function subscribe() {
|
|
6936
|
+
return () => {};
|
|
6937
|
+
}
|
|
6938
|
+
__name$3(subscribe, "subscribe");
|
|
6939
|
+
function useIsHydratedModern() {
|
|
6940
|
+
return useReactSyncExternalStore(subscribe, () => true, () => false);
|
|
6941
|
+
}
|
|
6942
|
+
__name$3(useIsHydratedModern, "useIsHydratedModern");
|
|
6943
|
+
var useIsHydrated2 = typeof useReactSyncExternalStore === "function" ? useIsHydratedModern : useIsHydrated;
|
|
6312
6944
|
|
|
6313
6945
|
"use client";
|
|
6314
6946
|
const _excluded$f = ["__scopeRovingFocusGroup", "orientation", "loop", "dir", "currentTabStopId", "defaultCurrentTabStopId", "onCurrentTabStopIdChange", "onEntryFocus", "preventScrollOnEntryFocus"],
|
|
6315
6947
|
_excluded2$3 = ["__scopeRovingFocusGroup", "focusable", "active", "tabStopId", "children"];
|
|
6948
|
+
var __defProp$2 = Object.defineProperty;
|
|
6949
|
+
var __name$2 = (target, value) => __defProp$2(target, "name", {
|
|
6950
|
+
value,
|
|
6951
|
+
configurable: true
|
|
6952
|
+
});
|
|
6316
6953
|
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
6317
6954
|
var EVENT_OPTIONS = {
|
|
6318
6955
|
bubbles: false,
|
|
6319
6956
|
cancelable: true
|
|
6320
6957
|
};
|
|
6321
|
-
var GROUP_NAME
|
|
6322
|
-
var _createCollection$1 = createCollection(GROUP_NAME
|
|
6958
|
+
var GROUP_NAME = "RovingFocusGroup";
|
|
6959
|
+
var _createCollection$1 = createCollection(GROUP_NAME),
|
|
6323
6960
|
_createCollection2$1 = _slicedToArray__default["default"](_createCollection$1, 3),
|
|
6324
6961
|
Collection$1 = _createCollection2$1[0],
|
|
6325
6962
|
useCollection$1 = _createCollection2$1[1],
|
|
6326
6963
|
createCollectionScope$1 = _createCollection2$1[2];
|
|
6327
|
-
var _createContextScope$2 = createContextScope(GROUP_NAME
|
|
6964
|
+
var _createContextScope$2 = createContextScope(GROUP_NAME, [createCollectionScope$1]),
|
|
6328
6965
|
_createContextScope2$2 = _slicedToArray__default["default"](_createContextScope$2, 2),
|
|
6329
6966
|
createRovingFocusGroupContext = _createContextScope2$2[0],
|
|
6330
6967
|
createRovingFocusGroupScope = _createContextScope2$2[1];
|
|
6331
|
-
var
|
|
6968
|
+
var Orientation = {
|
|
6969
|
+
Vertical: "vertical",
|
|
6970
|
+
Horizontal: "horizontal"
|
|
6971
|
+
};
|
|
6972
|
+
var Direction$1 = {
|
|
6973
|
+
LTR: "ltr",
|
|
6974
|
+
RTL: "rtl"
|
|
6975
|
+
};
|
|
6976
|
+
var _createRovingFocusGro = createRovingFocusGroupContext(GROUP_NAME),
|
|
6332
6977
|
_createRovingFocusGro2 = _slicedToArray__default["default"](_createRovingFocusGro, 2),
|
|
6333
6978
|
RovingFocusProvider = _createRovingFocusGro2[0],
|
|
6334
6979
|
useRovingFocusContext = _createRovingFocusGro2[1];
|
|
6335
|
-
var RovingFocusGroup =
|
|
6980
|
+
var RovingFocusGroup = /* @__PURE__ */React__namespace.forwardRef(
|
|
6981
|
+
// blank line to reduce diff noise
|
|
6982
|
+
/* @__PURE__ */
|
|
6983
|
+
__name$2(function RovingFocusGroup2(props, forwardedRef) {
|
|
6336
6984
|
return /* @__PURE__ */React__namespace.createElement(Collection$1.Provider, {
|
|
6337
6985
|
scope: props.__scopeRovingFocusGroup,
|
|
6338
6986
|
children: /* @__PURE__ */React__namespace.createElement(Collection$1.Slot, {
|
|
@@ -6343,9 +6991,8 @@ var RovingFocusGroup = /*#__PURE__*/React__namespace.forwardRef((props, forwarde
|
|
|
6343
6991
|
})
|
|
6344
6992
|
})
|
|
6345
6993
|
});
|
|
6346
|
-
});
|
|
6347
|
-
|
|
6348
|
-
var RovingFocusGroupImpl = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
6994
|
+
}, "RovingFocusGroup"));
|
|
6995
|
+
var RovingFocusGroupImpl = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$2(function RovingFocusGroupImpl2(props, forwardedRef) {
|
|
6349
6996
|
const __scopeRovingFocusGroup = props.__scopeRovingFocusGroup,
|
|
6350
6997
|
orientation = props.orientation,
|
|
6351
6998
|
_props$loop = props.loop,
|
|
@@ -6365,7 +7012,7 @@ var RovingFocusGroupImpl = /*#__PURE__*/React__namespace.forwardRef((props, forw
|
|
|
6365
7012
|
prop: currentTabStopIdProp,
|
|
6366
7013
|
defaultProp: defaultCurrentTabStopId !== null && defaultCurrentTabStopId !== void 0 ? defaultCurrentTabStopId : null,
|
|
6367
7014
|
onChange: onCurrentTabStopIdChange,
|
|
6368
|
-
caller: GROUP_NAME
|
|
7015
|
+
caller: GROUP_NAME
|
|
6369
7016
|
}),
|
|
6370
7017
|
_useControllableState2 = _slicedToArray__default["default"](_useControllableState, 2),
|
|
6371
7018
|
currentTabStopId = _useControllableState2[0],
|
|
@@ -6429,9 +7076,12 @@ var RovingFocusGroupImpl = /*#__PURE__*/React__namespace.forwardRef((props, forw
|
|
|
6429
7076
|
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
|
|
6430
7077
|
})
|
|
6431
7078
|
});
|
|
6432
|
-
});
|
|
6433
|
-
var ITEM_NAME$
|
|
6434
|
-
var RovingFocusGroupItem =
|
|
7079
|
+
}, "RovingFocusGroupImpl"));
|
|
7080
|
+
var ITEM_NAME$1 = "RovingFocusGroupItem";
|
|
7081
|
+
var RovingFocusGroupItem = /* @__PURE__ */React__namespace.forwardRef(
|
|
7082
|
+
// blank line to reduce diff noise
|
|
7083
|
+
/* @__PURE__ */
|
|
7084
|
+
__name$2(function RovingFocusGroupItem2(props, forwardedRef) {
|
|
6435
7085
|
const __scopeRovingFocusGroup = props.__scopeRovingFocusGroup,
|
|
6436
7086
|
_props$focusable = props.focusable,
|
|
6437
7087
|
focusable = _props$focusable === void 0 ? true : _props$focusable,
|
|
@@ -6442,18 +7092,27 @@ var RovingFocusGroupItem = /*#__PURE__*/React__namespace.forwardRef((props, forw
|
|
|
6442
7092
|
itemProps = _objectWithoutProperties__default["default"](props, _excluded2$3);
|
|
6443
7093
|
const autoId = useId();
|
|
6444
7094
|
const id = tabStopId || autoId;
|
|
6445
|
-
const context = useRovingFocusContext(ITEM_NAME$
|
|
7095
|
+
const context = useRovingFocusContext(ITEM_NAME$1, __scopeRovingFocusGroup);
|
|
6446
7096
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
6447
7097
|
const getItems = useCollection$1(__scopeRovingFocusGroup);
|
|
6448
7098
|
const onFocusableItemAdd = context.onFocusableItemAdd,
|
|
6449
7099
|
onFocusableItemRemove = context.onFocusableItemRemove,
|
|
6450
7100
|
currentTabStopId = context.currentTabStopId;
|
|
7101
|
+
const isHydrated = useIsHydrated2();
|
|
7102
|
+
useLayoutEffect2(() => {
|
|
7103
|
+
if (!isHydrated || !focusable) {
|
|
7104
|
+
return;
|
|
7105
|
+
}
|
|
7106
|
+
onFocusableItemAdd();
|
|
7107
|
+
return () => onFocusableItemRemove();
|
|
7108
|
+
}, [isHydrated, focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
6451
7109
|
React__namespace.useEffect(() => {
|
|
6452
|
-
if (focusable) {
|
|
6453
|
-
|
|
6454
|
-
return () => onFocusableItemRemove();
|
|
7110
|
+
if (isHydrated || !focusable) {
|
|
7111
|
+
return;
|
|
6455
7112
|
}
|
|
6456
|
-
|
|
7113
|
+
onFocusableItemAdd();
|
|
7114
|
+
return () => onFocusableItemRemove();
|
|
7115
|
+
}, [isHydrated, focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
6457
7116
|
return /* @__PURE__ */React__namespace.createElement(Collection$1.ItemSlot, {
|
|
6458
7117
|
scope: __scopeRovingFocusGroup,
|
|
6459
7118
|
id,
|
|
@@ -6494,8 +7153,7 @@ var RovingFocusGroupItem = /*#__PURE__*/React__namespace.forwardRef((props, forw
|
|
|
6494
7153
|
}) : children
|
|
6495
7154
|
})
|
|
6496
7155
|
});
|
|
6497
|
-
});
|
|
6498
|
-
RovingFocusGroupItem.displayName = ITEM_NAME$2;
|
|
7156
|
+
}, "RovingFocusGroupItem"));
|
|
6499
7157
|
var MAP_KEY_TO_FOCUS_INTENT = {
|
|
6500
7158
|
ArrowLeft: "prev",
|
|
6501
7159
|
ArrowUp: "prev",
|
|
@@ -6507,16 +7165,22 @@ var MAP_KEY_TO_FOCUS_INTENT = {
|
|
|
6507
7165
|
End: "last"
|
|
6508
7166
|
};
|
|
6509
7167
|
function getDirectionAwareKey(key, dir) {
|
|
6510
|
-
if (dir !==
|
|
7168
|
+
if (dir !== Direction$1.RTL) return key;
|
|
6511
7169
|
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
6512
7170
|
}
|
|
7171
|
+
__name$2(getDirectionAwareKey, "getDirectionAwareKey");
|
|
6513
7172
|
function getFocusIntent(event, orientation, dir) {
|
|
6514
7173
|
var _context, _context2;
|
|
6515
7174
|
const key = getDirectionAwareKey(event.key, dir);
|
|
6516
|
-
if (orientation ===
|
|
6517
|
-
|
|
7175
|
+
if (orientation === Orientation.Vertical && _includesInstanceProperty__default["default"](_context = ["ArrowLeft", "ArrowRight"]).call(_context, key)) {
|
|
7176
|
+
return void 0;
|
|
7177
|
+
}
|
|
7178
|
+
if (orientation === Orientation.Horizontal && _includesInstanceProperty__default["default"](_context2 = ["ArrowUp", "ArrowDown"]).call(_context2, key)) {
|
|
7179
|
+
return void 0;
|
|
7180
|
+
}
|
|
6518
7181
|
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
6519
7182
|
}
|
|
7183
|
+
__name$2(getFocusIntent, "getFocusIntent");
|
|
6520
7184
|
function focusFirst$1(candidates) {
|
|
6521
7185
|
let preventScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
6522
7186
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -6528,11 +7192,11 @@ function focusFirst$1(candidates) {
|
|
|
6528
7192
|
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
6529
7193
|
}
|
|
6530
7194
|
}
|
|
7195
|
+
__name$2(focusFirst$1, "focusFirst");
|
|
6531
7196
|
function wrapArray$1(array, startIndex) {
|
|
6532
7197
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
6533
7198
|
}
|
|
6534
|
-
|
|
6535
|
-
var Item = RovingFocusGroupItem;
|
|
7199
|
+
__name$2(wrapArray$1, "wrapArray");
|
|
6536
7200
|
|
|
6537
7201
|
var getDefaultParent = function (originalTarget) {
|
|
6538
7202
|
if (typeof document === 'undefined') {
|
|
@@ -8053,7 +8717,16 @@ const _excluded$e = ["__scopeMenu"],
|
|
|
8053
8717
|
_excluded1$1 = ["__scopeMenu", "forceMount"],
|
|
8054
8718
|
_excluded10$1 = ["__scopeMenu"],
|
|
8055
8719
|
_excluded11$1 = ["__scopeMenu"],
|
|
8056
|
-
_excluded12$1 = ["forceMount"];
|
|
8720
|
+
_excluded12$1 = ["forceMount", "align"];
|
|
8721
|
+
var __defProp$1 = Object.defineProperty;
|
|
8722
|
+
var __name$1 = (target, value) => __defProp$1(target, "name", {
|
|
8723
|
+
value,
|
|
8724
|
+
configurable: true
|
|
8725
|
+
});
|
|
8726
|
+
var Direction = {
|
|
8727
|
+
LTR: "ltr",
|
|
8728
|
+
RTL: "rtl"
|
|
8729
|
+
};
|
|
8057
8730
|
var SELECTION_KEYS = ["Enter", " "];
|
|
8058
8731
|
var FIRST_KEYS = ["ArrowDown", "PageUp", "Home"];
|
|
8059
8732
|
var LAST_KEYS = ["ArrowUp", "PageDown", "End"];
|
|
@@ -8086,7 +8759,7 @@ var _createMenuContext3 = createMenuContext(MENU_NAME),
|
|
|
8086
8759
|
_createMenuContext4 = _slicedToArray__default["default"](_createMenuContext3, 2),
|
|
8087
8760
|
MenuRootProvider = _createMenuContext4[0],
|
|
8088
8761
|
useMenuRootContext = _createMenuContext4[1];
|
|
8089
|
-
var Menu$1 = props => {
|
|
8762
|
+
var Menu$1 = /* @__PURE__ */__name$1(props => {
|
|
8090
8763
|
const __scopeMenu = props.__scopeMenu,
|
|
8091
8764
|
_props$open = props.open,
|
|
8092
8765
|
open = _props$open === void 0 ? false : _props$open,
|
|
@@ -8104,7 +8777,7 @@ var Menu$1 = props => {
|
|
|
8104
8777
|
const handleOpenChange = useCallbackRef$1(onOpenChange);
|
|
8105
8778
|
const direction = useDirection(dir);
|
|
8106
8779
|
React__namespace.useEffect(() => {
|
|
8107
|
-
const handleKeyDown = () => {
|
|
8780
|
+
const handleKeyDown = /* @__PURE__ */__name$1(() => {
|
|
8108
8781
|
isUsingKeyboardRef.current = true;
|
|
8109
8782
|
document.addEventListener("pointerdown", handlePointer, {
|
|
8110
8783
|
capture: true,
|
|
@@ -8114,8 +8787,8 @@ var Menu$1 = props => {
|
|
|
8114
8787
|
capture: true,
|
|
8115
8788
|
once: true
|
|
8116
8789
|
});
|
|
8117
|
-
};
|
|
8118
|
-
const handlePointer = () => isUsingKeyboardRef.current = false;
|
|
8790
|
+
}, "handleKeyDown");
|
|
8791
|
+
const handlePointer = /* @__PURE__ */__name$1(() => isUsingKeyboardRef.current = false, "handlePointer");
|
|
8119
8792
|
document.addEventListener("keydown", handleKeyDown, {
|
|
8120
8793
|
capture: true
|
|
8121
8794
|
});
|
|
@@ -8131,7 +8804,15 @@ var Menu$1 = props => {
|
|
|
8131
8804
|
});
|
|
8132
8805
|
};
|
|
8133
8806
|
}, []);
|
|
8134
|
-
|
|
8807
|
+
React__namespace.useEffect(() => {
|
|
8808
|
+
if (!open) {
|
|
8809
|
+
return;
|
|
8810
|
+
}
|
|
8811
|
+
const handleBlur = /* @__PURE__ */__name$1(() => handleOpenChange(false), "handleBlur");
|
|
8812
|
+
window.addEventListener("blur", handleBlur);
|
|
8813
|
+
return () => window.removeEventListener("blur", handleBlur);
|
|
8814
|
+
}, [open, handleOpenChange]);
|
|
8815
|
+
return /* @__PURE__ */React__namespace.createElement(Popper, {
|
|
8135
8816
|
...popperScope,
|
|
8136
8817
|
children: /* @__PURE__ */React__namespace.createElement(MenuProvider, {
|
|
8137
8818
|
scope: __scopeMenu,
|
|
@@ -8149,53 +8830,49 @@ var Menu$1 = props => {
|
|
|
8149
8830
|
})
|
|
8150
8831
|
})
|
|
8151
8832
|
});
|
|
8152
|
-
};
|
|
8153
|
-
|
|
8154
|
-
var ANCHOR_NAME = "MenuAnchor";
|
|
8155
|
-
var MenuAnchor = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
8833
|
+
}, "Menu");
|
|
8834
|
+
var MenuAnchor = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuAnchor2(props, forwardedRef) {
|
|
8156
8835
|
const __scopeMenu = props.__scopeMenu,
|
|
8157
8836
|
anchorProps = _objectWithoutProperties__default["default"](props, _excluded$e);
|
|
8158
8837
|
const popperScope = usePopperScope(__scopeMenu);
|
|
8159
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
8838
|
+
return /* @__PURE__ */React__namespace.createElement(PopperAnchor, {
|
|
8160
8839
|
...popperScope,
|
|
8161
8840
|
...anchorProps,
|
|
8162
8841
|
ref: forwardedRef
|
|
8163
8842
|
});
|
|
8164
|
-
});
|
|
8165
|
-
|
|
8166
|
-
var
|
|
8167
|
-
var _createMenuContext5 = createMenuContext(PORTAL_NAME$1, {
|
|
8843
|
+
}, "MenuAnchor"));
|
|
8844
|
+
var PORTAL_NAME = "MenuPortal";
|
|
8845
|
+
var _createMenuContext5 = createMenuContext(PORTAL_NAME, {
|
|
8168
8846
|
forceMount: void 0
|
|
8169
8847
|
}),
|
|
8170
8848
|
_createMenuContext6 = _slicedToArray__default["default"](_createMenuContext5, 2),
|
|
8171
8849
|
PortalProvider = _createMenuContext6[0],
|
|
8172
8850
|
usePortalContext = _createMenuContext6[1];
|
|
8173
|
-
var MenuPortal = props => {
|
|
8851
|
+
var MenuPortal = /* @__PURE__ */__name$1(props => {
|
|
8174
8852
|
const __scopeMenu = props.__scopeMenu,
|
|
8175
8853
|
forceMount = props.forceMount,
|
|
8176
8854
|
children = props.children,
|
|
8177
8855
|
container = props.container;
|
|
8178
|
-
const context = useMenuContext$1(PORTAL_NAME
|
|
8856
|
+
const context = useMenuContext$1(PORTAL_NAME, __scopeMenu);
|
|
8179
8857
|
return /* @__PURE__ */React__namespace.createElement(PortalProvider, {
|
|
8180
8858
|
scope: __scopeMenu,
|
|
8181
8859
|
forceMount,
|
|
8182
8860
|
children: /* @__PURE__ */React__namespace.createElement(Presence, {
|
|
8183
8861
|
present: forceMount || context.open,
|
|
8184
|
-
children: /* @__PURE__ */React__namespace.createElement(Portal
|
|
8862
|
+
children: /* @__PURE__ */React__namespace.createElement(Portal, {
|
|
8185
8863
|
asChild: true,
|
|
8186
8864
|
container,
|
|
8187
8865
|
children
|
|
8188
8866
|
})
|
|
8189
8867
|
})
|
|
8190
8868
|
});
|
|
8191
|
-
};
|
|
8192
|
-
MenuPortal.displayName = PORTAL_NAME$1;
|
|
8869
|
+
}, "MenuPortal");
|
|
8193
8870
|
var CONTENT_NAME$1 = "MenuContent";
|
|
8194
8871
|
var _createMenuContext7 = createMenuContext(CONTENT_NAME$1),
|
|
8195
8872
|
_createMenuContext8 = _slicedToArray__default["default"](_createMenuContext7, 2),
|
|
8196
8873
|
MenuContentProvider = _createMenuContext8[0],
|
|
8197
8874
|
useMenuContentContext = _createMenuContext8[1];
|
|
8198
|
-
var MenuContent =
|
|
8875
|
+
var MenuContent = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuContent2(props, forwardedRef) {
|
|
8199
8876
|
const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
8200
8877
|
const _props$forceMount = props.forceMount,
|
|
8201
8878
|
forceMount = _props$forceMount === void 0 ? portalContext.forceMount : _props$forceMount,
|
|
@@ -8218,8 +8895,11 @@ var MenuContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef)
|
|
|
8218
8895
|
})
|
|
8219
8896
|
})
|
|
8220
8897
|
});
|
|
8221
|
-
});
|
|
8222
|
-
var MenuRootContentModal =
|
|
8898
|
+
}, "MenuContent"));
|
|
8899
|
+
var MenuRootContentModal = /* @__PURE__ */React__namespace.forwardRef(
|
|
8900
|
+
// blank line to reduce diff noise
|
|
8901
|
+
/* @__PURE__ */
|
|
8902
|
+
__name$1(function MenuRootContentModal2(props, forwardedRef) {
|
|
8223
8903
|
const context = useMenuContext$1(CONTENT_NAME$1, props.__scopeMenu);
|
|
8224
8904
|
const ref = React__namespace.useRef(null);
|
|
8225
8905
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
@@ -8238,8 +8918,8 @@ var MenuRootContentModal = /*#__PURE__*/React__namespace.forwardRef((props, forw
|
|
|
8238
8918
|
}),
|
|
8239
8919
|
onDismiss: () => context.onOpenChange(false)
|
|
8240
8920
|
});
|
|
8241
|
-
});
|
|
8242
|
-
var MenuRootContentNonModal =
|
|
8921
|
+
}, "MenuRootContentModal"));
|
|
8922
|
+
var MenuRootContentNonModal = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuRootContentNonModal2(props, forwardedRef) {
|
|
8243
8923
|
const context = useMenuContext$1(CONTENT_NAME$1, props.__scopeMenu);
|
|
8244
8924
|
return /* @__PURE__ */React__namespace.createElement(MenuContentImpl, {
|
|
8245
8925
|
...props,
|
|
@@ -8249,9 +8929,12 @@ var MenuRootContentNonModal = /*#__PURE__*/React__namespace.forwardRef((props, f
|
|
|
8249
8929
|
disableOutsideScroll: false,
|
|
8250
8930
|
onDismiss: () => context.onOpenChange(false)
|
|
8251
8931
|
});
|
|
8252
|
-
});
|
|
8932
|
+
}, "MenuRootContentNonModal"));
|
|
8253
8933
|
var Slot = createSlot("MenuContent.ScrollLock");
|
|
8254
|
-
var MenuContentImpl =
|
|
8934
|
+
var MenuContentImpl = /* @__PURE__ */React__namespace.forwardRef(
|
|
8935
|
+
// blank line to reduce diff noise
|
|
8936
|
+
/* @__PURE__ */
|
|
8937
|
+
__name$1(function MenuContentImpl2(props, forwardedRef) {
|
|
8255
8938
|
const __scopeMenu = props.__scopeMenu,
|
|
8256
8939
|
_props$loop = props.loop,
|
|
8257
8940
|
loop = _props$loop === void 0 ? false : _props$loop,
|
|
@@ -8277,19 +8960,32 @@ var MenuContentImpl = /*#__PURE__*/React__namespace.forwardRef((props, forwarded
|
|
|
8277
8960
|
currentItemId = _React$useState4[0],
|
|
8278
8961
|
setCurrentItemId = _React$useState4[1];
|
|
8279
8962
|
const contentRef = React__namespace.useRef(null);
|
|
8280
|
-
const
|
|
8963
|
+
const _React$useState5 = React__namespace.useState(null),
|
|
8964
|
+
_React$useState6 = _slicedToArray__default["default"](_React$useState5, 2),
|
|
8965
|
+
branchNode = _React$useState6[0],
|
|
8966
|
+
setBranchNode = _React$useState6[1];
|
|
8967
|
+
useFocusScopeBranch(branchNode);
|
|
8968
|
+
const _useFocusScopeBranchR = useFocusScopeBranchRegistry(),
|
|
8969
|
+
branchNodes = _useFocusScopeBranchR.nodes,
|
|
8970
|
+
branchRegistry = _useFocusScopeBranchR.registry;
|
|
8971
|
+
const isModal = Boolean(trapFocus || disableOutsideScroll);
|
|
8972
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange, setBranchNode);
|
|
8281
8973
|
const timerRef = React__namespace.useRef(0);
|
|
8282
8974
|
const searchRef = React__namespace.useRef("");
|
|
8283
8975
|
const pointerGraceTimerRef = React__namespace.useRef(0);
|
|
8284
8976
|
const pointerGraceIntentRef = React__namespace.useRef(null);
|
|
8285
8977
|
const pointerDirRef = React__namespace.useRef("right");
|
|
8286
8978
|
const lastPointerXRef = React__namespace.useRef(0);
|
|
8979
|
+
const shards = React__namespace.useMemo(() => disableOutsideScroll ? [contentRef, ...branchNodes.map(node => ({
|
|
8980
|
+
current: node
|
|
8981
|
+
}))] : [], [contentRef, branchNodes, disableOutsideScroll]);
|
|
8287
8982
|
const ScrollLockWrapper = disableOutsideScroll ? ReactRemoveScroll : React__namespace.Fragment;
|
|
8288
8983
|
const scrollLockWrapperProps = disableOutsideScroll ? {
|
|
8289
8984
|
as: Slot,
|
|
8290
|
-
allowPinchZoom: true
|
|
8985
|
+
allowPinchZoom: true,
|
|
8986
|
+
shards
|
|
8291
8987
|
} : void 0;
|
|
8292
|
-
const handleTypeaheadSearch = key => {
|
|
8988
|
+
const handleTypeaheadSearch = /* @__PURE__ */__name$1(key => {
|
|
8293
8989
|
var _items$find, _items$find2;
|
|
8294
8990
|
const search = searchRef.current + key;
|
|
8295
8991
|
const items = getItems().filter(item => !item.disabled);
|
|
@@ -8298,15 +8994,17 @@ var MenuContentImpl = /*#__PURE__*/React__namespace.forwardRef((props, forwarded
|
|
|
8298
8994
|
const values = items.map(item => item.textValue);
|
|
8299
8995
|
const nextMatch = getNextMatch(values, search, currentMatch);
|
|
8300
8996
|
const newItem = (_items$find2 = items.find(item => item.textValue === nextMatch)) === null || _items$find2 === void 0 ? void 0 : _items$find2.ref.current;
|
|
8301
|
-
|
|
8997
|
+
function updateSearch(value) {
|
|
8302
8998
|
searchRef.current = value;
|
|
8303
8999
|
window.clearTimeout(timerRef.current);
|
|
8304
9000
|
if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3);
|
|
8305
|
-
}
|
|
9001
|
+
}
|
|
9002
|
+
__name$1(updateSearch, "updateSearch");
|
|
9003
|
+
updateSearch(search);
|
|
8306
9004
|
if (newItem) {
|
|
8307
9005
|
setTimeout(() => newItem.focus());
|
|
8308
9006
|
}
|
|
8309
|
-
};
|
|
9007
|
+
}, "handleTypeaheadSearch");
|
|
8310
9008
|
React__namespace.useEffect(() => {
|
|
8311
9009
|
return () => window.clearTimeout(timerRef.current);
|
|
8312
9010
|
}, []);
|
|
@@ -8335,95 +9033,97 @@ var MenuContentImpl = /*#__PURE__*/React__namespace.forwardRef((props, forwarded
|
|
|
8335
9033
|
onPointerGraceIntentChange: React__namespace.useCallback(intent => {
|
|
8336
9034
|
pointerGraceIntentRef.current = intent;
|
|
8337
9035
|
}, []),
|
|
8338
|
-
children: /* @__PURE__ */React__namespace.createElement(
|
|
8339
|
-
|
|
8340
|
-
children: /* @__PURE__ */React__namespace.createElement(
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, event => {
|
|
8344
|
-
var _contentRef$current2;
|
|
8345
|
-
event.preventDefault();
|
|
8346
|
-
(_contentRef$current2 = contentRef.current) === null || _contentRef$current2 === void 0 || _contentRef$current2.focus({
|
|
8347
|
-
preventScroll: true
|
|
8348
|
-
});
|
|
8349
|
-
}),
|
|
8350
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
8351
|
-
children: /* @__PURE__ */React__namespace.createElement(DismissableLayer, {
|
|
9036
|
+
children: /* @__PURE__ */React__namespace.createElement(FocusScopeBranchProvider, {
|
|
9037
|
+
registry: isModal ? branchRegistry : null,
|
|
9038
|
+
children: /* @__PURE__ */React__namespace.createElement(ScrollLockWrapper, {
|
|
9039
|
+
...scrollLockWrapperProps,
|
|
9040
|
+
children: /* @__PURE__ */React__namespace.createElement(FocusScope, {
|
|
8352
9041
|
asChild: true,
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
9042
|
+
trapped: trapFocus,
|
|
9043
|
+
branches: branchNodes,
|
|
9044
|
+
onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, event => {
|
|
9045
|
+
var _contentRef$current2;
|
|
9046
|
+
event.preventDefault();
|
|
9047
|
+
(_contentRef$current2 = contentRef.current) === null || _contentRef$current2 === void 0 || _contentRef$current2.focus({
|
|
9048
|
+
preventScroll: true
|
|
9049
|
+
});
|
|
9050
|
+
}),
|
|
9051
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
|
9052
|
+
children: /* @__PURE__ */React__namespace.createElement(DismissableLayer, {
|
|
8360
9053
|
asChild: true,
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
preventScrollOnEntryFocus: true,
|
|
8371
|
-
children: /* @__PURE__ */React__namespace.createElement(Content, {
|
|
8372
|
-
role: "menu",
|
|
8373
|
-
"aria-orientation": "vertical",
|
|
8374
|
-
"data-state": getOpenState(context.open),
|
|
8375
|
-
"data-radix-menu-content": "",
|
|
9054
|
+
disableOutsidePointerEvents,
|
|
9055
|
+
onEscapeKeyDown,
|
|
9056
|
+
onPointerDownOutside,
|
|
9057
|
+
onFocusOutside,
|
|
9058
|
+
onInteractOutside,
|
|
9059
|
+
onDismiss,
|
|
9060
|
+
children: /* @__PURE__ */React__namespace.createElement(RovingFocusGroup, {
|
|
9061
|
+
asChild: true,
|
|
9062
|
+
...rovingFocusGroupScope,
|
|
8376
9063
|
dir: rootContext.dir,
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
},
|
|
8384
|
-
onKeyDown: composeEventHandlers(contentProps.onKeyDown, event => {
|
|
8385
|
-
const target = event.target;
|
|
8386
|
-
const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget;
|
|
8387
|
-
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
8388
|
-
const isCharacterKey = event.key.length === 1;
|
|
8389
|
-
if (isKeyDownInside) {
|
|
8390
|
-
if (event.key === "Tab") event.preventDefault();
|
|
8391
|
-
if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
|
|
8392
|
-
}
|
|
8393
|
-
const content = contentRef.current;
|
|
8394
|
-
if (event.target !== content) return;
|
|
8395
|
-
if (!_includesInstanceProperty__default["default"](FIRST_LAST_KEYS).call(FIRST_LAST_KEYS, event.key)) return;
|
|
8396
|
-
event.preventDefault();
|
|
8397
|
-
const items = getItems().filter(item => !item.disabled);
|
|
8398
|
-
const candidateNodes = items.map(item => item.ref.current);
|
|
8399
|
-
if (_includesInstanceProperty__default["default"](LAST_KEYS).call(LAST_KEYS, event.key)) candidateNodes.reverse();
|
|
8400
|
-
focusFirst(candidateNodes);
|
|
9064
|
+
orientation: "vertical",
|
|
9065
|
+
loop,
|
|
9066
|
+
currentTabStopId: currentItemId,
|
|
9067
|
+
onCurrentTabStopIdChange: setCurrentItemId,
|
|
9068
|
+
onEntryFocus: composeEventHandlers(onEntryFocus, event => {
|
|
9069
|
+
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
|
|
8401
9070
|
}),
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
}
|
|
8416
|
-
|
|
9071
|
+
preventScrollOnEntryFocus: true,
|
|
9072
|
+
children: /* @__PURE__ */React__namespace.createElement(PopperContent, {
|
|
9073
|
+
role: "menu",
|
|
9074
|
+
"aria-orientation": "vertical",
|
|
9075
|
+
"data-state": getOpenState(context.open),
|
|
9076
|
+
"data-radix-menu-content": "",
|
|
9077
|
+
dir: rootContext.dir,
|
|
9078
|
+
...popperScope,
|
|
9079
|
+
...contentProps,
|
|
9080
|
+
ref: composedRefs,
|
|
9081
|
+
style: {
|
|
9082
|
+
outline: "none",
|
|
9083
|
+
...contentProps.style
|
|
9084
|
+
},
|
|
9085
|
+
onKeyDown: composeEventHandlers(contentProps.onKeyDown, event => {
|
|
9086
|
+
const target = event.target;
|
|
9087
|
+
const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget;
|
|
9088
|
+
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
9089
|
+
const isCharacterKey = event.key.length === 1;
|
|
9090
|
+
if (isKeyDownInside) {
|
|
9091
|
+
if (event.key === "Tab") event.preventDefault();
|
|
9092
|
+
if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
|
|
9093
|
+
}
|
|
9094
|
+
const content = contentRef.current;
|
|
9095
|
+
if (event.target !== content) return;
|
|
9096
|
+
if (!_includesInstanceProperty__default["default"](FIRST_LAST_KEYS).call(FIRST_LAST_KEYS, event.key)) return;
|
|
9097
|
+
event.preventDefault();
|
|
9098
|
+
const items = getItems().filter(item => !item.disabled);
|
|
9099
|
+
const candidateNodes = items.map(item => item.ref.current);
|
|
9100
|
+
if (_includesInstanceProperty__default["default"](LAST_KEYS).call(LAST_KEYS, event.key)) candidateNodes.reverse();
|
|
9101
|
+
focusFirst(candidateNodes);
|
|
9102
|
+
}),
|
|
9103
|
+
onBlur: composeEventHandlers(props.onBlur, event => {
|
|
9104
|
+
if (!event.currentTarget.contains(event.target)) {
|
|
9105
|
+
window.clearTimeout(timerRef.current);
|
|
9106
|
+
searchRef.current = "";
|
|
9107
|
+
}
|
|
9108
|
+
}),
|
|
9109
|
+
onPointerMove: composeEventHandlers(props.onPointerMove, whenMouse(event => {
|
|
9110
|
+
const target = event.target;
|
|
9111
|
+
const pointerXHasChanged = lastPointerXRef.current !== event.clientX;
|
|
9112
|
+
if (event.currentTarget.contains(target) && pointerXHasChanged) {
|
|
9113
|
+
const newDir = event.clientX > lastPointerXRef.current ? "right" : "left";
|
|
9114
|
+
pointerDirRef.current = newDir;
|
|
9115
|
+
lastPointerXRef.current = event.clientX;
|
|
9116
|
+
}
|
|
9117
|
+
}))
|
|
9118
|
+
})
|
|
8417
9119
|
})
|
|
8418
9120
|
})
|
|
8419
9121
|
})
|
|
8420
9122
|
})
|
|
8421
9123
|
})
|
|
8422
9124
|
});
|
|
8423
|
-
});
|
|
8424
|
-
|
|
8425
|
-
var GROUP_NAME$1 = "MenuGroup";
|
|
8426
|
-
var MenuGroup = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9125
|
+
}, "MenuContentImpl"));
|
|
9126
|
+
var MenuGroup = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuGroup2(props, forwardedRef) {
|
|
8427
9127
|
const __scopeMenu = props.__scopeMenu,
|
|
8428
9128
|
groupProps = _objectWithoutProperties__default["default"](props, _excluded4$1);
|
|
8429
9129
|
return /* @__PURE__ */React__namespace.createElement(Primitive.div, {
|
|
@@ -8431,31 +9131,31 @@ var MenuGroup = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) =
|
|
|
8431
9131
|
...groupProps,
|
|
8432
9132
|
ref: forwardedRef
|
|
8433
9133
|
});
|
|
8434
|
-
});
|
|
8435
|
-
|
|
8436
|
-
var LABEL_NAME$1 = "MenuLabel";
|
|
8437
|
-
var MenuLabel = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9134
|
+
}, "MenuGroup"));
|
|
9135
|
+
var MenuLabel = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuLabel2(props, forwardedRef) {
|
|
8438
9136
|
const __scopeMenu = props.__scopeMenu,
|
|
8439
9137
|
labelProps = _objectWithoutProperties__default["default"](props, _excluded5$1);
|
|
8440
9138
|
return /* @__PURE__ */React__namespace.createElement(Primitive.div, {
|
|
8441
9139
|
...labelProps,
|
|
8442
9140
|
ref: forwardedRef
|
|
8443
9141
|
});
|
|
8444
|
-
});
|
|
8445
|
-
|
|
8446
|
-
var ITEM_NAME$1 = "MenuItem";
|
|
9142
|
+
}, "MenuLabel"));
|
|
9143
|
+
var ITEM_NAME = "MenuItem";
|
|
8447
9144
|
var ITEM_SELECT = "menu.itemSelect";
|
|
8448
|
-
var MenuItem$2 =
|
|
9145
|
+
var MenuItem$2 = /* @__PURE__ */React__namespace.forwardRef(
|
|
9146
|
+
// blank line to reduce diff noise
|
|
9147
|
+
/* @__PURE__ */
|
|
9148
|
+
__name$1(function MenuItem2(props, forwardedRef) {
|
|
8449
9149
|
const _props$disabled = props.disabled,
|
|
8450
9150
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8451
9151
|
onSelect = props.onSelect,
|
|
8452
9152
|
itemProps = _objectWithoutProperties__default["default"](props, _excluded6$1);
|
|
8453
9153
|
const ref = React__namespace.useRef(null);
|
|
8454
|
-
const rootContext = useMenuRootContext(ITEM_NAME
|
|
8455
|
-
const contentContext = useMenuContentContext(ITEM_NAME
|
|
9154
|
+
const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);
|
|
9155
|
+
const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);
|
|
8456
9156
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
8457
9157
|
const isPointerDownRef = React__namespace.useRef(false);
|
|
8458
|
-
const handleSelect = () => {
|
|
9158
|
+
const handleSelect = /* @__PURE__ */__name$1(() => {
|
|
8459
9159
|
const menuItem = ref.current;
|
|
8460
9160
|
if (!disabled && menuItem) {
|
|
8461
9161
|
const itemSelectEvent = new CustomEvent(ITEM_SELECT, {
|
|
@@ -8472,7 +9172,7 @@ var MenuItem$2 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef)
|
|
|
8472
9172
|
rootContext.onClose();
|
|
8473
9173
|
}
|
|
8474
9174
|
}
|
|
8475
|
-
};
|
|
9175
|
+
}, "handleSelect");
|
|
8476
9176
|
return /* @__PURE__ */React__namespace.createElement(MenuItemImpl, {
|
|
8477
9177
|
...itemProps,
|
|
8478
9178
|
ref: composedRefs,
|
|
@@ -8488,34 +9188,38 @@ var MenuItem$2 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef)
|
|
|
8488
9188
|
if (!isPointerDownRef.current) (_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 || _event$currentTarget.click();
|
|
8489
9189
|
}),
|
|
8490
9190
|
onKeyDown: composeEventHandlers(props.onKeyDown, event => {
|
|
9191
|
+
if (disabled || event.target !== event.currentTarget) {
|
|
9192
|
+
return;
|
|
9193
|
+
}
|
|
8491
9194
|
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
8492
|
-
if (
|
|
9195
|
+
if (isTypingAhead && event.key === " ") {
|
|
9196
|
+
return;
|
|
9197
|
+
}
|
|
8493
9198
|
if (_includesInstanceProperty__default["default"](SELECTION_KEYS).call(SELECTION_KEYS, event.key)) {
|
|
8494
9199
|
event.currentTarget.click();
|
|
8495
9200
|
event.preventDefault();
|
|
8496
9201
|
}
|
|
8497
9202
|
})
|
|
8498
9203
|
});
|
|
8499
|
-
});
|
|
8500
|
-
|
|
8501
|
-
var MenuItemImpl = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9204
|
+
}, "MenuItem"));
|
|
9205
|
+
var MenuItemImpl = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuItemImpl2(props, forwardedRef) {
|
|
8502
9206
|
const __scopeMenu = props.__scopeMenu,
|
|
8503
9207
|
_props$disabled2 = props.disabled,
|
|
8504
9208
|
disabled = _props$disabled2 === void 0 ? false : _props$disabled2,
|
|
8505
9209
|
textValue = props.textValue,
|
|
8506
9210
|
itemProps = _objectWithoutProperties__default["default"](props, _excluded7$1);
|
|
8507
|
-
const contentContext = useMenuContentContext(ITEM_NAME
|
|
9211
|
+
const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);
|
|
8508
9212
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
8509
9213
|
const ref = React__namespace.useRef(null);
|
|
8510
9214
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
8511
|
-
const _React$
|
|
8512
|
-
_React$useState6 = _slicedToArray__default["default"](_React$useState5, 2),
|
|
8513
|
-
isFocused = _React$useState6[0],
|
|
8514
|
-
setIsFocused = _React$useState6[1];
|
|
8515
|
-
const _React$useState7 = React__namespace.useState(""),
|
|
9215
|
+
const _React$useState7 = React__namespace.useState(false),
|
|
8516
9216
|
_React$useState8 = _slicedToArray__default["default"](_React$useState7, 2),
|
|
8517
|
-
|
|
8518
|
-
|
|
9217
|
+
isFocused = _React$useState8[0],
|
|
9218
|
+
setIsFocused = _React$useState8[1];
|
|
9219
|
+
const _React$useState9 = React__namespace.useState(""),
|
|
9220
|
+
_React$useState0 = _slicedToArray__default["default"](_React$useState9, 2),
|
|
9221
|
+
textContent = _React$useState0[0],
|
|
9222
|
+
setTextContent = _React$useState0[1];
|
|
8519
9223
|
React__namespace.useEffect(() => {
|
|
8520
9224
|
const menuItem = ref.current;
|
|
8521
9225
|
if (menuItem) {
|
|
@@ -8527,7 +9231,7 @@ var MenuItemImpl = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef
|
|
|
8527
9231
|
scope: __scopeMenu,
|
|
8528
9232
|
disabled,
|
|
8529
9233
|
textValue: textValue !== null && textValue !== void 0 ? textValue : textContent,
|
|
8530
|
-
children: /* @__PURE__ */React__namespace.createElement(
|
|
9234
|
+
children: /* @__PURE__ */React__namespace.createElement(RovingFocusGroupItem, {
|
|
8531
9235
|
asChild: true,
|
|
8532
9236
|
...rovingFocusGroupScope,
|
|
8533
9237
|
focusable: !disabled,
|
|
@@ -8557,9 +9261,11 @@ var MenuItemImpl = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef
|
|
|
8557
9261
|
})
|
|
8558
9262
|
})
|
|
8559
9263
|
});
|
|
8560
|
-
});
|
|
8561
|
-
var
|
|
8562
|
-
|
|
9264
|
+
}, "MenuItemImpl"));
|
|
9265
|
+
var MenuCheckboxItem = /* @__PURE__ */React__namespace.forwardRef(
|
|
9266
|
+
// blank line to reduce diff noise
|
|
9267
|
+
/* @__PURE__ */
|
|
9268
|
+
__name$1(function MenuCheckboxItem2(props, forwardedRef) {
|
|
8563
9269
|
const _props$checked = props.checked,
|
|
8564
9270
|
checked = _props$checked === void 0 ? false : _props$checked,
|
|
8565
9271
|
onCheckedChange = props.onCheckedChange,
|
|
@@ -8578,17 +9284,16 @@ var MenuCheckboxItem = /*#__PURE__*/React__namespace.forwardRef((props, forwarde
|
|
|
8578
9284
|
})
|
|
8579
9285
|
})
|
|
8580
9286
|
});
|
|
8581
|
-
});
|
|
8582
|
-
|
|
8583
|
-
var
|
|
8584
|
-
var _createMenuContext9 = createMenuContext(RADIO_GROUP_NAME$1, {
|
|
9287
|
+
}, "MenuCheckboxItem"));
|
|
9288
|
+
var RADIO_GROUP_NAME = "MenuRadioGroup";
|
|
9289
|
+
var _createMenuContext9 = createMenuContext(RADIO_GROUP_NAME, {
|
|
8585
9290
|
value: void 0,
|
|
8586
|
-
onValueChange: () => {}
|
|
9291
|
+
onValueChange: /* @__PURE__ */__name$1(() => {}, "onValueChange")
|
|
8587
9292
|
}),
|
|
8588
9293
|
_createMenuContext0 = _slicedToArray__default["default"](_createMenuContext9, 2),
|
|
8589
9294
|
RadioGroupProvider = _createMenuContext0[0],
|
|
8590
9295
|
useRadioGroupContext = _createMenuContext0[1];
|
|
8591
|
-
var MenuRadioGroup =
|
|
9296
|
+
var MenuRadioGroup = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuRadioGroup2(props, forwardedRef) {
|
|
8592
9297
|
const value = props.value,
|
|
8593
9298
|
onValueChange = props.onValueChange,
|
|
8594
9299
|
groupProps = _objectWithoutProperties__default["default"](props, _excluded9$1);
|
|
@@ -8602,13 +9307,12 @@ var MenuRadioGroup = /*#__PURE__*/React__namespace.forwardRef((props, forwardedR
|
|
|
8602
9307
|
ref: forwardedRef
|
|
8603
9308
|
})
|
|
8604
9309
|
});
|
|
8605
|
-
});
|
|
8606
|
-
|
|
8607
|
-
var
|
|
8608
|
-
var MenuRadioItem = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9310
|
+
}, "MenuRadioGroup"));
|
|
9311
|
+
var RADIO_ITEM_NAME = "MenuRadioItem";
|
|
9312
|
+
var MenuRadioItem = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuRadioItem2(props, forwardedRef) {
|
|
8609
9313
|
const value = props.value,
|
|
8610
9314
|
radioItemProps = _objectWithoutProperties__default["default"](props, _excluded0$1);
|
|
8611
|
-
const context = useRadioGroupContext(RADIO_ITEM_NAME
|
|
9315
|
+
const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);
|
|
8612
9316
|
const checked = value === context.value;
|
|
8613
9317
|
return /* @__PURE__ */React__namespace.createElement(ItemIndicatorProvider, {
|
|
8614
9318
|
scope: props.__scopeMenu,
|
|
@@ -8627,8 +9331,7 @@ var MenuRadioItem = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRe
|
|
|
8627
9331
|
})
|
|
8628
9332
|
})
|
|
8629
9333
|
});
|
|
8630
|
-
});
|
|
8631
|
-
MenuRadioItem.displayName = RADIO_ITEM_NAME$1;
|
|
9334
|
+
}, "MenuRadioItem"));
|
|
8632
9335
|
var ITEM_INDICATOR_NAME = "MenuItemIndicator";
|
|
8633
9336
|
var _createMenuContext1 = createMenuContext(ITEM_INDICATOR_NAME, {
|
|
8634
9337
|
checked: false
|
|
@@ -8636,7 +9339,10 @@ var _createMenuContext1 = createMenuContext(ITEM_INDICATOR_NAME, {
|
|
|
8636
9339
|
_createMenuContext10 = _slicedToArray__default["default"](_createMenuContext1, 2),
|
|
8637
9340
|
ItemIndicatorProvider = _createMenuContext10[0],
|
|
8638
9341
|
useItemIndicatorContext = _createMenuContext10[1];
|
|
8639
|
-
var MenuItemIndicator =
|
|
9342
|
+
var MenuItemIndicator = /* @__PURE__ */React__namespace.forwardRef(
|
|
9343
|
+
// blank line to reduce diff noise
|
|
9344
|
+
/* @__PURE__ */
|
|
9345
|
+
__name$1(function MenuItemIndicator2(props, forwardedRef) {
|
|
8640
9346
|
const __scopeMenu = props.__scopeMenu,
|
|
8641
9347
|
forceMount = props.forceMount,
|
|
8642
9348
|
itemIndicatorProps = _objectWithoutProperties__default["default"](props, _excluded1$1);
|
|
@@ -8649,10 +9355,8 @@ var MenuItemIndicator = /*#__PURE__*/React__namespace.forwardRef((props, forward
|
|
|
8649
9355
|
"data-state": getCheckedState(indicatorContext.checked)
|
|
8650
9356
|
})
|
|
8651
9357
|
});
|
|
8652
|
-
});
|
|
8653
|
-
|
|
8654
|
-
var SEPARATOR_NAME$1 = "MenuSeparator";
|
|
8655
|
-
var MenuSeparator = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9358
|
+
}, "MenuItemIndicator"));
|
|
9359
|
+
var MenuSeparator = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuSeparator2(props, forwardedRef) {
|
|
8656
9360
|
const __scopeMenu = props.__scopeMenu,
|
|
8657
9361
|
separatorProps = _objectWithoutProperties__default["default"](props, _excluded10$1);
|
|
8658
9362
|
return /* @__PURE__ */React__namespace.createElement(Primitive.div, {
|
|
@@ -8661,26 +9365,23 @@ var MenuSeparator = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRe
|
|
|
8661
9365
|
...separatorProps,
|
|
8662
9366
|
ref: forwardedRef
|
|
8663
9367
|
});
|
|
8664
|
-
});
|
|
8665
|
-
|
|
8666
|
-
var ARROW_NAME$1 = "MenuArrow";
|
|
8667
|
-
var MenuArrow = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9368
|
+
}, "MenuSeparator"));
|
|
9369
|
+
var MenuArrow = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuArrow2(props, forwardedRef) {
|
|
8668
9370
|
const __scopeMenu = props.__scopeMenu,
|
|
8669
9371
|
arrowProps = _objectWithoutProperties__default["default"](props, _excluded11$1);
|
|
8670
9372
|
const popperScope = usePopperScope(__scopeMenu);
|
|
8671
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9373
|
+
return /* @__PURE__ */React__namespace.createElement(PopperArrow, {
|
|
8672
9374
|
...popperScope,
|
|
8673
9375
|
...arrowProps,
|
|
8674
9376
|
ref: forwardedRef
|
|
8675
9377
|
});
|
|
8676
|
-
});
|
|
8677
|
-
MenuArrow.displayName = ARROW_NAME$1;
|
|
9378
|
+
}, "MenuArrow"));
|
|
8678
9379
|
var SUB_NAME = "MenuSub";
|
|
8679
9380
|
var _createMenuContext11 = createMenuContext(SUB_NAME),
|
|
8680
9381
|
_createMenuContext12 = _slicedToArray__default["default"](_createMenuContext11, 2),
|
|
8681
9382
|
MenuSubProvider = _createMenuContext12[0],
|
|
8682
9383
|
useMenuSubContext = _createMenuContext12[1];
|
|
8683
|
-
var MenuSub = props => {
|
|
9384
|
+
var MenuSub = /* @__PURE__ */__name$1(props => {
|
|
8684
9385
|
const __scopeMenu = props.__scopeMenu,
|
|
8685
9386
|
children = props.children,
|
|
8686
9387
|
_props$open2 = props.open,
|
|
@@ -8688,20 +9389,20 @@ var MenuSub = props => {
|
|
|
8688
9389
|
onOpenChange = props.onOpenChange;
|
|
8689
9390
|
const parentMenuContext = useMenuContext$1(SUB_NAME, __scopeMenu);
|
|
8690
9391
|
const popperScope = usePopperScope(__scopeMenu);
|
|
8691
|
-
const _React$useState9 = React__namespace.useState(null),
|
|
8692
|
-
_React$useState0 = _slicedToArray__default["default"](_React$useState9, 2),
|
|
8693
|
-
trigger = _React$useState0[0],
|
|
8694
|
-
setTrigger = _React$useState0[1];
|
|
8695
9392
|
const _React$useState1 = React__namespace.useState(null),
|
|
8696
9393
|
_React$useState10 = _slicedToArray__default["default"](_React$useState1, 2),
|
|
8697
|
-
|
|
8698
|
-
|
|
9394
|
+
trigger = _React$useState10[0],
|
|
9395
|
+
setTrigger = _React$useState10[1];
|
|
9396
|
+
const _React$useState11 = React__namespace.useState(null),
|
|
9397
|
+
_React$useState12 = _slicedToArray__default["default"](_React$useState11, 2),
|
|
9398
|
+
content = _React$useState12[0],
|
|
9399
|
+
setContent = _React$useState12[1];
|
|
8699
9400
|
const handleOpenChange = useCallbackRef$1(onOpenChange);
|
|
8700
9401
|
React__namespace.useEffect(() => {
|
|
8701
9402
|
if (parentMenuContext.open === false) handleOpenChange(false);
|
|
8702
9403
|
return () => handleOpenChange(false);
|
|
8703
9404
|
}, [parentMenuContext.open, handleOpenChange]);
|
|
8704
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9405
|
+
return /* @__PURE__ */React__namespace.createElement(Popper, {
|
|
8705
9406
|
...popperScope,
|
|
8706
9407
|
children: /* @__PURE__ */React__namespace.createElement(MenuProvider, {
|
|
8707
9408
|
scope: __scopeMenu,
|
|
@@ -8719,14 +9420,13 @@ var MenuSub = props => {
|
|
|
8719
9420
|
})
|
|
8720
9421
|
})
|
|
8721
9422
|
});
|
|
8722
|
-
};
|
|
8723
|
-
|
|
8724
|
-
var
|
|
8725
|
-
|
|
8726
|
-
const
|
|
8727
|
-
const
|
|
8728
|
-
const
|
|
8729
|
-
const contentContext = useMenuContentContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
9423
|
+
}, "MenuSub");
|
|
9424
|
+
var SUB_TRIGGER_NAME = "MenuSubTrigger";
|
|
9425
|
+
var MenuSubTrigger = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuSubTrigger2(props, forwardedRef) {
|
|
9426
|
+
const context = useMenuContext$1(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
9427
|
+
const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
9428
|
+
const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
9429
|
+
const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
8730
9430
|
const openTimerRef = React__namespace.useRef(null);
|
|
8731
9431
|
const pointerGraceTimerRef = contentContext.pointerGraceTimerRef,
|
|
8732
9432
|
onPointerGraceIntentChange = contentContext.onPointerGraceIntentChange;
|
|
@@ -8745,6 +9445,7 @@ var MenuSubTrigger = /*#__PURE__*/React__namespace.forwardRef((props, forwardedR
|
|
|
8745
9445
|
onPointerGraceIntentChange(null);
|
|
8746
9446
|
};
|
|
8747
9447
|
}, [pointerGraceTimerRef, onPointerGraceIntentChange]);
|
|
9448
|
+
const composedRefs = useComposedRefs(forwardedRef, subContext.onTriggerChange);
|
|
8748
9449
|
return /* @__PURE__ */React__namespace.createElement(MenuAnchor, {
|
|
8749
9450
|
asChild: true,
|
|
8750
9451
|
...scope,
|
|
@@ -8752,10 +9453,10 @@ var MenuSubTrigger = /*#__PURE__*/React__namespace.forwardRef((props, forwardedR
|
|
|
8752
9453
|
id: subContext.triggerId,
|
|
8753
9454
|
"aria-haspopup": "menu",
|
|
8754
9455
|
"aria-expanded": context.open,
|
|
8755
|
-
"aria-controls": subContext.contentId,
|
|
9456
|
+
"aria-controls": context.open ? subContext.contentId : void 0,
|
|
8756
9457
|
"data-state": getOpenState(context.open),
|
|
8757
9458
|
...props,
|
|
8758
|
-
ref:
|
|
9459
|
+
ref: composedRefs,
|
|
8759
9460
|
onClick: event => {
|
|
8760
9461
|
var _props$onClick;
|
|
8761
9462
|
(_props$onClick = props.onClick) === null || _props$onClick === void 0 || _props$onClick.call(props, event);
|
|
@@ -8817,8 +9518,13 @@ var MenuSubTrigger = /*#__PURE__*/React__namespace.forwardRef((props, forwardedR
|
|
|
8817
9518
|
})),
|
|
8818
9519
|
onKeyDown: composeEventHandlers(props.onKeyDown, event => {
|
|
8819
9520
|
var _context;
|
|
9521
|
+
if (props.disabled || event.target !== event.currentTarget) {
|
|
9522
|
+
return;
|
|
9523
|
+
}
|
|
8820
9524
|
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
8821
|
-
if (
|
|
9525
|
+
if (isTypingAhead && event.key === " ") {
|
|
9526
|
+
return;
|
|
9527
|
+
}
|
|
8822
9528
|
if (_includesInstanceProperty__default["default"](_context = SUB_OPEN_KEYS[rootContext.dir]).call(_context, event.key)) {
|
|
8823
9529
|
var _context$content3;
|
|
8824
9530
|
context.onOpenChange(true);
|
|
@@ -8828,17 +9534,18 @@ var MenuSubTrigger = /*#__PURE__*/React__namespace.forwardRef((props, forwardedR
|
|
|
8828
9534
|
})
|
|
8829
9535
|
})
|
|
8830
9536
|
});
|
|
8831
|
-
});
|
|
8832
|
-
|
|
8833
|
-
var
|
|
8834
|
-
var MenuSubContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9537
|
+
}, "MenuSubTrigger"));
|
|
9538
|
+
var SUB_CONTENT_NAME = "MenuSubContent";
|
|
9539
|
+
var MenuSubContent = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name$1(function MenuSubContent2(props, forwardedRef) {
|
|
8835
9540
|
const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
8836
9541
|
const _props$forceMount2 = props.forceMount,
|
|
8837
9542
|
forceMount = _props$forceMount2 === void 0 ? portalContext.forceMount : _props$forceMount2,
|
|
9543
|
+
_props$align = props.align,
|
|
9544
|
+
align = _props$align === void 0 ? "start" : _props$align,
|
|
8838
9545
|
subContentProps = _objectWithoutProperties__default["default"](props, _excluded12$1);
|
|
8839
9546
|
const context = useMenuContext$1(CONTENT_NAME$1, props.__scopeMenu);
|
|
8840
9547
|
const rootContext = useMenuRootContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
8841
|
-
const subContext = useMenuSubContext(SUB_CONTENT_NAME
|
|
9548
|
+
const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);
|
|
8842
9549
|
const ref = React__namespace.useRef(null);
|
|
8843
9550
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
8844
9551
|
return /* @__PURE__ */React__namespace.createElement(Collection.Provider, {
|
|
@@ -8852,8 +9559,8 @@ var MenuSubContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedR
|
|
|
8852
9559
|
"aria-labelledby": subContext.triggerId,
|
|
8853
9560
|
...subContentProps,
|
|
8854
9561
|
ref: composedRefs,
|
|
8855
|
-
align
|
|
8856
|
-
side: rootContext.dir ===
|
|
9562
|
+
align,
|
|
9563
|
+
side: rootContext.dir === Direction.RTL ? "left" : "right",
|
|
8857
9564
|
disableOutsidePointerEvents: false,
|
|
8858
9565
|
disableOutsideScroll: false,
|
|
8859
9566
|
trapFocus: false,
|
|
@@ -8885,17 +9592,19 @@ var MenuSubContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedR
|
|
|
8885
9592
|
})
|
|
8886
9593
|
})
|
|
8887
9594
|
});
|
|
8888
|
-
});
|
|
8889
|
-
MenuSubContent.displayName = SUB_CONTENT_NAME$1;
|
|
9595
|
+
}, "MenuSubContent"));
|
|
8890
9596
|
function getOpenState(open) {
|
|
8891
9597
|
return open ? "open" : "closed";
|
|
8892
9598
|
}
|
|
9599
|
+
__name$1(getOpenState, "getOpenState");
|
|
8893
9600
|
function isIndeterminate(checked) {
|
|
8894
9601
|
return checked === "indeterminate";
|
|
8895
9602
|
}
|
|
9603
|
+
__name$1(isIndeterminate, "isIndeterminate");
|
|
8896
9604
|
function getCheckedState(checked) {
|
|
8897
9605
|
return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
8898
9606
|
}
|
|
9607
|
+
__name$1(getCheckedState, "getCheckedState");
|
|
8899
9608
|
function focusFirst(candidates) {
|
|
8900
9609
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
8901
9610
|
for (const candidate of candidates) {
|
|
@@ -8904,9 +9613,11 @@ function focusFirst(candidates) {
|
|
|
8904
9613
|
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
8905
9614
|
}
|
|
8906
9615
|
}
|
|
9616
|
+
__name$1(focusFirst, "focusFirst");
|
|
8907
9617
|
function wrapArray(array, startIndex) {
|
|
8908
9618
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
8909
9619
|
}
|
|
9620
|
+
__name$1(wrapArray, "wrapArray");
|
|
8910
9621
|
function getNextMatch(values, search, currentMatch) {
|
|
8911
9622
|
const isRepeated = search.length > 1 && Array.from(search).every(char => char === search[0]);
|
|
8912
9623
|
const normalizedSearch = isRepeated ? search[0] : search;
|
|
@@ -8917,6 +9628,7 @@ function getNextMatch(values, search, currentMatch) {
|
|
|
8917
9628
|
const nextMatch = wrappedValues.find(value => value.toLowerCase().startsWith(normalizedSearch.toLowerCase()));
|
|
8918
9629
|
return nextMatch !== currentMatch ? nextMatch : void 0;
|
|
8919
9630
|
}
|
|
9631
|
+
__name$1(getNextMatch, "getNextMatch");
|
|
8920
9632
|
function isPointInPolygon(point, polygon) {
|
|
8921
9633
|
const x = point.x,
|
|
8922
9634
|
y = point.y;
|
|
@@ -8933,6 +9645,7 @@ function isPointInPolygon(point, polygon) {
|
|
|
8933
9645
|
}
|
|
8934
9646
|
return inside;
|
|
8935
9647
|
}
|
|
9648
|
+
__name$1(isPointInPolygon, "isPointInPolygon");
|
|
8936
9649
|
function isPointerInGraceArea(event, area) {
|
|
8937
9650
|
if (!area) return false;
|
|
8938
9651
|
const cursorPos = {
|
|
@@ -8941,25 +9654,11 @@ function isPointerInGraceArea(event, area) {
|
|
|
8941
9654
|
};
|
|
8942
9655
|
return isPointInPolygon(cursorPos, area);
|
|
8943
9656
|
}
|
|
9657
|
+
__name$1(isPointerInGraceArea, "isPointerInGraceArea");
|
|
8944
9658
|
function whenMouse(handler) {
|
|
8945
9659
|
return event => event.pointerType === "mouse" ? handler(event) : void 0;
|
|
8946
9660
|
}
|
|
8947
|
-
|
|
8948
|
-
var Anchor2 = MenuAnchor;
|
|
8949
|
-
var Portal = MenuPortal;
|
|
8950
|
-
var Content2$1 = MenuContent;
|
|
8951
|
-
var Group = MenuGroup;
|
|
8952
|
-
var Label = MenuLabel;
|
|
8953
|
-
var Item2$1 = MenuItem$2;
|
|
8954
|
-
var CheckboxItem = MenuCheckboxItem;
|
|
8955
|
-
var RadioGroup = MenuRadioGroup;
|
|
8956
|
-
var RadioItem = MenuRadioItem;
|
|
8957
|
-
var ItemIndicator = MenuItemIndicator;
|
|
8958
|
-
var Separator = MenuSeparator;
|
|
8959
|
-
var Arrow2$1 = MenuArrow;
|
|
8960
|
-
var Sub = MenuSub;
|
|
8961
|
-
var SubTrigger = MenuSubTrigger;
|
|
8962
|
-
var SubContent = MenuSubContent;
|
|
9661
|
+
__name$1(whenMouse, "whenMouse");
|
|
8963
9662
|
|
|
8964
9663
|
"use client";
|
|
8965
9664
|
const _excluded$d = ["__scopeDropdownMenu", "disabled"],
|
|
@@ -8976,6 +9675,11 @@ const _excluded$d = ["__scopeDropdownMenu", "disabled"],
|
|
|
8976
9675
|
_excluded10 = ["__scopeDropdownMenu"],
|
|
8977
9676
|
_excluded11 = ["__scopeDropdownMenu"],
|
|
8978
9677
|
_excluded12 = ["__scopeDropdownMenu"];
|
|
9678
|
+
var __defProp = Object.defineProperty;
|
|
9679
|
+
var __name = (target, value) => __defProp(target, "name", {
|
|
9680
|
+
value,
|
|
9681
|
+
configurable: true
|
|
9682
|
+
});
|
|
8979
9683
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
8980
9684
|
var _createContextScope = createContextScope(DROPDOWN_MENU_NAME, [createMenuScope]),
|
|
8981
9685
|
_createContextScope2 = _slicedToArray__default["default"](_createContextScope, 2),
|
|
@@ -8986,7 +9690,7 @@ var _createDropdownMenuCo = createDropdownMenuContext(DROPDOWN_MENU_NAME),
|
|
|
8986
9690
|
_createDropdownMenuCo2 = _slicedToArray__default["default"](_createDropdownMenuCo, 2),
|
|
8987
9691
|
DropdownMenuProvider = _createDropdownMenuCo2[0],
|
|
8988
9692
|
useDropdownMenuContext = _createDropdownMenuCo2[1];
|
|
8989
|
-
var DropdownMenu = props => {
|
|
9693
|
+
var DropdownMenu = /* @__PURE__ */__name(props => {
|
|
8990
9694
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
8991
9695
|
children = props.children,
|
|
8992
9696
|
dir = props.dir,
|
|
@@ -9015,7 +9719,7 @@ var DropdownMenu = props => {
|
|
|
9015
9719
|
onOpenChange: setOpen,
|
|
9016
9720
|
onOpenToggle: React__namespace.useCallback(() => setOpen(prevOpen => !prevOpen), [setOpen]),
|
|
9017
9721
|
modal,
|
|
9018
|
-
children: /* @__PURE__ */React__namespace.createElement(
|
|
9722
|
+
children: /* @__PURE__ */React__namespace.createElement(Menu$1, {
|
|
9019
9723
|
...menuScope,
|
|
9020
9724
|
open,
|
|
9021
9725
|
onOpenChange: setOpen,
|
|
@@ -9024,17 +9728,20 @@ var DropdownMenu = props => {
|
|
|
9024
9728
|
children
|
|
9025
9729
|
})
|
|
9026
9730
|
});
|
|
9027
|
-
};
|
|
9028
|
-
DropdownMenu.displayName = DROPDOWN_MENU_NAME;
|
|
9731
|
+
}, "DropdownMenu");
|
|
9029
9732
|
var TRIGGER_NAME = "DropdownMenuTrigger";
|
|
9030
|
-
var DropdownMenuTrigger =
|
|
9733
|
+
var DropdownMenuTrigger = /* @__PURE__ */React__namespace.forwardRef(
|
|
9734
|
+
// blank line to reduce diff noise
|
|
9735
|
+
/* @__PURE__ */
|
|
9736
|
+
__name(function DropdownMenuTrigger2(props, forwardedRef) {
|
|
9031
9737
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9032
9738
|
_props$disabled = props.disabled,
|
|
9033
9739
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
9034
9740
|
triggerProps = _objectWithoutProperties__default["default"](props, _excluded$d);
|
|
9035
9741
|
const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
|
|
9036
9742
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9037
|
-
|
|
9743
|
+
const composedRefs = useComposedRefs(forwardedRef, context.triggerRef);
|
|
9744
|
+
return /* @__PURE__ */React__namespace.createElement(MenuAnchor, {
|
|
9038
9745
|
asChild: true,
|
|
9039
9746
|
...menuScope,
|
|
9040
9747
|
children: /* @__PURE__ */React__namespace.createElement(Primitive.button, {
|
|
@@ -9047,7 +9754,7 @@ var DropdownMenuTrigger = /*#__PURE__*/React__namespace.forwardRef((props, forwa
|
|
|
9047
9754
|
"data-disabled": disabled ? "" : void 0,
|
|
9048
9755
|
disabled,
|
|
9049
9756
|
...triggerProps,
|
|
9050
|
-
ref:
|
|
9757
|
+
ref: composedRefs,
|
|
9051
9758
|
onPointerDown: composeEventHandlers(props.onPointerDown, event => {
|
|
9052
9759
|
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
9053
9760
|
context.onOpenToggle();
|
|
@@ -9063,27 +9770,27 @@ var DropdownMenuTrigger = /*#__PURE__*/React__namespace.forwardRef((props, forwa
|
|
|
9063
9770
|
})
|
|
9064
9771
|
})
|
|
9065
9772
|
});
|
|
9066
|
-
});
|
|
9067
|
-
|
|
9068
|
-
var PORTAL_NAME = "DropdownMenuPortal";
|
|
9069
|
-
var DropdownMenuPortal = props => {
|
|
9773
|
+
}, "DropdownMenuTrigger"));
|
|
9774
|
+
var DropdownMenuPortal = /* @__PURE__ */__name(props => {
|
|
9070
9775
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9071
9776
|
portalProps = _objectWithoutProperties__default["default"](props, _excluded2$1);
|
|
9072
9777
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9073
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9778
|
+
return /* @__PURE__ */React__namespace.createElement(MenuPortal, {
|
|
9074
9779
|
...menuScope,
|
|
9075
9780
|
...portalProps
|
|
9076
9781
|
});
|
|
9077
|
-
};
|
|
9078
|
-
DropdownMenuPortal.displayName = PORTAL_NAME;
|
|
9782
|
+
}, "DropdownMenuPortal");
|
|
9079
9783
|
var CONTENT_NAME = "DropdownMenuContent";
|
|
9080
|
-
var DropdownMenuContent =
|
|
9784
|
+
var DropdownMenuContent = /* @__PURE__ */React__namespace.forwardRef(
|
|
9785
|
+
// blank line to reduce diff noise
|
|
9786
|
+
/* @__PURE__ */
|
|
9787
|
+
__name(function DropdownMenuContent2(props, forwardedRef) {
|
|
9081
9788
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9082
9789
|
contentProps = _objectWithoutProperties__default["default"](props, _excluded3);
|
|
9083
9790
|
const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
|
|
9084
9791
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9085
9792
|
const hasInteractedOutsideRef = React__namespace.useRef(false);
|
|
9086
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9793
|
+
return /* @__PURE__ */React__namespace.createElement(MenuContent, {
|
|
9087
9794
|
id: context.contentId,
|
|
9088
9795
|
"aria-labelledby": context.triggerId,
|
|
9089
9796
|
...menuScope,
|
|
@@ -9113,117 +9820,110 @@ var DropdownMenuContent = /*#__PURE__*/React__namespace.forwardRef((props, forwa
|
|
|
9113
9820
|
}
|
|
9114
9821
|
}
|
|
9115
9822
|
});
|
|
9116
|
-
});
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9823
|
+
}, "DropdownMenuContent"));
|
|
9824
|
+
var DropdownMenuGroup = /* @__PURE__ */React__namespace.forwardRef(
|
|
9825
|
+
// blank line to reduce diff noise
|
|
9826
|
+
/* @__PURE__ */
|
|
9827
|
+
__name(function DropdownMenuGroup2(props, forwardedRef) {
|
|
9120
9828
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9121
9829
|
groupProps = _objectWithoutProperties__default["default"](props, _excluded4);
|
|
9122
9830
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9123
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9831
|
+
return /* @__PURE__ */React__namespace.createElement(MenuGroup, {
|
|
9124
9832
|
...menuScope,
|
|
9125
9833
|
...groupProps,
|
|
9126
9834
|
ref: forwardedRef
|
|
9127
9835
|
});
|
|
9128
|
-
});
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9836
|
+
}, "DropdownMenuGroup"));
|
|
9837
|
+
var DropdownMenuLabel = /* @__PURE__ */React__namespace.forwardRef(
|
|
9838
|
+
// blank line to reduce diff noise
|
|
9839
|
+
/* @__PURE__ */
|
|
9840
|
+
__name(function DropdownMenuLabel2(props, forwardedRef) {
|
|
9132
9841
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9133
9842
|
labelProps = _objectWithoutProperties__default["default"](props, _excluded5);
|
|
9134
9843
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9135
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9844
|
+
return /* @__PURE__ */React__namespace.createElement(MenuLabel, {
|
|
9136
9845
|
...menuScope,
|
|
9137
9846
|
...labelProps,
|
|
9138
9847
|
ref: forwardedRef
|
|
9139
9848
|
});
|
|
9140
|
-
});
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9849
|
+
}, "DropdownMenuLabel"));
|
|
9850
|
+
var DropdownMenuItem = /* @__PURE__ */React__namespace.forwardRef(
|
|
9851
|
+
// blank line to reduce diff noise
|
|
9852
|
+
/* @__PURE__ */
|
|
9853
|
+
__name(function DropdownMenuItem2(props, forwardedRef) {
|
|
9144
9854
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9145
9855
|
itemProps = _objectWithoutProperties__default["default"](props, _excluded6);
|
|
9146
9856
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9147
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9857
|
+
return /* @__PURE__ */React__namespace.createElement(MenuItem$2, {
|
|
9148
9858
|
...menuScope,
|
|
9149
9859
|
...itemProps,
|
|
9150
9860
|
ref: forwardedRef
|
|
9151
9861
|
});
|
|
9152
|
-
});
|
|
9153
|
-
|
|
9154
|
-
var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
|
|
9155
|
-
var DropdownMenuCheckboxItem = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9862
|
+
}, "DropdownMenuItem"));
|
|
9863
|
+
var DropdownMenuCheckboxItem = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name(function DropdownMenuCheckboxItem2(props, forwardedRef) {
|
|
9156
9864
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9157
9865
|
checkboxItemProps = _objectWithoutProperties__default["default"](props, _excluded7);
|
|
9158
9866
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9159
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9867
|
+
return /* @__PURE__ */React__namespace.createElement(MenuCheckboxItem, {
|
|
9160
9868
|
...menuScope,
|
|
9161
9869
|
...checkboxItemProps,
|
|
9162
9870
|
ref: forwardedRef
|
|
9163
9871
|
});
|
|
9164
|
-
});
|
|
9165
|
-
|
|
9166
|
-
var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
|
|
9167
|
-
var DropdownMenuRadioGroup = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9872
|
+
}, "DropdownMenuCheckboxItem"));
|
|
9873
|
+
var DropdownMenuRadioGroup = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name(function DropdownMenuRadioGroup2(props, forwardedRef) {
|
|
9168
9874
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9169
9875
|
radioGroupProps = _objectWithoutProperties__default["default"](props, _excluded8);
|
|
9170
9876
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9171
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9877
|
+
return /* @__PURE__ */React__namespace.createElement(MenuRadioGroup, {
|
|
9172
9878
|
...menuScope,
|
|
9173
9879
|
...radioGroupProps,
|
|
9174
9880
|
ref: forwardedRef
|
|
9175
9881
|
});
|
|
9176
|
-
});
|
|
9177
|
-
|
|
9178
|
-
var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
|
|
9179
|
-
var DropdownMenuRadioItem = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9882
|
+
}, "DropdownMenuRadioGroup"));
|
|
9883
|
+
var DropdownMenuRadioItem = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name(function DropdownMenuRadioItem2(props, forwardedRef) {
|
|
9180
9884
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9181
9885
|
radioItemProps = _objectWithoutProperties__default["default"](props, _excluded9);
|
|
9182
9886
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9183
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9887
|
+
return /* @__PURE__ */React__namespace.createElement(MenuRadioItem, {
|
|
9184
9888
|
...menuScope,
|
|
9185
9889
|
...radioItemProps,
|
|
9186
9890
|
ref: forwardedRef
|
|
9187
9891
|
});
|
|
9188
|
-
});
|
|
9189
|
-
|
|
9190
|
-
var INDICATOR_NAME = "DropdownMenuItemIndicator";
|
|
9191
|
-
var DropdownMenuItemIndicator = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9892
|
+
}, "DropdownMenuRadioItem"));
|
|
9893
|
+
var DropdownMenuItemIndicator = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name(function DropdownMenuItemIndicator2(props, forwardedRef) {
|
|
9192
9894
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9193
9895
|
itemIndicatorProps = _objectWithoutProperties__default["default"](props, _excluded0);
|
|
9194
9896
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9195
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9897
|
+
return /* @__PURE__ */React__namespace.createElement(MenuItemIndicator, {
|
|
9196
9898
|
...menuScope,
|
|
9197
9899
|
...itemIndicatorProps,
|
|
9198
9900
|
ref: forwardedRef
|
|
9199
9901
|
});
|
|
9200
|
-
});
|
|
9201
|
-
|
|
9202
|
-
var SEPARATOR_NAME = "DropdownMenuSeparator";
|
|
9203
|
-
var DropdownMenuSeparator = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9902
|
+
}, "DropdownMenuItemIndicator"));
|
|
9903
|
+
var DropdownMenuSeparator = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name(function DropdownMenuSeparator2(props, forwardedRef) {
|
|
9204
9904
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9205
9905
|
separatorProps = _objectWithoutProperties__default["default"](props, _excluded1);
|
|
9206
9906
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9207
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9907
|
+
return /* @__PURE__ */React__namespace.createElement(MenuSeparator, {
|
|
9208
9908
|
...menuScope,
|
|
9209
9909
|
...separatorProps,
|
|
9210
9910
|
ref: forwardedRef
|
|
9211
9911
|
});
|
|
9212
|
-
});
|
|
9213
|
-
|
|
9214
|
-
|
|
9215
|
-
|
|
9912
|
+
}, "DropdownMenuSeparator"));
|
|
9913
|
+
var DropdownMenuArrow = /* @__PURE__ */React__namespace.forwardRef(
|
|
9914
|
+
// blank line to reduce diff noise
|
|
9915
|
+
/* @__PURE__ */
|
|
9916
|
+
__name(function DropdownMenuArrow2(props, forwardedRef) {
|
|
9216
9917
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9217
9918
|
arrowProps = _objectWithoutProperties__default["default"](props, _excluded10);
|
|
9218
9919
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9219
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9920
|
+
return /* @__PURE__ */React__namespace.createElement(MenuArrow, {
|
|
9220
9921
|
...menuScope,
|
|
9221
9922
|
...arrowProps,
|
|
9222
9923
|
ref: forwardedRef
|
|
9223
9924
|
});
|
|
9224
|
-
});
|
|
9225
|
-
|
|
9226
|
-
var DropdownMenuSub = props => {
|
|
9925
|
+
}, "DropdownMenuArrow"));
|
|
9926
|
+
var DropdownMenuSub = /* @__PURE__ */__name(props => {
|
|
9227
9927
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9228
9928
|
children = props.children,
|
|
9229
9929
|
openProp = props.open,
|
|
@@ -9239,31 +9939,28 @@ var DropdownMenuSub = props => {
|
|
|
9239
9939
|
_useControllableState4 = _slicedToArray__default["default"](_useControllableState3, 2),
|
|
9240
9940
|
open = _useControllableState4[0],
|
|
9241
9941
|
setOpen = _useControllableState4[1];
|
|
9242
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9942
|
+
return /* @__PURE__ */React__namespace.createElement(MenuSub, {
|
|
9243
9943
|
...menuScope,
|
|
9244
9944
|
open,
|
|
9245
9945
|
onOpenChange: setOpen,
|
|
9246
9946
|
children
|
|
9247
9947
|
});
|
|
9248
|
-
};
|
|
9249
|
-
var
|
|
9250
|
-
var DropdownMenuSubTrigger = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9948
|
+
}, "DropdownMenuSub");
|
|
9949
|
+
var DropdownMenuSubTrigger = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name(function DropdownMenuSubTrigger2(props, forwardedRef) {
|
|
9251
9950
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9252
9951
|
subTriggerProps = _objectWithoutProperties__default["default"](props, _excluded11);
|
|
9253
9952
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9254
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9953
|
+
return /* @__PURE__ */React__namespace.createElement(MenuSubTrigger, {
|
|
9255
9954
|
...menuScope,
|
|
9256
9955
|
...subTriggerProps,
|
|
9257
9956
|
ref: forwardedRef
|
|
9258
9957
|
});
|
|
9259
|
-
});
|
|
9260
|
-
|
|
9261
|
-
var SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
9262
|
-
var DropdownMenuSubContent = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
9958
|
+
}, "DropdownMenuSubTrigger"));
|
|
9959
|
+
var DropdownMenuSubContent = /* @__PURE__ */React__namespace.forwardRef(/* @__PURE__ */__name(function DropdownMenuSubContent2(props, forwardedRef) {
|
|
9263
9960
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
9264
9961
|
subContentProps = _objectWithoutProperties__default["default"](props, _excluded12);
|
|
9265
9962
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
9266
|
-
return /* @__PURE__ */React__namespace.createElement(
|
|
9963
|
+
return /* @__PURE__ */React__namespace.createElement(MenuSubContent, {
|
|
9267
9964
|
...menuScope,
|
|
9268
9965
|
...subContentProps,
|
|
9269
9966
|
ref: forwardedRef,
|
|
@@ -9279,24 +9976,7 @@ var DropdownMenuSubContent = /*#__PURE__*/React__namespace.forwardRef((props, fo
|
|
|
9279
9976
|
}
|
|
9280
9977
|
}
|
|
9281
9978
|
});
|
|
9282
|
-
});
|
|
9283
|
-
DropdownMenuSubContent.displayName = SUB_CONTENT_NAME;
|
|
9284
|
-
var Root2 = DropdownMenu;
|
|
9285
|
-
var Trigger = DropdownMenuTrigger;
|
|
9286
|
-
var Portal2 = DropdownMenuPortal;
|
|
9287
|
-
var Content2 = DropdownMenuContent;
|
|
9288
|
-
var Group2 = DropdownMenuGroup;
|
|
9289
|
-
var Label2 = DropdownMenuLabel;
|
|
9290
|
-
var Item2 = DropdownMenuItem;
|
|
9291
|
-
var CheckboxItem2 = DropdownMenuCheckboxItem;
|
|
9292
|
-
var RadioGroup2 = DropdownMenuRadioGroup;
|
|
9293
|
-
var RadioItem2 = DropdownMenuRadioItem;
|
|
9294
|
-
var ItemIndicator2 = DropdownMenuItemIndicator;
|
|
9295
|
-
var Separator2 = DropdownMenuSeparator;
|
|
9296
|
-
var Arrow2 = DropdownMenuArrow;
|
|
9297
|
-
var Sub2 = DropdownMenuSub;
|
|
9298
|
-
var SubTrigger2 = DropdownMenuSubTrigger;
|
|
9299
|
-
var SubContent2 = DropdownMenuSubContent;
|
|
9979
|
+
}, "DropdownMenuSubContent"));
|
|
9300
9980
|
|
|
9301
9981
|
const _createContextUtiliti$4 = index.createContextUtilities(),
|
|
9302
9982
|
useMenuContext = _createContextUtiliti$4.useContext,
|
|
@@ -9419,7 +10099,7 @@ const Menu = _ref => {
|
|
|
9419
10099
|
isVirtualizationDisabled,
|
|
9420
10100
|
submenuDepths
|
|
9421
10101
|
}
|
|
9422
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
10102
|
+
}, /*#__PURE__*/React__default["default"].createElement(DropdownMenu, {
|
|
9423
10103
|
open: open,
|
|
9424
10104
|
onOpenChange: shouldOpen => setOpen(!isDisabled && shouldOpen),
|
|
9425
10105
|
modal: false
|
|
@@ -9437,9 +10117,9 @@ class PointerEvent extends Event {
|
|
|
9437
10117
|
}
|
|
9438
10118
|
}
|
|
9439
10119
|
|
|
9440
|
-
var css_248z$d = ".
|
|
9441
|
-
var styles$7 = {"buttonContainer":"
|
|
9442
|
-
var stylesheet$d=".
|
|
10120
|
+
var css_248z$d = "._sDhDf{position:relative;display:inline-flex;height:36px;min-width:60px;cursor:pointer}._sDhDf>._elCB7{cursor:unset;width:100%;height:100%;padding:0 28px 0 12px;border-radius:4px;white-space:nowrap;line-height:20px;font-size:14px;text-align:left;outline:none;border:none;box-shadow:inset 0 0 0 1px #898989;color:#515559;background-color:#fafafa;overflow:hidden;text-overflow:ellipsis}._sDhDf>._elCB7:hover:not([aria-disabled=true]){background-color:#f5f5f5}._sDhDf>._elCB7:focus-visible{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._sDhDf>._elCB7+._y6x1r{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._sDhDf>._elCB7[data-state=open]+._y6x1r{transform:rotate(-180deg) translateY(50%)}._sDhDf>._elCB7[aria-disabled=true]{color:#74777a;cursor:not-allowed}._sDhDf>._elCB7[aria-disabled=true]+._y6x1r{fill:#515559;opacity:.4}._mHcc8>[data-radix-popper-content-wrapper]{overflow:hidden;min-width:auto!important;background-color:#fff;max-width:350px;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);border-radius:4px;z-index:var(--mask-z-index)!important;width:var(--mask-width);height:var(--mask-height);transition:height .35s,width .35s}._mHcc8>[data-radix-popper-content-wrapper] [data-radix-popper-content-wrapper]{transform:translateZ(0)!important}._eNjmM{margin:0;padding-bottom:var(--flyout-bottom-padding);background:#fff;transition:margin-left .35s,opacity .35s,height .35s,width .35s;opacity:1;max-width:350px;width:-webkit-max-content;width:-moz-max-content;width:max-content;min-width:200px;max-height:var(--flyout-max-height)}._eNjmM ._PnFKq{height:100%;overflow-y:scroll}._eNjmM._V4IlV{margin-left:30px;opacity:0}._eNjmM._NCTLo{margin-left:-30px}._mgKvA{position:relative;padding:10px 12px;display:flex;flex-direction:row;min-height:40px;align-items:center;cursor:pointer;outline:none;word-break:break-word;font-size:14px;color:#32363a;width:100%}._mgKvA._c4V6t{cursor:unset}._mgKvA ._QJ7hQ{fill:#32363a;margin-right:4px}._mgKvA:focus,._mgKvA:hover:not(._mgKvA._c4V6t){background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._mgKvA[aria-disabled=true]{cursor:not-allowed;opacity:.65}._mgKvA._46lra{padding-right:32px}._mgKvA._46lra ._y6x1r{position:absolute;height:100%;right:3px;fill:#515559}._mgKvA._NEYST{pointer-events:none}._lmN-1{position:-webkit-sticky;position:sticky;top:0;background-color:#fff;border-bottom:1px solid #e8e8e8}._lmN-1._bwdGP{padding-top:52px}._gh2w-{pointer-events:none;position:fixed;left:0;top:0;transition:width .35s;min-width:200px;width:var(--mask-width);max-width:350px}._P433r{position:absolute;padding:8px;border-radius:4px 4px 0 0;pointer-events:auto;opacity:1;width:100%;transition:opacity .35s,margin-left .35s}._P433r._NCTLo{opacity:0}._P433r._NCTLo>._X8XTy{margin-left:-30px}._P433r._V4IlV{opacity:0}._P433r._V4IlV>._X8XTy{margin-left:30px}._P433r>._X8XTy{transition:margin-left .35s;width:100%}._P433r._NEYST{pointer-events:none}body.keyboard-user ._mgKvA:hover:not(:focus){background-color:#fff;box-shadow:none}";
|
|
10121
|
+
var styles$7 = {"buttonContainer":"_sDhDf","button":"_elCB7","rightIcon":"_y6x1r","maskContainer":"_mHcc8","flyout":"_eNjmM","scrollContainer":"_PnFKq","animatedRight":"_V4IlV","animatedLeft":"_NCTLo","menuItem":"_mgKvA","noItems":"_c4V6t","backIcon":"_QJ7hQ","subMenu":"_46lra","unresponsive":"_NEYST","stickyBox":"_lmN-1","isSearchable":"_bwdGP","searchBoxesContainer":"_gh2w-","searchBox":"_P433r","searchInput":"_X8XTy"};
|
|
10122
|
+
var stylesheet$d="._sDhDf{position:relative;display:inline-flex;height:36px;min-width:60px;cursor:pointer}._sDhDf>._elCB7{cursor:unset;width:100%;height:100%;padding:0 28px 0 12px;border-radius:4px;white-space:nowrap;line-height:20px;font-size:14px;text-align:left;outline:none;border:none;box-shadow:inset 0 0 0 1px #898989;color:#515559;background-color:#fafafa;overflow:hidden;text-overflow:ellipsis}._sDhDf>._elCB7:hover:not([aria-disabled=true]){background-color:#f5f5f5}._sDhDf>._elCB7:focus-visible{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._sDhDf>._elCB7+._y6x1r{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._sDhDf>._elCB7[data-state=open]+._y6x1r{transform:rotate(-180deg) translateY(50%)}._sDhDf>._elCB7[aria-disabled=true]{color:#74777a;cursor:not-allowed}._sDhDf>._elCB7[aria-disabled=true]+._y6x1r{fill:#515559;opacity:.4}._mHcc8>[data-radix-popper-content-wrapper]{overflow:hidden;min-width:auto!important;background-color:#fff;max-width:350px;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);border-radius:4px;z-index:var(--mask-z-index)!important;width:var(--mask-width);height:var(--mask-height);transition:height .35s,width .35s}._mHcc8>[data-radix-popper-content-wrapper] [data-radix-popper-content-wrapper]{transform:translateZ(0)!important}._eNjmM{margin:0;padding-bottom:var(--flyout-bottom-padding);background:#fff;transition:margin-left .35s,opacity .35s,height .35s,width .35s;opacity:1;max-width:350px;width:-webkit-max-content;width:-moz-max-content;width:max-content;min-width:200px;max-height:var(--flyout-max-height)}._eNjmM ._PnFKq{height:100%;overflow-y:scroll}._eNjmM._V4IlV{margin-left:30px;opacity:0}._eNjmM._NCTLo{margin-left:-30px}._mgKvA{position:relative;padding:10px 12px;display:flex;flex-direction:row;min-height:40px;align-items:center;cursor:pointer;outline:none;word-break:break-word;font-size:14px;color:#32363a;width:100%}._mgKvA._c4V6t{cursor:unset}._mgKvA ._QJ7hQ{fill:#32363a;margin-right:4px}._mgKvA:focus,._mgKvA:hover:not(._mgKvA._c4V6t){background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._mgKvA[aria-disabled=true]{cursor:not-allowed;opacity:.65}._mgKvA._46lra{padding-right:32px}._mgKvA._46lra ._y6x1r{position:absolute;height:100%;right:3px;fill:#515559}._mgKvA._NEYST{pointer-events:none}._lmN-1{position:-webkit-sticky;position:sticky;top:0;background-color:#fff;border-bottom:1px solid #e8e8e8}._lmN-1._bwdGP{padding-top:52px}._gh2w-{pointer-events:none;position:fixed;left:0;top:0;transition:width .35s;min-width:200px;width:var(--mask-width);max-width:350px}._P433r{position:absolute;padding:8px;border-radius:4px 4px 0 0;pointer-events:auto;opacity:1;width:100%;transition:opacity .35s,margin-left .35s}._P433r._NCTLo{opacity:0}._P433r._NCTLo>._X8XTy{margin-left:-30px}._P433r._V4IlV{opacity:0}._P433r._V4IlV>._X8XTy{margin-left:30px}._P433r>._X8XTy{transition:margin-left .35s;width:100%}._P433r._NEYST{pointer-events:none}body.keyboard-user ._mgKvA:hover:not(:focus){background-color:#fff;box-shadow:none}";
|
|
9443
10123
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$d);}
|
|
9444
10124
|
|
|
9445
10125
|
/* eslint-disable import/prefer-default-export */
|
|
@@ -9495,6 +10175,7 @@ const MenuButton = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref
|
|
|
9495
10175
|
rootDataTestId = _useMenuContext.dataTestId,
|
|
9496
10176
|
isDisabled = _useMenuContext.isDisabled,
|
|
9497
10177
|
triggerRef = _useMenuContext.triggerRef;
|
|
10178
|
+
const mergedRef = React.useMemo(() => index.mergeRefs(triggerRef, ref), [triggerRef, ref]);
|
|
9498
10179
|
const isTruncated = index.useIsTruncated(triggerRef);
|
|
9499
10180
|
const withinSelect = useSelectContext(true) !== null;
|
|
9500
10181
|
|
|
@@ -9507,13 +10188,13 @@ const MenuButton = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref
|
|
|
9507
10188
|
asChild: asChild,
|
|
9508
10189
|
tooltipContent: children,
|
|
9509
10190
|
isTruncated: isTruncated
|
|
9510
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
10191
|
+
}, /*#__PURE__*/React__default["default"].createElement(DropdownMenuTrigger, _extends__default["default"]({}, rest, {
|
|
9511
10192
|
"aria-disabled": isDisabled,
|
|
9512
10193
|
className: classNames__default["default"](className, {
|
|
9513
10194
|
[styles$7.button]: !asChild
|
|
9514
10195
|
}),
|
|
9515
10196
|
asChild: asChild,
|
|
9516
|
-
ref:
|
|
10197
|
+
ref: mergedRef,
|
|
9517
10198
|
"data-testid": index.getSubDataTestId(rootDataTestId, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_BUTTON : index.DATA_TESTID_SUFFIXES.MENU_BUTTON),
|
|
9518
10199
|
onPointerDown: handlePointerDown
|
|
9519
10200
|
}), children), !asChild && /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
@@ -9892,9 +10573,9 @@ const SubSelect = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
9892
10573
|
});
|
|
9893
10574
|
SubSelect.displayName = 'SubSelect';
|
|
9894
10575
|
|
|
9895
|
-
var css_248z$c = ".
|
|
9896
|
-
var styles$6 = {"isInvalid":"
|
|
9897
|
-
var stylesheet$c=".
|
|
10576
|
+
var css_248z$c = "._yp84T{box-shadow:inset 0 0 0 1px #b00!important}._hsuHd{margin-right:7px}._xWfxz{background-color:rgba(11,110,208,.08);font-weight:500}";
|
|
10577
|
+
var styles$6 = {"isInvalid":"_yp84T","checkbox":"_hsuHd","selectedItem":"_xWfxz"};
|
|
10578
|
+
var stylesheet$c="._yp84T{box-shadow:inset 0 0 0 1px #b00!important}._hsuHd{margin-right:7px}._xWfxz{background-color:rgba(11,110,208,.08);font-weight:500}";
|
|
9898
10579
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$c);}
|
|
9899
10580
|
|
|
9900
10581
|
const _excluded$a = ["isDisabled", "label", "value", "children", "className"];
|
|
@@ -9988,6 +10669,17 @@ const PaneChildren = _ref => {
|
|
|
9988
10669
|
setIsVirtualizationReady = _usePaneContext.setIsVirtualizationReady,
|
|
9989
10670
|
isVirtualized = _usePaneContext.isVirtualized;
|
|
9990
10671
|
const containerRef = React.useRef(null);
|
|
10672
|
+
const virtualIndexOffset = multiselect && showSelectedItemsPane && !containedWithinSubpane ? 1 : 0;
|
|
10673
|
+
|
|
10674
|
+
// Virtuoso republishes every prop that changes identity, so keep them
|
|
10675
|
+
// stable to avoid feeding extra synchronous renders back into the pane.
|
|
10676
|
+
const data = React.useMemo(() => Array.isArray(children) ? children : [children], [children]);
|
|
10677
|
+
const startReached = React.useCallback(() => setIsVirtualizationReady === null || setIsVirtualizationReady === void 0 ? void 0 : setIsVirtualizationReady(true), [setIsVirtualizationReady]);
|
|
10678
|
+
const itemContent = React.useCallback((index, child) => ! /*#__PURE__*/React__default["default"].isValidElement(child) ? null : /*#__PURE__*/React__default["default"].createElement(ItemContextProvider, {
|
|
10679
|
+
value: {
|
|
10680
|
+
virtualIndex: index + virtualIndexOffset
|
|
10681
|
+
}
|
|
10682
|
+
}, child), [virtualIndexOffset]);
|
|
9991
10683
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
9992
10684
|
ref: containerRef,
|
|
9993
10685
|
className: styles$7.scrollContainer,
|
|
@@ -9996,16 +10688,10 @@ const PaneChildren = _ref => {
|
|
|
9996
10688
|
}
|
|
9997
10689
|
}, isVirtualized ? /*#__PURE__*/React__default["default"].createElement(reactVirtuoso.Virtuoso, _extends__default["default"]({
|
|
9998
10690
|
ref: virtuoso,
|
|
9999
|
-
startReached:
|
|
10691
|
+
startReached: startReached,
|
|
10000
10692
|
customScrollParent: (_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 ? _containerRef$current2 : undefined,
|
|
10001
|
-
data:
|
|
10002
|
-
|
|
10003
|
-
,
|
|
10004
|
-
itemContent: (index, child) => ! /*#__PURE__*/React__default["default"].isValidElement(child) ? null : /*#__PURE__*/React__default["default"].createElement(ItemContextProvider, {
|
|
10005
|
-
value: {
|
|
10006
|
-
virtualIndex: index + (multiselect && showSelectedItemsPane && !containedWithinSubpane ? 1 : 0)
|
|
10007
|
-
}
|
|
10008
|
-
}, child)
|
|
10693
|
+
data: data,
|
|
10694
|
+
itemContent: itemContent
|
|
10009
10695
|
}, index.VIRTUOSO_PROPS)) : /*#__PURE__*/React__default["default"].createElement(ItemContextProvider, {
|
|
10010
10696
|
value: {
|
|
10011
10697
|
virtualIndex: undefined
|
|
@@ -10068,6 +10754,50 @@ const useMaskDimensions = (target, animatedLeft, paneDepth, children, isVirtuali
|
|
|
10068
10754
|
return (maskHeight !== auto || typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === 'test') && (isVirtualized ? isVirtualizationReady : true);
|
|
10069
10755
|
};
|
|
10070
10756
|
|
|
10757
|
+
/**
|
|
10758
|
+
* Tracks the pane's DOM node in state via a stable callback ref.
|
|
10759
|
+
*
|
|
10760
|
+
* Several Radix primitives the content is rendered through (Popper,
|
|
10761
|
+
* DismissableLayer, FocusScope) compose our ref with an inline arrow, so the
|
|
10762
|
+
* composed ref changes identity on every render. React then detaches
|
|
10763
|
+
* (`null`) and re-attaches (same node) the ref within a single commit.
|
|
10764
|
+
*
|
|
10765
|
+
* Calling `setState` for that churn schedules a synchronous re-render of the
|
|
10766
|
+
* pane. React cannot bail out of it while the pane has other pending updates
|
|
10767
|
+
* (e.g. descendant registration from a virtualized list), and re-rendering the
|
|
10768
|
+
* pane re-renders the Radix content, which churns the ref again — React throws
|
|
10769
|
+
* "Maximum update depth exceeded" (HOME-5488).
|
|
10770
|
+
*
|
|
10771
|
+
* To break the cycle, state is only updated when the node actually changes:
|
|
10772
|
+
* re-attaching the same node is ignored, and a `null` is only committed if the
|
|
10773
|
+
* ref is still detached once the current commit has finished.
|
|
10774
|
+
*/
|
|
10775
|
+
const useFlyoutNode = () => {
|
|
10776
|
+
const _useState = React.useState(null),
|
|
10777
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
10778
|
+
node = _useState2[0],
|
|
10779
|
+
setNode = _useState2[1];
|
|
10780
|
+
const latestNodeRef = React.useRef(null);
|
|
10781
|
+
const storedNodeRef = React.useRef(null);
|
|
10782
|
+
const ref = React.useCallback(nextNode => {
|
|
10783
|
+
latestNodeRef.current = nextNode;
|
|
10784
|
+
if (nextNode) {
|
|
10785
|
+
if (nextNode !== storedNodeRef.current) {
|
|
10786
|
+
storedNodeRef.current = nextNode;
|
|
10787
|
+
setNode(nextNode);
|
|
10788
|
+
}
|
|
10789
|
+
return;
|
|
10790
|
+
}
|
|
10791
|
+
queueMicrotask(() => {
|
|
10792
|
+
if (latestNodeRef.current === null && storedNodeRef.current !== null) {
|
|
10793
|
+
storedNodeRef.current = null;
|
|
10794
|
+
setNode(null);
|
|
10795
|
+
}
|
|
10796
|
+
});
|
|
10797
|
+
}, []);
|
|
10798
|
+
return [node, ref];
|
|
10799
|
+
};
|
|
10800
|
+
|
|
10071
10801
|
const _excluded$9 = ["placement", "children", "isSearchable", "searchValue", "onSearchValueChange", "isSearchFilteringDisabled", "className", "zIndex", "disableScrollLock", "style"],
|
|
10072
10802
|
_excluded2 = ["id"];
|
|
10073
10803
|
const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -10090,11 +10820,11 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10090
10820
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
10091
10821
|
items = _useState2[0],
|
|
10092
10822
|
setItems = _useState2[1];
|
|
10093
|
-
const
|
|
10094
|
-
|
|
10095
|
-
flyoutNode =
|
|
10096
|
-
|
|
10097
|
-
const
|
|
10823
|
+
const _useFlyoutNode = useFlyoutNode(),
|
|
10824
|
+
_useFlyoutNode2 = _slicedToArray__default["default"](_useFlyoutNode, 2),
|
|
10825
|
+
flyoutNode = _useFlyoutNode2[0],
|
|
10826
|
+
onRefChange = _useFlyoutNode2[1];
|
|
10827
|
+
const contentRef = React.useMemo(() => index.mergeRefs(ref, onRefChange), [ref, onRefChange]);
|
|
10098
10828
|
const stickyBoxRef = React.useRef(null);
|
|
10099
10829
|
const selectContext = useSelectContext(true);
|
|
10100
10830
|
const withinSelect = selectContext !== null;
|
|
@@ -10152,10 +10882,10 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10152
10882
|
const paneBottomPadding = 4;
|
|
10153
10883
|
const maskContainerId = index.useId();
|
|
10154
10884
|
const maskContainer = document.getElementById(maskContainerId);
|
|
10155
|
-
const
|
|
10156
|
-
|
|
10157
|
-
transform =
|
|
10158
|
-
setTransform =
|
|
10885
|
+
const _useState3 = React.useState(''),
|
|
10886
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
10887
|
+
transform = _useState4[0],
|
|
10888
|
+
setTransform = _useState4[1];
|
|
10159
10889
|
const target = (_flyoutNode$parentNod = flyoutNode === null || flyoutNode === void 0 ? void 0 : flyoutNode.parentNode) !== null && _flyoutNode$parentNod !== void 0 ? _flyoutNode$parentNod : undefined;
|
|
10160
10890
|
const _useMenuContext = useMenuContext(),
|
|
10161
10891
|
rootDataTestId = _useMenuContext.dataTestId,
|
|
@@ -10168,10 +10898,10 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10168
10898
|
maskWidth = _useMenuContext.maskWidth,
|
|
10169
10899
|
isVirtualizationDisabled = _useMenuContext.isVirtualizationDisabled;
|
|
10170
10900
|
const isVirtualized = useIsVirtualized(children, isVirtualizationDisabled);
|
|
10171
|
-
const
|
|
10172
|
-
|
|
10173
|
-
isVirtualizationReady =
|
|
10174
|
-
setIsVirtualizationReady =
|
|
10901
|
+
const _useState5 = React.useState(typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === 'test'),
|
|
10902
|
+
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
10903
|
+
isVirtualizationReady = _useState6[0],
|
|
10904
|
+
setIsVirtualizationReady = _useState6[1];
|
|
10175
10905
|
const animatedLeft = React.useMemo(() => openPaneDepth > thisPanesDepth, [openPaneDepth]);
|
|
10176
10906
|
const dataTestId = index.getSubDataTestId(rootDataTestId, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_PANE : index.DATA_TESTID_SUFFIXES.MENU_PANE);
|
|
10177
10907
|
const _usePaneSearch = usePaneSearch({
|
|
@@ -10260,7 +10990,7 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10260
10990
|
maskIsReady,
|
|
10261
10991
|
setIsVirtualizationReady
|
|
10262
10992
|
}
|
|
10263
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
10993
|
+
}, /*#__PURE__*/React__default["default"].createElement(DropdownMenuPortal, {
|
|
10264
10994
|
container: portalTarget || undefined
|
|
10265
10995
|
}, /*#__PURE__*/React__default["default"].createElement(ReactFocusLock__default["default"], {
|
|
10266
10996
|
autoFocus: false,
|
|
@@ -10274,7 +11004,7 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10274
11004
|
opacity: maskIsReady ? 1 : 0
|
|
10275
11005
|
}
|
|
10276
11006
|
}
|
|
10277
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
11007
|
+
}, /*#__PURE__*/React__default["default"].createElement(DropdownMenuContent, _extends__default["default"]({}, rest, {
|
|
10278
11008
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10279
11009
|
style: style,
|
|
10280
11010
|
onCloseAutoFocus: event => {
|
|
@@ -10290,7 +11020,7 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10290
11020
|
loop: !isSearchable,
|
|
10291
11021
|
side: side || defaultSide,
|
|
10292
11022
|
align: align || 'start',
|
|
10293
|
-
ref:
|
|
11023
|
+
ref: contentRef,
|
|
10294
11024
|
"data-testid": dataTestId,
|
|
10295
11025
|
className: classNames__default["default"](className, {
|
|
10296
11026
|
[styles$7.animatedLeft]: animatedLeft
|
|
@@ -10339,6 +11069,7 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10339
11069
|
const withinSelect = selectContext !== null;
|
|
10340
11070
|
const multiselect = selectContext === null || selectContext === void 0 ? void 0 : selectContext.multiselect;
|
|
10341
11071
|
const itemRef = React.useRef(null);
|
|
11072
|
+
const mergedRef = React.useMemo(() => index.mergeRefs(ref, itemRef), [ref]);
|
|
10342
11073
|
const _usePaneContext = usePaneContext(itemRef),
|
|
10343
11074
|
menuParentDataTestId = _usePaneContext.dataTestId,
|
|
10344
11075
|
childIndex = _usePaneContext.childIndex,
|
|
@@ -10371,7 +11102,7 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10371
11102
|
}
|
|
10372
11103
|
}
|
|
10373
11104
|
};
|
|
10374
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
11105
|
+
return /*#__PURE__*/React__default["default"].createElement(DropdownMenuItem, _extends__default["default"]({}, rest, {
|
|
10375
11106
|
tabIndex: 0,
|
|
10376
11107
|
asChild: asChild,
|
|
10377
11108
|
"aria-disabled": isDisabled,
|
|
@@ -10379,7 +11110,7 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10379
11110
|
[styles$7.unresponsive]: !isInteractive
|
|
10380
11111
|
}),
|
|
10381
11112
|
"data-testid": dataTestId,
|
|
10382
|
-
ref:
|
|
11113
|
+
ref: mergedRef,
|
|
10383
11114
|
onKeyDown: e => {
|
|
10384
11115
|
var _context, _context2, _context3;
|
|
10385
11116
|
if (!isInteractive || multiselect && e.key === 'Enter') {
|
|
@@ -10449,11 +11180,11 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
10449
11180
|
setItems = _useState2[1];
|
|
10450
11181
|
const internalId = index.useId();
|
|
10451
11182
|
const triggerRef = React.useRef(null);
|
|
10452
|
-
const
|
|
10453
|
-
|
|
10454
|
-
flyoutNode =
|
|
10455
|
-
|
|
10456
|
-
const
|
|
11183
|
+
const _useFlyoutNode = useFlyoutNode(),
|
|
11184
|
+
_useFlyoutNode2 = _slicedToArray__default["default"](_useFlyoutNode, 2),
|
|
11185
|
+
flyoutNode = _useFlyoutNode2[0],
|
|
11186
|
+
onRefChange = _useFlyoutNode2[1];
|
|
11187
|
+
const contentRef = React.useMemo(() => index.mergeRefs(ref, onRefChange), [ref, onRefChange]);
|
|
10457
11188
|
const stickyBoxRef = React.useRef(null);
|
|
10458
11189
|
const backButtonRef = React.useRef(null);
|
|
10459
11190
|
const _usePaneContext = usePaneContext(triggerRef),
|
|
@@ -10475,18 +11206,18 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
10475
11206
|
isFocusVisible = _useIsFocusVisible.isFocusVisible;
|
|
10476
11207
|
const zIndex = React.useMemo(() => paneContainingTriggerZIndex + 1, [paneContainingTriggerZIndex]);
|
|
10477
11208
|
const thisPanesDepth = (_submenuDepths$intern = submenuDepths[internalId]) !== null && _submenuDepths$intern !== void 0 ? _submenuDepths$intern : Number.MAX_SAFE_INTEGER;
|
|
11209
|
+
const _useState3 = React.useState(false),
|
|
11210
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
11211
|
+
isPaneInDOM = _useState4[0],
|
|
11212
|
+
setIsPaneInDOM = _useState4[1];
|
|
10478
11213
|
const _useState5 = React.useState(false),
|
|
10479
11214
|
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
10480
|
-
|
|
10481
|
-
|
|
11215
|
+
isFrameAfterPaneAddedToDOM = _useState6[0],
|
|
11216
|
+
setIsFrameAfterPaneAddedToDOM = _useState6[1];
|
|
10482
11217
|
const _useState7 = React.useState(false),
|
|
10483
11218
|
_useState8 = _slicedToArray__default["default"](_useState7, 2),
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
const _useState9 = React.useState(false),
|
|
10487
|
-
_useState0 = _slicedToArray__default["default"](_useState9, 2),
|
|
10488
|
-
isTransitioningFromRight = _useState0[0],
|
|
10489
|
-
setIsTransitioningFromRight = _useState0[1];
|
|
11219
|
+
isTransitioningFromRight = _useState8[0],
|
|
11220
|
+
setIsTransitioningFromRight = _useState8[1];
|
|
10490
11221
|
const animatedLeft = React.useMemo(() => thisPanesDepth < totalOpenPaneDepth, [totalOpenPaneDepth, thisPanesDepth]);
|
|
10491
11222
|
const animatedRight = React.useMemo(() => thisPanesDepth > totalOpenPaneDepth || thisPanesDepth === totalOpenPaneDepth && !isPaneInDOM || isFrameAfterPaneAddedToDOM, [totalOpenPaneDepth, isFrameAfterPaneAddedToDOM, thisPanesDepth, isPaneInDOM]);
|
|
10492
11223
|
const paneDataTestId = index.getSubDataTestId(paneContainingTriggerDataTestId, index.getTestIdSegment(testIdSegment, triggerIndex));
|
|
@@ -10556,9 +11287,9 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
10556
11287
|
}
|
|
10557
11288
|
setIsTransitioningFromRight(false);
|
|
10558
11289
|
};
|
|
10559
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
11290
|
+
return /*#__PURE__*/React__default["default"].createElement(DropdownMenuSub, {
|
|
10560
11291
|
open: isPaneInDOM
|
|
10561
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
11292
|
+
}, /*#__PURE__*/React__default["default"].createElement(DropdownMenuSubTrigger, _extends__default["default"]({
|
|
10562
11293
|
className: classNames__default["default"](styles$7.menuItem, styles$7.subMenu, {
|
|
10563
11294
|
[styles$7.unresponsive]: !paneContainingTriggerIsInteractive,
|
|
10564
11295
|
[styles$6.selectedItem]: triggerCheckedState === true && !isSelectedItems
|
|
@@ -10611,10 +11342,10 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
10611
11342
|
isVirtualized,
|
|
10612
11343
|
internalId
|
|
10613
11344
|
}
|
|
10614
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
11345
|
+
}, /*#__PURE__*/React__default["default"].createElement(DropdownMenuSubContent, _extends__default["default"]({}, rest, {
|
|
10615
11346
|
loop: !isSearchable,
|
|
10616
11347
|
"data-testid": paneDataTestId,
|
|
10617
|
-
ref:
|
|
11348
|
+
ref: contentRef,
|
|
10618
11349
|
onInteractOutside: onInteractOutside,
|
|
10619
11350
|
className: classNames__default["default"](className, styles$7.flyout, {
|
|
10620
11351
|
[styles$7.animatedRight]: animatedRight,
|
|
@@ -10635,7 +11366,7 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
10635
11366
|
style: {
|
|
10636
11367
|
zIndex
|
|
10637
11368
|
}
|
|
10638
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
11369
|
+
}, /*#__PURE__*/React__default["default"].createElement(DropdownMenuItem, {
|
|
10639
11370
|
className: classNames__default["default"](styles$7.menuItem, {
|
|
10640
11371
|
[styles$7.unresponsive]: isTransitioningFromRight || animatedLeft || animatedRight
|
|
10641
11372
|
}),
|
|
@@ -11039,9 +11770,9 @@ const RowDisplayCount = _ref => {
|
|
|
11039
11770
|
}));
|
|
11040
11771
|
};
|
|
11041
11772
|
|
|
11042
|
-
var css_248z$a = ".
|
|
11043
|
-
var styles$5 = {"input":"
|
|
11044
|
-
var stylesheet$a=".
|
|
11773
|
+
var css_248z$a = "._H53Ee input{padding-left:76px!important}._hgaFd input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._hgaFd input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._hgaFd input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._GI-ZY{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._GI-ZY,._GI-ZY._hgaFd:hover{background-color:initial!important}._GI-ZY:hover{background-color:rgba(50,54,58,.08)!important}._GI-ZY:active{background-color:rgba(50,54,58,.11)!important}._GI-ZY svg{top:2px!important}._iAjtx{position:relative}._Gpmqb{position:absolute;top:18px;left:12px;line-height:0px;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
11774
|
+
var styles$5 = {"input":"_H53Ee","disabled":"_hgaFd","dropdown":"_GI-ZY","container":"_iAjtx","countryCode":"_Gpmqb"};
|
|
11775
|
+
var stylesheet$a="._H53Ee input{padding-left:76px!important}._hgaFd input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._hgaFd input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._hgaFd input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._GI-ZY{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._GI-ZY,._GI-ZY._hgaFd:hover{background-color:initial!important}._GI-ZY:hover{background-color:rgba(50,54,58,.08)!important}._GI-ZY:active{background-color:rgba(50,54,58,.11)!important}._GI-ZY svg{top:2px!important}._iAjtx{position:relative}._Gpmqb{position:absolute;top:18px;left:12px;line-height:0px;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
11045
11776
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$a);}
|
|
11046
11777
|
|
|
11047
11778
|
const removeNonNumericCharacters = value => (value === null || value === void 0 ? void 0 : value.replace(/\D/g, '')) || '';
|
|
@@ -11202,9 +11933,9 @@ const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
11202
11933
|
});
|
|
11203
11934
|
PhoneNumberInput.displayName = 'PhoneNumberInput';
|
|
11204
11935
|
|
|
11205
|
-
var css_248z$9 = ".
|
|
11206
|
-
var styles$4 = {"container":"
|
|
11207
|
-
var stylesheet$9=".
|
|
11936
|
+
var css_248z$9 = "._-eQtu{display:flex}._0MQVX{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._0MQVX._0VtXA{background-color:#fff}._0MQVX._0VtXA._HzLny:focus-visible:not(._hV5H5){background-color:#0b6ed0}._0MQVX._0VtXA._p4Him:not(._0MQVX._0VtXA._eriVs),._0MQVX._HZc0N{background-color:#0b6ed0}._0MQVX._HZc0N._eriVs._p4Him,._0MQVX._HZc0N._hV5H5._HzLny,._0MQVX._HZc0N._hV5H5._eriVs{opacity:.4}._qehmU{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._qehmU:focus{z-index:1}._DcyVW{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._DcyVW svg{margin-left:1px}._DcyVW._0VtXA{background-color:#0b6ed0;border-color:transparent}._DcyVW._0VtXA svg{fill:#fff!important}._DcyVW._0VtXA:not(._U4doj):hover{background-color:#085caf!important}._DcyVW._0VtXA:not(._U4doj):active{background-color:#0854a1!important}._DcyVW._0VtXA._U4doj{opacity:.4}._DcyVW._0VtXA._U4doj svg{background-color:initial}._DcyVW._HZc0N{border-color:#0b6ed0;background-color:#fff}._DcyVW._HZc0N svg{fill:#0b6ed0!important}._DcyVW._HZc0N:not(._U4doj):hover{background-color:#eef5fc!important}._DcyVW._HZc0N:not(._U4doj):active{background-color:#e1edf9!important}._DcyVW._HZc0N._U4doj{opacity:.4}._DcyVW._HZc0N._U4doj svg{background-color:initial}._uQIY3{width:260px}";
|
|
11937
|
+
var styles$4 = {"container":"_-eQtu","divider":"_0MQVX","primary":"_0VtXA","mainButtonFocus":"_HzLny","mainButtonDisabled":"_hV5H5","dropdownButtonFocus":"_p4Him","dropdownButtonDisabled":"_eriVs","secondary":"_HZc0N","mainButton":"_qehmU","dropdownButton":"_DcyVW","disabled":"_U4doj","dropdownOption":"_uQIY3"};
|
|
11938
|
+
var stylesheet$9="._-eQtu{display:flex}._0MQVX{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._0MQVX._0VtXA{background-color:#fff}._0MQVX._0VtXA._HzLny:focus-visible:not(._hV5H5){background-color:#0b6ed0}._0MQVX._0VtXA._p4Him:not(._0MQVX._0VtXA._eriVs),._0MQVX._HZc0N{background-color:#0b6ed0}._0MQVX._HZc0N._eriVs._p4Him,._0MQVX._HZc0N._hV5H5._HzLny,._0MQVX._HZc0N._hV5H5._eriVs{opacity:.4}._qehmU{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._qehmU:focus{z-index:1}._DcyVW{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._DcyVW svg{margin-left:1px}._DcyVW._0VtXA{background-color:#0b6ed0;border-color:transparent}._DcyVW._0VtXA svg{fill:#fff!important}._DcyVW._0VtXA:not(._U4doj):hover{background-color:#085caf!important}._DcyVW._0VtXA:not(._U4doj):active{background-color:#0854a1!important}._DcyVW._0VtXA._U4doj{opacity:.4}._DcyVW._0VtXA._U4doj svg{background-color:initial}._DcyVW._HZc0N{border-color:#0b6ed0;background-color:#fff}._DcyVW._HZc0N svg{fill:#0b6ed0!important}._DcyVW._HZc0N:not(._U4doj):hover{background-color:#eef5fc!important}._DcyVW._HZc0N:not(._U4doj):active{background-color:#e1edf9!important}._DcyVW._HZc0N._U4doj{opacity:.4}._DcyVW._HZc0N._U4doj svg{background-color:initial}._uQIY3{width:260px}";
|
|
11208
11939
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$9);}
|
|
11209
11940
|
|
|
11210
11941
|
const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -11472,9 +12203,9 @@ const StackItem = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
11472
12203
|
});
|
|
11473
12204
|
StackItem.displayName = 'StackItem';
|
|
11474
12205
|
|
|
11475
|
-
var css_248z$8 = ".
|
|
11476
|
-
var styles$3 = {"timePickerContainer":"
|
|
11477
|
-
var stylesheet$8=".
|
|
12206
|
+
var css_248z$8 = "._2OSDy{display:inline-block;position:relative}._2OSDy ._fjO4V{width:120px}._2OSDy ._fjO4V ._1Dftq._8Hlua{transform:rotate(-180deg)}._2OSDy ._fjO4V ._1Dftq._FdRUj{fill:#9d9fa1;opacity:.4}._2OSDy ._tIYaS>input:focus{box-shadow:none!important;border:1px solid #898989!important}._2OSDy ._1Dftq{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._2OSDy ._1Dftq._8Hlua{transform:rotate(-180deg)}._0ucZm{width:120px}._0ucZm ._-tJIo._vRzOI{background-color:#efefef;border-radius:6px}";
|
|
12207
|
+
var styles$3 = {"timePickerContainer":"_2OSDy","input":"_fjO4V","icon":"_1Dftq","open":"_8Hlua","disabled":"_FdRUj","ignoreFocusStyle":"_tIYaS","timePickerFlyout":"_0ucZm","option":"_-tJIo","exactMatch":"_vRzOI"};
|
|
12208
|
+
var stylesheet$8="._2OSDy{display:inline-block;position:relative}._2OSDy ._fjO4V{width:120px}._2OSDy ._fjO4V ._1Dftq._8Hlua{transform:rotate(-180deg)}._2OSDy ._fjO4V ._1Dftq._FdRUj{fill:#9d9fa1;opacity:.4}._2OSDy ._tIYaS>input:focus{box-shadow:none!important;border:1px solid #898989!important}._2OSDy ._1Dftq{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._2OSDy ._1Dftq._8Hlua{transform:rotate(-180deg)}._0ucZm{width:120px}._0ucZm ._-tJIo._vRzOI{background-color:#efefef;border-radius:6px}";
|
|
11478
12209
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$8);}
|
|
11479
12210
|
|
|
11480
12211
|
const TimeDropdown = _ref => {
|
|
@@ -12167,9 +12898,9 @@ const _createContextUtiliti$2 = index.createContextUtilities(null),
|
|
|
12167
12898
|
useToggleButtonGroupContext = _createContextUtiliti$2.useContext,
|
|
12168
12899
|
ToggleButtonGroupContextProvider = _createContextUtiliti$2.Provider;
|
|
12169
12900
|
|
|
12170
|
-
var css_248z$7 = ".
|
|
12171
|
-
var styles$2 = {"default":"
|
|
12172
|
-
var stylesheet$7=".
|
|
12901
|
+
var css_248z$7 = "._ztqAT{border-color:transparent;background-color:initial;color:#515559;cursor:pointer}._drQo1{background-color:rgba(50,54,58,.08)}._DalYx{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._li32w{color:rgba(81,85,89,.4);cursor:not-allowed}._KNiRm{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._pFhHw{color:#085caf;border-color:#085caf}._bPHUv,._pFhHw{background:rgba(11,110,208,.11)}._bPHUv{color:#0854a1;border-color:#0854a1}._pJlwS{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._ILUjd{position:relative;display:inline-grid}._ILUjd svg{fill:currentColor}._ILUjd ._Q0YpV{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._ILUjd ._Q0YpV+._z4qYZ{background-color:initial;color:#515559;cursor:pointer;border-color:transparent;border-style:solid;border-width:1px;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._ILUjd ._Q0YpV+._z4qYZ._T0-Sb{padding:5px;max-width:36px;min-width:36px}._ILUjd ._Q0YpV+._z4qYZ._K36me{padding:0 16px}._ILUjd ._Q0YpV+._z4qYZ._FFkHy{padding:0 16px 0 12px}._ILUjd ._Q0YpV:hover+._z4qYZ{background-color:rgba(50,54,58,.08)}._ILUjd ._Q0YpV:disabled+._z4qYZ{color:rgba(81,85,89,.4);cursor:not-allowed}._ILUjd ._Q0YpV:active+._z4qYZ,._ILUjd ._Q0YpV:focus:active+._z4qYZ{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._ILUjd ._Q0YpV:checked+._z4qYZ{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._ILUjd ._Q0YpV:checked:hover+._z4qYZ{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._ILUjd ._Q0YpV:checked:disabled+._z4qYZ{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._ILUjd ._Q0YpV:checked:active+._z4qYZ,._ILUjd ._Q0YpV:checked:focus:active+._z4qYZ{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._GsuTi{display:inline-flex;position:relative}._GsuTi:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._GsuTi>*{flex-shrink:0;flex-grow:0}._LPzaG{border:none;margin:0;padding:0}._LPzaG legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._ILUjd ._Q0YpV:focus-visible{outline:none}._ILUjd ._Q0YpV:focus-visible+._z4qYZ{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
12902
|
+
var styles$2 = {"default":"_ztqAT","hovered":"_drQo1","pressed":"_DalYx","disabled":"_li32w","selectedDefault":"_KNiRm","selectedHovered":"_pFhHw","selectedPressed":"_bPHUv","selectedDisabled":"_pJlwS","toggleContainer":"_ILUjd","toggleInput":"_Q0YpV","toggleButton":"_z4qYZ","iconOnly":"_T0-Sb","text":"_K36me","iconText":"_FFkHy","toggleButtonGroup":"_GsuTi","toggleButtonGroupFieldset":"_LPzaG"};
|
|
12903
|
+
var stylesheet$7="._ztqAT{border-color:transparent;background-color:initial;color:#515559;cursor:pointer}._drQo1{background-color:rgba(50,54,58,.08)}._DalYx{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._li32w{color:rgba(81,85,89,.4);cursor:not-allowed}._KNiRm{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._pFhHw{color:#085caf;border-color:#085caf}._bPHUv,._pFhHw{background:rgba(11,110,208,.11)}._bPHUv{color:#0854a1;border-color:#0854a1}._pJlwS{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._ILUjd{position:relative;display:inline-grid}._ILUjd svg{fill:currentColor}._ILUjd ._Q0YpV{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._ILUjd ._Q0YpV+._z4qYZ{background-color:initial;color:#515559;cursor:pointer;border-color:transparent;border-style:solid;border-width:1px;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._ILUjd ._Q0YpV+._z4qYZ._T0-Sb{padding:5px;max-width:36px;min-width:36px}._ILUjd ._Q0YpV+._z4qYZ._K36me{padding:0 16px}._ILUjd ._Q0YpV+._z4qYZ._FFkHy{padding:0 16px 0 12px}._ILUjd ._Q0YpV:hover+._z4qYZ{background-color:rgba(50,54,58,.08)}._ILUjd ._Q0YpV:disabled+._z4qYZ{color:rgba(81,85,89,.4);cursor:not-allowed}._ILUjd ._Q0YpV:active+._z4qYZ,._ILUjd ._Q0YpV:focus:active+._z4qYZ{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._ILUjd ._Q0YpV:checked+._z4qYZ{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._ILUjd ._Q0YpV:checked:hover+._z4qYZ{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._ILUjd ._Q0YpV:checked:disabled+._z4qYZ{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._ILUjd ._Q0YpV:checked:active+._z4qYZ,._ILUjd ._Q0YpV:checked:focus:active+._z4qYZ{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._GsuTi{display:inline-flex;position:relative}._GsuTi:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._GsuTi>*{flex-shrink:0;flex-grow:0}._LPzaG{border:none;margin:0;padding:0}._LPzaG legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._ILUjd ._Q0YpV:focus-visible{outline:none}._ILUjd ._Q0YpV:focus-visible+._z4qYZ{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
12173
12904
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$7);}
|
|
12174
12905
|
|
|
12175
12906
|
const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -12714,9 +13445,9 @@ const ChatMessageList = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
12714
13445
|
});
|
|
12715
13446
|
ChatMessageList.displayName = 'ChatMessageList';
|
|
12716
13447
|
|
|
12717
|
-
var css_248z$1 = ".
|
|
12718
|
-
var styles$1 = {"font-size-12":"
|
|
12719
|
-
var stylesheet$1=".
|
|
13448
|
+
var css_248z$1 = "._zu4j6{font-size:.75rem!important}._-Wn20{font-size:.875rem!important}._Wyk7L{font-size:1rem!important}._-DYyc{font-size:1.125rem!important}._xAxJ7{font-size:1.25rem!important}._5FrVZ{font-size:1.5rem!important}._xYhy6{font-size:1.75rem!important}._eP91U{font-size:2.25rem!important}._nwb7Y{font-size:2.5rem!important}._C0R5C{font-size:3rem!important}._oOoSm{font-size:4rem!important}._kd-Qs{font-size:4.5rem!important}._Wrj9L{line-height:1rem!important}._u-k2Q{line-height:1.25rem!important}._wE7Nf{line-height:1.5rem!important}._99ldm{line-height:1.75rem!important}._Px-5F{line-height:2rem!important}._GFQlz{line-height:2.188rem!important}._Av-M8{line-height:2.5rem!important}._t4oTf{line-height:2.75rem!important}._oZLlP{line-height:3.125rem!important}._xmXVd{line-height:4.25rem!important}._3-Hzo{line-height:4.5rem!important}._j5vcS{font-weight:100!important}._04Xyq{font-weight:200!important}._MIkv1{font-weight:300!important}._YVCl8{font-weight:400!important}._KkC9r{font-weight:500!important}._NLOMb{font-weight:600!important}._U0dRx{font-weight:700!important}._c1lpK{font-weight:800!important}._l-gtt{font-weight:900!important}._jGYdM{font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._-M1vs{font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._56wnx{font-family:\"72Condensed\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._qKqXb{font-family:\"72Mono\",monospace!important}._lmXq1{font-weight:700!important}._jvEgC,._lmXq1{font-size:1rem!important;line-height:1.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._jvEgC{font-weight:400!important}._Tdfk8{font-weight:300!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._Tdfk8,._mNcfV{font-size:4.5rem!important;line-height:4.5rem!important;color:#2a2a2a!important}._mNcfV{font-weight:700!important;font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._pZ5Eo{font-weight:400!important}._68OPk,._pZ5Eo{font-size:4rem!important;line-height:4.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._68OPk{font-weight:700!important}._QmXvw{font-weight:400!important}._QmXvw,._kNtp-{font-size:3rem!important;line-height:3.125rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._kNtp-{font-weight:700!important}._HR1Az{font-weight:400!important}._FpHkS,._HR1Az{font-size:2.5rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._FpHkS{font-weight:700!important}._k3R43{font-weight:400!important}._d5x-R,._k3R43{font-size:4rem!important;line-height:4.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._d5x-R{font-weight:700!important}._IwvaH{font-weight:400!important}._IwvaH,._J6WrA{font-size:3rem!important;line-height:3.125rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._J6WrA{font-weight:700!important}._772zx{font-weight:400!important}._772zx,._Zuzm1{font-size:2.5rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._Zuzm1{font-weight:700!important}._lWBI8{font-weight:400!important}._Tug-C,._lWBI8{font-size:2.25rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._Tug-C{font-weight:700!important}._PxhJQ{font-weight:400!important}._PxhJQ,._XP-Up{font-size:1.75rem!important;line-height:2.188rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._XP-Up{font-weight:700!important}._nB2gg{font-weight:400!important}._nB2gg,._v-214{font-size:1.5rem!important;line-height:2rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._v-214{font-weight:700!important}._vxoix{font-weight:400!important}._BgK4Q,._vxoix{font-size:1.25rem!important;line-height:1.75rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._BgK4Q{font-weight:700!important}._e-Gca{font-weight:400!important}._4qKq6,._e-Gca{font-size:1.125rem!important;line-height:1.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._4qKq6{font-weight:700!important}._J3lpb{font-weight:400!important}._B2VfX,._J3lpb{font-size:1rem!important;line-height:1.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._B2VfX{font-weight:700!important}._rYb2H{font-weight:400!important}._l546z,._rYb2H{font-size:.75rem!important;line-height:1rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#595959!important}._l546z{font-weight:700!important}._7TiAi{font-size:.875rem!important;font-weight:700!important;font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._7TiAi,._anjNw{line-height:1.25rem!important;color:#2a2a2a!important}._anjNw{font-size:1rem!important;font-weight:400!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._3xupI{color:#ba4f0d!important}._3xupI,._WuLNf{font-size:.75rem!important;font-weight:400!important;line-height:1rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._WuLNf{color:#da1c3d!important}";
|
|
13449
|
+
var styles$1 = {"font-size-12":"_zu4j6","font-size-14":"_-Wn20","font-size-16":"_Wyk7L","font-size-18":"_-DYyc","font-size-20":"_xAxJ7","font-size-24":"_5FrVZ","font-size-28":"_xYhy6","font-size-36":"_eP91U","font-size-40":"_nwb7Y","font-size-48":"_C0R5C","font-size-64":"_oOoSm","font-size-72":"_kd-Qs","line-height-16":"_Wrj9L","line-height-20":"_u-k2Q","line-height-24":"_wE7Nf","line-height-28":"_99ldm","line-height-32":"_Px-5F","line-height-35":"_GFQlz","line-height-40":"_Av-M8","line-height-44":"_t4oTf","line-height-50":"_oZLlP","line-height-68":"_xmXVd","line-height-72":"_3-Hzo","font-weight-thin":"_j5vcS","font-weight-extralight":"_04Xyq","font-weight-light":"_MIkv1","font-weight-regular":"_YVCl8","font-weight-medium":"_KkC9r","font-weight-demibold":"_NLOMb","font-weight-bold":"_U0dRx","font-weight-extrabold":"_c1lpK","font-weight-black":"_l-gtt","font-family-default":"_jGYdM","font-family-default-duplex":"_-M1vs","font-family-default-condensed":"_56wnx","font-family-code":"_qKqXb","body-text-bold":"_lmXq1","body-text-regular":"_jvEgC","data-viz-large-number-light":"_Tdfk8","data-viz-large-number-semibold":"_mNcfV","display-body-primary-regular":"_pZ5Eo","display-body-primary-bold":"_68OPk","display-body-secondary-regular":"_QmXvw","display-body-secondary-bold":"_kNtp-","display-body-tertiary-regular":"_HR1Az","display-body-tertiary-bold":"_FpHkS","display-heading-primary-regular":"_k3R43","display-heading-primary-bold":"_d5x-R","display-heading-secondary-regular":"_IwvaH","display-heading-secondary-bold":"_J6WrA","display-heading-tertiary-regular":"_772zx","display-heading-tertiary-bold":"_Zuzm1","heading-1-regular":"_lWBI8","heading-1-bold":"_Tug-C","heading-2-regular":"_PxhJQ","heading-2-bold":"_XP-Up","heading-3-regular":"_nB2gg","heading-3-bold":"_v-214","heading-4-regular":"_vxoix","heading-4-bold":"_BgK4Q","heading-5-regular":"_e-Gca","heading-5-bold":"_4qKq6","heading-6-regular":"_J3lpb","heading-6-bold":"_B2VfX","helper-text-regular":"_rYb2H","helper-text-bold":"_l546z","input-label-bold":"_7TiAi","input-label-regular":"_anjNw","warning-text-regular":"_3xupI","error-text-regular":"_WuLNf"};
|
|
13450
|
+
var stylesheet$1="._zu4j6{font-size:.75rem!important}._-Wn20{font-size:.875rem!important}._Wyk7L{font-size:1rem!important}._-DYyc{font-size:1.125rem!important}._xAxJ7{font-size:1.25rem!important}._5FrVZ{font-size:1.5rem!important}._xYhy6{font-size:1.75rem!important}._eP91U{font-size:2.25rem!important}._nwb7Y{font-size:2.5rem!important}._C0R5C{font-size:3rem!important}._oOoSm{font-size:4rem!important}._kd-Qs{font-size:4.5rem!important}._Wrj9L{line-height:1rem!important}._u-k2Q{line-height:1.25rem!important}._wE7Nf{line-height:1.5rem!important}._99ldm{line-height:1.75rem!important}._Px-5F{line-height:2rem!important}._GFQlz{line-height:2.188rem!important}._Av-M8{line-height:2.5rem!important}._t4oTf{line-height:2.75rem!important}._oZLlP{line-height:3.125rem!important}._xmXVd{line-height:4.25rem!important}._3-Hzo{line-height:4.5rem!important}._j5vcS{font-weight:100!important}._04Xyq{font-weight:200!important}._MIkv1{font-weight:300!important}._YVCl8{font-weight:400!important}._KkC9r{font-weight:500!important}._NLOMb{font-weight:600!important}._U0dRx{font-weight:700!important}._c1lpK{font-weight:800!important}._l-gtt{font-weight:900!important}._jGYdM{font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._-M1vs{font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._56wnx{font-family:\"72Condensed\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._qKqXb{font-family:\"72Mono\",monospace!important}._lmXq1{font-weight:700!important}._jvEgC,._lmXq1{font-size:1rem!important;line-height:1.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._jvEgC{font-weight:400!important}._Tdfk8{font-weight:300!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._Tdfk8,._mNcfV{font-size:4.5rem!important;line-height:4.5rem!important;color:#2a2a2a!important}._mNcfV{font-weight:700!important;font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._pZ5Eo{font-weight:400!important}._68OPk,._pZ5Eo{font-size:4rem!important;line-height:4.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._68OPk{font-weight:700!important}._QmXvw{font-weight:400!important}._QmXvw,._kNtp-{font-size:3rem!important;line-height:3.125rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._kNtp-{font-weight:700!important}._HR1Az{font-weight:400!important}._FpHkS,._HR1Az{font-size:2.5rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._FpHkS{font-weight:700!important}._k3R43{font-weight:400!important}._d5x-R,._k3R43{font-size:4rem!important;line-height:4.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._d5x-R{font-weight:700!important}._IwvaH{font-weight:400!important}._IwvaH,._J6WrA{font-size:3rem!important;line-height:3.125rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._J6WrA{font-weight:700!important}._772zx{font-weight:400!important}._772zx,._Zuzm1{font-size:2.5rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._Zuzm1{font-weight:700!important}._lWBI8{font-weight:400!important}._Tug-C,._lWBI8{font-size:2.25rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._Tug-C{font-weight:700!important}._PxhJQ{font-weight:400!important}._PxhJQ,._XP-Up{font-size:1.75rem!important;line-height:2.188rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._XP-Up{font-weight:700!important}._nB2gg{font-weight:400!important}._nB2gg,._v-214{font-size:1.5rem!important;line-height:2rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._v-214{font-weight:700!important}._vxoix{font-weight:400!important}._BgK4Q,._vxoix{font-size:1.25rem!important;line-height:1.75rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._BgK4Q{font-weight:700!important}._e-Gca{font-weight:400!important}._4qKq6,._e-Gca{font-size:1.125rem!important;line-height:1.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._4qKq6{font-weight:700!important}._J3lpb{font-weight:400!important}._B2VfX,._J3lpb{font-size:1rem!important;line-height:1.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#2a2a2a!important}._B2VfX{font-weight:700!important}._rYb2H{font-weight:400!important}._l546z,._rYb2H{font-size:.75rem!important;line-height:1rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important;color:#595959!important}._l546z{font-weight:700!important}._7TiAi{font-size:.875rem!important;font-weight:700!important;font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._7TiAi,._anjNw{line-height:1.25rem!important;color:#2a2a2a!important}._anjNw{font-size:1rem!important;font-weight:400!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._3xupI{color:#ba4f0d!important}._3xupI,._WuLNf{font-size:.75rem!important;font-weight:400!important;line-height:1rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui!important}._WuLNf{color:#da1c3d!important}";
|
|
12720
13451
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$1);}
|
|
12721
13452
|
|
|
12722
13453
|
const TypographyTypesMapper = {
|
|
@@ -12774,9 +13505,9 @@ const Typography = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
12774
13505
|
});
|
|
12775
13506
|
Typography.displayName = 'Typography';
|
|
12776
13507
|
|
|
12777
|
-
var css_248z = ".
|
|
12778
|
-
var styles = {"indicator":"
|
|
12779
|
-
var stylesheet=".
|
|
13508
|
+
var css_248z = "._UFjEc{background-color:#f6f6f8;color:#2a2a2a;fill:#2a2a2a;border:1px solid #2a2a2a;border-radius:4px;position:relative;display:inline-flex;gap:4px;align-items:center;font-family:\"72\",\"Helvetica Neue\",\"Helvetica\",\"Arial\",\"sans-serif\";font-size:14px;font-style:normal;font-weight:400;line-height:20px}._UFjEc._AGYAy{background-color:#fff4ef;border-color:#ba4f0d;color:#ba4f0d;fill:#ba4f0d}._UFjEc._DU1iW{background-color:#fff4f3;border-color:#da1c3d;color:#da1c3d;fill:#da1c3d}._UFjEc._bS3ql{background-color:#f3f8ef;border-color:#457d25;color:#457d25;fill:#457d25}._UFjEc._JBW8b{background-color:#f1f7fd;border-color:#006fd3;color:#006fd3;fill:#006fd3}._KikdV{padding:1px 8px;max-height:24px}._Yy9BH{padding:4px 8px}";
|
|
13509
|
+
var styles = {"indicator":"_UFjEc","warning":"_AGYAy","error":"_DU1iW","success":"_bS3ql","informational":"_JBW8b","small":"_KikdV","medium":"_Yy9BH"};
|
|
13510
|
+
var stylesheet="._UFjEc{background-color:#f6f6f8;color:#2a2a2a;fill:#2a2a2a;border:1px solid #2a2a2a;border-radius:4px;position:relative;display:inline-flex;gap:4px;align-items:center;font-family:\"72\",\"Helvetica Neue\",\"Helvetica\",\"Arial\",\"sans-serif\";font-size:14px;font-style:normal;font-weight:400;line-height:20px}._UFjEc._AGYAy{background-color:#fff4ef;border-color:#ba4f0d;color:#ba4f0d;fill:#ba4f0d}._UFjEc._DU1iW{background-color:#fff4f3;border-color:#da1c3d;color:#da1c3d;fill:#da1c3d}._UFjEc._bS3ql{background-color:#f3f8ef;border-color:#457d25;color:#457d25;fill:#457d25}._UFjEc._JBW8b{background-color:#f1f7fd;border-color:#006fd3;color:#006fd3;fill:#006fd3}._KikdV{padding:1px 8px;max-height:24px}._Yy9BH{padding:4px 8px}";
|
|
12780
13511
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z);}
|
|
12781
13512
|
|
|
12782
13513
|
const _excluded = ["children", "size", "variant", "className", "hideIcon"];
|