@arc-ui/components 11.23.0 → 11.24.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.
- package/dist/Calendar/Calendar.cjs.js +1 -1
- package/dist/Calendar/Calendar.esm.js +1 -1
- package/dist/DatePicker/DatePicker.cjs.js +2 -2
- package/dist/DatePicker/DatePicker.esm.js +2 -2
- package/dist/TextArea/TextArea.cjs.js +3 -3
- package/dist/TextArea/TextArea.esm.js +3 -3
- 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/{TextInput-8912dd41.js → TextInput-8d139489.js} +2 -2
- package/dist/_shared/esm/{Calendar-fafaca6b.js → Calendar-ea232839.js} +2 -2
- package/dist/_shared/esm/{TextInput-5ffa05da.js → TextInput-c0388103.js} +2 -2
- package/dist/index.es.js +4 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Calendar = require('../_shared/cjs/Calendar-
|
|
5
|
+
var Calendar = require('../_shared/cjs/Calendar-b022545c.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('../_shared/cjs/use-media-query-e61881d8.js');
|
|
8
8
|
require('../_shared/cjs/filter-data-attrs-1c9a530c.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Calendar = require('../_shared/cjs/Calendar-
|
|
5
|
+
var Calendar = require('../_shared/cjs/Calendar-b022545c.js');
|
|
6
6
|
var filterDataAttrs = require('../_shared/cjs/filter-data-attrs-1c9a530c.js');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var index$4 = require('../_shared/cjs/index-9947ac13.js');
|
|
@@ -13,7 +13,7 @@ var index$2 = require('../_shared/cjs/index-6eb396a3.js');
|
|
|
13
13
|
var index$1 = require('../_shared/cjs/index-77ab5c6a.js');
|
|
14
14
|
var index$3 = require('../_shared/cjs/index-d38f1bd0.js');
|
|
15
15
|
var Base = require('../_shared/cjs/Base-f5a86eed.js');
|
|
16
|
-
var TextInput = require('../_shared/cjs/TextInput-
|
|
16
|
+
var TextInput = require('../_shared/cjs/TextInput-8d139489.js');
|
|
17
17
|
require('../_shared/cjs/use-media-query-e61881d8.js');
|
|
18
18
|
require('../_shared/cjs/Text-606ca3a2.js');
|
|
19
19
|
require('../_shared/cjs/suffix-modifier-64dcd338.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requiredArgs, t as toDate, i as isValid, f as format, C as Calendar, a as isBefore, b as isAfter, c as compareAsc } from '../_shared/esm/Calendar-
|
|
1
|
+
import { r as requiredArgs, t as toDate, i as isValid, f as format, C as Calendar, a as isBefore, b as isAfter, c as compareAsc } from '../_shared/esm/Calendar-ea232839.js';
|
|
2
2
|
import { b as __spreadArray, _ as __rest, a as __assign } from '../_shared/esm/filter-data-attrs-ea8f4ed4.js';
|
|
3
3
|
import React__default, { useRef, useState, createElement, useCallback, forwardRef, useEffect, useContext } from 'react';
|
|
4
4
|
import { c as classNames } from '../_shared/esm/index-2e73c2e9.js';
|
|
@@ -9,7 +9,7 @@ import { $ as $1746a345f3d73bb7$export$f680877a34711e37 } from '../_shared/esm/i
|
|
|
9
9
|
import { $ as $cf1ac5d9fe0e8206$export$722aac194ae923, a as $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9, b as $cf1ac5d9fe0e8206$export$b688253958b8dfe7, c as $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2 } from '../_shared/esm/index-b84a20c6.js';
|
|
10
10
|
import { $ as $921a889cee6df7e8$export$99c2b779aa4e8b8b } from '../_shared/esm/index-ca72c9d5.js';
|
|
11
11
|
import { A as ArcRootElementContext } from '../_shared/esm/Base-f200653c.js';
|
|
12
|
-
import { T as TextInputWithPlaceHolder } from '../_shared/esm/TextInput-
|
|
12
|
+
import { T as TextInputWithPlaceHolder } from '../_shared/esm/TextInput-c0388103.js';
|
|
13
13
|
import '../_shared/esm/use-media-query-4c807227.js';
|
|
14
14
|
import '../_shared/esm/Text-14f586ac.js';
|
|
15
15
|
import '../_shared/esm/suffix-modifier-3d548e45.js';
|
|
@@ -27,7 +27,7 @@ require('../_shared/cjs/SiteFooter-65b6360c.js');
|
|
|
27
27
|
require('../_shared/cjs/SiteHeader.rehydrator-b76b0889.js');
|
|
28
28
|
require('../_shared/cjs/SiteHeaderV2-ce1c8737.js');
|
|
29
29
|
require('../_shared/cjs/Tabs-bc9fac46.js');
|
|
30
|
-
require('../_shared/cjs/TextInput-
|
|
30
|
+
require('../_shared/cjs/TextInput-8d139489.js');
|
|
31
31
|
require('../_shared/cjs/Toast-26207fef.js');
|
|
32
32
|
require('../_shared/cjs/UniversalHeader-b8389447.js');
|
|
33
33
|
var VisuallyHidden = require('../_shared/cjs/VisuallyHidden-b0de4c7b.js');
|
|
@@ -65,7 +65,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
65
65
|
|
|
66
66
|
/** Use `TextArea` to allow custom user text entry via keyboard, for long-form and multi-line descriptions */
|
|
67
67
|
var TextArea = React.forwardRef(function (_a, ref) {
|
|
68
|
-
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 = filterDataAttrs.__rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "resize", "isDisabled", "isReadOnly", "isRequired", "showCharacterCount", "label", "labelSize", "maxLength", "name", "onBlur", "onChange", "onClickDisclosure", "value", "disclosureTitle", "disclosureText", "width"]);
|
|
68
|
+
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 = filterDataAttrs.__rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "resize", "isDisabled", "isReadOnly", "isRequired", "showCharacterCount", "label", "labelSize", "maxLength", "name", "onBlur", "onChange", "onClickDisclosure", "value", "disclosureTitle", "disclosureText", "width", "autoComplete"]);
|
|
69
69
|
var surface = React.useContext(Surface.Context).surface;
|
|
70
70
|
var ourRef = React.useRef(null);
|
|
71
71
|
var _j = React.useState((value && value.length) || (defaultValue && defaultValue.length) || 0), characterCount = _j[0], setCharacterCount = _j[1];
|
|
@@ -100,7 +100,7 @@ var TextArea = React.forwardRef(function (_a, ref) {
|
|
|
100
100
|
"arc-TextArea--noResize": resize !== "manual",
|
|
101
101
|
"arc-TextArea--onDarkSurface": surface === "dark",
|
|
102
102
|
"arc-TextArea--invalid": errorMessage
|
|
103
|
-
}), 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") })));
|
|
103
|
+
}), 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 })));
|
|
104
104
|
});
|
|
105
105
|
|
|
106
106
|
exports.TextArea = TextArea;
|
|
@@ -23,7 +23,7 @@ import '../_shared/esm/SiteFooter-38ee1536.js';
|
|
|
23
23
|
import '../_shared/esm/SiteHeader.rehydrator-8ad7651b.js';
|
|
24
24
|
import '../_shared/esm/SiteHeaderV2-a7c1b1cb.js';
|
|
25
25
|
import '../_shared/esm/Tabs-9485cab6.js';
|
|
26
|
-
import '../_shared/esm/TextInput-
|
|
26
|
+
import '../_shared/esm/TextInput-c0388103.js';
|
|
27
27
|
import '../_shared/esm/Toast-fcbfc194.js';
|
|
28
28
|
import '../_shared/esm/UniversalHeader-80c7313f.js';
|
|
29
29
|
import { V as VisuallyHidden } from '../_shared/esm/VisuallyHidden-06692fd3.js';
|
|
@@ -57,7 +57,7 @@ import '../_shared/esm/BtIconTick.esm-e265098f.js';
|
|
|
57
57
|
|
|
58
58
|
/** Use `TextArea` to allow custom user text entry via keyboard, for long-form and multi-line descriptions */
|
|
59
59
|
var TextArea = forwardRef(function (_a, ref) {
|
|
60
|
-
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"]);
|
|
60
|
+
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"]);
|
|
61
61
|
var surface = useContext(Context).surface;
|
|
62
62
|
var ourRef = useRef(null);
|
|
63
63
|
var _j = useState((value && value.length) || (defaultValue && defaultValue.length) || 0), characterCount = _j[0], setCharacterCount = _j[1];
|
|
@@ -92,7 +92,7 @@ var TextArea = forwardRef(function (_a, ref) {
|
|
|
92
92
|
"arc-TextArea--noResize": resize !== "manual",
|
|
93
93
|
"arc-TextArea--onDarkSurface": surface === "dark",
|
|
94
94
|
"arc-TextArea--invalid": errorMessage
|
|
95
|
-
}), 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") })));
|
|
95
|
+
}), 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 })));
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
export { TextArea };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var TextInput = require('../_shared/cjs/TextInput-
|
|
5
|
+
var TextInput = require('../_shared/cjs/TextInput-8d139489.js');
|
|
6
6
|
require('../_shared/cjs/filter-data-attrs-1c9a530c.js');
|
|
7
7
|
require('../_shared/cjs/index-9947ac13.js');
|
|
8
8
|
require('react');
|
|
@@ -3626,7 +3626,7 @@ var CalendarNavButton = function (_a) {
|
|
|
3626
3626
|
previous: BtIconChevronLeftMid_esm.BtIconChevronLeftMid,
|
|
3627
3627
|
next: BtIconChevronRightMid_esm.BtIconChevronRightMid
|
|
3628
3628
|
};
|
|
3629
|
-
return (React__default["default"].createElement("button", { "aria-label": ariaLabel, disabled: isDisabled, onClick: onClick, className: index.classNames("arc-CalendarNavButton", {
|
|
3629
|
+
return (React__default["default"].createElement("button", { "aria-label": ariaLabel, disabled: isDisabled, onClick: onClick, type: "button", className: index.classNames("arc-CalendarNavButton", {
|
|
3630
3630
|
"arc-CalendarNavButton--previous": direction === "previous",
|
|
3631
3631
|
"arc-CalendarNavButton--next": direction === "next"
|
|
3632
3632
|
}) },
|
|
@@ -3902,7 +3902,7 @@ var reducer = function (state, action) {
|
|
|
3902
3902
|
var CalendarFooter = function (_a) {
|
|
3903
3903
|
var onCancelClick = _a.onCancelClick;
|
|
3904
3904
|
return (React__default["default"].createElement("div", { className: "arc-CalendarFooter" },
|
|
3905
|
-
React__default["default"].createElement("button", { className: "arc-CalendarFooter-button", onClick: onCancelClick }, "Cancel")));
|
|
3905
|
+
React__default["default"].createElement("button", { type: "button", className: "arc-CalendarFooter-button", onClick: onCancelClick }, "Cancel")));
|
|
3906
3906
|
};
|
|
3907
3907
|
|
|
3908
3908
|
var CalendarWrapper = function (_a) {
|
|
@@ -41,7 +41,7 @@ var useNumericInput = function (props) {
|
|
|
41
41
|
|
|
42
42
|
var TextInputComponent = React.forwardRef(function (_a, ref) {
|
|
43
43
|
var _b;
|
|
44
|
-
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 = filterDataAttrs.__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"]);
|
|
44
|
+
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 = filterDataAttrs.__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"]);
|
|
45
45
|
var surface = React.useContext(Surface.Context).surface;
|
|
46
46
|
var _m = React.useState(false), showPasswordToggle = _m[0], setShowPasswordToggle = _m[1];
|
|
47
47
|
var inferredInputProps = useNumericInput({
|
|
@@ -77,7 +77,7 @@ var TextInputComponent = React.forwardRef(function (_a, ref) {
|
|
|
77
77
|
React__default["default"].createElement(FormControl.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 },
|
|
78
78
|
React__default["default"].createElement("div", { className: "arc-TextInput-inputWrapper", style: { width: width } },
|
|
79
79
|
prefix && (React__default["default"].createElement("span", { className: "arc-TextInput-prefix", "aria-hidden": true }, prefix)),
|
|
80
|
-
React__default["default"].createElement("input", filterDataAttrs.__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)),
|
|
80
|
+
React__default["default"].createElement("input", filterDataAttrs.__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)),
|
|
81
81
|
iconButton && !showPassword && (React__default["default"].createElement("div", { className: "arc-TextInput-additionalControl" },
|
|
82
82
|
React__default["default"].createElement("button", { ref: iconButton.ref, className: "arc-TextInput-iconButton", disabled: isReadOnly || isDisabled, "aria-label": iconButton.label, onFocus: iconButton.onFocus, onClick: function (e) {
|
|
83
83
|
e.preventDefault();
|
|
@@ -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) {
|
|
@@ -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
|
@@ -41716,7 +41716,7 @@ Tabs.Content = TabContent;
|
|
|
41716
41716
|
|
|
41717
41717
|
/** Use `TextArea` to allow custom user text entry via keyboard, for long-form and multi-line descriptions */
|
|
41718
41718
|
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"]);
|
|
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, 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
41720
|
var surface = useContext(Context$5).surface;
|
|
41721
41721
|
var ourRef = useRef(null);
|
|
41722
41722
|
var _j = useState((value && value.length) || (defaultValue && defaultValue.length) || 0), characterCount = _j[0], setCharacterCount = _j[1];
|
|
@@ -41751,12 +41751,12 @@ var TextArea = forwardRef(function (_a, ref) {
|
|
|
41751
41751
|
"arc-TextArea--noResize": resize !== "manual",
|
|
41752
41752
|
"arc-TextArea--onDarkSurface": surface === "dark",
|
|
41753
41753
|
"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") })));
|
|
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"), autoComplete: autoComplete })));
|
|
41755
41755
|
});
|
|
41756
41756
|
|
|
41757
41757
|
var TextInputComponent = forwardRef(function (_a, ref) {
|
|
41758
41758
|
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"]);
|
|
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, 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
41760
|
var surface = useContext(Context$5).surface;
|
|
41761
41761
|
var _m = useState(false), showPasswordToggle = _m[0], setShowPasswordToggle = _m[1];
|
|
41762
41762
|
var inferredInputProps = useNumericInput({
|
|
@@ -41792,7 +41792,7 @@ var TextInputComponent = forwardRef(function (_a, ref) {
|
|
|
41792
41792
|
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
41793
|
React__default.createElement("div", { className: "arc-TextInput-inputWrapper", style: { width: width } },
|
|
41794
41794
|
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)),
|
|
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, autoComplete: autoComplete }, inferredInputProps)),
|
|
41796
41796
|
iconButton && !showPassword && (React__default.createElement("div", { className: "arc-TextInput-additionalControl" },
|
|
41797
41797
|
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
41798
|
e.preventDefault();
|