@arc-ui/community-components 3.10.0 → 3.11.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/lib/HeaderBarNotification/HeaderBarNotification.cjs +6 -4
- package/lib/HeaderBarNotification/HeaderBarNotification.mjs +6 -4
- package/lib/HeaderBarNotification/styles.css +1 -1
- package/lib/index.cjs +67 -66
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +4 -0
- package/lib/index.d.mts +4 -0
- package/lib/index.mjs +67 -66
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +4 -4
- package/src/components/HeaderBarNotification/HeaderBarNotification.module.css +40 -0
- package/src/components/HeaderBarNotification/HeaderBarNotification.tsx +12 -2
- package/versions.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @arc-ui/community-components@3.
|
|
2
|
+
> @arc-ui/community-components@3.11.0 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 10 months old. Please run:
|
|
@@ -7,7 +7,7 @@ Browserslist: browsers data (caniuse-lite) is 10 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 [1m7.8s[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
|
|
@@ -15,10 +15,10 @@ Browserslist: browsers data (caniuse-lite) is 10 months old. Please run:
|
|
|
15
15
|
[1m@arc-ui/components/NavigationHeader[22m (imported by "lib/types/components/HeaderBarNotification/HeaderBarNotification.d.ts")
|
|
16
16
|
[1m@arc-ui/components/MediaCard[22m (imported by "lib/types/components/ArticleCarousel/ArticleCarousel.d.ts", "lib/types/components/PromoListing/PromoListing.d.ts" and "lib/types/components/BusinessSegmentSwitcher/types/types.d.ts")
|
|
17
17
|
[1m@arc-ui/components/Download[22m (imported by "lib/types/components/DownloadList/DownloadList.d.ts")
|
|
18
|
+
[1m@arc-ui/components/Heading[22m (imported by "lib/types/components/CopyLead/CopyLead.d.ts", "lib/types/components/FeaturePost/FeaturePost.d.ts", "lib/types/components/PromoListing/PromoListing.d.ts", "lib/types/components/Summary/Summary.d.ts", "lib/types/components/BannerWithTabs/BannerWithTabs.d.ts", "lib/types/components/SectionHeading/SectionHeading.d.ts", "lib/types/components/PartnerBrandLogos/PartnerBrandLogos.d.ts", "lib/types/components/Accordion/components/AccordionHeading/AccordionHeading.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/topic.d.ts", "lib/types/components/ArticleSidebar/types/share.d.ts" and "lib/types/components/PartnerBrandLogos/components/PartnerLogoSubgroup/PartnerLogoSubgroup.d.ts")
|
|
19
|
+
[1m@arc-ui/components/VideoPlayer[22m (imported by "lib/types/components/CopyLead/CopyLead.d.ts" and "lib/types/components/FeaturePost/FeaturePost.d.ts")
|
|
18
20
|
[1m@arc-ui/components/Avatar[22m (imported by "lib/types/components/Author/Author.d.ts")
|
|
19
21
|
[1m@arc-ui/components/ButtonV2[22m (imported by "lib/types/components/Highlights/Highlights.d.ts" and "lib/types/components/PromoListing/PromoListing.d.ts")
|
|
20
|
-
[1m@arc-ui/components/Heading[22m (imported by "lib/types/components/CopyLead/CopyLead.d.ts", "lib/types/components/FeaturePost/FeaturePost.d.ts", "lib/types/components/PromoListing/PromoListing.d.ts", "lib/types/components/Summary/Summary.d.ts", "lib/types/components/BannerWithTabs/BannerWithTabs.d.ts", "lib/types/components/SectionHeading/SectionHeading.d.ts", "lib/types/components/PartnerBrandLogos/PartnerBrandLogos.d.ts", "lib/types/components/Accordion/components/AccordionHeading/AccordionHeading.d.ts", "lib/types/components/ArticleSidebar/types/text-section.d.ts", "lib/types/components/ArticleSidebar/types/share.d.ts", "lib/types/components/ArticleSidebar/types/link-section.d.ts", "lib/types/components/ArticleSidebar/types/topic.d.ts" and "lib/types/components/PartnerBrandLogos/components/PartnerLogoSubgroup/PartnerLogoSubgroup.d.ts")
|
|
21
|
-
[1m@arc-ui/components/VideoPlayer[22m (imported by "lib/types/components/CopyLead/CopyLead.d.ts" and "lib/types/components/FeaturePost/FeaturePost.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", "lib/types/components/BusinessSegmentSwitcher/types/types.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" and "lib/types/components/BusinessSegmentSwitcher/types/types.d.ts")
|
|
@@ -31,17 +31,17 @@ Browserslist: browsers data (caniuse-lite) is 10 months old. Please run:
|
|
|
31
31
|
[1m@arc-ui/components/AppButton[22m (imported by "lib/types/components/FeaturePost/types/feature-post-app-button-footer.d.ts")
|
|
32
32
|
[1mreact-player/types[22m (imported by "lib/types/internal/VideoCardPlayer/VideoCardPlayer.d.ts" and "lib/types/internal/VideoCardPlayer/types/player-props.d.ts")
|
|
33
33
|
[1m@arc-ui/components/Visible[22m (imported by "lib/types/internal/VideoCardPlayer/components/VideoCardThumbnail/VideoCardThumbnail.d.ts")
|
|
34
|
-
[32mcreated [1mlib/index.d.mts, lib/index.d.cts[22m in [
|
|
34
|
+
[32mcreated [1mlib/index.d.mts, lib/index.d.cts[22m in [1m212ms[22m[39m
|
|
35
35
|
[36m
|
|
36
36
|
[1m./src/components/Accordion/index.ts, ./src/components/ActionTile/index.ts, ./src/components/ArticleCarousel/index.ts, ./src/components/ArticleSidebar/index.ts, ./src/components/Author/index.ts, ./src/components/BannerWithTabs/index.ts, ./src/components/BusinessSegmentSwitcher/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/HeaderBarNotification/index.ts, ./src/components/Highlights/index.ts, ./src/components/InlineLinkGroup/index.ts, ./src/components/LinkTile/index.ts, ./src/components/PartnerBrandLogos/index.ts, ./src/components/ProductNavigation/index.ts, ./src/components/PromoListing/index.ts, ./src/components/PromoListingThumbnailSignpost/index.ts, ./src/components/Quote/index.ts, ./src/components/SectionHeading/index.ts, ./src/components/Statistics/index.ts, ./src/components/Summary/index.ts, ./src/components/ThumbnailSignpost/index.ts, ./src/components/VideoHeroCard/index.ts, ./src/components/VideoPortraitCard/index.ts[22m → [1mlib[22m...[39m
|
|
37
|
-
[32mcreated [1mlib[22m in [
|
|
37
|
+
[32mcreated [1mlib[22m in [1m9.1s[22m[39m
|
|
38
38
|
[36m
|
|
39
39
|
[1m./src/components/Accordion/index.ts, ./src/components/ActionTile/index.ts, ./src/components/ArticleCarousel/index.ts, ./src/components/ArticleSidebar/index.ts, ./src/components/Author/index.ts, ./src/components/BannerWithTabs/index.ts, ./src/components/BusinessSegmentSwitcher/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/HeaderBarNotification/index.ts, ./src/components/Highlights/index.ts, ./src/components/InlineLinkGroup/index.ts, ./src/components/LinkTile/index.ts, ./src/components/PartnerBrandLogos/index.ts, ./src/components/ProductNavigation/index.ts, ./src/components/PromoListing/index.ts, ./src/components/PromoListingThumbnailSignpost/index.ts, ./src/components/Quote/index.ts, ./src/components/SectionHeading/index.ts, ./src/components/Statistics/index.ts, ./src/components/Summary/index.ts, ./src/components/ThumbnailSignpost/index.ts, ./src/components/VideoHeroCard/index.ts, ./src/components/VideoPortraitCard/index.ts[22m → [1mlib[22m...[39m
|
|
40
|
-
[32mcreated [1mlib[22m in [
|
|
40
|
+
[32mcreated [1mlib[22m in [1m8s[22m[39m
|
|
41
41
|
Browserslist: browsers data (caniuse-lite) is 10 months old. Please run:
|
|
42
42
|
npx update-browserslist-db@latest
|
|
43
43
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
44
44
|
|
|
45
|
-
> @arc-ui/community-components@3.
|
|
45
|
+
> @arc-ui/community-components@3.11.0 build:clean /builds/enterprise/frontend/arc-community/packages/components
|
|
46
46
|
> rimraf ./lib/types ./lib/styles.js ./lib/index.js ./lib/index.js.map
|
|
47
47
|
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var tslib_es6 = require('../_shared/cjs/tslib.es6-BxB9I209.cjs');
|
|
4
4
|
var React = require('react');
|
|
5
|
+
var index = require('../_shared/cjs/index-B7Z7sgRq.cjs');
|
|
5
6
|
var filterAttrs = require('../_shared/cjs/filter-attrs-BizjMsy0.cjs');
|
|
6
7
|
var NavigationHeader = require('@arc-ui/components/NavigationHeader');
|
|
7
8
|
var Popover = require('@arc-ui/components/Popover');
|
|
@@ -20,11 +21,12 @@ var ButtonV2 = require('@arc-ui/components/ButtonV2');
|
|
|
20
21
|
const BtIconCrossAlt =
|
|
21
22
|
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3e%3cpath fill='currentColor' d='m16.707 16.02 4.482-4.494a.5.5 0 1 0-.707-.706l-4.48 4.493-4.482-4.493a.5.5 0 1 0-.707.706l4.483 4.494-4.483 4.494a.5.5 0 1 0 .707.706l4.481-4.493 4.481 4.493a.5.5 0 1 0 .707-.706Z'/%3e%3c/svg%3e";
|
|
22
23
|
|
|
23
|
-
var styles = {"container":"HeaderBarNotification-module_container__18nau","content":"HeaderBarNotification-module_content__SUo-l","image":"HeaderBarNotification-module_image__uV-nD","details":"HeaderBarNotification-module_details__S5Rrx","closeButtonContainer":"HeaderBarNotification-module_closeButtonContainer__b1UDI"};
|
|
24
|
+
var styles = {"popupNotification":"HeaderBarNotification-module_popupNotification__HAxod","hiddenByDefault":"HeaderBarNotification-module_hiddenByDefault__JHbUy","s":"HeaderBarNotification-module_s__HofMM","m":"HeaderBarNotification-module_m__ZUdjq","l":"HeaderBarNotification-module_l__wlZ1Z","xl":"HeaderBarNotification-module_xl__z7DBP","container":"HeaderBarNotification-module_container__18nau","content":"HeaderBarNotification-module_content__SUo-l","image":"HeaderBarNotification-module_image__uV-nD","details":"HeaderBarNotification-module_details__S5Rrx","closeButtonContainer":"HeaderBarNotification-module_closeButtonContainer__b1UDI"};
|
|
24
25
|
|
|
25
26
|
var HeaderBarNotification = function (_a) {
|
|
26
|
-
var
|
|
27
|
-
var _c =
|
|
27
|
+
var _b;
|
|
28
|
+
var headerActionProps = _a.headerActionProps, notificationId = _a.notificationId, _c = _a.isPersistant, isPersistant = _c === void 0 ? false : _c, icon = _a.icon, image = _a.image, heading = _a.heading, tagline = _a.tagline, children = _a.children, button = _a.button, showAtSize = _a.showAtSize, props = tslib_es6.__rest(_a, ["headerActionProps", "notificationId", "isPersistant", "icon", "image", "heading", "tagline", "children", "button", "showAtSize"]);
|
|
29
|
+
var _d = React.useState(isPersistant), showNotification = _d[0], setShowNotification = _d[1];
|
|
28
30
|
var localStorageId = "hide".concat(notificationId.replace(/[^a-zA-Z0-9\-_]/g, ""));
|
|
29
31
|
// Check to see if the notication has been hidden or not and show it if so
|
|
30
32
|
React.useEffect(function () {
|
|
@@ -38,7 +40,7 @@ var HeaderBarNotification = function (_a) {
|
|
|
38
40
|
localStorage.setItem(localStorageId, "true");
|
|
39
41
|
setShowNotification(false);
|
|
40
42
|
};
|
|
41
|
-
return (React.createElement(Popover.Popover, tslib_es6.__assign({ open: showNotification, side: "bottom", sideOffset: 12, maxWidth: 900, arrow: true, content: React.createElement("div", { className: styles.container },
|
|
43
|
+
return (React.createElement(Popover.Popover, tslib_es6.__assign({ open: showNotification, side: "bottom", sideOffset: 12, maxWidth: 900, arrow: true, asChild: true, className: index.classNames(styles.popupNotification, (_b = {}, _b[styles.hiddenByDefault] = showAtSize, _b), showAtSize === null || showAtSize === void 0 ? void 0 : showAtSize.map(function (s) { return styles[s]; })), content: React.createElement("div", { className: styles.container },
|
|
42
44
|
React.createElement("div", { className: styles.content },
|
|
43
45
|
(image || icon) && (React.createElement("div", { className: styles.image },
|
|
44
46
|
image && (React.createElement(Image.Image, { src: image, alt: heading, fit: "cover", width: 55 })),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign } from '../_shared/esm/tslib.es6-BVXMhEem.mjs';
|
|
2
2
|
import React__default, { useState, useEffect } from 'react';
|
|
3
|
+
import { c as classNames } from '../_shared/esm/index-BSO2EFem.mjs';
|
|
3
4
|
import { f as filterAttrs } from '../_shared/esm/filter-attrs-DZ7RCEZm.mjs';
|
|
4
5
|
import { NavigationHeaderAction } from '@arc-ui/components/NavigationHeader';
|
|
5
6
|
import { Popover } from '@arc-ui/components/Popover';
|
|
@@ -18,11 +19,12 @@ import { ButtonV2 } from '@arc-ui/components/ButtonV2';
|
|
|
18
19
|
const BtIconCrossAlt =
|
|
19
20
|
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3e%3cpath fill='currentColor' d='m16.707 16.02 4.482-4.494a.5.5 0 1 0-.707-.706l-4.48 4.493-4.482-4.493a.5.5 0 1 0-.707.706l4.483 4.494-4.483 4.494a.5.5 0 1 0 .707.706l4.481-4.493 4.481 4.493a.5.5 0 1 0 .707-.706Z'/%3e%3c/svg%3e";
|
|
20
21
|
|
|
21
|
-
var styles = {"container":"HeaderBarNotification-module_container__18nau","content":"HeaderBarNotification-module_content__SUo-l","image":"HeaderBarNotification-module_image__uV-nD","details":"HeaderBarNotification-module_details__S5Rrx","closeButtonContainer":"HeaderBarNotification-module_closeButtonContainer__b1UDI"};
|
|
22
|
+
var styles = {"popupNotification":"HeaderBarNotification-module_popupNotification__HAxod","hiddenByDefault":"HeaderBarNotification-module_hiddenByDefault__JHbUy","s":"HeaderBarNotification-module_s__HofMM","m":"HeaderBarNotification-module_m__ZUdjq","l":"HeaderBarNotification-module_l__wlZ1Z","xl":"HeaderBarNotification-module_xl__z7DBP","container":"HeaderBarNotification-module_container__18nau","content":"HeaderBarNotification-module_content__SUo-l","image":"HeaderBarNotification-module_image__uV-nD","details":"HeaderBarNotification-module_details__S5Rrx","closeButtonContainer":"HeaderBarNotification-module_closeButtonContainer__b1UDI"};
|
|
22
23
|
|
|
23
24
|
var HeaderBarNotification = function (_a) {
|
|
24
|
-
var
|
|
25
|
-
var _c =
|
|
25
|
+
var _b;
|
|
26
|
+
var headerActionProps = _a.headerActionProps, notificationId = _a.notificationId, _c = _a.isPersistant, isPersistant = _c === void 0 ? false : _c, icon = _a.icon, image = _a.image, heading = _a.heading, tagline = _a.tagline, children = _a.children, button = _a.button, showAtSize = _a.showAtSize, props = __rest(_a, ["headerActionProps", "notificationId", "isPersistant", "icon", "image", "heading", "tagline", "children", "button", "showAtSize"]);
|
|
27
|
+
var _d = useState(isPersistant), showNotification = _d[0], setShowNotification = _d[1];
|
|
26
28
|
var localStorageId = "hide".concat(notificationId.replace(/[^a-zA-Z0-9\-_]/g, ""));
|
|
27
29
|
// Check to see if the notication has been hidden or not and show it if so
|
|
28
30
|
useEffect(function () {
|
|
@@ -36,7 +38,7 @@ var HeaderBarNotification = function (_a) {
|
|
|
36
38
|
localStorage.setItem(localStorageId, "true");
|
|
37
39
|
setShowNotification(false);
|
|
38
40
|
};
|
|
39
|
-
return (React__default.createElement(Popover, __assign({ open: showNotification, side: "bottom", sideOffset: 12, maxWidth: 900, arrow: true, content: React__default.createElement("div", { className: styles.container },
|
|
41
|
+
return (React__default.createElement(Popover, __assign({ open: showNotification, side: "bottom", sideOffset: 12, maxWidth: 900, arrow: true, asChild: true, className: classNames(styles.popupNotification, (_b = {}, _b[styles.hiddenByDefault] = showAtSize, _b), showAtSize === null || showAtSize === void 0 ? void 0 : showAtSize.map(function (s) { return styles[s]; })), content: React__default.createElement("div", { className: styles.container },
|
|
40
42
|
React__default.createElement("div", { className: styles.content },
|
|
41
43
|
(image || icon) && (React__default.createElement("div", { className: styles.image },
|
|
42
44
|
image && (React__default.createElement(Image, { src: image, alt: heading, fit: "cover", width: 55 })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.HeaderBarNotification-module_container__18nau{display:flex;flex-direction:column;gap:16px;padding:20px;background:#ffffff;border-radius:var(--sem-border-radius-m)}@media (
|
|
1
|
+
.HeaderBarNotification-module_popupNotification__HAxod.HeaderBarNotification-module_hiddenByDefault__JHbUy{display:none}.HeaderBarNotification-module_popupNotification__HAxod.HeaderBarNotification-module_s__HofMM{display:block}@media (min-width:768px){.HeaderBarNotification-module_popupNotification__HAxod.HeaderBarNotification-module_s__HofMM{display:none}}@media (min-width:768px){.HeaderBarNotification-module_popupNotification__HAxod.HeaderBarNotification-module_m__ZUdjq{display:block}}@media (min-width:1024px){.HeaderBarNotification-module_popupNotification__HAxod.HeaderBarNotification-module_m__ZUdjq{display:none}}@media (min-width:1024px){.HeaderBarNotification-module_popupNotification__HAxod.HeaderBarNotification-module_l__wlZ1Z{display:block}}@media (min-width:1280px){.HeaderBarNotification-module_popupNotification__HAxod.HeaderBarNotification-module_l__wlZ1Z{display:none}}@media (min-width:1280px){.HeaderBarNotification-module_popupNotification__HAxod.HeaderBarNotification-module_xl__z7DBP{display:block}}.HeaderBarNotification-module_container__18nau{display:flex;flex-direction:column;gap:16px;padding:20px;background:#ffffff;border-radius:var(--sem-border-radius-m)}@media (min-width:768px){.HeaderBarNotification-module_container__18nau{flex-direction:row;align-items:center}}.HeaderBarNotification-module_content__SUo-l{display:flex;align-items:center;gap:16px;width:100%;min-width:55%;max-width:70vw;margin-right:24px}@media (min-width:768px){.HeaderBarNotification-module_content__SUo-l{width:400px;margin-right:16px}}.HeaderBarNotification-module_image__uV-nD{flex-shrink:0}.HeaderBarNotification-module_details__S5Rrx{display:flex;flex-direction:column;width:100%}.HeaderBarNotification-module_closeButtonContainer__b1UDI{position:absolute;right:20px;top:20px;margin:0}@media (min-width:768px){.HeaderBarNotification-module_closeButtonContainer__b1UDI{position:relative;right:0;top:0}}
|
package/lib/index.cjs
CHANGED
|
@@ -132,72 +132,6 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
132
132
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
133
133
|
};
|
|
134
134
|
|
|
135
|
-
/**
|
|
136
|
-
* Filters out attributes from the given props object based on a pattern.
|
|
137
|
-
*
|
|
138
|
-
* This function extracts all properties that match either the `data-*` or `aria-*` attribute patterns
|
|
139
|
-
* and returns a new object containing only those properties.
|
|
140
|
-
*
|
|
141
|
-
* @param props - The object containing properties to filter.
|
|
142
|
-
* @returns A new object containing only the matched attributes (`data-*` and `aria-*`) from the input props.
|
|
143
|
-
*/
|
|
144
|
-
var attributePrefixes = ["data-", "aria-"];
|
|
145
|
-
var filterAttrs = function (props) {
|
|
146
|
-
var filteredProps = {};
|
|
147
|
-
var _loop_1 = function (prop) {
|
|
148
|
-
if (Object.prototype.hasOwnProperty.call(props, prop) &&
|
|
149
|
-
attributePrefixes.some(function (prefix) { return prop.startsWith(prefix); })) {
|
|
150
|
-
filteredProps[prop] = props[prop];
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
for (var prop in props) {
|
|
154
|
-
_loop_1(prop);
|
|
155
|
-
}
|
|
156
|
-
return filteredProps;
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Do not edit directly
|
|
161
|
-
* Generated file
|
|
162
|
-
*/
|
|
163
|
-
|
|
164
|
-
const BtIconCrossAlt =
|
|
165
|
-
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3e%3cpath fill='currentColor' d='m16.707 16.02 4.482-4.494a.5.5 0 1 0-.707-.706l-4.48 4.493-4.482-4.493a.5.5 0 1 0-.707.706l4.483 4.494-4.483 4.494a.5.5 0 1 0 .707.706l4.481-4.493 4.481 4.493a.5.5 0 1 0 .707-.706Z'/%3e%3c/svg%3e";
|
|
166
|
-
|
|
167
|
-
var styles$v = {"container":"HeaderBarNotification-module_container__18nau","content":"HeaderBarNotification-module_content__SUo-l","image":"HeaderBarNotification-module_image__uV-nD","details":"HeaderBarNotification-module_details__S5Rrx","closeButtonContainer":"HeaderBarNotification-module_closeButtonContainer__b1UDI"};
|
|
168
|
-
|
|
169
|
-
var HeaderBarNotification = function (_a) {
|
|
170
|
-
var headerActionProps = _a.headerActionProps, notificationId = _a.notificationId, _b = _a.isPersistant, isPersistant = _b === void 0 ? false : _b, icon = _a.icon, image = _a.image, heading = _a.heading, tagline = _a.tagline, children = _a.children, button = _a.button, props = __rest(_a, ["headerActionProps", "notificationId", "isPersistant", "icon", "image", "heading", "tagline", "children", "button"]);
|
|
171
|
-
var _c = React.useState(isPersistant), showNotification = _c[0], setShowNotification = _c[1];
|
|
172
|
-
var localStorageId = "hide".concat(notificationId.replace(/[^a-zA-Z0-9\-_]/g, ""));
|
|
173
|
-
// Check to see if the notication has been hidden or not and show it if so
|
|
174
|
-
React.useEffect(function () {
|
|
175
|
-
if (typeof window !== "undefined" && !isPersistant) {
|
|
176
|
-
setShowNotification(!localStorage.getItem(localStorageId));
|
|
177
|
-
}
|
|
178
|
-
}, []);
|
|
179
|
-
// Handle the closure of the notification, store it in the session so we don't keep showing it.
|
|
180
|
-
var handleClosePopup = function () {
|
|
181
|
-
if (!isPersistant)
|
|
182
|
-
localStorage.setItem(localStorageId, "true");
|
|
183
|
-
setShowNotification(false);
|
|
184
|
-
};
|
|
185
|
-
return (React.createElement(Popover.Popover, __assign({ open: showNotification, side: "bottom", sideOffset: 12, maxWidth: 900, arrow: true, content: React.createElement("div", { className: styles$v.container },
|
|
186
|
-
React.createElement("div", { className: styles$v.content },
|
|
187
|
-
(image || icon) && (React.createElement("div", { className: styles$v.image },
|
|
188
|
-
image && (React.createElement(Image$2.Image, { src: image, alt: heading, fit: "cover", width: 55 })),
|
|
189
|
-
icon && React.createElement(Icon.Icon, { icon: icon, size: 35 }))),
|
|
190
|
-
React.createElement("div", { className: styles$v.details },
|
|
191
|
-
tagline && (React.createElement(Text.Text, { size: "m", tone: "muted" }, tagline)),
|
|
192
|
-
React.createElement(Heading.Heading, { size: "s", level: "3" }, heading),
|
|
193
|
-
children)),
|
|
194
|
-
button && (React.createElement(ButtonV2.ButtonV2, { onClick: button.handleClick, label: button.text, buttonStyle: "secondary", isFullWidth: true })),
|
|
195
|
-
React.createElement("div", { className: styles$v.closeButtonContainer },
|
|
196
|
-
React.createElement(Tooltip.Tooltip, { side: "bottom", title: "Dismiss Notification", asChild: true },
|
|
197
|
-
React.createElement(ButtonV2.ButtonV2, { "data-testid": localStorageId, buttonStyle: "tertiary", "aria-label": "Close ".concat(notificationId, " popup"), onClick: handleClosePopup, icon: BtIconCrossAlt })))) }, filterAttrs(props)),
|
|
198
|
-
React.createElement(NavigationHeader.NavigationHeaderAction, __assign({ isAttention: true }, headerActionProps))));
|
|
199
|
-
};
|
|
200
|
-
|
|
201
135
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
202
136
|
|
|
203
137
|
function getDefaultExportFromCjs (x) {
|
|
@@ -291,6 +225,73 @@ function requireClassnames () {
|
|
|
291
225
|
var classnamesExports = requireClassnames();
|
|
292
226
|
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
293
227
|
|
|
228
|
+
/**
|
|
229
|
+
* Filters out attributes from the given props object based on a pattern.
|
|
230
|
+
*
|
|
231
|
+
* This function extracts all properties that match either the `data-*` or `aria-*` attribute patterns
|
|
232
|
+
* and returns a new object containing only those properties.
|
|
233
|
+
*
|
|
234
|
+
* @param props - The object containing properties to filter.
|
|
235
|
+
* @returns A new object containing only the matched attributes (`data-*` and `aria-*`) from the input props.
|
|
236
|
+
*/
|
|
237
|
+
var attributePrefixes = ["data-", "aria-"];
|
|
238
|
+
var filterAttrs = function (props) {
|
|
239
|
+
var filteredProps = {};
|
|
240
|
+
var _loop_1 = function (prop) {
|
|
241
|
+
if (Object.prototype.hasOwnProperty.call(props, prop) &&
|
|
242
|
+
attributePrefixes.some(function (prefix) { return prop.startsWith(prefix); })) {
|
|
243
|
+
filteredProps[prop] = props[prop];
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
for (var prop in props) {
|
|
247
|
+
_loop_1(prop);
|
|
248
|
+
}
|
|
249
|
+
return filteredProps;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Do not edit directly
|
|
254
|
+
* Generated file
|
|
255
|
+
*/
|
|
256
|
+
|
|
257
|
+
const BtIconCrossAlt =
|
|
258
|
+
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3e%3cpath fill='currentColor' d='m16.707 16.02 4.482-4.494a.5.5 0 1 0-.707-.706l-4.48 4.493-4.482-4.493a.5.5 0 1 0-.707.706l4.483 4.494-4.483 4.494a.5.5 0 1 0 .707.706l4.481-4.493 4.481 4.493a.5.5 0 1 0 .707-.706Z'/%3e%3c/svg%3e";
|
|
259
|
+
|
|
260
|
+
var styles$v = {"popupNotification":"HeaderBarNotification-module_popupNotification__HAxod","hiddenByDefault":"HeaderBarNotification-module_hiddenByDefault__JHbUy","s":"HeaderBarNotification-module_s__HofMM","m":"HeaderBarNotification-module_m__ZUdjq","l":"HeaderBarNotification-module_l__wlZ1Z","xl":"HeaderBarNotification-module_xl__z7DBP","container":"HeaderBarNotification-module_container__18nau","content":"HeaderBarNotification-module_content__SUo-l","image":"HeaderBarNotification-module_image__uV-nD","details":"HeaderBarNotification-module_details__S5Rrx","closeButtonContainer":"HeaderBarNotification-module_closeButtonContainer__b1UDI"};
|
|
261
|
+
|
|
262
|
+
var HeaderBarNotification = function (_a) {
|
|
263
|
+
var _b;
|
|
264
|
+
var headerActionProps = _a.headerActionProps, notificationId = _a.notificationId, _c = _a.isPersistant, isPersistant = _c === void 0 ? false : _c, icon = _a.icon, image = _a.image, heading = _a.heading, tagline = _a.tagline, children = _a.children, button = _a.button, showAtSize = _a.showAtSize, props = __rest(_a, ["headerActionProps", "notificationId", "isPersistant", "icon", "image", "heading", "tagline", "children", "button", "showAtSize"]);
|
|
265
|
+
var _d = React.useState(isPersistant), showNotification = _d[0], setShowNotification = _d[1];
|
|
266
|
+
var localStorageId = "hide".concat(notificationId.replace(/[^a-zA-Z0-9\-_]/g, ""));
|
|
267
|
+
// Check to see if the notication has been hidden or not and show it if so
|
|
268
|
+
React.useEffect(function () {
|
|
269
|
+
if (typeof window !== "undefined" && !isPersistant) {
|
|
270
|
+
setShowNotification(!localStorage.getItem(localStorageId));
|
|
271
|
+
}
|
|
272
|
+
}, []);
|
|
273
|
+
// Handle the closure of the notification, store it in the session so we don't keep showing it.
|
|
274
|
+
var handleClosePopup = function () {
|
|
275
|
+
if (!isPersistant)
|
|
276
|
+
localStorage.setItem(localStorageId, "true");
|
|
277
|
+
setShowNotification(false);
|
|
278
|
+
};
|
|
279
|
+
return (React.createElement(Popover.Popover, __assign({ open: showNotification, side: "bottom", sideOffset: 12, maxWidth: 900, arrow: true, asChild: true, className: classNames(styles$v.popupNotification, (_b = {}, _b[styles$v.hiddenByDefault] = showAtSize, _b), showAtSize === null || showAtSize === void 0 ? void 0 : showAtSize.map(function (s) { return styles$v[s]; })), content: React.createElement("div", { className: styles$v.container },
|
|
280
|
+
React.createElement("div", { className: styles$v.content },
|
|
281
|
+
(image || icon) && (React.createElement("div", { className: styles$v.image },
|
|
282
|
+
image && (React.createElement(Image$2.Image, { src: image, alt: heading, fit: "cover", width: 55 })),
|
|
283
|
+
icon && React.createElement(Icon.Icon, { icon: icon, size: 35 }))),
|
|
284
|
+
React.createElement("div", { className: styles$v.details },
|
|
285
|
+
tagline && (React.createElement(Text.Text, { size: "m", tone: "muted" }, tagline)),
|
|
286
|
+
React.createElement(Heading.Heading, { size: "s", level: "3" }, heading),
|
|
287
|
+
children)),
|
|
288
|
+
button && (React.createElement(ButtonV2.ButtonV2, { onClick: button.handleClick, label: button.text, buttonStyle: "secondary", isFullWidth: true })),
|
|
289
|
+
React.createElement("div", { className: styles$v.closeButtonContainer },
|
|
290
|
+
React.createElement(Tooltip.Tooltip, { side: "bottom", title: "Dismiss Notification", asChild: true },
|
|
291
|
+
React.createElement(ButtonV2.ButtonV2, { "data-testid": localStorageId, buttonStyle: "tertiary", "aria-label": "Close ".concat(notificationId, " popup"), onClick: handleClosePopup, icon: BtIconCrossAlt })))) }, filterAttrs(props)),
|
|
292
|
+
React.createElement(NavigationHeader.NavigationHeaderAction, __assign({ isAttention: true }, headerActionProps))));
|
|
293
|
+
};
|
|
294
|
+
|
|
294
295
|
var styles$u = {"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"};
|
|
295
296
|
|
|
296
297
|
var AccordionHeading = function (_a) {
|