@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,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { ShadowPreset } from "../../types/
|
|
2
|
+
import { ShadowPreset } from "../../types/dist/index.cjs";
|
|
3
3
|
import { ArbitraryFixtures, InferArbitraryType } from "../../fixtures/dist/index.cjs";
|
|
4
4
|
import { AllPossibleProperties, PossibleStates } from "./types/ComponentConfig.cjs";
|
|
5
5
|
import { SchemaStateValue } from "./types/ConfigSchema.cjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { ShadowPreset } from "../../types/
|
|
2
|
+
import { ShadowPreset } from "../../types/dist/index.js";
|
|
3
3
|
import { ArbitraryFixtures, InferArbitraryType } from "../../fixtures/dist/index.js";
|
|
4
4
|
import { AllPossibleProperties, PossibleStates } from "./types/ComponentConfig.js";
|
|
5
5
|
import { SchemaStateValue } from "./types/ConfigSchema.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { BannerInnerShadowOption, ElevationAlias, ShadowVariant, ShadowVariantConfig, ShadowVariantWithInvert } from "../../../types/
|
|
2
|
+
import { BannerInnerShadowOption, ElevationAlias, ShadowVariant, ShadowVariantConfig, ShadowVariantWithInvert } from "../../../types/dist/index.cjs";
|
|
3
3
|
import { ArbitraryFixtures, InferArbitraryType } from "../../../fixtures/dist/index.cjs";
|
|
4
4
|
import { AllPossibleProperties, ComponentConfig, LayerConfig, PossibleStates, VariantConfig, VariantConfigWithComponentStates, VariantConfigWithProperties } from "../types/ComponentConfig.cjs";
|
|
5
5
|
import { SchemaStateValue } from "../types/ConfigSchema.cjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { BannerInnerShadowOption, ElevationAlias, ShadowVariant, ShadowVariantConfig, ShadowVariantWithInvert } from "../../../types/
|
|
2
|
+
import { BannerInnerShadowOption, ElevationAlias, ShadowVariant, ShadowVariantConfig, ShadowVariantWithInvert } from "../../../types/dist/index.js";
|
|
3
3
|
import { ArbitraryFixtures, InferArbitraryType } from "../../../fixtures/dist/index.js";
|
|
4
4
|
import { AllPossibleProperties, ComponentConfig, LayerConfig, PossibleStates, VariantConfig, VariantConfigWithComponentStates, VariantConfigWithProperties } from "../types/ComponentConfig.js";
|
|
5
5
|
import { SchemaStateValue } from "../types/ConfigSchema.js";
|
|
@@ -75,7 +75,7 @@ function bindActionVariants(actions, bannerVariant) {
|
|
|
75
75
|
*
|
|
76
76
|
* @related [Badge](https://uds.build/docs/components/badge), [Toast](https://uds.build/docs/components/toast)
|
|
77
77
|
**/
|
|
78
|
-
const Banner = (0, react.forwardRef)(function Banner({ variant = "primary", size = "default", startIcon, title, description, onDismiss, dismissAriaLabel = "Dismiss", className, children, ...rest }, ref) {
|
|
78
|
+
const Banner = (0, react.forwardRef)(function Banner({ variant = "primary", size = "default", startIcon, title, description, onDismiss, dismissAriaLabel = "Dismiss", className, children, slotProps, ...rest }, ref) {
|
|
79
79
|
const hasTitle = !!(typeof title === "string" ? title.trim() : title);
|
|
80
80
|
const hasDescription = !!(typeof description === "string" ? description.trim() : description);
|
|
81
81
|
const rootStyles = require_styles_styler.getStyles({
|
|
@@ -133,6 +133,7 @@ const Banner = (0, react.forwardRef)(function Banner({ variant = "primary", size
|
|
|
133
133
|
onClick: onDismiss,
|
|
134
134
|
className: dismissContainerStyles,
|
|
135
135
|
"data-testid": "banner-dismiss",
|
|
136
|
+
...slotProps?.dismiss,
|
|
136
137
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
|
|
137
138
|
icon: _yahoo_uds_icons.Cross,
|
|
138
139
|
iconProps: {
|
|
@@ -150,13 +151,15 @@ const Banner = (0, react.forwardRef)(function Banner({ variant = "primary", size
|
|
|
150
151
|
icon: startIcon,
|
|
151
152
|
iconProps: { color: "inherit" },
|
|
152
153
|
className: require_styles_styler.cx(iconStyles, "shrink-0"),
|
|
153
|
-
"data-testid": "banner-start-icon"
|
|
154
|
+
"data-testid": "banner-start-icon",
|
|
155
|
+
...slotProps?.startIcon
|
|
154
156
|
}),
|
|
155
157
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
156
158
|
className: require_styles_styler.cx("flex flex-1 min-w-0 flex-col items-start gap-[inherit] uds-sm:flex-row", hasTitle !== hasDescription && "uds-sm:items-center"),
|
|
157
159
|
children: [contentArea, hasActions && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
158
160
|
className: "flex self-stretch flex-row items-center gap-1.5 uds-sm:self-center uds-sm:shrink-0",
|
|
159
161
|
"data-testid": "banner-actions",
|
|
162
|
+
...slotProps?.actions,
|
|
160
163
|
children: actions
|
|
161
164
|
})]
|
|
162
165
|
}),
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalBannerProps } from "../../types/
|
|
2
|
+
import { UniversalBannerProps } from "../../types/dist/index.cjs";
|
|
3
3
|
import "../../tokens/index.cjs";
|
|
4
4
|
import * as react from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Banner/Banner.d.ts
|
|
7
7
|
type HtmlDivProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>;
|
|
8
|
+
type DataAttributes = {
|
|
9
|
+
[name: `data-${string}`]: string;
|
|
10
|
+
};
|
|
8
11
|
interface BannerProps extends HtmlDivProps, UniversalBannerProps {
|
|
9
12
|
/** Accessible label for the dismiss button. @default "Dismiss" */
|
|
10
13
|
dismissAriaLabel?: string;
|
|
14
|
+
/** Props to be passed into various slots within the component. */
|
|
15
|
+
slotProps?: {
|
|
16
|
+
startIcon?: DataAttributes;
|
|
17
|
+
actions?: DataAttributes;
|
|
18
|
+
dismiss?: DataAttributes;
|
|
19
|
+
};
|
|
11
20
|
}
|
|
12
21
|
/**
|
|
13
22
|
* **An inline notification banner for contextual messages with optional actions.**
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalBannerProps } from "../../types/
|
|
2
|
+
import { UniversalBannerProps } from "../../types/dist/index.js";
|
|
3
3
|
import "../../tokens/index.js";
|
|
4
4
|
import * as react from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Banner/Banner.d.ts
|
|
7
7
|
type HtmlDivProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>;
|
|
8
|
+
type DataAttributes = {
|
|
9
|
+
[name: `data-${string}`]: string;
|
|
10
|
+
};
|
|
8
11
|
interface BannerProps extends HtmlDivProps, UniversalBannerProps {
|
|
9
12
|
/** Accessible label for the dismiss button. @default "Dismiss" */
|
|
10
13
|
dismissAriaLabel?: string;
|
|
14
|
+
/** Props to be passed into various slots within the component. */
|
|
15
|
+
slotProps?: {
|
|
16
|
+
startIcon?: DataAttributes;
|
|
17
|
+
actions?: DataAttributes;
|
|
18
|
+
dismiss?: DataAttributes;
|
|
19
|
+
};
|
|
11
20
|
}
|
|
12
21
|
/**
|
|
13
22
|
* **An inline notification banner for contextual messages with optional actions.**
|
|
@@ -73,7 +73,7 @@ function bindActionVariants(actions, bannerVariant) {
|
|
|
73
73
|
*
|
|
74
74
|
* @related [Badge](https://uds.build/docs/components/badge), [Toast](https://uds.build/docs/components/toast)
|
|
75
75
|
**/
|
|
76
|
-
const Banner = forwardRef(function Banner({ variant = "primary", size = "default", startIcon, title, description, onDismiss, dismissAriaLabel = "Dismiss", className, children, ...rest }, ref) {
|
|
76
|
+
const Banner = forwardRef(function Banner({ variant = "primary", size = "default", startIcon, title, description, onDismiss, dismissAriaLabel = "Dismiss", className, children, slotProps, ...rest }, ref) {
|
|
77
77
|
const hasTitle = !!(typeof title === "string" ? title.trim() : title);
|
|
78
78
|
const hasDescription = !!(typeof description === "string" ? description.trim() : description);
|
|
79
79
|
const rootStyles = getStyles({
|
|
@@ -131,6 +131,7 @@ const Banner = forwardRef(function Banner({ variant = "primary", size = "default
|
|
|
131
131
|
onClick: onDismiss,
|
|
132
132
|
className: dismissContainerStyles,
|
|
133
133
|
"data-testid": "banner-dismiss",
|
|
134
|
+
...slotProps?.dismiss,
|
|
134
135
|
children: /* @__PURE__ */ jsx(IconSlot, {
|
|
135
136
|
icon: Cross,
|
|
136
137
|
iconProps: {
|
|
@@ -148,13 +149,15 @@ const Banner = forwardRef(function Banner({ variant = "primary", size = "default
|
|
|
148
149
|
icon: startIcon,
|
|
149
150
|
iconProps: { color: "inherit" },
|
|
150
151
|
className: cx(iconStyles, "shrink-0"),
|
|
151
|
-
"data-testid": "banner-start-icon"
|
|
152
|
+
"data-testid": "banner-start-icon",
|
|
153
|
+
...slotProps?.startIcon
|
|
152
154
|
}),
|
|
153
155
|
/* @__PURE__ */ jsxs("div", {
|
|
154
156
|
className: cx("flex flex-1 min-w-0 flex-col items-start gap-[inherit] uds-sm:flex-row", hasTitle !== hasDescription && "uds-sm:items-center"),
|
|
155
157
|
children: [contentArea, hasActions && /* @__PURE__ */ jsx("div", {
|
|
156
158
|
className: "flex self-stretch flex-row items-center gap-1.5 uds-sm:self-center uds-sm:shrink-0",
|
|
157
159
|
"data-testid": "banner-actions",
|
|
160
|
+
...slotProps?.actions,
|
|
158
161
|
children: actions
|
|
159
162
|
})]
|
|
160
163
|
}),
|
package/dist/components/Box.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { DividerInternalProps } from "./DividerInternal.cjs";
|
|
|
3
3
|
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Divider/Divider.d.ts
|
|
6
|
-
type DividerProps =
|
|
6
|
+
type DividerProps = DividerInternalProps;
|
|
7
7
|
/**
|
|
8
8
|
* **📦 A divider component that can be used to visually separate components**
|
|
9
9
|
*
|
|
@@ -34,6 +34,6 @@ type DividerProps = Omit<DividerInternalProps, 'layerClassNames'>;
|
|
|
34
34
|
*
|
|
35
35
|
* @related [Box](https://uds.build/docs/components/box), [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
|
|
36
36
|
*/
|
|
37
|
-
declare const Divider: react.ForwardRefExoticComponent<
|
|
37
|
+
declare const Divider: react.ForwardRefExoticComponent<DividerInternalProps & react.RefAttributes<HTMLDivElement>>;
|
|
38
38
|
//#endregion
|
|
39
39
|
export { Divider, type DividerProps };
|
|
@@ -3,7 +3,7 @@ import { DividerInternalProps } from "./DividerInternal.js";
|
|
|
3
3
|
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Divider/Divider.d.ts
|
|
6
|
-
type DividerProps =
|
|
6
|
+
type DividerProps = DividerInternalProps;
|
|
7
7
|
/**
|
|
8
8
|
* **📦 A divider component that can be used to visually separate components**
|
|
9
9
|
*
|
|
@@ -34,6 +34,6 @@ type DividerProps = Omit<DividerInternalProps, 'layerClassNames'>;
|
|
|
34
34
|
*
|
|
35
35
|
* @related [Box](https://uds.build/docs/components/box), [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
|
|
36
36
|
*/
|
|
37
|
-
declare const Divider: react.ForwardRefExoticComponent<
|
|
37
|
+
declare const Divider: react.ForwardRefExoticComponent<DividerInternalProps & react.RefAttributes<HTMLDivElement>>;
|
|
38
38
|
//#endregion
|
|
39
39
|
export { Divider, type DividerProps };
|
|
@@ -14,19 +14,22 @@ const ORIENTATION_WIDTH_MAP = {
|
|
|
14
14
|
horizontal: "w-full",
|
|
15
15
|
vertical: ""
|
|
16
16
|
};
|
|
17
|
-
const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, contentPosition = "center", className,
|
|
17
|
+
const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, contentPosition = "center", className, slotProps, children, ...boxProps }, ref) {
|
|
18
18
|
const direction = vertical ? "vertical" : "horizontal";
|
|
19
19
|
const InternalComponent = vertical ? require_components_VStack.VStack : require_components_HStack.HStack;
|
|
20
|
+
const { className: rootClassName, ...rootSlotProps } = slotProps?.root ?? {};
|
|
21
|
+
const { className: labelClassName, ...labelSlotProps } = slotProps?.label ?? {};
|
|
22
|
+
const { className: lineClassName, ...lineSlotProps } = slotProps?.line ?? {};
|
|
20
23
|
const classNames = (0, react.useMemo)(() => ({
|
|
21
|
-
root: require_styles_styler.cx(ORIENTATION_WIDTH_MAP[direction], className,
|
|
22
|
-
label:
|
|
23
|
-
line:
|
|
24
|
+
root: require_styles_styler.cx(ORIENTATION_WIDTH_MAP[direction], className, rootClassName),
|
|
25
|
+
label: labelClassName,
|
|
26
|
+
line: lineClassName
|
|
24
27
|
}), [
|
|
25
28
|
className,
|
|
26
29
|
direction,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
rootClassName,
|
|
31
|
+
labelClassName,
|
|
32
|
+
lineClassName
|
|
30
33
|
]);
|
|
31
34
|
const lineStyle = (0, react.useMemo)(() => direction === "vertical" ? {
|
|
32
35
|
borderTopWidth: 0,
|
|
@@ -39,8 +42,9 @@ const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, c
|
|
|
39
42
|
}, [direction]);
|
|
40
43
|
const Line = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
|
|
41
44
|
flex: "1",
|
|
42
|
-
className: classNames.line,
|
|
43
|
-
style: lineStyle
|
|
45
|
+
className: require_styles_styler.cx(classNames.line, lineClassName),
|
|
46
|
+
style: lineStyle,
|
|
47
|
+
...lineSlotProps
|
|
44
48
|
});
|
|
45
49
|
if (children) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(InternalComponent, {
|
|
46
50
|
flex: "1",
|
|
@@ -48,6 +52,7 @@ const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, c
|
|
|
48
52
|
className: classNames.root,
|
|
49
53
|
ref,
|
|
50
54
|
...boxProps,
|
|
55
|
+
...rootSlotProps,
|
|
51
56
|
children: [
|
|
52
57
|
contentPosition !== "start" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Line, {}),
|
|
53
58
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
|
|
@@ -56,7 +61,8 @@ const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, c
|
|
|
56
61
|
as: "span",
|
|
57
62
|
color: "inherit",
|
|
58
63
|
variant: "inherit",
|
|
59
|
-
className: classNames.label,
|
|
64
|
+
className: require_styles_styler.cx(classNames.label, labelClassName),
|
|
65
|
+
...labelSlotProps,
|
|
60
66
|
children
|
|
61
67
|
})
|
|
62
68
|
}),
|
|
@@ -69,6 +75,7 @@ const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, c
|
|
|
69
75
|
className: classNames.root,
|
|
70
76
|
ref,
|
|
71
77
|
...boxProps,
|
|
78
|
+
...rootSlotProps,
|
|
72
79
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Line, {})
|
|
73
80
|
});
|
|
74
81
|
});
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalDividerProps, UniversalStackProps } from "../../types/
|
|
2
|
+
import { UniversalDividerProps, UniversalStackProps } from "../../types/dist/index.cjs";
|
|
3
3
|
import "../../tokens/types.cjs";
|
|
4
4
|
import { BoxProps } from "../Box.cjs";
|
|
5
|
+
import { Text } from "../Text.cjs";
|
|
5
6
|
import * as react from "react";
|
|
7
|
+
import { ComponentProps, HTMLAttributes } from "react";
|
|
6
8
|
|
|
7
9
|
//#region src/components/Divider/DividerCore.d.ts
|
|
10
|
+
type DataAttributes = {
|
|
11
|
+
[name: `data-${string}`]: string;
|
|
12
|
+
};
|
|
8
13
|
interface DividerCoreProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
/** Props to be passed into various slots within the component. */
|
|
15
|
+
slotProps?: {
|
|
16
|
+
root?: Partial<HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
17
|
+
label?: Partial<ComponentProps<typeof Text> & DataAttributes>;
|
|
18
|
+
line?: Partial<HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
13
19
|
};
|
|
14
20
|
}
|
|
15
21
|
declare const DividerCore: react.ForwardRefExoticComponent<DividerCoreProps & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalDividerProps, UniversalStackProps } from "../../types/
|
|
2
|
+
import { UniversalDividerProps, UniversalStackProps } from "../../types/dist/index.js";
|
|
3
3
|
import "../../tokens/types.js";
|
|
4
4
|
import { BoxProps } from "../Box.js";
|
|
5
|
+
import { Text } from "../Text.js";
|
|
5
6
|
import * as react from "react";
|
|
7
|
+
import { ComponentProps, HTMLAttributes } from "react";
|
|
6
8
|
|
|
7
9
|
//#region src/components/Divider/DividerCore.d.ts
|
|
10
|
+
type DataAttributes = {
|
|
11
|
+
[name: `data-${string}`]: string;
|
|
12
|
+
};
|
|
8
13
|
interface DividerCoreProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
/** Props to be passed into various slots within the component. */
|
|
15
|
+
slotProps?: {
|
|
16
|
+
root?: Partial<HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
17
|
+
label?: Partial<ComponentProps<typeof Text> & DataAttributes>;
|
|
18
|
+
line?: Partial<HTMLAttributes<HTMLDivElement> & DataAttributes>;
|
|
13
19
|
};
|
|
14
20
|
}
|
|
15
21
|
declare const DividerCore: react.ForwardRefExoticComponent<DividerCoreProps & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -12,19 +12,22 @@ const ORIENTATION_WIDTH_MAP = {
|
|
|
12
12
|
horizontal: "w-full",
|
|
13
13
|
vertical: ""
|
|
14
14
|
};
|
|
15
|
-
const DividerCore = forwardRef(function Divider({ vertical = false, contentPosition = "center", className,
|
|
15
|
+
const DividerCore = forwardRef(function Divider({ vertical = false, contentPosition = "center", className, slotProps, children, ...boxProps }, ref) {
|
|
16
16
|
const direction = vertical ? "vertical" : "horizontal";
|
|
17
17
|
const InternalComponent = vertical ? VStack : HStack;
|
|
18
|
+
const { className: rootClassName, ...rootSlotProps } = slotProps?.root ?? {};
|
|
19
|
+
const { className: labelClassName, ...labelSlotProps } = slotProps?.label ?? {};
|
|
20
|
+
const { className: lineClassName, ...lineSlotProps } = slotProps?.line ?? {};
|
|
18
21
|
const classNames = useMemo(() => ({
|
|
19
|
-
root: cx(ORIENTATION_WIDTH_MAP[direction], className,
|
|
20
|
-
label:
|
|
21
|
-
line:
|
|
22
|
+
root: cx(ORIENTATION_WIDTH_MAP[direction], className, rootClassName),
|
|
23
|
+
label: labelClassName,
|
|
24
|
+
line: lineClassName
|
|
22
25
|
}), [
|
|
23
26
|
className,
|
|
24
27
|
direction,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
rootClassName,
|
|
29
|
+
labelClassName,
|
|
30
|
+
lineClassName
|
|
28
31
|
]);
|
|
29
32
|
const lineStyle = useMemo(() => direction === "vertical" ? {
|
|
30
33
|
borderTopWidth: 0,
|
|
@@ -37,8 +40,9 @@ const DividerCore = forwardRef(function Divider({ vertical = false, contentPosit
|
|
|
37
40
|
}, [direction]);
|
|
38
41
|
const Line = () => /* @__PURE__ */ jsx(Box, {
|
|
39
42
|
flex: "1",
|
|
40
|
-
className: classNames.line,
|
|
41
|
-
style: lineStyle
|
|
43
|
+
className: cx(classNames.line, lineClassName),
|
|
44
|
+
style: lineStyle,
|
|
45
|
+
...lineSlotProps
|
|
42
46
|
});
|
|
43
47
|
if (children) return /* @__PURE__ */ jsxs(InternalComponent, {
|
|
44
48
|
flex: "1",
|
|
@@ -46,6 +50,7 @@ const DividerCore = forwardRef(function Divider({ vertical = false, contentPosit
|
|
|
46
50
|
className: classNames.root,
|
|
47
51
|
ref,
|
|
48
52
|
...boxProps,
|
|
53
|
+
...rootSlotProps,
|
|
49
54
|
children: [
|
|
50
55
|
contentPosition !== "start" && /* @__PURE__ */ jsx(Line, {}),
|
|
51
56
|
/* @__PURE__ */ jsx(Box, {
|
|
@@ -54,7 +59,8 @@ const DividerCore = forwardRef(function Divider({ vertical = false, contentPosit
|
|
|
54
59
|
as: "span",
|
|
55
60
|
color: "inherit",
|
|
56
61
|
variant: "inherit",
|
|
57
|
-
className: classNames.label,
|
|
62
|
+
className: cx(classNames.label, labelClassName),
|
|
63
|
+
...labelSlotProps,
|
|
58
64
|
children
|
|
59
65
|
})
|
|
60
66
|
}),
|
|
@@ -67,6 +73,7 @@ const DividerCore = forwardRef(function Divider({ vertical = false, contentPosit
|
|
|
67
73
|
className: classNames.root,
|
|
68
74
|
ref,
|
|
69
75
|
...boxProps,
|
|
76
|
+
...rootSlotProps,
|
|
70
77
|
children: /* @__PURE__ */ jsx(Line, {})
|
|
71
78
|
});
|
|
72
79
|
});
|
|
@@ -7,19 +7,23 @@ let react = require("react");
|
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
|
|
9
9
|
//#region src/components/Divider/DividerInternal.tsx
|
|
10
|
-
const DividerInternal = (0, react.forwardRef)(function Divider({ variant = "primary",
|
|
10
|
+
const DividerInternal = (0, react.forwardRef)(function Divider({ variant = "primary", slotProps, ...props }, ref) {
|
|
11
11
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Divider_DividerCore.DividerCore, {
|
|
12
12
|
ref,
|
|
13
|
-
|
|
14
|
-
root:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
slotProps: (0, react.useMemo)(() => ({
|
|
14
|
+
root: {
|
|
15
|
+
...slotProps?.root,
|
|
16
|
+
className: require_styles_styler.cx(variant !== "inherit" && require_styles_styler.getStyles({ dividerVariantRoot: variant }), slotProps?.root?.className)
|
|
17
|
+
},
|
|
18
|
+
label: {
|
|
19
|
+
...slotProps?.label,
|
|
20
|
+
className: require_styles_styler.cx(variant !== "inherit" ? require_styles_styler.getStyles({ dividerVariantLabel: variant }) : void 0, slotProps?.label?.className)
|
|
21
|
+
},
|
|
22
|
+
line: {
|
|
23
|
+
...slotProps?.line,
|
|
24
|
+
className: require_styles_styler.cx(variant !== "inherit" && require_styles_styler.getStyles({ dividerVariantLine: variant }), slotProps?.line?.className)
|
|
25
|
+
}
|
|
26
|
+
}), [slotProps, variant]),
|
|
23
27
|
...props
|
|
24
28
|
});
|
|
25
29
|
});
|
|
@@ -5,19 +5,23 @@ import { forwardRef, useMemo } from "react";
|
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/Divider/DividerInternal.tsx
|
|
8
|
-
const DividerInternal = forwardRef(function Divider({ variant = "primary",
|
|
8
|
+
const DividerInternal = forwardRef(function Divider({ variant = "primary", slotProps, ...props }, ref) {
|
|
9
9
|
return /* @__PURE__ */ jsx(DividerCore, {
|
|
10
10
|
ref,
|
|
11
|
-
|
|
12
|
-
root:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
slotProps: useMemo(() => ({
|
|
12
|
+
root: {
|
|
13
|
+
...slotProps?.root,
|
|
14
|
+
className: cx(variant !== "inherit" && getStyles({ dividerVariantRoot: variant }), slotProps?.root?.className)
|
|
15
|
+
},
|
|
16
|
+
label: {
|
|
17
|
+
...slotProps?.label,
|
|
18
|
+
className: cx(variant !== "inherit" ? getStyles({ dividerVariantLabel: variant }) : void 0, slotProps?.label?.className)
|
|
19
|
+
},
|
|
20
|
+
line: {
|
|
21
|
+
...slotProps?.line,
|
|
22
|
+
className: cx(variant !== "inherit" && getStyles({ dividerVariantLine: variant }), slotProps?.line?.className)
|
|
23
|
+
}
|
|
24
|
+
}), [slotProps, variant]),
|
|
21
25
|
...props
|
|
22
26
|
});
|
|
23
27
|
});
|
package/dist/components/Icon.cjs
CHANGED
|
@@ -5,7 +5,6 @@ const require_styles_styler = require('../styles/styler.cjs');
|
|
|
5
5
|
const require_tokens_configs_sizes = require('../tokens/configs/sizes.cjs');
|
|
6
6
|
let react = require("react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
let _yahoo_uds_icons_utils = require("@yahoo/uds-icons/utils");
|
|
9
8
|
|
|
10
9
|
//#region src/components/Icon.tsx
|
|
11
10
|
/**
|
|
@@ -37,10 +36,8 @@ let _yahoo_uds_icons_utils = require("@yahoo/uds-icons/utils");
|
|
|
37
36
|
*
|
|
38
37
|
* @related [IconButton](https://uds.build/docs/components/icon-button)
|
|
39
38
|
*/
|
|
40
|
-
const Icon = (0, react.forwardRef)(function BaseIcon({ name:
|
|
41
|
-
const
|
|
42
|
-
const iconComponent = typeof iconName === "function" ? iconName : void 0;
|
|
43
|
-
const availableVariants = iconDefinition ? (0, _yahoo_uds_icons_utils.getIconVariants)(iconDefinition) : [];
|
|
39
|
+
const Icon = (0, react.forwardRef)(function BaseIcon({ name: SVGIcon, size = "md", variant = "outline", color = "primary", className, ...props }, ref) {
|
|
40
|
+
const availableVariants = SVGIcon.metadata?.variants ?? [];
|
|
44
41
|
const effectiveVariant = availableVariants.includes(variant) ? variant : availableVariants[0] ?? "fill";
|
|
45
42
|
const isMulticolor = effectiveVariant === "multicolor";
|
|
46
43
|
const styles = require_styles_styler.getStyles({
|
|
@@ -49,14 +46,6 @@ const Icon = (0, react.forwardRef)(function BaseIcon({ name: iconName, size = "m
|
|
|
49
46
|
className: require_styles_styler.cx(className, !isMulticolor && "[&_path]:fill-current")
|
|
50
47
|
});
|
|
51
48
|
const sizePx = require_tokens_configs_sizes.normalIconSizes[size];
|
|
52
|
-
const renderedMarkup = iconDefinition ? (0, _yahoo_uds_icons_utils.getIconMarkup)(iconDefinition, size, effectiveVariant) : null;
|
|
53
|
-
const renderedIcon = renderedMarkup ? null : (0, react.isValidElement)(iconName) ? (0, react.cloneElement)(iconName, {
|
|
54
|
-
size,
|
|
55
|
-
variant: effectiveVariant
|
|
56
|
-
}) : iconComponent ? iconComponent({
|
|
57
|
-
size,
|
|
58
|
-
variant: effectiveVariant
|
|
59
|
-
}) : null;
|
|
60
49
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
61
50
|
ref,
|
|
62
51
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -66,9 +55,11 @@ const Icon = (0, react.forwardRef)(function BaseIcon({ name: iconName, size = "m
|
|
|
66
55
|
"aria-hidden": "true",
|
|
67
56
|
focusable: "false",
|
|
68
57
|
className: styles,
|
|
69
|
-
dangerouslySetInnerHTML: renderedMarkup ? { __html: renderedMarkup } : void 0,
|
|
70
58
|
...props,
|
|
71
|
-
children:
|
|
59
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SVGIcon, {
|
|
60
|
+
size,
|
|
61
|
+
variant: effectiveVariant
|
|
62
|
+
})
|
|
72
63
|
});
|
|
73
64
|
});
|
|
74
65
|
Icon.displayName = "Icon";
|