twenty-ui 2.43.0 → 2.45.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 +86 -65
- package/dist/{AllIcons-Z8o0B2fy.js → AllIcons-CFMhMGzh.js} +1 -1
- package/dist/{AllIcons-D_4JeQkX.cjs → AllIcons-Cz8pObev.cjs} +1 -1
- package/dist/Avatar-C0FtFpJC.js +68 -0
- package/dist/Avatar-CkI8b3nh.cjs +1 -0
- package/dist/ListItem-B2HOeN2h.cjs +1 -0
- package/dist/ListItem-D8BQRK1W.js +97 -0
- package/dist/ListItem.module-Dxd8jOJP.js +35 -0
- package/dist/ListItem.module-RqrfwrFg.cjs +1 -0
- package/dist/{Loader-X1LymYkw.js → Loader-BLkXvZli.js} +1 -1
- package/dist/{Loader-Z6_7AA-x.cjs → Loader-CMXdrX1d.cjs} +1 -1
- package/dist/MenuSeparator-Ct3cQtJ2.cjs +1 -0
- package/dist/MenuSeparator-CyUYx1nk.js +68 -0
- package/dist/OverflowingTextWithTooltip-CNpmkBvJ.js +198 -0
- package/dist/OverflowingTextWithTooltip-tsJWb_Ie.cjs +1 -0
- package/dist/ProgressBar-21MXyySH.js +108 -0
- package/dist/ProgressBar-CyqeRyzA.cjs +1 -0
- package/dist/{ResizeHandle-DN1bRxQb.js → ResizeHandle-CGYGfOVF.js} +5 -5
- package/dist/{ResizeHandle-cll01qBQ.cjs → ResizeHandle-CI-VTVOi.cjs} +1 -1
- package/dist/Shortcut-CRCVbA2m.js +71 -0
- package/dist/Shortcut-CuBFak3I.cjs +1 -0
- package/dist/Switch-BQp0t6JZ.js +129 -0
- package/dist/Switch-CFCj3OQZ.cjs +1 -0
- package/dist/TabsTabContent-DZUNi_iE.cjs +1 -0
- package/dist/TabsTabContent-s6J5bZ3R.js +39 -0
- package/dist/TextDirectionContext-pwtyVyKv.cjs +1 -0
- package/dist/TextDirectionContext-zzaQWZg6.js +5 -0
- package/dist/components/__stories__/reading-direction/DirectionalLayoutExample.d.ts +3 -0
- package/dist/components/__stories__/reading-direction/DirectionalMenusExample.d.ts +4 -0
- package/dist/components/code-editor/CodeEditor/{utils → internal/utils}/getBaseCodeEditorTheme.d.ts +1 -1
- package/dist/components/code-editor/index.d.ts +0 -2
- package/dist/components/code-editor.cjs +1 -1
- package/dist/components/code-editor.mjs +37 -37
- package/dist/components/data-display/MetricRow/MetricRow.d.ts +2 -0
- package/dist/components/data-display/MetricRow/types/MetricRowProps.d.ts +11 -0
- package/dist/components/feedback/Callout/Callout.d.ts +1 -1
- package/dist/components/feedback/Callout/types/CalloutProps.d.ts +1 -0
- package/dist/components/feedback/InlineBanner/InlineBanner.d.ts +2 -18
- package/dist/components/feedback/InlineBanner/internal/InlineBannerButton.d.ts +5 -0
- package/dist/components/feedback/InlineBanner/types/InlineBannerButtonProps.d.ts +7 -0
- package/dist/components/feedback/InlineBanner/types/InlineBannerProps.d.ts +12 -0
- package/dist/components/feedback/Toast/Toast.d.ts +1 -1
- package/dist/components/feedback/Toast/internal/components/ToastProgress.d.ts +9 -0
- package/dist/components/feedback/Toast/{hooks → internal/hooks}/useEnqueueToast.d.ts +1 -1
- package/dist/components/feedback/Toast/{types → internal/types}/ToastEntry.d.ts +1 -1
- package/dist/components/feedback/Toast/types/ToastProps.d.ts +1 -1
- package/dist/components/feedback/Toaster/internal/ToasterItem.d.ts +1 -1
- package/dist/components/feedback/Toaster/internal/ToasterItemExitEffect.d.ts +1 -1
- package/dist/components/index.d.ts +10 -21
- package/dist/components/input/IconButton/types/IconButtonProps.d.ts +1 -1
- package/dist/components/input/ImageInput/ImageInput.d.ts +2 -0
- package/dist/components/input/ImageInput/__stories__/ImageInputPreviewChangesExample.d.ts +2 -0
- package/dist/components/input/ImageInput/__stories__/imageInputPreviewUrl.d.ts +1 -0
- package/dist/components/input/ImageInput/internal/ImageInputPreview.d.ts +5 -0
- package/dist/components/input/ImageInput/types/ImageInputProps.d.ts +15 -0
- package/dist/components/input/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/input/SearchInput/__stories__/SearchInputExample.d.ts +2 -0
- package/dist/components/input/SearchInput/types/SearchInputProps.d.ts +2 -10
- package/dist/components/layout/OverflowingList/OverflowingList.d.ts +2 -0
- package/dist/components/layout/OverflowingList/__stories__/OVERFLOWING_LIST_STORY_ITEMS.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListControlledFocusExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListMutableTag.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/OverflowingListResizeExample.d.ts +1 -0
- package/dist/components/layout/OverflowingList/__stories__/expectOverflowingListPopupGeometry.d.ts +4 -0
- package/dist/components/layout/OverflowingList/internal/OverflowingListItem.d.ts +9 -0
- package/dist/components/layout/OverflowingList/internal/getVisibleItemCount.d.ts +6 -0
- package/dist/components/layout/OverflowingList/internal/measureItemWidths.d.ts +5 -0
- package/dist/components/layout/OverflowingList/internal/useFocusedElementUnmountRef.d.ts +1 -0
- package/dist/components/layout/OverflowingList/internal/useOverflowingListLayout.d.ts +12 -0
- package/dist/components/layout/OverflowingList/types/OverflowingListProps.d.ts +7 -0
- package/dist/components/navigation/Dropdown/Dropdown.d.ts +6 -6
- package/dist/components/navigation/Dropdown/__stories__/DropdownContextMenuExample.d.ts +1 -0
- package/dist/components/navigation/Dropdown/__stories__/createStoryState.d.ts +4 -0
- package/dist/components/navigation/Dropdown/__stories__/dropdownStoryA11yParameters.d.ts +8 -0
- package/dist/components/navigation/Dropdown/hooks/useDropdownPage.d.ts +6 -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 +5 -1
- package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownRoot.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownTitle.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownTrigger.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/getDropdownDismissTarget.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/isDropdownDismissPrevented.d.ts +5 -0
- package/dist/components/navigation/Dropdown/internal/useRegisterDropdownLabelElement.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/useRegisteredElementId.d.ts +1 -0
- package/dist/components/navigation/Dropdown/types/DropdownActionItemProps.d.ts +1 -1
- package/dist/components/navigation/Dropdown/types/DropdownDismissEvent.d.ts +4 -0
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +1 -1
- package/dist/components/navigation/Dropdown/types/DropdownRootProps.d.ts +3 -0
- package/dist/components/navigation/Dropdown/types/DropdownSubmenuProps.d.ts +1 -1
- package/dist/components/navigation/MenuItem/MenuItem.d.ts +1 -1
- package/dist/components/navigation/MenuItem/types/MenuItemProps.d.ts +3 -2
- package/dist/components/navigation/TabButton/types/TabButtonProps.d.ts +1 -1
- package/dist/components-BizDepCM.cjs +1 -0
- package/dist/components-CC-3jXEq.js +2144 -0
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +33 -44
- package/dist/data-display-BgweQocz.cjs +1 -0
- package/dist/data-display-Dn_nzrc8.js +190 -0
- package/dist/getSafeUrl-BuX_E2_8.cjs +1 -0
- package/dist/getSafeUrl-DXwcx-N0.js +27 -0
- package/dist/icon/components/TablerIcons.d.ts +1 -1
- package/dist/icon/hooks/useIcons.d.ts +1 -1
- package/dist/icon/index.d.ts +1 -1
- package/dist/{icon-Bd81r48z.js → icon-B7aZ6RxF.js} +123 -122
- package/dist/{icon-iD9IXJmn.cjs → icon-DK8OPi-m.cjs} +1 -1
- package/dist/icon.cjs +1 -1
- package/dist/icon.mjs +227 -226
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +630 -641
- package/dist/input-C50264Jb.js +407 -0
- package/dist/input-CRiX4eQH.cjs +1 -0
- package/dist/isRenderableSlot-DT_depzM.js +6 -0
- package/dist/isRenderableSlot-Guryb6Nf.cjs +1 -0
- package/dist/layout-BEC7fKLU.js +34 -0
- package/dist/layout-DniJJ8Mx.cjs +1 -0
- package/dist/navigation-B9YTBTaa.cjs +1 -0
- package/dist/navigation-CQUyRKgk.js +122 -0
- package/dist/primitives/data-display/Avatar/Avatar.d.ts +1 -1
- package/dist/primitives/data-display/Avatar/types/AvatarProps.d.ts +1 -0
- package/dist/primitives/data-display/Pill/Pill.d.ts +3 -1
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +7 -8
- package/dist/primitives/feedback/ProgressBar/ProgressBar.d.ts +2 -12
- package/dist/primitives/feedback/ProgressBar/types/ProgressBarProps.d.ts +14 -0
- package/dist/primitives/feedback/ProgressRing/ProgressRing.d.ts +2 -0
- package/dist/primitives/feedback/ProgressRing/types/ProgressRingProps.d.ts +6 -0
- package/dist/primitives/feedback/index.d.ts +3 -2
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +6 -7
- package/dist/primitives/input/Button/Button.d.ts +1 -1
- package/dist/primitives/input/Button/types/ButtonProps.d.ts +3 -3
- package/dist/primitives/input/Button/types/ButtonVariant.d.ts +1 -1
- package/dist/primitives/input/NumberStepper/NumberStepper.d.ts +2 -0
- package/dist/primitives/input/NumberStepper/__stories__/ControlledNumberStepperExample.d.ts +2 -0
- package/dist/primitives/input/NumberStepper/__stories__/NumberStepperFieldExample.d.ts +2 -0
- package/dist/primitives/input/NumberStepper/__stories__/NumberStepperFormExample.d.ts +4 -0
- package/dist/primitives/input/NumberStepper/internal/constants/NumberStepperFormat.d.ts +1 -0
- package/dist/primitives/input/NumberStepper/internal/utils/isBlurRoundingOfCurrentValue.d.ts +8 -0
- package/dist/primitives/input/NumberStepper/types/NumberStepperProps.d.ts +7 -0
- package/dist/primitives/input/Radio/Radio.d.ts +1 -1
- package/dist/primitives/input/Radio/types/RadioProps.d.ts +1 -0
- package/dist/primitives/input/index.d.ts +2 -1
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +15 -14
- package/dist/primitives/layout/{AnimatedExpandableContainer/AnimatedExpandableContainer.d.ts → Collapsible/Collapsible.d.ts} +2 -5
- package/dist/primitives/layout/TextDirectionProvider/TextDirectionProvider.d.ts +2 -1
- package/dist/primitives/layout/TextDirectionProvider/internal/TextDirection.d.ts +1 -0
- package/dist/primitives/layout/TextDirectionProvider/internal/TextDirectionContext.d.ts +2 -0
- package/dist/primitives/layout/TextDirectionProvider/internal/useProvidedTextDirection.d.ts +1 -0
- package/dist/primitives/layout/index.d.ts +4 -6
- package/dist/primitives/layout.cjs +1 -1
- package/dist/primitives/layout.mjs +6 -6
- package/dist/primitives/navigation/Breadcrumb/Breadcrumb.d.ts +2 -0
- package/dist/primitives/navigation/Breadcrumb/internal/BreadcrumbItemContent.d.ts +6 -0
- package/dist/primitives/navigation/Breadcrumb/types/BreadcrumbItem.d.ts +2 -0
- package/dist/primitives/navigation/Breadcrumb/types/BreadcrumbProps.d.ts +5 -0
- package/dist/primitives/navigation/ListItem/ListItem.d.ts +1 -1
- package/dist/primitives/navigation/ListItem/types/ListItemProps.d.ts +3 -1
- package/dist/primitives/navigation/index.d.ts +3 -4
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +5 -8
- package/dist/primitives/surfaces/Dialog/types/DialogSize.d.ts +1 -1
- package/dist/primitives/surfaces/Menu/internal/getMenuListItemProps.d.ts +4 -1
- package/dist/primitives/surfaces/Menu/types/MenuItemSlotProps.d.ts +1 -1
- package/dist/primitives/surfaces/Popover/Popover.d.ts +1 -1
- package/dist/primitives/surfaces/Popover/internal/PopoverPopup.d.ts +1 -1
- package/dist/primitives/surfaces/Popover/types/PopoverPopupProps.d.ts +5 -0
- 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 +1 -0
- package/dist/primitives/surfaces.cjs +1 -1
- package/dist/primitives/surfaces.mjs +3 -3
- package/dist/{utilities/utils → primitives/typography/OverflowingTextWithTooltip/internal/LinkifiedText}/linkifyText.d.ts +2 -1
- package/dist/primitives/typography/Shortcut/Shortcut.d.ts +2 -0
- package/dist/primitives/typography/Shortcut/formatShortcut.d.ts +2 -0
- package/dist/primitives/typography/Shortcut/internal/getShortcutPresentation.d.ts +8 -0
- package/dist/primitives/typography/Shortcut/types/ShortcutDefinition.d.ts +1 -0
- package/dist/primitives/typography/Shortcut/types/ShortcutFormatOptions.d.ts +7 -0
- package/dist/primitives/typography/Shortcut/types/ShortcutProps.d.ts +6 -0
- package/dist/primitives/typography/index.d.ts +5 -0
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +8 -4
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +62 -62
- package/dist/style.css +1 -1
- package/dist/surfaces-C9ZUjKxU.js +264 -0
- package/dist/surfaces-Davk4uBw.cjs +1 -0
- package/dist/testing.cjs +1 -1
- package/dist/testing.mjs +1 -1
- package/dist/theme/constants/MainColorNames.d.ts +1 -1
- package/dist/theme/constants/ThemeCommon.d.ts +3 -0
- package/dist/theme/constants/ThemeLight.d.ts +4 -0
- package/dist/theme/getNextThemeColor.d.ts +1 -1
- package/dist/theme/themeCssVariables.d.ts +4 -0
- package/dist/theme/themeTypes.d.ts +4 -0
- package/dist/{theme-DBro6iwF.js → theme-CjHovJAZ.js} +30 -20
- package/dist/theme-DumxXtpW.cjs +1 -0
- package/dist/theme-dark.css +2 -0
- package/dist/theme-light.css +2 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.mjs +1 -1
- package/dist/typography-D3fk3hSo.cjs +1 -0
- package/dist/typography-DUJWRilJ.js +5 -0
- package/dist/useIsMobile-CAIiLC-3.js +37 -0
- package/dist/useIsMobile-UXHqqYXb.cjs +1 -0
- package/dist/useProvidedTextDirection-B7ovnsdr.cjs +1 -0
- package/dist/useProvidedTextDirection-P1dtjUtE.js +9 -0
- package/dist/utilities/device/getUserDevice.d.ts +1 -1
- package/dist/utilities/index.d.ts +0 -4
- package/dist/utilities-CJKPcDM4.js +28 -0
- package/dist/utilities-CdR__WZM.cjs +1 -0
- package/dist/utilities.cjs +1 -1
- package/dist/utilities.mjs +14 -15
- package/package.json +2 -2
- package/CHANGELOG.md +0 -24
- package/dist/Avatar-BSHgTxt-.js +0 -67
- package/dist/Avatar-DTNH6Ku7.cjs +0 -1
- package/dist/Input-CFXY05bj.cjs +0 -1
- package/dist/Input-DHfmRBq5.js +0 -116
- package/dist/ListItem-2dHkY1NB.cjs +0 -1
- package/dist/ListItem-D6DvFIbl.js +0 -109
- package/dist/ListItem.module-CveFbY4M.cjs +0 -1
- package/dist/ListItem.module-DtIGiTDL.js +0 -38
- package/dist/MenuSeparator-DJOspG7J.cjs +0 -1
- package/dist/MenuSeparator-dNx4JE6C.js +0 -66
- package/dist/OverflowingTextWithTooltip-CqEkoH6t.js +0 -179
- package/dist/OverflowingTextWithTooltip-bn6EwWeq.cjs +0 -1
- package/dist/Pill-BJ3K8Mdc.cjs +0 -1
- package/dist/Pill-DaFEFIOT.js +0 -9
- package/dist/ProgressBar-DwJQXHwg.cjs +0 -1
- package/dist/ProgressBar-RWLNIkzm.js +0 -55
- package/dist/TabsTabContent-BseLV1Wk.cjs +0 -1
- package/dist/TabsTabContent-_NCTxoP6.js +0 -40
- package/dist/components/data-display/JsonTree/internal/JsonListItem.d.ts +0 -4
- package/dist/components/feedback/Info/Info.d.ts +0 -2
- package/dist/components/feedback/Info/types/InfoAccent.d.ts +0 -1
- package/dist/components/feedback/Info/types/InfoProps.d.ts +0 -11
- package/dist/components/input/CardPicker/CardPicker.d.ts +0 -2
- package/dist/components/input/CardPicker/types/CardPickerProps.d.ts +0 -2
- package/dist/components/input/ColorSchemePicker/ColorSchemePicker.d.ts +0 -2
- package/dist/components/input/ColorSchemePicker/internal/Checkmark/Checkmark.d.ts +0 -5
- package/dist/components/input/ColorSchemePicker/internal/ColorSchemeCard/ColorSchemeCard.d.ts +0 -11
- package/dist/components/input/ColorSchemePicker/types/ColorSchemePickerProps.d.ts +0 -9
- package/dist/components/navigation/NavigationBar/NavigationBar.d.ts +0 -13
- package/dist/components/navigation/NavigationBar/internal/NavigationBarItem/NavigationBarItem.d.ts +0 -9
- package/dist/components/navigation/RoundedLink/RoundedLink.d.ts +0 -8
- package/dist/components-BYWo2sUE.cjs +0 -1
- package/dist/components-C96xU59U.js +0 -1996
- package/dist/data-display-BQ9g9oSc.cjs +0 -1
- package/dist/data-display-z9gKjkPS.js +0 -184
- package/dist/feedback-BvpEL2-w.js +0 -25
- package/dist/feedback-CH2UC0Fv.cjs +0 -1
- package/dist/input-C8IiOA9Q.js +0 -335
- package/dist/input-NBD4DP8j.cjs +0 -1
- package/dist/layout-BgAfeZsL.cjs +0 -1
- package/dist/layout-D-XbKoLM.js +0 -30
- package/dist/linkifyText-BHQ4_CzQ.cjs +0 -1
- package/dist/linkifyText-BINRNP9w.js +0 -45
- package/dist/mergeClassNames-BHKm1BNi.js +0 -6
- package/dist/mergeClassNames-BbJtXN2t.cjs +0 -1
- package/dist/navigation-BqZBteC2.cjs +0 -1
- package/dist/navigation-CLMgaqS8.js +0 -91
- package/dist/primitives/feedback/CircularProgressBar/CircularProgressBar.d.ts +0 -7
- package/dist/primitives/input/Button/internal/ButtonHotKeys.d.ts +0 -5
- package/dist/primitives/input/Button/internal/ButtonSoon.d.ts +0 -5
- package/dist/primitives/input/types/ColorScheme.d.ts +0 -1
- package/dist/primitives/layout/AnimatedExpandableContainer/types/AnimationMode.d.ts +0 -1
- package/dist/primitives/layout/AnimatedExpandableContainer/types/AnimationSize.d.ts +0 -1
- package/dist/primitives/navigation/ClickToActionLink/ClickToActionLink.d.ts +0 -6
- package/dist/primitives/navigation/Link/constants/Cal.d.ts +0 -1
- package/dist/primitives/navigation/Link/constants/GithubLink.d.ts +0 -1
- package/dist/primitives/navigation/Link/constants/TwentyPricingLink.d.ts +0 -1
- package/dist/primitives/navigation/ListItem/internal/MenuItemHotKeys/MenuItemHotKeys.d.ts +0 -6
- package/dist/primitives/navigation/Tabs/internal/isRenderableSlot.d.ts +0 -2
- package/dist/surfaces-DX8oX1ou.js +0 -254
- package/dist/surfaces-uuLwsFxg.cjs +0 -1
- package/dist/theme-DNG4OSBd.cjs +0 -1
- package/dist/utilities/device/getOsShortcutSeparator.d.ts +0 -1
- package/dist/utilities/types/ClickOutsideAttributes.d.ts +0 -4
- package/dist/utilities-BlvbRryv.cjs +0 -1
- package/dist/utilities-C5Tt2HLT.js +0 -56
- /package/dist/components/code-editor/CodeEditor/{constants → internal/constants}/BaseCodeEditorThemeId.d.ts +0 -0
- /package/dist/components/feedback/Toast/{constants → internal/constants}/DefaultToastLimit.d.ts +0 -0
- /package/dist/components/feedback/Toast/{contexts → internal/contexts}/ToastContext.d.ts +0 -0
- /package/dist/components/feedback/Toast/{hooks → internal/hooks}/useCloseToast.d.ts +0 -0
- /package/dist/components/feedback/Toast/{hooks → internal/hooks}/useToastContext.d.ts +0 -0
- /package/dist/components/feedback/Toast/{hooks → internal/hooks}/useToastEntries.d.ts +0 -0
- /package/dist/components/feedback/Toast/{stores → internal/stores}/createToastStore.d.ts +0 -0
- /package/dist/components/feedback/Toast/{types → internal/types}/ToastStoreState.d.ts +0 -0
- /package/dist/components/feedback/Toast/{utils → internal/utils}/completeToastExit.d.ts +0 -0
- /package/dist/components/feedback/Toast/{utils → internal/utils}/dismissToasts.d.ts +0 -0
- /package/dist/components/feedback/Toast/{utils → internal/utils}/isToastVisible.d.ts +0 -0
- /package/dist/primitives/layout/{AnimatedExpandableContainer → Collapsible}/types/AnimationDimension.d.ts +0 -0
- /package/dist/primitives/layout/{AnimatedExpandableContainer → Collapsible}/types/AnimationDurationObject.d.ts +0 -0
- /package/dist/primitives/layout/{AnimatedExpandableContainer → Collapsible}/types/AnimationDurations.d.ts +0 -0
- /package/dist/{primitives/navigation/ListItem → utilities}/internal/isRenderableSlot.d.ts +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { t as k } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
+
import { r as q } from "./theme-CjHovJAZ.js";
|
|
3
|
+
import { a as m } from "./utilities-CJKPcDM4.js";
|
|
4
|
+
import { n as z } from "./useProvidedTextDirection-P1dtjUtE.js";
|
|
5
|
+
import { Fragment as D, jsx as t, jsxs as R } from "react/jsx-runtime";
|
|
6
|
+
import { Button as S } from "@base-ui/react/button";
|
|
7
|
+
import { Avatar as v } from "@base-ui/react/avatar";
|
|
8
|
+
var U = "_root_xleyk_1", E = "_avatarPulsing_xleyk_1", G = "_image_xleyk_87", H = "_fallback_xleyk_93", J = "_icon_xleyk_97", l = {
|
|
9
|
+
root: U,
|
|
10
|
+
avatarPulsing: E,
|
|
11
|
+
image: G,
|
|
12
|
+
fallback: H,
|
|
13
|
+
icon: J
|
|
14
|
+
}, Y = ({ src: b, name: n, colorSeed: s = n, size: h = "md", shape: x = "square", variant: f = "soft", icon: o, color: y, backgroundColor: A, borderColor: N, pulsing: w = !1, ring: B = !1, disabled: g = !1, nativeButton: C = !0, onClick: u, className: I, style: d, render: i, "aria-label": P, ...T }) => {
|
|
15
|
+
const a = q(), e = n?.trim().charAt(0).toUpperCase(), j = e ? y ?? m({
|
|
16
|
+
string: s ?? "",
|
|
17
|
+
variant: 12,
|
|
18
|
+
theme: a
|
|
19
|
+
}) : a.font.color.tertiary, F = e ? A ?? m({
|
|
20
|
+
string: s ?? "",
|
|
21
|
+
variant: f === "outline" ? 5 : 4,
|
|
22
|
+
theme: a
|
|
23
|
+
}) : a.background.transparent.light, p = N ?? (e ? m({
|
|
24
|
+
string: s ?? "",
|
|
25
|
+
variant: 6,
|
|
26
|
+
theme: a
|
|
27
|
+
}) : void 0), c = k(u), _ = k(o) && typeof o != "boolean" && o !== "";
|
|
28
|
+
return /* @__PURE__ */ t(v.Root, {
|
|
29
|
+
...T,
|
|
30
|
+
onClick: u,
|
|
31
|
+
"aria-label": P ?? (c ? n?.trim() || "Avatar" : void 0),
|
|
32
|
+
"data-size": h,
|
|
33
|
+
"data-shape": x,
|
|
34
|
+
"data-pulsing": w || void 0,
|
|
35
|
+
"data-ring": B || void 0,
|
|
36
|
+
"data-disabled": g || void 0,
|
|
37
|
+
"data-clickable": c || void 0,
|
|
38
|
+
className: z(l.root, I),
|
|
39
|
+
style: (r) => ({
|
|
40
|
+
"--tw-avatar-color": j,
|
|
41
|
+
"--tw-avatar-background": _ ? "inherit" : r.imageLoadingStatus === "loaded" ? "none" : F,
|
|
42
|
+
"--tw-avatar-border": f === "outline" && r.imageLoadingStatus !== "loaded" && p ? `1px solid ${p}` : "none",
|
|
43
|
+
...typeof d == "function" ? d(r) : d
|
|
44
|
+
}),
|
|
45
|
+
render: c ? (r, L) => /* @__PURE__ */ t(S, {
|
|
46
|
+
...r,
|
|
47
|
+
disabled: g,
|
|
48
|
+
nativeButton: C,
|
|
49
|
+
render: typeof i == "function" ? ($) => i($, L) : i
|
|
50
|
+
}) : i,
|
|
51
|
+
children: _ ? /* @__PURE__ */ t("span", {
|
|
52
|
+
className: l.icon,
|
|
53
|
+
"aria-hidden": !0,
|
|
54
|
+
children: o
|
|
55
|
+
}) : /* @__PURE__ */ R(D, { children: [/* @__PURE__ */ t(v.Image, {
|
|
56
|
+
src: b ?? void 0,
|
|
57
|
+
alt: "",
|
|
58
|
+
className: l.image
|
|
59
|
+
}), /* @__PURE__ */ t(v.Fallback, {
|
|
60
|
+
className: l.fallback,
|
|
61
|
+
"aria-hidden": !0,
|
|
62
|
+
children: e || "-"
|
|
63
|
+
})] })
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
Y as t
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const F=require("./theme-DumxXtpW.cjs"),h=require("./isDefined-DS2Q42p5.cjs"),d=require("./utilities-CdR__WZM.cjs"),L=require("./useProvidedTextDirection-B7ovnsdr.cjs");let a=require("react/jsx-runtime"),z=require("@base-ui/react/button"),v=require("@base-ui/react/avatar");var O="_root_xleyk_1",R="_avatarPulsing_xleyk_1",U="_image_xleyk_87",$="_fallback_xleyk_93",E="_icon_xleyk_97",n={root:O,avatarPulsing:R,image:U,fallback:$,icon:E},G=({src:k,name:s,colorSeed:l=s,size:x="md",shape:q="square",variant:_="soft",icon:t,color:p,backgroundColor:y,borderColor:j,pulsing:A=!1,ring:T=!1,disabled:g=!1,nativeButton:P=!0,onClick:m,className:C,style:c,render:i,"aria-label":N,...D})=>{const e=F.useTheme(),o=s?.trim().charAt(0).toUpperCase(),w=o?p??d.stringToThemeColorP3String({string:l??"",variant:12,theme:e}):e.font.color.tertiary,B=o?y??d.stringToThemeColorP3String({string:l??"",variant:_==="outline"?5:4,theme:e}):e.background.transparent.light,f=j??(o?d.stringToThemeColorP3String({string:l??"",variant:6,theme:e}):void 0),u=h.isDefined(m),b=h.isDefined(t)&&typeof t!="boolean"&&t!=="";return(0,a.jsx)(v.Avatar.Root,{...D,onClick:m,"aria-label":N??(u?s?.trim()||"Avatar":void 0),"data-size":x,"data-shape":q,"data-pulsing":A||void 0,"data-ring":T||void 0,"data-disabled":g||void 0,"data-clickable":u||void 0,className:L.mergeClassNames(n.root,C),style:r=>({"--tw-avatar-color":w,"--tw-avatar-background":b?"inherit":r.imageLoadingStatus==="loaded"?"none":B,"--tw-avatar-border":_==="outline"&&r.imageLoadingStatus!=="loaded"&&f?`1px solid ${f}`:"none",...typeof c=="function"?c(r):c}),render:u?(r,I)=>(0,a.jsx)(z.Button,{...r,disabled:g,nativeButton:P,render:typeof i=="function"?S=>i(S,I):i}):i,children:b?(0,a.jsx)("span",{className:n.icon,"aria-hidden":!0,children:t}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.Avatar.Image,{src:k??void 0,alt:"",className:n.image}),(0,a.jsx)(v.Avatar.Fallback,{className:n.fallback,"aria-hidden":!0,children:o||"-"})]})})};Object.defineProperty(exports,"Avatar",{enumerable:!0,get:function(){return G}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const p=require("./isDefined-DS2Q42p5.cjs"),i=require("./isRenderableSlot-Guryb6Nf.cjs"),D=require("./Shortcut-CuBFak3I.cjs"),R=require("./OverflowingTextWithTooltip-tsJWb_Ie.cjs"),e=require("./ListItem.module-RqrfwrFg.cjs");let r=require("clsx"),t=require("react/jsx-runtime"),T=require("@sniptt/guards"),y=require("@base-ui/react/use-render"),c=require("@tabler/icons-react");var O=({checked:a,disabled:s})=>(0,t.jsx)("span",{"aria-hidden":!0,className:(0,r.clsx)(e.Checkbox_module_default.root,e.Checkbox_module_default.solid,e.Checkbox_module_default.sm,e.Checkbox_module_default.square,e.Checkbox_module_default.accent),"data-checked":a||void 0,"data-disabled":s||void 0,children:(0,t.jsx)("span",{className:e.Checkbox_module_default.box,children:a&&(0,t.jsx)("span",{className:e.Checkbox_module_default.indicator,children:(0,t.jsx)(c.IconCheck,{"aria-hidden":!0})})})}),w=({color:a="neutral",selected:s=!1,focused:j=!1,disabled:l=!1,indicator:n="none",startIcon:_,endIcon:m,description:d,descriptionPlacement:h="inline",actions:x,actionsVisibility:L="hover",shortcut:f,shortcutJoinLabel:q,hasSubmenu:k=!1,className:N,children:u,render:C,ref:g,onClick:I,...v})=>{const b=i.isRenderableSlot(d),S=o=>{if(l){o.preventDefault();return}p.isDefined(I)&&(o.stopPropagation(),I(o))};return(0,y.useRender)({render:C,ref:g,state:{color:a,indicator:n,selected:s,highlighted:j,disabled:l},props:{...v,"data-actions-visibility":L,className:(0,r.clsx)(e.ListItem_module_default.root,N),"aria-disabled":l||void 0,onClick:S,children:(0,t.jsxs)(t.Fragment,{children:[n==="checkbox"&&(0,t.jsx)(O,{checked:s,disabled:l}),i.isRenderableSlot(_)&&(0,t.jsx)("span",{className:e.ListItem_module_default.startIcon,children:_}),(0,t.jsxs)("span",{className:e.ListItem_module_default.label,children:[(0,t.jsx)("span",{className:e.ListItem_module_default.text,children:(0,T.isString)(u)?(0,t.jsx)(R.OverflowingTextWithTooltip,{text:u}):u}),b&&h==="inline"&&(0,t.jsx)("span",{className:(0,r.clsx)(e.ListItem_module_default.description,e.ListItem_module_default.inlineDescription),children:d})]}),b&&h==="end"&&(0,t.jsx)("span",{className:(0,r.clsx)(e.ListItem_module_default.description,e.ListItem_module_default.endDescription),children:d}),i.isRenderableSlot(x)&&(0,t.jsx)("span",{className:e.ListItem_module_default.actions,children:x}),p.isDefined(f)&&(0,t.jsx)(D.Shortcut,{className:e.ListItem_module_default.hotkeys,shortcut:f,sequenceJoinLabel:q}),i.isRenderableSlot(m)&&(0,t.jsx)("span",{className:e.ListItem_module_default.endIcon,children:m}),n==="check"&&s&&(0,t.jsx)(c.IconCheck,{className:e.ListItem_module_default.checkIndicator,"aria-hidden":!0}),k&&(0,t.jsx)(c.IconChevronRight,{className:e.ListItem_module_default.submenuIcon,"aria-hidden":!0})]})}})};Object.defineProperty(exports,"ListItem",{enumerable:!0,get:function(){return w}});
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { En as y, Sn as I } from "./icon-B7aZ6RxF.js";
|
|
2
|
+
import { t as b } from "./isDefined-fMi6eQ4r.js";
|
|
3
|
+
import { t } from "./isRenderableSlot-DT_depzM.js";
|
|
4
|
+
import { t as T } from "./Shortcut-CRCVbA2m.js";
|
|
5
|
+
import { t as w } from "./OverflowingTextWithTooltip-CNpmkBvJ.js";
|
|
6
|
+
import { n as s, t as e } from "./ListItem.module-Dxd8jOJP.js";
|
|
7
|
+
import { clsx as o } from "clsx";
|
|
8
|
+
import { Fragment as E, jsx as a, jsxs as v } from "react/jsx-runtime";
|
|
9
|
+
import { isString as F } from "@sniptt/guards";
|
|
10
|
+
import { useRender as J } from "@base-ui/react/use-render";
|
|
11
|
+
var O = ({ checked: r, disabled: i }) => /* @__PURE__ */ a("span", {
|
|
12
|
+
"aria-hidden": !0,
|
|
13
|
+
className: o(s.root, s.solid, s.sm, s.square, s.accent),
|
|
14
|
+
"data-checked": r || void 0,
|
|
15
|
+
"data-disabled": i || void 0,
|
|
16
|
+
children: /* @__PURE__ */ a("span", {
|
|
17
|
+
className: s.box,
|
|
18
|
+
children: r && /* @__PURE__ */ a("span", {
|
|
19
|
+
className: s.indicator,
|
|
20
|
+
children: /* @__PURE__ */ a(I, { "aria-hidden": !0 })
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
}), U = ({ color: r = "neutral", selected: i = !1, focused: g = !1, disabled: n = !1, indicator: c = "none", startIcon: h, endIcon: p, description: l, descriptionPlacement: f = "inline", actions: u, actionsVisibility: C = "hover", shortcut: N, shortcutJoinLabel: D, hasSubmenu: L = !1, className: S, children: m, render: _, ref: R, onClick: x, ...j }) => {
|
|
24
|
+
const k = t(l), q = (d) => {
|
|
25
|
+
if (n) {
|
|
26
|
+
d.preventDefault();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
b(x) && (d.stopPropagation(), x(d));
|
|
30
|
+
};
|
|
31
|
+
return J({
|
|
32
|
+
render: _,
|
|
33
|
+
ref: R,
|
|
34
|
+
state: {
|
|
35
|
+
color: r,
|
|
36
|
+
indicator: c,
|
|
37
|
+
selected: i,
|
|
38
|
+
highlighted: g,
|
|
39
|
+
disabled: n
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
...j,
|
|
43
|
+
"data-actions-visibility": C,
|
|
44
|
+
className: o(e.root, S),
|
|
45
|
+
"aria-disabled": n || void 0,
|
|
46
|
+
onClick: q,
|
|
47
|
+
children: /* @__PURE__ */ v(E, { children: [
|
|
48
|
+
c === "checkbox" && /* @__PURE__ */ a(O, {
|
|
49
|
+
checked: i,
|
|
50
|
+
disabled: n
|
|
51
|
+
}),
|
|
52
|
+
t(h) && /* @__PURE__ */ a("span", {
|
|
53
|
+
className: e.startIcon,
|
|
54
|
+
children: h
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ v("span", {
|
|
57
|
+
className: e.label,
|
|
58
|
+
children: [/* @__PURE__ */ a("span", {
|
|
59
|
+
className: e.text,
|
|
60
|
+
children: F(m) ? /* @__PURE__ */ a(w, { text: m }) : m
|
|
61
|
+
}), k && f === "inline" && /* @__PURE__ */ a("span", {
|
|
62
|
+
className: o(e.description, e.inlineDescription),
|
|
63
|
+
children: l
|
|
64
|
+
})]
|
|
65
|
+
}),
|
|
66
|
+
k && f === "end" && /* @__PURE__ */ a("span", {
|
|
67
|
+
className: o(e.description, e.endDescription),
|
|
68
|
+
children: l
|
|
69
|
+
}),
|
|
70
|
+
t(u) && /* @__PURE__ */ a("span", {
|
|
71
|
+
className: e.actions,
|
|
72
|
+
children: u
|
|
73
|
+
}),
|
|
74
|
+
b(N) && /* @__PURE__ */ a(T, {
|
|
75
|
+
className: e.hotkeys,
|
|
76
|
+
shortcut: N,
|
|
77
|
+
sequenceJoinLabel: D
|
|
78
|
+
}),
|
|
79
|
+
t(p) && /* @__PURE__ */ a("span", {
|
|
80
|
+
className: e.endIcon,
|
|
81
|
+
children: p
|
|
82
|
+
}),
|
|
83
|
+
c === "check" && i && /* @__PURE__ */ a(I, {
|
|
84
|
+
className: e.checkIndicator,
|
|
85
|
+
"aria-hidden": !0
|
|
86
|
+
}),
|
|
87
|
+
L && /* @__PURE__ */ a(y, {
|
|
88
|
+
className: e.submenuIcon,
|
|
89
|
+
"aria-hidden": !0
|
|
90
|
+
})
|
|
91
|
+
] })
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
U as t
|
|
97
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var _ = "_root_1fskg_1", r = "_solid_1fskg_22", a = "_outline_1fskg_26", s = "_soft_1fskg_30", o = "_sm_1fskg_35", e = "_md_1fskg_40", n = "_square_1fskg_46", t = "_round_1fskg_51", c = "_accent_1fskg_57", i = "_success_1fskg_63", d = "_warning_1fskg_69", v = "_hoverable_1fskg_75", u = "_box_1fskg_113", k = "_indicator_1fskg_134", f = "_check_1fskg_150", p = "_minus_1fskg_151", L = {
|
|
2
|
+
root: _,
|
|
3
|
+
solid: r,
|
|
4
|
+
outline: a,
|
|
5
|
+
soft: s,
|
|
6
|
+
sm: o,
|
|
7
|
+
md: e,
|
|
8
|
+
square: n,
|
|
9
|
+
round: t,
|
|
10
|
+
accent: c,
|
|
11
|
+
success: i,
|
|
12
|
+
warning: d,
|
|
13
|
+
hoverable: v,
|
|
14
|
+
box: u,
|
|
15
|
+
indicator: k,
|
|
16
|
+
check: f,
|
|
17
|
+
minus: p
|
|
18
|
+
}, g = "_root_1dup2_2", l = "_submenuIcon_1dup2_51", m = "_startIcon_1dup2_55", b = "_endIcon_1dup2_56", h = "_label_1dup2_72", I = "_text_1dup2_82", x = "_description_1dup2_90", D = "_inlineDescription_1dup2_98", q = "_endDescription_1dup2_103", w = "_hotkeys_1dup2_108", y = "_actions_1dup2_114", C = "_checkIndicator_1dup2_131", $ = {
|
|
19
|
+
root: g,
|
|
20
|
+
submenuIcon: l,
|
|
21
|
+
startIcon: m,
|
|
22
|
+
endIcon: b,
|
|
23
|
+
label: h,
|
|
24
|
+
text: I,
|
|
25
|
+
description: x,
|
|
26
|
+
inlineDescription: D,
|
|
27
|
+
endDescription: q,
|
|
28
|
+
hotkeys: w,
|
|
29
|
+
actions: y,
|
|
30
|
+
checkIndicator: C
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
L as n,
|
|
34
|
+
$ as t
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _="_root_1fskg_1",e="_solid_1fskg_22",r="_outline_1fskg_26",a="_soft_1fskg_30",t="_sm_1fskg_35",o="_md_1fskg_40",n="_square_1fskg_46",s="_round_1fskg_51",u="_accent_1fskg_57",c="_success_1fskg_63",d="_warning_1fskg_69",i="_hoverable_1fskg_75",v="_box_1fskg_113",f="_indicator_1fskg_134",k="_check_1fskg_150",l="_minus_1fskg_151",g={root:_,solid:e,outline:r,soft:a,sm:t,md:o,square:n,round:s,accent:u,success:c,warning:d,hoverable:i,box:v,indicator:f,check:k,minus:l},p="_root_1dup2_2",m="_submenuIcon_1dup2_51",b="_startIcon_1dup2_55",h="_endIcon_1dup2_56",I="_label_1dup2_72",x="_text_1dup2_82",y="_description_1dup2_90",D="_inlineDescription_1dup2_98",j="_endDescription_1dup2_103",q="_hotkeys_1dup2_108",w="_actions_1dup2_114",C="_checkIndicator_1dup2_131",L={root:p,submenuIcon:m,startIcon:b,endIcon:h,label:I,text:x,description:y,inlineDescription:D,endDescription:j,hotkeys:q,actions:w,checkIndicator:C};Object.defineProperty(exports,"Checkbox_module_default",{enumerable:!0,get:function(){return g}});Object.defineProperty(exports,"ListItem_module_default",{enumerable:!0,get:function(){return L}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=require("./theme-
|
|
1
|
+
const a=require("./theme-DumxXtpW.cjs");let r=require("react/jsx-runtime");var o="_container_1i6sz_1",i="_dot_1i6sz_15",d="_loaderDot_1i6sz_1",t={container:o,dot:i,loaderDot:d},n=({color:e})=>(0,r.jsx)("div",{className:t.container,style:e?{"--loader-color":a.themeCssVariables.tag.text[e]}:void 0,children:(0,r.jsx)("div",{className:t.dot})});Object.defineProperty(exports,"Loader",{enumerable:!0,get:function(){return n}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const f=require("./theme-DumxXtpW.cjs"),a=require("./useProvidedTextDirection-B7ovnsdr.cjs");let o=require("react/jsx-runtime"),t=require("@base-ui/react/popover"),u=require("@base-ui/react/menu");var N="_positioner_zlrze_1",x="_popup_zlrze_5",M="_title_zlrze_29",z="_description_zlrze_36",C="_arrow_zlrze_42",p={positioner:N,popup:x,title:M,description:z,arrow:C},T=({className:e,...r})=>(0,o.jsx)(t.Popover.Description,{...r,className:a.mergeClassNames(p.description,e)}),q=({side:e="bottom",align:r="center",sideOffset:i=8,alignOffset:n,arrow:l=!1,anchor:_,collisionPadding:c,container:v,keepMounted:m,className:d,children:P,...g})=>{const b=f.useThemeContainer(),j=a.useProvidedTextDirection();return(0,o.jsx)(t.Popover.Portal,{container:v??b??void 0,keepMounted:m,children:(0,o.jsx)(t.Popover.Positioner,{dir:j,side:e,align:r,sideOffset:i,alignOffset:n,anchor:_,collisionPadding:c,className:p.positioner,children:(0,o.jsxs)(t.Popover.Popup,{...g,className:a.mergeClassNames(p.popup,d),children:[l&&(0,o.jsx)(t.Popover.Arrow,{className:p.arrow}),P]})})})},h=({className:e,...r})=>(0,o.jsx)(t.Popover.Title,{...r,className:a.mergeClassNames(p.title,e)}),G={Root:t.Popover.Root,Trigger:t.Popover.Trigger,Popup:q,Title:h,Description:T,Close:t.Popover.Close},L="_positioner_3411d_1",y="_popup_3411d_5",D="_group_3411d_36",O="_groupLabel_3411d_42",w="_separator_3411d_54",s={positioner:L,popup:y,group:D,groupLabel:O,separator:w},S=({className:e,...r})=>(0,o.jsx)(u.Menu.Group,{...r,className:a.mergeClassNames(s.group,e)}),R=({className:e,...r})=>(0,o.jsx)(u.Menu.GroupLabel,{...r,className:a.mergeClassNames(s.groupLabel,e)}),$=({className:e,...r})=>(0,o.jsx)(u.Menu.Separator,{...r,className:a.mergeClassNames(s.separator,e)});Object.defineProperty(exports,"MenuGroup",{enumerable:!0,get:function(){return S}});Object.defineProperty(exports,"MenuGroupLabel",{enumerable:!0,get:function(){return R}});Object.defineProperty(exports,"MenuSeparator",{enumerable:!0,get:function(){return $}});Object.defineProperty(exports,"Menu_module_default",{enumerable:!0,get:function(){return s}});Object.defineProperty(exports,"Popover",{enumerable:!0,get:function(){return G}});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { t as f } from "./theme-CjHovJAZ.js";
|
|
2
|
+
import { n as p, t as T } from "./useProvidedTextDirection-P1dtjUtE.js";
|
|
3
|
+
import { jsx as a, jsxs as b } from "react/jsx-runtime";
|
|
4
|
+
import { Popover as e } from "@base-ui/react/popover";
|
|
5
|
+
import { Menu as i } from "@base-ui/react/menu";
|
|
6
|
+
var h = "_positioner_zlrze_1", C = "_popup_zlrze_5", L = "_title_zlrze_29", M = "_description_zlrze_36", w = "_arrow_zlrze_42", t = {
|
|
7
|
+
positioner: h,
|
|
8
|
+
popup: C,
|
|
9
|
+
title: L,
|
|
10
|
+
description: M,
|
|
11
|
+
arrow: w
|
|
12
|
+
}, x = ({ className: r, ...o }) => /* @__PURE__ */ a(e.Description, {
|
|
13
|
+
...o,
|
|
14
|
+
className: p(t.description, r)
|
|
15
|
+
}), D = ({ side: r = "bottom", align: o = "center", sideOffset: l = 8, alignOffset: n, arrow: _ = !1, anchor: u, collisionPadding: v, container: m, keepMounted: c, className: d, children: P, ...g }) => {
|
|
16
|
+
const z = f(), N = T();
|
|
17
|
+
return /* @__PURE__ */ a(e.Portal, {
|
|
18
|
+
container: m ?? z ?? void 0,
|
|
19
|
+
keepMounted: c,
|
|
20
|
+
children: /* @__PURE__ */ a(e.Positioner, {
|
|
21
|
+
dir: N,
|
|
22
|
+
side: r,
|
|
23
|
+
align: o,
|
|
24
|
+
sideOffset: l,
|
|
25
|
+
alignOffset: n,
|
|
26
|
+
anchor: u,
|
|
27
|
+
collisionPadding: v,
|
|
28
|
+
className: t.positioner,
|
|
29
|
+
children: /* @__PURE__ */ b(e.Popup, {
|
|
30
|
+
...g,
|
|
31
|
+
className: p(t.popup, d),
|
|
32
|
+
children: [_ && /* @__PURE__ */ a(e.Arrow, { className: t.arrow }), P]
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
}, G = ({ className: r, ...o }) => /* @__PURE__ */ a(e.Title, {
|
|
37
|
+
...o,
|
|
38
|
+
className: p(t.title, r)
|
|
39
|
+
}), F = {
|
|
40
|
+
Root: e.Root,
|
|
41
|
+
Trigger: e.Trigger,
|
|
42
|
+
Popup: D,
|
|
43
|
+
Title: G,
|
|
44
|
+
Description: x,
|
|
45
|
+
Close: e.Close
|
|
46
|
+
}, $ = "_positioner_3411d_1", j = "_popup_3411d_5", R = "_group_3411d_36", S = "_groupLabel_3411d_42", A = "_separator_3411d_54", s = {
|
|
47
|
+
positioner: $,
|
|
48
|
+
popup: j,
|
|
49
|
+
group: R,
|
|
50
|
+
groupLabel: S,
|
|
51
|
+
separator: A
|
|
52
|
+
}, H = ({ className: r, ...o }) => /* @__PURE__ */ a(i.Group, {
|
|
53
|
+
...o,
|
|
54
|
+
className: p(s.group, r)
|
|
55
|
+
}), I = ({ className: r, ...o }) => /* @__PURE__ */ a(i.GroupLabel, {
|
|
56
|
+
...o,
|
|
57
|
+
className: p(s.groupLabel, r)
|
|
58
|
+
}), J = ({ className: r, ...o }) => /* @__PURE__ */ a(i.Separator, {
|
|
59
|
+
...o,
|
|
60
|
+
className: p(s.separator, r)
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
F as a,
|
|
64
|
+
s as i,
|
|
65
|
+
I as n,
|
|
66
|
+
H as r,
|
|
67
|
+
J as t
|
|
68
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { t as s } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
+
import { t as q } from "./theme-CjHovJAZ.js";
|
|
3
|
+
import { t as U } from "./getSafeUrl-DXwcx-N0.js";
|
|
4
|
+
import { n as j, t as F } from "./useProvidedTextDirection-P1dtjUtE.js";
|
|
5
|
+
import { clsx as y } from "clsx";
|
|
6
|
+
import { Fragment as A, jsx as r, jsxs as k } from "react/jsx-runtime";
|
|
7
|
+
import { isNonEmptyString as E, isNumber as X, isString as G } from "@sniptt/guards";
|
|
8
|
+
import { memo as $, useRef as z, useState as S } from "react";
|
|
9
|
+
import { useRender as H } from "@base-ui/react/use-render";
|
|
10
|
+
import { Tooltip as c } from "@base-ui/react/tooltip";
|
|
11
|
+
var B = "_positioner_w2bea_1", J = "_popup_w2bea_5", K = "_content_w2bea_47", Q = "_title_w2bea_53", V = "_icon_w2bea_65", Y = "_description_w2bea_75", Z = "_arrow_w2bea_81", v = {
|
|
12
|
+
positioner: B,
|
|
13
|
+
popup: J,
|
|
14
|
+
content: K,
|
|
15
|
+
title: Q,
|
|
16
|
+
icon: V,
|
|
17
|
+
description: Y,
|
|
18
|
+
arrow: Z
|
|
19
|
+
}, L = ({ children: t, description: o, startIcon: e, className: n, render: i, ref: l, ...p }) => H({
|
|
20
|
+
defaultTagName: "div",
|
|
21
|
+
render: i,
|
|
22
|
+
ref: l,
|
|
23
|
+
props: {
|
|
24
|
+
...p,
|
|
25
|
+
className: y(v.content, n),
|
|
26
|
+
children: /* @__PURE__ */ k(A, { children: [s(t) && t !== "" && /* @__PURE__ */ k("div", {
|
|
27
|
+
className: v.title,
|
|
28
|
+
children: [s(e) && /* @__PURE__ */ r("span", {
|
|
29
|
+
className: v.icon,
|
|
30
|
+
"aria-hidden": !0,
|
|
31
|
+
children: e
|
|
32
|
+
}), /* @__PURE__ */ r("span", { children: t })]
|
|
33
|
+
}), s(o) && /* @__PURE__ */ r("div", {
|
|
34
|
+
className: v.description,
|
|
35
|
+
children: o
|
|
36
|
+
})] })
|
|
37
|
+
}
|
|
38
|
+
}), ee = 10, te = "300px", M = ({ side: t = "top", align: o = "center", sideOffset: e = ee, alignOffset: n, anchor: i, positionMethod: l, collisionBoundary: p, collisionPadding: u, collisionAvoidance: _, sticky: m, disableAnchorTracking: f, arrow: g = !1, withExitAnimation: x = !1, maxWidth: C = te, container: T, keepMounted: h, className: d, children: w, ...D }) => {
|
|
39
|
+
const N = q(), b = F(), a = G(w) || X(w);
|
|
40
|
+
return /* @__PURE__ */ r(c.Portal, {
|
|
41
|
+
container: T ?? N ?? void 0,
|
|
42
|
+
keepMounted: h,
|
|
43
|
+
children: /* @__PURE__ */ r(c.Positioner, {
|
|
44
|
+
dir: b,
|
|
45
|
+
side: t,
|
|
46
|
+
align: o,
|
|
47
|
+
sideOffset: e,
|
|
48
|
+
alignOffset: n,
|
|
49
|
+
anchor: i,
|
|
50
|
+
positionMethod: l,
|
|
51
|
+
collisionBoundary: p,
|
|
52
|
+
collisionPadding: u,
|
|
53
|
+
collisionAvoidance: _,
|
|
54
|
+
sticky: m,
|
|
55
|
+
disableAnchorTracking: f,
|
|
56
|
+
className: v.positioner,
|
|
57
|
+
style: { maxWidth: C },
|
|
58
|
+
children: /* @__PURE__ */ k(c.Popup, {
|
|
59
|
+
role: "tooltip",
|
|
60
|
+
...D,
|
|
61
|
+
"data-with-exit-animation": x || void 0,
|
|
62
|
+
className: j(v.popup, d),
|
|
63
|
+
children: [a ? /* @__PURE__ */ r(L, { children: w }) : w, g && /* @__PURE__ */ r(c.Arrow, { className: v.arrow })]
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
}, oe = ({ content: t, children: o, open: e, defaultOpen: n, onOpenChange: i, onOpenChangeComplete: l, disabled: p = !1, disableHoverablePopup: u, trackCursorAxis: _, actionsRef: m, triggerId: f, defaultTriggerId: g, delay: x, closeDelay: C, closeOnClick: T, ...h }) => {
|
|
68
|
+
const d = p || !s(t) || t === "" || t === !1;
|
|
69
|
+
return /* @__PURE__ */ k(c.Root, {
|
|
70
|
+
open: s(e) ? e && !d : void 0,
|
|
71
|
+
defaultOpen: n && !d,
|
|
72
|
+
onOpenChange: i,
|
|
73
|
+
onOpenChangeComplete: l,
|
|
74
|
+
disabled: d,
|
|
75
|
+
disableHoverablePopup: u,
|
|
76
|
+
trackCursorAxis: _,
|
|
77
|
+
actionsRef: m,
|
|
78
|
+
triggerId: f,
|
|
79
|
+
defaultTriggerId: g,
|
|
80
|
+
children: [/* @__PURE__ */ r(c.Trigger, {
|
|
81
|
+
render: o,
|
|
82
|
+
delay: x,
|
|
83
|
+
closeDelay: C,
|
|
84
|
+
closeOnClick: T
|
|
85
|
+
}), /* @__PURE__ */ r(M, {
|
|
86
|
+
...h,
|
|
87
|
+
children: t
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
90
|
+
}, R = Object.assign(oe, {
|
|
91
|
+
Root: c.Root,
|
|
92
|
+
Trigger: c.Trigger,
|
|
93
|
+
Popup: M,
|
|
94
|
+
Content: L,
|
|
95
|
+
Provider: c.Provider,
|
|
96
|
+
createHandle: c.createHandle
|
|
97
|
+
}), re = "_truncate_1x6ii_1", ne = "_lineClamp_1x6ii_7", W = {
|
|
98
|
+
truncate: re,
|
|
99
|
+
lineClamp: ne
|
|
100
|
+
}, ie = ({ render: t, truncate: o, lineClamp: e, className: n, style: i, ref: l, ...p }) => {
|
|
101
|
+
const u = s(e) && Number.isInteger(e) && e > 0;
|
|
102
|
+
return H({
|
|
103
|
+
render: t,
|
|
104
|
+
ref: l,
|
|
105
|
+
props: {
|
|
106
|
+
...p,
|
|
107
|
+
className: y(o && W.truncate, u && W.lineClamp, n),
|
|
108
|
+
style: u ? {
|
|
109
|
+
...i,
|
|
110
|
+
"--text-line-clamp": e
|
|
111
|
+
} : i
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}, le = /https?:\/\/[^\s<>[\]]+[^\s<>[\].,;:!?)]/g, ae = (t) => {
|
|
115
|
+
const o = [];
|
|
116
|
+
let e = 0;
|
|
117
|
+
for (const n of t.matchAll(le)) {
|
|
118
|
+
const i = n[0], l = n.index;
|
|
119
|
+
l > e && o.push({
|
|
120
|
+
type: "text",
|
|
121
|
+
content: t.slice(e, l)
|
|
122
|
+
}), o.push({
|
|
123
|
+
type: "link",
|
|
124
|
+
content: i
|
|
125
|
+
}), e = l + i.length;
|
|
126
|
+
}
|
|
127
|
+
return e < t.length && o.push({
|
|
128
|
+
type: "text",
|
|
129
|
+
content: t.slice(e)
|
|
130
|
+
}), o;
|
|
131
|
+
}, se = "_link_mrld0_1", ce = { link: se }, pe = ({ text: t }) => E(t) ? /* @__PURE__ */ r(A, { children: ae(t).map((o, e) => o.type === "link" ? /* @__PURE__ */ r("a", {
|
|
132
|
+
className: ce.link,
|
|
133
|
+
href: U(o.content),
|
|
134
|
+
target: "_blank",
|
|
135
|
+
rel: "noopener noreferrer",
|
|
136
|
+
onClick: (n) => n.stopPropagation(),
|
|
137
|
+
children: o.content
|
|
138
|
+
}, e) : o.content) }) : null, de = "_overflowingMultilineText_1qcnw_1", ue = "_overflowingText_1qcnw_20", me = "_large_1qcnw_37", fe = "_multilineTooltip_1qcnw_41", P = {
|
|
139
|
+
overflowingMultilineText: de,
|
|
140
|
+
overflowingText: ue,
|
|
141
|
+
large: me,
|
|
142
|
+
multilineTooltip: fe
|
|
143
|
+
}, ke = $(function({ size: o = "small", text: e, isTooltipMultiline: n, displayedMaxRows: i, tooltipContent: l, tooltipDelay: p = 500, tooltipPlace: u = "bottom", alwaysShowTooltip: _ = !1, isFocusable: m = !1 }) {
|
|
144
|
+
const f = z(null), [g, x] = S(!1), [C, T] = S(!1), h = () => {
|
|
145
|
+
const a = f.current, O = s(a) && (a.scrollHeight > a.clientHeight || a.scrollWidth > a.clientWidth);
|
|
146
|
+
return x(O), O;
|
|
147
|
+
}, d = (a) => {
|
|
148
|
+
if (!a) {
|
|
149
|
+
T(!1);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
T(h() || _);
|
|
153
|
+
}, w = () => {
|
|
154
|
+
f.current?.focus(), d(!0);
|
|
155
|
+
}, D = (a) => {
|
|
156
|
+
a.stopPropagation(), a.preventDefault();
|
|
157
|
+
}, N = E(l) ? l : E(e) ? e : null, b = s(i);
|
|
158
|
+
return /* @__PURE__ */ k(R.Root, {
|
|
159
|
+
open: C && s(N),
|
|
160
|
+
onOpenChange: (...a) => {
|
|
161
|
+
const [O, I] = a;
|
|
162
|
+
if (!O && I.reason === "trigger-hover" && m && document.activeElement === f.current) {
|
|
163
|
+
I.cancel();
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
d(O);
|
|
167
|
+
},
|
|
168
|
+
disabled: !s(N) || !g && !_,
|
|
169
|
+
children: [/* @__PURE__ */ r(R.Trigger, {
|
|
170
|
+
delay: p,
|
|
171
|
+
closeOnClick: !1,
|
|
172
|
+
render: /* @__PURE__ */ r(ie, {
|
|
173
|
+
...b ? { lineClamp: i || 1 } : { truncate: !0 },
|
|
174
|
+
"data-testid": "tooltip",
|
|
175
|
+
"data-content-overflowing": g ? "" : void 0,
|
|
176
|
+
className: y(b ? P.overflowingMultilineText : P.overflowingText, o === "large" && P.large),
|
|
177
|
+
ref: f,
|
|
178
|
+
tabIndex: m ? 0 : void 0,
|
|
179
|
+
onPointerEnter: h,
|
|
180
|
+
onFocus: m ? () => d(!0) : void 0,
|
|
181
|
+
onClick: m ? w : void 0,
|
|
182
|
+
children: E(e) ? /* @__PURE__ */ r(pe, { text: e }) : e
|
|
183
|
+
})
|
|
184
|
+
}), /* @__PURE__ */ r(R.Popup, {
|
|
185
|
+
className: n ? P.multilineTooltip : void 0,
|
|
186
|
+
sideOffset: 5,
|
|
187
|
+
side: u,
|
|
188
|
+
positionMethod: "absolute",
|
|
189
|
+
onClick: D,
|
|
190
|
+
children: N
|
|
191
|
+
})]
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
export {
|
|
195
|
+
ie as n,
|
|
196
|
+
R as r,
|
|
197
|
+
ke as t
|
|
198
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const L=require("./theme-DumxXtpW.cjs"),a=require("./isDefined-DS2Q42p5.cjs"),M=require("./getSafeUrl-BuX_E2_8.cjs"),S=require("./useProvidedTextDirection-B7ovnsdr.cjs");let E=require("clsx"),t=require("react/jsx-runtime"),w=require("@sniptt/guards"),q=require("react"),W=require("@base-ui/react/use-render"),c=require("@base-ui/react/tooltip");var U="_positioner_w2bea_1",F="_popup_w2bea_5",X="_content_w2bea_47",G="_title_w2bea_53",z="_icon_w2bea_65",B="_description_w2bea_75",J="_arrow_w2bea_81",v={positioner:U,popup:F,content:X,title:G,icon:z,description:B,arrow:J},I=({children:i,description:r,startIcon:e,className:n,render:o,ref:l,...u})=>(0,W.useRender)({defaultTagName:"div",render:o,ref:l,props:{...u,className:(0,E.clsx)(v.content,n),children:(0,t.jsxs)(t.Fragment,{children:[a.isDefined(i)&&i!==""&&(0,t.jsxs)("div",{className:v.title,children:[a.isDefined(e)&&(0,t.jsx)("span",{className:v.icon,"aria-hidden":!0,children:e}),(0,t.jsx)("span",{children:i})]}),a.isDefined(r)&&(0,t.jsx)("div",{className:v.description,children:r})]})}}),K=10,Q="300px",A=({side:i="top",align:r="center",sideOffset:e=K,alignOffset:n,anchor:o,positionMethod:l,collisionBoundary:u,collisionPadding:p,collisionAvoidance:T,sticky:_,disableAnchorTracking:f,arrow:g=!1,withExitAnimation:j=!1,maxWidth:b=Q,container:m,keepMounted:x,className:d,children:h,...k})=>{const D=L.useThemeContainer(),N=S.useProvidedTextDirection(),s=(0,w.isString)(h)||(0,w.isNumber)(h);return(0,t.jsx)(c.Tooltip.Portal,{container:m??D??void 0,keepMounted:x,children:(0,t.jsx)(c.Tooltip.Positioner,{dir:N,side:i,align:r,sideOffset:e,alignOffset:n,anchor:o,positionMethod:l,collisionBoundary:u,collisionPadding:p,collisionAvoidance:T,sticky:_,disableAnchorTracking:f,className:v.positioner,style:{maxWidth:b},children:(0,t.jsxs)(c.Tooltip.Popup,{role:"tooltip",...k,"data-with-exit-animation":j||void 0,className:S.mergeClassNames(v.popup,d),children:[s?(0,t.jsx)(I,{children:h}):h,g&&(0,t.jsx)(c.Tooltip.Arrow,{className:v.arrow})]})})})},V=({content:i,children:r,open:e,defaultOpen:n,onOpenChange:o,onOpenChangeComplete:l,disabled:u=!1,disableHoverablePopup:p,trackCursorAxis:T,actionsRef:_,triggerId:f,defaultTriggerId:g,delay:j,closeDelay:b,closeOnClick:m,...x})=>{const d=u||!a.isDefined(i)||i===""||i===!1;return(0,t.jsxs)(c.Tooltip.Root,{open:a.isDefined(e)?e&&!d:void 0,defaultOpen:n&&!d,onOpenChange:o,onOpenChangeComplete:l,disabled:d,disableHoverablePopup:p,trackCursorAxis:T,actionsRef:_,triggerId:f,defaultTriggerId:g,children:[(0,t.jsx)(c.Tooltip.Trigger,{render:r,delay:j,closeDelay:b,closeOnClick:m}),(0,t.jsx)(A,{...x,children:i})]})},C=Object.assign(V,{Root:c.Tooltip.Root,Trigger:c.Tooltip.Trigger,Popup:A,Content:I,Provider:c.Tooltip.Provider,createHandle:c.Tooltip.createHandle}),Y="_truncate_1x6ii_1",Z="_lineClamp_1x6ii_7",R={truncate:Y,lineClamp:Z},H=({render:i,truncate:r,lineClamp:e,className:n,style:o,ref:l,...u})=>{const p=a.isDefined(e)&&Number.isInteger(e)&&e>0;return(0,W.useRender)({render:i,ref:l,props:{...u,className:(0,E.clsx)(r&&R.truncate,p&&R.lineClamp,n),style:p?{...o,"--text-line-clamp":e}:o}})},$=/https?:\/\/[^\s<>[\]]+[^\s<>[\].,;:!?)]/g,ee=i=>{const r=[];let e=0;for(const n of i.matchAll($)){const o=n[0],l=n.index;l>e&&r.push({type:"text",content:i.slice(e,l)}),r.push({type:"link",content:o}),e=l+o.length}return e<i.length&&r.push({type:"text",content:i.slice(e)}),r},te="_link_mrld0_1",ie={link:te},re=({text:i})=>(0,w.isNonEmptyString)(i)?(0,t.jsx)(t.Fragment,{children:ee(i).map((r,e)=>r.type==="link"?(0,t.jsx)("a",{className:ie.link,href:M.getSafeUrl(r.content),target:"_blank",rel:"noopener noreferrer",onClick:n=>n.stopPropagation(),children:r.content},e):r.content)}):null,ne="_overflowingMultilineText_1qcnw_1",oe="_overflowingText_1qcnw_20",le="_large_1qcnw_37",se="_multilineTooltip_1qcnw_41",P={overflowingMultilineText:ne,overflowingText:oe,large:le,multilineTooltip:se},ae=(0,q.memo)(function({size:r="small",text:e,isTooltipMultiline:n,displayedMaxRows:o,tooltipContent:l,tooltipDelay:u=500,tooltipPlace:p="bottom",alwaysShowTooltip:T=!1,isFocusable:_=!1}){const f=(0,q.useRef)(null),[g,j]=(0,q.useState)(!1),[b,m]=(0,q.useState)(!1),x=()=>{const s=f.current,O=a.isDefined(s)&&(s.scrollHeight>s.clientHeight||s.scrollWidth>s.clientWidth);return j(O),O},d=s=>{if(!s){m(!1);return}m(x()||T)},h=()=>{f.current?.focus(),d(!0)},k=s=>{s.stopPropagation(),s.preventDefault()},D=(0,w.isNonEmptyString)(l)?l:(0,w.isNonEmptyString)(e)?e:null,N=a.isDefined(o);return(0,t.jsxs)(C.Root,{open:b&&a.isDefined(D),onOpenChange:(...s)=>{const[O,y]=s;if(!O&&y.reason==="trigger-hover"&&_&&document.activeElement===f.current){y.cancel();return}d(O)},disabled:!a.isDefined(D)||!g&&!T,children:[(0,t.jsx)(C.Trigger,{delay:u,closeOnClick:!1,render:(0,t.jsx)(H,{...N?{lineClamp:o||1}:{truncate:!0},"data-testid":"tooltip","data-content-overflowing":g?"":void 0,className:(0,E.clsx)(N?P.overflowingMultilineText:P.overflowingText,r==="large"&&P.large),ref:f,tabIndex:_?0:void 0,onPointerEnter:x,onFocus:_?()=>d(!0):void 0,onClick:_?h:void 0,children:(0,w.isNonEmptyString)(e)?(0,t.jsx)(re,{text:e}):e})}),(0,t.jsx)(C.Popup,{className:n?P.multilineTooltip:void 0,sideOffset:5,side:p,positionMethod:"absolute",onClick:k,children:D})]})});Object.defineProperty(exports,"OverflowingTextWithTooltip",{enumerable:!0,get:function(){return ae}});Object.defineProperty(exports,"Text",{enumerable:!0,get:function(){return H}});Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:function(){return C}});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { t as B } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
+
import { t as x } from "./isRenderableSlot-DT_depzM.js";
|
|
3
|
+
import { clsx as y } from "clsx";
|
|
4
|
+
import { jsx as a, jsxs as k } from "react/jsx-runtime";
|
|
5
|
+
import { isNonEmptyString as N } from "@sniptt/guards";
|
|
6
|
+
import { Progress as v } from "@base-ui/react/progress";
|
|
7
|
+
import { clamp as D } from "@base-ui/utils/clamp";
|
|
8
|
+
var R = "_root_xbchc_1", A = "_ring_xbchc_11", I = "_track_xbchc_16", S = "_indicator_xbchc_21", g = {
|
|
9
|
+
root: R,
|
|
10
|
+
ring: A,
|
|
11
|
+
track: I,
|
|
12
|
+
indicator: S
|
|
13
|
+
}, E = {
|
|
14
|
+
sm: 14,
|
|
15
|
+
md: 16
|
|
16
|
+
}, b = 2, Q = ({ value: e, size: c = "md", barColor: o, children: s, className: p, style: _, "aria-valuetext": n, ...f }) => {
|
|
17
|
+
const l = D(e, 0, 100), m = Number.isNaN(l) ? 0 : l, r = E[c], t = (r - b) / 2, i = 2 * Math.PI * t;
|
|
18
|
+
return /* @__PURE__ */ k(v.Root, {
|
|
19
|
+
...f,
|
|
20
|
+
value: m,
|
|
21
|
+
min: 0,
|
|
22
|
+
max: 100,
|
|
23
|
+
getAriaValueText: (h) => N(n) ? n : h,
|
|
24
|
+
className: y(g.root, p),
|
|
25
|
+
style: {
|
|
26
|
+
...B(o) ? { "--progress-ring-color": o } : {},
|
|
27
|
+
..._
|
|
28
|
+
},
|
|
29
|
+
children: [x(s) && /* @__PURE__ */ a("span", { children: s }), /* @__PURE__ */ k("svg", {
|
|
30
|
+
className: g.ring,
|
|
31
|
+
width: r,
|
|
32
|
+
height: r,
|
|
33
|
+
viewBox: `0 0 ${r} ${r}`,
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
focusable: "false",
|
|
36
|
+
children: [/* @__PURE__ */ a("circle", {
|
|
37
|
+
className: g.track,
|
|
38
|
+
cx: r / 2,
|
|
39
|
+
cy: r / 2,
|
|
40
|
+
r: t,
|
|
41
|
+
strokeWidth: b
|
|
42
|
+
}), /* @__PURE__ */ a("circle", {
|
|
43
|
+
className: g.indicator,
|
|
44
|
+
cx: r / 2,
|
|
45
|
+
cy: r / 2,
|
|
46
|
+
r: t,
|
|
47
|
+
strokeWidth: b,
|
|
48
|
+
strokeDasharray: i,
|
|
49
|
+
strokeDashoffset: i - m / 100 * i,
|
|
50
|
+
strokeLinecap: "round"
|
|
51
|
+
})]
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}, P = "_banner_i03ag_1", T = "_primaryBlue_i03ag_17", w = "_primaryDanger_i03ag_23", G = "_secondaryBlue_i03ag_29", $ = "_secondaryDanger_i03ag_35", d = {
|
|
55
|
+
banner: P,
|
|
56
|
+
primaryBlue: T,
|
|
57
|
+
primaryDanger: w,
|
|
58
|
+
secondaryBlue: G,
|
|
59
|
+
secondaryDanger: $
|
|
60
|
+
}, L = {
|
|
61
|
+
primary: {
|
|
62
|
+
blue: d.primaryBlue,
|
|
63
|
+
danger: d.primaryDanger
|
|
64
|
+
},
|
|
65
|
+
secondary: {
|
|
66
|
+
blue: d.secondaryBlue,
|
|
67
|
+
danger: d.secondaryDanger
|
|
68
|
+
}
|
|
69
|
+
}, U = ({ color: e = "blue", variant: c = "primary", className: o, children: s }) => /* @__PURE__ */ a("div", {
|
|
70
|
+
className: y(d.banner, L[c][e], o),
|
|
71
|
+
children: s
|
|
72
|
+
}), O = "_bar_1kcc7_1", V = "_progressBarGrowIn_1kcc7_1", W = "_track_1kcc7_20", j = "_indicator_1kcc7_26", z = "_glint_1kcc7_45", M = "_progressBarGlint_1kcc7_1", u = {
|
|
73
|
+
bar: O,
|
|
74
|
+
progressBarGrowIn: V,
|
|
75
|
+
track: W,
|
|
76
|
+
indicator: j,
|
|
77
|
+
glint: z,
|
|
78
|
+
progressBarGlint: M
|
|
79
|
+
}, X = ({ value: e, size: c = "md", className: o, barColor: s, backgroundColor: p = "none", withBorderRadius: _ = !1, withGrowIn: n = !1, withGlint: f = !1, withSpringFill: l = !1, withMinimumFillWidth: m = !0, ariaLabel: r, onGrowInComplete: t }) => /* @__PURE__ */ a(v.Root, {
|
|
80
|
+
className: y(u.bar, o),
|
|
81
|
+
"data-size": c,
|
|
82
|
+
"data-with-border-radius": _ || void 0,
|
|
83
|
+
"data-grow-in": n || void 0,
|
|
84
|
+
"aria-label": r,
|
|
85
|
+
value: e,
|
|
86
|
+
onAnimationEnd: (i) => {
|
|
87
|
+
n && i.target === i.currentTarget && t?.();
|
|
88
|
+
},
|
|
89
|
+
style: {
|
|
90
|
+
"--progress-bar-background-color": p,
|
|
91
|
+
...N(s) ? { "--progress-bar-color": s } : {}
|
|
92
|
+
},
|
|
93
|
+
children: /* @__PURE__ */ a(v.Track, {
|
|
94
|
+
className: u.track,
|
|
95
|
+
children: /* @__PURE__ */ a(v.Indicator, {
|
|
96
|
+
className: u.indicator,
|
|
97
|
+
"data-with-border-radius": _ || void 0,
|
|
98
|
+
"data-spring-fill": l || void 0,
|
|
99
|
+
"data-nonzero": m && e > 0 || void 0,
|
|
100
|
+
children: f && /* @__PURE__ */ a("span", { className: u.glint }, e)
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
export {
|
|
105
|
+
U as n,
|
|
106
|
+
Q as r,
|
|
107
|
+
X as t
|
|
108
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const N=require("./isDefined-DS2Q42p5.cjs"),h=require("./isRenderableSlot-Guryb6Nf.cjs");let x=require("clsx"),e=require("react/jsx-runtime"),f=require("@sniptt/guards"),v=require("@base-ui/react/progress"),B=require("@base-ui/utils/clamp");var j="_root_xbchc_1",P="_ring_xbchc_11",D="_track_xbchc_16",R="_indicator_xbchc_21",g={root:j,ring:P,track:D,indicator:R},q={sm:14,md:16},y=2,S=({value:a,size:t="md",barColor:n,children:s,className:b,style:l,"aria-valuetext":c,...p})=>{const d=(0,B.clamp)(a,0,100),u=Number.isNaN(d)?0:d,r=q[t],o=(r-y)/2,i=2*Math.PI*o;return(0,e.jsxs)(v.Progress.Root,{...p,value:u,min:0,max:100,getAriaValueText:k=>(0,f.isNonEmptyString)(c)?c:k,className:(0,x.clsx)(g.root,b),style:{...N.isDefined(n)?{"--progress-ring-color":n}:{},...l},children:[h.isRenderableSlot(s)&&(0,e.jsx)("span",{children:s}),(0,e.jsxs)("svg",{className:g.ring,width:r,height:r,viewBox:`0 0 ${r} ${r}`,"aria-hidden":"true",focusable:"false",children:[(0,e.jsx)("circle",{className:g.track,cx:r/2,cy:r/2,r:o,strokeWidth:y}),(0,e.jsx)("circle",{className:g.indicator,cx:r/2,cy:r/2,r:o,strokeWidth:y,strokeDasharray:i,strokeDashoffset:i-u/100*i,strokeLinecap:"round"})]})]})},A="_banner_i03ag_1",E="_primaryBlue_i03ag_17",I="_primaryDanger_i03ag_23",O="_secondaryBlue_i03ag_29",T="_secondaryDanger_i03ag_35",_={banner:A,primaryBlue:E,primaryDanger:I,secondaryBlue:O,secondaryDanger:T},w={primary:{blue:_.primaryBlue,danger:_.primaryDanger},secondary:{blue:_.secondaryBlue,danger:_.secondaryDanger}},G=({color:a="blue",variant:t="primary",className:n,children:s})=>(0,e.jsx)("div",{className:(0,x.clsx)(_.banner,w[t][a],n),children:s}),$="_bar_1kcc7_1",L="_progressBarGrowIn_1kcc7_1",V="_track_1kcc7_20",W="_indicator_1kcc7_26",z="_glint_1kcc7_45",M="_progressBarGlint_1kcc7_1",m={bar:$,progressBarGrowIn:L,track:V,indicator:W,glint:z,progressBarGlint:M},H=({value:a,size:t="md",className:n,barColor:s,backgroundColor:b="none",withBorderRadius:l=!1,withGrowIn:c=!1,withGlint:p=!1,withSpringFill:d=!1,withMinimumFillWidth:u=!0,ariaLabel:r,onGrowInComplete:o})=>(0,e.jsx)(v.Progress.Root,{className:(0,x.clsx)(m.bar,n),"data-size":t,"data-with-border-radius":l||void 0,"data-grow-in":c||void 0,"aria-label":r,value:a,onAnimationEnd:i=>{c&&i.target===i.currentTarget&&o?.()},style:{"--progress-bar-background-color":b,...(0,f.isNonEmptyString)(s)?{"--progress-bar-color":s}:{}},children:(0,e.jsx)(v.Progress.Track,{className:m.track,children:(0,e.jsx)(v.Progress.Indicator,{className:m.indicator,"data-with-border-radius":l||void 0,"data-spring-fill":d||void 0,"data-nonzero":u&&a>0||void 0,children:p&&(0,e.jsx)("span",{className:m.glint},a)})})});Object.defineProperty(exports,"Banner",{enumerable:!0,get:function(){return G}});Object.defineProperty(exports,"ProgressBar",{enumerable:!0,get:function(){return H}});Object.defineProperty(exports,"ProgressRing",{enumerable:!0,get:function(){return S}});
|