@ssa-ui-kit/core 2.9.0 → 2.10.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/dist/components/AccordionGroup/types.d.ts +6 -3
- package/dist/components/Charts/BarGaugeChart/BarGaugeChart.d.ts +6 -0
- package/dist/components/Charts/BarGaugeChart/components/BarGaugeChartHeader.d.ts +5 -0
- package/dist/components/Charts/BarGaugeChart/components/Brick.d.ts +8 -0
- package/dist/components/Charts/BarGaugeChart/components/GaugeBar.d.ts +2 -0
- package/dist/components/Charts/BarGaugeChart/components/index.d.ts +3 -0
- package/dist/components/Charts/BarGaugeChart/index.d.ts +2 -0
- package/dist/components/Charts/BarGaugeChart/types.d.ts +27 -0
- package/dist/components/Charts/BigNumberChart/BigNumberChart.d.ts +18 -0
- package/dist/components/Charts/BigNumberChart/components/BigNumberChartHeader.d.ts +8 -0
- package/dist/components/Charts/BigNumberChart/components/TrendLine.d.ts +7 -0
- package/dist/components/Charts/BigNumberChart/components/TrendLineTooltip.d.ts +5 -0
- package/dist/components/Charts/BigNumberChart/components/index.d.ts +3 -0
- package/dist/components/Charts/BigNumberChart/index.d.ts +1 -0
- package/dist/components/Charts/index.d.ts +2 -0
- package/dist/components/JsonSchemaForm/fields/AccordionField.d.ts +6 -0
- package/dist/components/JsonSchemaForm/fields/DateRangeField.d.ts +2 -0
- package/dist/components/JsonSchemaForm/fields/index.d.ts +4 -0
- package/dist/components/JsonSchemaForm/index.d.ts +2 -1
- package/dist/components/JsonSchemaForm/utils/index.d.ts +1 -0
- package/dist/components/JsonSchemaForm/utils/schema.d.ts +3 -0
- package/dist/components/JsonSchemaForm/widgets/DateWidget.d.ts +2 -0
- package/dist/components/NumberField/NumberField.d.ts +18 -0
- package/dist/components/NumberField/index.d.ts +1 -0
- package/dist/components/Typeahead/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +819 -63
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
|
@@ -38,11 +38,14 @@ export interface AccordionViewProps extends AccordionProps {
|
|
|
38
38
|
children?: React.ReactNode;
|
|
39
39
|
contentProps?: Record<string, unknown>;
|
|
40
40
|
}
|
|
41
|
+
export type OpenedAccordion = {
|
|
42
|
+
id: string | number;
|
|
43
|
+
};
|
|
41
44
|
export interface AccordionGroupContextProps {
|
|
42
|
-
openedAccordions: Array<
|
|
45
|
+
openedAccordions: Array<OpenedAccordion> | [];
|
|
43
46
|
stayOpen: boolean;
|
|
44
|
-
setOpenedAccordions: (accordions: Array<
|
|
45
|
-
toggleOpenedAccordion: (accordion:
|
|
47
|
+
setOpenedAccordions: (accordions: Array<OpenedAccordion>) => void;
|
|
48
|
+
toggleOpenedAccordion: (accordion: OpenedAccordion, opened?: boolean) => void;
|
|
46
49
|
setStayOpen: (isStayOpen: boolean) => void;
|
|
47
50
|
}
|
|
48
51
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BarGaugeChartProps } from './types';
|
|
2
|
+
export declare const BarGaugeChartComponent: ({ title, widgetCardProps, bars, features, }: BarGaugeChartProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const BarGaugeChart: {
|
|
4
|
+
(props: BarGaugeChartProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BarGaugeChartHeaderProps } from '../types';
|
|
2
|
+
export declare const FullScreenButton: import("@emotion/styled").StyledComponent<import("../../../Button/types").ButtonProps & import("react").RefAttributes<HTMLButtonElement> & {
|
|
3
|
+
theme?: import("@emotion/react").Theme;
|
|
4
|
+
}, {}, {}>;
|
|
5
|
+
export declare const BarGaugeChartHeader: <F extends string[]>({ features, }: BarGaugeChartHeaderProps<F>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const Brick: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
} & {
|
|
5
|
+
$width: number;
|
|
6
|
+
$color: string;
|
|
7
|
+
$inactive: boolean;
|
|
8
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { MustInclude } from '@ssa-ui-kit/utils';
|
|
2
|
+
import { WidgetCardProps } from '../../WidgetCard';
|
|
3
|
+
export type BarGaugeChartFeature = 'header' | 'fullscreenMode';
|
|
4
|
+
export type GaugeBarThreshold = {
|
|
5
|
+
value: number;
|
|
6
|
+
color: string;
|
|
7
|
+
};
|
|
8
|
+
export type GaugeBarValueFormatter = (value: number, color: string) => React.ReactNode;
|
|
9
|
+
export interface BarGaugeChartHeaderProps<T extends string[]> {
|
|
10
|
+
features: MustInclude<T, 'fullscreenMode'>;
|
|
11
|
+
}
|
|
12
|
+
export interface GaugeBarProps {
|
|
13
|
+
value: number;
|
|
14
|
+
valueFormatter?: GaugeBarValueFormatter;
|
|
15
|
+
title?: React.ReactNode;
|
|
16
|
+
thresholds?: GaugeBarThreshold[];
|
|
17
|
+
gap?: number;
|
|
18
|
+
brickWidth?: number;
|
|
19
|
+
min?: number;
|
|
20
|
+
max?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface BarGaugeChartProps {
|
|
23
|
+
title?: string;
|
|
24
|
+
widgetCardProps?: WidgetCardProps;
|
|
25
|
+
bars?: GaugeBarProps[];
|
|
26
|
+
features?: BarGaugeChartFeature[];
|
|
27
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Datum } from '@nivo/line';
|
|
2
|
+
import { WidgetCardProps } from '../../index';
|
|
3
|
+
import { TrendLineProps } from './components';
|
|
4
|
+
export type BigNumberChartFeatures = 'header' | 'fullscreenMode';
|
|
5
|
+
export interface BigNumberChartProps {
|
|
6
|
+
data: Datum[];
|
|
7
|
+
interactive?: boolean;
|
|
8
|
+
title?: string;
|
|
9
|
+
widgetCardProps?: WidgetCardProps;
|
|
10
|
+
trendLineProps?: Omit<TrendLineProps, 'data'>;
|
|
11
|
+
features?: BigNumberChartFeatures[];
|
|
12
|
+
valueFormat?: (value: Datum) => React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const BigNumberChartComponent: ({ data, title, widgetCardProps, trendLineProps, interactive, features, valueFormat, }: BigNumberChartProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const BigNumberChart: {
|
|
16
|
+
(props: BigNumberChartProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MustInclude } from '@ssa-ui-kit/utils';
|
|
2
|
+
export declare const FullScreenButton: import("@emotion/styled").StyledComponent<import("../../../Button/types").ButtonProps & import("react").RefAttributes<HTMLButtonElement> & {
|
|
3
|
+
theme?: import("@emotion/react").Theme;
|
|
4
|
+
}, {}, {}>;
|
|
5
|
+
export interface BigNumberChartHeaderProps<T extends string[]> {
|
|
6
|
+
features: MustInclude<T, 'fullscreenMode'>;
|
|
7
|
+
}
|
|
8
|
+
export declare const BigNumberChartHeader: <F extends string[]>({ features, }: BigNumberChartHeaderProps<F>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LineProps } from '@nivo/line';
|
|
2
|
+
import { TrendLineTooltipProps } from './TrendLineTooltip';
|
|
3
|
+
export interface TrendLineProps extends LineProps {
|
|
4
|
+
color?: string;
|
|
5
|
+
tooltipValueFormat?: TrendLineTooltipProps['valueFormat'];
|
|
6
|
+
}
|
|
7
|
+
export declare const TrendLine: ({ color, tooltipValueFormat, ...props }: TrendLineProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Point, PointTooltipProps } from '@nivo/line';
|
|
2
|
+
export type TrendLineTooltipProps = PointTooltipProps & {
|
|
3
|
+
valueFormat?: (data: Point['data']) => React.ReactNode;
|
|
4
|
+
};
|
|
5
|
+
export declare const TrendLineTooltip: ({ point, valueFormat, }: TrendLineTooltipProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BigNumberChart';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
export type AccordionOptions = {
|
|
3
|
+
targetField: string;
|
|
4
|
+
collapsed?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const AccordionField: <T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>(props: FieldProps<T, S, F>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
export declare const DateRangeField: <T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>(props: FieldProps<T, S, F>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FormContextType, RegistryFieldsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
export declare const generateFields: <T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>() => RegistryFieldsType<T, S, F>;
|
|
3
|
+
declare const _default: RegistryFieldsType<unknown, RJSFSchema, Record<string, unknown>>;
|
|
4
|
+
export default _default;
|
|
@@ -3,10 +3,11 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
|
3
3
|
import { FormProps, ThemeProps } from '@rjsf/core';
|
|
4
4
|
import Templates, { generateTemplates } from './templates';
|
|
5
5
|
import Widgets, { generateWidgets } from './widgets';
|
|
6
|
+
import Fields, { generateFields } from './fields';
|
|
6
7
|
export declare function generateTheme<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>(): ThemeProps<T, S, F>;
|
|
7
8
|
declare const Theme: ThemeProps<unknown, RJSFSchema, Record<string, unknown>>;
|
|
8
9
|
export declare function generateForm<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>(): ComponentType<FormProps<T, S, F>>;
|
|
9
10
|
declare const Form: import("@emotion/styled").StyledComponent<FormProps<unknown, RJSFSchema, Record<string, unknown>> & {
|
|
10
11
|
theme?: import("@emotion/react").Theme;
|
|
11
12
|
}, {}, {}>;
|
|
12
|
-
export { Form, Templates, Theme, Widgets, generateTemplates, generateWidgets };
|
|
13
|
+
export { Form, Templates, Theme, Widgets, Fields, generateTemplates, generateWidgets, generateFields, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './schema';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
2
|
+
export declare const DateWidget: <T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>(props: WidgetProps<T, S, F>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NumberFormatOptions } from '@react-input/number-format';
|
|
2
|
+
import { InputProps } from '../Input/types';
|
|
3
|
+
import { FieldRootProps } from '../Field/FieldRoot';
|
|
4
|
+
export interface NumberFieldProps extends InputProps {
|
|
5
|
+
id?: string;
|
|
6
|
+
value?: number;
|
|
7
|
+
defaultValue?: number;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
success?: React.ReactNode;
|
|
11
|
+
error?: React.ReactNode;
|
|
12
|
+
status?: FieldRootProps['status'];
|
|
13
|
+
numberFormat?: NumberFormatOptions & {
|
|
14
|
+
locales?: Intl.LocalesArgument;
|
|
15
|
+
};
|
|
16
|
+
onChange?: (value: number) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const NumberField: ({ id, value, defaultValue, description, label, success, error, status, numberFormat, onChange, ...inputProps }: NumberFieldProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NumberField';
|