@festo-ui/react 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/index.d.ts +27 -18
- package/{react.esm.css → index.esm.css} +815 -488
- package/index.esm.js +4771 -0
- package/{react.umd.css → index.umd.css} +815 -488
- package/index.umd.js +5204 -0
- package/lib/components/accordion/Accordion.d.ts +9 -0
- package/lib/components/accordion/AccordionContext.d.ts +11 -0
- package/lib/components/accordion/accordion-header/AccordionHeader.d.ts +4 -0
- package/lib/components/accordion/accordion-item/AccordionItem.d.ts +9 -0
- package/lib/components/accordion/accordion-item/AccordionItemContext.d.ts +8 -0
- package/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.d.ts +4 -0
- package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.d.ts +4 -0
- package/lib/components/buttons/button/Button.d.ts +1 -0
- package/lib/components/chips/chip/Chip.d.ts +1 -1
- package/lib/components/modals/ConfirmModal.d.ts +2 -1
- package/lib/components/modals/ModalFooter.d.ts +1 -4
- package/lib/components/stepper-horizontal/StepperHorizontal.d.ts +7 -0
- package/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.d.ts +7 -0
- package/lib/components/stepper-vertical/StepperVertical.d.ts +7 -0
- package/lib/components/stepper-vertical/step-vertical/StepVertical.d.ts +12 -0
- package/lib/components/tab/Tabs.d.ts +7 -5
- package/lib/components/tab/tab-pane/TabPane.d.ts +3 -2
- package/lib/components/tab/useTabScroll.d.ts +24 -0
- package/lib/forms/color-picker/ColorPicker.d.ts +1 -1
- package/lib/forms/radio/RadioButton.d.ts +1 -1
- package/lib/forms/radio/RadioGroup.d.ts +1 -1
- package/lib/forms/slider/Slider.d.ts +1 -1
- package/lib/forms/text-editor/TextEditor.d.ts +1 -1
- package/lib/forms/time-picker/TimePicker.d.ts +18 -0
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerDropdown.d.ts +12 -0
- package/lib/helper/useControlled.d.ts +6 -0
- package/lib/helper/useOnClickOutside.d.ts +2 -0
- package/package.json +6 -6
- package/react.esm.js +0 -3499
- package/react.umd.js +0 -3562
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './Accordion.scss';
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
interface AccordionProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
showMore?: string;
|
|
5
|
+
showLess?: string;
|
|
6
|
+
keepItemsOpen?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const Accordion: import("react").ForwardRefExoticComponent<AccordionProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export default Accordion;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ContextProps {
|
|
3
|
+
showMore: string;
|
|
4
|
+
showLess: string;
|
|
5
|
+
parentId: string;
|
|
6
|
+
keepItemsOpen: boolean;
|
|
7
|
+
expanded: boolean | string;
|
|
8
|
+
toggle: (id: string, expanded: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const AccordionContext: import("react").Context<Partial<ContextProps>>;
|
|
11
|
+
export default AccordionContext;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './AccordionHeader.scss';
|
|
3
|
+
declare const AccordionHeader: import("react").ForwardRefExoticComponent<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export default AccordionHeader;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './AccordionItem.scss';
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
interface AccordionItemProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
|
|
4
|
+
expanded?: boolean;
|
|
5
|
+
defaultExpanded?: boolean;
|
|
6
|
+
onChange?: (event: React.SyntheticEvent, expanded: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const AccordionItem: import("react").ForwardRefExoticComponent<AccordionItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export default AccordionItem;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './AccordionItemBody.scss';
|
|
3
|
+
declare const AccordionItemBody: import("react").ForwardRefExoticComponent<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export default AccordionItemBody;
|
package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './AccordionItemHeader.scss';
|
|
3
|
+
declare const AccordionItemHeader: import("react").ForwardRefExoticComponent<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export default AccordionItemHeader;
|
|
@@ -15,5 +15,5 @@ interface ChipProps extends ClassNamePropsWithChildren {
|
|
|
15
15
|
large?: boolean;
|
|
16
16
|
onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
17
17
|
}
|
|
18
|
-
declare function Chip({ type, selected, disabled, large, icon, children, onClick, className
|
|
18
|
+
declare function Chip({ type, selected, disabled, large, icon, children, onClick, className }: ChipProps): JSX.Element;
|
|
19
19
|
export default Chip;
|
|
@@ -7,6 +7,7 @@ interface ConfirmModalProps extends Omit<ModalProps, 'head' | 'children'> {
|
|
|
7
7
|
ok?: string;
|
|
8
8
|
onCancel?: () => void;
|
|
9
9
|
onOk?: () => void;
|
|
10
|
+
large?: boolean;
|
|
10
11
|
}
|
|
11
|
-
declare function ConfirmModal({ title, subtitle, body, className, cancel, ok, onCancel, onOk, isOpen, ...props }: ConfirmModalProps): JSX.Element;
|
|
12
|
+
declare function ConfirmModal({ title, subtitle, body, className, cancel, ok, onCancel, onOk, isOpen, large, ...props }: ConfirmModalProps): JSX.Element;
|
|
12
13
|
export default ConfirmModal;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ClassNamePropsWithChildren } from '../../helper/types';
|
|
3
|
-
|
|
4
|
-
fullWidth?: boolean;
|
|
5
|
-
}
|
|
6
|
-
declare const ModalFooter: React.ForwardRefExoticComponent<ModalFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const ModalFooter: React.ForwardRefExoticComponent<ClassNamePropsWithChildren & React.RefAttributes<HTMLDivElement>>;
|
|
7
4
|
export default ModalFooter;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
interface StepperHorizontalProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
|
|
3
|
+
stepIndex?: number;
|
|
4
|
+
onChange?: (stepIndex: number) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const StepperHorizontal: React.ForwardRefExoticComponent<StepperHorizontalProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default StepperHorizontal;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import './StepHorizontal.scss';
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
interface StepHorizontalProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const StepHorizontal: import("react").ForwardRefExoticComponent<StepHorizontalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default StepHorizontal;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
interface StepperVerticalProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
|
|
3
|
+
stepIndex?: number;
|
|
4
|
+
onChange?: (stepIndex: number) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const StepperVertical: React.ForwardRefExoticComponent<StepperVerticalProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default StepperVertical;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './StepVertical.scss';
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
interface StepVerticalProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
isLastElement?: boolean;
|
|
6
|
+
isDone?: boolean;
|
|
7
|
+
index?: number;
|
|
8
|
+
title?: string;
|
|
9
|
+
onStepClick?: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare const StepVertical: import("react").ForwardRefExoticComponent<StepVerticalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export default StepVertical;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ClassNamePropsWithChildren } from '../../helper/types';
|
|
3
1
|
import './Tabs.scss';
|
|
2
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
4
3
|
declare type TabItemAppearance = 'fill' | 'equal' | 'default';
|
|
4
|
+
export declare type TabViewType = 'legacy' | 'responsive';
|
|
5
5
|
export interface TabsConfiguration {
|
|
6
6
|
tabBar?: {
|
|
7
7
|
fullWidth?: boolean;
|
|
@@ -10,12 +10,14 @@ export interface TabsConfiguration {
|
|
|
10
10
|
appearance: TabItemAppearance;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
interface TabsProps extends
|
|
14
|
-
config
|
|
13
|
+
interface TabsProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
|
|
14
|
+
config?: TabsConfiguration;
|
|
15
|
+
viewType?: TabViewType;
|
|
16
|
+
showDivider?: boolean;
|
|
15
17
|
onChange?: (value: {
|
|
16
18
|
previous: string;
|
|
17
19
|
current: string;
|
|
18
20
|
}) => void;
|
|
19
21
|
}
|
|
20
|
-
declare
|
|
22
|
+
export declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
23
|
export default Tabs;
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
import { ClassNamePropsWithChildren } from '../../../helper/types';
|
|
3
3
|
import './TabPane.scss';
|
|
4
4
|
export interface TabPaneProps extends ClassNamePropsWithChildren {
|
|
5
|
-
id
|
|
5
|
+
id?: string;
|
|
6
6
|
name: string;
|
|
7
7
|
icon?: string;
|
|
8
8
|
active?: boolean;
|
|
9
9
|
isVisible?: boolean;
|
|
10
|
+
tabId?: string;
|
|
10
11
|
}
|
|
11
|
-
declare function TabPane({ isVisible, children, className }: TabPaneProps): JSX.Element;
|
|
12
|
+
declare function TabPane({ isVisible, children, className, tabId, id }: TabPaneProps): JSX.Element;
|
|
12
13
|
export default TabPane;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
export interface TabDimensions {
|
|
3
|
+
rootLeft: number;
|
|
4
|
+
rootRight: number;
|
|
5
|
+
contentLeft: number;
|
|
6
|
+
contentRight: number;
|
|
7
|
+
}
|
|
8
|
+
export interface TabScrollAnimation {
|
|
9
|
+
finalScrollPosition: number;
|
|
10
|
+
scrollDelta: number;
|
|
11
|
+
}
|
|
12
|
+
export interface TabScrollHorizontalEdges {
|
|
13
|
+
left: number;
|
|
14
|
+
right: number;
|
|
15
|
+
}
|
|
16
|
+
declare type TypeHandleTabScroll = (e: React.MouseEvent<HTMLButtonElement>, index: number) => void;
|
|
17
|
+
interface Refs {
|
|
18
|
+
elRef: React.MutableRefObject<HTMLDivElement>;
|
|
19
|
+
scrollContent: React.MutableRefObject<HTMLDivElement>;
|
|
20
|
+
scrollArea: React.MutableRefObject<HTMLDivElement>;
|
|
21
|
+
}
|
|
22
|
+
declare type TypeUseTabScroll = (tabLength: number, componentId: string, refs: Refs) => [TypeHandleTabScroll, string, CSSProperties];
|
|
23
|
+
declare const useTabScroll: TypeUseTabScroll;
|
|
24
|
+
export default useTabScroll;
|
|
@@ -11,5 +11,5 @@ interface ColorPickerProps extends ClassNameProps {
|
|
|
11
11
|
onChange?: (color?: string | null) => void;
|
|
12
12
|
onAlphaChange?: (alpha?: number) => void;
|
|
13
13
|
}
|
|
14
|
-
declare function ColorPicker({ palette, useAlpha, alpha, paletteOnly, color, onChange, onAlphaChange, className
|
|
14
|
+
declare function ColorPicker({ palette, useAlpha, alpha, paletteOnly, color, onChange, onAlphaChange, className }: ColorPickerProps): JSX.Element;
|
|
15
15
|
export default ColorPicker;
|
|
@@ -11,5 +11,5 @@ export interface RadioButtonProps extends ClassNamePropsWithChildren {
|
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
required?: boolean;
|
|
13
13
|
}
|
|
14
|
-
declare function RadioButton({ id, onChange, value, name, checked, labelPosition, large, disabled, required, children, className
|
|
14
|
+
declare function RadioButton({ id, onChange, value, name, checked, labelPosition, large, disabled, required, children, className }: RadioButtonProps): JSX.Element;
|
|
15
15
|
export default RadioButton;
|
|
@@ -9,5 +9,5 @@ interface RadioGroupProps extends ClassNamePropsWithChildren {
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
required?: boolean;
|
|
11
11
|
}
|
|
12
|
-
declare function RadioGroup({ value, name, checked, labelPosition, large, disabled, required, children, className
|
|
12
|
+
declare function RadioGroup({ value, name, checked, labelPosition, large, disabled, required, children, className }: RadioGroupProps): JSX.Element;
|
|
13
13
|
export default RadioGroup;
|
|
@@ -13,5 +13,5 @@ interface SliderProps extends ClassNameProps {
|
|
|
13
13
|
showValue?: boolean;
|
|
14
14
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: number) => void;
|
|
15
15
|
}
|
|
16
|
-
declare function Slider({ disabled, label, large, max, min, onChange, onChangeCommitted, step, value, showValue, className
|
|
16
|
+
declare function Slider({ disabled, label, large, max, min, onChange, onChangeCommitted, step, value, showValue, className }: SliderProps): JSX.Element;
|
|
17
17
|
export default Slider;
|
|
@@ -25,5 +25,5 @@ export interface TextEditorProps {
|
|
|
25
25
|
className?: string;
|
|
26
26
|
config?: TextEditorConfiguration;
|
|
27
27
|
}
|
|
28
|
-
export declare function TextEditor({ disabled, label, maxLength, value, hint, error, readOnly, onChange, className, config: configProps
|
|
28
|
+
export declare function TextEditor({ disabled, label, maxLength, value, hint, error, readOnly, onChange, className, config: configProps }: TextEditorProps): JSX.Element;
|
|
29
29
|
export default TextEditor;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface TimePickerOptions {
|
|
3
|
+
timeFormat?: '12' | '24';
|
|
4
|
+
showSeconds?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface TimePickerProps extends Omit<ComponentPropsWithoutRef<'label'>, 'value' | 'defaultValue' | 'onChange'> {
|
|
7
|
+
error?: string;
|
|
8
|
+
hint?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
value?: Date;
|
|
12
|
+
defaultValue?: Date;
|
|
13
|
+
options?: TimePickerOptions;
|
|
14
|
+
formatDate?: (date: Date) => string;
|
|
15
|
+
onChange?: (date: Date) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<HTMLLabelElement>>;
|
|
18
|
+
export default TimePicker;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './TimePickerDropdown.scss';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface TimePickerDropdownProps {
|
|
4
|
+
timeFormat: '12' | '24';
|
|
5
|
+
date: Date;
|
|
6
|
+
onDateChange: (date: Date) => void;
|
|
7
|
+
showSeconds?: boolean;
|
|
8
|
+
onClose: (date?: Date) => void;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
declare const TimePickerDropdown: React.ForwardRefExoticComponent<TimePickerDropdownProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export default TimePickerDropdown;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
export interface UseControlledProps<T> {
|
|
3
|
+
controlled: T | undefined;
|
|
4
|
+
default: T | undefined;
|
|
5
|
+
}
|
|
6
|
+
export default function useControlled<T>({ controlled, default: defaultValue }: UseControlledProps<T>): [T, Dispatch<SetStateAction<T>>];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@festo-ui/react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"author": "Festo UI (styleguide@festo.com)",
|
|
5
5
|
"license": "apache-2.0",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
"react-dom": "^17.0.2",
|
|
9
9
|
"@festo-ui/web-essentials": "*"
|
|
10
10
|
},
|
|
11
|
-
"main": "./
|
|
12
|
-
"module": "./
|
|
11
|
+
"main": "./index.umd.js",
|
|
12
|
+
"module": "./index.esm.js",
|
|
13
13
|
"typings": "./index.d.ts",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"classnames": "^2.2.6",
|
|
16
16
|
"react-transition-group": "^4.4.2",
|
|
17
17
|
"react-outside-click-handler": "^1.3.0",
|
|
18
18
|
"react-popper": "^2.2.5",
|
|
19
|
-
"@popperjs/core": "^2.
|
|
19
|
+
"@popperjs/core": "^2.11.0",
|
|
20
20
|
"react-draggable": "^4.4.4",
|
|
21
|
-
"flatpickr": "^4.6.
|
|
22
|
-
"quill": "
|
|
21
|
+
"flatpickr": "^4.6.9",
|
|
22
|
+
"quill": "1.3.7",
|
|
23
23
|
"xss": "^1.0.10"
|
|
24
24
|
}
|
|
25
25
|
}
|