@arc-ui/components 10.8.1 → 11.1.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 (158) hide show
  1. package/dist/Align/Align.esm.js +4 -4
  2. package/dist/Badge/Badge.cjs.d.ts +26 -0
  3. package/dist/Badge/Badge.cjs.js +37 -0
  4. package/dist/Badge/Badge.esm.d.ts +26 -0
  5. package/dist/Badge/Badge.esm.js +29 -0
  6. package/dist/Badge/package.json +7 -0
  7. package/dist/Base/Base.cjs.d.ts +1 -16
  8. package/dist/Base/Base.cjs.js +4 -16
  9. package/dist/Base/Base.esm.d.ts +1 -16
  10. package/dist/Base/Base.esm.js +3 -15
  11. package/dist/BrandLogo/BrandLogo.esm.d.ts +1 -1
  12. package/dist/BrandLogo/BrandLogo.esm.js +2 -2
  13. package/dist/Breadcrumbs/Breadcrumbs.cjs.js +4 -4
  14. package/dist/Breadcrumbs/Breadcrumbs.esm.js +27 -27
  15. package/dist/Button/Button.cjs.d.ts +1 -1
  16. package/dist/Button/Button.cjs.js +4 -4
  17. package/dist/Button/Button.esm.d.ts +1 -1
  18. package/dist/Button/Button.esm.js +5 -5
  19. package/dist/Card/Card.cjs.js +3 -3
  20. package/dist/Card/Card.esm.js +27 -27
  21. package/dist/Checkbox/Checkbox.cjs.js +35 -8
  22. package/dist/Checkbox/Checkbox.esm.js +38 -11
  23. package/dist/Clock/Clock.esm.js +3 -3
  24. package/dist/Columns/Columns.esm.js +5 -5
  25. package/dist/Curve/Curve.esm.d.ts +1 -1
  26. package/dist/Curve/Curve.esm.js +1 -1
  27. package/dist/Disclosure/Disclosure.cjs.js +3 -0
  28. package/dist/Disclosure/Disclosure.esm.d.ts +1 -1
  29. package/dist/Disclosure/Disclosure.esm.js +10 -7
  30. package/dist/Elevation/Elevation.esm.js +2 -2
  31. package/dist/FormControl/FormControl.cjs.d.ts +1 -1
  32. package/dist/FormControl/FormControl.cjs.js +4 -1
  33. package/dist/FormControl/FormControl.esm.d.ts +1 -1
  34. package/dist/FormControl/FormControl.esm.js +5 -2
  35. package/dist/Group/Group.esm.js +6 -6
  36. package/dist/Heading/Heading.esm.d.ts +1 -1
  37. package/dist/Heading/Heading.esm.js +2 -2
  38. package/dist/Icon/Icon.cjs.d.ts +1 -1
  39. package/dist/Icon/Icon.cjs.js +2 -3
  40. package/dist/Icon/Icon.esm.d.ts +1 -1
  41. package/dist/Icon/Icon.esm.js +3 -4
  42. package/dist/Image/Image.esm.d.ts +1 -1
  43. package/dist/Image/Image.esm.js +1 -1
  44. package/dist/Markup/Markup.esm.js +3 -3
  45. package/dist/Poster/Poster.esm.d.ts +1 -1
  46. package/dist/Poster/Poster.esm.js +9 -9
  47. package/dist/RadioGroup/RadioGroup.cjs.d.ts +1 -1
  48. package/dist/RadioGroup/RadioGroup.cjs.js +4 -1
  49. package/dist/RadioGroup/RadioGroup.esm.d.ts +1 -1
  50. package/dist/RadioGroup/RadioGroup.esm.js +15 -12
  51. package/dist/Rule/Rule.esm.js +3 -3
  52. package/dist/Section/Section.esm.d.ts +1 -1
  53. package/dist/Section/Section.esm.js +1 -1
  54. package/dist/Select/Select.cjs.d.ts +25 -0
  55. package/dist/Select/Select.cjs.js +3010 -0
  56. package/dist/Select/Select.esm.d.ts +25 -0
  57. package/dist/Select/Select.esm.js +2983 -0
  58. package/dist/Select/package.json +7 -0
  59. package/dist/SiteFooter/SiteFooter.cjs.js +5 -3
  60. package/dist/SiteFooter/SiteFooter.esm.js +34 -32
  61. package/dist/SiteHeader/SiteHeader.cjs.js +35 -13
  62. package/dist/SiteHeader/SiteHeader.esm.d.ts +1 -1
  63. package/dist/SiteHeader/SiteHeader.esm.js +110 -88
  64. package/dist/Surface/Surface.esm.d.ts +1 -1
  65. package/dist/Surface/Surface.esm.js +1 -1
  66. package/dist/Text/Text.esm.d.ts +1 -1
  67. package/dist/Text/Text.esm.js +2 -2
  68. package/dist/TextInput/TextInput.cjs.d.ts +5 -1
  69. package/dist/TextInput/TextInput.cjs.js +25 -6
  70. package/dist/TextInput/TextInput.esm.d.ts +5 -1
  71. package/dist/TextInput/TextInput.esm.js +28 -9
  72. package/dist/Truncate/Truncate.cjs.d.ts +18 -0
  73. package/dist/Truncate/Truncate.cjs.js +17 -0
  74. package/dist/Truncate/Truncate.esm.d.ts +18 -0
  75. package/dist/Truncate/Truncate.esm.js +9 -0
  76. package/dist/Truncate/package.json +7 -0
  77. package/dist/UniversalHeader/UniversalHeader.esm.js +8 -8
  78. package/dist/VerticalSpace/VerticalSpace.esm.js +2 -2
  79. package/dist/VisuallyHidden/VisuallyHidden.cjs.d.ts +1 -12
  80. package/dist/VisuallyHidden/VisuallyHidden.cjs.js +3 -12
  81. package/dist/VisuallyHidden/VisuallyHidden.esm.d.ts +1 -12
  82. package/dist/VisuallyHidden/VisuallyHidden.esm.js +2 -11
  83. package/dist/_shared/cjs/Base-e2b846fe.d.ts +19 -0
  84. package/dist/_shared/cjs/Base-e2b846fe.js +22 -0
  85. package/dist/_shared/cjs/BtIconChevronDown2Px-8fb4e2eb.js +29 -0
  86. package/dist/_shared/cjs/BtIconChevronRight2Px-a8e40136.js +50 -0
  87. package/dist/_shared/cjs/BtIconChevronRightMid-5a38d855.js +31 -0
  88. package/dist/_shared/cjs/{Button-1743b3ec.d.ts → Button-b3a69953.d.ts} +3 -3
  89. package/dist/_shared/cjs/{Button-1743b3ec.js → Button-b3a69953.js} +29 -6
  90. package/dist/_shared/cjs/{FormControl-7d8e10fa.d.ts → FormControl-e6b7d7c5.d.ts} +51 -3
  91. package/dist/_shared/cjs/FormControl-e6b7d7c5.js +147 -0
  92. package/dist/_shared/cjs/{Icon-bb5a5fd1.d.ts → Icon-719d13d4.d.ts} +6 -6
  93. package/dist/_shared/cjs/Icon-719d13d4.js +52 -0
  94. package/dist/_shared/cjs/VisuallyHidden-e2c8b291.d.ts +12 -0
  95. package/dist/_shared/cjs/VisuallyHidden-e2c8b291.js +17 -0
  96. package/dist/_shared/cjs/arc-icon-17594b2f.d.ts +4 -0
  97. package/dist/_shared/cjs/index-c81c9401.d.ts +2 -2
  98. package/dist/_shared/cjs/{use-media-query-75d1bbae.js → index.es-77def0c9.js} +9 -0
  99. package/dist/_shared/esm/Base-c235dc45.d.ts +19 -0
  100. package/dist/_shared/esm/Base-c235dc45.js +15 -0
  101. package/dist/_shared/esm/{BrandLogo-ea3dd0e6.js → BrandLogo-4f13fe85.js} +4 -4
  102. package/dist/_shared/esm/BtIconChevronDown2Px-782876e2.js +23 -0
  103. package/dist/_shared/esm/BtIconChevronRight2Px-b8e7b4ad.js +43 -0
  104. package/dist/_shared/esm/BtIconChevronRightMid-d9b11761.js +25 -0
  105. package/dist/_shared/esm/{Button-d59c31a2.d.ts → Button-69439f8f.d.ts} +3 -3
  106. package/dist/_shared/esm/Button-69439f8f.js +74 -0
  107. package/dist/_shared/esm/{Curve-cfdca379.js → Curve-50697f7e.js} +2 -2
  108. package/dist/_shared/esm/{FormControl-33194106.d.ts → FormControl-84c9ace6.d.ts} +51 -3
  109. package/dist/_shared/esm/FormControl-84c9ace6.js +138 -0
  110. package/dist/_shared/esm/{Heading-183be76c.js → Heading-eb1e42db.js} +4 -4
  111. package/dist/_shared/esm/{Icon-2fd92daa.d.ts → Icon-61f7237a.d.ts} +6 -6
  112. package/dist/_shared/esm/Icon-61f7237a.js +46 -0
  113. package/dist/_shared/esm/{Image-7e4948f6.js → Image-c0f3d42f.js} +7 -7
  114. package/dist/_shared/esm/{Section-f1256c87.js → Section-7bc71e26.js} +2 -2
  115. package/dist/_shared/esm/{Surface-d515d212.js → Surface-bf201530.js} +3 -3
  116. package/dist/_shared/esm/{Text-d8988620.js → Text-6b958ad8.js} +3 -3
  117. package/dist/_shared/esm/VisuallyHidden-b9eebf71.d.ts +12 -0
  118. package/dist/_shared/esm/VisuallyHidden-b9eebf71.js +11 -0
  119. package/dist/_shared/esm/arc-icon-17594b2f.d.ts +4 -0
  120. package/dist/_shared/esm/index-c81c9401.d.ts +2 -2
  121. package/dist/_shared/esm/{use-media-query-38faed7f.js → index.es-00cb3bcb.js} +8 -1
  122. package/dist/index.es.js +34545 -717
  123. package/dist/index.es.js.map +1 -1
  124. package/dist/index.js +34537 -688
  125. package/dist/index.js.map +1 -1
  126. package/dist/styles.css +1 -1
  127. package/dist/types/components/Badge/Badge.d.ts +25 -0
  128. package/dist/types/components/Badge/index.d.ts +1 -0
  129. package/dist/types/components/Button/Button.d.ts +3 -3
  130. package/dist/types/components/FormControl/FormControl.d.ts +17 -0
  131. package/dist/types/components/FormControl/FormControlDisclosure/FormControlDisclosure.d.ts +28 -0
  132. package/dist/types/components/FormControl/FormControlDisclosure/index.d.ts +1 -0
  133. package/dist/types/components/Icon/Icon.d.ts +6 -6
  134. package/dist/types/components/Select/Select.d.ts +2 -1
  135. package/dist/types/components/TextInput/TextInput.d.ts +4 -0
  136. package/dist/types/components/Truncate/Truncate.d.ts +17 -0
  137. package/dist/types/components/Truncate/index.d.ts +1 -0
  138. package/dist/types/components/index.d.ts +3 -0
  139. package/dist/types/hooks/use-aria-describedby.d.ts +5 -1
  140. package/dist/types/styles.d.ts +4 -0
  141. package/dist/types/types/arc-icon.d.ts +2 -0
  142. package/package.json +4 -3
  143. package/dist/_shared/cjs/FormControl-7d8e10fa.js +0 -82
  144. package/dist/_shared/cjs/Icon-bb5a5fd1.js +0 -33
  145. package/dist/_shared/cjs/index.es-f590caaf.js +0 -290
  146. package/dist/_shared/esm/Button-d59c31a2.js +0 -51
  147. package/dist/_shared/esm/FormControl-33194106.js +0 -74
  148. package/dist/_shared/esm/Icon-2fd92daa.js +0 -27
  149. package/dist/_shared/esm/index.es-42f84e2d.js +0 -286
  150. /package/dist/_shared/cjs/{use-media-query-75d1bbae.d.ts → index.es-77def0c9.d.ts} +0 -0
  151. /package/dist/_shared/esm/{BrandLogo-ea3dd0e6.d.ts → BrandLogo-4f13fe85.d.ts} +0 -0
  152. /package/dist/_shared/esm/{Curve-cfdca379.d.ts → Curve-50697f7e.d.ts} +0 -0
  153. /package/dist/_shared/esm/{Heading-183be76c.d.ts → Heading-eb1e42db.d.ts} +0 -0
  154. /package/dist/_shared/esm/{Image-7e4948f6.d.ts → Image-c0f3d42f.d.ts} +0 -0
  155. /package/dist/_shared/esm/{Section-f1256c87.d.ts → Section-7bc71e26.d.ts} +0 -0
  156. /package/dist/_shared/esm/{Surface-d515d212.d.ts → Surface-bf201530.d.ts} +0 -0
  157. /package/dist/_shared/esm/{Text-d8988620.d.ts → Text-6b958ad8.d.ts} +0 -0
  158. /package/dist/_shared/esm/{use-media-query-38faed7f.d.ts → index.es-00cb3bcb.d.ts} +0 -0
@@ -1,8 +1,12 @@
1
1
  import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/esm/index-229fc864.js';
2
2
  import { c as classNames } from '../_shared/esm/index-2ae58626.js';
3
- import React, { forwardRef, useContext } from 'react';
4
- import { u as useAriaDescribedby, F as FormControl } from '../_shared/esm/FormControl-33194106.js';
5
- import { C as Context } from '../_shared/esm/Surface-d515d212.js';
3
+ import React__default, { forwardRef, useContext, useState } from 'react';
4
+ import { u as useAriaDescribedby, F as FormControl } from '../_shared/esm/FormControl-84c9ace6.js';
5
+ import { C as Context } from '../_shared/esm/Surface-bf201530.js';
6
+ import { V as VisuallyHidden } from '../_shared/esm/VisuallyHidden-b9eebf71.js';
7
+ import '../_shared/esm/Text-6b958ad8.js';
8
+ import '../_shared/esm/suffix-modifier-f5e28822.js';
9
+ import '../_shared/esm/BtIconChevronRightMid-d9b11761.js';
6
10
 
7
11
  /**
8
12
  * Infer the correct inputMode, pattern and type if specifying a `number` type.
@@ -35,22 +39,37 @@ var useNumericInput = function (props) {
35
39
  * Use `TextInput` to allow custom user text entry with a keyboard.
36
40
  */
37
41
  var TextInput = forwardRef(function (_a, ref) {
38
- var _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, inputMode = _a.inputMode, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isReadOnly, isReadOnly = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, label = _a.label, _f = _a.labelSize, labelSize = _f === void 0 ? "l" : _f, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, pattern = _a.pattern, _g = _a.type, type = _g === void 0 ? "text" : _g, value = _a.value, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "labelSize", "maxLength", "minLength", "name", "onBlur", "onChange", "pattern", "type", "value"]);
42
+ var _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, inputMode = _a.inputMode, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isReadOnly, isReadOnly = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, label = _a.label, _f = _a.labelSize, labelSize = _f === void 0 ? "l" : _f, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onClickDisclosure = _a.onClickDisclosure, pattern = _a.pattern, _g = _a.type, type = _g === void 0 ? "text" : _g, _h = _a.showPassword, showPassword = _h === void 0 ? false : _h, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "labelSize", "maxLength", "minLength", "name", "onBlur", "onChange", "onClickDisclosure", "pattern", "type", "showPassword", "value", "disclosureTitle", "disclosureText"]);
39
43
  var surface = useContext(Context).surface;
40
- var inferredInputProps = useNumericInput({ inputMode: inputMode, pattern: pattern, type: type });
44
+ var _j = useState(false), showPasswordToggle = _j[0], setShowPasswordToggle = _j[1];
45
+ var inferredInputProps = useNumericInput({
46
+ inputMode: inputMode,
47
+ pattern: pattern,
48
+ type: showPasswordToggle ? "text" : type
49
+ });
41
50
  // Although this is used within FormControlWrapper, it's deterministic so we can call it here too
42
51
  var ariaDescribedby = useAriaDescribedby({
43
52
  errorMessage: errorMessage,
44
53
  id: id,
45
- helper: helper
54
+ helper: helper,
55
+ disclosureText: disclosureText
46
56
  }).ariaDescribedby;
47
- return (React.createElement("div", __assign({ className: classNames({
57
+ return (React__default.createElement("div", __assign({ className: classNames({
48
58
  "arc-TextInput": true,
59
+ "arc-TextInput--withPasswordToggle": showPassword,
49
60
  "arc-TextInput--invalid": errorMessage,
50
61
  "arc-TextInput--onDarkSurface": surface === "dark"
51
62
  }) }, filterDataAttrs(props)),
52
- React.createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, label: label, labelSize: labelSize, requirementStatus: isRequired ? "required" : "optional" },
53
- React.createElement("input", __assign({ "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", className: "arc-TextInput-input", defaultValue: typeof value !== "undefined" ? undefined : defaultValue, disabled: isDisabled, id: id, maxLength: maxLength, minLength: minLength, name: name, onChange: onChange, onBlur: onBlur, readOnly: isReadOnly, ref: ref, required: isRequired, value: typeof value !== "undefined" ? value : undefined }, inferredInputProps)))));
63
+ React__default.createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, isDisabled: isDisabled, label: label, labelSize: labelSize, requirementStatus: isRequired ? "required" : "optional", disclosureTitle: disclosureTitle, disclosureText: disclosureText, onClickDisclosure: onClickDisclosure },
64
+ React__default.createElement("div", { className: "arc-TextInput-inputWrapper" },
65
+ React__default.createElement("input", __assign({ "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", className: "arc-TextInput-input", defaultValue: typeof value !== "undefined" ? undefined : defaultValue, disabled: isDisabled, id: id, maxLength: maxLength, minLength: minLength, name: name, onChange: onChange, onBlur: onBlur, readOnly: isReadOnly, ref: ref, required: isRequired, value: typeof value !== "undefined" ? value : undefined }, inferredInputProps)),
66
+ showPassword && (React__default.createElement(React__default.Fragment, null,
67
+ React__default.createElement("button", { className: "arc-TextInput-passwordToggle", onClick: function () { return setShowPasswordToggle(function (p) { return !p; }); }, type: "button" }, showPasswordToggle ? "Hide" : "Show"),
68
+ React__default.createElement(VisuallyHidden, null,
69
+ React__default.createElement("div", { "aria-live": "polite" },
70
+ React__default.createElement("p", null, showPasswordToggle
71
+ ? "Your password is shown"
72
+ : "Your password is hidden")))))))));
54
73
  });
55
74
 
56
75
  export { TextInput };
@@ -0,0 +1,18 @@
1
+ import { FC, ReactNode } from "react";
2
+ /** Use `Truncate` component to shorten text with an ellipsis. Add a `title` attribute to the truncated element so the full text remains accessible. */
3
+ declare const Truncate: FC<TruncateProps>;
4
+ interface TruncateProps {
5
+ /**
6
+ * Content to truncate.
7
+ */
8
+ children: ReactNode;
9
+ /**
10
+ * Use title to provide extra information about text that is truncated.
11
+ */
12
+ title: string;
13
+ /**
14
+ * Set max width of visible content within `Truncate`. Default is `100%`.
15
+ */
16
+ maxWidth?: number;
17
+ }
18
+ export { Truncate };
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
+
11
+ /** Use `Truncate` component to shorten text with an ellipsis. Add a `title` attribute to the truncated element so the full text remains accessible. */
12
+ var Truncate = function (_a) {
13
+ var _b = _a.maxWidth, maxWidth = _b === void 0 ? 100 : _b, title = _a.title, children = _a.children;
14
+ return (React__default["default"].createElement("div", { className: "arc-Truncate", style: { maxWidth: "".concat(maxWidth, "%") }, title: title }, children));
15
+ };
16
+
17
+ exports.Truncate = Truncate;
@@ -0,0 +1,18 @@
1
+ import { FC, ReactNode } from "react";
2
+ /** Use `Truncate` component to shorten text with an ellipsis. Add a `title` attribute to the truncated element so the full text remains accessible. */
3
+ declare const Truncate: FC<TruncateProps>;
4
+ interface TruncateProps {
5
+ /**
6
+ * Content to truncate.
7
+ */
8
+ children: ReactNode;
9
+ /**
10
+ * Use title to provide extra information about text that is truncated.
11
+ */
12
+ title: string;
13
+ /**
14
+ * Set max width of visible content within `Truncate`. Default is `100%`.
15
+ */
16
+ maxWidth?: number;
17
+ }
18
+ export { Truncate };
@@ -0,0 +1,9 @@
1
+ import React__default from 'react';
2
+
3
+ /** Use `Truncate` component to shorten text with an ellipsis. Add a `title` attribute to the truncated element so the full text remains accessible. */
4
+ var Truncate = function (_a) {
5
+ var _b = _a.maxWidth, maxWidth = _b === void 0 ? 100 : _b, title = _a.title, children = _a.children;
6
+ return (React__default.createElement("div", { className: "arc-Truncate", style: { maxWidth: "".concat(maxWidth, "%") }, title: title }, children));
7
+ };
8
+
9
+ export { Truncate };
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@arc-ui/truncate",
3
+ "types": "./Truncate.esm.d.ts",
4
+ "main": "./Truncate.cjs.js",
5
+ "module": "./Truncate.esm.js",
6
+ "private": true
7
+ }
@@ -1,6 +1,6 @@
1
1
  import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/esm/index-229fc864.js';
2
- import React, { useEffect } from 'react';
3
- import { S as Surface } from '../_shared/esm/Surface-d515d212.js';
2
+ import React__default, { useEffect } from 'react';
3
+ import { S as Surface } from '../_shared/esm/Surface-bf201530.js';
4
4
  import '../_shared/esm/index-2ae58626.js';
5
5
 
6
6
  /**
@@ -9,20 +9,20 @@ import '../_shared/esm/index-2ae58626.js';
9
9
  var UniversalHeader = function (_a) {
10
10
  var children = _a.children, props = __rest(_a, ["children"]);
11
11
  useEffect(function () {
12
- React.Children.map(children, function (item) {
12
+ React__default.Children.map(children, function (item) {
13
13
  if (item && item.type !== UniversalHeaderItem) {
14
14
  throw new Error("Illegal child passed to <UniversalHeader />. Ensure to only use <UniversalHeader.Item />.");
15
15
  }
16
16
  });
17
17
  }, [children]);
18
- return (React.createElement("nav", __assign({ className: "arc-UniversalHeader" }, filterDataAttrs(props)),
19
- React.createElement(Surface, { background: "light" },
20
- React.createElement("ul", { className: "arc-UniversalHeader-items" }, children))));
18
+ return (React__default.createElement("nav", __assign({ className: "arc-UniversalHeader" }, filterDataAttrs(props)),
19
+ React__default.createElement(Surface, { background: "light" },
20
+ React__default.createElement("ul", { className: "arc-UniversalHeader-items" }, children))));
21
21
  };
22
22
  var UniversalHeaderItem = function (_a) {
23
23
  var children = _a.children, href = _a.href, props = __rest(_a, ["children", "href"]);
24
- return (React.createElement("li", __assign({}, filterDataAttrs(props)),
25
- React.createElement("a", { className: "arc-UniversalHeader-link", href: href }, children)));
24
+ return (React__default.createElement("li", __assign({}, filterDataAttrs(props)),
25
+ React__default.createElement("a", { className: "arc-UniversalHeader-link", href: href }, children)));
26
26
  };
27
27
  UniversalHeaderItem.displayName = "UniversalHeader.Item";
28
28
  UniversalHeader.Item = UniversalHeaderItem;
@@ -1,6 +1,6 @@
1
1
  import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/esm/index-229fc864.js';
2
2
  import { c as classNames } from '../_shared/esm/index-2ae58626.js';
3
- import React from 'react';
3
+ import React__default from 'react';
4
4
 
5
5
  /**
6
6
  * Use `VerticalSpace` to create vertical space between components.
@@ -8,7 +8,7 @@ import React from 'react';
8
8
  var VerticalSpace = function (_a) {
9
9
  var _b;
10
10
  var _c = _a.isDebugVisible, isDebugVisible = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? "24" : _d, props = __rest(_a, ["isDebugVisible", "size"]);
11
- return (React.createElement("div", __assign({ className: classNames((_b = {
11
+ return (React__default.createElement("div", __assign({ className: classNames((_b = {
12
12
  "arc-VerticalSpace": true
13
13
  },
14
14
  _b["arc-VerticalSpace--size".concat(size)] = size && size !== "24",
@@ -1,12 +1 @@
1
- import { FC, ReactNode } from "react";
2
- /**
3
- * Provides text for screen readers that is visually hidden.
4
- */
5
- declare const VisuallyHidden: FC<VisuallyHiddenProps>;
6
- interface VisuallyHiddenProps {
7
- /**
8
- * Content to be Visually Hidden.
9
- */
10
- children?: ReactNode;
11
- }
12
- export { VisuallyHidden };
1
+ export { VisuallyHidden } from "../_shared/cjs/VisuallyHidden-e2c8b291";
@@ -2,18 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var React = require('react');
5
+ var VisuallyHidden = require('../_shared/cjs/VisuallyHidden-e2c8b291.js');
6
+ require('react');
6
7
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
9
 
11
- /**
12
- * Provides text for screen readers that is visually hidden.
13
- */
14
- var VisuallyHidden = function (_a) {
15
- var children = _a.children;
16
- return (React__default["default"].createElement("div", { "data-testid": "visually-hidden", className: "arc-VisuallyHidden" }, children));
17
- };
18
-
19
- exports.VisuallyHidden = VisuallyHidden;
10
+ exports.VisuallyHidden = VisuallyHidden.VisuallyHidden;
@@ -1,12 +1 @@
1
- import { FC, ReactNode } from "react";
2
- /**
3
- * Provides text for screen readers that is visually hidden.
4
- */
5
- declare const VisuallyHidden: FC<VisuallyHiddenProps>;
6
- interface VisuallyHiddenProps {
7
- /**
8
- * Content to be Visually Hidden.
9
- */
10
- children?: ReactNode;
11
- }
12
- export { VisuallyHidden };
1
+ export { VisuallyHidden } from "../_shared/esm/VisuallyHidden-b9eebf71";
@@ -1,11 +1,2 @@
1
- import React from 'react';
2
-
3
- /**
4
- * Provides text for screen readers that is visually hidden.
5
- */
6
- var VisuallyHidden = function (_a) {
7
- var children = _a.children;
8
- return (React.createElement("div", { "data-testid": "visually-hidden", className: "arc-VisuallyHidden" }, children));
9
- };
10
-
11
- export { VisuallyHidden };
1
+ export { V as VisuallyHidden } from '../_shared/esm/VisuallyHidden-b9eebf71.js';
2
+ import 'react';
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC } from "react";
4
+ declare const ArcRootElementContext: React.Context<HTMLElement | null>;
5
+ /**
6
+ * Use `Base` as the root component of the arc system.
7
+ */
8
+ declare const Base: FC<BaseProps>;
9
+ interface BaseProps {
10
+ /**
11
+ * Brand theme to apply to Base.
12
+ */
13
+ brand?: "bt" | null;
14
+ /**
15
+ * Content to display inside Base.
16
+ */
17
+ children: any;
18
+ }
19
+ export { ArcRootElementContext, Base, BaseProps };
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-78b35bc1.js');
4
+ var React = require('react');
5
+
6
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
7
+
8
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
9
+
10
+ var ArcRootElementContext = React.createContext(null);
11
+ /**
12
+ * Use `Base` as the root component of the arc system.
13
+ */
14
+ var Base = function (_a) {
15
+ var _b = _a.brand, brand = _b === void 0 ? "bt" : _b, children = _a.children, props = index.__rest(_a, ["brand", "children"]);
16
+ var _c = React__default["default"].useState(null), arcRoot = _c[0], setArcRoot = _c[1];
17
+ return (React__default["default"].createElement("div", index.__assign({ id: "arc-root", ref: setArcRoot, className: "arc".concat(brand ? " arc-".concat(brand) : "") }, index.filterDataAttrs(props)),
18
+ React__default["default"].createElement(ArcRootElementContext.Provider, { value: arcRoot }, children)));
19
+ };
20
+
21
+ exports.ArcRootElementContext = ArcRootElementContext;
22
+ exports.Base = Base;
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ var React$1 = require('react');
4
+
5
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
+
7
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
8
+
9
+ const React = React__default["default"];
10
+ const BtIconChevronDown2Px = props =>
11
+ /*#__PURE__*/ React.createElement(
12
+ "svg",
13
+ Object.assign(
14
+ {
15
+ xmlns: "http://www.w3.org/2000/svg",
16
+ viewBox: "0 0 32 32"
17
+ },
18
+ props
19
+ ),
20
+ /*#__PURE__*/ React.createElement("defs", null),
21
+ /*#__PURE__*/ React.createElement("path", {
22
+ d:
23
+ "M15.99316,23.91406,2.294,10.207A.99989.99989,0,1,1,3.708,8.793l12.28515,12.293L28.292,8.793A.99989.99989,0,1,1,29.70605,10.207Z",
24
+ fill: "currentColor"
25
+ })
26
+ );
27
+ var BtIconChevronDown2Px_2 = BtIconChevronDown2Px;
28
+
29
+ exports.BtIconChevronDown2Px_2 = BtIconChevronDown2Px_2;
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ var React$2 = require('react');
4
+
5
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
+
7
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React$2);
8
+
9
+ const React$1 = React__default["default"];
10
+ const BtIconChevronLeft2Px = props =>
11
+ /*#__PURE__*/ React$1.createElement(
12
+ "svg",
13
+ Object.assign(
14
+ {
15
+ xmlns: "http://www.w3.org/2000/svg",
16
+ viewBox: "0 0 32 32"
17
+ },
18
+ props
19
+ ),
20
+ /*#__PURE__*/ React$1.createElement("defs", null),
21
+ /*#__PURE__*/ React$1.createElement("path", {
22
+ d:
23
+ "M22.5,29.99854a.99676.99676,0,0,1-.707-.293L8.08594,15.99268,21.793,2.294A1.00023,1.00023,0,0,1,23.207,3.709l-12.293,12.28467L23.207,28.2915a1,1,0,0,1-.707,1.707Z",
24
+ fill: "currentColor"
25
+ })
26
+ );
27
+ var BtIconChevronLeft2Px_2 = BtIconChevronLeft2Px;
28
+
29
+ const React = React__default["default"];
30
+ const BtIconChevronRight2Px = props =>
31
+ /*#__PURE__*/ React.createElement(
32
+ "svg",
33
+ Object.assign(
34
+ {
35
+ xmlns: "http://www.w3.org/2000/svg",
36
+ viewBox: "0 0 32 32"
37
+ },
38
+ props
39
+ ),
40
+ /*#__PURE__*/ React.createElement("defs", null),
41
+ /*#__PURE__*/ React.createElement("path", {
42
+ d:
43
+ "M9.5,29.99854A1.00025,1.00025,0,0,1,8.793,28.291l12.293-12.28467L8.793,3.7085A.99989.99989,0,0,1,10.207,2.29443l13.707,13.71289L10.207,29.70605A.99827.99827,0,0,1,9.5,29.99854Z",
44
+ fill: "currentColor"
45
+ })
46
+ );
47
+ var BtIconChevronRight2Px_2 = BtIconChevronRight2Px;
48
+
49
+ exports.BtIconChevronLeft2Px_2 = BtIconChevronLeft2Px_2;
50
+ exports.BtIconChevronRight2Px_2 = BtIconChevronRight2Px_2;
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var React$1 = require('react');
4
+
5
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
+
7
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
8
+
9
+ const React = React__default["default"];
10
+ const BtIconChevronRightMid = props =>
11
+ /*#__PURE__*/ React.createElement(
12
+ "svg",
13
+ Object.assign(
14
+ {
15
+ viewBox: "0 0 16 16",
16
+ fill: "none",
17
+ xmlns: "http://www.w3.org/2000/svg"
18
+ },
19
+ props
20
+ ),
21
+ /*#__PURE__*/ React.createElement("path", {
22
+ fillRule: "evenodd",
23
+ clipRule: "evenodd",
24
+ d:
25
+ "M9.04543 8.0002L6.19676 5.1482C6.07077 5.02196 6 4.85089 6 4.67253C6 4.49418 6.07077 4.32311 6.19676 4.19687C6.25906 4.13446 6.33304 4.08495 6.41449 4.05117C6.49594 4.01739 6.58325 4 6.67143 4C6.75961 4 6.84692 4.01739 6.92837 4.05117C7.00982 4.08495 7.0838 4.13446 7.1461 4.19687L10.4701 7.52487C10.5959 7.65108 10.6665 7.82201 10.6665 8.0002C10.6665 8.1784 10.5959 8.34932 10.4701 8.47553L7.1461 11.8035C7.0838 11.8659 7.00982 11.9155 6.92837 11.9492C6.84692 11.983 6.75961 12.0004 6.67143 12.0004C6.58325 12.0004 6.49594 11.983 6.41449 11.9492C6.33304 11.9155 6.25906 11.8659 6.19676 11.8035C6.07077 11.6773 6 11.5062 6 11.3279C6 11.1495 6.07077 10.9784 6.19676 10.8522L9.04543 8.0002Z",
26
+ fill: "currentColor"
27
+ })
28
+ );
29
+ var BtIconChevronRightMid_2 = BtIconChevronRightMid;
30
+
31
+ exports.BtIconChevronRightMid_2 = BtIconChevronRightMid_2;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { icons } from "@arc-ui/tokens";
3
2
  import React from "react";
4
3
  import { FC } from "react";
4
+ import { ArcIcon } from "./arc-icon-17594b2f";
5
5
  type ElementUnion = HTMLButtonElement | HTMLAnchorElement;
6
6
  type Ref = React.Ref<ElementUnion> | null;
7
7
  /**
@@ -12,7 +12,7 @@ interface ButtonIconProps {
12
12
  /**
13
13
  * Icon variant.
14
14
  */
15
- icon?: typeof icons[number];
15
+ icon?: ArcIcon;
16
16
  /**
17
17
  * Should the icon be a default chevron?
18
18
  */
@@ -57,7 +57,7 @@ interface ButtonProps extends ButtonElementProps, LinkElementProps {
57
57
  /**
58
58
  * Button icon variant.
59
59
  */
60
- icon?: typeof icons[number];
60
+ icon?: ArcIcon;
61
61
  /**
62
62
  * How should a Button icon be displayed?
63
63
  */
@@ -1,23 +1,46 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-78b35bc1.js');
4
+ var React$1 = require('react');
5
+ var BtIconChevronRightMid = require('./BtIconChevronRightMid-5a38d855.js');
4
6
  var index$1 = require('./index-45bfb67b.js');
5
- var React = require('react');
6
7
  var suffixModifier = require('./suffix-modifier-edf7851e.js');
7
- var Icon = require('./Icon-bb5a5fd1.js');
8
+ var Icon = require('./Icon-719d13d4.js');
8
9
  var Surface = require('./Surface-d6b8010e.js');
9
10
 
10
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
12
 
12
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
14
+
15
+ const React = React__default["default"];
16
+ const BtIconChevronLeftMid = props =>
17
+ /*#__PURE__*/ React.createElement(
18
+ "svg",
19
+ Object.assign(
20
+ {
21
+ viewBox: "0 0 16 16",
22
+ fill: "none",
23
+ xmlns: "http://www.w3.org/2000/svg"
24
+ },
25
+ props
26
+ ),
27
+ /*#__PURE__*/ React.createElement("path", {
28
+ fillRule: "evenodd",
29
+ clipRule: "evenodd",
30
+ d:
31
+ "M7.62107 8.00023L10.4697 10.8522C10.5957 10.9785 10.6665 11.1495 10.6665 11.3279C10.6665 11.5063 10.5957 11.6773 10.4697 11.8036C10.4074 11.866 10.3335 11.9155 10.252 11.9493C10.1706 11.983 10.0833 12.0004 9.99507 12.0004C9.9069 12.0004 9.81959 11.983 9.73814 11.9493C9.65669 11.9155 9.5827 11.866 9.52041 11.8036L6.19641 8.47556C6.07061 8.34935 5.99998 8.17842 5.99998 8.00023C5.99998 7.82203 6.07061 7.6511 6.19641 7.52489L9.52041 4.19689C9.5827 4.13449 9.65669 4.08498 9.73814 4.0512C9.81959 4.01741 9.9069 4.00003 9.99507 4.00003C10.0832 4.00003 10.1706 4.01741 10.252 4.0512C10.3335 4.08498 10.4074 4.13449 10.4697 4.19689C10.5957 4.32313 10.6665 4.4942 10.6665 4.67256C10.6665 4.85092 10.5957 5.02199 10.4697 5.14823L7.62107 8.00023Z",
32
+ fill: "currentColor"
33
+ })
34
+ );
35
+ var BtIconChevronLeftMid_2 = BtIconChevronLeftMid;
13
36
 
14
37
  /**
15
38
  * Use `Button` to allow users to take actions with clicks and taps.
16
39
  */
17
- var Button = React.forwardRef(function (_a, ref) {
40
+ var Button = React$1.forwardRef(function (_a, ref) {
18
41
  var _b;
19
42
  var ariaLabel = _a.ariaLabel, _c = _a.fill, fill = _c === void 0 ? "solid" : _c, href = _a.href, icon = _a.icon, _d = _a.iconPosition, iconPosition = _d === void 0 ? "afterText" : _d, id = _a.id, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isDisplayBlock, isDisplayBlock = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g, label = _a.label, onClick = _a.onClick, rel = _a.rel, supportingText = _a.supportingText, target = _a.target, type = _a.type, props = index.__rest(_a, ["ariaLabel", "fill", "href", "icon", "iconPosition", "id", "isDisabled", "isDisplayBlock", "isFullWidth", "label", "onClick", "rel", "supportingText", "target", "type"]);
20
- var surface = React.useContext(Surface.Context).surface;
43
+ var surface = React$1.useContext(Surface.Context).surface;
21
44
  var buttonClasses = index$1.classNames((_b = {
22
45
  "arc-Button": true,
23
46
  "arc-Button--displayBlock": isDisplayBlock
@@ -51,7 +74,7 @@ var ButtonIcon = function (_a) {
51
74
  return (React__default["default"].createElement("span", { className: index$1.classNames({
52
75
  "arc-Button-icon": true,
53
76
  "arc-Button-icon--chevron": isChevron
54
- }) }, isChevron ? (React__default["default"].createElement(Icon.Icon, { icon: "btChevron".concat(isBeforeText ? "Left" : "Right", "Mid") })) : (React__default["default"].createElement(Icon.Icon, { icon: icon }))));
77
+ }) }, isChevron ? (React__default["default"].createElement(Icon.Icon, { icon: isBeforeText ? BtIconChevronLeftMid_2 : BtIconChevronRightMid.BtIconChevronRightMid_2 })) : (React__default["default"].createElement(Icon.Icon, { icon: icon }))));
55
78
  };
56
79
 
57
80
  exports.Button = Button;
@@ -1,23 +1,54 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
- import { FC } from "react";
3
+ import { FC, ReactNode } from "react";
4
+ /**
5
+ * Use `FormControlDisclosure` to display content that is only visible when toggled into
6
+ * an "open" state.
7
+ */
8
+ declare const FormControlDisclosure: FC<FormControlDisclosureProps>;
9
+ interface FormControlDisclosureProps {
10
+ /**
11
+ * Content to display in the FormControlDisclosure.
12
+ */
13
+ children: ReactNode;
14
+ /**
15
+ * FormControlDisclosure ID.
16
+ */
17
+ id?: string;
18
+ /**
19
+ * The FormControlDisclosure summary text.
20
+ */
21
+ summary: string;
22
+ /**
23
+ * On Click handler for FormControlDisclosure summary disclosure.
24
+ */
25
+ onClick?: () => void;
26
+ /**
27
+ * Disclosure size.
28
+ */
29
+ size?: "s" | "l";
30
+ }
4
31
  /**
5
32
  * Optionally define ariaDescribedBy if errorMessage or helper exist.
6
33
  */
7
- declare const useAriaDescribedby: ({ id, idError, idHelper, errorMessage, helper }: {
34
+ declare const useAriaDescribedby: ({ id, idError, idHelper, idDisclosure, errorMessage, helper, disclosureText }: {
8
35
  id?: string | undefined;
9
36
  idError?: string | undefined;
37
+ idDisclosure?: string | undefined;
10
38
  idHelper?: string | undefined;
11
39
  errorMessage?: any;
12
40
  helper?: any;
41
+ disclosureText?: string | undefined;
13
42
  }) => {
14
43
  ariaDescribedby: undefined;
15
44
  idHelper: undefined;
16
45
  idError: undefined;
46
+ idDisclosure: undefined;
17
47
  } | {
18
48
  ariaDescribedby: string | undefined;
19
49
  idError: string;
20
50
  idHelper: string;
51
+ idDisclosure: string;
21
52
  };
22
53
  type RequirementStatus = "required" | "optional" | "not-applicable";
23
54
  declare const Context: React.Context<{
@@ -62,9 +93,26 @@ interface FormControlProps {
62
93
  * Label for the FormControl.
63
94
  */
64
95
  label: string;
96
+ /**
97
+ * Determins if the Label should be in a disabled state
98
+ */
99
+ isDisabled?: boolean;
65
100
  /**
66
101
  * Label size.
67
102
  */
68
103
  labelSize?: "s" | "l";
104
+ /**
105
+ * Use `DisclosureTitle` to display content that is only visible when toggled into
106
+ * an "open" state. This overrides helper text.
107
+ */
108
+ disclosureTitle?: string;
109
+ /**
110
+ * Text to display within the disclosure
111
+ */
112
+ disclosureText?: string;
113
+ /**
114
+ * onClick handler for FormControlDisclosure
115
+ */
116
+ onClickDisclosure?: () => void;
69
117
  }
70
- export { useAriaDescribedby, FormControl, FormControlProps, Context as FormControlContext };
118
+ export { FormControlDisclosure, FormControlDisclosureProps, useAriaDescribedby, FormControl, FormControlProps, Context as FormControlContext };