@yahoo/uds 3.131.0-beta.2 → 3.132.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/dist/automated-config/dist/properties.d.cts +1 -1
- package/dist/automated-config/dist/properties.d.ts +1 -1
- package/dist/automated-config/dist/utils/buildConfigSchema.d.cts +1 -1
- package/dist/automated-config/dist/utils/buildConfigSchema.d.ts +1 -1
- package/dist/components/Banner/Banner.cjs +5 -2
- package/dist/components/Banner/Banner.d.cts +10 -1
- package/dist/components/Banner/Banner.d.ts +10 -1
- package/dist/components/Banner/Banner.js +5 -2
- package/dist/components/Banner/utils.d.cts +1 -1
- package/dist/components/Banner/utils.d.ts +1 -1
- package/dist/components/Box.d.cts +1 -1
- package/dist/components/Box.d.ts +1 -1
- package/dist/components/Divider/Divider.d.cts +2 -2
- package/dist/components/Divider/Divider.d.ts +2 -2
- package/dist/components/Divider/DividerCore.cjs +17 -10
- package/dist/components/Divider/DividerCore.d.cts +11 -5
- package/dist/components/Divider/DividerCore.d.ts +11 -5
- package/dist/components/Divider/DividerCore.js +17 -10
- package/dist/components/Divider/DividerInternal.cjs +15 -11
- package/dist/components/Divider/DividerInternal.d.cts +1 -1
- package/dist/components/Divider/DividerInternal.d.ts +1 -1
- package/dist/components/Divider/DividerInternal.js +15 -11
- package/dist/components/FormLabel.d.cts +1 -1
- package/dist/components/FormLabel.d.ts +1 -1
- package/dist/components/HStack.d.cts +1 -1
- package/dist/components/HStack.d.ts +1 -1
- package/dist/components/Icon.cjs +6 -15
- package/dist/components/Icon.d.cts +1 -0
- package/dist/components/Icon.d.ts +1 -0
- package/dist/components/Icon.js +7 -16
- package/dist/components/IconSlot.cjs +6 -25
- package/dist/components/IconSlot.d.cts +2 -3
- package/dist/components/IconSlot.d.ts +2 -3
- package/dist/components/IconSlot.js +5 -25
- package/dist/components/Image.d.cts +1 -1
- package/dist/components/Image.d.ts +1 -1
- package/dist/components/Link.cjs +13 -6
- package/dist/components/Link.d.cts +11 -1
- package/dist/components/Link.d.ts +11 -1
- package/dist/components/Link.js +13 -6
- package/dist/components/Text.d.cts +1 -1
- package/dist/components/Text.d.ts +1 -1
- package/dist/components/VStack.d.cts +1 -1
- package/dist/components/VStack.d.ts +1 -1
- package/dist/components/client/Avatar/AvatarIcon.d.cts +1 -1
- package/dist/components/client/Avatar/AvatarIcon.d.ts +1 -1
- package/dist/components/client/Avatar/AvatarImage.d.cts +1 -1
- package/dist/components/client/Avatar/AvatarImage.d.ts +1 -1
- package/dist/components/client/Avatar/AvatarText.d.cts +1 -1
- package/dist/components/client/Avatar/AvatarText.d.ts +1 -1
- package/dist/components/client/Avatar/utils.d.cts +1 -1
- package/dist/components/client/Avatar/utils.d.ts +1 -1
- package/dist/components/client/Badge.cjs +10 -4
- package/dist/components/client/Badge.d.cts +13 -2
- package/dist/components/client/Badge.d.ts +13 -2
- package/dist/components/client/Badge.js +10 -4
- package/dist/components/client/BottomSheet/BottomSheet.d.cts +1 -1
- package/dist/components/client/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/components/client/BottomSheet/BottomSheetContent.d.cts +1 -1
- package/dist/components/client/BottomSheet/BottomSheetContent.d.ts +1 -1
- package/dist/components/client/BottomSheet/BottomSheetHandle.d.cts +1 -1
- package/dist/components/client/BottomSheet/BottomSheetHandle.d.ts +1 -1
- package/dist/components/client/BottomSheet/BottomSheetHeader.d.cts +1 -1
- package/dist/components/client/BottomSheet/BottomSheetHeader.d.ts +1 -1
- package/dist/components/client/BottomSheet/useBottomSheetSnapModel.d.cts +1 -1
- package/dist/components/client/BottomSheet/useBottomSheetSnapModel.d.ts +1 -1
- package/dist/components/client/BottomSheet/utils.d.cts +1 -1
- package/dist/components/client/BottomSheet/utils.d.ts +1 -1
- package/dist/components/client/Button.cjs +20 -9
- package/dist/components/client/Button.d.cts +13 -2
- package/dist/components/client/Button.d.ts +13 -2
- package/dist/components/client/Button.js +20 -9
- package/dist/components/client/Checkbox.cjs +14 -6
- package/dist/components/client/Checkbox.d.cts +10 -5
- package/dist/components/client/Checkbox.d.ts +10 -5
- package/dist/components/client/Checkbox.js +14 -6
- package/dist/components/client/Chip/Chip.d.cts +1 -1
- package/dist/components/client/Chip/Chip.d.ts +1 -1
- package/dist/components/client/Chip/ChipBase.d.cts +1 -1
- package/dist/components/client/Chip/ChipBase.d.ts +1 -1
- package/dist/components/client/Chip/ChipButton.d.cts +1 -1
- package/dist/components/client/Chip/ChipButton.d.ts +1 -1
- package/dist/components/client/Chip/ChipDismissible.d.cts +1 -1
- package/dist/components/client/Chip/ChipDismissible.d.ts +1 -1
- package/dist/components/client/Chip/ChipLink.d.cts +1 -1
- package/dist/components/client/Chip/ChipLink.d.ts +1 -1
- package/dist/components/client/Chip/ChipToggle.d.cts +1 -1
- package/dist/components/client/Chip/ChipToggle.d.ts +1 -1
- package/dist/components/client/IconButton.cjs +5 -8
- package/dist/components/client/IconButton.d.cts +10 -2
- package/dist/components/client/IconButton.d.ts +10 -2
- package/dist/components/client/IconButton.js +5 -8
- package/dist/components/client/Input/Input.cjs +8 -2
- package/dist/components/client/Input/Input.d.cts +4 -1
- package/dist/components/client/Input/Input.d.ts +4 -1
- package/dist/components/client/Input/Input.js +8 -2
- package/dist/components/client/Input/InputHelpTextInternal.cjs +16 -6
- package/dist/components/client/Input/InputHelpTextInternal.d.cts +11 -1
- package/dist/components/client/Input/InputHelpTextInternal.d.ts +11 -1
- package/dist/components/client/Input/InputHelpTextInternal.js +16 -6
- package/dist/components/client/Menu/Menu.Content.cjs +2 -1
- package/dist/components/client/Menu/Menu.Content.d.cts +8 -1
- package/dist/components/client/Menu/Menu.Content.d.ts +8 -1
- package/dist/components/client/Menu/Menu.Content.js +2 -1
- package/dist/components/client/Menu/Menu.Divider.cjs +8 -10
- package/dist/components/client/Menu/Menu.Divider.js +8 -10
- package/dist/components/client/Menu/Menu.Item.cjs +23 -14
- package/dist/components/client/Menu/Menu.Item.d.cts +12 -1
- package/dist/components/client/Menu/Menu.Item.d.ts +12 -1
- package/dist/components/client/Menu/Menu.Item.js +24 -15
- package/dist/components/client/Menu/Menu.ItemBase.cjs +17 -9
- package/dist/components/client/Menu/Menu.ItemBase.d.cts +10 -6
- package/dist/components/client/Menu/Menu.ItemBase.d.ts +10 -6
- package/dist/components/client/Menu/Menu.ItemBase.js +17 -9
- package/dist/components/client/Menu/Menu.ItemCheckbox.cjs +10 -10
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +2 -2
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +2 -2
- package/dist/components/client/Menu/Menu.ItemCheckbox.js +10 -10
- package/dist/components/client/Popover/Popover.d.cts +1 -1
- package/dist/components/client/Popover/Popover.d.ts +1 -1
- package/dist/components/client/Popover/PopoverContent.cjs +4 -1
- package/dist/components/client/Popover/PopoverContent.d.cts +4 -1
- package/dist/components/client/Popover/PopoverContent.d.ts +4 -1
- package/dist/components/client/Popover/PopoverContent.js +4 -1
- package/dist/components/client/Popover/PopoverTrigger.d.cts +1 -1
- package/dist/components/client/Popover/PopoverTrigger.d.ts +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +2 -2
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +2 -2
- package/dist/components/client/Popover/index.d.cts +1 -1
- package/dist/components/client/Popover/index.d.ts +1 -1
- package/dist/components/client/Pressable.d.cts +1 -1
- package/dist/components/client/Pressable.d.ts +1 -1
- package/dist/components/client/Radio/Radio.cjs +18 -15
- package/dist/components/client/Radio/Radio.d.cts +10 -5
- package/dist/components/client/Radio/Radio.d.ts +10 -5
- package/dist/components/client/Radio/Radio.js +18 -15
- package/dist/components/client/Radio/RadioGroupProvider.d.cts +1 -1
- package/dist/components/client/Radio/RadioGroupProvider.d.ts +1 -1
- package/dist/components/client/SpringMotionConfig.d.cts +1 -1
- package/dist/components/client/SpringMotionConfig.d.ts +1 -1
- package/dist/components/client/Switch.cjs +14 -6
- package/dist/components/client/Switch.d.cts +10 -6
- package/dist/components/client/Switch.d.ts +10 -6
- package/dist/components/client/Switch.js +14 -6
- package/dist/components/client/Tabs/Tab.cjs +11 -5
- package/dist/components/client/Tabs/Tab.d.cts +14 -3
- package/dist/components/client/Tabs/Tab.d.ts +14 -3
- package/dist/components/client/Tabs/Tab.js +11 -5
- package/dist/components/client/Tabs/TabList.d.cts +1 -1
- package/dist/components/client/Tabs/TabList.d.ts +1 -1
- package/dist/components/client/Tabs/TabPanel.d.cts +1 -1
- package/dist/components/client/Tabs/TabPanel.d.ts +1 -1
- package/dist/components/client/Tabs/Tabs.d.cts +1 -1
- package/dist/components/client/Tabs/Tabs.d.ts +1 -1
- package/dist/components/client/Tabs/tabsContext.d.cts +1 -1
- package/dist/components/client/Tabs/tabsContext.d.ts +1 -1
- package/dist/components/client/Toast/Toast.d.cts +1 -1
- package/dist/components/client/Toast/Toast.d.ts +1 -1
- package/dist/components/client/Toast/ToastContainer.d.cts +1 -1
- package/dist/components/client/Toast/ToastContainer.d.ts +1 -1
- package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +1 -1
- package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +1 -1
- package/dist/components/client/Toast/createToast.d.cts +1 -1
- package/dist/components/client/Toast/createToast.d.ts +1 -1
- package/dist/components/client/Tooltip/Tooltip.d.cts +1 -1
- package/dist/components/client/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/client/Tooltip/TooltipContent.cjs +9 -3
- package/dist/components/client/Tooltip/TooltipContent.d.cts +14 -3
- package/dist/components/client/Tooltip/TooltipContent.d.ts +14 -3
- package/dist/components/client/Tooltip/TooltipContent.js +9 -3
- package/dist/components/client/Tooltip/TooltipTrigger.d.cts +1 -1
- package/dist/components/client/Tooltip/TooltipTrigger.d.ts +1 -1
- package/dist/components/client/Tooltip/UDSTooltipConfigProvider.d.cts +1 -1
- package/dist/components/client/Tooltip/UDSTooltipConfigProvider.d.ts +1 -1
- package/dist/components/client/Tooltip/index.d.cts +1 -1
- package/dist/components/client/Tooltip/index.d.ts +1 -1
- package/dist/components/client/buttonConstants.d.cts +1 -1
- package/dist/components/client/buttonConstants.d.ts +1 -1
- package/dist/components/client/index.d.cts +1 -1
- package/dist/components/client/index.d.ts +1 -1
- package/dist/components/client/providers/UDSBreakpointsConfigProvider.d.cts +1 -1
- package/dist/components/client/providers/UDSBreakpointsConfigProvider.d.ts +1 -1
- package/dist/components/experimental/Table.d.cts +1 -1
- package/dist/components/experimental/Table.d.ts +1 -1
- package/dist/components/experimental/client/SwitchV2.cjs +14 -6
- package/dist/components/experimental/client/SwitchV2.d.cts +10 -6
- package/dist/components/experimental/client/SwitchV2.d.ts +10 -6
- package/dist/components/experimental/client/SwitchV2.js +14 -6
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/config/dist/index.d.cts +1 -1
- package/dist/config/dist/index.d.ts +1 -1
- package/dist/css-tokens/dist/index.d.cts +1 -1
- package/dist/css-tokens/dist/index.d.ts +1 -1
- package/dist/fixtures/dist/index.d.cts +1 -1
- package/dist/fixtures/dist/index.d.ts +1 -1
- package/dist/fixtures/index.d.cts +1 -1
- package/dist/fixtures/index.d.ts +1 -1
- package/dist/fonts/dist/index.d.cts +1 -1
- package/dist/fonts/dist/index.d.ts +1 -1
- package/dist/icons/dist/types.d.cts +30 -0
- package/dist/icons/dist/types.d.ts +30 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/modes/dist/index.d.cts +1 -1
- package/dist/modes/dist/index.d.ts +1 -1
- package/dist/motion-tokens/dist/index.d.cts +1 -1
- package/dist/motion-tokens/dist/index.d.ts +1 -1
- package/dist/providers/ColorModeProvider.d.cts +1 -1
- package/dist/providers/ColorModeProvider.d.ts +1 -1
- package/dist/providers/ScaleModeProvider.d.cts +1 -1
- package/dist/providers/ScaleModeProvider.d.ts +1 -1
- package/dist/providers/ThemeProvider.d.cts +1 -1
- package/dist/providers/ThemeProvider.d.ts +1 -1
- package/dist/runtime/bottomSheetConfig.d.cts +1 -1
- package/dist/runtime/bottomSheetConfig.d.ts +1 -1
- package/dist/runtime/breakpointsConfig.d.cts +1 -1
- package/dist/runtime/breakpointsConfig.d.ts +1 -1
- package/dist/runtime/popoverConfig.d.cts +1 -1
- package/dist/runtime/popoverConfig.d.ts +1 -1
- package/dist/runtime/toastConfig.d.cts +1 -1
- package/dist/runtime/toastConfig.d.ts +1 -1
- package/dist/runtime/tooltipConfig.d.cts +1 -1
- package/dist/runtime/tooltipConfig.d.ts +1 -1
- package/dist/styles/styler.d.cts +76 -76
- package/dist/styles/styler.d.ts +76 -76
- package/dist/styles/stylerTypes.d.cts +1 -1
- package/dist/styles/stylerTypes.d.ts +1 -1
- package/dist/tailwind/dist/types/dist/index.d.cts.map +1 -1
- package/dist/tailwind/dist/types/dist/index.d.ts.map +1 -1
- package/dist/tokens/configs/borderRadius.d.cts +1 -1
- package/dist/tokens/configs/borderRadius.d.ts +1 -1
- package/dist/tokens/configs/borderWidth.d.cts +1 -1
- package/dist/tokens/configs/borderWidth.d.ts +1 -1
- package/dist/tokens/configs/font.d.cts +1 -1
- package/dist/tokens/configs/font.d.ts +1 -1
- package/dist/tokens/configs/scaleMode.d.cts +1 -1
- package/dist/tokens/configs/scaleMode.d.ts +1 -1
- package/dist/tokens/configs/shadow.d.cts +1 -1
- package/dist/tokens/configs/shadow.d.ts +1 -1
- package/dist/tokens/configs/sizes.d.cts +1 -1
- package/dist/tokens/configs/sizes.d.ts +1 -1
- package/dist/tokens/configs/typography.d.cts +1 -1
- package/dist/tokens/configs/typography.d.ts +1 -1
- package/dist/tokens/index.d.cts +2 -2
- package/dist/tokens/index.d.ts +2 -2
- package/dist/tokens/parseButtonVariants.d.cts +1 -1
- package/dist/tokens/parseButtonVariants.d.ts +1 -1
- package/dist/tokens/types.d.cts +7 -7
- package/dist/tokens/types.d.ts +7 -7
- package/dist/tokens/utils/spectrum.d.cts +1 -1
- package/dist/tokens/utils/spectrum.d.ts +1 -1
- package/dist/types/{src → dist}/index.d.cts +26 -38
- package/dist/types/{src → dist}/index.d.ts +26 -38
- package/dist/uds/generated/componentData.cjs +109 -106
- package/dist/uds/generated/componentData.js +109 -106
- package/dist/uds/generated/tailwindPurge.cjs +73 -73
- package/dist/uds/generated/tailwindPurge.js +73 -73
- package/dist/uds/package.cjs +1 -1
- package/dist/uds/package.js +1 -1
- package/dist/utils/isElevationAlias.d.cts +1 -1
- package/dist/utils/isElevationAlias.d.ts +1 -1
- package/generated/componentData.json +135 -124
- package/generated/tailwindPurge.ts +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
"use client";
|
|
3
|
-
import { getStyles } from "../../../styles/styler.js";
|
|
3
|
+
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
4
|
import { MenuItemBase } from "./Menu.ItemBase.js";
|
|
5
5
|
import { forwardRef } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -50,24 +50,33 @@ import { MenuItem as MenuItem$1 } from "@ariakit/react/menu";
|
|
|
50
50
|
*
|
|
51
51
|
* @related [Menu](https://uds.build/docs/components/menu), [Menu.ItemCheckbox](https://uds.build/docs/components/menu-item-checkbox)
|
|
52
52
|
**/
|
|
53
|
-
const MenuItem = forwardRef(function MenuItem({ active, hideOnClick, ...props }, ref) {
|
|
53
|
+
const MenuItem = forwardRef(function MenuItem({ active, hideOnClick, slotProps, ...props }, ref) {
|
|
54
54
|
return /* @__PURE__ */ jsx(MenuItemBase, {
|
|
55
55
|
ref,
|
|
56
56
|
as: MenuItem$1,
|
|
57
57
|
active,
|
|
58
|
-
|
|
59
|
-
root:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
58
|
+
slotProps: {
|
|
59
|
+
root: {
|
|
60
|
+
className: cx(getStyles({
|
|
61
|
+
menuitemItemVariantRoot: "default",
|
|
62
|
+
menuitemItemVariantActiveRoot: active ? "on" : "off"
|
|
63
|
+
}), slotProps?.root?.className),
|
|
64
|
+
...slotProps?.root
|
|
65
|
+
},
|
|
66
|
+
text: {
|
|
67
|
+
className: cx(getStyles({
|
|
68
|
+
menuitemItemVariantText: "default",
|
|
69
|
+
menuitemItemVariantActiveText: active ? "on" : "off"
|
|
70
|
+
}), slotProps?.text?.className),
|
|
71
|
+
...slotProps?.text
|
|
72
|
+
},
|
|
73
|
+
startIcon: {
|
|
74
|
+
className: cx(getStyles({
|
|
75
|
+
menuitemItemVariantIcon: "default",
|
|
76
|
+
menuitemItemVariantActiveIcon: active ? "on" : "off"
|
|
77
|
+
}), slotProps?.startIcon?.className),
|
|
78
|
+
...slotProps?.startIcon
|
|
79
|
+
}
|
|
71
80
|
},
|
|
72
81
|
rootProps: { hideOnClick },
|
|
73
82
|
...props
|
|
@@ -30,18 +30,22 @@ const buildMenuItemClasses = ({ active, disabled, className }) => {
|
|
|
30
30
|
* @private This is an internal component shared by [Menu.Item](https://uds.build/docs/components/menu#menu-item) and [Menu.ItemCheckbox](https://uds.build/docs/components/menu#menu-item-checkbox)
|
|
31
31
|
* and may change without notice. Please do not use this component directly.
|
|
32
32
|
*/
|
|
33
|
-
const MenuItemBase = (0, react.forwardRef)(function MenuItemBase({ spacing = "0", spacingBottom, spacingEnd, spacingHorizontal = "4", spacingStart, spacingTop, spacingVertical = "3.5", columnGap = "2", className, children, endIcon, startIcon, hideEndIcon, active, disabled, as: RootComponent, name, alignItems = "center", justifyContent = "space-between",
|
|
33
|
+
const MenuItemBase = (0, react.forwardRef)(function MenuItemBase({ spacing = "0", spacingBottom, spacingEnd, spacingHorizontal = "4", spacingStart, spacingTop, spacingVertical = "3.5", columnGap = "2", className, children, endIcon, startIcon, hideEndIcon, active, disabled, as: RootComponent, name, alignItems = "center", justifyContent = "space-between", slotProps, slots, rootProps, ...props }, ref) {
|
|
34
34
|
const hasMultipleChildren = react.Children.count(children) > 1;
|
|
35
35
|
const menuItemClassName = buildMenuItemClasses({
|
|
36
36
|
active,
|
|
37
37
|
disabled,
|
|
38
38
|
className
|
|
39
39
|
});
|
|
40
|
+
const { className: rootClassName, ...rootSlotProps } = slotProps?.root ?? {};
|
|
41
|
+
const { className: textClassName, ...textSlotProps } = slotProps?.text ?? {};
|
|
42
|
+
const { className: startIconClassName, ...startIconSlotProps } = slotProps?.startIcon ?? {};
|
|
43
|
+
const { className: endIconClassName, ...endIconSlotProps } = slotProps?.endIcon ?? {};
|
|
40
44
|
/**
|
|
41
45
|
* Get content styles based on children layout needs
|
|
42
46
|
*/
|
|
43
47
|
const contentStyles = require_styles_styler.getStyles({
|
|
44
|
-
className: require_styles_styler.cx(`${ITEM_CLASS_NAME}-content truncate`,
|
|
48
|
+
className: require_styles_styler.cx(`${ITEM_CLASS_NAME}-content truncate`, textClassName),
|
|
45
49
|
textAlign: "start",
|
|
46
50
|
...hasMultipleChildren && {
|
|
47
51
|
columnGap,
|
|
@@ -68,23 +72,23 @@ const MenuItemBase = (0, react.forwardRef)(function MenuItemBase({ spacing = "0"
|
|
|
68
72
|
columnGap,
|
|
69
73
|
alignItems,
|
|
70
74
|
justifyContent,
|
|
71
|
-
className: require_styles_styler.cx(menuItemClassName,
|
|
75
|
+
className: require_styles_styler.cx(menuItemClassName, rootClassName)
|
|
72
76
|
}),
|
|
73
77
|
startIcon: require_styles_styler.getStyles({
|
|
74
78
|
menuitemSizeStartIcon: "default",
|
|
75
|
-
className:
|
|
79
|
+
className: startIconClassName
|
|
76
80
|
}),
|
|
77
81
|
endIcon: require_styles_styler.getStyles({
|
|
78
82
|
menuitemSizeEndIcon: "default",
|
|
79
|
-
className:
|
|
83
|
+
className: endIconClassName
|
|
80
84
|
})
|
|
81
85
|
}), [
|
|
82
86
|
alignItems,
|
|
83
87
|
columnGap,
|
|
84
88
|
justifyContent,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
endIconClassName,
|
|
90
|
+
rootClassName,
|
|
91
|
+
startIconClassName,
|
|
88
92
|
menuItemClassName,
|
|
89
93
|
spacing,
|
|
90
94
|
spacingBottom,
|
|
@@ -109,6 +113,7 @@ const MenuItemBase = (0, react.forwardRef)(function MenuItemBase({ spacing = "0"
|
|
|
109
113
|
render: rootRender,
|
|
110
114
|
disabled,
|
|
111
115
|
className: classNames.root,
|
|
116
|
+
...rootSlotProps,
|
|
112
117
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_HStack.HStack, {
|
|
113
118
|
gap: columnGap,
|
|
114
119
|
alignItems: "center",
|
|
@@ -127,12 +132,15 @@ const MenuItemBase = (0, react.forwardRef)(function MenuItemBase({ spacing = "0"
|
|
|
127
132
|
iconProps: {
|
|
128
133
|
size: "sm",
|
|
129
134
|
variant: active ? "fill" : "outline",
|
|
130
|
-
color: "current"
|
|
135
|
+
color: "current",
|
|
136
|
+
...endIconSlotProps,
|
|
137
|
+
...startIconSlotProps
|
|
131
138
|
}
|
|
132
139
|
})
|
|
133
140
|
})
|
|
134
141
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
135
142
|
className: contentStyles,
|
|
143
|
+
...textSlotProps,
|
|
136
144
|
children
|
|
137
145
|
})]
|
|
138
146
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.AnimatePresence, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalMenuItemProps } from "../../../types/
|
|
2
|
+
import { UniversalMenuItemProps } from "../../../types/dist/index.cjs";
|
|
3
|
+
import { IconPropsWithSVGProps } from "../../../tokens/types.cjs";
|
|
3
4
|
import "../../../tokens/index.cjs";
|
|
4
5
|
import { PressableProps } from "../Pressable.cjs";
|
|
5
6
|
import * as react from "react";
|
|
@@ -7,6 +8,9 @@ import { MenuItem, MenuItemCheckbox } from "@ariakit/react";
|
|
|
7
8
|
|
|
8
9
|
//#region src/components/client/Menu/Menu.ItemBase.d.ts
|
|
9
10
|
type MenuItemRootComponent = typeof MenuItem | typeof MenuItemCheckbox;
|
|
11
|
+
type DataAttributes = {
|
|
12
|
+
[name: `data-${string}`]: string;
|
|
13
|
+
};
|
|
10
14
|
interface MenuItemBaseProps extends Omit<PressableProps, 'asChild'>, UniversalMenuItemProps {
|
|
11
15
|
/** Whether to show the end icon */
|
|
12
16
|
hideEndIcon?: boolean;
|
|
@@ -15,11 +19,11 @@ interface MenuItemBaseProps extends Omit<PressableProps, 'asChild'>, UniversalMe
|
|
|
15
19
|
/** Additional props to pass to the root component */
|
|
16
20
|
rootProps?: Record<string, unknown>;
|
|
17
21
|
/** Internal overrides for downstream components. */
|
|
18
|
-
|
|
19
|
-
root?:
|
|
20
|
-
text?:
|
|
21
|
-
startIcon?:
|
|
22
|
-
endIcon?:
|
|
22
|
+
slotProps?: {
|
|
23
|
+
root?: Partial<React.HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
24
|
+
text?: Partial<Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'> & DataAttributes>;
|
|
25
|
+
startIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
|
|
26
|
+
endIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
|
|
23
27
|
};
|
|
24
28
|
}
|
|
25
29
|
declare const ITEM_CLASS_NAME = "uds-menu-item";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { UniversalMenuItemProps } from "../../../types/
|
|
3
|
+
import { UniversalMenuItemProps } from "../../../types/dist/index.js";
|
|
4
|
+
import { IconPropsWithSVGProps } from "../../../tokens/types.js";
|
|
4
5
|
import "../../../tokens/index.js";
|
|
5
6
|
import { PressableProps } from "../Pressable.js";
|
|
6
7
|
import * as react from "react";
|
|
@@ -8,6 +9,9 @@ import { MenuItem, MenuItemCheckbox } from "@ariakit/react";
|
|
|
8
9
|
|
|
9
10
|
//#region src/components/client/Menu/Menu.ItemBase.d.ts
|
|
10
11
|
type MenuItemRootComponent = typeof MenuItem | typeof MenuItemCheckbox;
|
|
12
|
+
type DataAttributes = {
|
|
13
|
+
[name: `data-${string}`]: string;
|
|
14
|
+
};
|
|
11
15
|
interface MenuItemBaseProps extends Omit<PressableProps, 'asChild'>, UniversalMenuItemProps {
|
|
12
16
|
/** Whether to show the end icon */
|
|
13
17
|
hideEndIcon?: boolean;
|
|
@@ -16,11 +20,11 @@ interface MenuItemBaseProps extends Omit<PressableProps, 'asChild'>, UniversalMe
|
|
|
16
20
|
/** Additional props to pass to the root component */
|
|
17
21
|
rootProps?: Record<string, unknown>;
|
|
18
22
|
/** Internal overrides for downstream components. */
|
|
19
|
-
|
|
20
|
-
root?:
|
|
21
|
-
text?:
|
|
22
|
-
startIcon?:
|
|
23
|
-
endIcon?:
|
|
23
|
+
slotProps?: {
|
|
24
|
+
root?: Partial<React.HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
25
|
+
text?: Partial<Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'> & DataAttributes>;
|
|
26
|
+
startIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
|
|
27
|
+
endIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
|
|
24
28
|
};
|
|
25
29
|
}
|
|
26
30
|
declare const ITEM_CLASS_NAME = "uds-menu-item";
|
|
@@ -28,18 +28,22 @@ const buildMenuItemClasses = ({ active, disabled, className }) => {
|
|
|
28
28
|
* @private This is an internal component shared by [Menu.Item](https://uds.build/docs/components/menu#menu-item) and [Menu.ItemCheckbox](https://uds.build/docs/components/menu#menu-item-checkbox)
|
|
29
29
|
* and may change without notice. Please do not use this component directly.
|
|
30
30
|
*/
|
|
31
|
-
const MenuItemBase = forwardRef(function MenuItemBase({ spacing = "0", spacingBottom, spacingEnd, spacingHorizontal = "4", spacingStart, spacingTop, spacingVertical = "3.5", columnGap = "2", className, children, endIcon, startIcon, hideEndIcon, active, disabled, as: RootComponent, name, alignItems = "center", justifyContent = "space-between",
|
|
31
|
+
const MenuItemBase = forwardRef(function MenuItemBase({ spacing = "0", spacingBottom, spacingEnd, spacingHorizontal = "4", spacingStart, spacingTop, spacingVertical = "3.5", columnGap = "2", className, children, endIcon, startIcon, hideEndIcon, active, disabled, as: RootComponent, name, alignItems = "center", justifyContent = "space-between", slotProps, slots, rootProps, ...props }, ref) {
|
|
32
32
|
const hasMultipleChildren = Children.count(children) > 1;
|
|
33
33
|
const menuItemClassName = buildMenuItemClasses({
|
|
34
34
|
active,
|
|
35
35
|
disabled,
|
|
36
36
|
className
|
|
37
37
|
});
|
|
38
|
+
const { className: rootClassName, ...rootSlotProps } = slotProps?.root ?? {};
|
|
39
|
+
const { className: textClassName, ...textSlotProps } = slotProps?.text ?? {};
|
|
40
|
+
const { className: startIconClassName, ...startIconSlotProps } = slotProps?.startIcon ?? {};
|
|
41
|
+
const { className: endIconClassName, ...endIconSlotProps } = slotProps?.endIcon ?? {};
|
|
38
42
|
/**
|
|
39
43
|
* Get content styles based on children layout needs
|
|
40
44
|
*/
|
|
41
45
|
const contentStyles = getStyles({
|
|
42
|
-
className: cx(`${ITEM_CLASS_NAME}-content truncate`,
|
|
46
|
+
className: cx(`${ITEM_CLASS_NAME}-content truncate`, textClassName),
|
|
43
47
|
textAlign: "start",
|
|
44
48
|
...hasMultipleChildren && {
|
|
45
49
|
columnGap,
|
|
@@ -66,23 +70,23 @@ const MenuItemBase = forwardRef(function MenuItemBase({ spacing = "0", spacingBo
|
|
|
66
70
|
columnGap,
|
|
67
71
|
alignItems,
|
|
68
72
|
justifyContent,
|
|
69
|
-
className: cx(menuItemClassName,
|
|
73
|
+
className: cx(menuItemClassName, rootClassName)
|
|
70
74
|
}),
|
|
71
75
|
startIcon: getStyles({
|
|
72
76
|
menuitemSizeStartIcon: "default",
|
|
73
|
-
className:
|
|
77
|
+
className: startIconClassName
|
|
74
78
|
}),
|
|
75
79
|
endIcon: getStyles({
|
|
76
80
|
menuitemSizeEndIcon: "default",
|
|
77
|
-
className:
|
|
81
|
+
className: endIconClassName
|
|
78
82
|
})
|
|
79
83
|
}), [
|
|
80
84
|
alignItems,
|
|
81
85
|
columnGap,
|
|
82
86
|
justifyContent,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
endIconClassName,
|
|
88
|
+
rootClassName,
|
|
89
|
+
startIconClassName,
|
|
86
90
|
menuItemClassName,
|
|
87
91
|
spacing,
|
|
88
92
|
spacingBottom,
|
|
@@ -107,6 +111,7 @@ const MenuItemBase = forwardRef(function MenuItemBase({ spacing = "0", spacingBo
|
|
|
107
111
|
render: rootRender,
|
|
108
112
|
disabled,
|
|
109
113
|
className: classNames.root,
|
|
114
|
+
...rootSlotProps,
|
|
110
115
|
children: [/* @__PURE__ */ jsxs(HStack, {
|
|
111
116
|
gap: columnGap,
|
|
112
117
|
alignItems: "center",
|
|
@@ -125,12 +130,15 @@ const MenuItemBase = forwardRef(function MenuItemBase({ spacing = "0", spacingBo
|
|
|
125
130
|
iconProps: {
|
|
126
131
|
size: "sm",
|
|
127
132
|
variant: active ? "fill" : "outline",
|
|
128
|
-
color: "current"
|
|
133
|
+
color: "current",
|
|
134
|
+
...endIconSlotProps,
|
|
135
|
+
...startIconSlotProps
|
|
129
136
|
}
|
|
130
137
|
})
|
|
131
138
|
})
|
|
132
139
|
}), /* @__PURE__ */ jsx("span", {
|
|
133
140
|
className: contentStyles,
|
|
141
|
+
...textSlotProps,
|
|
134
142
|
children
|
|
135
143
|
})]
|
|
136
144
|
}), /* @__PURE__ */ jsx(AnimatePresence, {
|
|
@@ -97,23 +97,23 @@ const MenuItemCheckbox = (0, react.forwardRef)(function MenuItemCheckbox({ name,
|
|
|
97
97
|
context,
|
|
98
98
|
checked
|
|
99
99
|
]);
|
|
100
|
-
const
|
|
101
|
-
root: require_styles_styler.getStyles({
|
|
100
|
+
const menuSlotProps = {
|
|
101
|
+
root: { className: require_styles_styler.getStyles({
|
|
102
102
|
menuitemItemCheckboxVariantRoot: "default",
|
|
103
103
|
menuitemItemCheckboxVariantActiveRoot: isChecked ? "on" : "off"
|
|
104
|
-
}),
|
|
105
|
-
text: require_styles_styler.getStyles({
|
|
104
|
+
}) },
|
|
105
|
+
text: { className: require_styles_styler.getStyles({
|
|
106
106
|
menuitemItemCheckboxVariantText: "default",
|
|
107
107
|
menuitemItemCheckboxVariantActiveText: isChecked ? "on" : "off"
|
|
108
|
-
}),
|
|
109
|
-
startIcon: require_styles_styler.getStyles({
|
|
108
|
+
}) },
|
|
109
|
+
startIcon: { className: require_styles_styler.getStyles({
|
|
110
110
|
menuitemItemCheckboxVariantStartIcon: "default",
|
|
111
111
|
menuitemItemCheckboxVariantActiveStartIcon: isChecked ? "on" : "off"
|
|
112
|
-
}),
|
|
113
|
-
endIcon: require_styles_styler.getStyles({
|
|
112
|
+
}) },
|
|
113
|
+
endIcon: { className: require_styles_styler.getStyles({
|
|
114
114
|
menuitemItemCheckboxVariantEndIcon: "default",
|
|
115
115
|
menuitemItemCheckboxVariantActiveEndIcon: isChecked ? "on" : "off"
|
|
116
|
-
})
|
|
116
|
+
}) }
|
|
117
117
|
};
|
|
118
118
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Menu_Menu_ItemBase.MenuItemBase, {
|
|
119
119
|
ref,
|
|
@@ -122,7 +122,7 @@ const MenuItemCheckbox = (0, react.forwardRef)(function MenuItemCheckbox({ name,
|
|
|
122
122
|
endIcon,
|
|
123
123
|
active: isChecked,
|
|
124
124
|
className: require_styles_styler.cx("uds-menu-item-checkbox", className),
|
|
125
|
-
|
|
125
|
+
slotProps: menuSlotProps,
|
|
126
126
|
name,
|
|
127
127
|
rootProps: {
|
|
128
128
|
onChange: handleChange,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalMenuItemProps } from "../../../types/
|
|
2
|
+
import { UniversalMenuItemProps } from "../../../types/dist/index.cjs";
|
|
3
3
|
import "../../../tokens/index.cjs";
|
|
4
4
|
import { PressableProps } from "../Pressable.cjs";
|
|
5
5
|
import * as react from "react";
|
|
@@ -88,6 +88,6 @@ interface MenuItemCheckboxProps extends Omit<PressableProps, 'asChild'>, HtmlBut
|
|
|
88
88
|
*
|
|
89
89
|
* @related [Menu](https://uds.build/docs/components/menu), [Menu.Item](https://uds.build/docs/components/menu-item)
|
|
90
90
|
**/
|
|
91
|
-
declare const MenuItemCheckbox: react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "
|
|
91
|
+
declare const MenuItemCheckbox: react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "hideEndIcon" | "rootProps"> & react.RefAttributes<HTMLDivElement>>;
|
|
92
92
|
//#endregion
|
|
93
93
|
export { MenuItemCheckbox, type MenuItemCheckboxProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { UniversalMenuItemProps } from "../../../types/
|
|
3
|
+
import { UniversalMenuItemProps } from "../../../types/dist/index.js";
|
|
4
4
|
import "../../../tokens/index.js";
|
|
5
5
|
import { PressableProps } from "../Pressable.js";
|
|
6
6
|
import * as react from "react";
|
|
@@ -89,6 +89,6 @@ interface MenuItemCheckboxProps extends Omit<PressableProps, 'asChild'>, HtmlBut
|
|
|
89
89
|
*
|
|
90
90
|
* @related [Menu](https://uds.build/docs/components/menu), [Menu.Item](https://uds.build/docs/components/menu-item)
|
|
91
91
|
**/
|
|
92
|
-
declare const MenuItemCheckbox: react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "
|
|
92
|
+
declare const MenuItemCheckbox: react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "hideEndIcon" | "rootProps"> & react.RefAttributes<HTMLDivElement>>;
|
|
93
93
|
//#endregion
|
|
94
94
|
export { MenuItemCheckbox, type MenuItemCheckboxProps };
|
|
@@ -95,23 +95,23 @@ const MenuItemCheckbox = forwardRef(function MenuItemCheckbox({ name, endIcon =
|
|
|
95
95
|
context,
|
|
96
96
|
checked
|
|
97
97
|
]);
|
|
98
|
-
const
|
|
99
|
-
root: getStyles({
|
|
98
|
+
const menuSlotProps = {
|
|
99
|
+
root: { className: getStyles({
|
|
100
100
|
menuitemItemCheckboxVariantRoot: "default",
|
|
101
101
|
menuitemItemCheckboxVariantActiveRoot: isChecked ? "on" : "off"
|
|
102
|
-
}),
|
|
103
|
-
text: getStyles({
|
|
102
|
+
}) },
|
|
103
|
+
text: { className: getStyles({
|
|
104
104
|
menuitemItemCheckboxVariantText: "default",
|
|
105
105
|
menuitemItemCheckboxVariantActiveText: isChecked ? "on" : "off"
|
|
106
|
-
}),
|
|
107
|
-
startIcon: getStyles({
|
|
106
|
+
}) },
|
|
107
|
+
startIcon: { className: getStyles({
|
|
108
108
|
menuitemItemCheckboxVariantStartIcon: "default",
|
|
109
109
|
menuitemItemCheckboxVariantActiveStartIcon: isChecked ? "on" : "off"
|
|
110
|
-
}),
|
|
111
|
-
endIcon: getStyles({
|
|
110
|
+
}) },
|
|
111
|
+
endIcon: { className: getStyles({
|
|
112
112
|
menuitemItemCheckboxVariantEndIcon: "default",
|
|
113
113
|
menuitemItemCheckboxVariantActiveEndIcon: isChecked ? "on" : "off"
|
|
114
|
-
})
|
|
114
|
+
}) }
|
|
115
115
|
};
|
|
116
116
|
return /* @__PURE__ */ jsx(MenuItemBase, {
|
|
117
117
|
ref,
|
|
@@ -120,7 +120,7 @@ const MenuItemCheckbox = forwardRef(function MenuItemCheckbox({ name, endIcon =
|
|
|
120
120
|
endIcon,
|
|
121
121
|
active: isChecked,
|
|
122
122
|
className: cx("uds-menu-item-checkbox", className),
|
|
123
|
-
|
|
123
|
+
slotProps: menuSlotProps,
|
|
124
124
|
name,
|
|
125
125
|
rootProps: {
|
|
126
126
|
onChange: handleChange,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { UniversalPopoverProps } from "../../../types/
|
|
3
|
+
import { UniversalPopoverProps } from "../../../types/dist/index.js";
|
|
4
4
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/client/Popover/Popover.d.ts
|
|
@@ -104,6 +104,7 @@ const PopoverContent = (0, react.forwardRef)(function PopoverContent({ children,
|
|
|
104
104
|
},
|
|
105
105
|
ref: mergedRef,
|
|
106
106
|
className: classNames.root,
|
|
107
|
+
...slotProps?.root,
|
|
107
108
|
portal: internalContext ? internalContext.portal : true,
|
|
108
109
|
gutter: internalContext?.hideArrow ? gutter : ARROW_HEIGHT + gutter,
|
|
109
110
|
updatePosition: onPositionUpdate,
|
|
@@ -135,6 +136,7 @@ const PopoverContent = (0, react.forwardRef)(function PopoverContent({ children,
|
|
|
135
136
|
...svgFloatingContentProps,
|
|
136
137
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
|
|
137
138
|
className: require_styles_styler.cx(classNames.contentWrapper),
|
|
139
|
+
...slotProps?.content,
|
|
138
140
|
style: { paddingInlineEnd: internalContext?.hideDismissButton || disableHorizontalSpacing ? void 0 : require_index.spacingMap[gap] + require_index.spacingMap[spacingHorizontal] + dismissButtonSize },
|
|
139
141
|
children
|
|
140
142
|
})
|
|
@@ -161,7 +163,8 @@ const PopoverContent = (0, react.forwardRef)(function PopoverContent({ children,
|
|
|
161
163
|
!internalContext?.hideArrow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.PopoverArrow, {
|
|
162
164
|
size: 1,
|
|
163
165
|
ref: arrowRef,
|
|
164
|
-
style: { opacity: 0 }
|
|
166
|
+
style: { opacity: 0 },
|
|
167
|
+
...slotProps?.caret
|
|
165
168
|
})
|
|
166
169
|
]
|
|
167
170
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { IconPropsWithSVGProps, UniversalPopoverContentProps } from "../../../types/
|
|
2
|
+
import { IconPropsWithSVGProps, UniversalPopoverContentProps } from "../../../types/dist/index.cjs";
|
|
3
3
|
import { PressableProps } from "../Pressable.cjs";
|
|
4
4
|
import "../../../index.cjs";
|
|
5
5
|
import * as react from "react";
|
|
@@ -11,6 +11,9 @@ type DataAttributes = {
|
|
|
11
11
|
};
|
|
12
12
|
interface PopoverContentProps extends UniversalPopoverContentProps {
|
|
13
13
|
slotProps?: {
|
|
14
|
+
root?: Partial<React.HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
15
|
+
content?: Partial<React.HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
16
|
+
caret?: Partial<React.HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
14
17
|
closeIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
|
|
15
18
|
closeIconContainer?: Partial<PressableProps & DataAttributes>;
|
|
16
19
|
svgBase?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { IconPropsWithSVGProps, UniversalPopoverContentProps } from "../../../types/
|
|
3
|
+
import { IconPropsWithSVGProps, UniversalPopoverContentProps } from "../../../types/dist/index.js";
|
|
4
4
|
import { PressableProps } from "../Pressable.js";
|
|
5
5
|
import "../../../index.js";
|
|
6
6
|
import * as react from "react";
|
|
@@ -12,6 +12,9 @@ type DataAttributes = {
|
|
|
12
12
|
};
|
|
13
13
|
interface PopoverContentProps extends UniversalPopoverContentProps {
|
|
14
14
|
slotProps?: {
|
|
15
|
+
root?: Partial<React.HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
16
|
+
content?: Partial<React.HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
17
|
+
caret?: Partial<React.HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
15
18
|
closeIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
|
|
16
19
|
closeIconContainer?: Partial<PressableProps & DataAttributes>;
|
|
17
20
|
svgBase?: {
|
|
@@ -102,6 +102,7 @@ const PopoverContent = forwardRef(function PopoverContent({ children, className,
|
|
|
102
102
|
},
|
|
103
103
|
ref: mergedRef,
|
|
104
104
|
className: classNames.root,
|
|
105
|
+
...slotProps?.root,
|
|
105
106
|
portal: internalContext ? internalContext.portal : true,
|
|
106
107
|
gutter: internalContext?.hideArrow ? gutter : ARROW_HEIGHT + gutter,
|
|
107
108
|
updatePosition: onPositionUpdate,
|
|
@@ -133,6 +134,7 @@ const PopoverContent = forwardRef(function PopoverContent({ children, className,
|
|
|
133
134
|
...svgFloatingContentProps,
|
|
134
135
|
children: /* @__PURE__ */ jsx(Box, {
|
|
135
136
|
className: cx(classNames.contentWrapper),
|
|
137
|
+
...slotProps?.content,
|
|
136
138
|
style: { paddingInlineEnd: internalContext?.hideDismissButton || disableHorizontalSpacing ? void 0 : spacingMap[gap] + spacingMap[spacingHorizontal] + dismissButtonSize },
|
|
137
139
|
children
|
|
138
140
|
})
|
|
@@ -159,7 +161,8 @@ const PopoverContent = forwardRef(function PopoverContent({ children, className,
|
|
|
159
161
|
!internalContext?.hideArrow && /* @__PURE__ */ jsx(PopoverArrow, {
|
|
160
162
|
size: 1,
|
|
161
163
|
ref: arrowRef,
|
|
162
|
-
style: { opacity: 0 }
|
|
164
|
+
style: { opacity: 0 },
|
|
165
|
+
...slotProps?.caret
|
|
163
166
|
})
|
|
164
167
|
]
|
|
165
168
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalPopoverTriggerProps } from "../../../types/
|
|
2
|
+
import { UniversalPopoverTriggerProps } from "../../../types/dist/index.cjs";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/client/Popover/PopoverTrigger.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { UniversalPopoverTriggerProps } from "../../../types/
|
|
3
|
+
import { UniversalPopoverTriggerProps } from "../../../types/dist/index.js";
|
|
4
4
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/client/Popover/PopoverTrigger.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { PopoverPlacement, PopoverSize, PopoverVariant, SpacingAlias } from "../../../types/
|
|
2
|
+
import { PopoverPlacement, PopoverSize, PopoverVariant, SpacingAlias } from "../../../types/dist/index.cjs";
|
|
3
3
|
import { UDSPopoverConfigContextType } from "../../../runtime/popoverConfig.cjs";
|
|
4
4
|
import { PropsWithChildren } from "react";
|
|
5
5
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -29,7 +29,7 @@ declare function usePopoverConfig(sizeProp?: PopoverSize | undefined, variantPro
|
|
|
29
29
|
gap: SpacingAlias;
|
|
30
30
|
dismissButtonSpacing: SpacingAlias;
|
|
31
31
|
dismissIconSize: number;
|
|
32
|
-
ariaKitPlacement: ("
|
|
32
|
+
ariaKitPlacement: ("bottom-start" | "bottom-end" | "top-start" | "top-end" | ("bottom" | "left" | "right" | "top") | "left-start" | "right-start" | "left-end" | "right-end") | undefined;
|
|
33
33
|
animationDuration: number;
|
|
34
34
|
};
|
|
35
35
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { PopoverPlacement, PopoverSize, PopoverVariant, SpacingAlias } from "../../../types/
|
|
3
|
+
import { PopoverPlacement, PopoverSize, PopoverVariant, SpacingAlias } from "../../../types/dist/index.js";
|
|
4
4
|
import { UDSPopoverConfigContextType } from "../../../runtime/popoverConfig.js";
|
|
5
5
|
import { PropsWithChildren } from "react";
|
|
6
6
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -30,7 +30,7 @@ declare function usePopoverConfig(sizeProp?: PopoverSize | undefined, variantPro
|
|
|
30
30
|
gap: SpacingAlias;
|
|
31
31
|
dismissButtonSpacing: SpacingAlias;
|
|
32
32
|
dismissIconSize: number;
|
|
33
|
-
ariaKitPlacement: ("
|
|
33
|
+
ariaKitPlacement: ("bottom-start" | "bottom-end" | "top-start" | "top-end" | ("bottom" | "left" | "right" | "top") | "left-start" | "right-start" | "left-end" | "right-end") | undefined;
|
|
34
34
|
animationDuration: number;
|
|
35
35
|
};
|
|
36
36
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalPopoverContentProps, UniversalPopoverProps, UniversalPopoverTriggerProps } from "../../../types/
|
|
2
|
+
import { UniversalPopoverContentProps, UniversalPopoverProps, UniversalPopoverTriggerProps } from "../../../types/dist/index.cjs";
|
|
3
3
|
import { Popover } from "./Popover.cjs";
|
|
4
4
|
import { PopoverTrigger } from "./PopoverTrigger.cjs";
|
|
5
5
|
import { UDSPopoverConfigProvider, UDSPopoverConfigProviderProps } from "./UDSPopoverConfigProvider.cjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { UniversalPopoverContentProps, UniversalPopoverProps, UniversalPopoverTriggerProps } from "../../../types/
|
|
3
|
+
import { UniversalPopoverContentProps, UniversalPopoverProps, UniversalPopoverTriggerProps } from "../../../types/dist/index.js";
|
|
4
4
|
import { Popover } from "./Popover.js";
|
|
5
5
|
import { PopoverTrigger } from "./PopoverTrigger.js";
|
|
6
6
|
import { UDSPopoverConfigProvider, UDSPopoverConfigProviderProps } from "./UDSPopoverConfigProvider.js";
|