@yahoo/uds-mobile 2.5.0 → 2.6.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.
Files changed (51) hide show
  1. package/dist/bin/uds-mobile.mjs +10 -2
  2. package/dist/components/Banner/Banner.cjs +179 -0
  3. package/dist/components/Banner/Banner.d.cts +59 -0
  4. package/dist/components/Banner/Banner.d.cts.map +1 -0
  5. package/dist/components/Banner/Banner.d.ts +59 -0
  6. package/dist/components/Banner/Banner.d.ts.map +1 -0
  7. package/dist/components/Banner/Banner.js +178 -0
  8. package/dist/components/Banner/Banner.js.map +1 -0
  9. package/dist/components/Banner/BannerContent.cjs +26 -0
  10. package/dist/components/Banner/BannerContent.d.cts +16 -0
  11. package/dist/components/Banner/BannerContent.d.cts.map +1 -0
  12. package/dist/components/Banner/BannerContent.d.ts +16 -0
  13. package/dist/components/Banner/BannerContent.d.ts.map +1 -0
  14. package/dist/components/Banner/BannerContent.js +25 -0
  15. package/dist/components/Banner/BannerContent.js.map +1 -0
  16. package/dist/components/Banner/BannerDescription.cjs +46 -0
  17. package/dist/components/Banner/BannerDescription.d.cts +37 -0
  18. package/dist/components/Banner/BannerDescription.d.cts.map +1 -0
  19. package/dist/components/Banner/BannerDescription.d.ts +37 -0
  20. package/dist/components/Banner/BannerDescription.d.ts.map +1 -0
  21. package/dist/components/Banner/BannerDescription.js +45 -0
  22. package/dist/components/Banner/BannerDescription.js.map +1 -0
  23. package/dist/components/Banner/BannerTitle.cjs +44 -0
  24. package/dist/components/Banner/BannerTitle.d.cts +35 -0
  25. package/dist/components/Banner/BannerTitle.d.cts.map +1 -0
  26. package/dist/components/Banner/BannerTitle.d.ts +35 -0
  27. package/dist/components/Banner/BannerTitle.d.ts.map +1 -0
  28. package/dist/components/Banner/BannerTitle.js +43 -0
  29. package/dist/components/Banner/BannerTitle.js.map +1 -0
  30. package/dist/components/Banner/index.cjs +11 -0
  31. package/dist/components/Banner/index.d.cts +6 -0
  32. package/dist/components/Banner/index.d.ts +6 -0
  33. package/dist/components/Banner/index.js +7 -0
  34. package/dist/components/Banner/utils.cjs +56 -0
  35. package/dist/components/Banner/utils.d.cts +27 -0
  36. package/dist/components/Banner/utils.d.cts.map +1 -0
  37. package/dist/components/Banner/utils.d.ts +27 -0
  38. package/dist/components/Banner/utils.d.ts.map +1 -0
  39. package/dist/components/Banner/utils.js +53 -0
  40. package/dist/components/Banner/utils.js.map +1 -0
  41. package/dist/types/dist/index.d.cts +19 -1
  42. package/dist/types/dist/index.d.cts.map +1 -1
  43. package/dist/types/dist/index.d.ts +19 -1
  44. package/dist/types/dist/index.d.ts.map +1 -1
  45. package/fonts/index.cjs +213 -213
  46. package/fonts/index.mjs +213 -213
  47. package/generated/styles.cjs +72 -0
  48. package/generated/styles.d.ts +71 -4
  49. package/generated/styles.mjs +72 -0
  50. package/generated/unistyles.d.ts +124 -0
  51. package/package.json +11 -1
@@ -0,0 +1,46 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
4
+ const require_components_Text = require('../Text.cjs');
5
+ let react = require("react");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ let generated_styles = require("../../../generated/styles");
8
+
9
+ //#region src/components/Banner/BannerDescription.tsx
10
+ /**
11
+ * **Styled description for use inside `BannerContent`.**
12
+ *
13
+ * @description
14
+ * Applies the Banner description typography tokens and truncates to 3 lines
15
+ * via `numberOfLines={3}`. Use this subcomponent instead of the `description`
16
+ * prop when you need rich ReactNode content.
17
+ *
18
+ * @platform mobile
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <Banner variant="alert" startIcon="Error">
23
+ * <BannerContent>
24
+ * <BannerTitle>Something went wrong</BannerTitle>
25
+ * <BannerDescription>
26
+ * Please try again or contact support for help.
27
+ * </BannerDescription>
28
+ * </BannerContent>
29
+ * </Banner>
30
+ * ```
31
+ *
32
+ * @see {@link Banner} for the parent component
33
+ * @see {@link BannerContent} for the required wrapper
34
+ */
35
+ const BannerDescription = (0, react.memo)(function BannerDescription({ children }) {
36
+ generated_styles.bannerStyles.useVariants({});
37
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
38
+ numberOfLines: 3,
39
+ style: generated_styles.bannerStyles.description,
40
+ children
41
+ });
42
+ });
43
+ BannerDescription.displayName = "BannerDescription";
44
+
45
+ //#endregion
46
+ exports.BannerDescription = BannerDescription;
@@ -0,0 +1,37 @@
1
+
2
+ import * as react from "react";
3
+ import { ReactNode } from "react";
4
+
5
+ //#region src/components/Banner/BannerDescription.d.ts
6
+ interface BannerDescriptionProps {
7
+ children: ReactNode;
8
+ }
9
+ /**
10
+ * **Styled description for use inside `BannerContent`.**
11
+ *
12
+ * @description
13
+ * Applies the Banner description typography tokens and truncates to 3 lines
14
+ * via `numberOfLines={3}`. Use this subcomponent instead of the `description`
15
+ * prop when you need rich ReactNode content.
16
+ *
17
+ * @platform mobile
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <Banner variant="alert" startIcon="Error">
22
+ * <BannerContent>
23
+ * <BannerTitle>Something went wrong</BannerTitle>
24
+ * <BannerDescription>
25
+ * Please try again or contact support for help.
26
+ * </BannerDescription>
27
+ * </BannerContent>
28
+ * </Banner>
29
+ * ```
30
+ *
31
+ * @see {@link Banner} for the parent component
32
+ * @see {@link BannerContent} for the required wrapper
33
+ */
34
+ declare const BannerDescription: react.NamedExoticComponent<BannerDescriptionProps>;
35
+ //#endregion
36
+ export { BannerDescription, type BannerDescriptionProps };
37
+ //# sourceMappingURL=BannerDescription.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerDescription.d.cts","names":[],"sources":["../../../src/components/Banner/BannerDescription.tsx"],"mappings":";;;;;UAMU,sBAAA;EACR,QAAA,EAAU,SAAA;AAAA;AAP2B;;;;;AAOlB;;;;;;;;;;;;;;;;;;;;AAPkB,cAmCjC,iBAAA,EAAiB,KAAA,CAAA,oBAAA,CAAA,sBAAA"}
@@ -0,0 +1,37 @@
1
+
2
+ import * as react from "react";
3
+ import { ReactNode } from "react";
4
+
5
+ //#region src/components/Banner/BannerDescription.d.ts
6
+ interface BannerDescriptionProps {
7
+ children: ReactNode;
8
+ }
9
+ /**
10
+ * **Styled description for use inside `BannerContent`.**
11
+ *
12
+ * @description
13
+ * Applies the Banner description typography tokens and truncates to 3 lines
14
+ * via `numberOfLines={3}`. Use this subcomponent instead of the `description`
15
+ * prop when you need rich ReactNode content.
16
+ *
17
+ * @platform mobile
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <Banner variant="alert" startIcon="Error">
22
+ * <BannerContent>
23
+ * <BannerTitle>Something went wrong</BannerTitle>
24
+ * <BannerDescription>
25
+ * Please try again or contact support for help.
26
+ * </BannerDescription>
27
+ * </BannerContent>
28
+ * </Banner>
29
+ * ```
30
+ *
31
+ * @see {@link Banner} for the parent component
32
+ * @see {@link BannerContent} for the required wrapper
33
+ */
34
+ declare const BannerDescription: react.NamedExoticComponent<BannerDescriptionProps>;
35
+ //#endregion
36
+ export { BannerDescription, type BannerDescriptionProps };
37
+ //# sourceMappingURL=BannerDescription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerDescription.d.ts","names":[],"sources":["../../../src/components/Banner/BannerDescription.tsx"],"mappings":";;;;;UAMU,sBAAA;EACR,QAAA,EAAU,SAAA;AAAA;AAP2B;;;;;AAOlB;;;;;;;;;;;;;;;;;;;;AAPkB,cAmCjC,iBAAA,EAAiB,KAAA,CAAA,oBAAA,CAAA,sBAAA"}
@@ -0,0 +1,45 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ import { Text } from "../Text.js";
3
+ import { memo } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { bannerStyles } from "../../../generated/styles";
6
+
7
+ //#region src/components/Banner/BannerDescription.tsx
8
+ /**
9
+ * **Styled description for use inside `BannerContent`.**
10
+ *
11
+ * @description
12
+ * Applies the Banner description typography tokens and truncates to 3 lines
13
+ * via `numberOfLines={3}`. Use this subcomponent instead of the `description`
14
+ * prop when you need rich ReactNode content.
15
+ *
16
+ * @platform mobile
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Banner variant="alert" startIcon="Error">
21
+ * <BannerContent>
22
+ * <BannerTitle>Something went wrong</BannerTitle>
23
+ * <BannerDescription>
24
+ * Please try again or contact support for help.
25
+ * </BannerDescription>
26
+ * </BannerContent>
27
+ * </Banner>
28
+ * ```
29
+ *
30
+ * @see {@link Banner} for the parent component
31
+ * @see {@link BannerContent} for the required wrapper
32
+ */
33
+ const BannerDescription = memo(function BannerDescription({ children }) {
34
+ bannerStyles.useVariants({});
35
+ return /* @__PURE__ */ jsx(Text, {
36
+ numberOfLines: 3,
37
+ style: bannerStyles.description,
38
+ children
39
+ });
40
+ });
41
+ BannerDescription.displayName = "BannerDescription";
42
+
43
+ //#endregion
44
+ export { BannerDescription };
45
+ //# sourceMappingURL=BannerDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerDescription.js","names":[],"sources":["../../../src/components/Banner/BannerDescription.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { memo } from 'react';\n\nimport { bannerStyles } from '../../../generated/styles';\nimport { Text } from '../Text';\n\ninterface BannerDescriptionProps {\n children: ReactNode;\n}\n\n/**\n * **Styled description for use inside `BannerContent`.**\n *\n * @description\n * Applies the Banner description typography tokens and truncates to 3 lines\n * via `numberOfLines={3}`. Use this subcomponent instead of the `description`\n * prop when you need rich ReactNode content.\n *\n * @platform mobile\n *\n * @example\n * ```tsx\n * <Banner variant=\"alert\" startIcon=\"Error\">\n * <BannerContent>\n * <BannerTitle>Something went wrong</BannerTitle>\n * <BannerDescription>\n * Please try again or contact support for help.\n * </BannerDescription>\n * </BannerContent>\n * </Banner>\n * ```\n *\n * @see {@link Banner} for the parent component\n * @see {@link BannerContent} for the required wrapper\n */\nconst BannerDescription = memo(function BannerDescription({ children }: BannerDescriptionProps) {\n bannerStyles.useVariants({});\n\n return (\n <Text numberOfLines={3} style={bannerStyles.description}>\n {children}\n </Text>\n );\n});\n\nBannerDescription.displayName = 'BannerDescription';\n\nexport { BannerDescription, type BannerDescriptionProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAM,oBAAoB,KAAK,SAAS,kBAAkB,EAAE,YAAoC;AAC9F,cAAa,YAAY,EAAE,CAAC;AAE5B,QACE,oBAAC;EAAK,eAAe;EAAG,OAAO,aAAa;EACzC;GACI;EAET;AAEF,kBAAkB,cAAc"}
@@ -0,0 +1,44 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
4
+ const require_components_Text = require('../Text.cjs');
5
+ let react = require("react");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ let generated_styles = require("../../../generated/styles");
8
+
9
+ //#region src/components/Banner/BannerTitle.tsx
10
+ /**
11
+ * **Styled title for use inside `BannerContent`.**
12
+ *
13
+ * @description
14
+ * Applies the Banner title typography tokens. Renders a single line of text.
15
+ * Use this subcomponent instead of the `title` prop when you need rich
16
+ * ReactNode content (e.g. bold segments, inline icons).
17
+ *
18
+ * @platform mobile
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <Banner variant="info" startIcon="Info">
23
+ * <BannerContent>
24
+ * <BannerTitle>Update available</BannerTitle>
25
+ * <BannerDescription>A new version is ready to install.</BannerDescription>
26
+ * </BannerContent>
27
+ * </Banner>
28
+ * ```
29
+ *
30
+ * @see {@link Banner} for the parent component
31
+ * @see {@link BannerContent} for the required wrapper
32
+ */
33
+ const BannerTitle = (0, react.memo)(function BannerTitle({ children }) {
34
+ generated_styles.bannerStyles.useVariants({});
35
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
36
+ numberOfLines: 1,
37
+ style: generated_styles.bannerStyles.title,
38
+ children
39
+ });
40
+ });
41
+ BannerTitle.displayName = "BannerTitle";
42
+
43
+ //#endregion
44
+ exports.BannerTitle = BannerTitle;
@@ -0,0 +1,35 @@
1
+
2
+ import * as react from "react";
3
+ import { ReactNode } from "react";
4
+
5
+ //#region src/components/Banner/BannerTitle.d.ts
6
+ interface BannerTitleProps {
7
+ children: ReactNode;
8
+ }
9
+ /**
10
+ * **Styled title for use inside `BannerContent`.**
11
+ *
12
+ * @description
13
+ * Applies the Banner title typography tokens. Renders a single line of text.
14
+ * Use this subcomponent instead of the `title` prop when you need rich
15
+ * ReactNode content (e.g. bold segments, inline icons).
16
+ *
17
+ * @platform mobile
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <Banner variant="info" startIcon="Info">
22
+ * <BannerContent>
23
+ * <BannerTitle>Update available</BannerTitle>
24
+ * <BannerDescription>A new version is ready to install.</BannerDescription>
25
+ * </BannerContent>
26
+ * </Banner>
27
+ * ```
28
+ *
29
+ * @see {@link Banner} for the parent component
30
+ * @see {@link BannerContent} for the required wrapper
31
+ */
32
+ declare const BannerTitle: react.NamedExoticComponent<BannerTitleProps>;
33
+ //#endregion
34
+ export { BannerTitle, type BannerTitleProps };
35
+ //# sourceMappingURL=BannerTitle.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerTitle.d.cts","names":[],"sources":["../../../src/components/Banner/BannerTitle.tsx"],"mappings":";;;;;UAMU,gBAAA;EACR,QAAA,EAAU,SAAA;AAAA;AAP2B;;;;;AAOlB;;;;;;;;;;;;;;;;;;AAPkB,cAiCjC,WAAA,EAAW,KAAA,CAAA,oBAAA,CAAA,gBAAA"}
@@ -0,0 +1,35 @@
1
+
2
+ import * as react from "react";
3
+ import { ReactNode } from "react";
4
+
5
+ //#region src/components/Banner/BannerTitle.d.ts
6
+ interface BannerTitleProps {
7
+ children: ReactNode;
8
+ }
9
+ /**
10
+ * **Styled title for use inside `BannerContent`.**
11
+ *
12
+ * @description
13
+ * Applies the Banner title typography tokens. Renders a single line of text.
14
+ * Use this subcomponent instead of the `title` prop when you need rich
15
+ * ReactNode content (e.g. bold segments, inline icons).
16
+ *
17
+ * @platform mobile
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <Banner variant="info" startIcon="Info">
22
+ * <BannerContent>
23
+ * <BannerTitle>Update available</BannerTitle>
24
+ * <BannerDescription>A new version is ready to install.</BannerDescription>
25
+ * </BannerContent>
26
+ * </Banner>
27
+ * ```
28
+ *
29
+ * @see {@link Banner} for the parent component
30
+ * @see {@link BannerContent} for the required wrapper
31
+ */
32
+ declare const BannerTitle: react.NamedExoticComponent<BannerTitleProps>;
33
+ //#endregion
34
+ export { BannerTitle, type BannerTitleProps };
35
+ //# sourceMappingURL=BannerTitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerTitle.d.ts","names":[],"sources":["../../../src/components/Banner/BannerTitle.tsx"],"mappings":";;;;;UAMU,gBAAA;EACR,QAAA,EAAU,SAAA;AAAA;AAP2B;;;;;AAOlB;;;;;;;;;;;;;;;;;;AAPkB,cAiCjC,WAAA,EAAW,KAAA,CAAA,oBAAA,CAAA,gBAAA"}
@@ -0,0 +1,43 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ import { Text } from "../Text.js";
3
+ import { memo } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { bannerStyles } from "../../../generated/styles";
6
+
7
+ //#region src/components/Banner/BannerTitle.tsx
8
+ /**
9
+ * **Styled title for use inside `BannerContent`.**
10
+ *
11
+ * @description
12
+ * Applies the Banner title typography tokens. Renders a single line of text.
13
+ * Use this subcomponent instead of the `title` prop when you need rich
14
+ * ReactNode content (e.g. bold segments, inline icons).
15
+ *
16
+ * @platform mobile
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Banner variant="info" startIcon="Info">
21
+ * <BannerContent>
22
+ * <BannerTitle>Update available</BannerTitle>
23
+ * <BannerDescription>A new version is ready to install.</BannerDescription>
24
+ * </BannerContent>
25
+ * </Banner>
26
+ * ```
27
+ *
28
+ * @see {@link Banner} for the parent component
29
+ * @see {@link BannerContent} for the required wrapper
30
+ */
31
+ const BannerTitle = memo(function BannerTitle({ children }) {
32
+ bannerStyles.useVariants({});
33
+ return /* @__PURE__ */ jsx(Text, {
34
+ numberOfLines: 1,
35
+ style: bannerStyles.title,
36
+ children
37
+ });
38
+ });
39
+ BannerTitle.displayName = "BannerTitle";
40
+
41
+ //#endregion
42
+ export { BannerTitle };
43
+ //# sourceMappingURL=BannerTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerTitle.js","names":[],"sources":["../../../src/components/Banner/BannerTitle.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { memo } from 'react';\n\nimport { bannerStyles } from '../../../generated/styles';\nimport { Text } from '../Text';\n\ninterface BannerTitleProps {\n children: ReactNode;\n}\n\n/**\n * **Styled title for use inside `BannerContent`.**\n *\n * @description\n * Applies the Banner title typography tokens. Renders a single line of text.\n * Use this subcomponent instead of the `title` prop when you need rich\n * ReactNode content (e.g. bold segments, inline icons).\n *\n * @platform mobile\n *\n * @example\n * ```tsx\n * <Banner variant=\"info\" startIcon=\"Info\">\n * <BannerContent>\n * <BannerTitle>Update available</BannerTitle>\n * <BannerDescription>A new version is ready to install.</BannerDescription>\n * </BannerContent>\n * </Banner>\n * ```\n *\n * @see {@link Banner} for the parent component\n * @see {@link BannerContent} for the required wrapper\n */\nconst BannerTitle = memo(function BannerTitle({ children }: BannerTitleProps) {\n bannerStyles.useVariants({});\n\n return (\n <Text numberOfLines={1} style={bannerStyles.title}>\n {children}\n </Text>\n );\n});\n\nBannerTitle.displayName = 'BannerTitle';\n\nexport { BannerTitle, type BannerTitleProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,cAAc,KAAK,SAAS,YAAY,EAAE,YAA8B;AAC5E,cAAa,YAAY,EAAE,CAAC;AAE5B,QACE,oBAAC;EAAK,eAAe;EAAG,OAAO,aAAa;EACzC;GACI;EAET;AAEF,YAAY,cAAc"}
@@ -0,0 +1,11 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
+ const require_components_Banner_Banner = require('./Banner.cjs');
4
+ const require_components_Banner_BannerContent = require('./BannerContent.cjs');
5
+ const require_components_Banner_BannerDescription = require('./BannerDescription.cjs');
6
+ const require_components_Banner_BannerTitle = require('./BannerTitle.cjs');
7
+
8
+ exports.Banner = require_components_Banner_Banner.Banner;
9
+ exports.BannerContent = require_components_Banner_BannerContent.BannerContent;
10
+ exports.BannerDescription = require_components_Banner_BannerDescription.BannerDescription;
11
+ exports.BannerTitle = require_components_Banner_BannerTitle.BannerTitle;
@@ -0,0 +1,6 @@
1
+
2
+ import { Banner, BannerProps } from "./Banner.cjs";
3
+ import { BannerContent, BannerContentProps } from "./BannerContent.cjs";
4
+ import { BannerDescription, BannerDescriptionProps } from "./BannerDescription.cjs";
5
+ import { BannerTitle, BannerTitleProps } from "./BannerTitle.cjs";
6
+ export { Banner, BannerContent, type BannerContentProps, BannerDescription, type BannerDescriptionProps, type BannerProps, BannerTitle, type BannerTitleProps };
@@ -0,0 +1,6 @@
1
+
2
+ import { Banner, BannerProps } from "./Banner.js";
3
+ import { BannerContent, BannerContentProps } from "./BannerContent.js";
4
+ import { BannerDescription, BannerDescriptionProps } from "./BannerDescription.js";
5
+ import { BannerTitle, BannerTitleProps } from "./BannerTitle.js";
6
+ export { Banner, BannerContent, type BannerContentProps, BannerDescription, type BannerDescriptionProps, type BannerProps, BannerTitle, type BannerTitleProps };
@@ -0,0 +1,7 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ import { Banner } from "./Banner.js";
3
+ import { BannerContent } from "./BannerContent.js";
4
+ import { BannerDescription } from "./BannerDescription.js";
5
+ import { BannerTitle } from "./BannerTitle.js";
6
+
7
+ export { Banner, BannerContent, BannerDescription, BannerTitle };
@@ -0,0 +1,56 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
4
+ let react = require("react");
5
+
6
+ //#region src/components/Banner/utils.ts
7
+ /**
8
+ * Maps banner variants to button variants following the Figma spec.
9
+ * Secondary banner variants map to secondary button variants.
10
+ */
11
+ const BANNER_TO_BUTTON_VARIANT = {
12
+ primary: "brand",
13
+ secondary: "brand",
14
+ brand: "brand",
15
+ "brand-secondary": "brand-secondary",
16
+ alert: "alert",
17
+ "alert-secondary": "alert-secondary",
18
+ warning: "warning",
19
+ "warning-secondary": "warning-secondary",
20
+ success: "positive",
21
+ "success-secondary": "positive-secondary",
22
+ info: "info",
23
+ "info-secondary": "info-secondary"
24
+ };
25
+ /**
26
+ * Checks whether a React element has a specific displayName.
27
+ * Handles both regular function components and forwardRef components
28
+ * (which have typeof type === 'object').
29
+ */
30
+ function hasDisplayName(child, name) {
31
+ if (!(0, react.isValidElement)(child)) return false;
32
+ const type = child.type;
33
+ return (typeof type === "function" || typeof type === "object" && type !== null) && "displayName" in type && type.displayName === name;
34
+ }
35
+ /**
36
+ * Separates Banner children into content (BannerContent) and action elements.
37
+ * Skips falsy children so conditional patterns like {show && <Button />} work.
38
+ */
39
+ function separateChildren(children) {
40
+ let content = null;
41
+ const actions = [];
42
+ react.Children.forEach(children, (child) => {
43
+ if (child == null || child === false || child === true || child === "") return;
44
+ if (hasDisplayName(child, "BannerContent")) content = child;
45
+ else actions.push(child);
46
+ });
47
+ return {
48
+ content,
49
+ actions
50
+ };
51
+ }
52
+
53
+ //#endregion
54
+ exports.BANNER_TO_BUTTON_VARIANT = BANNER_TO_BUTTON_VARIANT;
55
+ exports.hasDisplayName = hasDisplayName;
56
+ exports.separateChildren = separateChildren;
@@ -0,0 +1,27 @@
1
+
2
+ import { BannerVariant, ButtonVariantFlat } from "../../types/dist/index.cjs";
3
+ import { ReactNode } from "react";
4
+
5
+ //#region src/components/Banner/utils.d.ts
6
+ /**
7
+ * Maps banner variants to button variants following the Figma spec.
8
+ * Secondary banner variants map to secondary button variants.
9
+ */
10
+ declare const BANNER_TO_BUTTON_VARIANT: Record<BannerVariant, ButtonVariantFlat>;
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
+ /**
18
+ * Separates Banner children into content (BannerContent) and action elements.
19
+ * Skips falsy children so conditional patterns like {show && <Button />} work.
20
+ */
21
+ declare function separateChildren(children: ReactNode): {
22
+ content: ReactNode | null;
23
+ actions: ReactNode[];
24
+ };
25
+ //#endregion
26
+ export { BANNER_TO_BUTTON_VARIANT, hasDisplayName, separateChildren };
27
+ //# sourceMappingURL=utils.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.cts","names":[],"sources":["../../../src/components/Banner/utils.ts"],"mappings":";;;;;;;AAQA;;cAAa,wBAAA,EAA0B,MAAA,CAAO,aAAA,EAAe,iBAAA;;;;;;iBAoB7C,cAAA,CAAe,KAAA,EAAO,SAAA,EAAW,IAAA;;;;;iBAgBjC,gBAAA,CAAiB,QAAA,EAAU,SAAA;EACzC,OAAA,EAAS,SAAA;EACT,OAAA,EAAS,SAAA;AAAA"}
@@ -0,0 +1,27 @@
1
+
2
+ import { BannerVariant, ButtonVariantFlat } from "../../types/dist/index.js";
3
+ import { ReactNode } from "react";
4
+
5
+ //#region src/components/Banner/utils.d.ts
6
+ /**
7
+ * Maps banner variants to button variants following the Figma spec.
8
+ * Secondary banner variants map to secondary button variants.
9
+ */
10
+ declare const BANNER_TO_BUTTON_VARIANT: Record<BannerVariant, ButtonVariantFlat>;
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
+ /**
18
+ * Separates Banner children into content (BannerContent) and action elements.
19
+ * Skips falsy children so conditional patterns like {show && <Button />} work.
20
+ */
21
+ declare function separateChildren(children: ReactNode): {
22
+ content: ReactNode | null;
23
+ actions: ReactNode[];
24
+ };
25
+ //#endregion
26
+ export { BANNER_TO_BUTTON_VARIANT, hasDisplayName, separateChildren };
27
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","names":[],"sources":["../../../src/components/Banner/utils.ts"],"mappings":";;;;;;;AAQA;;cAAa,wBAAA,EAA0B,MAAA,CAAO,aAAA,EAAe,iBAAA;;;;;;iBAoB7C,cAAA,CAAe,KAAA,EAAO,SAAA,EAAW,IAAA;;;;;iBAgBjC,gBAAA,CAAiB,QAAA,EAAU,SAAA;EACzC,OAAA,EAAS,SAAA;EACT,OAAA,EAAS,SAAA;AAAA"}
@@ -0,0 +1,53 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ import { Children, isValidElement } from "react";
3
+
4
+ //#region src/components/Banner/utils.ts
5
+ /**
6
+ * Maps banner variants to button variants following the Figma spec.
7
+ * Secondary banner variants map to secondary button variants.
8
+ */
9
+ const BANNER_TO_BUTTON_VARIANT = {
10
+ primary: "brand",
11
+ secondary: "brand",
12
+ brand: "brand",
13
+ "brand-secondary": "brand-secondary",
14
+ alert: "alert",
15
+ "alert-secondary": "alert-secondary",
16
+ warning: "warning",
17
+ "warning-secondary": "warning-secondary",
18
+ success: "positive",
19
+ "success-secondary": "positive-secondary",
20
+ info: "info",
21
+ "info-secondary": "info-secondary"
22
+ };
23
+ /**
24
+ * Checks whether a React element has a specific displayName.
25
+ * Handles both regular function components and forwardRef components
26
+ * (which have typeof type === 'object').
27
+ */
28
+ function hasDisplayName(child, name) {
29
+ if (!isValidElement(child)) return false;
30
+ const type = child.type;
31
+ return (typeof type === "function" || typeof type === "object" && type !== null) && "displayName" in type && type.displayName === name;
32
+ }
33
+ /**
34
+ * Separates Banner children into content (BannerContent) and action elements.
35
+ * Skips falsy children so conditional patterns like {show && <Button />} work.
36
+ */
37
+ function separateChildren(children) {
38
+ let content = null;
39
+ const actions = [];
40
+ Children.forEach(children, (child) => {
41
+ if (child == null || child === false || child === true || child === "") return;
42
+ if (hasDisplayName(child, "BannerContent")) content = child;
43
+ else actions.push(child);
44
+ });
45
+ return {
46
+ content,
47
+ actions
48
+ };
49
+ }
50
+
51
+ //#endregion
52
+ export { BANNER_TO_BUTTON_VARIANT, hasDisplayName, separateChildren };
53
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/Banner/utils.ts"],"sourcesContent":["import type { BannerVariant, ButtonVariantFlat } from '@yahoo/uds-types';\nimport type { ReactNode } from 'react';\nimport { Children, isValidElement } from 'react';\n\n/**\n * Maps banner variants to button variants following the Figma spec.\n * Secondary banner variants map to secondary button variants.\n */\nexport const BANNER_TO_BUTTON_VARIANT: Record<BannerVariant, ButtonVariantFlat> = {\n primary: 'brand',\n secondary: 'brand',\n brand: 'brand',\n 'brand-secondary': 'brand-secondary',\n alert: 'alert',\n 'alert-secondary': 'alert-secondary',\n warning: 'warning',\n 'warning-secondary': 'warning-secondary',\n success: 'positive',\n 'success-secondary': 'positive-secondary',\n info: 'info',\n 'info-secondary': 'info-secondary',\n};\n\n/**\n * Checks whether a React element has a specific displayName.\n * Handles both regular function components and forwardRef components\n * (which have typeof type === 'object').\n */\nexport function hasDisplayName(child: ReactNode, name: string): boolean {\n if (!isValidElement(child)) {\n return false;\n }\n const type = child.type;\n return (\n (typeof type === 'function' || (typeof type === 'object' && type !== null)) &&\n 'displayName' in type &&\n type.displayName === name\n );\n}\n\n/**\n * Separates Banner children into content (BannerContent) and action elements.\n * Skips falsy children so conditional patterns like {show && <Button />} work.\n */\nexport function separateChildren(children: ReactNode): {\n content: ReactNode | null;\n actions: ReactNode[];\n} {\n let content: ReactNode | null = null;\n const actions: ReactNode[] = [];\n\n Children.forEach(children, (child) => {\n if (child == null || child === false || child === true || child === '') {\n return;\n }\n if (hasDisplayName(child, 'BannerContent')) {\n content = child;\n } else {\n actions.push(child);\n }\n });\n\n return { content, actions };\n}\n"],"mappings":";;;;;;;;AAQA,MAAa,2BAAqE;CAChF,SAAS;CACT,WAAW;CACX,OAAO;CACP,mBAAmB;CACnB,OAAO;CACP,mBAAmB;CACnB,SAAS;CACT,qBAAqB;CACrB,SAAS;CACT,qBAAqB;CACrB,MAAM;CACN,kBAAkB;CACnB;;;;;;AAOD,SAAgB,eAAe,OAAkB,MAAuB;AACtE,KAAI,CAAC,eAAe,MAAM,CACxB,QAAO;CAET,MAAM,OAAO,MAAM;AACnB,SACG,OAAO,SAAS,cAAe,OAAO,SAAS,YAAY,SAAS,SACrE,iBAAiB,QACjB,KAAK,gBAAgB;;;;;;AAQzB,SAAgB,iBAAiB,UAG/B;CACA,IAAI,UAA4B;CAChC,MAAM,UAAuB,EAAE;AAE/B,UAAS,QAAQ,WAAW,UAAU;AACpC,MAAI,SAAS,QAAQ,UAAU,SAAS,UAAU,QAAQ,UAAU,GAClE;AAEF,MAAI,eAAe,OAAO,gBAAgB,CACxC,WAAU;MAEV,SAAQ,KAAK,MAAM;GAErB;AAEF,QAAO;EAAE;EAAS;EAAS"}
@@ -293,6 +293,24 @@ type ChipVariant = 'primary' | 'secondary' | 'brand' | 'brand-secondary';
293
293
  type ChipSize = 'sm' | 'md';
294
294
  type BadgeVariant = 'primary' | 'secondary' | 'brand' | 'brand-secondary' | 'alert' | 'alert-secondary' | 'positive' | 'positive-secondary' | 'warning' | 'warning-secondary' | 'info' | 'info-secondary';
295
295
  type BadgeSize = 'xs' | 'sm' | 'md' | 'lg';
296
+ type BannerVariant = 'primary' | 'secondary' | 'brand' | 'brand-secondary' | 'alert' | 'alert-secondary' | 'warning' | 'warning-secondary' | 'success' | 'success-secondary' | 'info' | 'info-secondary';
297
+ type BannerSize = 'default';
298
+ interface UniversalBannerProps<IconSlotType = UniversalIconSlot> {
299
+ /** The visual style variant of the banner. @default 'primary' */
300
+ variant?: BannerVariant;
301
+ /** The size of the banner. @default 'default' */
302
+ size?: BannerSize;
303
+ /** Icon displayed at the start of the banner. */
304
+ startIcon?: IconSlotType;
305
+ /** Banner title. Ignored when BannerContent is used. */
306
+ title?: ReactNode;
307
+ /** Banner description. Truncated to 3 lines. Ignored when BannerContent is used. */
308
+ description?: ReactNode;
309
+ /** Dismiss button handler. The dismiss button is only rendered when this is provided. */
310
+ onDismiss?: () => void;
311
+ /** Actions (Button, Link) or BannerContent + actions. */
312
+ children?: ReactNode;
313
+ }
296
314
  //#endregion
297
- export { type BadgeSize, type BadgeVariant, type ButtonSize, type ButtonVariantFlat, type ChipSize, type ChipVariant, type ElevationLevel, type IconButtonSize, type IconSize, type IconVariant, type MotionConfig, type MotionVariantValues, type UniversalCheckboxProps, type UniversalImageProps, type UniversalInputProps, type UniversalLinkProps, type UniversalRadioProps, type UniversalSwitchProps };
315
+ export { type BadgeSize, type BadgeVariant, type BannerVariant, type ButtonSize, type ButtonVariantFlat, type ChipSize, type ChipVariant, type ElevationLevel, type IconButtonSize, type IconSize, type IconVariant, type MotionConfig, type MotionVariantValues, type UniversalBannerProps, type UniversalCheckboxProps, type UniversalImageProps, type UniversalInputProps, type UniversalLinkProps, type UniversalRadioProps, type UniversalSwitchProps };
298
316
  //# sourceMappingURL=index.d.cts.map