twenty-ui 2.48.0 → 2.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +27 -2
- package/dist/Button-CU8BS-Yd.js +75 -0
- package/dist/Button-iVyxlrwO.cjs +1 -0
- package/dist/Dropdown-ChTVyesF.js +1018 -0
- package/dist/Dropdown-DlItz8Gh.cjs +1 -0
- package/dist/Heading-CHvEXL6n.cjs +1 -0
- package/dist/{Heading-pXllCJCO.js → Heading-Nj5BlPqB.js} +3 -3
- package/dist/{ListItem-CHTR-GLd.cjs → ListItem-C6Xl00m1.cjs} +1 -1
- package/dist/{ListItem-CjnrSbka.js → ListItem-C84ANa76.js} +2 -2
- package/dist/{OverflowingTextWithTooltip-Z2daM0_x.cjs → OverflowingTextWithTooltip-BQmpPObX.cjs} +1 -1
- package/dist/{OverflowingTextWithTooltip-BmUROIah.js → OverflowingTextWithTooltip-BtB9cGdJ.js} +20 -21
- package/dist/ProgressBar-CzGs7cuE.cjs +1 -0
- package/dist/ProgressBar-D4tKQ7OA.js +84 -0
- package/dist/{Radio-DMI1B7o5.js → Radio-BwBZ4e8g.js} +29 -29
- package/dist/{Radio-xmHgGHQO.cjs → Radio-sIYxZnR_.cjs} +1 -1
- package/dist/ResizeHandle-B1MuHTNA.cjs +1 -0
- package/dist/{ResizeHandle-C1kQ3MYR.js → ResizeHandle-B30OYZxS.js} +56 -55
- package/dist/Shortcut-Bp9iDdQg.js +73 -0
- package/dist/Shortcut-N8TELGPI.cjs +1 -0
- package/dist/TabsTabContent-6rkARU9F.cjs +1 -0
- package/dist/TabsTabContent-DPkLTBi2.js +39 -0
- package/dist/Tooltip-6uS8_wdA.js +132 -0
- package/dist/Tooltip-DL3sfbuw.cjs +1 -0
- package/dist/components/__stories__/reading-direction/DirectionalLayoutExample.d.ts +3 -1
- package/dist/components/code-editor.cjs +1 -1
- package/dist/components/code-editor.mjs +52 -51
- package/dist/components/data-display.cjs +1 -1
- package/dist/components/data-display.mjs +6 -7
- package/dist/components/feedback/InlineBanner/InlineBanner.d.ts +2 -2
- package/dist/components/feedback/InlineBanner/internal/InlineBannerComponent.d.ts +1 -1
- package/dist/components/feedback/InlineBanner/types/InlineBannerProps.d.ts +1 -0
- package/dist/components/feedback.cjs +1 -1
- package/dist/components/feedback.mjs +1 -1
- package/dist/components/input/CountrySelect/CountrySelect.d.ts +5 -2
- package/dist/components/input/CountrySelect/__stories__/CountrySelectPartsExample.d.ts +11 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectComponent.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectContext.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectContextValue.d.ts +11 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectDropdown.d.ts +4 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectOptions.d.ts +2 -11
- package/dist/components/input/CountrySelect/internal/CountrySelectOptionsContent.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectRoot.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/CountrySelectTrigger.d.ts +2 -0
- package/dist/components/input/CountrySelect/internal/NO_COUNTRY_SELECTION_VALUE.d.ts +1 -0
- package/dist/components/input/CountrySelect/internal/PreparedCountryChoice.d.ts +5 -0
- package/dist/components/input/CountrySelect/internal/getCountrySelectionValue.d.ts +1 -0
- package/dist/components/input/CountrySelect/internal/useCountrySelectContextOrThrow.d.ts +1 -0
- package/dist/components/input/CountrySelect/types/CountryChoice.d.ts +1 -0
- package/dist/components/input/CountrySelect/types/CountrySelectOptionsProps.d.ts +10 -0
- package/dist/components/input/CountrySelect/types/CountrySelectOptionsState.d.ts +4 -0
- package/dist/components/input/CountrySelect/types/CountrySelectProps.d.ts +7 -13
- package/dist/components/input/CountrySelect/types/CountrySelectRootProps.d.ts +12 -0
- package/dist/components/input/CountrySelect/types/CountrySelectTriggerProps.d.ts +6 -0
- package/dist/components/input/CurrencyPicker/CurrencyPicker.d.ts +4 -3
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerChangingDefaultExample.d.ts +5 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledExample.d.ts +5 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledSearchExample.d.ts +5 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerExample.d.ts +3 -4
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerListLabelExample.d.ts +1 -0
- package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerRootStateExample.d.ts +1 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerContext.d.ts +11 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerOptions.d.ts +1 -1
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerRoot.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerShorthand.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/internal/CurrencyPickerTrigger.d.ts +1 -1
- package/dist/components/input/CurrencyPicker/internal/PreparedCurrencyPickerOption.d.ts +7 -0
- package/dist/components/input/CurrencyPicker/internal/getCurrencyPickerSearchText.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/internal/useCurrencyPickerContextOrThrow.d.ts +7 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerChangeEventDetails.d.ts +2 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerOption.d.ts +1 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerOptionsProps.d.ts +6 -5
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerProps.d.ts +10 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerRootProps.d.ts +17 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerState.d.ts +6 -0
- package/dist/components/input/CurrencyPicker/types/CurrencyPickerTriggerProps.d.ts +3 -2
- package/dist/components/input/IconButton/__stories__/IconButtonExample.d.ts +7 -0
- package/dist/components/input/PhoneCountryPicker/PhoneCountryPicker.d.ts +5 -3
- package/dist/components/input/PhoneCountryPicker/__stories__/PhoneCountryPickerExample.d.ts +7 -3
- package/dist/components/input/PhoneCountryPicker/__stories__/testDisabledPhoneCountryPicker.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryCallingCodeDirection.d.ts +3 -0
- package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryNullSelection.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountrySelection.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerContext.d.ts +9 -0
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerOptions.d.ts +1 -1
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerRoot.d.ts +2 -0
- package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerTrigger.d.ts +1 -1
- package/dist/components/input/PhoneCountryPicker/internal/PreparedPhoneCountryOption.d.ts +5 -0
- package/dist/components/input/PhoneCountryPicker/internal/getPhoneCountryOptionTooltipLabel.d.ts +2 -0
- package/dist/components/input/PhoneCountryPicker/internal/matchesPhoneCountrySearch.d.ts +6 -0
- package/dist/components/input/PhoneCountryPicker/internal/usePhoneCountryPickerContextOrThrow.d.ts +7 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryOption.d.ts +1 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerOptionsProps.d.ts +4 -5
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerProps.d.ts +10 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerRootProps.d.ts +12 -0
- package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerTriggerProps.d.ts +1 -3
- package/dist/components/input/SegmentedControl/types/SegmentedControlProps.d.ts +1 -1
- package/dist/components/input/index.d.ts +10 -0
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.mjs +13 -13
- package/dist/components/layout/OverflowingList/internal/measureItemWidths.d.ts +1 -2
- package/dist/components/layout/OverflowingList/internal/measureOverflowingListLayout.d.ts +1 -2
- package/dist/components/layout.cjs +1 -1
- package/dist/components/layout.mjs +1 -1
- package/dist/components/navigation/Dropdown/Dropdown.d.ts +3 -2
- package/dist/components/navigation/Dropdown/__stories__/DropdownIconGridExample.d.ts +3 -0
- package/dist/components/navigation/Dropdown/__stories__/DropdownSelectionGroupsExample.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +6 -1
- package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownOptionItemOwner.d.ts +7 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSearch.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownSearchEffect.d.ts +8 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionContext.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionContextValue.d.ts +9 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroup.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroupEffect.d.ts +11 -0
- package/dist/components/navigation/Dropdown/internal/createDropdownSelectionEventDetails.d.ts +5 -0
- package/dist/components/navigation/Dropdown/internal/dropdownItemActivation.d.ts +11 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownItemExplicitId.d.ts +2 -2
- package/dist/components/navigation/Dropdown/internal/getDropdownOptionItemRole.d.ts +9 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownSelectionGroupState.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/getTrailingFocusGuard.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/isDropdownOptionItemSelected.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/useDropdownSelections.d.ts +12 -0
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +7 -2
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemSelectEventDetails.d.ts +2 -0
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemState.d.ts +5 -0
- package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupChangeEventDetails.d.ts +7 -0
- package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupProps.d.ts +21 -0
- package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupState.d.ts +7 -0
- package/dist/components/navigation/index.d.ts +5 -11
- package/dist/components/navigation.cjs +1 -1
- package/dist/components/navigation.mjs +6 -11
- package/dist/components/settings.cjs +1 -1
- package/dist/components/settings.mjs +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +37 -43
- package/dist/data-display-C-eoJ5En.js +378 -0
- package/dist/data-display-CM1yXpnE.cjs +2 -0
- package/dist/data-display-CXw-mxeS.js +252 -0
- package/dist/data-display-DdES9XqZ.cjs +1 -0
- package/dist/doNotTranslate-BSVT8Xyd.js +4 -0
- package/dist/doNotTranslate-CHE7WmRS.cjs +1 -0
- package/dist/feedback-4HKPcMRs.js +666 -0
- package/dist/feedback-BSOWDBI0.js +38 -0
- package/dist/feedback-DBRXDPSP.cjs +1 -0
- package/dist/feedback-DspXawf9.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +625 -631
- package/dist/input-CWWp7cqL.cjs +1 -0
- package/dist/input-CvZ_uB_9.cjs +1 -0
- package/dist/input-Qn5_aFYU.js +785 -0
- package/dist/input-k5cMhFI_.js +428 -0
- package/dist/layout-DDqeMgFv.js +439 -0
- package/dist/layout-iSfGrMrH.cjs +1 -0
- package/dist/navigation-7Y6gHFlj.cjs +1 -0
- package/dist/navigation-BY8X2w04.js +132 -0
- package/dist/navigation-BcXCiLE1.js +86 -0
- package/dist/navigation-ByYN6NgX.cjs +1 -0
- package/dist/normalizeSearchText-DLmPiBUZ.js +19 -0
- package/dist/normalizeSearchText-Do0MELpQ.cjs +1 -0
- package/dist/preventDismissingClickActivation-BEBrL9aB.cjs +1 -0
- package/dist/preventDismissingClickActivation-BQFMKRey.js +29 -0
- package/dist/primitives/accessibility.cjs +1 -1
- package/dist/primitives/accessibility.mjs +1 -1
- package/dist/primitives/data-display/Avatar/constants/AvatarPropertiesBySize.d.ts +4 -0
- package/dist/primitives/data-display/Avatar/types/AvatarSize.d.ts +1 -1
- package/dist/primitives/data-display/Badge/types/BadgeColor.d.ts +1 -1
- package/dist/primitives/data-display/Chip/types/ChipVariant.d.ts +1 -1
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +7 -8
- package/dist/primitives/feedback/Banner/Banner.d.ts +1 -1
- package/dist/primitives/feedback/Banner/internal/BannerAction.d.ts +1 -1
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +2 -2
- package/dist/primitives/input/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/primitives/input/Autocomplete/internal/AutocompleteInput.d.ts +1 -1
- package/dist/primitives/input/Autocomplete/types/AutocompleteInputProps.d.ts +8 -1
- package/dist/primitives/input/Button/types/ButtonColor.d.ts +1 -1
- package/dist/primitives/input/Radio/__stories__/RadioCardContent.d.ts +8 -0
- package/dist/primitives/input/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/primitives/input/RadioGroup/types/RadioGroupProps.d.ts +3 -1
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +3 -3
- package/dist/primitives/layout/ResizeHandle/__stories__/ResizableNotesExample.d.ts +2 -0
- package/dist/primitives/layout.cjs +1 -1
- package/dist/primitives/layout.mjs +1 -1
- package/dist/primitives/navigation/Tabs/types/TabsSize.d.ts +1 -1
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +2 -2
- package/dist/primitives/surfaces/Card/Card.d.ts +1 -1
- package/dist/primitives/surfaces/Card/internal/CardRoot.d.ts +1 -1
- package/dist/primitives/surfaces/Card/types/CardRootProps.d.ts +0 -1
- package/dist/primitives/surfaces/Tooltip/Tooltip.d.ts +1 -0
- package/dist/primitives/surfaces/Tooltip/__stories__/findTooltip.d.ts +1 -0
- package/dist/primitives/surfaces/Tooltip/internal/TooltipBody.d.ts +2 -8
- package/dist/primitives/surfaces/Tooltip/types/TooltipBodyProps.d.ts +6 -0
- package/dist/primitives/surfaces/index.d.ts +1 -0
- package/dist/primitives/surfaces.cjs +1 -1
- package/dist/primitives/surfaces.mjs +2 -2
- package/dist/primitives/typography/Heading/types/HeadingProps.d.ts +1 -1
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +4 -4
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +46 -47
- package/dist/{settings-BAYsnlZJ.cjs → settings-DT5bEO6A.cjs} +1 -1
- package/dist/{settings-BjEZiHXE.js → settings-XGSJtobU.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/surfaces-q8voTXEJ.cjs +1 -0
- package/dist/{surfaces-BLsR5ka0.js → surfaces-vhSZBmbz.js} +77 -78
- package/dist/testing/GroupedCatalog.d.ts +14 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/utils/waitForStorybookFontsLoaded.d.ts +1 -0
- package/dist/testing.cjs +1 -1
- package/dist/testing.mjs +102 -62
- package/dist/{typography-fOTFr0jS.js → typography-BPdXzW2T.js} +2 -2
- package/dist/{typography-B5QEuPaL.cjs → typography-CWtuNruY.cjs} +1 -1
- package/dist/useIsMobile-Byp9AIq-.cjs +1 -0
- package/dist/useIsMobile-D1ImfQnE.js +38 -0
- package/dist/utilities/internal/doNotTranslate.d.ts +1 -0
- package/dist/utilities-BKCMZyqZ.js +53 -0
- package/dist/utilities-xZh8D2gd.cjs +1 -0
- package/dist/utilities.cjs +1 -1
- package/dist/utilities.mjs +11 -10
- package/package.json +3 -3
- package/dist/Avatar-CQhIEazb.cjs +0 -1
- package/dist/Avatar-D-QA0RE5.js +0 -72
- package/dist/Button-D5enZ0Qz.js +0 -72
- package/dist/Button-Dbi5P05r.cjs +0 -1
- package/dist/Dropdown-BKjAaZS0.cjs +0 -1
- package/dist/Dropdown-C2hXrjvD.js +0 -820
- package/dist/Heading-CTRYClCO.cjs +0 -1
- package/dist/ProgressBar-BvT1dyFo.js +0 -84
- package/dist/ProgressBar-DfFz0fFB.cjs +0 -1
- package/dist/ResizeHandle-DI4LHIQm.cjs +0 -1
- package/dist/Shortcut-BvWUZ3pb.js +0 -72
- package/dist/Shortcut-CgrdLv_L.cjs +0 -1
- package/dist/TabsTabContent-Co27Y2TU.cjs +0 -1
- package/dist/TabsTabContent-DVcObDp6.js +0 -39
- package/dist/TintedIconTile-4BGa8g8n.js +0 -40
- package/dist/TintedIconTile-CU2hCerq.cjs +0 -1
- package/dist/Tooltip-Bg9Uk01p.cjs +0 -1
- package/dist/Tooltip-cLCgtFBF.js +0 -124
- package/dist/components/navigation/MenuItem/MenuItem.d.ts +0 -2
- package/dist/components/navigation/MenuItem/parts/MenuItemIcon.d.ts +0 -9
- package/dist/components/navigation/MenuItem/parts/MenuItemIconBoxContainer.d.ts +0 -7
- package/dist/components/navigation/MenuItem/parts/MenuItemIconWithGripSwap.d.ts +0 -8
- package/dist/components/navigation/MenuItem/parts/MenuItemLeftContent.d.ts +0 -19
- package/dist/components/navigation/MenuItem/parts/StyledMenuItemBase.d.ts +0 -25
- package/dist/components/navigation/MenuItem/types/MenuItemDraggableGripMode.d.ts +0 -1
- package/dist/components/navigation/MenuItem/types/MenuItemProps.d.ts +0 -33
- package/dist/components/navigation/MenuItemAvatar/MenuItemAvatar.d.ts +0 -2
- package/dist/components/navigation/MenuItemAvatar/types/MenuItemAvatarProps.d.ts +0 -18
- package/dist/components/navigation/MenuItemDraggable/MenuItemDraggable.d.ts +0 -2
- package/dist/components/navigation/MenuItemDraggable/types/MenuItemDraggableProps.d.ts +0 -20
- package/dist/components/navigation/MenuItemSuggestion/MenuItemSuggestion.d.ts +0 -2
- package/dist/components/navigation/MenuItemSuggestion/types/MenuItemSuggestionProps.d.ts +0 -12
- package/dist/components/navigation/MenuPicker/MenuPicker.d.ts +0 -2
- package/dist/components/navigation/MenuPicker/types/MenuPickerProps.d.ts +0 -15
- package/dist/data-display-0QO_WDSs.js +0 -183
- package/dist/data-display-CPmTJAWJ.cjs +0 -1
- package/dist/data-display-DjhAHvj1.cjs +0 -2
- package/dist/data-display-KyZbLLy-.js +0 -344
- package/dist/feedback-CM6fatE8.js +0 -664
- package/dist/feedback-DA-AU5z5.js +0 -38
- package/dist/feedback-DNLERYY9.cjs +0 -1
- package/dist/feedback-ybO4n69s.cjs +0 -1
- package/dist/input-3D2lXywH.cjs +0 -1
- package/dist/input-CJDYNwoO.cjs +0 -1
- package/dist/input-DRpDiMRi.js +0 -421
- package/dist/input-TM3nUdu6.js +0 -554
- package/dist/layout-BszCDxAO.js +0 -441
- package/dist/layout-VaIq7Sjr.cjs +0 -1
- package/dist/navigation-B1SRvzKK.js +0 -403
- package/dist/navigation-CYAs2LnR.js +0 -131
- package/dist/navigation-CthkGHJ8.cjs +0 -1
- package/dist/navigation-DrOV5E67.cjs +0 -1
- package/dist/preventDismissingClickActivation-CzWqpjiX.js +0 -44
- package/dist/preventDismissingClickActivation-DZxTSLV3.cjs +0 -1
- package/dist/surfaces-0rL5DoHt.cjs +0 -1
- package/dist/useIsMobile-DxOPI2_E.cjs +0 -1
- package/dist/useIsMobile-nrufFzMb.js +0 -37
- package/dist/utilities-BeLfNQ0Q.cjs +0 -1
- package/dist/utilities-CEi9I09B.js +0 -52
- /package/dist/{handleClickableElementKeyDown-C8Uz61XJ.js → accessibility-C8Uz61XJ.js} +0 -0
- /package/dist/{handleClickableElementKeyDown-CByqtBhO.cjs → accessibility-CByqtBhO.cjs} +0 -0
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
import { t as f } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
+
import { t as Q } from "./doNotTranslate-BSVT8Xyd.js";
|
|
3
|
+
import { r as Fe, t as Ce } from "./OverflowingTextWithTooltip-BtB9cGdJ.js";
|
|
4
|
+
import { t as V } from "./Popover-CWeCV7X9.js";
|
|
5
|
+
import { t as Ie } from "./Heading-Nj5BlPqB.js";
|
|
6
|
+
import { useRender as Z } from "@base-ui/react/use-render";
|
|
7
|
+
import { isFunction as X, isNonEmptyString as Oe, isString as J, isUndefined as Le } from "@sniptt/guards";
|
|
8
|
+
import { clsx as D } from "clsx";
|
|
9
|
+
import { cloneElement as Ee, isValidElement as Ne, memo as le, useCallback as j, useId as Me, useLayoutEffect as Y, useRef as R, useState as $ } from "react";
|
|
10
|
+
import { Fragment as G, jsx as d, jsxs as W } from "react/jsx-runtime";
|
|
11
|
+
import { mergeProps as Se } from "@base-ui/react/merge-props";
|
|
12
|
+
import { useMergedRefs as H } from "@base-ui/utils/useMergedRefs";
|
|
13
|
+
import { useControlled as Te } from "@base-ui/utils/useControlled";
|
|
14
|
+
import { useStableCallback as U } from "@base-ui/utils/useStableCallback";
|
|
15
|
+
var De = "_container_1hm4x_1", xe = "_layer_1hm4x_9", Ae = "_visible_1hm4x_23", Re = "_hidden_1hm4x_28", A = {
|
|
16
|
+
container: De,
|
|
17
|
+
layer: xe,
|
|
18
|
+
visible: Ae,
|
|
19
|
+
hidden: Re
|
|
20
|
+
}, gt = ({ isActive: t, activeIcon: e, inactiveIcon: n, className: r, render: s, ref: a, ...c }) => Z({
|
|
21
|
+
defaultTagName: "span",
|
|
22
|
+
render: s,
|
|
23
|
+
ref: a,
|
|
24
|
+
props: {
|
|
25
|
+
...c,
|
|
26
|
+
className: D(A.container, r),
|
|
27
|
+
children: /* @__PURE__ */ W(G, { children: [/* @__PURE__ */ d("span", {
|
|
28
|
+
"aria-hidden": "true",
|
|
29
|
+
className: D(A.layer, t ? A.hidden : A.visible),
|
|
30
|
+
children: n
|
|
31
|
+
}), /* @__PURE__ */ d("span", {
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
className: D(A.layer, t ? A.visible : A.hidden),
|
|
34
|
+
children: e
|
|
35
|
+
})] })
|
|
36
|
+
}
|
|
37
|
+
}), We = "_root_eheyl_1", Ue = "_items_eheyl_11", ke = "_item_eheyl_11", ze = "_popupItem_eheyl_45", Ke = "_trigger_eheyl_49", Ve = "_popup_eheyl_45", K = {
|
|
38
|
+
root: We,
|
|
39
|
+
items: Ue,
|
|
40
|
+
item: ke,
|
|
41
|
+
popupItem: ze,
|
|
42
|
+
trigger: Ke,
|
|
43
|
+
popup: Ve
|
|
44
|
+
}, Be = ({ props: t, state: e, render: n }) => {
|
|
45
|
+
const r = Ne(n) ? n : void 0, s = H(t.ref, r?.props.ref);
|
|
46
|
+
if (X(n)) return n(t, e);
|
|
47
|
+
const a = {
|
|
48
|
+
...Se(t, r?.props),
|
|
49
|
+
children: t.children,
|
|
50
|
+
ref: s
|
|
51
|
+
};
|
|
52
|
+
return f(r) ? Ee(r, a) : /* @__PURE__ */ d("div", { ...a });
|
|
53
|
+
}, He = le(({ elementRef: t, isHidden: e, onFocusLost: n }) => (Y(() => {
|
|
54
|
+
const r = t.current, s = f(r) && r.contains(r.ownerDocument.activeElement);
|
|
55
|
+
e && s && n(r);
|
|
56
|
+
}, [
|
|
57
|
+
t,
|
|
58
|
+
e,
|
|
59
|
+
n
|
|
60
|
+
]), null)), ue = (t) => j((e) => {
|
|
61
|
+
if (f(e))
|
|
62
|
+
return () => {
|
|
63
|
+
const n = e.ownerDocument, r = e.contains(n.activeElement);
|
|
64
|
+
queueMicrotask(() => {
|
|
65
|
+
const s = n.activeElement === n.body;
|
|
66
|
+
r && !e.isConnected && s && t(e);
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
}, [t]), se = ({ children: t, index: e, isHidden: n, isLastVisible: r, isInPopup: s, onFocusLost: a }) => {
|
|
70
|
+
const c = R(null), i = U((o) => {
|
|
71
|
+
a({
|
|
72
|
+
index: e,
|
|
73
|
+
element: o,
|
|
74
|
+
isInPopup: s
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
return /* @__PURE__ */ W(G, { children: [/* @__PURE__ */ d("div", {
|
|
78
|
+
ref: H(c, ue(i)),
|
|
79
|
+
className: s ? K.popupItem : K.item,
|
|
80
|
+
"data-item-index": e,
|
|
81
|
+
"data-hidden": n || void 0,
|
|
82
|
+
"data-last-visible": r || void 0,
|
|
83
|
+
"aria-hidden": n || void 0,
|
|
84
|
+
inert: n,
|
|
85
|
+
children: t
|
|
86
|
+
}), /* @__PURE__ */ d(He, {
|
|
87
|
+
elementRef: c,
|
|
88
|
+
isHidden: n,
|
|
89
|
+
onFocusLost: i
|
|
90
|
+
})] });
|
|
91
|
+
}, ae = ({ itemWidths: t, availableWidth: e, gap: n, includePartialItem: r }) => {
|
|
92
|
+
let s = 0, a = 0;
|
|
93
|
+
for (const c of t) {
|
|
94
|
+
const i = s + c + (a > 0 ? n : 0);
|
|
95
|
+
if (a !== 0 && i > e) {
|
|
96
|
+
const o = s + n < e;
|
|
97
|
+
return r && o ? a + 1 : a;
|
|
98
|
+
}
|
|
99
|
+
s = i, a += 1;
|
|
100
|
+
}
|
|
101
|
+
return a;
|
|
102
|
+
}, $e = ({ items: t, itemElements: e }) => {
|
|
103
|
+
t.setAttribute("data-measuring", "");
|
|
104
|
+
const n = e.map((r) => r.clientWidth);
|
|
105
|
+
return t.removeAttribute("data-measuring"), n;
|
|
106
|
+
}, qe = ({ container: t, items: e, trigger: n, itemElements: r, itemCount: s, reserveCountSpace: a }) => {
|
|
107
|
+
const c = $e({
|
|
108
|
+
items: e,
|
|
109
|
+
itemElements: r
|
|
110
|
+
}), i = parseFloat(getComputedStyle(e).columnGap) || 0, o = t.clientWidth, u = s > ae({
|
|
111
|
+
itemWidths: c,
|
|
112
|
+
availableWidth: o,
|
|
113
|
+
gap: i,
|
|
114
|
+
includePartialItem: !1
|
|
115
|
+
}), _ = n?.offsetWidth ?? 0;
|
|
116
|
+
return {
|
|
117
|
+
visibleItemCount: ae({
|
|
118
|
+
itemWidths: c,
|
|
119
|
+
availableWidth: a && u ? Math.max(0, o - _ - i) : o,
|
|
120
|
+
gap: i,
|
|
121
|
+
includePartialItem: !0
|
|
122
|
+
}),
|
|
123
|
+
hasOverflow: u
|
|
124
|
+
};
|
|
125
|
+
}, je = 100, Ge = le(({ containerRef: t, itemsRef: e, triggerRef: n, itemCount: r, inlineItemCount: s, reserveCountSpace: a, isMeasurementEnabled: c, isOpen: i, onLayoutChange: o, onOverflowUnavailable: u }) => {
|
|
126
|
+
const _ = R(void 0), L = R(void 0), C = U(() => ({
|
|
127
|
+
itemCount: r,
|
|
128
|
+
inlineItemCount: s,
|
|
129
|
+
reserveCountSpace: a,
|
|
130
|
+
isOpen: i
|
|
131
|
+
})), F = U(o), M = U(u);
|
|
132
|
+
return Y(() => {
|
|
133
|
+
const y = t.current, I = e.current;
|
|
134
|
+
if (!c || !f(y) || !f(I)) {
|
|
135
|
+
L.current = void 0;
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const E = /* @__PURE__ */ new Set(), g = () => {
|
|
139
|
+
const b = Array.from(I.children), k = /* @__PURE__ */ new Set([y, ...b]);
|
|
140
|
+
f(n.current) && k.add(n.current);
|
|
141
|
+
for (const p of E) k.has(p) || (N?.unobserve(p), E.delete(p));
|
|
142
|
+
for (const p of k) E.has(p) || (N?.observe(p), E.add(p));
|
|
143
|
+
const T = C();
|
|
144
|
+
if (b.length !== T.inlineItemCount) return;
|
|
145
|
+
const l = qe({
|
|
146
|
+
container: y,
|
|
147
|
+
items: I,
|
|
148
|
+
trigger: n.current,
|
|
149
|
+
itemElements: b,
|
|
150
|
+
itemCount: T.itemCount,
|
|
151
|
+
reserveCountSpace: T.reserveCountSpace
|
|
152
|
+
}), h = L.current, v = f(h) && h.isOpen && !h.layout.hasOverflow, x = T.isOpen && !l.hasOverflow;
|
|
153
|
+
L.current = {
|
|
154
|
+
layout: l,
|
|
155
|
+
isOpen: T.isOpen
|
|
156
|
+
}, F(l), x && !v && M();
|
|
157
|
+
}, N = f(globalThis.ResizeObserver) ? new ResizeObserver(g) : void 0;
|
|
158
|
+
_.current = g, g();
|
|
159
|
+
const S = new MutationObserver(g);
|
|
160
|
+
if (S.observe(I, {
|
|
161
|
+
attributes: !0,
|
|
162
|
+
attributeFilter: [
|
|
163
|
+
"class",
|
|
164
|
+
"style",
|
|
165
|
+
"hidden"
|
|
166
|
+
],
|
|
167
|
+
characterData: !0,
|
|
168
|
+
childList: !0,
|
|
169
|
+
subtree: !0
|
|
170
|
+
}), S.observe(y, { childList: !0 }), !f(N)) {
|
|
171
|
+
const b = setInterval(g, je);
|
|
172
|
+
return window.addEventListener("resize", g), () => {
|
|
173
|
+
_.current = void 0, clearInterval(b), S.disconnect(), window.removeEventListener("resize", g);
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
return () => {
|
|
177
|
+
_.current = void 0, S.disconnect(), N.disconnect();
|
|
178
|
+
};
|
|
179
|
+
}, [
|
|
180
|
+
t,
|
|
181
|
+
e,
|
|
182
|
+
n,
|
|
183
|
+
c,
|
|
184
|
+
C,
|
|
185
|
+
F,
|
|
186
|
+
M
|
|
187
|
+
]), Y(() => {
|
|
188
|
+
_.current?.();
|
|
189
|
+
}, [
|
|
190
|
+
r,
|
|
191
|
+
s,
|
|
192
|
+
a,
|
|
193
|
+
i
|
|
194
|
+
]), null;
|
|
195
|
+
}), Je = ({ itemCount: t, inlineItemCount: e }) => {
|
|
196
|
+
const n = R(null), r = R(null), s = R(null), [a, c] = $({
|
|
197
|
+
visibleItemCount: e,
|
|
198
|
+
hasOverflow: t > e
|
|
199
|
+
});
|
|
200
|
+
return {
|
|
201
|
+
containerRef: n,
|
|
202
|
+
itemsRef: r,
|
|
203
|
+
triggerRef: s,
|
|
204
|
+
updateLayout: j((i) => {
|
|
205
|
+
c((o) => o.visibleItemCount !== i.visibleItemCount || o.hasOverflow !== i.hasOverflow ? i : o);
|
|
206
|
+
}, []),
|
|
207
|
+
...a
|
|
208
|
+
};
|
|
209
|
+
}, Qe = Q("button, a[href], input, select, textarea, [tabindex]"), ie = ({ items: t, popup: e, trigger: n, root: r, removedIndex: s, excludedItem: a }) => {
|
|
210
|
+
const c = [...Array.from(t?.children ?? []), ...Array.from(e?.children ?? [])].filter((i) => i !== a).sort((i, o) => Math.abs(Number(i.getAttribute("data-item-index")) - s) - Math.abs(Number(o.getAttribute("data-item-index")) - s) || Number(o.getAttribute("data-item-index")) - Number(i.getAttribute("data-item-index")));
|
|
211
|
+
for (const i of c)
|
|
212
|
+
if (!i.hasAttribute("inert")) {
|
|
213
|
+
for (const o of Array.from(i.querySelectorAll(Qe))) if (!o.matches(":disabled") && !f(o.closest("[inert]")) && (o.focus(), o.ownerDocument.activeElement === o))
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
n?.focus(), !(f(n) && n.ownerDocument.activeElement === n) && r?.focus();
|
|
217
|
+
}, Xe = ({ containerRef: t, itemsRef: e, triggerRef: n, popup: r, itemCount: s, canExpand: a, isPopupOpen: c, isOpen: i, isHovered: o, showOverflowCount: u, onFocusCapture: _, onBlurCapture: L }) => {
|
|
218
|
+
const [C, F] = $(!1), [M, y] = $(), I = u ?? M ?? (o || C || i), E = U(({ index: l, element: h, isInPopup: v }) => {
|
|
219
|
+
ie({
|
|
220
|
+
items: v && a ? null : e.current,
|
|
221
|
+
popup: v && c ? r : null,
|
|
222
|
+
trigger: n.current,
|
|
223
|
+
root: t.current,
|
|
224
|
+
removedIndex: l,
|
|
225
|
+
excludedItem: h
|
|
226
|
+
});
|
|
227
|
+
}), g = j(() => {
|
|
228
|
+
const l = t.current;
|
|
229
|
+
l?.focus(), F(l?.ownerDocument.activeElement === l), y(void 0);
|
|
230
|
+
}, [t]), N = U(() => {
|
|
231
|
+
if (c) return;
|
|
232
|
+
const l = t.current, h = l?.ownerDocument, v = h?.activeElement, x = f(v) && e.current?.contains(v) && !f(v.closest("[inert]")), p = f(v) && v !== h?.body && !l?.contains(v) && !r?.contains(v);
|
|
233
|
+
if (x || p) return;
|
|
234
|
+
if (!a) {
|
|
235
|
+
ie({
|
|
236
|
+
items: e.current,
|
|
237
|
+
popup: null,
|
|
238
|
+
trigger: null,
|
|
239
|
+
root: l,
|
|
240
|
+
removedIndex: s
|
|
241
|
+
});
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
const z = n.current;
|
|
245
|
+
if (f(z) && !z.matches(":disabled")) {
|
|
246
|
+
z.focus({ preventScroll: !0 });
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
l?.focus({ preventScroll: !0 });
|
|
250
|
+
}), S = j(() => (queueMicrotask(N), !1), [N]), b = ue(g);
|
|
251
|
+
return {
|
|
252
|
+
hasFocus: C,
|
|
253
|
+
isCountVisible: I,
|
|
254
|
+
restoreItemFocus: E,
|
|
255
|
+
schedulePopupFocusRestoration: S,
|
|
256
|
+
resetFocusWhenFocusedTriggerUnmounts: b,
|
|
257
|
+
handleFocusCapture: (l) => {
|
|
258
|
+
F(!0), e.current?.contains(l.target) && y((h) => h ?? I), _?.(l);
|
|
259
|
+
},
|
|
260
|
+
handleBlurCapture: (l) => {
|
|
261
|
+
F(l.currentTarget.contains(l.relatedTarget) || (r?.contains(l.relatedTarget) ?? !1)), e.current?.contains(l.relatedTarget) || y(void 0), L?.(l);
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
}, O = (t) => t.stopPropagation(), wt = ({ children: t, showOverflowCount: e, maxInlineCount: n, overflowLabel: r = Q("Show all items"), open: s, defaultOpen: a = !1, onOpenChange: c, actionsRef: i, triggerProps: o, popupProps: u, className: _, onMouseEnter: L, onMouseLeave: C, onFocusCapture: F, onBlurCapture: M, ref: y, ...I }) => {
|
|
265
|
+
const [E, g] = $(!1), [N, S] = $(null), [b, k] = Te({
|
|
266
|
+
controlled: s,
|
|
267
|
+
default: a,
|
|
268
|
+
name: Q("OverflowingList"),
|
|
269
|
+
state: "open"
|
|
270
|
+
}), T = R(null), l = i ?? T, h = f(n) && Number.isFinite(n) ? Math.min(t.length, Math.max(0, Math.floor(n))) : t.length, { containerRef: v, itemsRef: x, triggerRef: p, visibleItemCount: z, hasOverflow: de, updateLayout: me } = Je({
|
|
271
|
+
itemCount: t.length,
|
|
272
|
+
inlineItemCount: h
|
|
273
|
+
}), q = de && (b || e !== !1), P = b && q, { hasFocus: fe, isCountVisible: ee, restoreItemFocus: te, schedulePopupFocusRestoration: ve, resetFocusWhenFocusedTriggerUnmounts: he, handleFocusCapture: be, handleBlurCapture: pe } = Xe({
|
|
274
|
+
containerRef: v,
|
|
275
|
+
itemsRef: x,
|
|
276
|
+
triggerRef: p,
|
|
277
|
+
popup: N,
|
|
278
|
+
itemCount: t.length,
|
|
279
|
+
canExpand: q,
|
|
280
|
+
isPopupOpen: P,
|
|
281
|
+
isOpen: b,
|
|
282
|
+
isHovered: E,
|
|
283
|
+
showOverflowCount: e,
|
|
284
|
+
onFocusCapture: F,
|
|
285
|
+
onBlurCapture: M
|
|
286
|
+
}), ne = (e ?? (E || fe)) || b, _e = H(v, y), ye = H(p, he, o?.ref), ge = H(S, u?.ref), re = ne && e !== !1 ? z : h, oe = t.length - z, we = U(() => {
|
|
287
|
+
l.current?.close();
|
|
288
|
+
});
|
|
289
|
+
return /* @__PURE__ */ W(G, { children: [/* @__PURE__ */ W("div", {
|
|
290
|
+
...I,
|
|
291
|
+
ref: _e,
|
|
292
|
+
tabIndex: I.tabIndex ?? -1,
|
|
293
|
+
className: D(K.root, _),
|
|
294
|
+
onMouseEnter: (m) => {
|
|
295
|
+
g(!0), L?.(m);
|
|
296
|
+
},
|
|
297
|
+
onMouseLeave: (m) => {
|
|
298
|
+
g(!1), C?.(m);
|
|
299
|
+
},
|
|
300
|
+
onFocusCapture: be,
|
|
301
|
+
onBlurCapture: pe,
|
|
302
|
+
children: [/* @__PURE__ */ d("div", {
|
|
303
|
+
ref: x,
|
|
304
|
+
className: K.items,
|
|
305
|
+
children: t.slice(0, h).map((m, w) => /* @__PURE__ */ d(se, {
|
|
306
|
+
index: w,
|
|
307
|
+
isHidden: w >= re,
|
|
308
|
+
isLastVisible: e !== !1 && w === re - 1,
|
|
309
|
+
isInPopup: !1,
|
|
310
|
+
onFocusLost: te,
|
|
311
|
+
children: m
|
|
312
|
+
}, m.key ?? w))
|
|
313
|
+
}), (q || b) && /* @__PURE__ */ W(V.Root, {
|
|
314
|
+
open: P,
|
|
315
|
+
actionsRef: l,
|
|
316
|
+
onOpenChange: (m, w) => {
|
|
317
|
+
c?.(m, w), w.isCanceled || k(m);
|
|
318
|
+
},
|
|
319
|
+
children: [q && /* @__PURE__ */ d(V.Trigger, {
|
|
320
|
+
type: "button",
|
|
321
|
+
"aria-label": `+${oe} ${r}`,
|
|
322
|
+
...o,
|
|
323
|
+
onClick: o?.onClick ?? O,
|
|
324
|
+
onMouseDown: o?.onMouseDown ?? O,
|
|
325
|
+
onPointerDown: o?.onPointerDown ?? O,
|
|
326
|
+
onKeyDown: o?.onKeyDown ?? O,
|
|
327
|
+
onKeyUp: o?.onKeyUp ?? O,
|
|
328
|
+
ref: ye,
|
|
329
|
+
className: (m) => D(K.trigger, X(o?.className) ? o.className(m) : o?.className),
|
|
330
|
+
"data-visible": ee || void 0,
|
|
331
|
+
children: Le(o?.children) ? `+${oe}` : o.children
|
|
332
|
+
}), /* @__PURE__ */ d(V.Portal, { children: /* @__PURE__ */ d(V.Positioner, {
|
|
333
|
+
anchor: v,
|
|
334
|
+
align: "start",
|
|
335
|
+
sideOffset: -9,
|
|
336
|
+
alignOffset: -7,
|
|
337
|
+
children: /* @__PURE__ */ d(V.Popup, {
|
|
338
|
+
"aria-label": r,
|
|
339
|
+
...u,
|
|
340
|
+
onClick: u?.onClick ?? O,
|
|
341
|
+
onMouseDown: u?.onMouseDown ?? O,
|
|
342
|
+
onPointerDown: u?.onPointerDown ?? O,
|
|
343
|
+
onKeyDown: u?.onKeyDown ?? O,
|
|
344
|
+
onKeyUp: u?.onKeyUp ?? O,
|
|
345
|
+
ref: ge,
|
|
346
|
+
render: (m, w) => /* @__PURE__ */ d(Be, {
|
|
347
|
+
props: m,
|
|
348
|
+
state: w,
|
|
349
|
+
render: u?.render
|
|
350
|
+
}),
|
|
351
|
+
finalFocus: u?.finalFocus ?? ve,
|
|
352
|
+
className: (m) => D(K.popup, X(u?.className) ? u.className(m) : u?.className),
|
|
353
|
+
"data-overflowing-list-popup": "",
|
|
354
|
+
children: t.map((m, w) => /* @__PURE__ */ d(se, {
|
|
355
|
+
index: w,
|
|
356
|
+
isHidden: !1,
|
|
357
|
+
isLastVisible: !1,
|
|
358
|
+
isInPopup: !0,
|
|
359
|
+
onFocusLost: te,
|
|
360
|
+
children: m
|
|
361
|
+
}, m.key ?? w))
|
|
362
|
+
})
|
|
363
|
+
}) })]
|
|
364
|
+
})]
|
|
365
|
+
}), /* @__PURE__ */ d(Ge, {
|
|
366
|
+
containerRef: v,
|
|
367
|
+
itemsRef: x,
|
|
368
|
+
triggerRef: p,
|
|
369
|
+
itemCount: t.length,
|
|
370
|
+
inlineItemCount: h,
|
|
371
|
+
reserveCountSpace: ee,
|
|
372
|
+
isMeasurementEnabled: ne,
|
|
373
|
+
isOpen: b,
|
|
374
|
+
onLayoutChange: me,
|
|
375
|
+
onOverflowUnavailable: we
|
|
376
|
+
})] });
|
|
377
|
+
}, Ye = "_header_1dz7y_1", Ze = "_titleRow_1dz7y_8", Pe = "_title_1dz7y_8", et = "_actions_1dz7y_21", tt = "_description_1dz7y_27", B = {
|
|
378
|
+
header: Ye,
|
|
379
|
+
titleRow: Ze,
|
|
380
|
+
title: Pe,
|
|
381
|
+
actions: et,
|
|
382
|
+
description: tt
|
|
383
|
+
}, nt = ({ title: t, description: e, actions: n, level: r = 2, size: s = "md", color: a = "primary", descriptionLineClamp: c = 5, isDescriptionFocusable: i = !1, render: o, ref: u, className: _, ...L }) => {
|
|
384
|
+
const C = Me(), F = J(e) ? Oe(e) : f(e) && e !== !1, M = J(e) && c !== !1, y = J(e) ? /* @__PURE__ */ d(Fe, {
|
|
385
|
+
style: { whiteSpace: "pre-wrap" },
|
|
386
|
+
children: e
|
|
387
|
+
}) : e;
|
|
388
|
+
return Z({
|
|
389
|
+
render: o,
|
|
390
|
+
ref: u,
|
|
391
|
+
props: {
|
|
392
|
+
...L,
|
|
393
|
+
className: D(B.header, _),
|
|
394
|
+
children: /* @__PURE__ */ W(G, { children: [/* @__PURE__ */ W("div", {
|
|
395
|
+
className: B.titleRow,
|
|
396
|
+
children: [/* @__PURE__ */ d(Ie, {
|
|
397
|
+
level: r,
|
|
398
|
+
size: s,
|
|
399
|
+
color: a,
|
|
400
|
+
className: B.title,
|
|
401
|
+
"aria-describedby": F ? C : void 0,
|
|
402
|
+
children: t
|
|
403
|
+
}), f(n) && /* @__PURE__ */ d("div", {
|
|
404
|
+
className: B.actions,
|
|
405
|
+
children: n
|
|
406
|
+
})]
|
|
407
|
+
}), F && /* @__PURE__ */ d("div", {
|
|
408
|
+
id: C,
|
|
409
|
+
className: B.description,
|
|
410
|
+
children: M ? /* @__PURE__ */ d(Ce, {
|
|
411
|
+
text: e,
|
|
412
|
+
lineClamp: c,
|
|
413
|
+
isTooltipMultiline: !0,
|
|
414
|
+
isFocusable: i
|
|
415
|
+
}) : y
|
|
416
|
+
})] })
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
}, rt = "_root_ztxxm_1", ot = "_fullWidth_ztxxm_20", ce = {
|
|
420
|
+
root: rt,
|
|
421
|
+
fullWidth: ot
|
|
422
|
+
}, st = ({ align: t = "left", color: e = "primary", fullWidth: n = !0, className: r, render: s, ref: a, ...c }) => Z({
|
|
423
|
+
render: s,
|
|
424
|
+
ref: a,
|
|
425
|
+
props: {
|
|
426
|
+
...c,
|
|
427
|
+
"data-align": t,
|
|
428
|
+
"data-color": e,
|
|
429
|
+
className: D(ce.root, n && ce.fullWidth, r)
|
|
430
|
+
}
|
|
431
|
+
}), Ft = {
|
|
432
|
+
Root: st,
|
|
433
|
+
Header: nt
|
|
434
|
+
};
|
|
435
|
+
export {
|
|
436
|
+
wt as n,
|
|
437
|
+
gt as r,
|
|
438
|
+
Ft as t
|
|
439
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const v=require("./isDefined-DS2Q42p5.cjs"),H=require("./doNotTranslate-CHE7WmRS.cjs"),Z=require("./OverflowingTextWithTooltip-BQmpPObX.cjs"),z=require("./Popover-CneCJTvD.cjs"),be=require("./Heading-CHvEXL6n.cjs");let P=require("@base-ui/react/use-render"),j=require("@sniptt/guards"),M=require("clsx"),d=require("react"),l=require("react/jsx-runtime"),_e=require("@base-ui/react/merge-props"),V=require("@base-ui/utils/useMergedRefs"),ge=require("@base-ui/utils/useControlled"),k=require("@base-ui/utils/useStableCallback");var pe="_container_1hm4x_1",ye="_layer_1hm4x_9",xe="_visible_1hm4x_23",Ce="_hidden_1hm4x_28",q={container:pe,layer:ye,visible:xe,hidden:Ce},we=({isActive:t,activeIcon:e,inactiveIcon:n,className:s,render:o,ref:a,...c})=>(0,P.useRender)({defaultTagName:"span",render:o,ref:a,props:{...c,className:(0,M.clsx)(q.container,s),children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{"aria-hidden":"true",className:(0,M.clsx)(q.layer,t?q.hidden:q.visible),children:n}),(0,l.jsx)("span",{"aria-hidden":"true",className:(0,M.clsx)(q.layer,t?q.visible:q.hidden),children:e})]})}}),Fe="_root_eheyl_1",De="_items_eheyl_11",Ie="_item_eheyl_11",Oe="_popupItem_eheyl_45",Se="_trigger_eheyl_49",Le="_popup_eheyl_45",U={root:Fe,items:De,item:Ie,popupItem:Oe,trigger:Se,popup:Le},Ne=({props:t,state:e,render:n})=>{const s=(0,d.isValidElement)(n)?n:void 0,o=(0,V.useMergedRefs)(t.ref,s?.props.ref);if((0,j.isFunction)(n))return n(t,e);const a={...(0,_e.mergeProps)(t,s?.props),children:t.children,ref:o};return v.isDefined(s)?(0,d.cloneElement)(s,a):(0,l.jsx)("div",{...a})},Re=(0,d.memo)(({elementRef:t,isHidden:e,onFocusLost:n})=>((0,d.useLayoutEffect)(()=>{const s=t.current,o=v.isDefined(s)&&s.contains(s.ownerDocument.activeElement);e&&o&&n(s)},[t,e,n]),null)),re=t=>(0,d.useCallback)(e=>{if(v.isDefined(e))return()=>{const n=e.ownerDocument,s=e.contains(n.activeElement);queueMicrotask(()=>{const o=n.activeElement===n.body;s&&!e.isConnected&&o&&t(e)})}},[t]),ee=({children:t,index:e,isHidden:n,isLastVisible:s,isInPopup:o,onFocusLost:a})=>{const c=(0,d.useRef)(null),i=(0,k.useStableCallback)(r=>{a({index:e,element:r,isInPopup:o})});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{ref:(0,V.useMergedRefs)(c,re(i)),className:o?U.popupItem:U.item,"data-item-index":e,"data-hidden":n||void 0,"data-last-visible":s||void 0,"aria-hidden":n||void 0,inert:n,children:t}),(0,l.jsx)(Re,{elementRef:c,isHidden:n,onFocusLost:i})]})},te=({itemWidths:t,availableWidth:e,gap:n,includePartialItem:s})=>{let o=0,a=0;for(const c of t){const i=o+c+(a>0?n:0);if(a!==0&&i>e){const r=o+n<e;return s&&r?a+1:a}o=i,a+=1}return a},Ee=({items:t,itemElements:e})=>{t.setAttribute("data-measuring","");const n=e.map(s=>s.clientWidth);return t.removeAttribute("data-measuring"),n},je=({container:t,items:e,trigger:n,itemElements:s,itemCount:o,reserveCountSpace:a})=>{const c=Ee({items:e,itemElements:s}),i=parseFloat(getComputedStyle(e).columnGap)||0,r=t.clientWidth,f=o>te({itemWidths:c,availableWidth:r,gap:i,includePartialItem:!1}),p=n?.offsetWidth??0;return{visibleItemCount:te({itemWidths:c,availableWidth:a&&f?Math.max(0,r-p-i):r,gap:i,includePartialItem:!0}),hasOverflow:f}},Me=100,Te=(0,d.memo)(({containerRef:t,itemsRef:e,triggerRef:n,itemCount:s,inlineItemCount:o,reserveCountSpace:a,isMeasurementEnabled:c,isOpen:i,onLayoutChange:r,onOverflowUnavailable:f})=>{const p=(0,d.useRef)(void 0),O=(0,d.useRef)(void 0),F=(0,k.useStableCallback)(()=>({itemCount:s,inlineItemCount:o,reserveCountSpace:a,isOpen:i})),w=(0,k.useStableCallback)(r),N=(0,k.useStableCallback)(f);return(0,d.useLayoutEffect)(()=>{const y=t.current,D=e.current;if(!c||!v.isDefined(y)||!v.isDefined(D)){O.current=void 0;return}const S=new Set,x=()=>{const _=Array.from(D.children),A=new Set([y,..._]);v.isDefined(n.current)&&A.add(n.current);for(const g of S)A.has(g)||(L?.unobserve(g),S.delete(g));for(const g of A)S.has(g)||(L?.observe(g),S.add(g));const E=F();if(_.length!==E.inlineItemCount)return;const u=je({container:y,items:D,trigger:n.current,itemElements:_,itemCount:E.itemCount,reserveCountSpace:E.reserveCountSpace}),b=O.current,h=v.isDefined(b)&&b.isOpen&&!b.layout.hasOverflow,T=E.isOpen&&!u.hasOverflow;O.current={layout:u,isOpen:E.isOpen},w(u),T&&!h&&N()},L=v.isDefined(globalThis.ResizeObserver)?new ResizeObserver(x):void 0;p.current=x,x();const R=new MutationObserver(x);if(R.observe(D,{attributes:!0,attributeFilter:["class","style","hidden"],characterData:!0,childList:!0,subtree:!0}),R.observe(y,{childList:!0}),!v.isDefined(L)){const _=setInterval(x,Me);return window.addEventListener("resize",x),()=>{p.current=void 0,clearInterval(_),R.disconnect(),window.removeEventListener("resize",x)}}return()=>{p.current=void 0,R.disconnect(),L.disconnect()}},[t,e,n,c,F,w,N]),(0,d.useLayoutEffect)(()=>{p.current?.()},[s,o,a,i]),null}),qe=({itemCount:t,inlineItemCount:e})=>{const n=(0,d.useRef)(null),s=(0,d.useRef)(null),o=(0,d.useRef)(null),[a,c]=(0,d.useState)({visibleItemCount:e,hasOverflow:t>e});return{containerRef:n,itemsRef:s,triggerRef:o,updateLayout:(0,d.useCallback)(i=>{c(r=>r.visibleItemCount!==i.visibleItemCount||r.hasOverflow!==i.hasOverflow?i:r)},[]),...a}},ke=H.doNotTranslate("button, a[href], input, select, textarea, [tabindex]"),ne=({items:t,popup:e,trigger:n,root:s,removedIndex:o,excludedItem:a})=>{const c=[...Array.from(t?.children??[]),...Array.from(e?.children??[])].filter(i=>i!==a).sort((i,r)=>Math.abs(Number(i.getAttribute("data-item-index"))-o)-Math.abs(Number(r.getAttribute("data-item-index"))-o)||Number(r.getAttribute("data-item-index"))-Number(i.getAttribute("data-item-index")));for(const i of c)if(!i.hasAttribute("inert")){for(const r of Array.from(i.querySelectorAll(ke)))if(!r.matches(":disabled")&&!v.isDefined(r.closest("[inert]"))&&(r.focus(),r.ownerDocument.activeElement===r))return}n?.focus(),!(v.isDefined(n)&&n.ownerDocument.activeElement===n)&&s?.focus()},Ae=({containerRef:t,itemsRef:e,triggerRef:n,popup:s,itemCount:o,canExpand:a,isPopupOpen:c,isOpen:i,isHovered:r,showOverflowCount:f,onFocusCapture:p,onBlurCapture:O})=>{const[F,w]=(0,d.useState)(!1),[N,y]=(0,d.useState)(),D=f??N??(r||F||i),S=(0,k.useStableCallback)(({index:u,element:b,isInPopup:h})=>{ne({items:h&&a?null:e.current,popup:h&&c?s:null,trigger:n.current,root:t.current,removedIndex:u,excludedItem:b})}),x=(0,d.useCallback)(()=>{const u=t.current;u?.focus(),w(u?.ownerDocument.activeElement===u),y(void 0)},[t]),L=(0,k.useStableCallback)(()=>{if(c)return;const u=t.current,b=u?.ownerDocument,h=b?.activeElement,T=v.isDefined(h)&&e.current?.contains(h)&&!v.isDefined(h.closest("[inert]")),g=v.isDefined(h)&&h!==b?.body&&!u?.contains(h)&&!s?.contains(h);if(T||g)return;if(!a){ne({items:e.current,popup:null,trigger:null,root:u,removedIndex:o});return}const W=n.current;if(v.isDefined(W)&&!W.matches(":disabled")){W.focus({preventScroll:!0});return}u?.focus({preventScroll:!0})}),R=(0,d.useCallback)(()=>(queueMicrotask(L),!1),[L]),_=re(x);return{hasFocus:F,isCountVisible:D,restoreItemFocus:S,schedulePopupFocusRestoration:R,resetFocusWhenFocusedTriggerUnmounts:_,handleFocusCapture:u=>{w(!0),e.current?.contains(u.target)&&y(b=>b??D),p?.(u)},handleBlurCapture:u=>{w(u.currentTarget.contains(u.relatedTarget)||(s?.contains(u.relatedTarget)??!1)),e.current?.contains(u.relatedTarget)||y(void 0),O?.(u)}}},I=t=>t.stopPropagation(),We=({children:t,showOverflowCount:e,maxInlineCount:n,overflowLabel:s=H.doNotTranslate("Show all items"),open:o,defaultOpen:a=!1,onOpenChange:c,actionsRef:i,triggerProps:r,popupProps:f,className:p,onMouseEnter:O,onMouseLeave:F,onFocusCapture:w,onBlurCapture:N,ref:y,...D})=>{const[S,x]=(0,d.useState)(!1),[L,R]=(0,d.useState)(null),[_,A]=(0,ge.useControlled)({controlled:o,default:a,name:H.doNotTranslate("OverflowingList"),state:"open"}),E=(0,d.useRef)(null),u=i??E,b=v.isDefined(n)&&Number.isFinite(n)?Math.min(t.length,Math.max(0,Math.floor(n))):t.length,{containerRef:h,itemsRef:T,triggerRef:g,visibleItemCount:W,hasOverflow:oe,updateLayout:ae}=qe({itemCount:t.length,inlineItemCount:b}),B=oe&&(_||e!==!1),$=_&&B,{hasFocus:ie,isCountVisible:G,restoreItemFocus:J,schedulePopupFocusRestoration:le,resetFocusWhenFocusedTriggerUnmounts:ce,handleFocusCapture:ue,handleBlurCapture:de}=Ae({containerRef:h,itemsRef:T,triggerRef:g,popup:L,itemCount:t.length,canExpand:B,isPopupOpen:$,isOpen:_,isHovered:S,showOverflowCount:e,onFocusCapture:w,onBlurCapture:N}),Q=(e??(S||ie))||_,fe=(0,V.useMergedRefs)(h,y),me=(0,V.useMergedRefs)(g,ce,r?.ref),ve=(0,V.useMergedRefs)(R,f?.ref),X=Q&&e!==!1?W:b,Y=t.length-W,he=(0,k.useStableCallback)(()=>{u.current?.close()});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{...D,ref:fe,tabIndex:D.tabIndex??-1,className:(0,M.clsx)(U.root,p),onMouseEnter:m=>{x(!0),O?.(m)},onMouseLeave:m=>{x(!1),F?.(m)},onFocusCapture:ue,onBlurCapture:de,children:[(0,l.jsx)("div",{ref:T,className:U.items,children:t.slice(0,b).map((m,C)=>(0,l.jsx)(ee,{index:C,isHidden:C>=X,isLastVisible:e!==!1&&C===X-1,isInPopup:!1,onFocusLost:J,children:m},m.key??C))}),(B||_)&&(0,l.jsxs)(z.Popover.Root,{open:$,actionsRef:u,onOpenChange:(m,C)=>{c?.(m,C),C.isCanceled||A(m)},children:[B&&(0,l.jsx)(z.Popover.Trigger,{type:"button","aria-label":`+${Y} ${s}`,...r,onClick:r?.onClick??I,onMouseDown:r?.onMouseDown??I,onPointerDown:r?.onPointerDown??I,onKeyDown:r?.onKeyDown??I,onKeyUp:r?.onKeyUp??I,ref:me,className:m=>(0,M.clsx)(U.trigger,(0,j.isFunction)(r?.className)?r.className(m):r?.className),"data-visible":G||void 0,children:(0,j.isUndefined)(r?.children)?`+${Y}`:r.children}),(0,l.jsx)(z.Popover.Portal,{children:(0,l.jsx)(z.Popover.Positioner,{anchor:h,align:"start",sideOffset:-9,alignOffset:-7,children:(0,l.jsx)(z.Popover.Popup,{"aria-label":s,...f,onClick:f?.onClick??I,onMouseDown:f?.onMouseDown??I,onPointerDown:f?.onPointerDown??I,onKeyDown:f?.onKeyDown??I,onKeyUp:f?.onKeyUp??I,ref:ve,render:(m,C)=>(0,l.jsx)(Ne,{props:m,state:C,render:f?.render}),finalFocus:f?.finalFocus??le,className:m=>(0,M.clsx)(U.popup,(0,j.isFunction)(f?.className)?f.className(m):f?.className),"data-overflowing-list-popup":"",children:t.map((m,C)=>(0,l.jsx)(ee,{index:C,isHidden:!1,isLastVisible:!1,isInPopup:!0,onFocusLost:J,children:m},m.key??C))})})})]})]}),(0,l.jsx)(Te,{containerRef:h,itemsRef:T,triggerRef:g,itemCount:t.length,inlineItemCount:b,reserveCountSpace:G,isMeasurementEnabled:Q,isOpen:_,onLayoutChange:ae,onOverflowUnavailable:he})]})},Ue="_header_1dz7y_1",ze="_titleRow_1dz7y_8",Ke="_title_1dz7y_8",Ve="_actions_1dz7y_21",Be="_description_1dz7y_27",K={header:Ue,titleRow:ze,title:Ke,actions:Ve,description:Be},He=({title:t,description:e,actions:n,level:s=2,size:o="md",color:a="primary",descriptionLineClamp:c=5,isDescriptionFocusable:i=!1,render:r,ref:f,className:p,...O})=>{const F=(0,d.useId)(),w=(0,j.isString)(e)?(0,j.isNonEmptyString)(e):v.isDefined(e)&&e!==!1,N=(0,j.isString)(e)&&c!==!1,y=(0,j.isString)(e)?(0,l.jsx)(Z.Text,{style:{whiteSpace:"pre-wrap"},children:e}):e;return(0,P.useRender)({render:r,ref:f,props:{...O,className:(0,M.clsx)(K.header,p),children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:K.titleRow,children:[(0,l.jsx)(be.Heading,{level:s,size:o,color:a,className:K.title,"aria-describedby":w?F:void 0,children:t}),v.isDefined(n)&&(0,l.jsx)("div",{className:K.actions,children:n})]}),w&&(0,l.jsx)("div",{id:F,className:K.description,children:N?(0,l.jsx)(Z.OverflowingTextWithTooltip,{text:e,lineClamp:c,isTooltipMultiline:!0,isFocusable:i}):y})]})}})},Pe="_root_ztxxm_1",$e="_fullWidth_ztxxm_20",se={root:Pe,fullWidth:$e},Ge=({align:t="left",color:e="primary",fullWidth:n=!0,className:s,render:o,ref:a,...c})=>(0,P.useRender)({render:o,ref:a,props:{...c,"data-align":t,"data-color":e,className:(0,M.clsx)(se.root,n&&se.fullWidth,s)}}),Je={Root:Ge,Header:He};Object.defineProperty(exports,"AnimatedIconCrossfade",{enumerable:!0,get:function(){return we}});Object.defineProperty(exports,"OverflowingList",{enumerable:!0,get:function(){return We}});Object.defineProperty(exports,"Section",{enumerable:!0,get:function(){return Je}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const B=require("./doNotTranslate-CHE7WmRS.cjs"),T=require("./mergeClassNames-D4lshrT6.cjs"),m=require("./Button-iVyxlrwO.cjs"),y=require("./ListItem-C6Xl00m1.cjs"),L=require("./Dropdown-DlItz8Gh.cjs"),d=require("./TabsTabContent-6rkARU9F.cjs");let f=require("clsx"),v=require("react"),u=require("react/jsx-runtime"),C=require("@base-ui/react/button");var P=()=>{const{pageId:e,goToPage:t,goBack:r,canGoBack:n}=L.useDropdownContext();return{page:e,goToPage:o=>t({id:o}),goBack:r,canGoBack:n}},j=({color:e,selected:t,focused:r,indicator:n,startIcon:o,endIcon:a,description:s,descriptionPlacement:i,shortcut:l,shortcutJoinLabel:c,hasSubmenu:_,disabled:b=!1,type:g="button",children:q,...p})=>(0,u.jsx)(y.ListItem,{color:e,selected:t,focused:r,indicator:n,startIcon:o,endIcon:a,description:s,descriptionPlacement:i,shortcut:l,shortcutJoinLabel:c,hasSubmenu:_,disabled:b,render:(0,u.jsx)(C.Button,{...p,nativeButton:!0,type:g,disabled:b}),children:q}),x=B.doNotTranslate({gray:"Gray",tomato:"Tomato",red:"Red",ruby:"Ruby",crimson:"Crimson",pink:"Pink",plum:"Plum",purple:"Purple",violet:"Violet",iris:"Iris",cyan:"Cyan",turquoise:"Turquoise",sky:"Sky",blue:"Blue",jade:"Jade",green:"Green",grass:"Grass",mint:"Mint",lime:"Lime",bronze:"Bronze",gold:"Gold",brown:"Brown",orange:"Orange",amber:"Amber",yellow:"Yellow"}),w="_button_quwcq_1",O={button:w},G=({active:e=!1,className:t,children:r,startIcon:n,endIcon:o,badge:a,size:s,...i})=>{const l=(0,v.useContext)(m.ButtonGroupContext),c=s??l?.size??"sm";return(0,u.jsx)(m.Button,{...i,variant:"ghost",size:c,"data-active":e||void 0,className:T.mergeClassNames((0,f.clsx)(d.Tab_module_default.tab,O.button),t),children:(0,u.jsx)(d.TabsTabContent,{startIcon:n,endIcon:o,badge:a,children:r})})};Object.defineProperty(exports,"DEFAULT_COLOR_LABELS",{enumerable:!0,get:function(){return x}});Object.defineProperty(exports,"ListItemButton",{enumerable:!0,get:function(){return j}});Object.defineProperty(exports,"TabButton",{enumerable:!0,get:function(){return G}});Object.defineProperty(exports,"useDropdownPage",{enumerable:!0,get:function(){return P}});
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { t as p } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
+
import { t as T } from "./doNotTranslate-BSVT8Xyd.js";
|
|
3
|
+
import { t as _ } from "./mergeClassNames-ClFMR1v0.js";
|
|
4
|
+
import { n as g, t as B } from "./TabsTabContent-DPkLTBi2.js";
|
|
5
|
+
import { useRender as E } from "@base-ui/react/use-render";
|
|
6
|
+
import { isString as L } from "@sniptt/guards";
|
|
7
|
+
import { clsx as I } from "clsx";
|
|
8
|
+
import { jsx as d, jsxs as R } from "react/jsx-runtime";
|
|
9
|
+
import { useDirection as K } from "@base-ui/react/direction-provider";
|
|
10
|
+
import { Tabs as h } from "@base-ui/react/tabs";
|
|
11
|
+
var C = "_root_1iwl8_1", O = "_list_1iwl8_14", S = "_item_1iwl8_25", D = "_content_1iwl8_36", H = "_separator_1iwl8_56", b = {
|
|
12
|
+
root: C,
|
|
13
|
+
list: O,
|
|
14
|
+
item: S,
|
|
15
|
+
content: D,
|
|
16
|
+
separator: H
|
|
17
|
+
}, P = ({ children: a, href: r, render: i, title: o, current: t, className: s, ref: e, "aria-current": n = t ? "page" : void 0, ...m }) => E({
|
|
18
|
+
defaultTagName: p(r) ? "a" : "span",
|
|
19
|
+
render: i,
|
|
20
|
+
ref: e,
|
|
21
|
+
props: {
|
|
22
|
+
...m,
|
|
23
|
+
children: a,
|
|
24
|
+
href: r,
|
|
25
|
+
title: o ?? (L(a) ? a : void 0),
|
|
26
|
+
"aria-current": n,
|
|
27
|
+
"data-linked": p(r) || void 0,
|
|
28
|
+
className: I(b.content, s)
|
|
29
|
+
}
|
|
30
|
+
}), sa = ({ links: a, className: r, render: i, ref: o, "aria-label": t = T("Breadcrumb"), ...s }) => E({
|
|
31
|
+
defaultTagName: "nav",
|
|
32
|
+
render: i,
|
|
33
|
+
ref: o,
|
|
34
|
+
props: {
|
|
35
|
+
...s,
|
|
36
|
+
"aria-label": t,
|
|
37
|
+
className: I(b.root, r),
|
|
38
|
+
children: /* @__PURE__ */ d("ol", {
|
|
39
|
+
className: b.list,
|
|
40
|
+
children: a.map((e, n) => /* @__PURE__ */ R("li", {
|
|
41
|
+
className: b.item,
|
|
42
|
+
children: [n > 0 && /* @__PURE__ */ d("span", {
|
|
43
|
+
className: b.separator,
|
|
44
|
+
"aria-hidden": "true",
|
|
45
|
+
children: "/"
|
|
46
|
+
}), /* @__PURE__ */ d(P, {
|
|
47
|
+
...e,
|
|
48
|
+
current: n === a.length - 1
|
|
49
|
+
})]
|
|
50
|
+
}, n))
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
}), U = ({ className: a, ...r }) => /* @__PURE__ */ d(h.Indicator, {
|
|
54
|
+
...r,
|
|
55
|
+
className: _(g.indicator, a)
|
|
56
|
+
}), j = '[role="tab"]', q = '[role="tablist"]', z = T("[hidden], [inert]"), N = (a) => a.hasAttribute("data-disabled") || a.hasAttribute("disabled") || a.getAttribute("aria-disabled") === "true" || p(a.closest(z)), M = ({ event: a, direction: r, loopFocus: i }) => {
|
|
57
|
+
if (a.altKey || a.ctrlKey || a.metaKey || a.shiftKey) return;
|
|
58
|
+
const o = a.currentTarget, t = [];
|
|
59
|
+
o.querySelectorAll(j).forEach((l) => {
|
|
60
|
+
l.closest(q) === o && t.push(l);
|
|
61
|
+
});
|
|
62
|
+
const s = t.findIndex((l) => l === a.target);
|
|
63
|
+
if (s === -1) return;
|
|
64
|
+
const e = T(r === "rtl" ? ["ArrowLeft", "ArrowRight"] : ["ArrowRight", "ArrowLeft"]), [n, m] = o.getAttribute("data-orientation") === "vertical" ? T(["ArrowDown", "ArrowUp"]) : e;
|
|
65
|
+
if (!T([
|
|
66
|
+
n,
|
|
67
|
+
m,
|
|
68
|
+
"Home",
|
|
69
|
+
"End"
|
|
70
|
+
]).includes(a.key)) return;
|
|
71
|
+
const w = a.key === m;
|
|
72
|
+
let u = s + (w ? -1 : 1);
|
|
73
|
+
a.key === "Home" && (u = 0), a.key === "End" && (u = t.length - 1);
|
|
74
|
+
const v = u < 0 || u >= t.length, k = w ? t.length - 1 : 0, y = t[v && i ? k : u];
|
|
75
|
+
if (!p(y) || !N(y)) return;
|
|
76
|
+
a.preventBaseUIHandler(), a.preventDefault();
|
|
77
|
+
const f = t.filter((l) => !N(l));
|
|
78
|
+
let c;
|
|
79
|
+
if (a.key === "Home" && (c = f[0]), a.key === "End" && (c = f[f.length - 1]), a.key === n || a.key === m) {
|
|
80
|
+
const l = w ? [...f].reverse() : f;
|
|
81
|
+
c = l.find((A) => w ? t.indexOf(A) < s : t.indexOf(A) > s), c ??= i ? l[0] : void 0;
|
|
82
|
+
}
|
|
83
|
+
if (!p(c) || c === a.target) return;
|
|
84
|
+
a.stopPropagation();
|
|
85
|
+
const x = c;
|
|
86
|
+
queueMicrotask(() => x.focus());
|
|
87
|
+
}, V = ({ className: a, onKeyDown: r, loopFocus: i = !0, ...o }) => {
|
|
88
|
+
const t = K(), s = (e) => {
|
|
89
|
+
if (r?.(e), e.defaultPrevented) {
|
|
90
|
+
e.preventBaseUIHandler();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
e.baseUIHandlerPrevented || M({
|
|
94
|
+
event: e,
|
|
95
|
+
direction: t,
|
|
96
|
+
loopFocus: i
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
return /* @__PURE__ */ d(h.List, {
|
|
100
|
+
...o,
|
|
101
|
+
loopFocus: i,
|
|
102
|
+
onKeyDown: s,
|
|
103
|
+
className: _(g.list, a)
|
|
104
|
+
});
|
|
105
|
+
}, $ = ({ className: a, ...r }) => /* @__PURE__ */ d(h.Panel, {
|
|
106
|
+
...r,
|
|
107
|
+
className: _(g.panel, a)
|
|
108
|
+
}), G = ({ className: a, ...r }) => /* @__PURE__ */ d(h.Root, {
|
|
109
|
+
...r,
|
|
110
|
+
className: _(g.root, a)
|
|
111
|
+
}), J = ({ className: a, children: r, startIcon: i, endIcon: o, badge: t, highlighted: s = !1, size: e = "sm", ...n }) => /* @__PURE__ */ d(h.Tab, {
|
|
112
|
+
...n,
|
|
113
|
+
className: _(g.tab, a),
|
|
114
|
+
"data-size": e,
|
|
115
|
+
"data-highlighted": s || void 0,
|
|
116
|
+
children: /* @__PURE__ */ d(B, {
|
|
117
|
+
startIcon: i,
|
|
118
|
+
endIcon: o,
|
|
119
|
+
badge: t,
|
|
120
|
+
children: r
|
|
121
|
+
})
|
|
122
|
+
}), ia = {
|
|
123
|
+
Root: G,
|
|
124
|
+
List: V,
|
|
125
|
+
Tab: J,
|
|
126
|
+
Indicator: U,
|
|
127
|
+
Panel: $
|
|
128
|
+
};
|
|
129
|
+
export {
|
|
130
|
+
sa as n,
|
|
131
|
+
ia as t
|
|
132
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { t as c } from "./doNotTranslate-BSVT8Xyd.js";
|
|
2
|
+
import { t as B } from "./mergeClassNames-ClFMR1v0.js";
|
|
3
|
+
import { r as v, t as T } from "./Button-CU8BS-Yd.js";
|
|
4
|
+
import { t as y } from "./ListItem-C84ANa76.js";
|
|
5
|
+
import { o as _ } from "./Dropdown-ChTVyesF.js";
|
|
6
|
+
import { n as C, t as w } from "./TabsTabContent-DPkLTBi2.js";
|
|
7
|
+
import { clsx as G } from "clsx";
|
|
8
|
+
import { useContext as L } from "react";
|
|
9
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
10
|
+
import { Button as k } from "@base-ui/react/button";
|
|
11
|
+
var j = () => {
|
|
12
|
+
const { pageId: o, goToPage: t, goBack: r, canGoBack: e } = _();
|
|
13
|
+
return {
|
|
14
|
+
page: o,
|
|
15
|
+
goToPage: (a) => t({ id: a }),
|
|
16
|
+
goBack: r,
|
|
17
|
+
canGoBack: e
|
|
18
|
+
};
|
|
19
|
+
}, E = ({ color: o, selected: t, focused: r, indicator: e, startIcon: a, endIcon: s, description: m, descriptionPlacement: u, shortcut: i, shortcutJoinLabel: l, hasSubmenu: d, disabled: p = !1, type: b = "button", children: g, ...f }) => /* @__PURE__ */ n(y, {
|
|
20
|
+
color: o,
|
|
21
|
+
selected: t,
|
|
22
|
+
focused: r,
|
|
23
|
+
indicator: e,
|
|
24
|
+
startIcon: a,
|
|
25
|
+
endIcon: s,
|
|
26
|
+
description: m,
|
|
27
|
+
descriptionPlacement: u,
|
|
28
|
+
shortcut: i,
|
|
29
|
+
shortcutJoinLabel: l,
|
|
30
|
+
hasSubmenu: d,
|
|
31
|
+
disabled: p,
|
|
32
|
+
render: /* @__PURE__ */ n(k, {
|
|
33
|
+
...f,
|
|
34
|
+
nativeButton: !0,
|
|
35
|
+
type: b,
|
|
36
|
+
disabled: p
|
|
37
|
+
}),
|
|
38
|
+
children: g
|
|
39
|
+
}), F = c({
|
|
40
|
+
gray: "Gray",
|
|
41
|
+
tomato: "Tomato",
|
|
42
|
+
red: "Red",
|
|
43
|
+
ruby: "Ruby",
|
|
44
|
+
crimson: "Crimson",
|
|
45
|
+
pink: "Pink",
|
|
46
|
+
plum: "Plum",
|
|
47
|
+
purple: "Purple",
|
|
48
|
+
violet: "Violet",
|
|
49
|
+
iris: "Iris",
|
|
50
|
+
cyan: "Cyan",
|
|
51
|
+
turquoise: "Turquoise",
|
|
52
|
+
sky: "Sky",
|
|
53
|
+
blue: "Blue",
|
|
54
|
+
jade: "Jade",
|
|
55
|
+
green: "Green",
|
|
56
|
+
grass: "Grass",
|
|
57
|
+
mint: "Mint",
|
|
58
|
+
lime: "Lime",
|
|
59
|
+
bronze: "Bronze",
|
|
60
|
+
gold: "Gold",
|
|
61
|
+
brown: "Brown",
|
|
62
|
+
orange: "Orange",
|
|
63
|
+
amber: "Amber",
|
|
64
|
+
yellow: "Yellow"
|
|
65
|
+
}), x = "_button_quwcq_1", P = { button: x }, J = ({ active: o = !1, className: t, children: r, startIcon: e, endIcon: a, badge: s, size: m, ...u }) => {
|
|
66
|
+
const i = L(v), l = m ?? i?.size ?? "sm";
|
|
67
|
+
return /* @__PURE__ */ n(T, {
|
|
68
|
+
...u,
|
|
69
|
+
variant: "ghost",
|
|
70
|
+
size: l,
|
|
71
|
+
"data-active": o || void 0,
|
|
72
|
+
className: B(G(C.tab, P.button), t),
|
|
73
|
+
children: /* @__PURE__ */ n(w, {
|
|
74
|
+
startIcon: e,
|
|
75
|
+
endIcon: a,
|
|
76
|
+
badge: s,
|
|
77
|
+
children: r
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
export {
|
|
82
|
+
j as i,
|
|
83
|
+
F as n,
|
|
84
|
+
E as r,
|
|
85
|
+
J as t
|
|
86
|
+
};
|