@dhis2-ui/button 9.11.4 → 9.11.6
Sign up to get free protection for your applications and to get access to all the features.
- package/build/cjs/button/button.js +2 -6
- package/build/cjs/button-strip/button-strip.js +1 -4
- package/build/cjs/dropdown-button/dropdown-button.js +3 -3
- package/build/cjs/split-button/split-button.js +3 -3
- package/build/es/button/button.js +2 -6
- package/build/es/button-strip/button-strip.js +1 -4
- package/build/es/dropdown-button/dropdown-button.js +3 -3
- package/build/es/split-button/split-button.js +3 -3
- package/package.json +6 -6
@@ -19,7 +19,7 @@ const Button = _ref => {
|
|
19
19
|
let {
|
20
20
|
children,
|
21
21
|
className,
|
22
|
-
dataTest,
|
22
|
+
dataTest = 'dhis2-uicore-button',
|
23
23
|
destructive,
|
24
24
|
disabled,
|
25
25
|
icon,
|
@@ -31,7 +31,7 @@ const Button = _ref => {
|
|
31
31
|
small,
|
32
32
|
tabIndex,
|
33
33
|
toggled,
|
34
|
-
type,
|
34
|
+
type = 'button',
|
35
35
|
value,
|
36
36
|
onBlur,
|
37
37
|
onClick,
|
@@ -107,10 +107,6 @@ const Button = _ref => {
|
|
107
107
|
}, _buttonStyles.default));
|
108
108
|
};
|
109
109
|
exports.Button = Button;
|
110
|
-
Button.defaultProps = {
|
111
|
-
type: 'button',
|
112
|
-
dataTest: 'dhis2-uicore-button'
|
113
|
-
};
|
114
110
|
Button.propTypes = {
|
115
111
|
/** Component to render inside the button */
|
116
112
|
children: _propTypes.default.node,
|
@@ -19,7 +19,7 @@ const ButtonStrip = _ref => {
|
|
19
19
|
children,
|
20
20
|
middle,
|
21
21
|
end,
|
22
|
-
dataTest
|
22
|
+
dataTest = 'dhis2-uicore-buttonstrip'
|
23
23
|
} = _ref;
|
24
24
|
return /*#__PURE__*/_react.default.createElement("div", {
|
25
25
|
"data-test": dataTest,
|
@@ -37,9 +37,6 @@ const ButtonStrip = _ref => {
|
|
37
37
|
};
|
38
38
|
exports.ButtonStrip = ButtonStrip;
|
39
39
|
const alignmentPropType = (0, _propTypes.mutuallyExclusive)(['middle', 'end'], _propTypes2.default.bool);
|
40
|
-
ButtonStrip.defaultProps = {
|
41
|
-
dataTest: 'dhis2-uicore-buttonstrip'
|
42
|
-
};
|
43
40
|
ButtonStrip.propTypes = {
|
44
41
|
children: _propTypes2.default.node,
|
45
42
|
className: _propTypes2.default.string,
|
@@ -125,7 +125,7 @@ class DropdownButton extends _react.Component {
|
|
125
125
|
tabIndex,
|
126
126
|
type,
|
127
127
|
initialFocus,
|
128
|
-
dataTest
|
128
|
+
dataTest = 'dhis2-uicore-dropdownbutton'
|
129
129
|
} = this.props;
|
130
130
|
const open = typeof this.props.open === 'boolean' ? this.props.open : this.state.open;
|
131
131
|
const ArrowIconComponent = open ? ArrowUp : ArrowDown;
|
@@ -164,9 +164,9 @@ class DropdownButton extends _react.Component {
|
|
164
164
|
}
|
165
165
|
}
|
166
166
|
exports.DropdownButton = DropdownButton;
|
167
|
-
DropdownButton
|
167
|
+
_defineProperty(DropdownButton, "defaultProps", {
|
168
168
|
dataTest: 'dhis2-uicore-dropdownbutton'
|
169
|
-
};
|
169
|
+
});
|
170
170
|
DropdownButton.propTypes = {
|
171
171
|
/** Children to render inside the buton */
|
172
172
|
children: _propTypes2.default.node,
|
@@ -83,7 +83,7 @@ class SplitButton extends _react.Component {
|
|
83
83
|
disabled,
|
84
84
|
type,
|
85
85
|
tabIndex,
|
86
|
-
dataTest,
|
86
|
+
dataTest = 'dhis2-uicore-splitbutton',
|
87
87
|
initialFocus
|
88
88
|
} = this.props;
|
89
89
|
const arrow = open ? /*#__PURE__*/_react.default.createElement(_uiIcons.IconChevronUp16, null) : /*#__PURE__*/_react.default.createElement(_uiIcons.IconChevronDown16, null);
|
@@ -136,9 +136,9 @@ class SplitButton extends _react.Component {
|
|
136
136
|
}
|
137
137
|
}
|
138
138
|
exports.SplitButton = SplitButton;
|
139
|
-
SplitButton
|
139
|
+
_defineProperty(SplitButton, "defaultProps", {
|
140
140
|
dataTest: 'dhis2-uicore-splitbutton'
|
141
|
-
};
|
141
|
+
});
|
142
142
|
SplitButton.propTypes = {
|
143
143
|
children: _propTypes.default.string,
|
144
144
|
className: _propTypes.default.string,
|
@@ -10,7 +10,7 @@ export const Button = _ref => {
|
|
10
10
|
let {
|
11
11
|
children,
|
12
12
|
className,
|
13
|
-
dataTest,
|
13
|
+
dataTest = 'dhis2-uicore-button',
|
14
14
|
destructive,
|
15
15
|
disabled,
|
16
16
|
icon,
|
@@ -22,7 +22,7 @@ export const Button = _ref => {
|
|
22
22
|
small,
|
23
23
|
tabIndex,
|
24
24
|
toggled,
|
25
|
-
type,
|
25
|
+
type = 'button',
|
26
26
|
value,
|
27
27
|
onBlur,
|
28
28
|
onClick,
|
@@ -97,10 +97,6 @@ export const Button = _ref => {
|
|
97
97
|
id: styles.__hash
|
98
98
|
}, styles));
|
99
99
|
};
|
100
|
-
Button.defaultProps = {
|
101
|
-
type: 'button',
|
102
|
-
dataTest: 'dhis2-uicore-button'
|
103
|
-
};
|
104
100
|
Button.propTypes = {
|
105
101
|
/** Component to render inside the button */
|
106
102
|
children: PropTypes.node,
|
@@ -10,7 +10,7 @@ const ButtonStrip = _ref => {
|
|
10
10
|
children,
|
11
11
|
middle,
|
12
12
|
end,
|
13
|
-
dataTest
|
13
|
+
dataTest = 'dhis2-uicore-buttonstrip'
|
14
14
|
} = _ref;
|
15
15
|
return /*#__PURE__*/React.createElement("div", {
|
16
16
|
"data-test": dataTest,
|
@@ -27,9 +27,6 @@ const ButtonStrip = _ref => {
|
|
27
27
|
}, ["div.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", "div.middle.__jsx-style-dynamic-selector{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}", "div.end.__jsx-style-dynamic-selector{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}", `.box.__jsx-style-dynamic-selector{margin-inline-start:${spacers.dp8};}`, ".box.__jsx-style-dynamic-selector:first-child{margin-inline-start:0;}"]));
|
28
28
|
};
|
29
29
|
const alignmentPropType = mutuallyExclusive(['middle', 'end'], PropTypes.bool);
|
30
|
-
ButtonStrip.defaultProps = {
|
31
|
-
dataTest: 'dhis2-uicore-buttonstrip'
|
32
|
-
};
|
33
30
|
ButtonStrip.propTypes = {
|
34
31
|
children: PropTypes.node,
|
35
32
|
className: PropTypes.string,
|
@@ -116,7 +116,7 @@ class DropdownButton extends Component {
|
|
116
116
|
tabIndex,
|
117
117
|
type,
|
118
118
|
initialFocus,
|
119
|
-
dataTest
|
119
|
+
dataTest = 'dhis2-uicore-dropdownbutton'
|
120
120
|
} = this.props;
|
121
121
|
const open = typeof this.props.open === 'boolean' ? this.props.open : this.state.open;
|
122
122
|
const ArrowIconComponent = open ? ArrowUp : ArrowDown;
|
@@ -154,9 +154,9 @@ class DropdownButton extends Component {
|
|
154
154
|
}, ["div.jsx-3163060161{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;color:inherit;white-space:nowrap;}"]));
|
155
155
|
}
|
156
156
|
}
|
157
|
-
DropdownButton
|
157
|
+
_defineProperty(DropdownButton, "defaultProps", {
|
158
158
|
dataTest: 'dhis2-uicore-dropdownbutton'
|
159
|
-
};
|
159
|
+
});
|
160
160
|
DropdownButton.propTypes = {
|
161
161
|
/** Children to render inside the buton */
|
162
162
|
children: PropTypes.node,
|
@@ -74,7 +74,7 @@ class SplitButton extends Component {
|
|
74
74
|
disabled,
|
75
75
|
type,
|
76
76
|
tabIndex,
|
77
|
-
dataTest,
|
77
|
+
dataTest = 'dhis2-uicore-splitbutton',
|
78
78
|
initialFocus
|
79
79
|
} = this.props;
|
80
80
|
const arrow = open ? /*#__PURE__*/React.createElement(IconChevronUp16, null) : /*#__PURE__*/React.createElement(IconChevronDown16, null);
|
@@ -126,9 +126,9 @@ class SplitButton extends Component {
|
|
126
126
|
}, ["div.jsx-2116647326{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;color:inherit;white-space:nowrap;position:relative;z-index:0;}", "div.jsx-2116647326>button:first-child{border-start-end-radius:0;border-end-end-radius:0;border-inline-end:0;}", "div.jsx-2116647326>button:last-child{border-start-start-radius:0;border-end-start-radius:0;}"]));
|
127
127
|
}
|
128
128
|
}
|
129
|
-
SplitButton
|
129
|
+
_defineProperty(SplitButton, "defaultProps", {
|
130
130
|
dataTest: 'dhis2-uicore-splitbutton'
|
131
|
-
};
|
131
|
+
});
|
132
132
|
SplitButton.propTypes = {
|
133
133
|
children: PropTypes.string,
|
134
134
|
className: PropTypes.string,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dhis2-ui/button",
|
3
|
-
"version": "9.11.
|
3
|
+
"version": "9.11.6",
|
4
4
|
"description": "UI Button",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -33,11 +33,11 @@
|
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
35
|
"@dhis2/prop-types": "^3.1.2",
|
36
|
-
"@dhis2-ui/layer": "9.11.
|
37
|
-
"@dhis2-ui/loader": "9.11.
|
38
|
-
"@dhis2-ui/popper": "9.11.
|
39
|
-
"@dhis2/ui-constants": "9.11.
|
40
|
-
"@dhis2/ui-icons": "9.11.
|
36
|
+
"@dhis2-ui/layer": "9.11.6",
|
37
|
+
"@dhis2-ui/loader": "9.11.6",
|
38
|
+
"@dhis2-ui/popper": "9.11.6",
|
39
|
+
"@dhis2/ui-constants": "9.11.6",
|
40
|
+
"@dhis2/ui-icons": "9.11.6",
|
41
41
|
"classnames": "^2.3.1",
|
42
42
|
"prop-types": "^15.7.2"
|
43
43
|
},
|