@yahoo/uds 3.148.0 → 3.150.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.
@@ -29,7 +29,7 @@ const buildMenuItemClasses = ({ active, disabled, className }) => {
29
29
  * @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)
30
30
  * and may change without notice. Please do not use this component directly.
31
31
  */
32
- 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) {
32
+ 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, multiline, as: RootComponent, name, alignItems = "center", justifyContent = "space-between", slotProps, slots, rootProps, ...props }, ref) {
33
33
  const hasMultipleChildren = react.Children.count(children) > 1;
34
34
  const menuItemClassName = buildMenuItemClasses({
35
35
  active,
@@ -44,7 +44,7 @@ const MenuItemBase = (0, react.forwardRef)(function MenuItemBase({ spacing = "0"
44
44
  * Get content styles based on children layout needs
45
45
  */
46
46
  const contentStyles = require_styles_styler.getStyles({
47
- className: require_styles_styler.cx(`${ITEM_CLASS_NAME}-content truncate`, textClassName),
47
+ className: require_styles_styler.cx(`${ITEM_CLASS_NAME}-content`, !multiline && "truncate", textClassName),
48
48
  textAlign: "start",
49
49
  ...hasMultipleChildren && {
50
50
  columnGap,
@@ -27,7 +27,7 @@ const buildMenuItemClasses = ({ active, disabled, className }) => {
27
27
  * @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)
28
28
  * and may change without notice. Please do not use this component directly.
29
29
  */
30
- 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) {
30
+ 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, multiline, as: RootComponent, name, alignItems = "center", justifyContent = "space-between", slotProps, slots, rootProps, ...props }, ref) {
31
31
  const hasMultipleChildren = Children.count(children) > 1;
32
32
  const menuItemClassName = buildMenuItemClasses({
33
33
  active,
@@ -42,7 +42,7 @@ const MenuItemBase = forwardRef(function MenuItemBase({ spacing = "0", spacingBo
42
42
  * Get content styles based on children layout needs
43
43
  */
44
44
  const contentStyles = getStyles({
45
- className: cx(`${ITEM_CLASS_NAME}-content truncate`, textClassName),
45
+ className: cx(`${ITEM_CLASS_NAME}-content`, !multiline && "truncate", textClassName),
46
46
  textAlign: "start",
47
47
  ...hasMultipleChildren && {
48
48
  columnGap,
@@ -37,7 +37,7 @@ const PaddleButton = (0, react.forwardRef)(function PaddleButton({ onClick, disa
37
37
  "data-paddle-button-role": paddleRole,
38
38
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
39
39
  "aria-hidden": true,
40
- className: require_styles_styler.cx("absolute inset-0 -z-10 pointer-events-none rounded-[length:var(--uds-nested-radius)]", "transition-[background-color,opacity] duration-[180ms] ease-[cubic-bezier(0,0,0.2,1)]", backgroundClass)
40
+ className: require_styles_styler.cx("absolute inset-0 -z-10 pointer-events-none rounded-[var(--uds-nested-radius)]", "transition-[background-color,opacity] duration-[180ms] ease-[cubic-bezier(0,0,0.2,1)]", backgroundClass)
41
41
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
42
42
  size: "md",
43
43
  name: resolvedIcon,
@@ -35,7 +35,7 @@ const PaddleButton = forwardRef(function PaddleButton({ onClick, disabled = fals
35
35
  "data-paddle-button-role": paddleRole,
36
36
  children: [/* @__PURE__ */ jsx("span", {
37
37
  "aria-hidden": true,
38
- className: cx("absolute inset-0 -z-10 pointer-events-none rounded-[length:var(--uds-nested-radius)]", "transition-[background-color,opacity] duration-[180ms] ease-[cubic-bezier(0,0,0.2,1)]", backgroundClass)
38
+ className: cx("absolute inset-0 -z-10 pointer-events-none rounded-[var(--uds-nested-radius)]", "transition-[background-color,opacity] duration-[180ms] ease-[cubic-bezier(0,0,0.2,1)]", backgroundClass)
39
39
  }), /* @__PURE__ */ jsx(Icon, {
40
40
  size: "md",
41
41
  name: resolvedIcon,
@@ -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: ("bottom-start" | "bottom-end" | "top-start" | "top-end" | ("bottom" | "left" | "right" | "top") | "left-start" | "right-start" | "left-end" | "right-end") | undefined;
32
+ ariaKitPlacement: ("top-start" | "top-end" | "bottom-start" | "bottom-end" | ("bottom" | "left" | "right" | "top") | "left-start" | "right-start" | "left-end" | "right-end") | undefined;
33
33
  animationDuration: number;
34
34
  };
35
35
  //#endregion
@@ -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: ("bottom-start" | "bottom-end" | "top-start" | "top-end" | ("bottom" | "left" | "right" | "top") | "left-start" | "right-start" | "left-end" | "right-end") | undefined;
33
+ ariaKitPlacement: ("top-start" | "top-end" | "bottom-start" | "bottom-end" | ("bottom" | "left" | "right" | "top") | "left-start" | "right-start" | "left-end" | "right-end") | undefined;
34
34
  animationDuration: number;
35
35
  };
36
36
  //#endregion
@@ -816,6 +816,8 @@ interface UniversalMenuItemProps<IconSlotType = UniversalIconSlot> extends Omit<
816
816
  active?: boolean;
817
817
  /** Whether the menu item is disabled. */
818
818
  disabled?: boolean;
819
+ /** Whether the menu item text should wrap to multiple lines instead of being truncated. */
820
+ multiline?: boolean;
819
821
  /** Render prop slots for customizing internal elements. */
820
822
  slots?: {
821
823
  root?: (props: HTMLAttributes<any> & {
@@ -1081,6 +1083,7 @@ interface UniversalBottomSheetContentProps extends PropsWithChildren {
1081
1083
  type PopoverPlacement = TooltipPlacement;
1082
1084
  type PopoverSize = 'default';
1083
1085
  type PopoverVariant = 'default';
1086
+ /** Shared props for the web Popover root component. */
1084
1087
  interface UniversalPopoverProps {
1085
1088
  /** The PopoverTrigger and PopoverContent elements */
1086
1089
  children: ReactNode;
@@ -1113,10 +1116,12 @@ interface UniversalPopoverProps {
1113
1116
  /** The gap between the popover content and the trigger. @default 4 */
1114
1117
  gutter?: number;
1115
1118
  }
1119
+ /** Shared props for the web PopoverTrigger component. */
1116
1120
  interface UniversalPopoverTriggerProps {
1117
1121
  /** The content to display inside the popover trigger. This is what the popover will be anchored to. */
1118
1122
  children: ReactNode;
1119
1123
  }
1124
+ /** Shared props for the web PopoverContent component. */
1120
1125
  interface UniversalPopoverContentProps {
1121
1126
  /** The content of the popover. */
1122
1127
  children: ReactNode;
@@ -816,6 +816,8 @@ interface UniversalMenuItemProps<IconSlotType = UniversalIconSlot> extends Omit<
816
816
  active?: boolean;
817
817
  /** Whether the menu item is disabled. */
818
818
  disabled?: boolean;
819
+ /** Whether the menu item text should wrap to multiple lines instead of being truncated. */
820
+ multiline?: boolean;
819
821
  /** Render prop slots for customizing internal elements. */
820
822
  slots?: {
821
823
  root?: (props: HTMLAttributes<any> & {
@@ -1081,6 +1083,7 @@ interface UniversalBottomSheetContentProps extends PropsWithChildren {
1081
1083
  type PopoverPlacement = TooltipPlacement;
1082
1084
  type PopoverSize = 'default';
1083
1085
  type PopoverVariant = 'default';
1086
+ /** Shared props for the web Popover root component. */
1084
1087
  interface UniversalPopoverProps {
1085
1088
  /** The PopoverTrigger and PopoverContent elements */
1086
1089
  children: ReactNode;
@@ -1113,10 +1116,12 @@ interface UniversalPopoverProps {
1113
1116
  /** The gap between the popover content and the trigger. @default 4 */
1114
1117
  gutter?: number;
1115
1118
  }
1119
+ /** Shared props for the web PopoverTrigger component. */
1116
1120
  interface UniversalPopoverTriggerProps {
1117
1121
  /** The content to display inside the popover trigger. This is what the popover will be anchored to. */
1118
1122
  children: ReactNode;
1119
1123
  }
1124
+ /** Shared props for the web PopoverContent component. */
1120
1125
  interface UniversalPopoverContentProps {
1121
1126
  /** The content of the popover. */
1122
1127
  children: ReactNode;