@arc-ui/components 10.1.0 → 10.2.1

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 `Heading` to display heading text.
4
+ */
5
+ declare const Heading: FC<HeadingProps> & {
6
+ Proposition: typeof HeadingProposition;
7
+ };
8
+ declare const HeadingProposition: FC<HeadingPropositionProps>;
9
+ interface HeadingPropositionProps {
10
+ /**
11
+ * Text to display in the Proposition.
12
+ */
13
+ children: ReactNode;
14
+ }
15
+ type HeadingCasing = "auto" | "none";
16
+ type HeadingColor = "auto" | "brand";
17
+ type HeadingLevel = "1" | "2" | "3" | "4" | "5" | "6";
18
+ type HeadingSize = "xxxs" | "xxs" | "xs" | "s" | "m" | "l" | "xl" | "xxl" | "xxxl";
19
+ interface HeadingProps {
20
+ /**
21
+ * Text alignment of the Heading.
22
+ */
23
+ align?: "left" | "center" | "right";
24
+ /**
25
+ * Typographic casing of the Heading.
26
+ */
27
+ casing?: HeadingCasing;
28
+ /**
29
+ * Text and inline markup to display in the Heading.
30
+ */
31
+ children: ReactNode;
32
+ /**
33
+ * The color of the Heading.
34
+ */
35
+ color?: HeadingColor;
36
+ /**
37
+ * HTML section heading level. If not provided, the Heading will render as
38
+ * a span.
39
+ */
40
+ level?: HeadingLevel;
41
+ /**
42
+ * Typographic size of the Heading.
43
+ */
44
+ size?: HeadingSize;
45
+ }
46
+ export { Heading, HeadingProposition, HeadingPropositionProps, HeadingCasing, HeadingColor, HeadingLevel, HeadingSize, HeadingProps };
@@ -0,0 +1,35 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-e3c83626.js';
2
+ import { c as classNames } from './index-56d9df62.js';
3
+ import React, { useContext } from 'react';
4
+ import { s as suffixModifier } from './suffix-modifier-2a93822c.js';
5
+ import { C as Context } from './Surface-3fe44a2a.js';
6
+
7
+ /**
8
+ * Use `Heading` to display heading text.
9
+ */
10
+ var Heading = function (_a) {
11
+ var _b;
12
+ var _c = _a.align, align = _c === void 0 ? "left" : _c, _d = _a.casing, casing = _d === void 0 ? "auto" : _d, children = _a.children, _e = _a.color, color = _e === void 0 ? "auto" : _e, level = _a.level, size = _a.size, props = __rest(_a, ["align", "casing", "children", "color", "level", "size"]);
13
+ var surface = useContext(Context).surface;
14
+ var Element = "span";
15
+ if (level) {
16
+ Element = "h".concat(level);
17
+ }
18
+ return (React.createElement(Element, __assign({ className: classNames((_b = {
19
+ "arc-Heading": true
20
+ },
21
+ _b[suffixModifier("arc-Heading--align", align)] = align && align !== "left",
22
+ _b["arc-Heading--size".concat(size && size.toUpperCase())] = size,
23
+ _b["arc-Heading--casingNone"] = casing === "none",
24
+ _b["arc-Heading--colorBrand"] = color === "brand",
25
+ _b["arc-Heading--onDarkSurface"] = surface === "dark",
26
+ _b)) }, filterDataAttrs(props)), children));
27
+ };
28
+ var HeadingProposition = function (_a) {
29
+ var children = _a.children;
30
+ return React.createElement("span", { className: "arc-Heading-proposition" }, children);
31
+ };
32
+ HeadingProposition.displayName = "Heading.Proposition";
33
+ Heading.Proposition = HeadingProposition;
34
+
35
+ export { Heading as H };
@@ -0,0 +1,34 @@
1
+ import { icons } from "@arc-ui/tokens";
2
+ import { FC } from "react";
3
+ /**
4
+ * Use `Icon` to display brand iconography.
5
+ */
6
+ declare const Icon: FC<IconProps>;
7
+ declare const colors: readonly ["auto", "brand", "statusRed", "statusAmber", "statusGreen"];
8
+ interface IconProps {
9
+ /**
10
+ * Color of the Icon.
11
+ */
12
+ color?: typeof colors[number];
13
+ /**
14
+ * Should the Icon component be styled as an inline element?
15
+ */
16
+ isInline?: boolean;
17
+ /**
18
+ * Should a selected variant of the Icon be shown?
19
+ */
20
+ isSelected?: boolean;
21
+ /**
22
+ * Icon variant.
23
+ */
24
+ icon?: typeof icons[number];
25
+ /**
26
+ * Alternative text label for the Icon.
27
+ */
28
+ label?: string;
29
+ /**
30
+ * Size of the Icon, in pixels.
31
+ */
32
+ size?: number;
33
+ }
34
+ export { Icon, colors, IconProps };
@@ -0,0 +1,27 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-e3c83626.js';
2
+ import { i as iconsSelected } from './index.es-f5886c3a.js';
3
+ import { c as classNames } from './index-56d9df62.js';
4
+ import React, { useContext } from 'react';
5
+ import { s as suffixModifier } from './suffix-modifier-2a93822c.js';
6
+ import { C as Context } from './Surface-3fe44a2a.js';
7
+
8
+ /**
9
+ * Use `Icon` to display brand iconography.
10
+ */
11
+ var Icon = function (_a) {
12
+ var _b;
13
+ var _c = _a.color, color = _c === void 0 ? "auto" : _c, icon = _a.icon, _d = _a.isInline, isInline = _d === void 0 ? false : _d, _e = _a.isSelected, isSelected = _e === void 0 ? false : _e, label = _a.label, size = _a.size, props = __rest(_a, ["color", "icon", "isInline", "isSelected", "label", "size"]);
14
+ var surface = useContext(Context).surface;
15
+ return (React.createElement("span", __assign({ "aria-label": label, className: classNames((_b = {},
16
+ _b["arc-Icon"] = true,
17
+ _b[suffixModifier("arc-Icon--color", color)] = color !== "auto",
18
+ _b["arc-Icon--".concat(icon).concat(isSelected && iconsSelected.includes("".concat(icon, "Fill")) ? "Fill" : "")] = icon,
19
+ _b["arc-Icon--inline"] = isInline,
20
+ _b["arc-Icon--onDarkSurface"] = surface === "dark",
21
+ _b)), role: label ? "img" : undefined, style: {
22
+ height: size,
23
+ width: size
24
+ } }, filterDataAttrs(props))));
25
+ };
26
+
27
+ export { Icon as I };
@@ -0,0 +1,94 @@
1
+ import { FC, HTMLAttributes, ReactNode } from "react";
2
+ import { anchorPoints } from "./index-9483ad5f";
3
+ /**
4
+ * Use `Image` to render a single image, or set of images, with support for
5
+ * image fitting and art direction.
6
+ */
7
+ declare const Image: FC<ImageProps> & {
8
+ Source: typeof ImageSource;
9
+ };
10
+ declare const ImageSource: FC<ImageSourceProps>;
11
+ interface ImageSourceProps {
12
+ /**
13
+ * The intrinsic height of the ImageSource, in pixels
14
+ */
15
+ height?: number;
16
+ /**
17
+ * Media condition (similar to a media query) that the user agent will evaluate for each ImageSource element. Same format as [media](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-media), i.e. `(min-width: 600px)`
18
+ */
19
+ media?: string;
20
+ /**
21
+ * The HTML [sizes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-sizes) attribute. Only required if srcSet is switching widths.
22
+ */
23
+ sizes?: string;
24
+ /**
25
+ * A comma-separated list indicating a set of possible sources for the user agent to use for different screen sizes for the ImageSource element. Same format as [srcSet](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-srcset), i.e. `my-image-200.png 200w, my-image-200.png 200w`.
26
+ */
27
+ srcSet: string;
28
+ /**
29
+ * MIME type for the resource URL(s) in the ImageSource element's srcset attribute. If the user agent does not support the given type, the element is skipped. Same format as [type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-type), i.e. `image/jpeg`.
30
+ */
31
+ type?: string;
32
+ /**
33
+ * The intrinsic width of the ImageSource, in pixels
34
+ */
35
+ width?: number;
36
+ }
37
+ declare const fitOptions: readonly ["cover"];
38
+ declare const loadingOptions: readonly ["eager", "lazy"];
39
+ declare const overlayOptions: readonly ["scrimBottomDark"];
40
+ interface ImageProps extends HTMLAttributes<HTMLElement> {
41
+ /**
42
+ * Alternative text for the Image, shown if the image cannot be displayed.
43
+ */
44
+ alt?: string;
45
+ /**
46
+ * Anchor point for the Image if using fit="cover".
47
+ */
48
+ anchor?: typeof anchorPoints[number];
49
+ /**
50
+ * Optionally enable HTML <picture> functionality by passing `Image.Source`
51
+ * components as children.
52
+ */
53
+ children?: ReactNode;
54
+ /**
55
+ * Fallback hexadecimal fill color. The intent is to increase perceived loading speed. Do not use on images with transparency. Requires that an explicit width and height be set for the image.
56
+ */
57
+ fillColor?: string;
58
+ /**
59
+ * Fit of the Image.
60
+ */
61
+ fit?: typeof fitOptions[number];
62
+ /**
63
+ * Height dimension of the Image, in pixels. If fit="cover", the height in which
64
+ * to fit the Image. Otherwise, the intrinsic height of the Image element.
65
+ */
66
+ height?: number;
67
+ /**
68
+ * Loading behaviour of the Image.
69
+ */
70
+ loading?: typeof loadingOptions[number];
71
+ /**
72
+ * Apply an overlay to the Image, e.g. a scrim gradient for text legibility.
73
+ * Should not be used if the image has a rasterized overlay.
74
+ */
75
+ overlay?: typeof overlayOptions[number];
76
+ /**
77
+ * The HTML [sizes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Example_4_Using_the_srcset_and_sizes_attributes) attribute. Only required if srcSet is switching widths. Ignored if `children` (<source> elements) are present.
78
+ */
79
+ sizes?: string;
80
+ /**
81
+ * Image `src`. Used if srcSet is not defined, or as a fallback.
82
+ */
83
+ src: string;
84
+ /**
85
+ * A comma-separated list indicating a set of possible sources for the user agent to use for different screen sizes for the 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`. Ignored if `children` (<source> elements) are present.
86
+ */
87
+ srcSet?: string;
88
+ /**
89
+ * Width dimension of the Image, in pixels. If fit="cover", the width in which
90
+ * to fit the Image. Otherwise, the intrinsic width of the Image element.
91
+ */
92
+ width?: number;
93
+ }
94
+ export { Image, ImageSource, ImageSourceProps, fitOptions, loadingOptions, overlayOptions, ImageProps };
@@ -0,0 +1,39 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-e3c83626.js';
2
+ import { c as classNames } from './index-56d9df62.js';
3
+ import React, { useEffect } from 'react';
4
+ import { s as suffixModifier } from './suffix-modifier-2a93822c.js';
5
+
6
+ /**
7
+ * Use `Image` to render a single image, or set of images, with support for
8
+ * image fitting and art direction.
9
+ */
10
+ var Image = function (_a) {
11
+ var _b;
12
+ var alt = _a.alt, _c = _a.anchor, anchor = _c === void 0 ? "C" : _c, children = _a.children, fillColor = _a.fillColor, fit = _a.fit, height = _a.height, loading = _a.loading, overlay = _a.overlay, sizes = _a.sizes, src = _a.src, srcSet = _a.srcSet, width = _a.width, props = __rest(_a, ["alt", "anchor", "children", "fillColor", "fit", "height", "loading", "overlay", "sizes", "src", "srcSet", "width"]);
13
+ useEffect(function () {
14
+ React.Children.map(children, function (item) {
15
+ if (item && item.type !== ImageSource) {
16
+ throw new Error("Illegal child passed to <Image />. Ensure to only use <Image.Source />.");
17
+ }
18
+ });
19
+ }, [children]);
20
+ var img = (React.createElement("img", { className: "arc-Image-img", alt: alt, height: fit === "cover" ? undefined : height, loading: loading, sizes: children ? undefined : sizes, src: src, srcSet: children ? undefined : srcSet, width: fit === "cover" ? undefined : width }));
21
+ return (React.createElement("div", __assign({ className: classNames((_b = {
22
+ "arc-Image": true,
23
+ "arc-Image--cover": fit === "cover"
24
+ },
25
+ _b["arc-Image--anchor".concat(anchor)] = fit === "cover",
26
+ _b[suffixModifier("arc-Image--overlay", overlay || "")] = overlay,
27
+ _b)), style: __assign(__assign(__assign({}, (fillColor && { backgroundColor: fillColor })), (fit === "cover" && height ? { height: "".concat(height, "px") } : null)), (fit === "cover" && width ? { width: "".concat(width, "px") } : null)) }, filterDataAttrs(props)), children ? (React.createElement("picture", null,
28
+ children,
29
+ " ",
30
+ img)) : (React.createElement(React.Fragment, null, img))));
31
+ };
32
+ var ImageSource = function (_a) {
33
+ var height = _a.height, media = _a.media, srcSet = _a.srcSet, sizes = _a.sizes, type = _a.type; _a.width; var props = __rest(_a, ["height", "media", "srcSet", "sizes", "type", "width"]);
34
+ return (React.createElement("source", __assign({ height: height, media: media, sizes: sizes, srcSet: srcSet, type: type }, filterDataAttrs(props))));
35
+ };
36
+ ImageSource.displayName = "Image.Source";
37
+ Image.Source = ImageSource;
38
+
39
+ export { Image as I };
@@ -0,0 +1,21 @@
1
+ import { FC, ReactNode } from "react";
2
+ /**
3
+ * Use `Section` to compose content into vertical page layouts.
4
+ */
5
+ declare const Section: FC<SectionProps>;
6
+ interface SectionProps {
7
+ /**
8
+ * Content to display in the Section.
9
+ */
10
+ children: ReactNode;
11
+ /**
12
+ * Should the Section be visible for debugging and documentation
13
+ * purposes?
14
+ */
15
+ isDebugVisible?: boolean;
16
+ /**
17
+ * Should the width of this Section be unconstrained (filling the viewport)?
18
+ */
19
+ isFullWidth?: boolean;
20
+ }
21
+ export { Section, SectionProps };
@@ -0,0 +1,17 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-e3c83626.js';
2
+ import { c as classNames } from './index-56d9df62.js';
3
+ import React from 'react';
4
+
5
+ /**
6
+ * Use `Section` to compose content into vertical page layouts.
7
+ */
8
+ var Section = function (_a) {
9
+ var children = _a.children, _b = _a.isFullWidth, isFullWidth = _b === void 0 ? false : _b, _c = _a.isDebugVisible, isDebugVisible = _c === void 0 ? false : _c, props = __rest(_a, ["children", "isFullWidth", "isDebugVisible"]);
10
+ return (React.createElement("div", __assign({ className: classNames({
11
+ "arc-Section": true,
12
+ "arc-Section--fullWidth": isFullWidth,
13
+ "arc-Section--debugVisible": isDebugVisible
14
+ }) }, filterDataAttrs(props)), children));
15
+ };
16
+
17
+ export { Section as S };
@@ -0,0 +1,50 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC, HTMLAttributes } from "react";
4
+ type SurfaceBackground = "light" | "dark";
5
+ declare const Context: React.Context<{
6
+ surface: SurfaceBackground;
7
+ }>;
8
+ /**
9
+ * Use `Surface` to compose content using the Arc system.
10
+ */
11
+ declare const Surface: FC<SurfaceProps>;
12
+ declare const backgrounds: readonly ["black", "brand", "brand-flat", "dark", "darker", "coral", "turquoise", "light", "lighter", "white"];
13
+ declare const backgroundsBT: readonly ["black", "brand", "brand-flat", "dark", "darker", "coral", "turquoise", "light", "lighter", "white"];
14
+ type SurfacePadding = "8" | "12" | "16" | "24" | "32" | "48" | "64";
15
+ interface SurfaceProps extends HTMLAttributes<HTMLElement> {
16
+ /**
17
+ * Background colour of the Surface. Contents will change colour to meet
18
+ * accessibility requirements.
19
+ */
20
+ background?: typeof backgrounds[number];
21
+ /**
22
+ * Content to display on the Surface.
23
+ */
24
+ children?: any;
25
+ /**
26
+ * Should the Surface grow to take up all the available vertical space? Most
27
+ * of the time this should not be required, but useful to fix issues in
28
+ * certain layout combinations.
29
+ */
30
+ growVertically?: boolean;
31
+ /**
32
+ * _Caution: This is an experimental property and may be removed at any time._
33
+ *
34
+ * Size of the padding applied to all sides of the Surface. Use to prevent margin collapsing issues.
35
+ */
36
+ padding?: SurfacePadding;
37
+ /**
38
+ * _Caution: This is an experimental property and may be removed at any time._
39
+ *
40
+ * Size of the horizontal padding applied to the left and right of the Surface.
41
+ */
42
+ paddingHorizontal?: SurfacePadding;
43
+ /**
44
+ * _Caution: This is an experimental property and may be removed at any time._
45
+ *
46
+ * Size of the vertical padding applied to the top and bottom of the Surface.
47
+ */
48
+ paddingVertical?: SurfacePadding;
49
+ }
50
+ export { Surface, backgrounds, backgroundsBT, SurfacePadding, SurfaceProps, Context as SurfaceContext };
@@ -0,0 +1,49 @@
1
+ import { b as __spreadArray, _ as __rest, a as __assign, c as camelCase, f as filterDataAttrs } from './index-e3c83626.js';
2
+ import { c as classNames } from './index-56d9df62.js';
3
+ import React, { createContext } from 'react';
4
+
5
+ var defaultContext = { surface: "light" };
6
+ var Context = createContext(defaultContext);
7
+ var Provider = Context.Provider;
8
+ /**
9
+ * Use `Surface` to compose content using the Arc system.
10
+ */
11
+ var Surface = function (_a) {
12
+ var _b;
13
+ var background = _a.background, children = _a.children, _c = _a.growVertically, growVertically = _c === void 0 ? false : _c, padding = _a.padding, paddingHorizontal = _a.paddingHorizontal, paddingVertical = _a.paddingVertical, props = __rest(_a, ["background", "children", "growVertically", "padding", "paddingHorizontal", "paddingVertical"]);
14
+ var surface = "light";
15
+ if (background === "black" ||
16
+ background === "brand" ||
17
+ background === "brand-flat" ||
18
+ background === "dark" ||
19
+ background === "darker") {
20
+ surface = "dark";
21
+ }
22
+ return (React.createElement(Provider, { value: { surface: surface } },
23
+ React.createElement("div", __assign({ className: classNames((_b = {
24
+ "arc-Surface": true
25
+ },
26
+ _b["arc-Surface--".concat(background &&
27
+ camelCase(background), "Background")] = background,
28
+ _b["arc-Surface--growVertically"] = growVertically,
29
+ _b["arc-Surface--padding".concat(padding)] = padding,
30
+ _b["arc-Surface--paddingHorizontal".concat(paddingHorizontal)] = paddingHorizontal,
31
+ _b["arc-Surface--paddingVertical".concat(paddingVertical)] = paddingVertical,
32
+ _b)) }, filterDataAttrs(props)), children)));
33
+ };
34
+ var backgroundsShared = [
35
+ "black",
36
+ "brand",
37
+ "brand-flat",
38
+ "dark",
39
+ "darker",
40
+ "coral",
41
+ "turquoise",
42
+ "light",
43
+ "lighter",
44
+ "white"
45
+ ];
46
+ var backgrounds = __spreadArray([], backgroundsShared, true);
47
+ var backgroundsBT = __spreadArray([], backgroundsShared, true);
48
+
49
+ export { Context as C, Surface as S, backgroundsBT as a, backgrounds as b };
@@ -0,0 +1,34 @@
1
+ import { FC, ReactNode } from "react";
2
+ /**
3
+ * Use `Text` to display text.
4
+ */
5
+ declare const Text: FC<TextProps>;
6
+ type Tone = "default" | "supporting" | "muted";
7
+ type TextSize = "xs" | "s" | "m" | "l";
8
+ interface TextProps {
9
+ /**
10
+ * Alignment of the Text.
11
+ */
12
+ align?: "left" | "center" | "right";
13
+ /**
14
+ * Text and inline markup to display.
15
+ */
16
+ children: ReactNode;
17
+ /**
18
+ * Should the Text component be styled as an inline element?
19
+ */
20
+ isInline?: boolean;
21
+ /**
22
+ * Should the Text width be constrained to a typographic measure?
23
+ */
24
+ isMeasured?: boolean;
25
+ /**
26
+ * Typographic Text size.
27
+ */
28
+ size?: TextSize;
29
+ /**
30
+ * Visual emphasis of the Text.
31
+ */
32
+ tone?: Tone;
33
+ }
34
+ export { Text, Tone, TextSize, TextProps };
@@ -0,0 +1,26 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-e3c83626.js';
2
+ import { c as classNames } from './index-56d9df62.js';
3
+ import React, { useContext } from 'react';
4
+ import { s as suffixModifier } from './suffix-modifier-2a93822c.js';
5
+ import { C as Context } from './Surface-3fe44a2a.js';
6
+
7
+ /**
8
+ * Use `Text` to display text.
9
+ */
10
+ var Text = function (_a) {
11
+ var _b;
12
+ var _c = _a.align, align = _c === void 0 ? "left" : _c, children = _a.children, _d = _a.isInline, isInline = _d === void 0 ? false : _d, _e = _a.isMeasured, isMeasured = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? "m" : _f, _g = _a.tone, tone = _g === void 0 ? "default" : _g, props = __rest(_a, ["align", "children", "isInline", "isMeasured", "size", "tone"]);
13
+ var surface = useContext(Context).surface;
14
+ return (React.createElement("span", __assign({ className: classNames((_b = {
15
+ "arc-Text": true
16
+ },
17
+ _b[suffixModifier("arc-Text--align", align)] = align !== "left",
18
+ _b["arc-Text--inline"] = isInline,
19
+ _b["arc-Text--measured"] = isMeasured,
20
+ _b["arc-Text--size".concat(size && size.toUpperCase())] = size && size !== "m",
21
+ _b["arc-Text--".concat(tone)] = tone !== "default",
22
+ _b["arc-Text--onDarkSurface"] = surface === "dark",
23
+ _b)) }, filterDataAttrs(props)), children));
24
+ };
25
+
26
+ export { Text as T };
@@ -0,0 +1,7 @@
1
+ import { MouseEvent } from "react";
2
+ interface IHandleLinkClick {
3
+ handler?: () => void;
4
+ preventDefault?: boolean;
5
+ }
6
+ declare const handleLinkClick: ({ handler, preventDefault }: IHandleLinkClick) => (e: MouseEvent<HTMLAnchorElement>) => void;
7
+ export { handleLinkClick };
@@ -0,0 +1,13 @@
1
+ var handleLinkClick = function (_a) {
2
+ var handler = _a.handler, _b = _a.preventDefault, preventDefault = _b === void 0 ? true : _b;
3
+ return function (e) {
4
+ if (preventDefault && handler) {
5
+ e.preventDefault();
6
+ }
7
+ if (handler) {
8
+ handler();
9
+ }
10
+ };
11
+ };
12
+
13
+ export { handleLinkClick as h };
@@ -0,0 +1,61 @@
1
+ var classnames = {exports: {}};
2
+
3
+ /*!
4
+ Copyright (c) 2018 Jed Watson.
5
+ Licensed under the MIT License (MIT), see
6
+ http://jedwatson.github.io/classnames
7
+ */
8
+
9
+ (function (module) {
10
+ /* global define */
11
+
12
+ (function () {
13
+
14
+ var hasOwn = {}.hasOwnProperty;
15
+
16
+ function classNames() {
17
+ var classes = [];
18
+
19
+ for (var i = 0; i < arguments.length; i++) {
20
+ var arg = arguments[i];
21
+ if (!arg) continue;
22
+
23
+ var argType = typeof arg;
24
+
25
+ if (argType === 'string' || argType === 'number') {
26
+ classes.push(arg);
27
+ } else if (Array.isArray(arg)) {
28
+ if (arg.length) {
29
+ var inner = classNames.apply(null, arg);
30
+ if (inner) {
31
+ classes.push(inner);
32
+ }
33
+ }
34
+ } else if (argType === 'object') {
35
+ if (arg.toString === Object.prototype.toString) {
36
+ for (var key in arg) {
37
+ if (hasOwn.call(arg, key) && arg[key]) {
38
+ classes.push(key);
39
+ }
40
+ }
41
+ } else {
42
+ classes.push(arg.toString());
43
+ }
44
+ }
45
+ }
46
+
47
+ return classes.join(' ');
48
+ }
49
+
50
+ if (module.exports) {
51
+ classNames.default = classNames;
52
+ module.exports = classNames;
53
+ } else {
54
+ window.classNames = classNames;
55
+ }
56
+ }());
57
+ }(classnames));
58
+
59
+ var classNames = classnames.exports;
60
+
61
+ export { classNames as c };
@@ -0,0 +1,14 @@
1
+ declare const anchorPoints: readonly [
2
+ "N",
3
+ "NE",
4
+ "E",
5
+ "SE",
6
+ "S",
7
+ "SW",
8
+ "W",
9
+ "NW",
10
+ "C"
11
+ ];
12
+ export { anchorPoints };
13
+ export * from "./index-e3c83626";
14
+ export * from "./suffix-modifier-2a93822c";
@@ -0,0 +1,4 @@
1
+ export * from "./FormControl-9dc9ecc3";
2
+ export * from "../Card/index";
3
+ export * from "./use-media-query-f11805d4";
4
+ export * from "../TextInput/index";
@@ -0,0 +1,2 @@
1
+ declare const filterDataAttrs: (props: Object) => {};
2
+ export { filterDataAttrs };