@festo-ui/react 9.0.1-dev.815 → 9.0.1-dev.818
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/Accordion.d.ts +3 -3
- package/dist/components/accordion/Accordion.js +2 -1
- package/dist/components/accordion/accordion-header/AccordionHeader.js +1 -0
- package/dist/components/accordion/accordion-item/AccordionItem.d.ts +1 -1
- package/dist/components/accordion/accordion-item/AccordionItem.js +2 -1
- package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +1 -0
- package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +1 -0
- package/dist/components/bottom-sheet/BottomSheet.d.ts +2 -3
- package/dist/components/bottom-sheet/BottomSheet.js +7 -4
- package/dist/components/breadcrumb/Breadcrumb.d.ts +3 -4
- package/dist/components/breadcrumb/Breadcrumb.js +10 -5
- package/dist/components/button/Button.js +1 -0
- package/dist/components/card/Card.d.ts +3 -5
- package/dist/components/card/Card.js +6 -4
- package/dist/components/card/CardBody.d.ts +3 -3
- package/dist/components/card/CardBody.js +6 -4
- package/dist/components/card/CardHeader.d.ts +3 -3
- package/dist/components/card/CardHeader.js +6 -4
- package/dist/components/card/CardNotification.d.ts +2 -3
- package/dist/components/card/CardNotification.js +6 -2
- package/dist/components/chips/chip/Chip.d.ts +4 -5
- package/dist/components/chips/chip/Chip.js +11 -4
- package/dist/components/chips/chip-container/ChipContainer.d.ts +3 -3
- package/dist/components/chips/chip-container/ChipContainer.js +6 -2
- package/dist/components/loading-indicator/LoadingIndicator.d.ts +2 -2
- package/dist/components/loading-indicator/LoadingIndicator.js +1 -0
- package/dist/components/mobile-flyout/MobileFlyout.js +1 -0
- package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.d.ts +1 -0
- package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.js +3 -2
- package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +4 -3
- package/dist/components/modals/AlertModal.d.ts +1 -1
- package/dist/components/modals/AlertModal.js +5 -4
- package/dist/components/modals/ConfirmModal.d.ts +1 -1
- package/dist/components/modals/ConfirmModal.js +5 -4
- package/dist/components/modals/CustomModal.js +1 -0
- package/dist/components/modals/Modal.js +1 -0
- package/dist/components/modals/ModalBase.js +1 -0
- package/dist/components/modals/ModalFooter.d.ts +2 -2
- package/dist/components/modals/ModalFooter.js +3 -1
- package/dist/components/modals/Prompt.d.ts +2 -3
- package/dist/components/modals/Prompt.js +9 -6
- package/dist/components/modals/image-gallery/ImageGallery.css +6 -6
- package/dist/components/modals/image-gallery/ImageGallery.d.ts +1 -1
- package/dist/components/modals/image-gallery/ImageGallery.js +1 -0
- package/dist/components/modals/image-gallery/ImageGallerySwiper.js +1 -1
- package/dist/components/pagination/Pagination.d.ts +3 -4
- package/dist/components/pagination/Pagination.js +17 -13
- package/dist/components/popovers/legend/Legend.d.ts +3 -2
- package/dist/components/popovers/legend/Legend.js +5 -2
- package/dist/components/popovers/popover/Popover.css +1 -1
- package/dist/components/popovers/popover/Popover.d.ts +4 -4
- package/dist/components/popovers/popover/Popover.js +14 -5
- package/dist/components/popovers/popover-menu/PopoverMenu.d.ts +4 -2
- package/dist/components/popovers/popover-menu/PopoverMenu.js +5 -3
- package/dist/components/popovers/popover-menu/popover-menu-item/PopoverMenuItem.d.ts +3 -2
- package/dist/components/popovers/popover-menu/popover-menu-item/PopoverMenuItem.js +7 -3
- package/dist/components/popovers/tooltip/Tooltip.d.ts +3 -2
- package/dist/components/popovers/tooltip/Tooltip.js +5 -4
- package/dist/components/progress/Progress.d.ts +2 -3
- package/dist/components/progress/Progress.js +6 -2
- package/dist/components/search-input/ClearButton.d.ts +1 -2
- package/dist/components/search-input/ClearButton.js +5 -4
- package/dist/components/search-input/SearchInput.d.ts +3 -4
- package/dist/components/search-input/SearchInput.js +9 -5
- package/dist/components/snackbar/Snackbar.d.ts +4 -4
- package/dist/components/snackbar/Snackbar.js +11 -7
- package/dist/components/snackbar/SnackbarProvider.d.ts +3 -3
- package/dist/components/snackbar/SnackbarProvider.js +7 -4
- package/dist/components/stepper-horizontal/StepperHorizontal.d.ts +2 -2
- package/dist/components/stepper-horizontal/StepperHorizontal.js +3 -2
- package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.js +2 -1
- package/dist/components/stepper-vertical/StepperVertical.js +1 -0
- package/dist/components/stepper-vertical/step-vertical/StepVertical.js +1 -0
- package/dist/components/tab/Tabs.js +2 -1
- package/dist/components/tab/tab-pane/TabPane.d.ts +3 -4
- package/dist/components/tab/tab-pane/TabPane.js +6 -2
- package/dist/components/table-header-cell/TableHeaderCell.d.ts +2 -1
- package/dist/components/table-header-cell/TableHeaderCell.js +1 -0
- package/dist/forms/checkbox/Checkbox.d.ts +3 -6
- package/dist/forms/checkbox/Checkbox.js +5 -2
- package/dist/forms/combobox/ComboBox.d.ts +6 -7
- package/dist/forms/combobox/ComboBox.js +2 -3
- package/dist/forms/multi-select/{MultiSelect_module.css → MultiSelect.css} +2 -2
- package/dist/forms/multi-select/MultiSelect.d.ts +2 -2
- package/dist/forms/multi-select/MultiSelect.js +4 -3
- package/dist/forms/radio/RadioButton.d.ts +4 -4
- package/dist/forms/radio/RadioButton.js +11 -10
- package/dist/forms/radio/RadioGroup.d.ts +4 -4
- package/dist/forms/radio/RadioGroup.js +1 -0
- package/dist/forms/segment/Segment.d.ts +4 -5
- package/dist/forms/segment/Segment.js +10 -8
- package/dist/forms/segment/segment-control/SegmentControl.d.ts +4 -8
- package/dist/forms/segment/segment-control/SegmentControl.js +8 -6
- package/dist/forms/select/Select.d.ts +6 -6
- package/dist/forms/select/Select.js +1 -0
- package/dist/forms/slider/Slider.d.ts +4 -7
- package/dist/forms/slider/Slider.js +11 -6
- package/dist/forms/switch/Switch.d.ts +4 -6
- package/dist/forms/switch/Switch.js +12 -6
- package/dist/forms/text-area/TextArea.d.ts +6 -15
- package/dist/forms/text-area/TextArea.js +42 -25
- package/dist/forms/text-input/TextInput.d.ts +5 -4
- package/dist/forms/text-input/TextInput.js +7 -2
- package/dist/forms/time-picker/TimePicker.d.ts +7 -6
- package/dist/forms/time-picker/TimePicker.js +4 -2
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +1 -0
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.js +1 -0
- package/dist/utils/types.d.ts +0 -13
- package/package.json +2 -9
- package/dist/forms/multi-select/MultiSelect.module.js +0 -8
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './Accordion.scss';
|
|
2
|
-
import
|
|
3
|
-
export interface AccordionProps extends ComponentPropsWithoutRef<'div'> {
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
export interface AccordionProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
4
4
|
showMore?: string;
|
|
5
5
|
showLess?: string;
|
|
6
6
|
keepItemsOpen?: boolean;
|
|
7
7
|
transparent?: boolean;
|
|
8
8
|
highlighted?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare const Accordion: (props: AccordionProps &
|
|
10
|
+
export declare const Accordion: (props: AccordionProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -30,12 +30,13 @@ const Accordion = /*#__PURE__*/ forwardRef(({ children, showMore = 'Show more',
|
|
|
30
30
|
value: contextValue,
|
|
31
31
|
children: /*#__PURE__*/ jsx("div", {
|
|
32
32
|
ref: ref,
|
|
33
|
+
...props,
|
|
33
34
|
className: classnames('fr-accordion', {
|
|
34
35
|
'fwe-bg-white': !transparent
|
|
35
36
|
}, className),
|
|
36
|
-
...props,
|
|
37
37
|
children: children
|
|
38
38
|
})
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
|
+
Accordion.displayName = 'Accordion';
|
|
41
42
|
export { Accordion };
|
|
@@ -3,6 +3,6 @@ import { type ComponentPropsWithoutRef } from 'react';
|
|
|
3
3
|
export interface AccordionItemProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
|
|
4
4
|
expanded?: boolean;
|
|
5
5
|
defaultExpanded?: boolean;
|
|
6
|
-
onChange?: (event: React.SyntheticEvent
|
|
6
|
+
onChange?: (expanded: boolean, event: React.SyntheticEvent) => void;
|
|
7
7
|
}
|
|
8
8
|
export declare const AccordionItem: (props: AccordionItemProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -17,7 +17,7 @@ const AccordionItem = /*#__PURE__*/ forwardRef(({ expanded: expandedProp, defaul
|
|
|
17
17
|
});
|
|
18
18
|
const linkText = expanded ? showLess : showMore;
|
|
19
19
|
const handleChange = useCallback((event)=>{
|
|
20
|
-
if (onChange) onChange(
|
|
20
|
+
if (onChange) onChange(!expanded, event);
|
|
21
21
|
if (!keepItemsOpen) accordionToggle?.(id, !expanded);
|
|
22
22
|
setExpanded(!expanded);
|
|
23
23
|
}, [
|
|
@@ -57,4 +57,5 @@ const AccordionItem = /*#__PURE__*/ forwardRef(({ expanded: expandedProp, defaul
|
|
|
57
57
|
})
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
60
61
|
export { AccordionItem };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import './BottomSheet.scss';
|
|
2
|
-
|
|
3
|
-
export interface BottomSheetProps extends PropsWithChildren {
|
|
2
|
+
export interface BottomSheetProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
4
3
|
readonly defaultExpanded?: boolean;
|
|
5
4
|
readonly open?: boolean;
|
|
6
5
|
readonly expandFrom?: 'center' | 'bottom';
|
|
@@ -8,4 +7,4 @@ export interface BottomSheetProps extends PropsWithChildren {
|
|
|
8
7
|
readonly hideCloseIcon?: boolean;
|
|
9
8
|
readonly onOpenChange?: (value: boolean) => void;
|
|
10
9
|
}
|
|
11
|
-
export declare
|
|
10
|
+
export declare const BottomSheet: (props: BottomSheetProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "./BottomSheet.css";
|
|
3
3
|
import classnames from "classnames";
|
|
4
|
-
import { useState } from "react";
|
|
5
|
-
|
|
4
|
+
import { forwardRef, useState } from "react";
|
|
5
|
+
const BottomSheet = /*#__PURE__*/ forwardRef(({ children, open, defaultExpanded, expandFrom = 'center', hasBackdrop = true, hideCloseIcon, onOpenChange, className, ...props }, ref)=>{
|
|
6
6
|
const [expanded, setExpanded] = useState(defaultExpanded);
|
|
7
7
|
const [isClosing, setIsClosing] = useState(false);
|
|
8
8
|
const [startY, setStartY] = useState(0);
|
|
@@ -55,13 +55,15 @@ function BottomSheet({ children, open, defaultExpanded, expandFrom = 'center', h
|
|
|
55
55
|
}
|
|
56
56
|
}),
|
|
57
57
|
/*#__PURE__*/ jsxs("div", {
|
|
58
|
+
ref: ref,
|
|
59
|
+
...props,
|
|
58
60
|
className: classnames('fwe-bottom-sheet-container', {
|
|
59
61
|
'fwe-bottom-sheet-container--open': open,
|
|
60
62
|
'fwe-bottom-sheet-container--expanded': expanded,
|
|
61
63
|
'fwe-bottom-sheet-container--expand-from-center': 'center' === expandFrom,
|
|
62
64
|
'fwe-bottom-sheet-container--with-backdrop': hasBackdrop,
|
|
63
65
|
'fwe-bottom-sheet-container--closing': isClosing
|
|
64
|
-
}),
|
|
66
|
+
}, className),
|
|
65
67
|
onTouchStart: handleTouchStart,
|
|
66
68
|
onTouchMove: handleTouchMove,
|
|
67
69
|
children: [
|
|
@@ -97,5 +99,6 @@ function BottomSheet({ children, open, defaultExpanded, expandFrom = 'center', h
|
|
|
97
99
|
})
|
|
98
100
|
]
|
|
99
101
|
});
|
|
100
|
-
}
|
|
102
|
+
});
|
|
103
|
+
BottomSheet.displayName = 'BottomSheet';
|
|
101
104
|
export { BottomSheet };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { type MouseEvent } from 'react';
|
|
2
|
-
import type { ClassNamePropsWithChildren } from '../../utils/types';
|
|
1
|
+
import { type ComponentPropsWithoutRef, type MouseEvent, type PropsWithChildren } from 'react';
|
|
3
2
|
export interface BreadcrumbLocation {
|
|
4
3
|
label: string;
|
|
5
4
|
url: string;
|
|
6
5
|
}
|
|
7
|
-
export interface BreadcrumbProps extends
|
|
6
|
+
export interface BreadcrumbProps extends PropsWithChildren, ComponentPropsWithoutRef<'nav'> {
|
|
8
7
|
readonly locations?: BreadcrumbLocation[];
|
|
9
8
|
readonly onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
10
9
|
}
|
|
11
10
|
/**
|
|
12
11
|
* Breadcrumb navigation can be used on pages with multiple navigation levels.
|
|
13
12
|
*/
|
|
14
|
-
export declare
|
|
13
|
+
export declare const Breadcrumb: (props: BreadcrumbProps & import("react").RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
|
-
import { Children, cloneElement, isValidElement, useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
-
|
|
3
|
+
import { Children, cloneElement, forwardRef, isValidElement, useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { useForkRef } from "../../utils/useForkRef.js";
|
|
5
|
+
const Breadcrumb = /*#__PURE__*/ forwardRef(({ locations, onClick, children, className, ...props }, ref)=>{
|
|
5
6
|
const containerRef = useRef(null);
|
|
6
7
|
const measureRef = useRef(null);
|
|
8
|
+
const combinedRef = useForkRef(ref, containerRef);
|
|
7
9
|
const [isMobile, setIsMobile] = useState(false);
|
|
8
10
|
function isValidHtmlChildElement(child) {
|
|
9
11
|
return /*#__PURE__*/ isValidElement(child);
|
|
@@ -56,6 +58,7 @@ function Breadcrumb({ locations, onClick, children, className }) {
|
|
|
56
58
|
measure
|
|
57
59
|
]);
|
|
58
60
|
return /*#__PURE__*/ jsxs("div", {
|
|
61
|
+
className: className,
|
|
59
62
|
children: [
|
|
60
63
|
/*#__PURE__*/ jsx("nav", {
|
|
61
64
|
className: classnames('fwe-breadcrumb'),
|
|
@@ -74,8 +77,9 @@ function Breadcrumb({ locations, onClick, children, className }) {
|
|
|
74
77
|
})
|
|
75
78
|
}),
|
|
76
79
|
/*#__PURE__*/ jsx("nav", {
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
...props,
|
|
81
|
+
className: classnames('fwe-breadcrumb', isMobile && 'fwe-breadcrumb--mobile'),
|
|
82
|
+
ref: combinedRef,
|
|
79
83
|
"aria-label": "Breadcrumb",
|
|
80
84
|
children: /*#__PURE__*/ jsx("ol", {
|
|
81
85
|
children: listItems
|
|
@@ -83,5 +87,6 @@ function Breadcrumb({ locations, onClick, children, className }) {
|
|
|
83
87
|
})
|
|
84
88
|
]
|
|
85
89
|
});
|
|
86
|
-
}
|
|
90
|
+
});
|
|
91
|
+
Breadcrumb.displayName = 'Breadcrumb';
|
|
87
92
|
export { Breadcrumb };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
}
|
|
5
|
-
export declare function Card({ children, className }: CardProps): ReactElement;
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type CardProps = React.ComponentPropsWithoutRef<'div'>;
|
|
3
|
+
export declare const Card: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
const Card = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
5
5
|
className: classnames('fwe-card', className),
|
|
6
|
+
ref: ref,
|
|
7
|
+
...props,
|
|
6
8
|
children: children
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
+
}));
|
|
10
|
+
Card.displayName = 'Card';
|
|
9
11
|
export { Card };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export interface CardBodyProps extends
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface CardBodyProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
text: string;
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
5
|
+
export declare const CardBody: (props: CardBodyProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
const CardBody = /*#__PURE__*/ forwardRef(({ children, text, className, ...props }, ref)=>/*#__PURE__*/ jsxs("div", {
|
|
5
5
|
className: classnames('fwe-card-body', className),
|
|
6
|
+
ref: ref,
|
|
7
|
+
...props,
|
|
6
8
|
children: [
|
|
7
9
|
/*#__PURE__*/ jsx("div", {
|
|
8
10
|
className: "fwe-card-text",
|
|
@@ -10,6 +12,6 @@ function CardBody({ children, text, className }) {
|
|
|
10
12
|
}),
|
|
11
13
|
children
|
|
12
14
|
]
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
+
}));
|
|
16
|
+
CardBody.displayName = 'CardBody';
|
|
15
17
|
export { CardBody };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface CardHeaderProps extends
|
|
1
|
+
import type { Image } from '../../utils/types';
|
|
2
|
+
export interface CardHeaderProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
title: string;
|
|
4
4
|
subtitle?: string;
|
|
5
5
|
action?: React.ReactNode;
|
|
6
6
|
image?: Image;
|
|
7
7
|
}
|
|
8
|
-
export declare
|
|
8
|
+
export declare const CardHeader: (props: CardHeaderProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
const CardHeader = /*#__PURE__*/ forwardRef(({ title, subtitle, action, image, className, ...props }, ref)=>/*#__PURE__*/ jsxs(Fragment, {
|
|
5
5
|
children: [
|
|
6
6
|
image ? /*#__PURE__*/ jsx("img", {
|
|
7
7
|
alt: image.alt,
|
|
@@ -10,6 +10,8 @@ function CardHeader({ title, subtitle, action, image, className }) {
|
|
|
10
10
|
}) : null,
|
|
11
11
|
/*#__PURE__*/ jsxs("div", {
|
|
12
12
|
className: classnames('fwe-card-header', className),
|
|
13
|
+
ref: ref,
|
|
14
|
+
...props,
|
|
13
15
|
children: [
|
|
14
16
|
/*#__PURE__*/ jsxs("div", {
|
|
15
17
|
className: "fwe-card-title",
|
|
@@ -26,6 +28,6 @@ function CardHeader({ title, subtitle, action, image, className }) {
|
|
|
26
28
|
]
|
|
27
29
|
})
|
|
28
30
|
]
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
+
}));
|
|
32
|
+
CardHeader.displayName = 'CardHeader';
|
|
31
33
|
export { CardHeader };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export interface CardNotificationProps extends ClassNameProps {
|
|
1
|
+
export interface CardNotificationProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
3
2
|
title: string;
|
|
4
3
|
message?: string;
|
|
5
4
|
}
|
|
6
|
-
export declare
|
|
5
|
+
export declare const CardNotification: (props: CardNotificationProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { IconWarning } from "@festo-ui/react-icons";
|
|
3
3
|
import classnames from "classnames";
|
|
4
|
-
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
const CardNotification = /*#__PURE__*/ forwardRef(({ className, title, message, ...props }, ref)=>{
|
|
5
6
|
const classes = classnames('fwe-card-notification', className);
|
|
6
7
|
return /*#__PURE__*/ jsxs("div", {
|
|
7
8
|
className: classes,
|
|
9
|
+
ref: ref,
|
|
10
|
+
...props,
|
|
8
11
|
children: [
|
|
9
12
|
/*#__PURE__*/ jsx(IconWarning, {
|
|
10
13
|
size: 24
|
|
@@ -22,5 +25,6 @@ function CardNotification({ className, title, message }) {
|
|
|
22
25
|
})
|
|
23
26
|
]
|
|
24
27
|
});
|
|
25
|
-
}
|
|
28
|
+
});
|
|
29
|
+
CardNotification.displayName = 'CardNotification';
|
|
26
30
|
export { CardNotification };
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { ClassNamePropsWithChildren } from '../../../utils/types';
|
|
3
2
|
export declare enum ChipType {
|
|
4
3
|
Choice = 0,
|
|
5
4
|
Category = 1,
|
|
6
5
|
Filter = 2,
|
|
7
|
-
|
|
6
|
+
Action = 3,
|
|
7
|
+
Readonly = 4
|
|
8
8
|
}
|
|
9
|
-
export interface ChipProps extends
|
|
9
|
+
export interface ChipProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'type'> {
|
|
10
10
|
readonly type?: ChipType;
|
|
11
11
|
readonly icon?: React.ReactNode;
|
|
12
12
|
readonly selected?: boolean;
|
|
13
13
|
readonly disabled?: boolean;
|
|
14
14
|
readonly large?: boolean;
|
|
15
|
-
readonly onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
16
15
|
}
|
|
17
|
-
export declare
|
|
16
|
+
export declare const Chip: (props: ChipProps & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
|
+
import { forwardRef } from "react";
|
|
3
4
|
import { IconWrapper } from "../../icon-wrapper/IconWrapper.js";
|
|
4
5
|
var Chip_ChipType = /*#__PURE__*/ function(ChipType) {
|
|
5
6
|
ChipType[ChipType["Choice"] = 0] = "Choice";
|
|
6
7
|
ChipType[ChipType["Category"] = 1] = "Category";
|
|
7
8
|
ChipType[ChipType["Filter"] = 2] = "Filter";
|
|
8
|
-
ChipType[ChipType["
|
|
9
|
+
ChipType[ChipType["Action"] = 3] = "Action";
|
|
10
|
+
ChipType[ChipType["Readonly"] = 4] = "Readonly";
|
|
9
11
|
return ChipType;
|
|
10
12
|
}({});
|
|
11
|
-
|
|
13
|
+
const Chip = /*#__PURE__*/ forwardRef(({ type = 0, selected = false, disabled = false, large = false, icon, children, onClick, className, ...props }, ref)=>{
|
|
12
14
|
const classes = classnames('fr-chip', 'fwe-chip', {
|
|
13
15
|
'fwe-selected': selected
|
|
14
16
|
}, {
|
|
@@ -20,13 +22,17 @@ function Chip({ type = 0, selected = false, disabled = false, large = false, ico
|
|
|
20
22
|
}, {
|
|
21
23
|
'fwe-filter': 2 === type
|
|
22
24
|
}, {
|
|
23
|
-
'fwe-
|
|
25
|
+
'fwe-action': 3 === type
|
|
26
|
+
}, {
|
|
27
|
+
'fwe-readonly': 4 === type
|
|
24
28
|
}, className);
|
|
25
29
|
return /*#__PURE__*/ jsxs("button", {
|
|
26
30
|
type: "button",
|
|
27
31
|
className: classes,
|
|
28
32
|
onClick: onClick,
|
|
29
33
|
disabled: disabled,
|
|
34
|
+
ref: ref,
|
|
35
|
+
...props,
|
|
30
36
|
children: [
|
|
31
37
|
/*#__PURE__*/ jsx(IconWrapper, {
|
|
32
38
|
icon: icon
|
|
@@ -34,5 +40,6 @@ function Chip({ type = 0, selected = false, disabled = false, large = false, ico
|
|
|
34
40
|
children
|
|
35
41
|
]
|
|
36
42
|
});
|
|
37
|
-
}
|
|
43
|
+
});
|
|
44
|
+
Chip.displayName = 'Chip';
|
|
38
45
|
export { Chip, Chip_ChipType as ChipType };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export interface ChipContainerProps extends
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface ChipContainerProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
readonly large?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
5
|
+
export declare const ChipContainer: (props: ChipContainerProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
|
-
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
const ChipContainer = /*#__PURE__*/ forwardRef(({ large = false, children, className, ...props }, ref)=>{
|
|
4
5
|
const classes = classnames('fwe-chip-container', {
|
|
5
6
|
'fwe-chip-container-lg': large
|
|
6
7
|
}, className);
|
|
7
8
|
return /*#__PURE__*/ jsx("div", {
|
|
8
9
|
className: classes,
|
|
10
|
+
ref: ref,
|
|
11
|
+
...props,
|
|
9
12
|
children: children
|
|
10
13
|
});
|
|
11
|
-
}
|
|
14
|
+
});
|
|
15
|
+
ChipContainer.displayName = 'ChipContainer';
|
|
12
16
|
export { ChipContainer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export interface LoadingIndicatorProps extends
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface LoadingIndicatorProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
readonly size: 'large' | 'medium' | 'small';
|
|
4
4
|
}
|
|
5
5
|
export declare const LoadingIndicator: (props: LoadingIndicatorProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -6,6 +6,7 @@ export interface MobileFlyoutItemBaseProps {
|
|
|
6
6
|
icon?: React.ReactNode;
|
|
7
7
|
pageLink?: string;
|
|
8
8
|
active?: boolean;
|
|
9
|
+
className?: string;
|
|
9
10
|
}
|
|
10
11
|
export type MobileFlyoutItemProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<C, MobileFlyoutItemBaseProps>;
|
|
11
12
|
export declare const MobileFlyoutItem: <C extends React.ElementType = "a">(props: MobileFlyoutItemBaseProps & {
|
|
@@ -4,7 +4,7 @@ import classnames from "classnames";
|
|
|
4
4
|
import { forwardRef, useContext } from "react";
|
|
5
5
|
import { IconWrapper } from "../../icon-wrapper/IconWrapper.js";
|
|
6
6
|
import { MobileFlyoutContext } from "../MobileFlyoutContext.js";
|
|
7
|
-
const MobileFlyoutItem = /*#__PURE__*/ forwardRef(({ component, children, pageLink, icon, onClick, active, ...props }, ref)=>{
|
|
7
|
+
const MobileFlyoutItem = /*#__PURE__*/ forwardRef(({ component, children, pageLink, icon, onClick, active, className, ...props }, ref)=>{
|
|
8
8
|
const Component = component || 'a';
|
|
9
9
|
const { setVisible, setOpen } = useContext(MobileFlyoutContext);
|
|
10
10
|
function handleClick(e) {
|
|
@@ -13,7 +13,7 @@ const MobileFlyoutItem = /*#__PURE__*/ forwardRef(({ component, children, pageLi
|
|
|
13
13
|
onClick?.(e);
|
|
14
14
|
}
|
|
15
15
|
return /*#__PURE__*/ jsxs(Component, {
|
|
16
|
-
className:
|
|
16
|
+
className: classnames('fwe-mobile-flyout-item fwe-bb', className),
|
|
17
17
|
...props,
|
|
18
18
|
ref: ref,
|
|
19
19
|
onClick: handleClick,
|
|
@@ -33,4 +33,5 @@ const MobileFlyoutItem = /*#__PURE__*/ forwardRef(({ component, children, pageLi
|
|
|
33
33
|
]
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
|
+
MobileFlyoutItem.displayName = 'MobileFlyoutItem';
|
|
36
37
|
export { MobileFlyoutItem };
|
|
@@ -3,7 +3,7 @@ import "./MobileFlyoutPage.css";
|
|
|
3
3
|
import classnames from "classnames";
|
|
4
4
|
import { forwardRef, useContext } from "react";
|
|
5
5
|
import { MobileFlyoutContext } from "../MobileFlyoutContext.js";
|
|
6
|
-
const MobileFlyoutPage = /*#__PURE__*/ forwardRef(({ back, children, name, root, ...props }, ref)=>{
|
|
6
|
+
const MobileFlyoutPage = /*#__PURE__*/ forwardRef(({ back, children, name, root, className, ...props }, ref)=>{
|
|
7
7
|
const { visible, setVisible, back: backContext } = useContext(MobileFlyoutContext);
|
|
8
8
|
const innerVisible = root || name && visible.includes(name);
|
|
9
9
|
const innerBack = back ?? backContext ?? 'Back';
|
|
@@ -11,11 +11,11 @@ const MobileFlyoutPage = /*#__PURE__*/ forwardRef(({ back, children, name, root,
|
|
|
11
11
|
if (name) setVisible(name);
|
|
12
12
|
}
|
|
13
13
|
return /*#__PURE__*/ jsxs("div", {
|
|
14
|
+
...props,
|
|
14
15
|
className: classnames('fwe-mobile-flyout-page', {
|
|
15
16
|
'fwe-opened': innerVisible
|
|
16
|
-
}),
|
|
17
|
+
}, className),
|
|
17
18
|
ref: ref,
|
|
18
|
-
...props,
|
|
19
19
|
children: [
|
|
20
20
|
!root && /*#__PURE__*/ jsx("button", {
|
|
21
21
|
type: "button",
|
|
@@ -32,4 +32,5 @@ const MobileFlyoutPage = /*#__PURE__*/ forwardRef(({ back, children, name, root,
|
|
|
32
32
|
]
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
|
+
MobileFlyoutPage.displayName = 'MobileFlyoutPage';
|
|
35
36
|
export { MobileFlyoutPage };
|
|
@@ -9,4 +9,4 @@ export interface AlertModalProps extends Omit<ModalProps, 'head' | 'children'> {
|
|
|
9
9
|
readonly onCancel?: () => void;
|
|
10
10
|
readonly onOk?: () => void;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
12
|
+
export declare const AlertModal: (props: AlertModalProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
|
+
import { forwardRef } from "react";
|
|
3
4
|
import { Modal } from "./Modal.js";
|
|
4
5
|
import { ModalFooter } from "./ModalFooter.js";
|
|
5
|
-
|
|
6
|
-
return /*#__PURE__*/ jsx(Modal, {
|
|
6
|
+
const AlertModal = /*#__PURE__*/ forwardRef(({ title, subtitle, alertType, strong, cancel, ok, onCancel, onOk, className, body, ...props }, ref)=>/*#__PURE__*/ jsx(Modal, {
|
|
7
7
|
className: classnames({
|
|
8
8
|
'fwe-modal--with-indicator-bar': strong,
|
|
9
9
|
'fwe-modal--warning': 'warning' === alertType,
|
|
@@ -25,6 +25,7 @@ function AlertModal({ title, subtitle, alertType, strong, cancel, ok, onCancel,
|
|
|
25
25
|
body: 'string' == typeof body ? /*#__PURE__*/ jsx("p", {
|
|
26
26
|
children: body
|
|
27
27
|
}) : body,
|
|
28
|
+
ref: ref,
|
|
28
29
|
...props,
|
|
29
30
|
children: (cancel || ok) && /*#__PURE__*/ jsxs(ModalFooter, {
|
|
30
31
|
children: [
|
|
@@ -48,6 +49,6 @@ function AlertModal({ title, subtitle, alertType, strong, cancel, ok, onCancel,
|
|
|
48
49
|
})
|
|
49
50
|
]
|
|
50
51
|
})
|
|
51
|
-
});
|
|
52
|
-
|
|
52
|
+
}));
|
|
53
|
+
AlertModal.displayName = 'AlertModal';
|
|
53
54
|
export { AlertModal };
|
|
@@ -8,4 +8,4 @@ export interface ConfirmModalProps extends Omit<ModalProps, 'head' | 'children'>
|
|
|
8
8
|
readonly onOk?: () => void;
|
|
9
9
|
readonly large?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare
|
|
11
|
+
export declare const ConfirmModal: (props: ConfirmModalProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
|
+
import { forwardRef } from "react";
|
|
3
4
|
import { Modal } from "./Modal.js";
|
|
4
5
|
import { ModalFooter } from "./ModalFooter.js";
|
|
5
|
-
|
|
6
|
-
return /*#__PURE__*/ jsx(Modal, {
|
|
6
|
+
const ConfirmModal = /*#__PURE__*/ forwardRef(({ title, subtitle, cancel, ok, onCancel, onOk, large, body, className, ...props }, ref)=>/*#__PURE__*/ jsx(Modal, {
|
|
7
7
|
className: classnames({
|
|
8
8
|
'fwe-modal--large': large
|
|
9
9
|
}, className),
|
|
@@ -22,6 +22,7 @@ function ConfirmModal({ title, subtitle, cancel, ok, onCancel, onOk, large, body
|
|
|
22
22
|
body: 'string' == typeof body ? /*#__PURE__*/ jsx("p", {
|
|
23
23
|
children: body
|
|
24
24
|
}) : body,
|
|
25
|
+
ref: ref,
|
|
25
26
|
...props,
|
|
26
27
|
children: (cancel || ok) && /*#__PURE__*/ jsxs(ModalFooter, {
|
|
27
28
|
children: [
|
|
@@ -41,6 +42,6 @@ function ConfirmModal({ title, subtitle, cancel, ok, onCancel, onOk, large, body
|
|
|
41
42
|
})
|
|
42
43
|
]
|
|
43
44
|
})
|
|
44
|
-
});
|
|
45
|
-
|
|
45
|
+
}));
|
|
46
|
+
ConfirmModal.displayName = 'ConfirmModal';
|
|
46
47
|
export { ConfirmModal };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare const ModalFooter: (props:
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export declare const ModalFooter: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|