@yahoo/uds 3.125.1 → 3.127.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 +60 -0
- package/dist/automated-config/dist/generated/autoVariants.d.cts +14 -0
- package/dist/automated-config/dist/generated/autoVariants.d.ts +14 -0
- package/dist/automated-config/dist/generated/autoVariants.js +60 -0
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +5169 -495
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +526 -1
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +526 -1
- package/dist/automated-config/dist/generated/generatedConfigs.js +5167 -496
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +2558 -1490
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +4 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +4 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +2558 -1490
- package/dist/automated-config/dist/properties.cjs +12 -0
- package/dist/automated-config/dist/properties.d.cts +4 -0
- package/dist/automated-config/dist/properties.d.ts +4 -0
- package/dist/automated-config/dist/properties.js +12 -0
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
- package/dist/automated-config/dist/utils/index.cjs +103 -6
- package/dist/automated-config/dist/utils/index.js +103 -6
- package/dist/components/Banner/Banner.cjs +167 -0
- package/dist/components/Banner/Banner.d.cts +56 -0
- package/dist/components/Banner/Banner.d.ts +56 -0
- package/dist/components/Banner/Banner.js +165 -0
- package/dist/components/Banner/BannerContent.cjs +20 -0
- package/dist/components/Banner/BannerContent.d.cts +13 -0
- package/dist/components/Banner/BannerContent.d.ts +13 -0
- package/dist/components/Banner/BannerContent.js +18 -0
- package/dist/components/Banner/BannerDescription.cjs +47 -0
- package/dist/components/Banner/BannerDescription.d.cts +36 -0
- package/dist/components/Banner/BannerDescription.d.ts +36 -0
- package/dist/components/Banner/BannerDescription.js +45 -0
- package/dist/components/Banner/BannerTitle.cjs +42 -0
- package/dist/components/Banner/BannerTitle.d.cts +34 -0
- package/dist/components/Banner/BannerTitle.d.ts +34 -0
- package/dist/components/Banner/BannerTitle.js +40 -0
- package/dist/components/Banner/index.cjs +11 -0
- package/dist/components/Banner/index.d.cts +6 -0
- package/dist/components/Banner/index.d.ts +6 -0
- package/dist/components/Banner/index.js +7 -0
- package/dist/components/Banner/utils.cjs +56 -0
- package/dist/components/Banner/utils.d.cts +26 -0
- package/dist/components/Banner/utils.d.ts +26 -0
- package/dist/components/Banner/utils.js +52 -0
- package/dist/components/Divider/DividerCore.cjs +1 -1
- package/dist/components/Divider/DividerCore.js +1 -1
- package/dist/components/client/Avatar/AvatarIcon.cjs +2 -2
- package/dist/components/client/Avatar/AvatarIcon.js +2 -2
- package/dist/components/client/Avatar/AvatarText.cjs +1 -1
- package/dist/components/client/Avatar/AvatarText.js +1 -1
- package/dist/components/client/Badge.cjs +1 -1
- package/dist/components/client/Badge.js +1 -1
- package/dist/components/client/BottomSheet/BottomSheetHeader.cjs +1 -1
- package/dist/components/client/BottomSheet/BottomSheetHeader.js +1 -1
- package/dist/components/client/Button.cjs +1 -1
- package/dist/components/client/Button.js +1 -1
- package/dist/components/client/Checkbox.cjs +2 -2
- package/dist/components/client/Checkbox.js +2 -2
- package/dist/components/client/Chip/ChipBase.cjs +2 -2
- package/dist/components/client/Chip/ChipBase.js +2 -2
- package/dist/components/client/Chip/ChipDismissible.cjs +2 -2
- package/dist/components/client/Chip/ChipDismissible.js +2 -2
- package/dist/components/client/IconButton.cjs +1 -1
- package/dist/components/client/IconButton.js +1 -1
- package/dist/components/client/Input/Input.cjs +1 -1
- package/dist/components/client/Input/Input.js +1 -1
- package/dist/components/client/Input/InputHelpTextInternal.cjs +1 -1
- package/dist/components/client/Input/InputHelpTextInternal.js +1 -1
- package/dist/components/client/Menu/Menu.ItemBase.cjs +2 -2
- package/dist/components/client/Menu/Menu.ItemBase.js +2 -2
- package/dist/components/client/Menu/Menu.ItemCheckbox.cjs +1 -1
- 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/Menu.ItemCheckbox.js +1 -1
- package/dist/components/client/Popover/PopoverContent.cjs +3 -3
- package/dist/components/client/Popover/PopoverContent.js +3 -3
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
- package/dist/components/client/Switch.cjs +1 -1
- package/dist/components/client/Switch.js +1 -1
- package/dist/components/client/Tabs/Tab.cjs +80 -0
- package/dist/components/client/Tabs/Tab.d.cts +20 -0
- package/dist/components/client/Tabs/Tab.d.ts +21 -0
- package/dist/components/client/Tabs/Tab.js +78 -0
- package/dist/components/client/Tabs/TabList.cjs +132 -0
- package/dist/components/client/Tabs/TabList.d.cts +9 -0
- package/dist/components/client/Tabs/TabList.d.ts +10 -0
- package/dist/components/client/Tabs/TabList.js +130 -0
- package/dist/components/client/Tabs/TabPanel.cjs +22 -0
- package/dist/components/client/Tabs/TabPanel.d.cts +9 -0
- package/dist/components/client/Tabs/TabPanel.d.ts +10 -0
- package/dist/components/client/Tabs/TabPanel.js +20 -0
- package/dist/components/client/Tabs/Tabs.cjs +53 -0
- package/dist/components/client/Tabs/Tabs.d.cts +45 -0
- package/dist/components/client/Tabs/Tabs.d.ts +46 -0
- package/dist/components/client/Tabs/Tabs.js +51 -0
- package/dist/components/client/Tabs/index.cjs +12 -0
- package/dist/components/client/Tabs/index.d.cts +7 -0
- package/dist/components/client/Tabs/index.d.ts +8 -0
- package/dist/components/client/Tabs/index.js +8 -0
- package/dist/components/client/Tabs/tabsContext.cjs +18 -0
- package/dist/components/client/Tabs/tabsContext.d.cts +15 -0
- package/dist/components/client/Tabs/tabsContext.d.ts +16 -0
- package/dist/components/client/Tabs/tabsContext.js +15 -0
- package/dist/components/client/Toast/Toast.cjs +3 -3
- package/dist/components/client/Toast/Toast.js +3 -3
- package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +5 -5
- package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +5 -5
- package/dist/components/client/Tooltip/TooltipContent.cjs +2 -2
- package/dist/components/client/Tooltip/TooltipContent.js +2 -2
- package/dist/components/client/index.cjs +9 -1
- package/dist/components/client/index.d.cts +7 -1
- package/dist/components/client/index.d.ts +7 -1
- package/dist/components/client/index.js +6 -2
- package/dist/components/experimental/Spinner.cjs +1 -1
- package/dist/components/experimental/Spinner.js +1 -1
- package/dist/components/experimental/Table.cjs +1 -1
- package/dist/components/experimental/Table.js +1 -1
- package/dist/components/experimental/client/Accordion.cjs +4 -4
- package/dist/components/experimental/client/Accordion.js +4 -4
- package/dist/components/experimental/client/Modal.cjs +2 -2
- package/dist/components/experimental/client/Modal.js +2 -2
- package/dist/components/experimental/client/SegmentedControl.cjs +3 -3
- package/dist/components/experimental/client/SegmentedControl.js +3 -3
- package/dist/components/experimental/client/SwitchV2.cjs +1 -1
- package/dist/components/experimental/client/SwitchV2.js +1 -1
- package/dist/components/experimental/client/index.cjs +0 -5
- package/dist/components/experimental/client/index.d.cts +1 -2
- package/dist/components/experimental/client/index.d.ts +1 -2
- package/dist/components/experimental/client/index.js +1 -2
- package/dist/components/experimental/index.cjs +0 -9
- package/dist/components/experimental/index.d.cts +1 -2
- package/dist/components/experimental/index.d.ts +1 -2
- package/dist/components/experimental/index.js +1 -6
- package/dist/components/index.cjs +27 -3
- package/dist/components/index.d.cts +11 -1
- package/dist/components/index.d.ts +11 -1
- package/dist/components/index.js +20 -4
- package/dist/config/dist/index.cjs +1496 -339
- package/dist/config/dist/index.js +1496 -339
- package/dist/index.cjs +22 -3
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +13 -5
- package/dist/styles/styler.d.cts +107 -93
- package/dist/styles/styler.d.ts +107 -93
- package/dist/styles/variants.d.cts +74 -0
- package/dist/styles/variants.d.ts +74 -0
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.cjs +60 -0
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js +60 -0
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js.map +1 -1
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.cjs +5169 -495
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js +5167 -496
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js.map +1 -1
- package/dist/tailwind/dist/automated-config/dist/properties.cjs +12 -0
- package/dist/tailwind/dist/automated-config/dist/properties.js +12 -0
- package/dist/tailwind/dist/automated-config/dist/properties.js.map +1 -1
- package/dist/tailwind/dist/automated-config/dist/utils/index.cjs +103 -6
- package/dist/tailwind/dist/automated-config/dist/utils/index.js +103 -6
- package/dist/tailwind/dist/automated-config/dist/utils/index.js.map +1 -1
- package/dist/tailwind/dist/config/dist/index.cjs +1496 -339
- package/dist/tailwind/dist/config/dist/index.js +1496 -339
- package/dist/tailwind/dist/config/dist/index.js.map +1 -1
- package/dist/tailwind/dist/css/utils.cjs +3 -1
- package/dist/tailwind/dist/css/utils.js +3 -1
- package/dist/tailwind/dist/css/utils.js.map +1 -1
- package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.cjs +36 -2
- package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js +36 -2
- package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js.map +1 -1
- package/dist/tailwind/dist/tailwind/plugins/components.cjs +3 -0
- package/dist/tailwind/dist/tailwind/plugins/components.js +4 -1
- package/dist/tailwind/dist/tailwind/plugins/components.js.map +1 -1
- package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.cts +4 -4
- package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.ts +4 -4
- 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/automation/configs/index.cjs +3 -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 -0
- package/dist/tokens/automation/index.d.cts +2 -2
- package/dist/tokens/automation/index.d.ts +2 -2
- package/dist/tokens/automation/index.js +2 -2
- package/dist/tokens/index.cjs +3 -0
- package/dist/tokens/index.d.cts +3 -3
- package/dist/tokens/index.d.ts +3 -3
- package/dist/tokens/index.js +2 -2
- package/dist/tokens/types.d.cts +2 -2
- package/dist/tokens/types.d.ts +2 -2
- package/dist/types/dist/index.d.cts +70 -1
- package/dist/types/dist/index.d.ts +70 -1
- package/dist/uds/generated/componentData.cjs +1030 -774
- package/dist/uds/generated/componentData.js +893 -679
- package/dist/uds/generated/tailwindPurge.cjs +41 -43
- package/dist/uds/generated/tailwindPurge.js +41 -43
- package/generated/componentData.json +1693 -1432
- package/generated/tailwindPurge.ts +4 -4
- package/package.json +1 -1
- package/dist/components/experimental/client/Tabs.cjs +0 -76
- package/dist/components/experimental/client/Tabs.d.cts +0 -31
- package/dist/components/experimental/client/Tabs.d.ts +0 -32
- package/dist/components/experimental/client/Tabs.js +0 -71
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
|
+
import { useTabsContext } from "./tabsContext.js";
|
|
5
|
+
import { forwardRef, useCallback, useLayoutEffect, useRef } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { TabList as TabList$1, useStoreState, useTabContext } from "@ariakit/react";
|
|
8
|
+
import { useReducedMotion } from "motion/react";
|
|
9
|
+
|
|
10
|
+
//#region src/components/client/Tabs/TabList.tsx
|
|
11
|
+
/** Matches {@link Tab} per-tab underline (token CSS variables on the indicator root). */
|
|
12
|
+
const tabRootUnderlineClassName = cx("pointer-events-none absolute bottom-0 left-0 right-0", "h-[var(--uds-tab-underline-width,0px)] bg-[var(--uds-tab-underline-color,transparent)]", "transition-[height,background-color] duration-[240ms] ease-[cubic-bezier(0.2,0,0,1)]");
|
|
13
|
+
const SELECTION_TRANSITION = "left 240ms cubic-bezier(0.2, 0, 0, 1), top 240ms cubic-bezier(0.2, 0, 0, 1), width 240ms cubic-bezier(0.2, 0, 0, 1), height 240ms cubic-bezier(0.2, 0, 0, 1)";
|
|
14
|
+
/** Token vars set on {@link Tab} roots; the sliding indicator is a sibling, so it must mirror the selected tab's computed values (incl. :hover / :active). */
|
|
15
|
+
const TAB_UNDERLINE_COLOR_VAR = "--uds-tab-underline-color";
|
|
16
|
+
const TAB_UNDERLINE_WIDTH_VAR = "--uds-tab-underline-width";
|
|
17
|
+
const TabList = forwardRef(function TabList({ children, scrollable, className, ...props }, ref) {
|
|
18
|
+
const { variant, disableMotion } = useTabsContext();
|
|
19
|
+
const selectedId = useStoreState(useTabContext(), "selectedId");
|
|
20
|
+
const listRef = useRef(null);
|
|
21
|
+
const indicatorRef = useRef(null);
|
|
22
|
+
const skipNextTransitionRef = useRef(true);
|
|
23
|
+
const reducedMotion = useReducedMotion();
|
|
24
|
+
const applyIndicator = useCallback(() => {
|
|
25
|
+
const listEl = listRef.current;
|
|
26
|
+
const indicatorEl = indicatorRef.current;
|
|
27
|
+
if (!listEl || !indicatorEl || disableMotion) return;
|
|
28
|
+
const selected = listEl.querySelector("[role=\"tab\"][aria-selected=\"true\"]:not([aria-disabled=\"true\"])");
|
|
29
|
+
if (!selected) {
|
|
30
|
+
indicatorEl.style.opacity = "0";
|
|
31
|
+
indicatorEl.style.transition = "none";
|
|
32
|
+
indicatorEl.style.removeProperty(TAB_UNDERLINE_COLOR_VAR);
|
|
33
|
+
indicatorEl.style.removeProperty(TAB_UNDERLINE_WIDTH_VAR);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const listRect = listEl.getBoundingClientRect();
|
|
37
|
+
const tabRect = selected.getBoundingClientRect();
|
|
38
|
+
const skipTransition = skipNextTransitionRef.current || reducedMotion;
|
|
39
|
+
skipNextTransitionRef.current = false;
|
|
40
|
+
indicatorEl.style.left = `${tabRect.left - listRect.left + listEl.scrollLeft}px`;
|
|
41
|
+
indicatorEl.style.top = `${tabRect.top - listRect.top + listEl.scrollTop}px`;
|
|
42
|
+
indicatorEl.style.width = `${tabRect.width}px`;
|
|
43
|
+
indicatorEl.style.height = `${tabRect.height}px`;
|
|
44
|
+
indicatorEl.style.opacity = "1";
|
|
45
|
+
indicatorEl.style.transition = skipTransition ? "none" : SELECTION_TRANSITION;
|
|
46
|
+
const cs = getComputedStyle(selected);
|
|
47
|
+
const underlineColor = cs.getPropertyValue(TAB_UNDERLINE_COLOR_VAR).trim();
|
|
48
|
+
const underlineWidth = cs.getPropertyValue(TAB_UNDERLINE_WIDTH_VAR).trim();
|
|
49
|
+
if (underlineColor) indicatorEl.style.setProperty(TAB_UNDERLINE_COLOR_VAR, underlineColor);
|
|
50
|
+
else indicatorEl.style.removeProperty(TAB_UNDERLINE_COLOR_VAR);
|
|
51
|
+
if (underlineWidth) indicatorEl.style.setProperty(TAB_UNDERLINE_WIDTH_VAR, underlineWidth);
|
|
52
|
+
else indicatorEl.style.removeProperty(TAB_UNDERLINE_WIDTH_VAR);
|
|
53
|
+
}, [disableMotion, reducedMotion]);
|
|
54
|
+
useLayoutEffect(() => {
|
|
55
|
+
applyIndicator();
|
|
56
|
+
}, [selectedId, applyIndicator]);
|
|
57
|
+
useLayoutEffect(() => {
|
|
58
|
+
if (disableMotion) return;
|
|
59
|
+
const listEl = listRef.current;
|
|
60
|
+
if (!listEl) return;
|
|
61
|
+
const ro = new ResizeObserver(() => applyIndicator());
|
|
62
|
+
ro.observe(listEl);
|
|
63
|
+
const onScroll = () => applyIndicator();
|
|
64
|
+
listEl.addEventListener("scroll", onScroll, { passive: true });
|
|
65
|
+
window.addEventListener("resize", applyIndicator);
|
|
66
|
+
return () => {
|
|
67
|
+
ro.disconnect();
|
|
68
|
+
listEl.removeEventListener("scroll", onScroll);
|
|
69
|
+
window.removeEventListener("resize", applyIndicator);
|
|
70
|
+
};
|
|
71
|
+
}, [disableMotion, applyIndicator]);
|
|
72
|
+
/** Re-sync underline tokens when the selected tab's hover/pressed state changes (indicator does not receive those pseudos). */
|
|
73
|
+
useLayoutEffect(() => {
|
|
74
|
+
if (disableMotion) return;
|
|
75
|
+
const listEl = listRef.current;
|
|
76
|
+
if (!listEl) return;
|
|
77
|
+
const selected = listEl.querySelector("[role=\"tab\"][aria-selected=\"true\"]:not([aria-disabled=\"true\"])");
|
|
78
|
+
if (!selected) return;
|
|
79
|
+
const bump = () => applyIndicator();
|
|
80
|
+
const events = [
|
|
81
|
+
"mouseenter",
|
|
82
|
+
"mouseleave",
|
|
83
|
+
"mousedown",
|
|
84
|
+
"mouseup",
|
|
85
|
+
"pointerdown",
|
|
86
|
+
"pointerup"
|
|
87
|
+
];
|
|
88
|
+
events.forEach((e) => selected.addEventListener(e, bump));
|
|
89
|
+
return () => events.forEach((e) => selected.removeEventListener(e, bump));
|
|
90
|
+
}, [
|
|
91
|
+
selectedId,
|
|
92
|
+
disableMotion,
|
|
93
|
+
applyIndicator
|
|
94
|
+
]);
|
|
95
|
+
const setListRef = (el) => {
|
|
96
|
+
listRef.current = el;
|
|
97
|
+
if (typeof ref === "function") ref(el);
|
|
98
|
+
else if (ref) ref.current = el;
|
|
99
|
+
};
|
|
100
|
+
const tablistConfigClass = getStyles({ tabsVariantRoot: variant });
|
|
101
|
+
const indicatorClass = cx(getStyles({
|
|
102
|
+
tabSizeRoot: "default",
|
|
103
|
+
tabVariantRoot: variant,
|
|
104
|
+
tabVariantActiveRoot: "on"
|
|
105
|
+
}), "!m-0 !p-0 !gap-0 box-border pointer-events-none", "absolute z-0 min-w-0 min-h-0");
|
|
106
|
+
const styles = cx(tablistConfigClass, "flex flex-row items-center", scrollable ? "overflow-x-auto overflow-y-clip scrollbar-none [overflow-clip-margin:6px]" : "overflow-clip [overflow-clip-margin:8px]", !disableMotion && "relative", className);
|
|
107
|
+
const indicatorBoxStyle = !disableMotion ? {
|
|
108
|
+
opacity: 0,
|
|
109
|
+
transition: "none"
|
|
110
|
+
} : {};
|
|
111
|
+
return /* @__PURE__ */ jsxs(TabList$1, {
|
|
112
|
+
ref: setListRef,
|
|
113
|
+
className: styles,
|
|
114
|
+
...props,
|
|
115
|
+
children: [!disableMotion ? /* @__PURE__ */ jsx("span", {
|
|
116
|
+
ref: indicatorRef,
|
|
117
|
+
className: indicatorClass,
|
|
118
|
+
style: indicatorBoxStyle,
|
|
119
|
+
"aria-hidden": true,
|
|
120
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
121
|
+
"aria-hidden": true,
|
|
122
|
+
className: tabRootUnderlineClassName
|
|
123
|
+
})
|
|
124
|
+
}) : null, children]
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
TabList.displayName = "TabList";
|
|
128
|
+
|
|
129
|
+
//#endregion
|
|
130
|
+
export { TabList };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let _ariakit_react = require("@ariakit/react");
|
|
8
|
+
|
|
9
|
+
//#region src/components/client/Tabs/TabPanel.tsx
|
|
10
|
+
const TabPanel = (0, react.forwardRef)(function TabPanel({ tabId, children, className, ...props }, ref) {
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.TabPanel, {
|
|
12
|
+
ref,
|
|
13
|
+
tabId,
|
|
14
|
+
className,
|
|
15
|
+
...props,
|
|
16
|
+
children
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
TabPanel.displayName = "TabPanel";
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.TabPanel = TabPanel;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalTabPanelProps } from "../../../types/dist/index.cjs";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Tabs/TabPanel.d.ts
|
|
6
|
+
type TabPanelProps = UniversalTabPanelProps;
|
|
7
|
+
declare const TabPanel: react.ForwardRefExoticComponent<UniversalTabPanelProps & react.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { TabPanel, type TabPanelProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { UniversalTabPanelProps } from "../../../types/dist/index.js";
|
|
4
|
+
import * as react from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/client/Tabs/TabPanel.d.ts
|
|
7
|
+
type TabPanelProps = UniversalTabPanelProps;
|
|
8
|
+
declare const TabPanel: react.ForwardRefExoticComponent<UniversalTabPanelProps & react.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { TabPanel, type TabPanelProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { TabPanel as TabPanel$1 } from "@ariakit/react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/Tabs/TabPanel.tsx
|
|
8
|
+
const TabPanel = forwardRef(function TabPanel({ tabId, children, className, ...props }, ref) {
|
|
9
|
+
return /* @__PURE__ */ jsx(TabPanel$1, {
|
|
10
|
+
ref,
|
|
11
|
+
tabId,
|
|
12
|
+
className,
|
|
13
|
+
...props,
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
TabPanel.displayName = "TabPanel";
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { TabPanel };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
5
|
+
const require_components_client_Tabs_tabsContext = require('./tabsContext.cjs');
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let _ariakit_react = require("@ariakit/react");
|
|
8
|
+
|
|
9
|
+
//#region src/components/client/Tabs/Tabs.tsx
|
|
10
|
+
/**
|
|
11
|
+
* **⚙️️ A composable Tabs component
|
|
12
|
+
*
|
|
13
|
+
* @componentType Client component
|
|
14
|
+
*
|
|
15
|
+
* @description
|
|
16
|
+
* Tabs organize content into multiple sections and allow users to navigate between them.
|
|
17
|
+
* Supports two visual variants: `primary` and `secondary`. By default, the active selection
|
|
18
|
+
* indicator (underline or pill) animates between tabs with the same timing as the design reference
|
|
19
|
+
* (`240ms` and `cubic-bezier(0.2, 0, 0, 1)`). Set `disableMotion={true}` to disable that motion.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* 'use client';
|
|
24
|
+
* import { Tabs, TabList, Tab, TabPanel } from "@yahoo/uds";
|
|
25
|
+
*
|
|
26
|
+
* <Tabs variant="primary" defaultSelectedId="tab-home">
|
|
27
|
+
* <TabList aria-label="Navigation">
|
|
28
|
+
* <Tab value="tab-home">Home</Tab>
|
|
29
|
+
* <Tab value="tab-about">About</Tab>
|
|
30
|
+
* </TabList>
|
|
31
|
+
* <TabPanel tabId="tab-home">Home content</TabPanel>
|
|
32
|
+
* <TabPanel tabId="tab-about">About content</TabPanel>
|
|
33
|
+
* </Tabs>
|
|
34
|
+
* ```
|
|
35
|
+
**/
|
|
36
|
+
function Tabs({ children, variant = "primary", disableMotion = false, defaultSelectedId, selectedId, onSelectionChange }) {
|
|
37
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Tabs_tabsContext.TabsContext.Provider, {
|
|
38
|
+
value: {
|
|
39
|
+
variant,
|
|
40
|
+
disableMotion
|
|
41
|
+
},
|
|
42
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.TabProvider, {
|
|
43
|
+
defaultSelectedId,
|
|
44
|
+
selectedId,
|
|
45
|
+
setSelectedId: onSelectionChange,
|
|
46
|
+
children
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
Tabs.displayName = "Tabs";
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
exports.Tabs = Tabs;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalTabsProps } from "../../../types/dist/index.cjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Tabs/Tabs.d.ts
|
|
6
|
+
type TabsProps = UniversalTabsProps;
|
|
7
|
+
/**
|
|
8
|
+
* **⚙️️ A composable Tabs component
|
|
9
|
+
*
|
|
10
|
+
* @componentType Client component
|
|
11
|
+
*
|
|
12
|
+
* @description
|
|
13
|
+
* Tabs organize content into multiple sections and allow users to navigate between them.
|
|
14
|
+
* Supports two visual variants: `primary` and `secondary`. By default, the active selection
|
|
15
|
+
* indicator (underline or pill) animates between tabs with the same timing as the design reference
|
|
16
|
+
* (`240ms` and `cubic-bezier(0.2, 0, 0, 1)`). Set `disableMotion={true}` to disable that motion.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* 'use client';
|
|
21
|
+
* import { Tabs, TabList, Tab, TabPanel } from "@yahoo/uds";
|
|
22
|
+
*
|
|
23
|
+
* <Tabs variant="primary" defaultSelectedId="tab-home">
|
|
24
|
+
* <TabList aria-label="Navigation">
|
|
25
|
+
* <Tab value="tab-home">Home</Tab>
|
|
26
|
+
* <Tab value="tab-about">About</Tab>
|
|
27
|
+
* </TabList>
|
|
28
|
+
* <TabPanel tabId="tab-home">Home content</TabPanel>
|
|
29
|
+
* <TabPanel tabId="tab-about">About content</TabPanel>
|
|
30
|
+
* </Tabs>
|
|
31
|
+
* ```
|
|
32
|
+
**/
|
|
33
|
+
declare function Tabs({
|
|
34
|
+
children,
|
|
35
|
+
variant,
|
|
36
|
+
disableMotion,
|
|
37
|
+
defaultSelectedId,
|
|
38
|
+
selectedId,
|
|
39
|
+
onSelectionChange
|
|
40
|
+
}: TabsProps): react_jsx_runtime0.JSX.Element;
|
|
41
|
+
declare namespace Tabs {
|
|
42
|
+
var displayName: string;
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Tabs, type TabsProps };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { UniversalTabsProps } from "../../../types/dist/index.js";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/client/Tabs/Tabs.d.ts
|
|
7
|
+
type TabsProps = UniversalTabsProps;
|
|
8
|
+
/**
|
|
9
|
+
* **⚙️️ A composable Tabs component
|
|
10
|
+
*
|
|
11
|
+
* @componentType Client component
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* Tabs organize content into multiple sections and allow users to navigate between them.
|
|
15
|
+
* Supports two visual variants: `primary` and `secondary`. By default, the active selection
|
|
16
|
+
* indicator (underline or pill) animates between tabs with the same timing as the design reference
|
|
17
|
+
* (`240ms` and `cubic-bezier(0.2, 0, 0, 1)`). Set `disableMotion={true}` to disable that motion.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* 'use client';
|
|
22
|
+
* import { Tabs, TabList, Tab, TabPanel } from "@yahoo/uds";
|
|
23
|
+
*
|
|
24
|
+
* <Tabs variant="primary" defaultSelectedId="tab-home">
|
|
25
|
+
* <TabList aria-label="Navigation">
|
|
26
|
+
* <Tab value="tab-home">Home</Tab>
|
|
27
|
+
* <Tab value="tab-about">About</Tab>
|
|
28
|
+
* </TabList>
|
|
29
|
+
* <TabPanel tabId="tab-home">Home content</TabPanel>
|
|
30
|
+
* <TabPanel tabId="tab-about">About content</TabPanel>
|
|
31
|
+
* </Tabs>
|
|
32
|
+
* ```
|
|
33
|
+
**/
|
|
34
|
+
declare function Tabs({
|
|
35
|
+
children,
|
|
36
|
+
variant,
|
|
37
|
+
disableMotion,
|
|
38
|
+
defaultSelectedId,
|
|
39
|
+
selectedId,
|
|
40
|
+
onSelectionChange
|
|
41
|
+
}: TabsProps): react_jsx_runtime0.JSX.Element;
|
|
42
|
+
declare namespace Tabs {
|
|
43
|
+
var displayName: string;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { Tabs, type TabsProps };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { TabsContext } from "./tabsContext.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { TabProvider } from "@ariakit/react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/Tabs/Tabs.tsx
|
|
8
|
+
/**
|
|
9
|
+
* **⚙️️ A composable Tabs component
|
|
10
|
+
*
|
|
11
|
+
* @componentType Client component
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* Tabs organize content into multiple sections and allow users to navigate between them.
|
|
15
|
+
* Supports two visual variants: `primary` and `secondary`. By default, the active selection
|
|
16
|
+
* indicator (underline or pill) animates between tabs with the same timing as the design reference
|
|
17
|
+
* (`240ms` and `cubic-bezier(0.2, 0, 0, 1)`). Set `disableMotion={true}` to disable that motion.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* 'use client';
|
|
22
|
+
* import { Tabs, TabList, Tab, TabPanel } from "@yahoo/uds";
|
|
23
|
+
*
|
|
24
|
+
* <Tabs variant="primary" defaultSelectedId="tab-home">
|
|
25
|
+
* <TabList aria-label="Navigation">
|
|
26
|
+
* <Tab value="tab-home">Home</Tab>
|
|
27
|
+
* <Tab value="tab-about">About</Tab>
|
|
28
|
+
* </TabList>
|
|
29
|
+
* <TabPanel tabId="tab-home">Home content</TabPanel>
|
|
30
|
+
* <TabPanel tabId="tab-about">About content</TabPanel>
|
|
31
|
+
* </Tabs>
|
|
32
|
+
* ```
|
|
33
|
+
**/
|
|
34
|
+
function Tabs({ children, variant = "primary", disableMotion = false, defaultSelectedId, selectedId, onSelectionChange }) {
|
|
35
|
+
return /* @__PURE__ */ jsx(TabsContext.Provider, {
|
|
36
|
+
value: {
|
|
37
|
+
variant,
|
|
38
|
+
disableMotion
|
|
39
|
+
},
|
|
40
|
+
children: /* @__PURE__ */ jsx(TabProvider, {
|
|
41
|
+
defaultSelectedId,
|
|
42
|
+
selectedId,
|
|
43
|
+
setSelectedId: onSelectionChange,
|
|
44
|
+
children
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
Tabs.displayName = "Tabs";
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
export { Tabs };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
const require_components_client_Tabs_Tab = require('./Tab.cjs');
|
|
5
|
+
const require_components_client_Tabs_TabList = require('./TabList.cjs');
|
|
6
|
+
const require_components_client_Tabs_TabPanel = require('./TabPanel.cjs');
|
|
7
|
+
const require_components_client_Tabs_Tabs = require('./Tabs.cjs');
|
|
8
|
+
|
|
9
|
+
exports.Tab = require_components_client_Tabs_Tab.Tab;
|
|
10
|
+
exports.TabList = require_components_client_Tabs_TabList.TabList;
|
|
11
|
+
exports.TabPanel = require_components_client_Tabs_TabPanel.TabPanel;
|
|
12
|
+
exports.Tabs = require_components_client_Tabs_Tabs.Tabs;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
import { Tab, TabProps } from "./Tab.cjs";
|
|
3
|
+
import { TabList, TabListProps } from "./TabList.cjs";
|
|
4
|
+
import { TabPanel, TabPanelProps } from "./TabPanel.cjs";
|
|
5
|
+
import { Tabs, TabsProps } from "./Tabs.cjs";
|
|
6
|
+
import { TabsVariant } from "./tabsContext.cjs";
|
|
7
|
+
export { Tab, TabList, TabListProps, TabPanel, TabPanelProps, TabProps, Tabs, TabsProps, type TabsVariant };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { Tab, TabProps } from "./Tab.js";
|
|
4
|
+
import { TabList, TabListProps } from "./TabList.js";
|
|
5
|
+
import { TabPanel, TabPanelProps } from "./TabPanel.js";
|
|
6
|
+
import { Tabs, TabsProps } from "./Tabs.js";
|
|
7
|
+
import { TabsVariant } from "./tabsContext.js";
|
|
8
|
+
export { Tab, TabList, TabListProps, TabPanel, TabPanelProps, TabProps, Tabs, TabsProps, type TabsVariant };
|
|
@@ -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
|
+
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/Tabs/tabsContext.tsx
|
|
8
|
+
const TabsContext = (0, react.createContext)({
|
|
9
|
+
variant: "primary",
|
|
10
|
+
disableMotion: false
|
|
11
|
+
});
|
|
12
|
+
function useTabsContext() {
|
|
13
|
+
return (0, react.useContext)(TabsContext);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.TabsContext = TabsContext;
|
|
18
|
+
exports.useTabsContext = useTabsContext;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalTabsVariant } from "../../../types/dist/index.cjs";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Tabs/tabsContext.d.ts
|
|
6
|
+
type TabsVariant = UniversalTabsVariant;
|
|
7
|
+
interface TabsContextValue {
|
|
8
|
+
variant: TabsVariant;
|
|
9
|
+
/** When true, selection indicator sliding motion is off; TabList/Tab still show correct selection. */
|
|
10
|
+
disableMotion: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const TabsContext: react.Context<TabsContextValue>;
|
|
13
|
+
declare function useTabsContext(): TabsContextValue;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { TabsContext, type TabsVariant, useTabsContext };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { UniversalTabsVariant } from "../../../types/dist/index.js";
|
|
4
|
+
import * as react from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/client/Tabs/tabsContext.d.ts
|
|
7
|
+
type TabsVariant = UniversalTabsVariant;
|
|
8
|
+
interface TabsContextValue {
|
|
9
|
+
variant: TabsVariant;
|
|
10
|
+
/** When true, selection indicator sliding motion is off; TabList/Tab still show correct selection. */
|
|
11
|
+
disableMotion: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const TabsContext: react.Context<TabsContextValue>;
|
|
14
|
+
declare function useTabsContext(): TabsContextValue;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { TabsContext, type TabsVariant, useTabsContext };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Tabs/tabsContext.tsx
|
|
6
|
+
const TabsContext = createContext({
|
|
7
|
+
variant: "primary",
|
|
8
|
+
disableMotion: false
|
|
9
|
+
});
|
|
10
|
+
function useTabsContext() {
|
|
11
|
+
return useContext(TabsContext);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { TabsContext, useTabsContext };
|
|
@@ -3,14 +3,14 @@
|
|
|
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
|
|
6
|
+
const require_components_client_Pressable = require('../Pressable.cjs');
|
|
7
7
|
const require_components_IconSlot = require('../../IconSlot.cjs');
|
|
8
|
+
const require_components_Text = require('../../Text.cjs');
|
|
8
9
|
const require_components_client_Button = require('../Button.cjs');
|
|
9
|
-
const require_components_client_Pressable = require('../Pressable.cjs');
|
|
10
10
|
const require_components_client_Toast_UDSToastConfigProvider = require('./UDSToastConfigProvider.cjs');
|
|
11
11
|
const require_components_client_Toast_ToastContainer = require('./ToastContainer.cjs');
|
|
12
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
12
|
let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
13
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
14
|
let motion_react = require("motion/react");
|
|
15
15
|
|
|
16
16
|
//#region src/components/client/Toast/Toast.tsx
|
|
@@ -1,14 +1,14 @@
|
|
|
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 {
|
|
4
|
+
import { Pressable } from "../Pressable.js";
|
|
5
5
|
import { IconSlot } from "../../IconSlot.js";
|
|
6
|
+
import { Text } from "../../Text.js";
|
|
6
7
|
import { Button } from "../Button.js";
|
|
7
|
-
import { Pressable } from "../Pressable.js";
|
|
8
8
|
import { useToastConfig } from "./UDSToastConfigProvider.js";
|
|
9
9
|
import { ToastContainer } from "./ToastContainer.js";
|
|
10
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { CheckCircle, Cross, Error, Info, Progress, Warning } from "@yahoo/uds-icons";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { useReducedMotion } from "motion/react";
|
|
13
13
|
|
|
14
14
|
//#region src/components/client/Toast/Toast.tsx
|