@easypost/easy-ui 1.0.0-alpha.64 → 1.0.0-alpha.66
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/Badge/index.js +14 -14
- package/Badge/index.mjs +14 -14
- package/Banner/index.js +5 -5
- package/Banner/index.mjs +5 -5
- package/Button/index.js +1 -1
- package/Button/index.mjs +1 -1
- package/CHANGELOG.md +14 -0
- package/Calendar/index.js +1 -1
- package/Calendar/index.mjs +1 -1
- package/Card/index.js +1 -1
- package/Card/index.mjs +1 -1
- package/Checkbox/index.js +1 -1
- package/Checkbox/index.mjs +1 -1
- package/CodeBlock/index.js +13 -13
- package/CodeBlock/index.mjs +13 -13
- package/CodeSnippet/index.js +1 -1
- package/CodeSnippet/index.mjs +1 -1
- package/DataGrid/index.js +57 -57
- package/DataGrid/index.mjs +58 -58
- package/DatePicker/index.js +3 -3
- package/DatePicker/index.mjs +5 -5
- package/DateRangePicker/index.js +3 -3
- package/DateRangePicker/index.mjs +5 -5
- package/Drawer/index.js +18 -18
- package/Drawer/index.mjs +22 -22
- package/DropdownButton/index.js +12 -12
- package/DropdownButton/index.mjs +12 -12
- package/EmptyStateCard/index.js +8 -8
- package/EmptyStateCard/index.mjs +8 -8
- package/FocusedProductLayout/index.js +23 -23
- package/FocusedProductLayout/index.mjs +23 -23
- package/ForgeLayout/index.js +41 -231
- package/ForgeLayout/index.mjs +40 -230
- package/FormLayout/index.js +5 -5
- package/FormLayout/index.mjs +5 -5
- package/HorizontalGrid/index.js +1 -1
- package/HorizontalGrid/index.mjs +1 -1
- package/HorizontalStack/index.js +1 -1
- package/HorizontalStack/index.mjs +1 -1
- package/Icon/index.js +1 -1
- package/Icon/index.mjs +1 -1
- package/IconButton/index.js +12 -12
- package/IconButton/index.mjs +12 -12
- package/InputField/index.js +1 -1
- package/InputField/index.mjs +1 -1
- package/KebabButton/index.js +1 -1
- package/KebabButton/index.mjs +1 -1
- package/Menu/MenuOverlay.d.ts.map +1 -1
- package/Menu/index.js +1 -1
- package/Menu/index.mjs +1 -1
- package/Menu/utilities.d.ts +3 -0
- package/Menu/utilities.d.ts.map +1 -1
- package/Modal/index.js +19 -19
- package/Modal/index.mjs +23 -23
- package/MultiSelect/MultiSelect.d.ts +123 -0
- package/MultiSelect/MultiSelect.d.ts.map +1 -0
- package/MultiSelect/MultiSelect.stories.d.ts +11 -0
- package/MultiSelect/MultiSelect.stories.d.ts.map +1 -0
- package/MultiSelect/MultiSelect.test.d.ts +2 -0
- package/MultiSelect/MultiSelect.test.d.ts.map +1 -0
- package/MultiSelect/MultiSelectDropdown.d.ts +22 -0
- package/MultiSelect/MultiSelectDropdown.d.ts.map +1 -0
- package/MultiSelect/index.d.ts +2 -0
- package/MultiSelect/index.d.ts.map +1 -0
- package/MultiSelect/index.js +1989 -0
- package/MultiSelect/index.mjs +1974 -0
- package/MultiSelect/utilities.d.ts +3 -0
- package/MultiSelect/utilities.d.ts.map +1 -0
- package/NexusLayout/index.js +28 -28
- package/NexusLayout/index.mjs +28 -28
- package/Notification/index.js +1 -1
- package/Notification/index.mjs +1 -1
- package/Pagination/index.js +7 -7
- package/Pagination/index.mjs +7 -7
- package/PillGroup/index.js +3 -1681
- package/PillGroup/index.mjs +3 -1681
- package/ProductLayout/index.js +21 -21
- package/ProductLayout/index.mjs +25 -25
- package/Provider/index.js +1 -1
- package/Provider/index.mjs +1 -1
- package/RadioButtonGroup/index.js +3 -3
- package/RadioButtonGroup/index.mjs +3 -3
- package/RadioGroup/index.js +1 -1
- package/RadioGroup/index.mjs +1 -1
- package/RangeCalendar/index.js +1 -1
- package/RangeCalendar/index.mjs +1 -1
- package/SearchNav/index.js +29 -29
- package/SearchNav/index.mjs +29 -29
- package/SectionCard/index.js +7 -7
- package/SectionCard/index.mjs +7 -7
- package/Select/index.js +5 -5
- package/Select/index.mjs +5 -5
- package/SelectorErrorTooltip/index.js +1 -1
- package/SelectorErrorTooltip/index.mjs +1 -1
- package/Spinner/index.js +1 -1
- package/Spinner/index.mjs +1 -1
- package/SplitToggleCard/index.js +4 -4
- package/SplitToggleCard/index.mjs +4 -4
- package/Stepper/index.js +1 -1
- package/Stepper/index.mjs +1 -1
- package/TabNav/index.js +1 -1
- package/TabNav/index.mjs +1 -1
- package/TabPanels/index.js +1 -1
- package/TabPanels/index.mjs +2 -2
- package/Tabs/index.js +1 -1
- package/Tabs/index.mjs +1 -1
- package/Text/index.js +1 -1
- package/Text/index.mjs +1 -1
- package/TextField/index.js +1 -1
- package/TextField/index.mjs +1 -1
- package/Textarea/index.js +1 -1
- package/Textarea/index.mjs +1 -1
- package/Toggle/index.js +1 -1
- package/Toggle/index.mjs +1 -1
- package/ToggleCard/index.js +2 -2
- package/ToggleCard/index.mjs +2 -2
- package/Tooltip/index.js +1 -1
- package/Tooltip/index.mjs +1 -1
- package/VerticalNav/index.js +24 -24
- package/VerticalNav/index.mjs +24 -24
- package/VerticalStack/index.js +1 -1
- package/VerticalStack/index.mjs +1 -1
- package/__chunks__/{Button-CDRssWxC.mjs → Button-BqogJAQ3.mjs} +3 -3
- package/__chunks__/{Button-SuH-KkYi.js → Button-CVaEK94Q.js} +18 -18
- package/__chunks__/{Button-DfkicQp7.mjs → Button-CVbi-24J.mjs} +18 -18
- package/__chunks__/{Button-BvLvcmfd.js → Button-Y550ybuK.js} +1 -1
- package/__chunks__/{Calendar-CB3kTGpr.mjs → Calendar-C2JlXaSY.mjs} +1 -1
- package/__chunks__/{Calendar-D5V31Ypy.js → Calendar-CmF_v-Dn.js} +1 -1
- package/__chunks__/{CalendarBase-CIkCiMYk.js → CalendarBase-Cavy4k_H.js} +18 -18
- package/__chunks__/{CalendarBase-Cq-ReOPx.mjs → CalendarBase-aeU9JZC2.mjs} +18 -18
- package/__chunks__/{Card-BKC3iEwF.mjs → Card-B5c1vM8E.mjs} +12 -12
- package/__chunks__/{Card-BGmLybqD.js → Card-BHZOcCVB.js} +12 -12
- package/__chunks__/{Checkbox-B-c8_oGX.js → Checkbox-BmtLwm3J.js} +19 -19
- package/__chunks__/{Checkbox-AbvJCEnW.mjs → Checkbox-IhSMESiF.mjs} +20 -20
- package/__chunks__/{CodeSnippet-CzP6GP8p.mjs → CodeSnippet-DA3SuGi9.mjs} +2 -2
- package/__chunks__/{CodeSnippet-D9Gfaozc.js → CodeSnippet-HAojQDBb.js} +2 -2
- package/__chunks__/{DatePickerBase-DVe9Z17z.mjs → DatePickerBase-DYuliQ2j.mjs} +20 -64
- package/__chunks__/{DatePickerBase-BW867uS-.js → DatePickerBase-PqJZhPW5.js} +18 -62
- package/__chunks__/Dialog-CFyC5TFs.js +232 -0
- package/__chunks__/Dialog-DnCSZh3s.mjs +233 -0
- package/__chunks__/{HelpMenu-BikR3il4.js → HelpMenu-DttT1pkc.js} +6 -6
- package/__chunks__/{HelpMenu-ylsZtQ2y.mjs → HelpMenu-dPaIsmEG.mjs} +6 -6
- package/__chunks__/{HorizontalGrid-7W4Y5Vah.js → HorizontalGrid-BFqXCljf.js} +1 -1
- package/__chunks__/{HorizontalGrid-B399c2dw.mjs → HorizontalGrid-CyBrrh6k.mjs} +1 -1
- package/__chunks__/{HorizontalStack-Bz49rrqk.js → HorizontalStack-BG-lZii5.js} +1 -1
- package/__chunks__/{HorizontalStack-9tVfFqP2.mjs → HorizontalStack-p9m9muAJ.mjs} +1 -1
- package/__chunks__/{Icon-AWZqgFkO.js → Icon-BHbBKuGB.js} +2 -2
- package/__chunks__/{Icon-tvIiMl4h.mjs → Icon-ZRjQkfey.mjs} +2 -2
- package/__chunks__/{InputCaption-DMwqCmEY.js → InputCaption-BQw7pLl1.js} +2 -2
- package/__chunks__/{InputCaption-BPHL8W55.mjs → InputCaption-DE7SnGJr.mjs} +2 -2
- package/__chunks__/{InputField-LUuwaWK6.mjs → InputField-1toY1X94.mjs} +6 -89
- package/__chunks__/{InputField-BBG9VjEM.js → InputField-e2dBsTrQ.js} +6 -89
- package/__chunks__/{InputIcon-C6fRUjFn.mjs → InputIcon-CKwsgYvg.mjs} +31 -31
- package/__chunks__/{InputIcon-BOj4dVSh.js → InputIcon-DM19rdNu.js} +31 -31
- package/__chunks__/{KebabButton-DXxpDShY.js → KebabButton-3APOVOtc.js} +4 -4
- package/__chunks__/{KebabButton-DdERbhKc.mjs → KebabButton-CGvwEB3q.mjs} +4 -4
- package/__chunks__/{Menu-BtQxi784.js → Menu-90Db_wYM.js} +22 -62
- package/__chunks__/{Menu-CGSgffvA.mjs → Menu-D7JiGJt4.mjs} +22 -62
- package/__chunks__/{Notification-sLPjuMls.mjs → Notification-C4gEE6IM.mjs} +14 -14
- package/__chunks__/{Notification-CTV7jwBV.js → Notification-DZ0uDsoT.js} +14 -14
- package/__chunks__/{Overlay-DyfvFsGi.mjs → Overlay-BEmOdNIB.mjs} +3 -3
- package/__chunks__/PillGroup-BetDOSFz.js +2061 -0
- package/__chunks__/PillGroup-Bp5vfk6Z.mjs +2062 -0
- package/__chunks__/{RadioGroup-jGUuixrB.mjs → RadioGroup-DPJOnxCi.mjs} +16 -16
- package/__chunks__/{RadioGroup-CN_RSlFy.js → RadioGroup-Qn2c29rT.js} +15 -15
- package/__chunks__/{RangeCalendar-D5fz339R.mjs → RangeCalendar-BNySCRAa.mjs} +1 -1
- package/__chunks__/{RangeCalendar-odwkDlEn.js → RangeCalendar-lhIzCnWl.js} +1 -1
- package/__chunks__/{SelectOverlay-BegZKkp1.js → SelectOverlay-CoOED545.js} +28 -188
- package/__chunks__/{SelectOverlay-CoSQv1a0.mjs → SelectOverlay-D12QgA_I.mjs} +29 -189
- package/__chunks__/{SelectorErrorTooltip-DT7rcGh6.js → SelectorErrorTooltip-CNinvIcU.js} +4 -4
- package/__chunks__/{SelectorErrorTooltip-By-GwbSg.mjs → SelectorErrorTooltip-Cz7Uw_O_.mjs} +4 -4
- package/__chunks__/{Spinner-dtD1VQqy.mjs → Spinner-Co64ezt-.mjs} +5 -5
- package/__chunks__/{Spinner-nHnby3-R.js → Spinner-DTH0xdij.js} +5 -5
- package/__chunks__/{Stepper-vfWux5uh.js → Stepper-DqcfNOrn.js} +25 -25
- package/__chunks__/{Stepper-DCWfT6Sx.mjs → Stepper-OFWKfhi3.mjs} +25 -25
- package/__chunks__/{TabNav-BRBhGNv8.mjs → TabNav-B44TuB70.mjs} +1 -1
- package/__chunks__/{TabNav-BJUikM9a.js → TabNav-DzF57oTN.js} +1 -1
- package/__chunks__/{Tabs-Do2OPQch.mjs → Tabs-ClOwavjv.mjs} +17 -17
- package/__chunks__/{Tabs-DX6oanPk.js → Tabs-CsxDAl1X.js} +17 -17
- package/__chunks__/{Text-DM6H1mZu.js → Text-BwXTDw77.js} +34 -34
- package/__chunks__/{Text-DLBOW0Eu.mjs → Text-DYLBjpe-.mjs} +34 -34
- package/__chunks__/{TextField-BmHD0Ts_.mjs → TextField-DVWDMYaM.mjs} +1 -1
- package/__chunks__/{TextField-DN6oGeBc.js → TextField-YD_1oSnk.js} +1 -1
- package/__chunks__/{Toggle-CDwSjy-c.mjs → Toggle-DiK1wHdG.mjs} +11 -11
- package/__chunks__/{Toggle-CkJcayVz.js → Toggle-gPKUf7QS.js} +11 -11
- package/__chunks__/{Tooltip-CSsijgRV.mjs → Tooltip-BX_C7x_7.mjs} +10 -10
- package/__chunks__/{Tooltip-U0vMQeot.js → Tooltip-DPZMv6Ia.js} +8 -8
- package/__chunks__/{VerticalStack-1CrrssEd.mjs → VerticalStack-C466n8W1.mjs} +3 -3
- package/__chunks__/{VerticalStack-D25ZR-UD.js → VerticalStack-DIpmkisq.js} +3 -3
- package/__chunks__/{useDialog-c-C07qhw.mjs → useDialog-h-MPfyGr.mjs} +1 -1
- package/__chunks__/{useEdgeInterceptors-DM6DGJVL.mjs → useEdgeInterceptors-BORL2txk.mjs} +5 -5
- package/__chunks__/{useEdgeInterceptors-g_iE4uY5.js → useEdgeInterceptors-DU8I_hQ1.js} +5 -5
- package/__chunks__/useFilter-D-K0Oj-7.mjs +65 -0
- package/__chunks__/useFilter-DpnZ54nd.js +64 -0
- package/__chunks__/{useFormValidation-v2O6VL2V.mjs → useFormValidation-B3euLzzR.mjs} +4 -4
- package/__chunks__/useListBoxSection-BlFRlBZy.js +192 -0
- package/__chunks__/useListBoxSection-BsSdeGKp.mjs +193 -0
- package/__chunks__/{useTriggerWidth-CRz8zSDa.mjs → useMenuTrigger-D4pQ727R.mjs} +3 -130
- package/__chunks__/{useTriggerWidth-Dj7C0lza.js → useMenuTrigger-qbIPy-fg.js} +0 -127
- package/__chunks__/useMenuTriggerState-Cf_X36NC.mjs +67 -0
- package/__chunks__/useMenuTriggerState-Dai3rheB.js +66 -0
- package/__chunks__/{useModalOverlay-S0R2uVTX.mjs → useModalOverlay-CkOujl0G.mjs} +1 -1
- package/__chunks__/{useOverlayPosition-BjK7cu6U.mjs → useOverlayPosition-dua8TTSS.mjs} +1 -1
- package/__chunks__/{useOverlayTrigger-DDcXdZOM.mjs → useOverlayTrigger-BS8c6XEz.mjs} +1 -1
- package/__chunks__/{useSelectableItem-D61t76J1.mjs → useSelectableItem-B8l2VAQ8.mjs} +2 -2
- package/__chunks__/{useSelectableList-UkBCcTuC.js → useSelectableList-CzTJAukw.js} +15 -0
- package/__chunks__/{useSelectableList-BdG5I7cy.mjs → useSelectableList-DsUuWr0P.mjs} +18 -3
- package/__chunks__/useTextField-CErFc3WZ.js +106 -0
- package/__chunks__/useTextField-Dd-YTxI4.mjs +107 -0
- package/__chunks__/useTriggerWidth-B-IM2wNY.js +132 -0
- package/__chunks__/useTriggerWidth-CAYuGPNq.mjs +133 -0
- package/__chunks__/{utilities-CaBPUKEB.js → utilities-BDABIMDb.js} +4 -0
- package/__chunks__/{utilities-DASknbaa.mjs → utilities-DpKIaDkW.mjs} +5 -1
- package/__chunks__/{utils-D4ddhsBL.mjs → utils-Dt6xdGol.mjs} +10 -2
- package/__chunks__/{utils-DIF5XAA2.js → utils-eHk7b-OB.js} +8 -0
- package/package.json +2 -2
- package/style.css +1609 -1444
- package/utilities/storybook.d.ts +1 -0
- package/utilities/storybook.d.ts.map +1 -1
package/PillGroup/index.mjs
CHANGED
|
@@ -1,1683 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
import React__default, { useState, useMemo, useRef, useEffect, cloneElement, useContext, useCallback, forwardRef, createContext } from "react";
|
|
33
|
-
import { c as $f39a9eba43920ace$export$8dc98ba7eadeaa56, d as $f39a9eba43920ace$export$86427a43e3e48ebb, a as $d2b4bc8c273e7be6$export$24d547caef80ccd1, b as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../__chunks__/Button-CDRssWxC.mjs";
|
|
34
|
-
import { $ as $64fa3d84918910a7$export$29f1550f4b0d4415, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, d as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../__chunks__/utils-D4ddhsBL.mjs";
|
|
35
|
-
import { createPortal } from "react-dom";
|
|
36
|
-
import { c as $bdb11010cef70236$export$f680877a34711e37, $ as $3ef42575df84b30b$export$9d1611c77c2fe928, b as $bdb11010cef70236$export$b4cc09c592e8fdb8, f as $ff5963eb1fccf552$export$e08e3b67e392101e, d as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, e as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "../__chunks__/mergeProps-DSi85raC.mjs";
|
|
37
|
-
import { s as shimExports } from "../__chunks__/index-DCSYt1ke.mjs";
|
|
38
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../__chunks__/filterDOMProps-EDDcM64A.mjs";
|
|
39
|
-
import { $ as $df56164dff5785e2$export$4338b53315abf666 } from "../__chunks__/useObjectRef-wU82Pkgx.mjs";
|
|
40
|
-
import { $ as $e72dd72e1c76a225$export$2f645645f7bca764 } from "../__chunks__/useListState-AFrlkW73.mjs";
|
|
41
|
-
import { $ as $982254629710d113$export$b95089534ab7c1fd, a as $2a25aae57d74318e$export$a05409b8bb224a5a } from "../__chunks__/useSelectableList-BdG5I7cy.mjs";
|
|
42
|
-
import { $ as $2baaea4c71418dea$export$294aa081a6c6f55d } from "../__chunks__/useField-B6VplZ_n.mjs";
|
|
43
|
-
import { $ as $9ab94262bd0047c7$export$420e68273165f4ec } from "../__chunks__/useFocusWithin-B-vQAW9V.mjs";
|
|
44
|
-
import { $ as $5b9b5b5723db6ae1$export$be42ebdab07ae4c2, a as $92599c3fd427b763$export$137e594ef3218a10 } from "../__chunks__/useHighlightSelectionDescription-Cebr-N8X.mjs";
|
|
45
|
-
import { $ as $83013635b024ae3d$export$eac1895992b9f3d6 } from "../__chunks__/useHasTabbableChild-BKgmY6ej.mjs";
|
|
46
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../__chunks__/context-BZCcafjG.mjs";
|
|
47
|
-
import { g as $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6 } from "../__chunks__/usePress-Db4pSZfY.mjs";
|
|
48
|
-
import { b as $2f04cbc44ee30ce0$export$c826860796309d1b, $ as $ef06256079686ba0$export$f8aeda7b10753fa1 } from "../__chunks__/scrollIntoView-CZM0k-rp.mjs";
|
|
49
|
-
import { $ as $62d8ded9296f3872$export$cfa2225e87938781 } from "../__chunks__/getScrollParent-B5CCP-yO.mjs";
|
|
50
|
-
import { $ as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../__chunks__/FocusScope-Qg8vUhZ_.mjs";
|
|
51
|
-
import { $ as $6a99195332edec8b$export$80f3e147d781571c } from "../__chunks__/focusSafely-BWGCG3W3.mjs";
|
|
52
|
-
import { d as $c5a24bc478652b5f$export$7475b2c64539e4cf } from "../__chunks__/SelectionManager-DCO_d3m1.mjs";
|
|
53
|
-
import { b as $507fabe10e71c6fb$export$b9b3dfddab17db27, e as $507fabe10e71c6fb$export$98e20ec92f614cfe } from "../__chunks__/useFocusVisible-ng1Hn25t.mjs";
|
|
54
|
-
import { a as $880e95eb8b93ba9a$export$ecf600387e221c37 } from "../__chunks__/useSelectableItem-D61t76J1.mjs";
|
|
55
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "../__chunks__/useLocalizedStringFormatter-BHXy3Wtu.mjs";
|
|
56
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../__chunks__/useFocusRing-YOWeCHgO.mjs";
|
|
57
|
-
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../__chunks__/useHover-BOYR4wqI.mjs";
|
|
58
|
-
import { C as Close } from "../__chunks__/Close-Cq6Q6MN6.mjs";
|
|
59
|
-
import { I as Icon } from "../__chunks__/Icon-tvIiMl4h.mjs";
|
|
60
|
-
import { T as Text } from "../__chunks__/Text-DLBOW0Eu.mjs";
|
|
61
|
-
import { getResponsiveDesignToken, getComponentToken } from "../utilities/css.mjs";
|
|
62
|
-
function $0d86e9c8f07f9a7b$export$762f73dccccd255d(options) {
|
|
63
|
-
let { initialItems = [], initialSelectedKeys, getKey = (item) => {
|
|
64
|
-
var _item_id;
|
|
65
|
-
return (_item_id = item.id) !== null && _item_id !== void 0 ? _item_id : item.key;
|
|
66
|
-
}, filter, initialFilterText = "" } = options;
|
|
67
|
-
let [state, setState] = useState({
|
|
68
|
-
items: initialItems,
|
|
69
|
-
selectedKeys: initialSelectedKeys === "all" ? "all" : new Set(initialSelectedKeys || []),
|
|
70
|
-
filterText: initialFilterText
|
|
71
|
-
});
|
|
72
|
-
let filteredItems = useMemo(() => filter ? state.items.filter((item) => filter(item, state.filterText)) : state.items, [
|
|
73
|
-
state.items,
|
|
74
|
-
state.filterText,
|
|
75
|
-
filter
|
|
76
|
-
]);
|
|
77
|
-
return __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, state), {
|
|
78
|
-
items: filteredItems
|
|
79
|
-
}), $0d86e9c8f07f9a7b$export$79c0c687a5963b0a({
|
|
80
|
-
getKey
|
|
81
|
-
}, setState)), {
|
|
82
|
-
getItem(key) {
|
|
83
|
-
return state.items.find((item) => getKey(item) === key);
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
function $0d86e9c8f07f9a7b$export$79c0c687a5963b0a(opts, dispatch) {
|
|
88
|
-
let { cursor, getKey } = opts;
|
|
89
|
-
return {
|
|
90
|
-
setSelectedKeys(selectedKeys) {
|
|
91
|
-
dispatch((state) => __spreadProps(__spreadValues({}, state), {
|
|
92
|
-
selectedKeys
|
|
93
|
-
}));
|
|
94
|
-
},
|
|
95
|
-
setFilterText(filterText) {
|
|
96
|
-
dispatch((state) => __spreadProps(__spreadValues({}, state), {
|
|
97
|
-
filterText
|
|
98
|
-
}));
|
|
99
|
-
},
|
|
100
|
-
insert(index, ...values) {
|
|
101
|
-
dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, index, ...values));
|
|
102
|
-
},
|
|
103
|
-
insertBefore(key, ...values) {
|
|
104
|
-
dispatch((state) => {
|
|
105
|
-
let index = state.items.findIndex((item) => (getKey === null || getKey === void 0 ? void 0 : getKey(item)) === key);
|
|
106
|
-
if (index === -1) {
|
|
107
|
-
if (state.items.length === 0) index = 0;
|
|
108
|
-
else return state;
|
|
109
|
-
}
|
|
110
|
-
return $0d86e9c8f07f9a7b$var$insert(state, index, ...values);
|
|
111
|
-
});
|
|
112
|
-
},
|
|
113
|
-
insertAfter(key, ...values) {
|
|
114
|
-
dispatch((state) => {
|
|
115
|
-
let index = state.items.findIndex((item) => (getKey === null || getKey === void 0 ? void 0 : getKey(item)) === key);
|
|
116
|
-
if (index === -1) {
|
|
117
|
-
if (state.items.length === 0) index = 0;
|
|
118
|
-
else return state;
|
|
119
|
-
}
|
|
120
|
-
return $0d86e9c8f07f9a7b$var$insert(state, index + 1, ...values);
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
|
-
prepend(...values) {
|
|
124
|
-
dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, 0, ...values));
|
|
125
|
-
},
|
|
126
|
-
append(...values) {
|
|
127
|
-
dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, state.items.length, ...values));
|
|
128
|
-
},
|
|
129
|
-
remove(...keys) {
|
|
130
|
-
dispatch((state) => {
|
|
131
|
-
let keySet = new Set(keys);
|
|
132
|
-
let items = state.items.filter((item) => !keySet.has(getKey(item)));
|
|
133
|
-
let selection = "all";
|
|
134
|
-
if (state.selectedKeys !== "all") {
|
|
135
|
-
selection = new Set(state.selectedKeys);
|
|
136
|
-
for (let key of keys) selection.delete(key);
|
|
137
|
-
}
|
|
138
|
-
if (cursor == null && items.length === 0) selection = /* @__PURE__ */ new Set();
|
|
139
|
-
return __spreadProps(__spreadValues({}, state), {
|
|
140
|
-
items,
|
|
141
|
-
selectedKeys: selection
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
},
|
|
145
|
-
removeSelectedItems() {
|
|
146
|
-
dispatch((state) => {
|
|
147
|
-
if (state.selectedKeys === "all") return __spreadProps(__spreadValues({}, state), {
|
|
148
|
-
items: [],
|
|
149
|
-
selectedKeys: /* @__PURE__ */ new Set()
|
|
150
|
-
});
|
|
151
|
-
let selectedKeys = state.selectedKeys;
|
|
152
|
-
let items = state.items.filter((item) => !selectedKeys.has(getKey(item)));
|
|
153
|
-
return __spreadProps(__spreadValues({}, state), {
|
|
154
|
-
items,
|
|
155
|
-
selectedKeys: /* @__PURE__ */ new Set()
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
},
|
|
159
|
-
move(key, toIndex) {
|
|
160
|
-
dispatch((state) => {
|
|
161
|
-
let index = state.items.findIndex((item2) => getKey(item2) === key);
|
|
162
|
-
if (index === -1) return state;
|
|
163
|
-
let copy = state.items.slice();
|
|
164
|
-
let [item] = copy.splice(index, 1);
|
|
165
|
-
copy.splice(toIndex, 0, item);
|
|
166
|
-
return __spreadProps(__spreadValues({}, state), {
|
|
167
|
-
items: copy
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
},
|
|
171
|
-
moveBefore(key, keys) {
|
|
172
|
-
dispatch((state) => {
|
|
173
|
-
let toIndex = state.items.findIndex((item) => getKey(item) === key);
|
|
174
|
-
if (toIndex === -1) return state;
|
|
175
|
-
let keyArray = Array.isArray(keys) ? keys : [
|
|
176
|
-
...keys
|
|
177
|
-
];
|
|
178
|
-
let indices = keyArray.map((key2) => state.items.findIndex((item) => getKey(item) === key2)).sort((a, b) => a - b);
|
|
179
|
-
return $0d86e9c8f07f9a7b$var$move(state, indices, toIndex);
|
|
180
|
-
});
|
|
181
|
-
},
|
|
182
|
-
moveAfter(key, keys) {
|
|
183
|
-
dispatch((state) => {
|
|
184
|
-
let toIndex = state.items.findIndex((item) => getKey(item) === key);
|
|
185
|
-
if (toIndex === -1) return state;
|
|
186
|
-
let keyArray = Array.isArray(keys) ? keys : [
|
|
187
|
-
...keys
|
|
188
|
-
];
|
|
189
|
-
let indices = keyArray.map((key2) => state.items.findIndex((item) => getKey(item) === key2)).sort((a, b) => a - b);
|
|
190
|
-
return $0d86e9c8f07f9a7b$var$move(state, indices, toIndex + 1);
|
|
191
|
-
});
|
|
192
|
-
},
|
|
193
|
-
update(key, newValue) {
|
|
194
|
-
dispatch((state) => {
|
|
195
|
-
let index = state.items.findIndex((item) => getKey(item) === key);
|
|
196
|
-
if (index === -1) return state;
|
|
197
|
-
return __spreadProps(__spreadValues({}, state), {
|
|
198
|
-
items: [
|
|
199
|
-
...state.items.slice(0, index),
|
|
200
|
-
newValue,
|
|
201
|
-
...state.items.slice(index + 1)
|
|
202
|
-
]
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
function $0d86e9c8f07f9a7b$var$insert(state, index, ...values) {
|
|
209
|
-
return __spreadProps(__spreadValues({}, state), {
|
|
210
|
-
items: [
|
|
211
|
-
...state.items.slice(0, index),
|
|
212
|
-
...values,
|
|
213
|
-
...state.items.slice(index)
|
|
214
|
-
]
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
function $0d86e9c8f07f9a7b$var$move(state, indices, toIndex) {
|
|
218
|
-
toIndex -= indices.filter((index) => index < toIndex).length;
|
|
219
|
-
let moves = indices.map((from) => ({
|
|
220
|
-
from,
|
|
221
|
-
to: toIndex++
|
|
222
|
-
}));
|
|
223
|
-
for (let i = 0; i < moves.length; i++) {
|
|
224
|
-
let a = moves[i].from;
|
|
225
|
-
for (let j = i; j < moves.length; j++) {
|
|
226
|
-
let b = moves[j].from;
|
|
227
|
-
if (b > a) moves[j].from--;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
for (let i = 0; i < moves.length; i++) {
|
|
231
|
-
let a = moves[i];
|
|
232
|
-
for (let j = moves.length - 1; j > i; j--) {
|
|
233
|
-
let b = moves[j];
|
|
234
|
-
if (b.from < a.to) a.to++;
|
|
235
|
-
else b.from++;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
let copy = state.items.slice();
|
|
239
|
-
for (let move of moves) {
|
|
240
|
-
let [item] = copy.splice(move.from, 1);
|
|
241
|
-
copy.splice(move.to, 0, item);
|
|
242
|
-
}
|
|
243
|
-
return __spreadProps(__spreadValues({}, state), {
|
|
244
|
-
items: copy
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
const $ce9b18daab526bbd$export$5b9bb410392e3991 = /* @__PURE__ */ new WeakMap();
|
|
248
|
-
function $ce9b18daab526bbd$export$f45c25170b9a99c2(state, key) {
|
|
249
|
-
var _listMap_get;
|
|
250
|
-
let { id } = (_listMap_get = $ce9b18daab526bbd$export$5b9bb410392e3991.get(state)) !== null && _listMap_get !== void 0 ? _listMap_get : {};
|
|
251
|
-
if (!id) throw new Error("Unknown list");
|
|
252
|
-
return `${id}-${$ce9b18daab526bbd$export$e0c709538cb8ae18(key)}`;
|
|
253
|
-
}
|
|
254
|
-
function $ce9b18daab526bbd$export$e0c709538cb8ae18(key) {
|
|
255
|
-
if (typeof key === "string") return key.replace(/\s*/g, "");
|
|
256
|
-
return "" + key;
|
|
257
|
-
}
|
|
258
|
-
function $f47efb0c3a859cf2$export$664f9155035607eb(props, state, ref) {
|
|
259
|
-
let { isVirtualized, keyboardDelegate, layoutDelegate, onAction, linkBehavior = "action", keyboardNavigationBehavior = "arrow" } = props;
|
|
260
|
-
if (!props["aria-label"] && !props["aria-labelledby"]) console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
|
|
261
|
-
let { listProps } = $982254629710d113$export$b95089534ab7c1fd({
|
|
262
|
-
selectionManager: state.selectionManager,
|
|
263
|
-
collection: state.collection,
|
|
264
|
-
disabledKeys: state.disabledKeys,
|
|
265
|
-
ref,
|
|
266
|
-
keyboardDelegate,
|
|
267
|
-
layoutDelegate,
|
|
268
|
-
isVirtualized,
|
|
269
|
-
selectOnFocus: state.selectionManager.selectionBehavior === "replace",
|
|
270
|
-
shouldFocusWrap: props.shouldFocusWrap,
|
|
271
|
-
linkBehavior
|
|
272
|
-
});
|
|
273
|
-
let id = $bdb11010cef70236$export$f680877a34711e37(props.id);
|
|
274
|
-
$ce9b18daab526bbd$export$5b9bb410392e3991.set(state, {
|
|
275
|
-
id,
|
|
276
|
-
onAction,
|
|
277
|
-
linkBehavior,
|
|
278
|
-
keyboardNavigationBehavior
|
|
279
|
-
});
|
|
280
|
-
let descriptionProps = $5b9b5b5723db6ae1$export$be42ebdab07ae4c2({
|
|
281
|
-
selectionManager: state.selectionManager,
|
|
282
|
-
hasItemActions: !!onAction
|
|
283
|
-
});
|
|
284
|
-
let hasTabbableChild = $83013635b024ae3d$export$eac1895992b9f3d6(ref, {
|
|
285
|
-
isDisabled: state.collection.size !== 0
|
|
286
|
-
});
|
|
287
|
-
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
288
|
-
labelable: true
|
|
289
|
-
});
|
|
290
|
-
let gridProps = $3ef42575df84b30b$export$9d1611c77c2fe928(
|
|
291
|
-
domProps,
|
|
292
|
-
{
|
|
293
|
-
role: "grid",
|
|
294
|
-
id,
|
|
295
|
-
"aria-multiselectable": state.selectionManager.selectionMode === "multiple" ? "true" : void 0
|
|
296
|
-
},
|
|
297
|
-
// If collection is empty, make sure the grid is tabbable unless there is a child tabbable element.
|
|
298
|
-
state.collection.size === 0 ? {
|
|
299
|
-
tabIndex: hasTabbableChild ? -1 : 0
|
|
300
|
-
} : listProps,
|
|
301
|
-
descriptionProps
|
|
302
|
-
);
|
|
303
|
-
if (isVirtualized) {
|
|
304
|
-
gridProps["aria-rowcount"] = state.collection.size;
|
|
305
|
-
gridProps["aria-colcount"] = 1;
|
|
306
|
-
}
|
|
307
|
-
$92599c3fd427b763$export$137e594ef3218a10({}, state);
|
|
308
|
-
return {
|
|
309
|
-
gridProps
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
const $4e8b0456ef72939f$var$EXPANSION_KEYS = {
|
|
313
|
-
"expand": {
|
|
314
|
-
ltr: "ArrowRight",
|
|
315
|
-
rtl: "ArrowLeft"
|
|
316
|
-
},
|
|
317
|
-
"collapse": {
|
|
318
|
-
ltr: "ArrowLeft",
|
|
319
|
-
rtl: "ArrowRight"
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
323
|
-
var _node_props, _node_props1;
|
|
324
|
-
let { node, isVirtualized, shouldSelectOnPressUp } = props;
|
|
325
|
-
let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
326
|
-
let { onAction, linkBehavior, keyboardNavigationBehavior } = $ce9b18daab526bbd$export$5b9bb410392e3991.get(state);
|
|
327
|
-
let descriptionId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
|
|
328
|
-
let keyWhenFocused = useRef(null);
|
|
329
|
-
let focus = () => {
|
|
330
|
-
var _ref_current;
|
|
331
|
-
if (ref.current !== null && (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(document.activeElement)))) $6a99195332edec8b$export$80f3e147d781571c(ref.current);
|
|
332
|
-
};
|
|
333
|
-
let treeGridRowProps = {};
|
|
334
|
-
let hasChildRows;
|
|
335
|
-
let hasLink = state.selectionManager.isLink(node.key);
|
|
336
|
-
if (node != null && "expandedKeys" in state) {
|
|
337
|
-
var _state_collection_getChildren, _state_collection, _filter_at;
|
|
338
|
-
let children = (_state_collection_getChildren = (_state_collection = state.collection).getChildren) === null || _state_collection_getChildren === void 0 ? void 0 : _state_collection_getChildren.call(_state_collection, node.key);
|
|
339
|
-
hasChildRows = [
|
|
340
|
-
...children !== null && children !== void 0 ? children : []
|
|
341
|
-
].length > 1;
|
|
342
|
-
if (onAction == null && !hasLink && state.selectionManager.selectionMode === "none" && hasChildRows) onAction = () => state.toggleKey(node.key);
|
|
343
|
-
let isExpanded = hasChildRows ? state.expandedKeys.has(node.key) : void 0;
|
|
344
|
-
let setSize = 1;
|
|
345
|
-
var _filter_at_index;
|
|
346
|
-
if (node.level > 0 && (node === null || node === void 0 ? void 0 : node.parentKey) != null) {
|
|
347
|
-
let parent = state.collection.getItem(node.parentKey);
|
|
348
|
-
if (parent) {
|
|
349
|
-
var _state_collection_getChildren1, _state_collection1;
|
|
350
|
-
let siblings = (_state_collection_getChildren1 = (_state_collection1 = state.collection).getChildren) === null || _state_collection_getChildren1 === void 0 ? void 0 : _state_collection_getChildren1.call(_state_collection1, parent.key);
|
|
351
|
-
setSize = $c5a24bc478652b5f$export$7475b2c64539e4cf(siblings).index + 1;
|
|
352
|
-
}
|
|
353
|
-
} else setSize = ((_filter_at_index = (_filter_at = [
|
|
354
|
-
...state.collection
|
|
355
|
-
].filter((row) => row.level === 0).at(-1)) === null || _filter_at === void 0 ? void 0 : _filter_at.index) !== null && _filter_at_index !== void 0 ? _filter_at_index : 0) + 1;
|
|
356
|
-
treeGridRowProps = {
|
|
357
|
-
"aria-expanded": isExpanded,
|
|
358
|
-
"aria-level": node.level + 1,
|
|
359
|
-
"aria-posinset": (node === null || node === void 0 ? void 0 : node.index) + 1,
|
|
360
|
-
"aria-setsize": setSize
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
let _a = $880e95eb8b93ba9a$export$ecf600387e221c37({
|
|
364
|
-
selectionManager: state.selectionManager,
|
|
365
|
-
key: node.key,
|
|
366
|
-
ref,
|
|
367
|
-
isVirtualized,
|
|
368
|
-
shouldSelectOnPressUp,
|
|
369
|
-
onAction: onAction || ((_node_props = node.props) === null || _node_props === void 0 ? void 0 : _node_props.onAction) ? $ff5963eb1fccf552$export$e08e3b67e392101e((_node_props1 = node.props) === null || _node_props1 === void 0 ? void 0 : _node_props1.onAction, onAction ? () => onAction(node.key) : void 0) : void 0,
|
|
370
|
-
focus,
|
|
371
|
-
linkBehavior
|
|
372
|
-
}), { itemProps } = _a, itemStates = __objRest(_a, ["itemProps"]);
|
|
373
|
-
let onKeyDown = (e) => {
|
|
374
|
-
if (!e.currentTarget.contains(e.target) || !ref.current || !document.activeElement) return;
|
|
375
|
-
let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current);
|
|
376
|
-
walker.currentNode = document.activeElement;
|
|
377
|
-
if ("expandedKeys" in state && document.activeElement === ref.current) {
|
|
378
|
-
if (e.key === $4e8b0456ef72939f$var$EXPANSION_KEYS["expand"][direction] && state.selectionManager.focusedKey === node.key && hasChildRows && !state.expandedKeys.has(node.key)) {
|
|
379
|
-
state.toggleKey(node.key);
|
|
380
|
-
e.stopPropagation();
|
|
381
|
-
return;
|
|
382
|
-
} else if (e.key === $4e8b0456ef72939f$var$EXPANSION_KEYS["collapse"][direction] && state.selectionManager.focusedKey === node.key && hasChildRows && state.expandedKeys.has(node.key)) {
|
|
383
|
-
state.toggleKey(node.key);
|
|
384
|
-
e.stopPropagation();
|
|
385
|
-
return;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
switch (e.key) {
|
|
389
|
-
case "ArrowLeft":
|
|
390
|
-
if (keyboardNavigationBehavior === "arrow") {
|
|
391
|
-
let focusable = direction === "rtl" ? walker.nextNode() : walker.previousNode();
|
|
392
|
-
if (focusable) {
|
|
393
|
-
e.preventDefault();
|
|
394
|
-
e.stopPropagation();
|
|
395
|
-
$6a99195332edec8b$export$80f3e147d781571c(focusable);
|
|
396
|
-
$2f04cbc44ee30ce0$export$c826860796309d1b(focusable, {
|
|
397
|
-
containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current)
|
|
398
|
-
});
|
|
399
|
-
} else {
|
|
400
|
-
e.preventDefault();
|
|
401
|
-
e.stopPropagation();
|
|
402
|
-
if (direction === "rtl") {
|
|
403
|
-
$6a99195332edec8b$export$80f3e147d781571c(ref.current);
|
|
404
|
-
$2f04cbc44ee30ce0$export$c826860796309d1b(ref.current, {
|
|
405
|
-
containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current)
|
|
406
|
-
});
|
|
407
|
-
} else {
|
|
408
|
-
walker.currentNode = ref.current;
|
|
409
|
-
let lastElement = $4e8b0456ef72939f$var$last(walker);
|
|
410
|
-
if (lastElement) {
|
|
411
|
-
$6a99195332edec8b$export$80f3e147d781571c(lastElement);
|
|
412
|
-
$2f04cbc44ee30ce0$export$c826860796309d1b(lastElement, {
|
|
413
|
-
containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current)
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
break;
|
|
420
|
-
case "ArrowRight":
|
|
421
|
-
if (keyboardNavigationBehavior === "arrow") {
|
|
422
|
-
let focusable = direction === "rtl" ? walker.previousNode() : walker.nextNode();
|
|
423
|
-
if (focusable) {
|
|
424
|
-
e.preventDefault();
|
|
425
|
-
e.stopPropagation();
|
|
426
|
-
$6a99195332edec8b$export$80f3e147d781571c(focusable);
|
|
427
|
-
$2f04cbc44ee30ce0$export$c826860796309d1b(focusable, {
|
|
428
|
-
containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current)
|
|
429
|
-
});
|
|
430
|
-
} else {
|
|
431
|
-
e.preventDefault();
|
|
432
|
-
e.stopPropagation();
|
|
433
|
-
if (direction === "ltr") {
|
|
434
|
-
$6a99195332edec8b$export$80f3e147d781571c(ref.current);
|
|
435
|
-
$2f04cbc44ee30ce0$export$c826860796309d1b(ref.current, {
|
|
436
|
-
containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current)
|
|
437
|
-
});
|
|
438
|
-
} else {
|
|
439
|
-
walker.currentNode = ref.current;
|
|
440
|
-
let lastElement = $4e8b0456ef72939f$var$last(walker);
|
|
441
|
-
if (lastElement) {
|
|
442
|
-
$6a99195332edec8b$export$80f3e147d781571c(lastElement);
|
|
443
|
-
$2f04cbc44ee30ce0$export$c826860796309d1b(lastElement, {
|
|
444
|
-
containingElement: $62d8ded9296f3872$export$cfa2225e87938781(ref.current)
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
break;
|
|
451
|
-
case "ArrowUp":
|
|
452
|
-
case "ArrowDown":
|
|
453
|
-
if (!e.altKey && ref.current.contains(e.target)) {
|
|
454
|
-
var _ref_current_parentElement;
|
|
455
|
-
e.stopPropagation();
|
|
456
|
-
e.preventDefault();
|
|
457
|
-
(_ref_current_parentElement = ref.current.parentElement) === null || _ref_current_parentElement === void 0 ? void 0 : _ref_current_parentElement.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
|
|
458
|
-
}
|
|
459
|
-
break;
|
|
460
|
-
case "Tab":
|
|
461
|
-
if (keyboardNavigationBehavior === "tab") {
|
|
462
|
-
let walker2 = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current, {
|
|
463
|
-
tabbable: true
|
|
464
|
-
});
|
|
465
|
-
walker2.currentNode = document.activeElement;
|
|
466
|
-
let next = e.shiftKey ? walker2.previousNode() : walker2.nextNode();
|
|
467
|
-
if (next) e.stopPropagation();
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
};
|
|
471
|
-
let onFocus = (e) => {
|
|
472
|
-
keyWhenFocused.current = node.key;
|
|
473
|
-
if (e.target !== ref.current) {
|
|
474
|
-
if (!$507fabe10e71c6fb$export$b9b3dfddab17db27()) state.selectionManager.setFocusedKey(node.key);
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
let syntheticLinkProps = $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(node.props);
|
|
479
|
-
let linkProps = itemStates.hasAction ? syntheticLinkProps : {};
|
|
480
|
-
let rowProps = $3ef42575df84b30b$export$9d1611c77c2fe928(itemProps, linkProps, {
|
|
481
|
-
role: "row",
|
|
482
|
-
onKeyDownCapture: onKeyDown,
|
|
483
|
-
onFocus,
|
|
484
|
-
// 'aria-label': [(node.textValue || undefined), rowAnnouncement].filter(Boolean).join(', '),
|
|
485
|
-
"aria-label": node.textValue || void 0,
|
|
486
|
-
"aria-selected": state.selectionManager.canSelectItem(node.key) ? state.selectionManager.isSelected(node.key) : void 0,
|
|
487
|
-
"aria-disabled": state.selectionManager.isDisabled(node.key) || void 0,
|
|
488
|
-
"aria-labelledby": descriptionId && node.textValue ? `${$ce9b18daab526bbd$export$f45c25170b9a99c2(state, node.key)} ${descriptionId}` : void 0,
|
|
489
|
-
id: $ce9b18daab526bbd$export$f45c25170b9a99c2(state, node.key)
|
|
490
|
-
});
|
|
491
|
-
if (isVirtualized) rowProps["aria-rowindex"] = node.index + 1;
|
|
492
|
-
let gridCellProps = {
|
|
493
|
-
role: "gridcell",
|
|
494
|
-
"aria-colindex": 1
|
|
495
|
-
};
|
|
496
|
-
return __spreadValues({
|
|
497
|
-
rowProps: __spreadValues({}, $3ef42575df84b30b$export$9d1611c77c2fe928(rowProps, treeGridRowProps)),
|
|
498
|
-
gridCellProps,
|
|
499
|
-
descriptionProps: {
|
|
500
|
-
id: descriptionId
|
|
501
|
-
}
|
|
502
|
-
}, itemStates);
|
|
503
|
-
}
|
|
504
|
-
function $4e8b0456ef72939f$var$last(walker) {
|
|
505
|
-
let next = null;
|
|
506
|
-
let last = null;
|
|
507
|
-
do {
|
|
508
|
-
last = walker.lastChild();
|
|
509
|
-
if (last) next = last;
|
|
510
|
-
} while (last);
|
|
511
|
-
return next;
|
|
512
|
-
}
|
|
513
|
-
const $d7323bca8d074eeb$export$653eddfc964b0f8a = /* @__PURE__ */ new WeakMap();
|
|
514
|
-
function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
|
|
515
|
-
let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
516
|
-
let keyboardDelegate = props.keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
|
|
517
|
-
collection: state.collection,
|
|
518
|
-
ref,
|
|
519
|
-
orientation: "horizontal",
|
|
520
|
-
direction,
|
|
521
|
-
disabledKeys: state.disabledKeys,
|
|
522
|
-
disabledBehavior: state.selectionManager.disabledBehavior
|
|
523
|
-
});
|
|
524
|
-
let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $2baaea4c71418dea$export$294aa081a6c6f55d(__spreadProps(__spreadValues({}, props), {
|
|
525
|
-
labelElementType: "span"
|
|
526
|
-
}));
|
|
527
|
-
let { gridProps } = $f47efb0c3a859cf2$export$664f9155035607eb(__spreadProps(__spreadValues(__spreadValues({}, props), fieldProps), {
|
|
528
|
-
keyboardDelegate,
|
|
529
|
-
shouldFocusWrap: true,
|
|
530
|
-
linkBehavior: "override"
|
|
531
|
-
}), state, ref);
|
|
532
|
-
let [isFocusWithin, setFocusWithin] = useState(false);
|
|
533
|
-
let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
|
|
534
|
-
onFocusWithinChange: setFocusWithin
|
|
535
|
-
});
|
|
536
|
-
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
|
|
537
|
-
let prevCount = useRef(state.collection.size);
|
|
538
|
-
useEffect(() => {
|
|
539
|
-
if (ref.current && prevCount.current > 0 && state.collection.size === 0 && isFocusWithin) ref.current.focus();
|
|
540
|
-
prevCount.current = state.collection.size;
|
|
541
|
-
}, [
|
|
542
|
-
state.collection.size,
|
|
543
|
-
isFocusWithin,
|
|
544
|
-
ref
|
|
545
|
-
]);
|
|
546
|
-
$d7323bca8d074eeb$export$653eddfc964b0f8a.set(state, {
|
|
547
|
-
onRemove: props.onRemove
|
|
548
|
-
});
|
|
549
|
-
return {
|
|
550
|
-
gridProps: $3ef42575df84b30b$export$9d1611c77c2fe928(gridProps, domProps, __spreadValues(__spreadValues({
|
|
551
|
-
role: state.collection.size ? "grid" : null,
|
|
552
|
-
"aria-atomic": false,
|
|
553
|
-
"aria-relevant": "additions",
|
|
554
|
-
"aria-live": isFocusWithin ? "polite" : "off"
|
|
555
|
-
}, focusWithinProps), fieldProps)),
|
|
556
|
-
labelProps,
|
|
557
|
-
descriptionProps,
|
|
558
|
-
errorMessageProps
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
var $84925f526f90eebd$exports = {};
|
|
562
|
-
$84925f526f90eebd$exports = {
|
|
563
|
-
"removeButtonLabel": `إزالة`,
|
|
564
|
-
"removeDescription": `اضغط على مفتاح DELETE لإزالة علامة.`
|
|
565
|
-
};
|
|
566
|
-
var $c0650163dc1b6f9d$exports = {};
|
|
567
|
-
$c0650163dc1b6f9d$exports = {
|
|
568
|
-
"removeButtonLabel": `Премахване`,
|
|
569
|
-
"removeDescription": `Натиснете Delete, за да премахнете маркера.`
|
|
570
|
-
};
|
|
571
|
-
var $b2b55661291de587$exports = {};
|
|
572
|
-
$b2b55661291de587$exports = {
|
|
573
|
-
"removeButtonLabel": `Odebrat`,
|
|
574
|
-
"removeDescription": `Stisknutím klávesy Delete odeberete značku.`
|
|
575
|
-
};
|
|
576
|
-
var $deb83970956f6d5b$exports = {};
|
|
577
|
-
$deb83970956f6d5b$exports = {
|
|
578
|
-
"removeButtonLabel": `Fjern`,
|
|
579
|
-
"removeDescription": `Tryk på Slet for at fjerne tag.`
|
|
580
|
-
};
|
|
581
|
-
var $aea1cb4c7ec97e1c$exports = {};
|
|
582
|
-
$aea1cb4c7ec97e1c$exports = {
|
|
583
|
-
"removeButtonLabel": `Entfernen`,
|
|
584
|
-
"removeDescription": `Auf „Löschen“ drücken, um das Tag zu entfernen.`
|
|
585
|
-
};
|
|
586
|
-
var $3618d917e503a8d3$exports = {};
|
|
587
|
-
$3618d917e503a8d3$exports = {
|
|
588
|
-
"removeButtonLabel": `Κατάργηση`,
|
|
589
|
-
"removeDescription": `Πατήστε Διαγραφή για να καταργήσετε την ετικέτα.`
|
|
590
|
-
};
|
|
591
|
-
var $9eb56bbbe8e31294$exports = {};
|
|
592
|
-
$9eb56bbbe8e31294$exports = {
|
|
593
|
-
"removeDescription": `Press Delete to remove tag.`,
|
|
594
|
-
"removeButtonLabel": `Remove`
|
|
595
|
-
};
|
|
596
|
-
var $361c604b0fc269a3$exports = {};
|
|
597
|
-
$361c604b0fc269a3$exports = {
|
|
598
|
-
"removeButtonLabel": `Quitar`,
|
|
599
|
-
"removeDescription": `Pulse Eliminar para quitar la etiqueta.`
|
|
600
|
-
};
|
|
601
|
-
var $2f00170f4ee3ca01$exports = {};
|
|
602
|
-
$2f00170f4ee3ca01$exports = {
|
|
603
|
-
"removeButtonLabel": `Eemalda`,
|
|
604
|
-
"removeDescription": `Sildi eemaldamiseks vajutage kustutusklahvi Delete.`
|
|
605
|
-
};
|
|
606
|
-
var $80ee16b64fab9fb5$exports = {};
|
|
607
|
-
$80ee16b64fab9fb5$exports = {
|
|
608
|
-
"removeButtonLabel": `Poista`,
|
|
609
|
-
"removeDescription": `Poista tunniste painamalla Poista-painiketta.`
|
|
610
|
-
};
|
|
611
|
-
var $be9d354476c08087$exports = {};
|
|
612
|
-
$be9d354476c08087$exports = {
|
|
613
|
-
"removeButtonLabel": `Supprimer`,
|
|
614
|
-
"removeDescription": `Appuyez sur Supprimer pour supprimer l’étiquette.`
|
|
615
|
-
};
|
|
616
|
-
var $ffeb903ba092eb35$exports = {};
|
|
617
|
-
$ffeb903ba092eb35$exports = {
|
|
618
|
-
"removeButtonLabel": `הסר`,
|
|
619
|
-
"removeDescription": `לחץ על מחק כדי להסיר תג.`
|
|
620
|
-
};
|
|
621
|
-
var $1df6722c6f19728b$exports = {};
|
|
622
|
-
$1df6722c6f19728b$exports = {
|
|
623
|
-
"removeButtonLabel": `Ukloni`,
|
|
624
|
-
"removeDescription": `Pritisnite Delete za uklanjanje oznake.`
|
|
625
|
-
};
|
|
626
|
-
var $093d57e325bc9071$exports = {};
|
|
627
|
-
$093d57e325bc9071$exports = {
|
|
628
|
-
"removeButtonLabel": `Eltávolítás`,
|
|
629
|
-
"removeDescription": `Nyomja meg a Delete billentyűt a címke eltávolításához.`
|
|
630
|
-
};
|
|
631
|
-
var $609dbdfbcad85bdb$exports = {};
|
|
632
|
-
$609dbdfbcad85bdb$exports = {
|
|
633
|
-
"removeButtonLabel": `Rimuovi`,
|
|
634
|
-
"removeDescription": `Premi Elimina per rimuovere il tag.`
|
|
635
|
-
};
|
|
636
|
-
var $c08e84f882644048$exports = {};
|
|
637
|
-
$c08e84f882644048$exports = {
|
|
638
|
-
"removeButtonLabel": `削除`,
|
|
639
|
-
"removeDescription": `タグを削除するには、Delete キーを押します。`
|
|
640
|
-
};
|
|
641
|
-
var $5cd130489822fa21$exports = {};
|
|
642
|
-
$5cd130489822fa21$exports = {
|
|
643
|
-
"removeButtonLabel": `제거`,
|
|
644
|
-
"removeDescription": `태그를 제거하려면 Delete 키를 누르십시오.`
|
|
645
|
-
};
|
|
646
|
-
var $ab5183739b6c5e7e$exports = {};
|
|
647
|
-
$ab5183739b6c5e7e$exports = {
|
|
648
|
-
"removeButtonLabel": `Pašalinti`,
|
|
649
|
-
"removeDescription": `Norėdami pašalinti žymą, paspauskite „Delete“ klavišą.`
|
|
650
|
-
};
|
|
651
|
-
var $dd84a0b574be3f23$exports = {};
|
|
652
|
-
$dd84a0b574be3f23$exports = {
|
|
653
|
-
"removeButtonLabel": `Noņemt`,
|
|
654
|
-
"removeDescription": `Nospiediet Delete [Dzēst], lai noņemtu tagu.`
|
|
655
|
-
};
|
|
656
|
-
var $85eee97d14eef7b5$exports = {};
|
|
657
|
-
$85eee97d14eef7b5$exports = {
|
|
658
|
-
"removeButtonLabel": `Fjern`,
|
|
659
|
-
"removeDescription": `Trykk på Slett for å fjerne taggen.`
|
|
660
|
-
};
|
|
661
|
-
var $18781839f93b0314$exports = {};
|
|
662
|
-
$18781839f93b0314$exports = {
|
|
663
|
-
"removeButtonLabel": `Verwijderen`,
|
|
664
|
-
"removeDescription": `Druk op Verwijderen om de tag te verwijderen.`
|
|
665
|
-
};
|
|
666
|
-
var $1c40ffbbfe9f3bda$exports = {};
|
|
667
|
-
$1c40ffbbfe9f3bda$exports = {
|
|
668
|
-
"removeButtonLabel": `Usuń`,
|
|
669
|
-
"removeDescription": `Naciśnij Usuń, aby usunąć znacznik.`
|
|
670
|
-
};
|
|
671
|
-
var $156880e329b1c717$exports = {};
|
|
672
|
-
$156880e329b1c717$exports = {
|
|
673
|
-
"removeButtonLabel": `Remover`,
|
|
674
|
-
"removeDescription": `Pressione Delete para remover a tag.`
|
|
675
|
-
};
|
|
676
|
-
var $b6d50b1d20768ce4$exports = {};
|
|
677
|
-
$b6d50b1d20768ce4$exports = {
|
|
678
|
-
"removeButtonLabel": `Eliminar`,
|
|
679
|
-
"removeDescription": `Prima Delete para eliminar a tag.`
|
|
680
|
-
};
|
|
681
|
-
var $d8c38c691b006187$exports = {};
|
|
682
|
-
$d8c38c691b006187$exports = {
|
|
683
|
-
"removeButtonLabel": `Îndepărtaţi`,
|
|
684
|
-
"removeDescription": `Apăsați pe Delete (Ștergere) pentru a elimina eticheta.`
|
|
685
|
-
};
|
|
686
|
-
var $ed9b4bf7ce1fb1d7$exports = {};
|
|
687
|
-
$ed9b4bf7ce1fb1d7$exports = {
|
|
688
|
-
"removeButtonLabel": `Удалить`,
|
|
689
|
-
"removeDescription": `Нажмите DELETE, чтобы удалить тег.`
|
|
690
|
-
};
|
|
691
|
-
var $51d8721afda4d678$exports = {};
|
|
692
|
-
$51d8721afda4d678$exports = {
|
|
693
|
-
"removeButtonLabel": `Odstrániť`,
|
|
694
|
-
"removeDescription": `Ak chcete odstrániť značku, stlačte kláves Delete.`
|
|
695
|
-
};
|
|
696
|
-
var $fd37a27baae493e8$exports = {};
|
|
697
|
-
$fd37a27baae493e8$exports = {
|
|
698
|
-
"removeButtonLabel": `Odstrani`,
|
|
699
|
-
"removeDescription": `Pritisnite Delete, da odstranite oznako.`
|
|
700
|
-
};
|
|
701
|
-
var $5505a1ca71ffd6f4$exports = {};
|
|
702
|
-
$5505a1ca71ffd6f4$exports = {
|
|
703
|
-
"removeButtonLabel": `Ukloni`,
|
|
704
|
-
"removeDescription": `Pritisnite Obriši da biste uklonili oznaku.`
|
|
705
|
-
};
|
|
706
|
-
var $33670e148c84ad02$exports = {};
|
|
707
|
-
$33670e148c84ad02$exports = {
|
|
708
|
-
"removeButtonLabel": `Ta bort`,
|
|
709
|
-
"removeDescription": `Tryck på Radera för att ta bort taggen.`
|
|
710
|
-
};
|
|
711
|
-
var $0bf46fdcdd7cb5f6$exports = {};
|
|
712
|
-
$0bf46fdcdd7cb5f6$exports = {
|
|
713
|
-
"removeButtonLabel": `Kaldır`,
|
|
714
|
-
"removeDescription": `Etiketi kaldırmak için Sil tuşuna basın.`
|
|
715
|
-
};
|
|
716
|
-
var $9d9765222bc08ca2$exports = {};
|
|
717
|
-
$9d9765222bc08ca2$exports = {
|
|
718
|
-
"removeButtonLabel": `Вилучити`,
|
|
719
|
-
"removeDescription": `Натисніть Delete, щоб вилучити тег.`
|
|
720
|
-
};
|
|
721
|
-
var $d737296cedcdee9f$exports = {};
|
|
722
|
-
$d737296cedcdee9f$exports = {
|
|
723
|
-
"removeButtonLabel": `删除`,
|
|
724
|
-
"removeDescription": `按下“删除”以删除标记。`
|
|
725
|
-
};
|
|
726
|
-
var $09cd168ab18773f4$exports = {};
|
|
727
|
-
$09cd168ab18773f4$exports = {
|
|
728
|
-
"removeButtonLabel": `移除`,
|
|
729
|
-
"removeDescription": `按 Delete 鍵以移除標記。`
|
|
730
|
-
};
|
|
731
|
-
var $3bb15cc24d006ec5$exports = {};
|
|
732
|
-
$3bb15cc24d006ec5$exports = {
|
|
733
|
-
"ar-AE": $84925f526f90eebd$exports,
|
|
734
|
-
"bg-BG": $c0650163dc1b6f9d$exports,
|
|
735
|
-
"cs-CZ": $b2b55661291de587$exports,
|
|
736
|
-
"da-DK": $deb83970956f6d5b$exports,
|
|
737
|
-
"de-DE": $aea1cb4c7ec97e1c$exports,
|
|
738
|
-
"el-GR": $3618d917e503a8d3$exports,
|
|
739
|
-
"en-US": $9eb56bbbe8e31294$exports,
|
|
740
|
-
"es-ES": $361c604b0fc269a3$exports,
|
|
741
|
-
"et-EE": $2f00170f4ee3ca01$exports,
|
|
742
|
-
"fi-FI": $80ee16b64fab9fb5$exports,
|
|
743
|
-
"fr-FR": $be9d354476c08087$exports,
|
|
744
|
-
"he-IL": $ffeb903ba092eb35$exports,
|
|
745
|
-
"hr-HR": $1df6722c6f19728b$exports,
|
|
746
|
-
"hu-HU": $093d57e325bc9071$exports,
|
|
747
|
-
"it-IT": $609dbdfbcad85bdb$exports,
|
|
748
|
-
"ja-JP": $c08e84f882644048$exports,
|
|
749
|
-
"ko-KR": $5cd130489822fa21$exports,
|
|
750
|
-
"lt-LT": $ab5183739b6c5e7e$exports,
|
|
751
|
-
"lv-LV": $dd84a0b574be3f23$exports,
|
|
752
|
-
"nb-NO": $85eee97d14eef7b5$exports,
|
|
753
|
-
"nl-NL": $18781839f93b0314$exports,
|
|
754
|
-
"pl-PL": $1c40ffbbfe9f3bda$exports,
|
|
755
|
-
"pt-BR": $156880e329b1c717$exports,
|
|
756
|
-
"pt-PT": $b6d50b1d20768ce4$exports,
|
|
757
|
-
"ro-RO": $d8c38c691b006187$exports,
|
|
758
|
-
"ru-RU": $ed9b4bf7ce1fb1d7$exports,
|
|
759
|
-
"sk-SK": $51d8721afda4d678$exports,
|
|
760
|
-
"sl-SI": $fd37a27baae493e8$exports,
|
|
761
|
-
"sr-SP": $5505a1ca71ffd6f4$exports,
|
|
762
|
-
"sv-SE": $33670e148c84ad02$exports,
|
|
763
|
-
"tr-TR": $0bf46fdcdd7cb5f6$exports,
|
|
764
|
-
"uk-UA": $9d9765222bc08ca2$exports,
|
|
765
|
-
"zh-CN": $d737296cedcdee9f$exports,
|
|
766
|
-
"zh-TW": $09cd168ab18773f4$exports
|
|
767
|
-
};
|
|
768
|
-
function $parcel$interopDefault(a) {
|
|
769
|
-
return a && a.__esModule ? a.default : a;
|
|
770
|
-
}
|
|
771
|
-
function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
772
|
-
let { item } = props;
|
|
773
|
-
let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($3bb15cc24d006ec5$exports), "@react-aria/tag");
|
|
774
|
-
let buttonId = $bdb11010cef70236$export$f680877a34711e37();
|
|
775
|
-
let { onRemove } = $d7323bca8d074eeb$export$653eddfc964b0f8a.get(state) || {};
|
|
776
|
-
let _a = $4e8b0456ef72939f$export$9610e69494fadfd2({
|
|
777
|
-
node: item
|
|
778
|
-
}, state, ref), { rowProps, gridCellProps } = _a, states = __objRest(_a, ["rowProps", "gridCellProps"]);
|
|
779
|
-
delete rowProps.onKeyDownCapture;
|
|
780
|
-
let _b = states, { descriptionProps: _ } = _b, stateWithoutDescription = __objRest(_b, ["descriptionProps"]);
|
|
781
|
-
let onKeyDown = (e) => {
|
|
782
|
-
if (e.key === "Delete" || e.key === "Backspace") {
|
|
783
|
-
e.preventDefault();
|
|
784
|
-
if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
|
|
785
|
-
else onRemove === null || onRemove === void 0 ? void 0 : onRemove(/* @__PURE__ */ new Set([
|
|
786
|
-
item.key
|
|
787
|
-
]));
|
|
788
|
-
}
|
|
789
|
-
};
|
|
790
|
-
let modality = $507fabe10e71c6fb$export$98e20ec92f614cfe();
|
|
791
|
-
if (modality === "virtual" && typeof window !== "undefined" && "ontouchstart" in window) modality = "pointer";
|
|
792
|
-
let description = onRemove && (modality === "keyboard" || modality === "virtual") ? stringFormatter.format("removeDescription") : "";
|
|
793
|
-
let descProps = $ef06256079686ba0$export$f8aeda7b10753fa1(description);
|
|
794
|
-
let isFocused = item.key === state.selectionManager.focusedKey;
|
|
795
|
-
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(item.props);
|
|
796
|
-
let linkProps = $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(item.props);
|
|
797
|
-
return __spreadProps(__spreadValues({
|
|
798
|
-
removeButtonProps: {
|
|
799
|
-
"aria-label": stringFormatter.format("removeButtonLabel"),
|
|
800
|
-
"aria-labelledby": `${buttonId} ${rowProps.id}`,
|
|
801
|
-
isDisabled: state.disabledKeys.has(item.key) || item.props.isDisabled,
|
|
802
|
-
id: buttonId,
|
|
803
|
-
onPress: () => onRemove ? onRemove(/* @__PURE__ */ new Set([
|
|
804
|
-
item.key
|
|
805
|
-
])) : null,
|
|
806
|
-
excludeFromTabOrder: true
|
|
807
|
-
},
|
|
808
|
-
rowProps: $3ef42575df84b30b$export$9d1611c77c2fe928(rowProps, domProps, linkProps, {
|
|
809
|
-
tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
|
|
810
|
-
onKeyDown: onRemove ? onKeyDown : void 0,
|
|
811
|
-
"aria-describedby": descProps["aria-describedby"]
|
|
812
|
-
}),
|
|
813
|
-
gridCellProps: $3ef42575df84b30b$export$9d1611c77c2fe928(gridCellProps, {
|
|
814
|
-
"aria-errormessage": props["aria-errormessage"],
|
|
815
|
-
"aria-label": props["aria-label"]
|
|
816
|
-
})
|
|
817
|
-
}, stateWithoutDescription), {
|
|
818
|
-
allowsRemoving: !!onRemove
|
|
819
|
-
});
|
|
820
|
-
}
|
|
821
|
-
class $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
|
|
822
|
-
get childNodes() {
|
|
823
|
-
throw new Error("childNodes is not supported");
|
|
824
|
-
}
|
|
825
|
-
clone() {
|
|
826
|
-
let node = new $23b9f4fcf0fe224b$export$d68d59712b04d9d1(this.type, this.key);
|
|
827
|
-
node.value = this.value;
|
|
828
|
-
node.level = this.level;
|
|
829
|
-
node.hasChildNodes = this.hasChildNodes;
|
|
830
|
-
node.rendered = this.rendered;
|
|
831
|
-
node.textValue = this.textValue;
|
|
832
|
-
node["aria-label"] = this["aria-label"];
|
|
833
|
-
node.index = this.index;
|
|
834
|
-
node.parentKey = this.parentKey;
|
|
835
|
-
node.prevKey = this.prevKey;
|
|
836
|
-
node.nextKey = this.nextKey;
|
|
837
|
-
node.firstChildKey = this.firstChildKey;
|
|
838
|
-
node.lastChildKey = this.lastChildKey;
|
|
839
|
-
node.props = this.props;
|
|
840
|
-
node.render = this.render;
|
|
841
|
-
return node;
|
|
842
|
-
}
|
|
843
|
-
constructor(type, key) {
|
|
844
|
-
this.value = null;
|
|
845
|
-
this.level = 0;
|
|
846
|
-
this.hasChildNodes = false;
|
|
847
|
-
this.rendered = null;
|
|
848
|
-
this.textValue = "";
|
|
849
|
-
this["aria-label"] = void 0;
|
|
850
|
-
this.index = 0;
|
|
851
|
-
this.parentKey = null;
|
|
852
|
-
this.prevKey = null;
|
|
853
|
-
this.nextKey = null;
|
|
854
|
-
this.firstChildKey = null;
|
|
855
|
-
this.lastChildKey = null;
|
|
856
|
-
this.props = {};
|
|
857
|
-
this.type = type;
|
|
858
|
-
this.key = key;
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
class $23b9f4fcf0fe224b$export$408d25a4e12db025 {
|
|
862
|
-
get size() {
|
|
863
|
-
return this.keyMap.size;
|
|
864
|
-
}
|
|
865
|
-
getKeys() {
|
|
866
|
-
return this.keyMap.keys();
|
|
867
|
-
}
|
|
868
|
-
*[Symbol.iterator]() {
|
|
869
|
-
let node = this.firstKey != null ? this.keyMap.get(this.firstKey) : void 0;
|
|
870
|
-
while (node) {
|
|
871
|
-
yield node;
|
|
872
|
-
node = node.nextKey != null ? this.keyMap.get(node.nextKey) : void 0;
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
getChildren(key) {
|
|
876
|
-
let keyMap = this.keyMap;
|
|
877
|
-
return {
|
|
878
|
-
*[Symbol.iterator]() {
|
|
879
|
-
let parent = keyMap.get(key);
|
|
880
|
-
let node = (parent === null || parent === void 0 ? void 0 : parent.firstChildKey) != null ? keyMap.get(parent.firstChildKey) : null;
|
|
881
|
-
while (node) {
|
|
882
|
-
yield node;
|
|
883
|
-
node = node.nextKey != null ? keyMap.get(node.nextKey) : void 0;
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
};
|
|
887
|
-
}
|
|
888
|
-
getKeyBefore(key) {
|
|
889
|
-
let node = this.keyMap.get(key);
|
|
890
|
-
if (!node) return null;
|
|
891
|
-
if (node.prevKey != null) {
|
|
892
|
-
node = this.keyMap.get(node.prevKey);
|
|
893
|
-
while (node && node.type !== "item" && node.lastChildKey != null) node = this.keyMap.get(node.lastChildKey);
|
|
894
|
-
var _node_key;
|
|
895
|
-
return (_node_key = node === null || node === void 0 ? void 0 : node.key) !== null && _node_key !== void 0 ? _node_key : null;
|
|
896
|
-
}
|
|
897
|
-
return node.parentKey;
|
|
898
|
-
}
|
|
899
|
-
getKeyAfter(key) {
|
|
900
|
-
let node = this.keyMap.get(key);
|
|
901
|
-
if (!node) return null;
|
|
902
|
-
if (node.type !== "item" && node.firstChildKey != null) return node.firstChildKey;
|
|
903
|
-
while (node) {
|
|
904
|
-
if (node.nextKey != null) return node.nextKey;
|
|
905
|
-
if (node.parentKey != null) node = this.keyMap.get(node.parentKey);
|
|
906
|
-
else return null;
|
|
907
|
-
}
|
|
908
|
-
return null;
|
|
909
|
-
}
|
|
910
|
-
getFirstKey() {
|
|
911
|
-
return this.firstKey;
|
|
912
|
-
}
|
|
913
|
-
getLastKey() {
|
|
914
|
-
let node = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;
|
|
915
|
-
while ((node === null || node === void 0 ? void 0 : node.lastChildKey) != null) node = this.keyMap.get(node.lastChildKey);
|
|
916
|
-
var _node_key;
|
|
917
|
-
return (_node_key = node === null || node === void 0 ? void 0 : node.key) !== null && _node_key !== void 0 ? _node_key : null;
|
|
918
|
-
}
|
|
919
|
-
getItem(key) {
|
|
920
|
-
var _this_keyMap_get;
|
|
921
|
-
return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
|
|
922
|
-
}
|
|
923
|
-
at() {
|
|
924
|
-
throw new Error("Not implemented");
|
|
925
|
-
}
|
|
926
|
-
clone() {
|
|
927
|
-
let Constructor = this.constructor;
|
|
928
|
-
let collection = new Constructor();
|
|
929
|
-
collection.keyMap = new Map(this.keyMap);
|
|
930
|
-
collection.firstKey = this.firstKey;
|
|
931
|
-
collection.lastKey = this.lastKey;
|
|
932
|
-
return collection;
|
|
933
|
-
}
|
|
934
|
-
addNode(node) {
|
|
935
|
-
if (this.frozen) throw new Error("Cannot add a node to a frozen collection");
|
|
936
|
-
this.keyMap.set(node.key, node);
|
|
937
|
-
}
|
|
938
|
-
removeNode(key) {
|
|
939
|
-
if (this.frozen) throw new Error("Cannot remove a node to a frozen collection");
|
|
940
|
-
this.keyMap.delete(key);
|
|
941
|
-
}
|
|
942
|
-
commit(firstKey, lastKey, isSSR = false) {
|
|
943
|
-
if (this.frozen) throw new Error("Cannot commit a frozen collection");
|
|
944
|
-
this.firstKey = firstKey;
|
|
945
|
-
this.lastKey = lastKey;
|
|
946
|
-
this.frozen = !isSSR;
|
|
947
|
-
}
|
|
948
|
-
constructor() {
|
|
949
|
-
this.keyMap = /* @__PURE__ */ new Map();
|
|
950
|
-
this.firstKey = null;
|
|
951
|
-
this.lastKey = null;
|
|
952
|
-
this.frozen = false;
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
class $681cc3c98f569e39$export$410b0c854570d131 {
|
|
956
|
-
*[Symbol.iterator]() {
|
|
957
|
-
let node = this.firstChild;
|
|
958
|
-
while (node) {
|
|
959
|
-
yield node;
|
|
960
|
-
node = node.nextSibling;
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
get firstChild() {
|
|
964
|
-
return this._firstChild;
|
|
965
|
-
}
|
|
966
|
-
set firstChild(firstChild) {
|
|
967
|
-
this._firstChild = firstChild;
|
|
968
|
-
this.ownerDocument.markDirty(this);
|
|
969
|
-
}
|
|
970
|
-
get lastChild() {
|
|
971
|
-
return this._lastChild;
|
|
972
|
-
}
|
|
973
|
-
set lastChild(lastChild) {
|
|
974
|
-
this._lastChild = lastChild;
|
|
975
|
-
this.ownerDocument.markDirty(this);
|
|
976
|
-
}
|
|
977
|
-
get previousSibling() {
|
|
978
|
-
return this._previousSibling;
|
|
979
|
-
}
|
|
980
|
-
set previousSibling(previousSibling) {
|
|
981
|
-
this._previousSibling = previousSibling;
|
|
982
|
-
this.ownerDocument.markDirty(this);
|
|
983
|
-
}
|
|
984
|
-
get nextSibling() {
|
|
985
|
-
return this._nextSibling;
|
|
986
|
-
}
|
|
987
|
-
set nextSibling(nextSibling) {
|
|
988
|
-
this._nextSibling = nextSibling;
|
|
989
|
-
this.ownerDocument.markDirty(this);
|
|
990
|
-
}
|
|
991
|
-
get parentNode() {
|
|
992
|
-
return this._parentNode;
|
|
993
|
-
}
|
|
994
|
-
set parentNode(parentNode) {
|
|
995
|
-
this._parentNode = parentNode;
|
|
996
|
-
this.ownerDocument.markDirty(this);
|
|
997
|
-
}
|
|
998
|
-
get isConnected() {
|
|
999
|
-
var _this_parentNode;
|
|
1000
|
-
return ((_this_parentNode = this.parentNode) === null || _this_parentNode === void 0 ? void 0 : _this_parentNode.isConnected) || false;
|
|
1001
|
-
}
|
|
1002
|
-
appendChild(child) {
|
|
1003
|
-
this.ownerDocument.startTransaction();
|
|
1004
|
-
if (child.parentNode) child.parentNode.removeChild(child);
|
|
1005
|
-
if (this.firstChild == null) this.firstChild = child;
|
|
1006
|
-
if (this.lastChild) {
|
|
1007
|
-
this.lastChild.nextSibling = child;
|
|
1008
|
-
child.index = this.lastChild.index + 1;
|
|
1009
|
-
child.previousSibling = this.lastChild;
|
|
1010
|
-
} else {
|
|
1011
|
-
child.previousSibling = null;
|
|
1012
|
-
child.index = 0;
|
|
1013
|
-
}
|
|
1014
|
-
child.parentNode = this;
|
|
1015
|
-
child.nextSibling = null;
|
|
1016
|
-
this.lastChild = child;
|
|
1017
|
-
this.ownerDocument.markDirty(this);
|
|
1018
|
-
if (child.hasSetProps)
|
|
1019
|
-
this.ownerDocument.addNode(child);
|
|
1020
|
-
this.ownerDocument.endTransaction();
|
|
1021
|
-
this.ownerDocument.queueUpdate();
|
|
1022
|
-
}
|
|
1023
|
-
insertBefore(newNode, referenceNode) {
|
|
1024
|
-
if (referenceNode == null) return this.appendChild(newNode);
|
|
1025
|
-
this.ownerDocument.startTransaction();
|
|
1026
|
-
if (newNode.parentNode) newNode.parentNode.removeChild(newNode);
|
|
1027
|
-
newNode.nextSibling = referenceNode;
|
|
1028
|
-
newNode.previousSibling = referenceNode.previousSibling;
|
|
1029
|
-
newNode.index = referenceNode.index;
|
|
1030
|
-
if (this.firstChild === referenceNode) this.firstChild = newNode;
|
|
1031
|
-
else if (referenceNode.previousSibling) referenceNode.previousSibling.nextSibling = newNode;
|
|
1032
|
-
referenceNode.previousSibling = newNode;
|
|
1033
|
-
newNode.parentNode = referenceNode.parentNode;
|
|
1034
|
-
let node = referenceNode;
|
|
1035
|
-
while (node) {
|
|
1036
|
-
node.index++;
|
|
1037
|
-
node = node.nextSibling;
|
|
1038
|
-
}
|
|
1039
|
-
if (newNode.hasSetProps) this.ownerDocument.addNode(newNode);
|
|
1040
|
-
this.ownerDocument.endTransaction();
|
|
1041
|
-
this.ownerDocument.queueUpdate();
|
|
1042
|
-
}
|
|
1043
|
-
removeChild(child) {
|
|
1044
|
-
if (child.parentNode !== this || !this.ownerDocument.isMounted) return;
|
|
1045
|
-
this.ownerDocument.startTransaction();
|
|
1046
|
-
let node = child.nextSibling;
|
|
1047
|
-
while (node) {
|
|
1048
|
-
node.index--;
|
|
1049
|
-
node = node.nextSibling;
|
|
1050
|
-
}
|
|
1051
|
-
if (child.nextSibling) child.nextSibling.previousSibling = child.previousSibling;
|
|
1052
|
-
if (child.previousSibling) child.previousSibling.nextSibling = child.nextSibling;
|
|
1053
|
-
if (this.firstChild === child) this.firstChild = child.nextSibling;
|
|
1054
|
-
if (this.lastChild === child) this.lastChild = child.previousSibling;
|
|
1055
|
-
child.parentNode = null;
|
|
1056
|
-
child.nextSibling = null;
|
|
1057
|
-
child.previousSibling = null;
|
|
1058
|
-
child.index = 0;
|
|
1059
|
-
this.ownerDocument.removeNode(child);
|
|
1060
|
-
this.ownerDocument.endTransaction();
|
|
1061
|
-
this.ownerDocument.queueUpdate();
|
|
1062
|
-
}
|
|
1063
|
-
addEventListener() {
|
|
1064
|
-
}
|
|
1065
|
-
removeEventListener() {
|
|
1066
|
-
}
|
|
1067
|
-
constructor(ownerDocument) {
|
|
1068
|
-
this._firstChild = null;
|
|
1069
|
-
this._lastChild = null;
|
|
1070
|
-
this._previousSibling = null;
|
|
1071
|
-
this._nextSibling = null;
|
|
1072
|
-
this._parentNode = null;
|
|
1073
|
-
this.ownerDocument = ownerDocument;
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export$410b0c854570d131 {
|
|
1077
|
-
get index() {
|
|
1078
|
-
return this._index;
|
|
1079
|
-
}
|
|
1080
|
-
set index(index) {
|
|
1081
|
-
this._index = index;
|
|
1082
|
-
this.ownerDocument.markDirty(this);
|
|
1083
|
-
}
|
|
1084
|
-
get level() {
|
|
1085
|
-
if (this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd) return this.parentNode.level + (this.node.type === "item" ? 1 : 0);
|
|
1086
|
-
return 0;
|
|
1087
|
-
}
|
|
1088
|
-
updateNode() {
|
|
1089
|
-
var _this_previousSibling, _this_nextSibling, _this_firstChild, _this_lastChild;
|
|
1090
|
-
let node = this.ownerDocument.getMutableNode(this);
|
|
1091
|
-
node.index = this.index;
|
|
1092
|
-
node.level = this.level;
|
|
1093
|
-
node.parentKey = this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd ? this.parentNode.node.key : null;
|
|
1094
|
-
var _this_previousSibling_node_key;
|
|
1095
|
-
node.prevKey = (_this_previousSibling_node_key = (_this_previousSibling = this.previousSibling) === null || _this_previousSibling === void 0 ? void 0 : _this_previousSibling.node.key) !== null && _this_previousSibling_node_key !== void 0 ? _this_previousSibling_node_key : null;
|
|
1096
|
-
var _this_nextSibling_node_key;
|
|
1097
|
-
node.nextKey = (_this_nextSibling_node_key = (_this_nextSibling = this.nextSibling) === null || _this_nextSibling === void 0 ? void 0 : _this_nextSibling.node.key) !== null && _this_nextSibling_node_key !== void 0 ? _this_nextSibling_node_key : null;
|
|
1098
|
-
node.hasChildNodes = !!this.firstChild;
|
|
1099
|
-
var _this_firstChild_node_key;
|
|
1100
|
-
node.firstChildKey = (_this_firstChild_node_key = (_this_firstChild = this.firstChild) === null || _this_firstChild === void 0 ? void 0 : _this_firstChild.node.key) !== null && _this_firstChild_node_key !== void 0 ? _this_firstChild_node_key : null;
|
|
1101
|
-
var _this_lastChild_node_key;
|
|
1102
|
-
node.lastChildKey = (_this_lastChild_node_key = (_this_lastChild = this.lastChild) === null || _this_lastChild === void 0 ? void 0 : _this_lastChild.node.key) !== null && _this_lastChild_node_key !== void 0 ? _this_lastChild_node_key : null;
|
|
1103
|
-
}
|
|
1104
|
-
setProps(obj, ref, rendered, render) {
|
|
1105
|
-
let node = this.ownerDocument.getMutableNode(this);
|
|
1106
|
-
let _a = obj, { value, textValue, id } = _a, props = __objRest(_a, ["value", "textValue", "id"]);
|
|
1107
|
-
props.ref = ref;
|
|
1108
|
-
node.props = props;
|
|
1109
|
-
node.rendered = rendered;
|
|
1110
|
-
node.render = render;
|
|
1111
|
-
node.value = value;
|
|
1112
|
-
node.textValue = textValue || (typeof props.children === "string" ? props.children : "") || obj["aria-label"] || "";
|
|
1113
|
-
if (id != null && id !== node.key) {
|
|
1114
|
-
if (this.hasSetProps) throw new Error("Cannot change the id of an item");
|
|
1115
|
-
node.key = id;
|
|
1116
|
-
}
|
|
1117
|
-
if (!this.hasSetProps) {
|
|
1118
|
-
this.ownerDocument.addNode(this);
|
|
1119
|
-
this.ownerDocument.endTransaction();
|
|
1120
|
-
this.hasSetProps = true;
|
|
1121
|
-
}
|
|
1122
|
-
this.ownerDocument.queueUpdate();
|
|
1123
|
-
}
|
|
1124
|
-
get style() {
|
|
1125
|
-
return {};
|
|
1126
|
-
}
|
|
1127
|
-
hasAttribute() {
|
|
1128
|
-
}
|
|
1129
|
-
setAttribute() {
|
|
1130
|
-
}
|
|
1131
|
-
setAttributeNS() {
|
|
1132
|
-
}
|
|
1133
|
-
removeAttribute() {
|
|
1134
|
-
}
|
|
1135
|
-
constructor(type, ownerDocument) {
|
|
1136
|
-
super(ownerDocument), this.nodeType = 8, this._index = 0, this.hasSetProps = false;
|
|
1137
|
-
this.node = new $23b9f4fcf0fe224b$export$d68d59712b04d9d1(type, `react-aria-${++ownerDocument.nodeId}`);
|
|
1138
|
-
this.ownerDocument.startTransaction();
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
class $681cc3c98f569e39$export$b34a105447964f9f extends $681cc3c98f569e39$export$410b0c854570d131 {
|
|
1142
|
-
get isConnected() {
|
|
1143
|
-
return this.isMounted;
|
|
1144
|
-
}
|
|
1145
|
-
createElement(type) {
|
|
1146
|
-
return new $681cc3c98f569e39$export$dc064fe9e59310fd(type, this);
|
|
1147
|
-
}
|
|
1148
|
-
/**
|
|
1149
|
-
* Lazily gets a mutable instance of a Node. If the node has already
|
|
1150
|
-
* been cloned during this update cycle, it just returns the existing one.
|
|
1151
|
-
*/
|
|
1152
|
-
getMutableNode(element) {
|
|
1153
|
-
let node = element.node;
|
|
1154
|
-
if (!this.mutatedNodes.has(element)) {
|
|
1155
|
-
node = element.node.clone();
|
|
1156
|
-
this.mutatedNodes.add(element);
|
|
1157
|
-
element.node = node;
|
|
1158
|
-
}
|
|
1159
|
-
this.markDirty(element);
|
|
1160
|
-
return node;
|
|
1161
|
-
}
|
|
1162
|
-
getMutableCollection() {
|
|
1163
|
-
if (!this.isSSR && !this.collectionMutated) {
|
|
1164
|
-
this.collection = this.collection.clone();
|
|
1165
|
-
this.collectionMutated = true;
|
|
1166
|
-
}
|
|
1167
|
-
return this.collection;
|
|
1168
|
-
}
|
|
1169
|
-
markDirty(node) {
|
|
1170
|
-
this.dirtyNodes.add(node);
|
|
1171
|
-
}
|
|
1172
|
-
startTransaction() {
|
|
1173
|
-
this.transactionCount++;
|
|
1174
|
-
}
|
|
1175
|
-
endTransaction() {
|
|
1176
|
-
this.transactionCount--;
|
|
1177
|
-
}
|
|
1178
|
-
addNode(element) {
|
|
1179
|
-
let collection = this.getMutableCollection();
|
|
1180
|
-
if (!collection.getItem(element.node.key)) {
|
|
1181
|
-
collection.addNode(element.node);
|
|
1182
|
-
for (let child of element) this.addNode(child);
|
|
1183
|
-
}
|
|
1184
|
-
this.markDirty(element);
|
|
1185
|
-
}
|
|
1186
|
-
removeNode(node) {
|
|
1187
|
-
for (let child of node) this.removeNode(child);
|
|
1188
|
-
let collection = this.getMutableCollection();
|
|
1189
|
-
collection.removeNode(node.node.key);
|
|
1190
|
-
this.markDirty(node);
|
|
1191
|
-
}
|
|
1192
|
-
/** Finalizes the collection update, updating all nodes and freezing the collection. */
|
|
1193
|
-
getCollection() {
|
|
1194
|
-
if (this.transactionCount > 0) return this.collection;
|
|
1195
|
-
this.updateCollection();
|
|
1196
|
-
return this.collection;
|
|
1197
|
-
}
|
|
1198
|
-
updateCollection() {
|
|
1199
|
-
for (let element of this.dirtyNodes) if (element instanceof $681cc3c98f569e39$export$dc064fe9e59310fd && element.isConnected) element.updateNode();
|
|
1200
|
-
this.dirtyNodes.clear();
|
|
1201
|
-
if (this.mutatedNodes.size || this.collectionMutated) {
|
|
1202
|
-
var _this_firstChild, _this_lastChild;
|
|
1203
|
-
let collection = this.getMutableCollection();
|
|
1204
|
-
for (let element of this.mutatedNodes) if (element.isConnected) collection.addNode(element.node);
|
|
1205
|
-
var _this_firstChild_node_key, _this_lastChild_node_key;
|
|
1206
|
-
collection.commit((_this_firstChild_node_key = (_this_firstChild = this.firstChild) === null || _this_firstChild === void 0 ? void 0 : _this_firstChild.node.key) !== null && _this_firstChild_node_key !== void 0 ? _this_firstChild_node_key : null, (_this_lastChild_node_key = (_this_lastChild = this.lastChild) === null || _this_lastChild === void 0 ? void 0 : _this_lastChild.node.key) !== null && _this_lastChild_node_key !== void 0 ? _this_lastChild_node_key : null, this.isSSR);
|
|
1207
|
-
this.mutatedNodes.clear();
|
|
1208
|
-
}
|
|
1209
|
-
this.collectionMutated = false;
|
|
1210
|
-
}
|
|
1211
|
-
queueUpdate() {
|
|
1212
|
-
if (this.dirtyNodes.size === 0 || this.transactionCount > 0) return;
|
|
1213
|
-
for (let fn of this.subscriptions) fn();
|
|
1214
|
-
}
|
|
1215
|
-
subscribe(fn) {
|
|
1216
|
-
this.subscriptions.add(fn);
|
|
1217
|
-
return () => this.subscriptions.delete(fn);
|
|
1218
|
-
}
|
|
1219
|
-
resetAfterSSR() {
|
|
1220
|
-
if (this.isSSR) {
|
|
1221
|
-
this.isSSR = false;
|
|
1222
|
-
this.firstChild = null;
|
|
1223
|
-
this.lastChild = null;
|
|
1224
|
-
this.nodeId = 0;
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
constructor(collection) {
|
|
1228
|
-
super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = false, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.isMounted = true, this.mutatedNodes = /* @__PURE__ */ new Set(), this.subscriptions = /* @__PURE__ */ new Set(), this.transactionCount = 0;
|
|
1229
|
-
this.collection = collection;
|
|
1230
|
-
this.collectionMutated = true;
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
function $e948873055cbafe4$export$727c8fc270210f13(props) {
|
|
1234
|
-
let { children, items, idScope, addIdAndValue, dependencies = [] } = props;
|
|
1235
|
-
let cache = useMemo(() => /* @__PURE__ */ new WeakMap(), dependencies);
|
|
1236
|
-
return useMemo(() => {
|
|
1237
|
-
if (items && typeof children === "function") {
|
|
1238
|
-
let res = [];
|
|
1239
|
-
for (let item of items) {
|
|
1240
|
-
let rendered = cache.get(item);
|
|
1241
|
-
if (!rendered) {
|
|
1242
|
-
rendered = children(item);
|
|
1243
|
-
var _rendered_props_id, _ref;
|
|
1244
|
-
let key = (_ref = (_rendered_props_id = rendered.props.id) !== null && _rendered_props_id !== void 0 ? _rendered_props_id : item.key) !== null && _ref !== void 0 ? _ref : item.id;
|
|
1245
|
-
if (key == null) throw new Error("Could not determine key for item");
|
|
1246
|
-
if (idScope) key = idScope + ":" + key;
|
|
1247
|
-
rendered = cloneElement(rendered, addIdAndValue ? {
|
|
1248
|
-
key,
|
|
1249
|
-
id: key,
|
|
1250
|
-
value: item
|
|
1251
|
-
} : {
|
|
1252
|
-
key
|
|
1253
|
-
});
|
|
1254
|
-
cache.set(item, rendered);
|
|
1255
|
-
}
|
|
1256
|
-
res.push(rendered);
|
|
1257
|
-
}
|
|
1258
|
-
return res;
|
|
1259
|
-
} else if (typeof children !== "function") return children;
|
|
1260
|
-
}, [
|
|
1261
|
-
children,
|
|
1262
|
-
items,
|
|
1263
|
-
cache,
|
|
1264
|
-
idScope,
|
|
1265
|
-
addIdAndValue
|
|
1266
|
-
]);
|
|
1267
|
-
}
|
|
1268
|
-
const $e1995378a142960e$var$ShallowRenderContext = /* @__PURE__ */ createContext(false);
|
|
1269
|
-
const $e1995378a142960e$var$CollectionDocumentContext = /* @__PURE__ */ createContext(null);
|
|
1270
|
-
function $e1995378a142960e$export$bf788dd355e3a401(props) {
|
|
1271
|
-
let doc = useContext($e1995378a142960e$var$CollectionDocumentContext);
|
|
1272
|
-
if (doc)
|
|
1273
|
-
return props.content;
|
|
1274
|
-
let { collection, document: document2 } = $e1995378a142960e$var$useCollectionDocument(props.createCollection);
|
|
1275
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement($f39a9eba43920ace$export$8dc98ba7eadeaa56, null, /* @__PURE__ */ React__default.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider, {
|
|
1276
|
-
value: document2
|
|
1277
|
-
}, props.content)), /* @__PURE__ */ React__default.createElement($e1995378a142960e$var$CollectionInner, {
|
|
1278
|
-
render: props.children,
|
|
1279
|
-
collection
|
|
1280
|
-
}));
|
|
1281
|
-
}
|
|
1282
|
-
function $e1995378a142960e$var$CollectionInner({ collection, render }) {
|
|
1283
|
-
return render(collection);
|
|
1284
|
-
}
|
|
1285
|
-
function $e1995378a142960e$var$useSyncExternalStoreFallback(subscribe, getSnapshot, getServerSnapshot) {
|
|
1286
|
-
let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273();
|
|
1287
|
-
let isSSRRef = useRef(isSSR);
|
|
1288
|
-
isSSRRef.current = isSSR;
|
|
1289
|
-
let getSnapshotWrapper = useCallback(() => {
|
|
1290
|
-
return isSSRRef.current ? getServerSnapshot() : getSnapshot();
|
|
1291
|
-
}, [
|
|
1292
|
-
getSnapshot,
|
|
1293
|
-
getServerSnapshot
|
|
1294
|
-
]);
|
|
1295
|
-
return shimExports.useSyncExternalStore(subscribe, getSnapshotWrapper);
|
|
1296
|
-
}
|
|
1297
|
-
const $e1995378a142960e$var$useSyncExternalStore = typeof React__default["useSyncExternalStore"] === "function" ? React__default["useSyncExternalStore"] : $e1995378a142960e$var$useSyncExternalStoreFallback;
|
|
1298
|
-
function $e1995378a142960e$var$useCollectionDocument(createCollection) {
|
|
1299
|
-
let [document2] = useState(() => new $681cc3c98f569e39$export$b34a105447964f9f((createCollection === null || createCollection === void 0 ? void 0 : createCollection()) || new $23b9f4fcf0fe224b$export$408d25a4e12db025()));
|
|
1300
|
-
let subscribe = useCallback((fn) => document2.subscribe(fn), [
|
|
1301
|
-
document2
|
|
1302
|
-
]);
|
|
1303
|
-
let getSnapshot = useCallback(() => {
|
|
1304
|
-
let collection2 = document2.getCollection();
|
|
1305
|
-
if (document2.isSSR)
|
|
1306
|
-
document2.resetAfterSSR();
|
|
1307
|
-
return collection2;
|
|
1308
|
-
}, [
|
|
1309
|
-
document2
|
|
1310
|
-
]);
|
|
1311
|
-
let getServerSnapshot = useCallback(() => {
|
|
1312
|
-
document2.isSSR = true;
|
|
1313
|
-
return document2.getCollection();
|
|
1314
|
-
}, [
|
|
1315
|
-
document2
|
|
1316
|
-
]);
|
|
1317
|
-
let collection = $e1995378a142960e$var$useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
1318
|
-
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
1319
|
-
document2.isMounted = true;
|
|
1320
|
-
return () => {
|
|
1321
|
-
document2.isMounted = false;
|
|
1322
|
-
};
|
|
1323
|
-
}, [
|
|
1324
|
-
document2
|
|
1325
|
-
]);
|
|
1326
|
-
return {
|
|
1327
|
-
collection,
|
|
1328
|
-
document: document2
|
|
1329
|
-
};
|
|
1330
|
-
}
|
|
1331
|
-
const $e1995378a142960e$var$SSRContext = /* @__PURE__ */ createContext(null);
|
|
1332
|
-
function $e1995378a142960e$var$useSSRCollectionNode(Type, props, ref, rendered, children, render) {
|
|
1333
|
-
let itemRef = useCallback((element) => {
|
|
1334
|
-
element === null || element === void 0 ? void 0 : element.setProps(props, ref, rendered, render);
|
|
1335
|
-
}, [
|
|
1336
|
-
props,
|
|
1337
|
-
ref,
|
|
1338
|
-
rendered,
|
|
1339
|
-
render
|
|
1340
|
-
]);
|
|
1341
|
-
let parentNode = useContext($e1995378a142960e$var$SSRContext);
|
|
1342
|
-
if (parentNode) {
|
|
1343
|
-
let element = parentNode.ownerDocument.nodesByProps.get(props);
|
|
1344
|
-
if (!element) {
|
|
1345
|
-
element = parentNode.ownerDocument.createElement(Type);
|
|
1346
|
-
element.setProps(props, ref, rendered, render);
|
|
1347
|
-
parentNode.appendChild(element);
|
|
1348
|
-
parentNode.ownerDocument.updateCollection();
|
|
1349
|
-
parentNode.ownerDocument.nodesByProps.set(props, element);
|
|
1350
|
-
}
|
|
1351
|
-
return children ? /* @__PURE__ */ React__default.createElement($e1995378a142960e$var$SSRContext.Provider, {
|
|
1352
|
-
value: element
|
|
1353
|
-
}, children) : null;
|
|
1354
|
-
}
|
|
1355
|
-
return /* @__PURE__ */ React__default.createElement(Type, {
|
|
1356
|
-
ref: itemRef
|
|
1357
|
-
}, children);
|
|
1358
|
-
}
|
|
1359
|
-
function $e1995378a142960e$export$18af5c7a9e9b3664(type, render) {
|
|
1360
|
-
let Component = ({ node }) => render(node.props, node.props.ref, node);
|
|
1361
|
-
let Result = forwardRef((props, ref) => {
|
|
1362
|
-
let isShallow = useContext($e1995378a142960e$var$ShallowRenderContext);
|
|
1363
|
-
if (!isShallow) {
|
|
1364
|
-
if (render.length >= 3) throw new Error(render.name + " cannot be rendered outside a collection.");
|
|
1365
|
-
return render(props, ref);
|
|
1366
|
-
}
|
|
1367
|
-
return $e1995378a142960e$var$useSSRCollectionNode(type, props, ref, "children" in props ? props.children : null, null, (node) => /* @__PURE__ */ React__default.createElement(Component, {
|
|
1368
|
-
node
|
|
1369
|
-
}));
|
|
1370
|
-
});
|
|
1371
|
-
Result.displayName = render.name;
|
|
1372
|
-
return Result;
|
|
1373
|
-
}
|
|
1374
|
-
function $e1995378a142960e$var$useCollectionChildren(options) {
|
|
1375
|
-
return $e948873055cbafe4$export$727c8fc270210f13(__spreadProps(__spreadValues({}, options), {
|
|
1376
|
-
addIdAndValue: true
|
|
1377
|
-
}));
|
|
1378
|
-
}
|
|
1379
|
-
const $e1995378a142960e$var$CollectionContext = /* @__PURE__ */ createContext(null);
|
|
1380
|
-
function $e1995378a142960e$export$fb8073518f34e6ec(props) {
|
|
1381
|
-
let ctx = useContext($e1995378a142960e$var$CollectionContext);
|
|
1382
|
-
let dependencies = ((ctx === null || ctx === void 0 ? void 0 : ctx.dependencies) || []).concat(props.dependencies);
|
|
1383
|
-
let idScope = props.idScope || (ctx === null || ctx === void 0 ? void 0 : ctx.idScope);
|
|
1384
|
-
let children = $e1995378a142960e$var$useCollectionChildren(__spreadProps(__spreadValues({}, props), {
|
|
1385
|
-
idScope,
|
|
1386
|
-
dependencies
|
|
1387
|
-
}));
|
|
1388
|
-
let doc = useContext($e1995378a142960e$var$CollectionDocumentContext);
|
|
1389
|
-
if (doc) children = /* @__PURE__ */ React__default.createElement($e1995378a142960e$var$CollectionRoot, null, children);
|
|
1390
|
-
ctx = useMemo(() => ({
|
|
1391
|
-
dependencies,
|
|
1392
|
-
idScope
|
|
1393
|
-
}), [
|
|
1394
|
-
idScope,
|
|
1395
|
-
...dependencies
|
|
1396
|
-
]);
|
|
1397
|
-
return /* @__PURE__ */ React__default.createElement($e1995378a142960e$var$CollectionContext.Provider, {
|
|
1398
|
-
value: ctx
|
|
1399
|
-
}, children);
|
|
1400
|
-
}
|
|
1401
|
-
function $e1995378a142960e$var$CollectionRoot({ children }) {
|
|
1402
|
-
let doc = useContext($e1995378a142960e$var$CollectionDocumentContext);
|
|
1403
|
-
let wrappedChildren = useMemo(() => /* @__PURE__ */ React__default.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider, {
|
|
1404
|
-
value: null
|
|
1405
|
-
}, /* @__PURE__ */ React__default.createElement($e1995378a142960e$var$ShallowRenderContext.Provider, {
|
|
1406
|
-
value: true
|
|
1407
|
-
}, children)), [
|
|
1408
|
-
children
|
|
1409
|
-
]);
|
|
1410
|
-
return $b5e257d569688ac6$export$535bd6ca7f90a273() ? /* @__PURE__ */ React__default.createElement($e1995378a142960e$var$SSRContext.Provider, {
|
|
1411
|
-
value: doc
|
|
1412
|
-
}, wrappedChildren) : /* @__PURE__ */ createPortal(wrappedChildren, doc);
|
|
1413
|
-
}
|
|
1414
|
-
const $7135fc7d473fd974$export$a164736487e3f0ae = {
|
|
1415
|
-
CollectionRoot({ collection, renderDropIndicator }) {
|
|
1416
|
-
return $7135fc7d473fd974$var$useCollectionRender(collection, null, renderDropIndicator);
|
|
1417
|
-
},
|
|
1418
|
-
CollectionBranch({ collection, parent, renderDropIndicator }) {
|
|
1419
|
-
return $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDropIndicator);
|
|
1420
|
-
}
|
|
1421
|
-
};
|
|
1422
|
-
function $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDropIndicator) {
|
|
1423
|
-
return $e948873055cbafe4$export$727c8fc270210f13({
|
|
1424
|
-
items: parent ? collection.getChildren(parent.key) : collection,
|
|
1425
|
-
dependencies: [
|
|
1426
|
-
renderDropIndicator
|
|
1427
|
-
],
|
|
1428
|
-
children(node) {
|
|
1429
|
-
var _collection_getItem;
|
|
1430
|
-
let rendered = node.render(node);
|
|
1431
|
-
if (!renderDropIndicator || node.type !== "item") return rendered;
|
|
1432
|
-
let key = node.key;
|
|
1433
|
-
let keyAfter = collection.getKeyAfter(key);
|
|
1434
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderDropIndicator({
|
|
1435
|
-
type: "item",
|
|
1436
|
-
key,
|
|
1437
|
-
dropPosition: "before"
|
|
1438
|
-
}), rendered, (keyAfter == null || ((_collection_getItem = collection.getItem(keyAfter)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.type) !== "item") && renderDropIndicator({
|
|
1439
|
-
type: "item",
|
|
1440
|
-
key,
|
|
1441
|
-
dropPosition: "after"
|
|
1442
|
-
}));
|
|
1443
|
-
}
|
|
1444
|
-
});
|
|
1445
|
-
}
|
|
1446
|
-
const $7135fc7d473fd974$export$4feb769f8ddf26c5 = /* @__PURE__ */ createContext($7135fc7d473fd974$export$a164736487e3f0ae);
|
|
1447
|
-
function $7135fc7d473fd974$export$90e00781bc59d8f9(focusedKey) {
|
|
1448
|
-
return useMemo(() => focusedKey != null ? /* @__PURE__ */ new Set([
|
|
1449
|
-
focusedKey
|
|
1450
|
-
]) : null, [
|
|
1451
|
-
focusedKey
|
|
1452
|
-
]);
|
|
1453
|
-
}
|
|
1454
|
-
const $01b77f81d0f07f68$export$75b6ee27786ba447 = /* @__PURE__ */ createContext({});
|
|
1455
|
-
function $01b77f81d0f07f68$var$Label(props, ref) {
|
|
1456
|
-
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $01b77f81d0f07f68$export$75b6ee27786ba447);
|
|
1457
|
-
let _a = props, { elementType: ElementType = "label" } = _a, labelProps = __objRest(_a, ["elementType"]);
|
|
1458
|
-
return /* @__PURE__ */ React__default.createElement(ElementType, __spreadProps(__spreadValues({
|
|
1459
|
-
className: "react-aria-Label"
|
|
1460
|
-
}, labelProps), {
|
|
1461
|
-
ref
|
|
1462
|
-
}));
|
|
1463
|
-
}
|
|
1464
|
-
const $01b77f81d0f07f68$export$b04be29aa201d4f5 = /* @__PURE__ */ $f39a9eba43920ace$export$86427a43e3e48ebb($01b77f81d0f07f68$var$Label);
|
|
1465
|
-
const $514c0188e459b4c0$export$9afb8bc826b033ea = /* @__PURE__ */ createContext({});
|
|
1466
|
-
const $eed445e0843c11d0$export$7c5906fe4f1f2af2 = /* @__PURE__ */ createContext(null);
|
|
1467
|
-
const $eaf9e70818b436db$export$5b07b5dd2cbd96e3 = /* @__PURE__ */ createContext(null);
|
|
1468
|
-
const $eaf9e70818b436db$export$e755ce3685dd0ca9 = /* @__PURE__ */ createContext(null);
|
|
1469
|
-
function $eaf9e70818b436db$var$TagGroup(props, ref) {
|
|
1470
|
-
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $eaf9e70818b436db$export$5b07b5dd2cbd96e3);
|
|
1471
|
-
return /* @__PURE__ */ React__default.createElement($e1995378a142960e$export$bf788dd355e3a401, {
|
|
1472
|
-
content: props.children
|
|
1473
|
-
}, (collection) => /* @__PURE__ */ React__default.createElement($eaf9e70818b436db$var$TagGroupInner, {
|
|
1474
|
-
props,
|
|
1475
|
-
forwardedRef: ref,
|
|
1476
|
-
collection
|
|
1477
|
-
}));
|
|
1478
|
-
}
|
|
1479
|
-
function $eaf9e70818b436db$var$TagGroupInner({ props, forwardedRef: ref, collection }) {
|
|
1480
|
-
let tagListRef = useRef(null);
|
|
1481
|
-
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
|
|
1482
|
-
let state = $e72dd72e1c76a225$export$2f645645f7bca764(__spreadProps(__spreadValues({}, props), {
|
|
1483
|
-
children: void 0,
|
|
1484
|
-
collection
|
|
1485
|
-
}));
|
|
1486
|
-
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
|
|
1487
|
-
let domPropOverrides = Object.fromEntries(Object.entries(domProps).map(([k]) => [
|
|
1488
|
-
k,
|
|
1489
|
-
void 0
|
|
1490
|
-
]));
|
|
1491
|
-
let { gridProps, labelProps, descriptionProps, errorMessageProps } = $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(__spreadProps(__spreadValues(__spreadValues({}, props), domPropOverrides), {
|
|
1492
|
-
label
|
|
1493
|
-
}), state, tagListRef);
|
|
1494
|
-
var _props_className;
|
|
1495
|
-
return /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({}, domProps), {
|
|
1496
|
-
ref,
|
|
1497
|
-
slot: props.slot || void 0,
|
|
1498
|
-
className: (_props_className = props.className) !== null && _props_className !== void 0 ? _props_className : "react-aria-TagGroup",
|
|
1499
|
-
style: props.style
|
|
1500
|
-
}), /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
1501
|
-
values: [
|
|
1502
|
-
[
|
|
1503
|
-
$01b77f81d0f07f68$export$75b6ee27786ba447,
|
|
1504
|
-
__spreadProps(__spreadValues({}, labelProps), {
|
|
1505
|
-
elementType: "span",
|
|
1506
|
-
ref: labelRef
|
|
1507
|
-
})
|
|
1508
|
-
],
|
|
1509
|
-
[
|
|
1510
|
-
$eaf9e70818b436db$export$e755ce3685dd0ca9,
|
|
1511
|
-
__spreadProps(__spreadValues({}, gridProps), {
|
|
1512
|
-
ref: tagListRef
|
|
1513
|
-
})
|
|
1514
|
-
],
|
|
1515
|
-
[
|
|
1516
|
-
$eed445e0843c11d0$export$7c5906fe4f1f2af2,
|
|
1517
|
-
state
|
|
1518
|
-
],
|
|
1519
|
-
[
|
|
1520
|
-
$514c0188e459b4c0$export$9afb8bc826b033ea,
|
|
1521
|
-
{
|
|
1522
|
-
slots: {
|
|
1523
|
-
description: descriptionProps,
|
|
1524
|
-
errorMessage: errorMessageProps
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
]
|
|
1528
|
-
]
|
|
1529
|
-
}, props.children));
|
|
1530
|
-
}
|
|
1531
|
-
const $eaf9e70818b436db$export$67ea30858aaf75e3 = /* @__PURE__ */ forwardRef($eaf9e70818b436db$var$TagGroup);
|
|
1532
|
-
function $eaf9e70818b436db$var$TagList(props, ref) {
|
|
1533
|
-
let state = useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
1534
|
-
return state ? /* @__PURE__ */ React__default.createElement($eaf9e70818b436db$var$TagListInner, {
|
|
1535
|
-
props,
|
|
1536
|
-
forwardedRef: ref
|
|
1537
|
-
}) : /* @__PURE__ */ React__default.createElement($e1995378a142960e$export$fb8073518f34e6ec, props);
|
|
1538
|
-
}
|
|
1539
|
-
function $eaf9e70818b436db$var$TagListInner({ props, forwardedRef }) {
|
|
1540
|
-
let state = useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
1541
|
-
let { CollectionRoot } = useContext($7135fc7d473fd974$export$4feb769f8ddf26c5);
|
|
1542
|
-
let [gridProps, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, forwardedRef, $eaf9e70818b436db$export$e755ce3685dd0ca9);
|
|
1543
|
-
delete gridProps.items;
|
|
1544
|
-
delete gridProps.renderEmptyState;
|
|
1545
|
-
let { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f();
|
|
1546
|
-
let renderValues = {
|
|
1547
|
-
isEmpty: state.collection.size === 0,
|
|
1548
|
-
isFocused,
|
|
1549
|
-
isFocusVisible,
|
|
1550
|
-
state
|
|
1551
|
-
};
|
|
1552
|
-
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
1553
|
-
className: props.className,
|
|
1554
|
-
style: props.style,
|
|
1555
|
-
defaultClassName: "react-aria-TagList",
|
|
1556
|
-
values: renderValues
|
|
1557
|
-
});
|
|
1558
|
-
let persistedKeys = $7135fc7d473fd974$export$90e00781bc59d8f9(state.selectionManager.focusedKey);
|
|
1559
|
-
return /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues(__spreadValues({}, $3ef42575df84b30b$export$9d1611c77c2fe928(gridProps, focusProps)), renderProps), {
|
|
1560
|
-
ref,
|
|
1561
|
-
"data-empty": state.collection.size === 0 || void 0,
|
|
1562
|
-
"data-focused": isFocused || void 0,
|
|
1563
|
-
"data-focus-visible": isFocusVisible || void 0
|
|
1564
|
-
}), state.collection.size === 0 && props.renderEmptyState ? props.renderEmptyState(renderValues) : /* @__PURE__ */ React__default.createElement(CollectionRoot, {
|
|
1565
|
-
collection: state.collection,
|
|
1566
|
-
persistedKeys
|
|
1567
|
-
}));
|
|
1568
|
-
}
|
|
1569
|
-
const $eaf9e70818b436db$export$f9fef0f55402315b = /* @__PURE__ */ forwardRef($eaf9e70818b436db$var$TagList);
|
|
1570
|
-
const $eaf9e70818b436db$export$3288d34c523a1192 = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664("item", (props, forwardedRef, item) => {
|
|
1571
|
-
let state = useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
1572
|
-
let ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef);
|
|
1573
|
-
let { focusProps, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f({
|
|
1574
|
-
within: true
|
|
1575
|
-
});
|
|
1576
|
-
let _a = $fc6126c82a4601f1$export$3f568fff7dff2f03({
|
|
1577
|
-
item
|
|
1578
|
-
}, state, ref), { rowProps, gridCellProps, removeButtonProps } = _a, states = __objRest(_a, ["rowProps", "gridCellProps", "removeButtonProps"]);
|
|
1579
|
-
let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
|
|
1580
|
-
isDisabled: !states.allowsSelection,
|
|
1581
|
-
onHoverStart: item.props.onHoverStart,
|
|
1582
|
-
onHoverChange: item.props.onHoverChange,
|
|
1583
|
-
onHoverEnd: item.props.onHoverEnd
|
|
1584
|
-
});
|
|
1585
|
-
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3(__spreadProps(__spreadValues({}, props), {
|
|
1586
|
-
id: void 0,
|
|
1587
|
-
children: item.rendered,
|
|
1588
|
-
defaultClassName: "react-aria-Tag",
|
|
1589
|
-
values: __spreadProps(__spreadValues({}, states), {
|
|
1590
|
-
isFocusVisible,
|
|
1591
|
-
isHovered,
|
|
1592
|
-
selectionMode: state.selectionManager.selectionMode,
|
|
1593
|
-
selectionBehavior: state.selectionManager.selectionBehavior
|
|
1594
|
-
})
|
|
1595
|
-
}));
|
|
1596
|
-
useEffect(() => {
|
|
1597
|
-
if (!item.textValue) console.warn("A `textValue` prop is required for <Tag> elements with non-plain text children for accessibility.");
|
|
1598
|
-
}, [
|
|
1599
|
-
item.textValue
|
|
1600
|
-
]);
|
|
1601
|
-
return /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues(__spreadValues({
|
|
1602
|
-
ref
|
|
1603
|
-
}, renderProps), $3ef42575df84b30b$export$9d1611c77c2fe928($65484d02dcb7eb3e$export$457c3d6518dd4c6f(props), rowProps, focusProps, hoverProps)), {
|
|
1604
|
-
"data-selected": states.isSelected || void 0,
|
|
1605
|
-
"data-disabled": states.isDisabled || void 0,
|
|
1606
|
-
"data-hovered": isHovered || void 0,
|
|
1607
|
-
"data-focused": states.isFocused || void 0,
|
|
1608
|
-
"data-focus-visible": isFocusVisible || void 0,
|
|
1609
|
-
"data-pressed": states.isPressed || void 0,
|
|
1610
|
-
"data-allows-removing": states.allowsRemoving || void 0,
|
|
1611
|
-
"data-selection-mode": state.selectionManager.selectionMode === "none" ? void 0 : state.selectionManager.selectionMode
|
|
1612
|
-
}), /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({}, gridCellProps), {
|
|
1613
|
-
style: {
|
|
1614
|
-
display: "contents"
|
|
1615
|
-
}
|
|
1616
|
-
}), /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
1617
|
-
values: [
|
|
1618
|
-
[
|
|
1619
|
-
$d2b4bc8c273e7be6$export$24d547caef80ccd1,
|
|
1620
|
-
{
|
|
1621
|
-
slots: {
|
|
1622
|
-
remove: removeButtonProps
|
|
1623
|
-
}
|
|
1624
|
-
}
|
|
1625
|
-
],
|
|
1626
|
-
[
|
|
1627
|
-
$7135fc7d473fd974$export$4feb769f8ddf26c5,
|
|
1628
|
-
$7135fc7d473fd974$export$a164736487e3f0ae
|
|
1629
|
-
]
|
|
1630
|
-
]
|
|
1631
|
-
}, renderProps.children)));
|
|
1632
|
-
});
|
|
1633
|
-
const Pill$1 = "_Pill_wfvzj_5";
|
|
1634
|
-
const remove = "_remove_wfvzj_14";
|
|
1635
|
-
const list = "_list_wfvzj_26";
|
|
1636
|
-
const styles = {
|
|
1637
|
-
Pill: Pill$1,
|
|
1638
|
-
remove,
|
|
1639
|
-
list
|
|
1640
|
-
};
|
|
1641
|
-
function usePillListState(initialItems) {
|
|
1642
|
-
return $0d86e9c8f07f9a7b$export$762f73dccccd255d({
|
|
1643
|
-
initialItems
|
|
1644
|
-
});
|
|
1645
|
-
}
|
|
1646
|
-
function PillGroup(props) {
|
|
1647
|
-
const { label, items, children, horizontalStackContainerProps = {} } = props;
|
|
1648
|
-
const { align, blockAlign, gap, wrap = true, inline } = horizontalStackContainerProps;
|
|
1649
|
-
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getResponsiveDesignToken("pill-group", "gap", "space", gap)), getComponentToken("pill-group", "align", align)), getComponentToken("pill-group", "block-align", blockAlign)), getComponentToken("pill-group", "wrap", wrap ? "wrap" : "nowrap")), getComponentToken("pill-group", "display", inline ? "inline-flex" : "flex"));
|
|
1650
|
-
return React__default.createElement($eaf9e70818b436db$export$67ea30858aaf75e3, __spreadValues({}, props), React__default.createElement(Text, {
|
|
1651
|
-
visuallyHidden: true
|
|
1652
|
-
}, React__default.createElement($01b77f81d0f07f68$export$b04be29aa201d4f5, null, label)), React__default.createElement($eaf9e70818b436db$export$f9fef0f55402315b, {
|
|
1653
|
-
items,
|
|
1654
|
-
className: styles.list,
|
|
1655
|
-
style
|
|
1656
|
-
}, children));
|
|
1657
|
-
}
|
|
1658
|
-
function Pill(props) {
|
|
1659
|
-
const { label, icon } = props;
|
|
1660
|
-
return React__default.createElement($eaf9e70818b436db$export$3288d34c523a1192, __spreadValues({
|
|
1661
|
-
textValue: label,
|
|
1662
|
-
className: styles.Pill
|
|
1663
|
-
}, props), ({ allowsRemoving }) => React__default.createElement(React__default.Fragment, null, icon && React__default.createElement(Icon, {
|
|
1664
|
-
size: "xs",
|
|
1665
|
-
symbol: icon,
|
|
1666
|
-
color: "primary.700"
|
|
1667
|
-
}), React__default.createElement(Text, {
|
|
1668
|
-
color: "primary.800",
|
|
1669
|
-
variant: "subtitle2"
|
|
1670
|
-
}, label), allowsRemoving && React__default.createElement($d2b4bc8c273e7be6$export$353f5b6fc5456de1, {
|
|
1671
|
-
className: styles.remove,
|
|
1672
|
-
slot: "remove"
|
|
1673
|
-
}, React__default.createElement(Icon, {
|
|
1674
|
-
size: "xs",
|
|
1675
|
-
symbol: Close,
|
|
1676
|
-
color: "primary.600"
|
|
1677
|
-
}))));
|
|
1678
|
-
}
|
|
1679
|
-
PillGroup.Pill = Pill;
|
|
1
|
+
import { P, u } from "../__chunks__/PillGroup-Bp5vfk6Z.mjs";
|
|
1680
2
|
export {
|
|
1681
|
-
PillGroup,
|
|
1682
|
-
usePillListState
|
|
3
|
+
P as PillGroup,
|
|
4
|
+
u as usePillListState
|
|
1683
5
|
};
|