@expofp/ui 3.21.0 → 3.21.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/package.json +1 -1
- package/dist/Alert/Alert.d.ts +0 -20
- package/dist/Alert/Alert.js +0 -23
- package/dist/Alert/index.d.ts +0 -3
- package/dist/Alert/index.js +0 -1
- package/dist/Autocomplete/Autocomplete.d.ts +0 -21
- package/dist/Autocomplete/Autocomplete.js +0 -183
- package/dist/Autocomplete/index.d.ts +0 -3
- package/dist/Autocomplete/index.js +0 -1
- package/dist/Badge/Badge.d.ts +0 -14
- package/dist/Badge/Badge.js +0 -15
- package/dist/Badge/index.d.ts +0 -3
- package/dist/Badge/index.js +0 -1
- package/dist/Button/Button.d.ts +0 -30
- package/dist/Button/Button.js +0 -41
- package/dist/Button/index.d.ts +0 -3
- package/dist/Button/index.js +0 -1
- package/dist/Checkbox/Checkbox.d.ts +0 -19
- package/dist/Checkbox/Checkbox.js +0 -19
- package/dist/Checkbox/index.d.ts +0 -3
- package/dist/Checkbox/index.js +0 -1
- package/dist/CheckboxButton/CheckboxButton.d.ts +0 -12
- package/dist/CheckboxButton/CheckboxButton.js +0 -19
- package/dist/CheckboxButton/index.d.ts +0 -3
- package/dist/CheckboxButton/index.js +0 -1
- package/dist/DownloadList/DownloadList.d.ts +0 -15
- package/dist/DownloadList/DownloadList.js +0 -9
- package/dist/DownloadList/index.d.ts +0 -3
- package/dist/DownloadList/index.js +0 -2
- package/dist/Draggable/Draggable.d.ts +0 -9
- package/dist/Draggable/Draggable.js +0 -92
- package/dist/Draggable/index.d.ts +0 -3
- package/dist/Draggable/index.js +0 -2
- package/dist/EntityItem/EntityItem.d.ts +0 -46
- package/dist/EntityItem/EntityItem.js +0 -29
- package/dist/EntityItem/index.d.ts +0 -3
- package/dist/EntityItem/index.js +0 -1
- package/dist/EventBadge/EventBadge.d.ts +0 -13
- package/dist/EventBadge/EventBadge.js +0 -10
- package/dist/EventBadge/index.d.ts +0 -3
- package/dist/EventBadge/index.js +0 -1
- package/dist/HeatmapLegend/HeatmapLegend.d.ts +0 -15
- package/dist/HeatmapLegend/HeatmapLegend.js +0 -11
- package/dist/HeatmapLegend/index.d.ts +0 -3
- package/dist/HeatmapLegend/index.js +0 -2
- package/dist/HighlightText/HighlightText.d.ts +0 -7
- package/dist/HighlightText/HighlightText.js +0 -14
- package/dist/HighlightText/index.d.ts +0 -2
- package/dist/HighlightText/index.js +0 -1
- package/dist/LevelBadge/LevelBadge.d.ts +0 -9
- package/dist/LevelBadge/LevelBadge.js +0 -10
- package/dist/LevelBadge/index.d.ts +0 -3
- package/dist/LevelBadge/index.js +0 -2
- package/dist/LevelSelector/LevelSelector.d.ts +0 -19
- package/dist/LevelSelector/LevelSelector.js +0 -91
- package/dist/LevelSelector/index.d.ts +0 -3
- package/dist/LevelSelector/index.js +0 -2
- package/dist/MapControls/MapControls.d.ts +0 -33
- package/dist/MapControls/MapControls.js +0 -38
- package/dist/MapControls/index.d.ts +0 -3
- package/dist/MapControls/index.js +0 -2
- package/dist/MobileToggleButton/MobileToggleButton.d.ts +0 -12
- package/dist/MobileToggleButton/MobileToggleButton.js +0 -8
- package/dist/MobileToggleButton/index.d.ts +0 -3
- package/dist/MobileToggleButton/index.js +0 -1
- package/dist/Modal/Modal.d.ts +0 -34
- package/dist/Modal/Modal.js +0 -98
- package/dist/Modal/index.d.ts +0 -3
- package/dist/Modal/index.js +0 -1
- package/dist/MultiSelectGroups/MultiSelectGroups.d.ts +0 -37
- package/dist/MultiSelectGroups/MultiSelectGroups.js +0 -80
- package/dist/MultiSelectGroups/index.d.ts +0 -3
- package/dist/MultiSelectGroups/index.js +0 -1
- package/dist/OverlayGrip/OverlayGrip.d.ts +0 -11
- package/dist/OverlayGrip/OverlayGrip.js +0 -8
- package/dist/OverlayGrip/index.d.ts +0 -3
- package/dist/OverlayGrip/index.js +0 -2
- package/dist/PermissionNotice/PermissionNotice.d.ts +0 -16
- package/dist/PermissionNotice/PermissionNotice.js +0 -11
- package/dist/PermissionNotice/index.d.ts +0 -3
- package/dist/PermissionNotice/index.js +0 -2
- package/dist/Radio/Radio.d.ts +0 -15
- package/dist/Radio/Radio.js +0 -13
- package/dist/Radio/index.d.ts +0 -3
- package/dist/Radio/index.js +0 -1
- package/dist/RebookingNotes/RebookingNotes.d.ts +0 -11
- package/dist/RebookingNotes/RebookingNotes.js +0 -18
- package/dist/RebookingNotes/index.d.ts +0 -3
- package/dist/RebookingNotes/index.js +0 -1
- package/dist/RebookingRadioGroup/RebookingRadioGroup.d.ts +0 -17
- package/dist/RebookingRadioGroup/RebookingRadioGroup.js +0 -13
- package/dist/RebookingRadioGroup/index.d.ts +0 -3
- package/dist/RebookingRadioGroup/index.js +0 -1
- package/dist/ScrollableRow/ScrollableRow.d.ts +0 -21
- package/dist/ScrollableRow/ScrollableRow.js +0 -155
- package/dist/ScrollableRow/index.d.ts +0 -3
- package/dist/ScrollableRow/index.js +0 -2
- package/dist/Share/Share.d.ts +0 -22
- package/dist/Share/Share.js +0 -24
- package/dist/Share/index.d.ts +0 -3
- package/dist/Share/index.js +0 -1
- package/dist/ShowMoreButton/ShowMoreButton.d.ts +0 -11
- package/dist/ShowMoreButton/ShowMoreButton.js +0 -7
- package/dist/ShowMoreButton/index.d.ts +0 -3
- package/dist/ShowMoreButton/index.js +0 -1
- package/dist/SidebarActions/SidebarActions.d.ts +0 -26
- package/dist/SidebarActions/SidebarActions.js +0 -32
- package/dist/SidebarActions/index.d.ts +0 -3
- package/dist/SidebarActions/index.js +0 -2
- package/dist/SimpleRow/SimpleRow.d.ts +0 -15
- package/dist/SimpleRow/SimpleRow.js +0 -11
- package/dist/SimpleRow/index.d.ts +0 -3
- package/dist/SimpleRow/index.js +0 -2
- package/dist/Spinner/Spinner.d.ts +0 -9
- package/dist/Spinner/Spinner.js +0 -8
- package/dist/Spinner/index.d.ts +0 -3
- package/dist/Spinner/index.js +0 -1
- package/dist/ToggleButton/ToggleButton.d.ts +0 -17
- package/dist/ToggleButton/ToggleButton.js +0 -8
- package/dist/ToggleButton/index.d.ts +0 -3
- package/dist/ToggleButton/index.js +0 -1
- package/dist/ToggleSwitch/ToggleSwitch.d.ts +0 -12
- package/dist/ToggleSwitch/ToggleSwitch.js +0 -10
- package/dist/ToggleSwitch/index.d.ts +0 -3
- package/dist/ToggleSwitch/index.js +0 -1
- package/dist/TouchHand/TouchHand.d.ts +0 -5
- package/dist/TouchHand/TouchHand.js +0 -7
- package/dist/TouchHand/index.d.ts +0 -2
- package/dist/TouchHand/index.js +0 -1
- package/dist/WayfindingFloorSelector/WayfindingFloorSelector.d.ts +0 -24
- package/dist/WayfindingFloorSelector/WayfindingFloorSelector.js +0 -27
- package/dist/WayfindingFloorSelector/index.d.ts +0 -3
- package/dist/WayfindingFloorSelector/index.js +0 -1
- package/dist/components/Gallery/Gallery.d.ts +0 -25
- package/dist/components/Gallery/Gallery.js +0 -25
- package/dist/components/Gallery/GalleryBadges/GalleryBadges.d.ts +0 -8
- package/dist/components/Gallery/GalleryBadges/GalleryBadges.js +0 -5
- package/dist/components/Gallery/GalleryControls/GalleryControls.d.ts +0 -11
- package/dist/components/Gallery/GalleryControls/GalleryControls.js +0 -5
- package/dist/components/Gallery/GalleryImg/GalleryImg.d.ts +0 -13
- package/dist/components/Gallery/GalleryImg/GalleryImg.js +0 -37
- package/dist/components/Gallery/GalleryItem/GalleryItem.d.ts +0 -14
- package/dist/components/Gallery/GalleryItem/GalleryItem.js +0 -6
- package/dist/components/Gallery/GalleryModal/GalleryModal.d.ts +0 -18
- package/dist/components/Gallery/GalleryModal/GalleryModal.js +0 -88
- package/dist/components/Gallery/GalleryPreLoader.d.ts +0 -7
- package/dist/components/Gallery/GalleryPreLoader.js +0 -29
- package/dist/components/Gallery/TransformImg/TransformImg.d.ts +0 -10
- package/dist/components/Gallery/TransformImg/TransformImg.js +0 -15
- package/dist/components/Gallery/index.d.ts +0 -3
- package/dist/components/Gallery/index.js +0 -1
- package/dist/components/Overlay/Overlay.d.ts +0 -29
- package/dist/components/Overlay/Overlay.js +0 -251
- package/dist/components/Overlay/OverlayScrollContext.d.ts +0 -7
- package/dist/components/Overlay/OverlayScrollContext.js +0 -7
- package/dist/components/Overlay/index.d.ts +0 -4
- package/dist/components/Overlay/index.js +0 -2
- package/dist/shared/debounce.d.ts +0 -2
- package/dist/shared/debounce.js +0 -9
- package/dist/shared/hooks/useDragGesture.d.ts +0 -19
- package/dist/shared/hooks/useDragGesture.js +0 -45
- package/dist/shared/hooks/useWindowSize.d.ts +0 -5
- package/dist/shared/hooks/useWindowSize.js +0 -40
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import './MultiSelectGroups.scss';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface MultiSelectGroupItem {
|
|
4
|
-
id: number | string;
|
|
5
|
-
name: string;
|
|
6
|
-
count?: number;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
countProvider?: () => number;
|
|
9
|
-
}
|
|
10
|
-
export interface MultiSelectGroup {
|
|
11
|
-
groupName: string;
|
|
12
|
-
items: MultiSelectGroupItem[];
|
|
13
|
-
showGroupActions?: boolean;
|
|
14
|
-
customGroupClass?: string;
|
|
15
|
-
fullWidth?: boolean;
|
|
16
|
-
id?: string | number;
|
|
17
|
-
}
|
|
18
|
-
export type MultiSelectVariant = 'default' | 'categories';
|
|
19
|
-
export interface MultiSelectGroupsProps {
|
|
20
|
-
groups: MultiSelectGroup[];
|
|
21
|
-
selectedIds: (number | string)[];
|
|
22
|
-
showItemCounts?: boolean;
|
|
23
|
-
showGroupActions?: boolean;
|
|
24
|
-
variant?: MultiSelectVariant;
|
|
25
|
-
maxItemsVisible?: number;
|
|
26
|
-
selectAllLabel: string;
|
|
27
|
-
clearAllLabel: string;
|
|
28
|
-
selectedLabel: string;
|
|
29
|
-
showMoreLabel: string;
|
|
30
|
-
showLessLabel: string;
|
|
31
|
-
onChange: (selectedIds: (number | string)[]) => void;
|
|
32
|
-
itemCountProvider?: (item: MultiSelectGroupItem) => number;
|
|
33
|
-
customItemRenderer?: (item: MultiSelectGroupItem, isSelected: boolean) => React.ReactNode;
|
|
34
|
-
}
|
|
35
|
-
declare function MultiSelectGroups({ groups, selectedIds, showItemCounts, showGroupActions, variant, maxItemsVisible, selectAllLabel, clearAllLabel, selectedLabel, showMoreLabel, showLessLabel, itemCountProvider, customItemRenderer, onChange, }: MultiSelectGroupsProps): React.JSX.Element | null;
|
|
36
|
-
export default MultiSelectGroups;
|
|
37
|
-
//# sourceMappingURL=MultiSelectGroups.d.ts.map
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import './MultiSelectGroups.scss';
|
|
3
|
-
import cn from 'classnames';
|
|
4
|
-
import React, { useCallback, useMemo, useState } from 'react';
|
|
5
|
-
import ShowMoreButton from '../ShowMoreButton';
|
|
6
|
-
const GroupItem = React.memo(({ item, isSelected, variant, showCount, count, onClick, customRenderer }) => {
|
|
7
|
-
if (customRenderer) {
|
|
8
|
-
return _jsx(_Fragment, { children: customRenderer(item, isSelected) });
|
|
9
|
-
}
|
|
10
|
-
return (_jsxs("button", { type: "button", className: cn('efp-multi-select-groups__item', {
|
|
11
|
-
'efp-multi-select-groups__item--selected': isSelected,
|
|
12
|
-
'efp-multi-select-groups__item--disabled': item.disabled,
|
|
13
|
-
[`efp-multi-select-groups__item--${variant}`]: variant,
|
|
14
|
-
}), onClick: () => !item.disabled && onClick(item.id), disabled: item.disabled, "aria-pressed": isSelected, children: [_jsx("div", { className: "efp-multi-select-groups__item-name", children: item.name }), showCount && count > 0 && (_jsx("span", { className: "efp-multi-select-groups__item-count", children: count }))] }));
|
|
15
|
-
});
|
|
16
|
-
function MultiSelectGroups({ groups = [], selectedIds = [], showItemCounts = true, showGroupActions = true, variant = 'default', maxItemsVisible = 20, selectAllLabel, clearAllLabel, selectedLabel, showMoreLabel, showLessLabel, itemCountProvider, customItemRenderer, onChange, }) {
|
|
17
|
-
const [expandedGroups, setExpandedGroups] = useState(() => new Set());
|
|
18
|
-
const handleItemToggle = useCallback((id) => {
|
|
19
|
-
const newSelected = selectedIds.includes(id)
|
|
20
|
-
? selectedIds.filter((i) => i !== id)
|
|
21
|
-
: [...selectedIds, id];
|
|
22
|
-
onChange(newSelected);
|
|
23
|
-
}, [selectedIds, onChange]);
|
|
24
|
-
const selectAllInGroup = useCallback((group) => {
|
|
25
|
-
const groupItemIds = group.items
|
|
26
|
-
.filter((item) => item.id && !item.disabled)
|
|
27
|
-
.map((item) => item.id);
|
|
28
|
-
const uniqueNewIds = groupItemIds.filter((id) => !selectedIds.includes(id));
|
|
29
|
-
if (uniqueNewIds.length === 0)
|
|
30
|
-
return;
|
|
31
|
-
onChange([...selectedIds, ...uniqueNewIds]);
|
|
32
|
-
}, [selectedIds, onChange]);
|
|
33
|
-
const clearAllInGroup = useCallback((group) => {
|
|
34
|
-
const groupItemIds = new Set(group.items.map((item) => item.id));
|
|
35
|
-
const newSelected = selectedIds.filter((id) => !groupItemIds.has(id));
|
|
36
|
-
onChange(newSelected);
|
|
37
|
-
}, [selectedIds, onChange]);
|
|
38
|
-
const toggleGroupExpansion = useCallback((groupName) => {
|
|
39
|
-
setExpandedGroups((prev) => {
|
|
40
|
-
const newSet = new Set(prev);
|
|
41
|
-
if (newSet.has(groupName))
|
|
42
|
-
newSet.delete(groupName);
|
|
43
|
-
else
|
|
44
|
-
newSet.add(groupName);
|
|
45
|
-
return newSet;
|
|
46
|
-
});
|
|
47
|
-
}, []);
|
|
48
|
-
const getItemCount = (item) => {
|
|
49
|
-
if (item.count !== undefined)
|
|
50
|
-
return item.count;
|
|
51
|
-
if (item.countProvider)
|
|
52
|
-
return item.countProvider();
|
|
53
|
-
if (itemCountProvider)
|
|
54
|
-
return itemCountProvider(item);
|
|
55
|
-
return 0;
|
|
56
|
-
};
|
|
57
|
-
const selectedSet = useMemo(() => new Set(selectedIds), [selectedIds]);
|
|
58
|
-
if (!Array.isArray(groups) || !groups.length) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
return (_jsx("div", { className: "efp-multi-select-groups", children: _jsx("div", { className: "efp-multi-select-groups__list", children: groups.map((group) => {
|
|
62
|
-
if (!group?.groupName || !Array.isArray(group.items))
|
|
63
|
-
return null;
|
|
64
|
-
const validItems = group.items.filter((i) => i.id);
|
|
65
|
-
const selectedItemsInGroup = validItems.filter((item) => selectedSet.has(item.id));
|
|
66
|
-
const isFull = selectedItemsInGroup.length === validItems.length && validItems.length > 0;
|
|
67
|
-
const isPartial = selectedItemsInGroup.length > 0 && !isFull;
|
|
68
|
-
const isExpanded = expandedGroups.has(group.groupName);
|
|
69
|
-
const visibleItems = isExpanded || validItems.length <= maxItemsVisible
|
|
70
|
-
? validItems
|
|
71
|
-
: validItems.slice(0, maxItemsVisible);
|
|
72
|
-
const hiddenCount = validItems.length - visibleItems.length;
|
|
73
|
-
const hiddenSelectedCount = hiddenCount > 0
|
|
74
|
-
? validItems.slice(maxItemsVisible).filter((item) => selectedSet.has(item.id)).length
|
|
75
|
-
: 0;
|
|
76
|
-
return (_jsxs("div", { className: cn('efp-multi-select-groups__group', { 'efp-multi-select-groups__group--full-width': group.fullWidth }, group.customGroupClass), children: [_jsxs("div", { className: "efp-multi-select-groups__group-header", children: [_jsx("div", { className: "efp-multi-select-groups__group-title", children: group.groupName }), showGroupActions && group.showGroupActions !== false && (_jsxs("div", { className: "efp-multi-select-groups__group-actions", children: [!isFull && (_jsx("button", { type: "button", className: "efp-multi-select-groups__action-btn", onClick: () => selectAllInGroup(group), children: selectAllLabel })), (isPartial || isFull) && (_jsx("button", { type: "button", className: "efp-multi-select-groups__action-btn", onClick: () => clearAllInGroup(group), children: clearAllLabel }))] }))] }), _jsx("div", { className: "efp-multi-select-groups__group-items", children: visibleItems.map((item) => (_jsx(GroupItem, { item: item, isSelected: selectedSet.has(item.id), variant: variant, showCount: showItemCounts, count: getItemCount(item), onClick: handleItemToggle, customRenderer: customItemRenderer }, item.id))) }), validItems.length > maxItemsVisible && (_jsx(ShowMoreButton, { className: "efp-multi-select-groups__show-more", expanded: isExpanded, showMoreLabel: showMoreLabel, showLessLabel: showLessLabel, onClick: () => toggleGroupExpansion(group.groupName), suffix: !isExpanded &&
|
|
77
|
-
hiddenSelectedCount > 0 && (_jsxs("span", { className: "efp-multi-select-groups__show-more-badge", children: [hiddenSelectedCount, " ", selectedLabel] })) }))] }, group.groupName));
|
|
78
|
-
}) }) }));
|
|
79
|
-
}
|
|
80
|
-
export default MultiSelectGroups;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './MultiSelectGroups';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import './OverlayGrip.scss';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface OverlayGripProps {
|
|
4
|
-
isFull: boolean;
|
|
5
|
-
onToggle: () => void;
|
|
6
|
-
ariaLabel: string;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const OverlayGrip: ({ isFull, onToggle, ariaLabel, className }: OverlayGripProps) => React.JSX.Element;
|
|
10
|
-
export default OverlayGrip;
|
|
11
|
-
//# sourceMappingURL=OverlayGrip.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import './OverlayGrip.scss';
|
|
4
|
-
import cn from 'classnames';
|
|
5
|
-
const OverlayGrip = ({ isFull, onToggle, ariaLabel, className }) => {
|
|
6
|
-
return (_jsx("button", { type: "button", className: cn('efp-overlay-grip', { 'efp-overlay-grip--full': isFull }, className), onClick: onToggle, "aria-label": ariaLabel, "aria-expanded": isFull, children: _jsxs("svg", { viewBox: "0 0 1200 200", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [_jsx("path", { d: "M100,100 l 500 100 L 1100 100" }), _jsx("path", { d: "M100,150 l 500 0 L 1100 150" })] }) }));
|
|
7
|
-
};
|
|
8
|
-
export default OverlayGrip;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import './PermissionNotice.scss';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export type PermissionNoticePlacement = 'bottom-right' | 'bottom-left';
|
|
4
|
-
export interface PermissionNoticeProps {
|
|
5
|
-
title: string;
|
|
6
|
-
acceptText: string;
|
|
7
|
-
rejectText: string;
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
placement?: PermissionNoticePlacement;
|
|
10
|
-
onAccept?: () => void;
|
|
11
|
-
onReject?: () => void;
|
|
12
|
-
className?: string;
|
|
13
|
-
}
|
|
14
|
-
declare const PermissionNotice: ({ title, acceptText, rejectText, children, placement, onAccept, onReject, className, }: PermissionNoticeProps) => React.JSX.Element;
|
|
15
|
-
export default PermissionNotice;
|
|
16
|
-
//# sourceMappingURL=PermissionNotice.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import './PermissionNotice.scss';
|
|
3
|
-
import cn from 'classnames';
|
|
4
|
-
import { useId } from 'react';
|
|
5
|
-
import Button from '../Button';
|
|
6
|
-
const PermissionNotice = ({ title, acceptText, rejectText, children, placement = 'bottom-right', onAccept, onReject, className, }) => {
|
|
7
|
-
const titleId = useId();
|
|
8
|
-
const descId = useId();
|
|
9
|
-
return (_jsxs("div", { className: cn('efp-permission-notice', `efp-permission-notice--${placement}`, className), role: "dialog", "aria-labelledby": titleId, "aria-describedby": descId, children: [_jsx("div", { className: "efp-permission-notice__title", id: titleId, children: title }), _jsx("div", { className: "efp-permission-notice__text", id: descId, children: children }), _jsxs("div", { className: "efp-permission-notice__bottom", children: [_jsx(Button, { size: "md", onClick: onAccept, children: acceptText }), _jsx(Button, { size: "md", variant: "gray", onClick: onReject, children: rejectText })] })] }));
|
|
10
|
-
};
|
|
11
|
-
export default PermissionNotice;
|
package/dist/Radio/Radio.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import './Radio.scss';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface RadioProps {
|
|
4
|
-
name: string;
|
|
5
|
-
label: string;
|
|
6
|
-
value: string | number;
|
|
7
|
-
checked?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
ariaLabel?: string;
|
|
11
|
-
onChange?: () => void;
|
|
12
|
-
}
|
|
13
|
-
declare const Radio: ({ name, label, value, checked, disabled, className, ariaLabel, onChange, }: RadioProps) => React.JSX.Element;
|
|
14
|
-
export default Radio;
|
|
15
|
-
//# sourceMappingURL=Radio.d.ts.map
|
package/dist/Radio/Radio.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import './Radio.scss';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import { useId } from 'react';
|
|
6
|
-
const Radio = ({ name, label, value, checked, disabled, className, ariaLabel, onChange, }) => {
|
|
7
|
-
const id = useId();
|
|
8
|
-
return (_jsxs("label", { htmlFor: id, className: classNames('efp-radio', className, {
|
|
9
|
-
'efp-radio--checked': checked,
|
|
10
|
-
'efp-radio--disabled': disabled,
|
|
11
|
-
}), children: [_jsx("input", { type: "radio", className: "efp-radio__input", id: id, name: name, value: value, checked: checked, disabled: disabled, "aria-label": ariaLabel, onChange: onChange }), _jsx("span", { className: "efp-radio__control", "aria-hidden": "true" }), _jsx("span", { className: "efp-radio__label", children: label })] }));
|
|
12
|
-
};
|
|
13
|
-
export default Radio;
|
package/dist/Radio/index.d.ts
DELETED
package/dist/Radio/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Radio';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import './RebookingNotes.scss';
|
|
2
|
-
export interface RebookingNotesProps {
|
|
3
|
-
value?: string;
|
|
4
|
-
noteLabel: string;
|
|
5
|
-
saveButtonLabel: string;
|
|
6
|
-
saveButtonAriaLabel: string;
|
|
7
|
-
onSave: (value: string) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const RebookingNotes: ({ value, noteLabel, saveButtonLabel, saveButtonAriaLabel, onSave, }: RebookingNotesProps) => import("react").JSX.Element;
|
|
10
|
-
export default RebookingNotes;
|
|
11
|
-
//# sourceMappingURL=RebookingNotes.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import './RebookingNotes.scss';
|
|
3
|
-
import { useId, useState } from 'react';
|
|
4
|
-
import Button from '../Button';
|
|
5
|
-
const RebookingNotes = ({ value, noteLabel, saveButtonLabel, saveButtonAriaLabel, onSave, }) => {
|
|
6
|
-
const id = useId();
|
|
7
|
-
const labelId = `${id}-label`;
|
|
8
|
-
const textareaId = `${id}-textarea`;
|
|
9
|
-
// Uncontrolled editing buffer seeded from `value`; consumers reset it by remounting via `key`
|
|
10
|
-
// (see RebookingNotesContainer usage). Committed to the parent only on save.
|
|
11
|
-
const [internalValue, setInternalValue] = useState(value ?? '');
|
|
12
|
-
const handleChange = (event) => setInternalValue(event.target.value);
|
|
13
|
-
const handleSave = () => {
|
|
14
|
-
onSave(internalValue);
|
|
15
|
-
};
|
|
16
|
-
return (_jsxs("div", { className: "rebooking-notes", children: [_jsx("div", { className: "rebooking-notes__view-header", children: _jsx("strong", { id: labelId, children: noteLabel }) }), _jsxs("div", { className: "rebooking-notes__edit", children: [_jsx("div", { className: "rebooking-notes__val", children: _jsx("textarea", { id: textareaId, value: internalValue, onChange: handleChange, "aria-labelledby": labelId }) }), _jsx("div", { className: "rebooking-notes__buttons", children: _jsx(Button, { inline: true, onClick: handleSave, disabled: (value ?? '') === internalValue, "aria-label": saveButtonAriaLabel, children: saveButtonLabel }) })] })] }));
|
|
17
|
-
};
|
|
18
|
-
export default RebookingNotes;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './RebookingNotes';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import './RebookingRadioGroup.scss';
|
|
2
|
-
export interface RebookingOption {
|
|
3
|
-
value: string;
|
|
4
|
-
label: string;
|
|
5
|
-
iconName?: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
color: string;
|
|
8
|
-
}
|
|
9
|
-
export interface RebookingRadioGroupProps {
|
|
10
|
-
options: RebookingOption[];
|
|
11
|
-
value: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
onChange: (value: string) => void;
|
|
14
|
-
}
|
|
15
|
-
declare const RebookingRadioGroup: ({ options, value, title, onChange }: RebookingRadioGroupProps) => import("react").JSX.Element;
|
|
16
|
-
export default RebookingRadioGroup;
|
|
17
|
-
//# sourceMappingURL=RebookingRadioGroup.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import './RebookingRadioGroup.scss';
|
|
3
|
-
import { useId } from 'react';
|
|
4
|
-
const RebookingRadioGroup = ({ options, value, title, onChange }) => {
|
|
5
|
-
const idPrefix = useId();
|
|
6
|
-
return (_jsxs("div", { className: "rebooking-radio-group", children: [title && _jsx("div", { className: "rebooking-radio-group__title", children: title }), _jsx("div", { className: "rebooking-radio-group__options", children: options.map((option) => {
|
|
7
|
-
const optionId = `${idPrefix}-${option.value}`;
|
|
8
|
-
return (_jsxs("div", { className: "rebooking-radio", style: {
|
|
9
|
-
'--rebooking-color-primary': option.color,
|
|
10
|
-
}, children: [_jsx("input", { type: "radio", name: idPrefix, value: option.value, id: optionId, checked: option.value === value, disabled: option.disabled, onChange: () => onChange(option.value) }), _jsxs("label", { htmlFor: optionId, children: [_jsx("div", { className: "rebooking-radio__label", children: option.label }), _jsx("div", { className: "rebooking-radio__icon", children: _jsx("i", { className: option.iconName, "aria-hidden": "true" }) })] })] }, option.value));
|
|
11
|
-
}) })] }));
|
|
12
|
-
};
|
|
13
|
-
export default RebookingRadioGroup;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './RebookingRadioGroup';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import './ScrollableRow.scss';
|
|
2
|
-
import React, { ReactNode } from 'react';
|
|
3
|
-
export interface ScrollableRowProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
ariaLabel: string;
|
|
6
|
-
leftAriaLabel: string;
|
|
7
|
-
rightAriaLabel: string;
|
|
8
|
-
className?: string;
|
|
9
|
-
scrollAmount?: number;
|
|
10
|
-
mobileBreakpoint?: number;
|
|
11
|
-
showArrowsOnMobile?: boolean;
|
|
12
|
-
arrowPosition?: 'inside' | 'outside';
|
|
13
|
-
scrollBehavior?: 'smooth' | 'auto';
|
|
14
|
-
isRtl?: boolean;
|
|
15
|
-
enableDragScroll?: boolean;
|
|
16
|
-
dragScrollSensitivity?: number;
|
|
17
|
-
onScroll?: (scrollLeft: number) => void;
|
|
18
|
-
}
|
|
19
|
-
declare const ScrollableRow: ({ children, ariaLabel, leftAriaLabel, rightAriaLabel, className, scrollAmount, mobileBreakpoint, showArrowsOnMobile, arrowPosition, scrollBehavior, isRtl, enableDragScroll, dragScrollSensitivity, onScroll, }: ScrollableRowProps) => React.JSX.Element;
|
|
20
|
-
export default ScrollableRow;
|
|
21
|
-
//# sourceMappingURL=ScrollableRow.d.ts.map
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable @typescript-eslint/consistent-type-imports, @eslint-react/set-state-in-effect */
|
|
3
|
-
import './ScrollableRow.scss';
|
|
4
|
-
import cn from 'classnames';
|
|
5
|
-
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
|
-
import { ResizeObserver } from 'resize-observer';
|
|
7
|
-
import { isInteractiveTarget } from '../shared/interactive';
|
|
8
|
-
const SCROLL_THRESHOLD = 5;
|
|
9
|
-
const DEFAULT_MOBILE_BREAKPOINT = 768;
|
|
10
|
-
const ScrollableRow = ({ children, ariaLabel, leftAriaLabel, rightAriaLabel, className, scrollAmount = 150, mobileBreakpoint = DEFAULT_MOBILE_BREAKPOINT, showArrowsOnMobile = false, arrowPosition = 'inside', scrollBehavior = 'smooth', isRtl = false, enableDragScroll = true, dragScrollSensitivity = 1, onScroll, }) => {
|
|
11
|
-
const containerRef = useRef(null);
|
|
12
|
-
const scrollRef = useRef(null);
|
|
13
|
-
const resizeObserverRef = useRef(null);
|
|
14
|
-
const [showLeftArrow, setShowLeftArrow] = useState(false);
|
|
15
|
-
const [showRightArrow, setShowRightArrow] = useState(false);
|
|
16
|
-
const [isDragging, setIsDragging] = useState(false);
|
|
17
|
-
const [startX, setStartX] = useState(0);
|
|
18
|
-
const [dragStartScrollLeft, setDragStartScrollLeft] = useState(0);
|
|
19
|
-
const isDesktop = useCallback(() => {
|
|
20
|
-
return (window.innerWidth > mobileBreakpoint &&
|
|
21
|
-
!('ontouchstart' in window || navigator.maxTouchPoints > 0));
|
|
22
|
-
}, [mobileBreakpoint]);
|
|
23
|
-
const normalizeRTLScroll = useCallback((scrollLeft, scrollWidth, clientWidth) => {
|
|
24
|
-
const maxScroll = scrollWidth - clientWidth;
|
|
25
|
-
if (scrollLeft < 0) {
|
|
26
|
-
return Math.abs(scrollLeft);
|
|
27
|
-
}
|
|
28
|
-
else if (scrollLeft > maxScroll / 2) {
|
|
29
|
-
return maxScroll - scrollLeft;
|
|
30
|
-
}
|
|
31
|
-
return scrollLeft;
|
|
32
|
-
}, []);
|
|
33
|
-
const checkArrows = useCallback(() => {
|
|
34
|
-
const scrollEl = scrollRef.current;
|
|
35
|
-
if (!scrollEl)
|
|
36
|
-
return;
|
|
37
|
-
const isMobile = window.innerWidth <= mobileBreakpoint;
|
|
38
|
-
if (isMobile && !showArrowsOnMobile) {
|
|
39
|
-
setShowLeftArrow(false);
|
|
40
|
-
setShowRightArrow(false);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const { scrollLeft, scrollWidth, clientWidth } = scrollEl;
|
|
44
|
-
const hasOverflow = scrollWidth > clientWidth;
|
|
45
|
-
if (!hasOverflow) {
|
|
46
|
-
setShowLeftArrow(false);
|
|
47
|
-
setShowRightArrow(false);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
if (isRtl) {
|
|
51
|
-
const maxScroll = scrollWidth - clientWidth;
|
|
52
|
-
const normalizedScroll = normalizeRTLScroll(scrollLeft, scrollWidth, clientWidth);
|
|
53
|
-
setShowLeftArrow(normalizedScroll > SCROLL_THRESHOLD);
|
|
54
|
-
setShowRightArrow(normalizedScroll < maxScroll - SCROLL_THRESHOLD);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
setShowLeftArrow(scrollLeft > SCROLL_THRESHOLD);
|
|
58
|
-
setShowRightArrow(scrollLeft < scrollWidth - clientWidth - SCROLL_THRESHOLD);
|
|
59
|
-
}
|
|
60
|
-
}, [mobileBreakpoint, showArrowsOnMobile, normalizeRTLScroll, isRtl]);
|
|
61
|
-
const handleScroll = useCallback(() => {
|
|
62
|
-
checkArrows();
|
|
63
|
-
if (onScroll && scrollRef.current) {
|
|
64
|
-
onScroll(scrollRef.current.scrollLeft);
|
|
65
|
-
}
|
|
66
|
-
}, [checkArrows, onScroll]);
|
|
67
|
-
const scroll = useCallback((direction) => {
|
|
68
|
-
const scrollEl = scrollRef.current;
|
|
69
|
-
if (!scrollEl)
|
|
70
|
-
return;
|
|
71
|
-
const currentScroll = scrollEl.scrollLeft;
|
|
72
|
-
let newScroll;
|
|
73
|
-
if (isRtl) {
|
|
74
|
-
const maxScrollLeft = -(scrollEl.scrollWidth - scrollEl.clientWidth);
|
|
75
|
-
newScroll =
|
|
76
|
-
direction === 'left'
|
|
77
|
-
? Math.min(0, currentScroll + scrollAmount)
|
|
78
|
-
: Math.max(maxScrollLeft, currentScroll - scrollAmount);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
newScroll =
|
|
82
|
-
direction === 'left'
|
|
83
|
-
? Math.max(0, currentScroll - scrollAmount)
|
|
84
|
-
: currentScroll + scrollAmount;
|
|
85
|
-
}
|
|
86
|
-
scrollEl.scrollTo({
|
|
87
|
-
left: newScroll,
|
|
88
|
-
behavior: scrollBehavior,
|
|
89
|
-
});
|
|
90
|
-
}, [scrollAmount, scrollBehavior, isRtl]);
|
|
91
|
-
const handleMouseDown = useCallback((e) => {
|
|
92
|
-
if (!enableDragScroll || !isDesktop() || !scrollRef.current)
|
|
93
|
-
return;
|
|
94
|
-
if (isInteractiveTarget(e.target))
|
|
95
|
-
return;
|
|
96
|
-
setIsDragging(true);
|
|
97
|
-
setStartX(e.pageX - scrollRef.current.offsetLeft);
|
|
98
|
-
setDragStartScrollLeft(scrollRef.current.scrollLeft);
|
|
99
|
-
e.preventDefault();
|
|
100
|
-
}, [enableDragScroll, isDesktop]);
|
|
101
|
-
const handleMouseMove = useCallback((e) => {
|
|
102
|
-
if (!isDragging || !scrollRef.current)
|
|
103
|
-
return;
|
|
104
|
-
e.preventDefault();
|
|
105
|
-
const x = e.pageX - scrollRef.current.offsetLeft;
|
|
106
|
-
const walk = (x - startX) * dragScrollSensitivity;
|
|
107
|
-
scrollRef.current.scrollLeft = dragStartScrollLeft - walk;
|
|
108
|
-
}, [isDragging, startX, dragStartScrollLeft, dragScrollSensitivity]);
|
|
109
|
-
const endDrag = useCallback(() => {
|
|
110
|
-
setIsDragging(false);
|
|
111
|
-
}, []);
|
|
112
|
-
useEffect(() => {
|
|
113
|
-
if (!isDragging)
|
|
114
|
-
return;
|
|
115
|
-
document.addEventListener('mousemove', handleMouseMove);
|
|
116
|
-
document.addEventListener('mouseup', endDrag);
|
|
117
|
-
document.addEventListener('mouseleave', endDrag);
|
|
118
|
-
return () => {
|
|
119
|
-
document.removeEventListener('mousemove', handleMouseMove);
|
|
120
|
-
document.removeEventListener('mouseup', endDrag);
|
|
121
|
-
document.removeEventListener('mouseleave', endDrag);
|
|
122
|
-
};
|
|
123
|
-
}, [isDragging, handleMouseMove, endDrag]);
|
|
124
|
-
useEffect(() => {
|
|
125
|
-
checkArrows();
|
|
126
|
-
const handleResize = () => checkArrows();
|
|
127
|
-
window.addEventListener('resize', handleResize);
|
|
128
|
-
if (containerRef.current && !resizeObserverRef.current) {
|
|
129
|
-
resizeObserverRef.current = new ResizeObserver(checkArrows);
|
|
130
|
-
resizeObserverRef.current.observe(containerRef.current);
|
|
131
|
-
}
|
|
132
|
-
return () => {
|
|
133
|
-
window.removeEventListener('resize', handleResize);
|
|
134
|
-
if (resizeObserverRef.current) {
|
|
135
|
-
resizeObserverRef.current.disconnect();
|
|
136
|
-
resizeObserverRef.current = null;
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
}, [checkArrows]);
|
|
140
|
-
const showDragCursor = enableDragScroll && isDesktop();
|
|
141
|
-
const cursorStyle = showDragCursor ? (isDragging ? 'grabbing' : 'grab') : undefined;
|
|
142
|
-
return (_jsx("div", { ref: containerRef, className: cn('efp-scrollable-row', className), role: "group", "aria-label": ariaLabel, children: _jsxs("div", { className: cn('efp-scrollable-row__container', {
|
|
143
|
-
[`efp-scrollable-row__container--${arrowPosition}`]: arrowPosition,
|
|
144
|
-
}), children: [showLeftArrow && (_jsx("button", { type: "button", className: cn('efp-scrollable-row__arrow', 'efp-scrollable-row__arrow--left', {
|
|
145
|
-
'efp-scrollable-row__arrow--rtl': isRtl,
|
|
146
|
-
}), onClick: () => scroll('left'), "aria-label": leftAriaLabel, children: _jsx("i", { className: "icon-chevron-left" }) })), _jsx("div", { ref: scrollRef, className: cn('efp-scrollable-row__scroll-wrapper', {
|
|
147
|
-
'efp-scrollable-row__scroll-wrapper--dragging': isDragging,
|
|
148
|
-
}), onScroll: handleScroll, onMouseDown: handleMouseDown, style: {
|
|
149
|
-
cursor: cursorStyle,
|
|
150
|
-
userSelect: isDragging ? 'none' : undefined,
|
|
151
|
-
}, children: _jsx("div", { className: "efp-scrollable-row__content", children: children }) }), showRightArrow && (_jsx("button", { type: "button", className: cn('efp-scrollable-row__arrow', 'efp-scrollable-row__arrow--right', {
|
|
152
|
-
'efp-scrollable-row__arrow--rtl': isRtl,
|
|
153
|
-
}), onClick: () => scroll('right'), "aria-label": rightAriaLabel, children: _jsx("i", { className: "icon-chevron-right" }) }))] }) }));
|
|
154
|
-
};
|
|
155
|
-
export default ScrollableRow;
|
package/dist/Share/Share.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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
|
package/dist/Share/Share.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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;
|
package/dist/Share/index.d.ts
DELETED
package/dist/Share/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Share';
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './ShowMoreButton';
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|