@arc-ui/components 11.0.0 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) 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.esm.js +27 -27
  14. package/dist/Button/Button.esm.d.ts +1 -1
  15. package/dist/Button/Button.esm.js +4 -4
  16. package/dist/Card/Card.esm.js +27 -27
  17. package/dist/Checkbox/Checkbox.cjs.js +4 -1
  18. package/dist/Checkbox/Checkbox.esm.js +18 -15
  19. package/dist/Clock/Clock.esm.js +3 -3
  20. package/dist/Columns/Columns.esm.js +5 -5
  21. package/dist/Curve/Curve.esm.d.ts +1 -1
  22. package/dist/Curve/Curve.esm.js +1 -1
  23. package/dist/Disclosure/Disclosure.esm.d.ts +1 -1
  24. package/dist/Disclosure/Disclosure.esm.js +10 -10
  25. package/dist/Elevation/Elevation.esm.js +2 -2
  26. package/dist/FormControl/FormControl.cjs.d.ts +1 -1
  27. package/dist/FormControl/FormControl.cjs.js +4 -1
  28. package/dist/FormControl/FormControl.esm.d.ts +1 -1
  29. package/dist/FormControl/FormControl.esm.js +5 -2
  30. package/dist/Group/Group.esm.js +6 -6
  31. package/dist/Heading/Heading.esm.d.ts +1 -1
  32. package/dist/Heading/Heading.esm.js +2 -2
  33. package/dist/Icon/Icon.esm.d.ts +1 -1
  34. package/dist/Icon/Icon.esm.js +2 -2
  35. package/dist/Image/Image.esm.d.ts +1 -1
  36. package/dist/Image/Image.esm.js +1 -1
  37. package/dist/Markup/Markup.esm.js +3 -3
  38. package/dist/Poster/Poster.esm.d.ts +1 -1
  39. package/dist/Poster/Poster.esm.js +9 -9
  40. package/dist/RadioGroup/RadioGroup.cjs.d.ts +1 -1
  41. package/dist/RadioGroup/RadioGroup.cjs.js +4 -1
  42. package/dist/RadioGroup/RadioGroup.esm.d.ts +1 -1
  43. package/dist/RadioGroup/RadioGroup.esm.js +15 -12
  44. package/dist/Rule/Rule.esm.js +3 -3
  45. package/dist/Section/Section.esm.d.ts +1 -1
  46. package/dist/Section/Section.esm.js +1 -1
  47. package/dist/Select/Select.cjs.d.ts +25 -0
  48. package/dist/Select/Select.cjs.js +2611 -0
  49. package/dist/Select/Select.esm.d.ts +25 -0
  50. package/dist/Select/Select.esm.js +2584 -0
  51. package/dist/Select/package.json +7 -0
  52. package/dist/SiteFooter/SiteFooter.esm.js +33 -33
  53. package/dist/SiteHeader/SiteHeader.esm.d.ts +1 -1
  54. package/dist/SiteHeader/SiteHeader.esm.js +98 -98
  55. package/dist/Surface/Surface.esm.d.ts +1 -1
  56. package/dist/Surface/Surface.esm.js +1 -1
  57. package/dist/Switch/Switch.cjs.d.ts +40 -0
  58. package/dist/Switch/Switch.cjs.js +210 -0
  59. package/dist/Switch/Switch.esm.d.ts +40 -0
  60. package/dist/Switch/Switch.esm.js +202 -0
  61. package/dist/Switch/package.json +7 -0
  62. package/dist/Text/Text.esm.d.ts +1 -1
  63. package/dist/Text/Text.esm.js +2 -2
  64. package/dist/TextInput/TextInput.cjs.d.ts +5 -1
  65. package/dist/TextInput/TextInput.cjs.js +25 -6
  66. package/dist/TextInput/TextInput.esm.d.ts +5 -1
  67. package/dist/TextInput/TextInput.esm.js +28 -9
  68. package/dist/Truncate/Truncate.cjs.d.ts +18 -0
  69. package/dist/Truncate/Truncate.cjs.js +17 -0
  70. package/dist/Truncate/Truncate.esm.d.ts +18 -0
  71. package/dist/Truncate/Truncate.esm.js +9 -0
  72. package/dist/Truncate/package.json +7 -0
  73. package/dist/UniversalHeader/UniversalHeader.esm.js +8 -8
  74. package/dist/VerticalSpace/VerticalSpace.cjs.d.ts +1 -18
  75. package/dist/VerticalSpace/VerticalSpace.cjs.js +5 -20
  76. package/dist/VerticalSpace/VerticalSpace.esm.d.ts +1 -18
  77. package/dist/VerticalSpace/VerticalSpace.esm.js +4 -19
  78. package/dist/VisuallyHidden/VisuallyHidden.cjs.d.ts +1 -12
  79. package/dist/VisuallyHidden/VisuallyHidden.cjs.js +3 -12
  80. package/dist/VisuallyHidden/VisuallyHidden.esm.d.ts +1 -12
  81. package/dist/VisuallyHidden/VisuallyHidden.esm.js +2 -11
  82. package/dist/_shared/cjs/Base-e2b846fe.d.ts +19 -0
  83. package/dist/_shared/cjs/Base-e2b846fe.js +22 -0
  84. package/dist/_shared/cjs/BtIconTickAlt2Px-b12ecc78.js +425 -0
  85. package/dist/_shared/cjs/{FormControl-a1b7421b.d.ts → FormControl-e6b7d7c5.d.ts} +51 -3
  86. package/dist/_shared/cjs/{FormControl-a1b7421b.js → FormControl-e6b7d7c5.js} +40 -8
  87. package/dist/_shared/cjs/VerticalSpace-65ad083c.d.ts +18 -0
  88. package/dist/_shared/cjs/VerticalSpace-65ad083c.js +25 -0
  89. package/dist/_shared/cjs/VisuallyHidden-e2c8b291.d.ts +12 -0
  90. package/dist/_shared/cjs/VisuallyHidden-e2c8b291.js +17 -0
  91. package/dist/_shared/cjs/index-c81c9401.d.ts +1 -1
  92. package/dist/_shared/esm/Base-c235dc45.d.ts +19 -0
  93. package/dist/_shared/esm/Base-c235dc45.js +15 -0
  94. package/dist/_shared/esm/{BrandLogo-ea3dd0e6.js → BrandLogo-4f13fe85.js} +4 -4
  95. package/dist/_shared/esm/{BtIconChevronDown2Px-4abd079b.js → BtIconChevronDown2Px-782876e2.js} +2 -2
  96. package/dist/_shared/esm/{BtIconChevronRight2Px-a5cc1d05.js → BtIconChevronRight2Px-b8e7b4ad.js} +3 -3
  97. package/dist/_shared/esm/{BtIconChevronRightMid-386cf272.js → BtIconChevronRightMid-d9b11761.js} +2 -2
  98. package/dist/_shared/esm/BtIconTickAlt2Px-2c4ec3be.js +408 -0
  99. package/dist/_shared/esm/{Button-5ff56a7b.js → Button-69439f8f.js} +15 -15
  100. package/dist/_shared/esm/{Curve-cfdca379.js → Curve-50697f7e.js} +2 -2
  101. package/dist/_shared/esm/{FormControl-feedc495.d.ts → FormControl-84c9ace6.d.ts} +51 -3
  102. package/dist/_shared/esm/FormControl-84c9ace6.js +138 -0
  103. package/dist/_shared/esm/{Heading-183be76c.js → Heading-eb1e42db.js} +4 -4
  104. package/dist/_shared/esm/{Icon-76d0d8c0.js → Icon-61f7237a.js} +5 -5
  105. package/dist/_shared/esm/{Image-7e4948f6.js → Image-c0f3d42f.js} +7 -7
  106. package/dist/_shared/esm/{Section-f1256c87.js → Section-7bc71e26.js} +2 -2
  107. package/dist/_shared/esm/{Surface-d515d212.js → Surface-bf201530.js} +3 -3
  108. package/dist/_shared/esm/{Text-d8988620.js → Text-6b958ad8.js} +3 -3
  109. package/dist/_shared/esm/VerticalSpace-6b4f5e50.d.ts +18 -0
  110. package/dist/_shared/esm/VerticalSpace-6b4f5e50.js +19 -0
  111. package/dist/_shared/esm/VisuallyHidden-b9eebf71.d.ts +12 -0
  112. package/dist/_shared/esm/VisuallyHidden-b9eebf71.js +11 -0
  113. package/dist/_shared/esm/index-c81c9401.d.ts +1 -1
  114. package/dist/index.es.js +34623 -529
  115. package/dist/index.es.js.map +1 -1
  116. package/dist/index.js +34527 -411
  117. package/dist/index.js.map +1 -1
  118. package/dist/styles.css +1 -1
  119. package/dist/types/components/Badge/Badge.d.ts +25 -0
  120. package/dist/types/components/Badge/index.d.ts +1 -0
  121. package/dist/types/components/FormControl/FormControl.d.ts +17 -0
  122. package/dist/types/components/FormControl/FormControlDisclosure/FormControlDisclosure.d.ts +28 -0
  123. package/dist/types/components/FormControl/FormControlDisclosure/index.d.ts +1 -0
  124. package/dist/types/components/Select/Select.d.ts +2 -1
  125. package/dist/types/components/Switch/Switch.d.ts +13 -8
  126. package/dist/types/components/TextInput/TextInput.d.ts +4 -0
  127. package/dist/types/components/Truncate/Truncate.d.ts +17 -0
  128. package/dist/types/components/Truncate/index.d.ts +1 -0
  129. package/dist/types/components/index.d.ts +4 -0
  130. package/dist/types/hooks/use-aria-describedby.d.ts +5 -1
  131. package/dist/types/styles.d.ts +4 -0
  132. package/package.json +4 -4
  133. package/dist/_shared/esm/FormControl-feedc495.js +0 -106
  134. /package/dist/_shared/esm/{BrandLogo-ea3dd0e6.d.ts → BrandLogo-4f13fe85.d.ts} +0 -0
  135. /package/dist/_shared/esm/{Button-5ff56a7b.d.ts → Button-69439f8f.d.ts} +0 -0
  136. /package/dist/_shared/esm/{Curve-cfdca379.d.ts → Curve-50697f7e.d.ts} +0 -0
  137. /package/dist/_shared/esm/{Heading-183be76c.d.ts → Heading-eb1e42db.d.ts} +0 -0
  138. /package/dist/_shared/esm/{Icon-76d0d8c0.d.ts → Icon-61f7237a.d.ts} +0 -0
  139. /package/dist/_shared/esm/{Image-7e4948f6.d.ts → Image-c0f3d42f.d.ts} +0 -0
  140. /package/dist/_shared/esm/{Section-f1256c87.d.ts → Section-7bc71e26.d.ts} +0 -0
  141. /package/dist/_shared/esm/{Surface-d515d212.d.ts → Surface-bf201530.d.ts} +0 -0
  142. /package/dist/_shared/esm/{Text-d8988620.d.ts → Text-6b958ad8.d.ts} +0 -0
@@ -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 };
@@ -0,0 +1,138 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-229fc864.js';
2
+ import { c as classNames } from './index-2ae58626.js';
3
+ import React__default, { useContext, useState, createContext } from 'react';
4
+ import { C as Context$1 } from './Surface-bf201530.js';
5
+ import { T as Text } from './Text-6b958ad8.js';
6
+ import { B as BtIconChevronRightMid_2 } from './BtIconChevronRightMid-d9b11761.js';
7
+
8
+ /**
9
+ * Optionally define ariaDescribedBy if errorMessage or helper exist.
10
+ */
11
+ var useAriaDescribedby = function (_a) {
12
+ var id = _a.id, _b = _a.idError, idError = _b === void 0 ? "".concat(id, "-error") : _b, _c = _a.idHelper, idHelper = _c === void 0 ? "".concat(id, "-helper") : _c, _d = _a.idDisclosure, idDisclosure = _d === void 0 ? "".concat(id, "-disclosure") : _d, errorMessage = _a.errorMessage, helper = _a.helper, disclosureText = _a.disclosureText;
13
+ if (!id) {
14
+ return {
15
+ ariaDescribedby: undefined,
16
+ idHelper: undefined,
17
+ idError: undefined,
18
+ idDisclosure: undefined
19
+ };
20
+ }
21
+ var ariaDescribedbyArr = [];
22
+ if (errorMessage) {
23
+ ariaDescribedbyArr.push(idError);
24
+ }
25
+ if (helper) {
26
+ ariaDescribedbyArr.push(idHelper);
27
+ }
28
+ if (disclosureText) {
29
+ ariaDescribedbyArr.push(idDisclosure);
30
+ }
31
+ var ariaDescribedby = ariaDescribedbyArr.length > 0 ? ariaDescribedbyArr.join(" ") : undefined;
32
+ return { ariaDescribedby: ariaDescribedby, idError: idError, idHelper: idHelper, idDisclosure: idDisclosure };
33
+ };
34
+
35
+ const React = React__default;
36
+ const BtIconAlert = props =>
37
+ /*#__PURE__*/ React.createElement(
38
+ "svg",
39
+ Object.assign(
40
+ {
41
+ xmlns: "http://www.w3.org/2000/svg",
42
+ viewBox: "0 0 32 32"
43
+ },
44
+ props
45
+ ),
46
+ /*#__PURE__*/ React.createElement("defs", null),
47
+ /*#__PURE__*/ React.createElement("path", {
48
+ d:
49
+ "M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
50
+ fill: "currentColor"
51
+ }),
52
+ /*#__PURE__*/ React.createElement("path", {
53
+ fill: "currentColor",
54
+ d: "M16 20.99335A1 1 0 1 0 16 22.99335 1 1 0 1 0 16 20.99335z"
55
+ }),
56
+ /*#__PURE__*/ React.createElement("path", {
57
+ d:
58
+ "M16.00488,19.00977a.49972.49972,0,0,0,.5-.5L16.50684,9.5a.5.5,0,0,0-1,0l-.002,9.00977A.5.5,0,0,0,16.00488,19.00977Z",
59
+ fill: "currentColor"
60
+ })
61
+ );
62
+ var BtIconAlert_2 = BtIconAlert;
63
+
64
+ /**
65
+ * Use `FormControlDisclosure` to display content that is only visible when toggled into
66
+ * an "open" state.
67
+ */
68
+ var FormControlDisclosure = function (_a) {
69
+ var children = _a.children, summary = _a.summary, onClick = _a.onClick, _b = _a.size, size = _b === void 0 ? "l" : _b, id = _a.id, props = __rest(_a, ["children", "summary", "onClick", "size", "id"]);
70
+ var surface = useContext(Context$1).surface;
71
+ var _c = useState(false), disclousreState = _c[0], setDisclosureState = _c[1];
72
+ var handleOnClick = function () {
73
+ onClick && onClick();
74
+ setDisclosureState(function (prevState) { return !prevState; });
75
+ };
76
+ return (React__default.createElement("details", __assign({ className: classNames({
77
+ "arc-FormControlDisclosure": true,
78
+ "arc-FormControlDisclosure--onDarkSurface": surface === "dark"
79
+ }) }, filterDataAttrs(props), { "data-testid": "FormControlDisclosure" }),
80
+ React__default.createElement("summary", { className: "arc-FormControlDisclosure-summary", onClick: handleOnClick, "aria-expanded": disclousreState },
81
+ React__default.createElement("span", { className: "arc-FormControlDisclosure-summary-icon" },
82
+ React__default.createElement(BtIconChevronRightMid_2, null)),
83
+ React__default.createElement(Text, { size: size === "l" ? "m" : "s" }, summary)),
84
+ React__default.createElement("div", { className: "arc-FormControlDisclosure-details" },
85
+ React__default.createElement(Text, { size: size === "l" ? "m" : "s" },
86
+ React__default.createElement("span", { id: id }, children)))));
87
+ };
88
+
89
+ var defaultContext = {
90
+ requirementStatus: null
91
+ };
92
+ var Context = createContext(defaultContext);
93
+ var Provider = Context.Provider;
94
+ /**
95
+ * Use `FormControl` to provide inputs with labels, helper text and error messages
96
+ */
97
+ var FormControl = function (_a) {
98
+ 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, isDisabled = _a.isDisabled, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, props = __rest(_a, ["children", "elementType", "errorMessage", "helper", "htmlFor", "id", "label", "labelSize", "requirementStatus", "isDisabled", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
99
+ var surface = useContext(Context$1).surface;
100
+ var _e = useAriaDescribedby({
101
+ disclosureText: disclosureText,
102
+ errorMessage: errorMessage,
103
+ helper: helper,
104
+ id: htmlFor || id // `htmlFor` is preference to keep this deterministic with TextInput
105
+ }), ariaDescribedby = _e.ariaDescribedby, idError = _e.idError, idHelper = _e.idHelper, idDisclosure = _e.idDisclosure;
106
+ var LabelType = ElementType === "div" ? "label" : "legend";
107
+ var elementProps = {};
108
+ var labelProps = {};
109
+ if (LabelType === "label") {
110
+ labelProps["htmlFor"] = htmlFor;
111
+ if (htmlFor) {
112
+ labelProps["id"] = "".concat(htmlFor, "-label");
113
+ }
114
+ else if (id) {
115
+ labelProps["id"] = "".concat(id, "-label");
116
+ }
117
+ }
118
+ else {
119
+ elementProps["aria-describedby"] = ariaDescribedby;
120
+ }
121
+ return (React__default.createElement(Provider, { value: { requirementStatus: requirementStatus } },
122
+ React__default.createElement(ElementType, __assign({ className: classNames({
123
+ "arc-FormControl": true,
124
+ "arc-FormControl--isDisabled": isDisabled,
125
+ "arc-FormControl--smallLabel": labelSize === "s",
126
+ "arc-FormControl--onDarkSurface": surface === "dark"
127
+ }), id: id }, elementProps, filterDataAttrs(props)),
128
+ React__default.createElement(LabelType, __assign({ className: "arc-FormControl-label" }, labelProps),
129
+ label,
130
+ requirementStatus === "optional" && (React__default.createElement("span", { className: "arc-FormControl-labelOptional" }, "(optional)"))),
131
+ children,
132
+ errorMessage ? (React__default.createElement("div", { className: "arc-FormControl-error", id: idError },
133
+ React__default.createElement("span", { className: "arc-FormControl-error--icon" },
134
+ React__default.createElement(BtIconAlert_2, null)),
135
+ errorMessage)) : disclosureTitle ? (React__default.createElement(FormControlDisclosure, { onClick: onClickDisclosure, summary: disclosureTitle, size: labelSize, id: idDisclosure }, disclosureText)) : (helper && (React__default.createElement("div", { className: "arc-FormControl-helper", id: idHelper }, helper))))));
136
+ };
137
+
138
+ export { BtIconAlert_2 as B, Context as C, FormControl as F, useAriaDescribedby as u };
@@ -1,8 +1,8 @@
1
1
  import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-229fc864.js';
2
2
  import { c as classNames } from './index-2ae58626.js';
3
- import React, { useContext } from 'react';
3
+ import React__default, { useContext } from 'react';
4
4
  import { s as suffixModifier } from './suffix-modifier-f5e28822.js';
5
- import { C as Context } from './Surface-d515d212.js';
5
+ import { C as Context } from './Surface-bf201530.js';
6
6
 
7
7
  /**
8
8
  * Use `Heading` to display heading text.
@@ -15,7 +15,7 @@ var Heading = function (_a) {
15
15
  if (level) {
16
16
  Element = "h".concat(level);
17
17
  }
18
- return (React.createElement(Element, __assign({ className: classNames((_b = {
18
+ return (React__default.createElement(Element, __assign({ className: classNames((_b = {
19
19
  "arc-Heading": true
20
20
  },
21
21
  _b[suffixModifier("arc-Heading--align", align)] = align && align !== "left",
@@ -27,7 +27,7 @@ var Heading = function (_a) {
27
27
  };
28
28
  var HeadingProposition = function (_a) {
29
29
  var children = _a.children;
30
- return React.createElement("span", { className: "arc-Heading-proposition" }, children);
30
+ return React__default.createElement("span", { className: "arc-Heading-proposition" }, children);
31
31
  };
32
32
  HeadingProposition.displayName = "Heading.Proposition";
33
33
  Heading.Proposition = HeadingProposition;
@@ -1,10 +1,10 @@
1
1
  import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-229fc864.js';
2
- import React$1, { useContext } from 'react';
2
+ import React__default, { useContext } from 'react';
3
3
  import { c as classNames } from './index-2ae58626.js';
4
4
  import { s as suffixModifier } from './suffix-modifier-f5e28822.js';
5
- import { C as Context } from './Surface-d515d212.js';
5
+ import { C as Context } from './Surface-bf201530.js';
6
6
 
7
- const React = React$1;
7
+ const React = React__default;
8
8
  const ArcIconArc = props =>
9
9
  /*#__PURE__*/ React.createElement(
10
10
  "svg",
@@ -31,7 +31,7 @@ var Icon = function (_a) {
31
31
  var testId = _a.testId, _c = _a.color, color = _c === void 0 ? "auto" : _c, _d = _a.icon, icon = _d === void 0 ? ArcIconArc_2 : _d, _e = _a.isInline, isInline = _e === void 0 ? false : _e, label = _a.label, size = _a.size, props = __rest(_a, ["testId", "color", "icon", "isInline", "label", "size"]);
32
32
  var surface = useContext(Context).surface;
33
33
  var Icon = icon;
34
- return (React$1.createElement("span", __assign({ "data-testid": testId, "aria-label": label, className: classNames((_b = {},
34
+ return (React__default.createElement("span", __assign({ "data-testid": testId, "aria-label": label, className: classNames((_b = {},
35
35
  _b["arc-Icon"] = true,
36
36
  _b[suffixModifier("arc-Icon--color", color)] = color !== "auto",
37
37
  _b["arc-Icon--inline"] = isInline,
@@ -40,7 +40,7 @@ var Icon = function (_a) {
40
40
  height: size,
41
41
  width: size
42
42
  } }, filterDataAttrs(props)),
43
- React$1.createElement(Icon, null)));
43
+ React__default.createElement(Icon, null)));
44
44
  };
45
45
 
46
46
  export { Icon as I };
@@ -1,6 +1,6 @@
1
1
  import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-229fc864.js';
2
2
  import { c as classNames } from './index-2ae58626.js';
3
- import React, { useEffect } from 'react';
3
+ import React__default, { useEffect } from 'react';
4
4
  import { s as suffixModifier } from './suffix-modifier-f5e28822.js';
5
5
 
6
6
  /**
@@ -11,27 +11,27 @@ var Image = function (_a) {
11
11
  var _b;
12
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
13
  useEffect(function () {
14
- React.Children.map(children, function (item) {
14
+ React__default.Children.map(children, function (item) {
15
15
  if (item && item.type !== ImageSource) {
16
16
  throw new Error("Illegal child passed to <Image />. Ensure to only use <Image.Source />.");
17
17
  }
18
18
  });
19
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 = {
20
+ var img = (React__default.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__default.createElement("div", __assign({ className: classNames((_b = {
22
22
  "arc-Image": true,
23
23
  "arc-Image--cover": fit === "cover"
24
24
  },
25
25
  _b["arc-Image--anchor".concat(anchor)] = fit === "cover",
26
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,
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__default.createElement("picture", null,
28
28
  children,
29
29
  " ",
30
- img)) : (React.createElement(React.Fragment, null, img))));
30
+ img)) : (React__default.createElement(React__default.Fragment, null, img))));
31
31
  };
32
32
  var ImageSource = function (_a) {
33
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))));
34
+ return (React__default.createElement("source", __assign({ height: height, media: media, sizes: sizes, srcSet: srcSet, type: type }, filterDataAttrs(props))));
35
35
  };
36
36
  ImageSource.displayName = "Image.Source";
37
37
  Image.Source = ImageSource;
@@ -1,13 +1,13 @@
1
1
  import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-229fc864.js';
2
2
  import { c as classNames } from './index-2ae58626.js';
3
- import React from 'react';
3
+ import React__default from 'react';
4
4
 
5
5
  /**
6
6
  * Use `Section` to compose content into vertical page layouts.
7
7
  */
8
8
  var Section = function (_a) {
9
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({
10
+ return (React__default.createElement("div", __assign({ className: classNames({
11
11
  "arc-Section": true,
12
12
  "arc-Section--fullWidth": isFullWidth,
13
13
  "arc-Section--debugVisible": isDebugVisible
@@ -1,6 +1,6 @@
1
1
  import { b as __spreadArray, _ as __rest, a as __assign, c as camelCase, f as filterDataAttrs } from './index-229fc864.js';
2
2
  import { c as classNames } from './index-2ae58626.js';
3
- import React, { createContext } from 'react';
3
+ import React__default, { createContext } from 'react';
4
4
 
5
5
  var defaultContext = { surface: "light" };
6
6
  var Context = createContext(defaultContext);
@@ -19,8 +19,8 @@ var Surface = function (_a) {
19
19
  background === "darker") {
20
20
  surface = "dark";
21
21
  }
22
- return (React.createElement(Provider, { value: { surface: surface } },
23
- React.createElement("div", __assign({ className: classNames((_b = {
22
+ return (React__default.createElement(Provider, { value: { surface: surface } },
23
+ React__default.createElement("div", __assign({ className: classNames((_b = {
24
24
  "arc-Surface": true
25
25
  },
26
26
  _b["arc-Surface--".concat(background &&
@@ -1,8 +1,8 @@
1
1
  import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-229fc864.js';
2
2
  import { c as classNames } from './index-2ae58626.js';
3
- import React, { useContext } from 'react';
3
+ import React__default, { useContext } from 'react';
4
4
  import { s as suffixModifier } from './suffix-modifier-f5e28822.js';
5
- import { C as Context } from './Surface-d515d212.js';
5
+ import { C as Context } from './Surface-bf201530.js';
6
6
 
7
7
  /**
8
8
  * Use `Text` to display text.
@@ -11,7 +11,7 @@ var Text = function (_a) {
11
11
  var _b;
12
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
13
  var surface = useContext(Context).surface;
14
- return (React.createElement("span", __assign({ className: classNames((_b = {
14
+ return (React__default.createElement("span", __assign({ className: classNames((_b = {
15
15
  "arc-Text": true
16
16
  },
17
17
  _b[suffixModifier("arc-Text--align", align)] = align !== "left",
@@ -0,0 +1,18 @@
1
+ import { FC } from "react";
2
+ /**
3
+ * Use `VerticalSpace` to create vertical space between components.
4
+ */
5
+ declare const VerticalSpace: FC<VerticalSpaceProps>;
6
+ type VerticalSpaceSize = "4" | "8" | "12" | "16" | "24" | "32" | "48" | "64" | "96" | "128";
7
+ interface VerticalSpaceProps {
8
+ /**
9
+ * Should the VerticalSpace be visible for debugging and documentation
10
+ * purposes?
11
+ */
12
+ isDebugVisible?: boolean;
13
+ /**
14
+ * Size of the VerticalSpace.
15
+ */
16
+ size?: VerticalSpaceSize;
17
+ }
18
+ export { VerticalSpace, VerticalSpaceSize, VerticalSpaceProps };
@@ -0,0 +1,19 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-229fc864.js';
2
+ import { c as classNames } from './index-2ae58626.js';
3
+ import React__default from 'react';
4
+
5
+ /**
6
+ * Use `VerticalSpace` to create vertical space between components.
7
+ */
8
+ var VerticalSpace = function (_a) {
9
+ var _b;
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__default.createElement("div", __assign({ className: classNames((_b = {
12
+ "arc-VerticalSpace": true
13
+ },
14
+ _b["arc-VerticalSpace--size".concat(size)] = size && size !== "24",
15
+ _b["arc-VerticalSpace--debugVisible"] = isDebugVisible,
16
+ _b)) }, filterDataAttrs(props))));
17
+ };
18
+
19
+ export { VerticalSpace as V };
@@ -0,0 +1,12 @@
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, VisuallyHiddenProps };
@@ -0,0 +1,11 @@
1
+ import React__default 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__default.createElement("span", { "data-testid": "visually-hidden", className: "arc-VisuallyHidden" }, children));
9
+ };
10
+
11
+ export { VisuallyHidden as V };
@@ -1,4 +1,4 @@
1
- export * from "./FormControl-feedc495";
1
+ export * from "./FormControl-84c9ace6";
2
2
  export * from "../../Card/Card.esm";
3
3
  export * from "./index.es-00cb3bcb";
4
4
  export * from "../../TextInput/TextInput.esm";