@povio/ui 4.0.0-rc.3 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Accordion-rZ9P9dZy.js → Accordion-CB1F5YAY.js} +5 -5
- package/dist/{BottomSheet-ByyAU_dJ.js → BottomSheet-CVTF1wQe.js} +8 -8
- package/dist/{Breadcrumbs-UfRbfiqU.js → Breadcrumbs-BibAIBhY.js} +8 -8
- package/dist/{Button-CbwNjdRz.js → Button-CcZBqoQp.js} +4 -4
- package/dist/{Button-CRlZqaJq.js → Button-D6KlWSFL.js} +3 -3
- package/dist/{Calendar-Ci0ysyfZ.js → Calendar-kSEji28A.js} +22 -21
- package/dist/{Checkbox-BJ7flpwA.js → Checkbox-5FtqnMsf.js} +8 -8
- package/dist/{CheckboxCheckmark-C1X9yBT6.js → CheckboxCheckmark-DJue5Aej.js} +14 -7
- package/dist/{DatePicker-DyjAwAh6.d.ts → DatePicker-CjmXaZ9T.d.ts} +1 -0
- package/dist/{DatePicker-CgCr_Z8r.js → DatePicker-rD62Ld4G.js} +14 -12
- package/dist/{DatePickerInput-B9Z_AUkC.js → DatePickerInput-eyHwzKPm.js} +94 -46
- package/dist/{DateRangePicker-CS69o2pD.js → DateRangePicker-2a0XZDLq.js} +35 -30
- package/dist/{DateRangePicker-Cdu1Sx37.d.ts → DateRangePicker-D1kjkFfS.d.ts} +1 -0
- package/dist/{DateTimePicker-Xzc1ve3a.js → DateTimePicker-CTKpZMgs.js} +14 -12
- package/dist/{DateTimePicker-ClSa8hFs.d.ts → DateTimePicker-CT_Pm3KB.d.ts} +1 -0
- package/dist/{Dialog-DLfOkNe9.js → Dialog-BE9BSDDl.js} +4 -4
- package/dist/{Dialog-CLWfxiie.js → Dialog-CXoVeIkU.js} +63 -16
- package/dist/{DropdownMenu-hkpycd0j.js → DropdownMenu-tuf1W-IL.js} +20 -13
- package/dist/{DropdownMenuDesktop-B0MKN0op.js → DropdownMenuDesktop-C9ttysuk.js} +17 -10
- package/dist/{FileInput-BQS6TAH7.js → FileInput-DHTseIuN.js} +7 -7
- package/dist/{FileTrigger-C5r_5hvS.js → FileTrigger-CDXcQthK.js} +29 -22
- package/dist/{FileUpload-cS3NOaES.js → FileUpload-9klKB7EQ.js} +72 -47
- package/dist/{FocusScope-CNjWJz3s.js → FocusScope-CO9oJ1sc.js} +4 -4
- package/dist/{Form-Bam3kea-.js → Form-DlQcyN1f.js} +2 -2
- package/dist/{Form-BQXPNkTh.d.ts → Form-mzpVGNjX.d.ts} +1 -1
- package/dist/{FormField-BHPdCLEV.js → FormField-CAcDJ4HC.js} +2 -2
- package/dist/{FormFieldHeaderTooltip-b-kY0DgB.js → FormFieldHeaderTooltip-C2IDI4ac.js} +27 -20
- package/dist/{Heading-D0cYUzVa.js → Heading-nI1_VOaE.js} +2 -2
- package/dist/{InlineTooltipWrapper-BqLlgdD7.js → InlineTooltipWrapper-7HG-g2X3.js} +1 -1
- package/dist/{Input-BmIahisJ.js → Input-BsbLZDtC.js} +2 -2
- package/dist/{InputItem-AU6mq7o-.js → InputItem-DTxIV8kc.js} +12 -12
- package/dist/{Inputs-AqKRElPz.js → Inputs-BhipPZ_X.js} +1 -1
- package/dist/{Inputs-CrXedhHr.d.ts → Inputs-CHEDcuP0.d.ts} +1 -1
- package/dist/{Label-C6BonuOp.js → Label-B2-B-uFY.js} +2 -2
- package/dist/{Link-e4ZWZNrO.js → Link-C5YsZ4pr.js} +1 -1
- package/dist/{Link-D7QEPw-L.js → Link-FupWOW1f.js} +2 -2
- package/dist/{ListBox-Dx42Gif4.js → ListBox-B7DW1S7n.js} +7 -7
- package/dist/{Modal-C5Oi8GZF.js → Modal-CoFt5PGP.js} +3 -3
- package/dist/{NumberRangeInput-xjkniTH0.js → NumberRangeInput-BFW0HENS.js} +8 -8
- package/dist/{OverlayArrow-BRnQo6-8.js → OverlayArrow-D8z7cCsw.js} +2 -2
- package/dist/{PaginationList-Du7qn_AS.js → PaginationList-CmOJo2r2.js} +5 -5
- package/dist/PasswordInput-DYwUZ4-k.js +78 -0
- package/dist/{RadioGroup-B9g4uT4E.js → RadioGroup-D8Kh59ew.js} +9 -9
- package/dist/{RichTextEditor-DWgaZLRW.js → RichTextEditor-D8CjYMPH.js} +325 -218
- package/dist/{Select-O9dprkTa.js → Select-DriJMMTw.js} +4 -4
- package/dist/{SelectionIndicator-C9TY9dkk.js → SelectionIndicator-JblvLKCu.js} +1 -1
- package/dist/{SharedElementTransition-lGqrCNlI.js → SharedElementTransition-Da1c_cOO.js} +1 -1
- package/dist/{Slider-IDDtzb2P.js → Slider-CPAPCE_l.js} +6 -6
- package/dist/{Stepper-Coe3PAl_.js → Stepper-BbO9TlOM.js} +2 -2
- package/dist/{Switch-BaNEe9Nx.js → Switch-DkujkUqi.js} +6 -6
- package/dist/{Tag-1N-2yYCH.js → Tag-DNuHvt6J.js} +4 -4
- package/dist/{Text-D_lEB52w.js → Text-D2MPZ3sY.js} +2 -1
- package/dist/{TextArea-BcIy_nZ2.js → TextArea-BypXXoLO.js} +6 -6
- package/dist/{TimePicker-vbrwgBc5.js → TimePicker-CmQyNLUp.js} +10 -10
- package/dist/{ToastContainer-gdpK8d8m.js → ToastContainer-8X5jGBe7.js} +2 -2
- package/dist/{ToggleButton-C966bfpT.js → ToggleButton-BW1ensey.js} +5 -5
- package/dist/{ToggleGroup-BMZsbHY9.js → ToggleGroup-DYn99n0Y.js} +9 -9
- package/dist/{Tooltip-BNAubrgG.js → Tooltip-D94a1IQl.js} +6 -6
- package/dist/{TooltipWrapper-DYfZF2Ly.js → TooltipWrapper-S2JC-w4e.js} +4 -4
- package/dist/{chain-BKPAL-J_.js → chain-DIXr2VAT.js} +1 -1
- package/dist/check-DYMBkp_Z.js +20 -0
- package/dist/chevron-down-B4Pr8bD3.js +20 -0
- package/dist/chevron-left-Dgo_b9wJ.js +20 -0
- package/dist/chevron-right-3nKJR5Bb.js +20 -0
- package/dist/chevron-up-D_Gqpb5M.js +20 -0
- package/dist/chevrons-right-DJPPn2fD.js +44 -0
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.js +3 -3
- package/dist/components/autocomplete.js +4 -4
- package/dist/components/badge.js +4 -4
- package/dist/components/bottom-sheet.js +2 -2
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.js +5 -5
- package/dist/components/checkbox.js +1 -1
- package/dist/components/collection/react-aria.js +1 -1
- package/dist/components/color-swatch-picker-item/react-aria.js +1 -1
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.d.ts +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.d.ts +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/dialog-trigger/react-aria.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.js +2 -2
- package/dist/components/drop-zone/react-aria.js +1 -1
- package/dist/components/dropdown-menu.js +2 -2
- package/dist/components/field-error/react-aria.js +1 -1
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/focusable/react-aria.js +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/i18n-provider/react-aria.js +1 -1
- package/dist/components/icon-button.js +2 -2
- package/dist/components/inline-icon-button.js +1 -1
- package/dist/components/input.js +7 -7
- package/dist/components/link.js +1 -1
- package/dist/components/list-box-item/react-aria.js +1 -1
- package/dist/components/menu/react-aria.js +1 -1
- package/dist/components/menu-item/react-aria.js +1 -1
- package/dist/components/menu-section/react-aria.js +1 -1
- package/dist/components/menu-trigger/react-aria.js +1 -1
- package/dist/components/modal/react-aria.js +1 -1
- package/dist/components/modal-overlay/react-aria.js +1 -1
- package/dist/components/number-field.js +9 -9
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/pagination-list.js +1 -1
- package/dist/components/pagination.js +2 -2
- package/dist/components/password-input.js +1 -1
- package/dist/components/pill-button.js +3 -3
- package/dist/components/popover.js +2 -2
- package/dist/components/pressable/react-aria.js +1 -1
- package/dist/components/query-autocomplete.js +3 -3
- package/dist/components/query-select.js +4 -4
- package/dist/components/radio-group.js +1 -1
- package/dist/components/router-provider/react-aria.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/split-button.js +3 -3
- package/dist/components/ssr-provider/react-aria.js +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/submenu-trigger/react-aria.js +1 -1
- package/dist/components/switch/react-aria.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table/react-aria.js +1 -1
- package/dist/components/tag.js +1 -1
- package/dist/components/text/react-aria.js +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/text-button.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/toggle-button.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tree/react-aria.js +1 -1
- package/dist/components/use-toast.js +2 -2
- package/dist/components/visually-hidden/react-aria.js +1 -1
- package/dist/config/confirmation.js +1 -1
- package/dist/config/resources.d.ts +1 -1
- package/dist/config/resources.js +1 -1
- package/dist/config/ui-config.d.ts +2 -2
- package/dist/config/ui-config.js +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/{confirmation.context-BcX0qVEy.js → confirmation.context-BuzgCfYl.js} +1 -1
- package/dist/createLucideIcon-LcezOE4z.js +240 -0
- package/dist/{date-picker-DiMaoYoA.d.ts → date-picker-MXt02b7Z.d.ts} +1 -1
- package/dist/{date-range-picker-DSkNEa35.d.ts → date-range-picker-BjT0t21q.d.ts} +1 -1
- package/dist/{date-time-picker-B5s2PMFw.d.ts → date-time-picker-CMmIuZtT.d.ts} +1 -1
- package/dist/{datePickerValue.utils-BxOJpTbb.js → datePickerValue.utils-GADbSu7a.js} +5 -5
- package/dist/{dist-BAT04RMQ.js → dist-C6GfeeEC.js} +2 -2
- package/dist/{dom.utils-D08rHcQ2.js → dom.utils-D3mELNBA.js} +1 -1
- package/dist/{dynamicInputs-2sABu31U.d.ts → dynamicInputs-CQMTixlW.d.ts} +7 -7
- package/dist/{exports-DUKqxyno.js → exports-BNrTn8Tj.js} +1 -0
- package/dist/{fieldAdapter-DESnl1Sc.js → fieldAdapter-BYVPxvYi.js} +1 -1
- package/dist/{focusSafely-BDIcvqPb.js → focusSafely-DCGrr2bb.js} +37 -27
- package/dist/{getScrollParent-WT3K8H_b.js → getScrollParent-kSR7EtoT.js} +23 -12
- package/dist/hooks/use-filters.js +1 -1
- package/dist/{i18n-D0Pz0p2u.d.ts → i18n-CX1vFM9r.d.ts} +6 -0
- package/dist/{i18n-BDjNuy4Z.js → i18n-CX2EjhJI.js} +6 -0
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +35 -35
- package/dist/{intlStrings-A7XlNdi7.js → intlStrings-chfsan9H.js} +35 -35
- package/dist/{numberStatic.utils-DAI7Bef3.js → numberStatic.utils-BMgRzyd3.js} +48 -48
- package/dist/{openLink-BrfLaWo4.js → openLink-CQhMhfzO.js} +3 -3
- package/dist/{platform-3R53zj-n.js → platform-BXNIIAfU.js} +1 -1
- package/dist/rhf/autocomplete.js +1 -1
- package/dist/rhf/checkbox-group.js +1 -1
- package/dist/rhf/checkbox.js +2 -2
- package/dist/rhf/date-picker.d.ts +2 -2
- package/dist/rhf/date-picker.js +2 -2
- package/dist/rhf/date-range-picker.d.ts +2 -2
- package/dist/rhf/date-range-picker.js +2 -2
- package/dist/rhf/date-time-picker.d.ts +2 -2
- package/dist/rhf/date-time-picker.js +2 -2
- package/dist/rhf/file-input.js +2 -2
- package/dist/rhf/file-upload.js +2 -2
- package/dist/rhf/input.js +1 -1
- package/dist/rhf/inputs.d.ts +1 -1
- package/dist/rhf/number-field.js +1 -1
- package/dist/rhf/number-range-input.js +2 -2
- package/dist/rhf/password-input.js +2 -2
- package/dist/rhf/query-autocomplete.js +1 -1
- package/dist/rhf/query-select.js +1 -1
- package/dist/rhf/radio-group.js +2 -2
- package/dist/rhf/rich-text-editor.js +2 -2
- package/dist/rhf/select.js +2 -2
- package/dist/rhf/slider.js +2 -2
- package/dist/rhf/switch.js +2 -2
- package/dist/rhf/text-area.js +2 -2
- package/dist/rhf/time-picker.js +2 -2
- package/dist/rhf/toggle-group.js +2 -2
- package/dist/{rhf-C52xZuFt.js → rhf-1_ZO8GhU.js} +1 -1
- package/dist/rhf.d.ts +9 -9
- package/dist/rhf.js +35 -35
- package/dist/rich-text-editor.js +1 -1
- package/dist/{router.context-Bft1psqn.js → router.context-B0jTMtE0.js} +1 -1
- package/dist/{staticDateTimeSegments-B9kkwiDz.js → staticDateTimeSegments-BQoA94W-.js} +107 -105
- package/dist/{staticSelect.utils-CBmV4sam.js → staticSelect.utils-ad60elvT.js} +69 -67
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.d.ts +1 -1
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.d.ts +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.d.ts +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.d.ts +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/inputs.d.ts +2 -2
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/password-input.js +1 -1
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.js +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/switch.js +1 -1
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/tanstack.d.ts +8 -8
- package/dist/tanstack.js +45 -45
- package/dist/{toast.runtime-BZQH-7Ba.js → toast.runtime-QMYrNvoQ.js} +1 -1
- package/dist/{uiConfig.context-BB7_zyOU.d.ts → uiConfig.context-CIoMqe1_.d.ts} +2 -0
- package/dist/{uiConfig.context-BvBsrMFI.js → uiConfig.context-RFvaQYzD.js} +87 -63
- package/dist/{useBreakpoint-CDKDB0E2.js → useBreakpoint-3kpqzjoC.js} +1 -1
- package/dist/{useControlledState-BMVd3AOQ.js → useControlledState-DQxX6LMN.js} +6 -6
- package/dist/{useFieldAccessibility-Bq-m3qhs.js → useFieldAccessibility-CtTdRX2u.js} +2 -2
- package/dist/{useFilters-KS2CQs_j.js → useFilters-kkEUFKmQ.js} +1 -1
- package/dist/{useFocusable-BIU1drrg.js → useFocusable-Bd0UsrQ7.js} +5 -5
- package/dist/{useFormAutosave-Bcbvu28I.js → useFormAutosave-BQUFLcAt.js} +2 -2
- package/dist/{useFormValidationState-Dl-Nh0G1.js → useFormValidationState-D3z-gafz.js} +59 -63
- package/dist/{useLayoutEffect-DN7Dbrb9.js → useLayoutEffect-B2-1tbPJ.js} +29 -4
- package/dist/{useStaticInputHandoff-Denoy4V_.js → useStaticInputHandoff-BAaDW_0z.js} +3 -3
- package/dist/{useSyncRef-Dsn4Ybiw.js → useSyncRef-RGMv0rXK.js} +12 -12
- package/dist/{useTableColumnConfig-DSJeSKeA.js → useTableColumnConfig-CzLiP4gr.js} +54 -47
- package/dist/{utils-D3gCeElo.js → utils-Czcqspm7.js} +1 -1
- package/dist/x-B6vfz8Ps.js +23 -0
- package/package.json +2 -2
- package/dist/PasswordInput-DTScGauT.js +0 -63
- package/dist/check-DefmU9oJ.js +0 -13
- package/dist/chevron-down-RksSwG1O.js +0 -13
- package/dist/chevron-left-Dem1_TuL.js +0 -13
- package/dist/chevron-right-DXbvvsay.js +0 -13
- package/dist/chevron-up-CgEFpORu.js +0 -13
- package/dist/chevrons-right--HrJEes-.js +0 -29
- package/dist/createLucideIcon-LS26Bb1M.js +0 -125
- package/dist/x-BD2AijMA.js +0 -16
- package/dist/{import-DDGNxVX8.js → import-BE0r63d8.js} +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as UIConfig } from "../uiConfig.context-
|
|
2
|
-
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "../import-
|
|
1
|
+
import { t as UIConfig } from "../uiConfig.context-RFvaQYzD.js";
|
|
2
|
+
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "../import-BE0r63d8.js";
|
|
3
3
|
import { t as FieldController } from "../form.binding-DLM7NA2s.js";
|
|
4
|
-
import { t as getStaticInputFocusTarget } from "../useStaticInputHandoff-
|
|
4
|
+
import { t as getStaticInputFocusTarget } from "../useStaticInputHandoff-BAaDW_0z.js";
|
|
5
5
|
import { Autocomplete } from "./autocomplete.js";
|
|
6
6
|
import { n as getQueryItems, r as getSelectionIdsToResolve, t as useQueryAutocomplete } from "../useQueryAutocomplete-CraXvRm_.js";
|
|
7
7
|
import { memo, useCallback, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as UIConfig } from "../uiConfig.context-
|
|
2
|
-
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "../import-
|
|
1
|
+
import { t as UIConfig } from "../uiConfig.context-RFvaQYzD.js";
|
|
2
|
+
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "../import-BE0r63d8.js";
|
|
3
3
|
import { t as FieldController } from "../form.binding-DLM7NA2s.js";
|
|
4
|
-
import { t as getStaticInputFocusTarget } from "../useStaticInputHandoff-
|
|
5
|
-
import { t as Select } from "../Select-
|
|
4
|
+
import { t as getStaticInputFocusTarget } from "../useStaticInputHandoff-BAaDW_0z.js";
|
|
5
|
+
import { t as Select } from "../Select-DriJMMTw.js";
|
|
6
6
|
import { n as getQueryItems, r as getSelectionIdsToResolve, t as useQueryAutocomplete } from "../useQueryAutocomplete-CraXvRm_.js";
|
|
7
7
|
import { memo, useCallback, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as RadioGroup } from "../RadioGroup-
|
|
1
|
+
import { t as RadioGroup } from "../RadioGroup-D8Kh59ew.js";
|
|
2
2
|
export { RadioGroup };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react-aria/CollectionBuilder";import"react-aria/Collection";import"react-aria/I18nProvider";import"react-aria/VisuallyHidden";import"react-stately/private/form/useFormValidationState";import"react-stately/Color";import"react-aria/useFilter";import"react-aria/useDrop";import"react-aria/SSRProvider";import"react-stately/useVirtualizerState";import"react-stately/useTokenFieldState";import"react-stately/useToastState";import"react-aria/useDrag";import{RouterProvider as e}from"react-aria/private/utils/openLink";import"react-aria/Pressable";import"react-aria/Focusable";import"react-stately/useListData";import"react-stately/useTreeData";import"react-stately/useAsyncList";export{e as RouterProvider};
|
|
1
|
+
import"react-aria/CollectionBuilder";import"react-aria/Collection";import"react-aria/I18nProvider";import"react-aria/VisuallyHidden";import"react-stately/private/form/useFormValidationState";import"react-stately/Color";import"react-aria/useFilter";import"react-aria/useDrop";import"react-aria/SSRProvider";import"react-stately/useVirtualizerState";import"react-stately/useTokenFieldState";import"react-stately/useToastState";import"react-aria/useDrag";import{RouterProvider as e}from"react-aria/private/utils/openLink";import"react-aria/Pressable";import"react-aria/Focusable";import"react-aria/useFocusVisible";import"react-stately/useListData";import"react-stately/useTreeData";import"react-stately/useAsyncList";export{e as RouterProvider};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Select } from "../Select-
|
|
1
|
+
import { t as Select } from "../Select-DriJMMTw.js";
|
|
2
2
|
export { Select };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Slider } from "../Slider-
|
|
1
|
+
import { t as Slider } from "../Slider-CPAPCE_l.js";
|
|
2
2
|
export { Slider };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as DropdownMenu } from "../DropdownMenu-
|
|
2
|
-
import { t as ChevronDown } from "../chevron-down-
|
|
1
|
+
import { t as DropdownMenu } from "../DropdownMenu-tuf1W-IL.js";
|
|
2
|
+
import { t as ChevronDown } from "../chevron-down-B4Pr8bD3.js";
|
|
3
3
|
import { t as clsx } from "../clsx-CnD0nOiA.js";
|
|
4
|
-
import { t as Button } from "../Button-
|
|
4
|
+
import { t as Button } from "../Button-CcZBqoQp.js";
|
|
5
5
|
import { IconButton } from "./icon-button.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react-aria/CollectionBuilder";import"react-aria/Collection";import"react-aria/I18nProvider";import"react-aria/VisuallyHidden";import"react-stately/private/form/useFormValidationState";import"react-stately/Color";import"react-aria/useFilter";import"react-aria/useDrop";import{SSRProvider as e}from"react-aria/SSRProvider";import"react-stately/useVirtualizerState";import"react-stately/useTokenFieldState";import"react-stately/useToastState";import"react-aria/useDrag";import"react-aria/private/utils/openLink";import"react-aria/Pressable";import"react-aria/Focusable";import"react-stately/useListData";import"react-stately/useTreeData";import"react-stately/useAsyncList";export{e as SSRProvider};
|
|
1
|
+
import"react-aria/CollectionBuilder";import"react-aria/Collection";import"react-aria/I18nProvider";import"react-aria/VisuallyHidden";import"react-stately/private/form/useFormValidationState";import"react-stately/Color";import"react-aria/useFilter";import"react-aria/useDrop";import{SSRProvider as e}from"react-aria/SSRProvider";import"react-stately/useVirtualizerState";import"react-stately/useTokenFieldState";import"react-stately/useToastState";import"react-aria/useDrag";import"react-aria/private/utils/openLink";import"react-aria/Pressable";import"react-aria/Focusable";import"react-aria/useFocusVisible";import"react-stately/useListData";import"react-stately/useTreeData";import"react-stately/useAsyncList";export{e as SSRProvider};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Stepper } from "../Stepper-
|
|
1
|
+
import { t as Stepper } from "../Stepper-BbO9TlOM.js";
|
|
2
2
|
export { Stepper };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react-aria/mergeProps";import{mergeRefs as
|
|
1
|
+
import{mergeProps as e}from"react-aria/mergeProps";import{mergeRefs as t}from"react-aria/mergeRefs";import n,{cloneElement as r,createContext as i,forwardRef as a,isValidElement as o,useContext as s,useMemo as c,useRef as l}from"react";import{useLayoutEffect as u}from"react-aria/private/utils/useLayoutEffect";import{useObjectRef as d}from"react-aria/useObjectRef";import{createBranchComponent as f,createLeafComponent as p}from"react-aria/CollectionBuilder";import{useCachedChildren as m}from"react-aria/private/collections/useCachedChildren";import{filterDOMProps as h}from"react-aria/filterDOMProps";import"react-aria/useHover";import"react-aria/Collection";import{CollectionNode as g,LoaderNode as _}from"react-aria/private/collections/BaseCollection";import"react-aria/private/collections/Hidden";import"react-aria/useId";import"react-aria/I18nProvider";import"react-aria/FocusScope";import{inertValue as v}from"react-aria/private/utils/inertValue";import{useLoadMoreSentinel as y}from"react-aria/private/utils/useLoadMoreSentinel";import"react-aria/usePopover";import"react-aria/Overlay";import"react-aria/private/interactions/focusSafely";import"react-aria/private/interactions/useFocusVisible";import"react-aria/private/utils/shadowdom/DOMFunctions";import"react-stately/useOverlayTriggerState";import"react-aria/private/utils/animation";import"react-aria/private/utils/useResizeObserver";import{useSubmenuTrigger as b}from"react-aria/useMenu";import{useSubmenuTriggerState as x}from"react-stately/useMenuTriggerState";import"react-aria/private/interactions/PressResponder";import"react-stately/private/selection/SelectionManager";import"react-stately/useTreeState";import"react-stately/useMultipleSelectionState";import"react-aria/useDialog";import"react-aria/useOverlayTrigger";function S({values:e,children:t}){for(let[r,i]of e)t=n.createElement(r.Provider,{value:i},t);return t}function C(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:l}=e;return c(()=>{let e,c,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,c=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:c||o?{...o,...c}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,s):void 0}},[t,n,r,i,a,o,s,l])}function w(e,r,i){let{render:a,...o}=r,s=l(null),d=c(()=>t(i,s),[i,s]);u(()=>{},[e,a]);let f={...o,ref:d};return a?a(f,void 0):n.createElement(e,f)}const T={},E=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=T[t];return n||(n=a(w.bind(null,t)),T[t]=n),n}}),D={CollectionRoot({collection:e,renderDropIndicator:t}){return O(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return O(e,t,n)}};function O(e,t,r){return m({items:t?e.getChildren(t.key):e,dependencies:[r],children(t){if(t.type===`content`)return n.createElement(n.Fragment,null);let i=t.render(t);return!r||t.type!==`item`?i:n.createElement(n.Fragment,null,r({type:`item`,key:t.key,dropPosition:`before`}),i,k(e,t,r))}})}function k(e,t,n){let i=t.key,a=e.getKeyAfter(i),s=a==null?null:e.getItem(a);for(;s!=null&&s.type!==`item`;)a=e.getKeyAfter(s.key),s=a==null?null:e.getItem(a);let c=t.nextKey==null?null:e.getItem(t.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let i=t;for(;i?.type===`item`&&(!s||i.parentKey!==s.parentKey&&s.level<i.level);){let t=n({type:`item`,key:i.key,dropPosition:`after`});o(t)&&l.push(r(t,{key:`${i.key}-after`})),i=i.parentKey==null?null:e.getItem(i.parentKey)}}return l}const A=i(D),j=i(null),M=i(null),N=i(null),P=i(null),F=i(null);var I=class extends g{static{this.type=`submenutrigger`}filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};const L=f(I,(e,t,r)=>{let{CollectionBranch:i}=s(A),a=s(N),o=s(P),c=x({triggerKey:r.key},o),u=l(null),f=d(t),{parentMenuRef:p,shouldUseVirtualFocus:m}=s(F),{submenuTriggerProps:h,submenuProps:g,popoverProps:_}=b({parentMenuRef:p,submenuRef:u,delay:e.delay,shouldUseVirtualFocus:m},c,f);return n.createElement(S,{values:[[R,{...h,onAction:void 0,ref:f}],[M,{ref:u,...g}],[z,c],[j,{trigger:`SubmenuTrigger`,triggerRef:f,placement:`end top`,"aria-labelledby":g[`aria-labelledby`],..._}]]},n.createElement(i,{collection:a.collection,parent:r}),e.children[1])},e=>e.children[0]),R=i(null);p(_,function(t,r,i){let a=s(N),{isLoading:o,onLoadMore:u,scrollOffset:d,...f}=t,p=l(null),m=c(()=>({onLoadMore:u,collection:a?.collection,sentinelRef:p,scrollOffset:d}),[u,d,a?.collection]);y(m,p);let g=C({...f,id:void 0,children:i.rendered,defaultClassName:`react-aria-MenuLoadingIndicator`,values:void 0});return n.createElement(n.Fragment,null,n.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:v(!0)},n.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:p,style:{position:`absolute`,height:1,width:1}})),o&&g.children&&n.createElement(n.Fragment,null,n.createElement(E.div,{...e(h(t,{global:!0}),{tabIndex:-1}),...g,role:`menuitem`,ref:r},g.children)))});const z=i(null);export{L as SubmenuTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeProps as e}from"react-aria/mergeProps";import{mergeRefs as t}from"react-aria/mergeRefs";import n,{createContext as r,forwardRef as i,useContext as a,useMemo as o,useRef as s}from"react";import{useLayoutEffect as c}from"react-aria/private/utils/useLayoutEffect";import{useObjectRef as l}from"react-aria/useObjectRef";import{filterDOMProps as u}from"react-aria/filterDOMProps";import{useFocusRing as d}from"react-aria/useFocusRing";import{useHover as f}from"react-aria/useHover";import{VisuallyHidden as p}from"react-aria/VisuallyHidden";import{useToggleState as m}from"react-stately/useToggleState";import{useSwitch as h}from"react-aria/useSwitch";const g=Symbol(`default`);function _({values:e,children:t}){for(let[r,i]of e)t=n.createElement(r.Provider,{value:i},t);return t}function v(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:s,values:c,render:l}=e;return o(()=>{let e,o,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,o=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:o||s?{...s,...o}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,s,c,l])}function y(e,t){let n=a(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||g;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function b(n,r,i){let{ref:a,...s}=y(i,n.slot)||{},c=l(o(()=>t(r,a),[r,a])),u=e(s,n);return`style`in s&&s.style&&`style`in n&&n.style&&(u.style=typeof s.style==`function`||typeof n.style==`function`?e=>{let t=typeof s.style==`function`?s.style(e):s.style,r={...e.defaultStyle,...t},i=typeof n.style==`function`?n.style({...e,defaultStyle:r}):n.style;return{...r,...i}}:{...s.style,...n.style}),[u,c]}function x(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}function S(e,r,i){let{render:a,...l}=r,u=s(null),d=o(()=>t(i,u),[i,u]);c(()=>{},[e,a]);let f={...l,ref:d};return a?a(f,void 0):n.createElement(e,f)}const C={},w=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=C[t];return n||(n=i(S.bind(null,t)),C[t]=n),n}}),T=r(null),E=r(null),D=i(function(e,r){let{inputRef:i=null,...a}=e;[e,r]=b(a,r,T);let
|
|
1
|
+
import{mergeProps as e}from"react-aria/mergeProps";import{mergeRefs as t}from"react-aria/mergeRefs";import n,{createContext as r,forwardRef as i,useContext as a,useMemo as o,useRef as s}from"react";import{useLayoutEffect as c}from"react-aria/private/utils/useLayoutEffect";import{useObjectRef as l}from"react-aria/useObjectRef";import{filterDOMProps as u}from"react-aria/filterDOMProps";import{useFocusRing as d}from"react-aria/useFocusRing";import{useHover as f}from"react-aria/useHover";import{VisuallyHidden as p}from"react-aria/VisuallyHidden";import{useToggleState as m}from"react-stately/useToggleState";import{useSwitch as h}from"react-aria/useSwitch";const g=Symbol(`default`);function _({values:e,children:t}){for(let[r,i]of e)t=n.createElement(r.Provider,{value:i},t);return t}function v(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:s,values:c,render:l}=e;return o(()=>{let e,o,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,o=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:o||s?{...s,...o}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,s,c,l])}function y(e,t){let n=a(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||g;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function b(n,r,i){let{ref:a,...s}=y(i,n.slot)||{},c=l(o(()=>t(r,a),[r,a])),u=e(s,n);return`style`in s&&s.style&&`style`in n&&n.style&&(u.style=typeof s.style==`function`||typeof n.style==`function`?e=>{let t=typeof s.style==`function`?s.style(e):s.style,r={...e.defaultStyle,...t},i=typeof n.style==`function`?n.style({...e,defaultStyle:r}):n.style;return{...r,...i}}:{...s.style,...n.style}),[u,c]}function x(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}function S(e,r,i){let{render:a,...l}=r,u=s(null),d=o(()=>t(i,u),[i,u]);c(()=>{},[e,a]);let f={...l,ref:d};return a?a(f,void 0):n.createElement(e,f)}const C={},w=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=C[t];return n||(n=i(S.bind(null,t)),C[t]=n),n}}),T=r(null),E=r(null),D=i(function(e,r){let{inputRef:i=null,...a}=e;[e,r]=b(a,r,T);let s=l(o(()=>t(i,e.inputRef===void 0?null:e.inputRef),[i,e.inputRef])),c=m(e),u=h({...x(e),children:typeof e.children==`function`||e.children},c,s);return n.createElement(_,{values:[[E,c],[O,{...u,inputRef:s,defaultClassName:`react-aria-Switch`}]]},n.createElement(k,{...e,ref:r}))}),O=r(null),k=i(function(t,r){let{labelProps:i,inputProps:o,isSelected:s,isDisabled:c,isReadOnly:l,isPressed:m,isInvalid:h,inputRef:g,defaultClassName:_,isRequired:y}=a(O),{isFocused:b,isFocusVisible:x,focusProps:S}=d(),C=c||l,T=a(E),{hoverProps:D,isHovered:k}=f({...t,isDisabled:C}),A=v({...t,defaultClassName:_,values:{isSelected:s,isPressed:m,isHovered:k,isFocused:b,isFocusVisible:x,isDisabled:c,isReadOnly:l,isInvalid:h,isRequired:y||!1,state:T}}),j=u(t,{global:!0});return delete j.id,delete j.onClick,n.createElement(w.label,{...e(j,i,D,A),ref:r,slot:t.slot||void 0,"data-selected":s||void 0,"data-pressed":m||void 0,"data-hovered":k||void 0,"data-focused":b||void 0,"data-focus-visible":x||void 0,"data-disabled":c||void 0,"data-readonly":l||void 0,"data-invalid":h||void 0,"data-required":y||void 0},n.createElement(p,{elementType:`span`},n.createElement(`input`,{...e(o,S),ref:g})),A.children)});export{D as Switch};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Switch } from "../Switch-
|
|
1
|
+
import { t as Switch } from "../Switch-DkujkUqi.js";
|
|
2
2
|
export { Switch };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeProps as e}from"react-aria/mergeProps";import{mergeRefs as t}from"react-aria/mergeRefs";import n,{cloneElement as r,createContext as i,forwardRef as a,isValidElement as o,useContext as s,useEffect as c,useMemo as l,useRef as u,useState as d}from"react";import{useLayoutEffect as f}from"react-aria/private/utils/useLayoutEffect";import{useObjectRef as p}from"react-aria/useObjectRef";import"react-aria/useAutocomplete";import"react-stately/private/autocomplete/useAutocompleteState";import{CollectionBuilder as m,createLeafComponent as h}from"react-aria/CollectionBuilder";import{useCachedChildren as g}from"react-aria/private/collections/useCachedChildren";import{filterDOMProps as _}from"react-aria/filterDOMProps";import{useFocusRing as v}from"react-aria/useFocusRing";import"react-aria/useHover";import{Collection as y}from"react-aria/Collection";import{BaseCollection as b,CollectionNode as x,FilterableNode as S,LoaderNode as C}from"react-aria/private/collections/BaseCollection";import{useLocale as ee}from"react-aria/I18nProvider";import{useVisuallyHidden as w}from"react-aria/VisuallyHidden";import"react-dom";import{FocusScope as te}from"react-aria/FocusScope";import{inertValue as T}from"react-aria/private/utils/inertValue";import{ListKeyboardDelegate as ne}from"react-aria/ListKeyboardDelegate";import{useLoadMoreSentinel as E}from"react-aria/private/utils/useLoadMoreSentinel";import"react-aria/useLocalizedStringFormatter";import"react-aria/private/utils/useResizeObserver";import{useMultipleSelectionState as D}from"react-stately/useMultipleSelectionState";import"react-aria/private/utils/isScrollable";import{buildHeaderRows as O}from"react-stately/private/table/TableCollection";import{UNSTABLE_useFilteredTableState as re,useTableState as ie}from"react-stately/useTableState";import{useControlledState as ae}from"react-stately/useControlledState";import{useTable as oe}from"react-aria/useTable";const k=Symbol(`default`);function se({values:e,children:t}){for(let[r,i]of e)t=n.createElement(r.Provider,{value:i},t);return t}function A(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:c}=e;return l(()=>{let e,l,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,l=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:l||o?{...o,...l}:void 0,children:u??a,"data-rac":``,render:c?e=>c(e,s):void 0}},[t,n,r,i,a,o,s,c])}function j(e,t){let n=s(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||k;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function M(n,r,i){let{ref:a,...o}=j(i,n.slot)||{},s=p(l(()=>t(r,a),[r,a])),c=e(o,n);return`style`in o&&o.style&&`style`in n&&n.style&&(c.style=typeof o.style==`function`||typeof n.style==`function`?e=>{let t=typeof o.style==`function`?o.style(e):o.style,r={...e.defaultStyle,...t},i=typeof n.style==`function`?n.style({...e,defaultStyle:r}):n.style;return{...r,...i}}:{...o.style,...n.style}),[c,s]}function N(e,r,i){let{render:a,...o}=r,s=u(null),c=l(()=>t(i,s),[i,s]);f(()=>{},[e,a]);let d={...o,ref:c};return a?a(d,void 0):n.createElement(e,d)}const P={},F=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=P[t];return n||(n=a(N.bind(null,t)),P[t]=n),n}}),ce=i(null),le=i(null),I={CollectionRoot({collection:e,renderDropIndicator:t}){return L(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return L(e,t,n)}};function L(e,t,r){return g({items:t?e.getChildren(t.key):e,dependencies:[r],children(t){if(t.type===`content`)return n.createElement(n.Fragment,null);let i=t.render(t);return!r||t.type!==`item`?i:n.createElement(n.Fragment,null,r({type:`item`,key:t.key,dropPosition:`before`}),i,R(e,t,r))}})}function R(e,t,n){let i=t.key,a=e.getKeyAfter(i),s=a==null?null:e.getItem(a);for(;s!=null&&s.type!==`item`;)a=e.getKeyAfter(s.key),s=a==null?null:e.getItem(a);let c=t.nextKey==null?null:e.getItem(t.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let i=t;for(;i?.type===`item`&&(!s||i.parentKey!==s.parentKey&&s.level<i.level);){let t=n({type:`item`,key:i.key,dropPosition:`after`});o(t)&&l.push(r(t,{key:`${i.key}-after`})),i=i.parentKey==null?null:e.getItem(i.parentKey)}}return l}const z=i(I),B=i({}),ue=i(null);function de(e,t,n){let r=e.focusedKey,i=null;if(t?.isVirtualDragging?.()&&n?.target?.type===`item`&&(i=n.target.key,n.target.dropPosition===`after`)){let e=n.collection.getKeyAfter(i),t=null;if(e!=null){let r=n.collection.getItem(i)?.level??0;for(;e!=null;){let i=n.collection.getItem(e);if(!i)break;if(i.type!==`item`){e=n.collection.getKeyAfter(e);continue}if((i.level??0)<=r)break;t=e,e=n.collection.getKeyAfter(e)}}i=e??t??i}return l(()=>new Set([r,i].filter(e=>e!=null)),[r,i])}const V=i(null);function fe(e){let t=u({});return n.createElement(V.Provider,{value:t},e.children)}var pe=class{setup(e,t,n){this.delegate=e,this.state=t,this.direction=n}getDropTargetFromPoint(e,t,n){let r=this.delegate.getDropTargetFromPoint(e,t,n);return!r||r.type===`root`?r:this.resolveDropTarget(r,e,t,n)}resolveDropTarget(e,t,n,r){let i=this.pointerTracking,a=n-i.lastY,o=t-i.lastX,s=i.yDirection,c=i.xDirection;if(Math.abs(a)>5&&(s=a>0?`down`:`up`,i.yDirection=s,i.lastY=n),Math.abs(o)>10&&(c=o>0?`right`:`left`,i.xDirection=c,i.lastX=t),e.dropPosition===`before`){let t=this.state.collection.getKeyBefore(e.key);for(;t!=null;){let e=this.state.collection.getItem(t);if(e?.type===`item`)break;t=e?.parentKey??null}if(t!=null){let n={type:`item`,key:t,dropPosition:`after`};r(n)&&(e=n)}}let l=this.getPotentialTargets(e,r);if(l.length===0)return{type:`root`};let u;return l.length>1?u=this.selectTarget(l,e,t,n,s,c):(u=l[0],i.boundaryContext=null),u}getPotentialTargets(e,t){if(e.dropPosition===`on`)return[e];let n=e,r=this.state.collection,i=r.getItem(n.key);for(;i&&i?.type!==`item`&&i.nextKey!=null;)n.key=i.nextKey,i=r.getItem(i.nextKey);let a=[n];if(i&&i.hasChildNodes&&this.state.expandedKeys.has(i.key)&&r.getChildren&&n.dropPosition===`after`){let e=i.firstChildKey==null?null:r.getItem(i.firstChildKey);for(;e&&e.type!==`item`;)e=e.nextKey==null?null:r.getItem(e.nextKey);if(e?.type===`item`){let n={type:`item`,key:e.key,dropPosition:`before`};return t(n)?[n]:[]}}if(i?.nextKey!=null)return[e];let o=i?.parentKey,s=[];for(;o!=null;){let e=r.getItem(o),n=e?.nextKey==null?null:r.getItem(e.nextKey);if(!n||n.parentKey!==o){let e={type:`item`,key:o,dropPosition:`after`};if(t(e)&&s.push(e),n)break}o=e?.parentKey}if(s.length>0&&a.push(...s),a.length===1){let e=r.getKeyAfter(n.key),a=e==null?null:r.getItem(e);if(e!=null&&a&&i&&a.level!=null&&i.level!=null&&a.level>i.level){let n={type:`item`,key:e,dropPosition:`before`};if(t(n))return[n]}}return a.filter(t)}selectTarget(e,t,n,r,i,a){if(e.length<2)return e[0];let o=this.pointerTracking,s=this.state.collection.getItem(t.key)?.parentKey;if(s==null)return e[0];(!o.boundaryContext||o.boundaryContext.parentKey!==s)&&(o.boundaryContext={parentKey:s,preferredTargetIndex:o.yDirection===`up`?e.length-1:0,lastSwitchY:r,lastSwitchX:n});let c=o.boundaryContext,l=Math.abs(n-c.lastSwitchX);if(Math.abs(r-c.lastSwitchY)>5&&i){let t=c.preferredTargetIndex||0;i===`down`&&t===0?c.preferredTargetIndex=e.length-1:i===`up`&&t===e.length-1&&(c.preferredTargetIndex=0),o.xDirection=null}if(l>10&&a){let t=c.preferredTargetIndex||0;a===`left`?this.direction===`ltr`?t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n):t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):a===`right`&&(this.direction===`ltr`?t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n)),o.yDirection=null}return e[Math.max(0,Math.min(c.preferredTargetIndex||0,e.length-1))]}constructor(){this.delegate=null,this.state=null,this.direction=`ltr`,this.pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null}}},H=class extends b{withExpandedKeys(e){let t=this.clone();return t.expandedKeys=e,t.frozen=this.frozen,t.rows=Array.from(t.getRows()),t}addNode(e){super.addNode(e),this.columnsDirty||=e.type===`column`,e.type===`tableheader`&&(this.head=e)}getRows(){let e=[];for(let t of this)(t.type===`tablebody`||t.type===`tablefooter`)&&e.push(...this.getChildren(t.key));return e}get body(){for(let e of this)if(e.type===`tablebody`)return e;return new X(-2)}commit(e,t,n=!1){this.updateColumns(n),this.firstKey=e,this.lastKey=t,this.rows=[];for(let e of this.getRows()){let t=e.lastChildKey;if(t!=null){let e=this.getItem(t);for(;e&&e.type!==`cell`;)e=e.prevKey==null?null:this.getItem(e.prevKey);if(e){let t=(e.colIndex??e.index)+(e.colSpan??1);if(t!==this.columns.length&&!n)throw Error(`Cell count must match column count. Found ${t} cells and ${this.columns.length} columns.`)}}this.rows.push(e)}super.commit(e,t,n)}updateColumns(e){if(!this.columnsDirty)return;this.rowHeaderColumnKeys=new Set,this.columns=[];let t=new Map,n=e=>{e.type===`column`&&(t.set(e.key,e),e.hasChildNodes||(e.index=this.columns.length,this.columns.push(e),e.props.isRowHeader&&this.rowHeaderColumnKeys.add(e.key)));for(let t of this.getChildren(e.key))n(t)};for(let e of this.getChildren(this.head.key))n(e);if(this.headerRows=O(t,this.columns),this.columnsDirty=!1,this.rowHeaderColumnKeys.size===0&&this.columns.length>0&&!e)throw Error(`A table must have at least one Column with the isRowHeader prop set to true`)}get columnCount(){return this.columns.length}*[Symbol.iterator](){let e=this.firstKey;for(;e!=null;){let t=this.getItem(e);t&&(yield t),e=t?.nextKey??null}}getFirstKey(){for(let e of this)if(e.type===`tablebody`)return e.firstChildKey??null;return null}getLastKey(){let e=this.lastKey;if(e==null)return null;let t=this.getItem(e);for(;t?.lastChildKey!=null&&(t.type!==`item`||this.expandedKeys.has(t.key));)t=this.getItem(t.lastChildKey);return t?.key}getKeyAfter(e){let t=this.getItem(e);if(t?.type===`column`)return t.nextKey??null;if(!t)return null;if(t.type===`item`&&t.firstChildKey!=null&&this.expandedKeys.has(t.key)){let e=this.getItem(t.firstChildKey);for(;e;){if(e.type===`item`)return e.key;e=e.nextKey==null?null:this.getItem(e.nextKey)}}return super.getKeyAfter(e)}getKeyBefore(e){let t=this.getItem(e);if(t?.type===`column`)return t.prevKey??null;if(!t)return null;let n=null;if(t.prevKey!=null){for(t=this.getItem(t.prevKey);t&&(t.type!==`item`||this.expandedKeys.has(t.key))&&t.lastChildKey!=null;)t=this.getItem(t.lastChildKey);n=t?.key??null}return n??=t.parentKey,n!=null&&this.getItem(n)?.type===`tableheader`?null:n}getChildren(e){let t=this.getItem(e);if(!t){for(let t of this.headerRows)if(t.key===e)return t.childNodes}let n=this;return t?.type===`tablebody`||t?.type===`tablefooter`?{*[Symbol.iterator](){let e=t.firstChildKey,r=e==null?null:n.getItem(e);for(;r;){yield r;let e=n.getKeyAfter(r.key);if(r=e==null?null:n.getItem(e),r&&r.parentKey===t.parentKey)break}}}:{*[Symbol.iterator](){let t=n.getItem(e),r=t?.firstChildKey==null?null:n.getItem(t.firstChildKey);for(;r&&(yield r,r=r.nextKey==null?null:n.getItem(r.nextKey),t?.type!==`item`||r?.type===`cell`););}}}clone(){let e=super.clone();return e.headerRows=this.headerRows,e.columns=this.columns,e.rows=this.rows,e.rowHeaderColumnKeys=this.rowHeaderColumnKeys,e.head=this.head,e}getTextValue(e){let t=this.getItem(e);if(!t)return``;if(t.textValue)return t.textValue;let n=this.rowHeaderColumnKeys,r=[];for(let t of this.getChildren(e)){let e=this.columns[t.index];if(n.has(e.key)&&t.textValue&&r.push(t.textValue),r.length===n.size)break}return r.join(` `)}constructor(...e){super(...e),this.headerRows=[],this.columns=[],this.rows=[],this.rowHeaderColumnKeys=new Set,this.head=new Y(-1),this.columnsDirty=!0,this.expandedKeys=new Set}};const me=i(null),U=i(null),W=i(null),he=i(null),G=a(function(e,t){[e,t]=M(e,t,U);let r=D(e),{selectionBehavior:i,selectionMode:a,disallowEmptySelection:o}=r,s=!!e.dragAndDropHooks?.useDraggableCollectionState,c=l(()=>({selectionBehavior:a===`none`?null:i,selectionMode:a,disallowEmptySelection:o,allowsDragging:s}),[i,a,o,s]),u=n.createElement(J.Provider,{value:c},n.createElement(y,e));return n.createElement(m,{content:u,createCollection:()=>new H},i=>n.createElement(q,{props:e,forwardedRef:t,selectionState:r,collection:i}))});let ge=a(function(e,t){let{isVirtualized:r}=s(z);return r?n.createElement(F.div,{...e,ref:t}):n.createElement(F.table,{...e,ref:t})});const K={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function q({props:r,forwardedRef:i,selectionState:a,collection:o}){[r,i]=M(r,i,ce);let{shouldUseVirtualFocus:f,disallowTypeAhead:m,filter:h,...g}=r,y=s(me);i=p(l(()=>t(i,y?.tableRef),[i,y?.tableRef]));let[b,x]=ae(r.expandedKeys?new Set(r.expandedKeys):void 0,r.defaultExpandedKeys?new Set(r.defaultExpandedKeys):new Set,r.onExpandedChange);o=l(()=>o.withExpandedKeys(b),[o,b]);let S=ie({...g,collection:o,children:void 0,UNSAFE_selectionState:a,expandedKeys:b,onExpandedChange:x}),C=re(S,h),{isVirtualized:w,layoutDelegate:T,dropTargetDelegate:E,CollectionRoot:D}=s(z),{dragAndDropHooks:O}=r,{gridProps:k}=oe({...g,layoutDelegate:T,isVirtualized:w},C,i),j=C.selectionManager,N=!!O?.useDraggableCollectionState,P=!!O?.useDroppableCollectionState;u(N),u(P),c(()=>{},[N,P]);let F,I,L,R=!1,V=null,H=u(null),{direction:U}=ee(),[G]=d(()=>new pe);if(N&&O){F=O.useDraggableCollectionState({collection:C.collection,selectionManager:j,preview:O.renderDragPreview?H:void 0}),O.useDraggableCollection({},F,i);let e=O.DragPreview;V=O.renderDragPreview?n.createElement(e,{ref:H},O.renderDragPreview):null}if(P&&O){I=O.useDroppableCollectionState({collection:C.collection,selectionManager:j});let e=new ne({collection:C.collection,disabledKeys:j.disabledKeys,disabledBehavior:j.disabledBehavior,ref:i,layoutDelegate:T}),t=O.dropTargetDelegate||E||new O.ListDropTargetDelegate(o.rows,i);G.setup(t,S,U),L=O.useDroppableCollection({keyboardDelegate:e,dropTargetDelegate:G,onDropActivate:e=>{if(e.target.type===`item`){let t=e.target.key,n=S.collection.getItem(t),r=b.has(t);n&&n.hasChildNodes&&(!r||O?.isVirtualDragging?.())&&S.toggleKey(t)}},onKeyDown:e=>{let t=I?.target;if(t&&t.type===`item`&&t.dropPosition===`on`){let n=S.collection.getItem(t.key);(e.key===K.expand[U]&&n?.hasChildNodes&&!S.expandedKeys.has(t.key)||e.key===K.collapse[U]&&n?.hasChildNodes&&S.expandedKeys.has(t.key))&&S.toggleKey(t.key)}}},I,i),R=I.isDropTarget({type:`root`})}let{focusProps:q,isFocused:J,isFocusVisible:Y}=v(),X=A({...r,children:void 0,defaultClassName:`react-aria-Table`,values:{isDropTarget:R,isFocused:J,isFocusVisible:Y,state:C}}),Z=!!(N&&!F?.isDisabled),Q=X.style,$=null;y&&($=y.useTableColumnResizeState({tableWidth:y.tableWidth},C),w||(Q={...Q,tableLayout:`fixed`,width:`min-content`}));let ve=_(r,{global:!0});return n.createElement(se,{values:[[W,C],[he,$],[B,{dragAndDropHooks:O,dragState:F,dropState:I}],[ue,{render:_e}],[ce,null],[le,null]]},n.createElement(te,null,n.createElement(ge,{...e(ve,X,k,q,L?.collectionProps),style:Q,ref:i,slot:r.slot||void 0,onScroll:r.onScroll,"data-allows-dragging":Z||void 0,"data-drop-target":R||void 0,"data-focused":J||void 0,"data-focus-visible":Y||void 0},n.createElement(fe,null,n.createElement(D,{collection:C.collection,scrollRef:y?.scrollRef??i,persistedKeys:de(j,O,I)})))),V)}const J=i(null);var Y=class extends x{static{this.type=`tableheader`}};(class extends x{static{this.type=`column`}});var X=class extends S{static{this.type=`tablebody`}};(class extends S{static{this.type=`tablefooter`}}),class extends x{static{this.type=`item`}filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}};let Z=a(function(e,t){let{isVirtualized:r}=s(z);return r?n.createElement(F.div,{...e,ref:t}):n.createElement(F.tr,{...e,ref:t})});(class extends x{static{this.type=`cell`}});let Q=a(function(e,t){let{isVirtualized:r}=s(z);return r?n.createElement(F.div,{...e,ref:t}):n.createElement(F.td,{...e,ref:t})});function _e(e,t){t=p(t);let{dragAndDropHooks:r,dropState:i}=s(B),a=u(null),{dropIndicatorProps:o,isHidden:c,isDropTarget:l}=r.useDropIndicator(e,i,a);if(c)return null;let d=i&&e.target.type===`item`?(i.collection.getItem(e.target.key)?.level||0)+1:1;return n.createElement(be,{...e,dropIndicatorProps:o,isDropTarget:l,buttonRef:a,level:d,ref:t})}let $=a(function(e,t){let{isVirtualized:r}=s(z);return r?n.createElement(F.div,{...e,ref:t}):n.createElement(F.tr,{...e,ref:t})}),ve=a(function(e,t){let{isVirtualized:r}=s(z);return r?n.createElement(F.div,{...e,ref:t}):n.createElement(F.td,{...e,ref:t})});function ye(e,t){let{dropIndicatorProps:r,isDropTarget:i,buttonRef:a,level:o,...c}=e,l=s(W),{visuallyHiddenProps:u}=w(),d=A({...c,defaultClassName:`react-aria-DropIndicator`,defaultStyle:{"--table-row-level":o+1},values:{isDropTarget:i}});return n.createElement($,{..._(e,{global:!0}),...d,role:`row`,ref:t,"data-drop-target":i||void 0,"aria-level":o},n.createElement(ve,{role:`gridcell`,colSpan:l.collection.columnCount,style:{padding:0}},n.createElement(`div`,{...u,role:`button`,...r,ref:a}),d.children))}const be=a(ye);h(C,function(t,r,i){let a=s(W),{isVirtualized:o}=s(z),{isLoading:c,onLoadMore:d,scrollOffset:f,...p}=t,m=a.collection.columns.length,h=u(null),g=l(()=>({onLoadMore:d,collection:a?.collection,sentinelRef:h,scrollOffset:f}),[d,f,a?.collection]);E(g,h);let v=A({...p,id:void 0,children:i.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,defaultStyle:{"--table-row-level":i.level+1},values:void 0}),y={},b={},x={};return o?(b[`aria-colspan`]=m,x={display:`contents`}):b.colSpan=m,n.createElement(n.Fragment,null,n.createElement(Z,{style:{height:0},inert:T(!0)},n.createElement(Q,{style:{padding:0,border:0}},n.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:h,style:{position:`relative`,height:1,width:1}}))),c&&v.children&&n.createElement(Z,{...e(_(t,{global:!0}),y),...v,role:`row`,ref:r,"aria-level":i.level+1,"data-level":i.level+1},n.createElement(Q,{role:`rowheader`,...b,style:x},v.children)))});export{G as Table};
|
|
1
|
+
import{mergeProps as e}from"react-aria/mergeProps";import{mergeRefs as t}from"react-aria/mergeRefs";import n,{cloneElement as r,createContext as i,forwardRef as a,isValidElement as o,useContext as s,useEffect as c,useMemo as l,useRef as u,useState as d}from"react";import{useLayoutEffect as f}from"react-aria/private/utils/useLayoutEffect";import{useObjectRef as p}from"react-aria/useObjectRef";import"react-aria/useAutocomplete";import"react-stately/private/autocomplete/useAutocompleteState";import{CollectionBuilder as m,createLeafComponent as h}from"react-aria/CollectionBuilder";import{useCachedChildren as g}from"react-aria/private/collections/useCachedChildren";import{filterDOMProps as _}from"react-aria/filterDOMProps";import{useFocusRing as v}from"react-aria/useFocusRing";import"react-aria/useHover";import{Collection as y}from"react-aria/Collection";import{BaseCollection as b,CollectionNode as x,FilterableNode as S,LoaderNode as C}from"react-aria/private/collections/BaseCollection";import{useLocale as ee}from"react-aria/I18nProvider";import{useVisuallyHidden as w}from"react-aria/VisuallyHidden";import"react-dom";import{FocusScope as te}from"react-aria/FocusScope";import{inertValue as T}from"react-aria/private/utils/inertValue";import{ListKeyboardDelegate as ne}from"react-aria/ListKeyboardDelegate";import{useLoadMoreSentinel as E}from"react-aria/private/utils/useLoadMoreSentinel";import"react-aria/useLocalizedStringFormatter";import"react-aria/private/utils/useResizeObserver";import{useMultipleSelectionState as D}from"react-stately/useMultipleSelectionState";import"react-aria/private/utils/isScrollable";import{buildHeaderRows as O}from"react-stately/private/table/TableCollection";import{UNSTABLE_useFilteredTableState as re,useTableState as ie}from"react-stately/useTableState";import{useControlledState as ae}from"react-stately/useControlledState";import{useTable as oe}from"react-aria/useTable";const k=Symbol(`default`);function se({values:e,children:t}){for(let[r,i]of e)t=n.createElement(r.Provider,{value:i},t);return t}function A(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:c}=e;return l(()=>{let e,l,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,l=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:l||o?{...o,...l}:void 0,children:u??a,"data-rac":``,render:c?e=>c(e,s):void 0}},[t,n,r,i,a,o,s,c])}function j(e,t){let n=s(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||k;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function M(n,r,i){let{ref:a,...o}=j(i,n.slot)||{},s=p(l(()=>t(r,a),[r,a])),c=e(o,n);return`style`in o&&o.style&&`style`in n&&n.style&&(c.style=typeof o.style==`function`||typeof n.style==`function`?e=>{let t=typeof o.style==`function`?o.style(e):o.style,r={...e.defaultStyle,...t},i=typeof n.style==`function`?n.style({...e,defaultStyle:r}):n.style;return{...r,...i}}:{...o.style,...n.style}),[c,s]}function N(e,r,i){let{render:a,...o}=r,s=u(null),c=l(()=>t(i,s),[i,s]);f(()=>{},[e,a]);let d={...o,ref:c};return a?a(d,void 0):n.createElement(e,d)}const P={},F=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=P[t];return n||(n=a(N.bind(null,t)),P[t]=n),n}}),ce=i(null),le=i(null),I={CollectionRoot({collection:e,renderDropIndicator:t}){return L(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return L(e,t,n)}};function L(e,t,r){return g({items:t?e.getChildren(t.key):e,dependencies:[r],children(t){if(t.type===`content`)return n.createElement(n.Fragment,null);let i=t.render(t);return!r||t.type!==`item`?i:n.createElement(n.Fragment,null,r({type:`item`,key:t.key,dropPosition:`before`}),i,R(e,t,r))}})}function R(e,t,n){let i=t.key,a=e.getKeyAfter(i),s=a==null?null:e.getItem(a);for(;s!=null&&s.type!==`item`;)a=e.getKeyAfter(s.key),s=a==null?null:e.getItem(a);let c=t.nextKey==null?null:e.getItem(t.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let i=t;for(;i?.type===`item`&&(!s||i.parentKey!==s.parentKey&&s.level<i.level);){let t=n({type:`item`,key:i.key,dropPosition:`after`});o(t)&&l.push(r(t,{key:`${i.key}-after`})),i=i.parentKey==null?null:e.getItem(i.parentKey)}}return l}const z=i(I),B=i({}),ue=i(null);function de(e,t,n){let r=e.focusedKey,i=null;if(t?.isVirtualDragging?.()&&n?.target?.type===`item`&&(i=n.target.key,n.target.dropPosition===`after`)){let e=n.collection.getKeyAfter(i),t=null;if(e!=null){let r=n.collection.getItem(i)?.level??0;for(;e!=null;){let i=n.collection.getItem(e);if(!i)break;if(i.type!==`item`){e=n.collection.getKeyAfter(e);continue}if((i.level??0)<=r)break;t=e,e=n.collection.getKeyAfter(e)}}i=e??t??i}return l(()=>new Set([r,i].filter(e=>e!=null)),[r,i])}const V=i(null);function fe(e){let t=u({});return n.createElement(V.Provider,{value:t},e.children)}var pe=class{setup(e,t,n){this.delegate=e,this.state=t,this.direction=n}getDropTargetFromPoint(e,t,n){let r=this.delegate.getDropTargetFromPoint(e,t,n);return!r||r.type===`root`?r:this.resolveDropTarget(r,e,t,n)}resolveDropTarget(e,t,n,r){let i=this.pointerTracking,a=n-i.lastY,o=t-i.lastX,s=i.yDirection,c=i.xDirection;if(Math.abs(a)>5&&(s=a>0?`down`:`up`,i.yDirection=s,i.lastY=n),Math.abs(o)>10&&(c=o>0?`right`:`left`,i.xDirection=c,i.lastX=t),e.dropPosition===`before`){let t=this.state.collection.getKeyBefore(e.key);for(;t!=null;){let e=this.state.collection.getItem(t);if(e?.type===`item`)break;t=e?.parentKey??null}if(t!=null){let n={type:`item`,key:t,dropPosition:`after`};r(n)&&(e=n)}}let l=this.getPotentialTargets(e,r);if(l.length===0)return{type:`root`};let u;return l.length>1?u=this.selectTarget(l,e,t,n,s,c):(u=l[0],i.boundaryContext=null),u}getPotentialTargets(e,t){if(e.dropPosition===`on`)return[e];let n=e,r=this.state.collection,i=r.getItem(n.key);for(;i&&i?.type!==`item`&&i.nextKey!=null;)n.key=i.nextKey,i=r.getItem(i.nextKey);let a=[n];if(i&&i.hasChildNodes&&this.state.expandedKeys.has(i.key)&&r.getChildren&&n.dropPosition===`after`){let e=i.firstChildKey==null?null:r.getItem(i.firstChildKey);for(;e&&e.type!==`item`;)e=e.nextKey==null?null:r.getItem(e.nextKey);if(e?.type===`item`){let n={type:`item`,key:e.key,dropPosition:`before`};return t(n)?[n]:[]}}if(i?.nextKey!=null)return[e];let o=i?.parentKey,s=[];for(;o!=null;){let e=r.getItem(o),n=e?.nextKey==null?null:r.getItem(e.nextKey);if(!n||n.parentKey!==o){if(e?.type===`item`){let e={type:`item`,key:o,dropPosition:`after`};t(e)&&s.push(e)}if(n)break}o=e?.parentKey}if(s.length>0&&a.push(...s),a.length===1){let e=r.getKeyAfter(n.key),a=e==null?null:r.getItem(e);if(e!=null&&a&&i&&a.level!=null&&i.level!=null&&a.level>i.level){let n={type:`item`,key:e,dropPosition:`before`};if(t(n))return[n]}}return a.filter(t)}selectTarget(e,t,n,r,i,a){if(e.length<2)return e[0];let o=this.pointerTracking,s=this.state.collection.getItem(t.key)?.parentKey;if(s==null)return e[0];(!o.boundaryContext||o.boundaryContext.parentKey!==s)&&(o.boundaryContext={parentKey:s,preferredTargetIndex:o.yDirection===`up`?e.length-1:0,lastSwitchY:r,lastSwitchX:n});let c=o.boundaryContext,l=Math.abs(n-c.lastSwitchX);if(Math.abs(r-c.lastSwitchY)>5&&i){let t=c.preferredTargetIndex||0;i===`down`&&t===0?c.preferredTargetIndex=e.length-1:i===`up`&&t===e.length-1&&(c.preferredTargetIndex=0),o.xDirection=null}if(l>10&&a){let t=c.preferredTargetIndex||0;a===`left`?this.direction===`ltr`?t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n):t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):a===`right`&&(this.direction===`ltr`?t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n)),o.yDirection=null}return e[Math.max(0,Math.min(c.preferredTargetIndex||0,e.length-1))]}constructor(){this.delegate=null,this.state=null,this.direction=`ltr`,this.pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null}}},H=class extends b{withExpandedKeys(e){let t=this.clone();return t.expandedKeys=e,t.frozen=this.frozen,t.rows=Array.from(t.getRows()),t}addNode(e){super.addNode(e),this.columnsDirty||=e.type===`column`,e.type===`tableheader`&&(this.head=e)}getRows(){let e=[];for(let t of this)(t.type===`tablebody`||t.type===`tablefooter`)&&e.push(...this.getChildren(t.key));return e}get body(){for(let e of this)if(e.type===`tablebody`)return e;return new X(-2)}commit(e,t,n=!1){this.updateColumns(n),this.firstKey=e,this.lastKey=t,this.rows=[];for(let e of this.getRows()){let t=e.lastChildKey;if(t!=null){let e=this.getItem(t);for(;e&&e.type!==`cell`;)e=e.prevKey==null?null:this.getItem(e.prevKey);if(e){let t=(e.colIndex??e.index)+(e.colSpan??1);if(t!==this.columns.length&&!n)throw Error(`Cell count must match column count. Found ${t} cells and ${this.columns.length} columns.`)}}this.rows.push(e)}super.commit(e,t,n)}updateColumns(e){if(!this.columnsDirty)return;this.rowHeaderColumnKeys=new Set,this.columns=[];let t=new Map,n=e=>{e.type===`column`&&(t.set(e.key,e),e.hasChildNodes||(e.index=this.columns.length,this.columns.push(e),e.props.isRowHeader&&this.rowHeaderColumnKeys.add(e.key)));for(let t of this.getChildren(e.key))n(t)};for(let e of this.getChildren(this.head.key))n(e);if(this.headerRows=O(t,this.columns),this.columnsDirty=!1,this.rowHeaderColumnKeys.size===0&&this.columns.length>0&&!e)throw Error(`A table must have at least one Column with the isRowHeader prop set to true`)}get columnCount(){return this.columns.length}*[Symbol.iterator](){let e=this.firstKey;for(;e!=null;){let t=this.getItem(e);t&&(yield t),e=t?.nextKey??null}}getFirstKey(){for(let e of this)if(e.type===`tablebody`)return e.firstChildKey??null;return null}getLastKey(){let e=this.lastKey;if(e==null)return null;let t=this.getItem(e);for(;t?.lastChildKey!=null&&(t.type!==`item`||this.expandedKeys.has(t.key));)t=this.getItem(t.lastChildKey);return t?.key}getKeyAfter(e){let t=this.getItem(e);if(t?.type===`column`)return t.nextKey??null;if(!t)return null;if(t.type===`item`&&t.firstChildKey!=null&&this.expandedKeys.has(t.key)){let e=this.getItem(t.firstChildKey);for(;e;){if(e.type===`item`)return e.key;e=e.nextKey==null?null:this.getItem(e.nextKey)}}return super.getKeyAfter(e)}getKeyBefore(e){let t=this.getItem(e);if(t?.type===`column`)return t.prevKey??null;if(!t)return null;let n=null;if(t.prevKey!=null){for(t=this.getItem(t.prevKey);t&&(t.type!==`item`||this.expandedKeys.has(t.key))&&t.lastChildKey!=null;)t=this.getItem(t.lastChildKey);n=t?.key??null}return n??=t.parentKey,n!=null&&this.getItem(n)?.type===`tableheader`?null:n}getChildren(e){let t=this.getItem(e);if(!t){for(let t of this.headerRows)if(t.key===e)return t.childNodes}let n=this;return t?.type===`tablebody`||t?.type===`tablefooter`?{*[Symbol.iterator](){let e=t.firstChildKey,r=e==null?null:n.getItem(e);for(;r;){yield r;let e=n.getKeyAfter(r.key);if(r=e==null?null:n.getItem(e),r&&r.parentKey===t.parentKey)break}}}:{*[Symbol.iterator](){let t=n.getItem(e),r=t?.firstChildKey==null?null:n.getItem(t.firstChildKey);for(;r&&(yield r,r=r.nextKey==null?null:n.getItem(r.nextKey),t?.type!==`item`||r?.type===`cell`););}}}clone(){let e=super.clone();return e.headerRows=this.headerRows,e.columns=this.columns,e.rows=this.rows,e.rowHeaderColumnKeys=this.rowHeaderColumnKeys,e.head=this.head,e}getTextValue(e){let t=this.getItem(e);if(!t)return``;if(t.textValue)return t.textValue;let n=this.rowHeaderColumnKeys,r=[];for(let t of this.getChildren(e)){let e=this.columns[t.index];if(n.has(e.key)&&t.textValue&&r.push(t.textValue),r.length===n.size)break}return r.join(` `)}constructor(...e){super(...e),this.headerRows=[],this.columns=[],this.rows=[],this.rowHeaderColumnKeys=new Set,this.head=new Y(-1),this.columnsDirty=!0,this.expandedKeys=new Set}};const me=i(null),U=i(null),W=i(null),he=i(null),G=a(function(e,t){[e,t]=M(e,t,U);let r=D(e),{selectionBehavior:i,selectionMode:a,disallowEmptySelection:o}=r,s=!!e.dragAndDropHooks?.useDraggableCollectionState,c=l(()=>({selectionBehavior:a===`none`?null:i,selectionMode:a,disallowEmptySelection:o,allowsDragging:s}),[i,a,o,s]),u=n.createElement(J.Provider,{value:c},n.createElement(y,e));return n.createElement(m,{content:u,createCollection:()=>new H},i=>n.createElement(q,{props:e,forwardedRef:t,selectionState:r,collection:i}))});let ge=a(function(e,t){let{isVirtualized:r}=s(z);return r?n.createElement(F.div,{...e,ref:t}):n.createElement(F.table,{...e,ref:t})});const K={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function q({props:r,forwardedRef:i,selectionState:a,collection:o}){[r,i]=M(r,i,ce);let{shouldUseVirtualFocus:f,disallowTypeAhead:m,filter:h,...g}=r,y=s(me);i=p(l(()=>t(i,y?.tableRef),[i,y?.tableRef]));let[b,x]=ae(r.expandedKeys?new Set(r.expandedKeys):void 0,r.defaultExpandedKeys?new Set(r.defaultExpandedKeys):new Set,r.onExpandedChange);o=l(()=>o.withExpandedKeys(b),[o,b]);let S=ie({...g,collection:o,children:void 0,UNSAFE_selectionState:a,expandedKeys:b,onExpandedChange:x}),C=re(S,h),{isVirtualized:w,layoutDelegate:T,dropTargetDelegate:E,CollectionRoot:D}=s(z),{dragAndDropHooks:O}=r,{gridProps:k}=oe({...g,layoutDelegate:T,isVirtualized:w},C,i),j=C.selectionManager,N=!!O?.useDraggableCollectionState,P=!!O?.useDroppableCollectionState;u(N),u(P),c(()=>{},[N,P]);let F,I,L,R=!1,V=null,H=u(null),{direction:U}=ee(),[G]=d(()=>new pe);if(N&&O){F=O.useDraggableCollectionState({collection:C.collection,selectionManager:j,preview:O.renderDragPreview?H:void 0}),O.useDraggableCollection({},F,i);let e=O.DragPreview;V=O.renderDragPreview?n.createElement(e,{ref:H},O.renderDragPreview):null}if(P&&O){I=O.useDroppableCollectionState({collection:C.collection,selectionManager:j});let e=new ne({collection:C.collection,disabledKeys:j.disabledKeys,disabledBehavior:j.disabledBehavior,ref:i,layoutDelegate:T}),t=O.dropTargetDelegate||E||new O.ListDropTargetDelegate(o.rows,i);G.setup(t,S,U),L=O.useDroppableCollection({keyboardDelegate:e,dropTargetDelegate:G,onDropActivate:e=>{if(e.target.type===`item`){let t=e.target.key,n=S.collection.getItem(t),r=b.has(t);n&&n.hasChildNodes&&(!r||O?.isVirtualDragging?.())&&S.toggleKey(t)}},onKeyDown:e=>{let t=I?.target;if(t&&t.type===`item`&&t.dropPosition===`on`){let n=S.collection.getItem(t.key);(e.key===K.expand[U]&&n?.hasChildNodes&&!S.expandedKeys.has(t.key)||e.key===K.collapse[U]&&n?.hasChildNodes&&S.expandedKeys.has(t.key))&&S.toggleKey(t.key)}}},I,i),R=I.isDropTarget({type:`root`})}let{focusProps:q,isFocused:J,isFocusVisible:Y}=v(),X=A({...r,children:void 0,defaultClassName:`react-aria-Table`,values:{isDropTarget:R,isFocused:J,isFocusVisible:Y,state:C}}),Z=!(!N||F?.isDisabled),Q=X.style,$=null;y&&($=y.useTableColumnResizeState({tableWidth:y.tableWidth},C),w||(Q={...Q,tableLayout:`fixed`,width:`min-content`}));let ve=_(r,{global:!0});return n.createElement(se,{values:[[W,C],[he,$],[B,{dragAndDropHooks:O,dragState:F,dropState:I}],[ue,{render:_e}],[ce,null],[le,null]]},n.createElement(te,null,n.createElement(ge,{...e(ve,X,k,q,L?.collectionProps),style:Q,ref:i,slot:r.slot||void 0,onScroll:r.onScroll,"data-allows-dragging":Z||void 0,"data-drop-target":R||void 0,"data-focused":J||void 0,"data-focus-visible":Y||void 0},n.createElement(fe,null,n.createElement(D,{collection:C.collection,scrollRef:y?.scrollRef??i,persistedKeys:de(j,O,I)})))),V)}const J=i(null);var Y=class extends x{static{this.type=`tableheader`}};(class extends x{static{this.type=`column`}});var X=class extends S{static{this.type=`tablebody`}};(class extends S{static{this.type=`tablefooter`}}),class extends x{static{this.type=`item`}filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}};let Z=a(function(e,t){let{isVirtualized:r}=s(z);return r?n.createElement(F.div,{...e,ref:t}):n.createElement(F.tr,{...e,ref:t})});(class extends x{static{this.type=`cell`}});let Q=a(function(e,t){let{isVirtualized:r}=s(z);return r?n.createElement(F.div,{...e,ref:t}):n.createElement(F.td,{...e,ref:t})});function _e(e,t){t=p(t);let{dragAndDropHooks:r,dropState:i}=s(B),a=u(null),{dropIndicatorProps:o,isHidden:c,isDropTarget:l}=r.useDropIndicator(e,i,a);if(c)return null;let d=i&&e.target.type===`item`?(i.collection.getItem(e.target.key)?.level||0)+1:1;return n.createElement(be,{...e,dropIndicatorProps:o,isDropTarget:l,buttonRef:a,level:d,ref:t})}let $=a(function(e,t){let{isVirtualized:r}=s(z);return r?n.createElement(F.div,{...e,ref:t}):n.createElement(F.tr,{...e,ref:t})}),ve=a(function(e,t){let{isVirtualized:r}=s(z);return r?n.createElement(F.div,{...e,ref:t}):n.createElement(F.td,{...e,ref:t})});function ye(e,t){let{dropIndicatorProps:r,isDropTarget:i,buttonRef:a,level:o,...c}=e,l=s(W),{visuallyHiddenProps:u}=w(),d=A({...c,defaultClassName:`react-aria-DropIndicator`,defaultStyle:{"--table-row-level":o+1},values:{isDropTarget:i}});return n.createElement($,{..._(e,{global:!0}),...d,role:`row`,ref:t,"data-drop-target":i||void 0,"aria-level":o},n.createElement(ve,{role:`gridcell`,colSpan:l.collection.columnCount,style:{padding:0}},n.createElement(`div`,{...u,role:`button`,...r,ref:a}),d.children))}const be=a(ye);h(C,function(t,r,i){let a=s(W),{isVirtualized:o}=s(z),{isLoading:c,onLoadMore:d,scrollOffset:f,...p}=t,m=a.collection.columns.length,h=u(null),g=l(()=>({onLoadMore:d,collection:a?.collection,sentinelRef:h,scrollOffset:f}),[d,f,a?.collection]);E(g,h);let v=A({...p,id:void 0,children:i.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,defaultStyle:{"--table-row-level":i.level+1},values:void 0}),y={},b={},x={};return o?(b[`aria-colspan`]=m,x={display:`contents`}):b.colSpan=m,n.createElement(n.Fragment,null,n.createElement(Z,{style:{height:0},inert:T(!0)},n.createElement(Q,{style:{padding:0,border:0}},n.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:h,style:{position:`relative`,height:1,width:1}}))),c&&v.children&&n.createElement(Z,{...e(_(t,{global:!0}),y),...v,role:`row`,ref:r,"aria-level":i.level+1,"data-level":i.level+1},n.createElement(Q,{role:`rowheader`,...b,style:x},v.children)))});export{G as Table};
|
package/dist/components/tag.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Tag } from "../Tag-
|
|
1
|
+
import { t as Tag } from "../Tag-DNuHvt6J.js";
|
|
2
2
|
export { Tag };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeProps as e}from"react-aria/mergeProps";import{mergeRefs as t}from"react-aria/mergeRefs";import n,{createContext as r,forwardRef as i,useContext as a,useMemo as o,useRef as s}from"react";import{useLayoutEffect as c}from"react-aria/private/utils/useLayoutEffect";import{useObjectRef as l}from"react-aria/useObjectRef";const
|
|
1
|
+
import{mergeProps as e}from"react-aria/mergeProps";import{mergeRefs as t}from"react-aria/mergeRefs";import n,{createContext as r,forwardRef as i,useContext as a,useMemo as o,useRef as s}from"react";import{useLayoutEffect as c}from"react-aria/private/utils/useLayoutEffect";import{useObjectRef as l}from"react-aria/useObjectRef";import{createHideableComponent as u}from"react-aria/private/collections/Hidden";const d=Symbol(`default`);function f(e,t){let n=a(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||d;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function p(n,r,i){let{ref:a,...s}=f(i,n.slot)||{},c=l(o(()=>t(r,a),[r,a])),u=e(s,n);return`style`in s&&s.style&&`style`in n&&n.style&&(u.style=typeof s.style==`function`||typeof n.style==`function`?e=>{let t=typeof s.style==`function`?s.style(e):s.style,r={...e.defaultStyle,...t},i=typeof n.style==`function`?n.style({...e,defaultStyle:r}):n.style;return{...r,...i}}:{...s.style,...n.style}),[u,c]}function m(e,r,i){let{render:a,...l}=r,u=s(null),d=o(()=>t(i,u),[i,u]);c(()=>{},[e,a]);let f={...l,ref:d};return a?a(f,void 0):n.createElement(e,f)}const h={},g=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=h[t];return n||(n=i(m.bind(null,t)),h[t]=n),n}}),_=r({}),v=u(function(e,t){[e,t]=p(e,t,_);let{elementType:r=`span`,...i}=e,a=g[r];return n.createElement(a,{className:`react-aria-Text`,...i,ref:t})});export{v as Text};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TextArea } from "../TextArea-
|
|
1
|
+
import { t as TextArea } from "../TextArea-BypXXoLO.js";
|
|
2
2
|
export { TextArea };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TimePicker } from "../TimePicker-
|
|
1
|
+
import { t as TimePicker } from "../TimePicker-CmQyNLUp.js";
|
|
2
2
|
export { TimePicker };
|
package/dist/components/toast.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { r as Toast } from "../dist-
|
|
2
|
-
import { n as ToastProvider, t as ToastContainer } from "../ToastContainer-
|
|
1
|
+
import { r as Toast } from "../dist-C6GfeeEC.js";
|
|
2
|
+
import { n as ToastProvider, t as ToastContainer } from "../ToastContainer-8X5jGBe7.js";
|
|
3
3
|
export { Toast, ToastContainer, ToastProvider };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ToggleGroup } from "../ToggleGroup-
|
|
1
|
+
import { t as ToggleGroup } from "../ToggleGroup-DYn99n0Y.js";
|
|
2
2
|
export { ToggleGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Tooltip } from "../Tooltip-
|
|
1
|
+
import { t as Tooltip } from "../Tooltip-D94a1IQl.js";
|
|
2
2
|
export { Tooltip };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeProps as e}from"react-aria/mergeProps";import{mergeRefs as t}from"react-aria/mergeRefs";import n,{cloneElement as r,createContext as i,forwardRef as a,isValidElement as o,useCallback as s,useContext as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{useLayoutEffect as p}from"react-aria/private/utils/useLayoutEffect";import{useObjectRef as m}from"react-aria/useObjectRef";import{CollectionBuilder as h,createLeafComponent as g}from"react-aria/CollectionBuilder";import{useCachedChildren as _}from"react-aria/private/collections/useCachedChildren";import{filterDOMProps as v}from"react-aria/filterDOMProps";import{useFocusRing as y}from"react-aria/useFocusRing";import"react-aria/useHover";import{Collection as b}from"react-aria/Collection";import{BaseCollection as x,CollectionNode as S,LoaderNode as C}from"react-aria/private/collections/BaseCollection";import"react-aria/useId";import{useLocale as ee}from"react-aria/I18nProvider";import{useVisuallyHidden as w}from"react-aria/VisuallyHidden";import"react-dom";import{FocusScope as te}from"react-aria/FocusScope";import{inertValue as T}from"react-aria/private/utils/inertValue";import{ListKeyboardDelegate as ne}from"react-aria/ListKeyboardDelegate";import{useLoadMoreSentinel as E}from"react-aria/private/utils/useLoadMoreSentinel";import{useCollator as re}from"react-aria/useCollator";import{useTreeState as ie}from"react-stately/useTreeState";import"react-aria/useGridList";import{useControlledState as ae}from"react-stately/useControlledState";import{useTree as oe,useTreeItem as D}from"react-aria/useTree";const O=Symbol(`default`);function se({values:e,children:t}){for(let[r,i]of e)t=n.createElement(r.Provider,{value:i},t);return t}function k(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:c}=e;return u(()=>{let e,l,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,l=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:l||o?{...o,...l}:void 0,children:u??a,"data-rac":``,render:c?e=>c(e,s):void 0}},[t,n,r,i,a,o,s,c])}function A(e,t){let n=c(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||O;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function ce(n,r,i){let{ref:a,...o}=A(i,n.slot)||{},s=m(u(()=>t(r,a),[r,a])),c=e(o,n);return`style`in o&&o.style&&`style`in n&&n.style&&(c.style=typeof o.style==`function`||typeof n.style==`function`?e=>{let t=typeof o.style==`function`?o.style(e):o.style,r={...e.defaultStyle,...t},i=typeof n.style==`function`?n.style({...e,defaultStyle:r}):n.style;return{...r,...i}}:{...o.style,...n.style}),[c,s]}function j(e,r,i){let{render:a,...o}=r,s=d(null),c=u(()=>t(i,s),[i,s]);p(()=>{},[e,a]);let l={...o,ref:c};return a?a(l,void 0):n.createElement(e,l)}const M={},N=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=M[t];return n||(n=a(j.bind(null,t)),M[t]=n),n}}),P={CollectionRoot({collection:e,renderDropIndicator:t}){return F(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return F(e,t,n)}};function F(e,t,r){return _({items:t?e.getChildren(t.key):e,dependencies:[r],children(t){if(t.type===`content`)return n.createElement(n.Fragment,null);let i=t.render(t);return!r||t.type!==`item`?i:n.createElement(n.Fragment,null,r({type:`item`,key:t.key,dropPosition:`before`}),i,I(e,t,r))}})}function I(e,t,n){let i=t.key,a=e.getKeyAfter(i),s=a==null?null:e.getItem(a);for(;s!=null&&s.type!==`item`;)a=e.getKeyAfter(s.key),s=a==null?null:e.getItem(a);let c=t.nextKey==null?null:e.getItem(t.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let i=t;for(;i?.type===`item`&&(!s||i.parentKey!==s.parentKey&&s.level<i.level);){let t=n({type:`item`,key:i.key,dropPosition:`after`});o(t)&&l.push(r(t,{key:`${i.key}-after`})),i=i.parentKey==null?null:e.getItem(i.parentKey)}}return l}const L=i(P),R=i({}),z=i(null),B=a(function(e,t){let{render:r}=c(z);return n.createElement(n.Fragment,null,r(e,t))});function le(e,t){let r=e?.renderDropIndicator,i=e?.isVirtualDragging?.(),a=s(e=>{if(i||t?.isDropTarget(e))return r?r(e):n.createElement(B,{target:e})},[t?.target,i,r]);return e?.useDropIndicator?a:void 0}function ue(e,t,n){let r=e.focusedKey,i=null;if(t?.isVirtualDragging?.()&&n?.target?.type===`item`&&(i=n.target.key,n.target.dropPosition===`after`)){let e=n.collection.getKeyAfter(i),t=null;if(e!=null){let r=n.collection.getItem(i)?.level??0;for(;e!=null;){let i=n.collection.getItem(e);if(!i)break;if(i.type!==`item`){e=n.collection.getKeyAfter(e);continue}if((i.level??0)<=r)break;t=e,e=n.collection.getKeyAfter(e)}}i=e??t??i}return u(()=>new Set([r,i].filter(e=>e!=null)),[r,i])}const V=i(null);function de(e){let t=d({});return n.createElement(V.Provider,{value:t},e.children)}var fe=class{setup(e,t,n){this.delegate=e,this.state=t,this.direction=n}getDropTargetFromPoint(e,t,n){let r=this.delegate.getDropTargetFromPoint(e,t,n);return!r||r.type===`root`?r:this.resolveDropTarget(r,e,t,n)}resolveDropTarget(e,t,n,r){let i=this.pointerTracking,a=n-i.lastY,o=t-i.lastX,s=i.yDirection,c=i.xDirection;if(Math.abs(a)>5&&(s=a>0?`down`:`up`,i.yDirection=s,i.lastY=n),Math.abs(o)>10&&(c=o>0?`right`:`left`,i.xDirection=c,i.lastX=t),e.dropPosition===`before`){let t=this.state.collection.getKeyBefore(e.key);for(;t!=null;){let e=this.state.collection.getItem(t);if(e?.type===`item`)break;t=e?.parentKey??null}if(t!=null){let n={type:`item`,key:t,dropPosition:`after`};r(n)&&(e=n)}}let l=this.getPotentialTargets(e,r);if(l.length===0)return{type:`root`};let u;return l.length>1?u=this.selectTarget(l,e,t,n,s,c):(u=l[0],i.boundaryContext=null),u}getPotentialTargets(e,t){if(e.dropPosition===`on`)return[e];let n=e,r=this.state.collection,i=r.getItem(n.key);for(;i&&i?.type!==`item`&&i.nextKey!=null;)n.key=i.nextKey,i=r.getItem(i.nextKey);let a=[n];if(i&&i.hasChildNodes&&this.state.expandedKeys.has(i.key)&&r.getChildren&&n.dropPosition===`after`){let e=i.firstChildKey==null?null:r.getItem(i.firstChildKey);for(;e&&e.type!==`item`;)e=e.nextKey==null?null:r.getItem(e.nextKey);if(e?.type===`item`){let n={type:`item`,key:e.key,dropPosition:`before`};return t(n)?[n]:[]}}if(i?.nextKey!=null)return[e];let o=i?.parentKey,s=[];for(;o!=null;){let e=r.getItem(o),n=e?.nextKey==null?null:r.getItem(e.nextKey);if(!n||n.parentKey!==o){let e={type:`item`,key:o,dropPosition:`after`};if(t(e)&&s.push(e),n)break}o=e?.parentKey}if(s.length>0&&a.push(...s),a.length===1){let e=r.getKeyAfter(n.key),a=e==null?null:r.getItem(e);if(e!=null&&a&&i&&a.level!=null&&i.level!=null&&a.level>i.level){let n={type:`item`,key:e,dropPosition:`before`};if(t(n))return[n]}}return a.filter(t)}selectTarget(e,t,n,r,i,a){if(e.length<2)return e[0];let o=this.pointerTracking,s=this.state.collection.getItem(t.key)?.parentKey;if(s==null)return e[0];(!o.boundaryContext||o.boundaryContext.parentKey!==s)&&(o.boundaryContext={parentKey:s,preferredTargetIndex:o.yDirection===`up`?e.length-1:0,lastSwitchY:r,lastSwitchX:n});let c=o.boundaryContext,l=Math.abs(n-c.lastSwitchX);if(Math.abs(r-c.lastSwitchY)>5&&i){let t=c.preferredTargetIndex||0;i===`down`&&t===0?c.preferredTargetIndex=e.length-1:i===`up`&&t===e.length-1&&(c.preferredTargetIndex=0),o.xDirection=null}if(l>10&&a){let t=c.preferredTargetIndex||0;a===`left`?this.direction===`ltr`?t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n):t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):a===`right`&&(this.direction===`ltr`?t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n)),o.yDirection=null}return e[Math.max(0,Math.min(c.preferredTargetIndex||0,e.length-1))]}constructor(){this.delegate=null,this.state=null,this.direction=`ltr`,this.pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null}}},H=class e extends x{withExpandedKeys(t,n){let r=this.clone();return r.expandedKeys=n,e.cloneAncestorSections(n,t,r),e.cloneAncestorSections(t,n,r),r.frozen=this.frozen,r}static cloneAncestorSections(e,t,n){for(let r of e)if(!t.has(r)){let e=r;for(;e!=null;){let t=n.getItem(e);if(t?.type===`section`){n.keyMap.set(e,t.clone());break}e=t?.parentKey??null}}}*[Symbol.iterator](){let e=this.getFirstKey(),t=e==null?null:this.getItem(e);for(;t;)if(yield t,t.type===`section`)t=t.nextKey==null?null:this.getItem(t.nextKey);else{let e=this.getKeyAfter(t.key);t=e==null?null:this.getItem(e)}}getLastKey(){let e=this.lastKey;if(e==null)return null;let t=this.getItem(e);for(;t?.lastChildKey!=null&&(t.type!==`item`||this.expandedKeys.has(t.key));)t=this.getItem(t.lastChildKey);return t?.key}getKeyAfter(e){let t=this.getItem(e);if(!t)return null;if((this.expandedKeys.has(t.key)||t.type!==`item`)&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.getItem(t.parentKey);else return null}return null}getKeyBefore(e){let t=this.getItem(e);if(!t)return null;if(t.prevKey!=null){for(t=this.getItem(t.prevKey);t&&(t.type!==`item`||this.expandedKeys.has(t.key))&&t.lastChildKey!=null;)t=this.getItem(t.lastChildKey);return t?.key??null}return t.parentKey}getChildren(e){let t=this;return{*[Symbol.iterator](){let n=t.getItem(e),r=n?.firstChildKey==null?null:t.getItem(n.firstChildKey);if(n&&n.type===`section`&&r)for(;r&&r.key!==n.nextKey;){yield t.getItem(r.key);let e=t.getKeyAfter(r.key);r=e==null?null:t.getItem(e)}else for(;r;)yield r,r=r.nextKey==null?null:t.getItem(r.nextKey)}}}getTextValue(e){let t=this.getItem(e);return t?t.textValue:``}constructor(...e){super(...e),this.expandedKeys=new Set}};const U=i(null),W=i(null),G=a(function(e,t){return[e,t]=ce(e,t,U),n.createElement(h,{content:n.createElement(b,e),createCollection:()=>new H},r=>n.createElement(q,{props:e,collection:r,treeRef:t}))}),K={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function q({props:t,collection:r,treeRef:i}){let{dragAndDropHooks:a}=t,{direction:o}=ee(),s=re({usage:`search`,sensitivity:`base`}),u=!!a?.useDraggableCollectionState,p=!!a?.useDroppableCollectionState,m=d(u),h=d(p);l(()=>{m.current!==u&&console.warn(`Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.`),h.current!==p&&console.warn(`Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.`)},[u,p]);let{selectionMode:g=`none`,expandedKeys:_,defaultExpandedKeys:b,onExpandedChange:x,disabledBehavior:S=`all`}=t,{CollectionRoot:C,isVirtualized:w,layoutDelegate:T,dropTargetDelegate:E}=c(L),[D,O]=ae(_?new Set(_):void 0,b?new Set(b):new Set,x),[A,ce]=f(r),[j,M]=f(D),[P,F]=f(()=>r.withExpandedKeys(j,D));(!he(j,D)||r!==A)&&(F(r.withExpandedKeys(j,D)),ce(r),M(D));let I=ie({...t,selectionMode:g,expandedKeys:D,onExpandedChange:O,collection:P,children:void 0,disabledBehavior:S}),{gridProps:B}=oe({...t,isVirtualized:w,layoutDelegate:T},I,i),V,H,U,G=!1,q=null,J=d(null);if(u&&a){V=a.useDraggableCollectionState({collection:I.collection,selectionManager:I.selectionManager,preview:a.renderDragPreview?J:void 0}),a.useDraggableCollection({},V,i);let e=a.DragPreview;q=a.renderDragPreview?n.createElement(e,{ref:J},a.renderDragPreview):null}let[Y]=f(()=>new fe);if(p&&a){H=a.useDroppableCollectionState({collection:I.collection,selectionManager:I.selectionManager});let e=a.dropTargetDelegate||E||new a.ListDropTargetDelegate(I.collection,i,{direction:o});Y.setup(e,I,o);let t=new ne({collection:I.collection,collator:s,ref:i,disabledKeys:I.selectionManager.disabledKeys,disabledBehavior:I.selectionManager.disabledBehavior,direction:o,layoutDelegate:T});U=a.useDroppableCollection({keyboardDelegate:t,dropTargetDelegate:Y,onDropActivate:e=>{if(e.target.type===`item`){let t=e.target.key,n=I.collection.getItem(t),r=D.has(t);n&&n.hasChildNodes&&(!r||a?.isVirtualDragging?.())&&I.toggleKey(t)}},onKeyDown:e=>{let t=H?.target;if(t&&t.type===`item`&&t.dropPosition===`on`){let n=I.collection.getItem(t.key);(e.key===K.expand[o]&&n?.hasChildNodes&&!I.expandedKeys.has(t.key)||e.key===K.collapse[o]&&n?.hasChildNodes&&I.expandedKeys.has(t.key))&&I.toggleKey(t.key)}}},H,i),G=H.isDropTarget({type:`root`})}let X=!!(u&&!V?.isDisabled),{focusProps:ge,isFocused:Z,isFocusVisible:Q}=y(),$={isEmpty:I.collection.size===0,isFocused:Z,isFocusVisible:Q,isDropTarget:G,selectionMode:I.selectionManager.selectionMode,allowsDragging:!!X,state:I},_e=k({...t,children:void 0,defaultClassName:`react-aria-Tree`,values:$}),ve=null;if(I.collection.size===0&&t.renderEmptyState){let{isEmpty:e,...r}=$,i=t.renderEmptyState({...r});ve=n.createElement(`div`,{role:`row`,style:{display:`contents`},"aria-level":1},n.createElement(`div`,{role:`gridcell`,style:{display:`contents`}},i))}let ye=v(t,{global:!0});return n.createElement(n.Fragment,null,n.createElement(te,null,n.createElement(N.div,{...e(ye,_e,B,ge,U?.collectionProps),ref:i,slot:t.slot||void 0,"data-empty":I.collection.size===0||void 0,"data-focused":Z||void 0,"data-drop-target":G||void 0,"data-focus-visible":Q||void 0,"data-selection-mode":I.selectionManager.selectionMode===`none`?void 0:I.selectionManager.selectionMode,"data-allows-dragging":!!X||void 0},n.createElement(se,{values:[[W,I],[R,{dragAndDropHooks:a,dragState:V,dropState:H}],[z,{render:pe}]]},p&&n.createElement(me,null),n.createElement(de,null,n.createElement(C,{collection:I.collection,persistedKeys:ue(I.selectionManager,a,H),scrollRef:i,renderDropIndicator:le(a,H)}))),ve)),q)}(class extends S{static{this.type=`content`}}),class extends S{static{this.type=`item`}},g(C,function(t,r,i){let{isVirtualized:a}=c(L),o=c(W),{isLoading:s,onLoadMore:l,scrollOffset:f,...p}=t,h=d(null),g=u(()=>({onLoadMore:l,collection:o?.collection,sentinelRef:h,scrollOffset:f}),[l,f,o?.collection]);E(g,h),r=m(r);let{rowProps:_,gridCellProps:y}=D({node:i},o,r),b=_[`aria-level`]||1,x={role:`row`,"aria-level":_[`aria-level`]},S=k({...p,id:void 0,children:i.rendered,defaultClassName:`react-aria-TreeLoader`,values:{level:b}}),C={};return a&&(C={display:`contents`}),n.createElement(n.Fragment,null,n.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:T(!0)},n.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:h,style:{position:`absolute`,height:1,width:1}})),s&&S.children&&n.createElement(N.div,{ref:r,...e(v(t),x),...S,"data-level":b},n.createElement(`div`,{...y,style:C},S.children)))});function pe(e,t){t=m(t);let{dragAndDropHooks:r,dropState:i}=c(R),a=d(null),{dropIndicatorProps:o,isHidden:s,isDropTarget:l}=r.useDropIndicator(e,i,a);if(s)return null;let u=i&&e.target.type===`item`?(i.collection.getItem(e.target.key)?.level||0)+1:1;return n.createElement(Y,{...e,dropIndicatorProps:o,isDropTarget:l,ref:t,buttonRef:a,level:u})}function J(e,t){let{dropIndicatorProps:r,isDropTarget:i,buttonRef:a,level:o,...s}=e,{visuallyHiddenProps:c}=w(),l=k({...s,defaultClassName:`react-aria-DropIndicator`,defaultStyle:{position:`relative`,"--tree-item-level":o},values:{isDropTarget:i}});return n.createElement(N.div,{...l,role:`row`,"aria-level":o,ref:t,"data-drop-target":i||void 0},n.createElement(`div`,{role:`gridcell`},n.createElement(`div`,{...c,role:`button`,...r,ref:a}),l.children))}const Y=a(J);function me(){let{dragAndDropHooks:e,dropState:t}=c(R),r=d(null),{dropIndicatorProps:i}=e.useDropIndicator({target:{type:`root`}},t,r),a=t.isDropTarget({type:`root`}),{visuallyHiddenProps:o}=w();return!a&&i[`aria-hidden`]?null:n.createElement(`div`,{role:`row`,"aria-hidden":i[`aria-hidden`],style:{position:`absolute`}},n.createElement(`div`,{role:`gridcell`},n.createElement(`div`,{role:`button`,...o,...i,ref:r})))}function he(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}export{G as Tree};
|
|
1
|
+
import{mergeProps as e}from"react-aria/mergeProps";import{mergeRefs as t}from"react-aria/mergeRefs";import n,{cloneElement as r,createContext as i,forwardRef as a,isValidElement as o,useCallback as s,useContext as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{useLayoutEffect as p}from"react-aria/private/utils/useLayoutEffect";import{useObjectRef as m}from"react-aria/useObjectRef";import{CollectionBuilder as h,createLeafComponent as g}from"react-aria/CollectionBuilder";import{useCachedChildren as _}from"react-aria/private/collections/useCachedChildren";import{filterDOMProps as v}from"react-aria/filterDOMProps";import{useFocusRing as y}from"react-aria/useFocusRing";import"react-aria/useHover";import{Collection as b}from"react-aria/Collection";import{BaseCollection as x,CollectionNode as S,LoaderNode as C}from"react-aria/private/collections/BaseCollection";import"react-aria/useId";import{useLocale as ee}from"react-aria/I18nProvider";import{useVisuallyHidden as w}from"react-aria/VisuallyHidden";import"react-dom";import{FocusScope as te}from"react-aria/FocusScope";import{inertValue as T}from"react-aria/private/utils/inertValue";import{ListKeyboardDelegate as ne}from"react-aria/ListKeyboardDelegate";import{useLoadMoreSentinel as E}from"react-aria/private/utils/useLoadMoreSentinel";import{useCollator as re}from"react-aria/useCollator";import{useTreeState as ie}from"react-stately/useTreeState";import"react-aria/useGridList";import{useControlledState as ae}from"react-stately/useControlledState";import{useTree as oe,useTreeItem as D}from"react-aria/useTree";const O=Symbol(`default`);function se({values:e,children:t}){for(let[r,i]of e)t=n.createElement(r.Provider,{value:i},t);return t}function k(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:c}=e;return u(()=>{let e,l,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,l=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:l||o?{...o,...l}:void 0,children:u??a,"data-rac":``,render:c?e=>c(e,s):void 0}},[t,n,r,i,a,o,s,c])}function A(e,t){let n=c(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||O;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function ce(n,r,i){let{ref:a,...o}=A(i,n.slot)||{},s=m(u(()=>t(r,a),[r,a])),c=e(o,n);return`style`in o&&o.style&&`style`in n&&n.style&&(c.style=typeof o.style==`function`||typeof n.style==`function`?e=>{let t=typeof o.style==`function`?o.style(e):o.style,r={...e.defaultStyle,...t},i=typeof n.style==`function`?n.style({...e,defaultStyle:r}):n.style;return{...r,...i}}:{...o.style,...n.style}),[c,s]}function j(e,r,i){let{render:a,...o}=r,s=d(null),c=u(()=>t(i,s),[i,s]);p(()=>{},[e,a]);let l={...o,ref:c};return a?a(l,void 0):n.createElement(e,l)}const M={},N=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=M[t];return n||(n=a(j.bind(null,t)),M[t]=n),n}}),P={CollectionRoot({collection:e,renderDropIndicator:t}){return F(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return F(e,t,n)}};function F(e,t,r){return _({items:t?e.getChildren(t.key):e,dependencies:[r],children(t){if(t.type===`content`)return n.createElement(n.Fragment,null);let i=t.render(t);return!r||t.type!==`item`?i:n.createElement(n.Fragment,null,r({type:`item`,key:t.key,dropPosition:`before`}),i,I(e,t,r))}})}function I(e,t,n){let i=t.key,a=e.getKeyAfter(i),s=a==null?null:e.getItem(a);for(;s!=null&&s.type!==`item`;)a=e.getKeyAfter(s.key),s=a==null?null:e.getItem(a);let c=t.nextKey==null?null:e.getItem(t.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let i=t;for(;i?.type===`item`&&(!s||i.parentKey!==s.parentKey&&s.level<i.level);){let t=n({type:`item`,key:i.key,dropPosition:`after`});o(t)&&l.push(r(t,{key:`${i.key}-after`})),i=i.parentKey==null?null:e.getItem(i.parentKey)}}return l}const L=i(P),R=i({}),z=i(null),B=a(function(e,t){let{render:r}=c(z);return n.createElement(n.Fragment,null,r(e,t))});function le(e,t){let r=e?.renderDropIndicator,i=e?.isVirtualDragging?.(),a=s(e=>{if(i||t?.isDropTarget(e))return r?r(e):n.createElement(B,{target:e})},[t?.target,i,r]);return e?.useDropIndicator?a:void 0}function ue(e,t,n){let r=e.focusedKey,i=null;if(t?.isVirtualDragging?.()&&n?.target?.type===`item`&&(i=n.target.key,n.target.dropPosition===`after`)){let e=n.collection.getKeyAfter(i),t=null;if(e!=null){let r=n.collection.getItem(i)?.level??0;for(;e!=null;){let i=n.collection.getItem(e);if(!i)break;if(i.type!==`item`){e=n.collection.getKeyAfter(e);continue}if((i.level??0)<=r)break;t=e,e=n.collection.getKeyAfter(e)}}i=e??t??i}return u(()=>new Set([r,i].filter(e=>e!=null)),[r,i])}const V=i(null);function de(e){let t=d({});return n.createElement(V.Provider,{value:t},e.children)}var fe=class{setup(e,t,n){this.delegate=e,this.state=t,this.direction=n}getDropTargetFromPoint(e,t,n){let r=this.delegate.getDropTargetFromPoint(e,t,n);return!r||r.type===`root`?r:this.resolveDropTarget(r,e,t,n)}resolveDropTarget(e,t,n,r){let i=this.pointerTracking,a=n-i.lastY,o=t-i.lastX,s=i.yDirection,c=i.xDirection;if(Math.abs(a)>5&&(s=a>0?`down`:`up`,i.yDirection=s,i.lastY=n),Math.abs(o)>10&&(c=o>0?`right`:`left`,i.xDirection=c,i.lastX=t),e.dropPosition===`before`){let t=this.state.collection.getKeyBefore(e.key);for(;t!=null;){let e=this.state.collection.getItem(t);if(e?.type===`item`)break;t=e?.parentKey??null}if(t!=null){let n={type:`item`,key:t,dropPosition:`after`};r(n)&&(e=n)}}let l=this.getPotentialTargets(e,r);if(l.length===0)return{type:`root`};let u;return l.length>1?u=this.selectTarget(l,e,t,n,s,c):(u=l[0],i.boundaryContext=null),u}getPotentialTargets(e,t){if(e.dropPosition===`on`)return[e];let n=e,r=this.state.collection,i=r.getItem(n.key);for(;i&&i?.type!==`item`&&i.nextKey!=null;)n.key=i.nextKey,i=r.getItem(i.nextKey);let a=[n];if(i&&i.hasChildNodes&&this.state.expandedKeys.has(i.key)&&r.getChildren&&n.dropPosition===`after`){let e=i.firstChildKey==null?null:r.getItem(i.firstChildKey);for(;e&&e.type!==`item`;)e=e.nextKey==null?null:r.getItem(e.nextKey);if(e?.type===`item`){let n={type:`item`,key:e.key,dropPosition:`before`};return t(n)?[n]:[]}}if(i?.nextKey!=null)return[e];let o=i?.parentKey,s=[];for(;o!=null;){let e=r.getItem(o),n=e?.nextKey==null?null:r.getItem(e.nextKey);if(!n||n.parentKey!==o){if(e?.type===`item`){let e={type:`item`,key:o,dropPosition:`after`};t(e)&&s.push(e)}if(n)break}o=e?.parentKey}if(s.length>0&&a.push(...s),a.length===1){let e=r.getKeyAfter(n.key),a=e==null?null:r.getItem(e);if(e!=null&&a&&i&&a.level!=null&&i.level!=null&&a.level>i.level){let n={type:`item`,key:e,dropPosition:`before`};if(t(n))return[n]}}return a.filter(t)}selectTarget(e,t,n,r,i,a){if(e.length<2)return e[0];let o=this.pointerTracking,s=this.state.collection.getItem(t.key)?.parentKey;if(s==null)return e[0];(!o.boundaryContext||o.boundaryContext.parentKey!==s)&&(o.boundaryContext={parentKey:s,preferredTargetIndex:o.yDirection===`up`?e.length-1:0,lastSwitchY:r,lastSwitchX:n});let c=o.boundaryContext,l=Math.abs(n-c.lastSwitchX);if(Math.abs(r-c.lastSwitchY)>5&&i){let t=c.preferredTargetIndex||0;i===`down`&&t===0?c.preferredTargetIndex=e.length-1:i===`up`&&t===e.length-1&&(c.preferredTargetIndex=0),o.xDirection=null}if(l>10&&a){let t=c.preferredTargetIndex||0;a===`left`?this.direction===`ltr`?t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n):t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):a===`right`&&(this.direction===`ltr`?t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n)),o.yDirection=null}return e[Math.max(0,Math.min(c.preferredTargetIndex||0,e.length-1))]}constructor(){this.delegate=null,this.state=null,this.direction=`ltr`,this.pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null}}},H=class e extends x{withExpandedKeys(t,n){let r=this.clone();return r.expandedKeys=n,e.cloneAncestorSections(n,t,r),e.cloneAncestorSections(t,n,r),r.frozen=this.frozen,r}static cloneAncestorSections(e,t,n){for(let r of e)if(!t.has(r)){let e=r;for(;e!=null;){let t=n.getItem(e);if(t?.type===`section`){n.keyMap.set(e,t.clone());break}e=t?.parentKey??null}}}*[Symbol.iterator](){let e=this.getFirstKey(),t=e==null?null:this.getItem(e);for(;t;)if(yield t,t.type===`section`)t=t.nextKey==null?null:this.getItem(t.nextKey);else{let e=this.getKeyAfter(t.key);t=e==null?null:this.getItem(e)}}getLastKey(){let e=this.lastKey;if(e==null)return null;let t=this.getItem(e);for(;t?.lastChildKey!=null&&(t.type!==`item`||this.expandedKeys.has(t.key));)t=this.getItem(t.lastChildKey);return t?.key}getKeyAfter(e){let t=this.getItem(e);if(!t)return null;if((this.expandedKeys.has(t.key)||t.type!==`item`)&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.getItem(t.parentKey);else return null}return null}getKeyBefore(e){let t=this.getItem(e);if(!t)return null;if(t.prevKey!=null){for(t=this.getItem(t.prevKey);t&&(t.type!==`item`||this.expandedKeys.has(t.key))&&t.lastChildKey!=null;)t=this.getItem(t.lastChildKey);return t?.key??null}return t.parentKey}getChildren(e){let t=this;return{*[Symbol.iterator](){let n=t.getItem(e),r=n?.firstChildKey==null?null:t.getItem(n.firstChildKey);if(n&&n.type===`section`&&r)for(;r&&r.key!==n.nextKey;){yield t.getItem(r.key);let e=t.getKeyAfter(r.key);r=e==null?null:t.getItem(e)}else for(;r;)yield r,r=r.nextKey==null?null:t.getItem(r.nextKey)}}}getTextValue(e){let t=this.getItem(e);return t?t.textValue:``}constructor(...e){super(...e),this.expandedKeys=new Set}};const U=i(null),W=i(null),G=a(function(e,t){return[e,t]=ce(e,t,U),n.createElement(h,{content:n.createElement(b,e),createCollection:()=>new H},r=>n.createElement(q,{props:e,collection:r,treeRef:t}))}),K={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function q({props:t,collection:r,treeRef:i}){let{dragAndDropHooks:a}=t,{direction:o}=ee(),s=re({usage:`search`,sensitivity:`base`}),u=!!a?.useDraggableCollectionState,p=!!a?.useDroppableCollectionState,m=d(u),h=d(p);l(()=>{m.current!==u&&console.warn(`Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.`),h.current!==p&&console.warn(`Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.`)},[u,p]);let{selectionMode:g=`none`,expandedKeys:_,defaultExpandedKeys:b,onExpandedChange:x,disabledBehavior:S=`all`}=t,{CollectionRoot:C,isVirtualized:w,layoutDelegate:T,dropTargetDelegate:E}=c(L),[D,O]=ae(_?new Set(_):void 0,b?new Set(b):new Set,x),[A,ce]=f(r),[j,M]=f(D),[P,F]=f(()=>r.withExpandedKeys(j,D));(!he(j,D)||r!==A)&&(F(r.withExpandedKeys(j,D)),ce(r),M(D));let I=ie({...t,selectionMode:g,expandedKeys:D,onExpandedChange:O,collection:P,children:void 0,disabledBehavior:S}),{gridProps:B}=oe({...t,isVirtualized:w,layoutDelegate:T},I,i),V,H,U,G=!1,q=null,J=d(null);if(u&&a){V=a.useDraggableCollectionState({collection:I.collection,selectionManager:I.selectionManager,preview:a.renderDragPreview?J:void 0}),a.useDraggableCollection({},V,i);let e=a.DragPreview;q=a.renderDragPreview?n.createElement(e,{ref:J},a.renderDragPreview):null}let[Y]=f(()=>new fe);if(p&&a){H=a.useDroppableCollectionState({collection:I.collection,selectionManager:I.selectionManager});let e=a.dropTargetDelegate||E||new a.ListDropTargetDelegate(I.collection,i,{direction:o});Y.setup(e,I,o);let t=new ne({collection:I.collection,collator:s,ref:i,disabledKeys:I.selectionManager.disabledKeys,disabledBehavior:I.selectionManager.disabledBehavior,direction:o,layoutDelegate:T});U=a.useDroppableCollection({keyboardDelegate:t,dropTargetDelegate:Y,onDropActivate:e=>{if(e.target.type===`item`){let t=e.target.key,n=I.collection.getItem(t),r=D.has(t);n&&n.hasChildNodes&&(!r||a?.isVirtualDragging?.())&&I.toggleKey(t)}},onKeyDown:e=>{let t=H?.target;if(t&&t.type===`item`&&t.dropPosition===`on`){let n=I.collection.getItem(t.key);(e.key===K.expand[o]&&n?.hasChildNodes&&!I.expandedKeys.has(t.key)||e.key===K.collapse[o]&&n?.hasChildNodes&&I.expandedKeys.has(t.key))&&I.toggleKey(t.key)}}},H,i),G=H.isDropTarget({type:`root`})}let X=!(!u||V?.isDisabled),{focusProps:ge,isFocused:Z,isFocusVisible:Q}=y(),$={isEmpty:I.collection.size===0,isFocused:Z,isFocusVisible:Q,isDropTarget:G,selectionMode:I.selectionManager.selectionMode,allowsDragging:!!X,state:I},_e=k({...t,children:void 0,defaultClassName:`react-aria-Tree`,values:$}),ve=null;if(I.collection.size===0&&t.renderEmptyState){let{isEmpty:e,...r}=$,i=t.renderEmptyState({...r});ve=n.createElement(`div`,{role:`row`,style:{display:`contents`},"aria-level":1},n.createElement(`div`,{role:`gridcell`,style:{display:`contents`}},i))}let ye=v(t,{global:!0});return n.createElement(n.Fragment,null,n.createElement(te,null,n.createElement(N.div,{...e(ye,_e,B,ge,U?.collectionProps),ref:i,slot:t.slot||void 0,"data-empty":I.collection.size===0||void 0,"data-focused":Z||void 0,"data-drop-target":G||void 0,"data-focus-visible":Q||void 0,"data-selection-mode":I.selectionManager.selectionMode===`none`?void 0:I.selectionManager.selectionMode,"data-allows-dragging":!!X||void 0},n.createElement(se,{values:[[W,I],[R,{dragAndDropHooks:a,dragState:V,dropState:H}],[z,{render:pe}]]},p&&n.createElement(me,null),n.createElement(de,null,n.createElement(C,{collection:I.collection,persistedKeys:ue(I.selectionManager,a,H),scrollRef:i,renderDropIndicator:le(a,H)}))),ve)),q)}(class extends S{static{this.type=`content`}}),class extends S{static{this.type=`item`}},g(C,function(t,r,i){let{isVirtualized:a}=c(L),o=c(W),{isLoading:s,onLoadMore:l,scrollOffset:f,...p}=t,h=d(null),g=u(()=>({onLoadMore:l,collection:o?.collection,sentinelRef:h,scrollOffset:f}),[l,f,o?.collection]);E(g,h),r=m(r);let{rowProps:_,gridCellProps:y}=D({node:i},o,r),b=_[`aria-level`]||1,x={role:`row`,"aria-level":_[`aria-level`]},S=k({...p,id:void 0,children:i.rendered,defaultClassName:`react-aria-TreeLoader`,values:{level:b}}),C={};return a&&(C={display:`contents`}),n.createElement(n.Fragment,null,n.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:T(!0)},n.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:h,style:{position:`absolute`,height:1,width:1}})),s&&S.children&&n.createElement(N.div,{ref:r,...e(v(t),x),...S,"data-level":b},n.createElement(`div`,{...y,style:C},S.children)))});function pe(e,t){t=m(t);let{dragAndDropHooks:r,dropState:i}=c(R),a=d(null),{dropIndicatorProps:o,isHidden:s,isDropTarget:l}=r.useDropIndicator(e,i,a);if(s)return null;let u=i&&e.target.type===`item`?(i.collection.getItem(e.target.key)?.level||0)+1:1;return n.createElement(Y,{...e,dropIndicatorProps:o,isDropTarget:l,ref:t,buttonRef:a,level:u})}function J(e,t){let{dropIndicatorProps:r,isDropTarget:i,buttonRef:a,level:o,...s}=e,{visuallyHiddenProps:c}=w(),l=k({...s,defaultClassName:`react-aria-DropIndicator`,defaultStyle:{position:`relative`,"--tree-item-level":o},values:{isDropTarget:i}});return n.createElement(N.div,{...l,role:`row`,"aria-level":o,ref:t,"data-drop-target":i||void 0},n.createElement(`div`,{role:`gridcell`},n.createElement(`div`,{...c,role:`button`,...r,ref:a}),l.children))}const Y=a(J);function me(){let{dragAndDropHooks:e,dropState:t}=c(R),r=d(null),{dropIndicatorProps:i}=e.useDropIndicator({target:{type:`root`}},t,r),a=t.isDropTarget({type:`root`}),{visuallyHiddenProps:o}=w();return!a&&i[`aria-hidden`]?null:n.createElement(`div`,{role:`row`,"aria-hidden":i[`aria-hidden`],style:{position:`absolute`}},n.createElement(`div`,{role:`gridcell`},n.createElement(`div`,{role:`button`,...o,...i,ref:r})))}function he(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}export{G as Tree};
|
|
@@ -5,7 +5,7 @@ let nextToastId = 0;
|
|
|
5
5
|
const enqueueToast = (color, params, options) => {
|
|
6
6
|
const id = `povio-toast-${++nextToastId}`;
|
|
7
7
|
activateToastRenderer();
|
|
8
|
-
import("../toast.runtime-
|
|
8
|
+
import("../toast.runtime-QMYrNvoQ.js").then(({ showToast }) => showToast(id, color, params, options));
|
|
9
9
|
return id;
|
|
10
10
|
};
|
|
11
11
|
const useToast = () => {
|
|
@@ -22,7 +22,7 @@ const useToast = () => {
|
|
|
22
22
|
return enqueueToast("neutral", params_2, options_2);
|
|
23
23
|
}, []);
|
|
24
24
|
const closeToast = useCallback((id) => {
|
|
25
|
-
import("../toast.runtime-
|
|
25
|
+
import("../toast.runtime-QMYrNvoQ.js").then(({ dismissToast }) => dismissToast(id));
|
|
26
26
|
}, []);
|
|
27
27
|
return useMemo(() => ({
|
|
28
28
|
successToast,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react-aria/CollectionBuilder";import"react-aria/Collection";import"react-aria/I18nProvider";import{VisuallyHidden as e}from"react-aria/VisuallyHidden";import"react-stately/private/form/useFormValidationState";import"react-stately/Color";import"react-aria/useFilter";import"react-aria/useDrop";import"react-aria/SSRProvider";import"react-stately/useVirtualizerState";import"react-stately/useTokenFieldState";import"react-stately/useToastState";import"react-aria/useDrag";import"react-aria/private/utils/openLink";import"react-aria/Pressable";import"react-aria/Focusable";import"react-stately/useListData";import"react-stately/useTreeData";import"react-stately/useAsyncList";export{e as VisuallyHidden};
|
|
1
|
+
import"react-aria/CollectionBuilder";import"react-aria/Collection";import"react-aria/I18nProvider";import{VisuallyHidden as e}from"react-aria/VisuallyHidden";import"react-stately/private/form/useFormValidationState";import"react-stately/Color";import"react-aria/useFilter";import"react-aria/useDrop";import"react-aria/SSRProvider";import"react-stately/useVirtualizerState";import"react-stately/useTokenFieldState";import"react-stately/useToastState";import"react-aria/useDrag";import"react-aria/private/utils/openLink";import"react-aria/Pressable";import"react-aria/Focusable";import"react-aria/useFocusVisible";import"react-stately/useListData";import"react-stately/useTreeData";import"react-stately/useAsyncList";export{e as VisuallyHidden};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Confirmation } from "../confirmation.context-
|
|
1
|
+
import { t as Confirmation } from "../confirmation.context-BuzgCfYl.js";
|
|
2
2
|
export { Confirmation };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as resources, t as ns } from "../i18n-
|
|
1
|
+
import { n as resources, t as ns } from "../i18n-CX1vFM9r.js";
|
|
2
2
|
export { ns, resources };
|
package/dist/config/resources.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as resources, t as ns } from "../i18n-
|
|
1
|
+
import { n as resources, t as ns } from "../i18n-CX2EjhJI.js";
|
|
2
2
|
export { ns, resources };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as DateRangeResolvedValue, i as DateRangeRelativeOption } from "../DateRangePicker-
|
|
2
|
-
import { t as UIConfig } from "../uiConfig.context-
|
|
1
|
+
import { a as DateRangeResolvedValue, i as DateRangeRelativeOption } from "../DateRangePicker-D1kjkFfS.js";
|
|
2
|
+
import { t as UIConfig } from "../uiConfig.context-CIoMqe1_.js";
|
|
3
3
|
export { type DateRangeRelativeOption, type DateRangeResolvedValue, UIConfig };
|
package/dist/config/ui-config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as UIConfig } from "../uiConfig.context-
|
|
1
|
+
import { t as UIConfig } from "../uiConfig.context-RFvaQYzD.js";
|
|
2
2
|
export { UIConfig };
|
package/dist/config/ui-router.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as UIRouter } from "../router.context-
|
|
1
|
+
import { t as UIRouter } from "../router.context-B0jTMtE0.js";
|
|
2
2
|
export { UIRouter };
|