@festo-ui/react 4.0.3-pre-20221124.8 → 5.0.0-dev.102
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/index.css +3 -3202
- package/index.d.ts +50 -48
- package/index.js +50 -4797
- package/lib/components/accordion/Accordion.d.ts +9 -9
- package/lib/components/accordion/Accordion.js +38 -0
- package/lib/components/accordion/AccordionContext.d.ts +11 -11
- package/lib/components/accordion/AccordionContext.js +3 -0
- package/lib/components/accordion/accordion-header/AccordionHeader.d.ts +4 -4
- package/lib/components/accordion/accordion-header/AccordionHeader.js +17 -0
- package/lib/components/accordion/accordion-item/AccordionItem.d.ts +9 -9
- package/lib/components/accordion/accordion-item/AccordionItem.js +64 -0
- package/lib/components/accordion/accordion-item/AccordionItemContext.d.ts +8 -8
- package/lib/components/accordion/accordion-item/AccordionItemContext.js +3 -0
- package/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.d.ts +4 -4
- package/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +71 -0
- package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.d.ts +4 -4
- package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +41 -0
- package/lib/components/breadcrumb/Breadcrumb.d.ts +14 -14
- package/lib/components/breadcrumb/Breadcrumb.js +45 -0
- package/lib/components/buttons/button/Button.d.ts +12 -12
- package/lib/components/buttons/button/Button.js +37 -0
- package/lib/components/card/Card.d.ts +4 -4
- package/lib/components/card/Card.js +13 -0
- package/lib/components/card/CardBody.d.ts +7 -7
- package/lib/components/card/CardBody.js +18 -0
- package/lib/components/card/CardHeader.d.ts +9 -9
- package/lib/components/card/CardHeader.js +23 -0
- package/lib/components/card/CardNotification.d.ts +9 -9
- package/lib/components/card/CardNotification.js +26 -0
- package/lib/components/chips/chip/Chip.d.ts +19 -19
- package/lib/components/chips/chip/Chip.js +46 -0
- package/lib/components/chips/chip/DeleteIcon.d.ts +2 -0
- package/lib/components/chips/chip/DeleteIcon.js +7 -0
- package/lib/components/chips/chip-container/ChipContainer.d.ts +8 -8
- package/lib/components/chips/chip-container/ChipContainer.js +17 -0
- package/lib/components/link-button/LinkButton.d.ts +10 -10
- package/lib/components/link-button/LinkButton.js +26 -0
- package/lib/components/loading-indicator/LoadingIndicator.d.ts +7 -7
- package/lib/components/loading-indicator/LoadingIndicator.js +40 -0
- package/lib/components/modals/AlertModal.d.ts +14 -14
- package/lib/components/modals/AlertModal.js +76 -0
- package/lib/components/modals/ConfirmModal.d.ts +13 -13
- package/lib/components/modals/ConfirmModal.js +56 -0
- package/lib/components/modals/Modal.d.ts +11 -11
- package/lib/components/modals/Modal.js +76 -0
- package/lib/components/modals/ModalFooter.d.ts +4 -4
- package/lib/components/modals/ModalFooter.js +18 -0
- package/lib/components/modals/Prompt.d.ts +16 -16
- package/lib/components/modals/Prompt.js +65 -0
- package/lib/components/pagination/Pagination.d.ts +17 -17
- package/lib/components/pagination/Pagination.js +107 -0
- package/lib/components/popovers/legend/Legend.d.ts +12 -12
- package/lib/components/popovers/legend/Legend.js +25 -0
- package/lib/components/popovers/popover/Popover.d.ts +18 -18
- package/lib/components/popovers/popover/Popover.js +109 -0
- package/lib/components/popovers/popover-menu/PopoverMenu.d.ts +15 -15
- package/lib/components/popovers/popover-menu/PopoverMenu.js +54 -0
- package/lib/components/popovers/tooltip/Tooltip.d.ts +10 -10
- package/lib/components/popovers/tooltip/Tooltip.js +64 -0
- package/lib/components/progress/Progress.d.ts +9 -9
- package/lib/components/progress/Progress.js +32 -0
- package/lib/components/search-input/ClearButton.d.ts +2 -0
- package/lib/components/search-input/ClearButton.js +10 -0
- package/lib/components/search-input/SearchInput.d.ts +15 -0
- package/lib/components/search-input/SearchInput.js +75 -0
- package/lib/components/search-input/SearchSuggestion.d.ts +17 -0
- package/lib/components/search-input/SearchSuggestion.js +32 -0
- package/lib/components/search-input/useSearchInput.d.ts +13 -0
- package/lib/components/search-input/useSearchInput.js +94 -0
- package/lib/components/snackbar/Snackbar.d.ts +23 -23
- package/lib/components/snackbar/Snackbar.js +87 -0
- package/lib/components/snackbar/SnackbarContext.d.ts +8 -8
- package/lib/components/snackbar/SnackbarContext.js +2 -0
- package/lib/components/snackbar/SnackbarProvider.d.ts +8 -8
- package/lib/components/snackbar/SnackbarProvider.js +58 -0
- package/lib/components/snackbar/useSnackbar.d.ts +3 -3
- package/lib/components/snackbar/useSnackbar.js +3 -0
- package/lib/components/stepper-horizontal/StepperHorizontal.d.ts +7 -7
- package/lib/components/stepper-horizontal/StepperHorizontal.js +62 -0
- package/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.d.ts +7 -7
- package/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.js +23 -0
- package/lib/components/stepper-vertical/StepperVertical.d.ts +7 -7
- package/lib/components/stepper-vertical/StepperVertical.js +37 -0
- package/lib/components/stepper-vertical/step-vertical/StepVertical.d.ts +12 -12
- package/lib/components/stepper-vertical/step-vertical/StepVertical.js +77 -0
- package/lib/components/tab/Tabs.d.ts +23 -23
- package/lib/components/tab/Tabs.js +229 -0
- package/lib/components/tab/interfaces.d.ts +5 -0
- package/lib/components/tab/interfaces.js +1 -0
- package/lib/components/tab/tab-pane/TabPane.d.ts +11 -13
- package/lib/components/tab/tab-pane/TabPane.js +23 -0
- package/lib/components/tab/useTabScroll.d.ts +24 -24
- package/lib/components/tab/useTabScroll.js +233 -0
- package/lib/components/table-header-cell/TableHeaderCell.d.ts +7 -7
- package/lib/components/table-header-cell/TableHeaderCell.js +21 -0
- package/lib/forms/checkbox/Checkbox.d.ts +16 -16
- package/lib/forms/checkbox/Checkbox.js +88 -0
- package/lib/forms/color-indicator/ColorIndicator.d.ts +12 -12
- package/lib/forms/color-indicator/ColorIndicator.js +122 -0
- package/lib/forms/color-picker/ColorHelper.d.ts +9 -9
- package/lib/forms/color-picker/ColorHelper.js +142 -0
- package/lib/forms/color-picker/ColorPicker.d.ts +15 -15
- package/lib/forms/color-picker/ColorPicker.js +539 -0
- package/lib/forms/date-picker/DatePicker.d.ts +22 -21
- package/lib/forms/date-picker/DatePicker.js +124 -0
- package/lib/forms/date-range-picker/DateRangePicker.d.ts +20 -20
- package/lib/forms/date-range-picker/DateRangePicker.js +135 -0
- package/lib/forms/radio/RadioButton.d.ts +15 -15
- package/lib/forms/radio/RadioButton.js +56 -0
- package/lib/forms/radio/RadioGroup.d.ts +13 -13
- package/lib/forms/radio/RadioGroup.js +35 -0
- package/lib/forms/radio/RadioGroupContext.d.ts +12 -12
- package/lib/forms/radio/RadioGroupContext.js +3 -0
- package/lib/forms/segment/Segment.d.ts +14 -14
- package/lib/forms/segment/Segment.js +77 -0
- package/lib/forms/segment/segment-control/SegmentControl.d.ts +15 -15
- package/lib/forms/segment/segment-control/SegmentControl.js +64 -0
- package/lib/forms/select/Select.d.ts +26 -26
- package/lib/forms/select/Select.js +281 -0
- package/lib/forms/select/select-option/SelectOption.d.ts +10 -10
- package/lib/forms/select/select-option/SelectOption.js +16 -0
- package/lib/forms/slider/Slider.d.ts +18 -17
- package/lib/forms/slider/Slider.js +92 -0
- package/lib/forms/switch/Switch.d.ts +13 -12
- package/lib/forms/switch/Switch.js +51 -0
- package/lib/forms/text-area/TextArea.d.ts +22 -21
- package/lib/forms/text-area/TextArea.js +108 -0
- package/lib/forms/text-editor/TextEditor.d.ts +29 -29
- package/lib/forms/text-editor/TextEditor.js +255 -0
- package/lib/forms/text-editor/TextEditorButton.d.ts +14 -14
- package/lib/forms/text-editor/TextEditorButton.js +82 -0
- package/lib/forms/text-input/TextInput.d.ts +21 -21
- package/lib/forms/text-input/TextInput.js +75 -0
- package/lib/forms/time-picker/TimePicker.d.ts +18 -18
- package/lib/forms/time-picker/TimePicker.js +161 -0
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerDropdown.d.ts +12 -12
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +213 -0
- package/lib/helper/index.d.ts +2 -2
- package/lib/helper/index.js +7 -0
- package/lib/helper/setRef.d.ts +2 -2
- package/lib/helper/setRef.js +7 -0
- package/lib/helper/types.d.ts +7 -7
- package/lib/helper/types.js +1 -0
- package/lib/helper/useControlled.d.ts +6 -6
- package/lib/helper/useControlled.js +18 -0
- package/lib/helper/useForkRef.d.ts +2 -2
- package/lib/helper/useForkRef.js +20 -0
- package/lib/helper/useId.d.ts +1 -0
- package/lib/helper/useId.js +21 -0
- package/lib/helper/useOnClickOutside.d.ts +2 -2
- package/lib/helper/useOnClickOutside.js +18 -0
- package/node/index.js +370 -0
- package/node/lib/components/accordion/Accordion.js +46 -0
- package/node/lib/components/accordion/AccordionContext.js +10 -0
- package/node/lib/components/accordion/accordion-header/AccordionHeader.js +25 -0
- package/node/lib/components/accordion/accordion-item/AccordionItem.js +71 -0
- package/node/lib/components/accordion/accordion-item/AccordionItemContext.js +10 -0
- package/node/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +78 -0
- package/node/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +49 -0
- package/node/lib/components/breadcrumb/Breadcrumb.js +52 -0
- package/node/lib/components/buttons/button/Button.js +44 -0
- package/node/lib/components/card/Card.js +21 -0
- package/node/lib/components/card/CardBody.js +25 -0
- package/node/lib/components/card/CardHeader.js +30 -0
- package/node/lib/components/card/CardNotification.js +33 -0
- package/node/lib/components/chips/chip/Chip.js +54 -0
- package/node/lib/components/chips/chip/DeleteIcon.js +13 -0
- package/node/lib/components/chips/chip-container/ChipContainer.js +25 -0
- package/node/lib/components/link-button/LinkButton.js +33 -0
- package/node/lib/components/loading-indicator/LoadingIndicator.js +48 -0
- package/node/lib/components/modals/AlertModal.js +82 -0
- package/node/lib/components/modals/ConfirmModal.js +62 -0
- package/node/lib/components/modals/Modal.js +84 -0
- package/node/lib/components/modals/ModalFooter.js +26 -0
- package/node/lib/components/modals/Prompt.js +72 -0
- package/node/lib/components/pagination/Pagination.js +116 -0
- package/node/lib/components/popovers/legend/Legend.js +32 -0
- package/node/lib/components/popovers/popover/Popover.js +117 -0
- package/node/lib/components/popovers/popover-menu/PopoverMenu.js +61 -0
- package/node/lib/components/popovers/tooltip/Tooltip.js +70 -0
- package/node/lib/components/progress/Progress.js +40 -0
- package/node/lib/components/search-input/ClearButton.js +16 -0
- package/node/lib/components/search-input/SearchInput.js +82 -0
- package/node/lib/components/search-input/SearchSuggestion.js +39 -0
- package/node/lib/components/search-input/useSearchInput.js +101 -0
- package/node/lib/components/snackbar/Snackbar.js +94 -0
- package/node/lib/components/snackbar/SnackbarContext.js +10 -0
- package/node/lib/components/snackbar/SnackbarProvider.js +65 -0
- package/node/lib/components/snackbar/useSnackbar.js +11 -0
- package/node/lib/components/stepper-horizontal/StepperHorizontal.js +70 -0
- package/node/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.js +31 -0
- package/node/lib/components/stepper-vertical/StepperVertical.js +47 -0
- package/node/lib/components/stepper-vertical/step-vertical/StepVertical.js +84 -0
- package/node/lib/components/tab/Tabs.js +237 -0
- package/node/lib/components/tab/interfaces.js +5 -0
- package/node/lib/components/tab/tab-pane/TabPane.js +31 -0
- package/node/lib/components/tab/useTabScroll.js +236 -0
- package/node/lib/components/table-header-cell/TableHeaderCell.js +29 -0
- package/node/lib/forms/checkbox/Checkbox.js +97 -0
- package/node/lib/forms/color-indicator/ColorIndicator.js +130 -0
- package/node/lib/forms/color-picker/ColorHelper.js +149 -0
- package/node/lib/forms/color-picker/ColorPicker.js +549 -0
- package/node/lib/forms/date-picker/DatePicker.js +131 -0
- package/node/lib/forms/date-range-picker/DateRangePicker.js +142 -0
- package/node/lib/forms/radio/RadioButton.js +63 -0
- package/node/lib/forms/radio/RadioGroup.js +43 -0
- package/node/lib/forms/radio/RadioGroupContext.js +10 -0
- package/node/lib/forms/segment/Segment.js +84 -0
- package/node/lib/forms/segment/segment-control/SegmentControl.js +72 -0
- package/node/lib/forms/select/Select.js +289 -0
- package/node/lib/forms/select/select-option/SelectOption.js +26 -0
- package/node/lib/forms/slider/Slider.js +101 -0
- package/node/lib/forms/switch/Switch.js +58 -0
- package/node/lib/forms/text-area/TextArea.js +117 -0
- package/node/lib/forms/text-editor/TextEditor.js +261 -0
- package/node/lib/forms/text-editor/TextEditorButton.js +88 -0
- package/node/lib/forms/text-input/TextInput.js +84 -0
- package/node/lib/forms/time-picker/TimePicker.js +169 -0
- package/node/lib/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +222 -0
- package/node/lib/helper/index.js +15 -0
- package/node/lib/helper/setRef.js +13 -0
- package/node/lib/helper/types.js +5 -0
- package/node/lib/helper/useControlled.js +24 -0
- package/node/lib/helper/useForkRef.js +26 -0
- package/node/lib/helper/useId.js +27 -0
- package/node/lib/helper/useOnClickOutside.js +24 -0
- package/package.json +20 -10
- package/README.md +0 -17
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import TextInput from '../../forms/text-input/TextInput';
|
|
3
|
+
import Modal from './Modal';
|
|
4
|
+
import ModalFooter from './ModalFooter';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
export default function Prompt(_ref) {
|
|
9
|
+
let {
|
|
10
|
+
title,
|
|
11
|
+
subtitle,
|
|
12
|
+
hint,
|
|
13
|
+
label,
|
|
14
|
+
value,
|
|
15
|
+
onChange,
|
|
16
|
+
onOk,
|
|
17
|
+
onCancel,
|
|
18
|
+
cancel,
|
|
19
|
+
ok,
|
|
20
|
+
...props
|
|
21
|
+
} = _ref;
|
|
22
|
+
const [innerValue, setInnerValue] = useState(value);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
setInnerValue(value);
|
|
25
|
+
}, [value]);
|
|
26
|
+
function handleChange(e) {
|
|
27
|
+
setInnerValue(e.target.value);
|
|
28
|
+
if (onChange) {
|
|
29
|
+
onChange(e);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
33
|
+
head: /*#__PURE__*/_jsxs(_Fragment, {
|
|
34
|
+
children: [subtitle && /*#__PURE__*/_jsx("h2", {
|
|
35
|
+
className: "fwe-modal-h2",
|
|
36
|
+
children: subtitle
|
|
37
|
+
}), /*#__PURE__*/_jsx("h1", {
|
|
38
|
+
className: "fwe-modal-h1",
|
|
39
|
+
children: title
|
|
40
|
+
})]
|
|
41
|
+
}),
|
|
42
|
+
body: /*#__PURE__*/_jsx(TextInput, {
|
|
43
|
+
onChange: handleChange,
|
|
44
|
+
label: label,
|
|
45
|
+
hint: hint,
|
|
46
|
+
value: innerValue
|
|
47
|
+
}),
|
|
48
|
+
...props,
|
|
49
|
+
children: (cancel || ok) && /*#__PURE__*/_jsxs(ModalFooter, {
|
|
50
|
+
children: [cancel && /*#__PURE__*/_jsx("button", {
|
|
51
|
+
type: "button",
|
|
52
|
+
"aria-label": "Cancel",
|
|
53
|
+
className: "fwe-btn",
|
|
54
|
+
onClick: onCancel,
|
|
55
|
+
children: cancel
|
|
56
|
+
}), ok && /*#__PURE__*/_jsx("button", {
|
|
57
|
+
type: "button",
|
|
58
|
+
"aria-label": "Ok",
|
|
59
|
+
className: "fwe-btn fwe-btn-hero",
|
|
60
|
+
onClick: () => onOk(innerValue),
|
|
61
|
+
children: ok
|
|
62
|
+
})]
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ClassNameProps } from '../../helper/types';
|
|
3
|
-
import './Pagination.scss';
|
|
4
|
-
export declare enum PaginationType {
|
|
5
|
-
Simple = "SIMPLE",
|
|
6
|
-
Numeric = "NUMERIC",
|
|
7
|
-
Dots = "DOTS"
|
|
8
|
-
}
|
|
9
|
-
export interface PaginationProps extends ClassNameProps {
|
|
10
|
-
type?: PaginationType;
|
|
11
|
-
onChange?: (page: number) => void;
|
|
12
|
-
pageCurrent?: number;
|
|
13
|
-
defaultPageCurrent?: number;
|
|
14
|
-
pageMax: number;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default Pagination;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ClassNameProps } from '../../helper/types';
|
|
3
|
+
import './Pagination.scss';
|
|
4
|
+
export declare enum PaginationType {
|
|
5
|
+
Simple = "SIMPLE",
|
|
6
|
+
Numeric = "NUMERIC",
|
|
7
|
+
Dots = "DOTS"
|
|
8
|
+
}
|
|
9
|
+
export interface PaginationProps extends ClassNameProps {
|
|
10
|
+
type?: PaginationType;
|
|
11
|
+
onChange?: (page: number) => void;
|
|
12
|
+
pageCurrent?: number;
|
|
13
|
+
defaultPageCurrent?: number;
|
|
14
|
+
pageMax: number;
|
|
15
|
+
}
|
|
16
|
+
declare function Pagination(props: PaginationProps): JSX.Element;
|
|
17
|
+
export default Pagination;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
export let PaginationType;
|
|
7
|
+
(function (PaginationType) {
|
|
8
|
+
PaginationType["Simple"] = "SIMPLE";
|
|
9
|
+
PaginationType["Numeric"] = "NUMERIC";
|
|
10
|
+
PaginationType["Dots"] = "DOTS";
|
|
11
|
+
})(PaginationType || (PaginationType = {}));
|
|
12
|
+
function Pagination(props) {
|
|
13
|
+
const {
|
|
14
|
+
pageMax,
|
|
15
|
+
onChange,
|
|
16
|
+
pageCurrent,
|
|
17
|
+
defaultPageCurrent = 1,
|
|
18
|
+
type = PaginationType.Numeric,
|
|
19
|
+
className
|
|
20
|
+
} = props;
|
|
21
|
+
const controlled = pageCurrent !== undefined;
|
|
22
|
+
const [innerPageCurrent, setInnerPageCurrent] = useState(controlled ? pageCurrent : defaultPageCurrent);
|
|
23
|
+
const dotArray = Array.from(new Array(pageMax).keys());
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (controlled) {
|
|
26
|
+
setInnerPageCurrent(pageCurrent);
|
|
27
|
+
}
|
|
28
|
+
}, [pageCurrent, controlled]);
|
|
29
|
+
function handleChange(newPage) {
|
|
30
|
+
if (!controlled) {
|
|
31
|
+
setInnerPageCurrent(newPage);
|
|
32
|
+
}
|
|
33
|
+
if (onChange) {
|
|
34
|
+
onChange(newPage);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function onBtnDown() {
|
|
38
|
+
if (innerPageCurrent > 1) {
|
|
39
|
+
const newPageCurrent = innerPageCurrent - 1;
|
|
40
|
+
handleChange(newPageCurrent);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function onBtnUp() {
|
|
44
|
+
if (innerPageCurrent < pageMax) {
|
|
45
|
+
const newPageCurrent = innerPageCurrent + 1;
|
|
46
|
+
handleChange(newPageCurrent);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function onDotClick(index) {
|
|
50
|
+
const newPageCurrent = index + 1;
|
|
51
|
+
handleChange(newPageCurrent);
|
|
52
|
+
}
|
|
53
|
+
function handleKeyPress(event, index) {
|
|
54
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
55
|
+
onDotClick(index);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
59
|
+
children: [type !== PaginationType.Dots && /*#__PURE__*/_jsxs("div", {
|
|
60
|
+
className: classNames('fwe-pagination fwe-p-m', {
|
|
61
|
+
'fwe-d-none': pageMax < 2
|
|
62
|
+
}, className),
|
|
63
|
+
children: [/*#__PURE__*/_jsx("button", {
|
|
64
|
+
className: classNames('fwe-navigate-btn-down', {
|
|
65
|
+
'fwe-disabled': innerPageCurrent <= 1
|
|
66
|
+
}),
|
|
67
|
+
onClick: onBtnDown,
|
|
68
|
+
type: "button",
|
|
69
|
+
"aria-label": "navigate-btn-down"
|
|
70
|
+
}), type === PaginationType.Numeric && /*#__PURE__*/_jsxs(_Fragment, {
|
|
71
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
72
|
+
className: "fwe-page-current",
|
|
73
|
+
children: innerPageCurrent
|
|
74
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
75
|
+
className: "fwe-page-max",
|
|
76
|
+
children: pageMax
|
|
77
|
+
})]
|
|
78
|
+
}), /*#__PURE__*/_jsx("button", {
|
|
79
|
+
className: classNames('fwe-navigate-btn-up', {
|
|
80
|
+
'fwe-disabled': innerPageCurrent >= pageMax,
|
|
81
|
+
'fwe-ml-4': type === PaginationType.Simple
|
|
82
|
+
}),
|
|
83
|
+
onClick: onBtnUp,
|
|
84
|
+
type: "button",
|
|
85
|
+
"aria-label": "navigate-btn-up"
|
|
86
|
+
})]
|
|
87
|
+
}), type === PaginationType.Dots && /*#__PURE__*/_jsx("div", {
|
|
88
|
+
className: classNames('fwe-p-m', {
|
|
89
|
+
'fwe-d-none': pageMax < 2
|
|
90
|
+
}, className),
|
|
91
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
92
|
+
className: "fwe-pagination",
|
|
93
|
+
children: dotArray.map(index => /*#__PURE__*/_jsx("span", {
|
|
94
|
+
tabIndex: 0,
|
|
95
|
+
role: "button",
|
|
96
|
+
className: classNames('fwe-page-dot', {
|
|
97
|
+
'fwe-selected': index + 1 === innerPageCurrent
|
|
98
|
+
}),
|
|
99
|
+
onClick: () => onDotClick(index),
|
|
100
|
+
"aria-label": "page-dot",
|
|
101
|
+
onKeyPress: e => handleKeyPress(e, index)
|
|
102
|
+
}, index))
|
|
103
|
+
})
|
|
104
|
+
})]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
export default Pagination;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PopoverProps } from '../popover/Popover';
|
|
3
|
-
import './Legend.scss';
|
|
4
|
-
interface Item {
|
|
5
|
-
name: string;
|
|
6
|
-
text: string;
|
|
7
|
-
}
|
|
8
|
-
export interface LegendProps extends Omit<PopoverProps, 'popoverContent'> {
|
|
9
|
-
items: Item[];
|
|
10
|
-
}
|
|
11
|
-
declare function Legend({ items, ...props }: LegendProps): JSX.Element;
|
|
12
|
-
export default Legend;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PopoverProps } from '../popover/Popover';
|
|
3
|
+
import './Legend.scss';
|
|
4
|
+
interface Item {
|
|
5
|
+
name: string;
|
|
6
|
+
text: string;
|
|
7
|
+
}
|
|
8
|
+
export interface LegendProps extends Omit<PopoverProps, 'popoverContent'> {
|
|
9
|
+
items: Item[];
|
|
10
|
+
}
|
|
11
|
+
declare function Legend({ items, ...props }: LegendProps): JSX.Element;
|
|
12
|
+
export default Legend;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Popover from '../popover/Popover';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
function Legend(_ref) {
|
|
5
|
+
let {
|
|
6
|
+
items,
|
|
7
|
+
...props
|
|
8
|
+
} = _ref;
|
|
9
|
+
const content = items.length > 0 ? /*#__PURE__*/_jsx("dl", {
|
|
10
|
+
className: "fr-legend",
|
|
11
|
+
children: items.map(item => /*#__PURE__*/_jsxs("div", {
|
|
12
|
+
className: "fr-legend-content",
|
|
13
|
+
children: [/*#__PURE__*/_jsx("dt", {
|
|
14
|
+
children: item.name
|
|
15
|
+
}), /*#__PURE__*/_jsx("dt", {
|
|
16
|
+
children: item.text
|
|
17
|
+
})]
|
|
18
|
+
}, item.name))
|
|
19
|
+
}) : null;
|
|
20
|
+
return /*#__PURE__*/_jsx(Popover, {
|
|
21
|
+
popoverContent: content,
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export default Legend;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Placement } from '@popperjs/core';
|
|
3
|
-
import { ClassNamePropsWithChildren } from '../../../helper/types';
|
|
4
|
-
import './Popover.scss';
|
|
5
|
-
export interface PopoverProps extends ClassNamePropsWithChildren {
|
|
6
|
-
popoverContent: React.ReactNode;
|
|
7
|
-
position?: Placement;
|
|
8
|
-
fallbackPositions?: Placement[];
|
|
9
|
-
open?: boolean;
|
|
10
|
-
onStatusChange?: (status: boolean) => void;
|
|
11
|
-
wrapper?: (children: React.ReactNode) => React.ReactNode;
|
|
12
|
-
flip?: boolean;
|
|
13
|
-
containerClassName?: string;
|
|
14
|
-
stopPropagation?: boolean;
|
|
15
|
-
arrow?: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare function Popover({ popoverContent, children, position, fallbackPositions, open, onStatusChange, wrapper, className, flip, containerClassName, stopPropagation, arrow }: PopoverProps): JSX.Element;
|
|
18
|
-
export default Popover;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Placement } from '@popperjs/core';
|
|
3
|
+
import { ClassNamePropsWithChildren } from '../../../helper/types';
|
|
4
|
+
import './Popover.scss';
|
|
5
|
+
export interface PopoverProps extends ClassNamePropsWithChildren {
|
|
6
|
+
popoverContent: React.ReactNode;
|
|
7
|
+
position?: Placement;
|
|
8
|
+
fallbackPositions?: Placement[];
|
|
9
|
+
open?: boolean;
|
|
10
|
+
onStatusChange?: (status: boolean) => void;
|
|
11
|
+
wrapper?: (children: React.ReactNode) => React.ReactNode;
|
|
12
|
+
flip?: boolean;
|
|
13
|
+
containerClassName?: string;
|
|
14
|
+
stopPropagation?: boolean;
|
|
15
|
+
arrow?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare function Popover({ popoverContent, children, position, fallbackPositions, open, onStatusChange, wrapper, className, flip, containerClassName, stopPropagation, arrow, }: PopoverProps): JSX.Element;
|
|
18
|
+
export default Popover;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { usePopper } from 'react-popper';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import useOnClickOutside from '../../../helper/useOnClickOutside';
|
|
5
|
+
import useForkRef from '../../../helper/useForkRef';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
+
function Popover(_ref) {
|
|
10
|
+
let {
|
|
11
|
+
popoverContent,
|
|
12
|
+
children,
|
|
13
|
+
position,
|
|
14
|
+
fallbackPositions,
|
|
15
|
+
open = false,
|
|
16
|
+
onStatusChange,
|
|
17
|
+
wrapper,
|
|
18
|
+
className,
|
|
19
|
+
flip = true,
|
|
20
|
+
containerClassName,
|
|
21
|
+
stopPropagation,
|
|
22
|
+
arrow = true
|
|
23
|
+
} = _ref;
|
|
24
|
+
const [showPopper, setShowPopper] = useState(open);
|
|
25
|
+
const referenceElement = useRef(null);
|
|
26
|
+
const [popperElement, setPopperElement] = useState(null);
|
|
27
|
+
const [arrowElement, setArrowElement] = useState(null);
|
|
28
|
+
const popperElRef = useRef(null);
|
|
29
|
+
const combinedRef = useForkRef(popperElRef, setPopperElement);
|
|
30
|
+
const classes = classNames(className);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
setShowPopper(open);
|
|
33
|
+
}, [open]);
|
|
34
|
+
const {
|
|
35
|
+
styles,
|
|
36
|
+
attributes
|
|
37
|
+
} = usePopper(referenceElement.current, popperElement, {
|
|
38
|
+
placement: position,
|
|
39
|
+
modifiers: [{
|
|
40
|
+
name: 'arrow',
|
|
41
|
+
options: {
|
|
42
|
+
element: arrowElement
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
name: 'offset',
|
|
46
|
+
options: {
|
|
47
|
+
offset: [0, 24]
|
|
48
|
+
}
|
|
49
|
+
}, {
|
|
50
|
+
name: 'flip',
|
|
51
|
+
options: {
|
|
52
|
+
fallbackPlacements: flip ? fallbackPositions : [position || 'auto']
|
|
53
|
+
}
|
|
54
|
+
}]
|
|
55
|
+
});
|
|
56
|
+
const handleChange = (e, status) => {
|
|
57
|
+
if (stopPropagation) {
|
|
58
|
+
e?.stopPropagation();
|
|
59
|
+
}
|
|
60
|
+
setShowPopper(status);
|
|
61
|
+
if (onStatusChange) {
|
|
62
|
+
onStatusChange(status);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
function closePopover(event) {
|
|
66
|
+
handleChange(event, false);
|
|
67
|
+
}
|
|
68
|
+
useOnClickOutside(popperElRef, closePopover, referenceElement);
|
|
69
|
+
function handleKeyDown(event) {
|
|
70
|
+
if (event.key === 'Enter') {
|
|
71
|
+
handleChange(undefined, true);
|
|
72
|
+
}
|
|
73
|
+
if (event.key === 'Escape') {
|
|
74
|
+
handleChange(undefined, false);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function handleKeyUp(event) {
|
|
78
|
+
if (event.key === ' ') {
|
|
79
|
+
handleChange(undefined, true);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const childrenWrapper = /*#__PURE__*/_jsx("div", {
|
|
83
|
+
tabIndex: 0,
|
|
84
|
+
role: "button",
|
|
85
|
+
className: classes,
|
|
86
|
+
ref: referenceElement,
|
|
87
|
+
onKeyDown: handleKeyDown,
|
|
88
|
+
onKeyUp: handleKeyUp,
|
|
89
|
+
onClick: e => handleChange(e, !showPopper),
|
|
90
|
+
children: children
|
|
91
|
+
});
|
|
92
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
93
|
+
children: [wrapper ? wrapper(childrenWrapper) : childrenWrapper, showPopper && /*#__PURE__*/_jsxs("div", {
|
|
94
|
+
className: classNames('fwe-popover-container', containerClassName),
|
|
95
|
+
ref: combinedRef,
|
|
96
|
+
style: styles.popper,
|
|
97
|
+
...attributes.popper,
|
|
98
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
99
|
+
className: "fwe-popover",
|
|
100
|
+
children: popoverContent
|
|
101
|
+
}), arrow && /*#__PURE__*/_jsx("div", {
|
|
102
|
+
ref: setArrowElement,
|
|
103
|
+
style: styles.arrow,
|
|
104
|
+
id: "arrow"
|
|
105
|
+
})]
|
|
106
|
+
})]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
export default Popover;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PopoverProps } from '../popover/Popover';
|
|
3
|
-
import './PopoverMenu.scss';
|
|
4
|
-
interface PopoverMenuItem {
|
|
5
|
-
text: string;
|
|
6
|
-
icon: string;
|
|
7
|
-
action?: (data: unknown) => void;
|
|
8
|
-
data: unknown;
|
|
9
|
-
}
|
|
10
|
-
export interface PopoverMenuProps extends Omit<PopoverProps, 'popoverContent' | 'children' | 'open' | 'onStatusChange'> {
|
|
11
|
-
icon: string;
|
|
12
|
-
menu: PopoverMenuItem[];
|
|
13
|
-
}
|
|
14
|
-
declare function PopoverMenu({ icon, menu, className, ...props }: PopoverMenuProps): JSX.Element;
|
|
15
|
-
export default PopoverMenu;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PopoverProps } from '../popover/Popover';
|
|
3
|
+
import './PopoverMenu.scss';
|
|
4
|
+
interface PopoverMenuItem {
|
|
5
|
+
text: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
action?: (data: unknown) => void;
|
|
8
|
+
data: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface PopoverMenuProps extends Omit<PopoverProps, 'popoverContent' | 'children' | 'open' | 'onStatusChange'> {
|
|
11
|
+
icon: string;
|
|
12
|
+
menu: PopoverMenuItem[];
|
|
13
|
+
}
|
|
14
|
+
declare function PopoverMenu({ icon, menu, className, ...props }: PopoverMenuProps): JSX.Element;
|
|
15
|
+
export default PopoverMenu;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import Popover from '../popover/Popover';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
function PopoverMenu(_ref) {
|
|
7
|
+
let {
|
|
8
|
+
icon,
|
|
9
|
+
menu,
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
} = _ref;
|
|
13
|
+
const [showPopper, setShowPopper] = useState(false);
|
|
14
|
+
const handleClick = item => {
|
|
15
|
+
if (item.action) {
|
|
16
|
+
item.action(item.data);
|
|
17
|
+
}
|
|
18
|
+
setShowPopper(false);
|
|
19
|
+
};
|
|
20
|
+
const content = /*#__PURE__*/_jsx("ul", {
|
|
21
|
+
className: "fwe-list-group",
|
|
22
|
+
children: menu.map(item => /*#__PURE__*/_jsx("li", {
|
|
23
|
+
className: "fwe-list-group-item",
|
|
24
|
+
children: /*#__PURE__*/_jsxs("button", {
|
|
25
|
+
type: "button",
|
|
26
|
+
className: "fwe-btn fwe-btn-link fwe-dark",
|
|
27
|
+
onClick: () => handleClick(item),
|
|
28
|
+
children: [/*#__PURE__*/_jsx("i", {
|
|
29
|
+
className: `fwe-icon fwe-pr-0 ${item.icon}`
|
|
30
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
31
|
+
children: item.text
|
|
32
|
+
})]
|
|
33
|
+
})
|
|
34
|
+
}, item.icon + item.text))
|
|
35
|
+
});
|
|
36
|
+
return /*#__PURE__*/_jsx("div", {
|
|
37
|
+
className: classNames('fwe-popover-menu', className),
|
|
38
|
+
children: /*#__PURE__*/_jsx(Popover, {
|
|
39
|
+
popoverContent: content,
|
|
40
|
+
position: "right",
|
|
41
|
+
open: showPopper,
|
|
42
|
+
onStatusChange: setShowPopper,
|
|
43
|
+
...props,
|
|
44
|
+
children: /*#__PURE__*/_jsx("button", {
|
|
45
|
+
type: "button",
|
|
46
|
+
className: "fwe-btn fwe-btn-link fwe-dark origin",
|
|
47
|
+
children: /*#__PURE__*/_jsx("i", {
|
|
48
|
+
className: `fwe-icon fwe-pr-0 ${icon}`
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export default PopoverMenu;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Placement } from '@popperjs/core';
|
|
3
|
-
import { ClassNamePropsWithChildren } from '../../../helper/types';
|
|
4
|
-
import './Tooltip.scss';
|
|
5
|
-
export interface PopoverMenuProps extends ClassNamePropsWithChildren {
|
|
6
|
-
title: string;
|
|
7
|
-
position?: Placement;
|
|
8
|
-
}
|
|
9
|
-
declare function Tooltip({ children, className, title, position }: PopoverMenuProps): JSX.Element;
|
|
10
|
-
export default Tooltip;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Placement } from '@popperjs/core';
|
|
3
|
+
import { ClassNamePropsWithChildren } from '../../../helper/types';
|
|
4
|
+
import './Tooltip.scss';
|
|
5
|
+
export interface PopoverMenuProps extends ClassNamePropsWithChildren {
|
|
6
|
+
title: string;
|
|
7
|
+
position?: Placement;
|
|
8
|
+
}
|
|
9
|
+
declare function Tooltip({ children, className, title, position }: PopoverMenuProps): JSX.Element;
|
|
10
|
+
export default Tooltip;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useRef, useState } from 'react';
|
|
2
|
+
import { usePopper } from 'react-popper';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
function Tooltip(_ref) {
|
|
8
|
+
let {
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
title,
|
|
12
|
+
position = 'bottom'
|
|
13
|
+
} = _ref;
|
|
14
|
+
const [showPopper, setShowPopper] = useState(false);
|
|
15
|
+
const referenceElement = useRef(null);
|
|
16
|
+
const [popperElement, setPopperElement] = useState(null);
|
|
17
|
+
const [arrowElement, setArrowElement] = useState(null);
|
|
18
|
+
const {
|
|
19
|
+
styles,
|
|
20
|
+
attributes
|
|
21
|
+
} = usePopper(referenceElement.current, popperElement, {
|
|
22
|
+
placement: position,
|
|
23
|
+
modifiers: [{
|
|
24
|
+
name: 'arrow',
|
|
25
|
+
options: {
|
|
26
|
+
element: arrowElement
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
name: 'offset',
|
|
30
|
+
options: {
|
|
31
|
+
offset: [0, 24]
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
34
|
+
name: 'flip',
|
|
35
|
+
options: {
|
|
36
|
+
fallbackPlacements: ['right', 'left', 'top']
|
|
37
|
+
}
|
|
38
|
+
}]
|
|
39
|
+
});
|
|
40
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
41
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
42
|
+
className: classNames('fr-tooltip-container', className),
|
|
43
|
+
ref: referenceElement,
|
|
44
|
+
onMouseEnter: () => setShowPopper(true),
|
|
45
|
+
onMouseLeave: () => setShowPopper(false),
|
|
46
|
+
children: children
|
|
47
|
+
}), showPopper && /*#__PURE__*/_jsxs("div", {
|
|
48
|
+
className: "fwe-popover-container",
|
|
49
|
+
id: "tooltip",
|
|
50
|
+
ref: setPopperElement,
|
|
51
|
+
style: styles.popper,
|
|
52
|
+
...attributes.popper,
|
|
53
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
54
|
+
ref: setArrowElement,
|
|
55
|
+
style: styles.arrow,
|
|
56
|
+
id: "arrow"
|
|
57
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
58
|
+
className: "fwe-popover",
|
|
59
|
+
children: title
|
|
60
|
+
})]
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
export default Tooltip;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ClassNameProps } from '../../helper/types';
|
|
3
|
-
interface ProgressProps extends ClassNameProps {
|
|
4
|
-
progress: number;
|
|
5
|
-
background?: 'white' | 'black' | 'background';
|
|
6
|
-
error?: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare function Progress({ background, error, progress, className }: ProgressProps): JSX.Element;
|
|
9
|
-
export default Progress;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ClassNameProps } from '../../helper/types';
|
|
3
|
+
interface ProgressProps extends ClassNameProps {
|
|
4
|
+
progress: number;
|
|
5
|
+
background?: 'white' | 'black' | 'background';
|
|
6
|
+
error?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function Progress({ background, error, progress, className }: ProgressProps): JSX.Element;
|
|
9
|
+
export default Progress;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
function Progress(_ref) {
|
|
4
|
+
let {
|
|
5
|
+
background = 'white',
|
|
6
|
+
error = false,
|
|
7
|
+
progress,
|
|
8
|
+
className
|
|
9
|
+
} = _ref;
|
|
10
|
+
const classes = classNames('fwe-progress-bar', {
|
|
11
|
+
'fwe-bg-red': error
|
|
12
|
+
}, {
|
|
13
|
+
'fwe-progress-bar-black': background === 'black'
|
|
14
|
+
}, {
|
|
15
|
+
'fwe-progress-bar-background': background === 'background'
|
|
16
|
+
});
|
|
17
|
+
return /*#__PURE__*/_jsx("div", {
|
|
18
|
+
className: classNames('fwe-progress', className),
|
|
19
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
20
|
+
className: classes,
|
|
21
|
+
role: "progressbar",
|
|
22
|
+
style: {
|
|
23
|
+
width: `${progress}%`
|
|
24
|
+
},
|
|
25
|
+
"aria-valuenow": progress,
|
|
26
|
+
"aria-valuemin": 0,
|
|
27
|
+
"aria-valuemax": 100,
|
|
28
|
+
"aria-label": "progressbar"
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export default Progress;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './SearchInput.scss';
|
|
3
|
+
import SearchSuggestion from './SearchSuggestion';
|
|
4
|
+
interface SearchInputProps {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
suggestions?: SearchSuggestion[];
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
onKeyboardNavigate?: (value: string) => void;
|
|
12
|
+
onSearch?: (value: string) => void;
|
|
13
|
+
}
|
|
14
|
+
declare function SearchInput({ defaultValue, disabled, label, value, suggestions, onChange, onSearch, onKeyboardNavigate, }: SearchInputProps): JSX.Element;
|
|
15
|
+
export default SearchInput;
|