kwant-ui 3.21.4 → 3.21.5

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.
Files changed (26) hide show
  1. package/dist/components/Calendar/CalendarComponents.d.ts +1 -6
  2. package/dist/components/Calendar/CalendarTypes.d.ts +10 -0
  3. package/dist/components/Calendar/CalendarUtils.d.ts +11 -3
  4. package/dist/components/Charts/GaugeChart/GaugeChart.d.ts +3 -0
  5. package/dist/components/Charts/GaugeChart/GaugeChartStyled.d.ts +9 -0
  6. package/dist/components/Charts/GaugeChart/GaugeChartTypes.d.ts +26 -0
  7. package/dist/components/Charts/GaugeChart/index.d.ts +2 -0
  8. package/dist/components/Charts/HorizontalStackedBarChart/HorizontalStackedBarChart.d.ts +3 -0
  9. package/dist/components/Charts/HorizontalStackedBarChart/HorizontalStackedBarChartData.d.ts +19 -0
  10. package/dist/components/Charts/HorizontalStackedBarChart/HorizontalStackedBarChartStyled.d.ts +18 -0
  11. package/dist/components/Charts/HorizontalStackedBarChart/HorizontalStackedBarChartTypes.d.ts +60 -0
  12. package/dist/components/Charts/HorizontalStackedBarChart/HorizontalStackedBarChartUtils.d.ts +10 -0
  13. package/dist/components/Charts/HorizontalStackedBarChart/index.d.ts +2 -0
  14. package/dist/components/Charts/ProgressChart/ProgressChart.d.ts +3 -0
  15. package/dist/components/Charts/ProgressChart/ProgressChartStyled.d.ts +1 -0
  16. package/dist/components/Charts/ProgressChart/ProgressChartTypes.d.ts +13 -0
  17. package/dist/components/Charts/ProgressChart/index.d.ts +2 -0
  18. package/dist/index.d.ts +4 -0
  19. package/dist/index.es.js +333 -231
  20. package/dist/index.js +343 -241
  21. package/dist/package.json +3 -1
  22. package/dist/public/assets/icons/Compare.svg +1 -0
  23. package/dist/public/assets/icons/Notifications.svg +1 -0
  24. package/dist/public/assets/icons/Search.svg +1 -0
  25. package/dist/types/IconTypes.d.ts +1 -1
  26. package/package.json +3 -1
@@ -1,11 +1,6 @@
1
1
  import { DateObject } from 'react-multi-date-picker';
2
2
  import { ICalendar } from './CalendarTypes';
3
- export type SidebarOptionProps = {
4
- title: string;
5
- selected?: boolean;
6
- value?: () => DateObject[];
7
- onClick?: () => void;
8
- };
3
+ export type SidebarOptionProps = ICalendar.SidebarOptionProps;
9
4
  export declare const SidebarOption: ({ title, selected, onClick }: SidebarOptionProps) => import("react/jsx-runtime").JSX.Element;
10
5
  export declare const CalendarSidebar: ({ options, selectedOption, onOptionClick, }: {
11
6
  options?: Pick<SidebarOptionProps, 'title' | 'selected' | 'value'>[];
@@ -1,14 +1,18 @@
1
1
  /// <reference types="react" />
2
2
  import { CalendarProps, DateObject } from 'react-multi-date-picker';
3
+ export type RangeDomainUnit = 'd' | 'w' | 'm' | 'y';
4
+ export type RangeDomain = `${number}${RangeDomainUnit}`;
3
5
  export declare namespace ICalendar {
4
6
  type Props = CalendarProps & {
5
7
  range?: boolean;
6
8
  numberOfMonths?: number;
7
9
  calenderRef?: any;
8
10
  showSidebar?: boolean;
11
+ sidebarOptions?: Omit<SidebarOptionProps, 'onClick'>[];
9
12
  projectDuration?: ProjectDuration;
10
13
  disableFutureDatesOnCustomRange?: boolean;
11
14
  selectedSidebarOption?: string;
15
+ rangeDomain?: RangeDomain;
12
16
  onChange?: (date: DateObject | DateObject[], selectedOption?: string) => void;
13
17
  };
14
18
  enum DatpickerNavigationDirectionEnum {
@@ -21,4 +25,10 @@ export declare namespace ICalendar {
21
25
  };
22
26
  type InputChangeEvent = React.ChangeEvent<HTMLInputElement>;
23
27
  type DatpickerNavigationDirection = keyof typeof DatpickerNavigationDirectionEnum;
28
+ type SidebarOptionProps = {
29
+ title: string;
30
+ selected?: boolean;
31
+ value?: () => DateObject[];
32
+ onClick?: () => void;
33
+ };
24
34
  }
@@ -1,18 +1,26 @@
1
- import { DateObject } from 'react-multi-date-picker';
2
- import { ICalendar } from './CalendarTypes';
1
+ import dayjs from 'dayjs';
2
+ import { DateObject, Value } from 'react-multi-date-picker';
3
+ import { ICalendar, RangeDomain } from './CalendarTypes';
3
4
  export declare const isRangeWithNumberOfMonths: (range: boolean, numberOfMonths: number) => boolean;
4
5
  declare const regexInputValidate: (event: ICalendar.InputChangeEvent, onChange: (event: ICalendar.InputChangeEvent) => void) => void;
5
6
  declare const weeks: string[];
6
7
  declare const fullMonthsText: any;
8
+ export declare const getDateObjectForCalendarConstants: (date: string | Date, amount: number, unit: dayjs.ManipulateType, end: 'startOf' | 'endOf') => DateObject;
7
9
  export declare const CALENDAR_CONSTANTS: {
8
10
  TODAY: DateObject[];
9
11
  CURRENT_WEEK: DateObject[];
10
12
  LAST_7_DAYS: DateObject[];
13
+ LAST_WEEK: DateObject[];
14
+ LAST_2_WEEKS: DateObject[];
15
+ LAST_3_WEEKS: DateObject[];
16
+ LAST_4_WEEKS: DateObject[];
11
17
  LAST_30_DAYS: DateObject[];
12
18
  THIS_MONTH: DateObject[];
19
+ CUSTOM_RANGE: DateObject[];
13
20
  };
14
21
  export declare const getSidebarOptions: (projectDuration?: ICalendar.ProjectDuration) => {
15
22
  title: string;
16
23
  value: () => DateObject[];
17
24
  }[];
18
- export { fullMonthsText, regexInputValidate, weeks };
25
+ declare const getDateOffset: (valueArr: Value, domain: RangeDomain) => DateObject[];
26
+ export { fullMonthsText, regexInputValidate, weeks, getDateOffset };
@@ -0,0 +1,3 @@
1
+ import { IGaugeChart } from './GaugeChartTypes';
2
+ declare const GaugeChart: (props: IGaugeChart.Props) => import("react/jsx-runtime").JSX.Element;
3
+ export default GaugeChart;
@@ -0,0 +1,9 @@
1
+ declare const Gauge: import("styled-components").StyledComponent<"svg", any, {}, never>;
2
+ declare const Label: import("styled-components").StyledComponent<"text", any, {}, never>;
3
+ declare const LowLabel: import("styled-components").StyledComponent<"text", any, {
4
+ width: number;
5
+ }, never>;
6
+ declare const HighLabel: import("styled-components").StyledComponent<"text", any, {
7
+ width: number;
8
+ }, never>;
9
+ export { Gauge, Label, LowLabel, HighLabel };
@@ -0,0 +1,26 @@
1
+ export declare namespace IGaugeChart {
2
+ type Props = {
3
+ width?: number;
4
+ height?: number;
5
+ value?: number;
6
+ maxValue?: number;
7
+ rangeLabel?: string[];
8
+ };
9
+ }
10
+ export type GaugeChart = {
11
+ dataKey: string;
12
+ name: string;
13
+ stroke?: string;
14
+ fill?: string;
15
+ fillOpacity?: number;
16
+ color?: string;
17
+ gradientId?: string;
18
+ [key: string]: any;
19
+ };
20
+ export interface IKPIGauge {
21
+ className?: string;
22
+ value: number;
23
+ maxValue: number;
24
+ width: number;
25
+ height: number;
26
+ }
@@ -0,0 +1,2 @@
1
+ import GaugeChart from './GaugeChart';
2
+ export { GaugeChart };
@@ -0,0 +1,3 @@
1
+ import { IHorizontalStackedBarChart } from './HorizontalStackedBarChartTypes';
2
+ declare const HorizontalStackedBarChart: (props: IHorizontalStackedBarChart.Props) => import("react/jsx-runtime").JSX.Element;
3
+ export default HorizontalStackedBarChart;
@@ -0,0 +1,19 @@
1
+ import { YAxisProps } from 'recharts';
2
+ import { Props as StackedBarProps } from 'recharts/types/cartesian/Area';
3
+ export declare const data: {
4
+ name: string;
5
+ series1: number;
6
+ series2: number;
7
+ series3: number;
8
+ }[];
9
+ export declare const areas: ({
10
+ dataKey: string;
11
+ fillOpacity: number;
12
+ name: string;
13
+ } | {
14
+ dataKey: string;
15
+ fillOpacity: number;
16
+ name?: undefined;
17
+ })[];
18
+ export declare const yAxisStaticProps: YAxisProps;
19
+ export declare const areaStaticProps: Omit<Partial<StackedBarProps>, 'ref'>;
@@ -0,0 +1,18 @@
1
+ export declare const LegendsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const Legend: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const LegendColorContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const LegendColor: import("styled-components").StyledComponent<"div", any, {
5
+ color: string;
6
+ }, never>;
7
+ export declare const LegendLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const CustomTickStyled: import("styled-components").StyledComponent<"g", any, {}, never>;
9
+ export declare const TickDay: import("styled-components").StyledComponent<"text", any, {}, never>;
10
+ export declare const TooltipStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
11
+ export declare const TooltipTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
12
+ export declare const TooltipItemContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
13
+ export declare const TooltipItemLeft: import("styled-components").StyledComponent<"div", any, {}, never>;
14
+ export declare const TooltipItemColor: import("styled-components").StyledComponent<"div", any, {
15
+ color: string;
16
+ }, never>;
17
+ export declare const TooltipItemLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
18
+ export declare const TooltipItemRight: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -0,0 +1,60 @@
1
+ /// <reference types="react" />
2
+ import { XAxisProps, YAxisProps } from 'recharts';
3
+ import { Props as AreaProps } from 'recharts/types/cartesian/Area';
4
+ import { Props as CartesianGridProps } from 'recharts/types/cartesian/CartesianGrid';
5
+ import { Payload } from 'recharts/types/component/DefaultLegendContent';
6
+ import { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';
7
+ import { Props as LegendProps } from 'recharts/types/component/Legend';
8
+ import { ContentType, TooltipProps } from 'recharts/types/component/Tooltip';
9
+ export declare namespace IHorizontalStackedBarChart {
10
+ type Props = {
11
+ width?: string | number;
12
+ height?: string | number;
13
+ margin?: {
14
+ top?: number;
15
+ right?: number;
16
+ bottom?: number;
17
+ left?: number;
18
+ };
19
+ data?: any[];
20
+ bar1DataKey: string;
21
+ bar2DataKey: string;
22
+ bars?: StackedBar[];
23
+ label?: StackedBar[];
24
+ areasYAxisRight?: StackedBar[];
25
+ xAxisDataKey?: string;
26
+ showTooltip?: boolean;
27
+ xAxisLabel?: string;
28
+ yAxisLabel?: string;
29
+ showRightYAxis?: boolean;
30
+ showLegends?: boolean;
31
+ customTooltip?: ContentType<ValueType, NameType>;
32
+ gradient?: React.ReactNode;
33
+ tooltipProps?: TooltipProps<ValueType, NameType>;
34
+ cartesianGridProps?: Omit<CartesianGridProps, 'ref'>;
35
+ legendProps?: Omit<LegendProps, 'ref'>;
36
+ xAxisProps?: XAxisProps;
37
+ yAxisProps?: YAxisProps;
38
+ yAxisRightProps?: YAxisProps;
39
+ areaProps?: AreaProps;
40
+ areaYAxisRightProps?: AreaProps;
41
+ customTooltipLabelFormatter?: (label: any) => string;
42
+ };
43
+ type StackedBar = {
44
+ dataKey: string;
45
+ name: string;
46
+ stroke?: string;
47
+ fill?: string;
48
+ fillOpacity?: number;
49
+ color?: string;
50
+ gradientId?: string;
51
+ [key: string]: any;
52
+ };
53
+ type CustomLegend = {
54
+ payload?: (Payload & {
55
+ payload: Payload['payload'] & {
56
+ fill: string;
57
+ };
58
+ })[];
59
+ };
60
+ }
@@ -0,0 +1,10 @@
1
+ import { TooltipProps } from 'recharts';
2
+ import { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';
3
+ import { IHorizontalStackedBarChart } from './HorizontalStackedBarChartTypes';
4
+ export declare const CustomLegend: (props: IHorizontalStackedBarChart.CustomLegend) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const TooltipItemRow: ({ color, name, value, }: {
6
+ color?: string;
7
+ name?: string;
8
+ value?: string;
9
+ }) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const CustomTooltip: (props: TooltipProps<ValueType, NameType>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import HorizontalStackedBarChart from './HorizontalStackedBarChart';
2
+ export { HorizontalStackedBarChart };
@@ -0,0 +1,3 @@
1
+ import { IProgressChart } from './ProgressChartTypes';
2
+ declare const ProgressChart: (props: IProgressChart.Props) => import("react/jsx-runtime").JSX.Element;
3
+ export default ProgressChart;
@@ -0,0 +1 @@
1
+ export declare const ProgressChartContainer: import("styled-components").StyledComponent<"svg", any, {}, never>;
@@ -0,0 +1,13 @@
1
+ export declare namespace IProgressChart {
2
+ type Props = {
3
+ width?: number;
4
+ height?: number;
5
+ value?: number;
6
+ maxValue?: number;
7
+ radius?: number;
8
+ font?: number;
9
+ cornerRadius?: number;
10
+ rangeLabel?: string[];
11
+ showText?: boolean;
12
+ };
13
+ }
@@ -0,0 +1,2 @@
1
+ import ProgressChart from './ProgressChart';
2
+ export { ProgressChart };
package/dist/index.d.ts CHANGED
@@ -57,3 +57,7 @@ export * from './components/Charts/AreaChart';
57
57
  export * from './components/Charts/WeekwiseBarChart';
58
58
  export * from './components/Charts/StackedBarChart';
59
59
  export { processWeekwiseBarChartData } from './components/Charts/WeekwiseBarChart/WeekwiseBarChartData';
60
+ export * from './components/Charts/HorizontalStackedBarChart';
61
+ export * from './components/Charts/GaugeChart';
62
+ export * from './components/Charts/ProgressChart';
63
+ export { CALENDAR_CONSTANTS, getDateObjectForCalendarConstants, } from './components/Calendar/CalendarUtils';