@dhis2-ui/button 10.5.0 → 10.6.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.
@@ -55,12 +55,6 @@ function ArrowUp(_ref2) {
|
|
55
55
|
ArrowUp.propTypes = {
|
56
56
|
className: _propTypes2.default.string
|
57
57
|
};
|
58
|
-
const arrow = {
|
59
|
-
styles: /*#__PURE__*/_react.default.createElement(_style.default, {
|
60
|
-
id: "1035250400"
|
61
|
-
}, [`.jsx-1035250400{margin-inline-start:${_uiConstants.spacers.dp12};}`]),
|
62
|
-
className: "jsx-1035250400"
|
63
|
-
};
|
64
58
|
class DropdownButton extends _react.Component {
|
65
59
|
constructor() {
|
66
60
|
super(...arguments);
|
@@ -132,7 +126,7 @@ class DropdownButton extends _react.Component {
|
|
132
126
|
return /*#__PURE__*/_react.default.createElement("div", {
|
133
127
|
ref: this.anchorRef,
|
134
128
|
"data-test": dataTest,
|
135
|
-
className: "
|
129
|
+
className: _style.default.dynamic([["2538493196", [_uiConstants.spacers.dp8, _uiConstants.spacers.dp4]]])
|
136
130
|
}, /*#__PURE__*/_react.default.createElement(_index.Button, {
|
137
131
|
className: className,
|
138
132
|
destructive: destructive,
|
@@ -150,7 +144,7 @@ class DropdownButton extends _react.Component {
|
|
150
144
|
initialFocus: initialFocus,
|
151
145
|
"data-test": "dhis2-uicore-dropdownbutton-toggle"
|
152
146
|
}, children, /*#__PURE__*/_react.default.createElement(ArrowIconComponent, {
|
153
|
-
className: "
|
147
|
+
className: _style.default.dynamic([["2538493196", [_uiConstants.spacers.dp8, _uiConstants.spacers.dp4]]]) + " " + `arrow ${small && 'arrow-small'}`
|
154
148
|
})), open && /*#__PURE__*/_react.default.createElement(_layer.Layer, {
|
155
149
|
onBackdropClick: this.onClickHandler,
|
156
150
|
transparent: true
|
@@ -158,9 +152,10 @@ class DropdownButton extends _react.Component {
|
|
158
152
|
dataTest: `${dataTest}-popper`,
|
159
153
|
placement: "bottom-start",
|
160
154
|
reference: this.anchorRef
|
161
|
-
}, component)),
|
162
|
-
id: "
|
163
|
-
|
155
|
+
}, component)), /*#__PURE__*/_react.default.createElement(_style.default, {
|
156
|
+
id: "2538493196",
|
157
|
+
dynamic: [_uiConstants.spacers.dp8, _uiConstants.spacers.dp4]
|
158
|
+
}, [`.arrow.__jsx-style-dynamic-selector{margin-inline-start:${_uiConstants.spacers.dp8};}`, `.arrow-small.__jsx-style-dynamic-selector{margin-inline-start:${_uiConstants.spacers.dp4};}`, "div.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;color:inherit;white-space:nowrap;}"]));
|
164
159
|
}
|
165
160
|
}
|
166
161
|
exports.DropdownButton = DropdownButton;
|
@@ -46,12 +46,6 @@ function ArrowUp(_ref2) {
|
|
46
46
|
ArrowUp.propTypes = {
|
47
47
|
className: PropTypes.string
|
48
48
|
};
|
49
|
-
const arrow = {
|
50
|
-
styles: /*#__PURE__*/React.createElement(_JSXStyle, {
|
51
|
-
id: "1035250400"
|
52
|
-
}, [`.jsx-1035250400{margin-inline-start:${spacers.dp12};}`]),
|
53
|
-
className: "jsx-1035250400"
|
54
|
-
};
|
55
49
|
class DropdownButton extends Component {
|
56
50
|
constructor() {
|
57
51
|
super(...arguments);
|
@@ -123,7 +117,7 @@ class DropdownButton extends Component {
|
|
123
117
|
return /*#__PURE__*/React.createElement("div", {
|
124
118
|
ref: this.anchorRef,
|
125
119
|
"data-test": dataTest,
|
126
|
-
className: "
|
120
|
+
className: _JSXStyle.dynamic([["2538493196", [spacers.dp8, spacers.dp4]]])
|
127
121
|
}, /*#__PURE__*/React.createElement(Button, {
|
128
122
|
className: className,
|
129
123
|
destructive: destructive,
|
@@ -141,7 +135,7 @@ class DropdownButton extends Component {
|
|
141
135
|
initialFocus: initialFocus,
|
142
136
|
"data-test": "dhis2-uicore-dropdownbutton-toggle"
|
143
137
|
}, children, /*#__PURE__*/React.createElement(ArrowIconComponent, {
|
144
|
-
className: "
|
138
|
+
className: _JSXStyle.dynamic([["2538493196", [spacers.dp8, spacers.dp4]]]) + " " + `arrow ${small && 'arrow-small'}`
|
145
139
|
})), open && /*#__PURE__*/React.createElement(Layer, {
|
146
140
|
onBackdropClick: this.onClickHandler,
|
147
141
|
transparent: true
|
@@ -149,9 +143,10 @@ class DropdownButton extends Component {
|
|
149
143
|
dataTest: `${dataTest}-popper`,
|
150
144
|
placement: "bottom-start",
|
151
145
|
reference: this.anchorRef
|
152
|
-
}, component)),
|
153
|
-
id: "
|
154
|
-
|
146
|
+
}, component)), /*#__PURE__*/React.createElement(_JSXStyle, {
|
147
|
+
id: "2538493196",
|
148
|
+
dynamic: [spacers.dp8, spacers.dp4]
|
149
|
+
}, [`.arrow.__jsx-style-dynamic-selector{margin-inline-start:${spacers.dp8};}`, `.arrow-small.__jsx-style-dynamic-selector{margin-inline-start:${spacers.dp4};}`, "div.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;color:inherit;white-space:nowrap;}"]));
|
155
150
|
}
|
156
151
|
}
|
157
152
|
_defineProperty(DropdownButton, "defaultProps", {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dhis2-ui/button",
|
3
|
-
"version": "10.
|
3
|
+
"version": "10.6.0",
|
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": "10.
|
37
|
-
"@dhis2-ui/loader": "10.
|
38
|
-
"@dhis2-ui/popper": "10.
|
39
|
-
"@dhis2/ui-constants": "10.
|
40
|
-
"@dhis2/ui-icons": "10.
|
36
|
+
"@dhis2-ui/layer": "10.6.0",
|
37
|
+
"@dhis2-ui/loader": "10.6.0",
|
38
|
+
"@dhis2-ui/popper": "10.6.0",
|
39
|
+
"@dhis2/ui-constants": "10.6.0",
|
40
|
+
"@dhis2/ui-icons": "10.6.0",
|
41
41
|
"classnames": "^2.3.1",
|
42
42
|
"prop-types": "^15.7.2"
|
43
43
|
},
|