@sphereon/ui-components.ssi-react 0.1.2-next.13 → 0.1.2-next.19

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.
@@ -1,7 +1,8 @@
1
- import { FC } from 'react';
1
+ import { CSSProperties, FC } from 'react';
2
2
  export interface IProps {
3
3
  size?: number;
4
4
  color?: string;
5
+ style?: CSSProperties;
5
6
  }
6
7
  declare const SSIAddIcon: FC<IProps>;
7
8
  export default SSIAddIcon;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { fontColors } from '@sphereon/ui-components.core';
3
3
  const SSIAddIcon = (props) => {
4
- const { size = 16, color = fontColors.dark } = props;
5
- return (_jsx("div", { style: { width: size, aspectRatio: 1, display: 'flex' }, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8 0.5C7.65483 0.5 7.375 0.779833 7.375 1.125V7.37503H1.125C0.779812 7.37503 0.5 7.65484 0.5 8.00003C0.5 8.34519 0.779812 8.62502 1.125 8.62502H7.375V14.875C7.375 15.2202 7.65483 15.5 8 15.5C8.34519 15.5 8.625 15.2202 8.625 14.875V8.62502H14.875C15.2202 8.62502 15.5 8.34519 15.5 8.00003C15.5 7.65484 15.2202 7.37503 14.875 7.37503H8.625V1.125C8.625 0.779833 8.34519 0.5 8 0.5Z", fill: color }) }) }));
4
+ const { size = 16, color = fontColors.dark, style } = props;
5
+ return (_jsx("div", { style: { ...style, width: size, aspectRatio: 1, display: 'flex' }, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8 0.5C7.65483 0.5 7.375 0.779833 7.375 1.125V7.37503H1.125C0.779812 7.37503 0.5 7.65484 0.5 8.00003C0.5 8.34519 0.779812 8.62502 1.125 8.62502H7.375V14.875C7.375 15.2202 7.65483 15.5 8 15.5C8.34519 15.5 8.625 15.2202 8.625 14.875V8.62502H14.875C15.2202 8.62502 15.5 8.34519 15.5 8.00003C15.5 7.65484 15.2202 7.37503 14.875 7.37503H8.625V1.125C8.625 0.779833 8.34519 0.5 8 0.5Z", fill: color }) }) }));
6
6
  };
7
7
  export default SSIAddIcon;
@@ -1,10 +1,11 @@
1
- import { FC } from 'react';
1
+ import { CSSProperties, FC } from 'react';
2
2
  import { ButtonIconsEnum } from '../../../types';
3
3
  export type Props = {
4
4
  caption: string;
5
5
  onClick: () => Promise<void>;
6
6
  icon?: ButtonIconsEnum;
7
7
  disabled?: boolean;
8
+ style?: CSSProperties;
8
9
  };
9
10
  declare const SSIPrimaryButton: FC<Props>;
10
11
  export default SSIPrimaryButton;
@@ -4,15 +4,20 @@ import SSIAddIcon from '../../assets/icons/SSIAddIcon';
4
4
  import { SSIPrimaryButtonContainerStyled as Container, SSITextH3LightStyled as Caption } from '../../../styles/components';
5
5
  import { ButtonIconsEnum } from '../../../types';
6
6
  const SSIPrimaryButton = (props) => {
7
- const { caption, icon, onClick } = props;
8
- return (_jsxs(Container, { onClick: onClick, children: [icon && getIcon(icon, fontColors.light), _jsx(Caption, { children: caption })] }));
9
- };
10
- const getIcon = (icon, color) => {
11
- switch (icon) {
12
- case ButtonIconsEnum.ADD:
13
- return _jsx(SSIAddIcon, { color: color });
14
- default:
15
- return _jsx("div", {});
16
- }
7
+ const { caption, icon, onClick, disabled = false, style = {} } = props;
8
+ const getIcon = (icon, color) => {
9
+ switch (icon) {
10
+ case ButtonIconsEnum.ADD:
11
+ return _jsx(SSIAddIcon, { style: { ...(disabled && { opacity: 0.5 }) }, color: color });
12
+ default:
13
+ return _jsx("div", {});
14
+ }
15
+ };
16
+ const onClicked = async () => {
17
+ if (!disabled) {
18
+ await onClick();
19
+ }
20
+ };
21
+ return (_jsxs(Container, { style: { ...style, ...(disabled && { opacity: 0.5 }) }, onClick: onClicked, children: [icon && getIcon(icon, fontColors.light), _jsx(Caption, { style: { ...(disabled && { opacity: 0.5 }) }, children: caption })] }));
17
22
  };
18
23
  export default SSIPrimaryButton;
@@ -0,0 +1,11 @@
1
+ import { CSSProperties, FC } from 'react';
2
+ import { ButtonIconsEnum } from '../../../types';
3
+ export type Props = {
4
+ caption: string;
5
+ onClick: () => Promise<void>;
6
+ icon?: ButtonIconsEnum;
7
+ disabled?: boolean;
8
+ style?: CSSProperties;
9
+ };
10
+ declare const SSISecondaryButton: FC<Props>;
11
+ export default SSISecondaryButton;
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { gradientColors } from '@sphereon/ui-components.core';
3
+ import SSIAddIcon from '../../assets/icons/SSIAddIcon';
4
+ import { SSISecondaryButtonCaptionStyled as Caption, SSISecondaryButtonContainerStyled as Container, } from '../../../styles/components';
5
+ import { ButtonIconsEnum } from '../../../types';
6
+ const SSISecondaryButton = (props) => {
7
+ const { caption, icon, onClick, disabled = false, style = {} } = props;
8
+ const getIcon = (icon, color) => {
9
+ switch (icon) {
10
+ case ButtonIconsEnum.ADD:
11
+ return _jsx(SSIAddIcon, { style: { ...(disabled && { opacity: 0.5 }) }, color: color });
12
+ default:
13
+ return _jsx("div", {});
14
+ }
15
+ };
16
+ const onClicked = async () => {
17
+ if (!disabled) {
18
+ await onClick();
19
+ }
20
+ };
21
+ return (_jsxs(Container, { style: { ...style, ...(disabled && { opacity: 0.5 }) }, onClick: onClicked, children: [icon && getIcon(icon, gradientColors['100']), _jsx(Caption, { style: { ...(disabled && { opacity: 0.5 }) }, children: caption })] }));
22
+ };
23
+ export default SSISecondaryButton;
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ import SSITableViewHeader from './components/views/SSITableView/SSITableViewHead
16
16
  import SSITabView from './components/views/SSITabView';
17
17
  import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
18
18
  import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
19
+ import SSISecondaryButton from './components/buttons/SSISecondaryButton';
19
20
  export * from './types';
20
21
  export * from './styles/components/fonts';
21
- export { SSICardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, };
22
+ export { SSICardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, };
package/dist/index.js CHANGED
@@ -16,6 +16,7 @@ import SSITableViewHeader from './components/views/SSITableView/SSITableViewHead
16
16
  import SSITabView from './components/views/SSITabView';
17
17
  import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
18
18
  import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
19
+ import SSISecondaryButton from './components/buttons/SSISecondaryButton';
19
20
  export * from './types';
20
21
  export * from './styles/components/fonts';
21
- export { SSICardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, };
22
+ export { SSICardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, };
@@ -8,6 +8,6 @@ export const SSIPrimaryButtonContainerStyled = styled(SSIRoundedContainerStyled)
8
8
  justify-content: center;
9
9
  align-items: center;
10
10
  gap: 8px;
11
- padding: 6px 8px 6px 8px;
11
+ padding: 9px 6px 9px 6px;
12
12
  cursor: pointer;
13
13
  `;
@@ -0,0 +1,2 @@
1
+ export declare const SSISecondaryButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const SSISecondaryButtonCaptionStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -0,0 +1,37 @@
1
+ import styled from 'styled-components';
2
+ import { SSIRoundedContainerStyled } from '../../containers';
3
+ import { gradientColors } from '@sphereon/ui-components.core';
4
+ import { SSITextH3Styled } from "../../fonts";
5
+ export const SSISecondaryButtonContainerStyled = styled(SSIRoundedContainerStyled) `
6
+ position: relative;
7
+ display: flex;
8
+ flex-direction: row;
9
+ justify-content: center;
10
+ align-items: center;
11
+ gap: 8px;
12
+ padding: 9px 6px 9px 6px;
13
+ cursor: pointer;
14
+
15
+ &::before {
16
+ content: '';
17
+ position: absolute;
18
+ top: 0;
19
+ left: 0;
20
+ right: 0;
21
+ bottom: 0;
22
+ border-radius: 8px;
23
+ border: 1px solid transparent;
24
+ background: linear-gradient(135deg, #7276F7, #7C40E8) border-box;
25
+ -webkit-mask:
26
+ linear-gradient(#fff 0 0) padding-box,
27
+ linear-gradient(#fff 0 0);
28
+ -webkit-mask-composite: destination-out;
29
+ mask-composite: exclude;
30
+ }
31
+ `;
32
+ export const SSISecondaryButtonCaptionStyled = styled(SSITextH3Styled) `
33
+ background: ${gradientColors['100']};
34
+ background-clip: text;
35
+ -webkit-background-clip: text;
36
+ -webkit-text-fill-color: transparent;
37
+ `;
@@ -33,4 +33,5 @@ export const SSITableViewHeaderCellContainerStyled = styled.th `
33
33
  padding: 20px 16px 20px 16px;
34
34
  background-color: ${backgroundColors.primaryLight};
35
35
  color: ${fontColors.lightGrey};
36
+ text-align: left;
36
37
  `;
@@ -1,6 +1,7 @@
1
1
  export * from './SSICardView';
2
2
  export * from './SSIStatusLabel';
3
3
  export * from './SSIPrimaryButton';
4
+ export * from './SSISecondaryButton';
4
5
  export * from './SSIIconButton';
5
6
  export * from './SSIDropDownList';
6
7
  export * from './SSITypeLabel';
@@ -1,6 +1,7 @@
1
1
  export * from './SSICardView';
2
2
  export * from './SSIStatusLabel';
3
3
  export * from './SSIPrimaryButton';
4
+ export * from './SSISecondaryButton';
4
5
  export * from './SSIIconButton';
5
6
  export * from './SSIDropDownList';
6
7
  export * from './SSITypeLabel';
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.2-next.13+9f87811",
4
+ "version": "0.1.2-next.19+2750740",
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.2-next.13+9f87811",
31
+ "@sphereon/ui-components.core": "0.1.2-next.19+2750740",
32
32
  "@tanstack/react-table": "^8.9.3",
33
33
  "styled-components": "^5.3.3"
34
34
  },
@@ -40,5 +40,5 @@
40
40
  "peerDependencies": {
41
41
  "react": ">= 16.8.0"
42
42
  },
43
- "gitHead": "9f87811aeb9436f1a8ddbb7757aba7eebb1ef855"
43
+ "gitHead": "27507401b4e734f562cb818d02d2004aea082007"
44
44
  }