@sphereon/ui-components.ssi-react 0.1.3-unstable.39 → 0.1.3-unstable.40

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.
@@ -7,6 +7,7 @@ import SSITypeLabel from '../../labels/SSITypeLabel';
7
7
  import SSIHoverText from '../../fields/SSIHoverText';
8
8
  import { SSITableViewCellContainerStyled as CellContainer, SSITableViewContainerStyled as Container, SSITableViewHeaderCellContainerStyled as HeaderCellContainer, SSITableViewLabelCellStyled as LabelCell, SSITableViewResultCountCaptionStyled as ResultCountCaption, SSITableViewRowContainerStyled as RowContainer, SSITableViewTableContainerStyled as TableContainer, } from '../../../styles';
9
9
  import { TableCellType } from '../../../types';
10
+ import { SSIStatusLabel } from "../../../index";
10
11
  function IndeterminateCheckbox({ indeterminate, className = '', ...rest }) {
11
12
  const ref = React.useRef(null);
12
13
  React.useEffect(() => {
@@ -24,6 +25,9 @@ const getCellFormatting = (type, value, truncationLength) => {
24
25
  const labels = Array.isArray(value) ? value.map((label) => _jsx(SSITypeLabel, { type: label })) : _jsx(SSITypeLabel, { type: value });
25
26
  return _jsx(LabelCell, { children: labels });
26
27
  }
28
+ case TableCellType.STATUS: {
29
+ return _jsx(SSIStatusLabel, { status: value });
30
+ }
27
31
  default:
28
32
  return _jsx("div", {});
29
33
  }
package/dist/index.d.ts CHANGED
@@ -20,9 +20,8 @@ import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
20
20
  import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
21
21
  import SSISecondaryButton from './components/buttons/SSISecondaryButton';
22
22
  import SSICheckbox from './components/fields/SSICheckbox';
23
- import SSILoader from "./components/assets/loaders/SSILoader";
24
23
  import SSIHoverText from './components/fields/SSIHoverText';
25
24
  export * from './styles/components/fonts';
26
25
  export * from './types';
27
26
  export * from './helpers';
28
- export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSIToastContainer, SSICheckbox, SSILoader, SSIHoverText };
27
+ export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSIToastContainer, SSICheckbox, SSIHoverText };
package/dist/index.js CHANGED
@@ -20,9 +20,8 @@ import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
20
20
  import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
21
21
  import SSISecondaryButton from './components/buttons/SSISecondaryButton';
22
22
  import SSICheckbox from './components/fields/SSICheckbox';
23
- import SSILoader from "./components/assets/loaders/SSILoader";
24
23
  import SSIHoverText from './components/fields/SSIHoverText';
25
24
  export * from './styles/components/fonts';
26
25
  export * from './types';
27
26
  export * from './helpers';
28
- export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSIToastContainer, SSICheckbox, SSILoader, SSIHoverText };
27
+ export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSIToastContainer, SSICheckbox, SSIHoverText };
@@ -4,6 +4,7 @@ import { SSITextH5LightStyled } from '../../fonts';
4
4
  export const SSIStatusLabelContainerStyled = styled(SSIFlexDirectionRowViewStyled) `
5
5
  border-radius: 9px;
6
6
  border: 1px solid #000;
7
+ width: fit-content;
7
8
  `;
8
9
  export const SSIStatusLabelStatusCaptionStyled = styled(SSITextH5LightStyled) `
9
10
  margin-left: 7px;
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1,7 +1,8 @@
1
1
  import { AccessorFn, DeepKeys } from '@tanstack/react-table';
2
2
  export declare enum TableCellType {
3
3
  TEXT = "text",
4
- LABEL = "label"
4
+ LABEL = "label",
5
+ STATUS = "status"
5
6
  }
6
7
  export type ColumnHeader<T> = {
7
8
  accessor: AccessorFn<T> | DeepKeys<T>;
@@ -2,4 +2,5 @@ export var TableCellType;
2
2
  (function (TableCellType) {
3
3
  TableCellType["TEXT"] = "text";
4
4
  TableCellType["LABEL"] = "label";
5
+ TableCellType["STATUS"] = "status";
5
6
  })(TableCellType || (TableCellType = {}));
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.39+14d6b63",
4
+ "version": "0.1.3-unstable.40+5045248",
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>",
@@ -28,7 +28,7 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@sphereon/ui-components.core": "0.1.3-unstable.39+14d6b63",
31
+ "@sphereon/ui-components.core": "0.1.3-unstable.40+5045248",
32
32
  "@tanstack/react-table": "^8.9.3",
33
33
  "react-toastify": "^9.1.3",
34
34
  "styled-components": "^5.3.3"
@@ -41,5 +41,5 @@
41
41
  "peerDependencies": {
42
42
  "react": ">= 16.8.0"
43
43
  },
44
- "gitHead": "14d6b6364e68d75fe71454c2cb37cb82dede7cb5"
44
+ "gitHead": "5045248918930f27e749ef80b78bde21691fc92b"
45
45
  }
@@ -1,20 +0,0 @@
1
- import React from "react";
2
- interface SSILoaderProps {
3
- size?: number;
4
- color?: string;
5
- strokeWidth?: number;
6
- timeout?: number;
7
- callback: (state?: any) => Promise<void>;
8
- }
9
- export default class SSILoader extends React.Component<SSILoaderProps, any> {
10
- private strokeWidth;
11
- private halfStrokeWidth;
12
- private diameter;
13
- private radius;
14
- private diameterWithoutHalfStrokeWidth;
15
- private radiusWithoutHalfStrokeWidth;
16
- private color;
17
- componentDidMount(): void;
18
- render(): JSX.Element;
19
- }
20
- export {};
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from "react";
3
- export default class SSILoader extends React.Component {
4
- strokeWidth = this.props.strokeWidth ?? 16;
5
- halfStrokeWidth = (this.strokeWidth / 2);
6
- diameter = this.props.size ?? 200;
7
- radius = (this.diameter / 2);
8
- diameterWithoutHalfStrokeWidth = (this.diameter - this.halfStrokeWidth);
9
- radiusWithoutHalfStrokeWidth = (this.radius - this.halfStrokeWidth);
10
- color = this.props.color ?? '#0B81FF';
11
- componentDidMount() {
12
- setTimeout(async (state) => {
13
- await this.props.callback(state);
14
- }, this.props.timeout ?? 0);
15
- }
16
- render() {
17
- return (_jsx("div", { style: { width: this.diameter, height: this.diameter }, children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100%", height: "100%", viewBox: `0 0 ${this.diameter} ${this.diameter}`, fill: "none", color: `${this.color}`, children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: "spinner-secondHalf", children: [_jsx("stop", { offset: "0%", stopOpacity: "0", stopColor: "currentColor" }), _jsx("stop", { offset: "100%", stopOpacity: "0.5", stopColor: "currentColor" })] }), _jsxs("linearGradient", { id: "spinner-firstHalf", children: [_jsx("stop", { offset: "0%", stopOpacity: "1", stopColor: "currentColor" }), _jsx("stop", { offset: "100%", stopOpacity: "0.5", stopColor: "currentColor" })] })] }), _jsxs("g", { strokeWidth: this.strokeWidth, children: [_jsx("path", { stroke: "url(#spinner-secondHalf)", d: `M ${this.halfStrokeWidth} ${this.radius}
18
- A ${this.radiusWithoutHalfStrokeWidth} ${this.radiusWithoutHalfStrokeWidth} 0 0 1 ${this.diameterWithoutHalfStrokeWidth} ${this.radius}` }), _jsx("path", { stroke: "url(#spinner-firstHalf)", d: `M ${this.diameterWithoutHalfStrokeWidth} ${this.radius}
19
- A ${this.radiusWithoutHalfStrokeWidth} ${this.radiusWithoutHalfStrokeWidth} 0 0 1 ${this.halfStrokeWidth} ${this.radius}` }), _jsx("path", { stroke: "currentColor", strokeLinecap: "round", d: `M ${this.halfStrokeWidth} ${this.radius}
20
- A ${this.radiusWithoutHalfStrokeWidth} ${this.radiusWithoutHalfStrokeWidth} 0 0 1 ${this.halfStrokeWidth} ${this.radiusWithoutHalfStrokeWidth}` })] }), _jsx("animateTransform", { from: "0 0 0", to: "360 0 0", attributeName: "transform", type: "rotate", repeatCount: "indefinite", dur: "1300ms" })] }) }));
21
- }
22
- }