@ssa-ui-kit/core 2.9.0 → 2.9.1

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.
@@ -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<AccordionProps> | [];
45
+ openedAccordions: Array<OpenedAccordion> | [];
43
46
  stayOpen: boolean;
44
- setOpenedAccordions: (accordions: Array<AccordionProps>) => void;
45
- toggleOpenedAccordion: (accordion: AccordionProps) => void;
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,2 @@
1
+ import { GaugeBarProps } from '../types';
2
+ export declare const GaugeBar: ({ title, value, min, max, gap, brickWidth, thresholds, valueFormatter, }: GaugeBarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './BarGaugeChartHeader';
2
+ export * from './GaugeBar';
3
+ export * from './Brick';
@@ -0,0 +1,2 @@
1
+ export * from './BarGaugeChart';
2
+ export * from './types';
@@ -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
+ }
@@ -5,3 +5,4 @@ export * from './TreeMapChart';
5
5
  export * from './common';
6
6
  export * from './hooks';
7
7
  export * from './GaugeChart';
8
+ export * from './BarGaugeChart';
@@ -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,3 @@
1
+ import { StrictRJSFSchema, UiSchema } from '@rjsf/utils';
2
+ export declare const getFieldsToHide: (schema: StrictRJSFSchema, searchQuery: string) => string[];
3
+ export declare const applyHiddenWidget: (uiSchema: UiSchema, pathsToHide: string[]) => UiSchema;
@@ -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';
@@ -1,4 +1,6 @@
1
1
  export * from './Typeahead';
2
+ export * from './types';
3
+ export { useTypeaheadContext } from './Typeahead.context';
2
4
  export * from './components/TypeaheadOptions';
3
5
  export * from './components/TypeaheadOption';
4
6
  export * from './components/TypeaheadItem';
@@ -99,6 +99,7 @@ export * from './TableFilters';
99
99
  export * from './Tag';
100
100
  export * from './Textarea';
101
101
  export * from './TextField';
102
+ export * from './NumberField';
102
103
  export * from './Tooltip';
103
104
  export * from './Typeahead';
104
105
  export * from './Typography';