@arc-ui/components 12.0.0-beta.18 → 12.0.0-beta.19
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/lib/Alert/styles.css +1 -1
- package/lib/Align/styles.css +1 -1
- package/lib/AppButton/styles.css +1 -1
- package/lib/Avatar/styles.css +1 -1
- package/lib/AvatarGroup/styles.css +1 -1
- package/lib/Badge/styles.css +1 -1
- package/lib/Banner/Banner.cjs +2 -2
- package/lib/Banner/Banner.mjs +2 -2
- package/lib/Box/styles.css +1 -1
- package/lib/BrandLogo/styles.css +1 -1
- package/lib/Breadcrumbs/styles.css +1 -1
- package/lib/Button/styles.css +1 -1
- package/lib/ButtonGroup/styles.css +1 -1
- package/lib/ButtonV2/styles.css +1 -1
- package/lib/Calendar/Calendar.cjs +2 -2
- package/lib/Calendar/Calendar.mjs +2 -2
- package/lib/Calendar/styles.css +1 -1
- package/lib/CardFooter/styles.css +1 -1
- package/lib/CardHeading/styles.css +1 -1
- package/lib/Carousel/Carousel.cjs +1 -1
- package/lib/Carousel/Carousel.mjs +1 -1
- package/lib/Carousel/styles.css +1 -1
- package/lib/Checkbox/Checkbox.cjs +2 -2
- package/lib/Checkbox/Checkbox.mjs +2 -2
- package/lib/Checkbox/styles.css +1 -1
- package/lib/Columns/styles.css +1 -1
- package/lib/ComboBox/ComboBox.cjs +2 -2
- package/lib/ComboBox/ComboBox.mjs +2 -2
- package/lib/ComboBox/styles.css +1 -1
- package/lib/ContentSwitcher/styles.css +1 -1
- package/lib/ContentSwitcherDropdown/styles.css +1 -1
- package/lib/DatePicker/DatePicker.cjs +5 -5
- package/lib/DatePicker/DatePicker.mjs +5 -5
- package/lib/DatePicker/styles.css +1 -1
- package/lib/Disclosure/styles.css +1 -1
- package/lib/DisclosureMini/styles.css +1 -1
- package/lib/Download/styles.css +1 -1
- package/lib/Drawer/styles.css +1 -1
- package/lib/Elevation/styles.css +1 -1
- package/lib/Filter/styles.css +1 -1
- package/lib/FormControl/FormControl.cjs +1 -1
- package/lib/FormControl/FormControl.mjs +1 -1
- package/lib/FormControl/styles.css +1 -1
- package/lib/GhostedHeroBanner/styles.css +1 -1
- package/lib/GradientBackground/styles.css +1 -1
- package/lib/Grid/styles.css +1 -1
- package/lib/Group/styles.css +1 -1
- package/lib/Heading/styles.css +1 -1
- package/lib/HeroBanner/HeroBanner.cjs +2 -2
- package/lib/HeroBanner/HeroBanner.mjs +2 -2
- package/lib/HeroBanner/styles.css +1 -1
- package/lib/HeroButton/styles.css +1 -1
- package/lib/Hidden/styles.css +1 -1
- package/lib/HorizontalCard/styles.css +1 -1
- package/lib/Icon/styles.css +1 -1
- package/lib/Image/styles.css +1 -1
- package/lib/ImpactCard/styles.css +1 -1
- package/lib/InformationCard/InformationCard.cjs +1 -1
- package/lib/InformationCard/InformationCard.mjs +1 -1
- package/lib/InformationCard/styles.css +1 -1
- package/lib/Link/styles.css +1 -1
- package/lib/Markup/styles.css +1 -1
- package/lib/MediaCard/MediaCard.cjs +2 -2
- package/lib/MediaCard/MediaCard.mjs +2 -2
- package/lib/MediaCard/styles.css +1 -1
- package/lib/Menu/Menu.cjs +5 -19
- package/lib/Menu/Menu.mjs +6 -20
- package/lib/Menu/styles.css +1 -1
- package/lib/Modal/styles.css +1 -1
- package/lib/Pagination/styles.css +1 -1
- package/lib/PaginationSimple/styles.css +1 -1
- package/lib/Popover/styles.css +1 -1
- package/lib/Poster/styles.css +1 -1
- package/lib/ProgressBar/styles.css +1 -1
- package/lib/ProgressStepper/styles.css +1 -1
- package/lib/RadioCardGroup/RadioCardGroup.cjs +1 -1
- package/lib/RadioCardGroup/RadioCardGroup.mjs +1 -1
- package/lib/RadioCardGroup/styles.css +1 -1
- package/lib/RadioGroup/RadioGroup.cjs +4 -5
- package/lib/RadioGroup/RadioGroup.mjs +5 -6
- package/lib/RadioGroup/styles.css +1 -1
- package/lib/Rule/styles.css +1 -1
- package/lib/ScrollToTop/styles.css +1 -1
- package/lib/Section/styles.css +1 -1
- package/lib/Select/Select.cjs +11 -15
- package/lib/Select/Select.mjs +12 -16
- package/lib/Select/styles.css +1 -1
- package/lib/SiteFooter/SiteFooter.cjs +1 -1
- package/lib/SiteFooter/SiteFooter.mjs +1 -1
- package/lib/SiteFooter/styles.css +1 -1
- package/lib/SiteFooterV2/SiteFooterV2.cjs +2 -2
- package/lib/SiteFooterV2/SiteFooterV2.mjs +2 -2
- package/lib/SiteFooterV2/styles.css +1 -1
- package/lib/SiteHeaderV2/SiteHeaderV2.cjs +2 -2
- package/lib/SiteHeaderV2/SiteHeaderV2.mjs +3 -3
- package/lib/SiteHeaderV2/styles.css +1 -1
- package/lib/Skeleton/styles.css +1 -1
- package/lib/SkipLink/styles.css +1 -1
- package/lib/Spinner/styles.css +1 -1
- package/lib/Surface/styles.css +1 -1
- package/lib/Switch/Switch.cjs +17 -14
- package/lib/Switch/Switch.mjs +17 -14
- package/lib/Switch/styles.css +1 -1
- package/lib/TabbedBanner/TabbedBanner.cjs +2 -2
- package/lib/TabbedBanner/TabbedBanner.mjs +2 -2
- package/lib/TabbedBanner/styles.css +1 -1
- package/lib/Tabs/styles.css +1 -1
- package/lib/Tag/styles.css +1 -1
- package/lib/TemplateBanner/TemplateBanner.cjs +2 -2
- package/lib/TemplateBanner/TemplateBanner.mjs +2 -2
- package/lib/TemplateBanner/styles.css +1 -1
- package/lib/Text/styles.css +1 -1
- package/lib/TextArea/TextArea.cjs +11 -11
- package/lib/TextArea/TextArea.mjs +11 -11
- package/lib/TextArea/styles.css +1 -1
- package/lib/TextInput/TextInput.cjs +2 -2
- package/lib/TextInput/TextInput.mjs +2 -2
- package/lib/TextInput/styles.css +1 -1
- package/lib/Theme/Theme.cjs +1 -1
- package/lib/Theme/Theme.mjs +1 -1
- package/lib/Theme/styles.css +1 -1
- package/lib/ThemeIcon/styles.css +1 -1
- package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +1 -1
- package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +1 -1
- package/lib/ThumbnailSignpost/styles.css +1 -1
- package/lib/Toast/styles.css +1 -1
- package/lib/Tooltip/styles.css +1 -1
- package/lib/Truncate/styles.css +1 -1
- package/lib/TypographyCard/styles.css +1 -1
- package/lib/UniversalHeader/styles.css +1 -1
- package/lib/VerticalSpace/styles.css +1 -1
- package/lib/VideoPlayer/styles.css +1 -1
- package/lib/Visible/styles.css +1 -1
- package/lib/VisuallyHidden/styles.css +1 -1
- package/lib/_shared/cjs/{Calendar-C5C0evEy.cjs → Calendar-BwjsVOaO.cjs} +2 -2
- package/lib/_shared/cjs/{Checkbox-D2UQsmiB.cjs → Checkbox-DfZMjO1Y.cjs} +1 -1
- package/lib/_shared/cjs/{ComboBox-BIMxZhJp.cjs → ComboBox-CY_JTHWB.cjs} +1 -1
- package/lib/_shared/cjs/{DatePicker-BgU6iidG.cjs → DatePicker-PiPFgOL6.cjs} +4 -4
- package/lib/_shared/cjs/{FormControl-D3-JbAVb.cjs → FormControl-BPnKQrCm.cjs} +19 -13
- package/lib/_shared/cjs/{MediaCard-kcqfmeue.cjs → MediaCard-4SvlAL3w.cjs} +1 -1
- package/lib/_shared/cjs/{MenuSubContent-Bs2_ebS3.cjs → MenuSubContent-B7-PVHJ6.cjs} +0 -2
- package/lib/_shared/cjs/{RadioGroupInput-D3trTxB5.cjs → RadioGroupInput-w2qkfsnG.cjs} +2 -2
- package/lib/_shared/cjs/{SiteHeaderV2NavItemWithSubNav-DgoCW2W3.cjs → SiteHeaderV2NavItemWithSubNav-CX1WAHv8.cjs} +1 -1
- package/lib/_shared/cjs/{TemplateBanner-BMi77IGK.cjs → TemplateBanner-Dn_6CJqe.cjs} +1 -1
- package/lib/_shared/cjs/{TextInput-DT4hi02U.cjs → TextInput-ByySubi5.cjs} +7 -7
- package/lib/_shared/cjs/{index.es-sqSQUWYg.cjs → index.es-i8i9xWYf.cjs} +1 -1
- package/lib/_shared/esm/{Calendar-L6u3D8xb.mjs → Calendar-Di_PdK9o.mjs} +2 -2
- package/lib/_shared/esm/{Checkbox-NxnK40uZ.mjs → Checkbox-CwOHzlQF.mjs} +1 -1
- package/lib/_shared/esm/{ComboBox-DUTrEu0N.mjs → ComboBox-Cga1icqB.mjs} +1 -1
- package/lib/_shared/esm/{DatePicker-CccSfg17.mjs → DatePicker-DyPo-u9K.mjs} +4 -4
- package/lib/_shared/esm/{FormControl-B9fp1ilz.mjs → FormControl-CWyrVi1u.mjs} +19 -13
- package/lib/_shared/esm/{MediaCard-CjTDOvmx.mjs → MediaCard-tYOu7gv8.mjs} +1 -1
- package/lib/_shared/esm/{MenuSubContent-Cv9mSn58.mjs → MenuSubContent-DCfTtJpf.mjs} +1 -2
- package/lib/_shared/esm/{RadioGroupInput-DiRS2jwQ.mjs → RadioGroupInput-zAWSV29m.mjs} +2 -2
- package/lib/_shared/esm/{SiteHeaderV2NavItemWithSubNav-BLqiSeEC.mjs → SiteHeaderV2NavItemWithSubNav-B9hz5IKd.mjs} +1 -1
- package/lib/_shared/esm/{TemplateBanner-zc4VmeeW.mjs → TemplateBanner-CS95cxio.mjs} +1 -1
- package/lib/_shared/esm/{TextInput-Vp_cBbpQ.mjs → TextInput-Dk7qNGoh.mjs} +7 -7
- package/lib/_shared/esm/{index.es-C3WGtwrW.mjs → index.es-DZ9WSYOo.mjs} +1 -1
- package/lib/index.cjs +63 -74
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +16 -13
- package/lib/index.d.mts +16 -13
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +63 -74
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +9 -9
- package/package.json +8 -8
|
@@ -40,11 +40,11 @@ var RadioGroupButton = forwardRef(function (_a, ref) {
|
|
|
40
40
|
*/
|
|
41
41
|
var RadioGroupInput = forwardRef(function (_a, ref) {
|
|
42
42
|
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"]);
|
|
43
|
-
var _c = useRadioContext(), blurEvent = _c.blurEvent, changeEvent = _c.changeEvent, groupDisabled = _c.groupDisabled, checkedValue = _c.checkedValue,
|
|
43
|
+
var _c = useRadioContext(), blurEvent = _c.blurEvent, changeEvent = _c.changeEvent, groupDisabled = _c.groupDisabled, checkedValue = _c.checkedValue, name = _c.name, size = _c.size;
|
|
44
44
|
var isChecked = checkedValue === value ? true : false;
|
|
45
45
|
var checked = typeof changeEvent !== "function" ? undefined : isChecked;
|
|
46
46
|
var defaultChecked = typeof changeEvent !== "function" ? isChecked : undefined;
|
|
47
|
-
return (React__default.createElement(RadioGroupButton, __assign({ withMargin: true, ref: ref, id: id, name: name, helper: helper, isDisabled: isDisabled || groupDisabled,
|
|
47
|
+
return (React__default.createElement(RadioGroupButton, __assign({ withMargin: true, ref: ref, id: id, name: name, helper: helper, isDisabled: isDisabled || groupDisabled, size: size, radioButtonAlignment: radioButtonAlignment, label: label, defaultChecked: defaultChecked, checked: checked, changeEvent: changeEvent, blurEvent: blurEvent, value: value }, props)));
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
export { Provider as P, RadioGroupButton as R, RadioGroupInput as a };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterAttrs } from './filter-attrs-B6CM-NUr.mjs';
|
|
2
2
|
import React__default, { createContext, useState, useRef, useEffect, useContext } from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
|
-
import { d as ArcSizeBreakpointsL } from './index.es-
|
|
4
|
+
import { d as ArcSizeBreakpointsL } from './index.es-DZ9WSYOo.mjs';
|
|
5
5
|
import { a as BtIconChevronRight2Px, B as BtIconChevronLeft2Px } from './BtIconChevronRight2Px-DzWb16fR.mjs';
|
|
6
6
|
import { u as useMediaQuery } from './use-media-query-DmKuIDEM.mjs';
|
|
7
7
|
import { I as Icon } from './Icon-MZfaoOo9.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterAttrs } from './filter-attrs-B6CM-NUr.mjs';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
|
-
import { A as ArcSizeBreakpointsM } from './index.es-
|
|
4
|
+
import { A as ArcSizeBreakpointsM } from './index.es-DZ9WSYOo.mjs';
|
|
5
5
|
import { u as useMediaQuery } from './use-media-query-DmKuIDEM.mjs';
|
|
6
6
|
import { V as VerticalSpace } from './VerticalSpace-Duhm0zXP.mjs';
|
|
7
7
|
import { B as Box } from './Box-BYm_GTct.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterAttrs } from './filter-attrs-B6CM-NUr.mjs';
|
|
2
2
|
import React__default, { forwardRef, useContext, useState } from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
|
-
import { u as useAriaDescribedby, F as FormControl } from './FormControl-
|
|
4
|
+
import { u as useAriaDescribedby, F as FormControl } from './FormControl-CWyrVi1u.mjs';
|
|
5
5
|
import { C as Context } from './Surface-Colbp3Zx.mjs';
|
|
6
6
|
import { V as VisuallyHidden } from './VisuallyHidden-DqAgoqJo.mjs';
|
|
7
7
|
import { T as ThemeIcon } from './ThemeIcon-CN_Ed5b1.mjs';
|
|
@@ -36,9 +36,9 @@ var useNumericInput = function (props) {
|
|
|
36
36
|
|
|
37
37
|
var TextInputComponent = forwardRef(function (_a, ref) {
|
|
38
38
|
var _b;
|
|
39
|
-
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,
|
|
39
|
+
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, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onFocus = _a.onFocus, onChange = _a.onChange, placeholder = _a.placeholder, onClickDisclosure = _a.onClickDisclosure, pattern = _a.pattern, _g = _a.type, type = _g === void 0 ? "text" : _g, _h = _a.showPassword, showPassword = _h === void 0 ? false : _h, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, _j = _a.size, size = _j === void 0 ? "m" : _j, iconButton = _a.iconButton, prefix = _a.prefix, suffix = _a.suffix, _k = _a.inputAlignment, inputAlignment = _k === void 0 ? "left" : _k, width = _a.width, autoComplete = _a.autoComplete, isLoading = _a.isLoading, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "maxLength", "minLength", "name", "onBlur", "onFocus", "onChange", "placeholder", "onClickDisclosure", "pattern", "type", "showPassword", "value", "disclosureTitle", "disclosureText", "size", "iconButton", "prefix", "suffix", "inputAlignment", "width", "autoComplete", "isLoading"]);
|
|
40
40
|
var surface = useContext(Context).surface;
|
|
41
|
-
var
|
|
41
|
+
var _l = useState(false), showPasswordToggle = _l[0], setShowPasswordToggle = _l[1];
|
|
42
42
|
var inferredInputProps = useNumericInput({
|
|
43
43
|
inputMode: inputMode,
|
|
44
44
|
pattern: pattern,
|
|
@@ -72,9 +72,9 @@ var TextInputComponent = forwardRef(function (_a, ref) {
|
|
|
72
72
|
"arc-TextInput--withPrefix": prefix,
|
|
73
73
|
"arc-TextInput--withSuffix": suffix
|
|
74
74
|
},
|
|
75
|
-
_b["arc-TextInput--size".concat(
|
|
75
|
+
_b["arc-TextInput--size".concat(size && size.toUpperCase())] = size && size !== "m",
|
|
76
76
|
_b)) }, filterAttrs(props)),
|
|
77
|
-
React__default.createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, isDisabled: isDisabled, label: label, hideLabel: hideLabel, labelSize:
|
|
77
|
+
React__default.createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, isDisabled: isDisabled, label: label, hideLabel: hideLabel, labelSize: size, requirementStatus: isRequired ? "required" : "optional", disclosureTitle: disclosureTitle, disclosureText: disclosureText, onClickDisclosure: onClickDisclosure },
|
|
78
78
|
React__default.createElement("div", { className: "arc-TextInput-inputWrapper", style: { width: width, marginTop: hideLabel ? 0 : undefined } },
|
|
79
79
|
prefix && (React__default.createElement("span", { className: "arc-TextInput-prefix", "aria-hidden": true }, prefix)),
|
|
80
80
|
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 || isLoading, id: id, maxLength: maxLength, minLength: minLength, name: name, onChange: onChange, onBlur: onBlur, onFocus: onFocus, readOnly: isReadOnly, ref: ref, required: isRequired, value: typeof value !== "undefined" ? value : undefined, autoComplete: autoComplete }, inferredInputProps)),
|
|
@@ -83,7 +83,7 @@ var TextInputComponent = forwardRef(function (_a, ref) {
|
|
|
83
83
|
e.preventDefault();
|
|
84
84
|
iconButton.onClick();
|
|
85
85
|
} },
|
|
86
|
-
React__default.createElement(ThemeIcon, { icon: iconButton.icon, size: buttonIconSize[
|
|
86
|
+
React__default.createElement(ThemeIcon, { icon: iconButton.icon, size: buttonIconSize[size] })))),
|
|
87
87
|
suffix && !showPassword ? (React__default.createElement("span", { className: "arc-TextInput-suffix", "aria-hidden": true }, suffix)) : null,
|
|
88
88
|
showPassword && (React__default.createElement("div", { className: "arc-TextInput-additionalControl" },
|
|
89
89
|
React__default.createElement("button", { className: "arc-TextInput-passwordToggle", onClick: function () { return setShowPasswordToggle(function (p) { return !p; }); }, type: "button" }, showPasswordToggle ? "Hide" : "Show"),
|
|
@@ -93,7 +93,7 @@ var TextInputComponent = forwardRef(function (_a, ref) {
|
|
|
93
93
|
? "Your password is shown"
|
|
94
94
|
: "Your password is hidden"))))),
|
|
95
95
|
isLoading && (React__default.createElement("span", { className: "arc-TextInput-spinner" },
|
|
96
|
-
React__default.createElement(Spinner, { size: spinnerSize[
|
|
96
|
+
React__default.createElement(Spinner, { size: spinnerSize[size] })))))));
|
|
97
97
|
});
|
|
98
98
|
/**
|
|
99
99
|
* Use `TextInput` to allow users to enter short form text.
|
package/lib/index.cjs
CHANGED
|
@@ -672,7 +672,7 @@ var Badge = function (_a) {
|
|
|
672
672
|
|
|
673
673
|
/**
|
|
674
674
|
* Do not edit directly
|
|
675
|
-
* Generated on
|
|
675
|
+
* Generated on Tue, 10 Jun 2025 09:53:42 GMT
|
|
676
676
|
*/
|
|
677
677
|
var ArcSizeBreakpointsXs = "320px";
|
|
678
678
|
var ArcSizeBreakpointsS = "636px";
|
|
@@ -5166,7 +5166,7 @@ var CalendarDayNumber = React.forwardRef(function (_a, autoFocusRef) {
|
|
|
5166
5166
|
*/
|
|
5167
5167
|
|
|
5168
5168
|
const BtIconChevronDownMid =
|
|
5169
|
-
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'
|
|
5169
|
+
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3e%3cpath fill='currentColor' d='m16 18.09 5.704-5.696a1.347 1.347 0 0 1 2.296.949 1.34 1.34 0 0 1-.393.95L16.95 20.94a1.347 1.347 0 0 1-1.902 0l-6.656-6.648A1.342 1.342 0 0 1 9.345 12c.356 0 .699.142.951.393z'/%3e%3c/svg%3e";
|
|
5170
5170
|
|
|
5171
5171
|
var CalendarDateSelect = function (_a) {
|
|
5172
5172
|
var ariaLabel = _a.ariaLabel, onChange = _a.onChange, name = _a.name, value = _a.value, displayValue = _a.displayValue, options = _a.options;
|
|
@@ -7867,14 +7867,15 @@ var Provider$4 = Context$2.Provider;
|
|
|
7867
7867
|
* Use `FormControl` to provide inputs with labels, helper text and error messages
|
|
7868
7868
|
*/
|
|
7869
7869
|
var FormControl = function (_a) {
|
|
7870
|
-
var
|
|
7870
|
+
var _b;
|
|
7871
|
+
var children = _a.children, _c = _a.elementType, ElementType = _c === void 0 ? "div" : _c, errorMessage = _a.errorMessage, helper = _a.helper, htmlFor = _a.htmlFor, supplementaryInfo = _a.supplementaryInfo, id = _a.id, label = _a.label, _d = _a.labelSize, labelSize = _d === void 0 ? "l" : _d, _e = _a.labelPosition, labelPosition = _e === void 0 ? "top" : _e, _f = _a.requirementStatus, requirementStatus = _f === void 0 ? "optional" : _f, _g = _a.helperUnderLabel, helperUnderLabel = _g === void 0 ? false : _g, isDisabled = _a.isDisabled, _h = _a.hideLabel, hideLabel = _h === void 0 ? false : _h, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, props = __rest(_a, ["children", "elementType", "errorMessage", "helper", "htmlFor", "supplementaryInfo", "id", "label", "labelSize", "labelPosition", "requirementStatus", "helperUnderLabel", "isDisabled", "hideLabel", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
|
|
7871
7872
|
var surface = React.useContext(Context$3).surface;
|
|
7872
|
-
var
|
|
7873
|
+
var _j = useAriaDescribedby({
|
|
7873
7874
|
disclosureText: disclosureText,
|
|
7874
7875
|
errorMessage: errorMessage,
|
|
7875
7876
|
helper: helper,
|
|
7876
7877
|
id: htmlFor || id, // `htmlFor` is preference to keep this deterministic with TextInput
|
|
7877
|
-
}), ariaDescribedby =
|
|
7878
|
+
}), ariaDescribedby = _j.ariaDescribedby, idError = _j.idError, idHelper = _j.idHelper, idDisclosure = _j.idDisclosure;
|
|
7878
7879
|
var LabelType = ElementType === "div" ? "label" : "legend";
|
|
7879
7880
|
var elementProps = {};
|
|
7880
7881
|
var labelProps = {};
|
|
@@ -7894,22 +7895,27 @@ var FormControl = function (_a) {
|
|
|
7894
7895
|
? Boolean(errorMessage || disclosureTitle || supplementaryInfo)
|
|
7895
7896
|
: Boolean(errorMessage || disclosureTitle || helper || supplementaryInfo);
|
|
7896
7897
|
return (React.createElement(Provider$4, { value: { requirementStatus: requirementStatus } },
|
|
7897
|
-
React.createElement(ElementType, __assign({ className: classNames({
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7898
|
+
React.createElement(ElementType, __assign({ className: classNames((_b = {
|
|
7899
|
+
"arc-FormControl": true,
|
|
7900
|
+
"arc-FormControl--isDisabled": isDisabled,
|
|
7901
|
+
"arc-FormControl--onDarkSurface": surface === "dark",
|
|
7902
|
+
"arc-FormControl--sideLabel": labelPosition === "left"
|
|
7903
|
+
},
|
|
7904
|
+
_b["arc-FormControl--".concat(labelSize)] = labelSize !== "l",
|
|
7905
|
+
_b)), id: id }, elementProps, filterAttrs(props)),
|
|
7904
7906
|
hideLabel === true ? (React.createElement(VisuallyHidden$2, null,
|
|
7905
7907
|
React.createElement(LabelType, __assign({ className: classNames("arc-FormControl-label", {
|
|
7906
7908
|
"arc-FormControl-label--withHelperUnderLabel": helperUnderLabel && helper,
|
|
7907
7909
|
}) }, labelProps),
|
|
7908
|
-
label,
|
|
7910
|
+
label && (React.createElement("span", { className: classNames("arc-FormControl-labelText", {
|
|
7911
|
+
"arc-FormControl-labelText--withOptional": requirementStatus === "optional",
|
|
7912
|
+
}) }, label)),
|
|
7909
7913
|
requirementStatus === "optional" && (React.createElement("span", { className: "arc-FormControl-labelOptional" }, "(optional)"))))) : (React.createElement(LabelType, __assign({ className: classNames("arc-FormControl-label", {
|
|
7910
7914
|
"arc-FormControl-label--withHelperUnderLabel": helperUnderLabel && helper,
|
|
7911
7915
|
}) }, labelProps),
|
|
7912
|
-
label,
|
|
7916
|
+
label && (React.createElement("span", { className: classNames("arc-FormControl-labelText", {
|
|
7917
|
+
"arc-FormControl-labelText--withOptional": requirementStatus === "optional",
|
|
7918
|
+
}) }, label)),
|
|
7913
7919
|
requirementStatus === "optional" && (React.createElement("span", { className: "arc-FormControl-labelOptional" }, "(optional)")))),
|
|
7914
7920
|
helperUnderLabel && helper && (React.createElement("div", { className: "arc-FormControl-helper arc-FormControl-helper--underLabel", id: idHelper }, helper)),
|
|
7915
7921
|
children,
|
|
@@ -7922,7 +7928,7 @@ var FormControl = function (_a) {
|
|
|
7922
7928
|
React.createElement("span", { className: "arc-FormControl-error--icon" },
|
|
7923
7929
|
React.createElement(ThemeIcon, { icon: "formControlAlert" })),
|
|
7924
7930
|
errorMessage)) : (!helperUnderLabel &&
|
|
7925
|
-
(disclosureTitle ? (React.createElement(DisclosureMini, { onClick: onClickDisclosure, summary: disclosureTitle, size: labelSize, id: idDisclosure }, disclosureText)) : (helper && (React.createElement("div", { className: "arc-FormControl-helper", id: idHelper }, helper))))))),
|
|
7931
|
+
(disclosureTitle ? (React.createElement(DisclosureMini, { onClick: onClickDisclosure, summary: disclosureTitle, size: labelSize === "m" ? "l" : labelSize, id: idDisclosure }, disclosureText)) : (helper && (React.createElement("div", { className: "arc-FormControl-helper", id: idHelper }, helper))))))),
|
|
7926
7932
|
supplementaryInfo && (React.createElement("div", { className: "arc-FormControl-supplementaryInfo" }, supplementaryInfo))))));
|
|
7927
7933
|
};
|
|
7928
7934
|
|
|
@@ -15137,9 +15143,9 @@ var DATE_FORMAT = "dd/MM/yyyy";
|
|
|
15137
15143
|
|
|
15138
15144
|
var TextInputComponent = React.forwardRef(function (_a, ref) {
|
|
15139
15145
|
var _b;
|
|
15140
|
-
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,
|
|
15146
|
+
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, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onFocus = _a.onFocus, onChange = _a.onChange, placeholder = _a.placeholder, onClickDisclosure = _a.onClickDisclosure, pattern = _a.pattern, _g = _a.type, type = _g === void 0 ? "text" : _g, _h = _a.showPassword, showPassword = _h === void 0 ? false : _h, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, _j = _a.size, size = _j === void 0 ? "m" : _j, iconButton = _a.iconButton, prefix = _a.prefix, suffix = _a.suffix, _k = _a.inputAlignment, inputAlignment = _k === void 0 ? "left" : _k, width = _a.width, autoComplete = _a.autoComplete, isLoading = _a.isLoading, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "maxLength", "minLength", "name", "onBlur", "onFocus", "onChange", "placeholder", "onClickDisclosure", "pattern", "type", "showPassword", "value", "disclosureTitle", "disclosureText", "size", "iconButton", "prefix", "suffix", "inputAlignment", "width", "autoComplete", "isLoading"]);
|
|
15141
15147
|
var surface = React.useContext(Context$3).surface;
|
|
15142
|
-
var
|
|
15148
|
+
var _l = React.useState(false), showPasswordToggle = _l[0], setShowPasswordToggle = _l[1];
|
|
15143
15149
|
var inferredInputProps = useNumericInput({
|
|
15144
15150
|
inputMode: inputMode,
|
|
15145
15151
|
pattern: pattern,
|
|
@@ -15173,9 +15179,9 @@ var TextInputComponent = React.forwardRef(function (_a, ref) {
|
|
|
15173
15179
|
"arc-TextInput--withPrefix": prefix,
|
|
15174
15180
|
"arc-TextInput--withSuffix": suffix
|
|
15175
15181
|
},
|
|
15176
|
-
_b["arc-TextInput--size".concat(
|
|
15182
|
+
_b["arc-TextInput--size".concat(size && size.toUpperCase())] = size && size !== "m",
|
|
15177
15183
|
_b)) }, filterAttrs(props)),
|
|
15178
|
-
React.createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, isDisabled: isDisabled, label: label, hideLabel: hideLabel, labelSize:
|
|
15184
|
+
React.createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, isDisabled: isDisabled, label: label, hideLabel: hideLabel, labelSize: size, requirementStatus: isRequired ? "required" : "optional", disclosureTitle: disclosureTitle, disclosureText: disclosureText, onClickDisclosure: onClickDisclosure },
|
|
15179
15185
|
React.createElement("div", { className: "arc-TextInput-inputWrapper", style: { width: width, marginTop: hideLabel ? 0 : undefined } },
|
|
15180
15186
|
prefix && (React.createElement("span", { className: "arc-TextInput-prefix", "aria-hidden": true }, prefix)),
|
|
15181
15187
|
React.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 || isLoading, id: id, maxLength: maxLength, minLength: minLength, name: name, onChange: onChange, onBlur: onBlur, onFocus: onFocus, readOnly: isReadOnly, ref: ref, required: isRequired, value: typeof value !== "undefined" ? value : undefined, autoComplete: autoComplete }, inferredInputProps)),
|
|
@@ -15184,7 +15190,7 @@ var TextInputComponent = React.forwardRef(function (_a, ref) {
|
|
|
15184
15190
|
e.preventDefault();
|
|
15185
15191
|
iconButton.onClick();
|
|
15186
15192
|
} },
|
|
15187
|
-
React.createElement(ThemeIcon, { icon: iconButton.icon, size: buttonIconSize[
|
|
15193
|
+
React.createElement(ThemeIcon, { icon: iconButton.icon, size: buttonIconSize[size] })))),
|
|
15188
15194
|
suffix && !showPassword ? (React.createElement("span", { className: "arc-TextInput-suffix", "aria-hidden": true }, suffix)) : null,
|
|
15189
15195
|
showPassword && (React.createElement("div", { className: "arc-TextInput-additionalControl" },
|
|
15190
15196
|
React.createElement("button", { className: "arc-TextInput-passwordToggle", onClick: function () { return setShowPasswordToggle(function (p) { return !p; }); }, type: "button" }, showPasswordToggle ? "Hide" : "Show"),
|
|
@@ -15194,7 +15200,7 @@ var TextInputComponent = React.forwardRef(function (_a, ref) {
|
|
|
15194
15200
|
? "Your password is shown"
|
|
15195
15201
|
: "Your password is hidden"))))),
|
|
15196
15202
|
isLoading && (React.createElement("span", { className: "arc-TextInput-spinner" },
|
|
15197
|
-
React.createElement(Spinner, { size: spinnerSize[
|
|
15203
|
+
React.createElement(Spinner, { size: spinnerSize[size] })))))));
|
|
15198
15204
|
});
|
|
15199
15205
|
/**
|
|
15200
15206
|
* Use `TextInput` to allow users to enter short form text.
|
|
@@ -15292,7 +15298,7 @@ var convertRangeStringToDates = function (value) {
|
|
|
15292
15298
|
* Use `DatePicker` to clearly present available dates and allow users to choose a way to enter information.
|
|
15293
15299
|
*/
|
|
15294
15300
|
var DatePicker = React.forwardRef(function (_a, ref) {
|
|
15295
|
-
var errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, label = _a.label, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, isRequired = _a.isRequired,
|
|
15301
|
+
var errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, label = _a.label, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, isRequired = _a.isRequired, size = _a.size, _b = _a.value, value = _b === void 0 ? "" : _b, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onDateSelect = _a.onDateSelect, onRangeSelect = _a.onRangeSelect, onClickDisclosure = _a.onClickDisclosure, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, type = _a.type, _c = _a.isFluid, isFluid = _c === void 0 ? false : _c, _d = _a.selectionType, selectionType = _d === void 0 ? "single" : _d, disabledDates = _a.disabledDates, minDate = _a.minDate, maxDate = _a.maxDate, props = __rest(_a, ["errorMessage", "helper", "id", "label", "isDisabled", "isReadOnly", "isRequired", "size", "value", "name", "onBlur", "onChange", "onDateSelect", "onRangeSelect", "onClickDisclosure", "disclosureTitle", "disclosureText", "type", "isFluid", "selectionType", "disabledDates", "minDate", "maxDate"]);
|
|
15296
15302
|
var _e = useThemeElement(), themeElement = _e[0], setThemeElement = _e[1];
|
|
15297
15303
|
var _f = React.useState("Choose date"), ariaLabel = _f[0], setAriaLabel = _f[1];
|
|
15298
15304
|
var _g = React.useState(false), showCalendar = _g[0], setShowCalendar = _g[1];
|
|
@@ -15448,7 +15454,7 @@ var DatePicker = React.forwardRef(function (_a, ref) {
|
|
|
15448
15454
|
icon: "datePickerCalendar",
|
|
15449
15455
|
label: ariaLabel,
|
|
15450
15456
|
ref: buttonRef,
|
|
15451
|
-
}, placeholder: placeHolder, errorMessage: errorMessage, helper: helper, id: id, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, label: label,
|
|
15457
|
+
}, placeholder: placeHolder, errorMessage: errorMessage, helper: helper, id: id, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, label: label, maxLength: selectionType === "range" ? 23 : 10, name: name, onBlur: handleBlur, onChange: handleChange, onClickDisclosure: onClickDisclosure, type: "text", value: value, disclosureTitle: disclosureTitle, disclosureText: disclosureText, size: size }, props, filterAttrs(props))),
|
|
15452
15458
|
React.createElement(Root2$3, __assign({ open: showCalendar, onOpenChange: handleCalendarOpenChange }, filterAttrs(props)),
|
|
15453
15459
|
React.createElement(Anchor2$1, null),
|
|
15454
15460
|
React.createElement(Portal$5, { container: themeElement },
|
|
@@ -17916,7 +17922,6 @@ var Trigger$1 = DropdownMenuTrigger;
|
|
|
17916
17922
|
var Portal2 = DropdownMenuPortal;
|
|
17917
17923
|
var Content2$1 = DropdownMenuContent;
|
|
17918
17924
|
var Group2 = DropdownMenuGroup;
|
|
17919
|
-
var Label2 = DropdownMenuLabel;
|
|
17920
17925
|
var Item2 = DropdownMenuItem;
|
|
17921
17926
|
var CheckboxItem2 = DropdownMenuCheckboxItem;
|
|
17922
17927
|
var RadioGroup2 = DropdownMenuRadioGroup;
|
|
@@ -17996,14 +18001,6 @@ var MenuFooter = function (_a) {
|
|
|
17996
18001
|
return (React.createElement("div", { className: "arc-MenuFooter", style: {
|
|
17997
18002
|
position: "relative",
|
|
17998
18003
|
} },
|
|
17999
|
-
React.createElement("div", { style: {
|
|
18000
|
-
height: "12px",
|
|
18001
|
-
background: "linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))",
|
|
18002
|
-
position: "absolute",
|
|
18003
|
-
width: "100%",
|
|
18004
|
-
zIndex: 3,
|
|
18005
|
-
top: -12,
|
|
18006
|
-
} }),
|
|
18007
18004
|
React.createElement("div", { className: "arc-MenuSeparator", style: { paddingTop: 0 } },
|
|
18008
18005
|
React.createElement(Rule, null)),
|
|
18009
18006
|
React.createElement(Item2, { className: "arc-MenuItem", "aria-label": ariaLabel, onClick: onClick, disabled: isDisabled },
|
|
@@ -18029,14 +18026,7 @@ var MenuHeader = function (_a) {
|
|
|
18029
18026
|
React.createElement("div", { className: "arc-MenuSeparator", style: {
|
|
18030
18027
|
paddingBottom: 0,
|
|
18031
18028
|
} },
|
|
18032
|
-
React.createElement(Rule, null)
|
|
18033
|
-
React.createElement("div", { style: {
|
|
18034
|
-
height: "12px",
|
|
18035
|
-
background: "linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))",
|
|
18036
|
-
position: "absolute",
|
|
18037
|
-
width: "100%",
|
|
18038
|
-
zIndex: 3,
|
|
18039
|
-
} }))));
|
|
18029
|
+
React.createElement(Rule, null))));
|
|
18040
18030
|
};
|
|
18041
18031
|
|
|
18042
18032
|
/**
|
|
@@ -18059,7 +18049,8 @@ var MenuItem = function (_a) {
|
|
|
18059
18049
|
*/
|
|
18060
18050
|
var MenuLabel = function (_a) {
|
|
18061
18051
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
18062
|
-
return (React.createElement(
|
|
18052
|
+
return (React.createElement(Item2, __assign({ asChild: true, className: "arc-MenuLabel", tabIndex: 0, role: "presentation" }, filterAttrs(props), { style: { pointerEvents: "none" } }),
|
|
18053
|
+
React.createElement("div", null, children)));
|
|
18063
18054
|
};
|
|
18064
18055
|
|
|
18065
18056
|
/**
|
|
@@ -18223,7 +18214,7 @@ var MenuSubTrigger = function (_a) {
|
|
|
18223
18214
|
*/
|
|
18224
18215
|
var MenuTrigger = function (_a) {
|
|
18225
18216
|
var children = _a.children, asChild = _a.asChild, props = __rest(_a, ["children", "asChild"]);
|
|
18226
|
-
return (React.createElement(Trigger$1, __assign({ className: "
|
|
18217
|
+
return (React.createElement(Trigger$1, __assign({ className: "arc-MenuTrigger", asChild: asChild }, filterAttrs(props)), children));
|
|
18227
18218
|
};
|
|
18228
18219
|
|
|
18229
18220
|
/** Use `Modal` to display information that needs immediate action from a user. */
|
|
@@ -18743,18 +18734,17 @@ var useRadioContext = function () {
|
|
|
18743
18734
|
* Use `RadioGroup` to wrap and control radio buttons and apply default values
|
|
18744
18735
|
*/
|
|
18745
18736
|
var RadioGroup = function (_a) {
|
|
18746
|
-
var children = _a.children, checkedValue = _a.checkedValue, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, id = _a.id, errorMessage = _a.errorMessage, _c = _a.isRequired, isRequired = _c === void 0 ? true : _c, helper = _a.helper, label = _a.label,
|
|
18737
|
+
var children = _a.children, checkedValue = _a.checkedValue, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, id = _a.id, errorMessage = _a.errorMessage, _c = _a.isRequired, isRequired = _c === void 0 ? true : _c, helper = _a.helper, label = _a.label, 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", "errorMessage", "isRequired", "helper", "label", "name", "onBlur", "onChange", "size"]);
|
|
18747
18738
|
return (React.createElement(Provider$2, { value: {
|
|
18748
18739
|
blurEvent: onBlur,
|
|
18749
18740
|
changeEvent: onChange,
|
|
18750
18741
|
groupDisabled: isDisabled,
|
|
18751
18742
|
checkedValue: checkedValue,
|
|
18752
|
-
labelSize: labelSize,
|
|
18753
18743
|
name: name,
|
|
18754
18744
|
size: size,
|
|
18755
18745
|
} },
|
|
18756
18746
|
React.createElement("div", __assign({ className: "arc-RadioGroup" }, filterAttrs(props)),
|
|
18757
|
-
React.createElement(FormControl, { elementType: "fieldset", label: label, labelSize:
|
|
18747
|
+
React.createElement(FormControl, { elementType: "fieldset", label: label, labelSize: size, helper: helper, id: id, requirementStatus: isRequired ? "required" : "optional", helperUnderLabel: true, errorMessage: isRequired && checkedValue === "" ? errorMessage : "" },
|
|
18758
18748
|
React.createElement("span", { className: "arc-RadioGroup-radioButtonContainer" }, children)))));
|
|
18759
18749
|
};
|
|
18760
18750
|
|
|
@@ -18787,11 +18777,11 @@ var RadioGroupButton = React.forwardRef(function (_a, ref) {
|
|
|
18787
18777
|
*/
|
|
18788
18778
|
var RadioGroupInput = React.forwardRef(function (_a, ref) {
|
|
18789
18779
|
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"]);
|
|
18790
|
-
var _c = useRadioContext(), blurEvent = _c.blurEvent, changeEvent = _c.changeEvent, groupDisabled = _c.groupDisabled, checkedValue = _c.checkedValue,
|
|
18780
|
+
var _c = useRadioContext(), blurEvent = _c.blurEvent, changeEvent = _c.changeEvent, groupDisabled = _c.groupDisabled, checkedValue = _c.checkedValue, name = _c.name, size = _c.size;
|
|
18791
18781
|
var isChecked = checkedValue === value ? true : false;
|
|
18792
18782
|
var checked = typeof changeEvent !== "function" ? undefined : isChecked;
|
|
18793
18783
|
var defaultChecked = typeof changeEvent !== "function" ? isChecked : undefined;
|
|
18794
|
-
return (React.createElement(RadioGroupButton, __assign({ withMargin: true, ref: ref, id: id, name: name, helper: helper, isDisabled: isDisabled || groupDisabled,
|
|
18784
|
+
return (React.createElement(RadioGroupButton, __assign({ withMargin: true, ref: ref, id: id, name: name, helper: helper, isDisabled: isDisabled || groupDisabled, size: size, radioButtonAlignment: radioButtonAlignment, label: label, defaultChecked: defaultChecked, checked: checked, changeEvent: changeEvent, blurEvent: blurEvent, value: value }, props)));
|
|
18795
18785
|
});
|
|
18796
18786
|
|
|
18797
18787
|
/**
|
|
@@ -18844,7 +18834,7 @@ var Section = function (_a) {
|
|
|
18844
18834
|
/** Use `Select` to choose from a dropdown list of options. */
|
|
18845
18835
|
var Select = function (_a) {
|
|
18846
18836
|
var _b;
|
|
18847
|
-
var isRequired = _a.isRequired, isDisabled = _a.isDisabled, placeholder = _a.placeholder, label = _a.label, value = _a.value, _c = _a.ariaLabel, ariaLabel = _c === void 0 ? label : _c, options = _a.options, onOpenChange = _a.onOpenChange, isDefaultOpen = _a.isDefaultOpen, defaultValue = _a.defaultValue, errorMessage = _a.errorMessage,
|
|
18837
|
+
var isRequired = _a.isRequired, isDisabled = _a.isDisabled, placeholder = _a.placeholder, label = _a.label, value = _a.value, _c = _a.ariaLabel, ariaLabel = _c === void 0 ? label : _c, options = _a.options, onOpenChange = _a.onOpenChange, isDefaultOpen = _a.isDefaultOpen, defaultValue = _a.defaultValue, errorMessage = _a.errorMessage, _d = _a.size, size = _d === void 0 ? "m" : _d, helper = _a.helper, hideLabel = _a.hideLabel, name = _a.name, width = _a.width, isFluid = _a.isFluid, onBlur = _a.onBlur, onFocus = _a.onFocus, onChange = _a.onChange, open = _a.open, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, props = __rest(_a, ["isRequired", "isDisabled", "placeholder", "label", "value", "ariaLabel", "options", "onOpenChange", "isDefaultOpen", "defaultValue", "errorMessage", "size", "helper", "hideLabel", "name", "width", "isFluid", "onBlur", "onFocus", "onChange", "open", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
|
|
18848
18838
|
var id = React.useId();
|
|
18849
18839
|
var _e = useThemeElement(), themeElement = _e[0], setThemeElement = _e[1];
|
|
18850
18840
|
var surface = React.useContext(Context$3).surface;
|
|
@@ -18859,8 +18849,8 @@ var Select = function (_a) {
|
|
|
18859
18849
|
var _a;
|
|
18860
18850
|
return (_a = options.find(function (option) { return option.value === value; })) === null || _a === void 0 ? void 0 : _a.name;
|
|
18861
18851
|
};
|
|
18862
|
-
var getIconSize = function (
|
|
18863
|
-
switch (
|
|
18852
|
+
var getIconSize = function (size) {
|
|
18853
|
+
switch (size) {
|
|
18864
18854
|
case "s":
|
|
18865
18855
|
return 16;
|
|
18866
18856
|
case "l":
|
|
@@ -18869,7 +18859,7 @@ var Select = function (_a) {
|
|
|
18869
18859
|
return 20;
|
|
18870
18860
|
}
|
|
18871
18861
|
};
|
|
18872
|
-
return (React.createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, label: label, hideLabel: hideLabel, labelSize:
|
|
18862
|
+
return (React.createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, label: label, hideLabel: hideLabel, labelSize: size, requirementStatus: isRequired ? "required" : "optional", isDisabled: isDisabled, disclosureText: disclosureText, disclosureTitle: disclosureTitle, onClickDisclosure: onClickDisclosure },
|
|
18873
18863
|
React.createElement(Root2$2, { name: name, required: isRequired, disabled: isDisabled, defaultOpen: isDefaultOpen, value: selectValue, open: open, onOpenChange: onOpenChange, onValueChange: function (value) { return onValueChange(value); } },
|
|
18874
18864
|
React.createElement("div", { ref: setThemeElement, className: "arc-Select-wrapper" },
|
|
18875
18865
|
React.createElement(Trigger$2, __assign({ id: id, name: name, onBlur: onBlur, onFocus: onFocus, "aria-label": ariaLabel, style: { width: width, marginTop: hideLabel ? 0 : undefined }, className: classNames("arc-Select-trigger", (_b = {
|
|
@@ -18877,28 +18867,24 @@ var Select = function (_a) {
|
|
|
18877
18867
|
"arc-Select-trigger--onDarkSurface": surface === "dark",
|
|
18878
18868
|
"arc-Select-trigger--invalid": errorMessage
|
|
18879
18869
|
},
|
|
18880
|
-
_b["arc-Select-trigger--size".concat(
|
|
18870
|
+
_b["arc-Select-trigger--size".concat(size && size.toUpperCase())] = size && size !== "m",
|
|
18881
18871
|
_b)), "aria-describedby": id + (disclosureText ? "-disclosure" : "-helper") }, filterAttrs(props)),
|
|
18882
18872
|
React.createElement(Value, { className: "arc-Select-triggerText", placeholder: placeholder, "aria-label": getSelectedValueName(uncontrolledValue) }),
|
|
18883
18873
|
React.createElement(Icon, { className: "arc-Select-triggerIcon" },
|
|
18884
|
-
React.createElement(ThemeIcon, { size: getIconSize(
|
|
18874
|
+
React.createElement(ThemeIcon, { size: getIconSize(size), icon: "selectTrigger" }))),
|
|
18885
18875
|
React.createElement(Portal$4, { container: themeElement },
|
|
18886
18876
|
React.createElement(Content2$3, { sideOffset: 5, position: "popper", className: classNames("arc-Select-content", {
|
|
18887
18877
|
"arc-Select-content--onDarkSurface": surface === "dark",
|
|
18888
18878
|
}) },
|
|
18889
|
-
React.createElement(
|
|
18890
|
-
React.createElement(ThemeIcon, { size: 16, icon: "selectScrollUp" })),
|
|
18891
|
-
React.createElement(Viewport, null, options.map(function (_a, i) {
|
|
18879
|
+
React.createElement(Viewport, { className: "arc-Select-content--scrollable" }, options.map(function (_a, i) {
|
|
18892
18880
|
var name = _a.name, value = _a.value;
|
|
18893
18881
|
return (React.createElement(Item$1, { className: "arc-Select-item", key: "select-item-".concat(i), value: value },
|
|
18894
18882
|
React.createElement("div", { className: "arc-Select-itemTextWrapper" },
|
|
18895
18883
|
React.createElement(ItemText, { asChild: true },
|
|
18896
18884
|
React.createElement("span", { className: "arc-Select-itemText" }, name))),
|
|
18897
|
-
React.createElement(ItemIndicator$1,
|
|
18898
|
-
React.createElement(ThemeIcon, { size:
|
|
18899
|
-
}))
|
|
18900
|
-
React.createElement(ScrollDownButton, { className: "arc-Select-scrollButton" },
|
|
18901
|
-
React.createElement(ThemeIcon, { size: 16, icon: "selectScrollDown" }))))))));
|
|
18885
|
+
React.createElement(ItemIndicator$1, { className: "arc-Select-itemSelectIcon" },
|
|
18886
|
+
React.createElement(ThemeIcon, { size: 24, icon: "selectIndicator" }))));
|
|
18887
|
+
}))))))));
|
|
18902
18888
|
};
|
|
18903
18889
|
|
|
18904
18890
|
/**
|
|
@@ -18960,7 +18946,7 @@ var SiteFooterV2 = function (_a) {
|
|
|
18960
18946
|
|
|
18961
18947
|
/**
|
|
18962
18948
|
* Do not edit directly
|
|
18963
|
-
* Generated on
|
|
18949
|
+
* Generated on Tue, 10 Jun 2025 09:53:42 GMT
|
|
18964
18950
|
*/
|
|
18965
18951
|
var SemSizeBreakpointsM = "768px"; // Medium (MD) - 768px to 991px: This is commonly used for larger tablets and smaller desktop screens.
|
|
18966
18952
|
|
|
@@ -19797,8 +19783,9 @@ const $6be4966fd9bbc698$export$6521433ed15a34db = $6be4966fd9bbc698$export$4d07b
|
|
|
19797
19783
|
|
|
19798
19784
|
/** Use `Switch` to allow users to immediately toggle between two states. */
|
|
19799
19785
|
var Switch = function (_a) {
|
|
19800
|
-
var
|
|
19801
|
-
var
|
|
19786
|
+
var _b;
|
|
19787
|
+
var defaultChecked = _a.defaultChecked, onCheckedChange = _a.onCheckedChange, label = _a.label, _c = _a.labelPosition, labelPosition = _c === void 0 ? "top" : _c, name = _a.name, onBlur = _a.onBlur, value = _a.value, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, errorMessage = _a.errorMessage, id = _a.id, _e = _a.size, size = _e === void 0 ? "m" : _e, onStatusText = _a.onStatusText, offStatusText = _a.offStatusText, _f = _a.hideLabel, hideLabel = _f === void 0 ? false : _f, ariaLabel = _a.ariaLabel, props = __rest(_a, ["defaultChecked", "onCheckedChange", "label", "labelPosition", "name", "onBlur", "value", "isDisabled", "errorMessage", "id", "size", "onStatusText", "offStatusText", "hideLabel", "ariaLabel"]);
|
|
19788
|
+
var _g = React.useState(defaultChecked), switchState = _g[0], setSwitchState = _g[1];
|
|
19802
19789
|
var surface = React.useContext(Context$3).surface;
|
|
19803
19790
|
if (!onStatusText) {
|
|
19804
19791
|
onStatusText = offStatusText;
|
|
@@ -19810,11 +19797,11 @@ var Switch = function (_a) {
|
|
|
19810
19797
|
setSwitchState(function (previous) { return !previous; });
|
|
19811
19798
|
onCheckedChange && onCheckedChange(checked);
|
|
19812
19799
|
};
|
|
19813
|
-
return (React.createElement(FormControl, { errorMessage: errorMessage, htmlFor: id, isDisabled: isDisabled, label: label, hideLabel: hideLabel, labelSize:
|
|
19814
|
-
!hideLabel && React.createElement(VerticalSpace, { size: "
|
|
19800
|
+
return (React.createElement(FormControl, { errorMessage: errorMessage, htmlFor: id, isDisabled: isDisabled, label: label, hideLabel: hideLabel, labelSize: size, labelPosition: labelPosition, requirementStatus: "not-applicable" },
|
|
19801
|
+
!hideLabel && React.createElement(VerticalSpace, { size: "12" }),
|
|
19815
19802
|
React.createElement("div", { className: "arc-Switch-container" },
|
|
19816
19803
|
React.createElement($6be4966fd9bbc698$export$be92b6f5f03c0fe9, __assign({ id: id, defaultChecked: defaultChecked, name: name, value: value, onBlur: onBlur, onCheckedChange: onCheckedHandler, checked: switchState, disabled: isDisabled, className: classNames("arc-Switch", {
|
|
19817
|
-
"arc-Switch--
|
|
19804
|
+
"arc-Switch--medium": size === "m",
|
|
19818
19805
|
"arc-Switch--isDisabled": isDisabled,
|
|
19819
19806
|
"arc-Switch--onDarkSurface": surface === "dark",
|
|
19820
19807
|
}), "aria-label": ariaLabel }, filterAttrs(props)),
|
|
@@ -19822,12 +19809,14 @@ var Switch = function (_a) {
|
|
|
19822
19809
|
React.createElement($6be4966fd9bbc698$export$6521433ed15a34db, { className: "arc-Switch-thumb" },
|
|
19823
19810
|
React.createElement("div", { className: "arc-Switch-thumbIcon" },
|
|
19824
19811
|
React.createElement("div", { className: "arc-Switch-icon", "data-testid": "arc-switch-thumb-icon" },
|
|
19825
|
-
React.createElement(ThemeIcon, { icon: "switchToggle", color: "brand", size:
|
|
19826
|
-
React.createElement("div", { className: classNames("arc-Switch-statusText", {
|
|
19827
|
-
|
|
19828
|
-
|
|
19829
|
-
|
|
19830
|
-
|
|
19812
|
+
React.createElement(ThemeIcon, { icon: "switchToggle", color: "brand", size: size === "m" ? 32 : 24 }))))),
|
|
19813
|
+
React.createElement("div", { className: classNames("arc-Switch-statusText", (_b = {
|
|
19814
|
+
"arc-Switch-statusText--isDisabled": isDisabled,
|
|
19815
|
+
"arc-Switch-statusText--onDarkSurface": surface === "dark"
|
|
19816
|
+
},
|
|
19817
|
+
_b["arc-Switch-statusText--".concat(size)] = size === "m",
|
|
19818
|
+
_b)) },
|
|
19819
|
+
React.createElement("p", { "aria-hidden": true }, switchState ? onStatusText : offStatusText))))));
|
|
19831
19820
|
};
|
|
19832
19821
|
|
|
19833
19822
|
var TabbedBanner = function (_a) {
|
|
@@ -20024,7 +20013,7 @@ var TextArea = React.forwardRef(function (_a, ref) {
|
|
|
20024
20013
|
var package_default = {
|
|
20025
20014
|
name: "@arc-ui/helpers",
|
|
20026
20015
|
private: true,
|
|
20027
|
-
version: "12.0.0-beta.
|
|
20016
|
+
version: "12.0.0-beta.19",
|
|
20028
20017
|
type: "module",
|
|
20029
20018
|
homepage: "https://ui.digital-ent-int.bt.com",
|
|
20030
20019
|
author: "BT Enterprise Digital UI Team <ui-digital-ent-int@bt.com>",
|