@aivenio/aquarium 1.48.1 → 1.48.2

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/dist/system.mjs CHANGED
@@ -4894,15 +4894,14 @@ var Group = React2.forwardRef((_a, ref) => {
4894
4894
  });
4895
4895
  var Item = React2.forwardRef(
4896
4896
  (_a, ref) => {
4897
- var _b = _a, { highlighted, selected, className, disabled, children } = _b, props = __objRest(_b, ["highlighted", "selected", "className", "disabled", "children"]);
4897
+ var _b = _a, { highlighted, selected, className, children } = _b, props = __objRest(_b, ["highlighted", "selected", "className", "children"]);
4898
4898
  return /* @__PURE__ */ React2.createElement("li", __spreadValues({
4899
4899
  ref,
4900
4900
  className: classNames(className, "flex items-center gap-x-3 p-3 typography-small", {
4901
- "cursor-pointer hover:bg-grey-0": !disabled,
4902
- "cursor-not-allowed opacity-40 grayscale": disabled,
4901
+ "cursor-pointer hover:bg-grey-0": !props["aria-disabled"],
4902
+ "cursor-not-allowed opacity-40 grayscale": props["aria-disabled"],
4903
4903
  "bg-grey-0": highlighted
4904
- }),
4905
- "aria-disabled": disabled || void 0
4904
+ })
4906
4905
  }, props), /* @__PURE__ */ React2.createElement("span", {
4907
4906
  className: tw("grow flex gap-x-3")
4908
4907
  }, children), selected && /* @__PURE__ */ React2.createElement(InlineIcon, {
@@ -9034,6 +9033,7 @@ var ComboboxBase = (_a) => {
9034
9033
  id,
9035
9034
  selectedItem: value,
9036
9035
  defaultSelectedItem: defaultValue,
9036
+ isItemDisabled: (item, index) => isOptionDisabled(item, index),
9037
9037
  itemToString,
9038
9038
  items: inputItems,
9039
9039
  stateReducer: (_, actionChanges) => {
@@ -9076,8 +9076,6 @@ var ComboboxBase = (_a) => {
9076
9076
  ref: targetRef,
9077
9077
  variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
9078
9078
  }, /* @__PURE__ */ React47.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
9079
- id,
9080
- ref: inputRef,
9081
9079
  name,
9082
9080
  placeholder: readOnly ? void 0 : placeholder
9083
9081
  }, inputProps), props), {
@@ -9110,13 +9108,12 @@ var ComboboxBase = (_a) => {
9110
9108
  isNonModal: true,
9111
9109
  style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
9112
9110
  }, /* @__PURE__ */ React47.createElement(Select.Menu, __spreadValues({
9113
- ref: menuRef,
9114
9111
  maxHeight
9115
9112
  }, menuProps), hasNoResults && /* @__PURE__ */ React47.createElement(Select.NoResults, null, emptyState), inputItems.map((item, index) => /* @__PURE__ */ React47.createElement(Select.Item, __spreadValues({
9116
9113
  key: itemToString(item),
9117
9114
  selected: item === selectedItem,
9118
9115
  highlighted: index === highlightedIndex
9119
- }, getItemProps({ item, index, disabled: isOptionDisabled(item, index) })), renderOption(item))))));
9116
+ }, getItemProps({ item, index })), renderOption(item))))));
9120
9117
  };
9121
9118
  var ComboboxBaseSkeleton = () => /* @__PURE__ */ React47.createElement(Skeleton, {
9122
9119
  height: 38
@@ -9774,6 +9771,7 @@ var _SelectBase = (props) => {
9774
9771
  } = useSelect({
9775
9772
  selectedItem: findItemByValue(value),
9776
9773
  defaultSelectedItem: findItemByValue(defaultValue),
9774
+ isItemDisabled: (item, index) => isOptionDisabled(item, index),
9777
9775
  items,
9778
9776
  itemToString,
9779
9777
  onSelectedItemChange: (e) => onChange == null ? void 0 : onChange(e.selectedItem)
@@ -9789,7 +9787,7 @@ var _SelectBase = (props) => {
9789
9787
  item,
9790
9788
  __spreadValues({
9791
9789
  highlighted: index === highlightedIndex
9792
- }, getItemProps({ item, index, disabled: isOptionDisabled(item, index) })),
9790
+ }, getItemProps({ item, index })),
9793
9791
  {
9794
9792
  selectedItem,
9795
9793
  closeMenu,
@@ -9830,7 +9828,6 @@ var _SelectBase = (props) => {
9830
9828
  shouldFlip: true,
9831
9829
  style: { width: (_b = targetRef.current) == null ? void 0 : _b.offsetWidth }
9832
9830
  }, /* @__PURE__ */ React53.createElement(Select.Menu, __spreadValues({
9833
- ref: menuRef,
9834
9831
  maxHeight
9835
9832
  }, menuProps), options.length === 0 && /* @__PURE__ */ React53.createElement(Select.EmptyStateContainer, null, emptyState), options.length > 0 && !hasOptionGroups(options) && options.map(renderItem), options.length > 0 && hasOptionGroups(options) && options.map(renderGroup), actions.length > 0 && /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(Select.Divider, {
9836
9833
  onMouseOver: () => setHighlightedIndex(-1)
@@ -12417,6 +12414,7 @@ var MultiSelectBase = (_a) => {
12417
12414
  id,
12418
12415
  inputValue,
12419
12416
  defaultSelectedItem: defaultValue,
12417
+ isItemDisabled: (item, index) => isOptionDisabled(item, index),
12420
12418
  selectedItem: null,
12421
12419
  items: filteredOptions,
12422
12420
  stateReducer: (_, actionChanges) => {
@@ -12485,7 +12483,9 @@ var MultiSelectBase = (_a) => {
12485
12483
  }), itemToString(selectedItem)));
12486
12484
  };
12487
12485
  const hasNoResults = options.length === 0 || filteredOptions.length === 0;
12488
- const inputProps = getInputProps(getDropdownProps({ ref: inputRef, disabled: disabled || readOnly }));
12486
+ const inputProps = getInputProps(
12487
+ getDropdownProps({ ref: inputRef, disabled: disabled || readOnly, value: inputValue })
12488
+ );
12489
12489
  const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
12490
12490
  return /* @__PURE__ */ React85.createElement("div", {
12491
12491
  className: classNames("Aquarium-MultiSelectBase", tw("relative"))
@@ -12495,11 +12495,8 @@ var MultiSelectBase = (_a) => {
12495
12495
  }, /* @__PURE__ */ React85.createElement("div", {
12496
12496
  className: "grow inline-flex flex-row flex-wrap gap-2"
12497
12497
  }, !hideChips && inline && renderChips(), /* @__PURE__ */ React85.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
12498
- id,
12499
- ref: inputRef,
12500
12498
  name,
12501
- placeholder: selectedItems.length === 0 && !readOnly ? placeholder : "",
12502
- value: inputValue != null ? inputValue : ""
12499
+ placeholder: selectedItems.length === 0 && !readOnly ? placeholder : ""
12503
12500
  }, inputProps), props), {
12504
12501
  disabled,
12505
12502
  readOnly,
@@ -12530,13 +12527,12 @@ var MultiSelectBase = (_a) => {
12530
12527
  isNonModal: true,
12531
12528
  style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
12532
12529
  }, /* @__PURE__ */ React85.createElement(Select.Menu, __spreadValues({
12533
- ref: menuRef,
12534
12530
  maxHeight
12535
12531
  }, menuProps), hasNoResults && /* @__PURE__ */ React85.createElement(Select.NoResults, null, emptyState), filteredOptions.map((item, index) => /* @__PURE__ */ React85.createElement(Select.Item, __spreadValues({
12536
12532
  key: itemToString(item),
12537
12533
  highlighted: index === highlightedIndex,
12538
12534
  selected: selectedItems.includes(item)
12539
- }, getItemProps({ item, index, disabled: isOptionDisabled(item, index) })), renderOption(item))))));
12535
+ }, getItemProps({ item, index })), renderOption(item))))));
12540
12536
  };
12541
12537
  var MultiSelectBaseSkeleton = () => /* @__PURE__ */ React85.createElement(Skeleton, {
12542
12538
  height: 38