@redis-ui/components 51.5.0 → 51.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 (48) hide show
  1. package/dist/Hero/Hero.cjs +46 -0
  2. package/dist/Hero/Hero.d.ts +11 -0
  3. package/dist/Hero/Hero.js +46 -0
  4. package/dist/Hero/Hero.types.d.ts +17 -0
  5. package/dist/Hero/Hero.types.js +1 -0
  6. package/dist/Hero/components/Actions/Actions.cjs +11 -0
  7. package/dist/Hero/components/Actions/Actions.d.ts +3 -0
  8. package/dist/Hero/components/Actions/Actions.js +11 -0
  9. package/dist/Hero/components/Compose/Compose.cjs +6 -0
  10. package/dist/Hero/components/Compose/Compose.d.ts +3 -0
  11. package/dist/Hero/components/Compose/Compose.js +6 -0
  12. package/dist/Hero/components/Compose/Compose.style.cjs +11 -0
  13. package/dist/Hero/components/Compose/Compose.style.d.ts +1 -0
  14. package/dist/Hero/components/Compose/Compose.style.js +9 -0
  15. package/dist/Hero/components/Compose/Compose.types.d.ts +2 -0
  16. package/dist/Hero/components/Compose/Compose.types.js +1 -0
  17. package/dist/Hero/components/Content/Content.cjs +12 -0
  18. package/dist/Hero/components/Content/Content.d.ts +3 -0
  19. package/dist/Hero/components/Content/Content.js +12 -0
  20. package/dist/Hero/components/Footnote/Footnote.cjs +10 -0
  21. package/dist/Hero/components/Footnote/Footnote.d.ts +3 -0
  22. package/dist/Hero/components/Footnote/Footnote.js +10 -0
  23. package/dist/Hero/components/Footnote/Footnote.style.cjs +11 -0
  24. package/dist/Hero/components/Footnote/Footnote.style.d.ts +1 -0
  25. package/dist/Hero/components/Footnote/Footnote.style.js +9 -0
  26. package/dist/Hero/components/Heading/Heading.cjs +10 -0
  27. package/dist/Hero/components/Heading/Heading.d.ts +3 -0
  28. package/dist/Hero/components/Heading/Heading.js +10 -0
  29. package/dist/Hero/components/Media/Media.cjs +6 -0
  30. package/dist/Hero/components/Media/Media.d.ts +3 -0
  31. package/dist/Hero/components/Media/Media.js +6 -0
  32. package/dist/Hero/components/Media/Media.style.cjs +11 -0
  33. package/dist/Hero/components/Media/Media.style.d.ts +1 -0
  34. package/dist/Hero/components/Media/Media.style.js +9 -0
  35. package/dist/Hero/components/Subtitle/Subtitle.cjs +10 -0
  36. package/dist/Hero/components/Subtitle/Subtitle.d.ts +3 -0
  37. package/dist/Hero/components/Subtitle/Subtitle.js +10 -0
  38. package/dist/Hero/components/Subtitle/Subtitle.style.cjs +11 -0
  39. package/dist/Hero/components/Subtitle/Subtitle.style.d.ts +1 -0
  40. package/dist/Hero/components/Subtitle/Subtitle.style.js +9 -0
  41. package/dist/Hero/index.d.ts +2 -0
  42. package/dist/Hero/index.js +2 -0
  43. package/dist/index.cjs +6 -4
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.js +6 -5
  46. package/package.json +1 -1
  47. package/skills/redis-ui-components/SKILL.md +1 -0
  48. package/skills/redis-ui-components/references/Hero.md +157 -0
@@ -0,0 +1,46 @@
1
+ const require_FlexGroup = require("../Layouts/FlexGroup/FlexGroup.cjs");
2
+ const require_Compose = require("./components/Compose/Compose.cjs");
3
+ const require_Content = require("./components/Content/Content.cjs");
4
+ const require_Heading = require("./components/Heading/Heading.cjs");
5
+ const require_Subtitle = require("./components/Subtitle/Subtitle.cjs");
6
+ const require_Actions = require("./components/Actions/Actions.cjs");
7
+ const require_Footnote = require("./components/Footnote/Footnote.cjs");
8
+ const require_Media = require("./components/Media/Media.cjs");
9
+ let react_jsx_runtime = require("react/jsx-runtime");
10
+ //#region src/Hero/Hero.tsx
11
+ var hasSlotContent = (node) => Array.isArray(node) ? node.some(hasSlotContent) : node != null && node !== false && node !== "";
12
+ var Hero = Object.assign(({ heading, subtitle, details, actions, footnote, media, ...composeProps }) => {
13
+ const hasCta = [
14
+ details,
15
+ actions,
16
+ footnote
17
+ ].some(hasSlotContent);
18
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Hero.Compose, {
19
+ ...composeProps,
20
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Hero.Content, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_FlexGroup.FlexGroup, {
21
+ direction: "column",
22
+ align: "start",
23
+ gap: "M",
24
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hero.Heading, { children: heading }), hasSlotContent(subtitle) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hero.Subtitle, { children: subtitle })]
25
+ }), hasCta && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_FlexGroup.FlexGroup, {
26
+ direction: "column",
27
+ align: "start",
28
+ gap: "M",
29
+ children: [
30
+ hasSlotContent(details) && details,
31
+ hasSlotContent(actions) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hero.Actions, { children: actions }),
32
+ hasSlotContent(footnote) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hero.Footnote, { children: footnote })
33
+ ]
34
+ })] }), hasSlotContent(media) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hero.Media, { children: media })]
35
+ });
36
+ }, {
37
+ Compose: require_Compose.default,
38
+ Content: require_Content.default,
39
+ Heading: require_Heading.default,
40
+ Subtitle: require_Subtitle.default,
41
+ Actions: require_Actions.default,
42
+ Footnote: require_Footnote.default,
43
+ Media: require_Media.default
44
+ });
45
+ //#endregion
46
+ exports.default = Hero;
@@ -0,0 +1,11 @@
1
+ import { HeroProps } from './Hero.types';
2
+ declare const Hero: (({ heading, subtitle, details, actions, footnote, media, ...composeProps }: HeroProps) => import("react/jsx-runtime").JSX.Element) & {
3
+ Compose: (props: import("./components/Compose/Compose.types").HeroComposeProps) => import("react/jsx-runtime").JSX.Element;
4
+ Content: (props: import("..").FlexGroupProps) => import("react/jsx-runtime").JSX.Element;
5
+ Heading: (props: import("..").TypographyHeadingProps) => import("react/jsx-runtime").JSX.Element;
6
+ Subtitle: (props: import("..").TypographyBodyProps) => import("react/jsx-runtime").JSX.Element;
7
+ Actions: (props: import("..").FlexGroupProps) => import("react/jsx-runtime").JSX.Element;
8
+ Footnote: (props: import("..").TypographyBodyProps) => import("react/jsx-runtime").JSX.Element;
9
+ Media: (props: import("..").ComposeElementProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
10
+ };
11
+ export default Hero;
@@ -0,0 +1,46 @@
1
+ import { FlexGroup } from "../Layouts/FlexGroup/FlexGroup.js";
2
+ import Compose from "./components/Compose/Compose.js";
3
+ import Content from "./components/Content/Content.js";
4
+ import Heading from "./components/Heading/Heading.js";
5
+ import Subtitle from "./components/Subtitle/Subtitle.js";
6
+ import Actions from "./components/Actions/Actions.js";
7
+ import Footnote from "./components/Footnote/Footnote.js";
8
+ import Media from "./components/Media/Media.js";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ //#region src/Hero/Hero.tsx
11
+ var hasSlotContent = (node) => Array.isArray(node) ? node.some(hasSlotContent) : node != null && node !== false && node !== "";
12
+ var Hero = Object.assign(({ heading, subtitle, details, actions, footnote, media, ...composeProps }) => {
13
+ const hasCta = [
14
+ details,
15
+ actions,
16
+ footnote
17
+ ].some(hasSlotContent);
18
+ return /* @__PURE__ */ jsxs(Hero.Compose, {
19
+ ...composeProps,
20
+ children: [/* @__PURE__ */ jsxs(Hero.Content, { children: [/* @__PURE__ */ jsxs(FlexGroup, {
21
+ direction: "column",
22
+ align: "start",
23
+ gap: "M",
24
+ children: [/* @__PURE__ */ jsx(Hero.Heading, { children: heading }), hasSlotContent(subtitle) && /* @__PURE__ */ jsx(Hero.Subtitle, { children: subtitle })]
25
+ }), hasCta && /* @__PURE__ */ jsxs(FlexGroup, {
26
+ direction: "column",
27
+ align: "start",
28
+ gap: "M",
29
+ children: [
30
+ hasSlotContent(details) && details,
31
+ hasSlotContent(actions) && /* @__PURE__ */ jsx(Hero.Actions, { children: actions }),
32
+ hasSlotContent(footnote) && /* @__PURE__ */ jsx(Hero.Footnote, { children: footnote })
33
+ ]
34
+ })] }), hasSlotContent(media) && /* @__PURE__ */ jsx(Hero.Media, { children: media })]
35
+ });
36
+ }, {
37
+ Compose,
38
+ Content,
39
+ Heading,
40
+ Subtitle,
41
+ Actions,
42
+ Footnote,
43
+ Media
44
+ });
45
+ //#endregion
46
+ export { Hero as default };
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ import { ChildFree, ComposeElementProps } from '../Helpers/common.types';
3
+ export interface HeroOwnProps {
4
+ /** Main claim, rendered as the page's `h1`. */
5
+ heading: ReactNode;
6
+ /** Supporting copy below the heading. */
7
+ subtitle?: ReactNode;
8
+ /** Extra content right above the actions, e.g. highlight rows or a row of logos. */
9
+ details?: ReactNode;
10
+ /** Call-to-action row below the copy. */
11
+ actions?: ReactNode;
12
+ /** Small note below the actions. */
13
+ footnote?: ReactNode;
14
+ /** Illustration in the trailing column (svg/img). */
15
+ media?: ReactNode;
16
+ }
17
+ export type HeroProps = HeroOwnProps & ChildFree<ComposeElementProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ const require_FlexGroup = require("../../../Layouts/FlexGroup/FlexGroup.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ //#region src/Hero/components/Actions/Actions.tsx
4
+ var Actions = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FlexGroup.FlexGroup, {
5
+ gap: "M",
6
+ align: "center",
7
+ wrap: true,
8
+ ...props
9
+ });
10
+ //#endregion
11
+ exports.default = Actions;
@@ -0,0 +1,3 @@
1
+ import { FlexGroupProps } from '../../../Layouts';
2
+ declare const Actions: (props: FlexGroupProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Actions;
@@ -0,0 +1,11 @@
1
+ import { FlexGroup } from "../../../Layouts/FlexGroup/FlexGroup.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/Hero/components/Actions/Actions.tsx
4
+ var Actions = (props) => /* @__PURE__ */ jsx(FlexGroup, {
5
+ gap: "M",
6
+ align: "center",
7
+ wrap: true,
8
+ ...props
9
+ });
10
+ //#endregion
11
+ export { Actions as default };
@@ -0,0 +1,6 @@
1
+ const require_Compose_style = require("./Compose.style.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ //#region src/Hero/components/Compose/Compose.tsx
4
+ var Compose = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Compose_style.HeroContainer, { ...props });
5
+ //#endregion
6
+ exports.default = Compose;
@@ -0,0 +1,3 @@
1
+ import { HeroComposeProps } from './Compose.types';
2
+ declare const Compose: (props: HeroComposeProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Compose;
@@ -0,0 +1,6 @@
1
+ import { HeroContainer } from "./Compose.style.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/Hero/components/Compose/Compose.tsx
4
+ var Compose = (props) => /* @__PURE__ */ jsx(HeroContainer, { ...props });
5
+ //#endregion
6
+ export { Compose as default };
@@ -0,0 +1,11 @@
1
+ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
2
+ let styled_components = require("styled-components");
3
+ styled_components = require_runtime.__toESM(styled_components, 1);
4
+ let _redislabsdev_redis_ui_styles = require("@redis-ui/styles");
5
+ //#region src/Hero/components/Compose/Compose.style.ts
6
+ var HeroContainer = styled_components.default.div.withConfig({
7
+ displayName: "Composestyle__HeroContainer",
8
+ componentId: "RedisUI__sc-126p7uz-0"
9
+ })(["display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:", ";align-items:start;@media (max-width:75rem){grid-template-columns:minmax(0,1fr);}"], () => (0, _redislabsdev_redis_ui_styles.useTheme)().core.space.space200);
10
+ //#endregion
11
+ exports.HeroContainer = HeroContainer;
@@ -0,0 +1 @@
1
+ export declare const HeroContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,9 @@
1
+ import _styled from "styled-components";
2
+ import { useTheme } from "@redis-ui/styles";
3
+ //#region src/Hero/components/Compose/Compose.style.ts
4
+ var HeroContainer = _styled.div.withConfig({
5
+ displayName: "Composestyle__HeroContainer",
6
+ componentId: "RedisUI__sc-126p7uz-0"
7
+ })(["display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:", ";align-items:start;@media (max-width:75rem){grid-template-columns:minmax(0,1fr);}"], () => useTheme().core.space.space200);
8
+ //#endregion
9
+ export { HeroContainer };
@@ -0,0 +1,2 @@
1
+ import { ComposeElementProps } from '../../../Helpers/common.types';
2
+ export type HeroComposeProps = ComposeElementProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ const require_FlexGroup = require("../../../Layouts/FlexGroup/FlexGroup.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ //#region src/Hero/components/Content/Content.tsx
4
+ var Content = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FlexGroup.FlexGroup, {
5
+ direction: "column",
6
+ align: "start",
7
+ gap: "XL",
8
+ minWidth: "0",
9
+ ...props
10
+ });
11
+ //#endregion
12
+ exports.default = Content;
@@ -0,0 +1,3 @@
1
+ import { FlexGroupProps } from '../../../Layouts';
2
+ declare const Content: (props: FlexGroupProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Content;
@@ -0,0 +1,12 @@
1
+ import { FlexGroup } from "../../../Layouts/FlexGroup/FlexGroup.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/Hero/components/Content/Content.tsx
4
+ var Content = (props) => /* @__PURE__ */ jsx(FlexGroup, {
5
+ direction: "column",
6
+ align: "start",
7
+ gap: "XL",
8
+ minWidth: "0",
9
+ ...props
10
+ });
11
+ //#endregion
12
+ export { Content as default };
@@ -0,0 +1,10 @@
1
+ const require_Footnote_style = require("./Footnote.style.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ //#region src/Hero/components/Footnote/Footnote.tsx
4
+ var Footnote = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Footnote_style.Footnote, {
5
+ size: "S",
6
+ color: "secondary",
7
+ ...props
8
+ });
9
+ //#endregion
10
+ exports.default = Footnote;
@@ -0,0 +1,3 @@
1
+ import { TypographyBodyProps } from '../../../Typography';
2
+ declare const Footnote: (props: TypographyBodyProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Footnote;
@@ -0,0 +1,10 @@
1
+ import { Footnote as Footnote$1 } from "./Footnote.style.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/Hero/components/Footnote/Footnote.tsx
4
+ var Footnote = (props) => /* @__PURE__ */ jsx(Footnote$1, {
5
+ size: "S",
6
+ color: "secondary",
7
+ ...props
8
+ });
9
+ //#endregion
10
+ export { Footnote as default };
@@ -0,0 +1,11 @@
1
+ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
2
+ const require_Typography = require("../../../Typography/Typography.cjs");
3
+ let styled_components = require("styled-components");
4
+ styled_components = require_runtime.__toESM(styled_components, 1);
5
+ //#region src/Hero/components/Footnote/Footnote.style.ts
6
+ var Footnote = (0, styled_components.default)(require_Typography.default.Body).withConfig({
7
+ displayName: "Footnotestyle__Footnote",
8
+ componentId: "RedisUI__sc-120rs03-0"
9
+ })(["margin-block:0;max-width:60ch;text-wrap:pretty;"]);
10
+ //#endregion
11
+ exports.Footnote = Footnote;
@@ -0,0 +1 @@
1
+ export declare const Footnote: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -0,0 +1,9 @@
1
+ import Typography from "../../../Typography/Typography.js";
2
+ import _styled from "styled-components";
3
+ //#region src/Hero/components/Footnote/Footnote.style.ts
4
+ var Footnote = _styled(Typography.Body).withConfig({
5
+ displayName: "Footnotestyle__Footnote",
6
+ componentId: "RedisUI__sc-120rs03-0"
7
+ })(["margin-block:0;max-width:60ch;text-wrap:pretty;"]);
8
+ //#endregion
9
+ export { Footnote };
@@ -0,0 +1,10 @@
1
+ const require_Typography = require("../../../Typography/Typography.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ //#region src/Hero/components/Heading/Heading.tsx
4
+ var Heading = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.default.Heading, {
5
+ component: "h1",
6
+ size: "XL",
7
+ ...props
8
+ });
9
+ //#endregion
10
+ exports.default = Heading;
@@ -0,0 +1,3 @@
1
+ import { TypographyHeadingProps } from '../../../Typography';
2
+ declare const Heading: (props: TypographyHeadingProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Heading;
@@ -0,0 +1,10 @@
1
+ import Typography from "../../../Typography/Typography.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/Hero/components/Heading/Heading.tsx
4
+ var Heading = (props) => /* @__PURE__ */ jsx(Typography.Heading, {
5
+ component: "h1",
6
+ size: "XL",
7
+ ...props
8
+ });
9
+ //#endregion
10
+ export { Heading as default };
@@ -0,0 +1,6 @@
1
+ const require_Media_style = require("./Media.style.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ //#region src/Hero/components/Media/Media.tsx
4
+ var Media = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Media_style.Media, { ...props });
5
+ //#endregion
6
+ exports.default = Media;
@@ -0,0 +1,3 @@
1
+ import { ComposeElementProps } from '../../../Helpers/common.types';
2
+ declare const Media: (props: ComposeElementProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export default Media;
@@ -0,0 +1,6 @@
1
+ import { Media as Media$1 } from "./Media.style.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/Hero/components/Media/Media.tsx
4
+ var Media = (props) => /* @__PURE__ */ jsx(Media$1, { ...props });
5
+ //#endregion
6
+ export { Media as default };
@@ -0,0 +1,11 @@
1
+ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
2
+ let styled_components = require("styled-components");
3
+ styled_components = require_runtime.__toESM(styled_components, 1);
4
+ let _redislabsdev_redis_ui_styles = require("@redis-ui/styles");
5
+ //#region src/Hero/components/Media/Media.style.ts
6
+ var Media = styled_components.default.div.withConfig({
7
+ displayName: "Mediastyle__Media",
8
+ componentId: "RedisUI__sc-1w3ogu0-0"
9
+ })(["display:grid;place-items:center;align-self:center;min-width:0;overflow:hidden;padding-inline:", ";& > svg,& > img{display:block;width:100%;max-width:32rem;height:auto;}"], () => (0, _redislabsdev_redis_ui_styles.useTheme)().core.space.space150);
10
+ //#endregion
11
+ exports.Media = Media;
@@ -0,0 +1 @@
1
+ export declare const Media: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,9 @@
1
+ import _styled from "styled-components";
2
+ import { useTheme } from "@redis-ui/styles";
3
+ //#region src/Hero/components/Media/Media.style.ts
4
+ var Media = _styled.div.withConfig({
5
+ displayName: "Mediastyle__Media",
6
+ componentId: "RedisUI__sc-1w3ogu0-0"
7
+ })(["display:grid;place-items:center;align-self:center;min-width:0;overflow:hidden;padding-inline:", ";& > svg,& > img{display:block;width:100%;max-width:32rem;height:auto;}"], () => useTheme().core.space.space150);
8
+ //#endregion
9
+ export { Media };
@@ -0,0 +1,10 @@
1
+ const require_Subtitle_style = require("./Subtitle.style.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ //#region src/Hero/components/Subtitle/Subtitle.tsx
4
+ var Subtitle = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Subtitle_style.Subtitle, {
5
+ size: "L",
6
+ color: "secondary",
7
+ ...props
8
+ });
9
+ //#endregion
10
+ exports.default = Subtitle;
@@ -0,0 +1,3 @@
1
+ import { TypographyBodyProps } from '../../../Typography';
2
+ declare const Subtitle: (props: TypographyBodyProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Subtitle;
@@ -0,0 +1,10 @@
1
+ import { Subtitle as Subtitle$1 } from "./Subtitle.style.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/Hero/components/Subtitle/Subtitle.tsx
4
+ var Subtitle = (props) => /* @__PURE__ */ jsx(Subtitle$1, {
5
+ size: "L",
6
+ color: "secondary",
7
+ ...props
8
+ });
9
+ //#endregion
10
+ export { Subtitle as default };
@@ -0,0 +1,11 @@
1
+ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
2
+ const require_Typography = require("../../../Typography/Typography.cjs");
3
+ let styled_components = require("styled-components");
4
+ styled_components = require_runtime.__toESM(styled_components, 1);
5
+ //#region src/Hero/components/Subtitle/Subtitle.style.ts
6
+ var Subtitle = (0, styled_components.default)(require_Typography.default.Body).withConfig({
7
+ displayName: "Subtitlestyle__Subtitle",
8
+ componentId: "RedisUI__sc-ivism3-0"
9
+ })(["margin-block:0;max-width:68ch;text-wrap:pretty;"]);
10
+ //#endregion
11
+ exports.Subtitle = Subtitle;
@@ -0,0 +1 @@
1
+ export declare const Subtitle: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -0,0 +1,9 @@
1
+ import Typography from "../../../Typography/Typography.js";
2
+ import _styled from "styled-components";
3
+ //#region src/Hero/components/Subtitle/Subtitle.style.ts
4
+ var Subtitle = _styled(Typography.Body).withConfig({
5
+ displayName: "Subtitlestyle__Subtitle",
6
+ componentId: "RedisUI__sc-ivism3-0"
7
+ })(["margin-block:0;max-width:68ch;text-wrap:pretty;"]);
8
+ //#endregion
9
+ export { Subtitle };
@@ -0,0 +1,2 @@
1
+ export { default as Hero } from './Hero';
2
+ export * from './Hero.types';
@@ -0,0 +1,2 @@
1
+ export { default as Hero } from './Hero';
2
+ export * from './Hero.types';
package/dist/index.cjs CHANGED
@@ -74,15 +74,16 @@ const require_Drawer = require("./Drawer/Drawer.cjs");
74
74
  const require_TreeView = require("./TreeView/TreeView.cjs");
75
75
  const require_Filters = require("./Filters/Filters.cjs");
76
76
  const require_Gauge = require("./Gauge/Gauge.cjs");
77
- const require_HighlightedIcon_style = require("./HighlightedIcon/HighlightedIcon.style.cjs");
78
- const require_HighlightedIcon = require("./HighlightedIcon/HighlightedIcon.cjs");
79
- const require_KeyValueList = require("./KeyValueList/KeyValueList.cjs");
80
- const require_useKeyValueList = require("./KeyValueList/hooks/useKeyValueList.cjs");
81
77
  const require_FlexItem = require("./Layouts/FlexItem/FlexItem.cjs");
82
78
  const require_FlexGroup = require("./Layouts/FlexGroup/FlexGroup.cjs");
83
79
  const require_Grid = require("./Layouts/Grid/Grid.cjs");
84
80
  const require_FlexSplit = require("./Layouts/FlexSplit/FlexSplit.cjs");
85
81
  const require_FlexDivider = require("./Layouts/FlexDivider/FlexDivider.cjs");
82
+ const require_Hero = require("./Hero/Hero.cjs");
83
+ const require_HighlightedIcon_style = require("./HighlightedIcon/HighlightedIcon.style.cjs");
84
+ const require_HighlightedIcon = require("./HighlightedIcon/HighlightedIcon.cjs");
85
+ const require_KeyValueList = require("./KeyValueList/KeyValueList.cjs");
86
+ const require_useKeyValueList = require("./KeyValueList/hooks/useKeyValueList.cjs");
86
87
  const require_Tabs = require("./Tabs/Tabs.cjs");
87
88
  const require_MidBar = require("./MidBar/MidBar.cjs");
88
89
  const require_Modal = require("./Modal/Modal.cjs");
@@ -183,6 +184,7 @@ exports.FlexSplit = require_FlexSplit.FlexSplit;
183
184
  exports.FormField = require_FormField.default;
184
185
  exports.Gauge = require_Gauge.Gauge;
185
186
  exports.Grid = require_Grid.Grid;
187
+ exports.Hero = require_Hero.default;
186
188
  exports.HighlightedIcon = require_HighlightedIcon.default;
187
189
  Object.defineProperty(exports, "HighlightedIconStyles", {
188
190
  enumerable: true,
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ export * from './Drawer';
16
16
  export * from './Filters';
17
17
  export * from './Gauge';
18
18
  export * from './Helpers';
19
+ export * from './Hero';
19
20
  export * from './HighlightedIcon';
20
21
  export * from './Inputs';
21
22
  export * from './FormField';
package/dist/index.js CHANGED
@@ -74,15 +74,16 @@ import Drawer from "./Drawer/Drawer.js";
74
74
  import TreeView from "./TreeView/TreeView.js";
75
75
  import Filters from "./Filters/Filters.js";
76
76
  import { Gauge } from "./Gauge/Gauge.js";
77
- import { HighlightedIcon_style_exports } from "./HighlightedIcon/HighlightedIcon.style.js";
78
- import HighlightedIcon from "./HighlightedIcon/HighlightedIcon.js";
79
- import { KeyValueList } from "./KeyValueList/KeyValueList.js";
80
- import { useKeyValueList } from "./KeyValueList/hooks/useKeyValueList.js";
81
77
  import { FlexItem } from "./Layouts/FlexItem/FlexItem.js";
82
78
  import { FlexGroup } from "./Layouts/FlexGroup/FlexGroup.js";
83
79
  import { Grid } from "./Layouts/Grid/Grid.js";
84
80
  import { FlexSplit } from "./Layouts/FlexSplit/FlexSplit.js";
85
81
  import { FlexDivider } from "./Layouts/FlexDivider/FlexDivider.js";
82
+ import Hero from "./Hero/Hero.js";
83
+ import { HighlightedIcon_style_exports } from "./HighlightedIcon/HighlightedIcon.style.js";
84
+ import HighlightedIcon from "./HighlightedIcon/HighlightedIcon.js";
85
+ import { KeyValueList } from "./KeyValueList/KeyValueList.js";
86
+ import { useKeyValueList } from "./KeyValueList/hooks/useKeyValueList.js";
86
87
  import Tabs from "./Tabs/Tabs.js";
87
88
  import MidBar from "./MidBar/MidBar.js";
88
89
  import Modal from "./Modal/Modal.js";
@@ -113,4 +114,4 @@ import { ProgressBar } from "./ProgressBar/ProgressBar.js";
113
114
  import { ProfileIcon_style_exports } from "./ProfileIcon/ProfileIcon.style.js";
114
115
  import ProfileIcon from "./ProfileIcon/ProfileIcon.js";
115
116
  import Slider from "./Slider/Slider.js";
116
- export { ActionIconButton_style_exports as ActionButtonWithIconStyles, ActionIconButton, AppBar, AppBar_style_exports as AppBarStyles, AppSelectionMenu, AutoCompleteSelect, Badge, Badge_style_exports as BadgeStyles, Banner, BoxSelectionGroup, Breadcrumbs, Button, ButtonGroup, Button_style_exports as ButtonStyles, IconButton_style_exports as ButtonWithIconStyles, Card, CategoryValueList, Checkbox, Chip, ChipContainer, ChipList, ContextProvider, CopyToClipboardButton, CountryFlag, Drawer, ErrorContentProvider, FieldAdditionTextIdProvider, FieldAdditionTextIdTransProvider, FieldDisabledProvider, FieldDisabledTransProvider, FieldReadonlyProvider, FieldReadonlyTransProvider, FieldRequiredProvider, FieldRequiredTransProvider, FieldStatusProvider, FieldStatusTransProvider, Filters, FlexDivider, FlexGroup, FlexItem, FlexSplit, FormField, Gauge, Grid, HighlightedIcon, HighlightedIcon_style_exports as HighlightedIconStyles, IconButton, Input, KeyValueList, Label, Link, LinkStyler, Loader, Menu, MidBar, Modal, MoreInfoIcon, MultiBoxSelectionGroup, MultiSelect, NumericInput, Overflow, Pagination, PasswordInput, Popover, PopperProvider, ProfileIcon, ProfileIcon_style_exports as ProfileIconStyles, ProgressBar, QuantityCounter, RadioGroup, RestylableElement, ScreenReaderAnnounce, SearchBar, SearchInput, Section, Select, SelfContained, SharedIdProvider, SharedIdTransProvider, SideBar, Skeleton, Slider, Stepper, StepperStepState, Switch, TableHeading, Tabs, TextArea, TextButton, TextButton_style_exports as TextButtonStyles, ThemeModeSwitch, Toast, Toaster, ToggleButton, ToggleButton_style_exports as ToggleButtonStyles, Tooltip, TooltipCard, Provider as TooltipProvider, TreeView, Typography, actionIconButtonSizes, badgeVariants, bannerVariants, buttonSizes, buttonVariants, buttonWithIconVariants, cardVariants, childrenToString, combineHandlers, createNullableContext, createPrimitiveContextState, debounce, forwardRefWithGenerics, generateId, getClosestDivisibleNumber, handlePreventDefault, handleStopPropagation, iconButtonSizes, isFragmentElement, isTextualNode, memoWithGenerics, textButtonSizes, textButtonVariants, throttle, toast, typographyColors, useEllipsisTooltip, useErrorContent, useFieldAdditionTextId, useFieldDisabled, useFieldReadonly, useFieldRequired, useFieldStatus, useGeneratedId, useInputValueApi, useInputValueProps, useKeyValueList, useMultiSelectContext, usePaginationContext, usePopperContext, useScrollable, useSelectContext, useSharedId, useThemeModeSwitch, useToastParams };
117
+ export { ActionIconButton_style_exports as ActionButtonWithIconStyles, ActionIconButton, AppBar, AppBar_style_exports as AppBarStyles, AppSelectionMenu, AutoCompleteSelect, Badge, Badge_style_exports as BadgeStyles, Banner, BoxSelectionGroup, Breadcrumbs, Button, ButtonGroup, Button_style_exports as ButtonStyles, IconButton_style_exports as ButtonWithIconStyles, Card, CategoryValueList, Checkbox, Chip, ChipContainer, ChipList, ContextProvider, CopyToClipboardButton, CountryFlag, Drawer, ErrorContentProvider, FieldAdditionTextIdProvider, FieldAdditionTextIdTransProvider, FieldDisabledProvider, FieldDisabledTransProvider, FieldReadonlyProvider, FieldReadonlyTransProvider, FieldRequiredProvider, FieldRequiredTransProvider, FieldStatusProvider, FieldStatusTransProvider, Filters, FlexDivider, FlexGroup, FlexItem, FlexSplit, FormField, Gauge, Grid, Hero, HighlightedIcon, HighlightedIcon_style_exports as HighlightedIconStyles, IconButton, Input, KeyValueList, Label, Link, LinkStyler, Loader, Menu, MidBar, Modal, MoreInfoIcon, MultiBoxSelectionGroup, MultiSelect, NumericInput, Overflow, Pagination, PasswordInput, Popover, PopperProvider, ProfileIcon, ProfileIcon_style_exports as ProfileIconStyles, ProgressBar, QuantityCounter, RadioGroup, RestylableElement, ScreenReaderAnnounce, SearchBar, SearchInput, Section, Select, SelfContained, SharedIdProvider, SharedIdTransProvider, SideBar, Skeleton, Slider, Stepper, StepperStepState, Switch, TableHeading, Tabs, TextArea, TextButton, TextButton_style_exports as TextButtonStyles, ThemeModeSwitch, Toast, Toaster, ToggleButton, ToggleButton_style_exports as ToggleButtonStyles, Tooltip, TooltipCard, Provider as TooltipProvider, TreeView, Typography, actionIconButtonSizes, badgeVariants, bannerVariants, buttonSizes, buttonVariants, buttonWithIconVariants, cardVariants, childrenToString, combineHandlers, createNullableContext, createPrimitiveContextState, debounce, forwardRefWithGenerics, generateId, getClosestDivisibleNumber, handlePreventDefault, handleStopPropagation, iconButtonSizes, isFragmentElement, isTextualNode, memoWithGenerics, textButtonSizes, textButtonVariants, throttle, toast, typographyColors, useEllipsisTooltip, useErrorContent, useFieldAdditionTextId, useFieldDisabled, useFieldReadonly, useFieldRequired, useFieldStatus, useGeneratedId, useInputValueApi, useInputValueProps, useKeyValueList, useMultiSelectContext, usePaginationContext, usePopperContext, useScrollable, useSelectContext, useSharedId, useThemeModeSwitch, useToastParams };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@redis-ui/components",
3
3
  "license": "UNLICENSED",
4
- "version": "51.5.0",
4
+ "version": "51.6.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "repository": "git@github.com:redislabsdev/redis-ui.git",
@@ -82,6 +82,7 @@ Always check the relevant component reference before using a component. The refe
82
82
  - [FlexSplit](./references/FlexSplit.md)
83
83
  - [Card](./references/Card.md)
84
84
  - [Section](./references/Section.md)
85
+ - [Hero](./references/Hero.md)
85
86
  - [Breadcrumbs](./references/Breadcrumbs.md)
86
87
 
87
88
  ### Navigation
@@ -0,0 +1,157 @@
1
+ # Hero
2
+
3
+ The page-opening hero for Ultra empty states and landing pages: copy (heading, subtitle, actions) on the leading side and an illustration on the trailing side, with no surrounding card. Follows the `Banner`/`Section` compound pattern — a prop-driven convenience root plus exposed sub-parts (`Hero.Compose` + slots) for full control.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import {
9
+ Hero,
10
+ Badge,
11
+ Button,
12
+ FlexGroup,
13
+ FlexItem,
14
+ TextButton,
15
+ Typography
16
+ } from '@redis-ui/components';
17
+ import { CheckThinIcon } from '@redis-ui/icons';
18
+ ```
19
+
20
+ ## Props
21
+
22
+ Convenience root props. `Hero` also spreads standard `HTMLElement` attributes (`className`, `style`, `id`, `data-*`, event handlers, etc.) onto the container; `children` and `content` are not part of the API.
23
+
24
+ | Prop | Type | Default | Description |
25
+ |------|------|---------|-------------|
26
+ | `heading` | `ReactNode` | — (required) | The main claim. Rendered as the page's `h1`. |
27
+ | `subtitle` | `ReactNode` | — | Supporting copy below the heading. |
28
+ | `details` | `ReactNode` | — | Extra content right above the actions, e.g. highlight rows or a row of logos. |
29
+ | `actions` | `ReactNode` | — | Call-to-action row below the copy. Takes any mix of buttons, e.g. a primary `Button`, a `secondary-fill` `Button`, and a `TextButton` for a link-style action. |
30
+ | `footnote` | `ReactNode` | — | Small note below the actions. |
31
+ | `media` | `ReactNode` | — | Illustration (svg/img) in the trailing column. |
32
+
33
+ Every slot except `heading` is optional. A slot is skipped when its value is `null`, `undefined`, `false`, an empty string, or an array with nothing renderable (e.g. `items.map(...)` over an empty list); numeric `0` still renders.
34
+
35
+ ## Sub-components
36
+
37
+ `Hero` is assembled with `Object.assign`; drop to these for full control. Each part spreads its own props, so any single slot can be restyled or rearranged.
38
+
39
+ - `Hero.Compose` - the two-column container: copy on the leading side, media on the trailing side, stacking on narrow viewports.
40
+ - `Hero.Content` - the copy column. It spaces its children apart: wrap the heading and subtitle in one column `FlexGroup` and the details, actions and footnote in another, as the root does.
41
+ - `Hero.Heading` - the main claim (`h1` by default; pass `component` to change the level; wraps `Typography.Heading`).
42
+ - `Hero.Subtitle` - supporting copy (wraps `Typography.Body`).
43
+ - `Hero.Actions` - the call-to-action row.
44
+ - `Hero.Footnote` - small note below the actions (wraps `Typography.Body`).
45
+ - `Hero.Media` - the trailing illustration column; a direct `svg`/`img` child fills the column up to a capped width.
46
+
47
+ ## Examples
48
+
49
+ ### Basic Usage
50
+
51
+ ```tsx
52
+ <Hero
53
+ heading="Live business data your agents can navigate."
54
+ subtitle="Model your entities, fields and relationships once. Agents follow defined paths through your data instead of guessing at SQL, and every call stays governed."
55
+ actions={
56
+ <>
57
+ <Button variant="primary">Create Context Gateway service</Button>
58
+ <TextButton variant="secondary">Read the docs</TextButton>
59
+ </>
60
+ }
61
+ media={<HeroArt />}
62
+ />
63
+ ```
64
+
65
+ ### WithoutMedia
66
+
67
+ > Without `media`, the copy keeps its column and the trailing column stays empty.
68
+
69
+ ```tsx
70
+ <Hero
71
+ heading="Projects group your databases and services."
72
+ subtitle="Create a project to keep environments, access, and billing in one place."
73
+ actions={<Button variant="primary">Create project</Button>}
74
+ />
75
+ ```
76
+
77
+ ### WithDetails
78
+
79
+ > `details` sits right above the actions, e.g. for highlight rows or a row of logos.
80
+
81
+ ```tsx
82
+ <Hero
83
+ heading="Redis, tuned for hot data."
84
+ subtitle="A Cache database keeps your working set in memory and answers in under a millisecond."
85
+ details={
86
+ <FlexGroup direction="column" gap="S">
87
+ {['Sub-millisecond reads at any scale', 'Evicts cold keys as new ones arrive'].map(
88
+ (highlight) => (
89
+ <FlexGroup key={highlight} gap="S" align="center">
90
+ <CheckThinIcon size="M" />
91
+ <Typography.Body color="secondary">{highlight}</Typography.Body>
92
+ </FlexGroup>
93
+ )
94
+ )}
95
+ </FlexGroup>
96
+ }
97
+ actions={<Button variant="primary">Create Cache database</Button>}
98
+ media={<HeroArt />}
99
+ />
100
+ ```
101
+
102
+ ### WithFootnote
103
+
104
+ > `actions` takes any mix of buttons; `footnote` adds a small note below them.
105
+
106
+ ```tsx
107
+ <Hero
108
+ heading="One network, many databases."
109
+ subtitle="A network is a cloud, a region and a CIDR block. Databases in the same network share VPC peering, so you configure it once."
110
+ actions={
111
+ <>
112
+ <Button variant="primary">Create database</Button>
113
+ <Button variant="secondary-fill">Create network</Button>
114
+ </>
115
+ }
116
+ footnote="Creating a database sets up its network for you. Create a network first if you want to configure peering ahead of time."
117
+ media={<HeroArt />}
118
+ />
119
+ ```
120
+
121
+ ### Composition
122
+
123
+ > Drop to `Hero.Compose` to change the layout of a slot, e.g. to put a badge next to the heading. Keep the badge outside `Hero.Heading` so the `h1` stays valid markup.
124
+
125
+ ```tsx
126
+ <Hero.Compose>
127
+ <Hero.Content>
128
+ <FlexGroup direction="column" align="start" gap="M">
129
+ <FlexGroup gap="M" align="center">
130
+ <Hero.Heading>Databases</Hero.Heading>
131
+ <FlexItem flex="none">
132
+ <Badge label="Coming soon" />
133
+ </FlexItem>
134
+ </FlexGroup>
135
+ <Hero.Subtitle>
136
+ Start with a cache, grow into a primary database and streaming engine, with no migration
137
+ and no new tools.
138
+ </Hero.Subtitle>
139
+ </FlexGroup>
140
+ <Hero.Actions>
141
+ <Button variant="primary">Create database</Button>
142
+ </Hero.Actions>
143
+ </Hero.Content>
144
+ <Hero.Media>
145
+ <HeroArt />
146
+ </Hero.Media>
147
+ </Hero.Compose>
148
+ ```
149
+
150
+ `HeroArt` in these examples is a story-local placeholder `svg`.
151
+
152
+ ## Notes
153
+
154
+ - Use the prop-driven `<Hero>` for the standard layout; drop to `Hero.Compose` + parts only to change the layout inside a slot.
155
+ - The heading is the page's `h1`. Pages that already have an `h1` can use `Hero.Heading component="h2"` through composition.
156
+ - Badges or tags next to the heading go beside `Hero.Heading` (see Composition), not inside it.
157
+ - Any animation in the illustration belongs to the consumer's artwork, including its `prefers-reduced-motion` handling.