@yahoo/uds 3.145.0 → 3.146.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/generated/autoVariants.cjs +34 -0
- package/dist/automated-config/dist/generated/autoVariants.d.cts +5 -0
- package/dist/automated-config/dist/generated/autoVariants.d.ts +5 -0
- package/dist/automated-config/dist/generated/autoVariants.js +34 -0
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +1457 -0
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +161 -1
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +161 -1
- package/dist/automated-config/dist/generated/generatedConfigs.js +1457 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +385 -0
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +2 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +2 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +385 -0
- package/dist/automated-config/dist/utils/buildConfigSchema.cjs +9 -5
- package/dist/automated-config/dist/utils/buildConfigSchema.d.cts +3 -1
- package/dist/automated-config/dist/utils/buildConfigSchema.d.ts +3 -1
- package/dist/automated-config/dist/utils/buildConfigSchema.js +9 -6
- package/dist/automated-config/dist/utils/index.cjs +14 -3
- package/dist/automated-config/dist/utils/index.d.cts +1 -1
- package/dist/automated-config/dist/utils/index.d.ts +1 -1
- package/dist/automated-config/dist/utils/index.js +14 -3
- package/dist/cli/runner.cjs +6 -2
- package/dist/cli/runner.js +6 -2
- package/dist/components/Banner/Banner.cjs +2 -1
- package/dist/components/Banner/Banner.js +2 -1
- package/dist/components/Banner/utils.cjs +3 -12
- package/dist/components/Banner/utils.d.cts +1 -6
- package/dist/components/Banner/utils.d.ts +1 -6
- package/dist/components/Banner/utils.js +2 -11
- 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/PaddleNav/PaddleButton.cjs +51 -0
- package/dist/components/client/PaddleNav/PaddleButton.d.cts +16 -0
- package/dist/components/client/PaddleNav/PaddleButton.d.ts +17 -0
- package/dist/components/client/PaddleNav/PaddleButton.js +49 -0
- package/dist/components/client/PaddleNav/PaddleButtonNext.cjs +18 -0
- package/dist/components/client/PaddleNav/PaddleButtonNext.d.cts +11 -0
- package/dist/components/client/PaddleNav/PaddleButtonNext.d.ts +12 -0
- package/dist/components/client/PaddleNav/PaddleButtonNext.js +16 -0
- package/dist/components/client/PaddleNav/PaddleButtonPrevious.cjs +18 -0
- package/dist/components/client/PaddleNav/PaddleButtonPrevious.d.cts +11 -0
- package/dist/components/client/PaddleNav/PaddleButtonPrevious.d.ts +12 -0
- package/dist/components/client/PaddleNav/PaddleButtonPrevious.js +16 -0
- package/dist/components/client/PaddleNav/PaddleNav.cjs +193 -0
- package/dist/components/client/PaddleNav/PaddleNav.d.cts +11 -0
- package/dist/components/client/PaddleNav/PaddleNav.d.ts +12 -0
- package/dist/components/client/PaddleNav/PaddleNav.js +191 -0
- package/dist/components/client/PaddleNav/PaddleNavContent.cjs +29 -0
- package/dist/components/client/PaddleNav/PaddleNavContent.d.cts +11 -0
- package/dist/components/client/PaddleNav/PaddleNavContent.d.ts +12 -0
- package/dist/components/client/PaddleNav/PaddleNavContent.js +27 -0
- package/dist/components/client/PaddleNav/index.cjs +11 -0
- package/dist/components/client/PaddleNav/index.d.cts +6 -0
- package/dist/components/client/PaddleNav/index.d.ts +7 -0
- package/dist/components/client/PaddleNav/index.js +7 -0
- package/dist/components/client/PaddleNav/paddleButtonIcons.cjs +12 -0
- package/dist/components/client/PaddleNav/paddleButtonIcons.d.cts +22 -0
- package/dist/components/client/PaddleNav/paddleButtonIcons.d.ts +23 -0
- package/dist/components/client/PaddleNav/paddleButtonIcons.js +10 -0
- package/dist/components/client/PaddleNav/paddleNavContext.cjs +20 -0
- package/dist/components/client/PaddleNav/paddleNavContext.d.cts +20 -0
- package/dist/components/client/PaddleNav/paddleNavContext.d.ts +21 -0
- package/dist/components/client/PaddleNav/paddleNavContext.js +16 -0
- package/dist/components/client/PaddleNav/utils/resolvePaddleNavCornerOrientation.cjs +25 -0
- package/dist/components/client/PaddleNav/utils/resolvePaddleNavCornerOrientation.d.cts +16 -0
- package/dist/components/client/PaddleNav/utils/resolvePaddleNavCornerOrientation.d.ts +17 -0
- package/dist/components/client/PaddleNav/utils/resolvePaddleNavCornerOrientation.js +24 -0
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
- package/dist/components/client/index.cjs +8 -0
- package/dist/components/client/index.d.cts +5 -1
- package/dist/components/client/index.d.ts +5 -1
- package/dist/components/client/index.js +5 -1
- package/dist/components/index.cjs +8 -0
- package/dist/components/index.d.cts +5 -1
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.js +5 -1
- package/dist/config/dist/index.cjs +399 -14
- package/dist/config/dist/index.js +399 -14
- package/dist/css/dist/packages/config/dist/index.cjs +399 -14
- package/dist/css/dist/packages/config/dist/index.js +399 -14
- package/dist/icons/dist/types.d.cts +1 -1
- package/dist/icons/dist/types.d.ts +1 -1
- package/dist/index.cjs +11 -1
- package/dist/index.d.cts +9 -5
- package/dist/index.d.ts +9 -5
- package/dist/index.js +8 -4
- package/dist/styles/styler.d.cts +24 -19
- package/dist/styles/styler.d.ts +24 -19
- package/dist/styles/variants.d.cts +34 -0
- package/dist/styles/variants.d.ts +34 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.cjs +1457 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.js +1457 -1
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/buildConfigSchema.cjs +15 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/buildConfigSchema.js +15 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.cjs +14 -2
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.js +14 -2
- package/dist/tailwind-internal/dist/packages/config/dist/index.cjs +399 -14
- package/dist/tailwind-internal/dist/packages/config/dist/index.js +399 -14
- package/dist/tailwind-internal/dist/plugins/components.cjs +1 -0
- package/dist/tailwind-internal/dist/plugins/components.js +2 -1
- package/dist/tailwind-internal/dist/utils/getNestedBorderRadiusUtilities.cjs +6 -0
- package/dist/tailwind-internal/dist/utils/getNestedBorderRadiusUtilities.js +6 -0
- package/dist/tokens/automation/configs/index.cjs +1 -0
- package/dist/tokens/automation/configs/index.d.cts +2 -2
- package/dist/tokens/automation/configs/index.d.ts +2 -2
- package/dist/tokens/automation/configs/index.js +2 -2
- package/dist/tokens/automation/index.cjs +3 -1
- package/dist/tokens/automation/index.d.cts +3 -3
- package/dist/tokens/automation/index.d.ts +3 -3
- package/dist/tokens/automation/index.js +4 -4
- package/dist/tokens/index.cjs +3 -1
- package/dist/tokens/index.d.cts +5 -5
- package/dist/tokens/index.d.ts +5 -5
- package/dist/tokens/index.js +4 -4
- package/dist/tokens/types.d.cts +6 -2
- package/dist/tokens/types.d.ts +6 -2
- package/dist/types/dist/index.d.cts +50 -1
- package/dist/types/dist/index.d.ts +50 -1
- package/dist/uds/generated/componentData.cjs +2781 -3273
- package/dist/uds/generated/componentData.js +2776 -2710
- package/dist/uds/generated/tailwindPurge.cjs +22 -0
- package/dist/uds/generated/tailwindPurge.js +22 -0
- package/dist/utils/hasDisplayName.cjs +17 -0
- package/dist/utils/hasDisplayName.d.cts +12 -0
- package/dist/utils/hasDisplayName.d.ts +12 -0
- package/dist/utils/hasDisplayName.js +15 -0
- package/generated/componentData.json +1770 -1565
- package/generated/tailwindPurge.ts +4 -4
- package/package.json +1 -1
|
@@ -3,7 +3,8 @@ import { cx, getStyles } from "../../styles/styler.js";
|
|
|
3
3
|
import { Pressable } from "../client/Pressable.js";
|
|
4
4
|
import { IconSlot } from "../IconSlot.js";
|
|
5
5
|
import { Text } from "../Text.js";
|
|
6
|
-
import {
|
|
6
|
+
import { hasDisplayName } from "../../utils/hasDisplayName.js";
|
|
7
|
+
import { BANNER_TO_BUTTON_VARIANT, separateChildren } from "./utils.js";
|
|
7
8
|
import { Cross } from "@yahoo/uds-icons";
|
|
8
9
|
import { cloneElement, forwardRef, isValidElement } from "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
require("../../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_utils_hasDisplayName = require("../../utils/hasDisplayName.cjs");
|
|
4
5
|
let react = require("react");
|
|
5
6
|
//#region src/components/Banner/utils.ts
|
|
6
7
|
/**
|
|
@@ -22,16 +23,6 @@ const BANNER_TO_BUTTON_VARIANT = {
|
|
|
22
23
|
"info-secondary": "info-secondary"
|
|
23
24
|
};
|
|
24
25
|
/**
|
|
25
|
-
* Checks whether a React element has a specific displayName.
|
|
26
|
-
* Handles both regular function components and forwardRef components
|
|
27
|
-
* (which have typeof type === 'object').
|
|
28
|
-
*/
|
|
29
|
-
function hasDisplayName(child, name) {
|
|
30
|
-
if (!(0, react.isValidElement)(child)) return false;
|
|
31
|
-
const type = child.type;
|
|
32
|
-
return (typeof type === "function" || typeof type === "object" && type !== null) && "displayName" in type && type.displayName === name;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
26
|
* Separates Banner children into content (BannerContent) and action elements.
|
|
36
27
|
* Skips falsy children so conditional patterns like {show && <Button />} work.
|
|
37
28
|
*/
|
|
@@ -40,7 +31,7 @@ function separateChildren(children) {
|
|
|
40
31
|
const actions = [];
|
|
41
32
|
react.Children.forEach(children, (child) => {
|
|
42
33
|
if (child == null || child === false || child === true || child === "") return;
|
|
43
|
-
if (hasDisplayName(child, "BannerContent")) content = child;
|
|
34
|
+
if (require_utils_hasDisplayName.hasDisplayName(child, "BannerContent")) content = child;
|
|
44
35
|
else actions.push(child);
|
|
45
36
|
});
|
|
46
37
|
return {
|
|
@@ -50,5 +41,5 @@ function separateChildren(children) {
|
|
|
50
41
|
}
|
|
51
42
|
//#endregion
|
|
52
43
|
exports.BANNER_TO_BUTTON_VARIANT = BANNER_TO_BUTTON_VARIANT;
|
|
53
|
-
exports.hasDisplayName = hasDisplayName;
|
|
44
|
+
exports.hasDisplayName = require_utils_hasDisplayName.hasDisplayName;
|
|
54
45
|
exports.separateChildren = separateChildren;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { BannerVariant } from "../../types/dist/index.cjs";
|
|
3
|
+
import { hasDisplayName } from "../../utils/hasDisplayName.cjs";
|
|
3
4
|
import { ReactNode } from "react";
|
|
4
5
|
|
|
5
6
|
//#region src/components/Banner/utils.d.ts
|
|
@@ -8,12 +9,6 @@ import { ReactNode } from "react";
|
|
|
8
9
|
* Secondary banner variants map to secondary button variants.
|
|
9
10
|
*/
|
|
10
11
|
declare const BANNER_TO_BUTTON_VARIANT: Record<BannerVariant, string>;
|
|
11
|
-
/**
|
|
12
|
-
* Checks whether a React element has a specific displayName.
|
|
13
|
-
* Handles both regular function components and forwardRef components
|
|
14
|
-
* (which have typeof type === 'object').
|
|
15
|
-
*/
|
|
16
|
-
declare function hasDisplayName(child: ReactNode, name: string): boolean;
|
|
17
12
|
/**
|
|
18
13
|
* Separates Banner children into content (BannerContent) and action elements.
|
|
19
14
|
* Skips falsy children so conditional patterns like {show && <Button />} work.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { BannerVariant } from "../../types/dist/index.js";
|
|
3
|
+
import { hasDisplayName } from "../../utils/hasDisplayName.js";
|
|
3
4
|
import { ReactNode } from "react";
|
|
4
5
|
|
|
5
6
|
//#region src/components/Banner/utils.d.ts
|
|
@@ -8,12 +9,6 @@ import { ReactNode } from "react";
|
|
|
8
9
|
* Secondary banner variants map to secondary button variants.
|
|
9
10
|
*/
|
|
10
11
|
declare const BANNER_TO_BUTTON_VARIANT: Record<BannerVariant, string>;
|
|
11
|
-
/**
|
|
12
|
-
* Checks whether a React element has a specific displayName.
|
|
13
|
-
* Handles both regular function components and forwardRef components
|
|
14
|
-
* (which have typeof type === 'object').
|
|
15
|
-
*/
|
|
16
|
-
declare function hasDisplayName(child: ReactNode, name: string): boolean;
|
|
17
12
|
/**
|
|
18
13
|
* Separates Banner children into content (BannerContent) and action elements.
|
|
19
14
|
* Skips falsy children so conditional patterns like {show && <Button />} work.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
-
import {
|
|
2
|
+
import { hasDisplayName } from "../../utils/hasDisplayName.js";
|
|
3
|
+
import { Children } from "react";
|
|
3
4
|
//#region src/components/Banner/utils.ts
|
|
4
5
|
/**
|
|
5
6
|
* Maps banner variants to button variants following the Figma spec.
|
|
@@ -20,16 +21,6 @@ const BANNER_TO_BUTTON_VARIANT = {
|
|
|
20
21
|
"info-secondary": "info-secondary"
|
|
21
22
|
};
|
|
22
23
|
/**
|
|
23
|
-
* Checks whether a React element has a specific displayName.
|
|
24
|
-
* Handles both regular function components and forwardRef components
|
|
25
|
-
* (which have typeof type === 'object').
|
|
26
|
-
*/
|
|
27
|
-
function hasDisplayName(child, name) {
|
|
28
|
-
if (!isValidElement(child)) return false;
|
|
29
|
-
const type = child.type;
|
|
30
|
-
return (typeof type === "function" || typeof type === "object" && type !== null) && "displayName" in type && type.displayName === name;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
24
|
* Separates Banner children into content (BannerContent) and action elements.
|
|
34
25
|
* Skips falsy children so conditional patterns like {show && <Button />} work.
|
|
35
26
|
*/
|
|
@@ -87,6 +87,6 @@ interface MenuItemCheckboxProps extends Omit<PressableProps, 'asChild'>, HtmlBut
|
|
|
87
87
|
*
|
|
88
88
|
* @related [Menu](https://uds.build/docs/components/menu), [Menu.Item](https://uds.build/docs/components/menu-item)
|
|
89
89
|
**/
|
|
90
|
-
declare const MenuItemCheckbox: _$react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "
|
|
90
|
+
declare const MenuItemCheckbox: _$react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "hideEndIcon" | "rootProps"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
91
91
|
//#endregion
|
|
92
92
|
export { MenuItemCheckbox, type MenuItemCheckboxProps };
|
|
@@ -88,6 +88,6 @@ interface MenuItemCheckboxProps extends Omit<PressableProps, 'asChild'>, HtmlBut
|
|
|
88
88
|
*
|
|
89
89
|
* @related [Menu](https://uds.build/docs/components/menu), [Menu.Item](https://uds.build/docs/components/menu-item)
|
|
90
90
|
**/
|
|
91
|
-
declare const MenuItemCheckbox: _$react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "
|
|
91
|
+
declare const MenuItemCheckbox: _$react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "hideEndIcon" | "rootProps"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
92
92
|
//#endregion
|
|
93
93
|
export { MenuItemCheckbox, type MenuItemCheckboxProps };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
|
+
const require_styles_styler = require("../../../styles/styler.cjs");
|
|
6
|
+
const require_components_Icon = require("../../Icon.cjs");
|
|
7
|
+
const require_components_client_PaddleNav_paddleButtonIcons = require("./paddleButtonIcons.cjs");
|
|
8
|
+
const require_components_client_PaddleNav_paddleNavContext = require("./paddleNavContext.cjs");
|
|
9
|
+
let react = require("react");
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
//#region src/components/client/PaddleNav/PaddleButton.tsx
|
|
12
|
+
const PaddleButton = (0, react.forwardRef)(function PaddleButton({ onClick, disabled = false, hidden = false, icon, paddleRole, className, ...rest }, ref) {
|
|
13
|
+
const { variant, size, orientation, registerPaddleHidden } = require_components_client_PaddleNav_paddleNavContext.usePaddleNavContext();
|
|
14
|
+
(0, react.useLayoutEffect)(() => {
|
|
15
|
+
registerPaddleHidden(paddleRole, hidden);
|
|
16
|
+
return () => registerPaddleHidden(paddleRole, false);
|
|
17
|
+
}, [
|
|
18
|
+
paddleRole,
|
|
19
|
+
hidden,
|
|
20
|
+
registerPaddleHidden
|
|
21
|
+
]);
|
|
22
|
+
const resolvedIcon = icon ?? require_components_client_PaddleNav_paddleButtonIcons.pickDefaultPaddleIcon(orientation, paddleRole);
|
|
23
|
+
const rootClass = (0, react.useMemo)(() => require_styles_styler.cx(require_styles_styler.getStyles({ paddlenavSizeRoot: size }), require_styles_styler.getStyles({ paddlenavVariantRoot: variant })), [size, variant]);
|
|
24
|
+
const backgroundClass = (0, react.useMemo)(() => require_styles_styler.getStyles({ paddlenavVariantBackground: variant }), [variant]);
|
|
25
|
+
const iconSizeClass = (0, react.useMemo)(() => require_styles_styler.getStyles({ paddlenavSizeIcon: size }), [size]);
|
|
26
|
+
const iconVariantClass = (0, react.useMemo)(() => require_styles_styler.getStyles({ paddlenavVariantIcon: variant }), [variant]);
|
|
27
|
+
const styles = require_styles_styler.cx("relative inline-flex items-center justify-center box-border overflow-hidden", "border-solid select-none uds-nested-radius", "transition-[color,border-color,box-shadow] duration-[180ms] ease-[cubic-bezier(0,0,0.2,1)]", "uds-ring", !disabled && !hidden && "cursor-pointer", disabled && "cursor-not-allowed opacity-50", hidden && "pointer-events-none hidden", rootClass, className);
|
|
28
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
29
|
+
...rest,
|
|
30
|
+
ref,
|
|
31
|
+
type: "button",
|
|
32
|
+
className: styles,
|
|
33
|
+
onClick: hidden ? void 0 : onClick,
|
|
34
|
+
disabled,
|
|
35
|
+
"aria-hidden": hidden || void 0,
|
|
36
|
+
"data-paddle-button-hidden": hidden ? "true" : void 0,
|
|
37
|
+
"data-paddle-button-role": paddleRole,
|
|
38
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
39
|
+
"aria-hidden": true,
|
|
40
|
+
className: require_styles_styler.cx("absolute inset-0 -z-10 pointer-events-none rounded-[length:var(--uds-nested-radius)]", "transition-[background-color,opacity] duration-[180ms] ease-[cubic-bezier(0,0,0.2,1)]", backgroundClass)
|
|
41
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
|
|
42
|
+
size: "md",
|
|
43
|
+
name: resolvedIcon,
|
|
44
|
+
color: "current",
|
|
45
|
+
className: require_styles_styler.cx(iconSizeClass, iconVariantClass)
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
PaddleButton.displayName = "PaddleButton";
|
|
50
|
+
//#endregion
|
|
51
|
+
exports.PaddleButton = PaddleButton;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalPaddleButtonProps } from "../../../tokens/types.cjs";
|
|
3
|
+
import { PaddleButtonRole } from "./paddleNavContext.cjs";
|
|
4
|
+
import * as _$react from "react";
|
|
5
|
+
import { ButtonHTMLAttributes } from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/PaddleNav/PaddleButton.d.ts
|
|
8
|
+
type HtmlButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>;
|
|
9
|
+
type PaddleButtonProps = UniversalPaddleButtonProps & HtmlButtonProps & {
|
|
10
|
+
/** @internal Set by `PaddleButtonPrevious` / `PaddleButtonNext`. */paddleRole: PaddleButtonRole;
|
|
11
|
+
};
|
|
12
|
+
declare const PaddleButton: _$react.ForwardRefExoticComponent<UniversalPaddleButtonProps & HtmlButtonProps & {
|
|
13
|
+
/** @internal Set by `PaddleButtonPrevious` / `PaddleButtonNext`. */paddleRole: PaddleButtonRole;
|
|
14
|
+
} & _$react.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { PaddleButton, type PaddleButtonProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { UniversalPaddleButtonProps } from "../../../tokens/types.js";
|
|
4
|
+
import { PaddleButtonRole } from "./paddleNavContext.js";
|
|
5
|
+
import * as _$react from "react";
|
|
6
|
+
import { ButtonHTMLAttributes } from "react";
|
|
7
|
+
|
|
8
|
+
//#region src/components/client/PaddleNav/PaddleButton.d.ts
|
|
9
|
+
type HtmlButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>;
|
|
10
|
+
type PaddleButtonProps = UniversalPaddleButtonProps & HtmlButtonProps & {
|
|
11
|
+
/** @internal Set by `PaddleButtonPrevious` / `PaddleButtonNext`. */paddleRole: PaddleButtonRole;
|
|
12
|
+
};
|
|
13
|
+
declare const PaddleButton: _$react.ForwardRefExoticComponent<UniversalPaddleButtonProps & HtmlButtonProps & {
|
|
14
|
+
/** @internal Set by `PaddleButtonPrevious` / `PaddleButtonNext`. */paddleRole: PaddleButtonRole;
|
|
15
|
+
} & _$react.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { PaddleButton, type PaddleButtonProps };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
|
+
import { Icon } from "../../Icon.js";
|
|
5
|
+
import { pickDefaultPaddleIcon } from "./paddleButtonIcons.js";
|
|
6
|
+
import { usePaddleNavContext } from "./paddleNavContext.js";
|
|
7
|
+
import { forwardRef, useLayoutEffect, useMemo } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/client/PaddleNav/PaddleButton.tsx
|
|
10
|
+
const PaddleButton = forwardRef(function PaddleButton({ onClick, disabled = false, hidden = false, icon, paddleRole, className, ...rest }, ref) {
|
|
11
|
+
const { variant, size, orientation, registerPaddleHidden } = usePaddleNavContext();
|
|
12
|
+
useLayoutEffect(() => {
|
|
13
|
+
registerPaddleHidden(paddleRole, hidden);
|
|
14
|
+
return () => registerPaddleHidden(paddleRole, false);
|
|
15
|
+
}, [
|
|
16
|
+
paddleRole,
|
|
17
|
+
hidden,
|
|
18
|
+
registerPaddleHidden
|
|
19
|
+
]);
|
|
20
|
+
const resolvedIcon = icon ?? pickDefaultPaddleIcon(orientation, paddleRole);
|
|
21
|
+
const rootClass = useMemo(() => cx(getStyles({ paddlenavSizeRoot: size }), getStyles({ paddlenavVariantRoot: variant })), [size, variant]);
|
|
22
|
+
const backgroundClass = useMemo(() => getStyles({ paddlenavVariantBackground: variant }), [variant]);
|
|
23
|
+
const iconSizeClass = useMemo(() => getStyles({ paddlenavSizeIcon: size }), [size]);
|
|
24
|
+
const iconVariantClass = useMemo(() => getStyles({ paddlenavVariantIcon: variant }), [variant]);
|
|
25
|
+
const styles = cx("relative inline-flex items-center justify-center box-border overflow-hidden", "border-solid select-none uds-nested-radius", "transition-[color,border-color,box-shadow] duration-[180ms] ease-[cubic-bezier(0,0,0.2,1)]", "uds-ring", !disabled && !hidden && "cursor-pointer", disabled && "cursor-not-allowed opacity-50", hidden && "pointer-events-none hidden", rootClass, className);
|
|
26
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
27
|
+
...rest,
|
|
28
|
+
ref,
|
|
29
|
+
type: "button",
|
|
30
|
+
className: styles,
|
|
31
|
+
onClick: hidden ? void 0 : onClick,
|
|
32
|
+
disabled,
|
|
33
|
+
"aria-hidden": hidden || void 0,
|
|
34
|
+
"data-paddle-button-hidden": hidden ? "true" : void 0,
|
|
35
|
+
"data-paddle-button-role": paddleRole,
|
|
36
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
37
|
+
"aria-hidden": true,
|
|
38
|
+
className: cx("absolute inset-0 -z-10 pointer-events-none rounded-[length:var(--uds-nested-radius)]", "transition-[background-color,opacity] duration-[180ms] ease-[cubic-bezier(0,0,0.2,1)]", backgroundClass)
|
|
39
|
+
}), /* @__PURE__ */ jsx(Icon, {
|
|
40
|
+
size: "md",
|
|
41
|
+
name: resolvedIcon,
|
|
42
|
+
color: "current",
|
|
43
|
+
className: cx(iconSizeClass, iconVariantClass)
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
PaddleButton.displayName = "PaddleButton";
|
|
48
|
+
//#endregion
|
|
49
|
+
export { PaddleButton };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
|
+
const require_components_client_PaddleNav_PaddleButton = require("./PaddleButton.cjs");
|
|
6
|
+
let react = require("react");
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
//#region src/components/client/PaddleNav/PaddleButtonNext.tsx
|
|
9
|
+
const PaddleButtonNext = (0, react.forwardRef)(function PaddleButtonNext(props, ref) {
|
|
10
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_PaddleNav_PaddleButton.PaddleButton, {
|
|
11
|
+
ref,
|
|
12
|
+
paddleRole: "next",
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
PaddleButtonNext.displayName = "PaddleButtonNext";
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.PaddleButtonNext = PaddleButtonNext;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalPaddleButtonProps } from "../../../tokens/types.cjs";
|
|
3
|
+
import * as _$react from "react";
|
|
4
|
+
import { ButtonHTMLAttributes } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/client/PaddleNav/PaddleButtonNext.d.ts
|
|
7
|
+
type HtmlButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>;
|
|
8
|
+
type PaddleButtonNextProps = UniversalPaddleButtonProps & HtmlButtonProps;
|
|
9
|
+
declare const PaddleButtonNext: _$react.ForwardRefExoticComponent<UniversalPaddleButtonProps & HtmlButtonProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { PaddleButtonNext, type PaddleButtonNextProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { UniversalPaddleButtonProps } from "../../../tokens/types.js";
|
|
4
|
+
import * as _$react from "react";
|
|
5
|
+
import { ButtonHTMLAttributes } from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/PaddleNav/PaddleButtonNext.d.ts
|
|
8
|
+
type HtmlButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>;
|
|
9
|
+
type PaddleButtonNextProps = UniversalPaddleButtonProps & HtmlButtonProps;
|
|
10
|
+
declare const PaddleButtonNext: _$react.ForwardRefExoticComponent<UniversalPaddleButtonProps & HtmlButtonProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { PaddleButtonNext, type PaddleButtonNextProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { PaddleButton } from "./PaddleButton.js";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/client/PaddleNav/PaddleButtonNext.tsx
|
|
7
|
+
const PaddleButtonNext = forwardRef(function PaddleButtonNext(props, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsx(PaddleButton, {
|
|
9
|
+
ref,
|
|
10
|
+
paddleRole: "next",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
PaddleButtonNext.displayName = "PaddleButtonNext";
|
|
15
|
+
//#endregion
|
|
16
|
+
export { PaddleButtonNext };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
|
+
const require_components_client_PaddleNav_PaddleButton = require("./PaddleButton.cjs");
|
|
6
|
+
let react = require("react");
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
//#region src/components/client/PaddleNav/PaddleButtonPrevious.tsx
|
|
9
|
+
const PaddleButtonPrevious = (0, react.forwardRef)(function PaddleButtonPrevious(props, ref) {
|
|
10
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_PaddleNav_PaddleButton.PaddleButton, {
|
|
11
|
+
ref,
|
|
12
|
+
paddleRole: "previous",
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
PaddleButtonPrevious.displayName = "PaddleButtonPrevious";
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.PaddleButtonPrevious = PaddleButtonPrevious;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalPaddleButtonProps } from "../../../tokens/types.cjs";
|
|
3
|
+
import * as _$react from "react";
|
|
4
|
+
import { ButtonHTMLAttributes } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/client/PaddleNav/PaddleButtonPrevious.d.ts
|
|
7
|
+
type HtmlButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>;
|
|
8
|
+
type PaddleButtonPreviousProps = UniversalPaddleButtonProps & HtmlButtonProps;
|
|
9
|
+
declare const PaddleButtonPrevious: _$react.ForwardRefExoticComponent<UniversalPaddleButtonProps & HtmlButtonProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { PaddleButtonPrevious, type PaddleButtonPreviousProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { UniversalPaddleButtonProps } from "../../../tokens/types.js";
|
|
4
|
+
import * as _$react from "react";
|
|
5
|
+
import { ButtonHTMLAttributes } from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/PaddleNav/PaddleButtonPrevious.d.ts
|
|
8
|
+
type HtmlButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>;
|
|
9
|
+
type PaddleButtonPreviousProps = UniversalPaddleButtonProps & HtmlButtonProps;
|
|
10
|
+
declare const PaddleButtonPrevious: _$react.ForwardRefExoticComponent<UniversalPaddleButtonProps & HtmlButtonProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { PaddleButtonPrevious, type PaddleButtonPreviousProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { PaddleButton } from "./PaddleButton.js";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/client/PaddleNav/PaddleButtonPrevious.tsx
|
|
7
|
+
const PaddleButtonPrevious = forwardRef(function PaddleButtonPrevious(props, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsx(PaddleButton, {
|
|
9
|
+
ref,
|
|
10
|
+
paddleRole: "previous",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
PaddleButtonPrevious.displayName = "PaddleButtonPrevious";
|
|
15
|
+
//#endregion
|
|
16
|
+
export { PaddleButtonPrevious };
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
|
+
const require_styles_styler = require("../../../styles/styler.cjs");
|
|
6
|
+
const require_utils_hasDisplayName = require("../../../utils/hasDisplayName.cjs");
|
|
7
|
+
const require_components_Box = require("../../Box.cjs");
|
|
8
|
+
const require_hooks_useRtl = require("../../../hooks/useRtl.cjs");
|
|
9
|
+
const require_components_client_PaddleNav_paddleNavContext = require("./paddleNavContext.cjs");
|
|
10
|
+
const require_components_client_PaddleNav_PaddleButtonNext = require("./PaddleButtonNext.cjs");
|
|
11
|
+
const require_components_client_PaddleNav_PaddleButtonPrevious = require("./PaddleButtonPrevious.cjs");
|
|
12
|
+
const require_components_client_PaddleNav_PaddleNavContent = require("./PaddleNavContent.cjs");
|
|
13
|
+
const require_components_client_PaddleNav_utils_resolvePaddleNavCornerOrientation = require("./utils/resolvePaddleNavCornerOrientation.cjs");
|
|
14
|
+
let react = require("react");
|
|
15
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
16
|
+
//#region src/components/client/PaddleNav/PaddleNav.tsx
|
|
17
|
+
function isPaddleButtonPrevious(child) {
|
|
18
|
+
return child.type === require_components_client_PaddleNav_PaddleButtonPrevious.PaddleButtonPrevious || require_utils_hasDisplayName.hasDisplayName(child, "PaddleButtonPrevious");
|
|
19
|
+
}
|
|
20
|
+
function isPaddleButtonNext(child) {
|
|
21
|
+
return child.type === require_components_client_PaddleNav_PaddleButtonNext.PaddleButtonNext || require_utils_hasDisplayName.hasDisplayName(child, "PaddleButtonNext");
|
|
22
|
+
}
|
|
23
|
+
function partitionChildren(children) {
|
|
24
|
+
const contentNodes = [];
|
|
25
|
+
let previousPaddle;
|
|
26
|
+
let nextPaddle;
|
|
27
|
+
const passthroughNodes = [];
|
|
28
|
+
react.Children.forEach(children, (child) => {
|
|
29
|
+
if (!(0, react.isValidElement)(child)) {
|
|
30
|
+
passthroughNodes.push(child);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (isPaddleButtonPrevious(child)) {
|
|
34
|
+
if (!previousPaddle) previousPaddle = child;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (isPaddleButtonNext(child)) {
|
|
38
|
+
if (!nextPaddle) nextPaddle = child;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (child.type === require_components_client_PaddleNav_PaddleNavContent.PaddleNavContent || require_utils_hasDisplayName.hasDisplayName(child, "PaddleNavContent")) {
|
|
42
|
+
contentNodes.push(child);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
passthroughNodes.push(child);
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
contentNodes,
|
|
49
|
+
previousPaddle,
|
|
50
|
+
nextPaddle,
|
|
51
|
+
passthroughNodes
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function getPaddleWrapperClassName(positionClasses, hidden) {
|
|
55
|
+
return require_styles_styler.cx(positionClasses, hidden && "pointer-events-none");
|
|
56
|
+
}
|
|
57
|
+
function getCornerInsetClasses(orientation, outsideContent) {
|
|
58
|
+
const inside = !outsideContent;
|
|
59
|
+
switch (orientation) {
|
|
60
|
+
case "top-left": return inside ? "top-2 left-2" : "-top-12 left-0";
|
|
61
|
+
case "top-right": return inside ? "top-2 right-2" : "-top-12 right-0";
|
|
62
|
+
case "bottom-left": return inside ? "bottom-2 left-2" : "-bottom-12 left-0";
|
|
63
|
+
case "bottom-right": return inside ? "bottom-2 right-2" : "-bottom-12 right-0";
|
|
64
|
+
default: return "";
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const horizontalOverlayStartClass = "left-2 top-1/2 -translate-y-1/2";
|
|
68
|
+
const horizontalOverlayEndClass = "right-2 top-1/2 -translate-y-1/2";
|
|
69
|
+
/** Keeps prev/next paddles in [←][→] screen order inside a cluster when an ancestor sets dir="rtl". */
|
|
70
|
+
const paddleClusterClassName = "inline-flex flex-row gap-2 items-center pointer-events-auto";
|
|
71
|
+
const PaddleNav = (0, react.forwardRef)(function PaddleNav({ children, orientation = "horizontal", outsideContent = false, variant = "primary", size = "md", className, ...rest }, ref) {
|
|
72
|
+
const isRtl = require_hooks_useRtl.useRtl();
|
|
73
|
+
const [paddleHiddenByRole, setPaddleHiddenByRole] = (0, react.useState)(require_components_client_PaddleNav_paddleNavContext.defaultPaddleHiddenByRole);
|
|
74
|
+
const registerPaddleHidden = (0, react.useCallback)((role, hidden) => {
|
|
75
|
+
setPaddleHiddenByRole((current) => {
|
|
76
|
+
if (current[role] === hidden) return current;
|
|
77
|
+
return {
|
|
78
|
+
...current,
|
|
79
|
+
[role]: hidden
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
}, []);
|
|
83
|
+
const paddleNavContextValue = (0, react.useMemo)(() => ({
|
|
84
|
+
orientation,
|
|
85
|
+
outsideContent,
|
|
86
|
+
variant,
|
|
87
|
+
size,
|
|
88
|
+
paddleHiddenByRole,
|
|
89
|
+
registerPaddleHidden
|
|
90
|
+
}), [
|
|
91
|
+
orientation,
|
|
92
|
+
outsideContent,
|
|
93
|
+
variant,
|
|
94
|
+
size,
|
|
95
|
+
paddleHiddenByRole,
|
|
96
|
+
registerPaddleHidden
|
|
97
|
+
]);
|
|
98
|
+
const { contentNodes, previousPaddle, nextPaddle, passthroughNodes } = partitionChildren(children);
|
|
99
|
+
const isVertical = orientation === "vertical";
|
|
100
|
+
const isHorizontalCenter = orientation === "horizontal";
|
|
101
|
+
const isCenter = isVertical || isHorizontalCenter;
|
|
102
|
+
const isCorner = !isCenter;
|
|
103
|
+
const resolvedOrientation = require_components_client_PaddleNav_utils_resolvePaddleNavCornerOrientation.resolvePaddleNavCornerOrientation(orientation, isCorner ? isRtl : false);
|
|
104
|
+
const physicalCornerOrientation = isCorner && resolvedOrientation !== "horizontal" && resolvedOrientation !== "vertical" ? resolvedOrientation : void 0;
|
|
105
|
+
if (!(contentNodes.length > 0)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_PaddleNav_paddleNavContext.PaddleNavContext.Provider, {
|
|
106
|
+
value: paddleNavContextValue,
|
|
107
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_Box.Box, {
|
|
108
|
+
ref,
|
|
109
|
+
dir: isVertical ? void 0 : "ltr",
|
|
110
|
+
className: require_styles_styler.cx(paddleClusterClassName, isVertical && "flex-col", className),
|
|
111
|
+
"data-paddle-nav-orientation": orientation,
|
|
112
|
+
"data-paddle-nav-outside": outsideContent ? "true" : "false",
|
|
113
|
+
...rest,
|
|
114
|
+
children: [
|
|
115
|
+
previousPaddle,
|
|
116
|
+
nextPaddle,
|
|
117
|
+
passthroughNodes
|
|
118
|
+
]
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
if (isCenter) {
|
|
122
|
+
if (outsideContent) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_PaddleNav_paddleNavContext.PaddleNavContext.Provider, {
|
|
123
|
+
value: paddleNavContextValue,
|
|
124
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_Box.Box, {
|
|
125
|
+
ref,
|
|
126
|
+
dir: isHorizontalCenter ? "ltr" : void 0,
|
|
127
|
+
display: "inline-flex",
|
|
128
|
+
alignItems: "center",
|
|
129
|
+
justifyContent: "center",
|
|
130
|
+
flexDirection: isVertical ? "column" : "row",
|
|
131
|
+
columnGap: isVertical ? void 0 : "2",
|
|
132
|
+
rowGap: isVertical ? "2" : void 0,
|
|
133
|
+
className,
|
|
134
|
+
"data-paddle-nav-orientation": orientation,
|
|
135
|
+
"data-paddle-nav-outside": "true",
|
|
136
|
+
...rest,
|
|
137
|
+
children: [
|
|
138
|
+
previousPaddle,
|
|
139
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
140
|
+
className: require_styles_styler.cx("relative min-w-0 min-h-0 flex-1"),
|
|
141
|
+
children: contentNodes
|
|
142
|
+
}),
|
|
143
|
+
nextPaddle,
|
|
144
|
+
passthroughNodes
|
|
145
|
+
]
|
|
146
|
+
})
|
|
147
|
+
});
|
|
148
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_PaddleNav_paddleNavContext.PaddleNavContext.Provider, {
|
|
149
|
+
value: paddleNavContextValue,
|
|
150
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
151
|
+
ref,
|
|
152
|
+
className: require_styles_styler.cx("relative inline-block", className),
|
|
153
|
+
"data-paddle-nav-orientation": orientation,
|
|
154
|
+
"data-paddle-nav-outside": "false",
|
|
155
|
+
...rest,
|
|
156
|
+
children: [
|
|
157
|
+
contentNodes,
|
|
158
|
+
previousPaddle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
159
|
+
className: getPaddleWrapperClassName(require_styles_styler.cx("absolute z-10 pointer-events-auto", isVertical ? "top-2 left-1/2 -translate-x-1/2" : horizontalOverlayStartClass), paddleHiddenByRole.previous),
|
|
160
|
+
children: previousPaddle
|
|
161
|
+
}),
|
|
162
|
+
nextPaddle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
163
|
+
className: getPaddleWrapperClassName(require_styles_styler.cx("absolute z-10 pointer-events-auto", isVertical ? "bottom-2 left-1/2 -translate-x-1/2" : horizontalOverlayEndClass), paddleHiddenByRole.next),
|
|
164
|
+
children: nextPaddle
|
|
165
|
+
}),
|
|
166
|
+
passthroughNodes
|
|
167
|
+
]
|
|
168
|
+
})
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_PaddleNav_paddleNavContext.PaddleNavContext.Provider, {
|
|
172
|
+
value: paddleNavContextValue,
|
|
173
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
174
|
+
ref,
|
|
175
|
+
className: require_styles_styler.cx("relative inline-block", className),
|
|
176
|
+
"data-paddle-nav-orientation": orientation,
|
|
177
|
+
"data-paddle-nav-outside": outsideContent ? "true" : "false",
|
|
178
|
+
...rest,
|
|
179
|
+
children: [
|
|
180
|
+
contentNodes,
|
|
181
|
+
(previousPaddle || nextPaddle) && physicalCornerOrientation && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
182
|
+
dir: "ltr",
|
|
183
|
+
className: require_styles_styler.cx("absolute z-10", paddleClusterClassName, getCornerInsetClasses(physicalCornerOrientation, outsideContent)),
|
|
184
|
+
children: [previousPaddle, nextPaddle]
|
|
185
|
+
}),
|
|
186
|
+
passthroughNodes
|
|
187
|
+
]
|
|
188
|
+
})
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
PaddleNav.displayName = "PaddleNav";
|
|
192
|
+
//#endregion
|
|
193
|
+
exports.PaddleNav = PaddleNav;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalPaddleNavProps } from "../../../types/dist/index.cjs";
|
|
3
|
+
import * as _$react from "react";
|
|
4
|
+
import { HTMLAttributes } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/client/PaddleNav/PaddleNav.d.ts
|
|
7
|
+
type HtmlDivProps = Omit<HTMLAttributes<HTMLDivElement>, 'color'>;
|
|
8
|
+
type PaddleNavProps = UniversalPaddleNavProps & HtmlDivProps;
|
|
9
|
+
declare const PaddleNav: _$react.ForwardRefExoticComponent<UniversalPaddleNavProps & HtmlDivProps & _$react.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { PaddleNav, type PaddleNavProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { UniversalPaddleNavProps } from "../../../types/dist/index.js";
|
|
4
|
+
import * as _$react from "react";
|
|
5
|
+
import { HTMLAttributes } from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/PaddleNav/PaddleNav.d.ts
|
|
8
|
+
type HtmlDivProps = Omit<HTMLAttributes<HTMLDivElement>, 'color'>;
|
|
9
|
+
type PaddleNavProps = UniversalPaddleNavProps & HtmlDivProps;
|
|
10
|
+
declare const PaddleNav: _$react.ForwardRefExoticComponent<UniversalPaddleNavProps & HtmlDivProps & _$react.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { PaddleNav, type PaddleNavProps };
|