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,10 @@
|
|
|
1
|
+
import { DropdownContentProps } from '../../../navigation/Dropdown/types/DropdownContentProps';
|
|
2
|
+
import { DropdownRootProps } from '../../../navigation/Dropdown/types/DropdownRootProps';
|
|
3
|
+
import { CurrencyPickerOptionsProps } from './CurrencyPickerOptionsProps';
|
|
4
|
+
import { CurrencyPickerRootProps } from './CurrencyPickerRootProps';
|
|
5
|
+
import { CurrencyPickerTriggerProps } from './CurrencyPickerTriggerProps';
|
|
6
|
+
export type CurrencyPickerProps = Omit<CurrencyPickerRootProps, 'children'> & CurrencyPickerTriggerProps & Pick<DropdownRootProps, 'open' | 'defaultOpen' | 'onOpenChange' | 'onEscapeKeyDown' | 'onInteractOutside'> & {
|
|
7
|
+
triggerProps?: CurrencyPickerTriggerProps;
|
|
8
|
+
contentProps?: Omit<DropdownContentProps, 'children'>;
|
|
9
|
+
optionsProps?: CurrencyPickerOptionsProps;
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CurrencyPickerChangeEventDetails } from './CurrencyPickerChangeEventDetails';
|
|
3
|
+
import { CurrencyPickerOption } from './CurrencyPickerOption';
|
|
4
|
+
import { CurrencyPickerState } from './CurrencyPickerState';
|
|
5
|
+
export type CurrencyPickerRootProps = {
|
|
6
|
+
currencies: readonly CurrencyPickerOption[];
|
|
7
|
+
value?: string | null;
|
|
8
|
+
defaultValue?: string | null;
|
|
9
|
+
onValueChange?: (value: string | null, eventDetails: CurrencyPickerChangeEventDetails) => void;
|
|
10
|
+
closeOnSelect?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
selectedFirst?: boolean;
|
|
13
|
+
getOptionLabel?: (currency: CurrencyPickerOption) => ReactNode;
|
|
14
|
+
getSearchText?: (currency: CurrencyPickerOption) => string;
|
|
15
|
+
renderValue?: (state: CurrencyPickerState) => ReactNode;
|
|
16
|
+
children: ReactNode | ((state: CurrencyPickerState) => ReactNode);
|
|
17
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { DropdownTriggerProps } from '../../../navigation/Dropdown/types/DropdownTriggerProps';
|
|
2
|
-
export type CurrencyPickerTriggerProps = Omit<DropdownTriggerProps, '
|
|
3
|
-
|
|
3
|
+
export type CurrencyPickerTriggerProps = Omit<DropdownTriggerProps, 'value' | 'openOnHover' | 'delay' | 'closeDelay'> & {
|
|
4
|
+
placeholder?: ReactNode;
|
|
4
5
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { PhoneCountryPickerProps } from './types/PhoneCountryPickerProps';
|
|
2
|
+
export declare const PhoneCountryPicker: (({ countries, value, defaultValue, onValueChange, disabled, closeOnSelect, dropdownProps, contentProps, optionsProps, ...triggerProps }: PhoneCountryPickerProps) => import("react").JSX.Element) & {
|
|
3
|
+
Root: ({ children, countries, value: controlledValue, defaultValue, onValueChange, disabled, closeOnSelect, }: import('..').PhoneCountryPickerRootProps) => import("react").JSX.Element;
|
|
4
|
+
Trigger: ({ children, disabled: triggerDisabled, className, "aria-describedby": ariaDescribedBy, ...props }: import('..').PhoneCountryPickerTriggerProps) => import("react").JSX.Element;
|
|
5
|
+
Options: ({ searchLabel, listLabel, emptyLabel, disabled: optionsDisabled, className, render, ref, ...props }: import('..').PhoneCountryPickerOptionsProps) => import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
4
6
|
};
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import { DropdownSelectionGroupChangeEventDetails } from '../../../navigation/Dropdown/types/DropdownSelectionGroupChangeEventDetails';
|
|
1
2
|
import { PhoneCountryOption } from '../types/PhoneCountryOption';
|
|
2
3
|
type PhoneCountryPickerExampleProps = {
|
|
3
|
-
initialValue?: string;
|
|
4
|
+
initialValue?: string | null;
|
|
5
|
+
composition?: 'shorthand' | 'compound';
|
|
6
|
+
controlled?: boolean;
|
|
4
7
|
disabled?: boolean;
|
|
5
8
|
label?: string;
|
|
6
9
|
countries?: readonly PhoneCountryOption[];
|
|
7
10
|
searchLabel?: string;
|
|
11
|
+
listLabel?: string;
|
|
8
12
|
emptyLabel?: string;
|
|
9
|
-
onValueChange?: (value: string) => void;
|
|
13
|
+
onValueChange?: (value: string | null, eventDetails: DropdownSelectionGroupChangeEventDetails) => void;
|
|
10
14
|
};
|
|
11
|
-
export declare const PhoneCountryPickerExample: ({ initialValue, disabled, label, countries, searchLabel, emptyLabel, onValueChange, }: PhoneCountryPickerExampleProps) => import("react").JSX.Element;
|
|
15
|
+
export declare const PhoneCountryPickerExample: ({ initialValue, composition, controlled, disabled, label, countries, searchLabel, listLabel, emptyLabel, onValueChange, }: PhoneCountryPickerExampleProps) => import("react").JSX.Element;
|
|
12
16
|
export {};
|
package/dist/components/input/PhoneCountryPicker/__stories__/testDisabledPhoneCountryPicker.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PhoneCountryPickerRootProps } from '../types/PhoneCountryPickerRootProps';
|
|
2
|
+
export declare const testDisabledPhoneCountryPicker: ({ canvasElement, args, }: {
|
|
3
|
+
canvasElement: HTMLElement;
|
|
4
|
+
args: Pick<PhoneCountryPickerRootProps, "onValueChange">;
|
|
5
|
+
}) => Promise<void>;
|
package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryNullSelection.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PhoneCountryPickerRootProps } from '../types/PhoneCountryPickerRootProps';
|
|
2
|
+
export declare const testPhoneCountryNullSelection: ({ canvasElement, args, }: {
|
|
3
|
+
canvasElement: HTMLElement;
|
|
4
|
+
args: Pick<PhoneCountryPickerRootProps, "onValueChange">;
|
|
5
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PhoneCountryPickerRootProps } from '../types/PhoneCountryPickerRootProps';
|
|
2
|
+
export declare const testPhoneCountrySelection: ({ canvasElement, args, }: {
|
|
3
|
+
canvasElement: HTMLElement;
|
|
4
|
+
args: Pick<PhoneCountryPickerRootProps, "onValueChange">;
|
|
5
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PhoneCountryPickerRootProps } from '../types/PhoneCountryPickerRootProps';
|
|
2
|
+
import { PreparedPhoneCountryOption } from './PreparedPhoneCountryOption';
|
|
3
|
+
export declare const PhoneCountryPickerContext: import('react').Context<{
|
|
4
|
+
countries: readonly PreparedPhoneCountryOption[];
|
|
5
|
+
value: string | null;
|
|
6
|
+
onValueChange: NonNullable<PhoneCountryPickerRootProps["onValueChange"]>;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
closeOnSelect: boolean;
|
|
9
|
+
} | null>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PhoneCountryPickerOptionsProps } from '../types/PhoneCountryPickerOptionsProps';
|
|
2
|
-
export declare const PhoneCountryPickerOptions: ({
|
|
2
|
+
export declare const PhoneCountryPickerOptions: ({ searchLabel, listLabel, emptyLabel, disabled: optionsDisabled, className, render, ref, ...props }: PhoneCountryPickerOptionsProps) => import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { PhoneCountryPickerRootProps } from '../types/PhoneCountryPickerRootProps';
|
|
2
|
+
export declare const PhoneCountryPickerRoot: ({ children, countries, value: controlledValue, defaultValue, onValueChange, disabled, closeOnSelect, }: PhoneCountryPickerRootProps) => import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PhoneCountryPickerTriggerProps } from '../types/PhoneCountryPickerTriggerProps';
|
|
2
|
-
export declare const PhoneCountryPickerTrigger: ({
|
|
2
|
+
export declare const PhoneCountryPickerTrigger: ({ children, disabled: triggerDisabled, className, "aria-describedby": ariaDescribedBy, ...props }: PhoneCountryPickerTriggerProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PreparedPhoneCountryOption } from './PreparedPhoneCountryOption';
|
|
2
|
+
export declare const matchesPhoneCountrySearch: ({ country, normalizedSearch, callingCodeSearch, }: {
|
|
3
|
+
country: Pick<PreparedPhoneCountryOption, "searchLabel" | "searchValue" | "callingCode">;
|
|
4
|
+
normalizedSearch: string;
|
|
5
|
+
callingCodeSearch: string;
|
|
6
|
+
}) => boolean;
|
package/dist/components/input/PhoneCountryPicker/internal/usePhoneCountryPickerContextOrThrow.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const usePhoneCountryPickerContextOrThrow: () => {
|
|
2
|
+
countries: readonly import('./PreparedPhoneCountryOption').PreparedPhoneCountryOption[];
|
|
3
|
+
value: string | null;
|
|
4
|
+
onValueChange: NonNullable<import('../..').PhoneCountryPickerRootProps["onValueChange"]>;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
closeOnSelect: boolean;
|
|
7
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type PhoneCountryPickerOptionsProps = {
|
|
3
|
-
|
|
4
|
-
value?: string;
|
|
5
|
-
onValueChange: (value: string) => void;
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
export type PhoneCountryPickerOptionsProps = Omit<useRender.ComponentProps<'div'>, 'children'> & {
|
|
3
|
+
disabled?: boolean;
|
|
6
4
|
searchLabel?: string;
|
|
5
|
+
listLabel?: string;
|
|
7
6
|
emptyLabel?: string;
|
|
8
7
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DropdownContentProps } from '../../../navigation/Dropdown/types/DropdownContentProps';
|
|
2
|
+
import { DropdownRootProps } from '../../../navigation/Dropdown/types/DropdownRootProps';
|
|
3
|
+
import { PhoneCountryPickerOptionsProps } from './PhoneCountryPickerOptionsProps';
|
|
4
|
+
import { PhoneCountryPickerRootProps } from './PhoneCountryPickerRootProps';
|
|
5
|
+
import { PhoneCountryPickerTriggerProps } from './PhoneCountryPickerTriggerProps';
|
|
6
|
+
export type PhoneCountryPickerProps = Omit<PhoneCountryPickerRootProps, 'children'> & Omit<PhoneCountryPickerTriggerProps, 'value' | 'defaultValue'> & {
|
|
7
|
+
dropdownProps?: Omit<DropdownRootProps, 'children' | 'type' | 'multiple'>;
|
|
8
|
+
contentProps?: Omit<DropdownContentProps, 'children'>;
|
|
9
|
+
optionsProps?: PhoneCountryPickerOptionsProps;
|
|
10
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DropdownSelectionGroupChangeEventDetails } from '../../../navigation/Dropdown/types/DropdownSelectionGroupChangeEventDetails';
|
|
3
|
+
import { PhoneCountryOption } from './PhoneCountryOption';
|
|
4
|
+
export type PhoneCountryPickerRootProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
countries: readonly PhoneCountryOption[];
|
|
7
|
+
value?: string | null;
|
|
8
|
+
defaultValue?: string | null;
|
|
9
|
+
onValueChange?: (value: string | null, eventDetails: DropdownSelectionGroupChangeEventDetails) => void;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
closeOnSelect?: boolean;
|
|
12
|
+
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { DropdownTriggerProps } from '../../../navigation/Dropdown/types/DropdownTriggerProps';
|
|
2
|
-
|
|
3
|
-
export type PhoneCountryPickerTriggerProps = Omit<DropdownTriggerProps, 'children' | 'render' | 'nativeButton' | 'aria-label'> & {
|
|
4
|
-
country?: PhoneCountryOption;
|
|
2
|
+
export type PhoneCountryPickerTriggerProps = Omit<DropdownTriggerProps, 'aria-label'> & {
|
|
5
3
|
'aria-label': string;
|
|
6
4
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RadioGroupProps } from '../../../../primitives/input/RadioGroup/types/RadioGroupProps';
|
|
2
2
|
import { SegmentedControlOption } from './SegmentedControlOption';
|
|
3
3
|
import { SegmentedControlSize } from './SegmentedControlSize';
|
|
4
|
-
export type SegmentedControlProps<TValue extends string = string> = Omit<RadioGroupProps<TValue>, 'aria-label' | 'aria-labelledby' | 'children' | 'role'> & {
|
|
4
|
+
export type SegmentedControlProps<TValue extends string = string> = Omit<RadioGroupProps<TValue>, 'aria-label' | 'aria-labelledby' | 'children' | 'orientation' | 'role'> & {
|
|
5
5
|
itemWidth?: 'content' | 'equal';
|
|
6
6
|
options: readonly SegmentedControlOption<TValue>[];
|
|
7
7
|
size?: SegmentedControlSize;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
export { CountrySelect } from './CountrySelect/CountrySelect';
|
|
2
2
|
export type { CountryChoice } from './CountrySelect/types/CountryChoice';
|
|
3
|
+
export type { CountrySelectOptionsProps } from './CountrySelect/types/CountrySelectOptionsProps';
|
|
4
|
+
export type { CountrySelectOptionsState } from './CountrySelect/types/CountrySelectOptionsState';
|
|
3
5
|
export type { CountrySelectProps } from './CountrySelect/types/CountrySelectProps';
|
|
6
|
+
export type { CountrySelectRootProps } from './CountrySelect/types/CountrySelectRootProps';
|
|
7
|
+
export type { CountrySelectTriggerProps } from './CountrySelect/types/CountrySelectTriggerProps';
|
|
4
8
|
export { CurrencyPicker } from './CurrencyPicker/CurrencyPicker';
|
|
9
|
+
export type { CurrencyPickerChangeEventDetails } from './CurrencyPicker/types/CurrencyPickerChangeEventDetails';
|
|
5
10
|
export type { CurrencyPickerOption } from './CurrencyPicker/types/CurrencyPickerOption';
|
|
6
11
|
export type { CurrencyPickerOptionsProps } from './CurrencyPicker/types/CurrencyPickerOptionsProps';
|
|
12
|
+
export type { CurrencyPickerProps } from './CurrencyPicker/types/CurrencyPickerProps';
|
|
13
|
+
export type { CurrencyPickerRootProps } from './CurrencyPicker/types/CurrencyPickerRootProps';
|
|
14
|
+
export type { CurrencyPickerState } from './CurrencyPicker/types/CurrencyPickerState';
|
|
7
15
|
export type { CurrencyPickerTriggerProps } from './CurrencyPicker/types/CurrencyPickerTriggerProps';
|
|
8
16
|
export { IconButton } from './IconButton/IconButton';
|
|
9
17
|
export type { IconButtonProps } from './IconButton/types/IconButtonProps';
|
|
@@ -20,6 +28,8 @@ export type { NumberStepperProps } from './NumberStepper/types/NumberStepperProp
|
|
|
20
28
|
export { PhoneCountryPicker } from './PhoneCountryPicker/PhoneCountryPicker';
|
|
21
29
|
export type { PhoneCountryOption } from './PhoneCountryPicker/types/PhoneCountryOption';
|
|
22
30
|
export type { PhoneCountryPickerOptionsProps } from './PhoneCountryPicker/types/PhoneCountryPickerOptionsProps';
|
|
31
|
+
export type { PhoneCountryPickerProps } from './PhoneCountryPicker/types/PhoneCountryPickerProps';
|
|
32
|
+
export type { PhoneCountryPickerRootProps } from './PhoneCountryPicker/types/PhoneCountryPickerRootProps';
|
|
23
33
|
export type { PhoneCountryPickerTriggerProps } from './PhoneCountryPicker/types/PhoneCountryPickerTriggerProps';
|
|
24
34
|
export { SearchInput } from './SearchInput/SearchInput';
|
|
25
35
|
export type { SearchInputProps } from './SearchInput/types/SearchInputProps';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../input-CvZ_uB_9.cjs"),t=require("../Dropdown-DlItz8Gh.cjs");exports.CountrySelect=e.CountrySelect;exports.CurrencyPicker=e.CurrencyPicker;exports.IconButton=t.IconButton;exports.ImageInput=e.ImageInput;exports.LightButton=e.LightButton;exports.LightIconButton=t.LightIconButton;exports.MainButton=e.MainButton;exports.NumberStepper=e.NumberStepper;exports.PhoneCountryPicker=e.PhoneCountryPicker;exports.SearchInput=e.SearchInput;exports.SegmentedControl=e.SegmentedControl;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { n, r as o } from "../
|
|
2
|
-
import { a
|
|
1
|
+
import { a as o, c as a, i as n, l as r, n as e, o as s, r as u, s as i, t as c } from "../input-Qn5_aFYU.js";
|
|
2
|
+
import { a as p, i as I } from "../Dropdown-ChTVyesF.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
r as CountrySelect,
|
|
5
|
+
a as CurrencyPicker,
|
|
6
|
+
p as IconButton,
|
|
7
|
+
i as ImageInput,
|
|
8
|
+
s as LightButton,
|
|
9
|
+
I as LightIconButton,
|
|
10
|
+
o as MainButton,
|
|
11
|
+
n as NumberStepper,
|
|
12
|
+
u as PhoneCountryPicker,
|
|
13
|
+
e as SearchInput,
|
|
14
|
+
c as SegmentedControl
|
|
15
15
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export declare const measureItemWidths: ({ items, itemElements,
|
|
1
|
+
export declare const measureItemWidths: ({ items, itemElements, }: {
|
|
2
2
|
items: HTMLElement;
|
|
3
3
|
itemElements: Element[];
|
|
4
|
-
supportsSynchronousLayout: boolean;
|
|
5
4
|
}) => number[];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { OverflowingListLayout } from './types/OverflowingListLayout';
|
|
2
|
-
export declare const measureOverflowingListLayout: ({ container, items, trigger, itemElements, itemCount, reserveCountSpace,
|
|
2
|
+
export declare const measureOverflowingListLayout: ({ container, items, trigger, itemElements, itemCount, reserveCountSpace, }: {
|
|
3
3
|
container: HTMLElement;
|
|
4
4
|
items: HTMLElement;
|
|
5
5
|
trigger: HTMLElement | null;
|
|
6
6
|
itemElements: Element[];
|
|
7
7
|
itemCount: number;
|
|
8
8
|
reserveCountSpace: boolean;
|
|
9
|
-
supportsSynchronousLayout: boolean;
|
|
10
9
|
}) => OverflowingListLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../layout-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../layout-iSfGrMrH.cjs");exports.AnimatedIconCrossfade=e.AnimatedIconCrossfade;exports.OverflowingList=e.OverflowingList;exports.Section=e.Section;
|
|
@@ -5,8 +5,9 @@ export declare const Dropdown: {
|
|
|
5
5
|
Trigger: ({ onKeyDown, onClick, ref, ...props }: import('..').DropdownTriggerProps) => import("react").JSX.Element;
|
|
6
6
|
Content: ({ side, align, sideOffset, alignOffset, anchor, collisionPadding, container, keepMounted, width, className, style, children, initialFocus, onKeyDown, onFocus, onInput, onClick, onMouseDown, onPointerDown, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...props }: import('..').DropdownContentProps) => import("react").JSX.Element;
|
|
7
7
|
ActionItem: ({ color, startIcon, endIcon, description, descriptionPlacement, shortcut, shortcutJoinLabel, hasSubmenu, actions, actionsVisibility, children, render, disabled, nativeButton, closeOnClick, onClick, page, id, ...props }: import('..').DropdownActionItemProps) => import("react").JSX.Element;
|
|
8
|
-
OptionItem: ({ selected, indicator, onSelect, closeOnSelect, color, startIcon, endIcon, description, descriptionPlacement, shortcut, shortcutJoinLabel, hasSubmenu, actions, actionsVisibility, children, render, disabled, nativeButton, onClick, id, ...props }: import('..').DropdownOptionItemProps) => import("react").JSX.Element;
|
|
9
|
-
|
|
8
|
+
OptionItem: ({ value, selected: standaloneSelected, indicator, onSelect, closeOnSelect, color, startIcon, endIcon, description, descriptionPlacement, shortcut, shortcutJoinLabel, hasSubmenu, actions, actionsVisibility, children, render, disabled, nativeButton, onClick, id, ...props }: import('..').DropdownOptionItemProps) => import("react").JSX.Element;
|
|
9
|
+
SelectionGroup: (props: import('..').DropdownSelectionGroupProps) => import("react").JSX.Element;
|
|
10
|
+
Search: ({ onValueChange, onBlur, className, value, ref, ...props }: import('..').DropdownSearchProps) => import("react").JSX.Element;
|
|
10
11
|
Header: ({ render, ref, className, ...props }: import('..').DropdownHeaderProps) => ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
11
12
|
Title: ({ className, render, ref, ...props }: import('..').DropdownTitleProps) => import("react").JSX.Element;
|
|
12
13
|
Close: ({ render, children, "aria-label": ariaLabel, ...props }: import('..').DropdownCloseProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DropdownSelectionGroupsExample: () => import("react").JSX.Element;
|
|
@@ -3,7 +3,8 @@ import { DropdownType } from '../types/DropdownType';
|
|
|
3
3
|
import { DropdownFocusTarget } from './DropdownFocusTarget';
|
|
4
4
|
import { DropdownPageFocusRequest } from './DropdownPageFocusRequest';
|
|
5
5
|
import { DropdownRowFocus } from './DropdownRowFocus';
|
|
6
|
-
|
|
6
|
+
import { useDropdownSelections } from './useDropdownSelections';
|
|
7
|
+
export type DropdownContextValue = ReturnType<typeof useDropdownSelections> & {
|
|
7
8
|
type: DropdownType;
|
|
8
9
|
rootType: DropdownType;
|
|
9
10
|
open: boolean;
|
|
@@ -23,6 +24,10 @@ export type DropdownContextValue = {
|
|
|
23
24
|
setFocusOnOpen: (focusOnOpen: boolean) => void;
|
|
24
25
|
setOpen: (open: boolean) => void;
|
|
25
26
|
closeTree: (tabOutEvent?: Event) => void;
|
|
27
|
+
tabForwardOutOfTree: (tab: {
|
|
28
|
+
ownerDocument: Document;
|
|
29
|
+
tabOutEvent: Event;
|
|
30
|
+
}) => void;
|
|
26
31
|
goToPage: (page: {
|
|
27
32
|
id: string;
|
|
28
33
|
trigger?: DropdownFocusTarget;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DropdownOptionItemProps } from '../types/DropdownOptionItemProps';
|
|
2
|
-
export declare const DropdownOptionItem: ({ selected, indicator, onSelect, closeOnSelect, color, startIcon, endIcon, description, descriptionPlacement, shortcut, shortcutJoinLabel, hasSubmenu, actions, actionsVisibility, children, render, disabled, nativeButton, onClick, id, ...props }: DropdownOptionItemProps) => import("react").JSX.Element;
|
|
2
|
+
export declare const DropdownOptionItem: ({ value, selected: standaloneSelected, indicator, onSelect, closeOnSelect, color, startIcon, endIcon, description, descriptionPlacement, shortcut, shortcutJoinLabel, hasSubmenu, actions, actionsVisibility, children, render, disabled, nativeButton, onClick, id, ...props }: DropdownOptionItemProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { DropdownOptionItemState } from '../types/DropdownOptionItemState';
|
|
3
|
+
type DropdownOptionItemOwnerProps = useRender.ComponentProps<'button', DropdownOptionItemState> & {
|
|
4
|
+
state: DropdownOptionItemState;
|
|
5
|
+
};
|
|
6
|
+
export declare const DropdownOptionItemOwner: ({ render, ref, state, ...props }: DropdownOptionItemOwnerProps) => import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
7
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DropdownSearchProps } from '../types/DropdownSearchProps';
|
|
2
|
-
export declare const DropdownSearch: ({ onValueChange, className, ...props }: DropdownSearchProps) => import("react").JSX.Element;
|
|
2
|
+
export declare const DropdownSearch: ({ onValueChange, onBlur, className, value, ref, ...props }: DropdownSearchProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { DropdownSearchProps } from '../types/DropdownSearchProps';
|
|
3
|
+
type DropdownSearchEffectProps = {
|
|
4
|
+
searchRef: RefObject<HTMLInputElement | null>;
|
|
5
|
+
value: DropdownSearchProps['value'];
|
|
6
|
+
};
|
|
7
|
+
export declare const DropdownSearchEffect: ({ searchRef, value, }: DropdownSearchEffectProps) => null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DropdownSelectionGroupChangeEventDetails } from '../types/DropdownSelectionGroupChangeEventDetails';
|
|
2
|
+
import { DropdownSelectionGroupState } from '../types/DropdownSelectionGroupState';
|
|
3
|
+
export type DropdownSelectionContextValue = DropdownSelectionGroupState & {
|
|
4
|
+
closeOnSelect: boolean;
|
|
5
|
+
select: (selection: {
|
|
6
|
+
value: string;
|
|
7
|
+
eventDetails: DropdownSelectionGroupChangeEventDetails;
|
|
8
|
+
}) => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DropdownSelectionGroupState } from '../types/DropdownSelectionGroupState';
|
|
2
|
+
type DropdownSelectionGroupEffectProps = {
|
|
3
|
+
id: string;
|
|
4
|
+
initialState: DropdownSelectionGroupState;
|
|
5
|
+
initializeSelection: (selection: {
|
|
6
|
+
id: string;
|
|
7
|
+
state: DropdownSelectionGroupState;
|
|
8
|
+
}) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const DropdownSelectionGroupEffect: ({ id, initialState, initializeSelection, }: DropdownSelectionGroupEffectProps) => null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DropdownSelectionGroupChangeEventDetails } from '../types/DropdownSelectionGroupChangeEventDetails';
|
|
2
|
+
export declare const createDropdownSelectionEventDetails: ({ event, trigger, }: {
|
|
3
|
+
event: DropdownSelectionGroupChangeEventDetails["event"];
|
|
4
|
+
trigger: Element;
|
|
5
|
+
}) => DropdownSelectionGroupChangeEventDetails;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DropdownSelectionGroupChangeEventDetails } from '../types/DropdownSelectionGroupChangeEventDetails';
|
|
2
|
+
export declare const dropdownItemActivation: {
|
|
3
|
+
activate: ({ item, event }: {
|
|
4
|
+
item: HTMLElement;
|
|
5
|
+
event: KeyboardEvent;
|
|
6
|
+
}) => void;
|
|
7
|
+
getEvent: ({ item, event, }: {
|
|
8
|
+
item: HTMLElement;
|
|
9
|
+
event: DropdownSelectionGroupChangeEventDetails["event"];
|
|
10
|
+
}) => KeyboardEvent | MouseEvent;
|
|
11
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DropdownOptionItemProps } from '../types/DropdownOptionItemProps';
|
|
2
2
|
export declare const getDropdownItemExplicitId: ({ id, render, }: {
|
|
3
3
|
id?: string;
|
|
4
|
-
render?:
|
|
4
|
+
render?: DropdownOptionItemProps["render"];
|
|
5
5
|
}) => string | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DropdownOptionItemProps } from '../types/DropdownOptionItemProps';
|
|
2
|
+
import { DropdownType } from '../types/DropdownType';
|
|
3
|
+
export declare const getDropdownOptionItemRole: ({ type, hasSelectionState, hasSelectionOwner, multiple, role, }: {
|
|
4
|
+
type: DropdownType;
|
|
5
|
+
hasSelectionState: boolean;
|
|
6
|
+
hasSelectionOwner: boolean;
|
|
7
|
+
multiple: boolean;
|
|
8
|
+
role: DropdownOptionItemProps["role"];
|
|
9
|
+
}) => DropdownOptionItemProps["role"];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DropdownSelectionGroupProps } from '../types/DropdownSelectionGroupProps';
|
|
2
|
+
import { DropdownSelectionGroupState } from '../types/DropdownSelectionGroupState';
|
|
3
|
+
export declare const getDropdownSelectionGroupState: ({ props, storedState, }: {
|
|
4
|
+
props: DropdownSelectionGroupProps;
|
|
5
|
+
storedState?: DropdownSelectionGroupState;
|
|
6
|
+
}) => DropdownSelectionGroupState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getTrailingFocusGuard: (element: Element | null) => HTMLElement | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DropdownSelectionContextValue } from './DropdownSelectionContextValue';
|
|
2
|
+
export declare const isDropdownOptionItemSelected: ({ selection, value, standaloneSelected, }: {
|
|
3
|
+
selection: DropdownSelectionContextValue | undefined;
|
|
4
|
+
value: string | undefined;
|
|
5
|
+
standaloneSelected: boolean | undefined;
|
|
6
|
+
}) => boolean | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DropdownSelectionGroupState } from '../types/DropdownSelectionGroupState';
|
|
2
|
+
export declare const useDropdownSelections: () => {
|
|
3
|
+
selections: Map<string, DropdownSelectionGroupState>;
|
|
4
|
+
initializeSelection: ({ id, state }: {
|
|
5
|
+
id: string;
|
|
6
|
+
state: DropdownSelectionGroupState;
|
|
7
|
+
}) => void;
|
|
8
|
+
updateSelection: ({ id, state }: {
|
|
9
|
+
id: string;
|
|
10
|
+
state: DropdownSelectionGroupState;
|
|
11
|
+
}) => void;
|
|
12
|
+
};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { DropdownActionItemProps } from './DropdownActionItemProps';
|
|
2
|
-
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import { DropdownOptionItemState } from './DropdownOptionItemState';
|
|
4
|
+
import { DropdownOptionItemSelectEventDetails } from './DropdownOptionItemSelectEventDetails';
|
|
5
|
+
export type DropdownOptionItemProps = Omit<DropdownActionItemProps, 'page' | 'closeOnClick' | 'onSelect' | 'render' | 'value'> & {
|
|
6
|
+
value?: string;
|
|
7
|
+
render?: useRender.ComponentProps<'button', DropdownOptionItemState>['render'];
|
|
3
8
|
selected?: boolean;
|
|
4
9
|
indicator?: 'check' | 'checkbox' | 'none';
|
|
5
|
-
onSelect?: () => void;
|
|
10
|
+
onSelect?: (eventDetails: DropdownOptionItemSelectEventDetails) => void;
|
|
6
11
|
closeOnSelect?: boolean;
|
|
7
12
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { DropdownSelectionGroupChangeEventDetails } from './DropdownSelectionGroupChangeEventDetails';
|
|
3
|
+
import { DropdownSelectionGroupState } from './DropdownSelectionGroupState';
|
|
4
|
+
type DropdownSelectionGroupValueProps<TValue> = {
|
|
5
|
+
defaultValue?: TValue;
|
|
6
|
+
onValueChange?: (value: TValue, eventDetails: DropdownSelectionGroupChangeEventDetails) => void;
|
|
7
|
+
} & ({
|
|
8
|
+
id?: string;
|
|
9
|
+
value: TValue;
|
|
10
|
+
} | {
|
|
11
|
+
id: string;
|
|
12
|
+
value?: TValue;
|
|
13
|
+
});
|
|
14
|
+
export type DropdownSelectionGroupProps = Omit<useRender.ComponentProps<'div', DropdownSelectionGroupState>, 'id' | 'defaultValue' | 'onChange'> & {
|
|
15
|
+
closeOnSelect?: boolean;
|
|
16
|
+
} & (({
|
|
17
|
+
multiple?: false;
|
|
18
|
+
} & DropdownSelectionGroupValueProps<string | null>) | ({
|
|
19
|
+
multiple: true;
|
|
20
|
+
} & DropdownSelectionGroupValueProps<string[]>));
|
|
21
|
+
export {};
|