@scm-manager/ui-components 2.30.2-20220110-094329 → 2.30.2-20220116-101546
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/package.json +5 -5
- package/src/Help.tsx +3 -2
- package/src/Tooltip.stories.tsx +11 -0
- package/src/Tooltip.tsx +3 -3
- package/src/__snapshots__/storyshots.test.ts.snap +1753 -1662
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scm-manager/ui-components",
|
|
3
|
-
"version": "2.30.2-
|
|
3
|
+
"version": "2.30.2-20220116-101546",
|
|
4
4
|
"description": "UI Components for SCM-Manager and its plugins",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@scm-manager/jest-preset": "^2.13.0",
|
|
26
26
|
"@scm-manager/prettier-config": "^2.10.1",
|
|
27
27
|
"@scm-manager/tsconfig": "^2.12.0",
|
|
28
|
-
"@scm-manager/ui-tests": "^2.30.2-
|
|
28
|
+
"@scm-manager/ui-tests": "^2.30.2-20220116-101546",
|
|
29
29
|
"@storybook/addon-actions": "^6.3.12",
|
|
30
30
|
"@storybook/addon-storyshots": "^6.3.12",
|
|
31
31
|
"@storybook/builder-webpack5": "^6.3.12",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@headlessui/react": "^1.4.3",
|
|
69
|
-
"@scm-manager/ui-api": "^2.30.2-
|
|
70
|
-
"@scm-manager/ui-extensions": "^2.30.2-
|
|
71
|
-
"@scm-manager/ui-types": "^2.30.2-
|
|
69
|
+
"@scm-manager/ui-api": "^2.30.2-20220116-101546",
|
|
70
|
+
"@scm-manager/ui-extensions": "^2.30.2-20220116-101546",
|
|
71
|
+
"@scm-manager/ui-types": "^2.30.2-20220116-101546",
|
|
72
72
|
"classnames": "^2.2.6",
|
|
73
73
|
"date-fns": "^2.4.1",
|
|
74
74
|
"deepmerge": "^4.2.2",
|
package/src/Help.tsx
CHANGED
|
@@ -40,16 +40,17 @@ const AbsolutePositionTooltip = styled(Tooltip)`
|
|
|
40
40
|
|
|
41
41
|
const Help: FC<Props> = ({ message, multiline, className, id }) => (
|
|
42
42
|
<AbsolutePositionTooltip
|
|
43
|
-
className={classNames("is-inline-block", "pl-1",
|
|
43
|
+
className={classNames("is-inline-block", "pl-1", className)}
|
|
44
44
|
message={message}
|
|
45
45
|
id={id}
|
|
46
|
+
multiline={multiline}
|
|
46
47
|
>
|
|
47
48
|
<HelpIcon />
|
|
48
49
|
</AbsolutePositionTooltip>
|
|
49
50
|
);
|
|
50
51
|
|
|
51
52
|
Help.defaultProps = {
|
|
52
|
-
multiline: true
|
|
53
|
+
multiline: true
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
export default Help;
|
package/src/Tooltip.stories.tsx
CHANGED
|
@@ -94,4 +94,15 @@ storiesOf("Tooltip", module)
|
|
|
94
94
|
</Spacing>
|
|
95
95
|
))}
|
|
96
96
|
</Wrapper>
|
|
97
|
+
))
|
|
98
|
+
.add("Styled", () => (
|
|
99
|
+
<Wrapper>
|
|
100
|
+
{positions.map((position) => (
|
|
101
|
+
<Spacing>
|
|
102
|
+
<Tooltip message={message} location={position} className={"has-text-warning"}>
|
|
103
|
+
<Button label={position} color="info" />{" "}
|
|
104
|
+
</Tooltip>
|
|
105
|
+
</Spacing>
|
|
106
|
+
))}
|
|
107
|
+
</Wrapper>
|
|
97
108
|
));
|
package/src/Tooltip.tsx
CHANGED
|
@@ -27,7 +27,7 @@ import classNames from "classnames";
|
|
|
27
27
|
|
|
28
28
|
// See for css reference: https://github.com/Wikiki/bulma-tooltip/blob/master/src/sass/index.sass
|
|
29
29
|
|
|
30
|
-
const TooltipWrapper = styled.
|
|
30
|
+
const TooltipWrapper = styled.div`
|
|
31
31
|
position: relative;
|
|
32
32
|
display: inline-block;
|
|
33
33
|
`;
|
|
@@ -177,13 +177,13 @@ const Tooltip: FC<Props> = ({ className, message, location = "right", multiline,
|
|
|
177
177
|
<LocationArrow className={`tooltip-arrow-${location}-border-color`} />
|
|
178
178
|
<LocationContainer
|
|
179
179
|
className={classNames(
|
|
180
|
-
className,
|
|
181
180
|
"is-size-7",
|
|
182
181
|
"is-family-primary",
|
|
183
182
|
"has-rounded-border",
|
|
184
183
|
"has-text-white",
|
|
185
184
|
"has-background-grey-dark",
|
|
186
|
-
"has-text-weight-semibold"
|
|
185
|
+
"has-text-weight-semibold",
|
|
186
|
+
className
|
|
187
187
|
)}
|
|
188
188
|
multiline={multiline}
|
|
189
189
|
aria-live="polite"
|