pixel-react 1.1.1 → 1.1.3

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 (99) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.d.ts +5 -0
  3. package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +7 -0
  4. package/lib/components/Charts/DashboardDonutChart/index.d.ts +1 -0
  5. package/lib/components/Charts/DashboardDonutChart/types.d.ts +21 -0
  6. package/lib/components/Charts/PieChart/PieChart.d.ts +5 -0
  7. package/lib/components/Charts/PieChart/PieChart.stories.d.ts +7 -0
  8. package/lib/components/Charts/PieChart/index.d.ts +1 -0
  9. package/lib/components/Charts/PieChart/types.d.ts +27 -0
  10. package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
  11. package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -1
  12. package/lib/components/NLPInput/NlpInput.d.ts +4 -0
  13. package/lib/components/NLPInput/NlpInput.stories.d.ts +7 -0
  14. package/lib/components/NLPInput/components/NlpDropDown/NlpDropDownType.d.ts +19 -0
  15. package/lib/components/NLPInput/components/NlpDropDown/NlpDropdown.d.ts +4 -0
  16. package/lib/components/NLPInput/index.d.ts +1 -0
  17. package/lib/components/NLPInput/type.d.ts +70 -0
  18. package/lib/components/Paper/Paper.d.ts +4 -0
  19. package/lib/components/Paper/Paper.stories.d.ts +11 -0
  20. package/lib/components/Paper/index.d.ts +1 -0
  21. package/lib/components/Paper/types.d.ts +15 -0
  22. package/lib/components/Table/Table.d.ts +1 -1
  23. package/lib/components/VariableInput/VariableInput.d.ts +4 -0
  24. package/lib/components/VariableInput/VariableInput.stories.d.ts +6 -0
  25. package/lib/components/VariableInput/index.d.ts +1 -0
  26. package/lib/components/VariableInput/types.d.ts +53 -0
  27. package/lib/index.css +404 -0
  28. package/lib/index.d.ts +187 -18
  29. package/lib/index.esm.css +404 -0
  30. package/lib/index.esm.js +7040 -762
  31. package/lib/index.esm.js.map +1 -1
  32. package/lib/index.js +7052 -761
  33. package/lib/index.js.map +1 -1
  34. package/lib/tsconfig.tsbuildinfo +1 -1
  35. package/lib/utils/ffID/ffID.stories.d.ts +1 -1
  36. package/lib/utils/ffID/ffid.d.ts +1 -2
  37. package/lib/utils/findAndInsert/findAndInsert.d.ts +7 -0
  38. package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +7 -0
  39. package/lib/utils/getEncryptedData/getEncryptedData.d.ts +1 -0
  40. package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +6 -0
  41. package/package.json +2 -1
  42. package/rollup.config.mjs +8 -2
  43. package/src/StyleGuide/ColorPalette/ColorPalette.tsx +2 -4
  44. package/src/StyleGuide/ColorPalette/colorPaletteList.ts +95 -20
  45. package/src/assets/Themes/BaseTheme.scss +4 -3
  46. package/src/assets/Themes/DarkTheme.scss +11 -8
  47. package/src/assets/icons/wswb_delete_icon.svg +4 -0
  48. package/src/assets/icons/wswb_plus_icon.svg +5 -0
  49. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +1 -1
  50. package/src/components/Button/index.ts +1 -1
  51. package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.scss +145 -0
  52. package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.tsx +52 -0
  53. package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.tsx +335 -0
  54. package/src/components/Charts/DashboardDonutChart/index.ts +1 -0
  55. package/src/components/Charts/DashboardDonutChart/types.ts +33 -0
  56. package/src/components/Charts/PieChart/PieChart.scss +39 -0
  57. package/src/components/Charts/PieChart/PieChart.stories.tsx +46 -0
  58. package/src/components/Charts/PieChart/PieChart.tsx +193 -0
  59. package/src/components/Charts/PieChart/index.ts +1 -0
  60. package/src/components/Charts/PieChart/types.ts +28 -0
  61. package/src/components/Icon/iconList.ts +6 -0
  62. package/src/components/Modal/modal.scss +1 -1
  63. package/src/components/MultiSelect/MultiSelect.stories.tsx +2 -3
  64. package/src/components/MultiSelect/MultiSelect.tsx +35 -23
  65. package/src/components/MultiSelect/MultiSelectTypes.ts +1 -1
  66. package/src/components/NLPInput/NLPInput.scss +246 -0
  67. package/src/components/NLPInput/NlpInput.stories.tsx +136 -0
  68. package/src/components/NLPInput/NlpInput.tsx +374 -0
  69. package/src/components/NLPInput/components/NlpDropDown/NlpDropDownType.ts +60 -0
  70. package/src/components/NLPInput/components/NlpDropDown/NlpDropdown.scss +83 -0
  71. package/src/components/NLPInput/components/NlpDropDown/NlpDropdown.tsx +180 -0
  72. package/src/components/NLPInput/index.ts +1 -0
  73. package/src/components/NLPInput/type.tsx +124 -0
  74. package/src/components/Paper/Paper.scss +13 -0
  75. package/src/components/Paper/Paper.stories.tsx +77 -0
  76. package/src/components/Paper/Paper.tsx +14 -0
  77. package/src/components/Paper/index.ts +1 -0
  78. package/src/components/Paper/types.ts +19 -0
  79. package/src/components/Select/components/Dropdown/Dropdown.tsx +1 -1
  80. package/src/components/Table/Table.scss +5 -0
  81. package/src/components/Table/Table.stories.tsx +12 -0
  82. package/src/components/Table/Table.tsx +25 -14
  83. package/src/components/TextArea/Textarea.scss +1 -1
  84. package/src/components/VariableInput/VariableInput.scss +128 -0
  85. package/src/components/VariableInput/VariableInput.stories.tsx +32 -0
  86. package/src/components/VariableInput/VariableInput.tsx +352 -0
  87. package/src/components/VariableInput/index.ts +1 -0
  88. package/src/components/VariableInput/types.ts +56 -0
  89. package/src/index.ts +32 -2
  90. package/src/utils/ffID/ffID.stories.tsx +1 -1
  91. package/src/utils/ffID/ffid.ts +1 -3
  92. package/src/utils/getEncryptedData/getEncryptedData.stories.tsx +55 -0
  93. package/src/utils/getEncryptedData/getEncryptedData.ts +8 -0
  94. package/lib/components/AddButton/AddButton.d.ts +0 -5
  95. package/lib/components/AddButton/AddButton.stories.d.ts +0 -6
  96. package/lib/components/AddButton/index.d.ts +0 -1
  97. package/lib/components/AddButton/types.d.ts +0 -4
  98. /package/src/utils/{find → findAndInsert}/findAndInsert.stories.tsx +0 -0
  99. /package/src/utils/{find → findAndInsert}/findAndInsert.ts +0 -0
Binary file
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { DashboardDonutChartProps } from './types';
3
+ import './DashBoardDonutChart.scss';
4
+ declare const DashboardDonutChart: React.FC<DashboardDonutChartProps>;
5
+ export default DashboardDonutChart;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/react/*';
2
+ import DashboardDonutChart from './DashboardDonutChart';
3
+ declare const meta: Meta<typeof DashboardDonutChart>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof DashboardDonutChart>;
6
+ export declare const Default: Story;
7
+ export declare const MemoryLegend: Story;
@@ -0,0 +1 @@
1
+ export { default } from './DashboardDonutChart';
@@ -0,0 +1,21 @@
1
+ export type Status = 'passed' | 'failed' | 'warning' | 'skipped' | 'Passed' | 'Failed' | 'Skipped' | 'Warning';
2
+ export type StatusValue = {
3
+ status: Status;
4
+ value: number;
5
+ };
6
+ export type ChartItem = {
7
+ key: string;
8
+ value: number;
9
+ color?: string;
10
+ };
11
+ export type LegendType = 'numberLegend' | 'pillLegend' | 'memoryLegend' | 'tableLegend';
12
+ export type DashboardDonutChartProps = {
13
+ radius: number;
14
+ lineWidth: number;
15
+ statusValues: ChartItem[];
16
+ legendDetailsType: string;
17
+ isLegendDetails: boolean;
18
+ gapAngle?: number;
19
+ legendType: LegendType;
20
+ showOnlyLabel: boolean;
21
+ };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './PieChart.scss';
3
+ import { PieChartProps } from './types';
4
+ declare const PieChart: React.FC<PieChartProps>;
5
+ export default PieChart;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import PieChart from './PieChart';
3
+ declare const meta: Meta<typeof PieChart>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof PieChart>;
6
+ export declare const PieChartDashBoard: Story;
7
+ export declare const PieChartDashBoardWithBorder: Story;
@@ -0,0 +1 @@
1
+ export { default } from './PieChart';
@@ -0,0 +1,27 @@
1
+ export type Status = {
2
+ status: 'Passed';
3
+ value: number;
4
+ };
5
+ export interface PieChartProps {
6
+ radius: number;
7
+ data: Array<{
8
+ label: string;
9
+ value: number;
10
+ }>;
11
+ colors: string[];
12
+ chartBorder: boolean;
13
+ }
14
+ export type ArcParams = {
15
+ x: number;
16
+ y: number;
17
+ radius: number;
18
+ startAngle: number;
19
+ endAngle: number;
20
+ };
21
+ export type ArcResult = string;
22
+ export type ArcAnglesResult = {
23
+ endAngle: number;
24
+ backgroundArcPath: string;
25
+ foregroundArcPath: string;
26
+ percentage: number;
27
+ };
@@ -1,4 +1,4 @@
1
1
  import './MultiSelect.scss';
2
2
  import { MultiSelectProps } from './MultiSelectTypes';
3
- declare const MultiSelect: ({ options, type, selectedOptions, onChange, acceptNewOption, zIndex, label, onSearch, required, disabled, errorMessage, withSelectButton, onSelect, displayCount }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const MultiSelect: ({ options, type, selectedOptions, onChange, acceptNewOption, zIndex, label, onSearch, required, disabled, errorMessage, withSelectButton, onSelect, displayCount, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default MultiSelect;
@@ -10,7 +10,7 @@ interface MultiSelectProps {
10
10
  label: string;
11
11
  selectedOptions?: Option[];
12
12
  disabled?: boolean;
13
- onSearch?: (searchedKeyword: string) => void;
13
+ onSearch?: (searchedKeyword: string, resultsLength: number) => void;
14
14
  onChange?: (selectedOptions: Option[]) => void;
15
15
  acceptNewOption?: boolean;
16
16
  zIndex?: number;
@@ -0,0 +1,4 @@
1
+ import { SelectProps } from './type';
2
+ import './NlpInput.scss';
3
+ declare const NlpInput: ({ label, showLabel, optionsList, selectedOption, onChange, errorMsg, className, optionZIndex, disabled, borderRadius, showBorder, required, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default NlpInput;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import NlpInput from './NlpInput';
3
+ declare const meta: Meta<typeof NlpInput>;
4
+ type Story = StoryObj<typeof NlpInput>;
5
+ export declare const Primary: Story;
6
+ export declare const Disable: Story;
7
+ export default meta;
@@ -0,0 +1,19 @@
1
+ import { DrowdownPosition, Option } from '../../type';
2
+ export interface NlpDropDownListProps {
3
+ onSelectBlur: () => void;
4
+ onSelectOptionSelector: (option: Option) => void;
5
+ dropdownPosition: DrowdownPosition;
6
+ options?: Option[];
7
+ optionZIndex?: number;
8
+ inputRef?: React.RefObject<HTMLInputElement>;
9
+ label?: string;
10
+ hasError?: boolean;
11
+ errorMessage?: string;
12
+ disabled?: boolean;
13
+ }
14
+ export declare const nlpDropdownDefaultCSSData: {
15
+ margin: number;
16
+ optionHeight: number;
17
+ selectInputHeight: number;
18
+ dropDownWrapperPadding: number;
19
+ };
@@ -0,0 +1,4 @@
1
+ import { NlpDropDownListProps } from './NlpDropDownType';
2
+ import './NlpDropdown.scss';
3
+ declare const NlpDropdown: ({ onSelectBlur, onSelectOptionSelector, dropdownPosition, options, optionZIndex, inputRef, }: NlpDropDownListProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default NlpDropdown;
@@ -0,0 +1 @@
1
+ export { default } from './NlpInput';
@@ -0,0 +1,70 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SelectProps {
3
+ label?: string;
4
+ showLabel?: boolean;
5
+ optionsList: any[];
6
+ selectedOption?: Option;
7
+ onChange: (option: Option) => void;
8
+ errorMsg?: string;
9
+ className?: string;
10
+ optionZIndex?: number;
11
+ disabled?: boolean;
12
+ borderRadius?: boolean;
13
+ showBorder?: boolean;
14
+ required?: boolean;
15
+ }
16
+ export interface DrowdownPosition {
17
+ positionX: number;
18
+ positionY: number;
19
+ width: number;
20
+ fromBottom: number;
21
+ }
22
+ export interface SelectState {
23
+ isInputFocused: boolean;
24
+ iconColor: string;
25
+ isIconClick: boolean;
26
+ showOptions: boolean;
27
+ options: any[];
28
+ option: string;
29
+ dropdownPosition: DrowdownPosition;
30
+ }
31
+ export type SelectAction = {
32
+ type: 'FOCUS_INPUT';
33
+ } | {
34
+ type: 'BLUR_INPUT';
35
+ payload: {
36
+ optionsList: Option[];
37
+ option: Option['projectId'];
38
+ };
39
+ } | {
40
+ type: 'MOUSE_ENTER';
41
+ } | {
42
+ type: 'MOUSE_LEAVE';
43
+ } | {
44
+ type: 'UPDATE_DROPDOWN_POSITION';
45
+ payload: {
46
+ positionX: number;
47
+ positionY: number;
48
+ width: number;
49
+ fromBottom: number;
50
+ };
51
+ } | {
52
+ type: 'UPDATE_OPTION';
53
+ payload: string;
54
+ } | {
55
+ type: 'UPDATE_OPTION_LIST';
56
+ payload: any[];
57
+ } | {
58
+ type: 'SHOW_ERROR';
59
+ payload: {
60
+ optionsList: any[];
61
+ option: Option['projectId'];
62
+ };
63
+ };
64
+ export interface Option {
65
+ displayName: string | ReactNode;
66
+ projectId: string;
67
+ nlpType: string;
68
+ platform: string;
69
+ disabled?: boolean;
70
+ }
@@ -0,0 +1,4 @@
1
+ import './Paper.scss';
2
+ import { PaperProps } from './types';
3
+ declare const Paper: ({ children, className, rounded }: PaperProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default Paper;
@@ -0,0 +1,11 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Paper from './Paper';
3
+ import './Paper.scss';
4
+ declare const meta: Meta<typeof Paper>;
5
+ type Story = StoryObj<typeof Paper>;
6
+ export declare const Default: Story;
7
+ export declare const PrimaryPaper: Story;
8
+ export declare const PaperWithLowShadow: Story;
9
+ export declare const PaperWithHighShadow: Story;
10
+ export declare const PaperWithRounded: Story;
11
+ export default meta;
@@ -0,0 +1 @@
1
+ export { default } from './Paper';
@@ -0,0 +1,15 @@
1
+ export interface PaperProps {
2
+ /**
3
+ * The content of the component.
4
+ */
5
+ children?: React.ReactNode;
6
+ /**
7
+ * Override or extend the styles applied to the component.
8
+ */
9
+ className?: string;
10
+ /**
11
+ * If `true`, rounded corners are Enabled.
12
+ * @default false
13
+ */
14
+ rounded?: boolean;
15
+ }
@@ -1,4 +1,4 @@
1
1
  import './Table.scss';
2
2
  import { TableProps } from './Types';
3
- declare const Table: ({ data, columns, headerType, withFixedHeader, borderWithRadius, height, className, }: TableProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ declare const Table: ({ data, columns, headerType, withCheckbox, onSelect, allSelected, partialSelected, withFixedHeader, borderWithRadius, headerCheckboxDisabled, height, className, }: TableProps) => import("react/jsx-runtime").JSX.Element | null;
4
4
  export default Table;
@@ -0,0 +1,4 @@
1
+ import './VariableInput.scss';
2
+ import { VariableInputProps } from './types';
3
+ declare const VariableInput: ({ type, name, label, disabled, required, placeholder, value, error, className, onChange, onKeyDown, onBlur, onFocus, list, ...props }: VariableInputProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default VariableInput;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import VariableInput from './VariableInput';
3
+ declare const meta: Meta<typeof VariableInput>;
4
+ type Story = StoryObj<typeof VariableInput>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1 @@
1
+ export { default } from './VariableInput';
@@ -0,0 +1,53 @@
1
+ export interface VariableInputProps {
2
+ /**
3
+ * Name | name of the input field
4
+ */
5
+ name: string;
6
+ /**
7
+ * Label | field label to be displayed
8
+ */
9
+ label: string;
10
+ /**
11
+ * value | input field value
12
+ */
13
+ value: string | null;
14
+ /**
15
+ * type to set color/style of the input field
16
+ */
17
+ type: 'text' | 'password' | 'number' | 'email' | 'url' | 'time';
18
+ /**
19
+ * error | If true, error message will be displayed
20
+ */
21
+ error?: boolean;
22
+ /**
23
+ * to disable the input field
24
+ */
25
+ disabled?: boolean;
26
+ /**
27
+ * if true, input field will be mandatory
28
+ */
29
+ required?: boolean;
30
+ /**
31
+ * placeholder for the input field
32
+ */
33
+ placeholder?: string;
34
+ /**
35
+ * classnames to style the input field
36
+ */
37
+ className?: string;
38
+ /**
39
+ * onChange, onKeyDown, onBlur, onFocus actions
40
+ */
41
+ onChange?: (value: string) => void | undefined;
42
+ onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
43
+ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
44
+ onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
45
+ /**
46
+ * id to select the input field uniquely
47
+ */
48
+ id?: string;
49
+ /**
50
+ * list of variables
51
+ */
52
+ list?: string[];
53
+ }