twenty-ui 2.47.0 → 2.49.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/README.md +27 -2
- package/dist/{AllIcons-DrlkKKQf.cjs → AllIcons-Cyd7721G.cjs} +1 -1
- package/dist/{AllIcons-G3nKeM41.js → AllIcons-D132B8_i.js} +1 -1
- package/dist/Avatar-C6WxBgjS.cjs +1 -0
- package/dist/{Avatar-D-QA0RE5.js → Avatar-ifVlxbx_.js} +18 -17
- package/dist/{Button-Cs07psdD.js → Button-DIw804CX.js} +1 -1
- package/dist/{Button-COxEKIHL.cjs → Button-DTm1WDzp.cjs} +1 -1
- package/dist/Dropdown-1OAJvS1f.js +1000 -0
- package/dist/Dropdown-Bl4OXCf9.cjs +1 -0
- package/dist/{ListItem-CXu35dzp.js → ListItem-DizNUBT8.js} +4 -4
- package/dist/{ListItem-q6DHGlev.cjs → ListItem-DwBb-I1D.cjs} +1 -1
- package/dist/ListItem.module-BJ9Ttjrc.js +34 -0
- package/dist/ListItem.module-CO4u2oeF.cjs +1 -0
- package/dist/OverflowingTextWithTooltip-BmUROIah.js +90 -0
- package/dist/OverflowingTextWithTooltip-Z2daM0_x.cjs +1 -0
- package/dist/{ProgressBar-D_3Gia0E.js → ProgressBar-B3xACTV2.js} +1 -1
- package/dist/{ProgressBar-oF1qVHFx.cjs → ProgressBar-OpSMnDBz.cjs} +1 -1
- package/dist/{Radio-BMoQHDe7.js → Radio-BEAztmPu.js} +1 -1
- package/dist/{Radio-D_YUizSv.cjs → Radio-Dx6b4SYZ.cjs} +1 -1
- package/dist/ResizeHandle-B1MuHTNA.cjs +1 -0
- package/dist/{ResizeHandle-Bjg4R0c-.js → ResizeHandle-B30OYZxS.js} +57 -55
- package/dist/Shortcut-Bp9iDdQg.js +73 -0
- package/dist/Shortcut-N8TELGPI.cjs +1 -0
- package/dist/TabsTabContent-Co27Y2TU.cjs +1 -0
- package/dist/TabsTabContent-DVcObDp6.js +39 -0
- package/dist/{TintedIconTile-4BGa8g8n.js → TintedIconTile-B1XDtGrF.js} +1 -1
- package/dist/{TintedIconTile-CU2hCerq.cjs → TintedIconTile-DO1XJXCQ.cjs} +1 -1
- package/dist/Tooltip-Bg9Uk01p.cjs +1 -0
- package/dist/Tooltip-cLCgtFBF.js +124 -0
- package/dist/components/__stories__/reading-direction/DirectionalLayoutExample.d.ts +3 -1
- package/dist/components/code-editor/CodeEditor/CodeEditor.d.ts +1 -1
- package/dist/components/code-editor/CodeEditor/__stories__/ControlledCodeEditor.d.ts +2 -0
- package/dist/components/code-editor/CodeEditor/__stories__/ModelCodeEditor.d.ts +2 -0
- package/dist/components/code-editor/CodeEditor/__stories__/ResizableCodeEditor.d.ts +2 -0
- package/dist/components/code-editor/CodeEditor/__stories__/ThemedCodeEditor.d.ts +2 -0
- package/dist/components/code-editor/CodeEditor/__stories__/UnmountingCodeEditor.d.ts +2 -0
- package/dist/components/code-editor/CodeEditor/__stories__/waitForCodeEditorContent.d.ts +4 -1
- package/dist/components/code-editor/CodeEditor/internal/CodeEditorAutoHeightEffect.d.ts +9 -0
- package/dist/components/code-editor/CodeEditor/internal/CodeEditorLifecycleEffect.d.ts +11 -0
- package/dist/components/code-editor/CodeEditor/internal/CodeEditorLoaderConfigurationEffect.d.ts +7 -0
- package/dist/components/code-editor/CodeEditor/internal/CodeEditorMarkersEffect.d.ts +10 -0
- package/dist/components/code-editor/CodeEditor/internal/CodeEditorResizableHeightEffect.d.ts +11 -0
- package/dist/components/code-editor/CodeEditor/internal/CodeEditorThemeEffect.d.ts +10 -0
- package/dist/components/code-editor/CodeEditor/internal/constants/CodeEditorDefaultHeight.d.ts +1 -0
- package/dist/components/code-editor/CodeEditor/internal/types/ResizedCodeEditorHeight.d.ts +4 -0
- package/dist/components/code-editor/CodeEditor/internal/useCodeEditorHeight.d.ts +13 -0
- package/dist/components/code-editor/CodeEditor/internal/utils/defineCodeEditorDefaultTheme.d.ts +7 -0
- package/dist/components/code-editor/CodeEditor/internal/utils/getBaseCodeEditorTheme.d.ts +4 -1
- package/dist/components/code-editor/CodeEditor/internal/utils/getBoundedCodeEditorHeight.d.ts +1 -0
- package/dist/components/code-editor/CodeEditor/internal/utils/getCurrentCodeEditorHeight.d.ts +7 -0
- package/dist/components/code-editor/CodeEditor/internal/utils/getResizableCodeEditorHeight.d.ts +5 -0
- package/dist/components/code-editor/CodeEditor/types/CodeEditorProps.d.ts +4 -2
- package/dist/components/code-editor.cjs +1 -1
- package/dist/components/code-editor.mjs +268 -155
- package/dist/components/data-display.cjs +1 -1
- package/dist/components/data-display.mjs +2 -2
- package/dist/components/feedback/Toast/internal/components/ToastCountdownEffect.d.ts +4 -3
- package/dist/components/feedback/Toast/internal/components/ToastProviderLifecycleEffect.d.ts +3 -0
- package/dist/components/feedback/Toast/internal/constants/DefaultToastDuration.d.ts +1 -0
- package/dist/components/feedback/Toast/internal/contexts/ToastContext.d.ts +60 -1
- package/dist/components/feedback/Toast/internal/contexts/ToastTimingContext.d.ts +12 -2
- package/dist/components/feedback/Toast/internal/hooks/useToastContext.d.ts +60 -1
- package/dist/components/feedback/Toast/internal/hooks/useToastCountdown.d.ts +26 -0
- package/dist/components/feedback/Toast/internal/stores/createToastStore.d.ts +60 -1
- package/dist/components/feedback/Toast/internal/utils/assertValidToastLimit.d.ts +1 -0
- package/dist/components/feedback/Toast/internal/utils/completeToastExit.d.ts +3 -2
- package/dist/components/feedback/Toast/internal/utils/createToastCountdownStore.d.ts +22 -0
- package/dist/components/feedback/Toast/internal/utils/createToastLifecycle.d.ts +62 -0
- package/dist/components/feedback/Toast/internal/utils/dismissToasts.d.ts +3 -2
- package/dist/components/feedback/Toast/internal/utils/updateToastLimit.d.ts +5 -0
- package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleControls.d.ts +7 -0
- package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleExample.d.ts +2 -0
- package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleExampleProps.d.ts +7 -0
- package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleTimingOverrideExample.d.ts +9 -0
- package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleUnrelatedNotificationActions.d.ts +5 -0
- package/dist/components/feedback/Toaster/__stories__/ToasterPortalExample.d.ts +5 -0
- package/dist/components/feedback/Toaster/__stories__/ToasterProviderLayoutReplayEffect.d.ts +4 -0
- package/dist/components/feedback/Toaster/__stories__/ToasterProviderPassiveReplayEffect.d.ts +4 -0
- package/dist/components/feedback/Toaster/__stories__/ToasterProviderReplayExample.d.ts +6 -0
- package/dist/components/feedback/Toaster/__stories__/ToasterProviderSuspenseExample.d.ts +4 -0
- package/dist/components/feedback/Toaster/__stories__/ToasterProviderSuspension.d.ts +5 -0
- package/dist/components/feedback/Toaster/internal/ToasterItemExitEffect.d.ts +2 -1
- 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/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/input/SearchInput/types/SearchInputProps.d.ts +2 -3
- package/dist/components/input/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/components/input/SegmentedControl/types/SegmentedControlProps.d.ts +2 -0
- package/dist/components/input/SegmentedControl/types/SegmentedControlSize.d.ts +1 -0
- package/dist/components/input/index.d.ts +11 -0
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.mjs +13 -13
- package/dist/components/layout/OverflowingList/OverflowingList.d.ts +1 -1
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListActionsExample.d.ts +7 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListCanceledCloseExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListControlledExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListControlledStateExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListDisabledTriggerFocusExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListEventBlockingExample.d.ts +7 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListFocusExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListInstanceCleanupExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListStateExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListTriggerRefExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/internal/OverflowingListItem.d.ts +8 -2
- package/dist/components/layout/OverflowingList/internal/OverflowingListItemFocusEffect.d.ts +8 -0
- package/dist/components/layout/OverflowingList/internal/OverflowingListLayoutEffect.d.ts +16 -0
- package/dist/components/layout/OverflowingList/internal/OverflowingListPopupTarget.d.ts +10 -0
- package/dist/components/layout/OverflowingList/internal/focusOverflowingListFallback.d.ts +8 -0
- package/dist/components/layout/OverflowingList/internal/measureItemWidths.d.ts +1 -2
- package/dist/components/layout/OverflowingList/internal/measureOverflowingListLayout.d.ts +9 -0
- package/dist/components/layout/OverflowingList/internal/types/OverflowingListLayout.d.ts +4 -0
- package/dist/components/layout/OverflowingList/internal/useFocusedElementUnmountRef.d.ts +1 -1
- package/dist/components/layout/OverflowingList/internal/useOverflowingListFocus.d.ts +30 -0
- package/dist/components/layout/OverflowingList/internal/useOverflowingListLayout.d.ts +6 -6
- package/dist/components/layout/OverflowingList/types/OverflowingListProps.d.ts +7 -2
- package/dist/components/layout.cjs +1 -1
- package/dist/components/layout.mjs +1 -1
- package/dist/components/navigation/Dropdown/Dropdown.d.ts +5 -4
- 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/DropdownActionItem.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownContent.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +12 -6
- 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/DropdownRowFocus.d.ts +5 -0
- package/dist/components/navigation/Dropdown/internal/DropdownRowsEffect.d.ts +5 -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/DropdownSubmenuTrigger.d.ts +1 -1
- 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 +5 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownOptionItemRole.d.ts +9 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownRows.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownSearch.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownSelectionGroupState.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownTabStopRowId.d.ts +4 -0
- package/dist/components/navigation/Dropdown/internal/getTrailingFocusGuard.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/isDropdownDismissPrevented.d.ts +2 -1
- package/dist/components/navigation/Dropdown/internal/isDropdownOptionItemSelected.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/isDropdownRow.d.ts +4 -0
- package/dist/components/navigation/Dropdown/internal/isEnabledDropdownItem.d.ts +4 -0
- package/dist/components/navigation/Dropdown/internal/useDropdownItemFocus.d.ts +0 -1
- package/dist/components/navigation/Dropdown/internal/useDropdownKeyboardNavigation.d.ts +1 -6
- 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 -0
- package/dist/components/navigation.cjs +1 -1
- package/dist/components/navigation.mjs +2 -2
- package/dist/components/settings.cjs +1 -1
- package/dist/components/settings.mjs +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +22 -22
- package/dist/data-display-BSKGlijb.cjs +1 -0
- package/dist/{data-display-DU3G8ZyI.js → data-display-BtXCGOGw.js} +82 -81
- package/dist/data-display-DtXIhJ4B.js +184 -0
- package/dist/data-display-XV3ht1rC.cjs +2 -0
- package/dist/doNotTranslate-BSVT8Xyd.js +4 -0
- package/dist/doNotTranslate-CHE7WmRS.cjs +1 -0
- package/dist/feedback-Cs-38OH4.cjs +1 -0
- package/dist/feedback-DTyVVcTb.js +665 -0
- package/dist/icon/components/TablerIcons.d.ts +1 -1
- package/dist/icon/constants/TwentyIconDictionary.d.ts +7 -7
- package/dist/icon/index.d.ts +1 -1
- package/dist/{icon-JuDK6Wxr.cjs → icon-BNcdwwdl.cjs} +1 -1
- package/dist/{icon-BdXwnJA6.js → icon-CUE-QGQK.js} +129 -128
- package/dist/icon.cjs +1 -1
- package/dist/icon.mjs +77 -76
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +222 -220
- package/dist/{input-Bnu5kNjg.cjs → input-B_rBplmn.cjs} +1 -1
- package/dist/input-BrjD91wv.js +785 -0
- package/dist/input-ChlFcqIS.cjs +1 -0
- package/dist/{input-vl6yK36n.js → input-D1oyk0tD.js} +4 -4
- package/dist/layout-CthYckvl.cjs +1 -0
- package/dist/layout-DQcjBu08.js +439 -0
- package/dist/{navigation-itBinyPi.js → navigation-B6nka3bW.js} +127 -130
- package/dist/navigation-CIVYqPc5.js +132 -0
- package/dist/navigation-CflGBYv-.cjs +1 -0
- package/dist/navigation-DoInK0Sp.cjs +1 -0
- package/dist/preventDismissingClickActivation-AaqHBLnW.js +45 -0
- package/dist/preventDismissingClickActivation-CIhWvKCu.cjs +1 -0
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +2 -2
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +1 -1
- package/dist/primitives/input/Radio/__stories__/RadioCardContent.d.ts +8 -0
- 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.cjs +1 -1
- package/dist/primitives/navigation.mjs +2 -2
- package/dist/primitives/surfaces/Tooltip/Tooltip.d.ts +1 -1
- package/dist/primitives/surfaces/Tooltip/internal/TooltipPopup.d.ts +1 -1
- package/dist/primitives/surfaces/Tooltip/types/TooltipPopupProps.d.ts +2 -0
- package/dist/primitives/surfaces.cjs +1 -1
- package/dist/primitives/surfaces.mjs +2 -2
- package/dist/primitives/typography/OverflowingTextWithTooltip/OverflowingTextTooltipModeProvider.d.ts +6 -0
- package/dist/primitives/typography/OverflowingTextWithTooltip/internal/OverflowingTextTooltipModeContext.d.ts +2 -0
- package/dist/primitives/typography/OverflowingTextWithTooltip/internal/isElementOverflowing.d.ts +1 -0
- package/dist/primitives/typography/OverflowingTextWithTooltip/types/OverflowingTextTooltipMode.d.ts +1 -0
- package/dist/primitives/typography/Shortcut/Shortcut.d.ts +1 -1
- package/dist/primitives/typography/Shortcut/internal/getShortcutPresentation.d.ts +1 -1
- package/dist/primitives/typography/Shortcut/types/ShortcutFormatOptions.d.ts +1 -0
- package/dist/primitives/typography/index.d.ts +2 -0
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +10 -9
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +37 -36
- package/dist/{settings-CC-2gcAx.js → settings-BgVuLpg9.js} +1 -1
- package/dist/{settings-BiSAY2oN.cjs → settings-CPXhrmbK.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/surfaces-0rL5DoHt.cjs +1 -0
- package/dist/{surfaces-DZ2A-Nb9.js → surfaces-BLsR5ka0.js} +54 -54
- package/dist/testing/GroupedCatalog.d.ts +14 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing.cjs +1 -1
- package/dist/testing.mjs +96 -66
- package/dist/typography-DT2eKLvd.js +11 -0
- package/dist/typography-bKeSMuJd.cjs +1 -0
- 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 +3 -3
- package/package.json +3 -3
- package/dist/Avatar-CQhIEazb.cjs +0 -1
- package/dist/Dropdown-BBUGkQQV.cjs +0 -1
- package/dist/Dropdown-CScN_olN.js +0 -784
- package/dist/ListItem.module-Ar-vZ7Qu.js +0 -34
- package/dist/ListItem.module-B8NeDH1P.cjs +0 -1
- package/dist/OverflowingTextWithTooltip-Be2-wCcZ.js +0 -88
- package/dist/OverflowingTextWithTooltip-BlufG-6n.cjs +0 -1
- package/dist/ResizeHandle-CNlQ4TEE.cjs +0 -1
- package/dist/Shortcut-DKfB0kej.js +0 -71
- package/dist/Shortcut-ZuZ-KYSk.cjs +0 -1
- package/dist/TabsTabContent-DZUNi_iE.cjs +0 -1
- package/dist/TabsTabContent-s6J5bZ3R.js +0 -39
- package/dist/Tooltip-BMkznyoi.js +0 -120
- package/dist/Tooltip-JOYVeSsf.cjs +0 -1
- package/dist/components/navigation/Dropdown/internal/DropdownSearchTargetEffect.d.ts +0 -5
- package/dist/data-display-BMV-nC-9.js +0 -181
- package/dist/data-display-BkujQe5v.cjs +0 -1
- package/dist/data-display-DjhAHvj1.cjs +0 -2
- package/dist/feedback-B5x8tmnG.cjs +0 -1
- package/dist/feedback-DhilJ_fX.js +0 -509
- package/dist/input-BEKjAOjS.cjs +0 -1
- package/dist/input-BUgnp6eA.js +0 -559
- package/dist/layout-BKHabkTu.js +0 -267
- package/dist/layout-wuIu4rJ3.cjs +0 -1
- package/dist/navigation-B1hPNYv2.cjs +0 -1
- package/dist/navigation-Dg46Wr5m.js +0 -131
- package/dist/navigation-WsiYsmaq.cjs +0 -1
- package/dist/preventDismissingClickActivation-CzWqpjiX.js +0 -44
- package/dist/preventDismissingClickActivation-DZxTSLV3.cjs +0 -1
- package/dist/surfaces-vyAhk2Gw.cjs +0 -1
- package/dist/typography-8DF9mq2w.cjs +0 -1
- package/dist/typography-DmY7-GzQ.js +0 -5
- 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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { t } from "./isRenderableSlot-DT_depzM.js";
|
|
2
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
3
|
+
var v = "_root_1trvr_1", o = "_list_1trvr_10", i = "_tab_1trvr_37", c = "_content_1trvr_89", d = "_label_1trvr_108", b = "_startIcon_1trvr_114", m = "_badge_1trvr_115", p = "_panel_1trvr_130", h = "_indicator_1trvr_140", a = {
|
|
4
|
+
root: v,
|
|
5
|
+
list: o,
|
|
6
|
+
tab: i,
|
|
7
|
+
content: c,
|
|
8
|
+
label: d,
|
|
9
|
+
startIcon: b,
|
|
10
|
+
badge: m,
|
|
11
|
+
panel: p,
|
|
12
|
+
indicator: h
|
|
13
|
+
}, f = ({ children: n, startIcon: e, endIcon: _, badge: s }) => /* @__PURE__ */ l("span", {
|
|
14
|
+
className: a.content,
|
|
15
|
+
children: [
|
|
16
|
+
t(e) && /* @__PURE__ */ r("span", {
|
|
17
|
+
className: a.startIcon,
|
|
18
|
+
"aria-hidden": !0,
|
|
19
|
+
children: e
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ r("span", {
|
|
22
|
+
className: a.label,
|
|
23
|
+
children: n
|
|
24
|
+
}),
|
|
25
|
+
t(_) && /* @__PURE__ */ r("span", {
|
|
26
|
+
className: a.startIcon,
|
|
27
|
+
"aria-hidden": !0,
|
|
28
|
+
children: _
|
|
29
|
+
}),
|
|
30
|
+
t(s) && /* @__PURE__ */ r("span", {
|
|
31
|
+
className: a.badge,
|
|
32
|
+
children: s
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
a as n,
|
|
38
|
+
f as t
|
|
39
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as n, h as m } from "./theme-B2EaXhye.js";
|
|
2
|
-
import { s as C } from "./utilities-
|
|
2
|
+
import { s as C } from "./utilities-BKCMZyqZ.js";
|
|
3
3
|
import { useRender as u } from "@base-ui/react/use-render";
|
|
4
4
|
import { clsx as T } from "clsx";
|
|
5
5
|
import { jsx as _ } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const n=require("./theme-1XkFz8Qu.cjs"),_=require("./utilities-
|
|
1
|
+
const n=require("./theme-1XkFz8Qu.cjs"),_=require("./utilities-xZh8D2gd.cjs");let C=require("@base-ui/react/use-render"),b=require("clsx"),T=require("react/jsx-runtime");var o={background:4,border:6,icon:10},t=(r,e)=>n.themeCssVariables.color[`${r}${e}`]??n.themeCssVariables.tag.text[r],l=r=>{const e=_.parseThemeColor(r);return{backgroundColor:t(e,o.background),iconColor:t(e,o.icon),borderColor:t(e,o.border)}},g="_root_9ntdy_1",h={root:g},m=({icon:r,color:e=n.DEFAULT_THEME_COLOR_FALLBACK,className:c,style:a,render:u,ref:s,...d})=>{const i=l(e);return(0,C.useRender)({render:u,ref:s,props:{...d,className:(0,b.clsx)(h.root,c),style:{backgroundColor:i.backgroundColor,color:i.iconColor,...a},children:(0,T.jsx)("span",{"aria-hidden":"true",children:r})}})};Object.defineProperty(exports,"TintedIconTile",{enumerable:!0,get:function(){return m}});Object.defineProperty(exports,"getIconTileColorShades",{enumerable:!0,get:function(){return l}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const re=require("./theme-1XkFz8Qu.cjs"),ie=require("./isDefined-DS2Q42p5.cjs"),T=require("./mergeClassNames-D4lshrT6.cjs"),a=require("./isRenderableSlot-Guryb6Nf.cjs"),oe=require("./useProvidedTextDirection-PVaoQCLH.cjs");let p=require("@sniptt/guards"),e=require("react/jsx-runtime"),t=require("@base-ui/react/tooltip");var te="_positioner_16x57_1",se="_popup_16x57_8",ae="_content_16x57_50",ne="_title_16x57_56",le="_icon_16x57_68",pe="_description_16x57_78",de="_arrow_16x57_84",n={positioner:te,popup:se,content:ae,title:ne,icon:le,description:pe,arrow:de},v=({className:r,...o})=>(0,e.jsx)(t.Tooltip.Arrow,{...o,className:T.mergeClassNames(n.arrow,r)}),j=({children:r,description:o,startIcon:i})=>(0,e.jsxs)("div",{className:n.content,children:[a.isRenderableSlot(r)&&(0,e.jsxs)("div",{className:n.title,children:[a.isRenderableSlot(i)&&(0,e.jsx)("span",{className:n.icon,"aria-hidden":!0,children:i}),(0,e.jsx)("span",{children:r})]}),a.isRenderableSlot(o)&&(0,e.jsx)("div",{className:n.description,children:o})]}),g=({className:r,withExitAnimation:o=!1,maxWidth:i,style:l,...d})=>(0,e.jsx)(t.Tooltip.Popup,{role:"tooltip","data-with-exit-animation":o||void 0,...d,className:T.mergeClassNames(n.popup,r),style:c=>({"--tw-tooltip-max-width":(0,p.isNumber)(i)?`${i}px`:i,...(0,p.isFunction)(l)?l(c):l})}),b=({container:r,...o})=>{const i=re.useThemeContainer();return(0,e.jsx)(t.Tooltip.Portal,{...o,container:r??i??void 0})},h=({className:r,...o})=>{const i=oe.useProvidedTextDirection();return(0,e.jsx)(t.Tooltip.Positioner,{dir:i,...o,className:T.mergeClassNames(n.positioner,r)})},ce=10,ue="300px",_e=({content:r,children:o,description:i,startIcon:l,open:d,defaultOpen:c,onOpenChange:P,onOpenChangeComplete:q,disabled:N=!1,disableHoverablePopup:f,trackCursorAxis:w,actionsRef:R,handle:S,triggerId:D,defaultTriggerId:F,delay:A,closeDelay:H,closeOnClick:O,side:y="top",align:C="center",sideOffset:E=ce,alignOffset:L,anchor:B,positionMethod:U,collisionBoundary:V,collisionPadding:M,collisionAvoidance:X,sticky:$,arrowPadding:k,disableAnchorTracking:z,arrow:G=!1,maxWidth:I=ue,container:J,keepMounted:K,triggerProps:Q,positionerProps:Y,portalProps:Z,...W})=>{const u=a.isRenderableSlot(i),_=N||!(0,p.isFunction)(r)&&!a.isRenderableSlot(r)&&!u,x=(0,e.jsx)(t.Tooltip.Trigger,{render:o,delay:A,closeDelay:H,closeOnClick:O,...Q}),m=s=>{if(!(a.isRenderableSlot(s)||u))return(0,e.jsx)(e.Fragment,{children:x});const ee=(0,p.isString)(s)||(0,p.isNumber)(s)||u||a.isRenderableSlot(l);return(0,e.jsxs)(e.Fragment,{children:[x,(0,e.jsx)(b,{container:J,keepMounted:K,...Z,children:(0,e.jsx)(h,{side:y,align:C,sideOffset:E,alignOffset:L,anchor:B,positionMethod:U,collisionBoundary:V,collisionPadding:M,collisionAvoidance:X,sticky:$,arrowPadding:k,disableAnchorTracking:z,...Y,children:(0,e.jsxs)(g,{maxWidth:I,...W,children:[ee?(0,e.jsx)(j,{description:i,startIcon:l,children:s}):s,G&&(0,e.jsx)(v,{})]})})})]})};return(0,e.jsx)(t.Tooltip.Root,{open:ie.isDefined(d)?d&&!_:void 0,defaultOpen:c&&!_,onOpenChange:P,onOpenChangeComplete:q,disabled:_,disableHoverablePopup:f,trackCursorAxis:w,actionsRef:R,handle:S,triggerId:D,defaultTriggerId:F,children:(0,p.isFunction)(r)?s=>m(r(s)):m(r)})},Te=Object.assign(_e,{Root:t.Tooltip.Root,Trigger:t.Tooltip.Trigger,Portal:b,Positioner:h,Popup:g,Arrow:v,Viewport:t.Tooltip.Viewport,Provider:t.Tooltip.Provider,Handle:t.Tooltip.Handle,createHandle:t.Tooltip.createHandle});Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:function(){return Te}});Object.defineProperty(exports,"TooltipBody",{enumerable:!0,get:function(){return j}});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { t as er } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
+
import { t as tr } from "./theme-B2EaXhye.js";
|
|
3
|
+
import { t as u } from "./mergeClassNames-ClFMR1v0.js";
|
|
4
|
+
import { t as n } from "./isRenderableSlot-DT_depzM.js";
|
|
5
|
+
import { t as ar } from "./useProvidedTextDirection-Dk8LBQeF.js";
|
|
6
|
+
import { isFunction as v, isNumber as x, isString as nr } from "@sniptt/guards";
|
|
7
|
+
import { Fragment as h, jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
8
|
+
import { Tooltip as t } from "@base-ui/react/tooltip";
|
|
9
|
+
var sr = "_positioner_16x57_1", pr = "_popup_16x57_8", lr = "_content_16x57_50", dr = "_title_16x57_56", cr = "_icon_16x57_68", mr = "_description_16x57_78", _r = "_arrow_16x57_84", s = {
|
|
10
|
+
positioner: sr,
|
|
11
|
+
popup: pr,
|
|
12
|
+
content: lr,
|
|
13
|
+
title: dr,
|
|
14
|
+
icon: cr,
|
|
15
|
+
description: mr,
|
|
16
|
+
arrow: _r
|
|
17
|
+
}, g = ({ className: r, ...e }) => /* @__PURE__ */ o(t.Arrow, {
|
|
18
|
+
...e,
|
|
19
|
+
className: u(s.arrow, r)
|
|
20
|
+
}), vr = ({ children: r, description: e, startIcon: i }) => /* @__PURE__ */ d("div", {
|
|
21
|
+
className: s.content,
|
|
22
|
+
children: [n(r) && /* @__PURE__ */ d("div", {
|
|
23
|
+
className: s.title,
|
|
24
|
+
children: [n(i) && /* @__PURE__ */ o("span", {
|
|
25
|
+
className: s.icon,
|
|
26
|
+
"aria-hidden": !0,
|
|
27
|
+
children: i
|
|
28
|
+
}), /* @__PURE__ */ o("span", { children: r })]
|
|
29
|
+
}), n(e) && /* @__PURE__ */ o("div", {
|
|
30
|
+
className: s.description,
|
|
31
|
+
children: e
|
|
32
|
+
})]
|
|
33
|
+
}), P = ({ className: r, withExitAnimation: e = !1, maxWidth: i, style: p, ...l }) => /* @__PURE__ */ o(t.Popup, {
|
|
34
|
+
role: "tooltip",
|
|
35
|
+
"data-with-exit-animation": e || void 0,
|
|
36
|
+
...l,
|
|
37
|
+
className: u(s.popup, r),
|
|
38
|
+
style: (c) => ({
|
|
39
|
+
"--tw-tooltip-max-width": x(i) ? `${i}px` : i,
|
|
40
|
+
...v(p) ? p(c) : p
|
|
41
|
+
})
|
|
42
|
+
}), w = ({ container: r, ...e }) => {
|
|
43
|
+
const i = tr();
|
|
44
|
+
return /* @__PURE__ */ o(t.Portal, {
|
|
45
|
+
...e,
|
|
46
|
+
container: r ?? i ?? void 0
|
|
47
|
+
});
|
|
48
|
+
}, N = ({ className: r, ...e }) => {
|
|
49
|
+
const i = ar();
|
|
50
|
+
return /* @__PURE__ */ o(t.Positioner, {
|
|
51
|
+
dir: i,
|
|
52
|
+
...e,
|
|
53
|
+
className: u(s.positioner, r)
|
|
54
|
+
});
|
|
55
|
+
}, ur = 10, Tr = "300px", fr = ({ content: r, children: e, description: i, startIcon: p, open: l, defaultOpen: c, onOpenChange: D, onOpenChangeComplete: A, disabled: F = !1, disableHoverablePopup: b, trackCursorAxis: H, actionsRef: E, handle: R, triggerId: S, defaultTriggerId: j, delay: L, closeDelay: O, closeOnClick: U, side: V = "top", align: $ = "center", sideOffset: y = ur, alignOffset: B, anchor: C, positionMethod: M, collisionBoundary: X, collisionPadding: k, collisionAvoidance: q, sticky: z, arrowPadding: G, disableAnchorTracking: I, arrow: J = !1, maxWidth: K = Tr, container: Q, keepMounted: Y, triggerProps: Z, positionerProps: W, portalProps: rr, ...or }) => {
|
|
56
|
+
const m = n(i), _ = F || !v(r) && !n(r) && !m, T = /* @__PURE__ */ o(t.Trigger, {
|
|
57
|
+
render: e,
|
|
58
|
+
delay: L,
|
|
59
|
+
closeDelay: O,
|
|
60
|
+
closeOnClick: U,
|
|
61
|
+
...Z
|
|
62
|
+
}), f = (a) => {
|
|
63
|
+
if (!(n(a) || m)) return /* @__PURE__ */ o(h, { children: T });
|
|
64
|
+
const ir = nr(a) || x(a) || m || n(p);
|
|
65
|
+
return /* @__PURE__ */ d(h, { children: [T, /* @__PURE__ */ o(w, {
|
|
66
|
+
container: Q,
|
|
67
|
+
keepMounted: Y,
|
|
68
|
+
...rr,
|
|
69
|
+
children: /* @__PURE__ */ o(N, {
|
|
70
|
+
side: V,
|
|
71
|
+
align: $,
|
|
72
|
+
sideOffset: y,
|
|
73
|
+
alignOffset: B,
|
|
74
|
+
anchor: C,
|
|
75
|
+
positionMethod: M,
|
|
76
|
+
collisionBoundary: X,
|
|
77
|
+
collisionPadding: k,
|
|
78
|
+
collisionAvoidance: q,
|
|
79
|
+
sticky: z,
|
|
80
|
+
arrowPadding: G,
|
|
81
|
+
disableAnchorTracking: I,
|
|
82
|
+
...W,
|
|
83
|
+
children: /* @__PURE__ */ d(P, {
|
|
84
|
+
maxWidth: K,
|
|
85
|
+
...or,
|
|
86
|
+
children: [ir ? /* @__PURE__ */ o(vr, {
|
|
87
|
+
description: i,
|
|
88
|
+
startIcon: p,
|
|
89
|
+
children: a
|
|
90
|
+
}) : a, J && /* @__PURE__ */ o(g, {})]
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
})] });
|
|
94
|
+
};
|
|
95
|
+
return /* @__PURE__ */ o(t.Root, {
|
|
96
|
+
open: er(l) ? l && !_ : void 0,
|
|
97
|
+
defaultOpen: c && !_,
|
|
98
|
+
onOpenChange: D,
|
|
99
|
+
onOpenChangeComplete: A,
|
|
100
|
+
disabled: _,
|
|
101
|
+
disableHoverablePopup: b,
|
|
102
|
+
trackCursorAxis: H,
|
|
103
|
+
actionsRef: E,
|
|
104
|
+
handle: R,
|
|
105
|
+
triggerId: S,
|
|
106
|
+
defaultTriggerId: j,
|
|
107
|
+
children: v(r) ? (a) => f(r(a)) : f(r)
|
|
108
|
+
});
|
|
109
|
+
}, Fr = Object.assign(fr, {
|
|
110
|
+
Root: t.Root,
|
|
111
|
+
Trigger: t.Trigger,
|
|
112
|
+
Portal: w,
|
|
113
|
+
Positioner: N,
|
|
114
|
+
Popup: P,
|
|
115
|
+
Arrow: g,
|
|
116
|
+
Viewport: t.Viewport,
|
|
117
|
+
Provider: t.Provider,
|
|
118
|
+
Handle: t.Handle,
|
|
119
|
+
createHandle: t.createHandle
|
|
120
|
+
});
|
|
121
|
+
export {
|
|
122
|
+
vr as n,
|
|
123
|
+
Fr as t
|
|
124
|
+
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export declare const DirectionalLayoutExample: ({ direction, style, }: {
|
|
2
3
|
direction: "ltr" | "rtl";
|
|
4
|
+
style?: CSSProperties;
|
|
3
5
|
}) => import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CodeEditorProps } from './types/CodeEditorProps';
|
|
2
|
-
export declare const CodeEditor: ({
|
|
2
|
+
export declare const CodeEditor: ({ onMount, beforeMount, setMarkers, height, width, theme: requestedTheme, loading, variant, transparentBackground, isLoading, options, resizable, resizeLabel, contentPadding, autoHeight, containerProps, ref, ...editorProps }: CodeEditorProps) => import("react").JSX.Element;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export declare const waitForCodeEditorContent: (canvasElement
|
|
1
|
+
export declare const waitForCodeEditorContent: ({ canvasElement, expectedContent, }: {
|
|
2
|
+
canvasElement: HTMLElement;
|
|
3
|
+
expectedContent: string;
|
|
4
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { editor } from 'monaco-editor';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
type CodeEditorAutoHeightEffectProps = {
|
|
4
|
+
shouldAutoHeight: boolean;
|
|
5
|
+
editor: editor.IStandaloneCodeEditor | undefined;
|
|
6
|
+
setContentHeight: Dispatch<SetStateAction<number | undefined>>;
|
|
7
|
+
};
|
|
8
|
+
export declare const CodeEditorAutoHeightEffect: ({ shouldAutoHeight, editor, setContentHeight, }: CodeEditorAutoHeightEffectProps) => null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Monaco } from '@monaco-editor/react';
|
|
2
|
+
import { editor } from 'monaco-editor';
|
|
3
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
4
|
+
type CodeEditorLifecycleEffectProps = {
|
|
5
|
+
editor: editor.IStandaloneCodeEditor | undefined;
|
|
6
|
+
setEditor: Dispatch<SetStateAction<editor.IStandaloneCodeEditor | undefined>>;
|
|
7
|
+
setMonaco: Dispatch<SetStateAction<Monaco | undefined>>;
|
|
8
|
+
setIsEditorFocused: Dispatch<SetStateAction<boolean>>;
|
|
9
|
+
};
|
|
10
|
+
export declare const CodeEditorLifecycleEffect: ({ editor, setEditor, setMonaco, setIsEditorFocused, }: CodeEditorLifecycleEffectProps) => null;
|
|
11
|
+
export {};
|
package/dist/components/code-editor/CodeEditor/internal/CodeEditorLoaderConfigurationEffect.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
type CodeEditorLoaderConfigurationEffectProps = {
|
|
3
|
+
configureMonacoLoader: () => Promise<void>;
|
|
4
|
+
setIsMonacoLoaderConfigured: Dispatch<SetStateAction<boolean>>;
|
|
5
|
+
};
|
|
6
|
+
export declare const CodeEditorLoaderConfigurationEffect: ({ configureMonacoLoader, setIsMonacoLoaderConfigured, }: CodeEditorLoaderConfigurationEffectProps) => null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Monaco } from '@monaco-editor/react';
|
|
2
|
+
import { editor } from 'monaco-editor';
|
|
3
|
+
import { CodeEditorProps } from '../types/CodeEditorProps';
|
|
4
|
+
type CodeEditorMarkersEffectProps = {
|
|
5
|
+
editor: editor.IStandaloneCodeEditor | undefined;
|
|
6
|
+
monaco: Monaco | undefined;
|
|
7
|
+
setMarkers: CodeEditorProps['setMarkers'];
|
|
8
|
+
};
|
|
9
|
+
export declare const CodeEditorMarkersEffect: ({ editor, monaco, setMarkers, }: CodeEditorMarkersEffectProps) => null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { editor } from 'monaco-editor';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
import { ResizedCodeEditorHeight } from './types/ResizedCodeEditorHeight';
|
|
4
|
+
type CodeEditorResizableHeightEffectProps = {
|
|
5
|
+
height: number | string;
|
|
6
|
+
resizable: boolean;
|
|
7
|
+
editor: editor.IStandaloneCodeEditor | undefined;
|
|
8
|
+
setResizedHeight: Dispatch<SetStateAction<ResizedCodeEditorHeight | undefined>>;
|
|
9
|
+
};
|
|
10
|
+
export declare const CodeEditorResizableHeightEffect: ({ height, resizable, editor, setResizedHeight, }: CodeEditorResizableHeightEffectProps) => null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Monaco } from '@monaco-editor/react';
|
|
2
|
+
import { ThemeType } from '../../../../theme';
|
|
3
|
+
type CodeEditorThemeEffectProps = {
|
|
4
|
+
monaco: Monaco | undefined;
|
|
5
|
+
theme: ThemeType;
|
|
6
|
+
colorScheme: 'light' | 'dark';
|
|
7
|
+
editorTheme: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const CodeEditorThemeEffect: ({ monaco, theme, colorScheme, editorTheme, }: CodeEditorThemeEffectProps) => null;
|
|
10
|
+
export {};
|
package/dist/components/code-editor/CodeEditor/internal/constants/CodeEditorDefaultHeight.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CODE_EDITOR_DEFAULT_HEIGHT = 450;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ResizedCodeEditorHeight } from './types/ResizedCodeEditorHeight';
|
|
2
|
+
export declare const useCodeEditorHeight: ({ height, resizable, autoHeight, }: {
|
|
3
|
+
height: number | string;
|
|
4
|
+
resizable: boolean;
|
|
5
|
+
autoHeight: boolean;
|
|
6
|
+
}) => {
|
|
7
|
+
currentHeight: string | number;
|
|
8
|
+
resizableHeight: number;
|
|
9
|
+
setResizableHeight: (value: number) => void;
|
|
10
|
+
setResizedHeight: import('react').Dispatch<import('react').SetStateAction<ResizedCodeEditorHeight | undefined>>;
|
|
11
|
+
setContentHeight: import('react').Dispatch<import('react').SetStateAction<number | undefined>>;
|
|
12
|
+
shouldAutoHeight: boolean;
|
|
13
|
+
};
|
package/dist/components/code-editor/CodeEditor/internal/utils/defineCodeEditorDefaultTheme.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Monaco } from '@monaco-editor/react';
|
|
2
|
+
import { ThemeType } from '../../../../../theme';
|
|
3
|
+
export declare const defineCodeEditorDefaultTheme: ({ monaco, theme, colorScheme, }: {
|
|
4
|
+
monaco: Monaco;
|
|
5
|
+
theme: ThemeType;
|
|
6
|
+
colorScheme: "light" | "dark";
|
|
7
|
+
}) => void;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { ThemeType } from '../../../../../theme';
|
|
2
2
|
import { editor } from 'monaco-editor';
|
|
3
|
-
export declare const getBaseCodeEditorTheme: (theme
|
|
3
|
+
export declare const getBaseCodeEditorTheme: ({ theme, colorScheme, }: {
|
|
4
|
+
theme: ThemeType;
|
|
5
|
+
colorScheme: "light" | "dark";
|
|
6
|
+
}) => editor.IStandaloneThemeData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getBoundedCodeEditorHeight: (height: number) => number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const getCurrentCodeEditorHeight: ({ height, resizableHeight, contentHeight, shouldUseResizableHeight, shouldAutoHeight, }: {
|
|
2
|
+
height: number | string;
|
|
3
|
+
resizableHeight: number;
|
|
4
|
+
contentHeight: number | undefined;
|
|
5
|
+
shouldUseResizableHeight: boolean;
|
|
6
|
+
shouldAutoHeight: boolean;
|
|
7
|
+
}) => string | number;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { EditorProps } from '@monaco-editor/react';
|
|
2
2
|
import { editor } from 'monaco-editor';
|
|
3
|
+
import { ComponentPropsWithoutRef, Ref } from 'react';
|
|
3
4
|
type CodeEditorVariant = 'default' | 'with-header' | 'borderless';
|
|
4
5
|
type CodeEditorContentPadding = 'default' | 'comfortable';
|
|
5
|
-
export type CodeEditorProps =
|
|
6
|
-
|
|
6
|
+
export type CodeEditorProps = EditorProps & {
|
|
7
|
+
containerProps?: Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
8
|
+
ref?: Ref<HTMLDivElement>;
|
|
7
9
|
setMarkers?: (value: string) => editor.IMarkerData[];
|
|
8
10
|
variant?: CodeEditorVariant;
|
|
9
11
|
isLoading?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var re=Object.create;var z=Object.defineProperty;var oe=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,ie=Object.prototype.hasOwnProperty;var ae=(e,r,o,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of te(r))!ie.call(e,n)&&n!==o&&z(e,n,{get:()=>r[n],enumerable:!(t=oe(r,n))||t.enumerable});return e};var de=(e,r,o)=>(o=e!=null?re(ne(e)):{},ae(r||!e||!e.__esModule?z(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const M=require("../theme-1XkFz8Qu.cjs"),s=require("../isDefined-DS2Q42p5.cjs"),se=require("../doNotTranslate-CHE7WmRS.cjs"),ue=require("../Loader-Bb72CUQ9.cjs"),j=require("../ResizeHandle-B1MuHTNA.cjs");let le=require("@base-ui/react/use-render"),C=require("@sniptt/guards"),F=require("clsx"),u=require("react"),d=require("react/jsx-runtime"),ce=require("@base-ui/utils/clamp"),h=require("@monaco-editor/react");h=M.__toESM(h,1);var fe="baseCodeEditorTheme",ge=({shouldAutoHeight:e,editor:r,setContentHeight:o})=>((0,u.useEffect)(()=>{if(!e||!s.isDefined(r)){o(void 0);return}const t=()=>{const a=r.getContentHeight();!Number.isFinite(a)||a<=0||o(a)};t();const n=r.onDidContentSizeChange(t);return()=>n.dispose()},[r,e,o]),null),pe=({editor:e,setEditor:r,setMonaco:o,setIsEditorFocused:t})=>((0,u.useEffect)(()=>{if(!s.isDefined(e)){t(!1);return}t(e.hasWidgetFocus());const n=[e.onDidFocusEditorWidget(()=>t(!0)),e.onDidBlurEditorWidget(()=>t(!1)),e.onDidDispose(()=>{r(void 0),o(void 0)})];return()=>{for(const a of n)a.dispose()}},[e,r,o,t]),null),_e=({configureMonacoLoader:e,setIsMonacoLoaderConfigured:r})=>((0,u.useEffect)(()=>{let o=!0;return e().then(()=>{o&&r(!0)}),()=>{o=!1}},[e,r]),null),be=({editor:e,monaco:r,setMarkers:o})=>((0,u.useEffect)(()=>{if(!s.isDefined(e)||!s.isDefined(r)||!s.isDefined(o))return;const t=()=>{const a=e.getModel();s.isDefined(a)&&r.editor.setModelMarkers(a,"customMarker",o(a.getValue()))};t();const n=[e.onDidChangeModel(t),e.onDidChangeModelContent(t)];return()=>{for(const a of n)a.dispose()}},[e,r,o]),null),$=e=>(0,ce.clamp)(e,j.RESIZE_HANDLE_DEFAULTS.min,j.RESIZE_HANDLE_DEFAULTS.max),ve=({height:e,resizable:r,editor:o,setResizedHeight:t})=>((0,u.useEffect)(()=>{if(!r||!s.isDefined(o))return;const n=o.getContainerDomNode().parentElement?.getBoundingClientRect().height;!s.isDefined(n)||n<=0||t({sourceHeight:e,value:$(n)})},[o,e,r,t]),null),i=e=>{if(e.trim()==="transparent")return"#00000000";const r=e.match(/color\(display-p3\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s+\/\s+([\d.]+))?\)/);if(s.isDefined(r)){const[,o,t,n,a]=r;if(!s.isDefined(o)||!s.isDefined(t)||!s.isDefined(n))return e;const l=Math.round(parseFloat(o)*255).toString(16).padStart(2,"0"),c=Math.round(parseFloat(t)*255).toString(16).padStart(2,"0"),g=Math.round(parseFloat(n)*255).toString(16).padStart(2,"0");return s.isDefined(a)?`#${l}${c}${g}${Math.round(parseFloat(a)*255).toString(16).padStart(2,"0")}`:`#${l}${c}${g}`}return e},Ee=({theme:e,colorScheme:r})=>({base:r==="dark"?"vs-dark":"vs",inherit:!0,rules:[{token:"",foreground:i(e.font.color.secondary)},{token:"keyword",foreground:i(e.color.pink11)},{token:"keyword.control",foreground:i(e.color.pink11)},{token:"keyword.json",foreground:i(e.color.orange11)},{token:"number",foreground:i(e.color.orange11)},{token:"number.json",foreground:i(e.color.orange11)},{token:"regexp",foreground:i(e.color.orange11)},{token:"type",foreground:i(e.color.green11)},{token:"attribute.name",foreground:i(e.color.blue11)},{token:"tag",foreground:i(e.color.pink11)},{token:"string",foreground:i(e.color.green11)},{token:"string.key.json",foreground:i(e.color.blue11)},{token:"delimiter",foreground:i(e.font.color.light)},{token:"delimiter.bracket.json",foreground:i(e.font.color.light)},{token:"string.value.json",foreground:i(e.color.green11)},{token:"comment",foreground:i(e.font.color.light),fontStyle:"italic"}],colors:{"editor.background":i("transparent"),"editor.foreground":i(e.font.color.secondary),"editorCursor.foreground":i(e.font.color.primary),"editorLineNumber.foreground":i(e.font.color.extraLight),"editorLineNumber.activeForeground":i(e.font.color.light),"editor.lineHighlightBackground":i(e.background.tertiary),"editor.selectionBackground":i(e.background.transparent.blue),"editor.inactiveSelectionBackground":i(e.background.transparent.light),"editorIndentGuide.background1":i(e.border.color.light),"editorIndentGuide.activeBackground1":i(e.border.color.medium),"editorBracketMatch.background":i(e.background.transparent.light),"editorBracketMatch.border":i(e.border.color.medium)}}),A=({monaco:e,theme:r,colorScheme:o})=>{e.editor.defineTheme(fe,Ee({theme:r,colorScheme:o}))},ke=({monaco:e,theme:r,colorScheme:o,editorTheme:t})=>((0,u.useEffect)(()=>{s.isDefined(e)&&(A({monaco:e,theme:r,colorScheme:o}),e.editor.setTheme(t))},[o,t,e,r]),null),Ce=({height:e,resizableHeight:r,contentHeight:o,shouldUseResizableHeight:t,shouldAutoHeight:n})=>t?r:n?o??e:e,he=({height:e,resizedHeight:r})=>r?.sourceHeight===e?r.value:(0,C.isNumber)(e)?$(e):450,He=({height:e,resizable:r,autoHeight:o})=>{const[t,n]=(0,u.useState)(),[a,l]=(0,u.useState)(),c=o&&!r,g=t?.sourceHeight===e,E=r&&(g||(0,C.isNumber)(e)),p=he({height:e,resizedHeight:t});return{currentHeight:Ce({height:e,resizableHeight:p,contentHeight:a,shouldUseResizableHeight:E,shouldAutoHeight:c}),resizableHeight:p,setResizableHeight:_=>{n({sourceHeight:e,value:_})},setResizedHeight:n,setContentHeight:l,shouldAutoHeight:c}},me="_editorWrapper_zilk9_24",De="_editorLoader_zilk9_1",xe="_container_zilk9_20",x={editorWrapper:me,editorLoader:De,container:xe},B,Se=()=>(B??=import("monaco-editor").then(e=>{h.loader.config({monaco:e})}),B),Me=({onMount:e,beforeMount:r,setMarkers:o,height:t=450,width:n="100%",theme:a,loading:l=(0,d.jsx)(ue.Loader,{}),variant:c="default",transparentBackground:g,isLoading:E=!1,options:p,resizable:_=!1,resizeLabel:W=se.doNotTranslate("Resize editor"),contentPadding:w="default",autoHeight:I=!1,containerProps:H,ref:O,...P})=>{const b=M.useTheme(),y=M.useThemeColorScheme(),[q,N]=(0,u.useState)(),[v,L]=(0,u.useState)(),[K,U]=(0,u.useState)(!1),[G,V]=(0,u.useState)(!1),T=(0,u.useId)(),m=a??p?.theme??"baseCodeEditorTheme",{currentHeight:k,resizableHeight:Z,setResizableHeight:J,setResizedHeight:Q,setContentHeight:X,shouldAutoHeight:Y}=He({height:t,resizable:_,autoHeight:I}),D=(0,C.isNumber)(b.spacingMultiplicator)?b.spacingMultiplicator*4:void 0,ee=f=>{H?.onKeyDown?.(f),G&&f.stopPropagation()};return(0,d.jsxs)("div",{role:"group",...H,ref:O,className:(0,F.clsx)(x.container,H?.className),onKeyDown:ee,children:[(0,d.jsx)(_e,{configureMonacoLoader:Se,setIsMonacoLoaderConfigured:U}),(0,d.jsx)(ve,{height:t,resizable:_,editor:v,setResizedHeight:Q}),(0,d.jsx)(ge,{shouldAutoHeight:Y,editor:v,setContentHeight:X}),(0,d.jsx)(pe,{editor:v,setEditor:L,setMonaco:N,setIsEditorFocused:V}),(0,d.jsx)(be,{editor:v,monaco:q,setMarkers:o}),(0,d.jsx)(ke,{monaco:q,theme:b,colorScheme:y,editorTheme:m}),E||!K?(0,d.jsx)("div",{className:x.editorLoader,"data-variant":c,style:{width:n,"--code-editor-height":(0,C.isNumber)(k)?`${k}px`:k},children:l}):(0,d.jsx)("div",{id:T,className:x.editorWrapper,"data-variant":c,"data-transparent-background":g||void 0,children:(0,d.jsx)(h.default,{...P,height:k,width:n,theme:m,loading:l,beforeMount:f=>{A({monaco:f,theme:b,colorScheme:y}),r?.(f)},onMount:(f,R)=>{N(R),L(f),e?.(f,R)},options:{formatOnPaste:!0,formatOnType:!0,fontFamily:b.code.font.family,bracketPairColorization:{enabled:!1},overviewRulerLanes:0,scrollBeyondLastLine:!1,scrollbar:{vertical:"hidden",horizontal:"hidden"},minimap:{enabled:!1},...w==="comfortable"?{lineDecorationsWidth:D}:{},padding:{bottom:D,top:D},...p,theme:m}})}),_&&!E&&s.isDefined(v)&&(0,d.jsx)(j.ResizeHandle,{"aria-label":W,"aria-controls":T,value:Z,onValueChange:J})]})},je="_editorHeader_19qlo_1",ye="_elementContainer_19qlo_15",S={editorHeader:je,elementContainer:ye},qe=({title:e,startElement:r,endElement:o,className:t,render:n,ref:a,...l})=>(0,le.useRender)({render:n,ref:a,props:{...l,className:(0,F.clsx)(S.editorHeader,t),children:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:S.elementContainer,children:[r,e]}),(0,d.jsx)("div",{className:S.elementContainer,children:o})]})}});exports.CodeEditor=Me;exports.CodeEditorHeader=qe;
|