@axinom/mosaic-ui 0.28.0-rc.4 → 0.28.0
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.
- package/dist/components/FormElements/SingleLineText/SingleLineText.d.ts.map +1 -1
- package/dist/components/FormElements/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/Hub/Hub.d.ts.map +1 -1
- package/dist/components/Hub/Tile/Tile.d.ts.map +1 -1
- package/dist/components/Hub/Tile/Tile.model.d.ts +0 -2
- package/dist/components/Hub/Tile/Tile.model.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +4 -4
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/src/components/FormElements/SingleLineText/SingleLineText.tsx +0 -2
- package/src/components/FormElements/TextArea/TextArea.tsx +0 -2
- package/src/components/Hub/Hub.stories.tsx +0 -18
- package/src/components/Hub/Hub.tsx +0 -1
- package/src/components/Hub/Tile/Tile.model.ts +0 -2
- package/src/components/Hub/Tile/Tile.scss +9 -3
- package/src/components/Hub/Tile/Tile.tsx +4 -11
- package/src/components/LandingPageTiles/LandingPageTiles.spec.tsx +2 -2
- package/src/components/LandingPageTiles/LandingPageTiles.stories.tsx +2 -2
- package/src/index.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-ui",
|
|
3
|
-
"version": "0.28.0
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "UI components for building Axinom Mosaic applications",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"build-storybook": "build-storybook -s ./.storybook/static"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@axinom/mosaic-core": "^0.4.1
|
|
35
|
+
"@axinom/mosaic-core": "^0.4.1",
|
|
36
36
|
"@faker-js/faker": "^7.4.0",
|
|
37
37
|
"@popperjs/core": "^2.9.2",
|
|
38
38
|
"clsx": "^1.1.0",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"access": "public"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "c64cc582e131b50adfc21b0c8ad940469780f43b"
|
|
96
96
|
}
|
|
@@ -46,7 +46,6 @@ export const SingleLineText: React.FC<SingleLineTextProps> = ({
|
|
|
46
46
|
onFocus,
|
|
47
47
|
className = '',
|
|
48
48
|
tooltipContent,
|
|
49
|
-
...rest
|
|
50
49
|
}) => {
|
|
51
50
|
const errorMsg: string | undefined = error;
|
|
52
51
|
const [val, setVal] = useState(value ?? '');
|
|
@@ -105,7 +104,6 @@ export const SingleLineText: React.FC<SingleLineTextProps> = ({
|
|
|
105
104
|
error={errorMsg}
|
|
106
105
|
tooltipContent={tooltipContent}
|
|
107
106
|
dataTestFieldType="SingleLineText"
|
|
108
|
-
{...rest}
|
|
109
107
|
>
|
|
110
108
|
<input
|
|
111
109
|
className={clsx({ [classes.hasError]: errorMsg !== undefined })}
|
|
@@ -41,7 +41,6 @@ export const TextArea: React.FC<TextAreaProps> = ({
|
|
|
41
41
|
onFocus,
|
|
42
42
|
className = '',
|
|
43
43
|
tooltipContent,
|
|
44
|
-
...rest
|
|
45
44
|
}) => {
|
|
46
45
|
const errorMsg: string | undefined = error;
|
|
47
46
|
|
|
@@ -52,7 +51,6 @@ export const TextArea: React.FC<TextAreaProps> = ({
|
|
|
52
51
|
error={errorMsg}
|
|
53
52
|
tooltipContent={tooltipContent}
|
|
54
53
|
dataTestFieldType="TextArea"
|
|
55
|
-
{...rest}
|
|
56
54
|
>
|
|
57
55
|
<textarea
|
|
58
56
|
className={clsx({ [classes.hasError]: errorMsg !== undefined })}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { text } from '@storybook/addon-knobs';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { MemoryRouter } from 'react-router-dom';
|
|
4
3
|
import { Story } from '../../helpers/storybook';
|
|
@@ -98,20 +97,3 @@ export const Default: Story = () => {
|
|
|
98
97
|
</div>
|
|
99
98
|
);
|
|
100
99
|
};
|
|
101
|
-
|
|
102
|
-
export const knobs: Story = () => {
|
|
103
|
-
const item: HubItem = {
|
|
104
|
-
groupName: text('Group Name', 'Image Service'),
|
|
105
|
-
path: text('Path', '/video/acquisition'),
|
|
106
|
-
label: text('Label', 'Transcoding'),
|
|
107
|
-
subLabel: text('Sub Label', 'Image Acquisition'),
|
|
108
|
-
icon: <DefaultIcon />,
|
|
109
|
-
};
|
|
110
|
-
return (
|
|
111
|
-
<div style={defaultContainer}>
|
|
112
|
-
<MemoryRouter>
|
|
113
|
-
<Hub items={[item]} />
|
|
114
|
-
</MemoryRouter>
|
|
115
|
-
</div>
|
|
116
|
-
);
|
|
117
|
-
};
|
|
@@ -5,8 +5,6 @@ export interface TileProps {
|
|
|
5
5
|
path: string;
|
|
6
6
|
/** Tile label */
|
|
7
7
|
label: string;
|
|
8
|
-
/** Tile sub label */
|
|
9
|
-
subLabel?: string;
|
|
10
8
|
/** Icon location or an react element of svg icon.
|
|
11
9
|
* if an react element of svg is passed, the correct style for two types ("small" and "large") will be applied accordingly
|
|
12
10
|
* The styles which don't want to be affected based on the tile type can be passed as inline styles.
|
|
@@ -15,7 +15,11 @@
|
|
|
15
15
|
&:hover {
|
|
16
16
|
border: 1px solid var(--hub-tile-border-hover, $hub-tile-border-hover);
|
|
17
17
|
|
|
18
|
-
box-shadow: 0 0 0 2px
|
|
18
|
+
box-shadow: 0 0 0 2px
|
|
19
|
+
var(
|
|
20
|
+
--hub-tile-border-hover,
|
|
21
|
+
$hub-tile-border-hover
|
|
22
|
+
);
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
&.disabled {
|
|
@@ -30,12 +34,14 @@
|
|
|
30
34
|
height: 60px;
|
|
31
35
|
align-self: center;
|
|
32
36
|
svg * {
|
|
33
|
-
stroke: var(
|
|
37
|
+
stroke: var(
|
|
38
|
+
--hub-tile-stroke-color,
|
|
39
|
+
$hub-tile-stroke-color,
|
|
40
|
+
);
|
|
34
41
|
}
|
|
35
42
|
}
|
|
36
43
|
|
|
37
44
|
.label {
|
|
38
|
-
display: grid;
|
|
39
45
|
text-align: center;
|
|
40
46
|
align-self: start;
|
|
41
47
|
font-size: 18px;
|
|
@@ -16,13 +16,7 @@ import classes from './Tile.scss';
|
|
|
16
16
|
* icon={'/images/default_image.svg'}
|
|
17
17
|
* />
|
|
18
18
|
*/
|
|
19
|
-
export const Tile: React.FC<TileProps> = ({
|
|
20
|
-
path,
|
|
21
|
-
label,
|
|
22
|
-
subLabel,
|
|
23
|
-
icon,
|
|
24
|
-
disabled,
|
|
25
|
-
}) => {
|
|
19
|
+
export const Tile: React.FC<TileProps> = ({ path, label, icon, disabled }) => {
|
|
26
20
|
return (
|
|
27
21
|
<Link
|
|
28
22
|
className={clsx(classes.tile, disabled && classes.disabled)}
|
|
@@ -37,10 +31,9 @@ export const Tile: React.FC<TileProps> = ({
|
|
|
37
31
|
<img src={icon} alt={`${label} icon`} />
|
|
38
32
|
)}
|
|
39
33
|
</div>
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</div>
|
|
34
|
+
<span className={classes.label} data-test-id="tile-label">
|
|
35
|
+
{label}
|
|
36
|
+
</span>
|
|
44
37
|
</Link>
|
|
45
38
|
);
|
|
46
39
|
};
|