@yahoo/uds 3.132.2 → 3.133.0-beta.2
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/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
- package/dist/components/{client/Avatar → Avatar}/Avatar.cjs +21 -6
- package/dist/components/{client/Avatar → Avatar}/Avatar.d.cts +3 -3
- package/dist/components/{client/Avatar → Avatar}/Avatar.d.ts +3 -4
- package/dist/components/{client/Avatar → Avatar}/Avatar.js +20 -5
- package/dist/components/{client/Avatar → Avatar}/AvatarIcon.cjs +11 -12
- package/dist/components/{client/Avatar → Avatar}/AvatarIcon.d.cts +5 -4
- package/dist/components/{client/Avatar → Avatar}/AvatarIcon.d.ts +5 -5
- package/dist/components/{client/Avatar → Avatar}/AvatarIcon.js +6 -7
- package/dist/components/Avatar/AvatarImage.types.cjs +1 -0
- package/dist/components/Avatar/AvatarImage.types.d.cts +19 -0
- package/dist/components/Avatar/AvatarImage.types.d.ts +19 -0
- package/dist/components/Avatar/AvatarImage.types.js +1 -0
- package/dist/components/Avatar/AvatarImageNoFallback.cjs +53 -0
- package/dist/components/Avatar/AvatarImageNoFallback.d.cts +18 -0
- package/dist/components/Avatar/AvatarImageNoFallback.d.ts +18 -0
- package/dist/components/Avatar/AvatarImageNoFallback.js +51 -0
- package/dist/components/{client/Avatar → Avatar}/AvatarText.cjs +11 -11
- package/dist/components/{client/Avatar → Avatar}/AvatarText.d.cts +5 -4
- package/dist/components/{client/Avatar → Avatar}/AvatarText.d.ts +5 -5
- package/dist/components/{client/Avatar → Avatar}/AvatarText.js +5 -5
- package/dist/components/Avatar/index.cjs +11 -0
- package/dist/components/Avatar/index.d.cts +6 -0
- package/dist/components/Avatar/index.d.ts +6 -0
- package/dist/components/Avatar/index.js +7 -0
- package/dist/components/{client/Avatar → Avatar}/utils.cjs +3 -4
- package/dist/components/{client/Avatar → Avatar}/utils.d.cts +4 -4
- package/dist/components/{client/Avatar → Avatar}/utils.d.ts +4 -5
- package/dist/components/{client/Avatar → Avatar}/utils.js +2 -3
- package/dist/components/Banner/Banner.cjs +2 -2
- package/dist/components/Banner/Banner.d.cts +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.js +2 -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/DividerCore.cjs +1 -1
- package/dist/components/Divider/DividerCore.d.cts +2 -2
- package/dist/components/Divider/DividerCore.d.ts +2 -2
- package/dist/components/Divider/DividerCore.js +1 -1
- package/dist/components/Divider/DividerInternal.d.cts +1 -1
- package/dist/components/Divider/DividerInternal.d.ts +1 -1
- 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 +15 -6
- package/dist/components/Icon.d.cts +0 -1
- package/dist/components/Icon.d.ts +0 -1
- package/dist/components/Icon.js +16 -7
- package/dist/components/IconSlot.cjs +25 -6
- package/dist/components/IconSlot.d.cts +3 -2
- package/dist/components/IconSlot.d.ts +3 -2
- package/dist/components/IconSlot.js +25 -5
- package/dist/components/Image.d.cts +1 -1
- package/dist/components/Image.d.ts +1 -1
- package/dist/components/Link.d.cts +1 -1
- package/dist/components/Link.d.ts +1 -1
- 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/AvatarImage.cjs +37 -58
- package/dist/components/client/Avatar/AvatarImage.d.cts +2 -16
- package/dist/components/client/Avatar/AvatarImage.d.ts +2 -16
- package/dist/components/client/Avatar/AvatarImage.js +36 -57
- package/dist/components/client/Avatar/index.cjs +1 -7
- package/dist/components/client/Avatar/index.d.cts +3 -5
- package/dist/components/client/Avatar/index.d.ts +3 -5
- package/dist/components/client/Avatar/index.js +1 -4
- package/dist/components/client/Badge.d.cts +1 -1
- package/dist/components/client/Badge.d.ts +1 -1
- 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.cjs +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/BottomSheetHeader.js +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 +1 -1
- package/dist/components/client/Button.d.cts +1 -1
- package/dist/components/client/Button.d.ts +1 -1
- package/dist/components/client/Button.js +1 -1
- package/dist/components/client/Checkbox.cjs +2 -2
- package/dist/components/client/Checkbox.d.cts +1 -1
- package/dist/components/client/Checkbox.d.ts +1 -1
- package/dist/components/client/Checkbox.js +2 -2
- 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.cjs +2 -2
- 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/ChipDismissible.js +2 -2
- 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 +7 -2
- package/dist/components/client/IconButton.js +7 -2
- package/dist/components/client/Input/Input.cjs +5 -9
- package/dist/components/client/Input/Input.d.cts +1 -1
- package/dist/components/client/Input/Input.d.ts +1 -1
- package/dist/components/client/Input/Input.js +6 -10
- package/dist/components/client/Input/InputHelpTextInternal.d.cts +1 -1
- package/dist/components/client/Input/InputHelpTextInternal.d.ts +1 -1
- package/dist/components/client/Menu/Menu.Content.d.cts +1 -1
- package/dist/components/client/Menu/Menu.Content.d.ts +1 -1
- package/dist/components/client/Menu/Menu.Item.d.cts +1 -1
- package/dist/components/client/Menu/Menu.Item.d.ts +1 -1
- package/dist/components/client/Menu/Menu.ItemBase.cjs +1 -1
- package/dist/components/client/Menu/Menu.ItemBase.d.cts +1 -1
- package/dist/components/client/Menu/Menu.ItemBase.d.ts +1 -1
- package/dist/components/client/Menu/Menu.ItemBase.js +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.cjs +1 -1
- 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 +1 -1
- 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 +3 -3
- package/dist/components/client/Popover/PopoverContent.d.cts +1 -1
- package/dist/components/client/Popover/PopoverContent.d.ts +1 -1
- package/dist/components/client/Popover/PopoverContent.js +3 -3
- 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 +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
- 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.d.cts +1 -1
- package/dist/components/client/Radio/Radio.d.ts +1 -1
- 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 +1 -1
- package/dist/components/client/Switch.d.cts +1 -1
- package/dist/components/client/Switch.d.ts +1 -1
- package/dist/components/client/Switch.js +1 -1
- package/dist/components/client/Tabs/Tab.d.cts +1 -1
- package/dist/components/client/Tabs/Tab.d.ts +1 -1
- 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.cjs +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/Toast.js +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 +1 -1
- package/dist/components/client/Tooltip/TooltipContent.d.cts +2 -2
- package/dist/components/client/Tooltip/TooltipContent.d.ts +2 -2
- package/dist/components/client/Tooltip/TooltipContent.js +1 -1
- 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.cjs +1 -7
- package/dist/components/client/index.d.cts +4 -6
- package/dist/components/client/index.d.ts +4 -6
- package/dist/components/client/index.js +2 -5
- 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.cjs +1 -1
- package/dist/components/experimental/Table.d.cts +2 -2
- package/dist/components/experimental/Table.d.ts +2 -2
- package/dist/components/experimental/Table.js +1 -1
- package/dist/components/experimental/client/Accordion.cjs +1 -1
- package/dist/components/experimental/client/Accordion.js +1 -1
- package/dist/components/experimental/client/SegmentedControl.cjs +1 -1
- package/dist/components/experimental/client/SegmentedControl.js +1 -1
- package/dist/components/experimental/client/SwitchV2.cjs +1 -1
- package/dist/components/experimental/client/SwitchV2.d.cts +1 -1
- package/dist/components/experimental/client/SwitchV2.d.ts +1 -1
- package/dist/components/experimental/client/SwitchV2.js +1 -1
- package/dist/components/index.cjs +16 -13
- package/dist/components/index.d.cts +10 -7
- package/dist/components/index.d.ts +10 -7
- package/dist/components/index.js +10 -8
- 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/index.cjs +12 -10
- package/dist/index.d.cts +10 -8
- package/dist/index.d.ts +10 -8
- package/dist/index.js +9 -8
- 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 +38 -38
- package/dist/styles/styler.d.ts +38 -38
- 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/{dist → src}/index.d.cts +35 -23
- package/dist/types/{dist → src}/index.d.ts +35 -23
- package/dist/uds/generated/componentData.cjs +515 -495
- package/dist/uds/generated/componentData.js +511 -497
- package/dist/uds/generated/tailwindPurge.cjs +128 -104
- package/dist/uds/generated/tailwindPurge.js +128 -104
- package/dist/utils/isElevationAlias.d.cts +1 -1
- package/dist/utils/isElevationAlias.d.ts +1 -1
- package/generated/componentData.json +1095 -1087
- package/generated/tailwindPurge.ts +3 -3
- package/package.json +1 -1
- package/dist/icons/dist/types.d.cts +0 -30
- package/dist/icons/dist/types.d.ts +0 -30
|
@@ -2,12 +2,9 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const require_components_client_Avatar_utils = require('./utils.cjs');
|
|
9
|
-
const require_components_client_Avatar_AvatarIcon = require('./AvatarIcon.cjs');
|
|
10
|
-
const require_components_client_Avatar_AvatarText = require('./AvatarText.cjs');
|
|
5
|
+
const require_components_Avatar_AvatarIcon = require('../../Avatar/AvatarIcon.cjs');
|
|
6
|
+
const require_components_Avatar_AvatarImageNoFallback = require('../../Avatar/AvatarImageNoFallback.cjs');
|
|
7
|
+
const require_components_Avatar_AvatarText = require('../../Avatar/AvatarText.cjs');
|
|
11
8
|
let react = require("react");
|
|
12
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
10
|
|
|
@@ -15,77 +12,59 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
15
12
|
/**
|
|
16
13
|
* **AvatarImage Component**
|
|
17
14
|
*
|
|
18
|
-
* Renders an Avatar with an image.
|
|
19
|
-
* a text representation (if a name or initials are provided) and then to an icon.
|
|
15
|
+
* Renders an Avatar with an image.
|
|
20
16
|
*
|
|
21
17
|
* @param props - Props for image variant.
|
|
22
18
|
* @returns The AvatarImage element.
|
|
23
19
|
*/
|
|
24
|
-
const AvatarImage = (0, react.forwardRef)((
|
|
25
|
-
const
|
|
20
|
+
const AvatarImage = (0, react.forwardRef)((props, ref) => {
|
|
21
|
+
const { src, srcSet, alt, fallback, abbreviationStrategy, slotProps, ...restProps } = props;
|
|
22
|
+
const hasImageSource = Boolean(src || srcSet);
|
|
23
|
+
const imageSourceKey = `${src ?? ""}::${srcSet ?? ""}`;
|
|
24
|
+
const [resolvedImageState, setResolvedImageState] = (0, react.useState)(null);
|
|
26
25
|
(0, react.useEffect)(() => {
|
|
26
|
+
if (!hasImageSource) return;
|
|
27
27
|
let mounted = true;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
const img = new Image();
|
|
29
|
+
img.onload = () => {
|
|
30
|
+
if (mounted) setResolvedImageState({
|
|
31
|
+
sourceKey: imageSourceKey,
|
|
32
|
+
status: "loaded"
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
img.onerror = () => {
|
|
36
|
+
if (mounted) setResolvedImageState({
|
|
37
|
+
sourceKey: imageSourceKey,
|
|
38
|
+
status: "error"
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
if (src) img.src = src;
|
|
42
|
+
if (srcSet) img.srcset = srcSet;
|
|
39
43
|
return () => {
|
|
40
44
|
mounted = false;
|
|
41
45
|
};
|
|
42
|
-
}, [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}),
|
|
48
|
-
contents: require_styles_styler.cx("w-full", "h-full", "shrink-0", "text-center", "inline-flex", "justify-center", "items-center", "object-cover")
|
|
49
|
-
}), [
|
|
50
|
-
className,
|
|
51
|
-
size,
|
|
52
|
-
variant
|
|
46
|
+
}, [
|
|
47
|
+
hasImageSource,
|
|
48
|
+
imageSourceKey,
|
|
49
|
+
src,
|
|
50
|
+
srcSet
|
|
53
51
|
]);
|
|
54
|
-
|
|
55
|
-
if (loadingState === "loaded") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
|
|
52
|
+
if ((!hasImageSource ? "error" : resolvedImageState?.sourceKey === imageSourceKey ? resolvedImageState.status : "loading") === "loaded") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Avatar_AvatarImageNoFallback.AvatarImageNoFallback, {
|
|
56
53
|
ref,
|
|
57
|
-
|
|
58
|
-
style: inlineStyles.root,
|
|
59
|
-
...props,
|
|
60
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Image.Image, {
|
|
61
|
-
src,
|
|
62
|
-
srcSet,
|
|
63
|
-
alt,
|
|
64
|
-
className: classNames.contents,
|
|
65
|
-
style: inlineStyles.contents,
|
|
66
|
-
...imageProps,
|
|
67
|
-
...slotProps?.image
|
|
68
|
-
})
|
|
54
|
+
...props
|
|
69
55
|
});
|
|
70
|
-
|
|
71
|
-
...props,
|
|
72
|
-
className,
|
|
73
|
-
size,
|
|
74
|
-
customSize,
|
|
75
|
-
variant
|
|
76
|
-
};
|
|
77
|
-
if (fallback || alt) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Avatar_AvatarText.AvatarText, {
|
|
56
|
+
if (fallback || alt) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Avatar_AvatarText.AvatarText, {
|
|
78
57
|
ref,
|
|
79
58
|
name: alt,
|
|
80
59
|
initials: fallback,
|
|
81
60
|
abbreviationStrategy,
|
|
82
61
|
slotProps: { text: slotProps?.text },
|
|
83
|
-
...
|
|
62
|
+
...restProps
|
|
84
63
|
});
|
|
85
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
64
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Avatar_AvatarIcon.AvatarIcon, {
|
|
86
65
|
ref,
|
|
87
|
-
|
|
88
|
-
|
|
66
|
+
slotProps: { icon: slotProps?.icon },
|
|
67
|
+
...restProps
|
|
89
68
|
});
|
|
90
69
|
});
|
|
91
70
|
AvatarImage.displayName = "AvatarImage";
|
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { UniversalAvatarImageProps } from "../../../tokens/types.cjs";
|
|
4
|
-
import "../../../tokens/index.cjs";
|
|
5
|
-
import { AvatarIconProps } from "./AvatarIcon.cjs";
|
|
6
|
-
import { AvatarTextProps } from "./AvatarText.cjs";
|
|
2
|
+
import { AvatarImageProps } from "../../Avatar/AvatarImage.types.cjs";
|
|
7
3
|
import * as react from "react";
|
|
8
4
|
|
|
9
5
|
//#region src/components/client/Avatar/AvatarImage.d.ts
|
|
10
|
-
type DataAttributes = {
|
|
11
|
-
[name: `data-${string}`]: string;
|
|
12
|
-
};
|
|
13
|
-
interface AvatarImageProps extends UniversalAvatarImageProps {
|
|
14
|
-
/** Props to be passed into various slots within the component. */
|
|
15
|
-
slotProps?: {
|
|
16
|
-
image?: Partial<Omit<ImagePropsWithImgProps, 'src' | 'srcSet' | 'alt' | 'className' | 'height' | 'width'> & DataAttributes>;
|
|
17
|
-
} & AvatarIconProps['slotProps'] & AvatarTextProps['slotProps'];
|
|
18
|
-
}
|
|
19
6
|
/**
|
|
20
7
|
* **AvatarImage Component**
|
|
21
8
|
*
|
|
22
|
-
* Renders an Avatar with an image.
|
|
23
|
-
* a text representation (if a name or initials are provided) and then to an icon.
|
|
9
|
+
* Renders an Avatar with an image.
|
|
24
10
|
*
|
|
25
11
|
* @param props - Props for image variant.
|
|
26
12
|
* @returns The AvatarImage element.
|
|
@@ -1,27 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import {
|
|
4
|
-
import { UniversalAvatarImageProps } from "../../../tokens/types.js";
|
|
5
|
-
import "../../../tokens/index.js";
|
|
6
|
-
import { AvatarIconProps } from "./AvatarIcon.js";
|
|
7
|
-
import { AvatarTextProps } from "./AvatarText.js";
|
|
3
|
+
import { AvatarImageProps } from "../../Avatar/AvatarImage.types.js";
|
|
8
4
|
import * as react from "react";
|
|
9
5
|
|
|
10
6
|
//#region src/components/client/Avatar/AvatarImage.d.ts
|
|
11
|
-
type DataAttributes = {
|
|
12
|
-
[name: `data-${string}`]: string;
|
|
13
|
-
};
|
|
14
|
-
interface AvatarImageProps extends UniversalAvatarImageProps {
|
|
15
|
-
/** Props to be passed into various slots within the component. */
|
|
16
|
-
slotProps?: {
|
|
17
|
-
image?: Partial<Omit<ImagePropsWithImgProps, 'src' | 'srcSet' | 'alt' | 'className' | 'height' | 'width'> & DataAttributes>;
|
|
18
|
-
} & AvatarIconProps['slotProps'] & AvatarTextProps['slotProps'];
|
|
19
|
-
}
|
|
20
7
|
/**
|
|
21
8
|
* **AvatarImage Component**
|
|
22
9
|
*
|
|
23
|
-
* Renders an Avatar with an image.
|
|
24
|
-
* a text representation (if a name or initials are provided) and then to an icon.
|
|
10
|
+
* Renders an Avatar with an image.
|
|
25
11
|
*
|
|
26
12
|
* @param props - Props for image variant.
|
|
27
13
|
* @returns The AvatarImage element.
|
|
@@ -1,89 +1,68 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
"use client";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { AvatarIcon } from "./AvatarIcon.js";
|
|
8
|
-
import { AvatarText } from "./AvatarText.js";
|
|
9
|
-
import { forwardRef, useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { AvatarIcon } from "../../Avatar/AvatarIcon.js";
|
|
4
|
+
import { AvatarImageNoFallback } from "../../Avatar/AvatarImageNoFallback.js";
|
|
5
|
+
import { AvatarText } from "../../Avatar/AvatarText.js";
|
|
6
|
+
import { forwardRef, useEffect, useState } from "react";
|
|
10
7
|
import { jsx } from "react/jsx-runtime";
|
|
11
8
|
|
|
12
9
|
//#region src/components/client/Avatar/AvatarImage.tsx
|
|
13
10
|
/**
|
|
14
11
|
* **AvatarImage Component**
|
|
15
12
|
*
|
|
16
|
-
* Renders an Avatar with an image.
|
|
17
|
-
* a text representation (if a name or initials are provided) and then to an icon.
|
|
13
|
+
* Renders an Avatar with an image.
|
|
18
14
|
*
|
|
19
15
|
* @param props - Props for image variant.
|
|
20
16
|
* @returns The AvatarImage element.
|
|
21
17
|
*/
|
|
22
|
-
const AvatarImage = forwardRef((
|
|
23
|
-
const
|
|
18
|
+
const AvatarImage = forwardRef((props, ref) => {
|
|
19
|
+
const { src, srcSet, alt, fallback, abbreviationStrategy, slotProps, ...restProps } = props;
|
|
20
|
+
const hasImageSource = Boolean(src || srcSet);
|
|
21
|
+
const imageSourceKey = `${src ?? ""}::${srcSet ?? ""}`;
|
|
22
|
+
const [resolvedImageState, setResolvedImageState] = useState(null);
|
|
24
23
|
useEffect(() => {
|
|
24
|
+
if (!hasImageSource) return;
|
|
25
25
|
let mounted = true;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
const img = new Image();
|
|
27
|
+
img.onload = () => {
|
|
28
|
+
if (mounted) setResolvedImageState({
|
|
29
|
+
sourceKey: imageSourceKey,
|
|
30
|
+
status: "loaded"
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
img.onerror = () => {
|
|
34
|
+
if (mounted) setResolvedImageState({
|
|
35
|
+
sourceKey: imageSourceKey,
|
|
36
|
+
status: "error"
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
if (src) img.src = src;
|
|
40
|
+
if (srcSet) img.srcset = srcSet;
|
|
37
41
|
return () => {
|
|
38
42
|
mounted = false;
|
|
39
43
|
};
|
|
40
|
-
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}),
|
|
46
|
-
contents: cx("w-full", "h-full", "shrink-0", "text-center", "inline-flex", "justify-center", "items-center", "object-cover")
|
|
47
|
-
}), [
|
|
48
|
-
className,
|
|
49
|
-
size,
|
|
50
|
-
variant
|
|
44
|
+
}, [
|
|
45
|
+
hasImageSource,
|
|
46
|
+
imageSourceKey,
|
|
47
|
+
src,
|
|
48
|
+
srcSet
|
|
51
49
|
]);
|
|
52
|
-
|
|
53
|
-
if (loadingState === "loaded") return /* @__PURE__ */ jsx(Box, {
|
|
50
|
+
if ((!hasImageSource ? "error" : resolvedImageState?.sourceKey === imageSourceKey ? resolvedImageState.status : "loading") === "loaded") return /* @__PURE__ */ jsx(AvatarImageNoFallback, {
|
|
54
51
|
ref,
|
|
55
|
-
|
|
56
|
-
style: inlineStyles.root,
|
|
57
|
-
...props,
|
|
58
|
-
children: /* @__PURE__ */ jsx(Image$1, {
|
|
59
|
-
src,
|
|
60
|
-
srcSet,
|
|
61
|
-
alt,
|
|
62
|
-
className: classNames.contents,
|
|
63
|
-
style: inlineStyles.contents,
|
|
64
|
-
...imageProps,
|
|
65
|
-
...slotProps?.image
|
|
66
|
-
})
|
|
52
|
+
...props
|
|
67
53
|
});
|
|
68
|
-
const sharedProps = {
|
|
69
|
-
...props,
|
|
70
|
-
className,
|
|
71
|
-
size,
|
|
72
|
-
customSize,
|
|
73
|
-
variant
|
|
74
|
-
};
|
|
75
54
|
if (fallback || alt) return /* @__PURE__ */ jsx(AvatarText, {
|
|
76
55
|
ref,
|
|
77
56
|
name: alt,
|
|
78
57
|
initials: fallback,
|
|
79
58
|
abbreviationStrategy,
|
|
80
59
|
slotProps: { text: slotProps?.text },
|
|
81
|
-
...
|
|
60
|
+
...restProps
|
|
82
61
|
});
|
|
83
62
|
return /* @__PURE__ */ jsx(AvatarIcon, {
|
|
84
63
|
ref,
|
|
85
|
-
|
|
86
|
-
|
|
64
|
+
slotProps: { icon: slotProps?.icon },
|
|
65
|
+
...restProps
|
|
87
66
|
});
|
|
88
67
|
});
|
|
89
68
|
AvatarImage.displayName = "AvatarImage";
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
"use client";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
const require_components_client_Avatar_AvatarIcon = require('./AvatarIcon.cjs');
|
|
5
|
-
const require_components_client_Avatar_AvatarText = require('./AvatarText.cjs');
|
|
6
4
|
const require_components_client_Avatar_AvatarImage = require('./AvatarImage.cjs');
|
|
7
|
-
const require_components_client_Avatar_Avatar = require('./Avatar.cjs');
|
|
8
5
|
|
|
9
|
-
exports.
|
|
10
|
-
exports.AvatarIcon = require_components_client_Avatar_AvatarIcon.AvatarIcon;
|
|
11
|
-
exports.AvatarImage = require_components_client_Avatar_AvatarImage.AvatarImage;
|
|
12
|
-
exports.AvatarText = require_components_client_Avatar_AvatarText.AvatarText;
|
|
6
|
+
exports.AvatarImage = require_components_client_Avatar_AvatarImage.AvatarImage;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { Avatar, AvatarProps } from "./Avatar.cjs";
|
|
6
|
-
export { Avatar, AvatarIcon, type AvatarIconProps, AvatarImage, type AvatarImageProps, type AvatarProps, AvatarText, type AvatarTextProps };
|
|
2
|
+
import { AvatarImageProps } from "../../Avatar/AvatarImage.types.cjs";
|
|
3
|
+
import { AvatarImage } from "./AvatarImage.cjs";
|
|
4
|
+
export { AvatarImage, type AvatarImageProps };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { Avatar, AvatarProps } from "./Avatar.js";
|
|
7
|
-
export { Avatar, AvatarIcon, type AvatarIconProps, AvatarImage, type AvatarImageProps, type AvatarProps, AvatarText, type AvatarTextProps };
|
|
3
|
+
import { AvatarImageProps } from "../../Avatar/AvatarImage.types.js";
|
|
4
|
+
import { AvatarImage } from "./AvatarImage.js";
|
|
5
|
+
export { AvatarImage, type AvatarImageProps };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
"use client";
|
|
3
|
-
import { AvatarIcon } from "./AvatarIcon.js";
|
|
4
|
-
import { AvatarText } from "./AvatarText.js";
|
|
5
3
|
import { AvatarImage } from "./AvatarImage.js";
|
|
6
|
-
import { Avatar } from "./Avatar.js";
|
|
7
4
|
|
|
8
|
-
export {
|
|
5
|
+
export { AvatarImage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalBottomSheetProps } from "../../../types/
|
|
2
|
+
import { UniversalBottomSheetProps } from "../../../types/src/index.cjs";
|
|
3
3
|
import { BottomSheetController } from "./useBottomSheetStore.cjs";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { UniversalBottomSheetProps } from "../../../types/
|
|
3
|
+
import { UniversalBottomSheetProps } from "../../../types/src/index.js";
|
|
4
4
|
import { BottomSheetController } from "./useBottomSheetStore.js";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalBottomSheetContentProps } from "../../../types/
|
|
2
|
+
import { UniversalBottomSheetContentProps } from "../../../types/src/index.cjs";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/client/BottomSheet/BottomSheetContent.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { UniversalBottomSheetContentProps } from "../../../types/
|
|
3
|
+
import { UniversalBottomSheetContentProps } from "../../../types/src/index.js";
|
|
4
4
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/client/BottomSheet/BottomSheetContent.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { BottomSheetVariant } from "../../../types/
|
|
3
|
+
import { BottomSheetVariant } from "../../../types/src/index.js";
|
|
4
4
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/client/BottomSheet/BottomSheetHandle.d.ts
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
5
5
|
const require_styles_styler = require('../../../styles/styler.cjs');
|
|
6
|
-
const require_components_Text = require('../../Text.cjs');
|
|
7
6
|
const require_components_Box = require('../../Box.cjs');
|
|
7
|
+
const require_components_Text = require('../../Text.cjs');
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
|
|
10
10
|
//#region src/components/client/BottomSheet/BottomSheetHeader.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalBottomSheetHeaderProps } from "../../../types/
|
|
2
|
+
import { UniversalBottomSheetHeaderProps } from "../../../types/src/index.cjs";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/client/BottomSheet/BottomSheetHeader.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { UniversalBottomSheetHeaderProps } from "../../../types/
|
|
3
|
+
import { UniversalBottomSheetHeaderProps } from "../../../types/src/index.js";
|
|
4
4
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/client/BottomSheet/BottomSheetHeader.d.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
"use client";
|
|
3
3
|
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
|
-
import { Text } from "../../Text.js";
|
|
5
4
|
import { Box } from "../../Box.js";
|
|
5
|
+
import { Text } from "../../Text.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/client/BottomSheet/BottomSheetHeader.tsx
|
|
@@ -10,9 +10,9 @@ const require_components_IconSlot = require('../IconSlot.cjs');
|
|
|
10
10
|
const require_generateDefaultClassName = require('../../automated-config/dist/utils/generateDefaultClassName.cjs');
|
|
11
11
|
const require_components_client_buttonConstants = require('./buttonConstants.cjs');
|
|
12
12
|
const require_components_client_SpringMotionConfig = require('./SpringMotionConfig.cjs');
|
|
13
|
-
let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
14
13
|
let react = require("react");
|
|
15
14
|
react = require_runtime.__toESM(react);
|
|
15
|
+
let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
16
16
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
17
17
|
let motion_react = require("motion/react");
|
|
18
18
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { UniversalButtonProps } from "../../types/
|
|
2
|
+
import { UniversalButtonProps } from "../../types/src/index.cjs";
|
|
3
3
|
import { IconPropsWithSVGProps } from "../../tokens/types.cjs";
|
|
4
4
|
import "../../tokens/index.cjs";
|
|
5
5
|
import React, { ForwardRefExoticComponent } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import { UniversalButtonProps } from "../../types/
|
|
3
|
+
import { UniversalButtonProps } from "../../types/src/index.js";
|
|
4
4
|
import { IconPropsWithSVGProps } from "../../tokens/types.js";
|
|
5
5
|
import "../../tokens/index.js";
|
|
6
6
|
import React, { ForwardRefExoticComponent } from "react";
|
|
@@ -8,8 +8,8 @@ import { IconSlot } from "../IconSlot.js";
|
|
|
8
8
|
import { generateDefaultClassName } from "../../automated-config/dist/utils/generateDefaultClassName.js";
|
|
9
9
|
import { buttonIconSvgSize } from "./buttonConstants.js";
|
|
10
10
|
import { SpringMotionConfig } from "./SpringMotionConfig.js";
|
|
11
|
-
import { Progress } from "@yahoo/uds-icons";
|
|
12
11
|
import React, { cloneElement, forwardRef, isValidElement, useImperativeHandle, useMemo, useRef } from "react";
|
|
12
|
+
import { Progress } from "@yahoo/uds-icons";
|
|
13
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { AnimatePresence, m, useReducedMotion } from "motion/react";
|
|
15
15
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
5
5
|
const require_styles_styler = require('../../styles/styler.cjs');
|
|
6
|
-
const require_components_Icon = require('../Icon.cjs');
|
|
7
6
|
const require_components_Box = require('../Box.cjs');
|
|
7
|
+
const require_components_Icon = require('../Icon.cjs');
|
|
8
8
|
const require_components_FormLabel = require('../FormLabel.cjs');
|
|
9
9
|
const require_components_client_SpringMotionConfig = require('./SpringMotionConfig.cjs');
|
|
10
|
-
let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
11
10
|
let react = require("react");
|
|
12
11
|
react = require_runtime.__toESM(react);
|
|
12
|
+
let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
13
13
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
14
|
let motion_react = require("motion/react");
|
|
15
15
|
|