@jetbrains/ring-ui 5.0.6 → 5.0.7
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.
|
@@ -41,13 +41,22 @@ angularModule.directive('rgCheckbox', function rgCheckboxDirective() {
|
|
|
41
41
|
</span><span class="${styles.label}" ng-transclude></span>
|
|
42
42
|
</label>
|
|
43
43
|
`),
|
|
44
|
-
link: function link(scope, iElement) {
|
|
44
|
+
link: function link(scope, iElement, attrs, controller, transcludeFn) {
|
|
45
45
|
scope.checkmarkIcon = checkmarkIcon;
|
|
46
46
|
const input = iElement[0].querySelector('input[type="checkbox"]');
|
|
47
|
+
const label = iElement[0].querySelector(`*[class~="${styles.label}"]`);
|
|
47
48
|
|
|
48
49
|
const id = CHECKBOX_ID_PREFIX + idCounter++;
|
|
49
50
|
iElement[0].setAttribute('for', id);
|
|
50
51
|
input.setAttribute('id', id);
|
|
52
|
+
|
|
53
|
+
transcludeFn(clone => {
|
|
54
|
+
if (clone.length) {
|
|
55
|
+
label.style.display = 'initial';
|
|
56
|
+
} else {
|
|
57
|
+
label.style.display = 'none';
|
|
58
|
+
}
|
|
59
|
+
});
|
|
51
60
|
}
|
|
52
61
|
};
|
|
53
62
|
});
|
|
@@ -15,12 +15,12 @@ import styles from './markdown.css';
|
|
|
15
15
|
*/
|
|
16
16
|
export default class Markdown extends PureComponent {
|
|
17
17
|
render() {
|
|
18
|
-
const { className, components, inline, children, plugins = [], ...restProps } = this.props;
|
|
18
|
+
const { className, components, inline, children, plugins = [], remarkPlugins = [], ...restProps } = this.props;
|
|
19
19
|
const classes = classNames(className, {
|
|
20
20
|
[styles.markdown]: !inline,
|
|
21
21
|
[styles.inline]: inline
|
|
22
22
|
});
|
|
23
|
-
return (<ReactMarkdown className={classes}
|
|
23
|
+
return (<ReactMarkdown className={classes} remarkPlugins={[RemarkBreaks, RemarkGFM, ...plugins, ...remarkPlugins]} components={{
|
|
24
24
|
a: Link,
|
|
25
25
|
code: Code,
|
|
26
26
|
h1: Heading,
|
|
@@ -24,12 +24,20 @@ angularModule.directive('rgCheckbox', function rgCheckboxDirective() {
|
|
|
24
24
|
transclude: true,
|
|
25
25
|
replace: true,
|
|
26
26
|
template: proxyAttrs("\n<label class=\"".concat(modules_3199090e.checkbox, "\">\n <input\n data-proxy-ng-disabled\n data-proxy-ng-model\n data-proxy-ng-change\n data-proxy-ng-true-value\n data-proxy-ng-false-value\n data-proxy-name\n data-proxy-title\n data-proxy-aria-label\n data-test=\"ring-checkbox\"\n type=\"checkbox\"\n class=\"").concat(modules_3199090e.input, "\"\n />\n <span class=\"").concat(modules_3199090e.cell, "\">\n <rg-icon class=\"").concat(modules_3199090e.check, "\" glyph=\"{{:: checkmarkIcon}}\" />\n </span><span class=\"").concat(modules_3199090e.label, "\" ng-transclude></span>\n</label>\n ")),
|
|
27
|
-
link: function link(scope, iElement) {
|
|
27
|
+
link: function link(scope, iElement, attrs, controller, transcludeFn) {
|
|
28
28
|
scope.checkmarkIcon = checkmarkIcon;
|
|
29
29
|
const input = iElement[0].querySelector('input[type="checkbox"]');
|
|
30
|
+
const label = iElement[0].querySelector("*[class~=\"".concat(modules_3199090e.label, "\"]"));
|
|
30
31
|
const id = CHECKBOX_ID_PREFIX + idCounter++;
|
|
31
32
|
iElement[0].setAttribute('for', id);
|
|
32
33
|
input.setAttribute('id', id);
|
|
34
|
+
transcludeFn(clone => {
|
|
35
|
+
if (clone.length) {
|
|
36
|
+
label.style.display = 'initial';
|
|
37
|
+
} else {
|
|
38
|
+
label.style.display = 'none';
|
|
39
|
+
}
|
|
40
|
+
});
|
|
33
41
|
}
|
|
34
42
|
};
|
|
35
43
|
});
|
|
@@ -37,6 +37,7 @@ class Markdown extends PureComponent {
|
|
|
37
37
|
inline,
|
|
38
38
|
children,
|
|
39
39
|
plugins = [],
|
|
40
|
+
remarkPlugins = [],
|
|
40
41
|
...restProps
|
|
41
42
|
} = this.props;
|
|
42
43
|
const classes = classNames(className, {
|
|
@@ -45,7 +46,7 @@ class Markdown extends PureComponent {
|
|
|
45
46
|
});
|
|
46
47
|
return /*#__PURE__*/React.createElement(ReactMarkdown, _extends({
|
|
47
48
|
className: classes,
|
|
48
|
-
|
|
49
|
+
remarkPlugins: [RemarkBreaks, RemarkGFM, ...plugins, ...remarkPlugins],
|
|
49
50
|
components: {
|
|
50
51
|
a: MarkdownLink,
|
|
51
52
|
code: MarkdownCode,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.7",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@rollup/plugin-babel": "^5.3.1",
|
|
77
77
|
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
78
78
|
"@rollup/plugin-replace": "^4.0.0",
|
|
79
|
-
"@storybook/addon-a11y": "6.5.
|
|
79
|
+
"@storybook/addon-a11y": "6.5.6",
|
|
80
80
|
"@storybook/addon-docs": "6.5.4",
|
|
81
81
|
"@storybook/addon-essentials": "6.5.4",
|
|
82
82
|
"@storybook/addon-storyshots": "6.5.4",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"react-test-renderer": "^18.0.0",
|
|
152
152
|
"regenerator-runtime": "^0.13.9",
|
|
153
153
|
"rimraf": "^3.0.2",
|
|
154
|
-
"rollup": "^2.
|
|
154
|
+
"rollup": "^2.75.5",
|
|
155
155
|
"rollup-plugin-clear": "^2.0.7",
|
|
156
156
|
"rollup-plugin-styles": "^4.0.0",
|
|
157
157
|
"sinon": "^13.0.1",
|
|
@@ -253,5 +253,5 @@
|
|
|
253
253
|
"node": ">=7.4",
|
|
254
254
|
"npm": ">=6.0.0"
|
|
255
255
|
},
|
|
256
|
-
"gitHead": "
|
|
256
|
+
"gitHead": "941dff848df5213d852524f1dd53f311a61d17e4"
|
|
257
257
|
}
|