@sphereon/ui-components.ssi-react 0.1.3-unstable.99 → 0.2.1-next.105

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 (167) hide show
  1. package/LICENSE +201 -636
  2. package/dist/@config/toasts/index.d.ts +2 -3
  3. package/dist/components/assets/icons/CopyIcon/index.d.ts +9 -0
  4. package/dist/components/assets/icons/CopyIcon/index.js +7 -0
  5. package/dist/components/assets/icons/{BitterballenIcon → CrossIcon}/index.d.ts +2 -2
  6. package/dist/components/assets/icons/CrossIcon/index.js +7 -0
  7. package/dist/components/assets/icons/DeleteIcon/index.d.ts +2 -1
  8. package/dist/components/assets/icons/DeleteIcon/index.js +2 -2
  9. package/dist/components/assets/icons/DocumentIcon/index.d.ts +9 -0
  10. package/dist/components/assets/icons/DocumentIcon/index.js +7 -0
  11. package/dist/components/assets/icons/ImageIcon/index.d.ts +9 -0
  12. package/dist/components/assets/icons/ImageIcon/index.js +7 -0
  13. package/dist/components/assets/icons/MeatBallsIcon/index.d.ts +9 -0
  14. package/dist/components/assets/icons/MeatBallsIcon/index.js +7 -0
  15. package/dist/components/assets/icons/PencilIcon/index.d.ts +8 -0
  16. package/dist/components/assets/icons/PencilIcon/index.js +7 -0
  17. package/dist/components/assets/icons/SSIAddIcon/index.js +1 -1
  18. package/dist/components/assets/icons/SSIArrowDownIcon/index.js +1 -1
  19. package/dist/components/assets/icons/SSIFilterIcon/index.js +1 -1
  20. package/dist/components/assets/icons/ViewIcon/index.d.ts +9 -0
  21. package/dist/components/assets/icons/ViewIcon/index.js +7 -0
  22. package/dist/components/assets/images/WarningImage/index.d.ts +8 -0
  23. package/dist/components/assets/images/WarningImage/index.js +6 -0
  24. package/dist/components/assets/placeholders/PersonPlaceholder/index.d.ts +9 -0
  25. package/dist/components/assets/placeholders/PersonPlaceholder/index.js +7 -0
  26. package/dist/components/buttons/IconButton/index.d.ts +11 -0
  27. package/dist/components/buttons/IconButton/index.js +17 -0
  28. package/dist/components/buttons/{SSISecondaryButton → PrimaryButton}/index.d.ts +3 -3
  29. package/dist/components/buttons/{SSIPrimaryButton → PrimaryButton}/index.js +5 -4
  30. package/dist/components/buttons/{SSIPrimaryButton → SecondaryButton}/index.d.ts +3 -3
  31. package/dist/components/buttons/{SSISecondaryButton → SecondaryButton}/index.js +5 -4
  32. package/dist/components/fields/ComboBox/index.d.ts +21 -0
  33. package/dist/components/fields/ComboBox/index.js +51 -0
  34. package/dist/components/fields/DragAndDropBox/index.d.ts +8 -0
  35. package/dist/components/fields/DragAndDropBox/index.js +30 -0
  36. package/dist/components/fields/FileSelection/index.d.ts +12 -0
  37. package/dist/components/fields/FileSelection/index.js +32 -0
  38. package/dist/components/fields/JSONForms/PassportPhotoControl/index.d.ts +5 -0
  39. package/dist/components/fields/JSONForms/PassportPhotoControl/index.js +34 -0
  40. package/dist/components/fields/SSICheckbox/index.d.ts +2 -1
  41. package/dist/components/fields/SSICheckbox/index.js +2 -2
  42. package/dist/components/fields/SSIHoverText/index.js +1 -1
  43. package/dist/components/fields/TextInputField/index.d.ts +12 -0
  44. package/dist/components/fields/TextInputField/index.js +20 -0
  45. package/dist/components/indicators/ProgressStepIndicator/index.js +5 -4
  46. package/dist/components/lists/DropDownList/index.d.ts +10 -0
  47. package/dist/components/lists/DropDownList/index.js +34 -0
  48. package/dist/components/lists/DropDownListItem/index.d.ts +13 -0
  49. package/dist/components/lists/DropDownListItem/index.js +15 -0
  50. package/dist/components/views/CredentialIssuanceWizardView/index.d.ts +10 -0
  51. package/dist/components/views/CredentialIssuanceWizardView/index.js +40 -0
  52. package/dist/components/views/CredentialMiniCardView/index.js +1 -1
  53. package/dist/components/views/CredentialViewItem/index.d.ts +16 -0
  54. package/dist/components/views/CredentialViewItem/index.js +14 -0
  55. package/dist/components/views/FormView/index.d.ts +20 -0
  56. package/dist/components/views/FormView/index.js +12 -0
  57. package/dist/components/views/FormView/styles.css +105 -0
  58. package/dist/components/views/InformationRequestView/index.d.ts +14 -0
  59. package/dist/components/views/InformationRequestView/index.js +14 -0
  60. package/dist/components/views/JSONDataView/index.d.ts +8 -0
  61. package/dist/components/views/JSONDataView/index.js +83 -0
  62. package/dist/components/views/SSITabView/SSITabViewHeader/index.js +1 -1
  63. package/dist/components/views/SSITableView/PaginationControls/index.d.ts +8 -0
  64. package/dist/components/views/SSITableView/PaginationControls/index.js +9 -0
  65. package/dist/components/views/SSITableView/SSITableViewHeader/index.d.ts +1 -0
  66. package/dist/components/views/SSITableView/SSITableViewHeader/index.js +9 -7
  67. package/dist/components/views/SSITableView/index.d.ts +5 -2
  68. package/dist/components/views/SSITableView/index.js +77 -46
  69. package/dist/index.d.ts +29 -7
  70. package/dist/index.js +28 -5
  71. package/dist/renders/jsonFormsRenders.d.ts +2 -0
  72. package/dist/renders/jsonFormsRenders.js +6 -0
  73. package/dist/styles/components/components/CredentialIssuanceWizardView/index.d.ts +14 -0
  74. package/dist/styles/components/components/CredentialIssuanceWizardView/index.js +55 -0
  75. package/dist/styles/components/components/CredentialViewItem/index.d.ts +14 -0
  76. package/dist/styles/components/components/CredentialViewItem/index.js +28 -0
  77. package/dist/styles/components/components/DragAndDropBox/index.d.ts +7 -0
  78. package/dist/styles/components/components/DragAndDropBox/index.js +25 -0
  79. package/dist/styles/components/components/DropDownList/index.d.ts +6 -0
  80. package/dist/styles/components/components/DropDownList/index.js +21 -0
  81. package/dist/styles/components/components/DropDownListItem/index.d.ts +8 -0
  82. package/dist/styles/components/components/DropDownListItem/index.js +21 -0
  83. package/dist/styles/components/components/FileSelectionField/index.d.ts +15 -0
  84. package/dist/styles/components/components/FileSelectionField/index.js +64 -0
  85. package/dist/styles/components/components/IconButton/index.d.ts +2 -0
  86. package/dist/styles/components/components/{SSIIconButton → IconButton}/index.js +5 -3
  87. package/dist/styles/components/components/InformationRequestView/index.d.ts +31 -0
  88. package/dist/styles/components/components/InformationRequestView/index.js +86 -0
  89. package/dist/styles/components/components/JSONDataView/index.d.ts +8 -0
  90. package/dist/styles/components/components/JSONDataView/index.js +47 -0
  91. package/dist/styles/components/components/Pagination/index.d.ts +5 -0
  92. package/dist/styles/components/components/Pagination/index.js +71 -0
  93. package/dist/styles/components/components/PassportPhotoControl/index.d.ts +5 -0
  94. package/dist/styles/components/components/PassportPhotoControl/index.js +27 -0
  95. package/dist/styles/components/components/PrimaryButton/index.d.ts +4 -0
  96. package/dist/styles/components/components/{SSIPrimaryButton → PrimaryButton}/index.js +3 -2
  97. package/dist/styles/components/components/ProgressStepIndicator/index.d.ts +14 -8
  98. package/dist/styles/components/components/ProgressStepIndicator/index.js +11 -0
  99. package/dist/styles/components/components/SSICheckbox/index.d.ts +9 -4
  100. package/dist/styles/components/components/SSICheckbox/index.js +2 -2
  101. package/dist/styles/components/components/SSICredentialCardView/index.d.ts +28 -13
  102. package/dist/styles/components/components/SSICredentialCardView/index.js +1 -0
  103. package/dist/styles/components/components/SSICredentialMiniCardView/index.d.ts +5 -2
  104. package/dist/styles/components/components/SSIHoverText/index.d.ts +4 -3
  105. package/dist/styles/components/components/SSIProfileIcon/index.d.ts +2 -1
  106. package/dist/styles/components/components/SSIStatusLabel/index.d.ts +8 -3
  107. package/dist/styles/components/components/SSIStatusLabel/index.js +1 -0
  108. package/dist/styles/components/components/SSITabView/index.d.ts +2 -1
  109. package/dist/styles/components/components/SSITabView/index.js +1 -1
  110. package/dist/styles/components/components/SSITabViewHeader/index.d.ts +6 -2
  111. package/dist/styles/components/components/SSITabViewHeader/index.js +5 -0
  112. package/dist/styles/components/components/SSITableView/index.d.ts +12 -7
  113. package/dist/styles/components/components/SSITableView/index.js +21 -3
  114. package/dist/styles/components/components/SSITableViewHeader/index.d.ts +11 -5
  115. package/dist/styles/components/components/SSITableViewHeader/index.js +8 -0
  116. package/dist/styles/components/components/SSIToast/index.d.ts +11 -4
  117. package/dist/styles/components/components/SSIToast/index.js +2 -2
  118. package/dist/styles/components/components/SSIToastContainer/index.d.ts +3 -1
  119. package/dist/styles/components/components/SSITypeLabel/index.d.ts +4 -1
  120. package/dist/styles/components/components/SecondaryButton/index.d.ts +7 -0
  121. package/dist/styles/components/components/{SSISecondaryButton → SecondaryButton}/index.js +5 -3
  122. package/dist/styles/components/components/StepMarker/index.d.ts +5 -4
  123. package/dist/styles/components/components/TextInputField/index.d.ts +3 -0
  124. package/dist/styles/components/components/TextInputField/index.js +27 -0
  125. package/dist/styles/components/components/buttons/index.d.ts +4 -0
  126. package/dist/styles/components/components/buttons/index.js +4 -0
  127. package/dist/styles/components/components/index.d.ts +15 -5
  128. package/dist/styles/components/components/index.js +15 -5
  129. package/dist/styles/components/containers/index.d.ts +7 -4
  130. package/dist/styles/css/index.d.ts +12 -10
  131. package/dist/styles/css/index.js +14 -0
  132. package/dist/styles/fonts/index.d.ts +29 -16
  133. package/dist/styles/fonts/index.js +23 -13
  134. package/dist/styles/typography.js +6 -0
  135. package/dist/types/button/index.d.ts +2 -1
  136. package/dist/types/field/index.d.ts +21 -0
  137. package/dist/types/field/index.js +10 -0
  138. package/dist/types/index.d.ts +2 -0
  139. package/dist/types/index.js +2 -0
  140. package/dist/types/indicator/index.d.ts +1 -0
  141. package/dist/types/table/index.d.ts +24 -14
  142. package/dist/types/table/index.js +3 -0
  143. package/dist/types/view/index.d.ts +13 -0
  144. package/dist/types/view/index.js +1 -0
  145. package/dist/utils/FileUtils.d.ts +1 -0
  146. package/dist/utils/FileUtils.js +7 -0
  147. package/dist/utils/IconUtils.d.ts +3 -0
  148. package/dist/utils/IconUtils.js +32 -0
  149. package/dist/utils/ImageUtils.d.ts +2 -0
  150. package/dist/utils/ImageUtils.js +12 -0
  151. package/dist/utils/index.d.ts +3 -0
  152. package/dist/utils/index.js +3 -0
  153. package/package.json +25 -9
  154. package/dist/components/assets/icons/BitterballenIcon/index.js +0 -7
  155. package/dist/components/buttons/RowActionMenuButton/index.d.ts +0 -13
  156. package/dist/components/buttons/RowActionMenuButton/index.js +0 -28
  157. package/dist/components/buttons/SSIIconButton/index.d.ts +0 -10
  158. package/dist/components/buttons/SSIIconButton/index.js +0 -29
  159. package/dist/components/lists/SSIDropDownList/index.d.ts +0 -7
  160. package/dist/components/lists/SSIDropDownList/index.js +0 -11
  161. package/dist/styles/components/components/RowActionMenuButton/index.d.ts +0 -4
  162. package/dist/styles/components/components/RowActionMenuButton/index.js +0 -27
  163. package/dist/styles/components/components/SSIDropDownList/index.d.ts +0 -2
  164. package/dist/styles/components/components/SSIDropDownList/index.js +0 -12
  165. package/dist/styles/components/components/SSIIconButton/index.d.ts +0 -1
  166. package/dist/styles/components/components/SSIPrimaryButton/index.d.ts +0 -1
  167. package/dist/styles/components/components/SSISecondaryButton/index.d.ts +0 -2
@@ -0,0 +1,21 @@
1
+ export declare enum AssetFilePermission {
2
+ PUBLIC = "public",
3
+ PRIVATE = "private"
4
+ }
5
+ export type ValueSelection = {
6
+ label: string;
7
+ value: string;
8
+ };
9
+ export declare enum FileSelectionFieldType {
10
+ FILE = "file",
11
+ IMAGE = "image"
12
+ }
13
+ export type PassportPhoto = {
14
+ file: File;
15
+ base64Uri: string;
16
+ };
17
+ export type PassportPhotoControlData = {
18
+ fileName: string;
19
+ mimeType: string;
20
+ base64Uri: string;
21
+ };
@@ -0,0 +1,10 @@
1
+ export var AssetFilePermission;
2
+ (function (AssetFilePermission) {
3
+ AssetFilePermission["PUBLIC"] = "public";
4
+ AssetFilePermission["PRIVATE"] = "private";
5
+ })(AssetFilePermission || (AssetFilePermission = {}));
6
+ export var FileSelectionFieldType;
7
+ (function (FileSelectionFieldType) {
8
+ FileSelectionFieldType["FILE"] = "file";
9
+ FileSelectionFieldType["IMAGE"] = "image";
10
+ })(FileSelectionFieldType || (FileSelectionFieldType = {}));
@@ -2,3 +2,5 @@ export * from './button';
2
2
  export * from './table';
3
3
  export * from './toast';
4
4
  export * from './indicator';
5
+ export * from './field';
6
+ export * from './view';
@@ -2,3 +2,5 @@ export * from './button';
2
2
  export * from './table';
3
3
  export * from './toast';
4
4
  export * from './indicator';
5
+ export * from './field';
6
+ export * from './view';
@@ -1,6 +1,7 @@
1
1
  export type ProgressIndicatorStep = {
2
2
  title?: string;
3
3
  description?: string;
4
+ required?: boolean;
4
5
  };
5
6
  export declare enum StepStatus {
6
7
  CURRENT = "current",
@@ -1,31 +1,41 @@
1
1
  import { AccessorFn, DeepKeys } from '@tanstack/react-table';
2
- import { ButtonIcon } from '@sphereon/ui-components.core';
2
+ import { Button } from '../button';
3
+ import { ValueSelection } from '../field';
3
4
  export declare enum TableCellType {
4
5
  TEXT = "text",
5
6
  LABEL = "label",
6
7
  STATUS = "status",
7
- CREDENTIAL_CARD = "credentialCard"
8
+ CREDENTIAL_CARD = "credentialCard",
9
+ CREDENTIAL_DETAILS = "credentialDetails",
10
+ ACTIONS = "actions",
11
+ COMBOBOX = "combobox"
8
12
  }
9
13
  export type ColumnHeader<T> = {
10
14
  accessor: AccessorFn<T> | DeepKeys<T>;
11
15
  type: TableCellType;
12
16
  label?: string;
13
- opts?: TableCellOptions;
17
+ columnOptions?: TableColumnOptions;
14
18
  };
15
- export type TableCellOptions = {
16
- truncationLength?: number;
17
- enableHover?: boolean;
19
+ export type TableColumnOptions = {
18
20
  columnMinWidth?: number;
19
21
  columnMaxWidth?: number;
20
22
  columnWidth?: number;
23
+ cellOptions?: TableCellOptions;
24
+ };
25
+ export type TableCellOptions = TextCellOptions | ComboboxCellOptions | ActionsCellOptions;
26
+ export type TableRowSelection = {
27
+ rowId: string;
28
+ rowData: any;
29
+ };
30
+ export type TextCellOptions = {
31
+ truncationLength?: number;
32
+ enableHover?: boolean;
21
33
  };
22
- export type ActionGroup = {
23
- caption: string;
24
- actions: ActionButton[];
34
+ export type ComboboxCellOptions = {
35
+ selectOptions?: Array<ValueSelection>;
36
+ defaultValue?: ValueSelection;
37
+ onChange?: (value: ValueSelection) => Promise<void>;
25
38
  };
26
- export type ActionButton = {
27
- caption: string;
28
- onClick: (rowData: any) => Promise<void>;
29
- icon?: ButtonIcon;
30
- disabled?: boolean;
39
+ export type ActionsCellOptions = {
40
+ actions: Array<Button>;
31
41
  };
@@ -4,4 +4,7 @@ export var TableCellType;
4
4
  TableCellType["LABEL"] = "label";
5
5
  TableCellType["STATUS"] = "status";
6
6
  TableCellType["CREDENTIAL_CARD"] = "credentialCard";
7
+ TableCellType["CREDENTIAL_DETAILS"] = "credentialDetails";
8
+ TableCellType["ACTIONS"] = "actions";
9
+ TableCellType["COMBOBOX"] = "combobox";
7
10
  })(TableCellType || (TableCellType = {}));
@@ -0,0 +1,13 @@
1
+ import { JsonFormsCore, JsonSchema, UISchemaElement } from '@jsonforms/core';
2
+ export type JSONFormState<DataType = any> = Pick<JsonFormsCore, 'errors'> & {
3
+ data: DataType;
4
+ };
5
+ export type CredentialFormData = JSONFormState<Record<any, any>> & {
6
+ evidence: Array<File>;
7
+ };
8
+ export type CredentialFormSelectionType = {
9
+ label: string;
10
+ schema?: JsonSchema;
11
+ uiSchema?: UISchemaElement;
12
+ credentialType: Array<string>;
13
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const base64UriToFile: (base64Uri: string, filename: string, mimeType: string) => File;
@@ -0,0 +1,7 @@
1
+ import { fromString } from 'uint8arrays';
2
+ export const base64UriToFile = (base64Uri, filename, mimeType) => {
3
+ const base64 = base64Uri.split(',')[1];
4
+ const uint8Array = fromString(base64, 'base64');
5
+ const blob = new Blob([uint8Array]);
6
+ return new File([blob], filename, { type: mimeType });
7
+ };
@@ -0,0 +1,3 @@
1
+ import { ReactElement } from 'react';
2
+ import { ButtonIcon } from '@sphereon/ui-components.core';
3
+ export declare const getIcon: (icon: ButtonIcon, color?: string) => ReactElement;
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ButtonIcon, fontColors } from '@sphereon/ui-components.core';
3
+ import SSIAddIcon from '../components/assets/icons/SSIAddIcon';
4
+ import SSIArrowDownIcon from '../components/assets/icons/SSIArrowDownIcon';
5
+ import MeatBallsIcon from '../components/assets/icons/MeatBallsIcon';
6
+ import CopyIcon from '../components/assets/icons/CopyIcon';
7
+ import DeleteIcon from '../components/assets/icons/DeleteIcon';
8
+ import SSIFilterIcon from '../components/assets/icons/SSIFilterIcon';
9
+ import PencilIcon from '../components/assets/icons/PencilIcon';
10
+ import ViewIcon from '../components/assets/icons/ViewIcon';
11
+ export const getIcon = (icon, color = fontColors.dark) => {
12
+ switch (icon) {
13
+ case ButtonIcon.ADD:
14
+ return _jsx(SSIAddIcon, { color: color });
15
+ case ButtonIcon.ARROW_DOWN:
16
+ return _jsx(SSIArrowDownIcon, { color: color });
17
+ case ButtonIcon.MEATBALLS:
18
+ return _jsx(MeatBallsIcon, { color: color });
19
+ case ButtonIcon.EDIT:
20
+ return _jsx(PencilIcon, { color: color });
21
+ case ButtonIcon.COPY:
22
+ return _jsx(CopyIcon, { color: color });
23
+ case ButtonIcon.DELETE:
24
+ return _jsx(DeleteIcon, { color: color });
25
+ case ButtonIcon.FILTER:
26
+ return _jsx(SSIFilterIcon, { color: color });
27
+ case ButtonIcon.VIEW:
28
+ return _jsx(ViewIcon, { color: color });
29
+ default:
30
+ return _jsx("div", {});
31
+ }
32
+ };
@@ -0,0 +1,2 @@
1
+ import { ImageSize } from '@sphereon/ui-components.core';
2
+ export declare const getImageSize: (uri: string) => Promise<ImageSize>;
@@ -0,0 +1,12 @@
1
+ export const getImageSize = (uri) => {
2
+ return new Promise((resolve, reject) => {
3
+ const img = new Image();
4
+ img.onload = () => {
5
+ resolve({ width: img.width, height: img.height });
6
+ };
7
+ img.onerror = (error) => {
8
+ reject(error);
9
+ };
10
+ img.src = uri;
11
+ });
12
+ };
@@ -0,0 +1,3 @@
1
+ export * from './FileUtils';
2
+ export * from './ImageUtils';
3
+ export * from './IconUtils';
@@ -0,0 +1,3 @@
1
+ export * from './FileUtils';
2
+ export * from './ImageUtils';
3
+ export * from './IconUtils';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ui-components.ssi-react",
3
3
  "private": false,
4
- "version": "0.1.3-unstable.99+c8885e8",
4
+ "version": "0.2.1-next.105+5df824a",
5
5
  "description": "SSI UI components for React",
6
6
  "repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
7
7
  "author": "Sphereon <dev@sphereon.com>",
@@ -13,7 +13,8 @@
13
13
  "Self-sovereign identity (SSI)"
14
14
  ],
15
15
  "scripts": {
16
- "build": "tsc",
16
+ "build": "tsc && pnpm run copy-css",
17
+ "copy-css": "cpy src/**/*.css dist --parents",
17
18
  "build:clean": "tsc --build --clean && tsc --build"
18
19
  },
19
20
  "source": "src/index.ts",
@@ -28,19 +29,34 @@
28
29
  "access": "public"
29
30
  },
30
31
  "dependencies": {
31
- "@sphereon/ui-components.core": "0.1.3-unstable.99+c8885e8",
32
+ "@emotion/react": "^11.11.4",
33
+ "@emotion/styled": "^11.11.0",
34
+ "@jsonforms/core": "^3.3.0",
35
+ "@jsonforms/material-renderers": "^3.3.0",
36
+ "@jsonforms/react": "^3.3.0",
37
+ "@jsonforms/vanilla-renderers": "^3.3.0",
38
+ "@mui/icons-material": "^5.15.11",
39
+ "@mui/material": "^5.15.12",
40
+ "@mui/styled-engine-sc": "^5.14.12",
41
+ "@mui/system": "^5.15.12",
42
+ "@mui/x-date-pickers": "^6.19.5",
43
+ "@sphereon/ui-components.core": "0.2.1-next.105+5df824a",
32
44
  "@tanstack/react-table": "^8.9.3",
33
- "react-loader-spinner": "^5.4.5",
45
+ "react-json-tree": "^0.18.0",
46
+ "react-loader-spinner": "5.4.5",
47
+ "react-select": "^5.8.0",
34
48
  "react-toastify": "^9.1.3",
35
- "styled-components": "^5.3.3"
49
+ "styled-components": "^6.1.12",
50
+ "uint8arrays": "^3.1.1"
36
51
  },
37
52
  "devDependencies": {
38
- "@types/react": "~18.0.14",
39
- "@types/styled-components": "^5.1.15",
53
+ "@types/react": "~18.2.67",
54
+ "ajv": "^8.12.0",
55
+ "cpy-cli": "^5.0.0",
40
56
  "typescript": "4.9.5"
41
57
  },
42
58
  "peerDependencies": {
43
- "react": ">= 16.8.0"
59
+ "react": ">= 18"
44
60
  },
45
- "gitHead": "c8885e82d8b36ec6f2564dcc33d4aa4933a759ea"
61
+ "gitHead": "5df824ab531b535b85e058b673d402a1e8bb940c"
46
62
  }
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { fontColors } from '@sphereon/ui-components.core';
3
- const BitterballenIcon = (props) => {
4
- const { size = 42, color = fontColors.dark, style } = props;
5
- return (_jsx("div", { style: { ...style, width: size, aspectRatio: 1, display: 'flex' }, children: _jsxs("svg", { width: "42", height: "43", viewBox: "0 0 42 43", fill: color, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("circle", { cx: "13", cy: "21.5", r: "2", fill: "#303030" }), _jsx("circle", { cx: "21", cy: "21.5", r: "2", fill: "#303030" }), _jsx("circle", { cx: "29", cy: "21.5", r: "2", fill: "#303030" })] }) }));
6
- };
7
- export default BitterballenIcon;
@@ -1,13 +0,0 @@
1
- import { CSSProperties, FC } from 'react';
2
- import { ButtonIcon } from '@sphereon/ui-components.core';
3
- import { ActionButton } from '../../../index';
4
- import { Row } from '@tanstack/react-table';
5
- type Props = {
6
- actions: ActionButton[];
7
- icon: ButtonIcon;
8
- color?: string;
9
- style?: CSSProperties;
10
- rowData?: Row<any>;
11
- };
12
- declare const RowActionMenuButton: FC<Props>;
13
- export default RowActionMenuButton;
@@ -1,28 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState, useEffect, useRef } from 'react';
3
- import { ButtonIcon } from '@sphereon/ui-components.core';
4
- import { SSIIconButton } from '../../../index';
5
- import { RowActionMenuButtonContainerStyled as ButtonContainer, RowActionDropdownContainerStyled as DropdownContainer, ActionItemContainerStyled as ActionItemContainer, ActionItemCaptionStyled as ItemCaption, } from '../../../styles';
6
- const RowActionMenuButton = ({ actions, icon, color, style = {}, rowData }) => {
7
- const [isDropdownVisible, setIsDropdownVisible] = useState(false);
8
- const dropdownRef = useRef(null);
9
- useEffect(() => {
10
- const handleClickOutside = (event) => {
11
- if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
12
- setIsDropdownVisible(false);
13
- }
14
- };
15
- document.addEventListener('mousedown', handleClickOutside);
16
- return () => {
17
- document.removeEventListener('mousedown', handleClickOutside);
18
- };
19
- }, [dropdownRef]);
20
- const toggleDropdown = async () => {
21
- setIsDropdownVisible(!isDropdownVisible);
22
- };
23
- const renderDropdown = () => {
24
- return (_jsx(DropdownContainer, { ref: dropdownRef, style: { display: isDropdownVisible ? 'block' : 'none' }, children: actions.map((action, index) => (_jsxs(ActionItemContainer, { onClick: () => action.onClick(rowData), children: [_jsx(ItemCaption, { style: { marginLeft: '10px' }, children: action.caption }), action.icon && _jsx(SSIIconButton, { onClick: () => action.onClick(rowData), icon: action.icon })] }, index))) }));
25
- };
26
- return (_jsxs(ButtonContainer, { style: { ...style }, children: [_jsx(SSIIconButton, { icon: icon || ButtonIcon.BITTERBALLEN, color: color, onClick: toggleDropdown }), renderDropdown()] }));
27
- };
28
- export default RowActionMenuButton;
@@ -1,10 +0,0 @@
1
- import { FC } from 'react';
2
- import { ButtonIcon } from '@sphereon/ui-components.core';
3
- type Props = {
4
- icon: ButtonIcon;
5
- onClick: () => Promise<void>;
6
- disabled?: boolean;
7
- color?: string;
8
- };
9
- declare const SSIIconButton: FC<Props>;
10
- export default SSIIconButton;
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { ButtonIcon, fontColors } from '@sphereon/ui-components.core';
3
- import SSIAddIcon from '../../assets/icons/SSIAddIcon';
4
- import SSIFilterIcon from '../../assets/icons/SSIFilterIcon';
5
- import SSIArrowDownIcon from '../../assets/icons/SSIArrowDownIcon';
6
- import { SSIIconButtonContainerStyled as Container } from '../../../styles';
7
- import BitterballenIcon from '../../assets/icons/BitterballenIcon';
8
- import DeleteIcon from '../../assets/icons/DeleteIcon';
9
- const SSIIconButton = (props) => {
10
- const { icon, onClick, disabled = false, color = fontColors.dark } = props;
11
- return _jsx(Container, { onClick: onClick, children: getIcon(icon, color) });
12
- };
13
- const getIcon = (icon, color) => {
14
- switch (icon) {
15
- case ButtonIcon.ADD:
16
- return _jsx(SSIAddIcon, { color: color });
17
- case ButtonIcon.ARROW_DOWN:
18
- return _jsx(SSIArrowDownIcon, { color: color });
19
- case ButtonIcon.BITTERBALLEN:
20
- return _jsx(BitterballenIcon, { color: color });
21
- case ButtonIcon.DELETE:
22
- return _jsx(DeleteIcon, { color: color });
23
- case ButtonIcon.FILTER:
24
- return _jsx(SSIFilterIcon, { color: color });
25
- default:
26
- return _jsx("div", {});
27
- }
28
- };
29
- export default SSIIconButton;
@@ -1,7 +0,0 @@
1
- import { FC } from 'react';
2
- type Props = {
3
- initialValue: string;
4
- label?: string;
5
- };
6
- declare const SSIDropDownList: FC<Props>;
7
- export default SSIDropDownList;
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { ButtonIcon } from '@sphereon/ui-components.core';
4
- import SSIIconButton from '../../buttons/SSIIconButton';
5
- import { SSIDropDownListContainerStyled as Container, SSITextH3Styled as LabelCaption, SSIDropDownListSelectedValueStyled as SelectedValue, } from '../../../styles';
6
- const SSIDropDownList = (props) => {
7
- const { initialValue, label } = props;
8
- const [value, setValue] = React.useState(initialValue);
9
- return (_jsxs(Container, { children: [label && _jsx(LabelCaption, { children: label }), _jsx(SelectedValue, { children: value }), _jsx(SSIIconButton, { icon: ButtonIcon.ARROW_DOWN, onClick: async () => console.log('drop down clicked') })] }));
10
- };
11
- export default SSIDropDownList;
@@ -1,4 +0,0 @@
1
- export declare const RowActionMenuButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const ActionItemContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const ActionItemCaptionStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
4
- export declare const RowActionDropdownContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,27 +0,0 @@
1
- import styled from 'styled-components';
2
- export const RowActionMenuButtonContainerStyled = styled.div `
3
- position: relative;
4
- `;
5
- export const ActionItemContainerStyled = styled.div `
6
- display: flex;
7
- justify-content: space-between;
8
- align-items: center;
9
- padding: 5px;
10
- cursor: pointer;
11
- max-width: 250px;
12
- `;
13
- export const ActionItemCaptionStyled = styled.span `
14
- font-family: Poppins;
15
- font-size: 16px;
16
- font-weight: 400;
17
- line-height: 24px;
18
- letter-spacing: 0em;
19
- text-align: left;
20
- `;
21
- export const RowActionDropdownContainerStyled = styled.div `
22
- position: absolute;
23
- z-index: 1000;
24
- background-color: #fff;
25
- width: auto;
26
- padding: 10px;
27
- `;
@@ -1,2 +0,0 @@
1
- export declare const SSIDropDownListContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const SSIDropDownListSelectedValueStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,12 +0,0 @@
1
- import styled from 'styled-components';
2
- import { SSIFlexDirectionRowViewStyled } from '../../containers';
3
- import { SSITextH3Styled } from '../../../fonts';
4
- import { gradient100TextCss } from '../../../css';
5
- export const SSIDropDownListContainerStyled = styled(SSIFlexDirectionRowViewStyled) `
6
- text-align: left;
7
- align-items: center;
8
- gap: 2px;
9
- `;
10
- export const SSIDropDownListSelectedValueStyled = styled(SSITextH3Styled) `
11
- ${gradient100TextCss}
12
- `;
@@ -1 +0,0 @@
1
- export declare const SSIIconButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1 +0,0 @@
1
- export declare const SSIPrimaryButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,2 +0,0 @@
1
- export declare const SSISecondaryButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const SSISecondaryButtonCaptionStyled: import("styled-components").StyledComponent<"div", any, {}, never>;