@decisiv/ui-components 2.0.1-alpha.135 → 2.0.1-alpha.139

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.
Files changed (33) hide show
  1. package/lib/atoms/OptionsList/Option.d.ts.map +1 -1
  2. package/lib/atoms/OptionsList/Option.js +16 -4
  3. package/lib/atoms/OptionsList/index.js +1 -1
  4. package/lib/atoms/OptionsList/index.test.js +38 -24
  5. package/lib/atoms/OptionsList/schema.d.ts.map +1 -1
  6. package/lib/atoms/OptionsList/schema.js +1 -0
  7. package/lib/atoms/OptionsList/types.d.ts +1 -0
  8. package/lib/atoms/OptionsList/types.d.ts.map +1 -1
  9. package/lib/components/Combobox/index.d.ts.map +1 -1
  10. package/lib/components/Combobox/index.js +3 -1
  11. package/lib/components/Combobox/index.test.js +21 -21
  12. package/lib/components/Combobox/schema.d.ts.map +1 -1
  13. package/lib/components/Combobox/schema.js +1 -0
  14. package/lib/components/Combobox/types.d.ts +1 -1
  15. package/lib/components/Combobox/types.d.ts.map +1 -1
  16. package/lib/components/Popover/schema.js +1 -1
  17. package/lib/components/Select/index.d.ts.map +1 -1
  18. package/lib/components/Select/index.js +4 -2
  19. package/lib/components/Select/schema.d.ts.map +1 -1
  20. package/lib/components/Select/schema.js +1 -0
  21. package/lib/components/Select/types.d.ts +1 -0
  22. package/lib/components/Select/types.d.ts.map +1 -1
  23. package/lib/components/SelectDate/index.d.ts.map +1 -1
  24. package/lib/components/SelectDate/index.js +3 -1
  25. package/lib/components/SelectDate/schema.d.ts.map +1 -1
  26. package/lib/components/SelectDate/schema.js +1 -0
  27. package/lib/components/SelectDate/types.d.ts +1 -0
  28. package/lib/components/SelectDate/types.d.ts.map +1 -1
  29. package/lib/components/SelectDateRange/index.d.ts.map +1 -1
  30. package/lib/components/SelectDateRange/index.js +2 -0
  31. package/lib/components/SelectDateRange/schema.d.ts.map +1 -1
  32. package/lib/components/SelectDateRange/schema.js +1 -0
  33. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../src/atoms/OptionsList/Option.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,OAAO,EACL,WAAW,EAMZ,MAAM,SAAS,CAAC;AA+MjB,iBAAS,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA4G/C;;AAED,wBAAkC"}
1
+ {"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../src/atoms/OptionsList/Option.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,OAAO,EACL,WAAW,EAMZ,MAAM,SAAS,CAAC;AA8NjB,iBAAS,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAsH/C;;AAED,wBAAkC"}
@@ -60,7 +60,12 @@ var StyledLink = (0, _styledComponents.default)(_Link.default).withConfig({
60
60
  var Container = _styledComponents.default.li.withConfig({
61
61
  displayName: "Option__Container",
62
62
  componentId: "sc-679ny4-1"
63
- })(["&:focus{outline:none;}> .label,> ", "{align-items:center;border:1px solid transparent;color:", ";display:flex;padding:", ";pointer-events:none;width:100%;white-space:nowrap;", ";> *{margin-right:", ";}}> ", "{pointer-events:auto;background-color:transparent;text-decoration:none;}&:first-child > .label,&:first-child > ", "{border-top-left-radius:", ";border-top-right-radius:", ";}&:last-child > .label,&:last-child > ", "{border-bottom-left-radius:", ";border-bottom-right-radius:", ";}&:hover:not([aria-disabled='true']):not([aria-selected='true']) > .label,&:hover:not([aria-disabled='true']):not([aria-selected='true']) > ", "{color:", ";text-decoration:none;.label > *{border-color:", ";}}&[aria-selected='true'] > .label{background:", ";color:", ";}", ";", " &[aria-disabled='true']{cursor:not-allowed;", "{pointer-events:none;}}&[aria-disabled='true'] > .label,&[aria-disabled='true'] > ", "{background:", ";color:", ";}"], StyledLink, (0, _toColorString.default)(_color.default.interaction.pacificOcean), "".concat((0, _rem.default)(7), " ").concat((0, _rem.default)(20), " ").concat((0, _rem.default)(7), " ").concat((0, _rem.default)(10)), (0, _styleModifiers.when)('compact', (0, _styledComponents.css)(["padding:", ";"], "".concat((0, _rem.default)(5), " ").concat((0, _rem.default)(20), " ").concat((0, _rem.default)(5), " ").concat((0, _rem.default)(10)))), (0, _rem.default)(10), StyledLink, StyledLink, getBorderRadius, getBorderRadius, StyledLink, getBorderRadius, getBorderRadius, StyledLink, (0, _toColorString.default)(_color.default.interaction.pacificOcean), (0, _toColorString.default)(_color.default.interaction.indianOcean), (0, _toColorString.default)(_color.default.interaction.pacificOcean), (0, _toColorString.default)(_color.default.base.snowWhite), (0, _styleModifiers.when)('isActive', (0, _styledComponents.css)(["color:", ";background:", ";.label > *{border-color:", ";}"], (0, _toColorString.default)(_color.default.interaction.pacificOcean), (0, _toColorString.default)(_color.default.interaction.pacificOcean15), (0, _toColorString.default)(_color.default.interaction.indianOcean))), (0, _styleModifiers.when)([['isActive'], ['inputMethod', 'keyboard']], (0, _styledComponents.css)(["background:none;> .label,> ", "{border-color:", ";", "}&[aria-selected='true'] > .label,&[aria-selected='true'] > ", "{color:", ";", "}"], StyledLink, (0, _toColorString.default)(_color.default.interaction.pacificOcean), (0, _focusRingWithColor.default)(_color.default.interaction.pacificOcean40), StyledLink, (0, _toColorString.default)(_color.default.base.snowWhite), (0, _focusRingWithColor.default)(_color.default.opacity.fullMoon50))), StyledLink, StyledLink, (0, _toColorString.default)(_color.default.base.snowWhite), (0, _toColorString.default)(_color.default.opacity.charcoal40)); // This is used below to silence a React warning about
63
+ })(["text-align:left;&:focus{outline:none;}> .label,> ", "{align-items:center;border:1px solid transparent;color:", ";display:flex;padding:", ";pointer-events:none;width:100%;white-space:nowrap;", ";> *{margin-right:", ";}}> ", "{pointer-events:auto;background-color:transparent;text-decoration:none;}&:first-child > .label,&:first-child > ", "{border-top-left-radius:", ";border-top-right-radius:", ";}&:last-child > .label,&:last-child > ", "{border-bottom-left-radius:", ";border-bottom-right-radius:", ";}&:hover:not([aria-disabled='true']):not([aria-selected='true']) > .label,&:hover:not([aria-disabled='true']):not([aria-selected='true']) > ", "{color:", ";text-decoration:none;.label > *{border-color:", ";}}&[aria-selected='true'] > .label{background:", ";color:", ";}&[aria-selected='true'] > .label > div > #optionLabelDetails{background:", ";color:", ";}", ";", " &[aria-disabled='true']{cursor:not-allowed;", "{pointer-events:none;}}&[aria-disabled='true'] > .label,&[aria-disabled='true'] > ", "{background:", ";color:", ";}"], StyledLink, (0, _toColorString.default)(_color.default.interaction.pacificOcean), "".concat((0, _rem.default)(7), " ").concat((0, _rem.default)(20), " ").concat((0, _rem.default)(7), " ").concat((0, _rem.default)(10)), (0, _styleModifiers.when)('compact', (0, _styledComponents.css)(["padding:", ";"], "".concat((0, _rem.default)(5), " ").concat((0, _rem.default)(20), " ").concat((0, _rem.default)(5), " ").concat((0, _rem.default)(10)))), (0, _rem.default)(10), StyledLink, StyledLink, getBorderRadius, getBorderRadius, StyledLink, getBorderRadius, getBorderRadius, StyledLink, (0, _toColorString.default)(_color.default.interaction.pacificOcean), (0, _toColorString.default)(_color.default.interaction.indianOcean), (0, _toColorString.default)(_color.default.interaction.pacificOcean), (0, _toColorString.default)(_color.default.base.snowWhite), (0, _toColorString.default)(_color.default.interaction.pacificOcean), (0, _toColorString.default)(_color.default.base.snowWhite), (0, _styleModifiers.when)('isActive', (0, _styledComponents.css)(["color:", ";background:", ";.label > *{border-color:", ";}"], (0, _toColorString.default)(_color.default.interaction.pacificOcean), (0, _toColorString.default)(_color.default.interaction.pacificOcean15), (0, _toColorString.default)(_color.default.interaction.indianOcean))), (0, _styleModifiers.when)([['isActive'], ['inputMethod', 'keyboard']], (0, _styledComponents.css)(["background:none;> .label,> ", "{border-color:", ";", "}&[aria-selected='true'] > .label,&[aria-selected='true'] > ", "{color:", ";", "}"], StyledLink, (0, _toColorString.default)(_color.default.interaction.pacificOcean), (0, _focusRingWithColor.default)(_color.default.interaction.pacificOcean40), StyledLink, (0, _toColorString.default)(_color.default.base.snowWhite), (0, _focusRingWithColor.default)(_color.default.opacity.fullMoon50))), StyledLink, StyledLink, (0, _toColorString.default)(_color.default.base.snowWhite), (0, _toColorString.default)(_color.default.opacity.charcoal40));
64
+
65
+ var StyleLabelWrapper = _styledComponents.default.div.withConfig({
66
+ displayName: "Option__StyleLabelWrapper",
67
+ componentId: "sc-679ny4-2"
68
+ })(["display:flex;flex:1;flex-direction:column;"]); // This is used below to silence a React warning about
64
69
  // having a controlled input without a change handler.
65
70
 
66
71
 
@@ -98,7 +103,7 @@ function DecorationComponent(props) {
98
103
 
99
104
  var DecorationComponentContainer = _styledComponents.default.div.withConfig({
100
105
  displayName: "Option__DecorationComponentContainer",
101
- componentId: "sc-679ny4-2"
106
+ componentId: "sc-679ny4-3"
102
107
  })(["", ";"], (0, _styleModifiers.when)('disabled', (0, _styledComponents.css)(["opacity:0.3;img{opacity:0.3;}"]))); // We always render the checkbox/radio inputs so that regular form
103
108
  // submission (i.e. one not handled programmatically) still works.
104
109
 
@@ -109,6 +114,7 @@ function Option(props) {
109
114
  decoration = props.decoration,
110
115
  disabled = props.disabled,
111
116
  borderRadius = props.borderRadius,
117
+ labelDetails = props.labelDetails,
112
118
  _props$showCheckbox = props.showCheckbox,
113
119
  showCheckbox = _props$showCheckbox === void 0 ? true : _props$showCheckbox;
114
120
  var decorationType = (0, _get.default)(decoration, 'type');
@@ -183,13 +189,19 @@ function Option(props) {
183
189
  }, _react.default.createElement(DecorationComponent, decoration)), renderOptionLabel ? renderOptionLabel({
184
190
  id: id,
185
191
  label: label,
192
+ labelDetails: labelDetails,
186
193
  value: props.value,
187
194
  disabled: disabled,
188
195
  meta: props.meta
189
- }) : _react.default.createElement(_Typography.P, {
196
+ }) : _react.default.createElement(StyleLabelWrapper, null, _react.default.createElement(_Typography.P, {
190
197
  as: "span",
191
198
  color: "inherit"
192
- }, label)));
199
+ }, label), labelDetails && _react.default.createElement(_Typography.P, {
200
+ as: "span",
201
+ shade: 1,
202
+ size: "small",
203
+ id: "optionLabelDetails"
204
+ }, labelDetails))));
193
205
  }
194
206
 
195
207
  var _default = _react.default.memo(Option);
@@ -233,7 +233,7 @@ function OptionsList(props, forwardedRef) {
233
233
  }, [containerRef, activeId, inputMethod, previousActiveId]);
234
234
 
235
235
  var setContainerRefFunc = function setContainerRefFunc(el) {
236
- _react.forwardRef && (0, _assignRef.default)(forwardedRef, el);
236
+ (0, _assignRef.default)(forwardedRef, el);
237
237
  setContainerRef(el);
238
238
  };
239
239
 
@@ -86,6 +86,14 @@ var items = [{
86
86
  label: 'Option 5',
87
87
  value: '5'
88
88
  }]
89
+ }, {
90
+ label: 'WithDetailLabel',
91
+ items: [{
92
+ id: '6',
93
+ label: 'custom label here',
94
+ labelDetails: 'test detail label',
95
+ value: '6'
96
+ }]
89
97
  }];
90
98
  var defaultProps = {
91
99
  items: items,
@@ -133,10 +141,16 @@ describe('OptionsList', function () {
133
141
  }
134
142
  });
135
143
  });
136
- it('navigates through the options with arrow keys', function () {
144
+ it('checks that labelDetails when provided ', function () {
137
145
  var _render3 = render(_react.default.createElement(_.default, defaultProps)),
138
- getByText = _render3.getByText,
139
- container = _render3.container;
146
+ getByText = _render3.getByText;
147
+
148
+ expect(getByText('test detail label')).toBeInTheDocument();
149
+ });
150
+ it('navigates through the options with arrow keys', function () {
151
+ var _render4 = render(_react.default.createElement(_.default, defaultProps)),
152
+ getByText = _render4.getByText,
153
+ container = _render4.container;
140
154
 
141
155
  var optionsList = container.querySelector('ul'); // simulate it is focused while tabbing
142
156
 
@@ -165,11 +179,11 @@ describe('OptionsList', function () {
165
179
  it('selects an item with Enter or Space key', function () {
166
180
  var onChange = jest.fn();
167
181
 
168
- var _render4 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
182
+ var _render5 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
169
183
  onChange: onChange
170
184
  }))),
171
- getByLabelText = _render4.getByLabelText,
172
- container = _render4.container;
185
+ getByLabelText = _render5.getByLabelText,
186
+ container = _render5.container;
173
187
 
174
188
  var selectedItem = defaultProps.items[1];
175
189
  var optionsList = container.querySelector('ul'); // simulate it is focused while tabbing
@@ -206,12 +220,12 @@ describe('OptionsList', function () {
206
220
  disabled: true
207
221
  }];
208
222
 
209
- var _render5 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
223
+ var _render6 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
210
224
  items: onlyDisabledItems,
211
225
  onChange: onChange
212
226
  }))),
213
- getByLabelText = _render5.getByLabelText,
214
- container = _render5.container;
227
+ getByLabelText = _render6.getByLabelText,
228
+ container = _render6.container;
215
229
 
216
230
  var optionsList = container.querySelector('ul'); // simulate it is focused while tabbing
217
231
 
@@ -238,11 +252,11 @@ describe('OptionsList', function () {
238
252
  it('calls onChange with id when item is clicked', function () {
239
253
  var onChange = jest.fn();
240
254
 
241
- var _render6 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
255
+ var _render7 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
242
256
  onChange: onChange
243
257
  }))),
244
- getByText = _render6.getByText,
245
- getByLabelText = _render6.getByLabelText;
258
+ getByText = _render7.getByText,
259
+ getByLabelText = _render7.getByLabelText;
246
260
 
247
261
  var item = items[0];
248
262
 
@@ -261,11 +275,11 @@ describe('OptionsList', function () {
261
275
  it('does not calls onChange when item is clicked', function () {
262
276
  var onChange = jest.fn();
263
277
 
264
- var _render7 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
278
+ var _render8 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
265
279
  onChange: onChange
266
280
  }))),
267
- getByText = _render7.getByText,
268
- getByLabelText = _render7.getByLabelText;
281
+ getByText = _render8.getByText,
282
+ getByLabelText = _render8.getByLabelText;
269
283
 
270
284
  _react2.fireEvent.click(getByText(disabledItemLabel));
271
285
 
@@ -279,11 +293,11 @@ describe('OptionsList', function () {
279
293
  it('prefers value over internal', function () {
280
294
  var selected = items[1];
281
295
 
282
- var _render8 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
296
+ var _render9 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
283
297
  selected: selected.id
284
298
  }))),
285
- getByText = _render8.getByText,
286
- getByLabelText = _render8.getByLabelText;
299
+ getByText = _render9.getByText,
300
+ getByLabelText = _render9.getByLabelText;
287
301
 
288
302
  var item = items[0];
289
303
 
@@ -298,12 +312,12 @@ describe('OptionsList', function () {
298
312
  it('calls onChange with array of selected ids when item is clicked', function () {
299
313
  var onChange = jest.fn();
300
314
 
301
- var _render9 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
315
+ var _render10 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
302
316
  onChange: onChange,
303
317
  multiple: true
304
318
  }))),
305
- getByText = _render9.getByText,
306
- getByLabelText = _render9.getByLabelText;
319
+ getByText = _render10.getByText,
320
+ getByLabelText = _render10.getByLabelText;
307
321
 
308
322
  var item = items[0];
309
323
 
@@ -342,12 +356,12 @@ describe('OptionsList', function () {
342
356
  onClick: onClick
343
357
  }];
344
358
 
345
- var _render10 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
359
+ var _render11 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
346
360
  actions: actions,
347
361
  multiple: true
348
362
  }))),
349
- baseElement = _render10.baseElement,
350
- getByText = _render10.getByText;
363
+ baseElement = _render11.baseElement,
364
+ getByText = _render11.getByText;
351
365
 
352
366
  actions.forEach(function (_ref5) {
353
367
  var label = _ref5.text;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/atoms/OptionsList/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAA2C,CAAC;AAoExD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/atoms/OptionsList/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAA2C,CAAC;AAuExD,eAAe,MAAM,CAAC"}
@@ -26,6 +26,7 @@ schema.makePropTypes = function () {
26
26
  disabled: _reactDesc.PropTypes.bool,
27
27
  id: _reactDesc.PropTypes.string,
28
28
  label: _reactDesc.PropTypes.string.description('The label text for an option in the dropdown list.'),
29
+ labelDetails: _reactDesc.PropTypes.string.description('The secondary sub-text for an option in the dropdown list.'),
29
30
  value: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.number, _reactDesc.PropTypes.string]).description('The value for an option in the dropdown list.')
30
31
  })).description('The array of item data that will be rendered').isRequired,
31
32
  minWidth: _reactDesc.PropTypes.string.description('A CSS min-width value to apply'),
@@ -47,6 +47,7 @@ interface BaseOption {
47
47
  disabled?: boolean;
48
48
  id: string;
49
49
  label: string;
50
+ labelDetails?: string;
50
51
  showCheckbox?: boolean;
51
52
  meta?: object;
52
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atoms/OptionsList/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,oBAAY,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,MAAM,CAAC,CAAC;AAClE,oBAAY,gBAAgB,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAEpE,oBAAY,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAC3D,oBAAY,SAAS,GAAG,MAAM,GAAG,MAAM,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zB,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/index.tsx"],"names":[],"mappings":"AASA,OAAc,EAGZ,sBAAsB,EAQvB,MAAM,OAAO,CAAC;AA2Bf,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAQ,MAAM,SAAS,CAAC;AAuiBhE,QAAA,MAAM,eAAe,EAAE,sBAAsB,CAC3C,gBAAgB,EAChB,aAAa,CACS,CAAC;AAOzB,eAAe,eAAe,CAAC"}
@@ -122,7 +122,8 @@ function Combobox(props, ref) {
122
122
  propValue = props.value,
123
123
  _props$variant = props.variant,
124
124
  variant = _props$variant === void 0 ? 'sync' : _props$variant,
125
- zIndex = props.zIndex;
125
+ zIndex = props.zIndex,
126
+ containerSelector = props.containerSelector;
126
127
 
127
128
  var _useCombobox = (0, _useCombobox2.default)(props),
128
129
  getInputFieldProps = _useCombobox.getInputFieldProps,
@@ -537,6 +538,7 @@ function Combobox(props, ref) {
537
538
  autoComplete: autoComplete,
538
539
  type: type
539
540
  }), _react.default.createElement(_DropdownList.default, {
541
+ containerSelector: containerSelector,
540
542
  PanelComponent: getPanelComponent(),
541
543
  activeId: activeId,
542
544
  "aria-labelledby": ariaLabelledBy,
@@ -143,7 +143,7 @@ describe('Combobox', function () {
143
143
  // returns the <span>, but we need the `<li>`
144
144
 
145
145
 
146
- var li = (0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement; // These two CSS values make an option look "active".
146
+ var li = (0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement.parentElement; // These two CSS values make an option look "active".
147
147
 
148
148
  expect(li).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
149
149
  });
@@ -593,7 +593,7 @@ describe('Combobox', function () {
593
593
 
594
594
  expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label)).toBeInTheDocument(); // The first element should be "active" by default if it's not disabled.
595
595
 
596
- expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n ")); // The focus should always remain on the input. The "active" item is kind of a fake.
596
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n ")); // The focus should always remain on the input. The "active" item is kind of a fake.
597
597
 
598
598
  expect(queryByLabelText('test')).toHaveFocus();
599
599
 
@@ -602,8 +602,8 @@ describe('Combobox', function () {
602
602
  keyCode: 40
603
603
  });
604
604
 
605
- expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
606
- expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
605
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement.parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
606
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement.parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
607
607
  expect(queryByLabelText('test')).toHaveFocus();
608
608
 
609
609
  _react2.fireEvent.keyDown(queryByLabelText('test'), {
@@ -611,8 +611,8 @@ describe('Combobox', function () {
611
611
  keyCode: 38
612
612
  });
613
613
 
614
- expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement.parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
615
- expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
614
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement.parentElement.parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
615
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
616
616
  expect(queryByLabelText('test')).toHaveFocus();
617
617
  expect(onChangeInputValue).not.toHaveBeenCalled();
618
618
  expect(onChangeValue).not.toHaveBeenCalled();
@@ -660,7 +660,7 @@ describe('Combobox', function () {
660
660
 
661
661
  expect((0, _react2.queryByText)(baseElement, enabledElements[0])).toBeInTheDocument(); // The first element should be "active" by default if it's not disabled.
662
662
 
663
- expect((0, _react2.queryByText)(baseElement, enabledElements[0]).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n ")); // The focus should always remain on the input. The "active" item is kind of a fake.
663
+ expect((0, _react2.queryByText)(baseElement, enabledElements[0]).parentElement.parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n ")); // The focus should always remain on the input. The "active" item is kind of a fake.
664
664
 
665
665
  expect(queryByLabelText('test')).toHaveFocus();
666
666
 
@@ -672,7 +672,7 @@ describe('Combobox', function () {
672
672
  expect((0, _react2.queryByText)(baseElement, enabledElements[0]).parentElement.parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n ")); // The next active element should be the next element in the list
673
673
  // that is not marked as disabled
674
674
 
675
- expect((0, _react2.queryByText)(baseElement, enabledElements[1]).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
675
+ expect((0, _react2.queryByText)(baseElement, enabledElements[1]).parentElement.parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
676
676
  expect(queryByLabelText('test')).toHaveFocus();
677
677
 
678
678
  _react2.fireEvent.keyDown(queryByLabelText('test'), {
@@ -683,7 +683,7 @@ describe('Combobox', function () {
683
683
  expect((0, _react2.queryByText)(baseElement, enabledElements[1]).parentElement.parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n ")); // The next active element should be the previous element in the list
684
684
  // that is not marked as disabled
685
685
 
686
- expect((0, _react2.queryByText)(baseElement, enabledElements[0]).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
686
+ expect((0, _react2.queryByText)(baseElement, enabledElements[0]).parentElement.parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
687
687
  expect(queryByLabelText('test')).toHaveFocus();
688
688
  expect(onChangeInputValue).not.toHaveBeenCalled();
689
689
  expect(onChangeValue).not.toHaveBeenCalled();
@@ -854,7 +854,7 @@ describe('Combobox', function () {
854
854
  _react2.fireEvent.click(queryByLabelText('test'));
855
855
 
856
856
  expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label)).toBeInTheDocument();
857
- expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
857
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
858
858
  });
859
859
  describe('when typing', function () {
860
860
  it('does NOT update the selection automatically', function () {
@@ -887,7 +887,7 @@ describe('Combobox', function () {
887
887
  });
888
888
 
889
889
  expect(onChangeValue).toHaveBeenCalledTimes(1);
890
- expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
890
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
891
891
  });
892
892
  });
893
893
  describe('when clicking the clear button', function () {
@@ -940,7 +940,7 @@ describe('Combobox', function () {
940
940
  _react2.fireEvent.click(queryByLabelText('test'));
941
941
 
942
942
  expect(queryByLabelText('test')).toHaveValue('value');
943
- expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
943
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
944
944
  rerender(_react.default.createElement(_.default, {
945
945
  label: "test",
946
946
  options: defaultOptions,
@@ -950,15 +950,15 @@ describe('Combobox', function () {
950
950
  onChangeValue: onChangeValue
951
951
  }));
952
952
  expect(queryByLabelText('test')).toHaveValue('value');
953
- expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
954
- expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
953
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
954
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
955
955
  expect(onChangeInputValue).not.toHaveBeenCalled();
956
956
  expect(onChangeValue).not.toHaveBeenCalled();
957
957
  });
958
958
  });
959
959
  describe('when a controlled component', function () {
960
960
  it('initializes with and prefers prop values', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
961
- var newInputValue, onChangeInputValue, onChangeValue, _render32, baseElement, queryByLabelText, rerender;
961
+ var newInputValue, onChangeInputValue, onChangeValue, _render32, baseElement, queryByLabelText, rerender, container, getByRole, getAllByRole;
962
962
 
963
963
  return regeneratorRuntime.wrap(function _callee$(_context) {
964
964
  while (1) {
@@ -977,14 +977,14 @@ describe('Combobox', function () {
977
977
  onChangeValue: onChangeValue,
978
978
  autoComplete: "auto-complete-test",
979
979
  type: "search"
980
- })), baseElement = _render32.baseElement, queryByLabelText = _render32.queryByLabelText, rerender = _render32.rerender;
980
+ })), baseElement = _render32.baseElement, queryByLabelText = _render32.queryByLabelText, rerender = _render32.rerender, container = _render32.container, getByRole = _render32.getByRole, getAllByRole = _render32.getAllByRole;
981
981
 
982
982
  _react2.fireEvent.click(queryByLabelText('test'));
983
983
 
984
984
  expect(queryByLabelText('test')).toHaveValue('value');
985
985
  expect(queryByLabelText('test')).toHaveAttribute('autoComplete', 'auto-complete-test');
986
986
  expect(queryByLabelText('test')).toHaveAttribute('type', 'search');
987
- expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
987
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
988
988
  rerender(_react.default.createElement(_.default, {
989
989
  label: "test",
990
990
  options: defaultOptions,
@@ -994,8 +994,8 @@ describe('Combobox', function () {
994
994
  onChangeValue: onChangeValue
995
995
  }));
996
996
  expect(queryByLabelText('test')).toHaveValue('second value');
997
- expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
998
- expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
997
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
998
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement.parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
999
999
  expect(onChangeInputValue).not.toHaveBeenCalled();
1000
1000
  expect(onChangeValue).not.toHaveBeenCalled();
1001
1001
 
@@ -1019,8 +1019,8 @@ describe('Combobox', function () {
1019
1019
 
1020
1020
  _react2.fireEvent.click(queryByLabelText('test'));
1021
1021
 
1022
- expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
1023
- expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
1022
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
1023
+ expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label).parentElement.parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n color: ").concat((0, _toColorString.default)(_color.default.base.snowWhite), ";\n "));
1024
1024
 
1025
1025
  case 23:
1026
1026
  case "end":
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/schema.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,MAAM,KAAwC,CAAC;AAuFrD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/schema.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,MAAM,KAAwC,CAAC;AA4FrD,eAAe,MAAM,CAAC"}
@@ -24,6 +24,7 @@ var schema = (0, _reactDesc.describe)({
24
24
  });
25
25
  schema.propTypes = _objectSpread({}, (0, _omit.default)(_InputField.schema.makePropTypes(), 'children', 'maxLength', 'onChange', 'showCharacterCount'), {
26
26
  clearButtonLabel: _reactDesc.PropTypes.string.description("A hidden label value for the clear button. The select component's label is available within the string for clarity.").defaultValue('Clear {label} value'),
27
+ containerSelector: _reactDesc.PropTypes.string.description("A CSS selector to the element where the Combobox should be rendered in, or \"parent\" to render the Combobox in-place.").defaultValue('body'),
27
28
  defaultInputValue: _reactDesc.PropTypes.string.description('The default text value for the input field.'),
28
29
  defaultValue: _reactDesc.PropTypes.string.description('The ID of the option that should be selected by default.'),
29
30
  loading: _reactDesc.PropTypes.bool.description('Useful if variant="async". When true, a loading message will render in the dropdown instead of options.'),
@@ -8,7 +8,7 @@ declare type Variant = 'async' | 'sync';
8
8
  interface TOnChangeMeta {
9
9
  removed: boolean;
10
10
  }
11
- export interface ComboboxProps extends Omit<React.InputHTMLAttributes<ComboboxInputRef>, 'onChange' | 'value'>, Omit<BaseInputFieldProps, 'children' | 'onChange' | 'value'>, Pick<DropdownListProps, 'onShow' | 'onHide' | 'renderOptionLabel'> {
11
+ export interface ComboboxProps extends Omit<React.InputHTMLAttributes<ComboboxInputRef>, 'onChange' | 'value'>, Omit<BaseInputFieldProps, 'children' | 'onChange' | 'value'>, Pick<DropdownListProps, 'onShow' | 'onHide' | 'renderOptionLabel' | 'containerSelector'> {
12
12
  clearButtonLabel?: string;
13
13
  defaultInputValue?: string;
14
14
  defaultValue?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,oBAAY,gBAAgB,GAAG,gBAAgB,CAAC;AAEhD,aAAK,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhC,UAAU,aAAa;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,aACf,SAAQ,IAAI,CACR,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,UAAU,GAAG,OAAO,CACrB,EACD,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC,EAC5D,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,QAAQ,GAAG,mBAAmB,CAAC;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAA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BAAkB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9D;AAED,MAAM,WAAW,WAAY,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC;IACvB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,CAAC;IAC1D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,sBAAsB,EAAE,MAAM,IAAI,CAAC;CACpC"}
@@ -31,7 +31,7 @@ schema.makePropTypes = function () {
31
31
  containerSelector: _reactDesc.PropTypes.string.description("A CSS selector to the element where the ".concat(component, "s should be rendered in, or \"parent\" to render the ").concat(component, " in-place.")).defaultValue('body'),
32
32
  hideOnESC: _reactDesc.PropTypes.bool.description("Whether or not to close the ".concat(component, " when the user presses the \"Escape\" key. No effect when `visible` is not `undefined`.")).defaultValue('true'),
33
33
  hideOnClickOutside: _reactDesc.PropTypes.bool.description("Whether or not to close the ".concat(component, " when the user clicks outside the ").concat(component, ". No effect when `visible` is not `undefined`.")).defaultValue('true'),
34
- zIndex: _reactDesc.PropTypes.bool.description("The css `z-index` value to apply to the ".concat(component, " content wrapper. Is set to `auto` when not provided.")),
34
+ zIndex: _reactDesc.PropTypes.number.description("The css `z-index` value to apply to the ".concat(component, " content wrapper. Is set to `auto` when not provided.")),
35
35
  onShow: _reactDesc.PropTypes.func.description("A function called when the ".concat(component, " becomes visible. Only called if `visible` is `undefined`.")),
36
36
  onHide: _reactDesc.PropTypes.func.description("A function called when the ".concat(component, " becomes hidden. Only called if `visible` is `undefined`.")),
37
37
  onRequestHide: _reactDesc.PropTypes.func.description("A function called if `visible` is not `undefined` and when the user clicks outside the ".concat(component, " or presses the \"Escape\" key."))
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAGA,OAAc,EAEZ,sBAAsB,EAMvB,MAAM,OAAO,CAAC;AAoBf,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAyPjD,QAAA,MAAM,aAAa,EAAE,sBAAsB,CACzC,SAAS,EACT,WAAW,CACS,CAAC;AAgCvB,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAGA,OAAc,EAEZ,sBAAsB,EAMvB,MAAM,OAAO,CAAC;AAoBf,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AA2PjD,QAAA,MAAM,aAAa,EAAE,sBAAsB,CACzC,SAAS,EACT,WAAW,CACS,CAAC;AAgCvB,eAAe,aAAa,CAAC"}
@@ -85,7 +85,8 @@ function Select(props, ref) {
85
85
  options = props.options,
86
86
  renderOptionLabel = props.renderOptionLabel,
87
87
  propValue = props.value,
88
- zIndex = props.zIndex;
88
+ zIndex = props.zIndex,
89
+ containerSelector = props.containerSelector;
89
90
  var fallbackSelectRef = (0, _react.useRef)(null);
90
91
  var finalSelectRef = ref || fallbackSelectRef;
91
92
  var inputId = (0, _useUniqueId.default)(id, 'select-');
@@ -273,7 +274,8 @@ function Select(props, ref) {
273
274
  showArrow: false,
274
275
  target: popoverTargetRef,
275
276
  visible: isPopoverVisible,
276
- zIndex: zIndex
277
+ zIndex: zIndex,
278
+ containerSelector: containerSelector
277
279
  }));
278
280
  }));
279
281
  }
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Select/schema.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,MAAM,KAAsC,CAAC;AA8DnD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Select/schema.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,MAAM,KAAsC,CAAC;AAmEnD,eAAe,MAAM,CAAC"}
@@ -24,6 +24,7 @@ var schema = (0, _reactDesc.describe)({
24
24
  });
25
25
  schema.propTypes = _objectSpread({}, (0, _omit.default)(_InputField.schema.makePropTypes(), ['children', 'maxLength', 'onChange', 'showCharacterCount']), {
26
26
  clearButtonLabel: _reactDesc.PropTypes.string.description("A hidden label value for the clear button. The select component's label is available within the string for clarity.").defaultValue('Clear {label} value'),
27
+ containerSelector: _reactDesc.PropTypes.string.description("A CSS selector to the element where the Select should be rendered in, or \"parent\" to render the Select in-place.").defaultValue('body'),
27
28
  defaultValue: _reactDesc.PropTypes.string.description('The ID of the option that should be selected by default.'),
28
29
  actions: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.object), _reactDesc.PropTypes.shape({
29
30
  left: _reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.object),
@@ -20,6 +20,7 @@ export declare type SelectProps = BaseSelectProps & {
20
20
  options: Items;
21
21
  value?: string;
22
22
  zIndex?: PopoverProps['zIndex'];
23
+ containerSelector?: string;
23
24
  };
24
25
  export interface TargetProps extends ButtonHTMLAttributes<SelectRef>, Pick<InputComponentProps, 'disabled' | 'id' | 'onBlur' | 'onFocus' | 'readOnly' | 'ref' | 'value'> {
25
26
  clearButtonLabel?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Select/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,mBAAmB,EACnB,mBAAmB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d.ts","sourceRoot":"","sources":["../../../src/components/SelectDate/index.tsx"],"names":[],"mappings":"AAMA,OAAc,EAEZ,sBAAsB,EAMvB,MAAM,OAAO,CAAC;AAsBf,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAQ,MAAM,SAAS,CAAC;AAIjE,OAAO,EACL,SAAS,EACT,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AAmQxC,QAAA,MAAM,iBAAiB,EAAE,sBAAsB,CAC7C,cAAc,EACd,gBAAgB,CACQ,CAAC;AAQ3B,eAAe,iBAAiB,CAAC"}
@@ -93,6 +93,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
93
93
 
94
94
  function SelectDate(props, ref) {
95
95
  var clearButtonLabel = props.clearButtonLabel,
96
+ containerSelector = props.containerSelector,
96
97
  defaultValue = props.defaultValue,
97
98
  id = props.id,
98
99
  inputContainerRef = props.inputContainerRef,
@@ -280,7 +281,8 @@ function SelectDate(props, ref) {
280
281
  showArrow: false,
281
282
  target: popoverTargetRef,
282
283
  visible: isPopoverVisible,
283
- zIndex: zIndex
284
+ zIndex: zIndex,
285
+ containerSelector: containerSelector
284
286
  }, _react.default.createElement(_Grid.default.Container, {
285
287
  ref: popoverContentRef
286
288
  }, _react.default.createElement(_Grid.default.Row, null, _react.default.createElement(_Calendar.default, {
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/SelectDate/schema.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,MAAM,KAAsC,CAAC;AAoCnD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/SelectDate/schema.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,MAAM,KAAsC,CAAC;AAyCnD,eAAe,MAAM,CAAC"}
@@ -24,6 +24,7 @@ var schema = (0, _reactDesc.describe)({
24
24
  });
25
25
  schema.propTypes = _objectSpread({}, (0, _omit.default)(_InputField.schema.makePropTypes(), ['children', 'maxLength', 'onChange', 'showCharacterCount']), {
26
26
  clearButtonLabel: _reactDesc.PropTypes.string.description("A hidden label value for the clear button. The select component's label is available within the string for clarity.").defaultValue('Clear {label} value'),
27
+ containerSelector: _reactDesc.PropTypes.string.description("A CSS selector to the element where the SelectDate should be rendered in, or \"parent\" to render the SelectDate in-place.").defaultValue('body'),
27
28
  defaultValue: _reactDesc.PropTypes.instanceOf(Date).description('The date should be selected by default.'),
28
29
  onChange: _reactDesc.PropTypes.func.description('Called with either the selected date or `undefined`'),
29
30
  onHide: _reactDesc.PropTypes.func.description('A callback which is triggered when the popover is closed'),
@@ -23,6 +23,7 @@ export interface BaseSelectDateProps extends Omit<ButtonHTMLAttributes<TSelectDa
23
23
  zIndex?: PopoverProps['zIndex'];
24
24
  name: string;
25
25
  clearButtonLabel?: string;
26
+ containerSelector?: string;
26
27
  }
27
28
  export declare type TSelectDateProps = BaseSelectDateProps & {
28
29
  defaultValue?: Date;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/SelectDate/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,GAAG,EACJ,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,oBAAY,cAAc,GAAG,iBAAiB,CAAC;AAE/C,MAAM,WAAW,sBACf,SAAQ,oBAAoB,CAAC,cAAc,CAAC,EAC1C,IAAI,CACF,mBAAmB,EACnB,UAAU,GAAG,IAAI,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,GAAG,OAAO,CACxE;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc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5B,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACxC,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,oBAAY,gBAAgB,GAAG,mBAAmB,GAAG;IACnD,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF,oBAAY,IAAI,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectDateRange/index.tsx"],"names":[],"mappings":"AAKA,OAAc,EAEZ,sBAAsB,EAMvB,MAAM,OAAO,CAAC;AAyBf,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAQ,MAAM,SAAS,CAAC;AAI3E,OAAO,EACL,SAAS,EACT,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AA0TxC,QAAA,MAAM,sBAAsB,EAAE,sBAAsB,CAClD,mBAAmB,EACnB,qBAAqB,CACQ,CAAC;AAQhC,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectDateRange/index.tsx"],"names":[],"mappings":"AAKA,OAAc,EAEZ,sBAAsB,EAMvB,MAAM,OAAO,CAAC;AAyBf,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAQ,MAAM,SAAS,CAAC;AAI3E,OAAO,EACL,SAAS,EACT,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AA4TxC,QAAA,MAAM,sBAAsB,EAAE,sBAAsB,CAClD,mBAAmB,EACnB,qBAAqB,CACQ,CAAC;AAQhC,eAAe,sBAAsB,CAAC"}
@@ -106,6 +106,7 @@ var ButtonsRow = (0, _styledComponents.default)(_Grid.default.Row).withConfig({
106
106
 
107
107
  function SelectDateRange(props, ref) {
108
108
  var clearButtonLabel = props.clearButtonLabel,
109
+ containerSelector = props.containerSelector,
109
110
  defaultValue = props.defaultValue,
110
111
  id = props.id,
111
112
  inputContainerRef = props.inputContainerRef,
@@ -307,6 +308,7 @@ function SelectDateRange(props, ref) {
307
308
  readOnly: readOnly,
308
309
  ref: targetRef
309
310
  }, value), _react.default.createElement(_Popover.default, {
311
+ containerSelector: containerSelector,
310
312
  borderRadius: "0 0 2px 2px",
311
313
  manageEvents: false,
312
314
  placement: "bottom",
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/SelectDateRange/schema.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,MAAM,KAAsC,CAAC;AA2CnD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/SelectDateRange/schema.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,MAAM,KAAsC,CAAC;AAgDnD,eAAe,MAAM,CAAC"}
@@ -25,6 +25,7 @@ var schema = (0, _reactDesc.describe)({
25
25
  schema.propTypes = _objectSpread({}, (0, _omit.default)(_InputField.schema.makePropTypes(), ['children', 'maxLength', 'onChange', 'showCharacterCount', 'value']), {
26
26
  clearButtonLabel: _reactDesc.PropTypes.string.description("A hidden label value for the clear button. The select component's label is available within the string for clarity.").defaultValue('Clear {label} value'),
27
27
  defaultValues: _reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.instanceOf(Date)).description('An array of two `Date` values indicating the start and the end of the range that should be selected by default.'),
28
+ containerSelector: _reactDesc.PropTypes.string.description("A CSS selector to the element where the SelectDateRange should be rendered in, or \"parent\" to render the SelectDateRange in-place.").defaultValue('body'),
28
29
  onChange: _reactDesc.PropTypes.func.description('Called with an array of two `Date` values indicating the start and the end of the selected range when the `apply` button is clicked or with `undefined` when the value is cleared'),
29
30
  onHide: _reactDesc.PropTypes.func.description('A callback which is triggered when the popover is closed'),
30
31
  onShow: _reactDesc.PropTypes.func.description('A callback which is triggered when the popover is opened'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decisiv/ui-components",
3
- "version": "2.0.1-alpha.135+3dc223a",
3
+ "version": "2.0.1-alpha.139+ac10f0c",
4
4
  "description": "Decisiv's design system React components",
5
5
  "author": "Decisiv UI Development Team",
6
6
  "license": "MIT",
@@ -71,5 +71,5 @@
71
71
  "access": "public"
72
72
  },
73
73
  "private": false,
74
- "gitHead": "3dc223ac9ff20224bfb207b121b9e948382a923a"
74
+ "gitHead": "ac10f0cea9f32e6b223eb733c92a9ff4b81efa7e"
75
75
  }