@arc-ui/components 10.1.0 → 10.2.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 (180) hide show
  1. package/dist/Align/index.d.ts +25 -0
  2. package/dist/Align/index.js +25 -0
  3. package/dist/Base/index.d.ts +16 -0
  4. package/dist/Base/index.js +12 -0
  5. package/dist/BrandLogo/index.d.ts +1 -0
  6. package/dist/BrandLogo/index.js +6 -0
  7. package/dist/Breadcrumbs/index.d.ts +57 -0
  8. package/dist/Breadcrumbs/index.js +17294 -0
  9. package/dist/Button/index.d.ts +1 -0
  10. package/dist/Button/index.js +8 -0
  11. package/dist/Card/index.d.ts +126 -0
  12. package/dist/Card/index.js +118 -0
  13. package/dist/Checkbox/index.d.ts +59 -0
  14. package/dist/Checkbox/index.js +46 -0
  15. package/dist/Clock/index.d.ts +15 -0
  16. package/dist/Clock/index.js +34 -0
  17. package/dist/Columns/index.d.ts +76 -0
  18. package/dist/Columns/index.js +51 -0
  19. package/dist/Curve/index.d.ts +1 -0
  20. package/dist/Curve/index.js +5 -0
  21. package/dist/Disclosure/index.d.ts +31 -0
  22. package/dist/Disclosure/index.js +25 -0
  23. package/dist/Elevation/index.d.ts +16 -0
  24. package/dist/Elevation/index.js +17 -0
  25. package/dist/FormControl/index.d.ts +1 -0
  26. package/dist/FormControl/index.js +5 -0
  27. package/dist/Group/index.d.ts +46 -0
  28. package/dist/Group/index.js +42 -0
  29. package/dist/Heading/index.d.ts +1 -0
  30. package/dist/Heading/index.js +6 -0
  31. package/dist/Icon/index.d.ts +1 -0
  32. package/dist/Icon/index.js +7 -0
  33. package/dist/Image/index.d.ts +1 -0
  34. package/dist/Image/index.js +5 -0
  35. package/dist/Markup/index.d.ts +16 -0
  36. package/dist/Markup/index.js +19 -0
  37. package/dist/Poster/index.d.ts +76 -0
  38. package/dist/Poster/index.js +44 -0
  39. package/dist/RadioGroup/index.d.ts +85 -0
  40. package/dist/RadioGroup/index.js +64 -0
  41. package/dist/Rule/index.d.ts +8 -0
  42. package/dist/Rule/index.js +17 -0
  43. package/dist/Section/index.d.ts +1 -0
  44. package/dist/Section/index.js +4 -0
  45. package/dist/SiteFooter/index.d.ts +64 -0
  46. package/dist/SiteFooter/index.js +88 -0
  47. package/dist/SiteHeader/index.d.ts +252 -0
  48. package/dist/SiteHeader/index.js +638 -0
  49. package/dist/Surface/index.d.ts +1 -0
  50. package/dist/Surface/index.js +4 -0
  51. package/dist/Text/index.d.ts +1 -0
  52. package/dist/Text/index.js +6 -0
  53. package/dist/TextInput/index.d.ts +71 -0
  54. package/dist/TextInput/index.js +56 -0
  55. package/dist/UniversalHeader/index.d.ts +26 -0
  56. package/dist/UniversalHeader/index.js +30 -0
  57. package/dist/VerticalSpace/index.d.ts +18 -0
  58. package/dist/VerticalSpace/index.js +19 -0
  59. package/dist/_shared/BrandLogo-6cc8202e.d.ts +26 -0
  60. package/dist/_shared/BrandLogo-6cc8202e.js +25 -0
  61. package/dist/_shared/Button-abfb12d4.d.ts +98 -0
  62. package/dist/_shared/Button-abfb12d4.js +51 -0
  63. package/dist/_shared/Curve-5f476d0b.d.ts +32 -0
  64. package/dist/_shared/Curve-5f476d0b.js +24 -0
  65. package/dist/_shared/FormControl-9dc9ecc3.d.ts +70 -0
  66. package/dist/_shared/FormControl-9dc9ecc3.js +74 -0
  67. package/dist/_shared/Heading-8c640dd1.d.ts +46 -0
  68. package/dist/_shared/Heading-8c640dd1.js +35 -0
  69. package/dist/_shared/Icon-4d523b46.d.ts +34 -0
  70. package/dist/_shared/Icon-4d523b46.js +27 -0
  71. package/dist/_shared/Image-a3225049.d.ts +94 -0
  72. package/dist/_shared/Image-a3225049.js +39 -0
  73. package/dist/_shared/Section-927988cb.d.ts +21 -0
  74. package/dist/_shared/Section-927988cb.js +17 -0
  75. package/dist/_shared/Surface-3fe44a2a.d.ts +50 -0
  76. package/dist/_shared/Surface-3fe44a2a.js +49 -0
  77. package/dist/_shared/Text-1c43d82b.d.ts +34 -0
  78. package/dist/_shared/Text-1c43d82b.js +26 -0
  79. package/dist/_shared/handle-link-click-35e09d0c.d.ts +7 -0
  80. package/dist/_shared/handle-link-click-35e09d0c.js +13 -0
  81. package/dist/_shared/index-56d9df62.js +61 -0
  82. package/dist/_shared/index-9483ad5f.d.ts +14 -0
  83. package/dist/_shared/index-c81c9401.d.ts +4 -0
  84. package/dist/_shared/index-e3c83626.d.ts +2 -0
  85. package/dist/_shared/index-e3c83626.js +208 -0
  86. package/dist/_shared/index.es-f5886c3a.js +284 -0
  87. package/dist/_shared/suffix-modifier-2a93822c.d.ts +10 -0
  88. package/dist/_shared/suffix-modifier-2a93822c.js +17 -0
  89. package/dist/_shared/use-media-query-f11805d4.d.ts +19 -0
  90. package/dist/_shared/use-media-query-f11805d4.js +39 -0
  91. package/dist/index.es.js +17489 -175
  92. package/dist/index.es.js.map +1 -1
  93. package/dist/index.js +17488 -173
  94. package/dist/index.js.map +1 -1
  95. package/dist/styles.css +1 -1
  96. package/dist/types/components/Align/Align.d.ts +1 -2
  97. package/dist/types/components/Align/index.d.ts +1 -1
  98. package/dist/types/components/Base/Base.d.ts +1 -2
  99. package/dist/types/components/Base/index.d.ts +1 -1
  100. package/dist/types/components/BrandLogo/BrandLogo.d.ts +1 -2
  101. package/dist/types/components/BrandLogo/index.d.ts +1 -1
  102. package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +18 -0
  103. package/dist/types/components/Breadcrumbs/BreadcrumbsItem/BreadcrumbsItem.d.ts +17 -0
  104. package/dist/types/components/Breadcrumbs/BreadcrumbsLink/BreadcrumbsLink.d.ts +25 -0
  105. package/dist/types/components/Breadcrumbs/index.d.ts +1 -0
  106. package/dist/types/components/Button/Button.d.ts +2 -2
  107. package/dist/types/components/Button/index.d.ts +1 -1
  108. package/dist/types/components/Card/Card.d.ts +6 -2
  109. package/dist/types/components/Card/index.d.ts +1 -1
  110. package/dist/types/components/Checkbox/Checkbox.d.ts +2 -2
  111. package/dist/types/components/Checkbox/index.d.ts +1 -1
  112. package/dist/types/components/Clock/Clock.d.ts +1 -2
  113. package/dist/types/components/Clock/index.d.ts +1 -1
  114. package/dist/types/components/Columns/Columns.d.ts +2 -2
  115. package/dist/types/components/Columns/index.d.ts +1 -1
  116. package/dist/types/components/Curve/Curve.d.ts +1 -2
  117. package/dist/types/components/Curve/index.d.ts +1 -1
  118. package/dist/types/components/Disclosure/Disclosure.d.ts +1 -2
  119. package/dist/types/components/Disclosure/index.d.ts +1 -1
  120. package/dist/types/components/Elevation/Elevation.d.ts +1 -2
  121. package/dist/types/components/Elevation/index.d.ts +1 -1
  122. package/dist/types/components/FormControl/FormControl.d.ts +1 -2
  123. package/dist/types/components/FormControl/index.d.ts +1 -1
  124. package/dist/types/components/Group/Group.d.ts +1 -2
  125. package/dist/types/components/Group/index.d.ts +1 -1
  126. package/dist/types/components/Heading/Heading.d.ts +1 -2
  127. package/dist/types/components/Heading/index.d.ts +1 -1
  128. package/dist/types/components/Icon/Icon.d.ts +1 -2
  129. package/dist/types/components/Icon/index.d.ts +1 -1
  130. package/dist/types/components/Image/Image.d.ts +1 -2
  131. package/dist/types/components/Image/index.d.ts +1 -1
  132. package/dist/types/components/Markup/Markup.d.ts +1 -2
  133. package/dist/types/components/Markup/index.d.ts +1 -1
  134. package/dist/types/components/Poster/Poster.d.ts +3 -4
  135. package/dist/types/components/Poster/PosterImage.d.ts +0 -1
  136. package/dist/types/components/Poster/PosterVideo.d.ts +1 -2
  137. package/dist/types/components/Poster/index.d.ts +1 -1
  138. package/dist/types/components/RadioGroup/RadioButton/RadioButton.d.ts +1 -2
  139. package/dist/types/components/RadioGroup/RadioButton/index.d.ts +1 -1
  140. package/dist/types/components/RadioGroup/RadioGroup.d.ts +7 -3
  141. package/dist/types/components/RadioGroup/index.d.ts +1 -1
  142. package/dist/types/components/Rule/Rule.d.ts +1 -2
  143. package/dist/types/components/Rule/index.d.ts +1 -1
  144. package/dist/types/components/Section/Section.d.ts +1 -2
  145. package/dist/types/components/Section/index.d.ts +1 -1
  146. package/dist/types/components/SiteFooter/SiteFooter.d.ts +5 -2
  147. package/dist/types/components/SiteFooter/index.d.ts +1 -1
  148. package/dist/types/components/SiteHeader/SiteHeader.d.ts +11 -8
  149. package/dist/types/components/SiteHeader/components/BackButton/BackButton.d.ts +0 -1
  150. package/dist/types/components/SiteHeader/components/BackButton/index.d.ts +1 -1
  151. package/dist/types/components/SiteHeader/components/Column/Column.d.ts +1 -2
  152. package/dist/types/components/SiteHeader/components/Column/index.d.ts +1 -1
  153. package/dist/types/components/SiteHeader/components/Item/Item.d.ts +5 -2
  154. package/dist/types/components/SiteHeader/components/Item/index.d.ts +1 -1
  155. package/dist/types/components/SiteHeader/components/ItemGroup/ItemGroup.d.ts +5 -2
  156. package/dist/types/components/SiteHeader/components/ItemGroup/index.d.ts +1 -1
  157. package/dist/types/components/SiteHeader/components/MenuButton/MenuButton.d.ts +1 -2
  158. package/dist/types/components/SiteHeader/components/MenuButton/index.d.ts +1 -1
  159. package/dist/types/components/SiteHeader/components/NavItem/NavItem.d.ts +4 -1
  160. package/dist/types/components/SiteHeader/components/NavItem/NavItemWithSubNav.d.ts +5 -2
  161. package/dist/types/components/SiteHeader/components/NavItem/index.d.ts +2 -2
  162. package/dist/types/components/SiteHeader/components/Panel/Panel.d.ts +1 -1
  163. package/dist/types/components/SiteHeader/components/Panel/index.d.ts +1 -1
  164. package/dist/types/components/SiteHeader/components/SubNavItem/SubNavItem.d.ts +5 -2
  165. package/dist/types/components/SiteHeader/components/SubNavItem/index.d.ts +1 -1
  166. package/dist/types/components/SiteHeader/index.d.ts +1 -1
  167. package/dist/types/components/Surface/Surface.d.ts +1 -2
  168. package/dist/types/components/Surface/index.d.ts +1 -1
  169. package/dist/types/components/Text/Text.d.ts +1 -2
  170. package/dist/types/components/Text/index.d.ts +1 -1
  171. package/dist/types/components/TextInput/TextInput.d.ts +2 -2
  172. package/dist/types/components/TextInput/index.d.ts +1 -1
  173. package/dist/types/components/UniversalHeader/UniversalHeader.d.ts +1 -2
  174. package/dist/types/components/UniversalHeader/index.d.ts +1 -1
  175. package/dist/types/components/VerticalSpace/VerticalSpace.d.ts +1 -2
  176. package/dist/types/components/VerticalSpace/index.d.ts +1 -1
  177. package/dist/types/components/index.d.ts +29 -28
  178. package/dist/types/helpers/handle-link-click.d.ts +7 -0
  179. package/dist/types/styles.d.ts +2 -0
  180. package/package.json +7 -7
@@ -0,0 +1,46 @@
1
+ import { FC, ReactNode } from "react";
2
+ /**
3
+ * Use `Group` to arrange flexible items in a row.
4
+ */
5
+ declare const Group: FC<GroupProps> & {
6
+ Item: typeof GroupItem;
7
+ };
8
+ declare const GroupItem: FC<ItemProps>;
9
+ interface ItemProps {
10
+ /**
11
+ * Content to display in the Group.Item.
12
+ */
13
+ children?: ReactNode;
14
+ /**
15
+ * Should the Group.Item be visible for debugging and documentation
16
+ * purposes?
17
+ */
18
+ isDebugVisible?: boolean;
19
+ /**
20
+ * Should the Group.Item stretch to fill the available space?
21
+ */
22
+ grow?: boolean;
23
+ }
24
+ interface GroupProps {
25
+ /**
26
+ * Contents of the Group. Should only contain `Group.Item`.
27
+ */
28
+ children: ReactNode;
29
+ /**
30
+ * Should all Group.Items in the Group stretch to fill the available space?
31
+ */
32
+ grow?: boolean;
33
+ /**
34
+ * Should all Group.Items in the Group stretch to fill the available space with equal widths?
35
+ */
36
+ growEqual?: boolean;
37
+ /**
38
+ * Should a border be shown between Group.Items? **Warning: Sets CSS property `overflow:hidden`.**
39
+ */
40
+ gutterBorder?: boolean;
41
+ /**
42
+ * Should wrapping of Group.Items in the Group be disabled?
43
+ */
44
+ noWrap?: boolean;
45
+ }
46
+ export { Group };
@@ -0,0 +1,42 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/index-e3c83626.js';
2
+ import { c as classNames } from '../_shared/index-56d9df62.js';
3
+ import React, { useContext, useEffect } from 'react';
4
+ import { C as Context } from '../_shared/Surface-3fe44a2a.js';
5
+
6
+ /**
7
+ * Use `Group` to arrange flexible items in a row.
8
+ */
9
+ var Group = function (_a) {
10
+ var _b;
11
+ var children = _a.children, _c = _a.grow, grow = _c === void 0 ? false : _c, _d = _a.growEqual, growEqual = _d === void 0 ? false : _d, _e = _a.gutterBorder, gutterBorder = _e === void 0 ? false : _e, _f = _a.noWrap, noWrap = _f === void 0 ? false : _f, props = __rest(_a, ["children", "grow", "growEqual", "gutterBorder", "noWrap"]);
12
+ var surface = useContext(Context).surface;
13
+ useEffect(function () {
14
+ React.Children.map(children, function (item) {
15
+ if (item && item.type !== GroupItem) {
16
+ throw new Error("Illegal child passed to <Group />. Ensure to only use <Group.Item />.");
17
+ }
18
+ });
19
+ }, [children]);
20
+ return (React.createElement("div", __assign({ className: classNames((_b = {},
21
+ _b["arc-Group"] = true,
22
+ _b["arc-Group--grow"] = grow,
23
+ _b["arc-Group--growEqual"] = growEqual,
24
+ _b["arc-Group--gutterBorder"] = gutterBorder,
25
+ _b["arc-Group--noWrap"] = noWrap,
26
+ _b["arc-Group--onDarkSurface"] = surface === "dark",
27
+ _b)) }, filterDataAttrs(props)),
28
+ React.createElement("div", { className: "arc-Group-inner" }, children)));
29
+ };
30
+ var GroupItem = function (_a) {
31
+ var _b;
32
+ var children = _a.children, _c = _a.grow, grow = _c === void 0 ? false : _c, _d = _a.isDebugVisible, isDebugVisible = _d === void 0 ? false : _d, props = __rest(_a, ["children", "grow", "isDebugVisible"]);
33
+ return (React.createElement("div", __assign({ className: classNames((_b = {},
34
+ _b["arc-Group-item"] = true,
35
+ _b["arc-Group-item--grow"] = grow,
36
+ _b["arc-Group-item--debugVisible"] = isDebugVisible,
37
+ _b)) }, filterDataAttrs(props)), children));
38
+ };
39
+ GroupItem.displayName = "Group.Item";
40
+ Group.Item = GroupItem;
41
+
42
+ export { Group };
@@ -0,0 +1 @@
1
+ export { Heading } from "../_shared/Heading-8c640dd1";
@@ -0,0 +1,6 @@
1
+ export { H as Heading } from '../_shared/Heading-8c640dd1.js';
2
+ import '../_shared/index-e3c83626.js';
3
+ import '../_shared/index-56d9df62.js';
4
+ import 'react';
5
+ import '../_shared/suffix-modifier-2a93822c.js';
6
+ import '../_shared/Surface-3fe44a2a.js';
@@ -0,0 +1 @@
1
+ export { Icon } from "../_shared/Icon-4d523b46";
@@ -0,0 +1,7 @@
1
+ export { I as Icon } from '../_shared/Icon-4d523b46.js';
2
+ import '../_shared/index-e3c83626.js';
3
+ import '../_shared/index.es-f5886c3a.js';
4
+ import '../_shared/index-56d9df62.js';
5
+ import 'react';
6
+ import '../_shared/suffix-modifier-2a93822c.js';
7
+ import '../_shared/Surface-3fe44a2a.js';
@@ -0,0 +1 @@
1
+ export { Image } from "../_shared/Image-a3225049";
@@ -0,0 +1,5 @@
1
+ export { I as Image } from '../_shared/Image-a3225049.js';
2
+ import '../_shared/index-e3c83626.js';
3
+ import '../_shared/index-56d9df62.js';
4
+ import 'react';
5
+ import '../_shared/suffix-modifier-2a93822c.js';
@@ -0,0 +1,16 @@
1
+ import { FC, ReactNode } from "react";
2
+ /**
3
+ * Use `Markup` to display HTML-formatted text.
4
+ */
5
+ declare const Markup: FC<MarkupProps>;
6
+ interface MarkupProps {
7
+ /**
8
+ * HTML-formatted text to display in Markup.
9
+ */
10
+ children: ReactNode;
11
+ /**
12
+ * Should the Markup width be constrained to a typographic measure?
13
+ */
14
+ isMeasured?: boolean;
15
+ }
16
+ export { Markup };
@@ -0,0 +1,19 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/index-e3c83626.js';
2
+ import { c as classNames } from '../_shared/index-56d9df62.js';
3
+ import React, { useContext } from 'react';
4
+ import { C as Context } from '../_shared/Surface-3fe44a2a.js';
5
+
6
+ /**
7
+ * Use `Markup` to display HTML-formatted text.
8
+ */
9
+ var Markup = function (_a) {
10
+ var children = _a.children, _b = _a.isMeasured, isMeasured = _b === void 0 ? false : _b, props = __rest(_a, ["children", "isMeasured"]);
11
+ var surface = useContext(Context).surface;
12
+ return (React.createElement("div", __assign({ className: classNames({
13
+ "arc-Markup": true,
14
+ "arc-Markup--measured": isMeasured,
15
+ "arc-Markup--onDarkSurface": surface === "dark"
16
+ }) }, filterDataAttrs(props)), children));
17
+ };
18
+
19
+ export { Markup };
@@ -0,0 +1,76 @@
1
+ import { FC, ReactNode } from "react";
2
+ import { anchorPoints } from "../_shared/index-9483ad5f";
3
+ import { loadingOptions } from "../_shared/Image-a3225049";
4
+ declare const PosterImage: FC<PosterImageProps>;
5
+ interface PosterImageProps {
6
+ /**
7
+ * Alternative text for the Poster.Image, shown if the image cannot be displayed. Consider avoiding this prop if the image is for decorative purposes only.
8
+ */
9
+ alt?: string;
10
+ /**
11
+ * Anchor point for the Poster.Image.
12
+ */
13
+ anchor?: typeof anchorPoints[number];
14
+ /**
15
+ * Loading behaviour of the Poster.Image.
16
+ */
17
+ loading?: typeof loadingOptions[number];
18
+ /**
19
+ * The HTML [sizes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Example_4_Using_the_srcset_and_sizes_attributes) attribute for the Poster.Image. Required if `srcSet` is defined.
20
+ */
21
+ sizes?: string;
22
+ /**
23
+ * The `src` for the Poster.Image. Used if srcSet is not defined, or as a fallback.
24
+ */
25
+ src: string;
26
+ /**
27
+ * A comma-separated list indicating a set of possible sources for the user agent to use for different screen sizes for the Poster.Image. Same format as [srcSet](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Example_4_Using_the_srcset_and_sizes_attributes), i.e. `my-image-200.png 200w, my-image-200.png 200w`.
28
+ */
29
+ srcSet?: string;
30
+ }
31
+ declare const PosterVideo: FC<PosterVideoProps>;
32
+ interface PosterVideoProps {
33
+ /**
34
+ * Anchor point for the Poster.Video,
35
+ */
36
+ anchor?: typeof anchorPoints[number];
37
+ /**
38
+ * Should the Poster.Video autoplay?
39
+ */
40
+ autoPlay?: boolean;
41
+ /**
42
+ * HTML video sources for the Poster.Video. [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video).
43
+ */
44
+ children: ReactNode;
45
+ /**
46
+ * Should the Poster.Video loop?
47
+ */
48
+ loop?: boolean;
49
+ }
50
+ /**
51
+ * Use `Poster` to compose content on an image or video background.
52
+ */
53
+ declare const Poster: FC<PosterProps> & {
54
+ Image: typeof PosterImage;
55
+ Video: typeof PosterVideo;
56
+ };
57
+ interface PosterProps {
58
+ /**
59
+ * Poster background to overlay content on top of. Must be one of Poster.Image or Poster.Video.
60
+ */
61
+ background: ReactNode;
62
+ /**
63
+ * Contents of the Poster. Each item will be wrapped in an PosterItem component.
64
+ */
65
+ children: ReactNode;
66
+ /**
67
+ * Apply an overlay to the Poster background, e.g. a scrim gradient for text legibility.
68
+ */
69
+ overlay?: boolean;
70
+ /**
71
+ * The background surface colour to show behind the Poster content before it loads.
72
+ * If using `overlay`, the gradient will match the surface.
73
+ */
74
+ surface?: "darker" | "lighter";
75
+ }
76
+ export { Poster };
@@ -0,0 +1,44 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/index-e3c83626.js';
2
+ import { c as classNames } from '../_shared/index-56d9df62.js';
3
+ import React from 'react';
4
+ import { S as Surface } from '../_shared/Surface-3fe44a2a.js';
5
+ import { I as Image } from '../_shared/Image-a3225049.js';
6
+ import { s as suffixModifier } from '../_shared/suffix-modifier-2a93822c.js';
7
+
8
+ var PosterImage = function (_a) {
9
+ var alt = _a.alt, _b = _a.anchor, anchor = _b === void 0 ? "C" : _b, loading = _a.loading, sizes = _a.sizes, src = _a.src, srcSet = _a.srcSet, props = __rest(_a, ["alt", "anchor", "loading", "sizes", "src", "srcSet"]);
10
+ return (React.createElement(Image, __assign({ alt: alt, anchor: anchor, fit: "cover", loading: loading, sizes: sizes, src: src, srcSet: srcSet }, props)));
11
+ };
12
+ PosterImage.displayName = "Poster.Image";
13
+
14
+ var PosterVideo = function (_a) {
15
+ var _b;
16
+ var _c = _a.anchor, anchor = _c === void 0 ? "C" : _c, _d = _a.autoPlay, autoPlay = _d === void 0 ? true : _d, children = _a.children, _e = _a.loop, loop = _e === void 0 ? true : _e, props = __rest(_a, ["anchor", "autoPlay", "children", "loop"]);
17
+ return (React.createElement("video", __assign({ className: classNames((_b = {
18
+ "arc-PosterVideo": true
19
+ },
20
+ _b[suffixModifier("arc-PosterVideo--anchor", anchor)] = anchor,
21
+ _b)), autoPlay: autoPlay, muted: true, loop: loop }, filterDataAttrs(props)), children));
22
+ };
23
+ PosterVideo.displayName = "Poster.Video";
24
+
25
+ /**
26
+ * Use `Poster` to compose content on an image or video background.
27
+ */
28
+ var Poster = function (_a) {
29
+ var background = _a.background, children = _a.children, _b = _a.overlay, overlay = _b === void 0 ? true : _b, _c = _a.surface, surface = _c === void 0 ? "darker" : _c, props = __rest(_a, ["background", "children", "overlay", "surface"]);
30
+ return (React.createElement(Surface, { background: surface },
31
+ React.createElement("div", __assign({ className: classNames({
32
+ "arc-Poster": true,
33
+ "arc-Poster--overlay": overlay,
34
+ "arc-Poster--overlayLight": surface === "lighter"
35
+ }) }, filterDataAttrs(props)),
36
+ React.createElement("div", { className: "arc-Poster-backgroundWrapper" }, background),
37
+ React.createElement("div", { className: "arc-Poster-body" }, children))));
38
+ };
39
+ PosterImage.displayName = "Poster.Image";
40
+ Poster.Image = PosterImage;
41
+ PosterVideo.displayName = "Poster.Video";
42
+ Poster.Video = PosterVideo;
43
+
44
+ export { Poster };
@@ -0,0 +1,85 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC } from "react";
4
+ import { FormControlProps } from "../_shared/FormControl-9dc9ecc3";
5
+ /**
6
+ * Radio Button component.
7
+ */
8
+ declare const RadioButton: FC<RadioButtonProps>;
9
+ interface RadioButtonProps {
10
+ /**
11
+ * ID for the Radio Button.
12
+ */
13
+ id: string;
14
+ /**
15
+ * Should the RadioButton be disabled?
16
+ */
17
+ isDisabled?: boolean;
18
+ /**
19
+ * Helper text for the RadioButton, shown below the label.
20
+ */
21
+ helper?: string;
22
+ /**
23
+ * Label for the RadioButton.
24
+ */
25
+ label: string;
26
+ /**
27
+ * Current value (controlled).
28
+ */
29
+ value: string;
30
+ }
31
+ type EventType = React.ChangeEvent<HTMLInputElement>;
32
+ /**
33
+ * Use `RadioGroup` to wrap and control radio buttons and apply default values
34
+ */
35
+ declare const RadioGroup: FC<RadioGroupProps> & {
36
+ RadioButton: typeof RadioButton;
37
+ };
38
+ interface RadioGroupProps extends Omit<FormControlProps, "children" | "elementType" | "errorMessage" | "htmlFor" | "labelSize" | "requirementStatus"> {
39
+ /**
40
+ * Contents of the RadioGroup. Should only contain `RadioGroup.RadioButton`
41
+ */
42
+ children?: React.ReactNode;
43
+ /**
44
+ * Value of the RadioButton that should be checked by default.
45
+ */
46
+ checkedValue: string;
47
+ /**
48
+ * Should all controls be disabled?
49
+ */
50
+ isDisabled?: boolean;
51
+ /**
52
+ * Helper message for the RadioGroup.
53
+ */
54
+ helper?: string;
55
+ /**
56
+ * ID for the RadioGroup.
57
+ */
58
+ id: string;
59
+ /**
60
+ * Label for the RadioGroup.
61
+ */
62
+ label: string;
63
+ /**
64
+ * Label size for the RadioGroup
65
+ */
66
+ labelSize?: "s" | "l";
67
+ /**
68
+ * Name for the RadioGroup.
69
+ */
70
+ name: string;
71
+ /**
72
+ * Function to call when the RadioGroup loses focus.
73
+ */
74
+ onBlur?: (e: EventType) => void;
75
+ /**
76
+ * Callback function to update the RadioGroup's controlled `checkedValue` prop,
77
+ * for example `e => setCheckedValue(e.target.value)`.
78
+ */
79
+ onChange?: (event: EventType) => void;
80
+ /**
81
+ * Size of the RadioGroup.
82
+ */
83
+ size?: "s" | "l";
84
+ }
85
+ export { RadioGroup };
@@ -0,0 +1,64 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/index-e3c83626.js';
2
+ import React, { createContext, useContext, forwardRef, useEffect } from 'react';
3
+ import { F as FormControl } from '../_shared/FormControl-9dc9ecc3.js';
4
+ import { c as classNames } from '../_shared/index-56d9df62.js';
5
+ import { C as Context } from '../_shared/Surface-3fe44a2a.js';
6
+
7
+ var RadioContext = createContext({});
8
+ var Provider = RadioContext.Provider;
9
+ var useRadioContext = function () {
10
+ var context = useContext(RadioContext);
11
+ return context;
12
+ };
13
+
14
+ /**
15
+ * Radio Button component.
16
+ */
17
+ var RadioButton = forwardRef(function (_a, ref) {
18
+ var helper = _a.helper, id = _a.id, isDisabled = _a.isDisabled, label = _a.label, value = _a.value, props = __rest(_a, ["helper", "id", "isDisabled", "label", "value"]);
19
+ var _b = useRadioContext(), blurEvent = _b.blurEvent, changeEvent = _b.changeEvent, groupDisabled = _b.groupDisabled, checkedValue = _b.checkedValue, labelSize = _b.labelSize, name = _b.name, size = _b.size;
20
+ var surface = useContext(Context).surface;
21
+ var idLabel = "".concat(id, "-label");
22
+ var checked = checkedValue === value ? true : false;
23
+ return (React.createElement("div", __assign({ className: classNames({
24
+ "arc-RadioButton": true,
25
+ "arc-RadioButton--disabled": isDisabled || groupDisabled,
26
+ "arc-RadioButton--small": size === "s",
27
+ "arc-RadioButton--smallLabel": labelSize === "s",
28
+ "arc-RadioButton--onDarkSurface": surface === "dark"
29
+ }) }, filterDataAttrs(props)),
30
+ React.createElement("label", { className: "arc-RadioButton-label", htmlFor: id, id: idLabel },
31
+ React.createElement("input", { className: "arc-RadioButton-input", checked: typeof changeEvent !== "function" ? undefined : checked, defaultChecked: typeof changeEvent !== "function" ? checked : undefined, disabled: isDisabled || groupDisabled, id: id, name: name, onBlur: blurEvent, onChange: changeEvent, ref: ref, type: "radio", value: value }),
32
+ React.createElement("span", null,
33
+ label,
34
+ helper && React.createElement("span", { className: "arc-RadioButton-helper" }, helper)))));
35
+ });
36
+
37
+ /**
38
+ * Use `RadioGroup` to wrap and control radio buttons and apply default values
39
+ */
40
+ var RadioGroup = function (_a) {
41
+ var children = _a.children, checkedValue = _a.checkedValue, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, id = _a.id, helper = _a.helper, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, _d = _a.size, size = _d === void 0 ? "l" : _d, props = __rest(_a, ["children", "checkedValue", "isDisabled", "id", "helper", "label", "labelSize", "name", "onBlur", "onChange", "size"]);
42
+ useEffect(function () {
43
+ React.Children.map(children, function (item) {
44
+ if (item && item.type !== RadioButton) {
45
+ throw new Error("Illegal child passed to <RadioGroup />. Ensure to only use <RadioGroup.RadioButton />.");
46
+ }
47
+ });
48
+ }, [children]);
49
+ return (React.createElement(Provider, { value: {
50
+ blurEvent: onBlur,
51
+ changeEvent: onChange,
52
+ groupDisabled: isDisabled,
53
+ checkedValue: checkedValue,
54
+ labelSize: labelSize,
55
+ name: name,
56
+ size: size
57
+ } },
58
+ React.createElement("div", __assign({ className: "arc-RadioGroup" }, filterDataAttrs(props)),
59
+ React.createElement(FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable" }, children))));
60
+ };
61
+ RadioButton.displayName = "RadioGroup.RadioButton";
62
+ RadioGroup.RadioButton = RadioButton;
63
+
64
+ export { RadioGroup };
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ /**
3
+ * Use `Rule` to display a horizontal rule.
4
+ */
5
+ declare const Rule: FC<RuleProps>;
6
+ interface RuleProps {
7
+ }
8
+ export { Rule };
@@ -0,0 +1,17 @@
1
+ import { a as __assign, f as filterDataAttrs } from '../_shared/index-e3c83626.js';
2
+ import { c as classNames } from '../_shared/index-56d9df62.js';
3
+ import React, { useContext } from 'react';
4
+ import { C as Context } from '../_shared/Surface-3fe44a2a.js';
5
+
6
+ /**
7
+ * Use `Rule` to display a horizontal rule.
8
+ */
9
+ var Rule = function (props) {
10
+ var surface = useContext(Context).surface;
11
+ return (React.createElement("hr", __assign({ className: classNames({
12
+ "arc-Rule": true,
13
+ "arc-Rule--onDarkSurface": surface === "dark"
14
+ }) }, filterDataAttrs(props))));
15
+ };
16
+
17
+ export { Rule };
@@ -0,0 +1 @@
1
+ export { Section } from "../_shared/Section-927988cb";
@@ -0,0 +1,4 @@
1
+ export { S as Section } from '../_shared/Section-927988cb.js';
2
+ import '../_shared/index-e3c83626.js';
3
+ import '../_shared/index-56d9df62.js';
4
+ import 'react';
@@ -0,0 +1,64 @@
1
+ /// <reference types="react" />
2
+ import { FC, ReactNode } from "react";
3
+ /**
4
+ * Use `SiteFooter` to display information at the bottom of a page.
5
+ */
6
+ declare const SiteFooter: FC<SiteFooterProps> & {
7
+ Item: typeof SiteFooterItem;
8
+ ItemGroup: typeof SiteFooterItemGroup;
9
+ };
10
+ declare const SiteFooterItemGroup: FC<SiteFooterItemGroupProps>;
11
+ declare const SiteFooterItem: FC<SiteFooterItemProps>;
12
+ interface SiteFooterItemGroupProps {
13
+ /**
14
+ * Contents of the SiteFooterItemGroup. Must be SiteFooter.Item components.
15
+ */
16
+ children: ReactNode;
17
+ /**
18
+ * Title text for the SiteFooterItemGroup.
19
+ */
20
+ title: string;
21
+ }
22
+ interface SiteFooterItemProps {
23
+ /**
24
+ * Contents of the SiteFooterItem.
25
+ */
26
+ children: ReactNode;
27
+ /**
28
+ * A URL to link to when the Item is clicked or touched.
29
+ */
30
+ href: string;
31
+ /**
32
+ * On click handler.
33
+ */
34
+ onClick?: () => void;
35
+ }
36
+ interface SiteFooterProps {
37
+ /**
38
+ * Secondary content of the SiteFooter. Must be SiteFooter.Item components.
39
+ */
40
+ children?: ReactNode;
41
+ /**
42
+ * Copyright year.
43
+ */
44
+ currentYear?: string;
45
+ /**
46
+ * Should the SiteFooter include a Curve?
47
+ */
48
+ curve?: boolean;
49
+ /**
50
+ * Accessible text for the SiteFooter logo.
51
+ */
52
+ logoLabel?: string;
53
+ /**
54
+ * Main content of the SiteFooter. Must be SiteFooter.ItemGroup components.
55
+ */
56
+ main?: ReactNode;
57
+ /**
58
+ * Text that appears at the top of the footer. Can be the name of the site, a
59
+ * brand strapline, or similar.
60
+ */
61
+ siteName?: string;
62
+ }
63
+ declare const _default: (el: HTMLDivElement, rehydrateChildren: any) => Promise<JSX.Element>;
64
+ export { SiteFooter, _default as SiteFooterRehydrator };
@@ -0,0 +1,88 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs, d as __awaiter, e as __generator } from '../_shared/index-e3c83626.js';
2
+ import { A as ArcBreakpointM } from '../_shared/index.es-f5886c3a.js';
3
+ import React, { useEffect, Fragment } from 'react';
4
+ import { B as BrandLogo } from '../_shared/BrandLogo-6cc8202e.js';
5
+ import { C as Curve } from '../_shared/Curve-5f476d0b.js';
6
+ import { u as useMediaQuery } from '../_shared/use-media-query-f11805d4.js';
7
+ import { S as Section } from '../_shared/Section-927988cb.js';
8
+ import { S as Surface } from '../_shared/Surface-3fe44a2a.js';
9
+ import { h as handleLinkClick } from '../_shared/handle-link-click-35e09d0c.js';
10
+ import '../_shared/index-56d9df62.js';
11
+ import '../_shared/suffix-modifier-2a93822c.js';
12
+
13
+ /**
14
+ * Use `SiteFooter` to display information at the bottom of a page.
15
+ */
16
+ var SiteFooter = function (_a) {
17
+ var children = _a.children, currentYear = _a.currentYear, _b = _a.curve, curve = _b === void 0 ? true : _b, logoLabel = _a.logoLabel, main = _a.main, siteName = _a.siteName, props = __rest(_a, ["children", "currentYear", "curve", "logoLabel", "main", "siteName"]);
18
+ useEffect(function () {
19
+ React.Children.map(children, function (item) {
20
+ if (item && item.type !== SiteFooterItem) {
21
+ throw new Error("Illegal child passed to <SiteFooter />. Ensure to only use <SiteFooter.Item />.");
22
+ }
23
+ });
24
+ }, [children]);
25
+ return (React.createElement(React.Fragment, null,
26
+ curve ? (React.createElement(Curve, { bottomColor: "brand-flat", from: "topLeft", size: "s" })) : null,
27
+ React.createElement("footer", __assign({ className: "arc-SiteFooter" }, filterDataAttrs(props)),
28
+ React.createElement(Surface, { background: "brand-flat", paddingVertical: "24" },
29
+ (siteName || main) && (React.createElement(React.Fragment, null,
30
+ React.createElement(Section, null,
31
+ siteName && (React.createElement("div", { className: "arc-SiteFooter-name" }, siteName)),
32
+ main && React.createElement("div", { className: "arc-SiteFooter-main" }, main)),
33
+ React.createElement("hr", { className: "arc-SiteFooter-rule" }))),
34
+ React.createElement(Section, null,
35
+ React.createElement("div", { className: "arc-SiteFooter-secondary" },
36
+ children && (React.createElement("ul", { className: "arc-SiteFooter-secondaryItems" }, children)),
37
+ React.createElement("div", { className: "arc-SiteFooter-brand" },
38
+ React.createElement("div", { className: "arc-SiteFooter-copyright" },
39
+ React.createElement("span", { className: "arc-SiteFooter-copyrightSymbol" }, "\u00A9"), " ".concat(currentYear || new Date().getFullYear())),
40
+ React.createElement(BrandLogo, { label: logoLabel }))))))));
41
+ };
42
+ var SiteFooterItemGroup = function (_a) {
43
+ var children = _a.children, title = _a.title;
44
+ var isMinWidthArcBreakpointM = useMediaQuery("(min-width: ".concat(ArcBreakpointM, "px)"));
45
+ useEffect(function () {
46
+ React.Children.map(children, function (item) {
47
+ if (item && item.type !== SiteFooterItem && item.type !== Fragment) {
48
+ throw new Error("Illegal child passed to <SiteFooterItemGroup />. Ensure to only use <SiteFooter.Item />.");
49
+ }
50
+ });
51
+ }, [children]);
52
+ return (React.createElement("details", { className: "arc-SiteFooter-disclosure", open: isMinWidthArcBreakpointM },
53
+ React.createElement("summary", { className: "arc-SiteFooter-summary", tabIndex: isMinWidthArcBreakpointM ? -1 : 0 },
54
+ React.createElement("h2", { className: "arc-SiteFooter-title" }, title)),
55
+ React.createElement("ul", { className: "arc-SiteFooter-mainItems" }, children)));
56
+ };
57
+ var SiteFooterItem = function (_a) {
58
+ var children = _a.children, href = _a.href, onClick = _a.onClick, props = __rest(_a, ["children", "href", "onClick"]);
59
+ return (React.createElement("li", __assign({ className: "arc-SiteFooter-item" }, filterDataAttrs(props)),
60
+ React.createElement("a", { onClick: handleLinkClick({ handler: onClick }), className: "arc-SiteFooter-link", href: href }, children)));
61
+ };
62
+ SiteFooterItem.displayName = "SiteFooter.Item";
63
+ SiteFooter.Item = SiteFooterItem;
64
+ SiteFooterItemGroup.displayName = "SiteFooter.ItemGroup";
65
+ SiteFooter.ItemGroup = SiteFooterItemGroup;
66
+
67
+ var SiteFooter_rehydrator = (function (el, rehydrateChildren) { return __awaiter(void 0, void 0, void 0, function () {
68
+ var children, titleElement, title, props;
69
+ return __generator(this, function (_a) {
70
+ switch (_a.label) {
71
+ case 0: return [4 /*yield*/, rehydrateChildren(el.querySelector(".arc-SiteFooter-mainItems"))];
72
+ case 1:
73
+ children = _a.sent();
74
+ titleElement = el.querySelector(".arc-SiteFooter-title");
75
+ title = "";
76
+ if (titleElement) {
77
+ title = titleElement.textContent || /* istanbul ignore next */ "";
78
+ }
79
+ props = {
80
+ children: children,
81
+ title: title
82
+ };
83
+ return [2 /*return*/, React.createElement(SiteFooter.ItemGroup, __assign({}, props), children)];
84
+ }
85
+ });
86
+ }); });
87
+
88
+ export { SiteFooter, SiteFooter_rehydrator as SiteFooterRehydrator };