@arc-ui/components 12.0.0 → 13.0.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/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 +3 -3
- package/lib/Banner/Banner.mjs +3 -3
- package/lib/Box/styles.css +1 -1
- package/lib/BrandLogo/styles.css +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.cjs +7 -7
- package/lib/Breadcrumbs/Breadcrumbs.mjs +7 -7
- package/lib/Breadcrumbs/styles.css +1 -1
- package/lib/Button/Button.cjs +1 -1
- package/lib/Button/Button.mjs +1 -1
- package/lib/Button/styles.css +1 -1
- package/lib/ButtonGroup/ButtonGroup.cjs +6 -3
- package/lib/ButtonGroup/ButtonGroup.mjs +6 -3
- package/lib/ButtonGroup/styles.css +1 -1
- package/lib/ButtonV2/ButtonV2.cjs +1 -1
- package/lib/ButtonV2/ButtonV2.mjs +1 -1
- package/lib/ButtonV2/styles.css +1 -1
- package/lib/Calendar/Calendar.cjs +6 -6
- package/lib/Calendar/Calendar.mjs +6 -6
- package/lib/Calendar/styles.css +1 -1
- package/lib/CardFooter/styles.css +1 -1
- package/lib/CardHeading/CardHeading.cjs +1 -1
- package/lib/CardHeading/CardHeading.mjs +1 -1
- package/lib/CardHeading/styles.css +1 -1
- package/lib/Carousel/Carousel.cjs +348 -8
- package/lib/Carousel/Carousel.mjs +348 -8
- package/lib/Carousel/styles.css +1 -1
- package/lib/Checkbox/Checkbox.cjs +7 -7
- package/lib/Checkbox/Checkbox.mjs +8 -8
- package/lib/Checkbox/styles.css +1 -1
- package/lib/CheckboxIcon/CheckboxIcon.cjs +1 -1
- package/lib/CheckboxIcon/CheckboxIcon.mjs +1 -1
- package/lib/CheckboxIcon/styles.css +1 -1
- package/lib/Columns/styles.css +1 -1
- package/lib/ComboBox/ComboBox.cjs +13 -13
- package/lib/ComboBox/ComboBox.mjs +14 -14
- package/lib/ComboBox/styles.css +1 -1
- package/lib/ContentSwitcher/ContentSwitcher.cjs +1 -1
- package/lib/ContentSwitcher/ContentSwitcher.mjs +4 -4
- package/lib/ContentSwitcher/styles.css +1 -1
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.cjs +7 -7
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.mjs +7 -7
- package/lib/ContentSwitcherDropdown/styles.css +1 -1
- package/lib/DatePicker/DatePicker.cjs +18 -18
- package/lib/DatePicker/DatePicker.mjs +19 -19
- 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/Drawer.cjs +36 -28
- package/lib/Drawer/Drawer.mjs +36 -28
- package/lib/Drawer/styles.css +1 -1
- package/lib/Elevation/styles.css +1 -1
- package/lib/Filter/styles.css +1 -1
- package/lib/FormControl/styles.css +1 -1
- package/lib/GhostedHeroBanner/GhostedHeroBanner.cjs +2 -2
- package/lib/GhostedHeroBanner/GhostedHeroBanner.mjs +2 -2
- package/lib/GhostedHeroBanner/styles.css +1 -1
- package/lib/GradientPageBackground/GradientPageBackground.cjs +3 -3
- package/lib/GradientPageBackground/GradientPageBackground.mjs +3 -3
- package/lib/GradientPageBackground/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 +3 -3
- package/lib/HeroBanner/HeroBanner.mjs +3 -3
- package/lib/HeroBanner/styles.css +1 -1
- package/lib/HeroButton/HeroButton.cjs +3 -3
- package/lib/HeroButton/HeroButton.mjs +4 -4
- package/lib/HeroButton/styles.css +1 -1
- package/lib/Hidden/styles.css +1 -1
- package/lib/HorizontalCard/HorizontalCard.cjs +1 -1
- package/lib/HorizontalCard/HorizontalCard.mjs +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/ImpactCard.cjs +4 -4
- package/lib/ImpactCard/ImpactCard.mjs +4 -4
- package/lib/ImpactCard/styles.css +1 -1
- package/lib/InformationCard/InformationCard.cjs +7 -7
- package/lib/InformationCard/InformationCard.mjs +7 -7
- 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 +5 -5
- package/lib/MediaCard/MediaCard.mjs +5 -5
- package/lib/MediaCard/styles.css +1 -1
- package/lib/Menu/Menu.cjs +17 -16
- package/lib/Menu/Menu.mjs +17 -16
- package/lib/Menu/styles.css +1 -1
- package/lib/Modal/Modal.cjs +7 -7
- package/lib/Modal/Modal.mjs +7 -7
- package/lib/Modal/styles.css +1 -1
- package/lib/NavigationHeader/NavigationHeader.cjs +38 -50
- package/lib/NavigationHeader/NavigationHeader.mjs +39 -51
- package/lib/NavigationHeader/styles.css +1 -1
- package/lib/Pagination/styles.css +1 -1
- package/lib/PaginationSimple/styles.css +1 -1
- package/lib/Popover/Popover.cjs +7 -7
- package/lib/Popover/Popover.mjs +7 -7
- package/lib/Popover/styles.css +1 -1
- package/lib/Poster/styles.css +1 -1
- package/lib/ProgressBar/ProgressBar.cjs +2 -2
- package/lib/ProgressBar/ProgressBar.mjs +2 -2
- package/lib/ProgressBar/styles.css +1 -1
- package/lib/ProgressStepper/ProgressStepper.cjs +2 -2
- package/lib/ProgressStepper/ProgressStepper.mjs +2 -2
- package/lib/ProgressStepper/styles.css +1 -1
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.cjs +76 -121
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.mjs +77 -123
- package/lib/ProgressStepperOverflow/styles.css +1 -1
- package/lib/RadioCardGroup/RadioCardGroup.cjs +12 -8
- package/lib/RadioCardGroup/RadioCardGroup.mjs +12 -8
- package/lib/RadioCardGroup/styles.css +1 -1
- package/lib/RadioGroup/RadioGroup.cjs +6 -6
- package/lib/RadioGroup/RadioGroup.mjs +7 -7
- package/lib/RadioGroup/styles.css +1 -1
- package/lib/Rule/Rule.cjs +1 -1
- package/lib/Rule/Rule.mjs +1 -1
- package/lib/Rule/styles.css +1 -1
- package/lib/ScrollToTop/ScrollToTop.cjs +1 -1
- package/lib/ScrollToTop/ScrollToTop.mjs +1 -1
- package/lib/ScrollToTop/styles.css +1 -1
- package/lib/Section/styles.css +1 -1
- package/lib/Select/Select.cjs +6 -6
- package/lib/Select/Select.mjs +6 -6
- package/lib/Select/styles.css +1 -1
- package/lib/SemanticHeading/styles.css +1 -1
- package/lib/SiteFooter/styles.css +1 -1
- package/lib/SiteFooterV2/SiteFooterV2.cjs +1 -1
- package/lib/SiteFooterV2/SiteFooterV2.mjs +1 -1
- package/lib/SiteFooterV2/styles.css +1 -1
- package/lib/SiteHeaderV2/SiteHeaderV2.cjs +13 -9
- package/lib/SiteHeaderV2/SiteHeaderV2.mjs +13 -9
- package/lib/SiteHeaderV2/styles.css +1 -1
- package/lib/Skeleton/styles.css +1 -1
- package/lib/SkipLink/SkipLink.cjs +2 -2
- package/lib/SkipLink/SkipLink.mjs +3 -3
- 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.mjs +1 -1
- package/lib/Switch/styles.css +1 -1
- package/lib/TabbedBanner/TabbedBanner.cjs +9 -9
- package/lib/TabbedBanner/TabbedBanner.mjs +12 -12
- package/lib/TabbedBanner/styles.css +1 -1
- package/lib/Tabs/Tabs.mjs +3 -3
- package/lib/Tabs/styles.css +1 -1
- package/lib/Tag/styles.css +1 -1
- package/lib/TemplateBanner/TemplateBanner.cjs +1 -1
- package/lib/TemplateBanner/TemplateBanner.mjs +1 -1
- package/lib/TemplateBanner/styles.css +1 -1
- package/lib/Text/styles.css +1 -1
- package/lib/TextArea/TextArea.cjs +3 -3
- package/lib/TextArea/TextArea.mjs +4 -4
- package/lib/TextArea/styles.css +1 -1
- package/lib/TextInput/TextInput.cjs +4 -4
- package/lib/TextInput/TextInput.mjs +4 -4
- 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/Toast.mjs +2 -2
- package/lib/Toast/styles.css +1 -1
- package/lib/Tooltip/Tooltip.cjs +3 -3
- package/lib/Tooltip/Tooltip.mjs +3 -3
- package/lib/Tooltip/styles.css +1 -1
- package/lib/Truncate/styles.css +1 -1
- package/lib/TypographyCard/TypographyCard.cjs +4 -4
- package/lib/TypographyCard/TypographyCard.mjs +4 -4
- package/lib/TypographyCard/styles.css +1 -1
- package/lib/UniversalHeader/styles.css +1 -1
- package/lib/VerticalSpace/styles.css +1 -1
- package/lib/VideoPlayer/VideoPlayer.cjs +3 -3
- package/lib/VideoPlayer/VideoPlayer.mjs +3 -3
- 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/{Button-BN4jUsg5.cjs → Button-CrevzrTg.cjs} +3 -3
- package/lib/_shared/cjs/{ButtonV2-bUu36xW8.cjs → ButtonV2-CxyploaQ.cjs} +3 -3
- package/lib/_shared/cjs/{Calendar-BvPNEvfm.cjs → Calendar-CdLn9iv6.cjs} +7 -7
- package/lib/_shared/cjs/{CardHeading-lGy1u6eD.cjs → CardHeading-C84m67_F.cjs} +2 -2
- package/lib/_shared/cjs/{CheckboxIcon-BTkdXfpp.cjs → CheckboxIcon-BzY1S_ud.cjs} +6 -5
- package/lib/_shared/cjs/{Combination-6m6aOXZq.cjs → Combination-Cm62lfyr.cjs} +1 -1
- package/lib/_shared/cjs/{ContentSwitcherDropdown-BLXyhXVS.cjs → ContentSwitcherDropdown-6IGRpV54.cjs} +2 -2
- package/lib/_shared/cjs/{ContentSwitcherList-BgAW2IhJ.cjs → ContentSwitcherList-Di7RS8ue.cjs} +28 -17
- package/lib/_shared/cjs/{Popover-CYcqjefw.cjs → Popover-BtvRErpC.cjs} +7 -4
- package/lib/_shared/cjs/{ProgressStepper-DTZQabiV.cjs → ProgressStepper-Cs6vX7Th.cjs} +19 -18
- package/lib/_shared/cjs/{Rule-jmvOpci7.cjs → Rule-essaguo_.cjs} +2 -2
- package/lib/_shared/cjs/{TemplateBanner-CzDAL0lq.cjs → TemplateBanner-DyXBKuMw.cjs} +2 -2
- package/lib/_shared/cjs/{TextInput-BHzuoI7E.cjs → TextInput-C_K2PLf5.cjs} +6 -6
- package/lib/_shared/cjs/{Tooltip-CEb7YEP2.cjs → Tooltip-CdmWvrnr.cjs} +2 -2
- package/lib/_shared/cjs/{arc-breakpoints-Cl4-g1TC.cjs → arc-breakpoints-uADxN-b4.cjs} +1 -1
- package/lib/_shared/cjs/{index-BGGFOAAx.cjs → index-BBDa9gnQ.cjs} +2 -2
- package/lib/_shared/cjs/{index-D9onmVh5.cjs → index-BDUrOKEW.cjs} +3 -3
- package/lib/_shared/cjs/{index-CklPiHsS.cjs → index-B_WZUATb.cjs} +2 -2
- package/lib/_shared/cjs/{index-B11wQrRa.cjs → index-BdJeAKfz.cjs} +1 -1
- package/lib/_shared/cjs/{index-CDVpHNP8.cjs → index-Dgn0408w.cjs} +4 -4
- package/lib/_shared/cjs/{index-DXNM3D1d.cjs → index-DlWZZNwu.cjs} +2 -2
- package/lib/_shared/cjs/{index-BWfgSvRQ.cjs → index-DsqYRMfM.cjs} +4 -4
- package/lib/_shared/cjs/{index-KrMgv4q_.cjs → index-WO7l1Mfx.cjs} +3 -3
- package/lib/_shared/cjs/{index.es-Dbvw_3_e.cjs → index.es-BAsay4oe.cjs} +1 -1
- package/lib/_shared/cjs/{use-media-query-DqZqShGX.cjs → use-media-query-BJV2IbHi.cjs} +4 -4
- package/lib/_shared/esm/{Button-DTiOFT9M.mjs → Button-Benn9Qop.mjs} +4 -4
- package/lib/_shared/esm/{ButtonV2-ByW5P8Hq.mjs → ButtonV2-CgjYgfZA.mjs} +4 -4
- package/lib/_shared/esm/{Calendar-DzsQqJlh.mjs → Calendar-CzFIMyD1.mjs} +8 -8
- package/lib/_shared/esm/{CardHeading-CfPEEmBO.mjs → CardHeading-CV14vmox.mjs} +2 -2
- package/lib/_shared/esm/{CheckboxIcon-BcVQe6mC.mjs → CheckboxIcon-CzRn1j8X.mjs} +6 -5
- package/lib/_shared/esm/{Combination-BQ4XBtF-.mjs → Combination-BW0YAEZD.mjs} +1 -1
- package/lib/_shared/esm/{ContentSwitcherDropdown-ckPG4pry.mjs → ContentSwitcherDropdown-CwoMd63a.mjs} +2 -2
- package/lib/_shared/esm/{ContentSwitcherList-i4m4nAzP.mjs → ContentSwitcherList-Bvp9Zl85.mjs} +30 -19
- package/lib/_shared/esm/{Popover-BHCEpLSa.mjs → Popover-DRQSgAog.mjs} +7 -4
- package/lib/_shared/esm/{ProgressStepper-CujHLQsm.mjs → ProgressStepper-DTPHHVFe.mjs} +20 -19
- package/lib/_shared/esm/{Rule-I1w3EaZi.mjs → Rule-Bz3QPezk.mjs} +3 -3
- package/lib/_shared/esm/{TemplateBanner-CZSTdma0.mjs → TemplateBanner-BPzuH5bz.mjs} +2 -2
- package/lib/_shared/esm/{TextInput-CZaNXVHl.mjs → TextInput-BCvKXfM_.mjs} +8 -8
- package/lib/_shared/esm/{Tooltip-BpSzN3Tx.mjs → Tooltip-DY8nS1to.mjs} +2 -2
- package/lib/_shared/esm/{arc-breakpoints-Br78xe-f.mjs → arc-breakpoints-ChQgbftE.mjs} +1 -1
- package/lib/_shared/esm/{index-u47CK8Y0.mjs → index-B3ewsmrD.mjs} +2 -2
- package/lib/_shared/esm/{index-GCEHSsY8.mjs → index-BMmvMegf.mjs} +2 -2
- package/lib/_shared/esm/{index-DXHprNQ6.mjs → index-C_mwuZg6.mjs} +1 -1
- package/lib/_shared/esm/{index-BWkI4Dwz.mjs → index-CfXVJXLq.mjs} +3 -3
- package/lib/_shared/esm/{index-CWHcEz3_.mjs → index-Cgsjp3NL.mjs} +1 -1
- package/lib/_shared/esm/{index-CN4hP3Wu.mjs → index-CjeQnMcn.mjs} +3 -3
- package/lib/_shared/esm/{index-BFKdmv_g.mjs → index-DNvlT7G_.mjs} +3 -3
- package/lib/_shared/esm/{index-Do2wfP-X.mjs → index-Dd3yZ_Kk.mjs} +4 -4
- package/lib/_shared/esm/{index-vnVJe9rH.mjs → index-Dfz5UgHo.mjs} +4 -4
- package/lib/_shared/esm/{index-Bz2JQq34.mjs → index-DkAfUbDx.mjs} +2 -2
- package/lib/_shared/esm/{index-6HtUz28p.mjs → index-Drb5ngQr.mjs} +1 -1
- package/lib/_shared/esm/{index.es-f0R-yhhl.mjs → index.es-99J0r2va.mjs} +2 -2
- package/lib/_shared/esm/{use-media-query-BmsMeo2M.mjs → use-media-query-l6Sou0dd.mjs} +4 -4
- package/lib/index.cjs +662 -346
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +1063 -328
- package/lib/index.d.mts +1063 -328
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +663 -348
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +2 -2
- package/lib/use-media-query/use-media-query.cjs +1 -1
- package/lib/use-media-query/use-media-query.mjs +1 -1
- package/package.json +14 -12
- package/lib/_shared/cjs/capitalise-first-letter-CdhexpSx.cjs +0 -8
- package/lib/_shared/esm/capitalise-first-letter-Cubg2CS1.mjs +0 -6
|
@@ -9,15 +9,16 @@ var FormControl = require('./FormControl-TtboqHRx.cjs');
|
|
|
9
9
|
|
|
10
10
|
/** Use `CheckboxIcon` to display a visual checkbox indicator that reflects a checked, unchecked, or indeterminate state. */
|
|
11
11
|
var CheckboxIcon = function (_a) {
|
|
12
|
-
var id = _a.id, name = _a.name, checked = _a.checked, _b = _a.indeterminate, indeterminate = _b === void 0 ? false : _b, isDisabled = _a.isDisabled, isRequired = _a.isRequired, _c = _a.size, size = _c === void 0 ? "m" : _c, value = _a.value, error = _a.error, ariaDescribedBy = _a.ariaDescribedBy, onBlur = _a.onBlur, onChange = _a.onChange, props = tslib_es6.__rest(_a, ["id", "name", "checked", "indeterminate", "isDisabled", "isRequired", "size", "value", "error", "ariaDescribedBy", "onBlur", "onChange"]);
|
|
12
|
+
var id = _a.id, name = _a.name, checked = _a.checked, _b = _a.indeterminate, indeterminate = _b === void 0 ? false : _b, isDisabled = _a.isDisabled, isRequired = _a.isRequired, _c = _a.size, size = _c === void 0 ? "m" : _c, value = _a.value, error = _a.error, ariaDescribedBy = _a.ariaDescribedBy, onBlur = _a.onBlur, onChange = _a.onChange, ref = _a.ref, props = tslib_es6.__rest(_a, ["id", "name", "checked", "indeterminate", "isDisabled", "isRequired", "size", "value", "error", "ariaDescribedBy", "onBlur", "onChange", "ref"]);
|
|
13
13
|
var requirementStatus = React.useContext(FormControl.Context).requirementStatus;
|
|
14
14
|
var internalRef = React.useRef(null);
|
|
15
15
|
var surface = React.useContext(Surface.Context).surface;
|
|
16
|
+
var inputRef = (ref || internalRef);
|
|
16
17
|
React.useEffect(function () {
|
|
17
|
-
if (
|
|
18
|
-
|
|
18
|
+
if (inputRef.current) {
|
|
19
|
+
inputRef.current.indeterminate = indeterminate;
|
|
19
20
|
}
|
|
20
|
-
}, [indeterminate, checked]);
|
|
21
|
+
}, [indeterminate, checked, inputRef]);
|
|
21
22
|
var tickSize = {
|
|
22
23
|
s: 14,
|
|
23
24
|
m: 18,
|
|
@@ -45,7 +46,7 @@ var CheckboxIcon = function (_a) {
|
|
|
45
46
|
? true
|
|
46
47
|
: indeterminate && checked
|
|
47
48
|
? "mixed"
|
|
48
|
-
: false, className: index.classNames("arc-CheckboxIcon-input"), disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref:
|
|
49
|
+
: false, className: index.classNames("arc-CheckboxIcon-input"), disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref: inputRef, required: isRequired, type: "checkbox", value: value }, checkedProps, props)),
|
|
49
50
|
React.createElement("span", { className: index.classNames("arc-CheckboxIcon-box") }, indeterminate ? (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "none" },
|
|
50
51
|
React.createElement("rect", { x: "4", y: "8", width: "7.51", height: "1", rx: "0.5", fill: "currentColor" }))) : (React.createElement(ThemeIcon.ThemeIcon, { icon: "checkboxChecked", size: tickSize[size] })))));
|
|
51
52
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-DlWZZNwu.cjs');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var ReactDOM = require('react-dom');
|
|
8
8
|
var tslib_es6 = require('./tslib.es6-CCZ3TN_7.cjs');
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var tslib_es6 = require('./tslib.es6-CCZ3TN_7.cjs');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var index$2 = require('./index-CTlXMLug.cjs');
|
|
6
|
-
var index$1 = require('./index-
|
|
6
|
+
var index$1 = require('./index-Dgn0408w.cjs');
|
|
7
7
|
var filterAttrs = require('./filter-attrs-D19P2s1V.cjs');
|
|
8
8
|
var ThemeIcon = require('./ThemeIcon-CwYN77IF.cjs');
|
|
9
|
-
var index = require('./index-
|
|
9
|
+
var index = require('./index-DlWZZNwu.cjs');
|
|
10
10
|
var VisuallyHidden = require('./VisuallyHidden-CQg3cOVK.cjs');
|
|
11
11
|
|
|
12
12
|
// src/get-text-width/get-text-width.ts
|
package/lib/_shared/cjs/{ContentSwitcherList-BgAW2IhJ.cjs → ContentSwitcherList-Di7RS8ue.cjs}
RENAMED
|
@@ -5,6 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var index = require('./index-BCu-VH8y.cjs');
|
|
6
6
|
var filterAttrs = require('./filter-attrs-D19P2s1V.cjs');
|
|
7
7
|
var Text = require('./Text-jwsn80lQ.cjs');
|
|
8
|
+
var Surface = require('./Surface-DIU5ciDT.cjs');
|
|
8
9
|
var debounce = require('./debounce-uPMetQ6J.cjs');
|
|
9
10
|
var index$1 = require('./index-CTlXMLug.cjs');
|
|
10
11
|
|
|
@@ -15,11 +16,12 @@ var ContentSwitcher = function (_a) {
|
|
|
15
16
|
React.createElement(index.$69cb30bb0017df05$export$be92b6f5f03c0fe9, tslib_es6.__assign({ className: "arc-ContentSwitcher-root", defaultValue: defaultValue, onValueChange: onValueChange, activationMode: activationMode, value: value }, filterAttrs.filterAttrs(props)), children)));
|
|
16
17
|
};
|
|
17
18
|
|
|
18
|
-
var ContentSwitcherTab =
|
|
19
|
-
var label = _a.label, value = _a.value, onClick = _a.onClick, onFocus = _a.onFocus, props = tslib_es6.__rest(_a, ["label", "value", "onClick", "onFocus"]);
|
|
20
|
-
return (React.createElement(
|
|
21
|
-
React.createElement(
|
|
22
|
-
});
|
|
19
|
+
var ContentSwitcherTab = function (_a) {
|
|
20
|
+
var label = _a.label, value = _a.value, onClick = _a.onClick, onFocus = _a.onFocus, ref = _a.ref, props = tslib_es6.__rest(_a, ["label", "value", "onClick", "onFocus", "ref"]);
|
|
21
|
+
return (React.createElement(Surface.Surface, { isTransparent: true },
|
|
22
|
+
React.createElement(index.$69cb30bb0017df05$export$41fb9f06171c75f4, tslib_es6.__assign({ className: "arc-ContentSwitcherTab", value: value, ref: ref, onClick: onClick, onFocus: onFocus }, filterAttrs.filterAttrs(props)),
|
|
23
|
+
React.createElement(Text.Text, { size: "m" }, label))));
|
|
24
|
+
};
|
|
23
25
|
|
|
24
26
|
var ContentSwitcherContent = function (_a) {
|
|
25
27
|
var children = _a.children, value = _a.value, _b = _a.hidden, hidden = _b === void 0 ? undefined : _b, _c = _a.forceMount, forceMount = _c === void 0 ? true : _c, props = tslib_es6.__rest(_a, ["children", "value", "hidden", "forceMount"]);
|
|
@@ -34,13 +36,6 @@ var ContentSwitcherList = function (_a) {
|
|
|
34
36
|
var _d = React.useState(0), contentSwitcherListWidth = _d[0], setContentSwitcherListWidth = _d[1];
|
|
35
37
|
var tabRefs = React.useRef([]);
|
|
36
38
|
var listRef = React.useRef(null);
|
|
37
|
-
var checkOverflow = function () {
|
|
38
|
-
if (listRef.current) {
|
|
39
|
-
setRightOverflow(listRef.current.scrollLeft + listRef.current.clientWidth <
|
|
40
|
-
listRef.current.scrollWidth - 1);
|
|
41
|
-
setLeftOverflow(listRef.current.scrollLeft > 0);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
39
|
var scrollTabIntoView = function (tabRef) {
|
|
45
40
|
if (tabRef.current && listRef.current) {
|
|
46
41
|
var scrollLeft = tabRef.current.offsetLeft -
|
|
@@ -59,6 +54,13 @@ var ContentSwitcherList = function (_a) {
|
|
|
59
54
|
}, 100);
|
|
60
55
|
React.useEffect(function () {
|
|
61
56
|
var list = listRef.current;
|
|
57
|
+
var checkOverflow = function () {
|
|
58
|
+
if (listRef.current) {
|
|
59
|
+
setRightOverflow(listRef.current.scrollLeft + listRef.current.clientWidth <
|
|
60
|
+
listRef.current.scrollWidth - 1);
|
|
61
|
+
setLeftOverflow(listRef.current.scrollLeft > 0);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
62
64
|
var updateLayout = function () {
|
|
63
65
|
checkOverflow();
|
|
64
66
|
handleResize();
|
|
@@ -76,7 +78,7 @@ var ContentSwitcherList = function (_a) {
|
|
|
76
78
|
window.removeEventListener("resize", updateLayout);
|
|
77
79
|
handleResize.cancel();
|
|
78
80
|
};
|
|
79
|
-
}, [children,
|
|
81
|
+
}, [children, handleResize]);
|
|
80
82
|
return (React.createElement("span", { className: index$1.classNames("arc-ContentSwitcherList-wrapper", {
|
|
81
83
|
"arc-ContentSwitcherList-wrapper--isInset": isInset,
|
|
82
84
|
}), tabIndex: -1 },
|
|
@@ -85,14 +87,23 @@ var ContentSwitcherList = function (_a) {
|
|
|
85
87
|
"arc-ContentSwitcherList--isJustified": isJustified,
|
|
86
88
|
}), ref: listRef, "aria-label": ariaLabel }, filterAttrs.filterAttrs(props)),
|
|
87
89
|
React.createElement("div", { className: "arc-ContentSwitcherList-inner" }, React.Children.map(children, function (child, index) {
|
|
88
|
-
if (
|
|
90
|
+
if (!React.isValidElement(child)) {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
if (tabRefs.current[index] !== null) {
|
|
89
94
|
return React.cloneElement(child, {
|
|
90
|
-
ref: function (el) {
|
|
95
|
+
ref: function (el) {
|
|
96
|
+
tabRefs.current[index] = el;
|
|
97
|
+
},
|
|
91
98
|
onClick: function () {
|
|
92
|
-
|
|
99
|
+
var el = tabRefs.current[index];
|
|
100
|
+
if (el)
|
|
101
|
+
scrollTabIntoView({ current: el });
|
|
93
102
|
},
|
|
94
103
|
onFocus: function () {
|
|
95
|
-
|
|
104
|
+
var el = tabRefs.current[index];
|
|
105
|
+
if (el)
|
|
106
|
+
scrollTabIntoView({ current: el });
|
|
96
107
|
},
|
|
97
108
|
});
|
|
98
109
|
}
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
var tslib_es6 = require('./tslib.es6-CCZ3TN_7.cjs');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var index$2 = require('./index-CTlXMLug.cjs');
|
|
6
|
-
var index$1 = require('./index-
|
|
6
|
+
var index$1 = require('./index-DsqYRMfM.cjs');
|
|
7
7
|
var filterAttrs = require('./filter-attrs-D19P2s1V.cjs');
|
|
8
|
-
var index = require('./index-
|
|
8
|
+
var index = require('./index-DlWZZNwu.cjs');
|
|
9
9
|
var Surface = require('./Surface-DIU5ciDT.cjs');
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Use `Popover` to display content in a portal, triggered by a button.
|
|
13
13
|
*/
|
|
14
14
|
var Popover = function (_a) {
|
|
15
|
-
var align = _a.align, ariaLabel = _a.ariaLabel, alignOffset = _a.alignOffset, _b = _a.arrow, arrow = _b === void 0 ? true : _b, _c = _a.background, background = _c === void 0 ? "light" : _c, children = _a.children, content = _a.content, _d = _a.asChild, asChild = _d === void 0 ? false : _d, _e = _a.maxWidth, maxWidth = _e === void 0 ? 452 : _e, minHeight = _a.minHeight, onCloseAutoFocus = _a.onCloseAutoFocus, onEscapeKeyDown = _a.onEscapeKeyDown, onFocusOutside = _a.onFocusOutside, onInteractOutside = _a.onInteractOutside, onOpenAutoFocus = _a.onOpenAutoFocus, onPointerDownOutside = _a.onPointerDownOutside, onOpenChange = _a.onOpenChange, open = _a.open, _f = _a.constrainToViewport, constrainToViewport = _f === void 0 ? true : _f, side = _a.side, _g = _a.sideOffset, sideOffset = _g === void 0 ? 0 : _g, _h = _a.zIndex, zIndex = _h === void 0 ? 100 : _h, _j = _a.hideWhenDetached, hideWhenDetached = _j === void 0 ? false : _j, _k = _a.useBespokeTrigger, useBespokeTrigger = _k === void 0 ? false : _k, props = tslib_es6.__rest(_a, ["align", "ariaLabel", "alignOffset", "arrow", "background", "children", "content", "asChild", "maxWidth", "minHeight", "onCloseAutoFocus", "onEscapeKeyDown", "onFocusOutside", "onInteractOutside", "onOpenAutoFocus", "onPointerDownOutside", "onOpenChange", "open", "constrainToViewport", "side", "sideOffset", "zIndex", "hideWhenDetached", "useBespokeTrigger"]);
|
|
16
|
-
var
|
|
15
|
+
var align = _a.align, ariaLabel = _a.ariaLabel, alignOffset = _a.alignOffset, _b = _a.arrow, arrow = _b === void 0 ? true : _b, _c = _a.background, background = _c === void 0 ? "light" : _c, children = _a.children, content = _a.content, _d = _a.asChild, asChild = _d === void 0 ? false : _d, _e = _a.maxWidth, maxWidth = _e === void 0 ? 452 : _e, minHeight = _a.minHeight, onCloseAutoFocus = _a.onCloseAutoFocus, onEscapeKeyDown = _a.onEscapeKeyDown, onFocusOutside = _a.onFocusOutside, onInteractOutside = _a.onInteractOutside, onOpenAutoFocus = _a.onOpenAutoFocus, onPointerDownOutside = _a.onPointerDownOutside, onOpenChange = _a.onOpenChange, open = _a.open, _f = _a.constrainToViewport, constrainToViewport = _f === void 0 ? true : _f, side = _a.side, _g = _a.sideOffset, sideOffset = _g === void 0 ? 0 : _g, _h = _a.zIndex, zIndex = _h === void 0 ? 100 : _h, _j = _a.hideWhenDetached, hideWhenDetached = _j === void 0 ? false : _j, _k = _a.useBespokeTrigger, useBespokeTrigger = _k === void 0 ? false : _k, _l = _a.isFluidToViewport, isFluidToViewport = _l === void 0 ? false : _l, _m = _a.contentMargin, contentMargin = _m === void 0 ? false : _m, _o = _a.isFullBleed, isFullBleed = _o === void 0 ? false : _o, props = tslib_es6.__rest(_a, ["align", "ariaLabel", "alignOffset", "arrow", "background", "children", "content", "asChild", "maxWidth", "minHeight", "onCloseAutoFocus", "onEscapeKeyDown", "onFocusOutside", "onInteractOutside", "onOpenAutoFocus", "onPointerDownOutside", "onOpenChange", "open", "constrainToViewport", "side", "sideOffset", "zIndex", "hideWhenDetached", "useBespokeTrigger", "isFluidToViewport", "contentMargin", "isFullBleed"]);
|
|
16
|
+
var _p = index.useThemeElement(), themeElement = _p[0], setThemeElement = _p[1];
|
|
17
17
|
var alignOffsetDefault = align === "center" ? 0 : -16;
|
|
18
18
|
return (React.createElement("div", tslib_es6.__assign({ className: "arc-Popover" }, filterAttrs.filterAttrs(props)),
|
|
19
19
|
React.createElement(index$1.Root2, { open: open, onOpenChange: onOpenChange },
|
|
@@ -27,6 +27,9 @@ var Popover = function (_a) {
|
|
|
27
27
|
"arc-Popover-content--dark": background === "dark",
|
|
28
28
|
"arc-Popover-content--brand": background === "brand",
|
|
29
29
|
"arc-Popover-content--constrainToViewport": constrainToViewport,
|
|
30
|
+
"arc-Popover-content--isFluidToViewport": isFluidToViewport,
|
|
31
|
+
"arc-Popover-content--contentMargin": contentMargin,
|
|
32
|
+
"arc-Popover-content--isFullBleed": isFullBleed,
|
|
30
33
|
}), style: { maxWidth: maxWidth, minHeight: minHeight }, "aria-labelledby": "popover-content" },
|
|
31
34
|
content && React.createElement("div", { id: "popover-content" }, content),
|
|
32
35
|
arrow && (React.createElement(index$1.PopoverArrow, { className: "arc-Popover-arrow" })))))))))));
|
|
@@ -4,8 +4,8 @@ var tslib_es6 = require('./tslib.es6-CCZ3TN_7.cjs');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var index = require('./index-CTlXMLug.cjs');
|
|
6
6
|
var filterAttrs = require('./filter-attrs-D19P2s1V.cjs');
|
|
7
|
-
var capitaliseFirstLetter = require('./capitalise-first-letter-CdhexpSx.cjs');
|
|
8
7
|
var VisuallyHidden = require('./VisuallyHidden-CQg3cOVK.cjs');
|
|
8
|
+
var ConditionalWrapper = require('./ConditionalWrapper-Cl6kgjCL.cjs');
|
|
9
9
|
var Icon = require('./Icon-Dk2XHa7V.cjs');
|
|
10
10
|
|
|
11
11
|
var shorterCssColorNames;
|
|
@@ -150,7 +150,8 @@ var Current = "\n <svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w
|
|
|
150
150
|
|
|
151
151
|
var ProgressStepperItem = function (_a) {
|
|
152
152
|
var _b;
|
|
153
|
-
var title = _a.title, titleHref = _a.titleHref, subTitle = _a.subTitle, _c = _a.direction, direction = _c === void 0 ? "horizontal" : _c, _d = _a.status, status = _d === void 0 ? "todo" : _d, _e = _a.size, size = _e === void 0 ? "large" : _e, isFluid = _a.isFluid, invertLabelPosition = _a.invertLabelPosition, ariaLabel = _a.ariaLabel, onClick = _a.onClick, previousStep = _a.previousStep, stepContent = _a.stepContent, isStepContentHidden = _a.isStepContentHidden, props = tslib_es6.__rest(_a, ["title", "titleHref", "subTitle", "direction", "status", "size", "isFluid", "invertLabelPosition", "ariaLabel", "onClick", "previousStep", "stepContent", "isStepContentHidden"]);
|
|
153
|
+
var title = _a.title, titleHref = _a.titleHref, subTitle = _a.subTitle, _c = _a.direction, direction = _c === void 0 ? "horizontal" : _c, _d = _a.status, status = _d === void 0 ? "todo" : _d, _e = _a.size, size = _e === void 0 ? "large" : _e, isFluid = _a.isFluid, invertLabelPosition = _a.invertLabelPosition, ariaLabel = _a.ariaLabel, onClick = _a.onClick, previousStep = _a.previousStep, stepContent = _a.stepContent, isStepContentHidden = _a.isStepContentHidden, isViewing = _a.isViewing, props = tslib_es6.__rest(_a, ["title", "titleHref", "subTitle", "direction", "status", "size", "isFluid", "invertLabelPosition", "ariaLabel", "onClick", "previousStep", "stepContent", "isStepContentHidden", "isViewing"]);
|
|
154
|
+
var id = React.useId();
|
|
154
155
|
var statusIcons = {
|
|
155
156
|
todo: undefined,
|
|
156
157
|
completed: Complete,
|
|
@@ -163,46 +164,46 @@ var ProgressStepperItem = function (_a) {
|
|
|
163
164
|
onClick && onClick();
|
|
164
165
|
};
|
|
165
166
|
var statusIcon = statusIcons[status];
|
|
166
|
-
|
|
167
|
+
var accessibleStatusLabel = "".concat(status === "todo" ? "to do" : status).concat(isViewing ? " - currently viewing" : "");
|
|
168
|
+
return (React.createElement("li", tslib_es6.__assign({ "data-progress-stepper-item-id": id, className: index.classNames("arc-ProgressStepperItem", "arc-ProgressStepperItem--".concat(status), "arc-ProgressStepperItem--".concat(size), (_b = {
|
|
167
169
|
"arc-ProgressStepperItem--vertical": direction === "vertical",
|
|
168
170
|
"arc-ProgressStepperItem--isFluid": isFluid && direction !== "vertical",
|
|
169
171
|
"arc-ProgressStepperItem--previousStepCompleted": previousStep === "completed"
|
|
170
172
|
},
|
|
171
|
-
_b["arc-ProgressStepperItem--hasInteractiveStatus"] = status !== "todo",
|
|
173
|
+
_b["arc-ProgressStepperItem--hasInteractiveStatus"] = onClick || titleHref || status !== "todo",
|
|
172
174
|
_b["arc-ProgressStepperItem--invertLabelPosition"] = direction !== "vertical" && invertLabelPosition,
|
|
173
175
|
_b)) }, filterAttrs.filterAttrs(props)),
|
|
174
176
|
React.createElement("div", { className: "arc-ProgressStepperItem-iconSection" },
|
|
175
177
|
React.createElement("div", { className: "arc-ProgressStepperItem-iconWrapper", "data-testid": "arc-ProgressStepperItem-iconWrapper" },
|
|
176
178
|
React.createElement("span", { className: index.classNames("arc-ProgressStepperItem-statusIcon", {
|
|
177
179
|
"arc-ProgressStepperItem-statusIcon--small": size === "small",
|
|
178
|
-
}) },
|
|
180
|
+
}) },
|
|
181
|
+
status === "todo" && !isViewing ? null : isViewing ? (React.createElement("div", { className: "arc-ProgressStepperItem-statusIconInner" })) : (status !== "current" && (React.createElement(Icon.Icon, { icon: statusIcon && svgToMiniDataURI(statusIcon) }))),
|
|
182
|
+
status === "current" && isViewing === undefined ? (React.createElement(Icon.Icon, { icon: statusIcon && svgToMiniDataURI(statusIcon) })) : null))),
|
|
179
183
|
React.createElement("div", { className: "arc-ProgressStepperItem-textSection" },
|
|
180
|
-
titleHref || onClick
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
":",
|
|
188
|
-
capitaliseFirstLetter.capitaliseFirstLetter(status))) : (React.createElement(VisuallyHidden.VisuallyHidden, null, ":To do")))),
|
|
189
|
-
React.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle),
|
|
184
|
+
React.createElement(ConditionalWrapper.ConditionalWrapper, { condition: Boolean(titleHref || onClick), wrapper: function (children) { return (React.createElement("a", { role: !titleHref && onClick ? "button" : undefined, href: titleHref, className: index.classNames("arc-ProgressStepperItem-title", "arc-ProgressStepperItem-title--link"), onClick: onClickHandler, "aria-label": ariaLabel ||
|
|
185
|
+
(status !== "current"
|
|
186
|
+
? "".concat(title, ", ").concat(accessibleStatusLabel)
|
|
187
|
+
: undefined), "aria-current": status === "current" && "step" }, children)); }, fallback: function (children) { return (React.createElement("div", { className: "arc-ProgressStepperItem-title" },
|
|
188
|
+
children,
|
|
189
|
+
React.createElement(VisuallyHidden.VisuallyHidden, null, " - ".concat(accessibleStatusLabel)))); } }, title),
|
|
190
|
+
subTitle && (React.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle)),
|
|
190
191
|
stepContent && !isStepContentHidden && direction === "vertical" && (React.createElement(React.Fragment, null,
|
|
191
192
|
React.createElement("div", { className: "arc-ProgressStepperItem-nodeItem" }, stepContent))))));
|
|
192
193
|
};
|
|
193
194
|
|
|
194
195
|
/** Use `ProgressStepper` to provide an overview of a series of steps in a digital journey. */
|
|
195
196
|
var ProgressStepper = function (_a) {
|
|
196
|
-
var children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, invertLabelPosition = _a.invertLabelPosition,
|
|
197
|
+
var ref = _a.ref, children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, invertLabelPosition = _a.invertLabelPosition, currentStep = _a.currentStep, props = tslib_es6.__rest(_a, ["ref", "children", "size", "isFluid", "direction", "isExpandable", "invertLabelPosition", "currentStep"]);
|
|
197
198
|
var items = React.Children.toArray(children);
|
|
198
199
|
var getStepStatus = function (item) {
|
|
199
200
|
var _a;
|
|
200
201
|
return (_a = item === null || item === void 0 ? void 0 : item.props) === null || _a === void 0 ? void 0 : _a.status;
|
|
201
202
|
};
|
|
202
|
-
return (React.createElement("
|
|
203
|
+
return (React.createElement("ol", tslib_es6.__assign({ ref: ref, className: index.classNames("arc-ProgressStepper", {
|
|
203
204
|
"arc-ProgressStepper--vertical": direction === "vertical",
|
|
204
205
|
}) }, filterAttrs.filterAttrs(props)), items.map(function (item, index) { return (React.createElement(React.Fragment, { key: "StepperItem-".concat(index) },
|
|
205
|
-
React.createElement(ProgressStepperItem, tslib_es6.__assign({ title: item.props.title, titleHref: item.props.titleHref, subTitle: item.props.subTitle, status: item.props.status, stepContent: item.props.stepContent, isStepContentHidden: item.props.isStepContentHidden, onClick: item.props.onClick, isFluid: isFluid, invertLabelPosition: invertLabelPosition, direction: direction, isExpandable: isExpandable, size: size, previousStep: getStepStatus(items[index - 1]) }, filterAttrs.filterAttrs(item.props))))); })));
|
|
206
|
+
React.createElement(ProgressStepperItem, tslib_es6.__assign({ title: item.props.title, titleHref: item.props.titleHref, subTitle: item.props.subTitle, status: item.props.status, stepContent: item.props.stepContent, ariaLabel: item.props.ariaLabel, isStepContentHidden: item.props.isStepContentHidden, onClick: item.props.onClick, isFluid: isFluid, invertLabelPosition: invertLabelPosition, direction: direction, isExpandable: isExpandable, size: size, isViewing: currentStep !== undefined ? currentStep === index : undefined, previousStep: getStepStatus(items[index - 1]) }, filterAttrs.filterAttrs(item.props))))); })));
|
|
206
207
|
};
|
|
207
208
|
|
|
208
209
|
exports.ProgressStepper = ProgressStepper;
|
|
@@ -9,9 +9,9 @@ var Surface = require('./Surface-DIU5ciDT.cjs');
|
|
|
9
9
|
/**
|
|
10
10
|
* Use `Rule` to display a horizontal or vertical rule.
|
|
11
11
|
*/
|
|
12
|
-
var Rule = function (_a
|
|
12
|
+
var Rule = function (_a) {
|
|
13
13
|
var _b;
|
|
14
|
-
var _c = _a.orientation, orientation = _c === void 0 ? "horizontal" : _c;
|
|
14
|
+
var _c = _a.orientation, orientation = _c === void 0 ? "horizontal" : _c, props = tslib_es6.__rest(_a, ["orientation"]);
|
|
15
15
|
var surface = React.useContext(Surface.Context).surface;
|
|
16
16
|
return (React.createElement("hr", tslib_es6.__assign({ className: index.classNames((_b = {
|
|
17
17
|
"arc-Rule": true
|
|
@@ -23,7 +23,7 @@ var BannerRow = function (_a) {
|
|
|
23
23
|
|
|
24
24
|
/** Use `TemplateBanner` as a base structure for banner components; other banner variants extend or consume this template. */
|
|
25
25
|
var TemplateBanner = function (_a) {
|
|
26
|
-
var heading = _a.heading, _b = _a.fontStyle, fontStyle = _b === void 0 ? "default" : _b, label = _a.label, _c = _a.labelLevel, labelLevel = _c === void 0 ? "3" : _c, text = _a.text, img = _a.img, _d = _a.contentRatio, contentRatio = _d === void 0 ? "1/1" : _d, children = _a.children, _e = _a.alignment, alignment = _e === void 0 ? "center" : _e, additionalTopMargin = _a.additionalTopMargin, _f = _a.minHeight, minHeight = _f === void 0 ? 454 : _f, minHeightM = _a.minHeightM, minHeightL = _a.minHeightL, minHeightXL = _a.minHeightXL, _g = _a.headingSize, headingSize = _g === void 0 ? "xl" : _g, _h = _a.isReversed, isReversed = _h === void 0 ? false : _h, _j = _a.isElevated, isElevated = _j === void 0 ? false : _j, _k = _a.headingLevel, headingLevel = _k === void 0 ? "2" : _k, _l = _a.type, type =
|
|
26
|
+
var heading = _a.heading, _b = _a.fontStyle, fontStyle = _b === void 0 ? "default" : _b, label = _a.label, _c = _a.labelLevel, labelLevel = _c === void 0 ? "3" : _c, text = _a.text, img = _a.img, _d = _a.contentRatio, contentRatio = _d === void 0 ? "1/1" : _d, children = _a.children, _e = _a.alignment, alignment = _e === void 0 ? "center" : _e, additionalTopMargin = _a.additionalTopMargin, _f = _a.minHeight, minHeight = _f === void 0 ? 454 : _f, minHeightM = _a.minHeightM, minHeightL = _a.minHeightL, minHeightXL = _a.minHeightXL, _g = _a.headingSize, headingSize = _g === void 0 ? "xl" : _g, _h = _a.isReversed, isReversed = _h === void 0 ? false : _h, _j = _a.isElevated, isElevated = _j === void 0 ? false : _j, _k = _a.headingLevel, headingLevel = _k === void 0 ? "2" : _k, _l = _a.headingWordWrap, headingWordWrap = _l === void 0 ? false : _l, _m = _a.type, type = _m === void 0 ? "light" : _m, props = tslib_es6.__rest(_a, ["heading", "fontStyle", "label", "labelLevel", "text", "img", "contentRatio", "children", "alignment", "additionalTopMargin", "minHeight", "minHeightM", "minHeightL", "minHeightXL", "headingSize", "isReversed", "isElevated", "headingLevel", "headingWordWrap", "type"]);
|
|
27
27
|
var backgrounds = {
|
|
28
28
|
dark: "dark-brand-02",
|
|
29
29
|
light: "light-white",
|
|
@@ -68,7 +68,7 @@ var TemplateBanner = function (_a) {
|
|
|
68
68
|
label && (React.createElement(React.Fragment, null,
|
|
69
69
|
React.createElement(Heading.Heading, { level: labelLevel, fontStyle: "overline", isWordWrap: false }, label),
|
|
70
70
|
React.createElement(VerticalSpace.VerticalSpace, { size: "8" }))),
|
|
71
|
-
React.createElement(Heading.Heading, { level: headingLevel, size: headingSize, fontStyle: fontStyle, isWordWrap:
|
|
71
|
+
React.createElement(Heading.Heading, { level: headingLevel, size: headingSize, fontStyle: fontStyle, isWordWrap: headingWordWrap }, heading),
|
|
72
72
|
text && (React.createElement(React.Fragment, null,
|
|
73
73
|
React.createElement(VerticalSpace.VerticalSpace, { size: "16" }),
|
|
74
74
|
React.createElement("span", { className: "arc-TemplateBanner-text" }, text))),
|
|
@@ -9,7 +9,7 @@ var Surface = require('./Surface-DIU5ciDT.cjs');
|
|
|
9
9
|
var VisuallyHidden = require('./VisuallyHidden-CQg3cOVK.cjs');
|
|
10
10
|
var Spinner = require('./Spinner-427lpnHI.cjs');
|
|
11
11
|
var Icon = require('./Icon-Dk2XHa7V.cjs');
|
|
12
|
-
var Tooltip = require('./Tooltip-
|
|
12
|
+
var Tooltip = require('./Tooltip-CdmWvrnr.cjs');
|
|
13
13
|
var ThemeIcon = require('./ThemeIcon-CwYN77IF.cjs');
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -110,9 +110,9 @@ var TrailingSlot = function (_a) {
|
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
/** Use `TextInput` as a single-line field that allows users to enter short text, such as names, email, search queries or passwords. */
|
|
113
|
-
var TextInputComponent =
|
|
113
|
+
var TextInputComponent = function (_a) {
|
|
114
114
|
var _b;
|
|
115
|
-
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, leadingSlot = _a.leadingSlot, trailingSlot = _a.trailingSlot, _k = _a.inputAlignment, inputAlignment = _k === void 0 ? "left" : _k, width = _a.width, autoComplete = _a.autoComplete, isLoading = _a.isLoading, isErrorAlert = _a.isErrorAlert, prefix = _a.prefix, suffix = _a.suffix, clearButton = _a.clearButton, props = tslib_es6.__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", "leadingSlot", "trailingSlot", "inputAlignment", "width", "autoComplete", "isLoading", "isErrorAlert", "prefix", "suffix", "clearButton"]);
|
|
115
|
+
var ref = _a.ref, _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, leadingSlot = _a.leadingSlot, trailingSlot = _a.trailingSlot, _k = _a.inputAlignment, inputAlignment = _k === void 0 ? "left" : _k, width = _a.width, autoComplete = _a.autoComplete, isLoading = _a.isLoading, isErrorAlert = _a.isErrorAlert, prefix = _a.prefix, suffix = _a.suffix, clearButton = _a.clearButton, props = tslib_es6.__rest(_a, ["ref", "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", "leadingSlot", "trailingSlot", "inputAlignment", "width", "autoComplete", "isLoading", "isErrorAlert", "prefix", "suffix", "clearButton"]);
|
|
116
116
|
var _l = React.useState(false), showPasswordToggle = _l[0], setShowPasswordToggle = _l[1];
|
|
117
117
|
var inferredInputProps = useNumericInput({
|
|
118
118
|
inputMode: inputMode,
|
|
@@ -151,12 +151,12 @@ var TextInputComponent = React.forwardRef(function (_a, ref) {
|
|
|
151
151
|
isLoading ||
|
|
152
152
|
(clearButton === null || clearButton === void 0 ? void 0 : clearButton.onClick)) && (React.createElement(TrailingSlot, { showPassword: showPassword, isReadOnly: isReadOnly, isLoading: isLoading, clearButton: clearButton, trailingSlot: trailingSlot, isPasswordVisible: showPasswordToggle, onTogglePassword: function () { return setShowPasswordToggle(function (prev) { return !prev; }); }, size: size, isDisabled: isDisabled })),
|
|
153
153
|
suffix && (React.createElement("span", { className: "arc-TextInput-suffix arc-TextInput-affixes", "aria-hidden": true }, suffix))))));
|
|
154
|
-
}
|
|
154
|
+
};
|
|
155
155
|
/**
|
|
156
156
|
* Use `TextInput` to allow users to enter short form text.
|
|
157
157
|
*/
|
|
158
|
-
var TextInput =
|
|
159
|
-
var TextInputWithPlaceHolder =
|
|
158
|
+
var TextInput = function (props) { return (React.createElement(TextInputComponent, tslib_es6.__assign({}, props))); };
|
|
159
|
+
var TextInputWithPlaceHolder = function (props) { return React.createElement(TextInputComponent, tslib_es6.__assign({}, props)); };
|
|
160
160
|
|
|
161
161
|
exports.InputIcon = InputIcon;
|
|
162
162
|
exports.TextInput = TextInput;
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
var tslib_es6 = require('./tslib.es6-CCZ3TN_7.cjs');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DlWZZNwu.cjs');
|
|
7
7
|
var ReactDOM = require('react-dom');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var index$1 = require('./index-
|
|
9
|
+
var index$1 = require('./index-BdJeAKfz.cjs');
|
|
10
10
|
var filterAttrs = require('./filter-attrs-D19P2s1V.cjs');
|
|
11
11
|
var Surface = require('./Surface-DIU5ciDT.cjs');
|
|
12
12
|
var Icon = require('./Icon-Dk2XHa7V.cjs');
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var Combination = require('./Combination-
|
|
6
|
-
var index = require('./index-
|
|
5
|
+
var Combination = require('./Combination-Cm62lfyr.cjs');
|
|
6
|
+
var index = require('./index-DlWZZNwu.cjs');
|
|
7
7
|
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
9
9
|
var n = Object.create(null);
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var Combination = require('./Combination-
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var index$1 = require('./index-
|
|
5
|
+
var Combination = require('./Combination-Cm62lfyr.cjs');
|
|
6
|
+
var index = require('./index-DlWZZNwu.cjs');
|
|
7
|
+
var index$1 = require('./index-BBDa9gnQ.cjs');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
var Combination = require('./Combination-
|
|
5
|
+
var index = require('./index-DlWZZNwu.cjs');
|
|
6
|
+
var Combination = require('./Combination-Cm62lfyr.cjs');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
|
|
9
9
|
function _interopNamespaceDefault(e) {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var ReactDOM = require('react-dom');
|
|
6
|
-
var Combination = require('./Combination-
|
|
7
|
-
var index = require('./index-
|
|
8
|
-
var index$1 = require('./index-
|
|
9
|
-
var index$2 = require('./index-
|
|
6
|
+
var Combination = require('./Combination-Cm62lfyr.cjs');
|
|
7
|
+
var index = require('./index-B_WZUATb.cjs');
|
|
8
|
+
var index$1 = require('./index-DlWZZNwu.cjs');
|
|
9
|
+
var index$2 = require('./index-WO7l1Mfx.cjs');
|
|
10
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
11
11
|
|
|
12
12
|
function _interopNamespaceDefault(e) {
|
|
@@ -139,9 +139,9 @@ var count = 0;
|
|
|
139
139
|
function useId(deterministicId) {
|
|
140
140
|
const [id, setId] = React__namespace.useState(useReactId());
|
|
141
141
|
useLayoutEffect2(() => {
|
|
142
|
-
|
|
142
|
+
setId((reactId) => reactId ?? String(count++));
|
|
143
143
|
}, [deterministicId]);
|
|
144
|
-
return
|
|
144
|
+
return (id ? `radix-${id}` : "");
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var Combination = require('./Combination-
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var index$1 = require('./index-
|
|
8
|
-
var index$2 = require('./index-
|
|
5
|
+
var Combination = require('./Combination-Cm62lfyr.cjs');
|
|
6
|
+
var index = require('./index-DlWZZNwu.cjs');
|
|
7
|
+
var index$1 = require('./index-WO7l1Mfx.cjs');
|
|
8
|
+
var index$2 = require('./index-BBDa9gnQ.cjs');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
10
|
|
|
11
11
|
function _interopNamespaceDefault(e) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var index$1 = require('./index-
|
|
6
|
-
var Combination = require('./Combination-
|
|
5
|
+
var index$1 = require('./index-BdJeAKfz.cjs');
|
|
6
|
+
var Combination = require('./Combination-Cm62lfyr.cjs');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
var index = require('./index-
|
|
8
|
+
var index = require('./index-DlWZZNwu.cjs');
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
var n = Object.create(null);
|
|
@@ -28,11 +28,11 @@ var useMediaQuery = function (mediaQuery) {
|
|
|
28
28
|
return window.matchMedia(query).matches;
|
|
29
29
|
};
|
|
30
30
|
var _a = React.useState(false), matches = _a[0], setMatches = _a[1];
|
|
31
|
-
// Handles the change event of the media query.
|
|
32
|
-
var handleChange = function () {
|
|
33
|
-
setMatches(getMatches(mediaQuery));
|
|
34
|
-
};
|
|
35
31
|
React.useEffect(function () {
|
|
32
|
+
// Handles the change event of the media query.
|
|
33
|
+
var handleChange = function () {
|
|
34
|
+
setMatches(getMatches(mediaQuery));
|
|
35
|
+
};
|
|
36
36
|
var matchMedia = window.matchMedia(mediaQuery);
|
|
37
37
|
// Triggered at the first client-side load and if query changes
|
|
38
38
|
handleChange();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign } from './tslib.es6-w7hdJ3oZ.mjs';
|
|
2
|
-
import React__default, {
|
|
2
|
+
import React__default, { useContext } from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
4
|
import { s as suffixModifier } from './suffix-modifier-B_pO0UkF.mjs';
|
|
5
5
|
import { f as filterAttrs } from './filter-attrs-v_SweZXP.mjs';
|
|
@@ -10,9 +10,9 @@ import { T as ThemeIcon } from './ThemeIcon-B0n6cKRb.mjs';
|
|
|
10
10
|
/**
|
|
11
11
|
* Use `Button` to let a user complete an action like ‘Log in’ or ‘Register’.
|
|
12
12
|
*/
|
|
13
|
-
var Button =
|
|
13
|
+
var Button = function (_a) {
|
|
14
14
|
var _b;
|
|
15
|
-
var ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, ariaExpanded = _a.ariaExpanded, ariaHasPopup = _a.ariaHasPopup, _c = _a.fill, fill = _c === void 0 ? "solid" : _c, href = _a.href, icon = _a.icon, _d = _a.iconPosition, iconPosition = _d === void 0 ? "afterText" : _d, id = _a.id, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isDisplayBlock, isDisplayBlock = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g, label = _a.label, onClick = _a.onClick, rel = _a.rel, _h = _a.size, size = _h === void 0 ? "m" : _h, supportingText = _a.supportingText, target = _a.target, type = _a.type, form = _a.form, props = __rest(_a, ["ariaLabel", "ariaControls", "ariaExpanded", "ariaHasPopup", "fill", "href", "icon", "iconPosition", "id", "isDisabled", "isDisplayBlock", "isFullWidth", "label", "onClick", "rel", "size", "supportingText", "target", "type", "form"]);
|
|
15
|
+
var ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, ariaExpanded = _a.ariaExpanded, ariaHasPopup = _a.ariaHasPopup, _c = _a.fill, fill = _c === void 0 ? "solid" : _c, href = _a.href, icon = _a.icon, _d = _a.iconPosition, iconPosition = _d === void 0 ? "afterText" : _d, id = _a.id, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isDisplayBlock, isDisplayBlock = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g, label = _a.label, onClick = _a.onClick, rel = _a.rel, _h = _a.size, size = _h === void 0 ? "m" : _h, supportingText = _a.supportingText, target = _a.target, type = _a.type, form = _a.form, ref = _a.ref, props = __rest(_a, ["ariaLabel", "ariaControls", "ariaExpanded", "ariaHasPopup", "fill", "href", "icon", "iconPosition", "id", "isDisabled", "isDisplayBlock", "isFullWidth", "label", "onClick", "rel", "size", "supportingText", "target", "type", "form", "ref"]);
|
|
16
16
|
var surface = useContext(Context).surface;
|
|
17
17
|
var buttonClasses = classNames((_b = {
|
|
18
18
|
"arc-Button": true,
|
|
@@ -40,7 +40,7 @@ var Button = forwardRef(function (_a, ref) {
|
|
|
40
40
|
React__default.createElement("span", { className: "arc-Button-inner" },
|
|
41
41
|
buttonText,
|
|
42
42
|
buttonIcon)));
|
|
43
|
-
}
|
|
43
|
+
};
|
|
44
44
|
var ButtonIcon = function (_a) {
|
|
45
45
|
var icon = _a.icon, isChevron = _a.isChevron, isBeforeText = _a.isBeforeText;
|
|
46
46
|
return (React__default.createElement("span", { className: "arc-Button-icon" }, isChevron ? (React__default.createElement(ThemeIcon, { icon: isBeforeText ? "buttonLeft" : "buttonRight" })) : (React__default.createElement(Icon, { icon: icon }))));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign } from './tslib.es6-w7hdJ3oZ.mjs';
|
|
2
|
-
import React__default, {
|
|
2
|
+
import React__default, { useContext } from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
4
|
import { f as filterAttrs } from './filter-attrs-v_SweZXP.mjs';
|
|
5
5
|
import { I as Icon } from './Icon-CCUbr_AO.mjs';
|
|
@@ -9,8 +9,8 @@ import { S as Spinner } from './Spinner-DvngCIwx.mjs';
|
|
|
9
9
|
/**
|
|
10
10
|
* Use `ButtonV2` for our most up to date Call To Action button, offering Primary, Secondary, Tertiary, Compact and Error states.
|
|
11
11
|
*/
|
|
12
|
-
var ButtonV2 =
|
|
13
|
-
var label = _a.label, _b = _a.buttonStyle, buttonStyle = _b === void 0 ? "primary" : _b, icon = _a.icon, iconActive = _a.iconActive, _c = _a.iconPosition, iconPosition = _c === void 0 ? "beforeText" : _c, _d = _a.size, size = _d === void 0 ? "m" : _d, ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, ariaExpanded = _a.ariaExpanded, ariaHasPopup = _a.ariaHasPopup, _e = _a.isFullWidth, isFullWidth = _e === void 0 ? false : _e, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, isSpan = _a.isSpan, onClick = _a.onClick, href = _a.href, id = _a.id, rel = _a.rel, target = _a.target, type = _a.type, form = _a.form, props = __rest(_a, ["label", "buttonStyle", "icon", "iconActive", "iconPosition", "size", "ariaLabel", "ariaControls", "ariaExpanded", "ariaHasPopup", "isFullWidth", "isLoading", "isSpan", "onClick", "href", "id", "rel", "target", "type", "form"]);
|
|
12
|
+
var ButtonV2 = function (_a) {
|
|
13
|
+
var label = _a.label, _b = _a.buttonStyle, buttonStyle = _b === void 0 ? "primary" : _b, icon = _a.icon, iconActive = _a.iconActive, _c = _a.iconPosition, iconPosition = _c === void 0 ? "beforeText" : _c, _d = _a.size, size = _d === void 0 ? "m" : _d, ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, ariaExpanded = _a.ariaExpanded, ariaHasPopup = _a.ariaHasPopup, _e = _a.isFullWidth, isFullWidth = _e === void 0 ? false : _e, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, isSpan = _a.isSpan, onClick = _a.onClick, href = _a.href, id = _a.id, rel = _a.rel, target = _a.target, type = _a.type, form = _a.form, ref = _a.ref, props = __rest(_a, ["label", "buttonStyle", "icon", "iconActive", "iconPosition", "size", "ariaLabel", "ariaControls", "ariaExpanded", "ariaHasPopup", "isFullWidth", "isLoading", "isSpan", "onClick", "href", "id", "rel", "target", "type", "form", "ref"]);
|
|
14
14
|
var surface = useContext(Context).surface;
|
|
15
15
|
var ButtonElement = isSpan ? "span" : "button";
|
|
16
16
|
var iconSizes = {
|
|
@@ -54,6 +54,6 @@ var ButtonV2 = forwardRef(function (_a, ref) {
|
|
|
54
54
|
return (React__default.createElement("a", __assign({}, commonProps, { className: ButtonV2Classes, href: href, rel: rel, "aria-haspopup": ariaHasPopup, "aria-controls": ariaControls, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, target: target }), renderButtonContent()));
|
|
55
55
|
}
|
|
56
56
|
return (React__default.createElement(ButtonElement, __assign({}, commonProps, { className: ButtonV2Classes, "aria-label": ariaLabel, "aria-haspopup": ariaHasPopup, "aria-controls": ariaControls, "aria-expanded": ariaExpanded, disabled: isLoading, type: type, form: form }), renderButtonContent()));
|
|
57
|
-
}
|
|
57
|
+
};
|
|
58
58
|
|
|
59
59
|
export { ButtonV2 as B };
|