@indico-data/design-system 2.60.8 → 2.60.9

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.
package/lib/index.js CHANGED
@@ -5841,13 +5841,14 @@ const OptionComponent = (_a) => {
5841
5841
  return (jsxRuntime.jsx(ReactSelect.components.Option, Object.assign({}, props, { children: jsxRuntime.jsxs("div", { className: "select__items", children: [jsxRuntime.jsx("div", { className: "select__item-value", children: (_b = props === null || props === void 0 ? void 0 : props.data) === null || _b === void 0 ? void 0 : _b.label }), ((_c = props === null || props === void 0 ? void 0 : props.data) === null || _c === void 0 ? void 0 : _c.detail) && jsxRuntime.jsx("div", { className: "select__item-detail", children: (_d = props === null || props === void 0 ? void 0 : props.data) === null || _d === void 0 ? void 0 : _d.detail })] }) })));
5842
5842
  };
5843
5843
  const Select$1 = (_a) => {
5844
- var { classNamePrefix = 'select', className, components: customComponents } = _a, props = __rest(_a, ["classNamePrefix", "className", "components"]);
5844
+ var { classNamePrefix = 'select', className, components: customComponents, label, hasHiddenLabel, name } = _a, props = __rest(_a, ["classNamePrefix", "className", "components", "label", "hasHiddenLabel", "name"]);
5845
5845
  const defaultComponents = {
5846
5846
  Option: OptionComponent,
5847
5847
  };
5848
5848
  const mergedComponents = Object.assign(Object.assign({}, defaultComponents), customComponents);
5849
5849
  return (jsxRuntime.jsx(ReactSelect__default.default, Object.assign({ classNamePrefix: classNamePrefix, className: classNames('select-wrapper', className), components: mergedComponents }, props)));
5850
5850
  };
5851
+ const LabeledSelect = withLabel(Select$1);
5851
5852
 
5852
5853
  /**
5853
5854
  * The UI elements composing DayPicker. These elements are mapped to
@@ -19117,7 +19118,7 @@ function SingleInputDatePicker(props) {
19117
19118
  }
19118
19119
 
19119
19120
  function InputDateRangePicker(props) {
19120
- const { ariaLabel, className, isDisabled, disableBeforeDate, disableAfterDate, captionLayout, month, id, onSelect, selected, isOpen, inputPlaceholder, inputIconName, toErrorMessage, fromErrorMessage } = props, rest = __rest(props, ["ariaLabel", "className", "isDisabled", "disableBeforeDate", "disableAfterDate", "captionLayout", "month", "id", "onSelect", "selected", "isOpen", "inputPlaceholder", "inputIconName", "toErrorMessage", "fromErrorMessage"]);
19121
+ const { ariaLabel, className, isDisabled, disableBeforeDate, disableAfterDate, captionLayout, month, id, onSelect, selected, isOpen, inputPlaceholder, inputIconName, toErrorMessage, fromErrorMessage, gutterWidth, fromLabel, toLabel } = props, rest = __rest(props, ["ariaLabel", "className", "isDisabled", "disableBeforeDate", "disableAfterDate", "captionLayout", "month", "id", "onSelect", "selected", "isOpen", "inputPlaceholder", "inputIconName", "toErrorMessage", "fromErrorMessage", "gutterWidth", "fromLabel", "toLabel"]);
19121
19122
  const inputId = React.useId();
19122
19123
  // Hold the input values in state
19123
19124
  const [localTextValueFrom, setLocalTextValueFrom] = React.useState((selected === null || selected === void 0 ? void 0 : selected.from) ? formatDateAsString(selected.from) : '');
@@ -19167,7 +19168,7 @@ function InputDateRangePicker(props) {
19167
19168
  setLocalTextValueTo('');
19168
19169
  }
19169
19170
  }, [isOpen]);
19170
- return (jsxRuntime.jsxs(FloatUI, { isOpen: isOpen, ariaLabel: ariaLabel, children: [jsxRuntime.jsxs(Row, { children: [jsxRuntime.jsx(Col, { children: jsxRuntime.jsx(LabeledInput, { id: `${inputId}-from`, value: localTextValueFrom, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, onChange: (e) => handleInputChange(e, 'from'), errorMessage: fromErrorMessage, label: 'From Date', name: 'From Date', "data-testid": "date-picker-from" }) }), jsxRuntime.jsx(Col, { children: jsxRuntime.jsx(LabeledInput, { id: `${inputId}-to`, value: localTextValueTo, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, onChange: (e) => handleInputChange(e, 'to'), errorMessage: toErrorMessage, label: 'To Date', name: 'To Date', "data-testid": "date-picker-to" }) })] }), jsxRuntime.jsx(DatePicker, Object.assign({ captionLayout: captionLayout, month: localMonth, onMonthChange: (date) => setLocalMonth(date), mode: "range", selected: selected, onSelect: handleDayPickerSelect }, rest))] }));
19171
+ return (jsxRuntime.jsxs(FloatUI, { isOpen: isOpen, ariaLabel: ariaLabel, children: [jsxRuntime.jsxs(Row, { gutterWidth: gutterWidth, children: [jsxRuntime.jsx(Col, { children: jsxRuntime.jsx(LabeledInput, { id: `${inputId}-from`, value: localTextValueFrom, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, onChange: (e) => handleInputChange(e, 'from'), errorMessage: fromErrorMessage, label: fromLabel, name: 'From Date', "data-testid": "date-picker-from" }) }), jsxRuntime.jsx(Col, { children: jsxRuntime.jsx(LabeledInput, { id: `${inputId}-to`, value: localTextValueTo, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, onChange: (e) => handleInputChange(e, 'to'), errorMessage: toErrorMessage, label: toLabel, name: 'To Date', "data-testid": "date-picker-to" }) })] }), jsxRuntime.jsx(DatePicker, Object.assign({ captionLayout: captionLayout, month: localMonth, onMonthChange: (date) => setLocalMonth(date), mode: "range", selected: selected, onSelect: handleDayPickerSelect }, rest))] }));
19171
19172
  }
19172
19173
 
19173
19174
  const Form = (_a) => {
@@ -43130,7 +43131,7 @@ exports.PasswordInput = LabeledPasswordInput;
43130
43131
  exports.Pill = Pill;
43131
43132
  exports.RadioInput = Radio;
43132
43133
  exports.Row = Row;
43133
- exports.SelectInput = Select$1;
43134
+ exports.SelectInput = LabeledSelect;
43134
43135
  exports.SingleInputDatePicker = SingleInputDatePicker;
43135
43136
  exports.Skeleton = Skeleton;
43136
43137
  exports.Stepper = Stepper;