sharedui2 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/build/favicon.ico +0 -0
  2. package/build/logo192.png +0 -0
  3. package/build/logo512.png +0 -0
  4. package/build/manifest.json +25 -0
  5. package/build/robots.txt +3 -0
  6. package/package.json +2 -2
  7. package/craco.config.js +0 -52
  8. package/dist/shared.js +0 -3
  9. package/dist/shared.js.LICENSE.txt +0 -9
  10. package/dist/shared.js.map +0 -1
  11. package/src/App.js +0 -20
  12. package/src/App.less +0 -38
  13. package/src/App.test.js +0 -23
  14. package/src/assets/citrix-animation.gif +0 -0
  15. package/src/assets/citrix.svg +0 -30
  16. package/src/assets/close-btn.svg +0 -9
  17. package/src/assets/error.svg +0 -10
  18. package/src/assets/fonts/PublicSans-ExtraLight.woff +0 -0
  19. package/src/assets/fonts/PublicSans-ExtraLight.woff2 +0 -0
  20. package/src/assets/fonts/PublicSans-ExtraLightItalic.woff +0 -0
  21. package/src/assets/fonts/PublicSans-ExtraLightItalic.woff2 +0 -0
  22. package/src/assets/fonts/PublicSans-Italic.woff +0 -0
  23. package/src/assets/fonts/PublicSans-Italic.woff2 +0 -0
  24. package/src/assets/fonts/PublicSans-Light.woff +0 -0
  25. package/src/assets/fonts/PublicSans-Light.woff2 +0 -0
  26. package/src/assets/fonts/PublicSans-LightItalic.woff +0 -0
  27. package/src/assets/fonts/PublicSans-LightItalic.woff2 +0 -0
  28. package/src/assets/fonts/PublicSans-Medium.woff +0 -0
  29. package/src/assets/fonts/PublicSans-Medium.woff2 +0 -0
  30. package/src/assets/fonts/PublicSans-MediumItalic.woff +0 -0
  31. package/src/assets/fonts/PublicSans-MediumItalic.woff2 +0 -0
  32. package/src/assets/fonts/PublicSans-Regular.woff +0 -0
  33. package/src/assets/fonts/PublicSans-Regular.woff2 +0 -0
  34. package/src/assets/fonts/PublicSans-SemiBold.woff +0 -0
  35. package/src/assets/fonts/PublicSans-SemiBold.woff2 +0 -0
  36. package/src/assets/fonts/PublicSans-SemiBoldItalic.woff +0 -0
  37. package/src/assets/fonts/PublicSans-SemiBoldItalic.woff2 +0 -0
  38. package/src/assets/globe.svg +0 -44
  39. package/src/assets/rebranded/close-btn.svg +0 -11
  40. package/src/assets/rebranded/error.svg +0 -13
  41. package/src/assets/rebranded/globe.svg +0 -21
  42. package/src/assets/rebranded/success.svg +0 -12
  43. package/src/assets/rebranded/workspaceVertical.svg +0 -12
  44. package/src/assets/spinner-dark.svg +0 -6
  45. package/src/assets/spinner-light.svg +0 -6
  46. package/src/assets/success.svg +0 -10
  47. package/src/assets/workspaceHorizontal.svg +0 -44
  48. package/src/assets/workspaceVertical.svg +0 -42
  49. package/src/components/ws-button/index.js +0 -4
  50. package/src/components/ws-button/ws-button.component.jsx +0 -48
  51. package/src/components/ws-button/ws-button.component.less +0 -100
  52. package/src/components/ws-button/ws-button.component.test.js +0 -11
  53. package/src/components/ws-button/ws-buttons.component.jsx +0 -60
  54. package/src/components/ws-button/ws-buttons.component.test.js +0 -18
  55. package/src/index.js +0 -18
  56. package/src/index.less +0 -13
  57. package/src/logo.svg +0 -1
  58. package/src/main.js +0 -1
  59. package/src/reportWebVitals.js +0 -13
  60. package/src/setupTests.js +0 -5
  61. package/webpack.config.js +0 -15
@@ -1,48 +0,0 @@
1
- // Copyright © 2024. Cloud Software Group, Inc. All Rights Reserved. Confidential & Proprietary.
2
-
3
- // Dependencies
4
- import React from 'react';
5
- import './ws-button.component.less';
6
-
7
- function WsButton({id, children, disabled, isLoading, name, onClick, size, tabIndex, type, value, variant }) {
8
- const classes = ['ws-button'];
9
- if (!size || size === 'default') {
10
- classes.push('ws-button-default');
11
- } else if (size === 'baby') {
12
- classes.push('ws-button-baby');
13
- }
14
- let loading = null;
15
- if (isLoading) {
16
- classes.push('ws-button-loading');
17
- if (variant === 'primary') {
18
- loading = <div className='ws-button-loading-content-light' />;
19
- } else if (variant === 'secondary') {
20
- loading = <div className='ws-button-loading-content-dark' />;
21
- }
22
- if (variant === 'primary') {
23
- classes.push('ws-button-primary-loading');
24
- } else if (variant === 'secondary') {
25
- classes.push('ws-button-secondary-loading');
26
- }
27
- } else {
28
- if (variant === 'primary') {
29
- classes.push('ws-button-primary');
30
- } else if (variant === 'secondary') {
31
- classes.push('ws-button-secondary');
32
- }
33
- }
34
- return (
35
- <button data-testid="ws-button.component" className={classes.join(' ')}
36
- disabled={disabled}
37
- id={id}
38
- name={name}
39
- onClick={onClick}
40
- tabIndex={tabIndex}
41
- type={type}
42
- value={value}>
43
- {loading ? loading : children}
44
- </button>
45
- );
46
- }
47
-
48
- export default WsButton;
@@ -1,100 +0,0 @@
1
- // Copyright © 2024. Cloud Software Group, Inc. All Rights Reserved. Confidential & Proprietary.
2
-
3
- @import (reference) '../../../theme.less';
4
-
5
- .ws-button {
6
- cursor: pointer;
7
- display: inline-block;
8
- font-size: 16px;
9
- font-weight: 600;
10
- text-align: center;
11
- transition: background-color 0.1s ease, border 0.1s ease, color 0.1s ease;
12
- user-select: none;
13
- width: 100%;
14
-
15
- &-default {
16
- border-radius: 20px;
17
- height: 40px;
18
- }
19
-
20
- &-baby {
21
- border-radius: 12px;
22
- height: 24px;
23
- }
24
-
25
- &-loading {
26
- background-color: @ws-button-primary-background-color;
27
- border: none;
28
- }
29
-
30
- &-loading-content-light {
31
- background-image: url('../../assets/spinner-light.svg');
32
- background-repeat: no-repeat;
33
- display: block;
34
- height: 20px;
35
- margin: 0 auto;
36
- width: 20px;
37
-
38
- }
39
-
40
- &-loading-content-dark {
41
- background-image: url('../../assets/spinner-dark.svg');
42
- background-repeat: no-repeat;
43
- display: block;
44
- height: 20px;
45
- margin: 0 auto;
46
- width: 20px;
47
- }
48
- }
49
-
50
- .ws-button:focus {
51
- outline: none;
52
- }
53
-
54
- // primary button
55
- .ws-button-primary,
56
- .ws-button-primary-loading {
57
- background-color: @ws-button-primary-background-color;
58
- border: none;
59
- color: @ws-button-primary-text-color;
60
- }
61
-
62
- .ws-button-primary-loading {
63
- cursor: none;
64
- }
65
-
66
- .ws-button-primary:hover {
67
- background-color: @ws-button-primary-background-color-hover;
68
- }
69
-
70
- .ws-button-primary.disabled,
71
- .ws-button-primary[disabled] {
72
- background-color: @ws-button-primary-background-color-disabled;
73
- border: none;
74
- cursor: none;
75
- }
76
-
77
- // secondary button
78
- .ws-button-secondary,
79
- .ws-button-secondary-loading {
80
- background-color: @ws-button-secondary-background-color;
81
- border: 2px solid @ws-button-secondary-border-color;
82
- color: @ws-button-secondary-text-color;
83
- }
84
-
85
- .ws-button-secondary-loading {
86
- cursor: none;
87
- }
88
-
89
- .ws-button-secondary:hover {
90
- border: 2px solid @ws-button-secondary-border-hover;
91
- color: @ws-button-secondary-text-color-hover;
92
- }
93
-
94
- .ws-button-secondary.disabled,
95
- .ws-button-secondary[disabled] {
96
- background-color: @ws-button-secondary-background-color-disabled;
97
- border: 2px solid @ws-button-secondary-border-hover-disabled;
98
- color: @ws-button-secondary-text-color-disabled;
99
- cursor: none;
100
- }
@@ -1,11 +0,0 @@
1
- import { render, screen } from '@testing-library/react';
2
- import WsButton from './ws-button.component.jsx';
3
-
4
- test('renders a primary baby button', () => {
5
- render(
6
- <WsButton variant="primary" size="baby">Click Me</WsButton>
7
- );
8
- const button = screen.getByRole('button', { name: /click me/i });
9
- expect(button).toBeInTheDocument();
10
- expect(button).toHaveClass('ws-button ws-button-baby ws-button-primary');
11
- });
@@ -1,60 +0,0 @@
1
- // Copyright © 2024. Cloud Software Group, Inc. All Rights Reserved. Confidential & Proprietary.
2
-
3
- import React from 'react';
4
- import WsButton from './ws-button.component.jsx';
5
-
6
- const maincontainer = {
7
- padding: '25px'
8
- };
9
-
10
- const flexContainer = {
11
- display: 'flex'
12
- };
13
-
14
- const flexColumn = {
15
- display: 'flex',
16
- flexDirection: 'column',
17
- gap: '20px'
18
- };
19
-
20
- const item = {
21
- flex: '1',
22
- marginRight: '10px'
23
- };
24
-
25
- function handleClick(){
26
- alert('Button clicked');
27
- }
28
-
29
- const Buttons = () => {
30
- return (
31
- <div data-testid="buttons.component" style={maincontainer}>
32
- <div style={flexColumn}>
33
- <div style={flexContainer}>
34
- <div style={item}>
35
- <WsButton variant="primary" onClick={handleClick}>Default</WsButton>
36
- </div>
37
- <div style={item}>
38
- <WsButton variant="primary" size="baby" onClick={handleClick}>Baby</WsButton>
39
- </div>
40
- <div style={item}>
41
- <WsButton variant="secondary" size="default" onClick={handleClick}>Secondary</WsButton>
42
- </div>
43
- </div>
44
- <div style={flexContainer}>
45
- <div style={item}>
46
- <WsButton variant="primary" size="default" disabled>Disabled</WsButton>
47
- </div>
48
- <div style={item}>
49
- <WsButton variant="primary" size="default" isLoading/>
50
- </div>
51
- <div style={item}>
52
- <WsButton variant="secondary" size="baby" isLoading/>
53
- </div>
54
- </div>
55
- </div>
56
- </div>
57
- );
58
- };
59
-
60
- export default Buttons;
@@ -1,18 +0,0 @@
1
- import { render, screen } from '@testing-library/react';
2
- import Buttons from './ws-buttons.component.jsx';
3
-
4
- test('renders a default button', () => {
5
- render(
6
- <Buttons />
7
- );
8
- const button = screen.getByRole('button', { name: /Default/i });
9
- expect(button).toBeInTheDocument();
10
- });
11
-
12
- test('renders a disabled button', () => {
13
- render(
14
- <Buttons />
15
- );
16
- const button = screen.getByRole('button', { name: /Disabled/i });
17
- expect(button).toBeDisabled();
18
- });
package/src/index.js DELETED
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom/client';
3
- import { BrowserRouter } from 'react-router-dom';
4
- import './index.less';
5
- import App from './App';
6
- import reportWebVitals from './reportWebVitals';
7
-
8
- const root = ReactDOM.createRoot(document.getElementById('root'));
9
- root.render(
10
- <BrowserRouter>
11
- <App />
12
- </BrowserRouter>
13
- );
14
-
15
- // If you want to start measuring performance in your app, pass a function
16
- // to log results (for example: reportWebVitals(console.log))
17
- // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
18
- reportWebVitals();
package/src/index.less DELETED
@@ -1,13 +0,0 @@
1
- body {
2
- margin: 0;
3
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4
- 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5
- sans-serif;
6
- -webkit-font-smoothing: antialiased;
7
- -moz-osx-font-smoothing: grayscale;
8
- }
9
-
10
- code {
11
- font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12
- monospace;
13
- }
package/src/logo.svg DELETED
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
package/src/main.js DELETED
@@ -1 +0,0 @@
1
- //export * from './components/ws-button/main';
@@ -1,13 +0,0 @@
1
- const reportWebVitals = onPerfEntry => {
2
- if (onPerfEntry && onPerfEntry instanceof Function) {
3
- import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4
- getCLS(onPerfEntry);
5
- getFID(onPerfEntry);
6
- getFCP(onPerfEntry);
7
- getLCP(onPerfEntry);
8
- getTTFB(onPerfEntry);
9
- });
10
- }
11
- };
12
-
13
- export default reportWebVitals;
package/src/setupTests.js DELETED
@@ -1,5 +0,0 @@
1
- // jest-dom adds custom jest matchers for asserting on DOM nodes.
2
- // allows you to do things like:
3
- // expect(element).toHaveTextContent(/react/i)
4
- // learn more: https://github.com/testing-library/jest-dom
5
- import '@testing-library/jest-dom';
package/webpack.config.js DELETED
@@ -1,15 +0,0 @@
1
- module.exports = {
2
- module: {
3
- rules: [
4
- {
5
- test: /\.less$/i,
6
- use: [
7
- // compiles Less to CSS
8
- "style-loader",
9
- "css-loader",
10
- "less-loader",
11
- ],
12
- },
13
- ],
14
- },
15
- };