@dnanpm/ui-components 0.4.0 → 0.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 (70) hide show
  1. package/README.md +3 -1
  2. package/dist/components/Accordion/Accordion.css +4 -4
  3. package/dist/components/Accordion/Accordion.module.css.cjs +3 -3
  4. package/dist/components/Accordion/Accordion.module.css.js +3 -3
  5. package/dist/components/AccordionItem/AccordionItem.css +18 -18
  6. package/dist/components/AccordionItem/AccordionItem.module.css.cjs +11 -11
  7. package/dist/components/AccordionItem/AccordionItem.module.css.js +11 -11
  8. package/dist/components/Breadcrumb/Breadcrumb.css +11 -12
  9. package/dist/components/Breadcrumb/Breadcrumb.module.css.cjs +6 -6
  10. package/dist/components/Breadcrumb/Breadcrumb.module.css.js +6 -6
  11. package/dist/components/Button/Button.cjs +3 -1
  12. package/dist/components/Button/Button.cjs.map +1 -1
  13. package/dist/components/Button/Button.css +33 -33
  14. package/dist/components/Button/Button.d.ts.map +1 -1
  15. package/dist/components/Button/Button.js +3 -1
  16. package/dist/components/Button/Button.js.map +1 -1
  17. package/dist/components/Button/Button.module.css.cjs +11 -11
  18. package/dist/components/Button/Button.module.css.js +11 -11
  19. package/dist/components/Hero/Hero.cjs +29 -38
  20. package/dist/components/Hero/Hero.cjs.map +1 -1
  21. package/dist/components/Hero/Hero.css +64 -60
  22. package/dist/components/Hero/Hero.d.ts.map +1 -1
  23. package/dist/components/Hero/Hero.js +29 -38
  24. package/dist/components/Hero/Hero.js.map +1 -1
  25. package/dist/components/Hero/Hero.module.css.cjs +20 -19
  26. package/dist/components/Hero/Hero.module.css.cjs.map +1 -1
  27. package/dist/components/Hero/Hero.module.css.js +20 -19
  28. package/dist/components/Hero/Hero.module.css.js.map +1 -1
  29. package/dist/components/Hero/Hero.types.d.ts +1 -5
  30. package/dist/components/Hero/Hero.types.d.ts.map +1 -1
  31. package/dist/components/Hero/Hero.utils.cjs +2 -1
  32. package/dist/components/Hero/Hero.utils.cjs.map +1 -1
  33. package/dist/components/Hero/Hero.utils.d.ts.map +1 -1
  34. package/dist/components/Hero/Hero.utils.js +2 -1
  35. package/dist/components/Hero/Hero.utils.js.map +1 -1
  36. package/dist/components/IconButton/IconButton.cjs +123 -0
  37. package/dist/components/IconButton/IconButton.cjs.map +1 -0
  38. package/dist/components/IconButton/IconButton.css +181 -0
  39. package/dist/components/IconButton/IconButton.d.ts +3 -0
  40. package/dist/components/IconButton/IconButton.d.ts.map +1 -0
  41. package/dist/components/IconButton/IconButton.js +123 -0
  42. package/dist/components/IconButton/IconButton.js.map +1 -0
  43. package/dist/components/IconButton/IconButton.module.css.cjs +15 -0
  44. package/dist/components/IconButton/IconButton.module.css.cjs.map +1 -0
  45. package/dist/components/IconButton/IconButton.module.css.js +16 -0
  46. package/dist/components/IconButton/IconButton.module.css.js.map +1 -0
  47. package/dist/components/IconButton/IconButton.types.d.ts +57 -0
  48. package/dist/components/IconButton/IconButton.types.d.ts.map +1 -0
  49. package/dist/components/IconButton/index.d.ts +3 -0
  50. package/dist/components/IconButton/index.d.ts.map +1 -0
  51. package/dist/components/Label/Label.css +13 -8
  52. package/dist/components/Label/Label.module.css.cjs +7 -7
  53. package/dist/components/Label/Label.module.css.js +7 -7
  54. package/dist/components/Notification/Notification.css +14 -14
  55. package/dist/components/Notification/Notification.module.css.cjs +9 -9
  56. package/dist/components/Notification/Notification.module.css.js +9 -9
  57. package/dist/index.cjs +2 -0
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/index.d.ts +2 -0
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +2 -0
  62. package/dist/index.js.map +1 -1
  63. package/dist/styles/utils/elevation.css +20 -17
  64. package/dist/styles/utils/elevation.module.css.cjs +4 -4
  65. package/dist/styles/utils/elevation.module.css.js +4 -4
  66. package/dist/styles/utils/focus.css +14 -14
  67. package/dist/styles/utils/focus.module.css.cjs +3 -3
  68. package/dist/styles/utils/focus.module.css.js +3 -3
  69. package/dist/styles.css +117 -85
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, MouseEvent, ReactNode, Ref } from 'react';\nimport { cn } from '../../utils/cn';\nimport focusStyles from '../../styles/utils/focus.module.css';\nimport styles from './Button.module.css';\nimport { Spinner } from '../Spinner';\nimport type { ButtonProps } from './Button.types';\n\nexport const Button = ({\n variant = 'primary',\n fullWidth = false,\n size = 'normal',\n loading = false,\n className,\n children,\n ref,\n ...props\n}: ButtonProps) => {\n const isDisabled = 'disabled' in props && props.disabled;\n const isAnchor = 'href' in props && props.href != null;\n\n const classes = cn(\n styles.button,\n styles[`button--${variant}`],\n { [styles['button--full-width']]: fullWidth },\n styles[`button--${size}`],\n focusStyles.focusable,\n { [styles['button--disabled']]: isDisabled },\n { [styles['button--loading']]: loading },\n className,\n );\n\n const content = (\n <>\n <span className={styles.button__content}>{children}</span>\n {loading && (\n <Spinner\n size={size === 'small' ? 'xs' : 's'}\n color=\"inherit\"\n aria-hidden=\"true\"\n aria-label={undefined}\n role=\"presentation\"\n className={styles.button__spinner}\n />\n )}\n </>\n );\n\n if (isAnchor) {\n const { href, renderLink, ...anchorProps } = props as Omit<\n typeof props,\n 'variant' | 'size' | 'loading'\n > & {\n href: string;\n renderLink?: (\n props: AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n children: ReactNode;\n },\n ) => ReactNode;\n };\n\n const {\n disabled: _disabled,\n type: _type,\n name: _name,\n ...safeAnchorProps\n } = anchorProps as typeof anchorProps & {\n disabled?: boolean;\n type?: 'button' | 'submit' | 'reset';\n name?: string;\n };\n\n const target = safeAnchorProps.target;\n const rel = safeAnchorProps.rel;\n const shouldHardenRel = target === '_blank';\n const relTokens = new Set((rel ?? '').split(/\\s+/).filter(Boolean));\n\n if (shouldHardenRel) {\n relTokens.add('noopener');\n relTokens.add('noreferrer');\n }\n\n const hardenedRel = relTokens.size > 0 ? Array.from(relTokens).join(' ') : undefined;\n\n const linkProps = {\n ...safeAnchorProps,\n ref: ref as Ref<HTMLAnchorElement>,\n href,\n rel: hardenedRel,\n className: classes,\n 'aria-busy': loading || undefined,\n 'aria-disabled': loading || undefined,\n tabIndex: loading ? -1 : undefined,\n onClick: loading\n ? (e: MouseEvent<HTMLAnchorElement>) => {\n e.preventDefault();\n e.stopPropagation();\n }\n : safeAnchorProps.onClick,\n children: content,\n };\n\n if (renderLink) {\n return <>{renderLink(linkProps)}</>;\n }\n\n return <a {...linkProps} />;\n }\n\n const {\n type = 'button',\n disabled,\n href: _href,\n target: _target,\n rel: _rel,\n renderLink: _renderLink,\n ...buttonProps\n } = props as Omit<typeof props, 'variant' | 'size' | 'loading' | 'href'> & {\n type?: 'button' | 'submit' | 'reset';\n disabled?: boolean;\n href?: string;\n target?: string;\n rel?: string;\n renderLink?: unknown;\n };\n\n return (\n <button\n ref={ref as Ref<HTMLButtonElement>}\n type={type}\n disabled={disabled || loading}\n className={classes}\n aria-busy={loading || undefined}\n {...buttonProps}\n >\n {content}\n </button>\n );\n};\n"],"names":[],"mappings":";;;;;AAOO,MAAM,SAAS,CAAC;AAAA,EACnB,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACP,MAAmB;AACf,QAAM,aAAa,cAAc,SAAS,MAAM;AAChD,QAAM,WAAW,UAAU,SAAS,MAAM,QAAQ;AAElD,QAAM,UAAU;AAAA,IACZ,OAAO;AAAA,IACP,OAAO,WAAW,OAAO,EAAE;AAAA,IAC3B,EAAE,CAAC,OAAO,oBAAoB,CAAC,GAAG,UAAA;AAAA,IAClC,OAAO,WAAW,IAAI,EAAE;AAAA,IACxB,YAAY;AAAA,IACZ,EAAE,CAAC,OAAO,kBAAkB,CAAC,GAAG,WAAA;AAAA,IAChC,EAAE,CAAC,OAAO,iBAAiB,CAAC,GAAG,QAAA;AAAA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AG,UAAA,CAAW;AAAA,EAC7B;AAEA,QAAM;AAAA,IACF,OAAO;AAAA,IACP;AAAA,IACA,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,KAAK;AAAA,IACL,YAAY;AAAA,IACZ,GAAG;AAAA,EAAA,IACH;AASJ,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACG;AAAA,MACA;AAAA,MACA,UAAU,YAAY;AAAA,MACtB,WAAW;AAAA,MACX,aAAW,WAAW;AAAA,MACrB,GAAG;AAAA,MAEH,UAAA;AAAA,IAAA;AAAA,EAAA;AAGb;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, MouseEvent, ReactNode, Ref } from 'react';\nimport { cn } from '../../utils/cn';\nimport focusStyles from '../../styles/utils/focus.module.css';\nimport styles from './Button.module.css';\nimport { Spinner } from '../Spinner';\nimport type { ButtonProps } from './Button.types';\n\nexport const Button = ({\n variant = 'primary',\n fullWidth = false,\n size = 'normal',\n loading = false,\n className,\n children,\n ref,\n ...props\n}: ButtonProps) => {\n const isDisabled = 'disabled' in props && props.disabled;\n const isAnchor = 'href' in props && props.href != null;\n\n const classes = cn(\n styles.button,\n styles[`button--${variant}`],\n { [styles['button--full-width']]: fullWidth },\n styles[`button--${size}`],\n focusStyles.focusable,\n { [styles['button--disabled']]: isDisabled },\n { [styles['button--loading']]: loading },\n className,\n );\n\n const content = (\n <>\n <span className={styles.button__content}>{children}</span>\n {loading && (\n <Spinner\n size={size === 'small' ? 'xs' : 's'}\n color=\"inherit\"\n aria-hidden=\"true\"\n aria-label={undefined}\n role=\"presentation\"\n className={styles.button__spinner}\n />\n )}\n </>\n );\n\n if (isAnchor) {\n const { href, renderLink, ...anchorProps } = props as Omit<\n typeof props,\n 'variant' | 'size' | 'loading'\n > & {\n href: string;\n renderLink?: (\n props: AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n children: ReactNode;\n },\n ) => ReactNode;\n };\n\n const {\n disabled: _disabled,\n type: _type,\n name: _name,\n ...safeAnchorProps\n } = anchorProps as typeof anchorProps & {\n disabled?: boolean;\n type?: 'button' | 'submit' | 'reset';\n name?: string;\n };\n\n const target = safeAnchorProps.target;\n const rel = safeAnchorProps.rel;\n const shouldHardenRel = target === '_blank';\n const relTokens = new Set(\n (rel ?? '')\n .split(/\\s+/)\n .filter(Boolean)\n .map((token) => token.toLowerCase()),\n );\n\n if (shouldHardenRel) {\n relTokens.add('noopener');\n relTokens.add('noreferrer');\n }\n\n const hardenedRel = relTokens.size > 0 ? Array.from(relTokens).join(' ') : undefined;\n\n const linkProps = {\n ...safeAnchorProps,\n ref: ref as Ref<HTMLAnchorElement>,\n href,\n rel: hardenedRel,\n className: classes,\n 'aria-busy': loading || undefined,\n 'aria-disabled': loading || undefined,\n tabIndex: loading ? -1 : undefined,\n onClick: loading\n ? (e: MouseEvent<HTMLAnchorElement>) => {\n e.preventDefault();\n e.stopPropagation();\n }\n : safeAnchorProps.onClick,\n children: content,\n };\n\n if (renderLink) {\n return <>{renderLink(linkProps)}</>;\n }\n\n return <a {...linkProps} />;\n }\n\n const {\n type = 'button',\n disabled,\n href: _href,\n target: _target,\n rel: _rel,\n renderLink: _renderLink,\n ...buttonProps\n } = props as Omit<typeof props, 'variant' | 'size' | 'loading' | 'href'> & {\n type?: 'button' | 'submit' | 'reset';\n disabled?: boolean;\n href?: string;\n target?: string;\n rel?: string;\n renderLink?: unknown;\n };\n\n return (\n <button\n ref={ref as Ref<HTMLButtonElement>}\n type={type}\n disabled={disabled || loading}\n className={classes}\n aria-busy={loading || undefined}\n {...buttonProps}\n >\n {content}\n </button>\n );\n};\n"],"names":[],"mappings":";;;;;AAOO,MAAM,SAAS,CAAC;AAAA,EACnB,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACP,MAAmB;AACf,QAAM,aAAa,cAAc,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AY;AAAA,MACd,GAAG;AAAA,MACH;AAAA,MACA;AAAA,MACA,KAAK;AAAA,MACL,WAAW;AAAA,MACX,aAAa,WAAW;AAAA,MACxB,iBAAiB,WAAW;AAAA,MAC5B,UAAU,UAAU,KAAK;AAAA,MACzB,SAAS,UACH,CAAC,MAAqC;AAClC,UAAE,eAAA;AACF,UAAE,gBAAA;AAAA,MACN,IACA,gBAAgB;AAAA,MACtB,UAAU;AAAA,IAAA;AAGd,QAAI,YAAY;AACZ,aAAO,oBAAA,UAAA,EAAG,UAAA,WAAW,SAAS,GAAE;AAAA,IACpC;AAEA,WAAO,oBAAC,KAAA,EAAG,GAAG,UAAA,CAAW;AAAA,EAC7B;AAEA,QAAM;AAAA,IACF,OAAO;AAAA,IACP;AAAA,IACA,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,KAAK;AAAA,IACL,YAAY;AAAA,IACZ,GAAG;AAAA,EAAA,IACH;AASJ,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACG;AAAA,MACA;AAAA,MACA,UAAU,YAAY;AAAA,MACtB,WAAW;AAAA,MACX,aAAW,WAAW;AAAA,MACrB,GAAG;AAAA,MAEH,UAAA;AAAA,IAAA;AAAA,EAAA;AAGb;"}
@@ -1,19 +1,19 @@
1
1
  require('./Button.css');
2
2
  "use strict";
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
4
- const button = "_button_1nsz1_1";
5
- const button__content = "_button__content_1nsz1_177";
6
- const button__spinner = "_button__spinner_1nsz1_185";
4
+ const button = "_button_tpbgh_1";
5
+ const button__content = "_button__content_tpbgh_177";
6
+ const button__spinner = "_button__spinner_tpbgh_185";
7
7
  const styles = {
8
8
  button,
9
- "button--full-width": "_button--full-width_1nsz1_18",
10
- "button--normal": "_button--normal_1nsz1_25",
11
- "button--small": "_button--small_1nsz1_32",
12
- "button--primary": "_button--primary_1nsz1_41",
13
- "button--secondary": "_button--secondary_1nsz1_63",
14
- "button--tertiary": "_button--tertiary_1nsz1_88",
15
- "button--disabled": "_button--disabled_1nsz1_111",
16
- "button--loading": "_button--loading_1nsz1_173",
9
+ "button--full-width": "_button--full-width_tpbgh_18",
10
+ "button--normal": "_button--normal_tpbgh_25",
11
+ "button--small": "_button--small_tpbgh_32",
12
+ "button--primary": "_button--primary_tpbgh_41",
13
+ "button--secondary": "_button--secondary_tpbgh_63",
14
+ "button--tertiary": "_button--tertiary_tpbgh_88",
15
+ "button--disabled": "_button--disabled_tpbgh_111",
16
+ "button--loading": "_button--loading_tpbgh_173",
17
17
  button__content,
18
18
  button__spinner
19
19
  };
@@ -1,17 +1,17 @@
1
1
  import './Button.css';
2
- const button = "_button_1nsz1_1";
3
- const button__content = "_button__content_1nsz1_177";
4
- const button__spinner = "_button__spinner_1nsz1_185";
2
+ const button = "_button_tpbgh_1";
3
+ const button__content = "_button__content_tpbgh_177";
4
+ const button__spinner = "_button__spinner_tpbgh_185";
5
5
  const styles = {
6
6
  button,
7
- "button--full-width": "_button--full-width_1nsz1_18",
8
- "button--normal": "_button--normal_1nsz1_25",
9
- "button--small": "_button--small_1nsz1_32",
10
- "button--primary": "_button--primary_1nsz1_41",
11
- "button--secondary": "_button--secondary_1nsz1_63",
12
- "button--tertiary": "_button--tertiary_1nsz1_88",
13
- "button--disabled": "_button--disabled_1nsz1_111",
14
- "button--loading": "_button--loading_1nsz1_173",
7
+ "button--full-width": "_button--full-width_tpbgh_18",
8
+ "button--normal": "_button--normal_tpbgh_25",
9
+ "button--small": "_button--small_tpbgh_32",
10
+ "button--primary": "_button--primary_tpbgh_41",
11
+ "button--secondary": "_button--secondary_tpbgh_63",
12
+ "button--tertiary": "_button--tertiary_tpbgh_88",
13
+ "button--disabled": "_button--disabled_tpbgh_111",
14
+ "button--loading": "_button--loading_tpbgh_173",
15
15
  button__content,
16
16
  button__spinner
17
17
  };
@@ -30,45 +30,36 @@ const Hero = ({
30
30
  const hasActions = primaryCta != null || secondaryCta != null;
31
31
  const backgroundStyle = image == null && backgroundColor != null ? { backgroundColor } : void 0;
32
32
  const HeadingLevel = headingLevel;
33
- return /* @__PURE__ */ jsxRuntime.jsxs(
34
- "div",
35
- {
36
- ref,
37
- ...props,
38
- className: cn.cn(Hero_module.default.hero, className),
39
- "data-testid": props["data-testid"],
40
- children: [
41
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Hero_module.default.hero__background, style: backgroundStyle, children: [
42
- image != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: Hero_module.default.hero__backgroundImageComponent, "aria-hidden": "true", children: image }),
43
- logoImage != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: Hero_module.default.hero__logoImage, "aria-hidden": "true", children: logoImage }),
44
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: Hero_module.default.hero__overlay, "aria-hidden": "true" })
33
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, ...props, className: cn.cn(Hero_module.default.hero, className), children: [
34
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Hero_module.default.hero__background, style: backgroundStyle, children: [
35
+ image != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: Hero_module.default.hero__backgroundImageComponent, "aria-hidden": "true", children: image }),
36
+ logoImage != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: Hero_module.default.hero__logoImage, "aria-hidden": "true", children: logoImage }),
37
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: Hero_module.default.hero__overlay, "aria-hidden": "true" })
38
+ ] }),
39
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: Hero_module.default.hero__content, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn.cn(Hero_module.default.hero__card, elevation_module.default.elevationHigh), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Hero_module.default.hero__main, children: [
40
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Hero_module.default.hero__text, children: [
41
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Hero_module.default.hero__header, children: [
42
+ label != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: Hero_module.default.hero__label, children: label }),
43
+ /* @__PURE__ */ jsxRuntime.jsx(
44
+ HeadingLevel,
45
+ {
46
+ id: headingId,
47
+ className: cn.cn(
48
+ Hero_module.default.hero__heading,
49
+ Hero_utils.headingClassByLevel[headingLevel]
50
+ ),
51
+ children: heading
52
+ }
53
+ )
45
54
  ] }),
46
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: Hero_module.default.hero__content, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn.cn(Hero_module.default.hero__card, elevation_module.default.elevationExtraHigh), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Hero_module.default.hero__main, children: [
47
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Hero_module.default.hero__text, children: [
48
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Hero_module.default.hero__header, children: [
49
- label != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: Hero_module.default.hero__label, children: label }),
50
- /* @__PURE__ */ jsxRuntime.jsx(
51
- HeadingLevel,
52
- {
53
- id: headingId,
54
- className: cn.cn(
55
- Hero_module.default.hero__heading,
56
- Hero_utils.headingClassByLevel[headingLevel]
57
- ),
58
- children: heading
59
- }
60
- )
61
- ] }),
62
- description != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn.cn(Hero_module.default.hero__description, "dds-prose"), children: description })
63
- ] }),
64
- hasActions && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Hero_module.default.hero__actions, children: [
65
- primaryCta != null && primaryCta,
66
- secondaryCta != null && secondaryCta
67
- ] })
68
- ] }) }) })
69
- ]
70
- }
71
- );
55
+ description != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn.cn(Hero_module.default.hero__description, "dds-prose"), children: description })
56
+ ] }),
57
+ hasActions && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Hero_module.default.hero__actions, children: [
58
+ primaryCta != null && primaryCta,
59
+ secondaryCta != null && secondaryCta
60
+ ] })
61
+ ] }) }) })
62
+ ] });
72
63
  };
73
64
  exports.Hero = Hero;
74
65
  //# sourceMappingURL=Hero.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Hero.cjs","sources":["../../../src/components/Hero/Hero.tsx"],"sourcesContent":["import { useId } from 'react';\nimport { cn } from '../../utils/cn';\nimport elevationStyles from '../../styles/utils/elevation.module.css';\nimport styles from './Hero.module.css';\nimport type { HeroProps } from './Hero.types';\nimport { headingClassByLevel } from './Hero.utils';\n\nexport const Hero = ({\n label,\n heading,\n description,\n headingLevel = 'h1',\n Image,\n imageProps,\n LogoImage,\n logoImageProps,\n backgroundColor,\n primaryCta,\n secondaryCta,\n className,\n ref,\n ...props\n}: HeroProps) => {\n const headingId = useId();\n\n const ResolvedImage = Image ?? (imageProps != null ? 'img' : undefined);\n const ResolvedLogoImage = LogoImage ?? (logoImageProps != null ? 'img' : undefined);\n const image = ResolvedImage != null ? <ResolvedImage {...imageProps} /> : undefined;\n const logoImage =\n ResolvedLogoImage != null ? <ResolvedLogoImage {...logoImageProps} /> : undefined;\n\n const hasActions = primaryCta != null || secondaryCta != null;\n const backgroundStyle =\n image == null && backgroundColor != null ? { backgroundColor } : undefined;\n const HeadingLevel = headingLevel;\n\n return (\n <div\n ref={ref}\n {...props}\n className={cn(styles.hero, className)}\n data-testid={props['data-testid']}\n >\n <div className={styles.hero__background} style={backgroundStyle}>\n {image != null && (\n <div className={styles.hero__backgroundImageComponent} aria-hidden=\"true\">\n {image}\n </div>\n )}\n {logoImage != null && (\n <div className={styles.hero__logoImage} aria-hidden=\"true\">\n {logoImage}\n </div>\n )}\n <div className={styles.hero__overlay} aria-hidden=\"true\" />\n </div>\n\n <div className={styles.hero__content}>\n <div className={cn(styles.hero__card, elevationStyles.elevationExtraHigh)}>\n <div className={styles.hero__main}>\n <div className={styles.hero__text}>\n <div className={styles.hero__header}>\n {label != null && <div className={styles.hero__label}>{label}</div>}\n <HeadingLevel\n id={headingId}\n className={cn(\n styles.hero__heading,\n headingClassByLevel[headingLevel],\n )}\n >\n {heading}\n </HeadingLevel>\n </div>\n {description != null && (\n <div className={cn(styles.hero__description, 'dds-prose')}>\n {description}\n </div>\n )}\n </div>\n\n {hasActions && (\n <div className={styles.hero__actions}>\n {primaryCta != null && primaryCta}\n {secondaryCta != null && secondaryCta}\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n );\n};\n"],"names":["useId","jsxs","cn","styles","jsx","elevationStyles","headingClassByLevel"],"mappings":";;;;;;;;AAOO,MAAM,OAAO,CAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACP,MAAiB;AACb,QAAM,YAAYA,MAAAA,MAAA;AAElB,QAAM,gBAAgB,UAAU,cAAc,OAAO,QAAQ;AAC7D,QAAM,oBAAoB,cAAc,kBAAkB,OAAO,QAAQ;AACzE,QAAM,QAAQ,iBAAiB,sCAAQ,eAAA,EAAe,GAAG,YAAY,IAAK;AAC1E,QAAM,YACF,qBAAqB,sCAAQ,mBAAA,EAAmB,GAAG,gBAAgB,IAAK;AAE5E,QAAM,aAAa,cAAc,QAAQ,gBAAgB;AACzD,QAAM,kBACF,SAAS,QAAQ,mBAAmB,OAAO,EAAE,oBAAoB;AACrE,QAAM,eAAe;AAErB,SACIC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACG;AAAA,MACC,GAAG;AAAA,MACJ,WAAWC,GAAAA,GAAGC,oBAAO,MAAM,SAAS;AAAA,MACpC,eAAa,MAAM,aAAa;AAAA,MAEhC,UAAA;AAAA,QAAAF,gCAAC,OAAA,EAAI,WAAWE,YAAAA,QAAO,kBAAkB,OAAO,iBAC3C,UAAA;AAAA,UAAA,SAAS,uCACL,OAAA,EAAI,WAAWA,oBAAO,gCAAgC,eAAY,QAC9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"file":"Hero.cjs","sources":["../../../src/components/Hero/Hero.tsx"],"sourcesContent":["import { useId } from 'react';\nimport { cn } from '../../utils/cn';\nimport elevationStyles from '../../styles/utils/elevation.module.css';\nimport styles from './Hero.module.css';\nimport type { HeroProps } from './Hero.types';\nimport { headingClassByLevel } from './Hero.utils';\n\nexport const Hero = ({\n label,\n heading,\n description,\n headingLevel = 'h1',\n Image,\n imageProps,\n LogoImage,\n logoImageProps,\n backgroundColor,\n primaryCta,\n secondaryCta,\n className,\n ref,\n ...props\n}: HeroProps) => {\n const headingId = useId();\n\n const ResolvedImage = Image ?? (imageProps != null ? 'img' : undefined);\n const ResolvedLogoImage = LogoImage ?? (logoImageProps != null ? 'img' : undefined);\n const image = ResolvedImage != null ? <ResolvedImage {...imageProps} /> : undefined;\n const logoImage =\n ResolvedLogoImage != null ? <ResolvedLogoImage {...logoImageProps} /> : undefined;\n\n const hasActions = primaryCta != null || secondaryCta != null;\n const backgroundStyle =\n image == null && backgroundColor != null ? { backgroundColor } : undefined;\n const HeadingLevel = headingLevel;\n\n return (\n <div ref={ref} {...props} className={cn(styles.hero, className)}>\n <div className={styles.hero__background} style={backgroundStyle}>\n {image != null && (\n <div className={styles.hero__backgroundImageComponent} aria-hidden=\"true\">\n {image}\n </div>\n )}\n {logoImage != null && (\n <div className={styles.hero__logoImage} aria-hidden=\"true\">\n {logoImage}\n </div>\n )}\n <div className={styles.hero__overlay} aria-hidden=\"true\" />\n </div>\n\n <div className={styles.hero__content}>\n <div className={cn(styles.hero__card, elevationStyles.elevationHigh)}>\n <div className={styles.hero__main}>\n <div className={styles.hero__text}>\n <div className={styles.hero__header}>\n {label != null && <div className={styles.hero__label}>{label}</div>}\n <HeadingLevel\n id={headingId}\n className={cn(\n styles.hero__heading,\n headingClassByLevel[headingLevel],\n )}\n >\n {heading}\n </HeadingLevel>\n </div>\n {description != null && (\n <div className={cn(styles.hero__description, 'dds-prose')}>\n {description}\n </div>\n )}\n </div>\n\n {hasActions && (\n <div className={styles.hero__actions}>\n {primaryCta != null && primaryCta}\n {secondaryCta != null && secondaryCta}\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n );\n};\n"],"names":["useId","jsxs","cn","styles","jsx","elevationStyles","headingClassByLevel"],"mappings":";;;;;;;;AAOO,MAAM,OAAO,CAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACP,MAAiB;AACb,QAAM,YAAYA,MAAAA,MAAA;AAElB,QAAM,gBAAgB,UAAU,cAAc,OAAO,QAAQ;AAC7D,QAAM,oBAAoB,cAAc,kBAAkB,OAAO,QAAQ;AACzE,QAAM,QAAQ,iBAAiB,sCAAQ,eAAA,EAAe,GAAG,YAAY,IAAK;AAC1E,QAAM,YACF,qBAAqB,sCAAQ,mBAAA,EAAmB,GAAG,gBAAgB,IAAK;AAE5E,QAAM,aAAa,cAAc,QAAQ,gBAAgB;AACzD,QAAM,kBACF,SAAS,QAAQ,mBAAmB,OAAO,EAAE,oBAAoB;AACrE,QAAM,eAAe;AAErB,SACIC,gCAAC,OAAA,EAAI,KAAW,GAAG,OAAO,WAAWC,GAAAA,GAAGC,YAAAA,QAAO,MAAM,SAAS,GAC1D,UAAA;AAAA,IAAAF,gCAAC,OAAA,EAAI,WAAWE,YAAAA,QAAO,kBAAkB,OAAO,iBAC3C,UAAA;AAAA,MAAA,SAAS,uCACL,OAAA,EAAI,WAAWA,oBAAO,gCAAgC,eAAY,QAC9D,UAAA,MAAA,CACL;AAAA,MAEH,aAAa,QACVC,+BAAC,OAAA,EAAI,WAAWD,oBAAO,iBAAiB,eAAY,QAC/C,UAAA,UAAA,CACL;AAAA,qCAEH,OAAA,EAAI,WAAWA,YAAAA,QAAO,eAAe,eAAY,OAAA,CAAO;AAAA,IAAA,GAC7D;AAAA,mCAEC,OAAA,EAAI,WAAWA,oBAAO,eACnB,UAAAC,+BAAC,SAAI,WAAWF,GAAAA,GAAGC,oBAAO,YAAYE,iBAAAA,QAAgB,aAAa,GAC/D,0CAAC,OAAA,EAAI,WAAWF,oBAAO,YACnB,UAAA;AAAA,MAAAF,2BAAAA,KAAC,OAAA,EAAI,WAAWE,YAAAA,QAAO,YACnB,UAAA;AAAA,QAAAF,2BAAAA,KAAC,OAAA,EAAI,WAAWE,YAAAA,QAAO,cAClB,UAAA;AAAA,UAAA,SAAS,QAAQC,2BAAAA,IAAC,OAAA,EAAI,WAAWD,YAAAA,QAAO,aAAc,UAAA,OAAM;AAAA,UAC7DC,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACG,IAAI;AAAA,cACJ,WAAWF,GAAAA;AAAAA,gBACPC,YAAAA,QAAO;AAAA,gBACPG,WAAAA,oBAAoB,YAAY;AAAA,cAAA;AAAA,cAGnC,UAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACL,GACJ;AAAA,QACC,eAAe,QACZF,+BAAC,OAAA,EAAI,WAAWF,MAAGC,YAAAA,QAAO,mBAAmB,WAAW,GACnD,UAAA,YAAA,CACL;AAAA,MAAA,GAER;AAAA,MAEC,cACGF,2BAAAA,KAAC,OAAA,EAAI,WAAWE,YAAAA,QAAO,eAClB,UAAA;AAAA,QAAA,cAAc,QAAQ;AAAA,QACtB,gBAAgB,QAAQ;AAAA,MAAA,EAAA,CAC7B;AAAA,IAAA,EAAA,CAER,GACJ,EAAA,CACJ;AAAA,EAAA,GACJ;AAER;;"}
@@ -1,14 +1,14 @@
1
- @layer dds-components {._hero_905ff_1 {
1
+ @layer dds-components {._hero_c98qx_1 {
2
2
  position: relative;
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  width: 100%;
6
- padding-top: var(--spacing-ui-xxxl);
6
+ padding-top: var(--spacing-space-40);
7
7
  container-name: hero;
8
8
  container-type: inline-size;
9
9
  }
10
10
 
11
- ._hero__background_905ff_11 {
11
+ ._hero__background_c98qx_11 {
12
12
  position: absolute;
13
13
  inset-inline: 0;
14
14
  top: 0;
@@ -17,21 +17,21 @@
17
17
  overflow: clip;
18
18
  }
19
19
 
20
- ._hero__backgroundImageComponent_905ff_20 {
20
+ ._hero__backgroundImageComponent_c98qx_20 {
21
21
  width: 100%;
22
22
  height: 100%;
23
23
  }
24
24
 
25
- ._hero__backgroundImageComponent_905ff_20 > * {
25
+ ._hero__backgroundImageComponent_c98qx_20 > * {
26
26
  width: 100%;
27
27
  height: 100%;
28
28
  }
29
29
 
30
- ._hero__backgroundImageComponent_905ff_20 img,
31
- ._hero__backgroundImageComponent_905ff_20 picture,
32
- ._hero__backgroundImageComponent_905ff_20 video,
33
- ._hero__backgroundImageComponent_905ff_20 canvas,
34
- ._hero__backgroundImageComponent_905ff_20 svg {
30
+ ._hero__backgroundImageComponent_c98qx_20 img,
31
+ ._hero__backgroundImageComponent_c98qx_20 picture,
32
+ ._hero__backgroundImageComponent_c98qx_20 video,
33
+ ._hero__backgroundImageComponent_c98qx_20 canvas,
34
+ ._hero__backgroundImageComponent_c98qx_20 svg {
35
35
  display: block;
36
36
  width: 100%;
37
37
  height: 100%;
@@ -39,7 +39,7 @@
39
39
  object-position: right center;
40
40
  }
41
41
 
42
- ._hero__logoImage_905ff_42 {
42
+ ._hero__logoImage_c98qx_42 {
43
43
  position: absolute;
44
44
  inset-inline: 0;
45
45
  bottom: 0;
@@ -49,18 +49,18 @@
49
49
  width: min(100%, 1280px);
50
50
  height: 100%;
51
51
  margin-inline: auto;
52
- padding-left: var(--spacing-layout-lg);
53
- padding-right: var(--spacing-ui-xxxl);
54
- padding-bottom: var(--spacing-ui-lg);
52
+ padding-left: var(--spacing-space-80);
53
+ padding-right: var(--spacing-space-40);
54
+ padding-bottom: var(--spacing-space-20);
55
55
  }
56
56
 
57
- ._hero__logoImage_905ff_42 > * {
57
+ ._hero__logoImage_c98qx_42 > * {
58
58
  width: min(430px, 43vw);
59
59
  max-width: 100%;
60
60
  height: auto;
61
61
  }
62
62
 
63
- ._hero__overlay_905ff_63 {
63
+ ._hero__overlay_c98qx_63 {
64
64
  position: absolute;
65
65
  inset-inline: 0;
66
66
  bottom: 0;
@@ -72,7 +72,7 @@
72
72
  );
73
73
  }
74
74
 
75
- ._hero__content_905ff_75 {
75
+ ._hero__content_c98qx_75 {
76
76
  position: relative;
77
77
  z-index: 1;
78
78
  display: flex;
@@ -80,14 +80,14 @@
80
80
  align-items: flex-end;
81
81
  justify-content: flex-start;
82
82
  max-width: 1280px;
83
- gap: var(--spacing-ui-xxxl);
83
+ gap: var(--spacing-space-40);
84
84
  width: 100%;
85
85
  margin-inline: auto;
86
- padding-left: var(--spacing-layout-lg);
87
- padding-right: var(--spacing-ui-xxxl);
86
+ padding-left: var(--spacing-space-80);
87
+ padding-right: var(--spacing-space-40);
88
88
  }
89
89
 
90
- ._hero__card_905ff_90 {
90
+ ._hero__card_c98qx_90 {
91
91
  flex: 0 0 650px;
92
92
  width: 650px;
93
93
  min-width: 0;
@@ -95,150 +95,154 @@
95
95
  background-color: var(--color-semantic-surface-base);
96
96
  border: var(--borderwidth-semantic-xs) solid var(--color-semantic-border-neutral-base);
97
97
  border-radius: var(--radius-semantic-md);
98
- padding: var(--spacing-ui-xxxl);
98
+ padding: var(--spacing-space-40);
99
99
  }
100
100
 
101
- ._hero__main_905ff_101 {
101
+ ._hero__main_c98qx_101 {
102
102
  display: flex;
103
103
  flex-direction: column;
104
- gap: var(--spacing-ui-xxxl);
104
+ gap: var(--spacing-space-40);
105
105
  }
106
106
 
107
- ._hero__text_905ff_107 {
107
+ ._hero__text_c98qx_107 {
108
108
  display: flex;
109
109
  flex-direction: column;
110
- gap: var(--spacing-ui-lg);
110
+ gap: var(--spacing-space-20);
111
111
  }
112
112
 
113
- ._hero__header_905ff_113 {
113
+ ._hero__header_c98qx_113 {
114
114
  display: flex;
115
115
  flex-direction: column;
116
- gap: var(--spacing-ui-xs);
116
+ gap: var(--spacing-space-8);
117
117
  }
118
118
 
119
- ._hero__label_905ff_119 {
119
+ ._hero__label_c98qx_119 {
120
120
  align-self: flex-start;
121
121
  }
122
122
 
123
- ._hero__heading_905ff_123 {
123
+ ._hero__heading_c98qx_123 {
124
124
  margin: 0;
125
125
  color: var(--color-semantic-foreground-default);
126
126
  text-wrap: balance;
127
127
  }
128
128
 
129
- ._hero__heading--xl_905ff_129 {
129
+ ._hero__heading--xl_c98qx_129 {
130
130
  font: var(--typography-heading-xl);
131
131
  }
132
132
 
133
- ._hero__heading--lg_905ff_133 {
133
+ ._hero__heading--lg_c98qx_133 {
134
134
  font: var(--typography-heading-lg);
135
135
  }
136
136
 
137
- ._hero__heading--md_905ff_137 {
137
+ ._hero__heading--md_c98qx_137 {
138
138
  font: var(--typography-heading-md);
139
139
  }
140
140
 
141
- ._hero__heading--sm_905ff_141 {
141
+ ._hero__heading--sm_c98qx_141 {
142
142
  font: var(--typography-heading-sm);
143
143
  }
144
144
 
145
- ._hero__heading--xs_905ff_145 {
145
+ ._hero__heading--xs_c98qx_145 {
146
146
  font: var(--typography-heading-xs);
147
147
  }
148
148
 
149
- ._hero__description_905ff_149 {
149
+ ._hero__heading--xxs_c98qx_149 {
150
+ font: var(--typography-heading-xxs);
151
+ }
152
+
153
+ ._hero__description_c98qx_153 {
150
154
  margin: 0;
151
155
  color: var(--color-semantic-foreground-default);
152
156
  font: var(--typography-body-lg);
153
157
  text-wrap: pretty;
154
158
  }
155
159
 
156
- ._hero__description_905ff_149 p {
160
+ ._hero__description_c98qx_153 p {
157
161
  margin: 0;
158
162
  }
159
163
 
160
- ._hero__description_905ff_149 p + p {
161
- margin-top: var(--spacing-ui-sm);
164
+ ._hero__description_c98qx_153 p + p {
165
+ margin-top: var(--spacing-space-12);
162
166
  }
163
167
 
164
- ._hero__actions_905ff_164 {
168
+ ._hero__actions_c98qx_168 {
165
169
  display: flex;
166
170
  flex-direction: row;
167
171
  align-items: flex-start;
168
- gap: var(--spacing-ui-md);
172
+ gap: var(--spacing-space-16);
169
173
  flex-wrap: nowrap;
170
174
  }
171
175
 
172
- @container hero (max-width: 991px) {
173
- ._hero__background_905ff_11 {
176
+ @container hero (max-width: 1023px) {
177
+ ._hero__background_c98qx_11 {
174
178
  height: 460px;
175
179
  }
176
180
 
177
- ._hero__content_905ff_75 {
181
+ ._hero__content_c98qx_75 {
178
182
  min-height: 460px;
179
- padding-inline: var(--spacing-ui-xxxl);
183
+ padding-inline: var(--spacing-space-40);
180
184
  }
181
185
 
182
- ._hero__card_905ff_90 {
186
+ ._hero__card_c98qx_90 {
183
187
  flex-basis: 335px;
184
188
  max-width: 335px;
185
- padding: var(--spacing-ui-lg);
189
+ padding: var(--spacing-space-20);
186
190
  }
187
191
 
188
- ._hero__logoImage_905ff_42 {
189
- padding-left: var(--spacing-ui-xxxl);
192
+ ._hero__logoImage_c98qx_42 {
193
+ padding-left: var(--spacing-space-40);
190
194
  }
191
195
 
192
- ._hero__logoImage_905ff_42 > * {
196
+ ._hero__logoImage_c98qx_42 > * {
193
197
  width: min(360px, 48vw);
194
198
  }
195
199
 
196
- ._hero__actions_905ff_164 {
200
+ ._hero__actions_c98qx_168 {
197
201
  flex-direction: column;
198
202
  flex-wrap: nowrap;
199
203
  }
200
204
  }
201
205
 
202
206
  @container hero (max-width: 767px) {
203
- ._hero__background_905ff_11 {
207
+ ._hero__background_c98qx_11 {
204
208
  height: 280px;
205
209
  }
206
210
 
207
- ._hero__content_905ff_75 {
211
+ ._hero__content_c98qx_75 {
208
212
  min-height: auto;
209
213
  flex-direction: column;
210
214
  align-items: stretch;
211
215
  gap: 0;
212
216
  padding-top: 200px;
213
- padding-inline: var(--spacing-ui-lg);
217
+ padding-inline: var(--spacing-space-20);
214
218
  }
215
219
 
216
- ._hero__card_905ff_90 {
220
+ ._hero__card_c98qx_90 {
217
221
  flex-basis: auto;
218
222
  width: 100%;
219
223
  max-width: none;
220
224
  }
221
225
 
222
- ._hero__logoImage_905ff_42 {
226
+ ._hero__logoImage_c98qx_42 {
223
227
  display: none;
224
228
  }
225
229
  }
226
230
 
227
231
  @media (forced-colors: active) {
228
- ._hero__overlay_905ff_63 {
232
+ ._hero__overlay_c98qx_63 {
229
233
  display: none;
230
234
  }
231
235
 
232
- ._hero__background_905ff_11 {
236
+ ._hero__background_c98qx_11 {
233
237
  background-color: Canvas;
234
238
  }
235
239
 
236
- ._hero__card_905ff_90 {
240
+ ._hero__card_c98qx_90 {
237
241
  border: var(--borderwidth-semantic-xs) solid CanvasText;
238
242
  box-shadow: none;
239
243
  }
240
244
 
241
- ._hero__logoImage_905ff_42 {
245
+ ._hero__logoImage_c98qx_42 {
242
246
  display: none;
243
247
  }
244
248
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Hero.d.ts","sourceRoot":"","sources":["../../../src/components/Hero/Hero.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,eAAO,MAAM,IAAI,GAAI,kKAelB,SAAS,4CAqEX,CAAC"}
1
+ {"version":3,"file":"Hero.d.ts","sourceRoot":"","sources":["../../../src/components/Hero/Hero.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,eAAO,MAAM,IAAI,GAAI,kKAelB,SAAS,4CAgEX,CAAC"}
@@ -28,45 +28,36 @@ const Hero = ({
28
28
  const hasActions = primaryCta != null || secondaryCta != null;
29
29
  const backgroundStyle = image == null && backgroundColor != null ? { backgroundColor } : void 0;
30
30
  const HeadingLevel = headingLevel;
31
- return /* @__PURE__ */ jsxs(
32
- "div",
33
- {
34
- ref,
35
- ...props,
36
- className: cn(styles.hero, className),
37
- "data-testid": props["data-testid"],
38
- children: [
39
- /* @__PURE__ */ jsxs("div", { className: styles.hero__background, style: backgroundStyle, children: [
40
- image != null && /* @__PURE__ */ jsx("div", { className: styles.hero__backgroundImageComponent, "aria-hidden": "true", children: image }),
41
- logoImage != null && /* @__PURE__ */ jsx("div", { className: styles.hero__logoImage, "aria-hidden": "true", children: logoImage }),
42
- /* @__PURE__ */ jsx("div", { className: styles.hero__overlay, "aria-hidden": "true" })
31
+ return /* @__PURE__ */ jsxs("div", { ref, ...props, className: cn(styles.hero, className), children: [
32
+ /* @__PURE__ */ jsxs("div", { className: styles.hero__background, style: backgroundStyle, children: [
33
+ image != null && /* @__PURE__ */ jsx("div", { className: styles.hero__backgroundImageComponent, "aria-hidden": "true", children: image }),
34
+ logoImage != null && /* @__PURE__ */ jsx("div", { className: styles.hero__logoImage, "aria-hidden": "true", children: logoImage }),
35
+ /* @__PURE__ */ jsx("div", { className: styles.hero__overlay, "aria-hidden": "true" })
36
+ ] }),
37
+ /* @__PURE__ */ jsx("div", { className: styles.hero__content, children: /* @__PURE__ */ jsx("div", { className: cn(styles.hero__card, elevationStyles.elevationHigh), children: /* @__PURE__ */ jsxs("div", { className: styles.hero__main, children: [
38
+ /* @__PURE__ */ jsxs("div", { className: styles.hero__text, children: [
39
+ /* @__PURE__ */ jsxs("div", { className: styles.hero__header, children: [
40
+ label != null && /* @__PURE__ */ jsx("div", { className: styles.hero__label, children: label }),
41
+ /* @__PURE__ */ jsx(
42
+ HeadingLevel,
43
+ {
44
+ id: headingId,
45
+ className: cn(
46
+ styles.hero__heading,
47
+ headingClassByLevel[headingLevel]
48
+ ),
49
+ children: heading
50
+ }
51
+ )
43
52
  ] }),
44
- /* @__PURE__ */ jsx("div", { className: styles.hero__content, children: /* @__PURE__ */ jsx("div", { className: cn(styles.hero__card, elevationStyles.elevationExtraHigh), children: /* @__PURE__ */ jsxs("div", { className: styles.hero__main, children: [
45
- /* @__PURE__ */ jsxs("div", { className: styles.hero__text, children: [
46
- /* @__PURE__ */ jsxs("div", { className: styles.hero__header, children: [
47
- label != null && /* @__PURE__ */ jsx("div", { className: styles.hero__label, children: label }),
48
- /* @__PURE__ */ jsx(
49
- HeadingLevel,
50
- {
51
- id: headingId,
52
- className: cn(
53
- styles.hero__heading,
54
- headingClassByLevel[headingLevel]
55
- ),
56
- children: heading
57
- }
58
- )
59
- ] }),
60
- description != null && /* @__PURE__ */ jsx("div", { className: cn(styles.hero__description, "dds-prose"), children: description })
61
- ] }),
62
- hasActions && /* @__PURE__ */ jsxs("div", { className: styles.hero__actions, children: [
63
- primaryCta != null && primaryCta,
64
- secondaryCta != null && secondaryCta
65
- ] })
66
- ] }) }) })
67
- ]
68
- }
69
- );
53
+ description != null && /* @__PURE__ */ jsx("div", { className: cn(styles.hero__description, "dds-prose"), children: description })
54
+ ] }),
55
+ hasActions && /* @__PURE__ */ jsxs("div", { className: styles.hero__actions, children: [
56
+ primaryCta != null && primaryCta,
57
+ secondaryCta != null && secondaryCta
58
+ ] })
59
+ ] }) }) })
60
+ ] });
70
61
  };
71
62
  export {
72
63
  Hero
@@ -1 +1 @@
1
- {"version":3,"file":"Hero.js","sources":["../../../src/components/Hero/Hero.tsx"],"sourcesContent":["import { useId } from 'react';\nimport { cn } from '../../utils/cn';\nimport elevationStyles from '../../styles/utils/elevation.module.css';\nimport styles from './Hero.module.css';\nimport type { HeroProps } from './Hero.types';\nimport { headingClassByLevel } from './Hero.utils';\n\nexport const Hero = ({\n label,\n heading,\n description,\n headingLevel = 'h1',\n Image,\n imageProps,\n LogoImage,\n logoImageProps,\n backgroundColor,\n primaryCta,\n secondaryCta,\n className,\n ref,\n ...props\n}: HeroProps) => {\n const headingId = useId();\n\n const ResolvedImage = Image ?? (imageProps != null ? 'img' : undefined);\n const ResolvedLogoImage = LogoImage ?? (logoImageProps != null ? 'img' : undefined);\n const image = ResolvedImage != null ? <ResolvedImage {...imageProps} /> : undefined;\n const logoImage =\n ResolvedLogoImage != null ? <ResolvedLogoImage {...logoImageProps} /> : undefined;\n\n const hasActions = primaryCta != null || secondaryCta != null;\n const backgroundStyle =\n image == null && backgroundColor != null ? { backgroundColor } : undefined;\n const HeadingLevel = headingLevel;\n\n return (\n <div\n ref={ref}\n {...props}\n className={cn(styles.hero, className)}\n data-testid={props['data-testid']}\n >\n <div className={styles.hero__background} style={backgroundStyle}>\n {image != null && (\n <div className={styles.hero__backgroundImageComponent} aria-hidden=\"true\">\n {image}\n </div>\n )}\n {logoImage != null && (\n <div className={styles.hero__logoImage} aria-hidden=\"true\">\n {logoImage}\n </div>\n )}\n <div className={styles.hero__overlay} aria-hidden=\"true\" />\n </div>\n\n <div className={styles.hero__content}>\n <div className={cn(styles.hero__card, elevationStyles.elevationExtraHigh)}>\n <div className={styles.hero__main}>\n <div className={styles.hero__text}>\n <div className={styles.hero__header}>\n {label != null && <div className={styles.hero__label}>{label}</div>}\n <HeadingLevel\n id={headingId}\n className={cn(\n styles.hero__heading,\n headingClassByLevel[headingLevel],\n )}\n >\n {heading}\n </HeadingLevel>\n </div>\n {description != null && (\n <div className={cn(styles.hero__description, 'dds-prose')}>\n {description}\n </div>\n )}\n </div>\n\n {hasActions && (\n <div className={styles.hero__actions}>\n {primaryCta != null && primaryCta}\n {secondaryCta != null && secondaryCta}\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAOO,MAAM,OAAO,CAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACP,MAAiB;AACb,QAAM,YAAY,MAAA;AAElB,QAAM,gBAAgB,UAAU,cAAc,OAAO,QAAQ;AAC7D,QAAM,oBAAoB,cAAc,kBAAkB,OAAO,QAAQ;AACzE,QAAM,QAAQ,iBAAiB,2BAAQ,eAAA,EAAe,GAAG,YAAY,IAAK;AAC1E,QAAM,YACF,qBAAqB,2BAAQ,mBAAA,EAAmB,GAAG,gBAAgB,IAAK;AAE5E,QAAM,aAAa,cAAc,QAAQ,gBAAgB;AACzD,QAAM,kBACF,SAAS,QAAQ,mBAAmB,OAAO,EAAE,oBAAoB;AACrE,QAAM,eAAe;AAErB,SAC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,QAAQ;AAAA,UAAA,EAAA,CAC7B;AAAA,QAAA,EAAA,CAER,GACJ,EAAA,CACJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGZ;"}
1
+ {"version":3,"file":"Hero.js","sources":["../../../src/components/Hero/Hero.tsx"],"sourcesContent":["import { useId } from 'react';\nimport { cn } from '../../utils/cn';\nimport elevationStyles from '../../styles/utils/elevation.module.css';\nimport styles from './Hero.module.css';\nimport type { HeroProps } from './Hero.types';\nimport { headingClassByLevel } from './Hero.utils';\n\nexport const Hero = ({\n label,\n heading,\n description,\n headingLevel = 'h1',\n Image,\n imageProps,\n LogoImage,\n logoImageProps,\n backgroundColor,\n primaryCta,\n secondaryCta,\n className,\n ref,\n ...props\n}: HeroProps) => {\n const headingId = useId();\n\n const ResolvedImage = Image ?? (imageProps != null ? 'img' : undefined);\n const ResolvedLogoImage = LogoImage ?? (logoImageProps != null ? 'img' : undefined);\n const image = ResolvedImage != null ? <ResolvedImage {...imageProps} /> : undefined;\n const logoImage =\n ResolvedLogoImage != null ? <ResolvedLogoImage {...logoImageProps} /> : undefined;\n\n const hasActions = primaryCta != null || secondaryCta != null;\n const backgroundStyle =\n image == null && backgroundColor != null ? { backgroundColor } : undefined;\n const HeadingLevel = headingLevel;\n\n return (\n <div ref={ref} {...props} className={cn(styles.hero, className)}>\n <div className={styles.hero__background} style={backgroundStyle}>\n {image != null && (\n <div className={styles.hero__backgroundImageComponent} aria-hidden=\"true\">\n {image}\n </div>\n )}\n {logoImage != null && (\n <div className={styles.hero__logoImage} aria-hidden=\"true\">\n {logoImage}\n </div>\n )}\n <div className={styles.hero__overlay} aria-hidden=\"true\" />\n </div>\n\n <div className={styles.hero__content}>\n <div className={cn(styles.hero__card, elevationStyles.elevationHigh)}>\n <div className={styles.hero__main}>\n <div className={styles.hero__text}>\n <div className={styles.hero__header}>\n {label != null && <div className={styles.hero__label}>{label}</div>}\n <HeadingLevel\n id={headingId}\n className={cn(\n styles.hero__heading,\n headingClassByLevel[headingLevel],\n )}\n >\n {heading}\n </HeadingLevel>\n </div>\n {description != null && (\n <div className={cn(styles.hero__description, 'dds-prose')}>\n {description}\n </div>\n )}\n </div>\n\n {hasActions && (\n <div className={styles.hero__actions}>\n {primaryCta != null && primaryCta}\n {secondaryCta != null && secondaryCta}\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAOO,MAAM,OAAO,CAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACP,MAAiB;AACb,QAAM,YAAY,MAAA;AAElB,QAAM,gBAAgB,UAAU,cAAc,OAAO,QAAQ;AAC7D,QAAM,oBAAoB,cAAc,kBAAkB,OAAO,QAAQ;AACzE,QAAM,QAAQ,iBAAiB,2BAAQ,eAAA,EAAe,GAAG,YAAY,IAAK;AAC1E,QAAM,YACF,qBAAqB,2BAAQ,mBAAA,EAAmB,GAAG,gBAAgB,IAAK;AAE5E,QAAM,aAAa,cAAc,QAAQ,gBAAgB;AACzD,QAAM,kBACF,SAAS,QAAQ,mBAAmB,OAAO,EAAE,oBAAoB;AACrE,QAAM,eAAe;AAErB,SACI,qBAAC,OAAA,EAAI,KAAW,GAAG,OAAO,WAAW,GAAG,OAAO,MAAM,SAAS,GAC1D,UAAA;AAAA,IAAA,qBAAC,OAAA,EAAI,WAAW,OAAO,kBAAkB,OAAO,iBAC3C,UAAA;AAAA,MAAA,SAAS,4BACL,OAAA,EAAI,WAAW,OAAO,gCAAgC,eAAY,QAC9D,UAAA,MAAA,CACL;AAAA,MAEH,aAAa,QACV,oBAAC,OAAA,EAAI,WAAW,OAAO,iBAAiB,eAAY,QAC/C,UAAA,UAAA,CACL;AAAA,0BAEH,OAAA,EAAI,WAAW,OAAO,eAAe,eAAY,OAAA,CAAO;AA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