@dexma/ui-components 6.8.0 → 7.0.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.
Files changed (140) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +38 -36
  3. package/dist/index.d.ts +1 -0
  4. package/dist/lib/components/Alert/Alert.d.ts +13 -0
  5. package/dist/lib/components/Alert/index.d.ts +1 -0
  6. package/dist/lib/components/Button/Button.d.ts +50 -0
  7. package/dist/lib/components/Button/index.d.ts +1 -0
  8. package/dist/lib/components/Card/Card.d.ts +17 -0
  9. package/dist/lib/components/Card/index.d.ts +1 -0
  10. package/dist/lib/components/Cascader/Cascader.d.ts +19 -0
  11. package/dist/lib/components/Cascader/index.d.ts +1 -0
  12. package/dist/lib/components/Cell/Cell.d.ts +17 -0
  13. package/dist/lib/components/Cell/index.d.ts +1 -0
  14. package/dist/lib/components/Chart/Chart.d.ts +23 -0
  15. package/dist/lib/components/Chart/index.d.ts +1 -0
  16. package/dist/lib/components/Chart/types.d.ts +24 -0
  17. package/dist/lib/components/Checkbox/Checkbox.d.ts +9 -0
  18. package/dist/lib/components/Checkbox/index.d.ts +1 -0
  19. package/dist/lib/components/ColorPicker/ColorPicker.d.ts +15 -0
  20. package/dist/lib/components/ColorPicker/index.d.ts +1 -0
  21. package/dist/lib/components/DataId/DataIdProvider.d.ts +10 -0
  22. package/dist/lib/components/DataId/withDataId.d.ts +7 -0
  23. package/dist/lib/components/DatePicker/DatePicker.d.ts +24 -0
  24. package/dist/lib/components/DatePicker/datePickerUtils.d.ts +3 -0
  25. package/dist/lib/components/DatePicker/index.d.ts +1 -0
  26. package/dist/lib/components/Divider/Divider.d.ts +6 -0
  27. package/dist/lib/components/Divider/index.d.ts +1 -0
  28. package/dist/lib/components/Dots/Dots.d.ts +5 -0
  29. package/dist/lib/components/Dots/index.d.ts +1 -0
  30. package/dist/lib/components/Dropdown/Dropdown.d.ts +19 -0
  31. package/dist/lib/components/Dropdown/index.d.ts +1 -0
  32. package/dist/lib/components/FieldGroup/FieldGroup.d.ts +62 -0
  33. package/dist/lib/components/FieldGroup/index.d.ts +1 -0
  34. package/dist/lib/components/FormControl/FormControl.d.ts +35 -0
  35. package/dist/lib/components/FormControl/index.d.ts +1 -0
  36. package/dist/lib/components/Gauge/Gauge.d.ts +234 -0
  37. package/dist/lib/components/Gauge/index.d.ts +1 -0
  38. package/dist/lib/components/Grid/Grid.d.ts +5 -0
  39. package/dist/lib/components/Grid/index.d.ts +1 -0
  40. package/dist/lib/components/Heading/Heading.d.ts +10 -0
  41. package/dist/lib/components/Heading/index.d.ts +1 -0
  42. package/dist/lib/components/Icon/Icon.d.ts +17 -0
  43. package/dist/lib/components/Icon/index.d.ts +1 -0
  44. package/dist/lib/components/Input/Input.d.ts +17 -0
  45. package/dist/lib/components/Input/index.d.ts +1 -0
  46. package/dist/lib/components/Loading/Loading.d.ts +10 -0
  47. package/dist/lib/components/Loading/index.d.ts +1 -0
  48. package/dist/lib/components/Modal/Modal.d.ts +3 -0
  49. package/dist/lib/components/Modal/index.d.ts +1 -0
  50. package/dist/lib/components/Pagination/Pagination.d.ts +6 -0
  51. package/dist/lib/components/Pagination/index.d.ts +1 -0
  52. package/dist/lib/components/Paragraph/Paragraph.d.ts +9 -0
  53. package/dist/lib/components/Paragraph/index.d.ts +1 -0
  54. package/dist/lib/components/Popover/Popover.d.ts +6 -0
  55. package/dist/lib/components/Popover/index.d.ts +1 -0
  56. package/dist/lib/components/Progress/Progress.d.ts +12 -0
  57. package/dist/lib/components/Progress/index.d.ts +1 -0
  58. package/dist/lib/components/Result/Result.d.ts +20 -0
  59. package/dist/lib/components/Result/index.d.ts +1 -0
  60. package/dist/lib/components/Row/Row.d.ts +8 -0
  61. package/dist/lib/components/Row/index.d.ts +1 -0
  62. package/dist/lib/components/Section/Section.d.ts +15 -0
  63. package/dist/lib/components/Section/index.d.ts +1 -0
  64. package/dist/lib/components/Select/ButtonPaginationSelector.d.ts +18 -0
  65. package/dist/lib/components/Select/Select.d.ts +58 -0
  66. package/dist/lib/components/Select/index.d.ts +1 -0
  67. package/dist/lib/components/Select/selectUtils.d.ts +21 -0
  68. package/dist/lib/components/Spinner/Spinner.d.ts +4 -0
  69. package/dist/lib/components/Spinner/index.d.ts +1 -0
  70. package/dist/lib/components/Switch/Switch.d.ts +19 -0
  71. package/dist/lib/components/Switch/index.d.ts +1 -0
  72. package/dist/lib/components/SwitchPeriodComparative/SwitchPeriodComparative.d.ts +24 -0
  73. package/dist/lib/components/SwitchPeriodComparative/index.d.ts +1 -0
  74. package/dist/lib/components/Table/Table.d.ts +16 -0
  75. package/dist/lib/components/Table/index.d.ts +1 -0
  76. package/dist/lib/components/Tabs/Tabs.d.ts +16 -0
  77. package/dist/lib/components/Tabs/index.d.ts +1 -0
  78. package/dist/lib/components/Tag/Tag.d.ts +22 -0
  79. package/dist/lib/components/Tag/index.d.ts +1 -0
  80. package/dist/lib/components/TagGroup/TagGroup.d.ts +7 -0
  81. package/dist/lib/components/TagGroup/index.d.ts +1 -0
  82. package/dist/lib/components/Theme/Theme.d.ts +8 -0
  83. package/dist/lib/components/Theme/index.d.ts +1 -0
  84. package/dist/lib/components/Toaster/Toast.d.ts +12 -0
  85. package/dist/lib/components/Toaster/Toaster.d.ts +7 -0
  86. package/dist/lib/components/Toaster/ToasterContext.d.ts +11 -0
  87. package/dist/lib/components/Toaster/index.d.ts +3 -0
  88. package/dist/lib/components/Tooltip/Tooltip.d.ts +8 -0
  89. package/dist/lib/components/Tooltip/index.d.ts +1 -0
  90. package/dist/lib/components/index.d.ts +42 -0
  91. package/dist/lib/index.d.ts +5 -0
  92. package/dist/lib/styles/Alert/StyledAlert.d.ts +12 -0
  93. package/dist/lib/styles/Button/StyledButton.d.ts +44 -0
  94. package/dist/lib/styles/Card/StyledCard.d.ts +14 -0
  95. package/dist/lib/styles/Cascader/StyledCascader.d.ts +11 -0
  96. package/dist/lib/styles/Cell/StyledCell.d.ts +16 -0
  97. package/dist/lib/styles/Chart/StyledChart.d.ts +3 -0
  98. package/dist/lib/styles/ColorPicker/StyledColorPicker.d.ts +50 -0
  99. package/dist/lib/styles/DatePicker/StyledDatePicker.d.ts +25 -0
  100. package/dist/lib/styles/Divider/StyledDivider.d.ts +7 -0
  101. package/dist/lib/styles/Dots/StyledDots.d.ts +10 -0
  102. package/dist/lib/styles/Dropdown/StyledDropdown.d.ts +88 -0
  103. package/dist/lib/styles/Fieldgroup/StyledFieldGroup.d.ts +16 -0
  104. package/dist/lib/styles/FromControl/StyledFormControl.d.ts +5 -0
  105. package/dist/lib/styles/Grid/StyledGrid.d.ts +7 -0
  106. package/dist/lib/styles/Heading/StyledHeading.d.ts +8 -0
  107. package/dist/lib/styles/Icon/StyledIcon.d.ts +5 -0
  108. package/dist/lib/styles/Input/StyledInput.d.ts +11 -0
  109. package/dist/lib/styles/Loading/StyledLoading.d.ts +2 -0
  110. package/dist/lib/styles/Modal/StyledModal.d.ts +14 -0
  111. package/dist/lib/styles/Pagination/StyledPagination.d.ts +7 -0
  112. package/dist/lib/styles/Paragraph/StyledParagraph.d.ts +9 -0
  113. package/dist/lib/styles/Progress/StyledProgress.d.ts +14 -0
  114. package/dist/lib/styles/Result/StyledResult.d.ts +10 -0
  115. package/dist/lib/styles/Row/StyledRow.d.ts +8 -0
  116. package/dist/lib/styles/Section/StyledSection.d.ts +9 -0
  117. package/dist/lib/styles/Select/StyledSelect.d.ts +98 -0
  118. package/dist/lib/styles/Spinner/StyledSpinner.d.ts +9 -0
  119. package/dist/lib/styles/Switch/StyledSwitch.d.ts +2 -0
  120. package/dist/lib/styles/SwitchPeriodComparative/StyledSwitchPeriodComparative.d.ts +7 -0
  121. package/dist/lib/styles/Table/StyledTable.d.ts +7 -0
  122. package/dist/lib/styles/Tabs/StyledTabs.d.ts +9 -0
  123. package/dist/lib/styles/Tag/StyledTag.d.ts +14 -0
  124. package/dist/lib/styles/TagGroup/StyledTagGroup.d.ts +6 -0
  125. package/dist/lib/styles/Toast/StyledToast.d.ts +2 -0
  126. package/dist/lib/utils/animation.d.ts +13 -0
  127. package/dist/lib/utils/dates.d.ts +29 -0
  128. package/dist/lib/utils/formatter.d.ts +2 -0
  129. package/dist/lib/utils/global.d.ts +4 -0
  130. package/dist/lib/utils/selectors.d.ts +113 -0
  131. package/dist/lib/utils/theme.d.ts +85 -0
  132. package/dist/ui-components.es.js +72660 -0
  133. package/dist/ui-components.umd.js +4967 -0
  134. package/package.json +42 -137
  135. package/.github/workflows/cd.yml +0 -36
  136. package/.github/workflows/ci.yml +0 -45
  137. package/CHANGELOG.md +0 -1549
  138. package/CONTRIBUTING.md +0 -154
  139. package/dist/main.bundle.js +0 -253
  140. package/dist/main.bundle.js.map +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019 DEXMA
3
+ Copyright (c) [2024] [SPACEWELL ENERGY]
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -18,33 +18,35 @@
18
18
 
19
19
  ## Table of contents
20
20
 
21
- - [Usage](#usage)
22
- - [Installation](#installation)
23
- - [Documentation](#documentation)
24
- - [Changelog](#changelog)
25
- - [Testing](#testing)
26
- - [Contributing](#contributing)
21
+ - [Usage](#usage)
22
+ - [Installation](#installation)
23
+ - [Documentation](#documentation)
24
+ - [Changelog](#changelog)
25
+ - [Testing](#testing)
26
+ - [Contributing](#contributing)
27
27
 
28
28
  ## Usage
29
29
 
30
- 1) Install with [npm](https://www.npmjs.com): `npm install --save @dexma/ui-components`
30
+ 1. Install with [npm](https://www.npmjs.com): `npm install --save @dexma/ui-components`
31
31
 
32
- 2) Use the component importing from the library
32
+ 2. Use the component importing from the library
33
33
 
34
- ```javascript
35
- import { Button } from "@dexma/ui-components";
36
- <Button text="Some text" variant="primary" size="medium"/>
34
+ ```typescript
35
+ import { Button } from '@dexma/ui-components';
36
+ <Button text='Some text' variant='primary' size='medium' />;
37
37
  ```
38
38
 
39
- 3) Optional: You can set the Theme with your personal variables, we provide the Theme component and you only need to set the options:
40
-
41
- ```javascript
42
- import { Theme, Button } from "@dexma/ui-components";
43
- <Theme options={{
44
- primary: "#aa0800"
45
- }}>
46
- <Button text="Some text" variant="primary" size="medium"/>
47
- </Theme>
39
+ 3. Optional: You can set the Theme with your personal variables, we provide the Theme component and you only need to set the options:
40
+
41
+ ```typescript
42
+ import { Theme, Button } from '@dexma/ui-components';
43
+ <Theme
44
+ options={{
45
+ primary: '#aa0800',
46
+ }}
47
+ >
48
+ <Button text='Some text' variant='primary' size='medium' />
49
+ </Theme>;
48
50
  ```
49
51
 
50
52
  You can find all the configuration in the theme file [theme.js](https://github.com/dexma/ui-components/blob/master/src/styles/theme.js)
@@ -63,8 +65,8 @@ npm install
63
65
 
64
66
  For the documentation we use storybook docs that transforms our stories into world-class component documentation.
65
67
 
66
- - Run storybook: `npm run storybook`
67
- - If you need to export static doc run `npm run build-storybook` this will export a static folder with all our component docs
68
+ - Run storybook: `npm run storybook`
69
+ - If you need to export static doc run `npm run build-storybook` this will export a static folder with all our component docs
68
70
 
69
71
  ## Changelog
70
72
 
@@ -74,25 +76,25 @@ For changelogs, check out [the CHANGELOG section of ui-components](https://githu
74
76
 
75
77
  We use React Testing Library as our testing lib you can check out the [documentation](https://testing-library.com/docs/react-testing-library/intro)
76
78
 
77
- - To run our test: `npm run test`
79
+ - To run our test: `npm run test`
78
80
 
79
- Note: Due to the use of third-party libraries, some components use methods that JSDOM (the DOM implementation used by Jest) hasn't implemented yet, testing it is not easily possible. This is the case with window.matchMedia(). Jest returns ```TypeError: window.matchMedia is not a function``` and doesn't properly execute the test.
81
+ Note: Due to the use of third-party libraries, some components use methods that JSDOM (the DOM implementation used by Jest) hasn't implemented yet, testing it is not easily possible. This is the case with window.matchMedia(). Jest returns `TypeError: window.matchMedia is not a function` and doesn't properly execute the test.
80
82
 
81
83
  In this case, to resolve this issue to execute successfully your tests when @dexma/ui-components is used, include the following code on setupTest file for Jest to mock matchMedia and it should solve the issue:
82
84
 
83
- ```javascript
85
+ ```typescript
84
86
  Object.defineProperty(window, 'matchMedia', {
85
- writable: true,
86
- value: jest.fn().mockImplementation(query => ({
87
- matches: false,
88
- media: query,
89
- onchange: null,
90
- addListener: jest.fn(), // deprecated
91
- removeListener: jest.fn(), // deprecated
92
- addEventListener: jest.fn(),
93
- removeEventListener: jest.fn(),
94
- dispatchEvent: jest.fn(),
95
- })),
87
+ writable: true,
88
+ value: jest.fn().mockImplementation((query) => ({
89
+ matches: false,
90
+ media: query,
91
+ onchange: null,
92
+ addListener: jest.fn(), // deprecated
93
+ removeListener: jest.fn(), // deprecated
94
+ addEventListener: jest.fn(),
95
+ removeEventListener: jest.fn(),
96
+ dispatchEvent: jest.fn(),
97
+ })),
96
98
  });
97
99
  ```
98
100
 
@@ -0,0 +1 @@
1
+ export * from './lib/index'
@@ -0,0 +1,13 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+
3
+ export type AlertProps = {
4
+ message?: ReactNode;
5
+ type: 'basic' | 'outline' | 'warning' | 'info' | 'success' | 'error';
6
+ onClose?: (e: any) => void;
7
+ description?: string;
8
+ showIcon?: boolean;
9
+ closable?: boolean;
10
+ className?: string;
11
+ style?: CSSProperties;
12
+ };
13
+ export declare const Alert: ({ type, closable, message, description, showIcon, onClose, ...props }: AlertProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export * from './Alert';
@@ -0,0 +1,50 @@
1
+ import { default as React, ButtonHTMLAttributes, ReactNode } from 'react';
2
+
3
+ export declare enum ButtonSize {
4
+ SMALL = "small",
5
+ MEDIUM = "medium",
6
+ LARGE = "large",
7
+ XLARGE = "xlarge"
8
+ }
9
+ export declare const BUTTON_VARIANT: string[];
10
+ export declare const ButtonGroup: (props: any) => import("react/jsx-runtime").JSX.Element;
11
+ export type ButtonProps = {
12
+ text?: string;
13
+ size?: string | ButtonSize;
14
+ variant?: string;
15
+ iconBefore?: string;
16
+ iconAfter?: string;
17
+ iconColor?: string;
18
+ tooltip?: string;
19
+ onClick?: (e?: any) => void;
20
+ onFocus?: () => void;
21
+ isLoading?: boolean;
22
+ isDisabled?: boolean;
23
+ isCircle?: boolean;
24
+ isExpanded?: boolean;
25
+ debounceTime?: number;
26
+ children?: ReactNode;
27
+ dataId?: string;
28
+ 'data-testid'?: string;
29
+ } & ButtonHTMLAttributes<HTMLButtonElement>;
30
+ export declare const Button: React.ForwardRefExoticComponent<Omit<{
31
+ text?: string;
32
+ size?: string | ButtonSize;
33
+ variant?: string;
34
+ iconBefore?: string;
35
+ iconAfter?: string;
36
+ iconColor?: string;
37
+ tooltip?: string;
38
+ onClick?: (e?: any) => void;
39
+ onFocus?: () => void;
40
+ isLoading?: boolean;
41
+ isDisabled?: boolean;
42
+ isCircle?: boolean;
43
+ isExpanded?: boolean;
44
+ debounceTime?: number;
45
+ children?: ReactNode;
46
+ dataId?: string;
47
+ 'data-testid'?: string;
48
+ } & React.ButtonHTMLAttributes<HTMLButtonElement>, "dataId"> & Partial<{
49
+ dataId?: string;
50
+ }> & React.RefAttributes<unknown>>;
@@ -0,0 +1 @@
1
+ export * from './Button';
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type CardProps = {
4
+ link?: string;
5
+ title?: string;
6
+ subtitle?: string;
7
+ description?: string;
8
+ icon?: string;
9
+ image?: string;
10
+ footer?: React.ReactNode;
11
+ isActive?: boolean;
12
+ isHorizontal?: boolean;
13
+ onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
14
+ onFocus?: (event: React.FocusEvent<HTMLAnchorElement>) => void;
15
+ };
16
+ export declare const Card: (props: CardProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default Card;
@@ -0,0 +1 @@
1
+ export * from './Card';
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { CascaderProps as CascaderAntdProps } from 'antd';
3
+ import { DefaultOptionType } from 'antd/es/cascader';
4
+ import { DefaultTheme } from 'styled-components';
5
+
6
+ type Value = Array<string | number>;
7
+ type CascaderProps<OptionType extends DefaultOptionType> = CascaderAntdProps & {
8
+ open?: boolean;
9
+ options?: OptionType[];
10
+ onChange?: (value: Value | Value[]) => void;
11
+ };
12
+ export declare const tagRender: (theme: DefaultTheme) => (props: {
13
+ label: ReactNode;
14
+ value: string;
15
+ closable: boolean;
16
+ onClose: () => void;
17
+ }) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const Cascader: <OptionType extends DefaultOptionType>({ multiple, options, maxTagCount, onChange, open, ...props }: CascaderProps<OptionType>) => import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Cascader';
@@ -0,0 +1,17 @@
1
+ import { HTMLAttributes } from 'react';
2
+
3
+ type CellProps = {
4
+ xs?: number;
5
+ sm?: number;
6
+ md?: number;
7
+ lg?: number;
8
+ xsOffset?: number;
9
+ smOffset?: number;
10
+ mdOffset?: number;
11
+ lgOffset?: number;
12
+ direction?: string;
13
+ onClick?: () => void;
14
+ ['data-testid']?: string;
15
+ } & HTMLAttributes<HTMLDivElement>;
16
+ export declare const Cell: ({ xs, sm, md, lg, xsOffset, smOffset, mdOffset, lgOffset, direction, children, onClick, ...props }: CellProps) => import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Cell';
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ import { default as Highcharts } from 'highcharts';
3
+ import { HighchartsReactRefObject } from 'highcharts-react-official';
4
+
5
+ type ChartProps = {
6
+ options?: Highcharts.Options;
7
+ isLoading?: boolean;
8
+ showError?: boolean;
9
+ errorContent?: any;
10
+ dataId?: string;
11
+ 'data-testid'?: string;
12
+ decimalPoint?: string;
13
+ thousandsSep?: string;
14
+ numericSymbols?: string[];
15
+ months?: string[];
16
+ shortMonths?: string[];
17
+ weekdays?: string[];
18
+ callback?: () => void;
19
+ };
20
+ export declare const Chart: React.ForwardRefExoticComponent<Omit<Omit<ChartProps & React.RefAttributes<HighchartsReactRefObject>, "dataId"> & Partial<{
21
+ dataId?: string;
22
+ }>, "ref"> & React.RefAttributes<unknown>>;
23
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Chart';
@@ -0,0 +1,24 @@
1
+ import { XAxisOptions, YAxisOptions, PlotOptions, PlotSeriesOptions, PlotColumnOptions } from 'highcharts';
2
+
3
+ type Modify<T, R> = Omit<T, keyof R> & R;
4
+ type ChartXAxisOptions = XAxisOptions & {
5
+ index?: number;
6
+ isX?: boolean;
7
+ };
8
+ type ChartYAxisOptions = YAxisOptions & {
9
+ index?: number;
10
+ };
11
+ export type ChartOptions = Modify<Highcharts.Options, {
12
+ xAxis?: ChartXAxisOptions | ChartXAxisOptions[];
13
+ yAxis?: ChartYAxisOptions | ChartYAxisOptions[];
14
+ plotOptions?: PlotOptions & {
15
+ series?: PlotSeriesOptions & {
16
+ grouping?: boolean;
17
+ };
18
+ column?: PlotColumnOptions & {
19
+ borderRadiusTopLeft?: number;
20
+ borderRadiusTopRight: number;
21
+ };
22
+ };
23
+ }>;
24
+ export {};
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { CheckboxProps as AntCheckboxProps } from 'antd';
3
+
4
+ export type CheckboxProps = {
5
+ dataId?: string;
6
+ } & AntCheckboxProps;
7
+ export declare const Checkbox: React.ForwardRefExoticComponent<Omit<AntCheckboxProps, "dataId"> & Partial<{
8
+ dataId?: string;
9
+ }> & React.RefAttributes<unknown>>;
@@ -0,0 +1 @@
1
+ export * from './Checkbox';
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type ColorPickerProps = {
4
+ dataId?: string;
5
+ isLoading?: boolean;
6
+ placeholder?: string;
7
+ presetColors?: string[];
8
+ onChangePicker?: (color: any) => void;
9
+ onChangeInput?: (e: any) => void;
10
+ showInput?: boolean;
11
+ value?: string;
12
+ };
13
+ export declare const ColorPicker: React.ForwardRefExoticComponent<Omit<Omit<ColorPickerProps & React.RefAttributes<HTMLInputElement>, "dataId"> & Partial<{
14
+ dataId?: string;
15
+ }>, "ref"> & React.RefAttributes<unknown>>;
@@ -0,0 +1 @@
1
+ export * from './ColorPicker';
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare const DataIdContext: React.Context<string>;
4
+ export declare const DataIdProvider: {
5
+ (props: {
6
+ children: React.ReactNode;
7
+ dataId: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ context: React.Context<string>;
10
+ };
@@ -0,0 +1,7 @@
1
+ import { default as React, ComponentType } from 'react';
2
+
3
+ type WithDataIdProps = {
4
+ dataId?: string;
5
+ };
6
+ export declare const withDataId: <P extends object>(Component: ComponentType<P & WithDataIdProps>, defaultValue: string) => React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<P, "dataId"> & Partial<WithDataIdProps>> & React.RefAttributes<unknown>>;
7
+ export {};
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ import { DatePickerProps } from 'antd';
3
+ import { RangePickerProps } from 'antd/lib/date-picker';
4
+ import { Theme } from '../../utils/theme';
5
+
6
+ type CommonProps = {
7
+ lang?: 'en' | 'bg' | 'br' | 'be' | 'ca' | 'da' | 'de' | 'el' | 'es' | 'fi' | 'fr' | 'it' | 'nl' | 'pl' | 'pt' | 'sl' | 'sv' | 'tr' | 'us' | 'zh';
8
+ dataId?: string;
9
+ 'data-testid'?: string;
10
+ theme?: Theme;
11
+ };
12
+ export type AntdDatePickerProps = DatePickerProps & CommonProps;
13
+ export declare const AntdDatePicker: React.ForwardRefExoticComponent<Omit<AntdDatePickerProps, "dataId"> & Partial<{
14
+ dataId?: string;
15
+ }> & React.RefAttributes<unknown>>;
16
+ export type AntdRangePickerProps = RangePickerProps & CommonProps;
17
+ export declare const AntdRangePicker: React.ForwardRefExoticComponent<Omit<AntdRangePickerProps, "dataId"> & Partial<{
18
+ dataId?: string;
19
+ }> & React.RefAttributes<unknown>>;
20
+ type DatePickerType = {
21
+ type: 'date' | 'range';
22
+ } & (AntdDatePickerProps | AntdRangePickerProps);
23
+ export declare const DatePicker: ({ type, ...props }: DatePickerType) => import("react/jsx-runtime").JSX.Element;
24
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Locale } from 'antd/lib/locale';
2
+
3
+ export declare const getLocale: (language: string) => Locale;
@@ -0,0 +1 @@
1
+ export * from './DatePicker';
@@ -0,0 +1,6 @@
1
+ import { HTMLAttributes } from 'react';
2
+
3
+ export type DividerProps = {
4
+ vertical?: boolean;
5
+ } & HTMLAttributes<HTMLHRElement>;
6
+ export declare const Divider: ({ vertical, ...props }: DividerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Divider';
@@ -0,0 +1,5 @@
1
+ export type DotsProps = {
2
+ steps: number;
3
+ size: number;
4
+ };
5
+ export declare const Dots: (props: DotsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Dots';
@@ -0,0 +1,19 @@
1
+ import { DropDownProps } from 'antd';
2
+
3
+ type DropdownContent = {
4
+ text: string;
5
+ key?: string;
6
+ icon?: string;
7
+ dataId?: string;
8
+ variant?: string;
9
+ onClick?: (e: any) => void;
10
+ };
11
+ export type DropdownProps = DropDownProps & {
12
+ dataId?: string;
13
+ text?: string;
14
+ icon?: string;
15
+ variant?: string;
16
+ content?: DropdownContent[];
17
+ };
18
+ export declare const Dropdown: ({ dataId, trigger, text, placement, menu, icon, content, variant }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
19
+ export default Dropdown;
@@ -0,0 +1 @@
1
+ export * from './Dropdown';
@@ -0,0 +1,62 @@
1
+ import { default as React, HTMLAttributes, ReactNode } from 'react';
2
+ import { ButtonSize } from '../index.ts';
3
+
4
+ export declare enum FieldGroupType {
5
+ RADIO = "radio",
6
+ CHECKBOX = "checkbox"
7
+ }
8
+ export declare enum FieldGroupVariant {
9
+ JOINED = "joined",
10
+ SPLIT = "split",
11
+ CUSTOM = "custom"
12
+ }
13
+ type FieldGroupProps<V> = {
14
+ selectedValues: V;
15
+ variant?: FieldGroupVariant;
16
+ values: FieldGroupItem[];
17
+ size?: ButtonSize;
18
+ name?: string;
19
+ vertical?: boolean;
20
+ onChange?: (e: FieldGroupItem) => void;
21
+ onFieldClick?: (e: FieldGroupItem) => void;
22
+ dataId?: string;
23
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;
24
+ export type FieldGroupItem = {
25
+ id: string;
26
+ label?: ReactNode;
27
+ icon?: string;
28
+ name?: string;
29
+ uniqueId?: string;
30
+ value: string;
31
+ tooltip?: string;
32
+ isDisabled?: boolean;
33
+ };
34
+ export type RadioFieldGroupProps = FieldGroupProps<string | number>;
35
+ export type CheckboxFieldGroupProps = FieldGroupProps<Array<string | number>>;
36
+ export declare const RadioFieldGroup: React.ForwardRefExoticComponent<Omit<{
37
+ selectedValues: string | number;
38
+ variant?: FieldGroupVariant;
39
+ values: FieldGroupItem[];
40
+ size?: ButtonSize;
41
+ name?: string;
42
+ vertical?: boolean;
43
+ onChange?: (e: FieldGroupItem) => void;
44
+ onFieldClick?: (e: FieldGroupItem) => void;
45
+ dataId?: string;
46
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">, "dataId"> & Partial<{
47
+ dataId?: string;
48
+ }> & React.RefAttributes<unknown>>;
49
+ export declare const CheckboxFieldGroup: React.ForwardRefExoticComponent<Omit<{
50
+ selectedValues: (string | number)[];
51
+ variant?: FieldGroupVariant;
52
+ values: FieldGroupItem[];
53
+ size?: ButtonSize;
54
+ name?: string;
55
+ vertical?: boolean;
56
+ onChange?: (e: FieldGroupItem) => void;
57
+ onFieldClick?: (e: FieldGroupItem) => void;
58
+ dataId?: string;
59
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">, "dataId"> & Partial<{
60
+ dataId?: string;
61
+ }> & React.RefAttributes<unknown>>;
62
+ export {};
@@ -0,0 +1 @@
1
+ export * from './FieldGroup';
@@ -0,0 +1,35 @@
1
+ import { default as React, ReactNode } from 'react';
2
+
3
+ type FormControlProps = {
4
+ dataId?: string;
5
+ control: 'Input' | 'Checkbox' | 'Textarea' | 'Select' | 'ColorPicker' | 'DatePicker';
6
+ name?: string;
7
+ error?: boolean;
8
+ success?: boolean;
9
+ message?: string;
10
+ options?: any[];
11
+ value?: any;
12
+ children?: ReactNode;
13
+ disabled?: boolean;
14
+ isLoading?: boolean;
15
+ checked?: boolean;
16
+ type?: 'range' | 'date';
17
+ showInput?: boolean;
18
+ format?: string;
19
+ onChange?: any;
20
+ onFocus?: any;
21
+ onBlur?: any;
22
+ onChangeInput?: any;
23
+ onChangePicker?: (e: {
24
+ hex: string;
25
+ }) => void;
26
+ onDatesChange?: any;
27
+ initialColor?: string;
28
+ placeholder?: string;
29
+ maxLength?: number;
30
+ rows?: number;
31
+ };
32
+ export declare const FormControl: React.ForwardRefExoticComponent<Omit<Omit<FormControlProps & React.RefAttributes<HTMLElement>, "dataId"> & Partial<{
33
+ dataId?: string;
34
+ }>, "ref"> & React.RefAttributes<unknown>>;
35
+ export {};
@@ -0,0 +1 @@
1
+ export * from './FormControl';