orcs-design-system 2.0.49 → 2.0.50

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.
@@ -15,12 +15,14 @@ export default {
15
15
  component: Select,
16
16
  decorators: [function (storyFn) {
17
17
  return /*#__PURE__*/React.createElement(Box, {
18
- p: "r",
19
18
  height: "250px"
20
19
  }, storyFn());
21
20
  }]
22
21
  };
23
22
  var options = [{
23
+ value: "caramel",
24
+ label: "Caramel"
25
+ }, {
24
26
  value: "chocolate",
25
27
  label: "Chocolate"
26
28
  }, {
@@ -29,12 +31,6 @@ var options = [{
29
31
  }, {
30
32
  value: "vanilla",
31
33
  label: "Vanilla"
32
- }, {
33
- value: "hazelnut",
34
- label: "Hazelnut"
35
- }, {
36
- value: "rocky road",
37
- label: "Rocky Road"
38
34
  }];
39
35
  export var defaultSelect = function defaultSelect() {
40
36
  return /*#__PURE__*/React.createElement(Select, {
@@ -47,10 +43,17 @@ defaultSelect.story = {
47
43
  name: "Default"
48
44
  };
49
45
  export var SpecificHeightSelect = function SpecificHeightSelect() {
50
- return /*#__PURE__*/React.createElement(Select, {
51
- height: "58px",
46
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Spacer, {
47
+ mb: "l"
48
+ }, /*#__PURE__*/React.createElement(Select, {
49
+ height: "30px",
50
+ padding: "0 8px",
52
51
  options: options
53
- });
52
+ }), /*#__PURE__*/React.createElement(Select, {
53
+ height: "56px",
54
+ padding: "4px 12px",
55
+ options: options
56
+ })));
54
57
  };
55
58
  defaultSelect.story = {
56
59
  name: "SpecificHeightSelect"
@@ -66,22 +69,19 @@ multiSelect.story = {
66
69
  };
67
70
  export var multiSelectWithFixedOptions = function multiSelectWithFixedOptions() {
68
71
  var options = [{
72
+ value: "caramel",
73
+ label: "Caramel",
74
+ isFixed: true
75
+ }, {
69
76
  value: "chocolate",
70
77
  label: "Chocolate",
71
78
  isFixed: true
72
79
  }, {
73
80
  value: "strawberry",
74
- label: "Strawberry",
75
- isFixed: true
81
+ label: "Strawberry"
76
82
  }, {
77
83
  value: "vanilla",
78
- label: "Vanilla"
79
- }, {
80
- value: "hazelnut",
81
- label: "Hazelnut"
82
- }, {
83
- value: "rocky road",
84
- label: "Rocky Road",
84
+ label: "Vanilla",
85
85
  isDisabled: true
86
86
  }]; // eslint-disable-next-line react-hooks/rules-of-hooks
87
87
 
@@ -122,10 +122,10 @@ export var invertedSelect = function invertedSelect() {
122
122
  return /*#__PURE__*/React.createElement(Box, {
123
123
  bg: "greyDarkest",
124
124
  width: "100%",
125
- height: "600px",
125
+ height: "270px",
126
126
  p: "r"
127
127
  }, /*#__PURE__*/React.createElement(Spacer, {
128
- my: "r"
128
+ mb: "l"
129
129
  }, /*#__PURE__*/React.createElement(Select, {
130
130
  options: options,
131
131
  inverted: true
@@ -102,6 +102,11 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
102
102
  fontSize: themeGet("fontSizes.1")(props)
103
103
  });
104
104
  },
105
+ valueContainer: function valueContainer(provided) {
106
+ return _objectSpread(_objectSpread({}, provided), {}, {
107
+ padding: props.padding ? props.padding : "2px 8px"
108
+ });
109
+ },
105
110
  clearIndicator: function clearIndicator(provided, state) {
106
111
  return _objectSpread(_objectSpread({}, provided), {}, {
107
112
  opacity: state.isDisabled ? 0.7 : 1,
@@ -205,6 +210,9 @@ Select.propTypes = {
205
210
  /** Specifies the height of the select box control, make sure to include the unit, e.g. px */
206
211
  height: PropTypes.string,
207
212
 
213
+ /** Specifies the padding of the value showed in the select box control, make sure to include the unit, e.g. px */
214
+ padding: PropTypes.string,
215
+
208
216
  /** Specifies if the `Select` component is multi-select. */
209
217
  isMulti: PropTypes.bool,
210
218
 
@@ -280,6 +288,13 @@ Select.__docgenInfo = {
280
288
  "required": false,
281
289
  "description": "Specifies the height of the select box control, make sure to include the unit, e.g. px"
282
290
  },
291
+ "padding": {
292
+ "type": {
293
+ "name": "string"
294
+ },
295
+ "required": false,
296
+ "description": "Specifies the padding of the value showed in the select box control, make sure to include the unit, e.g. px"
297
+ },
283
298
  "isMulti": {
284
299
  "type": {
285
300
  "name": "bool"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "2.0.49",
3
+ "version": "2.0.50",
4
4
  "description": "Orchestrated's Design System, aka: ORCS",
5
5
  "keywords": [
6
6
  "design",
@@ -111,7 +111,7 @@
111
111
  "identity-obj-proxy": "^3.0.0",
112
112
  "jest": "^26.6.3",
113
113
  "npm-run-all": "^4.1.5",
114
- "playroom": "^0.27.0",
114
+ "playroom": "^0.27.7",
115
115
  "prettier": "^2.2.1",
116
116
  "react": "^17.0.1",
117
117
  "react-dom": "^17.0.1",