@arc-ui/components 11.21.1 → 11.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Alert/Alert.cjs.js +1 -1
- package/dist/Alert/Alert.esm.js +1 -1
- package/dist/Avatar/Avatar.cjs.js +1 -1
- package/dist/Avatar/Avatar.esm.js +1 -1
- package/dist/AvatarGroup/AvatarGroup.cjs.js +2 -1
- package/dist/AvatarGroup/AvatarGroup.esm.js +2 -1
- package/dist/Badge/Badge.cjs.js +1 -1
- package/dist/Badge/Badge.esm.js +1 -1
- package/dist/Button/Button.cjs.js +1 -1
- package/dist/Button/Button.esm.js +1 -1
- package/dist/Calendar/Calendar.cjs.js +2 -2
- package/dist/Calendar/Calendar.esm.js +2 -2
- package/dist/Checkbox/Checkbox.cjs.js +4 -4
- package/dist/Checkbox/Checkbox.esm.js +4 -4
- package/dist/DatePicker/DatePicker.cjs.js +8 -5
- package/dist/DatePicker/DatePicker.esm.js +8 -5
- package/dist/Disclosure/Disclosure.cjs.js +1 -2
- package/dist/Disclosure/Disclosure.esm.js +1 -2
- package/dist/DisclosureMini/DisclosureMini.cjs.js +1 -1
- package/dist/DisclosureMini/DisclosureMini.esm.js +1 -1
- package/dist/Filter/Filter.cjs.js +2 -1
- package/dist/Filter/Filter.esm.js +2 -1
- package/dist/FormControl/FormControl.cjs.js +3 -3
- package/dist/FormControl/FormControl.esm.js +3 -3
- package/dist/Grid/Grid.cjs.js +13 -0
- package/dist/Grid/Grid.esm.js +5 -0
- package/dist/Grid/package.json +7 -0
- package/dist/Hidden/Hidden.cjs.js +24 -0
- package/dist/Hidden/Hidden.esm.js +16 -0
- package/dist/Hidden/package.json +7 -0
- package/dist/ImpactCard/ImpactCard.cjs.js +42 -0
- package/dist/ImpactCard/ImpactCard.esm.js +34 -0
- package/dist/ImpactCard/package.json +7 -0
- package/dist/InformationCard/InformationCard.cjs.js +9 -5
- package/dist/InformationCard/InformationCard.esm.js +11 -7
- package/dist/Link/Link.cjs.js +76 -0
- package/dist/Link/Link.esm.js +68 -0
- package/dist/Link/package.json +7 -0
- package/dist/MediaCard/MediaCard.cjs.js +7 -5
- package/dist/MediaCard/MediaCard.esm.js +9 -7
- package/dist/Modal/Modal.cjs.js +3 -3
- package/dist/Modal/Modal.esm.js +3 -3
- package/dist/Pagination/Pagination.cjs.js +1 -1
- package/dist/Pagination/Pagination.esm.js +1 -1
- package/dist/PaginationSimple/PaginationSimple.cjs.js +6 -10
- package/dist/PaginationSimple/PaginationSimple.esm.js +6 -10
- package/dist/ProgressBar/ProgressBar.cjs.js +8 -2
- package/dist/ProgressBar/ProgressBar.esm.js +8 -2
- package/dist/ProgressStepper/ProgressStepper.cjs.js +2 -2
- package/dist/ProgressStepper/ProgressStepper.esm.js +2 -2
- package/dist/RadioGroup/RadioGroup.cjs.js +4 -4
- package/dist/RadioGroup/RadioGroup.esm.js +4 -4
- package/dist/Select/Select.cjs.js +3 -3
- package/dist/Select/Select.esm.js +3 -3
- package/dist/SiteHeader/SiteHeader.cjs.js +2 -2
- package/dist/SiteHeader/SiteHeader.esm.js +2 -2
- package/dist/SiteHeaderV2/SiteHeaderV2.cjs.js +3 -2
- package/dist/SiteHeaderV2/SiteHeaderV2.esm.js +3 -2
- package/dist/SkipLink/SkipLink.cjs.js +1 -0
- package/dist/SkipLink/SkipLink.esm.js +1 -0
- package/dist/Switch/Switch.cjs.js +4 -4
- package/dist/Switch/Switch.esm.js +4 -4
- package/dist/Tabs/Tabs.cjs.js +1 -1
- package/dist/Tabs/Tabs.esm.js +1 -1
- package/dist/Tag/Tag.cjs.js +1 -1
- package/dist/Tag/Tag.esm.js +1 -1
- package/dist/TextArea/TextArea.cjs.js +15 -13
- package/dist/TextArea/TextArea.esm.js +15 -13
- package/dist/TextInput/TextInput.cjs.js +4 -4
- package/dist/TextInput/TextInput.esm.js +4 -4
- package/dist/Toast/Toast.cjs.js +1 -1
- package/dist/Toast/Toast.esm.js +1 -1
- package/dist/TypographyCard/TypographyCard.cjs.js +10 -7
- package/dist/TypographyCard/TypographyCard.esm.js +11 -8
- package/dist/Visible/Visible.cjs.js +24 -0
- package/dist/Visible/Visible.esm.js +16 -0
- package/dist/Visible/package.json +7 -0
- package/dist/VisuallyHidden/VisuallyHidden.cjs.js +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.esm.js +1 -1
- package/dist/_shared/cjs/{Avatar-12ece0dd.js → Avatar-f1b1c129.js} +1 -0
- package/dist/_shared/cjs/{Button-84533dc8.js → Button-6ba21d3b.js} +1 -1
- package/dist/_shared/cjs/{Calendar-c6ed5f2c.js → Calendar-6ea75d05.js} +2 -1
- package/dist/_shared/cjs/{CardFooter-4a68a862.js → CardFooter-ff015d7d.js} +9 -7
- package/dist/_shared/cjs/{Checkbox-8915fcd9.js → Checkbox-0253327b.js} +2 -2
- package/dist/_shared/cjs/{DisclosureMini-d0eeb6bb.js → DisclosureMini-09c749e5.js} +1 -2
- package/dist/_shared/cjs/{Filter-1bde635c.js → Filter-f9506dfa.js} +22 -14
- package/dist/_shared/cjs/{FormControl-5f3b6ce4.js → FormControl-68258ce1.js} +2 -2
- package/dist/_shared/cjs/Grid-da776e77.js +45 -0
- package/dist/_shared/cjs/{ProgressStepper-20a61620.js → ProgressStepper-57cfef1e.js} +3 -3
- package/dist/_shared/cjs/{RadioGroup-07bb155e.js → RadioGroup-85eda600.js} +2 -2
- package/dist/_shared/cjs/{SiteHeader.rehydrator-ea49f8d5.js → SiteHeader.rehydrator-b76b0889.js} +1 -1
- package/dist/_shared/cjs/{SiteHeaderV2-b41fdb49.js → SiteHeaderV2-ce1c8737.js} +17 -16
- package/dist/_shared/cjs/{Tabs-24e6f45b.js → Tabs-bc9fac46.js} +1 -0
- package/dist/_shared/cjs/{Tag-8723b324.js → Tag-73a59171.js} +5 -5
- package/dist/_shared/cjs/{TextInput-5da70ec2.js → TextInput-8912dd41.js} +5 -5
- package/dist/_shared/cjs/{Toast-7a20d1b9.js → Toast-26207fef.js} +1 -1
- package/dist/_shared/cjs/{VisuallyHidden-e2c8b291.js → VisuallyHidden-b0de4c7b.js} +1 -1
- package/dist/_shared/esm/{Avatar-d01e2b7b.js → Avatar-320313f0.js} +1 -0
- package/dist/_shared/esm/{Button-3f294e64.js → Button-a7d134c6.js} +1 -1
- package/dist/_shared/esm/{Calendar-753ef6f1.js → Calendar-fafaca6b.js} +2 -1
- package/dist/_shared/esm/{CardFooter-a08b70ee.js → CardFooter-e13f77b0.js} +9 -7
- package/dist/_shared/esm/{Checkbox-0e051546.js → Checkbox-588619c7.js} +2 -2
- package/dist/_shared/esm/{DisclosureMini-ec17b008.js → DisclosureMini-56719716.js} +1 -2
- package/dist/_shared/esm/{Filter-58a42358.js → Filter-258ba675.js} +22 -14
- package/dist/_shared/esm/{FormControl-cc99cde0.js → FormControl-8e836656.js} +2 -2
- package/dist/_shared/esm/Grid-07dbf4bd.js +39 -0
- package/dist/_shared/esm/{ProgressStepper-74d48612.js → ProgressStepper-6c811282.js} +3 -3
- package/dist/_shared/esm/{RadioGroup-362be63f.js → RadioGroup-6c8f8454.js} +2 -2
- package/dist/_shared/esm/{SiteHeader.rehydrator-65c8cf71.js → SiteHeader.rehydrator-8ad7651b.js} +1 -1
- package/dist/_shared/esm/{SiteHeaderV2-f06ac085.js → SiteHeaderV2-a7c1b1cb.js} +17 -16
- package/dist/_shared/esm/{Tabs-a85af483.js → Tabs-9485cab6.js} +1 -0
- package/dist/_shared/esm/{Tag-664b85c8.js → Tag-cb35d57b.js} +5 -5
- package/dist/_shared/esm/{TextInput-1d1c5fd6.js → TextInput-5ffa05da.js} +5 -5
- package/dist/_shared/esm/{Toast-7a232e15.js → Toast-fcbfc194.js} +1 -1
- package/dist/_shared/esm/{VisuallyHidden-b9eebf71.js → VisuallyHidden-06692fd3.js} +1 -1
- package/dist/index.es.js +246 -89
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +250 -88
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4 -4
- package/dist/types/components/Alert/Alert.d.ts +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +1 -0
- package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +1 -0
- package/dist/types/components/Badge/Badge.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +1 -1
- package/dist/types/components/Calendar/Calendar.d.ts +1 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +3 -0
- package/dist/types/components/Disclosure/Disclosure.d.ts +1 -2
- package/dist/types/components/DisclosureMini/DisclosureMini.d.ts +1 -2
- package/dist/types/components/Filter/Filter.d.ts +1 -1
- package/dist/types/components/Filter/FilterItems/FilterItems.d.ts +4 -0
- package/dist/types/components/Grid/Grid.constants.d.ts +1 -0
- package/dist/types/components/Grid/Grid.d.ts +28 -0
- package/dist/types/components/Grid/Grid.types.d.ts +8 -0
- package/dist/types/components/Grid/components/Col/Col.d.ts +9 -0
- package/dist/types/components/Grid/components/Col/index.d.ts +1 -0
- package/dist/types/components/Grid/components/Row/Row.d.ts +9 -0
- package/dist/types/components/Grid/components/Row/index.d.ts +1 -0
- package/dist/types/components/Grid/index.d.ts +2 -0
- package/dist/types/components/Hidden/Hidden.d.ts +11 -0
- package/dist/types/components/Hidden/index.d.ts +1 -0
- package/dist/types/components/ImpactCard/ImpactCard.d.ts +53 -0
- package/dist/types/components/ImpactCard/index.d.ts +1 -0
- package/dist/types/components/InformationCard/InformationCard.d.ts +5 -0
- package/dist/types/components/Link/Link.d.ts +52 -0
- package/dist/types/components/Link/index.d.ts +1 -0
- package/dist/types/components/MediaCard/MediaCard.d.ts +4 -0
- package/dist/types/components/Modal/Modal.d.ts +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +1 -1
- package/dist/types/components/PaginationSimple/PaginationSimple.d.ts +12 -4
- package/dist/types/components/ProgressBar/ProgressBar.d.ts +4 -0
- package/dist/types/components/ProgressStepper/ProgressStepper.d.ts +1 -1
- package/dist/types/components/SkipLink/SkipLink.d.ts +1 -0
- package/dist/types/components/Switch/Switch.d.ts +1 -1
- package/dist/types/components/Tabs/Tabs.d.ts +1 -0
- package/dist/types/components/Tag/Tag.d.ts +5 -1
- package/dist/types/components/TextInput/TextInput.d.ts +3 -0
- package/dist/types/components/Toast/Toast.d.ts +1 -1
- package/dist/types/components/TypographyCard/TypographyCard.d.ts +5 -0
- package/dist/types/components/Visible/Visible.d.ts +11 -0
- package/dist/types/components/Visible/index.d.ts +1 -0
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/dist/types/components/index.d.ts +5 -0
- package/dist/types/private-components/CardFooter/CardFooter.d.ts +1 -1
- package/dist/types/styles.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/esm/filter-data-attrs-ea8f4ed4.js';
|
|
2
|
-
import React__default, { useState } from 'react';
|
|
2
|
+
import React__default, { useContext, useState } from 'react';
|
|
3
3
|
import { u as useMediaQuery, a as ArcBreakpointS, A as ArcBreakpointM } from '../_shared/esm/use-media-query-4c807227.js';
|
|
4
4
|
import { C as CardLabel, a as CardHeading, B as BtIconArrowRight } from '../_shared/esm/BtIconArrowRight.esm-9b181878.js';
|
|
5
5
|
import { I as Icon } from '../_shared/esm/Icon-15799695.js';
|
|
6
|
-
import { T as Tag } from '../_shared/esm/Tag-
|
|
6
|
+
import { T as Tag } from '../_shared/esm/Tag-cb35d57b.js';
|
|
7
7
|
import { I as Image } from '../_shared/esm/Image-12fbd327.js';
|
|
8
8
|
import { T as Text } from '../_shared/esm/Text-14f586ac.js';
|
|
9
|
-
import { B as Button } from '../_shared/esm/Button-
|
|
9
|
+
import { B as Button } from '../_shared/esm/Button-a7d134c6.js';
|
|
10
10
|
import { V as VerticalSpace } from '../_shared/esm/VerticalSpace-43cd9138.js';
|
|
11
11
|
import { c as classNames } from '../_shared/esm/index-2e73c2e9.js';
|
|
12
|
-
import { S as Surface } from '../_shared/esm/Surface-0ca6817d.js';
|
|
12
|
+
import { C as Context, S as Surface } from '../_shared/esm/Surface-0ca6817d.js';
|
|
13
13
|
import '../_shared/esm/suffix-modifier-3d548e45.js';
|
|
14
14
|
import '../_shared/esm/BtIconChevronLeftMid.esm-1ed8330b.js';
|
|
15
15
|
import '../_shared/esm/BtIconChevronRightMid.esm-32268f1a.js';
|
|
16
16
|
|
|
17
|
+
/** Use `InformationCard` for flexibility and the ability to focus and highlight product specific content. */
|
|
17
18
|
var InformationCard = function (_a) {
|
|
18
|
-
var cardUrl = _a.cardUrl, onClick = _a.onClick, heading = _a.heading, text = _a.text, label = _a.label, footerLogo = _a.footerLogo, button = _a.button, image = _a.image, tags = _a.tags, icon = _a.icon, _b = _a.headingLevel, headingLevel = _b === void 0 ? "2" : _b, props = __rest(_a, ["cardUrl", "onClick", "heading", "text", "label", "footerLogo", "button", "image", "tags", "icon", "headingLevel"]);
|
|
19
|
+
var cardUrl = _a.cardUrl, onClick = _a.onClick, heading = _a.heading, text = _a.text, label = _a.label, footerLogo = _a.footerLogo, button = _a.button, image = _a.image, tags = _a.tags, icon = _a.icon, minHeight = _a.minHeight, _b = _a.headingLevel, headingLevel = _b === void 0 ? "2" : _b, props = __rest(_a, ["cardUrl", "onClick", "heading", "text", "label", "footerLogo", "button", "image", "tags", "icon", "minHeight", "headingLevel"]);
|
|
20
|
+
var surface = useContext(Context).surface;
|
|
19
21
|
var isMinWidthArcBreakpointS = useMediaQuery("(min-width: ".concat(ArcBreakpointS, "px)"));
|
|
20
22
|
var isMinWidthArcBreakpointM = useMediaQuery("(min-width: ".concat(ArcBreakpointM, "px)"));
|
|
21
23
|
var _c = useState(false), showHoverState = _c[0], setShowHoverState = _c[1];
|
|
@@ -23,8 +25,10 @@ var InformationCard = function (_a) {
|
|
|
23
25
|
var assetSpacing = isMinWidthArcBreakpointM ? "24" : "20";
|
|
24
26
|
var containerSpacing = isMinWidthArcBreakpointS ? "32" : "24";
|
|
25
27
|
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
26
|
-
return (React__default.createElement("div", __assign({ className: classNames("arc-InformationCard", {
|
|
27
|
-
"arc-InformationCard--
|
|
28
|
+
return (React__default.createElement("div", __assign({ style: { minHeight: minHeight }, className: classNames("arc-InformationCard", {
|
|
29
|
+
"arc-InformationCard--isALink": cardUrl,
|
|
30
|
+
"arc-InformationCard--outlined": cardUrl && showHoverState,
|
|
31
|
+
"arc-InformationCard--onDarkSurface": surface === "dark"
|
|
28
32
|
}) }, filterDataAttrs(props)),
|
|
29
33
|
React__default.createElement(Surface, { growVertically: true, padding: containerSpacing, background: "white" },
|
|
30
34
|
React__default.createElement("div", null,
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var filterDataAttrs = require('../_shared/cjs/filter-data-attrs-1c9a530c.js');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var index = require('../_shared/cjs/index-9947ac13.js');
|
|
8
|
+
var Surface = require('../_shared/cjs/Surface-038db6e1.js');
|
|
9
|
+
var Icon = require('../_shared/cjs/Icon-b46897a3.js');
|
|
10
|
+
var VisuallyHidden = require('../_shared/cjs/VisuallyHidden-b0de4c7b.js');
|
|
11
|
+
require('../_shared/cjs/suffix-modifier-64dcd338.js');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
|
|
17
|
+
const BtIconNewWindow = (props) =>
|
|
18
|
+
/*#__PURE__*/ React__default["default"].createElement(
|
|
19
|
+
"svg",
|
|
20
|
+
Object.assign(
|
|
21
|
+
{
|
|
22
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23
|
+
viewBox: "0 0 32 32",
|
|
24
|
+
},
|
|
25
|
+
props,
|
|
26
|
+
),
|
|
27
|
+
/*#__PURE__*/ React__default["default"].createElement("defs", null),
|
|
28
|
+
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
29
|
+
d: "M24.70166,7.01794a.49968.49968,0,0,0-.19092-.03845H17.50586a.5.5,0,0,0,0,1h5.79785l-8.15918,8.15918a.49995.49995,0,1,0,.707.707l8.15918-8.15918v5.77393a.5.5,0,1,0,1,0v-6.981a.50171.50171,0,0,0-.30908-.46155Z",
|
|
30
|
+
fill: "currentColor",
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
33
|
+
d: "M26.85156,3.99072H5.18359A1.20156,1.20156,0,0,0,3.9834,5.19141V26.89062a1.10362,1.10362,0,0,0,1.10254,1.103H26.85156a1.17979,1.17979,0,0,0,1.17871-1.17871V5.16943A1.17979,1.17979,0,0,0,26.85156,3.99072Zm.17871,22.82422a.17891.17891,0,0,1-.17871.17871H5.08594a.10419.10419,0,0,1-.10254-.103V5.19141a.20069.20069,0,0,1,.20019-.20069h21.668a.17888.17888,0,0,1,.17871.17871Z",
|
|
34
|
+
fill: "currentColor",
|
|
35
|
+
}),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Use `Link` to direct users to a new page or piece of information.
|
|
40
|
+
*/
|
|
41
|
+
var Link = function (_a) {
|
|
42
|
+
var id = _a.id, href = _a.href, title = _a.title, rel = _a.rel, target = _a.target, children = _a.children, onClick = _a.onClick, screenReaderText = _a.screenReaderText, _b = _a.isButton, isButton = _b === void 0 ? false : _b, _c = _a.isImplied, isImplied = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? "m" : _d, props = filterDataAttrs.__rest(_a, ["id", "href", "title", "rel", "target", "children", "onClick", "screenReaderText", "isButton", "isImplied", "size"]);
|
|
43
|
+
var surface = React.useContext(Surface.Context).surface;
|
|
44
|
+
var isExternalLink = target === "_blank";
|
|
45
|
+
var textArray = children.split(" ");
|
|
46
|
+
var firstText = textArray.slice(0, -1).join(" ");
|
|
47
|
+
var lastWord = textArray[textArray.length - 1];
|
|
48
|
+
var commonProps = {
|
|
49
|
+
id: id,
|
|
50
|
+
onClick: onClick,
|
|
51
|
+
className: index.classNames("arc-Link", "arc-Link--".concat(size), {
|
|
52
|
+
"arc-Link--onDarkSurface": surface === "dark",
|
|
53
|
+
"arc-Link--onLightSurface": surface !== "dark",
|
|
54
|
+
"arc-Link--isImplied": isImplied
|
|
55
|
+
})
|
|
56
|
+
};
|
|
57
|
+
var elementProps = {
|
|
58
|
+
a: filterDataAttrs.__assign(filterDataAttrs.__assign({}, commonProps), { href: href, title: title, target: target, rel: rel }),
|
|
59
|
+
button: filterDataAttrs.__assign({}, commonProps),
|
|
60
|
+
span: filterDataAttrs.__assign({}, commonProps)
|
|
61
|
+
};
|
|
62
|
+
var LinkElement = isButton ? "button" : href ? "a" : "span";
|
|
63
|
+
return (React__default["default"].createElement(LinkElement, filterDataAttrs.__assign({}, elementProps[LinkElement], filterDataAttrs.filterDataAttrs(props)),
|
|
64
|
+
React__default["default"].createElement("div", { className: "arc-Link-wrapper" },
|
|
65
|
+
React__default["default"].createElement(VisuallyHidden.VisuallyHidden, null,
|
|
66
|
+
screenReaderText || children,
|
|
67
|
+
isExternalLink && " (Opens in new window)"),
|
|
68
|
+
React__default["default"].createElement("span", { "aria-hidden": true, className: "arc-Link-text" },
|
|
69
|
+
firstText,
|
|
70
|
+
"\u00A0"),
|
|
71
|
+
React__default["default"].createElement("span", { className: "arc-Link-iconWrapper" },
|
|
72
|
+
React__default["default"].createElement("span", { "aria-hidden": true, className: "arc-Link-text" }, lastWord),
|
|
73
|
+
isExternalLink && (React__default["default"].createElement(Icon.Icon, { isPresentationIcon: true, icon: BtIconNewWindow, size: size === "s" ? 20 : 24 }))))));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
exports.Link = Link;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/esm/filter-data-attrs-ea8f4ed4.js';
|
|
2
|
+
import React__default, { useContext } from 'react';
|
|
3
|
+
import { c as classNames } from '../_shared/esm/index-2e73c2e9.js';
|
|
4
|
+
import { C as Context } from '../_shared/esm/Surface-0ca6817d.js';
|
|
5
|
+
import { I as Icon } from '../_shared/esm/Icon-15799695.js';
|
|
6
|
+
import { V as VisuallyHidden } from '../_shared/esm/VisuallyHidden-06692fd3.js';
|
|
7
|
+
import '../_shared/esm/suffix-modifier-3d548e45.js';
|
|
8
|
+
|
|
9
|
+
const BtIconNewWindow = (props) =>
|
|
10
|
+
/*#__PURE__*/ React__default.createElement(
|
|
11
|
+
"svg",
|
|
12
|
+
Object.assign(
|
|
13
|
+
{
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
viewBox: "0 0 32 32",
|
|
16
|
+
},
|
|
17
|
+
props,
|
|
18
|
+
),
|
|
19
|
+
/*#__PURE__*/ React__default.createElement("defs", null),
|
|
20
|
+
/*#__PURE__*/ React__default.createElement("path", {
|
|
21
|
+
d: "M24.70166,7.01794a.49968.49968,0,0,0-.19092-.03845H17.50586a.5.5,0,0,0,0,1h5.79785l-8.15918,8.15918a.49995.49995,0,1,0,.707.707l8.15918-8.15918v5.77393a.5.5,0,1,0,1,0v-6.981a.50171.50171,0,0,0-.30908-.46155Z",
|
|
22
|
+
fill: "currentColor",
|
|
23
|
+
}),
|
|
24
|
+
/*#__PURE__*/ React__default.createElement("path", {
|
|
25
|
+
d: "M26.85156,3.99072H5.18359A1.20156,1.20156,0,0,0,3.9834,5.19141V26.89062a1.10362,1.10362,0,0,0,1.10254,1.103H26.85156a1.17979,1.17979,0,0,0,1.17871-1.17871V5.16943A1.17979,1.17979,0,0,0,26.85156,3.99072Zm.17871,22.82422a.17891.17891,0,0,1-.17871.17871H5.08594a.10419.10419,0,0,1-.10254-.103V5.19141a.20069.20069,0,0,1,.20019-.20069h21.668a.17888.17888,0,0,1,.17871.17871Z",
|
|
26
|
+
fill: "currentColor",
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Use `Link` to direct users to a new page or piece of information.
|
|
32
|
+
*/
|
|
33
|
+
var Link = function (_a) {
|
|
34
|
+
var id = _a.id, href = _a.href, title = _a.title, rel = _a.rel, target = _a.target, children = _a.children, onClick = _a.onClick, screenReaderText = _a.screenReaderText, _b = _a.isButton, isButton = _b === void 0 ? false : _b, _c = _a.isImplied, isImplied = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? "m" : _d, props = __rest(_a, ["id", "href", "title", "rel", "target", "children", "onClick", "screenReaderText", "isButton", "isImplied", "size"]);
|
|
35
|
+
var surface = useContext(Context).surface;
|
|
36
|
+
var isExternalLink = target === "_blank";
|
|
37
|
+
var textArray = children.split(" ");
|
|
38
|
+
var firstText = textArray.slice(0, -1).join(" ");
|
|
39
|
+
var lastWord = textArray[textArray.length - 1];
|
|
40
|
+
var commonProps = {
|
|
41
|
+
id: id,
|
|
42
|
+
onClick: onClick,
|
|
43
|
+
className: classNames("arc-Link", "arc-Link--".concat(size), {
|
|
44
|
+
"arc-Link--onDarkSurface": surface === "dark",
|
|
45
|
+
"arc-Link--onLightSurface": surface !== "dark",
|
|
46
|
+
"arc-Link--isImplied": isImplied
|
|
47
|
+
})
|
|
48
|
+
};
|
|
49
|
+
var elementProps = {
|
|
50
|
+
a: __assign(__assign({}, commonProps), { href: href, title: title, target: target, rel: rel }),
|
|
51
|
+
button: __assign({}, commonProps),
|
|
52
|
+
span: __assign({}, commonProps)
|
|
53
|
+
};
|
|
54
|
+
var LinkElement = isButton ? "button" : href ? "a" : "span";
|
|
55
|
+
return (React__default.createElement(LinkElement, __assign({}, elementProps[LinkElement], filterDataAttrs(props)),
|
|
56
|
+
React__default.createElement("div", { className: "arc-Link-wrapper" },
|
|
57
|
+
React__default.createElement(VisuallyHidden, null,
|
|
58
|
+
screenReaderText || children,
|
|
59
|
+
isExternalLink && " (Opens in new window)"),
|
|
60
|
+
React__default.createElement("span", { "aria-hidden": true, className: "arc-Link-text" },
|
|
61
|
+
firstText,
|
|
62
|
+
"\u00A0"),
|
|
63
|
+
React__default.createElement("span", { className: "arc-Link-iconWrapper" },
|
|
64
|
+
React__default.createElement("span", { "aria-hidden": true, className: "arc-Link-text" }, lastWord),
|
|
65
|
+
isExternalLink && (React__default.createElement(Icon, { isPresentationIcon: true, icon: BtIconNewWindow, size: size === "s" ? 20 : 24 }))))));
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export { Link };
|
|
@@ -7,7 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var index = require('../_shared/cjs/index-9947ac13.js');
|
|
8
8
|
var useMediaQuery = require('../_shared/cjs/use-media-query-e61881d8.js');
|
|
9
9
|
var BtIconArrowRight_esm = require('../_shared/cjs/BtIconArrowRight.esm-50d96943.js');
|
|
10
|
-
var CardFooter = require('../_shared/cjs/CardFooter-
|
|
10
|
+
var CardFooter = require('../_shared/cjs/CardFooter-ff015d7d.js');
|
|
11
11
|
var ConditionalWrapper = require('../_shared/cjs/ConditionalWrapper-be3b2625.js');
|
|
12
12
|
var Image = require('../_shared/cjs/Image-e873b8fc.js');
|
|
13
13
|
var Surface = require('../_shared/cjs/Surface-038db6e1.js');
|
|
@@ -25,14 +25,16 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
25
25
|
* Use `MediaCard` to contain content and an image about a single subject.
|
|
26
26
|
*/
|
|
27
27
|
var MediaCard = function (_a) {
|
|
28
|
-
var img = _a.img, url = _a.url, onClick = _a.onClick, heading = _a.heading, label = _a.label, text = _a.text, metaText = _a.metaText, _b = _a.buttonIcon, buttonIcon = _b === void 0 ? "arrow" : _b, _c = _a.isContained, isContained = _c === void 0 ? true : _c, _d = _a.headingLevel, headingLevel = _d === void 0 ? "2" : _d, props = filterDataAttrs.__rest(_a, ["img", "url", "onClick", "heading", "label", "text", "metaText", "buttonIcon", "isContained", "headingLevel"]);
|
|
28
|
+
var img = _a.img, url = _a.url, onClick = _a.onClick, heading = _a.heading, label = _a.label, text = _a.text, metaText = _a.metaText, minHeight = _a.minHeight, _b = _a.buttonIcon, buttonIcon = _b === void 0 ? "arrow" : _b, _c = _a.isContained, isContained = _c === void 0 ? true : _c, _d = _a.headingLevel, headingLevel = _d === void 0 ? "2" : _d, props = filterDataAttrs.__rest(_a, ["img", "url", "onClick", "heading", "label", "text", "metaText", "minHeight", "buttonIcon", "isContained", "headingLevel"]);
|
|
29
|
+
var surface = React.useContext(Surface.Context).surface;
|
|
29
30
|
var _e = React.useState(false), showHoverState = _e[0], setShowHoverState = _e[1];
|
|
30
31
|
var isMinWidthArcBreakpointS = useMediaQuery.useMediaQuery("(min-width: ".concat(useMediaQuery.ArcBreakpointS, "px)"));
|
|
31
32
|
var headingSpacing = isMinWidthArcBreakpointS ? "16" : "8";
|
|
32
33
|
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
33
|
-
return (React__default["default"].createElement("div", filterDataAttrs.__assign({ className: index.classNames("arc-MediaCard", {
|
|
34
|
+
return (React__default["default"].createElement("div", filterDataAttrs.__assign({ style: { minHeight: minHeight }, className: index.classNames("arc-MediaCard", {
|
|
34
35
|
"arc-MediaCard--outlined": url && isContained && showHoverState,
|
|
35
|
-
"arc-MediaCard--contained": isContained
|
|
36
|
+
"arc-MediaCard--contained": isContained,
|
|
37
|
+
"arc-MediaCard--onDarkSurface": surface === "dark"
|
|
36
38
|
}) }, filterDataAttrs.filterDataAttrs(props)),
|
|
37
39
|
React__default["default"].createElement(ConditionalWrapper.ConditionalWrapper, { condition: isContained, wrapper: function (children) { return (React__default["default"].createElement(Surface.Surface, { growVertically: true, background: "white" }, children)); } },
|
|
38
40
|
React__default["default"].createElement("div", { className: "arc-MediaCard-imgContainer" },
|
|
@@ -46,7 +48,7 @@ var MediaCard = function (_a) {
|
|
|
46
48
|
React__default["default"].createElement(VerticalSpace.VerticalSpace, { size: headingSpacing }),
|
|
47
49
|
React__default["default"].createElement(Text.Text, null, text),
|
|
48
50
|
(url || metaText) && React__default["default"].createElement(VerticalSpace.VerticalSpace, { size: "24" })))),
|
|
49
|
-
React__default["default"].createElement(CardFooter.CardFooter, {
|
|
51
|
+
React__default["default"].createElement(CardFooter.CardFooter, { buttonIcon: buttonIcon, metaText: metaText, showButton: Boolean(url), isHovered: showHoverState })))));
|
|
50
52
|
};
|
|
51
53
|
|
|
52
54
|
exports.MediaCard = MediaCard;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/esm/filter-data-attrs-ea8f4ed4.js';
|
|
2
|
-
import React__default, { useState } from 'react';
|
|
2
|
+
import React__default, { useContext, useState } from 'react';
|
|
3
3
|
import { c as classNames } from '../_shared/esm/index-2e73c2e9.js';
|
|
4
4
|
import { u as useMediaQuery, a as ArcBreakpointS } from '../_shared/esm/use-media-query-4c807227.js';
|
|
5
5
|
import { C as CardLabel, a as CardHeading } from '../_shared/esm/BtIconArrowRight.esm-9b181878.js';
|
|
6
|
-
import { C as CardFooter } from '../_shared/esm/CardFooter-
|
|
6
|
+
import { C as CardFooter } from '../_shared/esm/CardFooter-e13f77b0.js';
|
|
7
7
|
import { C as ConditionalWrapper } from '../_shared/esm/ConditionalWrapper-59be8f35.js';
|
|
8
8
|
import { I as Image } from '../_shared/esm/Image-12fbd327.js';
|
|
9
|
-
import { S as Surface } from '../_shared/esm/Surface-0ca6817d.js';
|
|
9
|
+
import { C as Context, S as Surface } from '../_shared/esm/Surface-0ca6817d.js';
|
|
10
10
|
import { T as Text } from '../_shared/esm/Text-14f586ac.js';
|
|
11
11
|
import { V as VerticalSpace } from '../_shared/esm/VerticalSpace-43cd9138.js';
|
|
12
12
|
import '../_shared/esm/suffix-modifier-3d548e45.js';
|
|
@@ -17,14 +17,16 @@ import '../_shared/esm/Icon-15799695.js';
|
|
|
17
17
|
* Use `MediaCard` to contain content and an image about a single subject.
|
|
18
18
|
*/
|
|
19
19
|
var MediaCard = function (_a) {
|
|
20
|
-
var img = _a.img, url = _a.url, onClick = _a.onClick, heading = _a.heading, label = _a.label, text = _a.text, metaText = _a.metaText, _b = _a.buttonIcon, buttonIcon = _b === void 0 ? "arrow" : _b, _c = _a.isContained, isContained = _c === void 0 ? true : _c, _d = _a.headingLevel, headingLevel = _d === void 0 ? "2" : _d, props = __rest(_a, ["img", "url", "onClick", "heading", "label", "text", "metaText", "buttonIcon", "isContained", "headingLevel"]);
|
|
20
|
+
var img = _a.img, url = _a.url, onClick = _a.onClick, heading = _a.heading, label = _a.label, text = _a.text, metaText = _a.metaText, minHeight = _a.minHeight, _b = _a.buttonIcon, buttonIcon = _b === void 0 ? "arrow" : _b, _c = _a.isContained, isContained = _c === void 0 ? true : _c, _d = _a.headingLevel, headingLevel = _d === void 0 ? "2" : _d, props = __rest(_a, ["img", "url", "onClick", "heading", "label", "text", "metaText", "minHeight", "buttonIcon", "isContained", "headingLevel"]);
|
|
21
|
+
var surface = useContext(Context).surface;
|
|
21
22
|
var _e = useState(false), showHoverState = _e[0], setShowHoverState = _e[1];
|
|
22
23
|
var isMinWidthArcBreakpointS = useMediaQuery("(min-width: ".concat(ArcBreakpointS, "px)"));
|
|
23
24
|
var headingSpacing = isMinWidthArcBreakpointS ? "16" : "8";
|
|
24
25
|
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
25
|
-
return (React__default.createElement("div", __assign({ className: classNames("arc-MediaCard", {
|
|
26
|
+
return (React__default.createElement("div", __assign({ style: { minHeight: minHeight }, className: classNames("arc-MediaCard", {
|
|
26
27
|
"arc-MediaCard--outlined": url && isContained && showHoverState,
|
|
27
|
-
"arc-MediaCard--contained": isContained
|
|
28
|
+
"arc-MediaCard--contained": isContained,
|
|
29
|
+
"arc-MediaCard--onDarkSurface": surface === "dark"
|
|
28
30
|
}) }, filterDataAttrs(props)),
|
|
29
31
|
React__default.createElement(ConditionalWrapper, { condition: isContained, wrapper: function (children) { return (React__default.createElement(Surface, { growVertically: true, background: "white" }, children)); } },
|
|
30
32
|
React__default.createElement("div", { className: "arc-MediaCard-imgContainer" },
|
|
@@ -38,7 +40,7 @@ var MediaCard = function (_a) {
|
|
|
38
40
|
React__default.createElement(VerticalSpace, { size: headingSpacing }),
|
|
39
41
|
React__default.createElement(Text, null, text),
|
|
40
42
|
(url || metaText) && React__default.createElement(VerticalSpace, { size: "24" })))),
|
|
41
|
-
React__default.createElement(CardFooter, {
|
|
43
|
+
React__default.createElement(CardFooter, { buttonIcon: buttonIcon, metaText: metaText, showButton: Boolean(url), isHovered: showHoverState })))));
|
|
42
44
|
};
|
|
43
45
|
|
|
44
46
|
export { MediaCard };
|
package/dist/Modal/Modal.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ var index$2 = require('../_shared/cjs/index-d38f1bd0.js');
|
|
|
14
14
|
var Icon = require('../_shared/cjs/Icon-b46897a3.js');
|
|
15
15
|
var Base = require('../_shared/cjs/Base-f5a86eed.js');
|
|
16
16
|
var Heading = require('../_shared/cjs/Heading-27cba320.js');
|
|
17
|
-
var Button = require('../_shared/cjs/Button-
|
|
17
|
+
var Button = require('../_shared/cjs/Button-6ba21d3b.js');
|
|
18
18
|
var Text = require('../_shared/cjs/Text-606ca3a2.js');
|
|
19
19
|
var VerticalSpace = require('../_shared/cjs/VerticalSpace-dc53bb70.js');
|
|
20
20
|
require('react-dom');
|
|
@@ -255,7 +255,7 @@ const $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 = $5d3850c4d0b4e6c7$export$b6d95
|
|
|
255
255
|
const $5d3850c4d0b4e6c7$export$f99233281efd08a0 = $5d3850c4d0b4e6c7$export$16f7638e4a34b909;
|
|
256
256
|
const $5d3850c4d0b4e6c7$export$393edc798c47379d = $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5;
|
|
257
257
|
|
|
258
|
-
/** Use `Modal` to
|
|
258
|
+
/** Use `Modal` to display information that needs immediate action from a user. */
|
|
259
259
|
var Modal = function (_a) {
|
|
260
260
|
var title = _a.title, description = _a.description, ariaDescribedBy = _a.ariaDescribedBy, isOpen = _a.isOpen, actions = _a.actions, onRequestClose = _a.onRequestClose, children = _a.children, _b = _a.role, role = _b === void 0 ? "dialog" : _b, _c = _a.shouldReturnFocus, shouldReturnFocus = _c === void 0 ? true : _c, _d = _a.isContentScrollable, isContentScrollable = _d === void 0 ? false : _d, _e = _a.size, size = _e === void 0 ? "l" : _e, props = filterDataAttrs.__rest(_a, ["title", "description", "ariaDescribedBy", "isOpen", "actions", "onRequestClose", "children", "role", "shouldReturnFocus", "isContentScrollable", "size"]);
|
|
261
261
|
var arcRootElement = React.useContext(Base.ArcRootElementContext);
|
|
@@ -280,7 +280,7 @@ var Modal = function (_a) {
|
|
|
280
280
|
return (React__default["default"].createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, { open: isOpen },
|
|
281
281
|
React__default["default"].createElement($5d3850c4d0b4e6c7$export$602eac185826482c, { container: arcRootElement || undefined },
|
|
282
282
|
React__default["default"].createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, { className: "arc-Modal-overlay" },
|
|
283
|
-
React__default["default"].createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, filterDataAttrs.__assign({}, ariaProps, { role: role, onOpenAutoFocus: setTriggerElement, onCloseAutoFocus: focusTriggerElement, onEscapeKeyDown: closeModal, onInteractOutside: closeModal, className: index$3.classNames("arc-Modal-dialog", "arc-Modal-dialog--".concat(size), {
|
|
283
|
+
React__default["default"].createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, filterDataAttrs.__assign({}, ariaProps, { role: role, onOpenAutoFocus: setTriggerElement, onCloseAutoFocus: focusTriggerElement, onEscapeKeyDown: closeModal, onInteractOutside: closeModal, "aria-modal": "true", className: index$3.classNames("arc-Modal-dialog", "arc-Modal-dialog--".concat(size), {
|
|
284
284
|
"arc-Modal-dialog--maxHeightWindow": isContentScrollable
|
|
285
285
|
}) }, filterDataAttrs.filterDataAttrs(props)),
|
|
286
286
|
React__default["default"].createElement("div", { className: "arc-Modal-section" },
|
package/dist/Modal/Modal.esm.js
CHANGED
|
@@ -10,7 +10,7 @@ import { $ as $921a889cee6df7e8$export$99c2b779aa4e8b8b } from '../_shared/esm/i
|
|
|
10
10
|
import { I as Icon } from '../_shared/esm/Icon-15799695.js';
|
|
11
11
|
import { A as ArcRootElementContext } from '../_shared/esm/Base-f200653c.js';
|
|
12
12
|
import { H as Heading } from '../_shared/esm/Heading-d16e0e53.js';
|
|
13
|
-
import { B as Button } from '../_shared/esm/Button-
|
|
13
|
+
import { B as Button } from '../_shared/esm/Button-a7d134c6.js';
|
|
14
14
|
import { T as Text } from '../_shared/esm/Text-14f586ac.js';
|
|
15
15
|
import { V as VerticalSpace } from '../_shared/esm/VerticalSpace-43cd9138.js';
|
|
16
16
|
import 'react-dom';
|
|
@@ -247,7 +247,7 @@ const $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 = $5d3850c4d0b4e6c7$export$b6d95
|
|
|
247
247
|
const $5d3850c4d0b4e6c7$export$f99233281efd08a0 = $5d3850c4d0b4e6c7$export$16f7638e4a34b909;
|
|
248
248
|
const $5d3850c4d0b4e6c7$export$393edc798c47379d = $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5;
|
|
249
249
|
|
|
250
|
-
/** Use `Modal` to
|
|
250
|
+
/** Use `Modal` to display information that needs immediate action from a user. */
|
|
251
251
|
var Modal = function (_a) {
|
|
252
252
|
var title = _a.title, description = _a.description, ariaDescribedBy = _a.ariaDescribedBy, isOpen = _a.isOpen, actions = _a.actions, onRequestClose = _a.onRequestClose, children = _a.children, _b = _a.role, role = _b === void 0 ? "dialog" : _b, _c = _a.shouldReturnFocus, shouldReturnFocus = _c === void 0 ? true : _c, _d = _a.isContentScrollable, isContentScrollable = _d === void 0 ? false : _d, _e = _a.size, size = _e === void 0 ? "l" : _e, props = __rest(_a, ["title", "description", "ariaDescribedBy", "isOpen", "actions", "onRequestClose", "children", "role", "shouldReturnFocus", "isContentScrollable", "size"]);
|
|
253
253
|
var arcRootElement = useContext(ArcRootElementContext);
|
|
@@ -272,7 +272,7 @@ var Modal = function (_a) {
|
|
|
272
272
|
return (React__default.createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, { open: isOpen },
|
|
273
273
|
React__default.createElement($5d3850c4d0b4e6c7$export$602eac185826482c, { container: arcRootElement || undefined },
|
|
274
274
|
React__default.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, { className: "arc-Modal-overlay" },
|
|
275
|
-
React__default.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, __assign({}, ariaProps, { role: role, onOpenAutoFocus: setTriggerElement, onCloseAutoFocus: focusTriggerElement, onEscapeKeyDown: closeModal, onInteractOutside: closeModal, className: classNames("arc-Modal-dialog", "arc-Modal-dialog--".concat(size), {
|
|
275
|
+
React__default.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, __assign({}, ariaProps, { role: role, onOpenAutoFocus: setTriggerElement, onCloseAutoFocus: focusTriggerElement, onEscapeKeyDown: closeModal, onInteractOutside: closeModal, "aria-modal": "true", className: classNames("arc-Modal-dialog", "arc-Modal-dialog--".concat(size), {
|
|
276
276
|
"arc-Modal-dialog--maxHeightWindow": isContentScrollable
|
|
277
277
|
}) }, filterDataAttrs(props)),
|
|
278
278
|
React__default.createElement("div", { className: "arc-Modal-section" },
|
|
@@ -52,7 +52,7 @@ var usePagination = function (pageCount, selectedPage) {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
-
* Use `Pagination` to navigate multiple pages.
|
|
55
|
+
* Use `Pagination` to navigate through multiple pages of content.
|
|
56
56
|
*/
|
|
57
57
|
var Pagination = function (_a) {
|
|
58
58
|
var pageCount = _a.pageCount, onPageChange = _a.onPageChange, _b = _a.defaultSelectedPage, defaultSelectedPage = _b === void 0 ? 1 : _b, props = filterDataAttrs.__rest(_a, ["pageCount", "onPageChange", "defaultSelectedPage"]);
|
|
@@ -44,7 +44,7 @@ var usePagination = function (pageCount, selectedPage) {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* Use `Pagination` to navigate multiple pages.
|
|
47
|
+
* Use `Pagination` to navigate through multiple pages of content.
|
|
48
48
|
*/
|
|
49
49
|
var Pagination = function (_a) {
|
|
50
50
|
var pageCount = _a.pageCount, onPageChange = _a.onPageChange, _b = _a.defaultSelectedPage, defaultSelectedPage = _b === void 0 ? 1 : _b, props = __rest(_a, ["pageCount", "onPageChange", "defaultSelectedPage"]);
|
|
@@ -16,10 +16,10 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
16
16
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* Use `PaginationSimple` to navigate multiple pages.
|
|
19
|
+
* Use `PaginationSimple` to navigate through multiple pages of content.
|
|
20
20
|
*/
|
|
21
21
|
var PaginationSimple = function (_a) {
|
|
22
|
-
var hidePrev = _a.hidePrev, hideNext = _a.hideNext, onPrevPage = _a.onPrevPage, onNextPage = _a.onNextPage, isFluid = _a.isFluid, props = filterDataAttrs.__rest(_a, ["hidePrev", "hideNext", "onPrevPage", "onNextPage", "isFluid"]);
|
|
22
|
+
var hidePrev = _a.hidePrev, hideNext = _a.hideNext, prevHref = _a.prevHref, nextHref = _a.nextHref, onPrevPage = _a.onPrevPage, onNextPage = _a.onNextPage, isFluid = _a.isFluid, props = filterDataAttrs.__rest(_a, ["hidePrev", "hideNext", "prevHref", "nextHref", "onPrevPage", "onNextPage", "isFluid"]);
|
|
23
23
|
var surface = React.useContext(Surface.Context).surface;
|
|
24
24
|
return (React__default["default"].createElement("nav", filterDataAttrs.__assign({ className: index.classNames("arc-PaginationSimple", {
|
|
25
25
|
"arc-PaginationSimple--onDarkSurface": surface === "dark",
|
|
@@ -28,20 +28,16 @@ var PaginationSimple = function (_a) {
|
|
|
28
28
|
}) }, filterDataAttrs.filterDataAttrs(props)),
|
|
29
29
|
React__default["default"].createElement("ul", { className: "arc-PaginationSimple-list" },
|
|
30
30
|
React__default["default"].createElement("li", { className: "arc-PaginationSimple-listItem" },
|
|
31
|
-
React__default["default"].createElement("
|
|
31
|
+
React__default["default"].createElement("a", { tabIndex: 0, href: prevHref, role: !prevHref ? "button" : undefined, className: index.classNames("arc-PaginationSimple-navigationButton", {
|
|
32
32
|
"arc-PaginationSimple-navigationButton--hidden": hidePrev
|
|
33
|
-
}), onClick:
|
|
34
|
-
onPrevPage();
|
|
35
|
-
} },
|
|
33
|
+
}), onClick: onPrevPage },
|
|
36
34
|
React__default["default"].createElement("div", { className: "arc-PaginationSimple-iconContainer arc-PaginationSimple-iconContainer--left" },
|
|
37
35
|
React__default["default"].createElement(Icon.Icon, { color: "brand", size: 32, icon: BtIconChevronLeftMid_esm.BtIconChevronLeftMid })),
|
|
38
36
|
React__default["default"].createElement("span", { className: "arc-PaginationSimple-prevText" }, "Prev"))),
|
|
39
37
|
React__default["default"].createElement("li", { className: "arc-PaginationSimple-listItem" },
|
|
40
|
-
React__default["default"].createElement("
|
|
38
|
+
React__default["default"].createElement("a", { tabIndex: 0, href: nextHref, role: !nextHref ? "button" : undefined, className: index.classNames("arc-PaginationSimple-navigationButton", {
|
|
41
39
|
"arc-PaginationSimple-navigationButton--hidden": hideNext
|
|
42
|
-
}), onClick:
|
|
43
|
-
onNextPage();
|
|
44
|
-
} },
|
|
40
|
+
}), onClick: onNextPage },
|
|
45
41
|
React__default["default"].createElement("span", { className: "arc-PaginationSimple-nextText" }, "Next"),
|
|
46
42
|
React__default["default"].createElement("div", { className: "arc-PaginationSimple-iconContainer arc-PaginationSimple-iconContainer--right" },
|
|
47
43
|
React__default["default"].createElement(Icon.Icon, { color: "brand", size: 32, icon: BtIconChevronRightMid_esm.BtIconChevronRightMid })))))));
|
|
@@ -8,10 +8,10 @@ import { C as Context } from '../_shared/esm/Surface-0ca6817d.js';
|
|
|
8
8
|
import '../_shared/esm/suffix-modifier-3d548e45.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Use `PaginationSimple` to navigate multiple pages.
|
|
11
|
+
* Use `PaginationSimple` to navigate through multiple pages of content.
|
|
12
12
|
*/
|
|
13
13
|
var PaginationSimple = function (_a) {
|
|
14
|
-
var hidePrev = _a.hidePrev, hideNext = _a.hideNext, onPrevPage = _a.onPrevPage, onNextPage = _a.onNextPage, isFluid = _a.isFluid, props = __rest(_a, ["hidePrev", "hideNext", "onPrevPage", "onNextPage", "isFluid"]);
|
|
14
|
+
var hidePrev = _a.hidePrev, hideNext = _a.hideNext, prevHref = _a.prevHref, nextHref = _a.nextHref, onPrevPage = _a.onPrevPage, onNextPage = _a.onNextPage, isFluid = _a.isFluid, props = __rest(_a, ["hidePrev", "hideNext", "prevHref", "nextHref", "onPrevPage", "onNextPage", "isFluid"]);
|
|
15
15
|
var surface = useContext(Context).surface;
|
|
16
16
|
return (React__default.createElement("nav", __assign({ className: classNames("arc-PaginationSimple", {
|
|
17
17
|
"arc-PaginationSimple--onDarkSurface": surface === "dark",
|
|
@@ -20,20 +20,16 @@ var PaginationSimple = function (_a) {
|
|
|
20
20
|
}) }, filterDataAttrs(props)),
|
|
21
21
|
React__default.createElement("ul", { className: "arc-PaginationSimple-list" },
|
|
22
22
|
React__default.createElement("li", { className: "arc-PaginationSimple-listItem" },
|
|
23
|
-
React__default.createElement("
|
|
23
|
+
React__default.createElement("a", { tabIndex: 0, href: prevHref, role: !prevHref ? "button" : undefined, className: classNames("arc-PaginationSimple-navigationButton", {
|
|
24
24
|
"arc-PaginationSimple-navigationButton--hidden": hidePrev
|
|
25
|
-
}), onClick:
|
|
26
|
-
onPrevPage();
|
|
27
|
-
} },
|
|
25
|
+
}), onClick: onPrevPage },
|
|
28
26
|
React__default.createElement("div", { className: "arc-PaginationSimple-iconContainer arc-PaginationSimple-iconContainer--left" },
|
|
29
27
|
React__default.createElement(Icon, { color: "brand", size: 32, icon: BtIconChevronLeftMid })),
|
|
30
28
|
React__default.createElement("span", { className: "arc-PaginationSimple-prevText" }, "Prev"))),
|
|
31
29
|
React__default.createElement("li", { className: "arc-PaginationSimple-listItem" },
|
|
32
|
-
React__default.createElement("
|
|
30
|
+
React__default.createElement("a", { tabIndex: 0, href: nextHref, role: !nextHref ? "button" : undefined, className: classNames("arc-PaginationSimple-navigationButton", {
|
|
33
31
|
"arc-PaginationSimple-navigationButton--hidden": hideNext
|
|
34
|
-
}), onClick:
|
|
35
|
-
onNextPage();
|
|
36
|
-
} },
|
|
32
|
+
}), onClick: onNextPage },
|
|
37
33
|
React__default.createElement("span", { className: "arc-PaginationSimple-nextText" }, "Next"),
|
|
38
34
|
React__default.createElement("div", { className: "arc-PaginationSimple-iconContainer arc-PaginationSimple-iconContainer--right" },
|
|
39
35
|
React__default.createElement(Icon, { color: "brand", size: 32, icon: BtIconChevronRightMid })))))));
|
|
@@ -59,10 +59,16 @@ var getProgressBarProps = function (isIndeterminate, progressValue, ariaLabel) {
|
|
|
59
59
|
return isIndeterminate ? indeterminateProps : determinateProps;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Use `ProgressBar` to show the progress of a specific task within a page.
|
|
64
|
+
*/
|
|
62
65
|
var ProgressBar = function (_a) {
|
|
63
66
|
var _b = _a.state, state = _b === void 0 ? "loading" : _b, _c = _a.value, value = _c === void 0 ? 0 : _c, _d = _a.isIndeterminate, isIndeterminate = _d === void 0 ? false : _d, headline = _a.headline, ariaLabel = _a.ariaLabel, action = _a.action, title = _a.title, description = _a.description, displayValue = _a.displayValue, props = filterDataAttrs.__rest(_a, ["state", "value", "isIndeterminate", "headline", "ariaLabel", "action", "title", "description", "displayValue"]);
|
|
64
67
|
var surface = React.useContext(Surface.Context).surface;
|
|
65
68
|
var progressValue = Math.min(100, Math.max(0, value));
|
|
69
|
+
var autoFocusRef = function (canFocus) { return function (el) {
|
|
70
|
+
canFocus && el && el.focus();
|
|
71
|
+
}; };
|
|
66
72
|
return (React__default["default"].createElement("div", filterDataAttrs.__assign({ "data-testid": "progress", className: index.classNames("arc-ProgressBar", "arc-ProgressBar--".concat(state), {
|
|
67
73
|
"arc-ProgressBar--onDarkSurface": surface === "dark"
|
|
68
74
|
}) }, filterDataAttrs.filterDataAttrs(props)),
|
|
@@ -76,11 +82,11 @@ var ProgressBar = function (_a) {
|
|
|
76
82
|
React__default["default"].createElement("div", { className: "arc-ProgressBar-container" },
|
|
77
83
|
React__default["default"].createElement("div", { className: "arc-ProgressBar-outerBar" },
|
|
78
84
|
React__default["default"].createElement("div", filterDataAttrs.__assign({}, getProgressBarProps(isIndeterminate, progressValue, ariaLabel)))),
|
|
79
|
-
description && (React__default["default"].createElement("div", { className: "arc-ProgressBar-description" },
|
|
85
|
+
description && (React__default["default"].createElement("div", { className: "arc-ProgressBar-description", role: "status" },
|
|
80
86
|
React__default["default"].createElement(Text.Text, { tone: state !== "error" ? "supporting" : "default" }, description))),
|
|
81
87
|
action && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
82
88
|
React__default["default"].createElement(VerticalSpace.VerticalSpace, { size: "8" }),
|
|
83
|
-
React__default["default"].createElement("button", { className: "arc-ProgressBar-actionButton", onClick: action.action },
|
|
89
|
+
React__default["default"].createElement("button", { ref: autoFocusRef(action.autofocusOnMount), className: "arc-ProgressBar-actionButton", onClick: action.action },
|
|
84
90
|
React__default["default"].createElement("div", { className: "arc-ProgressBar-actionContainer" },
|
|
85
91
|
React__default["default"].createElement(Text.Text, null, action.text),
|
|
86
92
|
action.icon && (React__default["default"].createElement("div", { className: "arc-ProgressBar-actionIcon" },
|
|
@@ -51,10 +51,16 @@ var getProgressBarProps = function (isIndeterminate, progressValue, ariaLabel) {
|
|
|
51
51
|
return isIndeterminate ? indeterminateProps : determinateProps;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Use `ProgressBar` to show the progress of a specific task within a page.
|
|
56
|
+
*/
|
|
54
57
|
var ProgressBar = function (_a) {
|
|
55
58
|
var _b = _a.state, state = _b === void 0 ? "loading" : _b, _c = _a.value, value = _c === void 0 ? 0 : _c, _d = _a.isIndeterminate, isIndeterminate = _d === void 0 ? false : _d, headline = _a.headline, ariaLabel = _a.ariaLabel, action = _a.action, title = _a.title, description = _a.description, displayValue = _a.displayValue, props = __rest(_a, ["state", "value", "isIndeterminate", "headline", "ariaLabel", "action", "title", "description", "displayValue"]);
|
|
56
59
|
var surface = useContext(Context).surface;
|
|
57
60
|
var progressValue = Math.min(100, Math.max(0, value));
|
|
61
|
+
var autoFocusRef = function (canFocus) { return function (el) {
|
|
62
|
+
canFocus && el && el.focus();
|
|
63
|
+
}; };
|
|
58
64
|
return (React__default.createElement("div", __assign({ "data-testid": "progress", className: classNames("arc-ProgressBar", "arc-ProgressBar--".concat(state), {
|
|
59
65
|
"arc-ProgressBar--onDarkSurface": surface === "dark"
|
|
60
66
|
}) }, filterDataAttrs(props)),
|
|
@@ -68,11 +74,11 @@ var ProgressBar = function (_a) {
|
|
|
68
74
|
React__default.createElement("div", { className: "arc-ProgressBar-container" },
|
|
69
75
|
React__default.createElement("div", { className: "arc-ProgressBar-outerBar" },
|
|
70
76
|
React__default.createElement("div", __assign({}, getProgressBarProps(isIndeterminate, progressValue, ariaLabel)))),
|
|
71
|
-
description && (React__default.createElement("div", { className: "arc-ProgressBar-description" },
|
|
77
|
+
description && (React__default.createElement("div", { className: "arc-ProgressBar-description", role: "status" },
|
|
72
78
|
React__default.createElement(Text, { tone: state !== "error" ? "supporting" : "default" }, description))),
|
|
73
79
|
action && (React__default.createElement(React__default.Fragment, null,
|
|
74
80
|
React__default.createElement(VerticalSpace, { size: "8" }),
|
|
75
|
-
React__default.createElement("button", { className: "arc-ProgressBar-actionButton", onClick: action.action },
|
|
81
|
+
React__default.createElement("button", { ref: autoFocusRef(action.autofocusOnMount), className: "arc-ProgressBar-actionButton", onClick: action.action },
|
|
76
82
|
React__default.createElement("div", { className: "arc-ProgressBar-actionContainer" },
|
|
77
83
|
React__default.createElement(Text, null, action.text),
|
|
78
84
|
action.icon && (React__default.createElement("div", { className: "arc-ProgressBar-actionIcon" },
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ProgressStepper = require('../_shared/cjs/ProgressStepper-
|
|
5
|
+
var ProgressStepper = require('../_shared/cjs/ProgressStepper-57cfef1e.js');
|
|
6
6
|
require('../_shared/cjs/filter-data-attrs-1c9a530c.js');
|
|
7
7
|
require('react');
|
|
8
8
|
require('../_shared/cjs/index-9947ac13.js');
|
|
9
9
|
require('../_shared/cjs/Icon-b46897a3.js');
|
|
10
10
|
require('../_shared/cjs/suffix-modifier-64dcd338.js');
|
|
11
11
|
require('../_shared/cjs/Surface-038db6e1.js');
|
|
12
|
-
require('../_shared/cjs/VisuallyHidden-
|
|
12
|
+
require('../_shared/cjs/VisuallyHidden-b0de4c7b.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { P as ProgressStepper } from '../_shared/esm/ProgressStepper-
|
|
1
|
+
export { P as ProgressStepper } from '../_shared/esm/ProgressStepper-6c811282.js';
|
|
2
2
|
import '../_shared/esm/filter-data-attrs-ea8f4ed4.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../_shared/esm/index-2e73c2e9.js';
|
|
5
5
|
import '../_shared/esm/Icon-15799695.js';
|
|
6
6
|
import '../_shared/esm/suffix-modifier-3d548e45.js';
|
|
7
7
|
import '../_shared/esm/Surface-0ca6817d.js';
|
|
8
|
-
import '../_shared/esm/VisuallyHidden-
|
|
8
|
+
import '../_shared/esm/VisuallyHidden-06692fd3.js';
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var RadioGroup = require('../_shared/cjs/RadioGroup-
|
|
5
|
+
var RadioGroup = require('../_shared/cjs/RadioGroup-85eda600.js');
|
|
6
6
|
require('../_shared/cjs/filter-data-attrs-1c9a530c.js');
|
|
7
7
|
require('react');
|
|
8
|
-
require('../_shared/cjs/FormControl-
|
|
8
|
+
require('../_shared/cjs/FormControl-68258ce1.js');
|
|
9
9
|
require('../_shared/cjs/index-9947ac13.js');
|
|
10
10
|
require('../_shared/cjs/BtIconAlert.esm-1a0ff9f0.js');
|
|
11
11
|
require('../_shared/cjs/Surface-038db6e1.js');
|
|
12
|
-
require('../_shared/cjs/DisclosureMini-
|
|
12
|
+
require('../_shared/cjs/DisclosureMini-09c749e5.js');
|
|
13
13
|
require('../_shared/cjs/BtIconChevronDown2Px.esm-39030ee0.js');
|
|
14
14
|
require('../_shared/cjs/Text-606ca3a2.js');
|
|
15
15
|
require('../_shared/cjs/suffix-modifier-64dcd338.js');
|
|
16
|
-
require('../_shared/cjs/VisuallyHidden-
|
|
16
|
+
require('../_shared/cjs/VisuallyHidden-b0de4c7b.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { R as RadioGroup } from '../_shared/esm/RadioGroup-
|
|
1
|
+
export { R as RadioGroup } from '../_shared/esm/RadioGroup-6c8f8454.js';
|
|
2
2
|
import '../_shared/esm/filter-data-attrs-ea8f4ed4.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '../_shared/esm/FormControl-
|
|
4
|
+
import '../_shared/esm/FormControl-8e836656.js';
|
|
5
5
|
import '../_shared/esm/index-2e73c2e9.js';
|
|
6
6
|
import '../_shared/esm/BtIconAlert.esm-a4608d47.js';
|
|
7
7
|
import '../_shared/esm/Surface-0ca6817d.js';
|
|
8
|
-
import '../_shared/esm/DisclosureMini-
|
|
8
|
+
import '../_shared/esm/DisclosureMini-56719716.js';
|
|
9
9
|
import '../_shared/esm/BtIconChevronDown2Px.esm-217276c2.js';
|
|
10
10
|
import '../_shared/esm/Text-14f586ac.js';
|
|
11
11
|
import '../_shared/esm/suffix-modifier-3d548e45.js';
|
|
12
|
-
import '../_shared/esm/VisuallyHidden-
|
|
12
|
+
import '../_shared/esm/VisuallyHidden-06692fd3.js';
|
|
@@ -17,15 +17,15 @@ var index$5 = require('../_shared/cjs/index-a31e64a9.js');
|
|
|
17
17
|
var BtIconChevronDown2Px_esm = require('../_shared/cjs/BtIconChevronDown2Px.esm-39030ee0.js');
|
|
18
18
|
var BtIconTickAlt2Px_esm = require('../_shared/cjs/BtIconTickAlt2Px.esm-57c89acc.js');
|
|
19
19
|
var Icon = require('../_shared/cjs/Icon-b46897a3.js');
|
|
20
|
-
var FormControl = require('../_shared/cjs/FormControl-
|
|
20
|
+
var FormControl = require('../_shared/cjs/FormControl-68258ce1.js');
|
|
21
21
|
var Surface = require('../_shared/cjs/Surface-038db6e1.js');
|
|
22
22
|
var Base = require('../_shared/cjs/Base-f5a86eed.js');
|
|
23
23
|
require('../_shared/cjs/index-74004a9c.js');
|
|
24
24
|
require('../_shared/cjs/suffix-modifier-64dcd338.js');
|
|
25
25
|
require('../_shared/cjs/BtIconAlert.esm-1a0ff9f0.js');
|
|
26
|
-
require('../_shared/cjs/DisclosureMini-
|
|
26
|
+
require('../_shared/cjs/DisclosureMini-09c749e5.js');
|
|
27
27
|
require('../_shared/cjs/Text-606ca3a2.js');
|
|
28
|
-
require('../_shared/cjs/VisuallyHidden-
|
|
28
|
+
require('../_shared/cjs/VisuallyHidden-b0de4c7b.js');
|
|
29
29
|
|
|
30
30
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
31
31
|
|