@arc-ui/components 11.22.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/Alert/Alert.cjs.js +1 -1
- package/dist/Alert/Alert.esm.js +1 -1
- package/dist/Avatar/Avatar.cjs.js +1 -1
- package/dist/Avatar/Avatar.esm.js +1 -1
- package/dist/AvatarGroup/AvatarGroup.cjs.js +2 -1
- package/dist/AvatarGroup/AvatarGroup.esm.js +2 -1
- package/dist/Badge/Badge.cjs.js +1 -1
- package/dist/Badge/Badge.esm.js +1 -1
- package/dist/Button/Button.cjs.js +1 -1
- package/dist/Button/Button.esm.js +1 -1
- package/dist/Calendar/Calendar.cjs.js +2 -2
- package/dist/Calendar/Calendar.esm.js +2 -2
- package/dist/Checkbox/Checkbox.cjs.js +4 -4
- package/dist/Checkbox/Checkbox.esm.js +4 -4
- package/dist/DatePicker/DatePicker.cjs.js +8 -5
- package/dist/DatePicker/DatePicker.esm.js +8 -5
- package/dist/Disclosure/Disclosure.cjs.js +1 -2
- package/dist/Disclosure/Disclosure.esm.js +1 -2
- package/dist/DisclosureMini/DisclosureMini.cjs.js +1 -1
- package/dist/DisclosureMini/DisclosureMini.esm.js +1 -1
- package/dist/Filter/Filter.cjs.js +2 -1
- package/dist/Filter/Filter.esm.js +2 -1
- package/dist/FormControl/FormControl.cjs.js +3 -3
- package/dist/FormControl/FormControl.esm.js +3 -3
- package/dist/Grid/Grid.cjs.js +13 -0
- package/dist/Grid/Grid.esm.js +5 -0
- package/dist/Grid/package.json +7 -0
- package/dist/Hidden/Hidden.cjs.js +24 -0
- package/dist/Hidden/Hidden.esm.js +16 -0
- package/dist/Hidden/package.json +7 -0
- package/dist/ImpactCard/ImpactCard.cjs.js +1 -0
- package/dist/ImpactCard/ImpactCard.esm.js +1 -0
- package/dist/InformationCard/InformationCard.cjs.js +3 -2
- package/dist/InformationCard/InformationCard.esm.js +3 -2
- package/dist/Link/Link.cjs.js +76 -0
- package/dist/Link/Link.esm.js +68 -0
- package/dist/Link/package.json +7 -0
- package/dist/Modal/Modal.cjs.js +3 -3
- package/dist/Modal/Modal.esm.js +3 -3
- package/dist/Pagination/Pagination.cjs.js +1 -1
- package/dist/Pagination/Pagination.esm.js +1 -1
- package/dist/PaginationSimple/PaginationSimple.cjs.js +6 -10
- package/dist/PaginationSimple/PaginationSimple.esm.js +6 -10
- package/dist/ProgressBar/ProgressBar.cjs.js +8 -2
- package/dist/ProgressBar/ProgressBar.esm.js +8 -2
- package/dist/ProgressStepper/ProgressStepper.cjs.js +2 -2
- package/dist/ProgressStepper/ProgressStepper.esm.js +2 -2
- package/dist/RadioGroup/RadioGroup.cjs.js +4 -4
- package/dist/RadioGroup/RadioGroup.esm.js +4 -4
- package/dist/Select/Select.cjs.js +3 -3
- package/dist/Select/Select.esm.js +3 -3
- package/dist/SiteHeader/SiteHeader.cjs.js +2 -2
- package/dist/SiteHeader/SiteHeader.esm.js +2 -2
- package/dist/SiteHeaderV2/SiteHeaderV2.cjs.js +2 -2
- package/dist/SiteHeaderV2/SiteHeaderV2.esm.js +2 -2
- package/dist/SkipLink/SkipLink.cjs.js +1 -0
- package/dist/SkipLink/SkipLink.esm.js +1 -0
- package/dist/Switch/Switch.cjs.js +4 -4
- package/dist/Switch/Switch.esm.js +4 -4
- package/dist/Tabs/Tabs.cjs.js +1 -1
- package/dist/Tabs/Tabs.esm.js +1 -1
- package/dist/Tag/Tag.cjs.js +1 -1
- package/dist/Tag/Tag.esm.js +1 -1
- package/dist/TextArea/TextArea.cjs.js +16 -15
- package/dist/TextArea/TextArea.esm.js +16 -15
- package/dist/TextInput/TextInput.cjs.js +4 -4
- package/dist/TextInput/TextInput.esm.js +4 -4
- package/dist/Toast/Toast.cjs.js +1 -1
- package/dist/Toast/Toast.esm.js +1 -1
- package/dist/TypographyCard/TypographyCard.cjs.js +1 -0
- package/dist/TypographyCard/TypographyCard.esm.js +1 -0
- package/dist/Visible/Visible.cjs.js +24 -0
- package/dist/Visible/Visible.esm.js +16 -0
- package/dist/Visible/package.json +7 -0
- package/dist/VisuallyHidden/VisuallyHidden.cjs.js +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.esm.js +1 -1
- package/dist/_shared/cjs/{Avatar-12ece0dd.js → Avatar-f1b1c129.js} +1 -0
- package/dist/_shared/cjs/{Button-84533dc8.js → Button-6ba21d3b.js} +1 -1
- package/dist/_shared/cjs/{Calendar-c6ed5f2c.js → Calendar-b022545c.js} +4 -3
- package/dist/_shared/cjs/{Checkbox-8915fcd9.js → Checkbox-0253327b.js} +2 -2
- package/dist/_shared/cjs/{DisclosureMini-d0eeb6bb.js → DisclosureMini-09c749e5.js} +1 -2
- package/dist/_shared/cjs/{Filter-f4b73f5d.js → Filter-f9506dfa.js} +6 -2
- package/dist/_shared/cjs/{FormControl-5f3b6ce4.js → FormControl-68258ce1.js} +2 -2
- package/dist/_shared/cjs/Grid-da776e77.js +45 -0
- package/dist/_shared/cjs/{ProgressStepper-20a61620.js → ProgressStepper-57cfef1e.js} +3 -3
- package/dist/_shared/cjs/{RadioGroup-07bb155e.js → RadioGroup-85eda600.js} +2 -2
- package/dist/_shared/cjs/{SiteHeader.rehydrator-ea49f8d5.js → SiteHeader.rehydrator-b76b0889.js} +1 -1
- package/dist/_shared/cjs/{SiteHeaderV2-e0735a9d.js → SiteHeaderV2-ce1c8737.js} +1 -1
- package/dist/_shared/cjs/{Tabs-24e6f45b.js → Tabs-bc9fac46.js} +1 -0
- package/dist/_shared/cjs/{Tag-8723b324.js → Tag-73a59171.js} +5 -5
- package/dist/_shared/cjs/{TextInput-5da70ec2.js → TextInput-8d139489.js} +7 -7
- package/dist/_shared/cjs/{Toast-7a20d1b9.js → Toast-26207fef.js} +1 -1
- package/dist/_shared/cjs/{VisuallyHidden-e2c8b291.js → VisuallyHidden-b0de4c7b.js} +1 -1
- package/dist/_shared/esm/{Avatar-d01e2b7b.js → Avatar-320313f0.js} +1 -0
- package/dist/_shared/esm/{Button-3f294e64.js → Button-a7d134c6.js} +1 -1
- package/dist/_shared/esm/{Calendar-753ef6f1.js → Calendar-ea232839.js} +4 -3
- package/dist/_shared/esm/{Checkbox-0e051546.js → Checkbox-588619c7.js} +2 -2
- package/dist/_shared/esm/{DisclosureMini-ec17b008.js → DisclosureMini-56719716.js} +1 -2
- package/dist/_shared/esm/{Filter-ad254e3d.js → Filter-258ba675.js} +6 -2
- package/dist/_shared/esm/{FormControl-cc99cde0.js → FormControl-8e836656.js} +2 -2
- package/dist/_shared/esm/Grid-07dbf4bd.js +39 -0
- package/dist/_shared/esm/{ProgressStepper-74d48612.js → ProgressStepper-6c811282.js} +3 -3
- package/dist/_shared/esm/{RadioGroup-362be63f.js → RadioGroup-6c8f8454.js} +2 -2
- package/dist/_shared/esm/{SiteHeader.rehydrator-65c8cf71.js → SiteHeader.rehydrator-8ad7651b.js} +1 -1
- package/dist/_shared/esm/{SiteHeaderV2-c74b811b.js → SiteHeaderV2-a7c1b1cb.js} +1 -1
- package/dist/_shared/esm/{Tabs-a85af483.js → Tabs-9485cab6.js} +1 -0
- package/dist/_shared/esm/{Tag-664b85c8.js → Tag-cb35d57b.js} +5 -5
- package/dist/_shared/esm/{TextInput-1d1c5fd6.js → TextInput-c0388103.js} +7 -7
- package/dist/_shared/esm/{Toast-7a232e15.js → Toast-fcbfc194.js} +1 -1
- package/dist/_shared/esm/{VisuallyHidden-b9eebf71.js → VisuallyHidden-06692fd3.js} +1 -1
- package/dist/index.es.js +170 -47
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +173 -46
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3 -3
- package/dist/types/components/Alert/Alert.d.ts +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +1 -0
- package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +1 -0
- package/dist/types/components/Badge/Badge.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +1 -1
- package/dist/types/components/Calendar/Calendar.d.ts +1 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +3 -0
- package/dist/types/components/Disclosure/Disclosure.d.ts +1 -2
- package/dist/types/components/DisclosureMini/DisclosureMini.d.ts +1 -2
- package/dist/types/components/Filter/Filter.d.ts +1 -1
- package/dist/types/components/Filter/FilterItems/FilterItems.d.ts +4 -1
- package/dist/types/components/Grid/Grid.constants.d.ts +1 -0
- package/dist/types/components/Grid/Grid.d.ts +28 -0
- package/dist/types/components/Grid/Grid.types.d.ts +8 -0
- package/dist/types/components/Grid/components/Col/Col.d.ts +9 -0
- package/dist/types/components/Grid/components/Col/index.d.ts +1 -0
- package/dist/types/components/Grid/components/Row/Row.d.ts +9 -0
- package/dist/types/components/Grid/components/Row/index.d.ts +1 -0
- package/dist/types/components/Grid/index.d.ts +2 -0
- package/dist/types/components/Hidden/Hidden.d.ts +11 -0
- package/dist/types/components/Hidden/index.d.ts +1 -0
- package/dist/types/components/ImpactCard/ImpactCard.d.ts +1 -0
- package/dist/types/components/InformationCard/InformationCard.d.ts +1 -0
- package/dist/types/components/Link/Link.d.ts +52 -0
- package/dist/types/components/Link/index.d.ts +1 -0
- package/dist/types/components/Modal/Modal.d.ts +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +1 -1
- package/dist/types/components/PaginationSimple/PaginationSimple.d.ts +12 -4
- package/dist/types/components/ProgressBar/ProgressBar.d.ts +4 -0
- package/dist/types/components/ProgressStepper/ProgressStepper.d.ts +1 -1
- package/dist/types/components/SkipLink/SkipLink.d.ts +1 -0
- package/dist/types/components/Switch/Switch.d.ts +1 -1
- package/dist/types/components/Tabs/Tabs.d.ts +1 -0
- package/dist/types/components/Tag/Tag.d.ts +5 -1
- package/dist/types/components/TextArea/TextArea.d.ts +5 -0
- package/dist/types/components/TextInput/TextInput.d.ts +8 -0
- package/dist/types/components/Toast/Toast.d.ts +1 -1
- package/dist/types/components/TypographyCard/TypographyCard.d.ts +1 -0
- package/dist/types/components/Visible/Visible.d.ts +11 -0
- package/dist/types/components/Visible/index.d.ts +1 -0
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/styles.d.ts +4 -0
- package/dist/types/types/auto-complete-types.d.ts +1 -0
- package/package.json +3 -3
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var filterDataAttrs = require('./filter-data-attrs-1c9a530c.js');
|
|
4
4
|
var index = require('./index-9947ac13.js');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var FormControl = require('./FormControl-
|
|
6
|
+
var FormControl = require('./FormControl-68258ce1.js');
|
|
7
7
|
var Surface = require('./Surface-038db6e1.js');
|
|
8
|
-
var VisuallyHidden = require('./VisuallyHidden-
|
|
8
|
+
var VisuallyHidden = require('./VisuallyHidden-b0de4c7b.js');
|
|
9
9
|
var Icon = require('./Icon-b46897a3.js');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -39,12 +39,9 @@ var useNumericInput = function (props) {
|
|
|
39
39
|
return { inputMode: inputMode, pattern: pattern, type: type };
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
/**
|
|
43
|
-
* Use `TextInput` to allow custom user text entry with a keyboard.
|
|
44
|
-
*/
|
|
45
42
|
var TextInputComponent = React.forwardRef(function (_a, ref) {
|
|
46
43
|
var _b;
|
|
47
|
-
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"]);
|
|
48
45
|
var surface = React.useContext(Surface.Context).surface;
|
|
49
46
|
var _m = React.useState(false), showPasswordToggle = _m[0], setShowPasswordToggle = _m[1];
|
|
50
47
|
var inferredInputProps = useNumericInput({
|
|
@@ -80,7 +77,7 @@ var TextInputComponent = React.forwardRef(function (_a, ref) {
|
|
|
80
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 },
|
|
81
78
|
React__default["default"].createElement("div", { className: "arc-TextInput-inputWrapper", style: { width: width } },
|
|
82
79
|
prefix && (React__default["default"].createElement("span", { className: "arc-TextInput-prefix", "aria-hidden": true }, prefix)),
|
|
83
|
-
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)),
|
|
84
81
|
iconButton && !showPassword && (React__default["default"].createElement("div", { className: "arc-TextInput-additionalControl" },
|
|
85
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) {
|
|
86
83
|
e.preventDefault();
|
|
@@ -96,6 +93,9 @@ var TextInputComponent = React.forwardRef(function (_a, ref) {
|
|
|
96
93
|
? "Your password is shown"
|
|
97
94
|
: "Your password is hidden")))))))));
|
|
98
95
|
});
|
|
96
|
+
/**
|
|
97
|
+
* Use `TextInput` to allow users to enter short form text.
|
|
98
|
+
*/
|
|
99
99
|
var TextInput = React.forwardRef(function (props, ref) { return React__default["default"].createElement(TextInputComponent, filterDataAttrs.__assign({ ref: ref }, props)); });
|
|
100
100
|
var TextInputWithPlaceHolder = React.forwardRef(function (props, ref) { return React__default["default"].createElement(TextInputComponent, filterDataAttrs.__assign({ ref: ref }, props)); });
|
|
101
101
|
|
|
@@ -958,7 +958,7 @@ var ToastNotification = function (_a) {
|
|
|
958
958
|
React__default["default"].createElement(Icon.Icon, { icon: BtIconCrossAlt2Px_esm.BtIconCrossAlt2Px, size: 24 }))))));
|
|
959
959
|
};
|
|
960
960
|
|
|
961
|
-
/** Use `Toast` to display temporary messages at the bottom of the
|
|
961
|
+
/** Use `Toast` to display temporary messages at the bottom of the screen. */
|
|
962
962
|
var Toast = function (_a) {
|
|
963
963
|
var children = _a.children, _b = _a.colorScheme, colorScheme = _b === void 0 ? "default" : _b, props = filterDataAttrs.__rest(_a, ["children", "colorScheme"]);
|
|
964
964
|
return (React__default["default"].createElement($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: "right", duration: 6000 },
|
|
@@ -7,7 +7,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
7
7
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Use `VisuallyHidden` to provide text for screen readers that is visually hidden on screen.
|
|
11
11
|
*/
|
|
12
12
|
var VisuallyHidden = function (_a) {
|
|
13
13
|
var children = _a.children;
|
|
@@ -47,6 +47,7 @@ var AvatarContent = function (_a) {
|
|
|
47
47
|
return React__default.createElement(Icon, { size: iconSize[size], icon: BtIconUser });
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
+
/** Use `Avatar` to visually represent a user. */
|
|
50
51
|
var Avatar = function (_a) {
|
|
51
52
|
var img = _a.img, initials = _a.initials, href = _a.href, title = _a.title, ariaLabel = _a.ariaLabel, onClick = _a.onClick, _b = _a.size, size = _b === void 0 ? "xl" : _b, props = __rest(_a, ["img", "initials", "href", "title", "ariaLabel", "onClick", "size"]);
|
|
52
53
|
var wrapperAttrs = __assign({ className: classNames("arc-Avatar", "arc-Avatar--".concat(size), {
|
|
@@ -8,7 +8,7 @@ import { I as Icon } from './Icon-15799695.js';
|
|
|
8
8
|
import { C as Context } from './Surface-0ca6817d.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Use `Button` to
|
|
11
|
+
* Use `Button` to let a user complete an action like ‘Log in’ or ‘Register’.
|
|
12
12
|
*/
|
|
13
13
|
var Button = forwardRef(function (_a, ref) {
|
|
14
14
|
var _b;
|
|
@@ -3,7 +3,7 @@ import { u as useMediaQuery, A as ArcBreakpointM } from './use-media-query-4c807
|
|
|
3
3
|
import { b as __spreadArray, a as __assign } from './filter-data-attrs-ea8f4ed4.js';
|
|
4
4
|
import { c as classNames } from './index-2e73c2e9.js';
|
|
5
5
|
import { T as Text } from './Text-14f586ac.js';
|
|
6
|
-
import { V as VisuallyHidden } from './VisuallyHidden-
|
|
6
|
+
import { V as VisuallyHidden } from './VisuallyHidden-06692fd3.js';
|
|
7
7
|
import { S as Surface } from './Surface-0ca6817d.js';
|
|
8
8
|
import { H as Heading } from './Heading-d16e0e53.js';
|
|
9
9
|
import { B as BtIconChevronLeftMid } from './BtIconChevronLeftMid.esm-1ed8330b.js';
|
|
@@ -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) {
|
|
@@ -3906,6 +3906,7 @@ var CalendarWrapper = function (_a) {
|
|
|
3906
3906
|
React__default.createElement("div", { className: "arc-CalendarWrapper-inner" }, children))));
|
|
3907
3907
|
};
|
|
3908
3908
|
|
|
3909
|
+
/** Use `Calendar` to clearly present available dates and allowing users to choose a way to enter information. */
|
|
3909
3910
|
var Calendar = function (_a) {
|
|
3910
3911
|
var _b = _a.type, type = _b === void 0 ? "month" : _b, _c = _a.selectionType, selectionType = _c === void 0 ? "single" : _c, _d = _a.autoFocusOnMount, autoFocusOnMount = _d === void 0 ? false : _d, _e = _a.selectedRange, rawSelectedRange = _e === void 0 ? [] : _e, _f = _a.selectedDate, rawSelectedDate = _f === void 0 ? new Date() : _f, rawDisabledDates = _a.disabledDates, rawMinDate = _a.minDate, rawMaxDate = _a.maxDate, onCancelClick = _a.onCancelClick, onDateSelect = _a.onDateSelect, onRangeSelect = _a.onRangeSelect;
|
|
3911
3912
|
var todayDate = dateWithoutTime(new Date());
|
|
@@ -3,7 +3,7 @@ import React__default, { forwardRef, useContext } from 'react';
|
|
|
3
3
|
import { B as BtIconTickAlt2Px } from './BtIconTickAlt2Px.esm-0bc2ded0.js';
|
|
4
4
|
import { B as BtIconAlert } from './BtIconAlert.esm-a4608d47.js';
|
|
5
5
|
import { c as classNames } from './index-2e73c2e9.js';
|
|
6
|
-
import { C as Context, u as useAriaDescribedby } from './FormControl-
|
|
6
|
+
import { C as Context, u as useAriaDescribedby } from './FormControl-8e836656.js';
|
|
7
7
|
import { C as Context$1 } from './Surface-0ca6817d.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -38,7 +38,7 @@ var Checkbox = forwardRef(function (_a, ref) {
|
|
|
38
38
|
React__default.createElement("label", { id: idLabel, htmlFor: id, className: classNames("arc-Checkbox-label", {
|
|
39
39
|
"arc-Checkbox-label--top": checkboxAlignment === "top"
|
|
40
40
|
}) },
|
|
41
|
-
React__default.createElement("input", __assign({ "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", className: "arc-Checkbox-input" }, checkedProps, { disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref: ref, required: isRequired, type: "checkbox", value: value }, filterDataAttrs(props))),
|
|
41
|
+
React__default.createElement("input", __assign({ "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", "aria-checked": checked ? "true" : "false", className: "arc-Checkbox-input" }, checkedProps, { disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref: ref, required: isRequired, type: "checkbox", value: value }, filterDataAttrs(props))),
|
|
42
42
|
React__default.createElement("span", { className: "arc-Checkbox-box" },
|
|
43
43
|
React__default.createElement(BtIconTickAlt2Px, null)),
|
|
44
44
|
React__default.createElement("span", __assign({}, (checkboxAlignment === "top" && {
|
|
@@ -6,8 +6,7 @@ import { T as Text } from './Text-14f586ac.js';
|
|
|
6
6
|
import { C as Context } from './Surface-0ca6817d.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Use `DisclosureMini` to
|
|
10
|
-
* an "open" state.
|
|
9
|
+
* Use `DisclosureMini` to show and hide sections of content.
|
|
11
10
|
*/
|
|
12
11
|
var DisclosureMini = function (_a) {
|
|
13
12
|
var children = _a.children, summary = _a.summary, onClick = _a.onClick, id = _a.id, _b = _a.isOpen, isOpen = _b === void 0 ? false : _b, _c = _a.iconPosition, iconPosition = _c === void 0 ? "left" : _c, _d = _a.size, size = _d === void 0 ? "l" : _d, props = __rest(_a, ["children", "summary", "onClick", "id", "isOpen", "iconPosition", "size"]);
|
|
@@ -2,6 +2,7 @@ import { _ as __rest, a as __assign, f as filterDataAttrs, b as __spreadArray }
|
|
|
2
2
|
import React__default, { useContext, useState, useEffect } from 'react';
|
|
3
3
|
import { C as Context } from './Surface-0ca6817d.js';
|
|
4
4
|
import { c as classNames } from './index-2e73c2e9.js';
|
|
5
|
+
import { V as VisuallyHidden } from './VisuallyHidden-06692fd3.js';
|
|
5
6
|
|
|
6
7
|
var FilterControl = function (_a) {
|
|
7
8
|
var children = _a.children, onClick = _a.onClick, _b = _a.isSelected, isSelected = _b === void 0 ? false : _b;
|
|
@@ -15,7 +16,10 @@ var FilterControl = function (_a) {
|
|
|
15
16
|
"arc-FilterControl--onDarkSurface": surface === "dark",
|
|
16
17
|
"arc-FilterControl--selected": selected
|
|
17
18
|
}), onClick: onClickHandler, tabIndex: 0, "aria-pressed": selected },
|
|
18
|
-
React__default.createElement("div", { className: "arc-FilterControl-text" },
|
|
19
|
+
React__default.createElement("div", { className: "arc-FilterControl-text" },
|
|
20
|
+
React__default.createElement(VisuallyHidden, null, "Filter by"),
|
|
21
|
+
" ",
|
|
22
|
+
children)));
|
|
19
23
|
};
|
|
20
24
|
|
|
21
25
|
var FilterControls = function (_a) {
|
|
@@ -48,7 +52,7 @@ var FilterItems = function (_a) {
|
|
|
48
52
|
: children))) : (React__default.createElement("div", { "aria-live": "assertive" }, error));
|
|
49
53
|
};
|
|
50
54
|
|
|
51
|
-
/**
|
|
55
|
+
/** Use `Filter` to filter and categorise page content. */
|
|
52
56
|
var Filter = function (_a) {
|
|
53
57
|
var children = _a.children, onChange = _a.onChange, displayType = _a.displayType, controlsAlignment = _a.controlsAlignment, _b = _a.logicType, logicType = _b === void 0 ? "OR" : _b, error = _a.error, props = __rest(_a, ["children", "onChange", "displayType", "controlsAlignment", "logicType", "error"]);
|
|
54
58
|
var _c = useState([]), selectedControls = _c[0], setSelectedControls = _c[1];
|
|
@@ -3,8 +3,8 @@ import { c as classNames } from './index-2e73c2e9.js';
|
|
|
3
3
|
import React__default, { createContext, useContext } from 'react';
|
|
4
4
|
import { B as BtIconAlert } from './BtIconAlert.esm-a4608d47.js';
|
|
5
5
|
import { C as Context$1 } from './Surface-0ca6817d.js';
|
|
6
|
-
import { D as DisclosureMini } from './DisclosureMini-
|
|
7
|
-
import { V as VisuallyHidden } from './VisuallyHidden-
|
|
6
|
+
import { D as DisclosureMini } from './DisclosureMini-56719716.js';
|
|
7
|
+
import { V as VisuallyHidden } from './VisuallyHidden-06692fd3.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Optionally define ariaDescribedBy if errorMessage or helper exist.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { a as __assign, f as filterDataAttrs, _ as __rest } from './filter-data-attrs-ea8f4ed4.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { c as classNames } from './index-2e73c2e9.js';
|
|
4
|
+
import { s as suffixModifier } from './suffix-modifier-3d548e45.js';
|
|
5
|
+
|
|
6
|
+
var BREAKPOINTS = ["xs", "s", "m", "l", "xl"];
|
|
7
|
+
|
|
8
|
+
var Col = function (props) {
|
|
9
|
+
return (React__default.createElement("div", __assign({ className: classNames("arc-Grid-col", BREAKPOINTS.reduce(function (acc, bp) {
|
|
10
|
+
var _a;
|
|
11
|
+
var _b, _c;
|
|
12
|
+
var sizeValue = props === null || props === void 0 ? void 0 : props[bp];
|
|
13
|
+
var orderValue = (_b = props.order) === null || _b === void 0 ? void 0 : _b[bp];
|
|
14
|
+
var offsetValue = (_c = props.offset) === null || _c === void 0 ? void 0 : _c[bp];
|
|
15
|
+
return __assign(__assign({}, acc), (_a = {}, _a["arc-Grid-col--".concat(bp).concat(sizeValue)] = sizeValue !== undefined, _a["arc-Grid-order--".concat(bp).concat(orderValue)] = orderValue !== undefined, _a["arc-Grid-offset--".concat(bp).concat(offsetValue)] = offsetValue !== undefined, _a));
|
|
16
|
+
}, {})) }, filterDataAttrs(props)), props.children));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
var Row = function (_a) {
|
|
20
|
+
var _b = _a.direction, direction = _b === void 0 ? "row" : _b, _c = _a.align, align = _c === void 0 ? "normal" : _c, _d = _a.justify, justify = _d === void 0 ? "normal" : _d, children = _a.children, props = __rest(_a, ["direction", "align", "justify", "children"]);
|
|
21
|
+
return (React__default.createElement("div", __assign({ className: classNames("arc-Grid-row", "".concat(suffixModifier("arc-Grid-row--direction", direction)), "".concat(suffixModifier("arc-Grid-row--justify", justify)), "".concat(suffixModifier("arc-Grid-row--align", align))) }, filterDataAttrs(props)), children));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Use `Grid` to compose layouts on a 12-column grid.
|
|
26
|
+
*/
|
|
27
|
+
var Grid = function (_a) {
|
|
28
|
+
var children = _a.children, isFluid = _a.isFluid, isDebugVisible = _a.isDebugVisible, isGutterless = _a.isGutterless, props = __rest(_a, ["children", "isFluid", "isDebugVisible", "isGutterless"]);
|
|
29
|
+
return (React__default.createElement("div", __assign({ className: classNames("arc-Grid", {
|
|
30
|
+
"arc-Grid--fluid": isFluid,
|
|
31
|
+
"arc-Grid--debugVisible": isDebugVisible,
|
|
32
|
+
"arc-Grid--gutterless": isGutterless
|
|
33
|
+
}) }, filterDataAttrs(props)),
|
|
34
|
+
React__default.createElement("div", { className: "arc-Grid-inner" }, children)));
|
|
35
|
+
};
|
|
36
|
+
Grid.Row = Row;
|
|
37
|
+
Grid.Col = Col;
|
|
38
|
+
|
|
39
|
+
export { Grid as G };
|
|
@@ -3,7 +3,7 @@ import React__default, { useContext } from 'react';
|
|
|
3
3
|
import { c as classNames } from './index-2e73c2e9.js';
|
|
4
4
|
import { I as Icon } from './Icon-15799695.js';
|
|
5
5
|
import { C as Context } from './Surface-0ca6817d.js';
|
|
6
|
-
import { V as VisuallyHidden } from './VisuallyHidden-
|
|
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
9
|
React__default.createElement("g", { "clip-path": "url(#a)" },
|
|
@@ -70,13 +70,13 @@ var ProgressStepperItem = function (_a) {
|
|
|
70
70
|
status !== "todo" && (React__default.createElement(VisuallyHidden, null,
|
|
71
71
|
capitaliseFirstLetter(status),
|
|
72
72
|
":")),
|
|
73
|
-
titleHref ? (React__default.createElement("a", { href: titleHref, "aria-label": ariaLabel, className: classNames("arc-ProgressStepperItem-title", "arc-ProgressStepperItem-title--link"), onClick: onClickHandler }, title)) : (React__default.createElement("div", { className: "arc-ProgressStepperItem-title" }, title)),
|
|
73
|
+
titleHref || onClick ? (React__default.createElement("a", { role: !titleHref && onClick ? "button" : undefined, href: titleHref, "aria-label": ariaLabel, className: classNames("arc-ProgressStepperItem-title", "arc-ProgressStepperItem-title--link"), onClick: onClickHandler }, title)) : (React__default.createElement("div", { className: "arc-ProgressStepperItem-title" }, title)),
|
|
74
74
|
React__default.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle),
|
|
75
75
|
stepContent && !isStepContentHidden && direction === "vertical" && (React__default.createElement(React__default.Fragment, null,
|
|
76
76
|
React__default.createElement("div", { className: "arc-ProgressStepperItem-nodeItem" }, stepContent))))));
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
/** Use `ProgressStepper` to
|
|
79
|
+
/** Use `ProgressStepper` to provide an overview of a series of steps in a digital journey. */
|
|
80
80
|
var ProgressStepper = function (_a) {
|
|
81
81
|
var children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, props = __rest(_a, ["children", "size", "isFluid", "direction", "isExpandable"]);
|
|
82
82
|
var items = React__default.Children.toArray(children);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from './filter-data-attrs-ea8f4ed4.js';
|
|
2
2
|
import React__default, { createContext, useContext, forwardRef, useEffect } from 'react';
|
|
3
|
-
import { F as FormControl } from './FormControl-
|
|
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
6
|
|
|
@@ -30,7 +30,7 @@ var RadioButton = forwardRef(function (_a, ref) {
|
|
|
30
30
|
React__default.createElement("label", { className: classNames("arc-RadioButton-label", {
|
|
31
31
|
"arc-RadioButton-label--alignTop": radioButtonAlignment === "top"
|
|
32
32
|
}), htmlFor: id, id: idLabel },
|
|
33
|
-
React__default.createElement("input", { className: "arc-RadioButton-input", checked: typeof changeEvent !== "function" ? undefined : checked, defaultChecked: typeof changeEvent !== "function" ? checked : undefined, disabled: isDisabled || groupDisabled, id: id, name: name, onBlur: blurEvent, onChange: changeEvent, ref: ref, type: "radio", value: value }),
|
|
33
|
+
React__default.createElement("input", { className: "arc-RadioButton-input", checked: typeof changeEvent !== "function" ? undefined : checked, defaultChecked: typeof changeEvent !== "function" ? checked : undefined, disabled: isDisabled || groupDisabled, id: id, name: name, onBlur: blurEvent, onChange: changeEvent, ref: ref, type: "radio", value: value, "aria-checked": checked }),
|
|
34
34
|
React__default.createElement("span", { className: classNames({
|
|
35
35
|
"arc-RadioButton-label--marginTop": radioButtonAlignment === "top"
|
|
36
36
|
}) },
|
package/dist/_shared/esm/{SiteHeader.rehydrator-65c8cf71.js → SiteHeader.rehydrator-8ad7651b.js}
RENAMED
|
@@ -7,7 +7,7 @@ import { h as handleLinkClick } from './handle-link-click-f64f55a2.js';
|
|
|
7
7
|
import { a as BtIconChevronRight2Px, B as BtIconChevronLeft2Px } from './BtIconChevronRight2Px.esm-75e92636.js';
|
|
8
8
|
import { S as Surface } from './Surface-0ca6817d.js';
|
|
9
9
|
import { B as BrandLogo } from './BrandLogo-1af78f76.js';
|
|
10
|
-
import { B as Button } from './Button-
|
|
10
|
+
import { B as Button } from './Button-a7d134c6.js';
|
|
11
11
|
import { s as suffixModifier } from './suffix-modifier-3d548e45.js';
|
|
12
12
|
import { T as Text } from './Text-14f586ac.js';
|
|
13
13
|
|
|
@@ -8,7 +8,7 @@ import { h as handleLinkClick } from './handle-link-click-f64f55a2.js';
|
|
|
8
8
|
import { B as BtIconChevronRightMid } from './BtIconChevronRightMid.esm-32268f1a.js';
|
|
9
9
|
import { C as ConditionalWrapper } from './ConditionalWrapper-59be8f35.js';
|
|
10
10
|
import { B as BtIconChevronLeft2Px, a as BtIconChevronRight2Px } from './BtIconChevronRight2Px.esm-75e92636.js';
|
|
11
|
-
import { B as Button } from './Button-
|
|
11
|
+
import { B as Button } from './Button-a7d134c6.js';
|
|
12
12
|
import { s as suffixModifier } from './suffix-modifier-3d548e45.js';
|
|
13
13
|
import { T as Text } from './Text-14f586ac.js';
|
|
14
14
|
import { I as Icon } from './Icon-15799695.js';
|
|
@@ -464,6 +464,7 @@ var TabsList = function (_a) {
|
|
|
464
464
|
React__default.createElement(Icon, { icon: BtIconArrowRightFill, size: 40, color: "brand" })))));
|
|
465
465
|
};
|
|
466
466
|
|
|
467
|
+
/** Use `Tabs` to allow users to navigate between different sections of relevant content. */
|
|
467
468
|
var Tabs = function (_a) {
|
|
468
469
|
var children = _a.children, defaultValue = _a.defaultValue, onValueChange = _a.onValueChange, activationMode = _a.activationMode, props = __rest(_a, ["children", "defaultValue", "onValueChange", "activationMode"]);
|
|
469
470
|
return (React__default.createElement($69cb30bb0017df05$export$be92b6f5f03c0fe9, __assign({ className: "arc-Tabs-root", defaultValue: defaultValue, onValueChange: onValueChange, activationMode: activationMode }, filterDataAttrs(props)), children));
|
|
@@ -43,10 +43,10 @@ const BtIconCrossFill = (props) =>
|
|
|
43
43
|
);
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Use `Tag` to promote features and manage filtering.
|
|
47
47
|
*/
|
|
48
48
|
var Tag = function (_a) {
|
|
49
|
-
var children = _a.children, isRemovable = _a.isRemovable, link = _a.link, icon = _a.icon, onClick = _a.onClick, onRemove = _a.onRemove, props = __rest(_a, ["children", "isRemovable", "link", "icon", "onClick", "onRemove"]);
|
|
49
|
+
var children = _a.children, isRemovable = _a.isRemovable, link = _a.link, icon = _a.icon, onClick = _a.onClick, onRemove = _a.onRemove, title = _a.title, props = __rest(_a, ["children", "isRemovable", "link", "icon", "onClick", "onRemove", "title"]);
|
|
50
50
|
var surface = useContext(Context).surface;
|
|
51
51
|
var _b = useState(false), isRemoved = _b[0], setIsRemoved = _b[1];
|
|
52
52
|
var onRemoveHandler = function () {
|
|
@@ -63,13 +63,13 @@ var Tag = function (_a) {
|
|
|
63
63
|
link ? (React__default.createElement("a", { className: "arc-Tag-content", href: link, tabIndex: 0 },
|
|
64
64
|
icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
|
|
65
65
|
React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
|
|
66
|
-
React__default.createElement("div", { className: "arc-Tag-label" }, children))) : (React__default.createElement(React__default.Fragment, null, onClick ? (React__default.createElement("button", { className: "arc-Tag-content", onClick: onClick, "data-testid": "arc-Tag-content" },
|
|
66
|
+
React__default.createElement("div", { className: "arc-Tag-label", title: title }, children))) : (React__default.createElement(React__default.Fragment, null, onClick ? (React__default.createElement("button", { className: "arc-Tag-content", onClick: onClick, "data-testid": "arc-Tag-content" },
|
|
67
67
|
icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
|
|
68
68
|
React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
|
|
69
|
-
React__default.createElement("div", { className: "arc-Tag-label" }, children))) : (React__default.createElement("div", { className: "arc-Tag-content", "data-testid": "arc-Tag-content" },
|
|
69
|
+
React__default.createElement("div", { className: "arc-Tag-label", title: title }, children))) : (React__default.createElement("div", { className: "arc-Tag-content", "data-testid": "arc-Tag-content" },
|
|
70
70
|
icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
|
|
71
71
|
React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
|
|
72
|
-
React__default.createElement("div", { className: "arc-Tag-label" }, children))))),
|
|
72
|
+
React__default.createElement("div", { className: "arc-Tag-label", title: title }, children))))),
|
|
73
73
|
isRemovable && (React__default.createElement("button", { className: "arc-Tag-icon arc-Tag-icon--removable", onClick: onRemoveHandler, "data-testid": "arc-Tag-icon-removable", "aria-live": "polite", "aria-roledescription": "remove tag" },
|
|
74
74
|
React__default.createElement(Icon, { icon: BtIconCross, color: "brand", size: 20 }),
|
|
75
75
|
React__default.createElement(Icon, { icon: BtIconCrossFill, color: "brand", size: 20 })))));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from './filter-data-attrs-ea8f4ed4.js';
|
|
2
2
|
import { c as classNames } from './index-2e73c2e9.js';
|
|
3
3
|
import React__default, { forwardRef, useContext, useState } from 'react';
|
|
4
|
-
import { u as useAriaDescribedby, F as FormControl } from './FormControl-
|
|
4
|
+
import { u as useAriaDescribedby, F as FormControl } from './FormControl-8e836656.js';
|
|
5
5
|
import { C as Context } from './Surface-0ca6817d.js';
|
|
6
|
-
import { V as VisuallyHidden } from './VisuallyHidden-
|
|
6
|
+
import { V as VisuallyHidden } from './VisuallyHidden-06692fd3.js';
|
|
7
7
|
import { I as Icon } from './Icon-15799695.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -33,12 +33,9 @@ var useNumericInput = function (props) {
|
|
|
33
33
|
return { inputMode: inputMode, pattern: pattern, type: type };
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* Use `TextInput` to allow custom user text entry with a keyboard.
|
|
38
|
-
*/
|
|
39
36
|
var TextInputComponent = forwardRef(function (_a, ref) {
|
|
40
37
|
var _b;
|
|
41
|
-
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"]);
|
|
42
39
|
var surface = useContext(Context).surface;
|
|
43
40
|
var _m = useState(false), showPasswordToggle = _m[0], setShowPasswordToggle = _m[1];
|
|
44
41
|
var inferredInputProps = useNumericInput({
|
|
@@ -74,7 +71,7 @@ var TextInputComponent = forwardRef(function (_a, ref) {
|
|
|
74
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 },
|
|
75
72
|
React__default.createElement("div", { className: "arc-TextInput-inputWrapper", style: { width: width } },
|
|
76
73
|
prefix && (React__default.createElement("span", { className: "arc-TextInput-prefix", "aria-hidden": true }, prefix)),
|
|
77
|
-
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)),
|
|
78
75
|
iconButton && !showPassword && (React__default.createElement("div", { className: "arc-TextInput-additionalControl" },
|
|
79
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) {
|
|
80
77
|
e.preventDefault();
|
|
@@ -90,6 +87,9 @@ var TextInputComponent = forwardRef(function (_a, ref) {
|
|
|
90
87
|
? "Your password is shown"
|
|
91
88
|
: "Your password is hidden")))))))));
|
|
92
89
|
});
|
|
90
|
+
/**
|
|
91
|
+
* Use `TextInput` to allow users to enter short form text.
|
|
92
|
+
*/
|
|
93
93
|
var TextInput = forwardRef(function (props, ref) { return React__default.createElement(TextInputComponent, __assign({ ref: ref }, props)); });
|
|
94
94
|
var TextInputWithPlaceHolder = forwardRef(function (props, ref) { return React__default.createElement(TextInputComponent, __assign({ ref: ref }, props)); });
|
|
95
95
|
|
|
@@ -951,7 +951,7 @@ var ToastNotification = function (_a) {
|
|
|
951
951
|
React__default.createElement(Icon, { icon: BtIconCrossAlt2Px, size: 24 }))))));
|
|
952
952
|
};
|
|
953
953
|
|
|
954
|
-
/** Use `Toast` to display temporary messages at the bottom of the
|
|
954
|
+
/** Use `Toast` to display temporary messages at the bottom of the screen. */
|
|
955
955
|
var Toast = function (_a) {
|
|
956
956
|
var children = _a.children, _b = _a.colorScheme, colorScheme = _b === void 0 ? "default" : _b, props = __rest(_a, ["children", "colorScheme"]);
|
|
957
957
|
return (React__default.createElement($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: "right", duration: 6000 },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Use `VisuallyHidden` to provide text for screen readers that is visually hidden on screen.
|
|
5
5
|
*/
|
|
6
6
|
var VisuallyHidden = function (_a) {
|
|
7
7
|
var children = _a.children;
|