@arc-ui/components 13.0.0 → 13.2.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 +7 -3
- package/lib/Banner/Banner.mjs +7 -3
- 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 +26 -14
- package/lib/Carousel/Carousel.mjs +26 -14
- package/lib/Carousel/styles.css +1 -1
- package/lib/Checkbox/styles.css +1 -1
- package/lib/CheckboxIcon/styles.css +1 -1
- package/lib/ClientSideVisible/ClientSideVisible.cjs +1 -0
- package/lib/ClientSideVisible/ClientSideVisible.mjs +1 -0
- package/lib/Columns/styles.css +1 -1
- package/lib/ComboBox/ComboBox.cjs +530 -136
- package/lib/ComboBox/ComboBox.mjs +530 -136
- package/lib/ComboBox/styles.css +1 -1
- package/lib/ConditionalWrapper/ConditionalWrapper.cjs +1 -0
- package/lib/ConditionalWrapper/ConditionalWrapper.mjs +1 -0
- package/lib/ContentSwitcher/styles.css +1 -1
- package/lib/ContentSwitcherDropdown/styles.css +1 -1
- package/lib/DatePicker/DatePicker.cjs +3 -3
- package/lib/DatePicker/DatePicker.mjs +3 -3
- 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/styles.css +1 -1
- package/lib/GhostedHeroBanner/styles.css +1 -1
- package/lib/GradientPageBackground/GradientPageBackground.cjs +2 -2
- package/lib/GradientPageBackground/GradientPageBackground.mjs +2 -2
- package/lib/GradientPageBackground/styles.css +1 -1
- package/lib/Grid/Grid.cjs +1 -0
- package/lib/Grid/Grid.mjs +1 -0
- 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 +7 -3
- package/lib/HeroBanner/HeroBanner.mjs +7 -3
- 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/ImpactCard.cjs +28 -15
- package/lib/ImpactCard/ImpactCard.mjs +29 -16
- package/lib/ImpactCard/styles.css +1 -1
- package/lib/InformationCard/InformationCard.cjs +57 -33
- package/lib/InformationCard/InformationCard.mjs +59 -35
- 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 +40 -21
- package/lib/MediaCard/MediaCard.mjs +41 -22
- package/lib/MediaCard/styles.css +1 -1
- package/lib/Menu/styles.css +1 -1
- package/lib/Modal/styles.css +1 -1
- package/lib/NavigationHeader/NavigationHeader.cjs +2764 -472
- package/lib/NavigationHeader/NavigationHeader.mjs +2707 -436
- 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 +1 -1
- package/lib/Popover/Popover.mjs +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/ProgressStepperOverflow/styles.css +1 -1
- package/lib/RadioCardGroup/styles.css +1 -1
- package/lib/RadioGroup/RadioGroup.cjs +2 -1
- package/lib/RadioGroup/RadioGroup.mjs +2 -1
- 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/styles.css +1 -1
- package/lib/SemanticButton/SemanticButton.cjs +10 -0
- package/lib/SemanticButton/SemanticButton.mjs +4 -0
- package/lib/SemanticButton/styles.css +1 -0
- package/lib/SemanticHeading/styles.css +1 -1
- package/lib/SemanticLink/SemanticLink.cjs +10 -0
- package/lib/SemanticLink/SemanticLink.mjs +4 -0
- package/lib/SemanticLink/styles.css +1 -0
- package/lib/SiteFooter/styles.css +1 -1
- package/lib/SiteFooterV2/SiteFooterV2.cjs +3 -2
- package/lib/SiteFooterV2/SiteFooterV2.mjs +3 -2
- package/lib/SiteFooterV2/styles.css +1 -1
- package/lib/SiteHeaderV2/SiteHeaderV2.cjs +1 -1
- package/lib/SiteHeaderV2/SiteHeaderV2.mjs +1 -1
- package/lib/SiteHeaderV2/styles.css +1 -1
- package/lib/Skeleton/styles.css +1 -1
- package/lib/SkipLink/SkipLink.cjs +1 -0
- package/lib/SkipLink/SkipLink.mjs +1 -0
- package/lib/SkipLink/styles.css +1 -1
- package/lib/Spacing/Spacing.cjs +38 -0
- package/lib/Spacing/Spacing.mjs +36 -0
- package/lib/Spacing/styles.css +1 -0
- package/lib/Spinner/styles.css +1 -1
- package/lib/Surface/styles.css +1 -1
- package/lib/Switch/styles.css +1 -1
- package/lib/TabbedBanner/TabbedBanner.cjs +5 -3
- package/lib/TabbedBanner/TabbedBanner.mjs +5 -3
- package/lib/TabbedBanner/styles.css +1 -1
- package/lib/Tabs/Tabs.cjs +57 -25
- package/lib/Tabs/Tabs.mjs +57 -25
- package/lib/Tabs/styles.css +1 -1
- package/lib/Tag/styles.css +1 -1
- package/lib/TemplateBanner/TemplateBanner.cjs +5 -1
- package/lib/TemplateBanner/TemplateBanner.mjs +5 -1
- package/lib/TemplateBanner/styles.css +1 -1
- package/lib/Text/styles.css +1 -1
- package/lib/TextArea/styles.css +1 -1
- package/lib/TextInput/TextInput.cjs +1 -1
- package/lib/TextInput/TextInput.mjs +1 -1
- 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/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/TypographyCard.cjs +38 -14
- package/lib/TypographyCard/TypographyCard.mjs +39 -15
- package/lib/TypographyCard/styles.css +1 -1
- package/lib/UniversalHeader/UniversalHeader.cjs +10 -8
- package/lib/UniversalHeader/UniversalHeader.mjs +10 -8
- 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-CdLn9iv6.cjs → Calendar-B-DmNni2.cjs} +1 -1
- package/lib/_shared/cjs/{Popover-BtvRErpC.cjs → Popover-BxuQPltF.cjs} +2 -2
- package/lib/_shared/cjs/SemanticButton-Be0gsNLA.cjs +16 -0
- package/lib/_shared/cjs/SemanticLink-DYO9HLGa.cjs +16 -0
- package/lib/_shared/cjs/{TemplateBanner-DyXBKuMw.cjs → TemplateBanner-DfzDwiVT.cjs} +35 -5
- package/lib/_shared/cjs/{TextInput-C_K2PLf5.cjs → TextInput-CLkhL2KT.cjs} +39 -6
- package/lib/_shared/cjs/{arc-breakpoints-uADxN-b4.cjs → arc-breakpoints-C3HREhvT.cjs} +1 -1
- package/lib/_shared/cjs/{index.es-BAsay4oe.cjs → index.es-D5DdMrn2.cjs} +1 -1
- package/lib/_shared/esm/{Calendar-CzFIMyD1.mjs → Calendar-CfEBiAjy.mjs} +1 -1
- package/lib/_shared/esm/{Popover-DRQSgAog.mjs → Popover-Pjtmu_TN.mjs} +2 -2
- package/lib/_shared/esm/SemanticButton-NGAMAw3m.mjs +14 -0
- package/lib/_shared/esm/SemanticLink-DfJjaHk2.mjs +14 -0
- package/lib/_shared/esm/{TemplateBanner-BPzuH5bz.mjs → TemplateBanner-oQjgkrBQ.mjs} +36 -6
- package/lib/_shared/esm/{TextInput-BCvKXfM_.mjs → TextInput-WczTCUvp.mjs} +40 -7
- package/lib/_shared/esm/{arc-breakpoints-ChQgbftE.mjs → arc-breakpoints-ANMn37k9.mjs} +1 -1
- package/lib/_shared/esm/{index.es-99J0r2va.mjs → index.es-Du5Lyvbp.mjs} +2 -2
- package/lib/index.cjs +9958 -7073
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +560 -203
- package/lib/index.d.mts +560 -203
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +16949 -14068
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +6 -2
- package/package.json +9 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as __spreadArray, a as __assign, _ as __rest } from './tslib.es6-w7hdJ3oZ.mjs';
|
|
2
2
|
import React__default, { createContext, useContext, useCallback, useRef, useState, useReducer, useEffect } from 'react';
|
|
3
3
|
import { r as requiredArgs, t as toDate, b as toInteger, _ as _typeof, g as getDefaultOptions, f as format } from './index-Cr6KeQLU.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { c as ArcSizeBreakpointsM } from './index.es-Du5Lyvbp.mjs';
|
|
5
5
|
import { f as filterAttrs } from './filter-attrs-v_SweZXP.mjs';
|
|
6
6
|
import { u as useMediaQuery } from './use-media-query-l6Sou0dd.mjs';
|
|
7
7
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
@@ -10,7 +10,7 @@ import { S as Surface } from './Surface-C69KVzkY.mjs';
|
|
|
10
10
|
* Use `Popover` to display content in a portal, triggered by a button.
|
|
11
11
|
*/
|
|
12
12
|
var Popover = function (_a) {
|
|
13
|
-
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 = __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"]);
|
|
13
|
+
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, className = _a.className, props = __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", "className"]);
|
|
14
14
|
var _p = useThemeElement(), themeElement = _p[0], setThemeElement = _p[1];
|
|
15
15
|
var alignOffsetDefault = align === "center" ? 0 : -16;
|
|
16
16
|
return (React__default.createElement("div", __assign({ className: "arc-Popover" }, filterAttrs(props)),
|
|
@@ -19,7 +19,7 @@ var Popover = function (_a) {
|
|
|
19
19
|
React__default.createElement("div", { ref: setThemeElement },
|
|
20
20
|
React__default.createElement(Portal, { container: themeElement },
|
|
21
21
|
React__default.createElement("div", { "data-cy": "z-index", style: { position: "absolute", zIndex: zIndex } },
|
|
22
|
-
React__default.createElement(Content2, { side: side, sideOffset: sideOffset, align: align, hideWhenDetached: hideWhenDetached, alignOffset: alignOffset !== null && alignOffset !== void 0 ? alignOffset : alignOffsetDefault, onOpenAutoFocus: onOpenAutoFocus, onCloseAutoFocus: onCloseAutoFocus, onEscapeKeyDown: onEscapeKeyDown, onPointerDownOutside: onPointerDownOutside, onFocusOutside: onFocusOutside, onInteractOutside: onInteractOutside },
|
|
22
|
+
React__default.createElement(Content2, { side: side, sideOffset: sideOffset, align: align, hideWhenDetached: hideWhenDetached, alignOffset: alignOffset !== null && alignOffset !== void 0 ? alignOffset : alignOffsetDefault, onOpenAutoFocus: onOpenAutoFocus, onCloseAutoFocus: onCloseAutoFocus, onEscapeKeyDown: onEscapeKeyDown, onPointerDownOutside: onPointerDownOutside, onFocusOutside: onFocusOutside, onInteractOutside: onInteractOutside, className: className },
|
|
23
23
|
React__default.createElement(Surface, { isTransparent: true, background: background === "light" ? "light-white" : "dark-black" },
|
|
24
24
|
React__default.createElement("div", { className: classNames("arc-Popover-content", {
|
|
25
25
|
"arc-Popover-content--dark": background === "dark",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign } from './tslib.es6-w7hdJ3oZ.mjs';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Use `SemanticHeading` to render accessible headings that preserve correct
|
|
7
|
+
* document hierarchy.
|
|
8
|
+
*/
|
|
9
|
+
var SemanticButton = function (_a) {
|
|
10
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
11
|
+
return (React__default.createElement("button", __assign({ className: classNames("arc-SemanticButton", className) }, props), children));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { SemanticButton as S };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign } from './tslib.es6-w7hdJ3oZ.mjs';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Use `SemanticHeading` to render accessible headings that preserve correct
|
|
7
|
+
* document hierarchy.
|
|
8
|
+
*/
|
|
9
|
+
var SemanticLink = function (_a) {
|
|
10
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
11
|
+
return (React__default.createElement("a", __assign({ className: classNames("arc-SemanticLink", className) }, props), children));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { SemanticLink as S };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign } from './tslib.es6-w7hdJ3oZ.mjs';
|
|
2
|
-
import React__default from 'react';
|
|
2
|
+
import React__default, { useState, useEffect } from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
|
+
import { d as debounce } from './debounce-D_Nx5go6.mjs';
|
|
4
5
|
import { f as filterAttrs } from './filter-attrs-v_SweZXP.mjs';
|
|
6
|
+
import { A as ArcBreakpoints } from './arc-breakpoints-ANMn37k9.mjs';
|
|
5
7
|
import { V as VerticalSpace } from './VerticalSpace-BLWB02I7.mjs';
|
|
6
8
|
import { B as Box } from './Box-C8iK8x5c.mjs';
|
|
7
9
|
import { H as Heading } from './Heading-Da-o0d5x.mjs';
|
|
@@ -21,7 +23,7 @@ var BannerRow = function (_a) {
|
|
|
21
23
|
|
|
22
24
|
/** Use `TemplateBanner` as a base structure for banner components; other banner variants extend or consume this template. */
|
|
23
25
|
var TemplateBanner = function (_a) {
|
|
24
|
-
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 = __rest(_a, ["heading", "fontStyle", "label", "labelLevel", "text", "img", "contentRatio", "children", "alignment", "additionalTopMargin", "minHeight", "minHeightM", "minHeightL", "minHeightXL", "headingSize", "isReversed", "isElevated", "headingLevel", "headingWordWrap", "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, contentRatios = _a.contentRatios, 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 = __rest(_a, ["heading", "fontStyle", "label", "labelLevel", "text", "img", "contentRatio", "contentRatios", "children", "alignment", "additionalTopMargin", "minHeight", "minHeightM", "minHeightL", "minHeightXL", "headingSize", "isReversed", "isElevated", "headingLevel", "headingWordWrap", "type"]);
|
|
25
27
|
var backgrounds = {
|
|
26
28
|
dark: "dark-brand-02",
|
|
27
29
|
light: "light-white",
|
|
@@ -47,6 +49,30 @@ var TemplateBanner = function (_a) {
|
|
|
47
49
|
? "".concat(minHeightXL, "px")
|
|
48
50
|
: "auto",
|
|
49
51
|
};
|
|
52
|
+
var _o = useState("1/1"), contentRatiosPerBreakpoint = _o[0], setContentRatios = _o[1];
|
|
53
|
+
var checkContentRatio = debounce(function () {
|
|
54
|
+
if (contentRatios) {
|
|
55
|
+
for (var _i = 0, _a = Object.entries(ArcBreakpoints); _i < _a.length; _i++) {
|
|
56
|
+
var _b = _a[_i], key = _b[0], value = _b[1];
|
|
57
|
+
if (window.innerWidth > value) {
|
|
58
|
+
var ratio = contentRatios === null || contentRatios === void 0 ? void 0 : contentRatios[key];
|
|
59
|
+
if (ratio) {
|
|
60
|
+
setContentRatios(ratio);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
setContentRatios(contentRatio);
|
|
67
|
+
}, 100);
|
|
68
|
+
useEffect(function () {
|
|
69
|
+
checkContentRatio();
|
|
70
|
+
window.addEventListener("resize", checkContentRatio);
|
|
71
|
+
return function () {
|
|
72
|
+
window.removeEventListener("resize", checkContentRatio);
|
|
73
|
+
checkContentRatio.cancel();
|
|
74
|
+
};
|
|
75
|
+
}, [contentRatios, checkContentRatio]);
|
|
50
76
|
return (React__default.createElement("div", __assign({ style: templateBannerStyles, className: classNames("arc-TemplateBanner arc-TemplateBanner-background--".concat(type), {
|
|
51
77
|
"arc-TemplateBanner--elevation": isElevated,
|
|
52
78
|
"arc-TemplateBanner--minHeightM": minHeightM,
|
|
@@ -58,8 +84,10 @@ var TemplateBanner = function (_a) {
|
|
|
58
84
|
React__default.createElement(BannerRow, { "data-testid": "arc-TemplateBanner-gridRow", isReversed: isReversed },
|
|
59
85
|
React__default.createElement(GridCol, { "data-testid": "arc-TemplateBanner-contentCol", align: {
|
|
60
86
|
m: alignment === "start" ? "start" : "center",
|
|
61
|
-
xs: !img ||
|
|
62
|
-
|
|
87
|
+
xs: !img || contentRatiosPerBreakpoint === "1/0"
|
|
88
|
+
? "center"
|
|
89
|
+
: "start",
|
|
90
|
+
}, xs: 12, order: { xs: isContained && isReversed ? 1 : 0, m: 0 }, m: img ? columnWithImgWidths[contentRatiosPerBreakpoint] : 12 },
|
|
63
91
|
React__default.createElement("div", { className: classNames("arc-TemplateBanner-content", {
|
|
64
92
|
"arc-TemplateBanner-content--additionalTopMargin": additionalTopMargin && alignment === "start",
|
|
65
93
|
}) },
|
|
@@ -73,9 +101,11 @@ var TemplateBanner = function (_a) {
|
|
|
73
101
|
children && (React__default.createElement("span", null,
|
|
74
102
|
React__default.createElement(VerticalSpace, { size: "32" }),
|
|
75
103
|
children)))),
|
|
76
|
-
img &&
|
|
104
|
+
img && contentRatiosPerBreakpoint !== "1/0" && (React__default.createElement(GridCol, __assign({ "data-testid": "arc-TemplateBanner-imageCol", align: img.fit !== "cover"
|
|
77
105
|
? { m: imageAlignment[img.alignment || "center"] }
|
|
78
|
-
: undefined, xs: 12 }, (
|
|
106
|
+
: undefined, xs: 12 }, (contentRatiosPerBreakpoint === "2/3" && img
|
|
107
|
+
? { m: 4 }
|
|
108
|
+
: { m: 6 })),
|
|
79
109
|
React__default.createElement(BannerImage, __assign({ ariaHidden: true }, img)))))))));
|
|
80
110
|
};
|
|
81
111
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __assign, _ as __rest } from './tslib.es6-w7hdJ3oZ.mjs';
|
|
2
|
-
import React__default, { useState, useContext } from 'react';
|
|
2
|
+
import React__default, { useState, useRef, 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 { u as useAriaDescribedby, F as FormControl } from './FormControl-DopDD_nC.mjs';
|
|
@@ -60,7 +60,7 @@ var InputIcon = function (_a) {
|
|
|
60
60
|
"arc-TextInput-inputIcon": true,
|
|
61
61
|
"arc-TextInput-inputIcon--isReadOnly": isReadOnly,
|
|
62
62
|
"arc-TextInput-inputIcon--isDisabled": isDisabled,
|
|
63
|
-
}), disabled: isReadOnly || isDisabled, "aria-label": isButton.label, onFocus: isButton.onFocus, onClick: function (e) {
|
|
63
|
+
}), disabled: isReadOnly || isDisabled, "aria-label": isButton.label, onFocus: isButton.onFocus, onKeyDown: isButton.onKeyDown, onClick: function (e) {
|
|
64
64
|
var _a;
|
|
65
65
|
e.preventDefault();
|
|
66
66
|
(_a = isButton.onClick) === null || _a === void 0 ? void 0 : _a.call(isButton);
|
|
@@ -71,19 +71,42 @@ var InputIcon = function (_a) {
|
|
|
71
71
|
|
|
72
72
|
var TrailingSlot = function (_a) {
|
|
73
73
|
var _b;
|
|
74
|
-
var trailingSlot = _a.trailingSlot, showPassword = _a.showPassword, isPasswordVisible = _a.isPasswordVisible, onTogglePassword = _a.onTogglePassword, isLoading = _a.isLoading, clearButton = _a.clearButton, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, _c = _a.size, size = _c === void 0 ? "m" : _c;
|
|
74
|
+
var id = _a.id, trailingSlot = _a.trailingSlot, showPassword = _a.showPassword, isPasswordVisible = _a.isPasswordVisible, onTogglePassword = _a.onTogglePassword, isLoading = _a.isLoading, clearButton = _a.clearButton, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, _c = _a.size, size = _c === void 0 ? "m" : _c, inputRef = _a.inputRef;
|
|
75
75
|
var spinnerSizeMap = {
|
|
76
76
|
s: 16,
|
|
77
77
|
m: 24,
|
|
78
78
|
l: 24,
|
|
79
79
|
};
|
|
80
80
|
var spinnerSize = spinnerSizeMap[size];
|
|
81
|
-
|
|
81
|
+
var focusInput = function () {
|
|
82
|
+
var _a;
|
|
83
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
84
|
+
};
|
|
85
|
+
var clearInput = function () {
|
|
86
|
+
var _a;
|
|
87
|
+
if (inputRef.current) {
|
|
88
|
+
inputRef.current.value = "";
|
|
89
|
+
inputRef.current.dispatchEvent(new Event("input", { bubbles: true }));
|
|
90
|
+
}
|
|
91
|
+
(_a = clearButton === null || clearButton === void 0 ? void 0 : clearButton.onClick) === null || _a === void 0 ? void 0 : _a.call(clearButton);
|
|
92
|
+
};
|
|
93
|
+
var onClearButtonKeydown = function () {
|
|
94
|
+
clearInput();
|
|
95
|
+
focusInput();
|
|
96
|
+
};
|
|
97
|
+
return (React__default.createElement("span", { className: "arc-TextInput-trailingSlot", id: "trailingslot-".concat(id) },
|
|
82
98
|
trailingSlot && !showPassword && !isLoading && !clearButton && (React__default.createElement(React__default.Fragment, null, trailingSlot)),
|
|
83
99
|
(clearButton === null || clearButton === void 0 ? void 0 : clearButton.onClick) && !showPassword && !isLoading && (React__default.createElement(InputIcon, { themeIcon: "textInputClear", isReadOnly: isReadOnly, isDisabled: isDisabled, tooltip: {
|
|
84
100
|
title: (_b = clearButton.tooltipLabel) !== null && _b !== void 0 ? _b : "Clear",
|
|
85
101
|
side: "bottom",
|
|
86
|
-
}, isButton: {
|
|
102
|
+
}, isButton: {
|
|
103
|
+
onClick: function () {
|
|
104
|
+
clearInput();
|
|
105
|
+
focusInput();
|
|
106
|
+
},
|
|
107
|
+
label: "Clear Input",
|
|
108
|
+
onKeyDown: onClearButtonKeydown,
|
|
109
|
+
}, size: size })),
|
|
87
110
|
showPassword && !isLoading && (React__default.createElement(React__default.Fragment, null,
|
|
88
111
|
React__default.createElement(InputIcon, { isDisabled: isDisabled, isReadOnly: isReadOnly, themeIcon: isPasswordVisible
|
|
89
112
|
? "textInputShowPassword"
|
|
@@ -112,6 +135,16 @@ var TextInputComponent = function (_a) {
|
|
|
112
135
|
var _b;
|
|
113
136
|
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 = __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"]);
|
|
114
137
|
var _l = useState(false), showPasswordToggle = _l[0], setShowPasswordToggle = _l[1];
|
|
138
|
+
var inputRef = useRef(null);
|
|
139
|
+
var setInputRef = function (node) {
|
|
140
|
+
inputRef.current = node;
|
|
141
|
+
if (typeof ref === "function") {
|
|
142
|
+
ref(node);
|
|
143
|
+
}
|
|
144
|
+
else if (ref) {
|
|
145
|
+
ref.current = node;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
115
148
|
var inferredInputProps = useNumericInput({
|
|
116
149
|
inputMode: inputMode,
|
|
117
150
|
pattern: pattern,
|
|
@@ -143,11 +176,11 @@ var TextInputComponent = function (_a) {
|
|
|
143
176
|
React__default.createElement("div", { className: "arc-TextInput-inputWrapper", style: { width: width, marginTop: hideLabel ? 0 : undefined } },
|
|
144
177
|
prefix && (React__default.createElement("span", { className: "arc-TextInput-prefix arc-TextInput-affixes", "aria-hidden": true }, prefix)),
|
|
145
178
|
leadingSlot && (React__default.createElement("span", { className: "arc-TextInput-leadingSlot" }, leadingSlot)),
|
|
146
|
-
React__default.createElement("input", __assign({ placeholder: placeholder, "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", className: "arc-TextInput-input", defaultValue: typeof value !== "undefined" ? undefined : defaultValue, disabled: isDisabled, id: id, maxLength: maxLength, minLength: minLength, name: name, onChange: onChange, onBlur: onBlur, onFocus: onFocus, readOnly: isReadOnly, ref:
|
|
179
|
+
React__default.createElement("input", __assign({ placeholder: placeholder, "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", className: "arc-TextInput-input", defaultValue: typeof value !== "undefined" ? undefined : defaultValue, disabled: isDisabled, id: id, maxLength: maxLength, minLength: minLength, name: name, onChange: onChange, onBlur: onBlur, onFocus: onFocus, readOnly: isReadOnly, ref: setInputRef, required: isRequired, value: typeof value !== "undefined" ? value : undefined, autoComplete: autoComplete }, inferredInputProps)),
|
|
147
180
|
(trailingSlot ||
|
|
148
181
|
showPassword ||
|
|
149
182
|
isLoading ||
|
|
150
|
-
(clearButton === null || clearButton === void 0 ? void 0 : clearButton.onClick)) && (React__default.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 })),
|
|
183
|
+
(clearButton === null || clearButton === void 0 ? void 0 : clearButton.onClick)) && (React__default.createElement(TrailingSlot, { id: id, showPassword: showPassword, isReadOnly: isReadOnly, isLoading: isLoading, clearButton: clearButton, trailingSlot: trailingSlot, isPasswordVisible: showPasswordToggle, onTogglePassword: function () { return setShowPasswordToggle(function (prev) { return !prev; }); }, size: size, isDisabled: isDisabled, inputRef: inputRef })),
|
|
151
184
|
suffix && (React__default.createElement("span", { className: "arc-TextInput-suffix arc-TextInput-affixes", "aria-hidden": true }, suffix))))));
|
|
152
185
|
};
|
|
153
186
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as ArcSizeBreakpointsXxl, a as ArcSizeBreakpointsXl, b as ArcSizeBreakpointsL, c as ArcSizeBreakpointsM, d as ArcSizeBreakpointsS, e as ArcSizeBreakpointsXs } from './index.es-Du5Lyvbp.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Provides an object of breakpoints for responsive designs.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Wed, 11 Feb 2026 16:30:19 GMT
|
|
4
4
|
*/
|
|
5
5
|
var ArcSizeBreakpointsXs = "320px";
|
|
6
6
|
var ArcSizeBreakpointsS = "636px";
|
|
@@ -9,4 +9,4 @@ var ArcSizeBreakpointsL = "1024px";
|
|
|
9
9
|
var ArcSizeBreakpointsXl = "1280px";
|
|
10
10
|
var ArcSizeBreakpointsXxl = "1440px";
|
|
11
11
|
|
|
12
|
-
export {
|
|
12
|
+
export { ArcSizeBreakpointsXxl as A, ArcSizeBreakpointsXl as a, ArcSizeBreakpointsL as b, ArcSizeBreakpointsM as c, ArcSizeBreakpointsS as d, ArcSizeBreakpointsXs as e };
|