@yahoo/uds 3.165.0 → 3.167.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/cli/commands/sync.cjs +36 -0
- package/dist/cli/commands/sync.js +36 -0
- package/dist/components/client/Avatar/AvatarIcon.cjs +3 -0
- package/dist/components/client/Avatar/AvatarIcon.js +3 -0
- package/dist/components/client/Avatar/UDSAvatarConfigProvider.cjs +28 -0
- package/dist/components/client/Avatar/UDSAvatarConfigProvider.d.cts +29 -0
- package/dist/components/client/Avatar/UDSAvatarConfigProvider.d.ts +30 -0
- package/dist/components/client/Avatar/UDSAvatarConfigProvider.js +27 -0
- package/dist/components/client/Avatar/index.cjs +3 -0
- package/dist/components/client/Avatar/index.d.cts +2 -1
- package/dist/components/client/Avatar/index.d.ts +2 -1
- package/dist/components/client/Avatar/index.js +2 -1
- package/dist/components/client/Badge.cjs +4 -1
- package/dist/components/client/Badge.js +4 -1
- package/dist/components/client/Chip/ChipBase.cjs +4 -0
- package/dist/components/client/Chip/ChipBase.js +4 -0
- package/dist/components/client/Chip/UDSChipConfigProvider.cjs +28 -0
- package/dist/components/client/Chip/UDSChipConfigProvider.d.cts +29 -0
- package/dist/components/client/Chip/UDSChipConfigProvider.d.ts +30 -0
- package/dist/components/client/Chip/UDSChipConfigProvider.js +27 -0
- package/dist/components/client/Chip/index.cjs +3 -0
- package/dist/components/client/Chip/index.d.cts +2 -1
- package/dist/components/client/Chip/index.d.ts +2 -1
- package/dist/components/client/Chip/index.js +2 -1
- package/dist/components/client/Input/Input.cjs +10 -2
- package/dist/components/client/Input/Input.js +10 -2
- package/dist/components/client/Input/InputHelpTextInternal.cjs +6 -1
- package/dist/components/client/Input/InputHelpTextInternal.js +6 -1
- package/dist/components/client/Input/UDSInputConfigProvider.cjs +33 -0
- package/dist/components/client/Input/UDSInputConfigProvider.d.cts +32 -0
- package/dist/components/client/Input/UDSInputConfigProvider.d.ts +33 -0
- package/dist/components/client/Input/UDSInputConfigProvider.js +32 -0
- package/dist/components/client/Input/index.cjs +3 -0
- package/dist/components/client/Input/index.d.cts +2 -1
- package/dist/components/client/Input/index.d.ts +2 -1
- package/dist/components/client/Input/index.js +2 -1
- package/dist/components/client/Menu/Menu.ItemBase.cjs +4 -2
- package/dist/components/client/Menu/Menu.ItemBase.js +4 -2
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
- package/dist/components/client/Menu/UDSMenuItemConfigProvider.cjs +30 -0
- package/dist/components/client/Menu/UDSMenuItemConfigProvider.d.cts +29 -0
- package/dist/components/client/Menu/UDSMenuItemConfigProvider.d.ts +30 -0
- package/dist/components/client/Menu/UDSMenuItemConfigProvider.js +29 -0
- package/dist/components/client/Menu/index.cjs +3 -0
- package/dist/components/client/Menu/index.d.cts +2 -1
- package/dist/components/client/Menu/index.d.ts +2 -1
- package/dist/components/client/Menu/index.js +2 -1
- package/dist/components/client/PaddleNav/PaddleButton.cjs +3 -1
- package/dist/components/client/PaddleNav/PaddleButton.js +3 -1
- package/dist/components/client/PaddleNav/UDSPaddleNavConfigProvider.cjs +30 -0
- package/dist/components/client/PaddleNav/UDSPaddleNavConfigProvider.d.cts +29 -0
- package/dist/components/client/PaddleNav/UDSPaddleNavConfigProvider.d.ts +30 -0
- package/dist/components/client/PaddleNav/UDSPaddleNavConfigProvider.js +29 -0
- package/dist/components/client/PaddleNav/index.cjs +3 -0
- package/dist/components/client/PaddleNav/index.d.cts +3 -1
- package/dist/components/client/PaddleNav/index.d.ts +3 -1
- package/dist/components/client/PaddleNav/index.js +2 -1
- package/dist/components/client/Pagination/PaginationNext.cjs +3 -1
- package/dist/components/client/Pagination/PaginationNext.js +3 -1
- package/dist/components/client/Pagination/PaginationPrev.cjs +3 -1
- package/dist/components/client/Pagination/PaginationPrev.js +3 -1
- package/dist/components/client/Pagination/UDSPaginationConfigProvider.cjs +30 -0
- package/dist/components/client/Pagination/UDSPaginationConfigProvider.d.cts +29 -0
- package/dist/components/client/Pagination/UDSPaginationConfigProvider.d.ts +30 -0
- package/dist/components/client/Pagination/UDSPaginationConfigProvider.js +29 -0
- package/dist/components/client/Pagination/index.cjs +3 -0
- package/dist/components/client/Pagination/index.d.cts +2 -1
- package/dist/components/client/Pagination/index.d.ts +2 -1
- package/dist/components/client/Pagination/index.js +2 -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/Select/SelectItem.cjs +4 -2
- package/dist/components/client/Select/SelectItem.js +4 -2
- package/dist/components/client/Select/UDSSelectItemConfigProvider.cjs +30 -0
- package/dist/components/client/Select/UDSSelectItemConfigProvider.d.cts +29 -0
- package/dist/components/client/Select/UDSSelectItemConfigProvider.d.ts +30 -0
- package/dist/components/client/Select/UDSSelectItemConfigProvider.js +29 -0
- package/dist/components/client/Select/index.cjs +3 -0
- package/dist/components/client/Select/index.d.cts +3 -1
- package/dist/components/client/Select/index.d.ts +3 -1
- package/dist/components/client/Select/index.js +2 -1
- package/dist/components/client/Tabs/Tab.cjs +4 -2
- package/dist/components/client/Tabs/Tab.js +4 -2
- package/dist/components/client/Tabs/UDSTabConfigProvider.cjs +22 -0
- package/dist/components/client/Tabs/UDSTabConfigProvider.d.cts +27 -0
- package/dist/components/client/Tabs/UDSTabConfigProvider.d.ts +28 -0
- package/dist/components/client/Tabs/UDSTabConfigProvider.js +21 -0
- package/dist/components/client/Tabs/index.cjs +3 -0
- package/dist/components/client/Tabs/index.d.cts +3 -1
- package/dist/components/client/Tabs/index.d.ts +3 -1
- package/dist/components/client/Tabs/index.js +2 -1
- package/dist/components/client/Tooltip/Tooltip.cjs +3 -2
- package/dist/components/client/Tooltip/Tooltip.d.cts +2 -1
- package/dist/components/client/Tooltip/Tooltip.d.ts +2 -1
- package/dist/components/client/Tooltip/Tooltip.js +3 -2
- package/dist/components/client/Tooltip/TooltipContent.cjs +4 -2
- package/dist/components/client/Tooltip/TooltipContent.js +4 -2
- package/dist/components/client/Tooltip/tooltipContext.d.cts +1 -0
- package/dist/components/client/Tooltip/tooltipContext.d.ts +1 -0
- package/dist/components/client/UDSBadgeConfigProvider.cjs +28 -0
- package/dist/components/client/UDSBadgeConfigProvider.d.cts +29 -0
- package/dist/components/client/UDSBadgeConfigProvider.d.ts +30 -0
- package/dist/components/client/UDSBadgeConfigProvider.js +27 -0
- package/dist/components/client/index.cjs +27 -0
- package/dist/components/client/index.d.cts +10 -1
- package/dist/components/client/index.d.ts +10 -1
- package/dist/components/client/index.js +10 -1
- package/dist/components/client/providers/UDSConfigProvider.cjs +52 -16
- package/dist/components/client/providers/UDSConfigProvider.d.cts +9 -0
- package/dist/components/client/providers/UDSConfigProvider.d.ts +9 -0
- package/dist/components/client/providers/UDSConfigProvider.js +52 -16
- package/dist/components/client/providers/createUDSConfigProvider.cjs +41 -0
- package/dist/components/client/providers/createUDSConfigProvider.d.cts +38 -0
- package/dist/components/client/providers/createUDSConfigProvider.d.ts +39 -0
- package/dist/components/client/providers/createUDSConfigProvider.js +39 -0
- package/dist/components/index.cjs +27 -0
- package/dist/components/index.d.cts +10 -1
- package/dist/components/index.d.ts +10 -1
- package/dist/components/index.js +10 -1
- package/dist/css/dist/css/utils.cjs +58 -0
- package/dist/css/dist/css/utils.js +58 -0
- package/dist/css/dist/runtimeConfig/hookMetadata.cjs +320 -0
- package/dist/css/dist/runtimeConfig/hookMetadata.js +320 -0
- package/dist/index.cjs +45 -0
- package/dist/index.d.cts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +19 -1
- package/dist/runtime/avatarConfig.cjs +21 -0
- package/dist/runtime/avatarConfig.d.cts +13 -0
- package/dist/runtime/avatarConfig.d.ts +13 -0
- package/dist/runtime/avatarConfig.js +20 -0
- package/dist/runtime/badgeConfig.cjs +17 -0
- package/dist/runtime/badgeConfig.d.cts +13 -0
- package/dist/runtime/badgeConfig.d.ts +13 -0
- package/dist/runtime/badgeConfig.js +16 -0
- package/dist/runtime/chipConfig.cjs +12 -0
- package/dist/runtime/chipConfig.d.cts +13 -0
- package/dist/runtime/chipConfig.d.ts +13 -0
- package/dist/runtime/chipConfig.js +11 -0
- package/dist/runtime/index.cjs +18 -0
- package/dist/runtime/index.d.cts +10 -1
- package/dist/runtime/index.d.ts +10 -1
- package/dist/runtime/index.js +10 -1
- package/dist/runtime/inputConfig.cjs +14 -0
- package/dist/runtime/inputConfig.d.cts +15 -0
- package/dist/runtime/inputConfig.d.ts +15 -0
- package/dist/runtime/inputConfig.js +13 -0
- package/dist/runtime/menuItemConfig.cjs +13 -0
- package/dist/runtime/menuItemConfig.d.cts +15 -0
- package/dist/runtime/menuItemConfig.d.ts +15 -0
- package/dist/runtime/menuItemConfig.js +12 -0
- package/dist/runtime/paddleNavConfig.cjs +18 -0
- package/dist/runtime/paddleNavConfig.d.cts +13 -0
- package/dist/runtime/paddleNavConfig.d.ts +13 -0
- package/dist/runtime/paddleNavConfig.js +17 -0
- package/dist/runtime/paginationConfig.cjs +12 -0
- package/dist/runtime/paginationConfig.d.cts +13 -0
- package/dist/runtime/paginationConfig.d.ts +13 -0
- package/dist/runtime/paginationConfig.js +11 -0
- package/dist/runtime/selectItemConfig.cjs +13 -0
- package/dist/runtime/selectItemConfig.d.cts +15 -0
- package/dist/runtime/selectItemConfig.d.ts +15 -0
- package/dist/runtime/selectItemConfig.js +12 -0
- package/dist/runtime/tabConfig.cjs +12 -0
- package/dist/runtime/tabConfig.d.cts +14 -0
- package/dist/runtime/tabConfig.d.ts +14 -0
- package/dist/runtime/tabConfig.js +11 -0
- package/dist/runtime/udsConfig.cjs +18 -0
- package/dist/runtime/udsConfig.d.cts +18 -0
- package/dist/runtime/udsConfig.d.ts +18 -0
- package/dist/runtime/udsConfig.js +18 -0
- package/dist/styles/styler.d.cts +10 -10
- package/dist/styles/styler.d.ts +10 -10
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.cts +2 -2
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.ts +2 -2
- package/dist/types/dist/index.d.cts +2 -0
- package/dist/types/dist/index.d.ts +2 -0
- package/dist/uds/generated/componentData.cjs +351 -234
- package/dist/uds/generated/componentData.js +351 -234
- package/dist/uds/generated/tailwindPurge.cjs +38 -2
- package/dist/uds/generated/tailwindPurge.js +38 -2
- package/dist/uds/package.cjs +2 -2
- package/dist/uds/package.js +2 -2
- package/generated/componentData.json +585 -418
- package/generated/tailwindPurge.ts +3 -3
- package/package.json +3 -3
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
//#region src/components/client/PaddleNav/UDSPaddleNavConfigProvider.tsx
|
|
5
|
+
const { Provider: UDSPaddleNavConfigProvider, useConfigContext } = require("../providers/createUDSConfigProvider.cjs").createUDSConfigProvider("PaddleNav");
|
|
6
|
+
/** The icon size PaddleButton hardcoded before runtime config support. */
|
|
7
|
+
const paddleNavFallbackIconSize = "md";
|
|
8
|
+
/**
|
|
9
|
+
* Resolves the configured icon size for a PaddleNav size.
|
|
10
|
+
*
|
|
11
|
+
* Unlike other UDS config hooks, this hook does not require a provider:
|
|
12
|
+
* PaddleNav is used in many apps without a `UDSConfigProvider`, so it
|
|
13
|
+
* gracefully falls back to the previously hardcoded icon size (`md`) when no
|
|
14
|
+
* config is present.
|
|
15
|
+
*/
|
|
16
|
+
const usePaddleNavConfig = (sizeProp) => {
|
|
17
|
+
const context = useConfigContext();
|
|
18
|
+
if (!context) return {
|
|
19
|
+
size: sizeProp,
|
|
20
|
+
iconSize: paddleNavFallbackIconSize
|
|
21
|
+
};
|
|
22
|
+
const size = sizeProp ?? context.defaultSize;
|
|
23
|
+
return {
|
|
24
|
+
size,
|
|
25
|
+
iconSize: context.iconSize[size]
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.UDSPaddleNavConfigProvider = UDSPaddleNavConfigProvider;
|
|
30
|
+
exports.usePaddleNavConfig = usePaddleNavConfig;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
import { IconSize, PaddleNavSize } from "../../../types/dist/index.cjs";
|
|
3
|
+
import { UDSConfigProviderProps } from "../providers/createUDSConfigProvider.cjs";
|
|
4
|
+
import { UDSPaddleNavConfigContextType } from "../../../runtime/paddleNavConfig.cjs";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/PaddleNav/UDSPaddleNavConfigProvider.d.ts
|
|
8
|
+
declare const UDSPaddleNavConfigProvider: {
|
|
9
|
+
({
|
|
10
|
+
children,
|
|
11
|
+
value
|
|
12
|
+
}: UDSConfigProviderProps<UDSPaddleNavConfigContextType>): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
type UDSPaddleNavConfigProviderProps = UDSConfigProviderProps<UDSPaddleNavConfigContextType>;
|
|
16
|
+
/**
|
|
17
|
+
* Resolves the configured icon size for a PaddleNav size.
|
|
18
|
+
*
|
|
19
|
+
* Unlike other UDS config hooks, this hook does not require a provider:
|
|
20
|
+
* PaddleNav is used in many apps without a `UDSConfigProvider`, so it
|
|
21
|
+
* gracefully falls back to the previously hardcoded icon size (`md`) when no
|
|
22
|
+
* config is present.
|
|
23
|
+
*/
|
|
24
|
+
declare const usePaddleNavConfig: (sizeProp?: PaddleNavSize | undefined) => {
|
|
25
|
+
size: PaddleNavSize | undefined;
|
|
26
|
+
iconSize: IconSize;
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { type UDSPaddleNavConfigContextType, UDSPaddleNavConfigProvider, type UDSPaddleNavConfigProviderProps, usePaddleNavConfig };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { IconSize, PaddleNavSize } from "../../../types/dist/index.js";
|
|
4
|
+
import { UDSConfigProviderProps } from "../providers/createUDSConfigProvider.js";
|
|
5
|
+
import { UDSPaddleNavConfigContextType } from "../../../runtime/paddleNavConfig.js";
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/client/PaddleNav/UDSPaddleNavConfigProvider.d.ts
|
|
9
|
+
declare const UDSPaddleNavConfigProvider: {
|
|
10
|
+
({
|
|
11
|
+
children,
|
|
12
|
+
value
|
|
13
|
+
}: UDSConfigProviderProps<UDSPaddleNavConfigContextType>): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
type UDSPaddleNavConfigProviderProps = UDSConfigProviderProps<UDSPaddleNavConfigContextType>;
|
|
17
|
+
/**
|
|
18
|
+
* Resolves the configured icon size for a PaddleNav size.
|
|
19
|
+
*
|
|
20
|
+
* Unlike other UDS config hooks, this hook does not require a provider:
|
|
21
|
+
* PaddleNav is used in many apps without a `UDSConfigProvider`, so it
|
|
22
|
+
* gracefully falls back to the previously hardcoded icon size (`md`) when no
|
|
23
|
+
* config is present.
|
|
24
|
+
*/
|
|
25
|
+
declare const usePaddleNavConfig: (sizeProp?: PaddleNavSize | undefined) => {
|
|
26
|
+
size: PaddleNavSize | undefined;
|
|
27
|
+
iconSize: IconSize;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { type UDSPaddleNavConfigContextType, UDSPaddleNavConfigProvider, type UDSPaddleNavConfigProviderProps, usePaddleNavConfig };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { createUDSConfigProvider } from "../providers/createUDSConfigProvider.js";
|
|
4
|
+
//#region src/components/client/PaddleNav/UDSPaddleNavConfigProvider.tsx
|
|
5
|
+
const { Provider: UDSPaddleNavConfigProvider, useConfigContext } = createUDSConfigProvider("PaddleNav");
|
|
6
|
+
/** The icon size PaddleButton hardcoded before runtime config support. */
|
|
7
|
+
const paddleNavFallbackIconSize = "md";
|
|
8
|
+
/**
|
|
9
|
+
* Resolves the configured icon size for a PaddleNav size.
|
|
10
|
+
*
|
|
11
|
+
* Unlike other UDS config hooks, this hook does not require a provider:
|
|
12
|
+
* PaddleNav is used in many apps without a `UDSConfigProvider`, so it
|
|
13
|
+
* gracefully falls back to the previously hardcoded icon size (`md`) when no
|
|
14
|
+
* config is present.
|
|
15
|
+
*/
|
|
16
|
+
const usePaddleNavConfig = (sizeProp) => {
|
|
17
|
+
const context = useConfigContext();
|
|
18
|
+
if (!context) return {
|
|
19
|
+
size: sizeProp,
|
|
20
|
+
iconSize: paddleNavFallbackIconSize
|
|
21
|
+
};
|
|
22
|
+
const size = sizeProp ?? context.defaultSize;
|
|
23
|
+
return {
|
|
24
|
+
size,
|
|
25
|
+
iconSize: context.iconSize[size]
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { UDSPaddleNavConfigProvider, usePaddleNavConfig };
|
|
@@ -1,6 +1,7 @@
|
|
|
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_PaddleNav_UDSPaddleNavConfigProvider = require("./UDSPaddleNavConfigProvider.cjs");
|
|
4
5
|
const require_components_client_PaddleNav_PaddleButtonNext = require("./PaddleButtonNext.cjs");
|
|
5
6
|
const require_components_client_PaddleNav_PaddleButtonPrevious = require("./PaddleButtonPrevious.cjs");
|
|
6
7
|
const require_components_client_PaddleNav_PaddleNavContent = require("./PaddleNavContent.cjs");
|
|
@@ -9,3 +10,5 @@ exports.PaddleButtonNext = require_components_client_PaddleNav_PaddleButtonNext.
|
|
|
9
10
|
exports.PaddleButtonPrevious = require_components_client_PaddleNav_PaddleButtonPrevious.PaddleButtonPrevious;
|
|
10
11
|
exports.PaddleNav = require_components_client_PaddleNav_PaddleNav.PaddleNav;
|
|
11
12
|
exports.PaddleNavContent = require_components_client_PaddleNav_PaddleNavContent.PaddleNavContent;
|
|
13
|
+
exports.UDSPaddleNavConfigProvider = require_components_client_PaddleNav_UDSPaddleNavConfigProvider.UDSPaddleNavConfigProvider;
|
|
14
|
+
exports.usePaddleNavConfig = require_components_client_PaddleNav_UDSPaddleNavConfigProvider.usePaddleNavConfig;
|
|
@@ -3,4 +3,6 @@ import { PaddleButtonNext, PaddleButtonNextProps } from "./PaddleButtonNext.cjs"
|
|
|
3
3
|
import { PaddleButtonPrevious, PaddleButtonPreviousProps } from "./PaddleButtonPrevious.cjs";
|
|
4
4
|
import { PaddleNav, PaddleNavProps } from "./PaddleNav.cjs";
|
|
5
5
|
import { PaddleNavContent, PaddleNavContentProps } from "./PaddleNavContent.cjs";
|
|
6
|
-
|
|
6
|
+
import { UDSPaddleNavConfigContextType } from "../../../runtime/paddleNavConfig.cjs";
|
|
7
|
+
import { UDSPaddleNavConfigProvider, UDSPaddleNavConfigProviderProps, usePaddleNavConfig } from "./UDSPaddleNavConfigProvider.cjs";
|
|
8
|
+
export { PaddleButtonNext, PaddleButtonNextProps, PaddleButtonPrevious, PaddleButtonPreviousProps, PaddleNav, PaddleNavContent, PaddleNavContentProps, PaddleNavProps, UDSPaddleNavConfigContextType, UDSPaddleNavConfigProvider, UDSPaddleNavConfigProviderProps, usePaddleNavConfig };
|
|
@@ -4,4 +4,6 @@ import { PaddleButtonNext, PaddleButtonNextProps } from "./PaddleButtonNext.js";
|
|
|
4
4
|
import { PaddleButtonPrevious, PaddleButtonPreviousProps } from "./PaddleButtonPrevious.js";
|
|
5
5
|
import { PaddleNav, PaddleNavProps } from "./PaddleNav.js";
|
|
6
6
|
import { PaddleNavContent, PaddleNavContentProps } from "./PaddleNavContent.js";
|
|
7
|
-
|
|
7
|
+
import { UDSPaddleNavConfigContextType } from "../../../runtime/paddleNavConfig.js";
|
|
8
|
+
import { UDSPaddleNavConfigProvider, UDSPaddleNavConfigProviderProps, usePaddleNavConfig } from "./UDSPaddleNavConfigProvider.js";
|
|
9
|
+
export { PaddleButtonNext, PaddleButtonNextProps, PaddleButtonPrevious, PaddleButtonPreviousProps, PaddleNav, PaddleNavContent, PaddleNavContentProps, PaddleNavProps, UDSPaddleNavConfigContextType, UDSPaddleNavConfigProvider, UDSPaddleNavConfigProviderProps, usePaddleNavConfig };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
"use client";
|
|
3
|
+
import { UDSPaddleNavConfigProvider, usePaddleNavConfig } from "./UDSPaddleNavConfigProvider.js";
|
|
3
4
|
import { PaddleButtonNext } from "./PaddleButtonNext.js";
|
|
4
5
|
import { PaddleButtonPrevious } from "./PaddleButtonPrevious.js";
|
|
5
6
|
import { PaddleNavContent } from "./PaddleNavContent.js";
|
|
6
7
|
import { PaddleNav } from "./PaddleNav.js";
|
|
7
|
-
export { PaddleButtonNext, PaddleButtonPrevious, PaddleNav, PaddleNavContent };
|
|
8
|
+
export { PaddleButtonNext, PaddleButtonPrevious, PaddleNav, PaddleNavContent, UDSPaddleNavConfigProvider, usePaddleNavConfig };
|
|
@@ -6,6 +6,7 @@ const require_utils_createSlot = require("../../../utils/createSlot.cjs");
|
|
|
6
6
|
const require_components_Icon = require("../../Icon.cjs");
|
|
7
7
|
const require_components_client_Pagination_paginationContext = require("./paginationContext.cjs");
|
|
8
8
|
const require_components_client_Pagination_paginationStyles = require("./paginationStyles.cjs");
|
|
9
|
+
const require_components_client_Pagination_UDSPaginationConfigProvider = require("./UDSPaginationConfigProvider.cjs");
|
|
9
10
|
let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
10
11
|
let react = require("react");
|
|
11
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -13,6 +14,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
13
14
|
const Slot = require_utils_createSlot.createSlot();
|
|
14
15
|
const PaginationNext = (0, react.forwardRef)(function PaginationNext({ label = "Next", asChild = false, className, onClick, children, ...rest }, ref) {
|
|
15
16
|
const { activePage, totalPages, size, variant, onPageChange } = require_components_client_Pagination_paginationContext.usePaginationContext();
|
|
17
|
+
const { iconSize } = require_components_client_Pagination_UDSPaginationConfigProvider.usePaginationConfig(size);
|
|
16
18
|
const controlClass = require_components_client_Pagination_paginationStyles.usePaginationPrevNextClassName(size, variant, className);
|
|
17
19
|
const iconClass = require_components_client_Pagination_paginationStyles.usePaginationIconClassName(size);
|
|
18
20
|
const textClass = require_components_client_Pagination_paginationStyles.usePaginationItemLabelClassName(size);
|
|
@@ -27,7 +29,7 @@ const PaginationNext = (0, react.forwardRef)(function PaginationNext({ label = "
|
|
|
27
29
|
children: label
|
|
28
30
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
|
|
29
31
|
name: _yahoo_uds_icons.ChevronRight,
|
|
30
|
-
size:
|
|
32
|
+
size: iconSize,
|
|
31
33
|
color: "current",
|
|
32
34
|
className: iconClass,
|
|
33
35
|
"aria-hidden": true
|
|
@@ -4,6 +4,7 @@ import { createSlot } from "../../../utils/createSlot.js";
|
|
|
4
4
|
import { Icon } from "../../Icon.js";
|
|
5
5
|
import { usePaginationContext } from "./paginationContext.js";
|
|
6
6
|
import { usePaginationIconClassName, usePaginationItemLabelClassName, usePaginationPrevNextClassName } from "./paginationStyles.js";
|
|
7
|
+
import { usePaginationConfig } from "./UDSPaginationConfigProvider.js";
|
|
7
8
|
import { ChevronRight } from "@yahoo/uds-icons";
|
|
8
9
|
import { forwardRef, isValidElement } from "react";
|
|
9
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -11,6 +12,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
11
12
|
const Slot = createSlot();
|
|
12
13
|
const PaginationNext = forwardRef(function PaginationNext({ label = "Next", asChild = false, className, onClick, children, ...rest }, ref) {
|
|
13
14
|
const { activePage, totalPages, size, variant, onPageChange } = usePaginationContext();
|
|
15
|
+
const { iconSize } = usePaginationConfig(size);
|
|
14
16
|
const controlClass = usePaginationPrevNextClassName(size, variant, className);
|
|
15
17
|
const iconClass = usePaginationIconClassName(size);
|
|
16
18
|
const textClass = usePaginationItemLabelClassName(size);
|
|
@@ -25,7 +27,7 @@ const PaginationNext = forwardRef(function PaginationNext({ label = "Next", asCh
|
|
|
25
27
|
children: label
|
|
26
28
|
}), /* @__PURE__ */ jsx(Icon, {
|
|
27
29
|
name: ChevronRight,
|
|
28
|
-
size:
|
|
30
|
+
size: iconSize,
|
|
29
31
|
color: "current",
|
|
30
32
|
className: iconClass,
|
|
31
33
|
"aria-hidden": true
|
|
@@ -6,6 +6,7 @@ const require_utils_createSlot = require("../../../utils/createSlot.cjs");
|
|
|
6
6
|
const require_components_Icon = require("../../Icon.cjs");
|
|
7
7
|
const require_components_client_Pagination_paginationContext = require("./paginationContext.cjs");
|
|
8
8
|
const require_components_client_Pagination_paginationStyles = require("./paginationStyles.cjs");
|
|
9
|
+
const require_components_client_Pagination_UDSPaginationConfigProvider = require("./UDSPaginationConfigProvider.cjs");
|
|
9
10
|
let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
10
11
|
let react = require("react");
|
|
11
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -13,6 +14,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
13
14
|
const Slot = require_utils_createSlot.createSlot();
|
|
14
15
|
const PaginationPrev = (0, react.forwardRef)(function PaginationPrev({ label = "Previous", asChild = false, className, onClick, children, ...rest }, ref) {
|
|
15
16
|
const { activePage, size, variant, onPageChange } = require_components_client_Pagination_paginationContext.usePaginationContext();
|
|
17
|
+
const { iconSize } = require_components_client_Pagination_UDSPaginationConfigProvider.usePaginationConfig(size);
|
|
16
18
|
const controlClass = require_components_client_Pagination_paginationStyles.usePaginationPrevNextClassName(size, variant, className);
|
|
17
19
|
const iconClass = require_components_client_Pagination_paginationStyles.usePaginationIconClassName(size);
|
|
18
20
|
const textClass = require_components_client_Pagination_paginationStyles.usePaginationItemLabelClassName(size);
|
|
@@ -24,7 +26,7 @@ const PaginationPrev = (0, react.forwardRef)(function PaginationPrev({ label = "
|
|
|
24
26
|
const Comp = asChild ? Slot : "button";
|
|
25
27
|
const content = children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
|
|
26
28
|
name: _yahoo_uds_icons.ChevronLeft,
|
|
27
|
-
size:
|
|
29
|
+
size: iconSize,
|
|
28
30
|
color: "current",
|
|
29
31
|
className: iconClass,
|
|
30
32
|
"aria-hidden": true
|
|
@@ -4,6 +4,7 @@ import { createSlot } from "../../../utils/createSlot.js";
|
|
|
4
4
|
import { Icon } from "../../Icon.js";
|
|
5
5
|
import { usePaginationContext } from "./paginationContext.js";
|
|
6
6
|
import { usePaginationIconClassName, usePaginationItemLabelClassName, usePaginationPrevNextClassName } from "./paginationStyles.js";
|
|
7
|
+
import { usePaginationConfig } from "./UDSPaginationConfigProvider.js";
|
|
7
8
|
import { ChevronLeft } from "@yahoo/uds-icons";
|
|
8
9
|
import { forwardRef, isValidElement } from "react";
|
|
9
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -11,6 +12,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
11
12
|
const Slot = createSlot();
|
|
12
13
|
const PaginationPrev = forwardRef(function PaginationPrev({ label = "Previous", asChild = false, className, onClick, children, ...rest }, ref) {
|
|
13
14
|
const { activePage, size, variant, onPageChange } = usePaginationContext();
|
|
15
|
+
const { iconSize } = usePaginationConfig(size);
|
|
14
16
|
const controlClass = usePaginationPrevNextClassName(size, variant, className);
|
|
15
17
|
const iconClass = usePaginationIconClassName(size);
|
|
16
18
|
const textClass = usePaginationItemLabelClassName(size);
|
|
@@ -22,7 +24,7 @@ const PaginationPrev = forwardRef(function PaginationPrev({ label = "Previous",
|
|
|
22
24
|
const Comp = asChild ? Slot : "button";
|
|
23
25
|
const content = children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Icon, {
|
|
24
26
|
name: ChevronLeft,
|
|
25
|
-
size:
|
|
27
|
+
size: iconSize,
|
|
26
28
|
color: "current",
|
|
27
29
|
className: iconClass,
|
|
28
30
|
"aria-hidden": true
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
//#region src/components/client/Pagination/UDSPaginationConfigProvider.tsx
|
|
5
|
+
const { Provider: UDSPaginationConfigProvider, useConfigContext } = require("../providers/createUDSConfigProvider.cjs").createUDSConfigProvider("Pagination");
|
|
6
|
+
/** The icon size Pagination hardcoded before runtime config support. */
|
|
7
|
+
const paginationFallbackIconSize = "sm";
|
|
8
|
+
/**
|
|
9
|
+
* Resolves the configured icon size for a Pagination size.
|
|
10
|
+
*
|
|
11
|
+
* Unlike other UDS config hooks, this hook does not require a provider:
|
|
12
|
+
* Pagination is used in many apps without a `UDSConfigProvider`, so it
|
|
13
|
+
* gracefully falls back to the previously hardcoded icon size (`sm`) when no
|
|
14
|
+
* config is present.
|
|
15
|
+
*/
|
|
16
|
+
const usePaginationConfig = (sizeProp) => {
|
|
17
|
+
const context = useConfigContext();
|
|
18
|
+
if (!context) return {
|
|
19
|
+
size: sizeProp,
|
|
20
|
+
iconSize: paginationFallbackIconSize
|
|
21
|
+
};
|
|
22
|
+
const size = sizeProp ?? context.defaultSize;
|
|
23
|
+
return {
|
|
24
|
+
size,
|
|
25
|
+
iconSize: context.iconSize[size]
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.UDSPaginationConfigProvider = UDSPaginationConfigProvider;
|
|
30
|
+
exports.usePaginationConfig = usePaginationConfig;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
import { IconSize, PaginationSize } from "../../../types/dist/index.cjs";
|
|
3
|
+
import { UDSConfigProviderProps } from "../providers/createUDSConfigProvider.cjs";
|
|
4
|
+
import { UDSPaginationConfigContextType } from "../../../runtime/paginationConfig.cjs";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/Pagination/UDSPaginationConfigProvider.d.ts
|
|
8
|
+
declare const UDSPaginationConfigProvider: {
|
|
9
|
+
({
|
|
10
|
+
children,
|
|
11
|
+
value
|
|
12
|
+
}: UDSConfigProviderProps<UDSPaginationConfigContextType>): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
type UDSPaginationConfigProviderProps = UDSConfigProviderProps<UDSPaginationConfigContextType>;
|
|
16
|
+
/**
|
|
17
|
+
* Resolves the configured icon size for a Pagination size.
|
|
18
|
+
*
|
|
19
|
+
* Unlike other UDS config hooks, this hook does not require a provider:
|
|
20
|
+
* Pagination is used in many apps without a `UDSConfigProvider`, so it
|
|
21
|
+
* gracefully falls back to the previously hardcoded icon size (`sm`) when no
|
|
22
|
+
* config is present.
|
|
23
|
+
*/
|
|
24
|
+
declare const usePaginationConfig: (sizeProp?: PaginationSize | undefined) => {
|
|
25
|
+
size: PaginationSize | undefined;
|
|
26
|
+
iconSize: IconSize;
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { type UDSPaginationConfigContextType, UDSPaginationConfigProvider, type UDSPaginationConfigProviderProps, usePaginationConfig };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { IconSize, PaginationSize } from "../../../types/dist/index.js";
|
|
4
|
+
import { UDSConfigProviderProps } from "../providers/createUDSConfigProvider.js";
|
|
5
|
+
import { UDSPaginationConfigContextType } from "../../../runtime/paginationConfig.js";
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/client/Pagination/UDSPaginationConfigProvider.d.ts
|
|
9
|
+
declare const UDSPaginationConfigProvider: {
|
|
10
|
+
({
|
|
11
|
+
children,
|
|
12
|
+
value
|
|
13
|
+
}: UDSConfigProviderProps<UDSPaginationConfigContextType>): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
type UDSPaginationConfigProviderProps = UDSConfigProviderProps<UDSPaginationConfigContextType>;
|
|
17
|
+
/**
|
|
18
|
+
* Resolves the configured icon size for a Pagination size.
|
|
19
|
+
*
|
|
20
|
+
* Unlike other UDS config hooks, this hook does not require a provider:
|
|
21
|
+
* Pagination is used in many apps without a `UDSConfigProvider`, so it
|
|
22
|
+
* gracefully falls back to the previously hardcoded icon size (`sm`) when no
|
|
23
|
+
* config is present.
|
|
24
|
+
*/
|
|
25
|
+
declare const usePaginationConfig: (sizeProp?: PaginationSize | undefined) => {
|
|
26
|
+
size: PaginationSize | undefined;
|
|
27
|
+
iconSize: IconSize;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { type UDSPaginationConfigContextType, UDSPaginationConfigProvider, type UDSPaginationConfigProviderProps, usePaginationConfig };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { createUDSConfigProvider } from "../providers/createUDSConfigProvider.js";
|
|
4
|
+
//#region src/components/client/Pagination/UDSPaginationConfigProvider.tsx
|
|
5
|
+
const { Provider: UDSPaginationConfigProvider, useConfigContext } = createUDSConfigProvider("Pagination");
|
|
6
|
+
/** The icon size Pagination hardcoded before runtime config support. */
|
|
7
|
+
const paginationFallbackIconSize = "sm";
|
|
8
|
+
/**
|
|
9
|
+
* Resolves the configured icon size for a Pagination size.
|
|
10
|
+
*
|
|
11
|
+
* Unlike other UDS config hooks, this hook does not require a provider:
|
|
12
|
+
* Pagination is used in many apps without a `UDSConfigProvider`, so it
|
|
13
|
+
* gracefully falls back to the previously hardcoded icon size (`sm`) when no
|
|
14
|
+
* config is present.
|
|
15
|
+
*/
|
|
16
|
+
const usePaginationConfig = (sizeProp) => {
|
|
17
|
+
const context = useConfigContext();
|
|
18
|
+
if (!context) return {
|
|
19
|
+
size: sizeProp,
|
|
20
|
+
iconSize: paginationFallbackIconSize
|
|
21
|
+
};
|
|
22
|
+
const size = sizeProp ?? context.defaultSize;
|
|
23
|
+
return {
|
|
24
|
+
size,
|
|
25
|
+
iconSize: context.iconSize[size]
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { UDSPaginationConfigProvider, usePaginationConfig };
|
|
@@ -6,6 +6,7 @@ const require_components_client_Pagination_Pagination = require("./Pagination.cj
|
|
|
6
6
|
const require_components_client_Pagination_PaginationEllipsis = require("./PaginationEllipsis.cjs");
|
|
7
7
|
const require_components_client_Pagination_PaginationItem = require("./PaginationItem.cjs");
|
|
8
8
|
const require_components_client_Pagination_PaginationLink = require("./PaginationLink.cjs");
|
|
9
|
+
const require_components_client_Pagination_UDSPaginationConfigProvider = require("./UDSPaginationConfigProvider.cjs");
|
|
9
10
|
const require_components_client_Pagination_PaginationNext = require("./PaginationNext.cjs");
|
|
10
11
|
const require_components_client_Pagination_PaginationNumbers = require("./PaginationNumbers.cjs");
|
|
11
12
|
const require_components_client_Pagination_PaginationPrev = require("./PaginationPrev.cjs");
|
|
@@ -16,4 +17,6 @@ exports.PaginationLink = require_components_client_Pagination_PaginationLink.Pag
|
|
|
16
17
|
exports.PaginationNext = require_components_client_Pagination_PaginationNext.PaginationNext;
|
|
17
18
|
exports.PaginationNumbers = require_components_client_Pagination_PaginationNumbers.PaginationNumbers;
|
|
18
19
|
exports.PaginationPrev = require_components_client_Pagination_PaginationPrev.PaginationPrev;
|
|
20
|
+
exports.UDSPaginationConfigProvider = require_components_client_Pagination_UDSPaginationConfigProvider.UDSPaginationConfigProvider;
|
|
19
21
|
exports.computeVisiblePages = require_components_client_Pagination_computeVisiblePages.computeVisiblePages;
|
|
22
|
+
exports.usePaginationConfig = require_components_client_Pagination_UDSPaginationConfigProvider.usePaginationConfig;
|
|
@@ -7,4 +7,5 @@ import { PaginationLink, PaginationLinkProps } from "./PaginationLink.cjs";
|
|
|
7
7
|
import { PaginationNext, PaginationNextProps } from "./PaginationNext.cjs";
|
|
8
8
|
import { PaginationNumbers, PaginationNumbersProps } from "./PaginationNumbers.cjs";
|
|
9
9
|
import { PaginationPrev, PaginationPrevProps } from "./PaginationPrev.cjs";
|
|
10
|
-
|
|
10
|
+
import { UDSPaginationConfigProvider, UDSPaginationConfigProviderProps, usePaginationConfig } from "./UDSPaginationConfigProvider.cjs";
|
|
11
|
+
export { Pagination, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationNumbers, type PaginationNumbersProps, PaginationPrev, type PaginationPrevProps, type PaginationProps, UDSPaginationConfigProvider, type UDSPaginationConfigProviderProps, computeVisiblePages, usePaginationConfig };
|
|
@@ -8,4 +8,5 @@ import { PaginationLink, PaginationLinkProps } from "./PaginationLink.js";
|
|
|
8
8
|
import { PaginationNext, PaginationNextProps } from "./PaginationNext.js";
|
|
9
9
|
import { PaginationNumbers, PaginationNumbersProps } from "./PaginationNumbers.js";
|
|
10
10
|
import { PaginationPrev, PaginationPrevProps } from "./PaginationPrev.js";
|
|
11
|
-
|
|
11
|
+
import { UDSPaginationConfigProvider, UDSPaginationConfigProviderProps, usePaginationConfig } from "./UDSPaginationConfigProvider.js";
|
|
12
|
+
export { Pagination, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationNumbers, type PaginationNumbersProps, PaginationPrev, type PaginationPrevProps, type PaginationProps, UDSPaginationConfigProvider, type UDSPaginationConfigProviderProps, computeVisiblePages, usePaginationConfig };
|
|
@@ -5,7 +5,8 @@ import { Pagination } from "./Pagination.js";
|
|
|
5
5
|
import { PaginationEllipsis } from "./PaginationEllipsis.js";
|
|
6
6
|
import { PaginationItem } from "./PaginationItem.js";
|
|
7
7
|
import { PaginationLink } from "./PaginationLink.js";
|
|
8
|
+
import { UDSPaginationConfigProvider, usePaginationConfig } from "./UDSPaginationConfigProvider.js";
|
|
8
9
|
import { PaginationNext } from "./PaginationNext.js";
|
|
9
10
|
import { PaginationNumbers } from "./PaginationNumbers.js";
|
|
10
11
|
import { PaginationPrev } from "./PaginationPrev.js";
|
|
11
|
-
export { Pagination, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNumbers, PaginationPrev, computeVisiblePages };
|
|
12
|
+
export { Pagination, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNumbers, PaginationPrev, UDSPaginationConfigProvider, computeVisiblePages, usePaginationConfig };
|
|
@@ -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: ("top-start" | "top-end" | "bottom-start" | "bottom-end" | ("
|
|
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: ("top-start" | "top-end" | "bottom-start" | "bottom-end" | ("
|
|
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
|
|
@@ -6,6 +6,7 @@ require("../../../_virtual/_rolldown/runtime.cjs");
|
|
|
6
6
|
const require_styles_styler = require("../../../styles/styler.cjs");
|
|
7
7
|
const require_components_IconSlot = require("../../IconSlot.cjs");
|
|
8
8
|
const require_components_HStack = require("../../HStack.cjs");
|
|
9
|
+
const require_components_client_Select_UDSSelectItemConfigProvider = require("./UDSSelectItemConfigProvider.cjs");
|
|
9
10
|
let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
10
11
|
let react = require("react");
|
|
11
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -34,6 +35,7 @@ const buildSelectItemClasses = ({ disabled, className }) => {
|
|
|
34
35
|
*/
|
|
35
36
|
const SelectItem = (0, react.forwardRef)(function SelectItem({ children, className, slotProps, disabled, value, startIcon, ...props }, ref) {
|
|
36
37
|
const isSelected = (0, _ariakit_react.useStoreState)((0, _ariakit_react.useSelectContext)(), "value") === value;
|
|
38
|
+
const { startIconSize, endIconSize } = require_components_client_Select_UDSSelectItemConfigProvider.useSelectItemConfig();
|
|
37
39
|
const { className: rootClassName, ...rootSlotProps } = slotProps?.root ?? {};
|
|
38
40
|
const { className: textClassName, ...textSlotProps } = slotProps?.text ?? {};
|
|
39
41
|
const { className: startIconClassName, ...startIconSlotProps } = slotProps?.startIcon ?? {};
|
|
@@ -132,7 +134,7 @@ const SelectItem = (0, react.forwardRef)(function SelectItem({ children, classNa
|
|
|
132
134
|
icon: startIcon,
|
|
133
135
|
className: classNames.startIcon,
|
|
134
136
|
iconProps: {
|
|
135
|
-
size:
|
|
137
|
+
size: startIconSize,
|
|
136
138
|
variant: isSelected ? "fill" : "outline",
|
|
137
139
|
color: "current",
|
|
138
140
|
...startIconSlotProps
|
|
@@ -157,7 +159,7 @@ const SelectItem = (0, react.forwardRef)(function SelectItem({ children, classNa
|
|
|
157
159
|
icon: _yahoo_uds_icons.Check,
|
|
158
160
|
className: classNames.endIcon,
|
|
159
161
|
iconProps: {
|
|
160
|
-
size:
|
|
162
|
+
size: endIconSize,
|
|
161
163
|
variant: "fill",
|
|
162
164
|
color: "current",
|
|
163
165
|
...endIconSlotProps
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { cx, getStyles } from "../../../styles/styler.js";
|
|
5
5
|
import { IconSlot } from "../../IconSlot.js";
|
|
6
6
|
import { HStack } from "../../HStack.js";
|
|
7
|
+
import { useSelectItemConfig } from "./UDSSelectItemConfigProvider.js";
|
|
7
8
|
import { Check } from "@yahoo/uds-icons";
|
|
8
9
|
import { forwardRef, useMemo } from "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -32,6 +33,7 @@ const buildSelectItemClasses = ({ disabled, className }) => {
|
|
|
32
33
|
*/
|
|
33
34
|
const SelectItem = forwardRef(function SelectItem({ children, className, slotProps, disabled, value, startIcon, ...props }, ref) {
|
|
34
35
|
const isSelected = useStoreState(useSelectContext(), "value") === value;
|
|
36
|
+
const { startIconSize, endIconSize } = useSelectItemConfig();
|
|
35
37
|
const { className: rootClassName, ...rootSlotProps } = slotProps?.root ?? {};
|
|
36
38
|
const { className: textClassName, ...textSlotProps } = slotProps?.text ?? {};
|
|
37
39
|
const { className: startIconClassName, ...startIconSlotProps } = slotProps?.startIcon ?? {};
|
|
@@ -130,7 +132,7 @@ const SelectItem = forwardRef(function SelectItem({ children, className, slotPro
|
|
|
130
132
|
icon: startIcon,
|
|
131
133
|
className: classNames.startIcon,
|
|
132
134
|
iconProps: {
|
|
133
|
-
size:
|
|
135
|
+
size: startIconSize,
|
|
134
136
|
variant: isSelected ? "fill" : "outline",
|
|
135
137
|
color: "current",
|
|
136
138
|
...startIconSlotProps
|
|
@@ -155,7 +157,7 @@ const SelectItem = forwardRef(function SelectItem({ children, className, slotPro
|
|
|
155
157
|
icon: Check,
|
|
156
158
|
className: classNames.endIcon,
|
|
157
159
|
iconProps: {
|
|
158
|
-
size:
|
|
160
|
+
size: endIconSize,
|
|
159
161
|
variant: "fill",
|
|
160
162
|
color: "current",
|
|
161
163
|
...endIconSlotProps
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
//#region src/components/client/Select/UDSSelectItemConfigProvider.tsx
|
|
5
|
+
const { Provider: UDSSelectItemConfigProvider, useConfigContext } = require("../providers/createUDSConfigProvider.cjs").createUDSConfigProvider("SelectItem");
|
|
6
|
+
/** The icon size SelectItem hardcoded before runtime config support. */
|
|
7
|
+
const selectItemFallbackIconSize = "sm";
|
|
8
|
+
/**
|
|
9
|
+
* Resolves the configured start/end icon sizes for SelectItem.
|
|
10
|
+
*
|
|
11
|
+
* Unlike other UDS config hooks, this hook does not require a provider:
|
|
12
|
+
* SelectItem is used in many apps without a `UDSConfigProvider`, so it
|
|
13
|
+
* gracefully falls back to the previously hardcoded icon size (`sm`) when no
|
|
14
|
+
* config is present.
|
|
15
|
+
*/
|
|
16
|
+
const useSelectItemConfig = () => {
|
|
17
|
+
const context = useConfigContext();
|
|
18
|
+
if (!context) return {
|
|
19
|
+
startIconSize: selectItemFallbackIconSize,
|
|
20
|
+
endIconSize: selectItemFallbackIconSize
|
|
21
|
+
};
|
|
22
|
+
const size = context.defaultSize;
|
|
23
|
+
return {
|
|
24
|
+
startIconSize: context.startIconSize[size],
|
|
25
|
+
endIconSize: context.endIconSize[size]
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.UDSSelectItemConfigProvider = UDSSelectItemConfigProvider;
|
|
30
|
+
exports.useSelectItemConfig = useSelectItemConfig;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
import { IconSize } from "../../../types/dist/index.cjs";
|
|
3
|
+
import { UDSConfigProviderProps } from "../providers/createUDSConfigProvider.cjs";
|
|
4
|
+
import { UDSSelectItemConfigContextType } from "../../../runtime/selectItemConfig.cjs";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/Select/UDSSelectItemConfigProvider.d.ts
|
|
8
|
+
declare const UDSSelectItemConfigProvider: {
|
|
9
|
+
({
|
|
10
|
+
children,
|
|
11
|
+
value
|
|
12
|
+
}: UDSConfigProviderProps<UDSSelectItemConfigContextType>): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
type UDSSelectItemConfigProviderProps = UDSConfigProviderProps<UDSSelectItemConfigContextType>;
|
|
16
|
+
/**
|
|
17
|
+
* Resolves the configured start/end icon sizes for SelectItem.
|
|
18
|
+
*
|
|
19
|
+
* Unlike other UDS config hooks, this hook does not require a provider:
|
|
20
|
+
* SelectItem is used in many apps without a `UDSConfigProvider`, so it
|
|
21
|
+
* gracefully falls back to the previously hardcoded icon size (`sm`) when no
|
|
22
|
+
* config is present.
|
|
23
|
+
*/
|
|
24
|
+
declare const useSelectItemConfig: () => {
|
|
25
|
+
startIconSize: IconSize;
|
|
26
|
+
endIconSize: IconSize;
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { type UDSSelectItemConfigContextType, UDSSelectItemConfigProvider, type UDSSelectItemConfigProviderProps, useSelectItemConfig };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { IconSize } from "../../../types/dist/index.js";
|
|
4
|
+
import { UDSConfigProviderProps } from "../providers/createUDSConfigProvider.js";
|
|
5
|
+
import { UDSSelectItemConfigContextType } from "../../../runtime/selectItemConfig.js";
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/client/Select/UDSSelectItemConfigProvider.d.ts
|
|
9
|
+
declare const UDSSelectItemConfigProvider: {
|
|
10
|
+
({
|
|
11
|
+
children,
|
|
12
|
+
value
|
|
13
|
+
}: UDSConfigProviderProps<UDSSelectItemConfigContextType>): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
type UDSSelectItemConfigProviderProps = UDSConfigProviderProps<UDSSelectItemConfigContextType>;
|
|
17
|
+
/**
|
|
18
|
+
* Resolves the configured start/end icon sizes for SelectItem.
|
|
19
|
+
*
|
|
20
|
+
* Unlike other UDS config hooks, this hook does not require a provider:
|
|
21
|
+
* SelectItem is used in many apps without a `UDSConfigProvider`, so it
|
|
22
|
+
* gracefully falls back to the previously hardcoded icon size (`sm`) when no
|
|
23
|
+
* config is present.
|
|
24
|
+
*/
|
|
25
|
+
declare const useSelectItemConfig: () => {
|
|
26
|
+
startIconSize: IconSize;
|
|
27
|
+
endIconSize: IconSize;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { type UDSSelectItemConfigContextType, UDSSelectItemConfigProvider, type UDSSelectItemConfigProviderProps, useSelectItemConfig };
|