carbon-react 101.0.0 → 101.0.4
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/lib/__internal__/field-help/field-help.style.js +1 -1
- package/lib/components/select/select-list/select-list.component.js +1 -1
- package/lib/components/select/simple-select/simple-select-test.stories.js +4 -10
- package/lib/components/text-editor/__internal__/decorators/link-decorator.js +9 -2
- package/lib/style/design-tokens/debug-theme.util.js +3 -2
- package/lib/style/themes/base/base-theme.config.js +3 -1
- package/lib/style/themes/sage/index.js +2 -1
- package/package.json +4 -4
|
@@ -19,9 +19,9 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
19
19
|
|
|
20
20
|
const FieldHelpStyle = _styledComponents.default.span`
|
|
21
21
|
display: block;
|
|
22
|
+
flex: 1;
|
|
22
23
|
margin-top: 8px;
|
|
23
24
|
white-space: pre-wrap;
|
|
24
|
-
width: 100%;
|
|
25
25
|
|
|
26
26
|
${({
|
|
27
27
|
labelInline,
|
|
@@ -235,7 +235,7 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
setListHeight(`${newHeight}px`);
|
|
238
|
-
}, [children]);
|
|
238
|
+
}, [children, listRef.current]);
|
|
239
239
|
(0, _react.useEffect)(() => {
|
|
240
240
|
const keyboardEvent = "keydown";
|
|
241
241
|
const listElement = listRef.current;
|
|
@@ -74,29 +74,23 @@ const Default = args => {
|
|
|
74
74
|
text: "Blue",
|
|
75
75
|
value: "3"
|
|
76
76
|
}), /*#__PURE__*/_react.default.createElement(_.Option, {
|
|
77
|
-
text: "
|
|
77
|
+
text: "White",
|
|
78
78
|
value: "4"
|
|
79
79
|
}), /*#__PURE__*/_react.default.createElement(_.Option, {
|
|
80
80
|
text: "Green",
|
|
81
81
|
value: "5"
|
|
82
82
|
}), /*#__PURE__*/_react.default.createElement(_.Option, {
|
|
83
|
-
text: "
|
|
83
|
+
text: "Like a lot of intelligent animals, most crows are quite social. For instance, American crows spend most of the year living in pairs or small family groups. During the winter months, they will congregate with hundreds or even thousands of their peers to sleep together at night",
|
|
84
84
|
value: "6"
|
|
85
85
|
}), /*#__PURE__*/_react.default.createElement(_.Option, {
|
|
86
86
|
text: "Pink",
|
|
87
87
|
value: "7"
|
|
88
|
-
}), /*#__PURE__*/_react.default.createElement(_.Option, {
|
|
89
|
-
text: "Purple",
|
|
90
|
-
value: "8"
|
|
91
88
|
}), /*#__PURE__*/_react.default.createElement(_.Option, {
|
|
92
89
|
text: "Red",
|
|
93
|
-
value: "
|
|
94
|
-
}), /*#__PURE__*/_react.default.createElement(_.Option, {
|
|
95
|
-
text: "White",
|
|
96
|
-
value: "10"
|
|
90
|
+
value: "8"
|
|
97
91
|
}), /*#__PURE__*/_react.default.createElement(_.Option, {
|
|
98
92
|
text: "Yellow",
|
|
99
|
-
value: "
|
|
93
|
+
value: "9"
|
|
100
94
|
}));
|
|
101
95
|
};
|
|
102
96
|
|
|
@@ -29,8 +29,15 @@ function findWithRegex(regex, contentBlock, callback) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
const linkStrategy = (contentBlock, callback) => {
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const combineRegex = (...regex) => new RegExp(regex.map(r => r.source).join(""), "g");
|
|
33
|
+
|
|
34
|
+
const urlRegex = combineRegex(/\b/, /(http:\/\/|https:\/\/|www\.)/, // prefix
|
|
35
|
+
/([\w-]+:([\w-]+@))?/, // userinfo
|
|
36
|
+
/([\w-]+\.)+\w+/, // domain
|
|
37
|
+
/(:\d+)?/, // port
|
|
38
|
+
/(\/[\w#!:.?+=&%@!-/]+)?/, // paths, queries, fragments
|
|
39
|
+
/\b/);
|
|
40
|
+
findWithRegex(urlRegex, contentBlock, callback);
|
|
34
41
|
};
|
|
35
42
|
|
|
36
43
|
var _default = {
|
|
@@ -38,14 +38,15 @@ const debugTheme = themeProperties => Object.fromEntries(Object.entries(themePro
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
if (typeof value === "object") {
|
|
41
|
-
return [key, debugTheme(value)];
|
|
41
|
+
return key === "compatibility" ? [key, value] : [key, debugTheme(value)];
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
return [key, ""];
|
|
45
45
|
}));
|
|
46
46
|
|
|
47
47
|
var _default = { ...debugTheme(_mint.default),
|
|
48
|
-
..._common.default
|
|
48
|
+
compatibility: { ..._common.default
|
|
49
|
+
},
|
|
49
50
|
name: "sage-debug"
|
|
50
51
|
};
|
|
51
52
|
exports.default = _default;
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
var _common = _interopRequireDefault(require("@sage/design-tokens/js/base/common"));
|
|
9
|
+
|
|
8
10
|
var _atOpacity = _interopRequireDefault(require("../../utils/at-opacity"));
|
|
9
11
|
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -340,7 +342,7 @@ var _default = palette => {
|
|
|
340
342
|
},
|
|
341
343
|
|
|
342
344
|
get compatibility() {
|
|
343
|
-
return {
|
|
345
|
+
return { ..._common.default,
|
|
344
346
|
colorsActionMajor500: this.colors.primary,
|
|
345
347
|
colorsActionMajor600: this.colors.secondary,
|
|
346
348
|
colorsActionDisabled500: this.disabled.background,
|
|
@@ -12,7 +12,8 @@ var _index = _interopRequireDefault(require("../mint/index"));
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
var _default = { ..._index.default,
|
|
15
|
-
..._common.default
|
|
15
|
+
compatibility: { ..._common.default
|
|
16
|
+
},
|
|
16
17
|
name: "sage (experimental)"
|
|
17
18
|
};
|
|
18
19
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carbon-react",
|
|
3
|
-
"version": "101.0.
|
|
3
|
+
"version": "101.0.4",
|
|
4
4
|
"description": "A library of reusable React components for easily building user interfaces.",
|
|
5
5
|
"engineStrict": true,
|
|
6
6
|
"engines": {
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"@babel/preset-typescript": "7.12.7",
|
|
60
60
|
"@commitlint/cli": "^11.0.0",
|
|
61
61
|
"@commitlint/config-conventional": "^11.0.0",
|
|
62
|
-
"@semantic-release/changelog": "^
|
|
62
|
+
"@semantic-release/changelog": "^6.0.1",
|
|
63
63
|
"@semantic-release/exec": "^6.0.2",
|
|
64
|
-
"@semantic-release/git": "^
|
|
64
|
+
"@semantic-release/git": "^10.0.1",
|
|
65
65
|
"@storybook/addon-a11y": "^6.3.6",
|
|
66
66
|
"@storybook/addon-actions": "^6.3.6",
|
|
67
67
|
"@storybook/addon-controls": "^6.3.7",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"react-dom": "^16.12.0",
|
|
133
133
|
"react-test-renderer": "^16.12.0",
|
|
134
134
|
"rimraf": "^3.0.2",
|
|
135
|
-
"semantic-release": "^
|
|
135
|
+
"semantic-release": "^18.0.1",
|
|
136
136
|
"semver": "^7.3.5",
|
|
137
137
|
"sprintf-js": "^1.1.2",
|
|
138
138
|
"styled-components": "^4.4.1",
|