@dhis2-ui/alert 9.0.0 → 9.1.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.
@@ -35,11 +35,11 @@ class Action extends _react.Component {
|
|
35
35
|
return /*#__PURE__*/_react.default.createElement("span", {
|
36
36
|
onClick: this.onClick,
|
37
37
|
"data-test": this.props.dataTest,
|
38
|
-
className: _style.default.dynamic([["
|
38
|
+
className: _style.default.dynamic([["445241221", [_uiConstants.spacers.dp12]]])
|
39
39
|
}, this.props.label, /*#__PURE__*/_react.default.createElement(_style.default, {
|
40
|
-
id: "
|
40
|
+
id: "445241221",
|
41
41
|
dynamic: [_uiConstants.spacers.dp12]
|
42
|
-
}, ["span.__jsx-style-dynamic-selector{margin-right:".concat(_uiConstants.spacers.dp12, ";-webkit-text-decoration:underline;text-decoration:underline;}"), "span.__jsx-style-dynamic-selector:hover{cursor:pointer;}"]));
|
42
|
+
}, ["span.__jsx-style-dynamic-selector{margin-right:".concat(_uiConstants.spacers.dp12, ";-webkit-text-decoration:underline;text-decoration:underline;white-space:nowrap;}"), "span.__jsx-style-dynamic-selector:hover{cursor:pointer;}"]));
|
43
43
|
}
|
44
44
|
|
45
45
|
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.default = exports.WithActions = exports.TextOverflow = exports.States = exports.Icons = exports.HiddenProp = exports.Default = exports.AutoHiding = void 0;
|
6
|
+
exports.default = exports.WithActionsAndInsufficientSpace = exports.WithActions = exports.TextOverflow = exports.States = exports.Icons = exports.HiddenProp = exports.Default = exports.AutoHiding = void 0;
|
7
7
|
|
8
8
|
var _uiIcons = require("@dhis2/ui-icons");
|
9
9
|
|
@@ -140,6 +140,20 @@ const WithActions = () => /*#__PURE__*/_react.default.createElement(_index.Alert
|
|
140
140
|
exports.WithActions = WithActions;
|
141
141
|
WithActions.storyName = 'With actions';
|
142
142
|
|
143
|
+
const WithActionsAndInsufficientSpace = () => /*#__PURE__*/_react.default.createElement(_index.AlertBar, {
|
144
|
+
permanent: true,
|
145
|
+
actions: [{
|
146
|
+
label: 'Long action 1',
|
147
|
+
onClick: () => {}
|
148
|
+
}, {
|
149
|
+
label: 'Long action 2',
|
150
|
+
onClick: () => {}
|
151
|
+
}]
|
152
|
+
}, "Some text, a pretty normal amount, that conflicts with pretty long actions");
|
153
|
+
|
154
|
+
exports.WithActionsAndInsufficientSpace = WithActionsAndInsufficientSpace;
|
155
|
+
WithActionsAndInsufficientSpace.storyName = 'With actions and insufficient space';
|
156
|
+
|
143
157
|
const Icons = () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_index.AlertBar, {
|
144
158
|
permanent: true
|
145
159
|
}, "Default icon"), /*#__PURE__*/_react.default.createElement(_index.AlertBar, {
|
@@ -20,11 +20,11 @@ class Action extends Component {
|
|
20
20
|
return /*#__PURE__*/React.createElement("span", {
|
21
21
|
onClick: this.onClick,
|
22
22
|
"data-test": this.props.dataTest,
|
23
|
-
className: _JSXStyle.dynamic([["
|
23
|
+
className: _JSXStyle.dynamic([["445241221", [spacers.dp12]]])
|
24
24
|
}, this.props.label, /*#__PURE__*/React.createElement(_JSXStyle, {
|
25
|
-
id: "
|
25
|
+
id: "445241221",
|
26
26
|
dynamic: [spacers.dp12]
|
27
|
-
}, ["span.__jsx-style-dynamic-selector{margin-right:".concat(spacers.dp12, ";-webkit-text-decoration:underline;text-decoration:underline;}"), "span.__jsx-style-dynamic-selector:hover{cursor:pointer;}"]));
|
27
|
+
}, ["span.__jsx-style-dynamic-selector{margin-right:".concat(spacers.dp12, ";-webkit-text-decoration:underline;text-decoration:underline;white-space:nowrap;}"), "span.__jsx-style-dynamic-selector:hover{cursor:pointer;}"]));
|
28
28
|
}
|
29
29
|
|
30
30
|
}
|
@@ -112,6 +112,17 @@ export const WithActions = () => /*#__PURE__*/React.createElement(AlertBar, {
|
|
112
112
|
}]
|
113
113
|
}, "With Actions");
|
114
114
|
WithActions.storyName = 'With actions';
|
115
|
+
export const WithActionsAndInsufficientSpace = () => /*#__PURE__*/React.createElement(AlertBar, {
|
116
|
+
permanent: true,
|
117
|
+
actions: [{
|
118
|
+
label: 'Long action 1',
|
119
|
+
onClick: () => {}
|
120
|
+
}, {
|
121
|
+
label: 'Long action 2',
|
122
|
+
onClick: () => {}
|
123
|
+
}]
|
124
|
+
}, "Some text, a pretty normal amount, that conflicts with pretty long actions");
|
125
|
+
WithActionsAndInsufficientSpace.storyName = 'With actions and insufficient space';
|
115
126
|
export const Icons = () => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AlertBar, {
|
116
127
|
permanent: true
|
117
128
|
}, "Default icon"), /*#__PURE__*/React.createElement(AlertBar, {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dhis2-ui/alert",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.1.0",
|
4
4
|
"description": "UI Alert",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -33,9 +33,9 @@
|
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
35
|
"@dhis2/prop-types": "^3.1.2",
|
36
|
-
"@dhis2-ui/portal": "9.
|
37
|
-
"@dhis2/ui-constants": "9.
|
38
|
-
"@dhis2/ui-icons": "9.
|
36
|
+
"@dhis2-ui/portal": "9.1.0",
|
37
|
+
"@dhis2/ui-constants": "9.1.0",
|
38
|
+
"@dhis2/ui-icons": "9.1.0",
|
39
39
|
"classnames": "^2.3.1",
|
40
40
|
"prop-types": "^15.7.2"
|
41
41
|
},
|