@arc-ui/community-components 3.0.0 → 3.0.1
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/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +6 -0
- package/lib/Accordion/Accordion.cjs +1 -1
- package/lib/Accordion/Accordion.mjs +1 -1
- package/lib/Accordion/styles.css +1 -0
- package/lib/FAQs/FAQs.cjs +1 -1
- package/lib/FAQs/FAQs.mjs +1 -1
- package/lib/_shared/cjs/{Accordion-C4XdbGCu.cjs → Accordion-D5fpUJzm.cjs} +10 -8
- package/lib/_shared/esm/{Accordion-Ct7RuUbx.mjs → Accordion-LLwNdzax.mjs} +10 -8
- package/lib/index.cjs +10 -8
- package/lib/index.cjs.map +1 -1
- package/lib/index.mjs +10 -8
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +3 -3
- package/src/components/Accordion/Accordion.module.css +6 -0
- package/src/components/Accordion/Accordion.tsx +3 -1
- package/versions.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @arc-ui/community-components@3.0.
|
|
2
|
+
> @arc-ui/community-components@3.0.1 build /builds/enterprise/frontend/arc-community/packages/components
|
|
3
3
|
> rimraf lib dist && rollup -c && generate-subpath-css && pnpm run build:clean
|
|
4
4
|
|
|
5
5
|
Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
|
|
@@ -7,22 +7,22 @@ Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
|
|
|
7
7
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
8
8
|
[36m
|
|
9
9
|
[1msrc/index.ts[22m → [1mlib/index.cjs, lib/index.mjs[22m...[39m
|
|
10
|
-
[32mcreated [1mlib/index.cjs, lib/index.mjs[22m in [
|
|
10
|
+
[32mcreated [1mlib/index.cjs, lib/index.mjs[22m in [1m4.4s[22m[39m
|
|
11
11
|
[36m
|
|
12
12
|
[1m./lib/types/index.d.ts[22m → [1mlib/index.d.mts, lib/index.d.cts[22m...[39m
|
|
13
13
|
[1m[33m(!) Unresolved dependencies[39m[22m
|
|
14
14
|
[90mhttps://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency[39m
|
|
15
|
-
[1m@arc-ui/components/dist/Heading[22m (imported by "lib/types/components/CopyLead/CopyLead.d.ts", "lib/types/components/ArticleSidebar/types/text-section.d.ts", "lib/types/components/ArticleSidebar/types/link-section.d.ts", "lib/types/components/ArticleSidebar/types/
|
|
15
|
+
[1m@arc-ui/components/dist/Heading[22m (imported by "lib/types/components/CopyLead/CopyLead.d.ts", "lib/types/components/ArticleSidebar/types/text-section.d.ts", "lib/types/components/ArticleSidebar/types/link-section.d.ts", "lib/types/components/ArticleSidebar/types/share.d.ts" and "lib/types/components/ArticleSidebar/types/topic.d.ts")
|
|
16
16
|
[1m@arc-ui/components/dist/VideoPlayer[22m (imported by "lib/types/components/CopyLead/CopyLead.d.ts")
|
|
17
17
|
[1m@arc-ui/components/Avatar[22m (imported by "lib/types/components/Author/Author.d.ts")
|
|
18
|
-
[1m@arc-ui/components/Download[22m (imported by "lib/types/components/DownloadList/DownloadList.d.ts")
|
|
19
18
|
[1m@arc-ui/components/Heading[22m (imported by "lib/types/components/FeaturePost/FeaturePost.d.ts", "lib/types/components/Summary/Summary.d.ts", "lib/types/components/SectionHeading/SectionHeading.d.ts" and "lib/types/components/Accordion/components/AccordionHeading/AccordionHeading.d.ts")
|
|
20
19
|
[1m@arc-ui/components/VideoPlayer[22m (imported by "lib/types/components/FeaturePost/FeaturePost.d.ts")
|
|
20
|
+
[1m@arc-ui/components/ButtonV2[22m (imported by "lib/types/components/Highlights/Highlights.d.ts")
|
|
21
21
|
[1m@arc-ui/components/MediaCard[22m (imported by "lib/types/components/PromoListing/PromoListing.d.ts")
|
|
22
22
|
[1m@arc-ui/components/ImpactCard[22m (imported by "lib/types/components/PromoListing/PromoListing.d.ts")
|
|
23
23
|
[1m@arc-ui/components/InformationCard[22m (imported by "lib/types/components/PromoListing/PromoListing.d.ts" and "lib/types/components/ProductNavigation/types/product-list.d.ts")
|
|
24
24
|
[1m@arc-ui/components/TypographyCard[22m (imported by "lib/types/components/PromoListing/PromoListing.d.ts")
|
|
25
|
-
[1m@arc-ui/components/
|
|
25
|
+
[1m@arc-ui/components/Download[22m (imported by "lib/types/components/DownloadList/DownloadList.d.ts")
|
|
26
26
|
[1m@arc-ui/components/dist/types/components/TemplateBanner/TemplateBanner[22m (imported by "lib/types/components/BannerWithTabs/BannerWithTabs.d.ts")
|
|
27
27
|
[1m@arc-ui/components/dist/types/components/Image/Image[22m (imported by "lib/types/components/SectionHeading/SectionHeading.d.ts", "lib/types/components/Accordion/components/AccordionHeading/AccordionHeading.d.ts", "lib/types/components/CopyLead/types/copy-lead-image.d.ts" and "lib/types/components/FeaturePost/types/feature-post-image.d.ts")
|
|
28
28
|
[1m@arc-ui/components/Disclosure[22m (imported by "lib/types/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.d.ts")
|
|
@@ -30,17 +30,17 @@ Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
|
|
|
30
30
|
[1m@arc-ui/components/types/components/ButtonV2/ButtonV2[22m (imported by "lib/types/components/ProductNavigation/types/product-list.d.ts")
|
|
31
31
|
[1m@arc-ui/components/dist/types/components/Button/Button[22m (imported by "lib/types/components/CopyLead/types/copy-lead-button.d.ts" and "lib/types/components/FeaturePost/types/feature-post-cta-footer.d.ts")
|
|
32
32
|
[1m@arc-ui/components/dist/types/components/AppButton[22m (imported by "lib/types/components/FeaturePost/types/feature-post-app-button-footer.d.ts")
|
|
33
|
-
[32mcreated [1mlib/index.d.mts, lib/index.d.cts[22m in [
|
|
33
|
+
[32mcreated [1mlib/index.d.mts, lib/index.d.cts[22m in [1m116ms[22m[39m
|
|
34
34
|
[36m
|
|
35
35
|
[1m./src/components/Accordion/index.ts, ./src/components/ArticleSidebar/index.ts, ./src/components/Author/index.ts, ./src/components/BannerWithTabs/index.ts, ./src/components/ContentInfoWidget/index.ts, ./src/components/CopyLead/index.ts, ./src/components/DownloadList/index.ts, ./src/components/FAQs/index.ts, ./src/components/FeaturePost/index.ts, ./src/components/Highlights/index.ts, ./src/components/ProductNavigation/index.ts, ./src/components/PromoListing/index.ts, ./src/components/Quote/index.ts, ./src/components/SectionHeading/index.ts, ./src/components/Statistics/index.ts, ./src/components/Summary/index.ts[22m → [1mlib[22m...[39m
|
|
36
|
-
[32mcreated [1mlib[22m in [
|
|
36
|
+
[32mcreated [1mlib[22m in [1m3.1s[22m[39m
|
|
37
37
|
[36m
|
|
38
38
|
[1m./src/components/Accordion/index.ts, ./src/components/ArticleSidebar/index.ts, ./src/components/Author/index.ts, ./src/components/BannerWithTabs/index.ts, ./src/components/ContentInfoWidget/index.ts, ./src/components/CopyLead/index.ts, ./src/components/DownloadList/index.ts, ./src/components/FAQs/index.ts, ./src/components/FeaturePost/index.ts, ./src/components/Highlights/index.ts, ./src/components/ProductNavigation/index.ts, ./src/components/PromoListing/index.ts, ./src/components/Quote/index.ts, ./src/components/SectionHeading/index.ts, ./src/components/Statistics/index.ts, ./src/components/Summary/index.ts[22m → [1mlib[22m...[39m
|
|
39
|
-
[32mcreated [1mlib[22m in [
|
|
39
|
+
[32mcreated [1mlib[22m in [1m2.5s[22m[39m
|
|
40
40
|
Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
|
|
41
41
|
npx update-browserslist-db@latest
|
|
42
42
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
43
43
|
|
|
44
|
-
> @arc-ui/community-components@3.0.
|
|
44
|
+
> @arc-ui/community-components@3.0.1 build:clean /builds/enterprise/frontend/arc-community/packages/components
|
|
45
45
|
> rimraf ./lib/types ./lib/styles.js ./lib/index.js ./lib/index.js.map
|
|
46
46
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var Accordion = require('../_shared/cjs/Accordion-
|
|
3
|
+
var Accordion = require('../_shared/cjs/Accordion-D5fpUJzm.cjs');
|
|
4
4
|
require('../_shared/cjs/tslib.es6-BxB9I209.cjs');
|
|
5
5
|
require('react');
|
|
6
6
|
require('../_shared/cjs/filter-data-attrs-ajtUvDAC.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Accordion-module_Accordion__LsXTU ul,.Accordion-module_Accordion__LsXTU li{list-style:none;margin:0;padding:0}
|
package/lib/FAQs/FAQs.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var tslib_es6 = require('../_shared/cjs/tslib.es6-BxB9I209.cjs');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var index = require('../_shared/cjs/index-Bp6Dd2i1.cjs');
|
|
6
6
|
var filterDataAttrs = require('../_shared/cjs/filter-data-attrs-ajtUvDAC.cjs');
|
|
7
|
-
var Accordion = require('../_shared/cjs/Accordion-
|
|
7
|
+
var Accordion = require('../_shared/cjs/Accordion-D5fpUJzm.cjs');
|
|
8
8
|
var SectionHeading = require('../_shared/cjs/SectionHeading-DepTV4JA.cjs');
|
|
9
9
|
var Link = require('@arc-ui/components/Link');
|
|
10
10
|
var Heading = require('@arc-ui/components/Heading');
|
package/lib/FAQs/FAQs.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { a as __rest, _ as __assign } from '../_shared/esm/tslib.es6-D6Wu-xwB.mj
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { c as classNames } from '../_shared/esm/index-BfTCfPZ1.mjs';
|
|
4
4
|
import { f as filterDataAttrs } from '../_shared/esm/filter-data-attrs-V7cbJuwS.mjs';
|
|
5
|
-
import { A as Accordion } from '../_shared/esm/Accordion-
|
|
5
|
+
import { A as Accordion } from '../_shared/esm/Accordion-LLwNdzax.mjs';
|
|
6
6
|
import { S as SectionHeading } from '../_shared/esm/SectionHeading-BayinGP_.mjs';
|
|
7
7
|
import { Link } from '@arc-ui/components/Link';
|
|
8
8
|
import { Heading } from '@arc-ui/components/Heading';
|
|
@@ -10,17 +10,17 @@ var VerticalSpace = require('@arc-ui/components/VerticalSpace');
|
|
|
10
10
|
var Image = require('@arc-ui/components/Image');
|
|
11
11
|
var Disclosure = require('@arc-ui/components/Disclosure');
|
|
12
12
|
|
|
13
|
-
var styles$
|
|
13
|
+
var styles$2 = {"accordion-header":"AccordionHeading-module_accordion-header__8s12f","accordion-header--hasImage":"AccordionHeading-module_accordion-header--hasImage__wbDjW","accordion-header--padded":"AccordionHeading-module_accordion-header--padded__me1JY","accordion-header--headingSizeM":"AccordionHeading-module_accordion-header--headingSizeM__amLfy"};
|
|
14
14
|
|
|
15
15
|
var AccordionHeading = function (_a) {
|
|
16
16
|
var _b, _c;
|
|
17
17
|
var heading = _a.heading, content = _a.content, id = _a.id, _d = _a.isPadded, isPadded = _d === void 0 ? false : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e, _f = _a.headingSize, headingSize = _f === void 0 ? "xl" : _f, image = _a.image, props = tslib_es6.__rest(_a, ["heading", "content", "id", "isPadded", "headingLevel", "headingSize", "image"]);
|
|
18
18
|
return (React.createElement("div", tslib_es6.__assign({ className: index.classNames((_b = {},
|
|
19
|
-
_b[styles$
|
|
20
|
-
_b[styles$
|
|
21
|
-
_b[styles$
|
|
19
|
+
_b[styles$2["accordion-header"]] = true,
|
|
20
|
+
_b[styles$2["accordion-header--padded"]] = isPadded,
|
|
21
|
+
_b[styles$2["accordion-header--headingSizeM"]] = headingSize === "m",
|
|
22
22
|
_b)) }, filterDataAttrs.filterDataAttrs(props)),
|
|
23
|
-
React.createElement("div", { className: index.classNames((_c = {}, _c[styles$
|
|
23
|
+
React.createElement("div", { className: index.classNames((_c = {}, _c[styles$2["accordion-header--hasImage"]] = image, _c)) },
|
|
24
24
|
image && (React.createElement("div", null,
|
|
25
25
|
React.createElement(Image.Image, tslib_es6.__assign({}, image, { width: 68, fit: "cover" })))),
|
|
26
26
|
React.createElement(Heading.Heading, { level: headingLevel, id: id, size: headingSize }, heading)),
|
|
@@ -29,23 +29,25 @@ var AccordionHeading = function (_a) {
|
|
|
29
29
|
React.createElement(Text.Text, { size: "l", elementType: "p" }, content)))));
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
var styles = {"AccordionDisclosureListItem":"AccordionDisclosureList-module_AccordionDisclosureListItem__p8LIT"};
|
|
32
|
+
var styles$1 = {"AccordionDisclosureListItem":"AccordionDisclosureList-module_AccordionDisclosureListItem__p8LIT"};
|
|
33
33
|
|
|
34
34
|
var AccordionDisclosureList = function (_a) {
|
|
35
35
|
var disclosureList = _a.disclosureList;
|
|
36
36
|
return (React.createElement("ul", null, disclosureList.map(function (_a) {
|
|
37
37
|
var children = _a.children, summary = _a.summary, _b = _a.isOpen, isOpen = _b === void 0 ? false : _b, _c = _a.indentDetails, indentDetails = _c === void 0 ? false : _c, headingLevel = _a.headingLevel, id = _a.id, props = tslib_es6.__rest(_a, ["children", "summary", "isOpen", "indentDetails", "headingLevel", "id"]);
|
|
38
|
-
return (React.createElement("li", { key: id, className: styles.AccordionDisclosureListItem },
|
|
38
|
+
return (React.createElement("li", { key: id, className: styles$1.AccordionDisclosureListItem },
|
|
39
39
|
React.createElement(Disclosure.Disclosure, tslib_es6.__assign({ summary: summary, isOpen: isOpen, indentDetails: indentDetails, headingLevel: headingLevel }, filterDataAttrs.filterDataAttrs(props)), children)));
|
|
40
40
|
})));
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
+
var styles = {"Accordion":"Accordion-module_Accordion__LsXTU"};
|
|
44
|
+
|
|
43
45
|
/**
|
|
44
46
|
* Use the `Accordion` component to package together a title, content and a number of disclosure components into one section (maximum 10).
|
|
45
47
|
*/
|
|
46
48
|
var Accordion = function (_a) {
|
|
47
49
|
var heading = _a.heading, headingLevel = _a.headingLevel, headingSize = _a.headingSize, content = _a.content, id = _a.id, disclosureList = _a.disclosureList, props = tslib_es6.__rest(_a, ["heading", "headingLevel", "headingSize", "content", "id", "disclosureList"]);
|
|
48
|
-
return (React.createElement("div", tslib_es6.__assign({}, filterDataAttrs.filterDataAttrs(props)),
|
|
50
|
+
return (React.createElement("div", tslib_es6.__assign({ className: styles.Accordion }, filterDataAttrs.filterDataAttrs(props)),
|
|
49
51
|
React.createElement(AccordionHeading, { isPadded: true, id: id, "data-testid": "Accordion-header", heading: heading, headingLevel: headingLevel, headingSize: headingSize, content: content }),
|
|
50
52
|
React.createElement(AccordionDisclosureList, { disclosureList: disclosureList })));
|
|
51
53
|
};
|
|
@@ -8,17 +8,17 @@ import { VerticalSpace } from '@arc-ui/components/VerticalSpace';
|
|
|
8
8
|
import { Image } from '@arc-ui/components/Image';
|
|
9
9
|
import { Disclosure } from '@arc-ui/components/Disclosure';
|
|
10
10
|
|
|
11
|
-
var styles$
|
|
11
|
+
var styles$2 = {"accordion-header":"AccordionHeading-module_accordion-header__8s12f","accordion-header--hasImage":"AccordionHeading-module_accordion-header--hasImage__wbDjW","accordion-header--padded":"AccordionHeading-module_accordion-header--padded__me1JY","accordion-header--headingSizeM":"AccordionHeading-module_accordion-header--headingSizeM__amLfy"};
|
|
12
12
|
|
|
13
13
|
var AccordionHeading = function (_a) {
|
|
14
14
|
var _b, _c;
|
|
15
15
|
var heading = _a.heading, content = _a.content, id = _a.id, _d = _a.isPadded, isPadded = _d === void 0 ? false : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e, _f = _a.headingSize, headingSize = _f === void 0 ? "xl" : _f, image = _a.image, props = __rest(_a, ["heading", "content", "id", "isPadded", "headingLevel", "headingSize", "image"]);
|
|
16
16
|
return (React.createElement("div", __assign({ className: classNames((_b = {},
|
|
17
|
-
_b[styles$
|
|
18
|
-
_b[styles$
|
|
19
|
-
_b[styles$
|
|
17
|
+
_b[styles$2["accordion-header"]] = true,
|
|
18
|
+
_b[styles$2["accordion-header--padded"]] = isPadded,
|
|
19
|
+
_b[styles$2["accordion-header--headingSizeM"]] = headingSize === "m",
|
|
20
20
|
_b)) }, filterDataAttrs(props)),
|
|
21
|
-
React.createElement("div", { className: classNames((_c = {}, _c[styles$
|
|
21
|
+
React.createElement("div", { className: classNames((_c = {}, _c[styles$2["accordion-header--hasImage"]] = image, _c)) },
|
|
22
22
|
image && (React.createElement("div", null,
|
|
23
23
|
React.createElement(Image, __assign({}, image, { width: 68, fit: "cover" })))),
|
|
24
24
|
React.createElement(Heading, { level: headingLevel, id: id, size: headingSize }, heading)),
|
|
@@ -27,23 +27,25 @@ var AccordionHeading = function (_a) {
|
|
|
27
27
|
React.createElement(Text, { size: "l", elementType: "p" }, content)))));
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
var styles = {"AccordionDisclosureListItem":"AccordionDisclosureList-module_AccordionDisclosureListItem__p8LIT"};
|
|
30
|
+
var styles$1 = {"AccordionDisclosureListItem":"AccordionDisclosureList-module_AccordionDisclosureListItem__p8LIT"};
|
|
31
31
|
|
|
32
32
|
var AccordionDisclosureList = function (_a) {
|
|
33
33
|
var disclosureList = _a.disclosureList;
|
|
34
34
|
return (React.createElement("ul", null, disclosureList.map(function (_a) {
|
|
35
35
|
var children = _a.children, summary = _a.summary, _b = _a.isOpen, isOpen = _b === void 0 ? false : _b, _c = _a.indentDetails, indentDetails = _c === void 0 ? false : _c, headingLevel = _a.headingLevel, id = _a.id, props = __rest(_a, ["children", "summary", "isOpen", "indentDetails", "headingLevel", "id"]);
|
|
36
|
-
return (React.createElement("li", { key: id, className: styles.AccordionDisclosureListItem },
|
|
36
|
+
return (React.createElement("li", { key: id, className: styles$1.AccordionDisclosureListItem },
|
|
37
37
|
React.createElement(Disclosure, __assign({ summary: summary, isOpen: isOpen, indentDetails: indentDetails, headingLevel: headingLevel }, filterDataAttrs(props)), children)));
|
|
38
38
|
})));
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
var styles = {"Accordion":"Accordion-module_Accordion__LsXTU"};
|
|
42
|
+
|
|
41
43
|
/**
|
|
42
44
|
* Use the `Accordion` component to package together a title, content and a number of disclosure components into one section (maximum 10).
|
|
43
45
|
*/
|
|
44
46
|
var Accordion = function (_a) {
|
|
45
47
|
var heading = _a.heading, headingLevel = _a.headingLevel, headingSize = _a.headingSize, content = _a.content, id = _a.id, disclosureList = _a.disclosureList, props = __rest(_a, ["heading", "headingLevel", "headingSize", "content", "id", "disclosureList"]);
|
|
46
|
-
return (React.createElement("div", __assign({}, filterDataAttrs(props)),
|
|
48
|
+
return (React.createElement("div", __assign({ className: styles.Accordion }, filterDataAttrs(props)),
|
|
47
49
|
React.createElement(AccordionHeading, { isPadded: true, id: id, "data-testid": "Accordion-header", heading: heading, headingLevel: headingLevel, headingSize: headingSize, content: content }),
|
|
48
50
|
React.createElement(AccordionDisclosureList, { disclosureList: disclosureList })));
|
|
49
51
|
};
|
package/lib/index.cjs
CHANGED
|
@@ -225,17 +225,17 @@ function requireClassnames () {
|
|
|
225
225
|
var classnamesExports = requireClassnames();
|
|
226
226
|
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
227
227
|
|
|
228
|
-
var styles$
|
|
228
|
+
var styles$h = {"accordion-header":"AccordionHeading-module_accordion-header__8s12f","accordion-header--hasImage":"AccordionHeading-module_accordion-header--hasImage__wbDjW","accordion-header--padded":"AccordionHeading-module_accordion-header--padded__me1JY","accordion-header--headingSizeM":"AccordionHeading-module_accordion-header--headingSizeM__amLfy"};
|
|
229
229
|
|
|
230
230
|
var AccordionHeading = function (_a) {
|
|
231
231
|
var _b, _c;
|
|
232
232
|
var heading = _a.heading, content = _a.content, id = _a.id, _d = _a.isPadded, isPadded = _d === void 0 ? false : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e, _f = _a.headingSize, headingSize = _f === void 0 ? "xl" : _f, image = _a.image, props = __rest(_a, ["heading", "content", "id", "isPadded", "headingLevel", "headingSize", "image"]);
|
|
233
233
|
return (React.createElement("div", __assign({ className: classNames((_b = {},
|
|
234
|
-
_b[styles$
|
|
235
|
-
_b[styles$
|
|
236
|
-
_b[styles$
|
|
234
|
+
_b[styles$h["accordion-header"]] = true,
|
|
235
|
+
_b[styles$h["accordion-header--padded"]] = isPadded,
|
|
236
|
+
_b[styles$h["accordion-header--headingSizeM"]] = headingSize === "m",
|
|
237
237
|
_b)) }, filterDataAttrs(props)),
|
|
238
|
-
React.createElement("div", { className: classNames((_c = {}, _c[styles$
|
|
238
|
+
React.createElement("div", { className: classNames((_c = {}, _c[styles$h["accordion-header--hasImage"]] = image, _c)) },
|
|
239
239
|
image && (React.createElement("div", null,
|
|
240
240
|
React.createElement(Image$2.Image, __assign({}, image, { width: 68, fit: "cover" })))),
|
|
241
241
|
React.createElement(Heading.Heading, { level: headingLevel, id: id, size: headingSize }, heading)),
|
|
@@ -244,23 +244,25 @@ var AccordionHeading = function (_a) {
|
|
|
244
244
|
React.createElement(Text.Text, { size: "l", elementType: "p" }, content)))));
|
|
245
245
|
};
|
|
246
246
|
|
|
247
|
-
var styles$
|
|
247
|
+
var styles$g = {"AccordionDisclosureListItem":"AccordionDisclosureList-module_AccordionDisclosureListItem__p8LIT"};
|
|
248
248
|
|
|
249
249
|
var AccordionDisclosureList = function (_a) {
|
|
250
250
|
var disclosureList = _a.disclosureList;
|
|
251
251
|
return (React.createElement("ul", null, disclosureList.map(function (_a) {
|
|
252
252
|
var children = _a.children, summary = _a.summary, _b = _a.isOpen, isOpen = _b === void 0 ? false : _b, _c = _a.indentDetails, indentDetails = _c === void 0 ? false : _c, headingLevel = _a.headingLevel, id = _a.id, props = __rest(_a, ["children", "summary", "isOpen", "indentDetails", "headingLevel", "id"]);
|
|
253
|
-
return (React.createElement("li", { key: id, className: styles$
|
|
253
|
+
return (React.createElement("li", { key: id, className: styles$g.AccordionDisclosureListItem },
|
|
254
254
|
React.createElement(Disclosure.Disclosure, __assign({ summary: summary, isOpen: isOpen, indentDetails: indentDetails, headingLevel: headingLevel }, filterDataAttrs(props)), children)));
|
|
255
255
|
})));
|
|
256
256
|
};
|
|
257
257
|
|
|
258
|
+
var styles$f = {"Accordion":"Accordion-module_Accordion__LsXTU"};
|
|
259
|
+
|
|
258
260
|
/**
|
|
259
261
|
* Use the `Accordion` component to package together a title, content and a number of disclosure components into one section (maximum 10).
|
|
260
262
|
*/
|
|
261
263
|
var Accordion = function (_a) {
|
|
262
264
|
var heading = _a.heading, headingLevel = _a.headingLevel, headingSize = _a.headingSize, content = _a.content, id = _a.id, disclosureList = _a.disclosureList, props = __rest(_a, ["heading", "headingLevel", "headingSize", "content", "id", "disclosureList"]);
|
|
263
|
-
return (React.createElement("div", __assign({}, filterDataAttrs(props)),
|
|
265
|
+
return (React.createElement("div", __assign({ className: styles$f.Accordion }, filterDataAttrs(props)),
|
|
264
266
|
React.createElement(AccordionHeading, { isPadded: true, id: id, "data-testid": "Accordion-header", heading: heading, headingLevel: headingLevel, headingSize: headingSize, content: content }),
|
|
265
267
|
React.createElement(AccordionDisclosureList, { disclosureList: disclosureList })));
|
|
266
268
|
};
|