@arc-ui/components 11.5.0 → 11.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 (207) hide show
  1. package/dist/Breadcrumbs/Breadcrumbs.cjs.d.ts +1 -61
  2. package/dist/Breadcrumbs/Breadcrumbs.cjs.js +9 -641
  3. package/dist/Breadcrumbs/Breadcrumbs.esm.d.ts +1 -61
  4. package/dist/Breadcrumbs/Breadcrumbs.esm.js +8 -640
  5. package/dist/Button/Button.cjs.d.ts +1 -1
  6. package/dist/Button/Button.cjs.js +2 -1
  7. package/dist/Button/Button.esm.d.ts +1 -1
  8. package/dist/Button/Button.esm.js +2 -1
  9. package/dist/Card/Card.cjs.d.ts +1 -130
  10. package/dist/Card/Card.cjs.js +12 -119
  11. package/dist/Card/Card.esm.d.ts +1 -130
  12. package/dist/Card/Card.esm.js +11 -118
  13. package/dist/Checkbox/Checkbox.cjs.d.ts +1 -64
  14. package/dist/Checkbox/Checkbox.cjs.js +10 -59
  15. package/dist/Checkbox/Checkbox.esm.d.ts +1 -64
  16. package/dist/Checkbox/Checkbox.esm.js +9 -58
  17. package/dist/Columns/Columns.cjs.d.ts +1 -76
  18. package/dist/Columns/Columns.cjs.js +6 -52
  19. package/dist/Columns/Columns.esm.d.ts +1 -76
  20. package/dist/Columns/Columns.esm.js +5 -51
  21. package/dist/DisclosureMini/DisclosureMini.cjs.d.ts +1 -1
  22. package/dist/DisclosureMini/DisclosureMini.cjs.js +1 -1
  23. package/dist/DisclosureMini/DisclosureMini.esm.d.ts +1 -1
  24. package/dist/DisclosureMini/DisclosureMini.esm.js +1 -1
  25. package/dist/Filter/Filter.cjs.d.ts +1 -0
  26. package/dist/Filter/Filter.cjs.js +13 -0
  27. package/dist/Filter/Filter.esm.d.ts +1 -0
  28. package/dist/Filter/Filter.esm.js +5 -0
  29. package/dist/Filter/package.json +7 -0
  30. package/dist/FormControl/FormControl.cjs.d.ts +1 -1
  31. package/dist/FormControl/FormControl.cjs.js +2 -3
  32. package/dist/FormControl/FormControl.esm.d.ts +1 -1
  33. package/dist/FormControl/FormControl.esm.js +2 -3
  34. package/dist/Group/Group.cjs.d.ts +1 -46
  35. package/dist/Group/Group.cjs.js +6 -43
  36. package/dist/Group/Group.esm.d.ts +1 -46
  37. package/dist/Group/Group.esm.js +5 -42
  38. package/dist/Pagination/Pagination.cjs.d.ts +20 -0
  39. package/dist/Pagination/Pagination.cjs.js +87 -0
  40. package/dist/Pagination/Pagination.esm.d.ts +20 -0
  41. package/dist/Pagination/Pagination.esm.js +79 -0
  42. package/dist/Pagination/package.json +7 -0
  43. package/dist/PaginationSimple/PaginationSimple.cjs.d.ts +28 -0
  44. package/dist/PaginationSimple/PaginationSimple.cjs.js +47 -0
  45. package/dist/PaginationSimple/PaginationSimple.esm.d.ts +28 -0
  46. package/dist/PaginationSimple/PaginationSimple.esm.js +39 -0
  47. package/dist/PaginationSimple/package.json +7 -0
  48. package/dist/Poster/Poster.cjs.d.ts +1 -81
  49. package/dist/Poster/Poster.cjs.js +8 -45
  50. package/dist/Poster/Poster.esm.d.ts +1 -81
  51. package/dist/Poster/Poster.esm.js +7 -44
  52. package/dist/RadioGroup/RadioGroup.cjs.d.ts +1 -85
  53. package/dist/RadioGroup/RadioGroup.cjs.js +8 -67
  54. package/dist/RadioGroup/RadioGroup.esm.d.ts +1 -85
  55. package/dist/RadioGroup/RadioGroup.esm.js +7 -66
  56. package/dist/ScrollToTop/ScrollToTop.cjs.d.ts +25 -0
  57. package/dist/ScrollToTop/ScrollToTop.cjs.js +68 -0
  58. package/dist/ScrollToTop/ScrollToTop.esm.d.ts +25 -0
  59. package/dist/ScrollToTop/ScrollToTop.esm.js +60 -0
  60. package/dist/ScrollToTop/package.json +7 -0
  61. package/dist/Select/Select.cjs.d.ts +2 -2
  62. package/dist/Select/Select.cjs.js +2 -3
  63. package/dist/Select/Select.esm.d.ts +2 -2
  64. package/dist/Select/Select.esm.js +2 -3
  65. package/dist/SiteFooter/SiteFooter.cjs.d.ts +2 -62
  66. package/dist/SiteFooter/SiteFooter.cjs.js +10 -65
  67. package/dist/SiteFooter/SiteFooter.esm.d.ts +2 -62
  68. package/dist/SiteFooter/SiteFooter.esm.js +12 -66
  69. package/dist/SiteHeader/SiteHeader.cjs.d.ts +2 -260
  70. package/dist/SiteHeader/SiteHeader.cjs.js +16 -668
  71. package/dist/SiteHeader/SiteHeader.esm.d.ts +2 -260
  72. package/dist/SiteHeader/SiteHeader.esm.js +14 -666
  73. package/dist/Switch/Switch.cjs.d.ts +2 -2
  74. package/dist/Switch/Switch.cjs.js +2 -2
  75. package/dist/Switch/Switch.esm.d.ts +2 -2
  76. package/dist/Switch/Switch.esm.js +2 -2
  77. package/dist/TextArea/TextArea.cjs.d.ts +61 -0
  78. package/dist/TextArea/TextArea.cjs.js +87 -0
  79. package/dist/TextArea/TextArea.esm.d.ts +61 -0
  80. package/dist/TextArea/TextArea.esm.js +79 -0
  81. package/dist/TextArea/package.json +7 -0
  82. package/dist/TextInput/TextInput.cjs.d.ts +1 -75
  83. package/dist/TextInput/TextInput.cjs.js +9 -75
  84. package/dist/TextInput/TextInput.esm.d.ts +1 -75
  85. package/dist/TextInput/TextInput.esm.js +8 -74
  86. package/dist/UniversalHeader/UniversalHeader.cjs.d.ts +1 -26
  87. package/dist/UniversalHeader/UniversalHeader.cjs.js +5 -30
  88. package/dist/UniversalHeader/UniversalHeader.esm.d.ts +1 -26
  89. package/dist/UniversalHeader/UniversalHeader.esm.js +4 -29
  90. package/dist/_shared/cjs/Breadcrumbs-8b554370.d.ts +61 -0
  91. package/dist/_shared/cjs/Breadcrumbs-8b554370.js +106 -0
  92. package/dist/_shared/cjs/BtIconChevronLeftMid-df952a3e.js +31 -0
  93. package/dist/_shared/cjs/{Button-5dff284a.js → Button-27512fee.js} +6 -27
  94. package/dist/_shared/cjs/Card-804ab0e5.d.ts +136 -0
  95. package/dist/_shared/cjs/Card-804ab0e5.js +124 -0
  96. package/dist/_shared/cjs/Checkbox-21d3c4f6.d.ts +64 -0
  97. package/dist/_shared/cjs/Checkbox-21d3c4f6.js +62 -0
  98. package/dist/_shared/cjs/Columns-e90798f8.d.ts +76 -0
  99. package/dist/_shared/cjs/Columns-e90798f8.js +57 -0
  100. package/dist/_shared/cjs/{DisclosureMini-5af13d3c.js → DisclosureMini-067e0319.js} +3 -1
  101. package/dist/_shared/cjs/Filter-f7d2fbda.d.ts +83 -0
  102. package/dist/_shared/cjs/Filter-f7d2fbda.js +121 -0
  103. package/dist/_shared/cjs/{FormControl-42360ae8.d.ts → FormControl-9aaddd54.d.ts} +4 -0
  104. package/dist/_shared/cjs/{FormControl-42360ae8.js → FormControl-9aaddd54.js} +9 -9
  105. package/dist/_shared/cjs/Group-d83f8c2e.d.ts +46 -0
  106. package/dist/_shared/cjs/Group-d83f8c2e.js +48 -0
  107. package/dist/_shared/cjs/ItemGroup-5af4d600.d.ts +27 -0
  108. package/dist/_shared/cjs/NavItem-df20237c.d.ts +43 -0
  109. package/dist/_shared/cjs/NavItemWithSubNav-65f21828.d.ts +49 -0
  110. package/dist/_shared/cjs/Poster-e05bbe13.d.ts +81 -0
  111. package/dist/_shared/cjs/Poster-e05bbe13.js +50 -0
  112. package/dist/_shared/cjs/RadioGroup-81805ef9.d.ts +97 -0
  113. package/dist/_shared/cjs/RadioGroup-81805ef9.js +70 -0
  114. package/dist/_shared/cjs/SiteFooter-c540b5f1.d.ts +62 -0
  115. package/dist/_shared/cjs/SiteFooter-c540b5f1.js +73 -0
  116. package/dist/_shared/cjs/SiteHeader-c25ee36e.d.ts +78 -0
  117. package/dist/_shared/cjs/SiteHeader.rehydrator-f7fa2efe.d.ts +78 -0
  118. package/dist/_shared/cjs/SiteHeader.rehydrator-f7fa2efe.js +673 -0
  119. package/dist/_shared/cjs/SubNavItem-a84d1bf4.d.ts +48 -0
  120. package/dist/_shared/cjs/TextInput-33314fc4.d.ts +10 -0
  121. package/dist/_shared/cjs/TextInput-33314fc4.js +78 -0
  122. package/dist/_shared/cjs/TextInput-7ed03a48.d.ts +75 -0
  123. package/dist/_shared/cjs/UniversalHeader-cc1d9e5a.d.ts +26 -0
  124. package/dist/_shared/cjs/UniversalHeader-cc1d9e5a.js +35 -0
  125. package/dist/_shared/cjs/debounce-506538c5.js +544 -0
  126. package/dist/_shared/cjs/index-699086a7.d.ts +2 -0
  127. package/dist/_shared/cjs/index-74488a9f.d.ts +2 -0
  128. package/dist/_shared/cjs/index-c81c9401.d.ts +3 -3
  129. package/dist/_shared/cjs/index-e340924e.d.ts +2 -0
  130. package/dist/_shared/cjs/index-e6d20018.d.ts +3 -0
  131. package/dist/_shared/cjs/index-eb06f640.d.ts +2 -0
  132. package/dist/_shared/cjs/index-f419cf04.d.ts +2 -0
  133. package/dist/_shared/esm/Breadcrumbs-04590057.d.ts +61 -0
  134. package/dist/_shared/esm/Breadcrumbs-04590057.js +100 -0
  135. package/dist/_shared/esm/BtIconChevronLeftMid-9f4f3a3d.js +25 -0
  136. package/dist/_shared/esm/{Button-61241dd0.js → Button-d319fa11.js} +2 -23
  137. package/dist/_shared/esm/Card-e79eb6c8.d.ts +136 -0
  138. package/dist/_shared/esm/Card-e79eb6c8.js +118 -0
  139. package/dist/_shared/esm/Checkbox-94300d8c.d.ts +64 -0
  140. package/dist/_shared/esm/Checkbox-94300d8c.js +56 -0
  141. package/dist/_shared/esm/Columns-8704515b.d.ts +76 -0
  142. package/dist/_shared/esm/Columns-8704515b.js +51 -0
  143. package/dist/_shared/esm/{DisclosureMini-322fccc0.js → DisclosureMini-022beae3.js} +3 -1
  144. package/dist/_shared/esm/Filter-41b391e3.d.ts +83 -0
  145. package/dist/_shared/esm/Filter-41b391e3.js +115 -0
  146. package/dist/_shared/esm/{FormControl-0744f93f.d.ts → FormControl-5e3fdca3.d.ts} +4 -0
  147. package/dist/_shared/esm/{FormControl-0744f93f.js → FormControl-5e3fdca3.js} +9 -9
  148. package/dist/_shared/esm/Group-d62c3f56.d.ts +46 -0
  149. package/dist/_shared/esm/Group-d62c3f56.js +42 -0
  150. package/dist/_shared/esm/ItemGroup-5af4d600.d.ts +27 -0
  151. package/dist/_shared/esm/NavItem-df20237c.d.ts +43 -0
  152. package/dist/_shared/esm/NavItemWithSubNav-65f21828.d.ts +49 -0
  153. package/dist/_shared/esm/Poster-107d6954.d.ts +81 -0
  154. package/dist/_shared/esm/Poster-107d6954.js +44 -0
  155. package/dist/_shared/esm/RadioGroup-1fd0f389.d.ts +97 -0
  156. package/dist/_shared/esm/RadioGroup-1fd0f389.js +64 -0
  157. package/dist/_shared/esm/SiteFooter-8075a9bd.d.ts +62 -0
  158. package/dist/_shared/esm/SiteFooter-8075a9bd.js +67 -0
  159. package/dist/_shared/esm/SiteHeader-c25ee36e.d.ts +78 -0
  160. package/dist/_shared/esm/SiteHeader.rehydrator-4da8ac64.d.ts +78 -0
  161. package/dist/_shared/esm/SiteHeader.rehydrator-4da8ac64.js +666 -0
  162. package/dist/_shared/esm/SubNavItem-a84d1bf4.d.ts +48 -0
  163. package/dist/_shared/esm/TextInput-1631dbc4.d.ts +10 -0
  164. package/dist/_shared/esm/TextInput-1631dbc4.js +72 -0
  165. package/dist/_shared/esm/TextInput-7ed03a48.d.ts +75 -0
  166. package/dist/_shared/esm/UniversalHeader-7926abde.d.ts +26 -0
  167. package/dist/_shared/esm/UniversalHeader-7926abde.js +29 -0
  168. package/dist/_shared/esm/debounce-e228705f.js +542 -0
  169. package/dist/_shared/esm/index-699086a7.d.ts +2 -0
  170. package/dist/_shared/esm/index-74488a9f.d.ts +2 -0
  171. package/dist/_shared/esm/index-c81c9401.d.ts +3 -3
  172. package/dist/_shared/esm/index-e340924e.d.ts +2 -0
  173. package/dist/_shared/esm/index-e6d20018.d.ts +3 -0
  174. package/dist/_shared/esm/index-eb06f640.d.ts +2 -0
  175. package/dist/_shared/esm/index-f419cf04.d.ts +2 -0
  176. package/dist/index.es.js +178 -27
  177. package/dist/index.es.js.map +1 -1
  178. package/dist/index.js +179 -26
  179. package/dist/index.js.map +1 -1
  180. package/dist/styles.css +1 -1
  181. package/dist/types/components/Filter/Filter.d.ts +38 -0
  182. package/dist/types/components/Filter/FilterControls/FilterControl/FilterControl.d.ts +16 -0
  183. package/dist/types/components/Filter/FilterControls/FilterControls.d.ts +12 -0
  184. package/dist/types/components/Filter/FilterItems/FilterItem/FilterItem.d.ts +12 -0
  185. package/dist/types/components/Filter/FilterItems/FilterItems.d.ts +12 -0
  186. package/dist/types/components/Filter/index.d.ts +1 -0
  187. package/dist/types/components/FormControl/FormControl.d.ts +4 -0
  188. package/dist/types/components/Pagination/Pagination.d.ts +19 -0
  189. package/dist/types/components/Pagination/index.d.ts +1 -0
  190. package/dist/types/components/PaginationSimple/PaginationSimple.d.ts +27 -0
  191. package/dist/types/components/PaginationSimple/index.d.ts +1 -0
  192. package/dist/types/components/RadioGroup/RadioGroup.d.ts +1 -1
  193. package/dist/types/components/ScrollToTop/ScrollToTop.d.ts +24 -0
  194. package/dist/types/components/ScrollToTop/index.d.ts +1 -0
  195. package/dist/types/components/Select/Select.d.ts +1 -1
  196. package/dist/types/components/Switch/Switch.d.ts +1 -1
  197. package/dist/types/components/TextArea/TextArea.d.ts +60 -0
  198. package/dist/types/components/TextArea/index.d.ts +1 -0
  199. package/dist/types/components/TextInput/TextInput.d.ts +1 -1
  200. package/dist/types/components/index.d.ts +2 -0
  201. package/dist/types/hooks/use-pagination.d.ts +1 -0
  202. package/dist/types/styles.d.ts +7 -2
  203. package/package.json +4 -4
  204. /package/dist/_shared/cjs/{Button-5dff284a.d.ts → Button-27512fee.d.ts} +0 -0
  205. /package/dist/_shared/cjs/{DisclosureMini-5af13d3c.d.ts → DisclosureMini-067e0319.d.ts} +0 -0
  206. /package/dist/_shared/esm/{Button-61241dd0.d.ts → Button-d319fa11.d.ts} +0 -0
  207. /package/dist/_shared/esm/{DisclosureMini-322fccc0.d.ts → DisclosureMini-022beae3.d.ts} +0 -0
@@ -5,8 +5,7 @@ var index = require('./index-45bfb67b.js');
5
5
  var React = require('react');
6
6
  var BtIconAlert = require('./BtIconAlert-637db790.js');
7
7
  var Surface = require('./Surface-6da0a78e.js');
8
- var DisclosureMini = require('./DisclosureMini-5af13d3c.js');
9
- var VerticalSpace = require('./VerticalSpace-86f697e7.js');
8
+ var DisclosureMini = require('./DisclosureMini-067e0319.js');
10
9
 
11
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
11
 
@@ -48,7 +47,7 @@ var Provider = Context.Provider;
48
47
  * Use `FormControl` to provide inputs with labels, helper text and error messages
49
48
  */
50
49
  var FormControl = function (_a) {
51
- var children = _a.children, _b = _a.elementType, ElementType = _b === void 0 ? "div" : _b, errorMessage = _a.errorMessage, helper = _a.helper, htmlFor = _a.htmlFor, id = _a.id, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, _d = _a.requirementStatus, requirementStatus = _d === void 0 ? "optional" : _d, _e = _a.helperUnderLabel, helperUnderLabel = _e === void 0 ? false : _e, isDisabled = _a.isDisabled, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, props = filterDataAttrs.__rest(_a, ["children", "elementType", "errorMessage", "helper", "htmlFor", "id", "label", "labelSize", "requirementStatus", "helperUnderLabel", "isDisabled", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
50
+ var children = _a.children, _b = _a.elementType, ElementType = _b === void 0 ? "div" : _b, errorMessage = _a.errorMessage, helper = _a.helper, htmlFor = _a.htmlFor, supplementaryInfo = _a.supplementaryInfo, id = _a.id, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, _d = _a.requirementStatus, requirementStatus = _d === void 0 ? "optional" : _d, _e = _a.helperUnderLabel, helperUnderLabel = _e === void 0 ? false : _e, isDisabled = _a.isDisabled, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, props = filterDataAttrs.__rest(_a, ["children", "elementType", "errorMessage", "helper", "htmlFor", "supplementaryInfo", "id", "label", "labelSize", "requirementStatus", "helperUnderLabel", "isDisabled", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
52
51
  var surface = React.useContext(Surface.Context).surface;
53
52
  var _f = useAriaDescribedby({
54
53
  disclosureText: disclosureText,
@@ -83,12 +82,13 @@ var FormControl = function (_a) {
83
82
  requirementStatus === "optional" && (React__default["default"].createElement("span", { className: "arc-FormControl-labelOptional" }, "(optional)"))),
84
83
  helperUnderLabel && (React__default["default"].createElement(React__default["default"].Fragment, null, helper && (React__default["default"].createElement("div", { className: "arc-FormControl-helper arc-FormControl-helper--underLabel", id: idHelper }, helper)))),
85
84
  children,
86
- !helperUnderLabel && (React__default["default"].createElement(React__default["default"].Fragment, null, errorMessage ? (React__default["default"].createElement("div", { className: "arc-FormControl-error", id: idError },
87
- React__default["default"].createElement("span", { className: "arc-FormControl-error--icon" },
88
- React__default["default"].createElement(BtIconAlert.BtIconAlert_2, null)),
89
- errorMessage)) : disclosureTitle ? (React__default["default"].createElement(React__default["default"].Fragment, null,
90
- React__default["default"].createElement(VerticalSpace.VerticalSpace, { size: "12" }),
91
- React__default["default"].createElement(DisclosureMini.DisclosureMini, { onClick: onClickDisclosure, summary: disclosureTitle, size: labelSize, id: idDisclosure }, disclosureText))) : (helper && (React__default["default"].createElement("div", { className: "arc-FormControl-helper", id: idHelper }, helper))))))));
85
+ React__default["default"].createElement("div", { className: "arc-FormControl-info" },
86
+ !helperUnderLabel && (React__default["default"].createElement("div", { className: "arc-FormControl-helperContainer" }, errorMessage ? (React__default["default"].createElement("div", { className: "arc-FormControl-error", id: idError },
87
+ React__default["default"].createElement("span", { className: "arc-FormControl-error--icon" },
88
+ React__default["default"].createElement(BtIconAlert.BtIconAlert_2, null)),
89
+ errorMessage)) : disclosureTitle ? (React__default["default"].createElement(React__default["default"].Fragment, null,
90
+ React__default["default"].createElement(DisclosureMini.DisclosureMini, { onClick: onClickDisclosure, summary: disclosureTitle, size: labelSize, id: idDisclosure }, disclosureText))) : (helper && (React__default["default"].createElement("div", { className: "arc-FormControl-helper", id: idHelper }, helper))))),
91
+ supplementaryInfo && (React__default["default"].createElement("div", { className: "arc-FormControl-supplementaryInfo" }, supplementaryInfo))))));
92
92
  };
93
93
 
94
94
  exports.Context = Context;
@@ -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, GroupItem, ItemProps, GroupProps };
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ var filterDataAttrs = require('./filter-data-attrs-a30dcf5f.js');
4
+ var index = require('./index-45bfb67b.js');
5
+ var React = require('react');
6
+ var Surface = require('./Surface-6da0a78e.js');
7
+
8
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
+
10
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
11
+
12
+ /**
13
+ * Use `Group` to arrange flexible items in a row.
14
+ */
15
+ var Group = function (_a) {
16
+ var _b;
17
+ 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 = filterDataAttrs.__rest(_a, ["children", "grow", "growEqual", "gutterBorder", "noWrap"]);
18
+ var surface = React.useContext(Surface.Context).surface;
19
+ React.useEffect(function () {
20
+ React__default["default"].Children.map(children, function (item) {
21
+ if (item && item.type !== GroupItem) {
22
+ throw new Error("Illegal child passed to <Group />. Ensure to only use <Group.Item />.");
23
+ }
24
+ });
25
+ }, [children]);
26
+ return (React__default["default"].createElement("div", filterDataAttrs.__assign({ className: index.classNames((_b = {},
27
+ _b["arc-Group"] = true,
28
+ _b["arc-Group--grow"] = grow,
29
+ _b["arc-Group--growEqual"] = growEqual,
30
+ _b["arc-Group--gutterBorder"] = gutterBorder,
31
+ _b["arc-Group--noWrap"] = noWrap,
32
+ _b["arc-Group--onDarkSurface"] = surface === "dark",
33
+ _b)) }, filterDataAttrs.filterDataAttrs(props)),
34
+ React__default["default"].createElement("div", { className: "arc-Group-inner" }, children)));
35
+ };
36
+ var GroupItem = function (_a) {
37
+ var _b;
38
+ var children = _a.children, _c = _a.grow, grow = _c === void 0 ? false : _c, _d = _a.isDebugVisible, isDebugVisible = _d === void 0 ? false : _d, props = filterDataAttrs.__rest(_a, ["children", "grow", "isDebugVisible"]);
39
+ return (React__default["default"].createElement("div", filterDataAttrs.__assign({ className: index.classNames((_b = {},
40
+ _b["arc-Group-item"] = true,
41
+ _b["arc-Group-item--grow"] = grow,
42
+ _b["arc-Group-item--debugVisible"] = isDebugVisible,
43
+ _b)) }, filterDataAttrs.filterDataAttrs(props)), children));
44
+ };
45
+ GroupItem.displayName = "Group.Item";
46
+ Group.Item = GroupItem;
47
+
48
+ exports.Group = Group;
@@ -0,0 +1,27 @@
1
+ import { FC, ReactNode } from "react";
2
+ declare const ItemGroup: FC<ItemGroupProps>;
3
+ interface ItemGroupProps {
4
+ /**
5
+ * Contents of the ItemGroup. Must be Item components.
6
+ */
7
+ children: ReactNode;
8
+ /**
9
+ * A top-level URL for the ItemGroup to link to.
10
+ */
11
+ href?: string;
12
+ /**
13
+ * Title text to be displayed in the ItemGroup summary.
14
+ */
15
+ title?: string;
16
+ /**
17
+ * Text to display in top-level link inside the ItemGroup in narrow viewports.
18
+ * Only applies if `href` is present. If not provided, top-level link text
19
+ * will be automatically generated from `title`.
20
+ */
21
+ viewAllTitle?: string;
22
+ /**
23
+ * On click handler.
24
+ */
25
+ onClick?: () => void;
26
+ }
27
+ export { ItemGroup, ItemGroupProps };
@@ -0,0 +1,43 @@
1
+ import { FC, ReactNode } from "react";
2
+ declare const NavItem: FC<NavItemProps>;
3
+ interface NavItemProps {
4
+ /**
5
+ * Contents of the NavItem. Must be SiteHeader.ItemGroup or
6
+ * SiteHeader.Column components.
7
+ */
8
+ children?: ReactNode;
9
+ /**
10
+ * A top-level URL for the NavItem to link to.
11
+ *
12
+ * When `children` are not present, the URL to link to when the NavItem is
13
+ * clicked or touched.
14
+ *
15
+ * When `children` are present, the URL to link to when a top-level link
16
+ * inside the NavItem panel is clicked or touched.
17
+ */
18
+ href?: string;
19
+ /**
20
+ * Should the NavItem be highlighted as the current item/page? Only applies if
21
+ * `children` are not present (and `href` is present).
22
+ */
23
+ isCurrent?: boolean;
24
+ /**
25
+ * Content to display in the NavItem panel promo area.
26
+ */
27
+ promo?: ReactNode;
28
+ /**
29
+ * Top-level text to display in the NavItem.
30
+ */
31
+ title: string;
32
+ /**
33
+ * Text to display in top-level link inside the NavItem panel. Only
34
+ * applies if both `children` are present and `href` is true. If not
35
+ * provided, top-level link text will be automatically generated from `title`.
36
+ */
37
+ viewAllTitle?: string;
38
+ /**
39
+ * On click handler.
40
+ */
41
+ onClick?: () => void;
42
+ }
43
+ export { NavItem, NavItemProps };
@@ -0,0 +1,49 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC, ReactElement, ReactNode } from "react";
4
+ declare const Context: React.Context<{
5
+ navItem: React.MutableRefObject<HTMLLIElement> | null;
6
+ subTitle: string | null;
7
+ }>;
8
+ declare const NavItemWithSubNav: FC<NavItemWithSubNavProps>;
9
+ interface NavItemWithSubNavProps {
10
+ /**
11
+ * The URL to link to when a top-level link inside the NavItemWithSubNav panel
12
+ * is clicked or touched.
13
+ */
14
+ href?: string;
15
+ /**
16
+ * Content to be displayed in the first slot of the NavItemWithSubNav. Must be
17
+ * a single SiteHeader.SubNavItem component.
18
+ */
19
+ slot1: ReactElement;
20
+ /**
21
+ * Content to be displayed in the second slot of the NavItemWithSubNav. Must
22
+ * be a single SiteHeader.SubNavItem component.
23
+ */
24
+ slot2: ReactNode;
25
+ /**
26
+ * Content to be displayed in the third slot of the NavItemWithSubNav. Must be
27
+ * a single SiteHeader.SubNavItem component.
28
+ */
29
+ slot3?: ReactNode;
30
+ /**
31
+ * Title text to display inside the NavItemWithSubNav panel.
32
+ */
33
+ subTitle?: string;
34
+ /**
35
+ * Top-level text to display in the NavItemWithSubNav.
36
+ */
37
+ title: string;
38
+ /**
39
+ * Text to display in top-level link inside the NavItemWithSubNav panel. Only
40
+ * applies if `href` is true. If not provided, text will be automatically
41
+ * generated from `title`.
42
+ */
43
+ viewAllTitle?: string;
44
+ /**
45
+ * view all click handler.
46
+ */
47
+ onViewAllClick?: () => void;
48
+ }
49
+ export { NavItemWithSubNav, NavItemWithSubNavProps, Context as NavItemContext };
@@ -0,0 +1,81 @@
1
+ import React from "react";
2
+ import { FC, ReactNode } from "react";
3
+ import { anchorPoints } from "./index-9483ad5f";
4
+ import { loadingOptions } from "./Image-3bf4b4f3";
5
+ declare const PosterVideo: FC<PosterVideoProps>;
6
+ interface PosterVideoProps {
7
+ /**
8
+ * Anchor point for the Poster.Video,
9
+ */
10
+ anchor?: typeof anchorPoints[number];
11
+ /**
12
+ * Should the Poster.Video autoplay?
13
+ */
14
+ autoPlay?: boolean;
15
+ /**
16
+ * HTML video sources for the Poster.Video. [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video).
17
+ */
18
+ children: ReactNode;
19
+ /**
20
+ * Should the Poster.Video loop?
21
+ */
22
+ loop?: boolean;
23
+ }
24
+ declare const PosterImage: FC<PosterImageProps>;
25
+ interface PosterImageProps {
26
+ /**
27
+ * 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.
28
+ */
29
+ alt?: string;
30
+ /**
31
+ * Anchor point for the Poster.Image.
32
+ */
33
+ anchor?: typeof anchorPoints[number];
34
+ /**
35
+ * Loading behaviour of the Poster.Image.
36
+ */
37
+ loading?: typeof loadingOptions[number];
38
+ /**
39
+ * 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.
40
+ */
41
+ sizes?: string;
42
+ /**
43
+ * The `src` for the Poster.Image. Used if srcSet is not defined, or as a fallback.
44
+ */
45
+ src: string;
46
+ /**
47
+ * 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`.
48
+ */
49
+ srcSet?: string;
50
+ /**
51
+ * Contents of the PosterImage.
52
+ */
53
+ children?: React.ReactNode;
54
+ }
55
+ /**
56
+ * Use `Poster` to compose content on an image or video background.
57
+ */
58
+ declare const Poster: FC<PosterProps> & {
59
+ Image: typeof PosterImage;
60
+ Video: typeof PosterVideo;
61
+ };
62
+ interface PosterProps {
63
+ /**
64
+ * Poster background to overlay content on top of. Must be one of Poster.Image or Poster.Video.
65
+ */
66
+ background: ReactNode;
67
+ /**
68
+ * Contents of the Poster. Each item will be wrapped in an PosterItem component.
69
+ */
70
+ children: ReactNode;
71
+ /**
72
+ * Apply an overlay to the Poster background, e.g. a scrim gradient for text legibility.
73
+ */
74
+ overlay?: boolean;
75
+ /**
76
+ * The background surface colour to show behind the Poster content before it loads.
77
+ * If using `overlay`, the gradient will match the surface.
78
+ */
79
+ surface?: "darker" | "lighter";
80
+ }
81
+ export { PosterVideo, PosterVideoProps, PosterImage, PosterImageProps, Poster, PosterProps };
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ var filterDataAttrs = require('./filter-data-attrs-a30dcf5f.js');
4
+ var index = require('./index-45bfb67b.js');
5
+ var React = require('react');
6
+ var Surface = require('./Surface-6da0a78e.js');
7
+ var Image = require('./Image-3bf4b4f3.js');
8
+ var suffixModifier = require('./suffix-modifier-1ee2da04.js');
9
+
10
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
+
12
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
+
14
+ var PosterImage = function (_a) {
15
+ 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 = filterDataAttrs.__rest(_a, ["alt", "anchor", "loading", "sizes", "src", "srcSet"]);
16
+ return (React__default["default"].createElement(Image.Image, filterDataAttrs.__assign({ alt: alt, anchor: anchor, fit: "cover", loading: loading, sizes: sizes, src: src, srcSet: srcSet }, props)));
17
+ };
18
+ PosterImage.displayName = "Poster.Image";
19
+
20
+ var PosterVideo = function (_a) {
21
+ var _b;
22
+ 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 = filterDataAttrs.__rest(_a, ["anchor", "autoPlay", "children", "loop"]);
23
+ return (React__default["default"].createElement("video", filterDataAttrs.__assign({ className: index.classNames((_b = {
24
+ "arc-PosterVideo": true
25
+ },
26
+ _b[suffixModifier.suffixModifier("arc-PosterVideo--anchor", anchor)] = anchor,
27
+ _b)), autoPlay: autoPlay, muted: true, loop: loop }, filterDataAttrs.filterDataAttrs(props)), children));
28
+ };
29
+ PosterVideo.displayName = "Poster.Video";
30
+
31
+ /**
32
+ * Use `Poster` to compose content on an image or video background.
33
+ */
34
+ var Poster = function (_a) {
35
+ 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 = filterDataAttrs.__rest(_a, ["background", "children", "overlay", "surface"]);
36
+ return (React__default["default"].createElement(Surface.Surface, { background: surface },
37
+ React__default["default"].createElement("div", filterDataAttrs.__assign({ className: index.classNames({
38
+ "arc-Poster": true,
39
+ "arc-Poster--overlay": overlay,
40
+ "arc-Poster--overlayLight": surface === "lighter"
41
+ }) }, filterDataAttrs.filterDataAttrs(props)),
42
+ React__default["default"].createElement("div", { className: "arc-Poster-backgroundWrapper" }, background),
43
+ React__default["default"].createElement("div", { className: "arc-Poster-body" }, children))));
44
+ };
45
+ PosterImage.displayName = "Poster.Image";
46
+ Poster.Image = PosterImage;
47
+ PosterVideo.displayName = "Poster.Video";
48
+ Poster.Video = PosterVideo;
49
+
50
+ exports.Poster = Poster;
@@ -0,0 +1,97 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC } from "react";
4
+ import { FormControlProps } from "./FormControl-9aaddd54";
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
+ type ContextProps = {
33
+ blurEvent: (event: EventType) => void;
34
+ changeEvent: (event: EventType) => void;
35
+ groupDisabled: boolean;
36
+ checkedValue: string;
37
+ labelSize: "s" | "l";
38
+ name: string;
39
+ size: "s" | "l";
40
+ };
41
+ declare const Provider: React.Provider<ContextProps>;
42
+ declare const useRadioContext: () => ContextProps;
43
+ type EventType$0 = React.ChangeEvent<HTMLInputElement>;
44
+ /**
45
+ * Use `RadioGroup` to wrap and control radio buttons and apply default values
46
+ */
47
+ declare const RadioGroup: FC<RadioGroupProps> & {
48
+ RadioButton: typeof RadioButton;
49
+ };
50
+ interface RadioGroupProps extends Omit<FormControlProps, "children" | "elementType" | "errorMessage" | "htmlFor" | "labelSize" | "requirementStatus" | "disclosureText" | "disclosureTitle" | "onClickDisclosure" | "helperUnderLabel" | "supplementaryInfo"> {
51
+ /**
52
+ * Contents of the RadioGroup. Should only contain `RadioGroup.RadioButton`
53
+ */
54
+ children?: React.ReactNode;
55
+ /**
56
+ * Value of the RadioButton that should be checked by default.
57
+ */
58
+ checkedValue: string;
59
+ /**
60
+ * Should all controls be disabled?
61
+ */
62
+ isDisabled?: boolean;
63
+ /**
64
+ * Helper message for the RadioGroup.
65
+ */
66
+ helper?: string;
67
+ /**
68
+ * ID for the RadioGroup.
69
+ */
70
+ id: string;
71
+ /**
72
+ * Label for the RadioGroup.
73
+ */
74
+ label: string;
75
+ /**
76
+ * Label size for the RadioGroup
77
+ */
78
+ labelSize?: "s" | "l";
79
+ /**
80
+ * Name for the RadioGroup.
81
+ */
82
+ name: string;
83
+ /**
84
+ * Function to call when the RadioGroup loses focus.
85
+ */
86
+ onBlur?: (e: EventType$0) => void;
87
+ /**
88
+ * Callback function to update the RadioGroup's controlled `checkedValue` prop,
89
+ * for example `e => setCheckedValue(e.target.value)`.
90
+ */
91
+ onChange?: (event: EventType$0) => void;
92
+ /**
93
+ * Size of the RadioGroup.
94
+ */
95
+ size?: "s" | "l";
96
+ }
97
+ export { RadioButton, RadioButtonProps, Provider, useRadioContext, RadioGroup, RadioGroupProps };
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ var filterDataAttrs = require('./filter-data-attrs-a30dcf5f.js');
4
+ var React = require('react');
5
+ var FormControl = require('./FormControl-9aaddd54.js');
6
+ var index = require('./index-45bfb67b.js');
7
+ var Surface = require('./Surface-6da0a78e.js');
8
+
9
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
+
13
+ var RadioContext = React.createContext({});
14
+ var Provider = RadioContext.Provider;
15
+ var useRadioContext = function () {
16
+ var context = React.useContext(RadioContext);
17
+ return context;
18
+ };
19
+
20
+ /**
21
+ * Radio Button component.
22
+ */
23
+ var RadioButton = React.forwardRef(function (_a, ref) {
24
+ var helper = _a.helper, id = _a.id, isDisabled = _a.isDisabled, label = _a.label, value = _a.value, props = filterDataAttrs.__rest(_a, ["helper", "id", "isDisabled", "label", "value"]);
25
+ var _b = useRadioContext(), blurEvent = _b.blurEvent, changeEvent = _b.changeEvent, groupDisabled = _b.groupDisabled, checkedValue = _b.checkedValue, labelSize = _b.labelSize, name = _b.name, size = _b.size;
26
+ var surface = React.useContext(Surface.Context).surface;
27
+ var idLabel = "".concat(id, "-label");
28
+ var checked = checkedValue === value ? true : false;
29
+ return (React__default["default"].createElement("div", filterDataAttrs.__assign({ className: index.classNames({
30
+ "arc-RadioButton": true,
31
+ "arc-RadioButton--disabled": isDisabled || groupDisabled,
32
+ "arc-RadioButton--small": size === "s",
33
+ "arc-RadioButton--smallLabel": labelSize === "s",
34
+ "arc-RadioButton--onDarkSurface": surface === "dark"
35
+ }) }, filterDataAttrs.filterDataAttrs(props)),
36
+ React__default["default"].createElement("label", { className: "arc-RadioButton-label", htmlFor: id, id: idLabel },
37
+ React__default["default"].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 }),
38
+ React__default["default"].createElement("span", null,
39
+ label,
40
+ helper && React__default["default"].createElement("span", { className: "arc-RadioButton-helper" }, helper)))));
41
+ });
42
+
43
+ /**
44
+ * Use `RadioGroup` to wrap and control radio buttons and apply default values
45
+ */
46
+ var RadioGroup = function (_a) {
47
+ 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 = filterDataAttrs.__rest(_a, ["children", "checkedValue", "isDisabled", "id", "helper", "label", "labelSize", "name", "onBlur", "onChange", "size"]);
48
+ React.useEffect(function () {
49
+ React__default["default"].Children.map(children, function (item) {
50
+ if (item && item.type !== RadioButton) {
51
+ throw new Error("Illegal child passed to <RadioGroup />. Ensure to only use <RadioGroup.RadioButton />.");
52
+ }
53
+ });
54
+ }, [children]);
55
+ return (React__default["default"].createElement(Provider, { value: {
56
+ blurEvent: onBlur,
57
+ changeEvent: onChange,
58
+ groupDisabled: isDisabled,
59
+ checkedValue: checkedValue,
60
+ labelSize: labelSize,
61
+ name: name,
62
+ size: size
63
+ } },
64
+ React__default["default"].createElement("div", filterDataAttrs.__assign({ className: "arc-RadioGroup" }, filterDataAttrs.filterDataAttrs(props)),
65
+ React__default["default"].createElement(FormControl.FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable", helperUnderLabel: true }, children))));
66
+ };
67
+ RadioButton.displayName = "RadioGroup.RadioButton";
68
+ RadioGroup.RadioButton = RadioButton;
69
+
70
+ exports.RadioGroup = RadioGroup;
@@ -0,0 +1,62 @@
1
+ import { FC, ReactNode } from "react";
2
+ /**
3
+ * Use `SiteFooter` to display information at the bottom of a page.
4
+ */
5
+ declare const SiteFooter: FC<SiteFooterProps> & {
6
+ Item: typeof SiteFooterItem;
7
+ ItemGroup: typeof SiteFooterItemGroup;
8
+ };
9
+ declare const SiteFooterItemGroup: FC<SiteFooterItemGroupProps>;
10
+ declare const SiteFooterItem: FC<SiteFooterItemProps>;
11
+ interface SiteFooterItemGroupProps {
12
+ /**
13
+ * Contents of the SiteFooterItemGroup. Must be SiteFooter.Item components.
14
+ */
15
+ children: ReactNode;
16
+ /**
17
+ * Title text for the SiteFooterItemGroup.
18
+ */
19
+ title: string;
20
+ }
21
+ interface SiteFooterItemProps {
22
+ /**
23
+ * Contents of the SiteFooterItem.
24
+ */
25
+ children: ReactNode;
26
+ /**
27
+ * A URL to link to when the Item is clicked or touched.
28
+ */
29
+ href: string;
30
+ /**
31
+ * On click handler.
32
+ */
33
+ onClick?: () => void;
34
+ }
35
+ interface SiteFooterProps {
36
+ /**
37
+ * Secondary content of the SiteFooter. Must be SiteFooter.Item components.
38
+ */
39
+ children?: ReactNode;
40
+ /**
41
+ * Copyright year.
42
+ */
43
+ currentYear?: string;
44
+ /**
45
+ * Should the SiteFooter include a Curve?
46
+ */
47
+ curve?: boolean;
48
+ /**
49
+ * Accessible text for the SiteFooter logo.
50
+ */
51
+ logoLabel?: string;
52
+ /**
53
+ * Main content of the SiteFooter. Must be SiteFooter.ItemGroup components.
54
+ */
55
+ main?: ReactNode;
56
+ /**
57
+ * Text that appears at the top of the footer. Can be the name of the site, a
58
+ * brand strapline, or similar.
59
+ */
60
+ siteName?: string;
61
+ }
62
+ export { SiteFooter, SiteFooterItemGroup, SiteFooterItem, SiteFooterItemGroupProps, SiteFooterItemProps, SiteFooterProps };