@expofp/ui 3.21.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/README.md +30 -0
- package/dist/Alert/Alert.d.ts +20 -0
- package/dist/Alert/Alert.js +23 -0
- package/dist/Alert/index.d.ts +3 -0
- package/dist/Alert/index.js +1 -0
- package/dist/Autocomplete/Autocomplete.d.ts +21 -0
- package/dist/Autocomplete/Autocomplete.js +183 -0
- package/dist/Autocomplete/index.d.ts +3 -0
- package/dist/Autocomplete/index.js +1 -0
- package/dist/Badge/Badge.d.ts +14 -0
- package/dist/Badge/Badge.js +15 -0
- package/dist/Badge/index.d.ts +3 -0
- package/dist/Badge/index.js +1 -0
- package/dist/Button/Button.d.ts +30 -0
- package/dist/Button/Button.js +41 -0
- package/dist/Button/index.d.ts +3 -0
- package/dist/Button/index.js +1 -0
- package/dist/Checkbox/Checkbox.d.ts +19 -0
- package/dist/Checkbox/Checkbox.js +19 -0
- package/dist/Checkbox/index.d.ts +3 -0
- package/dist/Checkbox/index.js +1 -0
- package/dist/CheckboxButton/CheckboxButton.d.ts +12 -0
- package/dist/CheckboxButton/CheckboxButton.js +19 -0
- package/dist/CheckboxButton/index.d.ts +3 -0
- package/dist/CheckboxButton/index.js +1 -0
- package/dist/DownloadList/DownloadList.d.ts +15 -0
- package/dist/DownloadList/DownloadList.js +9 -0
- package/dist/DownloadList/index.d.ts +3 -0
- package/dist/DownloadList/index.js +2 -0
- package/dist/Draggable/Draggable.d.ts +9 -0
- package/dist/Draggable/Draggable.js +92 -0
- package/dist/Draggable/index.d.ts +3 -0
- package/dist/Draggable/index.js +2 -0
- package/dist/EntityItem/EntityItem.d.ts +46 -0
- package/dist/EntityItem/EntityItem.js +29 -0
- package/dist/EntityItem/index.d.ts +3 -0
- package/dist/EntityItem/index.js +1 -0
- package/dist/EventBadge/EventBadge.d.ts +13 -0
- package/dist/EventBadge/EventBadge.js +10 -0
- package/dist/EventBadge/index.d.ts +3 -0
- package/dist/EventBadge/index.js +1 -0
- package/dist/HeatmapLegend/HeatmapLegend.d.ts +15 -0
- package/dist/HeatmapLegend/HeatmapLegend.js +11 -0
- package/dist/HeatmapLegend/index.d.ts +3 -0
- package/dist/HeatmapLegend/index.js +2 -0
- package/dist/HighlightText/HighlightText.d.ts +7 -0
- package/dist/HighlightText/HighlightText.js +14 -0
- package/dist/HighlightText/index.d.ts +2 -0
- package/dist/HighlightText/index.js +1 -0
- package/dist/LevelBadge/LevelBadge.d.ts +9 -0
- package/dist/LevelBadge/LevelBadge.js +10 -0
- package/dist/LevelBadge/index.d.ts +3 -0
- package/dist/LevelBadge/index.js +2 -0
- package/dist/LevelSelector/LevelSelector.d.ts +19 -0
- package/dist/LevelSelector/LevelSelector.js +91 -0
- package/dist/LevelSelector/index.d.ts +3 -0
- package/dist/LevelSelector/index.js +2 -0
- package/dist/MapControls/MapControls.d.ts +33 -0
- package/dist/MapControls/MapControls.js +38 -0
- package/dist/MapControls/index.d.ts +3 -0
- package/dist/MapControls/index.js +2 -0
- package/dist/MobileToggleButton/MobileToggleButton.d.ts +12 -0
- package/dist/MobileToggleButton/MobileToggleButton.js +8 -0
- package/dist/MobileToggleButton/index.d.ts +3 -0
- package/dist/MobileToggleButton/index.js +1 -0
- package/dist/Modal/Modal.d.ts +34 -0
- package/dist/Modal/Modal.js +98 -0
- package/dist/Modal/index.d.ts +3 -0
- package/dist/Modal/index.js +1 -0
- package/dist/MultiSelectGroups/MultiSelectGroups.d.ts +37 -0
- package/dist/MultiSelectGroups/MultiSelectGroups.js +80 -0
- package/dist/MultiSelectGroups/index.d.ts +3 -0
- package/dist/MultiSelectGroups/index.js +1 -0
- package/dist/OverlayGrip/OverlayGrip.d.ts +11 -0
- package/dist/OverlayGrip/OverlayGrip.js +8 -0
- package/dist/OverlayGrip/index.d.ts +3 -0
- package/dist/OverlayGrip/index.js +2 -0
- package/dist/PermissionNotice/PermissionNotice.d.ts +16 -0
- package/dist/PermissionNotice/PermissionNotice.js +11 -0
- package/dist/PermissionNotice/index.d.ts +3 -0
- package/dist/PermissionNotice/index.js +2 -0
- package/dist/Radio/Radio.d.ts +15 -0
- package/dist/Radio/Radio.js +13 -0
- package/dist/Radio/index.d.ts +3 -0
- package/dist/Radio/index.js +1 -0
- package/dist/RebookingNotes/RebookingNotes.d.ts +11 -0
- package/dist/RebookingNotes/RebookingNotes.js +18 -0
- package/dist/RebookingNotes/index.d.ts +3 -0
- package/dist/RebookingNotes/index.js +1 -0
- package/dist/RebookingRadioGroup/RebookingRadioGroup.d.ts +17 -0
- package/dist/RebookingRadioGroup/RebookingRadioGroup.js +13 -0
- package/dist/RebookingRadioGroup/index.d.ts +3 -0
- package/dist/RebookingRadioGroup/index.js +1 -0
- package/dist/ScrollableRow/ScrollableRow.d.ts +21 -0
- package/dist/ScrollableRow/ScrollableRow.js +155 -0
- package/dist/ScrollableRow/index.d.ts +3 -0
- package/dist/ScrollableRow/index.js +2 -0
- package/dist/Share/Share.d.ts +22 -0
- package/dist/Share/Share.js +24 -0
- package/dist/Share/index.d.ts +3 -0
- package/dist/Share/index.js +1 -0
- package/dist/ShowMoreButton/ShowMoreButton.d.ts +11 -0
- package/dist/ShowMoreButton/ShowMoreButton.js +7 -0
- package/dist/ShowMoreButton/index.d.ts +3 -0
- package/dist/ShowMoreButton/index.js +1 -0
- package/dist/SidebarActions/SidebarActions.d.ts +26 -0
- package/dist/SidebarActions/SidebarActions.js +32 -0
- package/dist/SidebarActions/index.d.ts +3 -0
- package/dist/SidebarActions/index.js +2 -0
- package/dist/SimpleRow/SimpleRow.d.ts +15 -0
- package/dist/SimpleRow/SimpleRow.js +11 -0
- package/dist/SimpleRow/index.d.ts +3 -0
- package/dist/SimpleRow/index.js +2 -0
- package/dist/Spinner/Spinner.d.ts +9 -0
- package/dist/Spinner/Spinner.js +8 -0
- package/dist/Spinner/index.d.ts +3 -0
- package/dist/Spinner/index.js +1 -0
- package/dist/ToggleButton/ToggleButton.d.ts +17 -0
- package/dist/ToggleButton/ToggleButton.js +8 -0
- package/dist/ToggleButton/index.d.ts +3 -0
- package/dist/ToggleButton/index.js +1 -0
- package/dist/ToggleSwitch/ToggleSwitch.d.ts +12 -0
- package/dist/ToggleSwitch/ToggleSwitch.js +10 -0
- package/dist/ToggleSwitch/index.d.ts +3 -0
- package/dist/ToggleSwitch/index.js +1 -0
- package/dist/TouchHand/TouchHand.d.ts +5 -0
- package/dist/TouchHand/TouchHand.js +7 -0
- package/dist/TouchHand/index.d.ts +2 -0
- package/dist/TouchHand/index.js +1 -0
- package/dist/WayfindingFloorSelector/WayfindingFloorSelector.d.ts +24 -0
- package/dist/WayfindingFloorSelector/WayfindingFloorSelector.js +27 -0
- package/dist/WayfindingFloorSelector/index.d.ts +3 -0
- package/dist/WayfindingFloorSelector/index.js +1 -0
- package/dist/components/Alert/Alert.d.ts +20 -0
- package/dist/components/Alert/Alert.js +23 -0
- package/dist/components/Alert/index.d.ts +3 -0
- package/dist/components/Alert/index.js +1 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +21 -0
- package/dist/components/Autocomplete/Autocomplete.js +183 -0
- package/dist/components/Autocomplete/index.d.ts +3 -0
- package/dist/components/Autocomplete/index.js +1 -0
- package/dist/components/Badge/Badge.d.ts +14 -0
- package/dist/components/Badge/Badge.js +15 -0
- package/dist/components/Badge/index.d.ts +3 -0
- package/dist/components/Badge/index.js +1 -0
- package/dist/components/Button/Button.d.ts +30 -0
- package/dist/components/Button/Button.js +41 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.js +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +19 -0
- package/dist/components/Checkbox/Checkbox.js +19 -0
- package/dist/components/Checkbox/index.d.ts +3 -0
- package/dist/components/Checkbox/index.js +1 -0
- package/dist/components/CheckboxButton/CheckboxButton.d.ts +12 -0
- package/dist/components/CheckboxButton/CheckboxButton.js +19 -0
- package/dist/components/CheckboxButton/index.d.ts +3 -0
- package/dist/components/CheckboxButton/index.js +1 -0
- package/dist/components/DownloadList/DownloadList.d.ts +15 -0
- package/dist/components/DownloadList/DownloadList.js +9 -0
- package/dist/components/DownloadList/index.d.ts +3 -0
- package/dist/components/DownloadList/index.js +2 -0
- package/dist/components/Draggable/Draggable.d.ts +9 -0
- package/dist/components/Draggable/Draggable.js +92 -0
- package/dist/components/Draggable/index.d.ts +3 -0
- package/dist/components/Draggable/index.js +2 -0
- package/dist/components/EntityItem/EntityItem.d.ts +46 -0
- package/dist/components/EntityItem/EntityItem.js +29 -0
- package/dist/components/EntityItem/index.d.ts +3 -0
- package/dist/components/EntityItem/index.js +1 -0
- package/dist/components/EventBadge/EventBadge.d.ts +13 -0
- package/dist/components/EventBadge/EventBadge.js +10 -0
- package/dist/components/EventBadge/index.d.ts +3 -0
- package/dist/components/EventBadge/index.js +1 -0
- package/dist/components/Gallery/Gallery.d.ts +25 -0
- package/dist/components/Gallery/Gallery.js +25 -0
- package/dist/components/Gallery/GalleryBadges/GalleryBadges.d.ts +8 -0
- package/dist/components/Gallery/GalleryBadges/GalleryBadges.js +5 -0
- package/dist/components/Gallery/GalleryControls/GalleryControls.d.ts +11 -0
- package/dist/components/Gallery/GalleryControls/GalleryControls.js +5 -0
- package/dist/components/Gallery/GalleryImg/GalleryImg.d.ts +13 -0
- package/dist/components/Gallery/GalleryImg/GalleryImg.js +37 -0
- package/dist/components/Gallery/GalleryItem/GalleryItem.d.ts +14 -0
- package/dist/components/Gallery/GalleryItem/GalleryItem.js +6 -0
- package/dist/components/Gallery/GalleryModal/GalleryModal.d.ts +18 -0
- package/dist/components/Gallery/GalleryModal/GalleryModal.js +88 -0
- package/dist/components/Gallery/GalleryPreLoader.d.ts +7 -0
- package/dist/components/Gallery/GalleryPreLoader.js +29 -0
- package/dist/components/Gallery/TransformImg/TransformImg.d.ts +10 -0
- package/dist/components/Gallery/TransformImg/TransformImg.js +15 -0
- package/dist/components/Gallery/index.d.ts +3 -0
- package/dist/components/Gallery/index.js +1 -0
- package/dist/components/HeatmapLegend/HeatmapLegend.d.ts +15 -0
- package/dist/components/HeatmapLegend/HeatmapLegend.js +11 -0
- package/dist/components/HeatmapLegend/index.d.ts +3 -0
- package/dist/components/HeatmapLegend/index.js +2 -0
- package/dist/components/HighlightText/HighlightText.d.ts +7 -0
- package/dist/components/HighlightText/HighlightText.js +14 -0
- package/dist/components/HighlightText/index.d.ts +2 -0
- package/dist/components/HighlightText/index.js +1 -0
- package/dist/components/LevelBadge/LevelBadge.d.ts +9 -0
- package/dist/components/LevelBadge/LevelBadge.js +10 -0
- package/dist/components/LevelBadge/index.d.ts +3 -0
- package/dist/components/LevelBadge/index.js +2 -0
- package/dist/components/LevelSelector/LevelSelector.d.ts +19 -0
- package/dist/components/LevelSelector/LevelSelector.js +91 -0
- package/dist/components/LevelSelector/index.d.ts +3 -0
- package/dist/components/LevelSelector/index.js +2 -0
- package/dist/components/MapControls/MapControls.d.ts +33 -0
- package/dist/components/MapControls/MapControls.js +38 -0
- package/dist/components/MapControls/index.d.ts +3 -0
- package/dist/components/MapControls/index.js +2 -0
- package/dist/components/MobileToggleButton/MobileToggleButton.d.ts +12 -0
- package/dist/components/MobileToggleButton/MobileToggleButton.js +8 -0
- package/dist/components/MobileToggleButton/index.d.ts +3 -0
- package/dist/components/MobileToggleButton/index.js +1 -0
- package/dist/components/Modal/Modal.d.ts +34 -0
- package/dist/components/Modal/Modal.js +98 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/Modal/index.js +1 -0
- package/dist/components/MultiSelectGroups/MultiSelectGroups.d.ts +37 -0
- package/dist/components/MultiSelectGroups/MultiSelectGroups.js +80 -0
- package/dist/components/MultiSelectGroups/index.d.ts +3 -0
- package/dist/components/MultiSelectGroups/index.js +1 -0
- package/dist/components/Overlay/Overlay.d.ts +29 -0
- package/dist/components/Overlay/Overlay.js +251 -0
- package/dist/components/Overlay/OverlayScrollContext.d.ts +7 -0
- package/dist/components/Overlay/OverlayScrollContext.js +7 -0
- package/dist/components/Overlay/index.d.ts +4 -0
- package/dist/components/Overlay/index.js +2 -0
- package/dist/components/OverlayGrip/OverlayGrip.d.ts +11 -0
- package/dist/components/OverlayGrip/OverlayGrip.js +8 -0
- package/dist/components/OverlayGrip/index.d.ts +3 -0
- package/dist/components/OverlayGrip/index.js +2 -0
- package/dist/components/PermissionNotice/PermissionNotice.d.ts +16 -0
- package/dist/components/PermissionNotice/PermissionNotice.js +11 -0
- package/dist/components/PermissionNotice/index.d.ts +3 -0
- package/dist/components/PermissionNotice/index.js +2 -0
- package/dist/components/Radio/Radio.d.ts +15 -0
- package/dist/components/Radio/Radio.js +13 -0
- package/dist/components/Radio/index.d.ts +3 -0
- package/dist/components/Radio/index.js +1 -0
- package/dist/components/RebookingNotes/RebookingNotes.d.ts +11 -0
- package/dist/components/RebookingNotes/RebookingNotes.js +18 -0
- package/dist/components/RebookingNotes/index.d.ts +3 -0
- package/dist/components/RebookingNotes/index.js +1 -0
- package/dist/components/RebookingRadioGroup/RebookingRadioGroup.d.ts +17 -0
- package/dist/components/RebookingRadioGroup/RebookingRadioGroup.js +13 -0
- package/dist/components/RebookingRadioGroup/index.d.ts +3 -0
- package/dist/components/RebookingRadioGroup/index.js +1 -0
- package/dist/components/ScrollableRow/ScrollableRow.d.ts +21 -0
- package/dist/components/ScrollableRow/ScrollableRow.js +155 -0
- package/dist/components/ScrollableRow/index.d.ts +3 -0
- package/dist/components/ScrollableRow/index.js +2 -0
- package/dist/components/Share/Share.d.ts +22 -0
- package/dist/components/Share/Share.js +24 -0
- package/dist/components/Share/index.d.ts +3 -0
- package/dist/components/Share/index.js +1 -0
- package/dist/components/ShowMoreButton/ShowMoreButton.d.ts +11 -0
- package/dist/components/ShowMoreButton/ShowMoreButton.js +7 -0
- package/dist/components/ShowMoreButton/index.d.ts +3 -0
- package/dist/components/ShowMoreButton/index.js +1 -0
- package/dist/components/SidebarActions/SidebarActions.d.ts +26 -0
- package/dist/components/SidebarActions/SidebarActions.js +32 -0
- package/dist/components/SidebarActions/index.d.ts +3 -0
- package/dist/components/SidebarActions/index.js +2 -0
- package/dist/components/SimpleRow/SimpleRow.d.ts +15 -0
- package/dist/components/SimpleRow/SimpleRow.js +11 -0
- package/dist/components/SimpleRow/index.d.ts +3 -0
- package/dist/components/SimpleRow/index.js +2 -0
- package/dist/components/Spinner/Spinner.d.ts +9 -0
- package/dist/components/Spinner/Spinner.js +8 -0
- package/dist/components/Spinner/index.d.ts +3 -0
- package/dist/components/Spinner/index.js +1 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +17 -0
- package/dist/components/ToggleButton/ToggleButton.js +8 -0
- package/dist/components/ToggleButton/index.d.ts +3 -0
- package/dist/components/ToggleButton/index.js +1 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +12 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.js +10 -0
- package/dist/components/ToggleSwitch/index.d.ts +3 -0
- package/dist/components/ToggleSwitch/index.js +1 -0
- package/dist/components/TouchHand/TouchHand.d.ts +5 -0
- package/dist/components/TouchHand/TouchHand.js +7 -0
- package/dist/components/TouchHand/index.d.ts +2 -0
- package/dist/components/TouchHand/index.js +1 -0
- package/dist/components/WayfindingFloorSelector/WayfindingFloorSelector.d.ts +24 -0
- package/dist/components/WayfindingFloorSelector/WayfindingFloorSelector.js +27 -0
- package/dist/components/WayfindingFloorSelector/index.d.ts +3 -0
- package/dist/components/WayfindingFloorSelector/index.js +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +69 -0
- package/dist/shared/debounce.d.ts +2 -0
- package/dist/shared/debounce.js +9 -0
- package/dist/shared/hooks/useDragGesture.d.ts +19 -0
- package/dist/shared/hooks/useDragGesture.js +45 -0
- package/dist/shared/hooks/useOnClickOutside.d.ts +14 -0
- package/dist/shared/hooks/useOnClickOutside.js +43 -0
- package/dist/shared/hooks/useOnEscape.d.ts +14 -0
- package/dist/shared/hooks/useOnEscape.js +31 -0
- package/dist/shared/hooks/useWindowSize.d.ts +5 -0
- package/dist/shared/hooks/useWindowSize.js +40 -0
- package/dist/shared/interactive.d.ts +2 -0
- package/dist/shared/interactive.js +4 -0
- package/package.json +70 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './Share.scss';
|
|
2
|
+
export type SocialNetwork = 'facebook' | 'xcom' | 'linkedin';
|
|
3
|
+
export interface SocialLink {
|
|
4
|
+
network: SocialNetwork;
|
|
5
|
+
name: string;
|
|
6
|
+
url: string;
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ShareProps {
|
|
10
|
+
title: string;
|
|
11
|
+
url: string;
|
|
12
|
+
shareHeading: string;
|
|
13
|
+
socials: SocialLink[];
|
|
14
|
+
copyLinkSectionLabel: string;
|
|
15
|
+
directLinkAriaLabel: string;
|
|
16
|
+
copyButtonAriaLabel: string;
|
|
17
|
+
copyLabel: string;
|
|
18
|
+
copiedLabel: string;
|
|
19
|
+
}
|
|
20
|
+
declare const Share: ({ title, url, shareHeading, socials, copyLinkSectionLabel, directLinkAriaLabel, copyButtonAriaLabel, copyLabel, copiedLabel, }: ShareProps) => import("react").JSX.Element;
|
|
21
|
+
export default Share;
|
|
22
|
+
//# sourceMappingURL=Share.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './Share.scss';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import copy from 'copy-to-clipboard';
|
|
5
|
+
import { useEffect, useRef, useState } from 'react';
|
|
6
|
+
const socialIconClass = {
|
|
7
|
+
facebook: 'icon-facebook',
|
|
8
|
+
xcom: 'icon-twitter-x',
|
|
9
|
+
linkedin: 'icon-linkedin',
|
|
10
|
+
};
|
|
11
|
+
const Share = ({ title, url, shareHeading, socials, copyLinkSectionLabel, directLinkAriaLabel, copyButtonAriaLabel, copyLabel, copiedLabel, }) => {
|
|
12
|
+
const [isCopied, setIsCopied] = useState(false);
|
|
13
|
+
const timerRef = useRef(undefined);
|
|
14
|
+
useEffect(() => () => clearTimeout(timerRef.current), []);
|
|
15
|
+
const copyToClipboard = () => {
|
|
16
|
+
if (!copy(url))
|
|
17
|
+
return;
|
|
18
|
+
setIsCopied(true);
|
|
19
|
+
clearTimeout(timerRef.current);
|
|
20
|
+
timerRef.current = setTimeout(() => setIsCopied(false), 2000);
|
|
21
|
+
};
|
|
22
|
+
return (_jsxs("div", { className: "share", children: [_jsxs("h3", { children: [shareHeading, " ", title] }), _jsx("div", { className: "share__socials", children: socials.map((social) => (_jsxs("a", { href: social.url, rel: "noopener noreferrer", target: "_blank", className: classNames('share-social', social.network), "aria-label": social.ariaLabel, children: [_jsx("div", { className: "share-social__icon", children: _jsx("i", { className: socialIconClass[social.network], "aria-hidden": "true" }) }), _jsx("div", { className: "share-social__title", children: social.name })] }, social.network))) }), _jsxs("div", { className: "share__copy", children: [_jsx("span", { children: copyLinkSectionLabel }), _jsxs("div", { className: "share__copy-input", children: [_jsx("input", { type: "text", defaultValue: url, readOnly: true, "aria-label": directLinkAriaLabel }), _jsx("button", { type: "button", className: classNames({ isCopied }), onClick: copyToClipboard, "aria-label": copyButtonAriaLabel, children: isCopied ? _jsx("span", { "aria-live": "polite", children: copiedLabel }) : copyLabel })] })] })] }));
|
|
23
|
+
};
|
|
24
|
+
export default Share;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Share';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './ShowMoreButton.scss';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface ShowMoreButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-expanded' | 'type'> {
|
|
4
|
+
expanded: boolean;
|
|
5
|
+
showMoreLabel: string;
|
|
6
|
+
showLessLabel: string;
|
|
7
|
+
suffix?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function ShowMoreButton({ expanded, showMoreLabel, showLessLabel, className, suffix, ...props }: ShowMoreButtonProps): React.JSX.Element;
|
|
10
|
+
export default ShowMoreButton;
|
|
11
|
+
//# sourceMappingURL=ShowMoreButton.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './ShowMoreButton.scss';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
function ShowMoreButton({ expanded, showMoreLabel, showLessLabel, className, suffix, ...props }) {
|
|
5
|
+
return (_jsxs("button", { ...props, type: "button", className: classNames('efp-show-more-button', { 'efp-show-more-button--expanded': expanded }, className), "aria-expanded": expanded, children: [_jsx("i", { className: "icon-chevron-down", "aria-hidden": "true" }), _jsx("span", { className: "efp-show-more-button__label", children: expanded ? showLessLabel : showMoreLabel }), suffix] }));
|
|
6
|
+
}
|
|
7
|
+
export default ShowMoreButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ShowMoreButton';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import './SidebarActions.scss';
|
|
2
|
+
export interface SidebarActionsProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
inBookmark?: boolean;
|
|
5
|
+
visited?: boolean;
|
|
6
|
+
showVisited?: boolean;
|
|
7
|
+
showBookmark?: boolean;
|
|
8
|
+
showDirections?: boolean;
|
|
9
|
+
showRoutePlanner?: boolean;
|
|
10
|
+
showShare?: boolean;
|
|
11
|
+
directionsLabel: string;
|
|
12
|
+
visitedLabel: string;
|
|
13
|
+
notVisitedLabel: string;
|
|
14
|
+
saveBookmarkLabel: string;
|
|
15
|
+
removeBookmarkLabel: string;
|
|
16
|
+
routePlannerLabel: string;
|
|
17
|
+
shareLabel: string;
|
|
18
|
+
onClickBookmark?: () => void;
|
|
19
|
+
onClickVisited?: () => void;
|
|
20
|
+
onClickDirections?: () => void;
|
|
21
|
+
onClickRoutePlanner?: () => void;
|
|
22
|
+
onClickShare?: () => void;
|
|
23
|
+
}
|
|
24
|
+
declare const SidebarActions: ({ className, inBookmark, visited, showVisited, showBookmark, showDirections, showRoutePlanner, showShare, directionsLabel, visitedLabel, notVisitedLabel, saveBookmarkLabel, removeBookmarkLabel, routePlannerLabel, shareLabel, onClickBookmark, onClickVisited, onClickDirections, onClickRoutePlanner, onClickShare, }: SidebarActionsProps) => import("react").JSX.Element;
|
|
25
|
+
export default SidebarActions;
|
|
26
|
+
//# sourceMappingURL=SidebarActions.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './SidebarActions.scss';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useEffect, useRef, useState } from 'react';
|
|
5
|
+
import CheckboxButton from '../CheckboxButton';
|
|
6
|
+
const SidebarActions = ({ className, inBookmark = false, visited = false, showVisited = false, showBookmark = true, showDirections = true, showRoutePlanner = false, showShare = true, directionsLabel, visitedLabel, notVisitedLabel, saveBookmarkLabel, removeBookmarkLabel, routePlannerLabel, shareLabel, onClickBookmark, onClickVisited, onClickDirections, onClickRoutePlanner, onClickShare, }) => {
|
|
7
|
+
const [animateIcon, setAnimateIcon] = useState(false);
|
|
8
|
+
const animateTimeoutRef = useRef(undefined);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
return () => {
|
|
11
|
+
if (animateTimeoutRef.current !== undefined) {
|
|
12
|
+
clearTimeout(animateTimeoutRef.current);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}, []);
|
|
16
|
+
const handleBookmarkClick = () => {
|
|
17
|
+
clearTimeout(animateTimeoutRef.current);
|
|
18
|
+
setAnimateIcon(true);
|
|
19
|
+
onClickBookmark?.();
|
|
20
|
+
animateTimeoutRef.current = setTimeout(() => {
|
|
21
|
+
setAnimateIcon(false);
|
|
22
|
+
}, 320);
|
|
23
|
+
};
|
|
24
|
+
return (_jsxs("div", { className: classNames('efp-sidebar-actions', className), children: [showDirections && (_jsxs("button", { type: "button", className: "efp-action-button efp-action-button--directions", onClick: onClickDirections, title: directionsLabel, "aria-label": directionsLabel, children: [_jsx("i", { className: "icon-directions", "aria-hidden": "true" }), directionsLabel] })), showVisited && (_jsx(CheckboxButton, { className: "efp-visited-btn", ariaLabel: visited ? visitedLabel : notVisitedLabel, checked: visited, label: visitedLabel, onClick: onClickVisited ??
|
|
25
|
+
(() => {
|
|
26
|
+
/* no-op */
|
|
27
|
+
}) })), showBookmark && (_jsx("button", { type: "button", className: classNames('efp-action-button', 'efp-action-button--bookmark', {
|
|
28
|
+
'efp-action-button--active': inBookmark,
|
|
29
|
+
'efp-action-button--animate': animateIcon,
|
|
30
|
+
}), title: inBookmark ? removeBookmarkLabel : saveBookmarkLabel, "aria-label": inBookmark ? removeBookmarkLabel : saveBookmarkLabel, "aria-pressed": inBookmark, onClick: handleBookmarkClick, children: _jsx("i", { className: inBookmark ? 'icon-bookmark-solid' : 'icon-bookmark', "aria-hidden": "true" }) })), showRoutePlanner && (_jsxs("button", { type: "button", className: "efp-action-button efp-action-button--route-planner", title: routePlannerLabel, "aria-label": routePlannerLabel, onClick: onClickRoutePlanner, children: [_jsx("i", { className: "icon-route-solid", "aria-hidden": "true" }), routePlannerLabel] })), showShare && (_jsx("button", { type: "button", className: "efp-action-button efp-action-button--share", title: shareLabel, "aria-label": shareLabel, onClick: onClickShare, children: _jsx("i", { className: "icon-share", "aria-hidden": "true" }) }))] }));
|
|
31
|
+
};
|
|
32
|
+
export default SidebarActions;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './SimpleRow.scss';
|
|
2
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
export interface SimpleRowProps {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
subtitle: string;
|
|
6
|
+
trailing?: string;
|
|
7
|
+
slug: string;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const SimpleRow: ({ title, subtitle, trailing, slug, style, className, active, onClick, }: SimpleRowProps) => import("react").JSX.Element;
|
|
14
|
+
export default SimpleRow;
|
|
15
|
+
//# sourceMappingURL=SimpleRow.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './SimpleRow.scss';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
const SimpleRow = ({ title, subtitle, trailing, slug, style, className, active = false, onClick, }) => {
|
|
5
|
+
const handleClick = (e) => {
|
|
6
|
+
e.preventDefault();
|
|
7
|
+
onClick();
|
|
8
|
+
};
|
|
9
|
+
return (_jsxs("a", { href: '?' + encodeURIComponent(slug), onClick: handleClick, className: classNames('efp-simple-row', { 'efp-simple-row--active': active }, className), style: style, children: [_jsxs("div", { className: "efp-simple-row__col", children: [_jsx("div", { className: "efp-simple-row__main", dir: "auto", children: title }), _jsx("div", { className: "efp-simple-row__sub", dir: "auto", children: subtitle })] }), trailing && _jsx("div", { className: "efp-simple-row__end", children: trailing })] }));
|
|
10
|
+
};
|
|
11
|
+
export default SimpleRow;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './Spinner.scss';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface SpinnerProps {
|
|
4
|
+
active: boolean;
|
|
5
|
+
isCenter?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Spinner: ({ active, isCenter }: SpinnerProps) => React.JSX.Element;
|
|
8
|
+
export default Spinner;
|
|
9
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import './Spinner.scss';
|
|
4
|
+
import cn from 'classnames';
|
|
5
|
+
const Spinner = ({ active, isCenter = false }) => {
|
|
6
|
+
return (_jsx("div", { className: cn('efp-spinner', { 'is-hidden': !active }), style: isCenter ? { top: 0, bottom: 0, left: 0, right: 0, margin: 'auto' } : undefined, children: _jsx("svg", { viewBox: "25 25 50 50", children: _jsx("circle", { r: "20", cy: "50", cx: "50" }) }) }));
|
|
7
|
+
};
|
|
8
|
+
export default Spinner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Spinner';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import './ToggleButton.scss';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface ToggleButtonBase {
|
|
4
|
+
toggled: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
}
|
|
8
|
+
export type ToggleButtonProps = (ToggleButtonBase & {
|
|
9
|
+
label: string;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
}) | (ToggleButtonBase & {
|
|
12
|
+
label?: undefined;
|
|
13
|
+
ariaLabel: string;
|
|
14
|
+
});
|
|
15
|
+
declare const ToggleButton: ({ toggled, label, ariaLabel, className, onClick }: ToggleButtonProps) => React.JSX.Element;
|
|
16
|
+
export default ToggleButton;
|
|
17
|
+
//# sourceMappingURL=ToggleButton.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import './ToggleButton.scss';
|
|
4
|
+
import cn from 'classnames';
|
|
5
|
+
const ToggleButton = ({ toggled, label, ariaLabel, className, onClick }) => {
|
|
6
|
+
return (_jsxs("button", { type: "button", className: cn('efp-toggle-button', className, { 'efp-toggle-button--toggled': toggled }), "aria-pressed": toggled, "aria-label": ariaLabel, onClick: onClick, children: [_jsx("div", { className: "efp-toggle-button__switch", children: _jsx("div", { className: "efp-toggle-button__switch-slider" }) }), label && _jsx("span", { className: "efp-toggle-button__label", children: label })] }));
|
|
7
|
+
};
|
|
8
|
+
export default ToggleButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ToggleButton';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './ToggleSwitch.scss';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface ToggleSwitchProps {
|
|
4
|
+
name?: string;
|
|
5
|
+
value: boolean;
|
|
6
|
+
label: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
onChange: (value: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const ToggleSwitch: ({ name, value, label, className, onChange }: ToggleSwitchProps) => React.JSX.Element;
|
|
11
|
+
export default ToggleSwitch;
|
|
12
|
+
//# sourceMappingURL=ToggleSwitch.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import './ToggleSwitch.scss';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { useId } from 'react';
|
|
6
|
+
const ToggleSwitch = ({ name, value, label, className, onChange }) => {
|
|
7
|
+
const id = useId();
|
|
8
|
+
return (_jsxs("div", { className: classNames('efp-toggle-switch', className), children: [_jsx("input", { type: "checkbox", role: "switch", "aria-checked": value, id: id, name: name, checked: value, onChange: () => onChange(!value) }), _jsx("label", { htmlFor: id, children: _jsx("span", { children: label }) })] }));
|
|
9
|
+
};
|
|
10
|
+
export default ToggleSwitch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ToggleSwitch';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import './TouchHand.scss';
|
|
4
|
+
const TouchHand = () => {
|
|
5
|
+
return (_jsx("div", { className: "efp-touch-hand", "aria-hidden": "true", children: _jsx("svg", { width: "640", height: "640", viewBox: "0 0 640 640", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "efp-touch-hand-icon", children: _jsxs("g", { className: "touchon", children: [_jsxs("g", { id: "touchon-body", children: [_jsx("circle", { className: "efp-hand-touch-1", cx: "299", cy: "201", r: "50" }), _jsx("circle", { className: "efp-hand-touch-2", cx: "299", cy: "201", r: "110" }), _jsx("circle", { className: "efp-hand-touch-3", cx: "299", cy: "201", r: "160" })] }), _jsxs("g", { id: "touchon-hand-body", children: [_jsx("path", { className: "efp-touchon-hand-fill", d: "M413.525 275.538C400.76 242.513 351.811 260.648 363.064 293.905L330.572 204.634C316.987 171.694 269.344 189.034 280.111 223L311.098 308.137L353.234 423.907C363.94 453.319 361.648 447.023 310.673 433.864C269.832 423.402 247.978 454.874 254.082 468.721C260.187 482.569 368.361 525.989 368.361 525.989C501.073 600.279 573.714 496.368 572.578 437.401C571.407 378.339 533.075 288.002 533.075 288.002C527.073 274.436 512.056 267.025 498.149 272.087C484.241 277.149 477.189 293.444 481.977 306.6L473.153 282.356C460.405 249.962 411.865 266.884 422.521 300.252L413.525 275.538Z" }), _jsx("path", { className: "efp-touchon-hand-stroke", d: "M363.064 293.905C351.811 260.648 400.76 242.513 413.525 275.538L422.521 300.252M363.064 293.905L330.572 204.634C316.987 171.694 269.344 189.034 280.111 223L311.098 308.137L353.234 423.907C363.94 453.319 361.648 447.023 310.673 433.864C269.832 423.402 247.978 454.874 254.082 468.721C260.187 482.569 368.361 525.989 368.361 525.989C501.073 600.279 573.714 496.368 572.578 437.401C571.407 378.339 533.075 288.002 533.075 288.002C527.073 274.436 512.056 267.025 498.149 272.087C484.241 277.149 477.189 293.444 481.977 306.6M363.064 293.905L390.46 369.174M422.521 300.252C411.865 266.884 460.405 249.962 473.153 282.356L481.977 306.6M422.521 300.252L440.921 350.807M481.977 306.6L494.974 342.308M363.064 293.905C351.811 260.648 400.76 242.513 413.525 275.538L422.521 300.252M363.064 293.905L330.572 204.634C316.987 171.694 269.344 189.034 280.111 223L311.098 308.137L353.234 423.907C363.94 453.319 361.648 447.023 310.673 433.864C269.832 423.402 247.978 454.874 254.082 468.721C260.187 482.569 368.361 525.989 368.361 525.989C501.073 600.279 573.714 496.368 572.578 437.401C571.407 378.339 533.075 288.002 533.075 288.002C527.073 274.436 512.056 267.025 498.149 272.087C484.241 277.149 477.189 293.444 481.977 306.6M363.064 293.905L390.46 369.174M422.521 300.252C411.865 266.884 460.405 249.962 473.153 282.356L481.977 306.6M422.521 300.252L440.921 350.807M481.977 306.6L494.974 342.308" })] })] }) }) }));
|
|
6
|
+
};
|
|
7
|
+
export default TouchHand;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TouchHand';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import './WayfindingFloorSelector.scss';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface WayfindingFloorSelectorFloor {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
directionToNext?: 'up' | 'down';
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface WayfindingFloorSelectorProps {
|
|
11
|
+
floors: WayfindingFloorSelectorFloor[];
|
|
12
|
+
value?: {
|
|
13
|
+
id: number;
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
|
16
|
+
floorSelectionLabel?: string;
|
|
17
|
+
onSelect?: (floor: {
|
|
18
|
+
id: number;
|
|
19
|
+
name: string;
|
|
20
|
+
}) => void;
|
|
21
|
+
}
|
|
22
|
+
declare const WayfindingFloorSelector: ({ floors, value, floorSelectionLabel, onSelect, }: WayfindingFloorSelectorProps) => React.JSX.Element;
|
|
23
|
+
export default WayfindingFloorSelector;
|
|
24
|
+
//# sourceMappingURL=WayfindingFloorSelector.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './WayfindingFloorSelector.scss';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
const WayfindingFloorSelector = ({ floors, value, floorSelectionLabel = 'Floor selection', onSelect, }) => {
|
|
6
|
+
const currentIndex = floors.findIndex((floor) => floor?.id === value?.id);
|
|
7
|
+
const isNextArrow = (index) => {
|
|
8
|
+
return currentIndex !== -1 && index === currentIndex;
|
|
9
|
+
};
|
|
10
|
+
return (_jsx("div", { className: "efp-wayfinding-floor", children: _jsx("div", { className: "efp-wayfinding-floor__body", children: _jsx("div", { className: "efp-wayfinding-floor__list", role: "radiogroup", "aria-label": floorSelectionLabel, children: floors.map((floor, index) => {
|
|
11
|
+
const isCurrent = floor?.id === value?.id;
|
|
12
|
+
const isPassed = currentIndex !== -1 && index < currentIndex;
|
|
13
|
+
const isLast = index === floors.length - 1;
|
|
14
|
+
const arrowDirection = isLast ? null : (floor.directionToNext ?? null);
|
|
15
|
+
const shouldBlink = isNextArrow(index);
|
|
16
|
+
const isArrowPassed = currentIndex !== -1 && index < currentIndex;
|
|
17
|
+
return (_jsxs(React.Fragment, { children: [_jsx("div", { className: cn('efp-wayfinding-floor__item', {
|
|
18
|
+
'is-current': isCurrent,
|
|
19
|
+
'is-passed': isPassed,
|
|
20
|
+
}), children: _jsx("button", { type: "button", role: "radio", title: floor.description, "aria-checked": isCurrent, "aria-label": floor.ariaLabel ?? floor.description ?? floor.name, onClick: () => onSelect?.({ id: floor.id, name: floor.name }), children: _jsx("span", { children: floor.name }) }) }), !isLast && arrowDirection && (_jsx("div", { className: cn('efp-wayfinding-floor__arrow', {
|
|
21
|
+
[`efp-wayfinding-floor__arrow--${arrowDirection}`]: arrowDirection,
|
|
22
|
+
'efp-wayfinding-floor__arrow--blink': shouldBlink,
|
|
23
|
+
'efp-wayfinding-floor__arrow--passed': isArrowPassed,
|
|
24
|
+
}), "aria-hidden": "true", children: isArrowPassed || shouldBlink ? (_jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M11.7502 18.2823C11.7503 19.0928 12.4074 19.7499 13.218 19.75C13.5885 19.75 13.9455 19.6096 14.217 19.3575L20.6438 13.3897C21.0303 13.0308 21.2502 12.5274 21.2502 12C21.2502 11.4727 21.0303 10.9693 20.6438 10.6104L14.217 4.64258C13.9795 4.42202 13.6768 4.28716 13.3566 4.25684L13.218 4.25L13.0686 4.25782C12.3282 4.3328 11.7503 4.95766 11.7502 5.71778L11.7502 8.25L4.50024 8.25C3.53374 8.25 2.75024 9.03351 2.75024 9.99996L2.75024 14C2.75024 14.9665 3.53374 15.75 4.50024 15.75L11.7502 15.75L11.7502 18.2823Z", fill: "currentColor" }) })) : (_jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M2.5 10C2.5 8.89544 3.39544 8 4.5 8H11.5V5.71777C11.5001 4.76912 12.2692 4.00012 13.2178 4C13.5973 4 13.9649 4.12537 14.2637 4.35449L14.3867 4.45898L20.8145 10.4268C21.2518 10.8329 21.5 11.4032 21.5 12C21.5 12.5968 21.2518 13.1671 20.8145 13.5732L14.3867 19.54L14.3877 19.541C14.0697 19.8365 13.6514 20 13.2178 20C12.2692 19.9999 11.5001 19.2308 11.5 18.2822V16H4.5C3.39545 16 2.5 15.1046 2.5 14V10ZM4.5 14H12.5C13.0523 14 13.5 14.4477 13.5 15V17.6348L19.4531 12.1074C19.4829 12.0797 19.5 12.0407 19.5 12C19.5 11.9593 19.4829 11.9203 19.4531 11.8926L13.5 6.36426V9C13.5 9.55228 13.0523 10 12.5 10H4.5V14Z", fill: "currentColor" }) })) }))] }, floor.id));
|
|
25
|
+
}) }) }) }));
|
|
26
|
+
};
|
|
27
|
+
export default WayfindingFloorSelector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './WayfindingFloorSelector';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './Alert.scss';
|
|
2
|
+
import React, { type ReactNode } from 'react';
|
|
3
|
+
export type AlertVariant = 'info' | 'warning' | 'error' | 'success' | 'blank';
|
|
4
|
+
export type AlertSize = 'sm' | 'md';
|
|
5
|
+
export type AlertPosition = 'top-right' | 'bottom-right';
|
|
6
|
+
export interface AlertProps {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
position?: AlertPosition;
|
|
9
|
+
variant?: AlertVariant;
|
|
10
|
+
size?: AlertSize;
|
|
11
|
+
inline?: boolean;
|
|
12
|
+
showIcon?: boolean;
|
|
13
|
+
closable?: boolean;
|
|
14
|
+
title?: string;
|
|
15
|
+
closeLabel: string;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
}
|
|
18
|
+
declare const Alert: ({ children, position, variant, inline, showIcon, size, closable, title, closeLabel, onClose, }: AlertProps) => React.JSX.Element;
|
|
19
|
+
export default Alert;
|
|
20
|
+
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import './Alert.scss';
|
|
4
|
+
import cn from 'classnames';
|
|
5
|
+
const Alert = ({ children, position, variant = 'info', inline = false, showIcon = true, size = 'md', closable = false, title, closeLabel, onClose, }) => {
|
|
6
|
+
const alertIcon = () => {
|
|
7
|
+
switch (variant) {
|
|
8
|
+
case 'error':
|
|
9
|
+
return 'icon-close-solid';
|
|
10
|
+
case 'success':
|
|
11
|
+
return 'icon-checkmark-solid';
|
|
12
|
+
case 'warning':
|
|
13
|
+
return 'icon-warning-solid';
|
|
14
|
+
default:
|
|
15
|
+
return 'icon-info-solid';
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return (_jsxs("div", { className: cn('efp-alert', `efp-alert--${variant} efp-alert--${size}`, {
|
|
19
|
+
'efp-alert--inline': inline,
|
|
20
|
+
[`efp-alert--${position}`]: position,
|
|
21
|
+
}), role: variant === 'error' || variant === 'warning' ? 'alert' : 'status', "aria-live": variant === 'error' || variant === 'warning' ? 'assertive' : 'polite', children: [showIcon && (_jsx("div", { className: "efp-alert__icon", children: _jsx("i", { className: cn(alertIcon()), "aria-hidden": "true" }) })), _jsxs("div", { className: "efp-alert__content", children: [title && _jsx("div", { className: "efp-alert__title", children: title }), children] }), closable && (_jsx("button", { type: "button", className: "efp-alert__close", onClick: onClose, "aria-label": closeLabel, title: closeLabel }))] }));
|
|
22
|
+
};
|
|
23
|
+
export default Alert;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Alert';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import './Autocomplete.scss';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface AutocompleteOptionObject {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AutocompleteProps<T extends AutocompleteOptionObject = AutocompleteOptionObject> {
|
|
8
|
+
placeholder: string;
|
|
9
|
+
options: T[];
|
|
10
|
+
value?: T;
|
|
11
|
+
showClear?: boolean;
|
|
12
|
+
onChange?: (value: T | undefined) => void;
|
|
13
|
+
renderTarget?: HTMLElement | null;
|
|
14
|
+
noOptionsLabel: string;
|
|
15
|
+
ariaLabel: string;
|
|
16
|
+
clearLabel: string;
|
|
17
|
+
getOptionKey?: (option: T) => string;
|
|
18
|
+
}
|
|
19
|
+
declare const Autocomplete: <T extends AutocompleteOptionObject = AutocompleteOptionObject>({ placeholder, options, value, showClear, onChange, renderTarget, noOptionsLabel, ariaLabel, clearLabel, getOptionKey, }: AutocompleteProps<T>) => React.JSX.Element;
|
|
20
|
+
export default Autocomplete;
|
|
21
|
+
//# sourceMappingURL=Autocomplete.d.ts.map
|