@aivenio/aquarium 1.8.0 → 1.8.1

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
@@ -1692,20 +1692,20 @@ var classNames = (...args) => {
1692
1692
  // src/components/Icon/Icon.tsx
1693
1693
  var Icon = React.forwardRef((_a, ref) => {
1694
1694
  var _b = _a, { color, className } = _b, rest = __objRest(_b, ["color", "className"]);
1695
- const classes = classNames(className, color && `text-${color}`);
1695
+ const classes2 = classNames(className, color && `text-${color}`);
1696
1696
  return /* @__PURE__ */ React.createElement(IconifyIconComponent, __spreadValues({
1697
1697
  ref: ref != null ? ref : void 0,
1698
- className: classes !== "" ? classes : void 0
1698
+ className: classes2 !== "" ? classes2 : void 0
1699
1699
  }, rest));
1700
1700
  });
1701
1701
  var InlineIcon = React.forwardRef((_a, ref) => {
1702
1702
  var _b = _a, { color, className } = _b, rest = __objRest(_b, ["color", "className"]);
1703
- const classes = classNames(color && `text-${color}`);
1703
+ const classes2 = classNames(color && `text-${color}`);
1704
1704
  return /* @__PURE__ */ React.createElement("span", {
1705
1705
  className: classNames(tw("children:inline-block inline-flex justify-center items-center"), className)
1706
1706
  }, /* @__PURE__ */ React.createElement(IconifyInlineIconComponent, __spreadValues({
1707
1707
  ref: ref != null ? ref : void 0,
1708
- className: classes !== "" ? classes : void 0
1708
+ className: classes2 !== "" ? classes2 : void 0
1709
1709
  }, rest)));
1710
1710
  });
1711
1711
 
@@ -3757,7 +3757,8 @@ var ActiveCrumb = asCrumb("span", "ActiveCrumb", { isActive: true });
3757
3757
  Breadcrumbs.Crumb = Crumb;
3758
3758
 
3759
3759
  // src/components/Card/Card.tsx
3760
- import React25 from "react";
3760
+ import React25, { useRef as useRef3 } from "react";
3761
+ import { useButton as useButton2 } from "@react-aria/button";
3761
3762
  import omit5 from "lodash/omit";
3762
3763
 
3763
3764
  // src/components/Chip/Chip.tsx
@@ -3992,32 +3993,25 @@ Typography2.SmallTextBold = (_a) => {
3992
3993
 
3993
3994
  // src/common/Card/Card.tsx
3994
3995
  import React23 from "react";
3995
- var Card = (_a) => {
3996
- var _b = _a, {
3997
- disabled,
3998
- fullWidth,
3999
- clickable,
4000
- className,
4001
- children
4002
- } = _b, rest = __objRest(_b, [
4003
- "disabled",
4004
- "fullWidth",
4005
- "clickable",
4006
- "className",
4007
- "children"
4008
- ]);
4009
- return /* @__PURE__ */ React23.createElement("div", __spreadProps(__spreadValues({}, rest), {
4010
- className: classNames(
4011
- tw("border-grey-5 border-[1px] rounded-[2px] relative p-5 flex flex-col gap-5", {
4012
- "w-[280px]": !fullWidth,
4013
- "w-full min-w-[280px]": Boolean(fullWidth),
4014
- "active:bg-grey-5 cursor-pointer hover:border-grey-50 focus:border-info-70": Boolean(clickable && !disabled),
4015
- "bg-grey-0 cursor-not-allowed focus:border-transparent": Boolean(disabled)
4016
- }),
4017
- className
4018
- )
4019
- }), children);
4020
- };
3996
+ import isNumber3 from "lodash/isNumber";
3997
+ var Card = React23.forwardRef(
3998
+ (_a, ref) => {
3999
+ var _b = _a, { disabled, fullWidth, clickable, className, children } = _b, rest = __objRest(_b, ["disabled", "fullWidth", "clickable", "className", "children"]);
4000
+ return /* @__PURE__ */ React23.createElement("div", __spreadProps(__spreadValues({
4001
+ ref
4002
+ }, rest), {
4003
+ className: classNames(
4004
+ tw("border-grey-5 border-[1px] rounded-[2px] relative p-5 flex flex-col gap-5", {
4005
+ "w-[280px]": !fullWidth,
4006
+ "w-full min-w-[280px]": Boolean(fullWidth),
4007
+ "active:bg-grey-5 cursor-pointer hover:border-grey-50 focus:border-info-70": Boolean(clickable && !disabled),
4008
+ "bg-grey-0 cursor-not-allowed focus:border-transparent": Boolean(disabled)
4009
+ }),
4010
+ className
4011
+ )
4012
+ }), children);
4013
+ }
4014
+ );
4021
4015
  var ColorHighlight = (_a) => {
4022
4016
  var _b = _a, { color, className } = _b, rest = __objRest(_b, ["color", "className"]);
4023
4017
  return /* @__PURE__ */ React23.createElement(Box, __spreadProps(__spreadValues({}, rest), {
@@ -4036,16 +4030,15 @@ var ImageContainer = (_a) => {
4036
4030
  )
4037
4031
  }));
4038
4032
  };
4039
- var Image = ({
4040
- image,
4041
- imageAlt,
4042
- fullSize
4043
- }) => /* @__PURE__ */ React23.createElement("img", {
4033
+ var classes = "w-full bg-cover object-cover";
4034
+ var Image = ({ image, imageAlt, fullSize = false, imageHeight }) => /* @__PURE__ */ React23.createElement("img", {
4044
4035
  src: image,
4045
4036
  alt: imageAlt,
4046
- className: tw("w-full bg-cover object-cover h-[174px]", {
4047
- "h-[225px]": Boolean(fullSize)
4048
- })
4037
+ className: tw(classes, {
4038
+ "h-[174px]": !imageHeight && !fullSize,
4039
+ "h-[225px]": !imageHeight && fullSize
4040
+ }),
4041
+ style: { height: isNumber3(imageHeight) ? `${imageHeight}px` : imageHeight }
4049
4042
  });
4050
4043
  var Content = (_a) => {
4051
4044
  var _b = _a, { className, dense } = _b, rest = __objRest(_b, ["className", "dense"]);
@@ -4066,7 +4059,8 @@ Card.Image = Image;
4066
4059
  Card.ColorHiglight = ColorHighlight;
4067
4060
 
4068
4061
  // src/components/Card/Compact.tsx
4069
- import React24 from "react";
4062
+ import React24, { useRef as useRef2 } from "react";
4063
+ import { useButton } from "@react-aria/button";
4070
4064
  import { omit as omit4 } from "lodash";
4071
4065
  var CompactCard = ({
4072
4066
  title,
@@ -4079,38 +4073,42 @@ var CompactCard = ({
4079
4073
  disabled,
4080
4074
  fullWidth,
4081
4075
  children
4082
- }) => /* @__PURE__ */ React24.createElement(Card, {
4083
- onClick: disabled ? void 0 : onClick,
4084
- disabled,
4085
- fullWidth,
4086
- clickable: Boolean(onClick),
4087
- tabIndex: onClick ? 0 : -1
4088
- }, color && /* @__PURE__ */ React24.createElement(Card.ColorHiglight, {
4089
- color
4090
- }), chips.length > 0 && /* @__PURE__ */ React24.createElement(ChipContainer, {
4091
- dense: true
4092
- }, chips.map((chip) => /* @__PURE__ */ React24.createElement(Chip2, {
4093
- key: chip,
4094
- text: chip
4095
- }))), /* @__PURE__ */ React24.createElement(Box, {
4096
- display: "flex",
4097
- gap: "5"
4098
- }, icon && /* @__PURE__ */ React24.createElement(Avatar, {
4099
- image: icon
4100
- }), /* @__PURE__ */ React24.createElement(Card.Content, {
4101
- dense: true
4102
- }, /* @__PURE__ */ React24.createElement(Typography2.SmallStrong, {
4103
- color: "black"
4104
- }, title), /* @__PURE__ */ React24.createElement(Typography2.Caption, {
4105
- color: "grey-70"
4106
- }, children))), (action || link) && /* @__PURE__ */ React24.createElement(Card.Actions, {
4107
- dense: true
4108
- }, action && /* @__PURE__ */ React24.createElement(SecondaryButton, __spreadValues({
4109
- dense: true
4110
- }, omit4(action, "text")), action.text), link && /* @__PURE__ */ React24.createElement(ExternalLinkButton, __spreadValues({
4111
- dense: true,
4112
- kind: "ghost"
4113
- }, omit4(link, "text")), link.text)));
4076
+ }) => {
4077
+ const ref = useRef2(null);
4078
+ const { buttonProps } = useButton({ elementType: "div", onPress: onClick, isDisabled: disabled }, ref);
4079
+ return /* @__PURE__ */ React24.createElement(Card, __spreadProps(__spreadValues({
4080
+ ref,
4081
+ clickable: Boolean(onClick),
4082
+ fullWidth
4083
+ }, onClick ? buttonProps : {}), {
4084
+ disabled
4085
+ }), color && /* @__PURE__ */ React24.createElement(Card.ColorHiglight, {
4086
+ color
4087
+ }), chips.length > 0 && /* @__PURE__ */ React24.createElement(ChipContainer, {
4088
+ dense: true
4089
+ }, chips.map((chip) => /* @__PURE__ */ React24.createElement(Chip2, {
4090
+ key: chip,
4091
+ text: chip
4092
+ }))), /* @__PURE__ */ React24.createElement(Box, {
4093
+ display: "flex",
4094
+ gap: "5"
4095
+ }, icon && /* @__PURE__ */ React24.createElement(Avatar, {
4096
+ image: icon
4097
+ }), /* @__PURE__ */ React24.createElement(Card.Content, {
4098
+ dense: true
4099
+ }, /* @__PURE__ */ React24.createElement(Typography2.SmallStrong, {
4100
+ color: "black"
4101
+ }, title), /* @__PURE__ */ React24.createElement(Typography2.Caption, {
4102
+ color: "grey-70"
4103
+ }, children))), (action || link) && /* @__PURE__ */ React24.createElement(Card.Actions, {
4104
+ dense: true
4105
+ }, action && /* @__PURE__ */ React24.createElement(SecondaryButton, __spreadValues({
4106
+ dense: true
4107
+ }, omit4(action, "text")), action.text), link && /* @__PURE__ */ React24.createElement(ExternalLinkButton, __spreadValues({
4108
+ dense: true,
4109
+ kind: "ghost"
4110
+ }, omit4(link, "text")), link.text)));
4111
+ };
4114
4112
  var CompactSkeleton = ({
4115
4113
  chips = true,
4116
4114
  icon = true,
@@ -4154,6 +4152,7 @@ var Card2 = ({
4154
4152
  icons = [],
4155
4153
  image,
4156
4154
  imageAlt,
4155
+ imageHeight,
4157
4156
  color,
4158
4157
  action,
4159
4158
  link,
@@ -4161,41 +4160,50 @@ var Card2 = ({
4161
4160
  disabled,
4162
4161
  fullWidth,
4163
4162
  children
4164
- }) => /* @__PURE__ */ React25.createElement(Card, {
4165
- onClick: disabled ? void 0 : onClick,
4166
- disabled,
4167
- fullWidth,
4168
- clickable: Boolean(onClick),
4169
- tabIndex: onClick ? 0 : -1
4170
- }, color && /* @__PURE__ */ React25.createElement(Card.ColorHiglight, {
4171
- color
4172
- }), chips.length > 0 && /* @__PURE__ */ React25.createElement(ChipContainer, {
4173
- dense: true
4174
- }, chips.map((chip) => /* @__PURE__ */ React25.createElement(Chip2, {
4175
- key: chip,
4176
- text: chip
4177
- }))), icons.length > 0 && /* @__PURE__ */ React25.createElement(AvatarStack, {
4178
- images: icons
4179
- }), image !== void 0 && /* @__PURE__ */ React25.createElement(CardImage, {
4180
- image,
4181
- imageAlt,
4182
- fullSize: chips.length === 0
4183
- }), /* @__PURE__ */ React25.createElement(Card.Content, null, /* @__PURE__ */ React25.createElement(Typography2.DefaultStrong, {
4184
- color: "black"
4185
- }, title), /* @__PURE__ */ React25.createElement(Typography2.Caption, {
4186
- color: "grey-70"
4187
- }, children || description)), (action || link) && /* @__PURE__ */ React25.createElement(Card.Actions, null, action && /* @__PURE__ */ React25.createElement(SecondaryButton, __spreadValues({
4188
- dense: true
4189
- }, omit5(action, "text")), action.text), link && /* @__PURE__ */ React25.createElement(ExternalLinkButton, __spreadValues({
4190
- dense: true,
4191
- kind: "ghost"
4192
- }, omit5(link, "text")), link.text)));
4163
+ }) => {
4164
+ const ref = useRef3(null);
4165
+ const { buttonProps } = useButton2({ elementType: "div", onPress: onClick, isDisabled: disabled }, ref);
4166
+ return /* @__PURE__ */ React25.createElement(Card, __spreadProps(__spreadValues({
4167
+ ref,
4168
+ clickable: Boolean(onClick),
4169
+ fullWidth
4170
+ }, onClick ? buttonProps : {}), {
4171
+ disabled
4172
+ }), color && /* @__PURE__ */ React25.createElement(Card.ColorHiglight, {
4173
+ color
4174
+ }), chips.length > 0 && /* @__PURE__ */ React25.createElement(ChipContainer, {
4175
+ dense: true
4176
+ }, chips.map((chip) => /* @__PURE__ */ React25.createElement(Chip2, {
4177
+ key: chip,
4178
+ text: chip
4179
+ }))), icons.length > 0 && /* @__PURE__ */ React25.createElement(AvatarStack, {
4180
+ images: icons
4181
+ }), image !== void 0 && (imageHeight ? /* @__PURE__ */ React25.createElement(CardImage, {
4182
+ image,
4183
+ imageAlt,
4184
+ imageHeight
4185
+ }) : /* @__PURE__ */ React25.createElement(CardImage, {
4186
+ image,
4187
+ imageAlt,
4188
+ fullSize: chips.length === 0
4189
+ })), /* @__PURE__ */ React25.createElement(Card.Content, null, /* @__PURE__ */ React25.createElement(Typography2.DefaultStrong, {
4190
+ color: "black"
4191
+ }, title), /* @__PURE__ */ React25.createElement(Typography2.Caption, {
4192
+ color: "grey-70"
4193
+ }, children || description)), (action || link) && /* @__PURE__ */ React25.createElement(Card.Actions, null, action && /* @__PURE__ */ React25.createElement(SecondaryButton, __spreadValues({
4194
+ dense: true
4195
+ }, omit5(action, "text")), action.text), link && /* @__PURE__ */ React25.createElement(ExternalLinkButton, __spreadValues({
4196
+ dense: true,
4197
+ kind: "ghost"
4198
+ }, omit5(link, "text")), link.text)));
4199
+ };
4193
4200
  var CardSkeleton = ({
4194
4201
  chips = true,
4195
4202
  icons = false,
4196
4203
  image = !icons,
4197
4204
  actions = true,
4198
- fullWidth = false
4205
+ fullWidth = false,
4206
+ imageHeight
4199
4207
  }) => /* @__PURE__ */ React25.createElement(Card, {
4200
4208
  fullWidth
4201
4209
  }, chips && /* @__PURE__ */ React25.createElement(ChipContainer, {
@@ -4204,10 +4212,13 @@ var CardSkeleton = ({
4204
4212
  key: idx
4205
4213
  }))), icons && /* @__PURE__ */ React25.createElement(AvatarStack, {
4206
4214
  images: [null]
4207
- }), image && /* @__PURE__ */ React25.createElement(CardImage, {
4215
+ }), image && (imageHeight ? /* @__PURE__ */ React25.createElement(CardImage, {
4216
+ image: null,
4217
+ imageHeight
4218
+ }) : /* @__PURE__ */ React25.createElement(CardImage, {
4208
4219
  image: null,
4209
4220
  fullSize: !chips
4210
- }), /* @__PURE__ */ React25.createElement(Card.Content, null, /* @__PURE__ */ React25.createElement(Skeleton, {
4221
+ })), /* @__PURE__ */ React25.createElement(Card.Content, null, /* @__PURE__ */ React25.createElement(Skeleton, {
4211
4222
  width: 145,
4212
4223
  height: 25
4213
4224
  }), /* @__PURE__ */ React25.createElement(Skeleton, {
@@ -4222,23 +4233,31 @@ var CardSkeleton = ({
4222
4233
  })));
4223
4234
  Card2.Skeleton = CardSkeleton;
4224
4235
  Card2.Compact = CompactCard;
4225
- var CardImage = ({ image, imageAlt, fullSize }) => /* @__PURE__ */ React25.createElement(Card.ImageContainer, {
4236
+ var CardImage = ({ image, imageAlt, imageHeight, fullSize = false }) => /* @__PURE__ */ React25.createElement(Card.ImageContainer, {
4226
4237
  fullSize
4227
- }, image ? /* @__PURE__ */ React25.createElement(Card.Image, {
4238
+ }, image ? imageHeight ? /* @__PURE__ */ React25.createElement(Card.Image, {
4239
+ image,
4240
+ imageAlt,
4241
+ imageHeight
4242
+ }) : /* @__PURE__ */ React25.createElement(Card.Image, {
4228
4243
  image,
4229
4244
  imageAlt,
4230
4245
  fullSize
4231
4246
  }) : /* @__PURE__ */ React25.createElement(CardImage.Skeleton, {
4232
- fullSize
4247
+ fullSize,
4248
+ imageHeight
4233
4249
  }));
4234
- var CardImageSkeleton = ({ fullSize }) => /* @__PURE__ */ React25.createElement(Skeleton, {
4250
+ var CardImageSkeleton = ({ imageHeight, fullSize }) => imageHeight ? /* @__PURE__ */ React25.createElement(Skeleton, {
4251
+ height: imageHeight,
4252
+ width: "100%"
4253
+ }) : /* @__PURE__ */ React25.createElement(Skeleton, {
4235
4254
  height: fullSize ? 225 : 174,
4236
4255
  width: "100%"
4237
4256
  });
4238
4257
  CardImage.Skeleton = CardImageSkeleton;
4239
4258
 
4240
4259
  // src/components/Carousel/Carousel.tsx
4241
- import React26, { useEffect as useEffect3, useLayoutEffect, useRef as useRef2, useState as useState2 } from "react";
4260
+ import React26, { useEffect as useEffect3, useLayoutEffect, useRef as useRef4, useState as useState2 } from "react";
4242
4261
  var import_chevronLeft = __toESM(require_chevronLeft());
4243
4262
  var import_chevronRight = __toESM(require_chevronRight());
4244
4263
  var Carousel = ({
@@ -4247,8 +4266,8 @@ var Carousel = ({
4247
4266
  onPageChange,
4248
4267
  children
4249
4268
  }) => {
4250
- const containerRef = useRef2(null);
4251
- const scrollbarContainerRef = useRef2(null);
4269
+ const containerRef = useRef4(null);
4270
+ const scrollbarContainerRef = useRef4(null);
4252
4271
  const items = React26.Children.toArray(children);
4253
4272
  const [width, setWidth] = useState2(0);
4254
4273
  const [isUpdating, setIsUpdating] = useState2(false);
@@ -4561,7 +4580,7 @@ var FormControl = ({ className, inline, children }) => {
4561
4580
  // src/utils/form/HelperText/HelperText.tsx
4562
4581
  import React34 from "react";
4563
4582
  import classNames3 from "classnames";
4564
- import isNumber3 from "lodash/isNumber";
4583
+ import isNumber4 from "lodash/isNumber";
4565
4584
 
4566
4585
  // src/utils/form/CharCounter/CharCounter.tsx
4567
4586
  import React33 from "react";
@@ -4585,7 +4604,7 @@ var HelperText = ({
4585
4604
  reserveSpaceForError = true
4586
4605
  }) => {
4587
4606
  const hasError = error2 && helperText;
4588
- const hasMaxLength = isNumber3(maxLength) && maxLength > 0;
4607
+ const hasMaxLength = isNumber4(maxLength) && maxLength > 0;
4589
4608
  const showMessage = hasError || hasMaxLength;
4590
4609
  if (!showMessage) {
4591
4610
  return reserveSpaceForError ? /* @__PURE__ */ React34.createElement("p", {
@@ -4609,7 +4628,7 @@ var HelperText = ({
4609
4628
  colStart: "2",
4610
4629
  colEnd: "3",
4611
4630
  display: "flex"
4612
- }, isNumber3(length) && hasMaxLength && /* @__PURE__ */ React34.createElement(CharCounter, {
4631
+ }, isNumber4(length) && hasMaxLength && /* @__PURE__ */ React34.createElement(CharCounter, {
4613
4632
  length,
4614
4633
  maxLength,
4615
4634
  valid: !error2
@@ -4837,7 +4856,7 @@ var ChoiceChip = (_a) => {
4837
4856
  };
4838
4857
 
4839
4858
  // src/components/Combobox/Combobox.tsx
4840
- import React40, { useEffect as useEffect4, useRef as useRef3, useState as useState5 } from "react";
4859
+ import React40, { useEffect as useEffect4, useRef as useRef5, useState as useState5 } from "react";
4841
4860
  import { useOverlayPosition as useOverlayPosition2 } from "@react-aria/overlays";
4842
4861
  import { useCombobox } from "downshift";
4843
4862
  import omit6 from "lodash/omit";
@@ -4966,8 +4985,8 @@ var ComboboxBase = (_a) => {
4966
4985
  "readOnly"
4967
4986
  ]);
4968
4987
  var _a2;
4969
- const targetRef = useRef3(null);
4970
- const overlayRef = useRef3(null);
4988
+ const targetRef = useRef5(null);
4989
+ const overlayRef = useRef5(null);
4971
4990
  const [inputItems, setInputItems] = useState5(options);
4972
4991
  const [hasFocus, setFocus] = useState5(false);
4973
4992
  const updateInputItems = (query) => {
@@ -5078,7 +5097,7 @@ var Combobox = (_a) => {
5078
5097
  "noResults"
5079
5098
  ]);
5080
5099
  var _a2;
5081
- const id = useRef3((_a2 = props.id) != null ? _a2 : `combobox-${uniqueId2()}`);
5100
+ const id = useRef5((_a2 = props.id) != null ? _a2 : `combobox-${uniqueId2()}`);
5082
5101
  const errorMessageId = uniqueId2();
5083
5102
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
5084
5103
  const labelControlProps = getLabelControlProps(props);
@@ -5374,7 +5393,7 @@ var renameProperty = (oldProp, newProp, _a) => {
5374
5393
  // src/utils/table/types.ts
5375
5394
  var toSortDirection = (direction) => direction === "ascending" ? "asc" : direction === "descending" ? "desc" : false;
5376
5395
  var cellProps = (column) => ({
5377
- key: column.headerName,
5396
+ key: column.key || column.headerName,
5378
5397
  align: column.type === "number" || column.type === "action" ? "right" : "left"
5379
5398
  });
5380
5399
 
@@ -5504,10 +5523,12 @@ var DataTable = (_a) => {
5504
5523
  (column) => (column.type === "text" || column.type === "number") && column.sortable ? /* @__PURE__ */ React50.createElement(Table2.SortCell, __spreadValues({
5505
5524
  direction: sort && sort.key === column.field ? sort.direction : "none",
5506
5525
  onClick: () => updateSort(column.field),
5507
- style: { width: column.width }
5508
- }, cellProps(column)), column.headerName) : /* @__PURE__ */ React50.createElement(Table2.Cell, __spreadProps(__spreadValues({}, cellProps(column)), {
5509
- style: { width: column.width }
5510
- }), column.headerName)
5526
+ style: { width: column.width },
5527
+ "aria-label": column.headerInvisible ? column.headerName : void 0
5528
+ }, cellProps(column)), !column.headerInvisible && column.headerName) : /* @__PURE__ */ React50.createElement(Table2.Cell, __spreadProps(__spreadValues({}, cellProps(column)), {
5529
+ style: { width: column.width },
5530
+ "aria-label": column.headerInvisible ? column.headerName : void 0
5531
+ }), !column.headerInvisible && column.headerName)
5511
5532
  )), /* @__PURE__ */ React50.createElement(Table2.Body, null, /* @__PURE__ */ React50.createElement(List, {
5512
5533
  items: sortedRows,
5513
5534
  renderItem: (row, index) => /* @__PURE__ */ React50.createElement(Table2.Row, {
@@ -5735,7 +5756,7 @@ var Divider2 = (_a) => {
5735
5756
  import React55 from "react";
5736
5757
 
5737
5758
  // src/components/Popover/Popover.tsx
5738
- import React54, { useRef as useRef4 } from "react";
5759
+ import React54, { useRef as useRef6 } from "react";
5739
5760
  import { PressResponder, usePress } from "@react-aria/interactions";
5740
5761
  import { useOverlayPosition as useOverlayPosition3, useOverlayTrigger } from "@react-aria/overlays";
5741
5762
  import { mergeProps as mergeProps3 } from "@react-aria/utils";
@@ -5764,8 +5785,8 @@ var Popover2 = (props) => {
5764
5785
  containFocus = false,
5765
5786
  targetRef
5766
5787
  } = props;
5767
- const triggerRef = useRef4(null);
5768
- const overlayRef = useRef4(null);
5788
+ const triggerRef = useRef6(null);
5789
+ const overlayRef = useRef6(null);
5769
5790
  const state = useOverlayTriggerState3(props);
5770
5791
  const {
5771
5792
  overlayProps: popoverProps,
@@ -5843,7 +5864,7 @@ Popover2.Button = PopoverButton;
5843
5864
  var PopoverTriggerWrapper = (_a) => {
5844
5865
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
5845
5866
  var _a2;
5846
- const ref = useRef4(null);
5867
+ const ref = useRef6(null);
5847
5868
  const trigger = React54.Children.only(children);
5848
5869
  const { pressProps } = usePress(__spreadProps(__spreadValues({}, rest), { ref }));
5849
5870
  return React54.cloneElement(trigger, __spreadProps(__spreadValues({
@@ -5978,7 +5999,7 @@ import { useMenuTriggerState } from "@react-stately/menu";
5978
5999
  import { useTreeState } from "@react-stately/tree";
5979
6000
 
5980
6001
  // src/components/Input/Input.tsx
5981
- import React57, { forwardRef, useImperativeHandle, useRef as useRef5, useState as useState6 } from "react";
6002
+ import React57, { forwardRef, useImperativeHandle, useRef as useRef7, useState as useState6 } from "react";
5982
6003
  import omit8 from "lodash/omit";
5983
6004
  import toString from "lodash/toString";
5984
6005
  import uniqueId3 from "lodash/uniqueId";
@@ -6087,7 +6108,7 @@ var Input2 = React57.forwardRef((_a, ref) => {
6087
6108
  var _b = _a, { readOnly = false } = _b, props = __objRest(_b, ["readOnly"]);
6088
6109
  var _a2, _b2, _c;
6089
6110
  const [value, setValue] = useState6((_b2 = (_a2 = props.value) != null ? _a2 : props.defaultValue) != null ? _b2 : "");
6090
- const id = useRef5((_c = props.id) != null ? _c : `input-${uniqueId3()}`);
6111
+ const id = useRef7((_c = props.id) != null ? _c : `input-${uniqueId3()}`);
6091
6112
  const errorMessageId = uniqueId3();
6092
6113
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
6093
6114
  const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
@@ -6660,8 +6681,8 @@ import castArray from "lodash/castArray";
6660
6681
  import omit10 from "lodash/omit";
6661
6682
 
6662
6683
  // src/components/Tabs/Tabs.tsx
6663
- import React68, { useEffect as useEffect5, useLayoutEffect as useLayoutEffect2, useRef as useRef6, useState as useState7 } from "react";
6664
- import isNumber4 from "lodash/isNumber";
6684
+ import React68, { useEffect as useEffect5, useLayoutEffect as useLayoutEffect2, useRef as useRef8, useState as useState7 } from "react";
6685
+ import isNumber5 from "lodash/isNumber";
6665
6686
  import kebabCase from "lodash/kebabCase";
6666
6687
  var import_chevronLeft2 = __toESM(require_chevronLeft());
6667
6688
  var import_chevronRight2 = __toESM(require_chevronRight());
@@ -6754,7 +6775,7 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
6754
6775
  className: tw("inline-flex items-center gap-3")
6755
6776
  }, /* @__PURE__ */ React68.createElement("span", {
6756
6777
  className: tw("whitespace-nowrap")
6757
- }, title), isNumber4(badge) && /* @__PURE__ */ React68.createElement(Typography2, {
6778
+ }, title), isNumber5(badge) && /* @__PURE__ */ React68.createElement(Typography2, {
6758
6779
  htmlTag: "span",
6759
6780
  variant: "small",
6760
6781
  color: selected ? "primary-80" : "grey-5",
@@ -6784,9 +6805,9 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
6784
6805
  const [selected, setSelected] = useState7((_b = (_a = value != null ? value : defaultValue) != null ? _a : firstTabValue) != null ? _b : 0);
6785
6806
  const [leftCaret, showLeftCaret] = useState7(false);
6786
6807
  const [rightCaret, showRightCaret] = useState7(false);
6787
- const parentRef = useRef6(null);
6788
- const containerRef = useRef6(null);
6789
- const tabsRef = useRef6(null);
6808
+ const parentRef = useRef8(null);
6809
+ const containerRef = useRef8(null);
6810
+ const tabsRef = useRef8(null);
6790
6811
  const revealSelectedTab = ({ smooth }) => {
6791
6812
  var _a2, _b2;
6792
6813
  const container = containerRef.current;
@@ -7018,7 +7039,7 @@ var ModalTabs = createTabsComponent(
7018
7039
  );
7019
7040
 
7020
7041
  // src/components/MultiInput/MultiInput.tsx
7021
- import React71, { useEffect as useEffect6, useRef as useRef7, useState as useState8 } from "react";
7042
+ import React71, { useEffect as useEffect6, useRef as useRef9, useState as useState8 } from "react";
7022
7043
  import castArray2 from "lodash/castArray";
7023
7044
  import identity from "lodash/identity";
7024
7045
  import omit11 from "lodash/omit";
@@ -7106,7 +7127,7 @@ var MultiInputBase = (_a) => {
7106
7127
  "valid"
7107
7128
  ]);
7108
7129
  var _a2;
7109
- const inputRef = useRef7(null);
7130
+ const inputRef = useRef9(null);
7110
7131
  const [items, setItems] = useState8((_a2 = value != null ? value : defaultValue) != null ? _a2 : []);
7111
7132
  const [hasFocus, setFocus] = useState8(false);
7112
7133
  const keyCodes = [delimiter !== "enter" ? " " : null, delimiter !== "space" ? "Enter" : null].filter(identity);
@@ -7238,7 +7259,7 @@ var MultiInput = (props) => {
7238
7259
  var _a2;
7239
7260
  setValue((_a2 = props.value) != null ? _a2 : []);
7240
7261
  }, [JSON.stringify(props.value)]);
7241
- const id = useRef7((_e = (_d = props.id) != null ? _d : props.name) != null ? _e : `multiinput-${uniqueId4()}`);
7262
+ const id = useRef9((_e = (_d = props.id) != null ? _d : props.name) != null ? _e : `multiinput-${uniqueId4()}`);
7242
7263
  const errorMessageId = uniqueId4();
7243
7264
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
7244
7265
  const labelControlProps = getLabelControlProps(props);
@@ -7267,9 +7288,10 @@ MultiInput.Skeleton = MultiInputSkeleton;
7267
7288
  MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
7268
7289
 
7269
7290
  // src/components/MultiSelect/MultiSelect.tsx
7270
- import React72, { useRef as useRef8, useState as useState9 } from "react";
7291
+ import React72, { useRef as useRef10, useState as useState9 } from "react";
7271
7292
  import { useOverlayPosition as useOverlayPosition5 } from "@react-aria/overlays";
7272
7293
  import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
7294
+ import isEqual from "lodash/isEqual";
7273
7295
  import isNil from "lodash/isNil";
7274
7296
  import omit12 from "lodash/omit";
7275
7297
  import omitBy from "lodash/omitBy";
@@ -7322,8 +7344,8 @@ var MultiSelectBase = (_a) => {
7322
7344
  "children"
7323
7345
  ]);
7324
7346
  var _a2;
7325
- const targetRef = useRef8(null);
7326
- const overlayRef = useRef8(null);
7347
+ const targetRef = useRef10(null);
7348
+ const overlayRef = useRef10(null);
7327
7349
  const [inputValue, setInputValue] = useState9("");
7328
7350
  const [hasFocus, setFocus] = useState9(false);
7329
7351
  const { selectedItems, addSelectedItem, removeSelectedItem, getDropdownProps, getSelectedItemProps } = useMultipleSelection(
@@ -7357,14 +7379,23 @@ var MultiSelectBase = (_a) => {
7357
7379
  selectedItem: null,
7358
7380
  items: filteredOptions,
7359
7381
  stateReducer: (_, actionChanges) => {
7382
+ var _a3, _b2;
7360
7383
  const { changes, type } = actionChanges;
7361
7384
  switch (type) {
7362
7385
  case useCombobox2.stateChangeTypes.InputKeyDownEnter:
7363
7386
  case useCombobox2.stateChangeTypes.ItemClick: {
7387
+ const selectedItem = (_a3 = changes.selectedItem) != null ? _a3 : changes.inputValue ? createOption == null ? void 0 : createOption(changes.inputValue) : null;
7364
7388
  return __spreadProps(__spreadValues({}, changes), {
7389
+ selectedItem,
7365
7390
  isOpen: !closeOnSelect
7366
7391
  });
7367
7392
  }
7393
+ case useCombobox2.stateChangeTypes.InputBlur: {
7394
+ const selectedItem = (_b2 = changes.selectedItem) != null ? _b2 : changes.inputValue ? createOption == null ? void 0 : createOption(changes.inputValue) : null;
7395
+ return __spreadProps(__spreadValues({}, changes), {
7396
+ selectedItem
7397
+ });
7398
+ }
7368
7399
  }
7369
7400
  return changes;
7370
7401
  },
@@ -7377,8 +7408,8 @@ var MultiSelectBase = (_a) => {
7377
7408
  case useCombobox2.stateChangeTypes.InputKeyDownEnter:
7378
7409
  case useCombobox2.stateChangeTypes.ItemClick:
7379
7410
  case useCombobox2.stateChangeTypes.InputBlur: {
7380
- if (selectedItem && !isOptionDisabled(selectedItem, options.indexOf(selectedItem))) {
7381
- setInputValue("");
7411
+ setInputValue("");
7412
+ if (selectedItem && !isOptionDisabled(selectedItem, options.indexOf(selectedItem)) && !selectedItems.some((val) => isEqual(val, selectedItem))) {
7382
7413
  addSelectedItem(selectedItem);
7383
7414
  }
7384
7415
  break;
@@ -7473,7 +7504,7 @@ var MultiSelect = (_a) => {
7473
7504
  "noResults"
7474
7505
  ]);
7475
7506
  var _a2;
7476
- const id = useRef8((_a2 = props.id) != null ? _a2 : `multiselect-${uniqueId5()}`);
7507
+ const id = useRef10((_a2 = props.id) != null ? _a2 : `multiselect-${uniqueId5()}`);
7477
7508
  const errorMessageId = uniqueId5();
7478
7509
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
7479
7510
  const labelControlProps = getLabelControlProps(props);
@@ -7495,7 +7526,7 @@ MultiSelect.Skeleton = MultiSelectSkeleton;
7495
7526
  MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
7496
7527
 
7497
7528
  // src/components/NativeSelect/NativeSelect.tsx
7498
- import React73, { useRef as useRef9 } from "react";
7529
+ import React73, { useRef as useRef11 } from "react";
7499
7530
  import omit13 from "lodash/omit";
7500
7531
  import uniqueId6 from "lodash/uniqueId";
7501
7532
  var import_caretDown = __toESM(require_caretDown());
@@ -7557,7 +7588,7 @@ var NativeSelect = React73.forwardRef(
7557
7588
  (_a, ref) => {
7558
7589
  var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
7559
7590
  var _a2;
7560
- const id = useRef9((_a2 = props.id) != null ? _a2 : `nativeselect-${uniqueId6()}`);
7591
+ const id = useRef11((_a2 = props.id) != null ? _a2 : `nativeselect-${uniqueId6()}`);
7561
7592
  const errorMessageId = uniqueId6();
7562
7593
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
7563
7594
  const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
@@ -7647,7 +7678,7 @@ import React76 from "react";
7647
7678
  import clamp from "lodash/clamp";
7648
7679
 
7649
7680
  // src/components/Select/Select.tsx
7650
- import React75, { useRef as useRef10, useState as useState10 } from "react";
7681
+ import React75, { useRef as useRef12, useState as useState10 } from "react";
7651
7682
  import { useOverlayPosition as useOverlayPosition6 } from "@react-aria/overlays";
7652
7683
  import { useSelect } from "downshift";
7653
7684
  import defaults from "lodash/defaults";
@@ -7739,8 +7770,8 @@ var _SelectBase = (props) => {
7739
7770
  "labelWrapper"
7740
7771
  ]);
7741
7772
  const [hasFocus, setFocus] = useState10(false);
7742
- const targetRef = useRef10(null);
7743
- const overlayRef = useRef10(null);
7773
+ const targetRef = useRef12(null);
7774
+ const overlayRef = useRef12(null);
7744
7775
  const items = hasOptionGroups(options) ? options.flatMap((g) => g.options) : options;
7745
7776
  const findItemByValue = (val) => {
7746
7777
  if (val === null) {
@@ -7847,7 +7878,7 @@ var Select2 = (_a) => {
7847
7878
  "options"
7848
7879
  ]);
7849
7880
  var _a2;
7850
- const id = useRef10((_a2 = props.id) != null ? _a2 : `select-${uniqueId7()}`);
7881
+ const id = useRef12((_a2 = props.id) != null ? _a2 : `select-${uniqueId7()}`);
7851
7882
  const errorMessageId = uniqueId7();
7852
7883
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
7853
7884
  const labelProps = getLabelControlProps(props);
@@ -8370,12 +8401,12 @@ var SegmentedControlGroup = (_a) => {
8370
8401
  "children",
8371
8402
  "className"
8372
8403
  ]);
8373
- const classes = tw("rounded flex", {
8404
+ const classes2 = tw("rounded flex", {
8374
8405
  "border border-grey-20 text-grey-50": variant === "outlined",
8375
8406
  "bg-grey-0": variant === "raised"
8376
8407
  });
8377
8408
  return /* @__PURE__ */ React85.createElement("div", __spreadProps(__spreadValues({}, rest), {
8378
- className: classNames(classes, className)
8409
+ className: classNames(classes2, className)
8379
8410
  }), React85.Children.map(
8380
8411
  children,
8381
8412
  (child) => React85.cloneElement(child, {
@@ -8685,7 +8716,7 @@ var TagLabel = (_a) => {
8685
8716
  };
8686
8717
 
8687
8718
  // src/components/Textarea/Textarea.tsx
8688
- import React92, { useRef as useRef11, useState as useState12 } from "react";
8719
+ import React92, { useRef as useRef13, useState as useState12 } from "react";
8689
8720
  import omit17 from "lodash/omit";
8690
8721
  import toString2 from "lodash/toString";
8691
8722
  import uniqueId10 from "lodash/uniqueId";
@@ -8706,7 +8737,7 @@ TextareaBase.Skeleton = () => /* @__PURE__ */ React92.createElement(Skeleton, {
8706
8737
  var Textarea = React92.forwardRef((props, ref) => {
8707
8738
  var _a, _b, _c;
8708
8739
  const [value, setValue] = useState12((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
8709
- const id = useRef11((_c = props.id) != null ? _c : `textarea-${uniqueId10()}`);
8740
+ const id = useRef13((_c = props.id) != null ? _c : `textarea-${uniqueId10()}`);
8710
8741
  const errorMessageId = uniqueId10();
8711
8742
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
8712
8743
  const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);