@arc-ui/components 11.23.0 → 11.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Calendar/Calendar.cjs.js +1 -1
- package/dist/Calendar/Calendar.esm.js +1 -1
- package/dist/Card/Card.cjs.js +1 -1
- package/dist/Card/Card.esm.js +1 -1
- package/dist/Clock/Clock.cjs.js +7 -2
- package/dist/Clock/Clock.esm.js +7 -2
- package/dist/Curve/Curve.cjs.js +1 -1
- package/dist/Curve/Curve.esm.js +1 -1
- package/dist/DatePicker/DatePicker.cjs.js +2 -2
- package/dist/DatePicker/DatePicker.esm.js +2 -2
- package/dist/ProgressStepper/ProgressStepper.cjs.js +1 -1
- package/dist/ProgressStepper/ProgressStepper.esm.js +1 -1
- package/dist/RadioGroup/RadioGroup.cjs.js +2 -1
- package/dist/RadioGroup/RadioGroup.esm.js +1 -1
- package/dist/SiteFooter/SiteFooter.cjs.js +2 -2
- package/dist/SiteFooter/SiteFooter.esm.js +3 -3
- package/dist/SiteHeader/SiteHeader.cjs.js +1 -1
- package/dist/SiteHeader/SiteHeader.esm.js +1 -1
- package/dist/TextArea/TextArea.cjs.js +9 -9
- package/dist/TextArea/TextArea.esm.js +9 -9
- package/dist/TextInput/TextInput.cjs.js +1 -1
- package/dist/TextInput/TextInput.esm.js +1 -1
- package/dist/_shared/cjs/{Calendar-6ea75d05.js → Calendar-b022545c.js} +2 -2
- package/dist/_shared/cjs/{Card-5b19cabc.js → Card-78a70e63.js} +5 -1
- package/dist/_shared/cjs/{Curve-d038052b.js → Curve-b5117889.js} +1 -1
- package/dist/_shared/cjs/{ProgressStepper-57cfef1e.js → ProgressStepper-491f0286.js} +10 -10
- package/dist/_shared/cjs/{RadioGroup-85eda600.js → RadioGroup-26dc00fc.js} +22 -11
- package/dist/_shared/cjs/{SiteFooter-65b6360c.js → SiteFooter-20d5a9fa.js} +1 -1
- package/dist/_shared/cjs/{SiteHeader.rehydrator-b76b0889.js → SiteHeader.rehydrator-9d8f3dad.js} +5 -1
- package/dist/_shared/cjs/{TextInput-8912dd41.js → TextInput-8d139489.js} +2 -2
- package/dist/_shared/esm/{Calendar-fafaca6b.js → Calendar-ea232839.js} +2 -2
- package/dist/_shared/esm/{Card-7fc6c9b4.js → Card-a4b78406.js} +5 -1
- package/dist/_shared/esm/{Curve-d8679dde.js → Curve-e05b3c3f.js} +1 -1
- package/dist/_shared/esm/{ProgressStepper-6c811282.js → ProgressStepper-7eba3a6a.js} +10 -10
- package/dist/_shared/esm/{RadioGroup-6c8f8454.js → RadioGroup-427652ac.js} +22 -12
- package/dist/_shared/esm/{SiteFooter-38ee1536.js → SiteFooter-86f910b4.js} +1 -1
- package/dist/_shared/esm/{SiteHeader.rehydrator-8ad7651b.js → SiteHeader.rehydrator-2ec02ee7.js} +5 -1
- package/dist/_shared/esm/{TextInput-5ffa05da.js → TextInput-c0388103.js} +2 -2
- package/dist/index.es.js +52 -30
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +52 -30
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/Card/Card.d.ts +5 -1
- package/dist/types/components/Clock/Clock.d.ts +7 -2
- package/dist/types/components/Curve/Curve.d.ts +1 -1
- package/dist/types/components/RadioGroup/RadioButton/RadioButton.d.ts +17 -28
- package/dist/types/components/RadioGroup/RadioButtonGroupInput/RadioButtonGroupInput.d.ts +36 -0
- package/dist/types/components/RadioGroup/RadioButtonGroupInput/index.d.ts +1 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/types/components/RadioGroup/context.d.ts +1 -1
- package/dist/types/components/RadioGroup/index.d.ts +1 -0
- package/dist/types/components/SiteHeader/SiteHeader.d.ts +5 -1
- package/dist/types/components/TextArea/TextArea.d.ts +5 -0
- package/dist/types/components/TextInput/TextInput.d.ts +5 -0
- package/dist/types/types/auto-complete-types.d.ts +1 -0
- package/package.json +3 -3
|
@@ -3620,7 +3620,7 @@ var CalendarNavButton = function (_a) {
|
|
|
3620
3620
|
previous: BtIconChevronLeftMid,
|
|
3621
3621
|
next: BtIconChevronRightMid
|
|
3622
3622
|
};
|
|
3623
|
-
return (React__default.createElement("button", { "aria-label": ariaLabel, disabled: isDisabled, onClick: onClick, className: classNames("arc-CalendarNavButton", {
|
|
3623
|
+
return (React__default.createElement("button", { "aria-label": ariaLabel, disabled: isDisabled, onClick: onClick, type: "button", className: classNames("arc-CalendarNavButton", {
|
|
3624
3624
|
"arc-CalendarNavButton--previous": direction === "previous",
|
|
3625
3625
|
"arc-CalendarNavButton--next": direction === "next"
|
|
3626
3626
|
}) },
|
|
@@ -3896,7 +3896,7 @@ var reducer = function (state, action) {
|
|
|
3896
3896
|
var CalendarFooter = function (_a) {
|
|
3897
3897
|
var onCancelClick = _a.onCancelClick;
|
|
3898
3898
|
return (React__default.createElement("div", { className: "arc-CalendarFooter" },
|
|
3899
|
-
React__default.createElement("button", { className: "arc-CalendarFooter-button", onClick: onCancelClick }, "Cancel")));
|
|
3899
|
+
React__default.createElement("button", { type: "button", className: "arc-CalendarFooter-button", onClick: onCancelClick }, "Cancel")));
|
|
3900
3900
|
};
|
|
3901
3901
|
|
|
3902
3902
|
var CalendarWrapper = function (_a) {
|
|
@@ -39,7 +39,11 @@ var useInteractionMode = function () {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
|
|
42
|
+
#### Deprecation Notice
|
|
43
|
+
|
|
44
|
+
The `Card` component has been superseded by a range of new `Card` options (`ImpactCard`, `InformationCard`, `MediaCard`, `TypographyCard`) and therefore is being deprecated from Arc and will be removed in a future release.
|
|
45
|
+
|
|
46
|
+
Do not use `Card` for any new work, and prepare to update any design that features it to replace it with our newer `Card` options.
|
|
43
47
|
*/
|
|
44
48
|
var Card = function (_a) {
|
|
45
49
|
var _b;
|
|
@@ -6,7 +6,7 @@ import { s as suffixModifier } from './suffix-modifier-3d548e45.js';
|
|
|
6
6
|
/**
|
|
7
7
|
#### Deprecation Notice
|
|
8
8
|
|
|
9
|
-
The `Curve` component is an outdated brand feature and is being deprecated from Arc as a standalone component or sub-component within other components. Do not use Curve for any new work, and prepare to update any design that features it to remove it.
|
|
9
|
+
The `Curve` component is an outdated brand feature and is being deprecated from Arc as a standalone component or sub-component within other components. Do not use `Curve` for any new work, and prepare to update any design that features it to remove it.
|
|
10
10
|
|
|
11
11
|
`Curve` will be removed from Arc in a subsequent release
|
|
12
12
|
*/
|
|
@@ -6,35 +6,35 @@ import { C as Context } from './Surface-0ca6817d.js';
|
|
|
6
6
|
import { V as VisuallyHidden } from './VisuallyHidden-06692fd3.js';
|
|
7
7
|
|
|
8
8
|
var Error = function () { return (React__default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
9
|
-
React__default.createElement("g", {
|
|
9
|
+
React__default.createElement("g", { clipPath: "url(#a)" },
|
|
10
10
|
React__default.createElement("path", { d: "m13.06 12 2.845-2.845a.75.75 0 0 0-1.06-1.06L12 10.94 9.155 8.095a.75.75 0 0 0-1.06 1.06L10.939 12l-2.844 2.845a.75.75 0 1 0 1.06 1.06L12 13.061l2.845 2.844a.75.75 0 0 0 1.06-1.06L13.06 12Z", fill: "currentColor" })),
|
|
11
|
-
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor",
|
|
11
|
+
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", strokeWidth: "1.333" }),
|
|
12
12
|
React__default.createElement("defs", null,
|
|
13
13
|
React__default.createElement("clipPath", { id: "a" },
|
|
14
14
|
React__default.createElement("rect", { width: "24", height: "24", rx: "12" }))))); };
|
|
15
15
|
|
|
16
16
|
var Warning = function () { return (React__default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
17
|
-
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor",
|
|
18
|
-
React__default.createElement("path", { d: "M12 15.747a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm.004-1.487a.375.375 0 0 0 .375-.375l.001-6.757a.375.375 0 1 0-.75 0l-.001 6.757a.375.375 0 0 0 .375.375Z", fill: "currentColor", stroke: "currentColor",
|
|
17
|
+
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", strokeWidth: "1.333" }),
|
|
18
|
+
React__default.createElement("path", { d: "M12 15.747a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm.004-1.487a.375.375 0 0 0 .375-.375l.001-6.757a.375.375 0 1 0-.75 0l-.001 6.757a.375.375 0 0 0 .375.375Z", fill: "currentColor", stroke: "currentColor", strokeWidth: ".3" }))); };
|
|
19
19
|
|
|
20
20
|
var Complete = function () { return (React__default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
21
|
-
React__default.createElement("g", {
|
|
21
|
+
React__default.createElement("g", { clipPath: "url(#a)" },
|
|
22
22
|
React__default.createElement("path", { d: "m10.125 16.435-3.53-3.53a.75.75 0 0 1 0-1.06.768.768 0 0 1 1.06 0l2.47 2.47 6.22-6.22a.75.75 0 1 1 1.06 1.06l-7.28 7.28Z", fill: "currentColor" })),
|
|
23
|
-
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor",
|
|
23
|
+
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", strokeWidth: "1.333" }),
|
|
24
24
|
React__default.createElement("defs", null,
|
|
25
25
|
React__default.createElement("clipPath", { id: "a" },
|
|
26
26
|
React__default.createElement("rect", { width: "24", height: "24", rx: "12" }))))); };
|
|
27
27
|
|
|
28
28
|
var Current = function () { return (React__default.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
29
|
-
React__default.createElement("rect", { x: "0.666667", y: "0.666667", width: "22.6667", height: "22.6667", rx: "11.3333", stroke: "url(#paint0_linear_1_1050)",
|
|
29
|
+
React__default.createElement("rect", { x: "0.666667", y: "0.666667", width: "22.6667", height: "22.6667", rx: "11.3333", stroke: "url(#paint0_linear_1_1050)", strokeWidth: "1.33333" }),
|
|
30
30
|
React__default.createElement("circle", { cx: "12", cy: "12", r: "7", fill: "currentColor" }),
|
|
31
31
|
React__default.createElement("defs", null,
|
|
32
32
|
React__default.createElement("linearGradient", { id: "paint0_linear_1_1050", x1: "36.6036", y1: "-4.31391e-07", x2: "-12.6036", y2: "24", gradientUnits: "userSpaceOnUse" },
|
|
33
|
-
React__default.createElement("stop", {
|
|
34
|
-
React__default.createElement("stop", { offset: "1",
|
|
33
|
+
React__default.createElement("stop", { stopColor: "#F200F5" }),
|
|
34
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#1EC8E6" }))))); };
|
|
35
35
|
|
|
36
36
|
var Todo = function () { return (React__default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
37
|
-
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor",
|
|
37
|
+
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", strokeWidth: "1.333" }))); };
|
|
38
38
|
|
|
39
39
|
// export current step as an icon
|
|
40
40
|
var ProgressStepperItem = function (_a) {
|
|
@@ -3,6 +3,7 @@ import React__default, { createContext, useContext, forwardRef, useEffect } from
|
|
|
3
3
|
import { F as FormControl } from './FormControl-8e836656.js';
|
|
4
4
|
import { c as classNames } from './index-2e73c2e9.js';
|
|
5
5
|
import { C as Context } from './Surface-0ca6817d.js';
|
|
6
|
+
import { V as VisuallyHidden } from './VisuallyHidden-06692fd3.js';
|
|
6
7
|
|
|
7
8
|
var RadioContext = createContext({});
|
|
8
9
|
var Provider = RadioContext.Provider;
|
|
@@ -11,18 +12,15 @@ var useRadioContext = function () {
|
|
|
11
12
|
return context;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
/**
|
|
15
|
-
* Radio Button component.
|
|
16
|
-
*/
|
|
17
15
|
var RadioButton = forwardRef(function (_a, ref) {
|
|
18
|
-
var
|
|
19
|
-
var _c = useRadioContext(), blurEvent = _c.blurEvent, changeEvent = _c.changeEvent, groupDisabled = _c.groupDisabled, checkedValue = _c.checkedValue, labelSize = _c.labelSize, name = _c.name, size = _c.size;
|
|
16
|
+
var id = _a.id, changeEvent = _a.changeEvent, isDisabled = _a.isDisabled, size = _a.size, labelSize = _a.labelSize, checked = _a.checked, defaultChecked = _a.defaultChecked, radioButtonAlignment = _a.radioButtonAlignment, name = _a.name, blurEvent = _a.blurEvent, value = _a.value, label = _a.label, helper = _a.helper, hideLabel = _a.hideLabel, withMargin = _a.withMargin, props = __rest(_a, ["id", "changeEvent", "isDisabled", "size", "labelSize", "checked", "defaultChecked", "radioButtonAlignment", "name", "blurEvent", "value", "label", "helper", "hideLabel", "withMargin"]);
|
|
20
17
|
var surface = useContext(Context).surface;
|
|
21
18
|
var idLabel = "".concat(id, "-label");
|
|
22
|
-
var checked = checkedValue === value ? true : false;
|
|
23
19
|
return (React__default.createElement("div", __assign({ className: classNames({
|
|
24
20
|
"arc-RadioButton": true,
|
|
25
|
-
"arc-RadioButton--
|
|
21
|
+
"arc-RadioButton--withMargin": withMargin,
|
|
22
|
+
"arc-RadioButton--withMarginSmall": withMargin && size === "s",
|
|
23
|
+
"arc-RadioButton--disabled": isDisabled,
|
|
26
24
|
"arc-RadioButton--small": size === "s",
|
|
27
25
|
"arc-RadioButton--smallLabel": labelSize === "s",
|
|
28
26
|
"arc-RadioButton--onDarkSurface": surface === "dark"
|
|
@@ -30,14 +28,26 @@ var RadioButton = forwardRef(function (_a, ref) {
|
|
|
30
28
|
React__default.createElement("label", { className: classNames("arc-RadioButton-label", {
|
|
31
29
|
"arc-RadioButton-label--alignTop": radioButtonAlignment === "top"
|
|
32
30
|
}), htmlFor: id, id: idLabel },
|
|
33
|
-
React__default.createElement("input", { className: "arc-RadioButton-input", checked:
|
|
31
|
+
React__default.createElement("input", { className: "arc-RadioButton-input", checked: checked, defaultChecked: defaultChecked, disabled: isDisabled, id: id, name: name, onBlur: blurEvent, onChange: changeEvent, ref: ref, type: "radio", value: value, "aria-checked": checked }),
|
|
34
32
|
React__default.createElement("span", { className: classNames({
|
|
35
33
|
"arc-RadioButton-label--marginTop": radioButtonAlignment === "top"
|
|
36
34
|
}) },
|
|
37
|
-
label,
|
|
35
|
+
hideLabel ? React__default.createElement(VisuallyHidden, null, label) : label,
|
|
38
36
|
helper && React__default.createElement("span", { className: "arc-RadioButton-helper" }, helper)))));
|
|
39
37
|
});
|
|
40
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Radio Button component.
|
|
41
|
+
*/
|
|
42
|
+
var RadioButtonGroupInput = forwardRef(function (_a, ref) {
|
|
43
|
+
var helper = _a.helper, id = _a.id, isDisabled = _a.isDisabled, label = _a.label, _b = _a.radioButtonAlignment, radioButtonAlignment = _b === void 0 ? "center" : _b, value = _a.value, props = __rest(_a, ["helper", "id", "isDisabled", "label", "radioButtonAlignment", "value"]);
|
|
44
|
+
var _c = useRadioContext(), blurEvent = _c.blurEvent, changeEvent = _c.changeEvent, groupDisabled = _c.groupDisabled, checkedValue = _c.checkedValue, labelSize = _c.labelSize, name = _c.name, size = _c.size;
|
|
45
|
+
var isChecked = checkedValue === value ? true : false;
|
|
46
|
+
var checked = typeof changeEvent !== "function" ? undefined : isChecked;
|
|
47
|
+
var defaultChecked = typeof changeEvent !== "function" ? isChecked : undefined;
|
|
48
|
+
return (React__default.createElement(RadioButton, __assign({ withMargin: true, ref: ref, id: id, name: name, helper: helper, isDisabled: isDisabled || groupDisabled, labelSize: labelSize, size: size, radioButtonAlignment: radioButtonAlignment, label: label, defaultChecked: defaultChecked, checked: checked, changeEvent: changeEvent, blurEvent: blurEvent, value: value }, props)));
|
|
49
|
+
});
|
|
50
|
+
|
|
41
51
|
/**
|
|
42
52
|
* Use `RadioGroup` to wrap and control radio buttons and apply default values
|
|
43
53
|
*/
|
|
@@ -45,7 +55,7 @@ var RadioGroup = function (_a) {
|
|
|
45
55
|
var children = _a.children, checkedValue = _a.checkedValue, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, id = _a.id, helper = _a.helper, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, _d = _a.size, size = _d === void 0 ? "l" : _d, props = __rest(_a, ["children", "checkedValue", "isDisabled", "id", "helper", "label", "labelSize", "name", "onBlur", "onChange", "size"]);
|
|
46
56
|
useEffect(function () {
|
|
47
57
|
React__default.Children.map(children, function (item) {
|
|
48
|
-
if (item && item.type !==
|
|
58
|
+
if (item && item.type !== RadioButtonGroupInput) {
|
|
49
59
|
throw new Error("Illegal child passed to <RadioGroup />. Ensure to only use <RadioGroup.RadioButton />.");
|
|
50
60
|
}
|
|
51
61
|
});
|
|
@@ -63,6 +73,6 @@ var RadioGroup = function (_a) {
|
|
|
63
73
|
React__default.createElement(FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable", helperUnderLabel: true },
|
|
64
74
|
React__default.createElement("span", { className: "arc-RadioGroup-radioButtonContainer" }, children)))));
|
|
65
75
|
};
|
|
66
|
-
RadioGroup.RadioButton =
|
|
76
|
+
RadioGroup.RadioButton = RadioButtonGroupInput;
|
|
67
77
|
|
|
68
|
-
export { RadioGroup as R };
|
|
78
|
+
export { RadioGroup as R, RadioButton as a };
|
|
@@ -3,7 +3,7 @@ import { u as useMediaQuery, A as ArcBreakpointM } from './use-media-query-4c807
|
|
|
3
3
|
import { B as BtIconChevronDown2Px } from './BtIconChevronDown2Px.esm-217276c2.js';
|
|
4
4
|
import React__default, { useEffect, Fragment } from 'react';
|
|
5
5
|
import { B as BrandLogo } from './BrandLogo-1af78f76.js';
|
|
6
|
-
import { C as Curve } from './Curve-
|
|
6
|
+
import { C as Curve } from './Curve-e05b3c3f.js';
|
|
7
7
|
import { S as Section } from './Section-73781b56.js';
|
|
8
8
|
import { S as Surface } from './Surface-0ca6817d.js';
|
|
9
9
|
import { h as handleLinkClick } from './handle-link-click-f64f55a2.js';
|
package/dist/_shared/esm/{SiteHeader.rehydrator-8ad7651b.js → SiteHeader.rehydrator-2ec02ee7.js}
RENAMED
|
@@ -511,7 +511,11 @@ var defaultContext = { transparent: false };
|
|
|
511
511
|
var Context = createContext(defaultContext);
|
|
512
512
|
var Provider = Context.Provider;
|
|
513
513
|
/**
|
|
514
|
-
|
|
514
|
+
#### Deprecation Notice
|
|
515
|
+
|
|
516
|
+
The `SiteHeader` component has been superseded by `SiteHeaderV2` and therefore is being deprecated from Arc and will be removed in a future release.
|
|
517
|
+
|
|
518
|
+
Do not use `SiteHeader` for any new work, and prepare to update any design that features it to replace it with `SiteHeaderV2`.
|
|
515
519
|
*/
|
|
516
520
|
var SiteHeader = function (_a) {
|
|
517
521
|
var _b;
|
|
@@ -35,7 +35,7 @@ var useNumericInput = function (props) {
|
|
|
35
35
|
|
|
36
36
|
var TextInputComponent = forwardRef(function (_a, ref) {
|
|
37
37
|
var _b;
|
|
38
|
-
var _c = _a.defaultValue, defaultValue = _c === void 0 ? "" : _c, errorMessage = _a.errorMessage, helper = _a.helper, hideLabel = _a.hideLabel, id = _a.id, inputMode = _a.inputMode, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, label = _a.label, _g = _a.labelSize, labelSize = _g === void 0 ? "l" : _g, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, placeholder = _a.placeholder, onClickDisclosure = _a.onClickDisclosure, pattern = _a.pattern, _h = _a.type, type = _h === void 0 ? "text" : _h, _j = _a.showPassword, showPassword = _j === void 0 ? false : _j, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, _k = _a.inputSize, inputSize = _k === void 0 ? "m" : _k, iconButton = _a.iconButton, prefix = _a.prefix, suffix = _a.suffix, _l = _a.inputAlignment, inputAlignment = _l === void 0 ? "left" : _l, width = _a.width, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "labelSize", "maxLength", "minLength", "name", "onBlur", "onChange", "placeholder", "onClickDisclosure", "pattern", "type", "showPassword", "value", "disclosureTitle", "disclosureText", "inputSize", "iconButton", "prefix", "suffix", "inputAlignment", "width"]);
|
|
38
|
+
var _c = _a.defaultValue, defaultValue = _c === void 0 ? "" : _c, errorMessage = _a.errorMessage, helper = _a.helper, hideLabel = _a.hideLabel, id = _a.id, inputMode = _a.inputMode, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, label = _a.label, _g = _a.labelSize, labelSize = _g === void 0 ? "l" : _g, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, placeholder = _a.placeholder, onClickDisclosure = _a.onClickDisclosure, pattern = _a.pattern, _h = _a.type, type = _h === void 0 ? "text" : _h, _j = _a.showPassword, showPassword = _j === void 0 ? false : _j, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, _k = _a.inputSize, inputSize = _k === void 0 ? "m" : _k, iconButton = _a.iconButton, prefix = _a.prefix, suffix = _a.suffix, _l = _a.inputAlignment, inputAlignment = _l === void 0 ? "left" : _l, width = _a.width, autoComplete = _a.autoComplete, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "labelSize", "maxLength", "minLength", "name", "onBlur", "onChange", "placeholder", "onClickDisclosure", "pattern", "type", "showPassword", "value", "disclosureTitle", "disclosureText", "inputSize", "iconButton", "prefix", "suffix", "inputAlignment", "width", "autoComplete"]);
|
|
39
39
|
var surface = useContext(Context).surface;
|
|
40
40
|
var _m = useState(false), showPasswordToggle = _m[0], setShowPasswordToggle = _m[1];
|
|
41
41
|
var inferredInputProps = useNumericInput({
|
|
@@ -71,7 +71,7 @@ var TextInputComponent = forwardRef(function (_a, ref) {
|
|
|
71
71
|
React__default.createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, isDisabled: isDisabled, label: label, hideLabel: hideLabel, labelSize: labelSize, requirementStatus: isRequired ? "required" : "optional", disclosureTitle: disclosureTitle, disclosureText: disclosureText, onClickDisclosure: onClickDisclosure },
|
|
72
72
|
React__default.createElement("div", { className: "arc-TextInput-inputWrapper", style: { width: width } },
|
|
73
73
|
prefix && (React__default.createElement("span", { className: "arc-TextInput-prefix", "aria-hidden": true }, prefix)),
|
|
74
|
-
React__default.createElement("input", __assign({ placeholder: placeholder, "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)),
|
|
74
|
+
React__default.createElement("input", __assign({ placeholder: placeholder, "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, autoComplete: autoComplete }, inferredInputProps)),
|
|
75
75
|
iconButton && !showPassword && (React__default.createElement("div", { className: "arc-TextInput-additionalControl" },
|
|
76
76
|
React__default.createElement("button", { ref: iconButton.ref, className: "arc-TextInput-iconButton", disabled: isReadOnly || isDisabled, "aria-label": iconButton.label, onFocus: iconButton.onFocus, onClick: function (e) {
|
|
77
77
|
e.preventDefault();
|
package/dist/index.es.js
CHANGED
|
@@ -1770,7 +1770,11 @@ var useNumericInput = function (props) {
|
|
|
1770
1770
|
};
|
|
1771
1771
|
|
|
1772
1772
|
/**
|
|
1773
|
-
|
|
1773
|
+
#### Deprecation Notice
|
|
1774
|
+
|
|
1775
|
+
The `Card` component has been superseded by a range of new `Card` options (`ImpactCard`, `InformationCard`, `MediaCard`, `TypographyCard`) and therefore is being deprecated from Arc and will be removed in a future release.
|
|
1776
|
+
|
|
1777
|
+
Do not use `Card` for any new work, and prepare to update any design that features it to replace it with our newer `Card` options.
|
|
1774
1778
|
*/
|
|
1775
1779
|
var Card = function (_a) {
|
|
1776
1780
|
var _b;
|
|
@@ -2027,8 +2031,13 @@ var Checkbox = forwardRef(function (_a, ref) {
|
|
|
2027
2031
|
});
|
|
2028
2032
|
|
|
2029
2033
|
/**
|
|
2030
|
-
|
|
2031
|
-
|
|
2034
|
+
#### Deprecation Notice
|
|
2035
|
+
|
|
2036
|
+
The `Clock` component is being deprecated from Arc and will be removed in a future release.
|
|
2037
|
+
|
|
2038
|
+
Do not use `Clock` for any new work, and prepare to update any design that features it to remove it.
|
|
2039
|
+
|
|
2040
|
+
*/
|
|
2032
2041
|
var Clock = function (_a) {
|
|
2033
2042
|
var _b = _a.locale, locale = _b === void 0 ? "en-GB" : _b, props = __rest(_a, ["locale"]);
|
|
2034
2043
|
var _c = useState(new Date()), time = _c[0], setTime = _c[1];
|
|
@@ -2103,7 +2112,7 @@ Columns.Col = Col$1;
|
|
|
2103
2112
|
/**
|
|
2104
2113
|
#### Deprecation Notice
|
|
2105
2114
|
|
|
2106
|
-
The `Curve` component is an outdated brand feature and is being deprecated from Arc as a standalone component or sub-component within other components. Do not use Curve for any new work, and prepare to update any design that features it to remove it.
|
|
2115
|
+
The `Curve` component is an outdated brand feature and is being deprecated from Arc as a standalone component or sub-component within other components. Do not use `Curve` for any new work, and prepare to update any design that features it to remove it.
|
|
2107
2116
|
|
|
2108
2117
|
`Curve` will be removed from Arc in a subsequent release
|
|
2109
2118
|
*/
|
|
@@ -35710,35 +35719,35 @@ var ProgressBar = function (_a) {
|
|
|
35710
35719
|
};
|
|
35711
35720
|
|
|
35712
35721
|
var Error$1 = function () { return (React__default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
35713
|
-
React__default.createElement("g", {
|
|
35722
|
+
React__default.createElement("g", { clipPath: "url(#a)" },
|
|
35714
35723
|
React__default.createElement("path", { d: "m13.06 12 2.845-2.845a.75.75 0 0 0-1.06-1.06L12 10.94 9.155 8.095a.75.75 0 0 0-1.06 1.06L10.939 12l-2.844 2.845a.75.75 0 1 0 1.06 1.06L12 13.061l2.845 2.844a.75.75 0 0 0 1.06-1.06L13.06 12Z", fill: "currentColor" })),
|
|
35715
|
-
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor",
|
|
35724
|
+
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", strokeWidth: "1.333" }),
|
|
35716
35725
|
React__default.createElement("defs", null,
|
|
35717
35726
|
React__default.createElement("clipPath", { id: "a" },
|
|
35718
35727
|
React__default.createElement("rect", { width: "24", height: "24", rx: "12" }))))); };
|
|
35719
35728
|
|
|
35720
35729
|
var Warning = function () { return (React__default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
35721
|
-
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor",
|
|
35722
|
-
React__default.createElement("path", { d: "M12 15.747a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm.004-1.487a.375.375 0 0 0 .375-.375l.001-6.757a.375.375 0 1 0-.75 0l-.001 6.757a.375.375 0 0 0 .375.375Z", fill: "currentColor", stroke: "currentColor",
|
|
35730
|
+
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", strokeWidth: "1.333" }),
|
|
35731
|
+
React__default.createElement("path", { d: "M12 15.747a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm.004-1.487a.375.375 0 0 0 .375-.375l.001-6.757a.375.375 0 1 0-.75 0l-.001 6.757a.375.375 0 0 0 .375.375Z", fill: "currentColor", stroke: "currentColor", strokeWidth: ".3" }))); };
|
|
35723
35732
|
|
|
35724
35733
|
var Complete = function () { return (React__default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
35725
|
-
React__default.createElement("g", {
|
|
35734
|
+
React__default.createElement("g", { clipPath: "url(#a)" },
|
|
35726
35735
|
React__default.createElement("path", { d: "m10.125 16.435-3.53-3.53a.75.75 0 0 1 0-1.06.768.768 0 0 1 1.06 0l2.47 2.47 6.22-6.22a.75.75 0 1 1 1.06 1.06l-7.28 7.28Z", fill: "currentColor" })),
|
|
35727
|
-
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor",
|
|
35736
|
+
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", strokeWidth: "1.333" }),
|
|
35728
35737
|
React__default.createElement("defs", null,
|
|
35729
35738
|
React__default.createElement("clipPath", { id: "a" },
|
|
35730
35739
|
React__default.createElement("rect", { width: "24", height: "24", rx: "12" }))))); };
|
|
35731
35740
|
|
|
35732
35741
|
var Current = function () { return (React__default.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
35733
|
-
React__default.createElement("rect", { x: "0.666667", y: "0.666667", width: "22.6667", height: "22.6667", rx: "11.3333", stroke: "url(#paint0_linear_1_1050)",
|
|
35742
|
+
React__default.createElement("rect", { x: "0.666667", y: "0.666667", width: "22.6667", height: "22.6667", rx: "11.3333", stroke: "url(#paint0_linear_1_1050)", strokeWidth: "1.33333" }),
|
|
35734
35743
|
React__default.createElement("circle", { cx: "12", cy: "12", r: "7", fill: "currentColor" }),
|
|
35735
35744
|
React__default.createElement("defs", null,
|
|
35736
35745
|
React__default.createElement("linearGradient", { id: "paint0_linear_1_1050", x1: "36.6036", y1: "-4.31391e-07", x2: "-12.6036", y2: "24", gradientUnits: "userSpaceOnUse" },
|
|
35737
|
-
React__default.createElement("stop", {
|
|
35738
|
-
React__default.createElement("stop", { offset: "1",
|
|
35746
|
+
React__default.createElement("stop", { stopColor: "#F200F5" }),
|
|
35747
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#1EC8E6" }))))); };
|
|
35739
35748
|
|
|
35740
35749
|
var Todo = function () { return (React__default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
35741
|
-
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor",
|
|
35750
|
+
React__default.createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", strokeWidth: "1.333" }))); };
|
|
35742
35751
|
|
|
35743
35752
|
// export current step as an icon
|
|
35744
35753
|
var ProgressStepperItem = function (_a) {
|
|
@@ -35802,18 +35811,15 @@ var useRadioContext = function () {
|
|
|
35802
35811
|
return context;
|
|
35803
35812
|
};
|
|
35804
35813
|
|
|
35805
|
-
/**
|
|
35806
|
-
* Radio Button component.
|
|
35807
|
-
*/
|
|
35808
35814
|
var RadioButton = forwardRef(function (_a, ref) {
|
|
35809
|
-
var
|
|
35810
|
-
var _c = useRadioContext(), blurEvent = _c.blurEvent, changeEvent = _c.changeEvent, groupDisabled = _c.groupDisabled, checkedValue = _c.checkedValue, labelSize = _c.labelSize, name = _c.name, size = _c.size;
|
|
35815
|
+
var id = _a.id, changeEvent = _a.changeEvent, isDisabled = _a.isDisabled, size = _a.size, labelSize = _a.labelSize, checked = _a.checked, defaultChecked = _a.defaultChecked, radioButtonAlignment = _a.radioButtonAlignment, name = _a.name, blurEvent = _a.blurEvent, value = _a.value, label = _a.label, helper = _a.helper, hideLabel = _a.hideLabel, withMargin = _a.withMargin, props = __rest(_a, ["id", "changeEvent", "isDisabled", "size", "labelSize", "checked", "defaultChecked", "radioButtonAlignment", "name", "blurEvent", "value", "label", "helper", "hideLabel", "withMargin"]);
|
|
35811
35816
|
var surface = useContext(Context$5).surface;
|
|
35812
35817
|
var idLabel = "".concat(id, "-label");
|
|
35813
|
-
var checked = checkedValue === value ? true : false;
|
|
35814
35818
|
return (React__default.createElement("div", __assign({ className: classNames({
|
|
35815
35819
|
"arc-RadioButton": true,
|
|
35816
|
-
"arc-RadioButton--
|
|
35820
|
+
"arc-RadioButton--withMargin": withMargin,
|
|
35821
|
+
"arc-RadioButton--withMarginSmall": withMargin && size === "s",
|
|
35822
|
+
"arc-RadioButton--disabled": isDisabled,
|
|
35817
35823
|
"arc-RadioButton--small": size === "s",
|
|
35818
35824
|
"arc-RadioButton--smallLabel": labelSize === "s",
|
|
35819
35825
|
"arc-RadioButton--onDarkSurface": surface === "dark"
|
|
@@ -35821,14 +35827,26 @@ var RadioButton = forwardRef(function (_a, ref) {
|
|
|
35821
35827
|
React__default.createElement("label", { className: classNames("arc-RadioButton-label", {
|
|
35822
35828
|
"arc-RadioButton-label--alignTop": radioButtonAlignment === "top"
|
|
35823
35829
|
}), htmlFor: id, id: idLabel },
|
|
35824
|
-
React__default.createElement("input", { className: "arc-RadioButton-input", checked:
|
|
35830
|
+
React__default.createElement("input", { className: "arc-RadioButton-input", checked: checked, defaultChecked: defaultChecked, disabled: isDisabled, id: id, name: name, onBlur: blurEvent, onChange: changeEvent, ref: ref, type: "radio", value: value, "aria-checked": checked }),
|
|
35825
35831
|
React__default.createElement("span", { className: classNames({
|
|
35826
35832
|
"arc-RadioButton-label--marginTop": radioButtonAlignment === "top"
|
|
35827
35833
|
}) },
|
|
35828
|
-
label,
|
|
35834
|
+
hideLabel ? React__default.createElement(VisuallyHidden, null, label) : label,
|
|
35829
35835
|
helper && React__default.createElement("span", { className: "arc-RadioButton-helper" }, helper)))));
|
|
35830
35836
|
});
|
|
35831
35837
|
|
|
35838
|
+
/**
|
|
35839
|
+
* Radio Button component.
|
|
35840
|
+
*/
|
|
35841
|
+
var RadioButtonGroupInput = forwardRef(function (_a, ref) {
|
|
35842
|
+
var helper = _a.helper, id = _a.id, isDisabled = _a.isDisabled, label = _a.label, _b = _a.radioButtonAlignment, radioButtonAlignment = _b === void 0 ? "center" : _b, value = _a.value, props = __rest(_a, ["helper", "id", "isDisabled", "label", "radioButtonAlignment", "value"]);
|
|
35843
|
+
var _c = useRadioContext(), blurEvent = _c.blurEvent, changeEvent = _c.changeEvent, groupDisabled = _c.groupDisabled, checkedValue = _c.checkedValue, labelSize = _c.labelSize, name = _c.name, size = _c.size;
|
|
35844
|
+
var isChecked = checkedValue === value ? true : false;
|
|
35845
|
+
var checked = typeof changeEvent !== "function" ? undefined : isChecked;
|
|
35846
|
+
var defaultChecked = typeof changeEvent !== "function" ? isChecked : undefined;
|
|
35847
|
+
return (React__default.createElement(RadioButton, __assign({ withMargin: true, ref: ref, id: id, name: name, helper: helper, isDisabled: isDisabled || groupDisabled, labelSize: labelSize, size: size, radioButtonAlignment: radioButtonAlignment, label: label, defaultChecked: defaultChecked, checked: checked, changeEvent: changeEvent, blurEvent: blurEvent, value: value }, props)));
|
|
35848
|
+
});
|
|
35849
|
+
|
|
35832
35850
|
/**
|
|
35833
35851
|
* Use `RadioGroup` to wrap and control radio buttons and apply default values
|
|
35834
35852
|
*/
|
|
@@ -35836,7 +35854,7 @@ var RadioGroup = function (_a) {
|
|
|
35836
35854
|
var children = _a.children, checkedValue = _a.checkedValue, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, id = _a.id, helper = _a.helper, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, _d = _a.size, size = _d === void 0 ? "l" : _d, props = __rest(_a, ["children", "checkedValue", "isDisabled", "id", "helper", "label", "labelSize", "name", "onBlur", "onChange", "size"]);
|
|
35837
35855
|
useEffect(function () {
|
|
35838
35856
|
React__default.Children.map(children, function (item) {
|
|
35839
|
-
if (item && item.type !==
|
|
35857
|
+
if (item && item.type !== RadioButtonGroupInput) {
|
|
35840
35858
|
throw new Error("Illegal child passed to <RadioGroup />. Ensure to only use <RadioGroup.RadioButton />.");
|
|
35841
35859
|
}
|
|
35842
35860
|
});
|
|
@@ -35854,7 +35872,7 @@ var RadioGroup = function (_a) {
|
|
|
35854
35872
|
React__default.createElement(FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable", helperUnderLabel: true },
|
|
35855
35873
|
React__default.createElement("span", { className: "arc-RadioGroup-radioButtonContainer" }, children)))));
|
|
35856
35874
|
};
|
|
35857
|
-
RadioGroup.RadioButton =
|
|
35875
|
+
RadioGroup.RadioButton = RadioButtonGroupInput;
|
|
35858
35876
|
|
|
35859
35877
|
/**
|
|
35860
35878
|
* Use `Rule` to display a horizontal or vertical rule.
|
|
@@ -39960,7 +39978,11 @@ var defaultContext$2 = { transparent: false };
|
|
|
39960
39978
|
var Context$2 = createContext(defaultContext$2);
|
|
39961
39979
|
var Provider$2 = Context$2.Provider;
|
|
39962
39980
|
/**
|
|
39963
|
-
|
|
39981
|
+
#### Deprecation Notice
|
|
39982
|
+
|
|
39983
|
+
The `SiteHeader` component has been superseded by `SiteHeaderV2` and therefore is being deprecated from Arc and will be removed in a future release.
|
|
39984
|
+
|
|
39985
|
+
Do not use `SiteHeader` for any new work, and prepare to update any design that features it to replace it with `SiteHeaderV2`.
|
|
39964
39986
|
*/
|
|
39965
39987
|
var SiteHeader = function (_a) {
|
|
39966
39988
|
var _b;
|
|
@@ -41716,7 +41738,7 @@ Tabs.Content = TabContent;
|
|
|
41716
41738
|
|
|
41717
41739
|
/** Use `TextArea` to allow custom user text entry via keyboard, for long-form and multi-line descriptions */
|
|
41718
41740
|
var TextArea = forwardRef(function (_a, ref) {
|
|
41719
|
-
var _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, errorMessage = _a.errorMessage, helper = _a.helper, hideLabel = _a.hideLabel, id = _a.id, _c = _a.resize, resize = _c === void 0 ? "manual" : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, _g = _a.showCharacterCount, showCharacterCount = _g === void 0 ? true : _g, label = _a.label, _h = _a.labelSize, labelSize = _h === void 0 ? "l" : _h, maxLength = _a.maxLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onClickDisclosure = _a.onClickDisclosure, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, width = _a.width, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "resize", "isDisabled", "isReadOnly", "isRequired", "showCharacterCount", "label", "labelSize", "maxLength", "name", "onBlur", "onChange", "onClickDisclosure", "value", "disclosureTitle", "disclosureText", "width"]);
|
|
41741
|
+
var _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, errorMessage = _a.errorMessage, helper = _a.helper, hideLabel = _a.hideLabel, id = _a.id, _c = _a.resize, resize = _c === void 0 ? "manual" : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, _g = _a.showCharacterCount, showCharacterCount = _g === void 0 ? true : _g, label = _a.label, _h = _a.labelSize, labelSize = _h === void 0 ? "l" : _h, maxLength = _a.maxLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onClickDisclosure = _a.onClickDisclosure, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, width = _a.width, autoComplete = _a.autoComplete, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "resize", "isDisabled", "isReadOnly", "isRequired", "showCharacterCount", "label", "labelSize", "maxLength", "name", "onBlur", "onChange", "onClickDisclosure", "value", "disclosureTitle", "disclosureText", "width", "autoComplete"]);
|
|
41720
41742
|
var surface = useContext(Context$5).surface;
|
|
41721
41743
|
var ourRef = useRef(null);
|
|
41722
41744
|
var _j = useState((value && value.length) || (defaultValue && defaultValue.length) || 0), characterCount = _j[0], setCharacterCount = _j[1];
|
|
@@ -41751,12 +41773,12 @@ var TextArea = forwardRef(function (_a, ref) {
|
|
|
41751
41773
|
"arc-TextArea--noResize": resize !== "manual",
|
|
41752
41774
|
"arc-TextArea--onDarkSurface": surface === "dark",
|
|
41753
41775
|
"arc-TextArea--invalid": errorMessage
|
|
41754
|
-
}), defaultValue: typeof value !== "undefined" ? undefined : defaultValue, disabled: isDisabled, value: value, readOnly: isReadOnly, maxLength: maxLength, name: name, onChange: handleOnChange, onBlur: onBlur, ref: getTextAreaRef, style: { width: width }, "aria-describedby": "".concat(id, "-helper") })));
|
|
41776
|
+
}), defaultValue: typeof value !== "undefined" ? undefined : defaultValue, disabled: isDisabled, value: value, readOnly: isReadOnly, maxLength: maxLength, name: name, onChange: handleOnChange, onBlur: onBlur, ref: getTextAreaRef, style: { width: width }, "aria-describedby": "".concat(id, "-helper"), autoComplete: autoComplete })));
|
|
41755
41777
|
});
|
|
41756
41778
|
|
|
41757
41779
|
var TextInputComponent = forwardRef(function (_a, ref) {
|
|
41758
41780
|
var _b;
|
|
41759
|
-
var _c = _a.defaultValue, defaultValue = _c === void 0 ? "" : _c, errorMessage = _a.errorMessage, helper = _a.helper, hideLabel = _a.hideLabel, id = _a.id, inputMode = _a.inputMode, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, label = _a.label, _g = _a.labelSize, labelSize = _g === void 0 ? "l" : _g, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, placeholder = _a.placeholder, onClickDisclosure = _a.onClickDisclosure, pattern = _a.pattern, _h = _a.type, type = _h === void 0 ? "text" : _h, _j = _a.showPassword, showPassword = _j === void 0 ? false : _j, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, _k = _a.inputSize, inputSize = _k === void 0 ? "m" : _k, iconButton = _a.iconButton, prefix = _a.prefix, suffix = _a.suffix, _l = _a.inputAlignment, inputAlignment = _l === void 0 ? "left" : _l, width = _a.width, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "labelSize", "maxLength", "minLength", "name", "onBlur", "onChange", "placeholder", "onClickDisclosure", "pattern", "type", "showPassword", "value", "disclosureTitle", "disclosureText", "inputSize", "iconButton", "prefix", "suffix", "inputAlignment", "width"]);
|
|
41781
|
+
var _c = _a.defaultValue, defaultValue = _c === void 0 ? "" : _c, errorMessage = _a.errorMessage, helper = _a.helper, hideLabel = _a.hideLabel, id = _a.id, inputMode = _a.inputMode, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, label = _a.label, _g = _a.labelSize, labelSize = _g === void 0 ? "l" : _g, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, placeholder = _a.placeholder, onClickDisclosure = _a.onClickDisclosure, pattern = _a.pattern, _h = _a.type, type = _h === void 0 ? "text" : _h, _j = _a.showPassword, showPassword = _j === void 0 ? false : _j, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, _k = _a.inputSize, inputSize = _k === void 0 ? "m" : _k, iconButton = _a.iconButton, prefix = _a.prefix, suffix = _a.suffix, _l = _a.inputAlignment, inputAlignment = _l === void 0 ? "left" : _l, width = _a.width, autoComplete = _a.autoComplete, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "labelSize", "maxLength", "minLength", "name", "onBlur", "onChange", "placeholder", "onClickDisclosure", "pattern", "type", "showPassword", "value", "disclosureTitle", "disclosureText", "inputSize", "iconButton", "prefix", "suffix", "inputAlignment", "width", "autoComplete"]);
|
|
41760
41782
|
var surface = useContext(Context$5).surface;
|
|
41761
41783
|
var _m = useState(false), showPasswordToggle = _m[0], setShowPasswordToggle = _m[1];
|
|
41762
41784
|
var inferredInputProps = useNumericInput({
|
|
@@ -41792,7 +41814,7 @@ var TextInputComponent = forwardRef(function (_a, ref) {
|
|
|
41792
41814
|
React__default.createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, isDisabled: isDisabled, label: label, hideLabel: hideLabel, labelSize: labelSize, requirementStatus: isRequired ? "required" : "optional", disclosureTitle: disclosureTitle, disclosureText: disclosureText, onClickDisclosure: onClickDisclosure },
|
|
41793
41815
|
React__default.createElement("div", { className: "arc-TextInput-inputWrapper", style: { width: width } },
|
|
41794
41816
|
prefix && (React__default.createElement("span", { className: "arc-TextInput-prefix", "aria-hidden": true }, prefix)),
|
|
41795
|
-
React__default.createElement("input", __assign({ placeholder: placeholder, "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)),
|
|
41817
|
+
React__default.createElement("input", __assign({ placeholder: placeholder, "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, autoComplete: autoComplete }, inferredInputProps)),
|
|
41796
41818
|
iconButton && !showPassword && (React__default.createElement("div", { className: "arc-TextInput-additionalControl" },
|
|
41797
41819
|
React__default.createElement("button", { ref: iconButton.ref, className: "arc-TextInput-iconButton", disabled: isReadOnly || isDisabled, "aria-label": iconButton.label, onFocus: iconButton.onFocus, onClick: function (e) {
|
|
41798
41820
|
e.preventDefault();
|