orcs-design-system 2.0.75 → 2.0.76
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.
|
@@ -63,7 +63,11 @@ var Label = styled("label").withConfig({
|
|
|
63
63
|
*/
|
|
64
64
|
|
|
65
65
|
var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
66
|
-
var
|
|
66
|
+
var _props$updateStyles = props.updateStyles,
|
|
67
|
+
updateStyles = _props$updateStyles === void 0 ? function (s) {
|
|
68
|
+
return s;
|
|
69
|
+
} : _props$updateStyles;
|
|
70
|
+
var customStyles = updateStyles({
|
|
67
71
|
menu: function menu(provided, state) {
|
|
68
72
|
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
69
73
|
opacity: state.isDisabled ? 0.7 : 1,
|
|
@@ -160,12 +164,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
160
164
|
fontWeight: "600",
|
|
161
165
|
wordWrap: "break-word",
|
|
162
166
|
whiteSpace: "break-spaces",
|
|
163
|
-
borderRadius: state.data.isFixed ? "15px" : "15px 0 0 15px"
|
|
164
|
-
"&:has(> div)": {
|
|
165
|
-
backgroundColor: "transparent",
|
|
166
|
-
padding: "0 !important",
|
|
167
|
-
borderRadius: "0 !important"
|
|
168
|
-
}
|
|
167
|
+
borderRadius: state.data.isFixed ? "15px" : "15px 0 0 15px"
|
|
169
168
|
});
|
|
170
169
|
},
|
|
171
170
|
multiValueRemove: function multiValueRemove(provided, state) {
|
|
@@ -199,7 +198,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
199
198
|
fontSize: themeGet("fontSizes.1")(props)
|
|
200
199
|
});
|
|
201
200
|
}
|
|
202
|
-
};
|
|
201
|
+
});
|
|
203
202
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
204
203
|
theme: props.theme
|
|
205
204
|
}, /*#__PURE__*/React.createElement(Wrapper, _extends({
|
|
@@ -266,7 +265,10 @@ Select.propTypes = {
|
|
|
266
265
|
theme: PropTypes.object,
|
|
267
266
|
|
|
268
267
|
/** Specify if you want react-select createable option */
|
|
269
|
-
selectType: PropTypes.oneOf(["default", "createable"])
|
|
268
|
+
selectType: PropTypes.oneOf(["default", "createable"]),
|
|
269
|
+
|
|
270
|
+
/** Specify if you want to overwrite existing customStyles */
|
|
271
|
+
updateStyles: PropTypes.func
|
|
270
272
|
};
|
|
271
273
|
Select.defaultProps = {
|
|
272
274
|
theme: systemtheme,
|
|
@@ -389,6 +391,13 @@ Select.__docgenInfo = {
|
|
|
389
391
|
},
|
|
390
392
|
"required": false,
|
|
391
393
|
"description": "Specifies `onChange` function for the input"
|
|
394
|
+
},
|
|
395
|
+
"updateStyles": {
|
|
396
|
+
"type": {
|
|
397
|
+
"name": "func"
|
|
398
|
+
},
|
|
399
|
+
"required": false,
|
|
400
|
+
"description": "Specify if you want to overwrite existing customStyles"
|
|
392
401
|
}
|
|
393
402
|
}
|
|
394
403
|
};
|
|
@@ -13,7 +13,7 @@ var TagWrapper = styled.div.withConfig({
|
|
|
13
13
|
var TagValue = styled.button.withConfig({
|
|
14
14
|
displayName: "Tag__TagValue",
|
|
15
15
|
componentId: "sc-1dh2aa8-1"
|
|
16
|
-
})(["-moz-appearance:none;-webkit-appearance:none;appearance:none;box-shadow:none;font-family:\"Open Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;display:flex;align-items:center;flex-wrap:nowrap;font-size:1.
|
|
16
|
+
})(["-moz-appearance:none;-webkit-appearance:none;appearance:none;box-shadow:none;font-family:\"Open Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;display:flex;align-items:center;flex-wrap:nowrap;font-size:1.4rem;font-weight:600;white-space:nowrap;position:relative;z-index:1;transition:", ";cursor:", ";border-radius:", ";border:solid 1px ", ";padding:", ";background-color:", ";color:", ";", " &:focus{outline:0;z-index:2;box-shadow:", ";}"], themeGet("transition.transitionDefault"), function (props) {
|
|
17
17
|
return props.disabled ? "default" : "pointer";
|
|
18
18
|
}, function (props) {
|
|
19
19
|
return props.showEdit || props.showRemove ? "15px 0 0 15px" : "15px";
|
|
@@ -59,7 +59,7 @@ var TagRemove = styled(TagValue).withConfig({
|
|
|
59
59
|
var TagType = styled.div.withConfig({
|
|
60
60
|
displayName: "Tag__TagType",
|
|
61
61
|
componentId: "sc-1dh2aa8-4"
|
|
62
|
-
})(["text-transform:uppercase;margin-left:", ";padding:3px;
|
|
62
|
+
})(["text-transform:uppercase;margin-left:", ";padding:3px;line-height:1;border-radius:", ";font-size:", ";background-color:", ";color:", ";"], themeGet("space.s"), themeGet("radii.1"), themeGet("fontSizes.0"), function (props) {
|
|
63
63
|
return props.selected ? themeGet("colors.primaryDark") : props.disabled ? themeGet("colors.grey") : themeGet("colors.primaryLightest");
|
|
64
64
|
}, function (props) {
|
|
65
65
|
return props.selected ? themeGet("colors.white") : props.disabled ? themeGet("colors.white") : themeGet("colors.primary");
|
|
@@ -112,6 +112,8 @@ export default function Tag(_ref) {
|
|
|
112
112
|
})) : null));
|
|
113
113
|
}
|
|
114
114
|
Tag.propTypes = {
|
|
115
|
+
children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
|
116
|
+
|
|
115
117
|
/** Adds selected styling to tag */
|
|
116
118
|
selected: PropTypes.bool,
|
|
117
119
|
|
|
@@ -206,6 +208,21 @@ Tag.__docgenInfo = {
|
|
|
206
208
|
"required": false,
|
|
207
209
|
"description": "Specifies the design theme"
|
|
208
210
|
},
|
|
211
|
+
"children": {
|
|
212
|
+
"type": {
|
|
213
|
+
"name": "union",
|
|
214
|
+
"value": [{
|
|
215
|
+
"name": "node"
|
|
216
|
+
}, {
|
|
217
|
+
"name": "arrayOf",
|
|
218
|
+
"value": {
|
|
219
|
+
"name": "node"
|
|
220
|
+
}
|
|
221
|
+
}]
|
|
222
|
+
},
|
|
223
|
+
"required": false,
|
|
224
|
+
"description": ""
|
|
225
|
+
},
|
|
209
226
|
"onSelect": {
|
|
210
227
|
"type": {
|
|
211
228
|
"name": "func"
|