@osrd-project/ui-core 0.0.83 → 0.0.85
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/index.d.ts +382 -20
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2101 -0
- package/dist/index.js.map +1 -0
- package/dist/theme.css +1202 -983
- package/package.json +16 -16
- package/dist/components/Button.d.ts +0 -16
- package/dist/components/Checkbox/Checkbox.d.ts +0 -9
- package/dist/components/Checkbox/CheckboxList.d.ts +0 -12
- package/dist/components/Checkbox/CheckboxTree.d.ts +0 -11
- package/dist/components/Checkbox/__tests__/utils.spec.d.ts +0 -1
- package/dist/components/Checkbox/index.d.ts +0 -4
- package/dist/components/Checkbox/type.d.ts +0 -14
- package/dist/components/Checkbox/utils.d.ts +0 -15
- package/dist/components/ComboBox/ComboBox.d.ts +0 -34
- package/dist/components/ComboBox/index.d.ts +0 -2
- package/dist/components/ComboBox/useDefaultComboBox.d.ts +0 -6
- package/dist/components/DatePicker/Calendar.d.ts +0 -10
- package/dist/components/DatePicker/CalendarPicker.d.ts +0 -19
- package/dist/components/DatePicker/DatePicker.d.ts +0 -28
- package/dist/components/DatePicker/__tests__/useCalendar.spec.d.ts +0 -9
- package/dist/components/DatePicker/__tests__/useCalendarPicker.spec.d.ts +0 -1
- package/dist/components/DatePicker/__tests__/useDatePicker.spec.d.ts +0 -1
- package/dist/components/DatePicker/__tests__/utils.spec.d.ts +0 -1
- package/dist/components/DatePicker/index.d.ts +0 -2
- package/dist/components/DatePicker/type.d.ts +0 -4
- package/dist/components/DatePicker/useCalendar.d.ts +0 -7
- package/dist/components/DatePicker/useCalendarPicker.d.ts +0 -9
- package/dist/components/DatePicker/useDatePicker.d.ts +0 -18
- package/dist/components/DatePicker/utils.d.ts +0 -113
- package/dist/components/Dialog.d.ts +0 -22
- package/dist/components/FieldWrapper.d.ts +0 -22
- package/dist/components/Hint.d.ts +0 -6
- package/dist/components/Input.d.ts +0 -27
- package/dist/components/InputModal.d.ts +0 -10
- package/dist/components/InputStatusIcon.d.ts +0 -9
- package/dist/components/Label.d.ts +0 -11
- package/dist/components/PasswordInput.d.ts +0 -21
- package/dist/components/RadioButton.d.ts +0 -9
- package/dist/components/RadioGroup.d.ts +0 -17
- package/dist/components/SegmentedControl.d.ts +0 -12
- package/dist/components/Select.d.ts +0 -12
- package/dist/components/Slider.d.ts +0 -9
- package/dist/components/StatusMessage.d.ts +0 -17
- package/dist/components/Table/Table.d.ts +0 -15
- package/dist/components/Table/tableAmbientThemes.d.ts +0 -22
- package/dist/components/TextArea.d.ts +0 -5
- package/dist/components/TimePicker.d.ts +0 -16
- package/dist/components/TokenInput.d.ts +0 -7
- package/dist/components/TolerancePicker/TolerancePicker.d.ts +0 -14
- package/dist/components/TolerancePicker/ToleranceRangeGrid.d.ts +0 -8
- package/dist/components/TolerancePicker/consts.d.ts +0 -4
- package/dist/hooks/__tests__/useOutsideClick.spec.d.ts +0 -1
- package/dist/hooks/useFocusByTab.d.ts +0 -11
- package/dist/hooks/useModalPosition.d.ts +0 -7
- package/dist/hooks/useOutsideClick.d.ts +0 -2
- package/dist/index.esm.js +0 -1462
- package/dist/index.esm.js.map +0 -1
- package/dist/theme.css.map +0 -1
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type FieldWrapperProps } from './FieldWrapper';
|
|
3
|
-
export type SelectProps<T> = Omit<React.InputHTMLAttributes<HTMLSelectElement>, 'value' | 'onChange'> & Omit<FieldWrapperProps, 'children'> & {
|
|
4
|
-
options: Array<T>;
|
|
5
|
-
value?: T;
|
|
6
|
-
dataTestId?: string;
|
|
7
|
-
getOptionLabel: (option: T) => string;
|
|
8
|
-
getOptionValue: (option: T) => string;
|
|
9
|
-
onChange: (option?: T) => void;
|
|
10
|
-
};
|
|
11
|
-
declare const Select: <T>({ id, label, hint, value, options, placeholder, statusWithMessage, required, disabled, narrow, readOnly, small, getOptionLabel, getOptionValue, onChange, dataTestId, ...props }: SelectProps<T>) => React.JSX.Element;
|
|
12
|
-
export default Select;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { MouseEvent, KeyboardEvent, InputHTMLAttributes } from 'react';
|
|
3
|
-
export type SliderProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
-
width?: number;
|
|
5
|
-
onChangeCommitted?: (e: MouseEvent<HTMLInputElement> | KeyboardEvent<HTMLInputElement>) => void;
|
|
6
|
-
containerClassName?: string;
|
|
7
|
-
};
|
|
8
|
-
declare const Slider: ({ id, value: initialValue, min, max, step, width, onChange, onChangeCommitted, disabled, className, containerClassName, ...rest }: SliderProps) => React.JSX.Element;
|
|
9
|
-
export default Slider;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type Status = 'success' | 'info' | 'error' | 'warning' | 'loading';
|
|
3
|
-
export type TooltipType = 'left' | 'right';
|
|
4
|
-
export type StatusWithMessage = {
|
|
5
|
-
tooltip?: TooltipType;
|
|
6
|
-
status: Status;
|
|
7
|
-
message?: string;
|
|
8
|
-
};
|
|
9
|
-
export type StatusMessageProps = {
|
|
10
|
-
statusWithMessage: StatusWithMessage;
|
|
11
|
-
showIcon?: boolean;
|
|
12
|
-
small?: boolean;
|
|
13
|
-
onClose?: () => void;
|
|
14
|
-
testIdPrefix?: string;
|
|
15
|
-
};
|
|
16
|
-
declare const StatusMessage: ({ statusWithMessage, showIcon, small, onClose, testIdPrefix, }: StatusMessageProps) => React.JSX.Element | null;
|
|
17
|
-
export default StatusMessage;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type AmbientVariant } from './tableAmbientThemes';
|
|
3
|
-
interface TableColumn {
|
|
4
|
-
key: string;
|
|
5
|
-
label: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
type TableValue = string | number | boolean | null | undefined;
|
|
9
|
-
interface TableProps {
|
|
10
|
-
columns: Array<TableColumn>;
|
|
11
|
-
data: Array<Record<string, TableValue>>;
|
|
12
|
-
ambientVariant?: AmbientVariant;
|
|
13
|
-
}
|
|
14
|
-
declare const Table: ({ columns, data, ambientVariant }: TableProps) => React.JSX.Element;
|
|
15
|
-
export default Table;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export type AmbientVariant = 'A' | 'B' | 'C' | 'D';
|
|
2
|
-
export declare const colors: {
|
|
3
|
-
ambientA5: string;
|
|
4
|
-
ambientA10: string;
|
|
5
|
-
ambientA15: string;
|
|
6
|
-
ambientB5: string;
|
|
7
|
-
ambientB10: string;
|
|
8
|
-
ambientB15: string;
|
|
9
|
-
ambientC5: string;
|
|
10
|
-
ambientC10: string;
|
|
11
|
-
ambientC15: string;
|
|
12
|
-
ambientD5: string;
|
|
13
|
-
ambientD10: string;
|
|
14
|
-
ambientD15: string;
|
|
15
|
-
blackAlpha: string;
|
|
16
|
-
};
|
|
17
|
-
export declare const TABLE_AMBIENT_THEMES: Record<AmbientVariant, {
|
|
18
|
-
mix1: string;
|
|
19
|
-
mix2: string;
|
|
20
|
-
odd: string;
|
|
21
|
-
even: string;
|
|
22
|
-
}>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type FieldWrapperProps } from './FieldWrapper';
|
|
3
|
-
export type TextAreaProps = React.InputHTMLAttributes<HTMLTextAreaElement> & Omit<FieldWrapperProps, 'children'>;
|
|
4
|
-
declare const TextArea: ({ id, label, value, hint, required, disabled, statusWithMessage, maxLength, onChange, onKeyUp, onBlur, ...rest }: TextAreaProps) => React.JSX.Element;
|
|
5
|
-
export default TextArea;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type InputProps } from './Input';
|
|
3
|
-
export type TimePickerProps = Omit<InputProps, 'type' | 'name' | 'value' | 'onClick' | 'onChange' | 'ref' | 'step'> & {
|
|
4
|
-
hours?: number;
|
|
5
|
-
minutes?: number;
|
|
6
|
-
seconds?: number;
|
|
7
|
-
displaySeconds?: boolean;
|
|
8
|
-
onTimeChange: ({ hours, minutes, seconds, }: {
|
|
9
|
-
hours: number;
|
|
10
|
-
minutes: number;
|
|
11
|
-
seconds?: number;
|
|
12
|
-
}) => void;
|
|
13
|
-
testIdPrefix?: string;
|
|
14
|
-
};
|
|
15
|
-
declare const TimePicker: ({ onTimeChange, hours, minutes, seconds, displaySeconds, testIdPrefix, ...otherProps }: TimePickerProps) => React.JSX.Element;
|
|
16
|
-
export default TimePicker;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type InputProps } from '../Input';
|
|
3
|
-
export type ToleranceValues = {
|
|
4
|
-
minusTolerance: number;
|
|
5
|
-
plusTolerance: number;
|
|
6
|
-
};
|
|
7
|
-
export type TolerancePickerProps = Omit<InputProps, 'value'> & {
|
|
8
|
-
onToleranceChange: (toleranceValues: ToleranceValues) => void;
|
|
9
|
-
toleranceValues?: ToleranceValues;
|
|
10
|
-
translateWarningMessage?: (invalidTolerance: number) => string;
|
|
11
|
-
testIdPrefix?: string;
|
|
12
|
-
};
|
|
13
|
-
declare const TolerancePicker: ({ onToleranceChange, toleranceValues: { minusTolerance, plusTolerance }, translateWarningMessage, testIdPrefix, ...inputProps }: TolerancePickerProps) => React.JSX.Element;
|
|
14
|
-
export default TolerancePicker;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type ToleranceRangeGridProps = {
|
|
3
|
-
onSelection: (value: number) => void;
|
|
4
|
-
selectedTolerance: number;
|
|
5
|
-
toleranceSign: 'minus' | 'plus';
|
|
6
|
-
};
|
|
7
|
-
declare const ToleranceRangeGrid: ({ onSelection, selectedTolerance, toleranceSign, }: ToleranceRangeGridProps) => React.JSX.Element;
|
|
8
|
-
export default ToleranceRangeGrid;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type FocusEvent, type KeyboardEvent, type FocusEventHandler, type KeyboardEventHandler } from 'react';
|
|
2
|
-
type UseFocusByTabProps = {
|
|
3
|
-
onBlur?: FocusEventHandler<HTMLElement>;
|
|
4
|
-
onKeyUp?: KeyboardEventHandler<HTMLElement>;
|
|
5
|
-
};
|
|
6
|
-
declare function useFocusByTab({ onBlur, onKeyUp }: UseFocusByTabProps): {
|
|
7
|
-
handleKeyUp: (event: KeyboardEvent<HTMLElement>) => void;
|
|
8
|
-
handleBlur: (event: FocusEvent<HTMLElement>) => void;
|
|
9
|
-
isFocusByTab: boolean;
|
|
10
|
-
};
|
|
11
|
-
export default useFocusByTab;
|