@aivenio/aquarium 1.69.0 → 1.71.0

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
@@ -4512,6 +4512,22 @@ var require_ticket = __commonJS({
4512
4512
  }
4513
4513
  });
4514
4514
 
4515
+ // src/icons/tiered.js
4516
+ var require_tiered = __commonJS({
4517
+ "src/icons/tiered.js"(exports) {
4518
+ "use strict";
4519
+ var data = {
4520
+ "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m20 16.288-8.678 4.11c-.118.056-.177.084-.239.095a.477.477 0 01-.166 0c-.062-.011-.12-.04-.239-.095L2 16.288m0-3.901 4.339 2.055 4.339 2.054c.118.056.177.084.239.095.055.01.111.01.166 0 .062-.01.12-.039.239-.095L20 12.386 17 11M5.7 10C4.209 10 3 8.849 3 7.429c0-1.34 1.075-2.44 2.448-2.56C5.728 3.24 7.212 2 9 2s3.271 1.241 3.552 2.868C13.925 4.99 15 6.09 15 7.428 15 8.849 13.791 10 12.3 10H5.7Z"/>',
4521
+ "left": 0,
4522
+ "top": 0,
4523
+ "width": 22,
4524
+ "height": 22
4525
+ };
4526
+ exports.__esModule = true;
4527
+ exports.default = data;
4528
+ }
4529
+ });
4530
+
4515
4531
  // src/icons/time.js
4516
4532
  var require_time = __commonJS({
4517
4533
  "src/icons/time.js"(exports) {
@@ -4930,7 +4946,7 @@ var InputContainer = React2.forwardRef(
4930
4946
  ref,
4931
4947
  className: classNames(
4932
4948
  className,
4933
- "relative rounded-sm typography-default-strong w-full flex flex-row items-center focus-visible:outline-0 focus-visible:border-info-default",
4949
+ "relative rounded-sm typography-default-strong w-full flex flex-row items-center focus-visible:outline-0 focus-visible:border-info-default group",
4934
4950
  {
4935
4951
  "border px-3 py-[6px]": variant !== "readOnly",
4936
4952
  "cursor-default": variant === "readOnly",
@@ -5474,7 +5490,8 @@ var tailwind_theme_default = {
5474
5490
  "status-info": "var(--aquarium-background-color-status-info)",
5475
5491
  "status-warning": "var(--aquarium-background-color-status-warning)",
5476
5492
  "status-danger": "var(--aquarium-background-color-status-danger)",
5477
- "status-success": "var(--aquarium-background-color-status-success)"
5493
+ "status-success": "var(--aquarium-background-color-status-success)",
5494
+ "icon-button-hover": "rgba(25,25,29,.05)"
5478
5495
  },
5479
5496
  textColor: {
5480
5497
  "error-100": "var(--aquarium-colors-error-100, #aa0000)",
@@ -6433,6 +6450,7 @@ var import_thumbsUp = __toESM(require_thumbsUp());
6433
6450
  var import_tickCircle = __toESM(require_tickCircle());
6434
6451
  var import_tick2 = __toESM(require_tick());
6435
6452
  var import_ticket = __toESM(require_ticket());
6453
+ var import_tiered = __toESM(require_tiered());
6436
6454
  var import_time = __toESM(require_time());
6437
6455
  var import_timelineAreaChart = __toESM(require_timelineAreaChart());
6438
6456
  var import_timelineBarChart = __toESM(require_timelineBarChart());
@@ -7184,7 +7202,7 @@ var asButton = (Component, isDropdownButton) => {
7184
7202
  tw(
7185
7203
  "inline-block border-0 rounded-sm transition whitespace-nowrap focus:outline-none relative text-center",
7186
7204
  {
7187
- "text-default p-2 active:text-default active:bg-transparent hover:text-intense hover:bg-muted focus-visible:text-intense focus-visible:bg-muted disabled:text-inactive disabled:bg-transparent": isIconOnlyButton,
7205
+ "text-default p-2 active:text-default active:bg-transparent hover:text-intense hover:bg-icon-button-hover focus-visible:text-intense focus-visible:bg-muted disabled:text-inactive disabled:bg-transparent": isIconOnlyButton,
7188
7206
  "typography-default-strong": !dense && !isIconOnlyButton && kind !== "text",
7189
7207
  "typography-small-strong": dense && !isIconOnlyButton && kind !== "text",
7190
7208
  "py-3 px-4": !dense && isButton,
@@ -9617,6 +9635,7 @@ var Wrapper = React50.forwardRef(
9617
9635
  );
9618
9636
 
9619
9637
  // src/molecules/Combobox/Combobox.tsx
9638
+ var import_smallCross2 = __toESM(require_smallCross());
9620
9639
  var ComboboxBase = (_a) => {
9621
9640
  var _b = _a, {
9622
9641
  id,
@@ -9689,7 +9708,8 @@ var ComboboxBase = (_a) => {
9689
9708
  highlightedIndex,
9690
9709
  inputValue,
9691
9710
  getItemProps,
9692
- selectedItem
9711
+ selectedItem,
9712
+ selectItem
9693
9713
  } = useCombobox({
9694
9714
  id,
9695
9715
  selectedItem: value,
@@ -9762,10 +9782,25 @@ var ComboboxBase = (_a) => {
9762
9782
  (_a3 = inputProps.onKeyDown) == null ? void 0 : _a3.call(inputProps, e);
9763
9783
  },
9764
9784
  onKeyUp: (e) => e.stopPropagation()
9765
- })), !readOnly && /* @__PURE__ */ React51.createElement(Select.Toggle, __spreadValues({
9785
+ })), !readOnly && /* @__PURE__ */ React51.createElement(Box.Flex, {
9786
+ alignItems: "center",
9787
+ gap: "2"
9788
+ }, !!inputProps.value && !disabled && /* @__PURE__ */ React51.createElement("div", {
9789
+ className: tw("group-hover:opacity-100", {
9790
+ "opacity-0": !hasFocus,
9791
+ "opacity-100": hasFocus
9792
+ })
9793
+ }, /* @__PURE__ */ React51.createElement(Button.Icon, {
9794
+ icon: import_smallCross2.default,
9795
+ onClick: () => selectItem(null),
9796
+ onFocus: () => setFocus(true),
9797
+ onBlur: () => setFocus(false),
9798
+ "aria-label": "Clear selection",
9799
+ dense: true
9800
+ })), /* @__PURE__ */ React51.createElement(Select.Toggle, __spreadValues({
9766
9801
  hasFocus,
9767
9802
  isOpen
9768
- }, getToggleButtonProps({ disabled })))), isOpen && /* @__PURE__ */ React51.createElement(PopoverOverlay, {
9803
+ }, getToggleButtonProps({ disabled }))))), isOpen && /* @__PURE__ */ React51.createElement(PopoverOverlay, {
9769
9804
  ref: popoverRef,
9770
9805
  triggerRef: targetRef,
9771
9806
  state,
@@ -9840,7 +9875,7 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ React52.crea
9840
9875
  }, children);
9841
9876
 
9842
9877
  // src/molecules/DataList/DataList.tsx
9843
- import React72, { useRef as useRef7 } from "react";
9878
+ import React72, { useRef as useRef8 } from "react";
9844
9879
  import { useControlledState } from "@react-stately/utils";
9845
9880
  import castArray2 from "lodash/castArray";
9846
9881
  import compact from "lodash/compact";
@@ -9849,8 +9884,9 @@ import isArray3 from "lodash/isArray";
9849
9884
  import isFunction3 from "lodash/isFunction";
9850
9885
 
9851
9886
  // src/molecules/Accordion/Accordion.tsx
9852
- import React55, { createContext as createContext2, useContext as useContext5, useState as useState6 } from "react";
9887
+ import React55, { createContext as createContext2, useContext as useContext5, useRef as useRef6, useState as useState6 } from "react";
9853
9888
  import { Icon as Icon2 } from "@iconify/react";
9889
+ import { useButton as useButton3 } from "@react-aria/button";
9854
9890
  import { useId as useId6 } from "@react-aria/utils";
9855
9891
  import { animated as animated3, useSpring as useSpring2 } from "@react-spring/web";
9856
9892
  import isUndefined8 from "lodash/isUndefined";
@@ -9950,6 +9986,7 @@ var Accordion = ({ children, openPanelId: panelId }) => {
9950
9986
  };
9951
9987
  var AccordionToggle = (_a) => {
9952
9988
  var _b = _a, { panelId, onChange } = _b, rest = __objRest(_b, ["panelId", "onChange"]);
9989
+ const ref = useRef6(null);
9953
9990
  const id = usePanelContext(panelId);
9954
9991
  const [openPanelId, setOpenPanelId] = useAccordionContext();
9955
9992
  const isOpen = openPanelId === id;
@@ -9962,14 +9999,19 @@ var AccordionToggle = (_a) => {
9962
9999
  duration: 150
9963
10000
  }
9964
10001
  });
9965
- return /* @__PURE__ */ React55.createElement(animated3.div, __spreadProps(__spreadValues({}, rest), {
9966
- role: "button",
9967
- tabIndex: 0,
10002
+ const { buttonProps } = useButton3({ elementType: "div", onPress: handleClick }, ref);
10003
+ return /* @__PURE__ */ React55.createElement(animated3.div, __spreadProps(__spreadValues(__spreadValues({}, rest), __spreadProps(__spreadValues({}, buttonProps), {
10004
+ onPointerDown: (e) => {
10005
+ e.preventDefault();
10006
+ handleClick();
10007
+ }
10008
+ })), {
10009
+ ref,
9968
10010
  "aria-label": "accordion toggle",
9969
10011
  "aria-expanded": openPanelId === id,
9970
10012
  "aria-controls": `${id}-content`,
9971
- onClick: handleClick,
9972
- style: { transform }
10013
+ style: { transform },
10014
+ className: tw("focus:outline-none focusable")
9973
10015
  }), /* @__PURE__ */ React55.createElement(Icon2, {
9974
10016
  icon: import_caretUp.default,
9975
10017
  height: 22,
@@ -10215,7 +10257,7 @@ Input2.Skeleton = () => /* @__PURE__ */ React57.createElement(LabelControl.Skele
10215
10257
  Input2.Skeleton.displayName = "Input.Skeleton";
10216
10258
 
10217
10259
  // src/molecules/Select/Select.tsx
10218
- import React58, { useRef as useRef6, useState as useState8 } from "react";
10260
+ import React58, { useRef as useRef7, useState as useState8 } from "react";
10219
10261
  import { useId as useId8 } from "@react-aria/utils";
10220
10262
  import { useSelect } from "downshift";
10221
10263
  import defaults from "lodash/defaults";
@@ -10306,8 +10348,8 @@ var _SelectBase = (props) => {
10306
10348
  "labelWrapper"
10307
10349
  ]);
10308
10350
  const [hasFocus, setFocus] = useState8(false);
10309
- const targetRef = useRef6(null);
10310
- const menuRef = useRef6(null);
10351
+ const targetRef = useRef7(null);
10352
+ const menuRef = useRef7(null);
10311
10353
  const items = hasOptionGroups(options) ? options.flatMap((g) => g.options) : options;
10312
10354
  const findItemByValue = (val) => {
10313
10355
  if (val === null) {
@@ -11924,7 +11966,7 @@ var DataList2 = (_a) => {
11924
11966
  getRowCheckboxLabel = getDefaultRowCheckboxLabel,
11925
11967
  getGroupCheckboxLabel = getDefaultGroupCheckboxLabel,
11926
11968
  selectedRows,
11927
- defaultSelectedRows,
11969
+ defaultSelectedRows = [],
11928
11970
  onSelectionChange,
11929
11971
  toolbar
11930
11972
  } = _b, rest = __objRest(_b, [
@@ -11958,7 +12000,7 @@ var DataList2 = (_a) => {
11958
12000
  "toolbar"
11959
12001
  ]);
11960
12002
  var _a2, _b2;
11961
- const containerRef = useRef7(null);
12003
+ const containerRef = useRef8(null);
11962
12004
  const hasStickyColumns = columns.some((column) => column.sticky);
11963
12005
  const stickyStyles = useScrollStyles({ containerRef, skip: !hasStickyColumns });
11964
12006
  const [selected, setSelected] = useControlledState(
@@ -12003,7 +12045,9 @@ var DataList2 = (_a) => {
12003
12045
  const allRows = flattenRows(rows);
12004
12046
  const totalSelected = (_b2 = selected == null ? void 0 : selected.length) != null ? _b2 : 0;
12005
12047
  const allEnabledRowIds = compact(
12006
- allRows.map((row, index) => (disabled == null ? void 0 : disabled(row, index, sortedRows)) ? void 0 : row.id)
12048
+ allRows.map(
12049
+ (row, index) => (disabled == null ? void 0 : disabled(row, index, sortedRows)) || (selectionDisabled == null ? void 0 : selectionDisabled(row, index, sortedRows)) ? void 0 : row.id
12050
+ )
12007
12051
  );
12008
12052
  const allRowsSelected = totalSelected >= allEnabledRowIds.length;
12009
12053
  return /* @__PURE__ */ React72.createElement(DataListContext.Provider, {
@@ -12155,7 +12199,7 @@ DataList2.Skeleton = DataListSkeleton;
12155
12199
  DataList2.Toolbar = DataListToolbar;
12156
12200
 
12157
12201
  // src/molecules/DataTable/DataTable.tsx
12158
- import React75, { useRef as useRef8 } from "react";
12202
+ import React75, { useRef as useRef9 } from "react";
12159
12203
  import classNames8 from "classnames";
12160
12204
  import compact2 from "lodash/compact";
12161
12205
  import isFunction4 from "lodash/isFunction";
@@ -12244,7 +12288,7 @@ var DataTable = (_a) => {
12244
12288
  "onPrev"
12245
12289
  ]);
12246
12290
  var _a2;
12247
- const containerRef = useRef8(null);
12291
+ const containerRef = useRef9(null);
12248
12292
  const hasStickyColumns = columns.some((column) => column.sticky);
12249
12293
  const stickyStyles = useScrollStyles({ containerRef, skip: !hasStickyColumns });
12250
12294
  const defaultSortedColumn = columns.find((c) => c.headerName === (defaultSort == null ? void 0 : defaultSort.headerName));
@@ -12614,7 +12658,7 @@ import castArray3 from "lodash/castArray";
12614
12658
  import omit9 from "lodash/omit";
12615
12659
 
12616
12660
  // src/molecules/Tabs/Tabs.tsx
12617
- import React78, { useEffect as useEffect8, useLayoutEffect as useLayoutEffect2, useRef as useRef9, useState as useState11 } from "react";
12661
+ import React78, { useEffect as useEffect8, useLayoutEffect as useLayoutEffect2, useRef as useRef10, useState as useState11 } from "react";
12618
12662
  import isNumber5 from "lodash/isNumber";
12619
12663
  import kebabCase from "lodash/kebabCase";
12620
12664
  var import_chevronLeft4 = __toESM(require_chevronLeft());
@@ -12745,9 +12789,9 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
12745
12789
  const [selected, setSelected] = useState11((_b = (_a = value != null ? value : defaultValue) != null ? _a : firstTabValue) != null ? _b : 0);
12746
12790
  const [leftCaret, showLeftCaret] = useState11(false);
12747
12791
  const [rightCaret, showRightCaret] = useState11(false);
12748
- const parentRef = useRef9(null);
12749
- const containerRef = useRef9(null);
12750
- const tabsRef = useRef9(null);
12792
+ const parentRef = useRef10(null);
12793
+ const containerRef = useRef10(null);
12794
+ const tabsRef = useRef10(null);
12751
12795
  const revealSelectedTab = ({ smooth }) => {
12752
12796
  var _a2, _b2;
12753
12797
  const container = containerRef.current;
@@ -13057,7 +13101,7 @@ var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children,
13057
13101
  import React82 from "react";
13058
13102
 
13059
13103
  // src/molecules/Popover/Popover.tsx
13060
- import React81, { useRef as useRef10 } from "react";
13104
+ import React81, { useRef as useRef11 } from "react";
13061
13105
  import { PressResponder as PressResponder2, usePress as usePress2 } from "@react-aria/interactions";
13062
13106
  import { useOverlayTrigger } from "@react-aria/overlays";
13063
13107
  import { mergeProps as mergeProps3 } from "@react-aria/utils";
@@ -13102,7 +13146,7 @@ var Popover2 = (props) => {
13102
13146
  crossOffset,
13103
13147
  shouldFlip
13104
13148
  } = props;
13105
- const triggerRef = useRef10(null);
13149
+ const triggerRef = useRef11(null);
13106
13150
  const state = useOverlayTriggerState4(props);
13107
13151
  const { triggerProps, overlayProps } = useOverlayTrigger({ type: type != null ? type : "dialog" }, state, triggerRef);
13108
13152
  return /* @__PURE__ */ React81.createElement(PopoverContext.Provider, {
@@ -13162,7 +13206,7 @@ Popover2.Button = PopoverButton;
13162
13206
  var PopoverTriggerWrapper = (_a) => {
13163
13207
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
13164
13208
  var _a2;
13165
- const ref = useRef10(null);
13209
+ const ref = useRef11(null);
13166
13210
  const trigger = React81.Children.only(children);
13167
13211
  const { pressProps } = usePress2(__spreadProps(__spreadValues({}, rest), { ref }));
13168
13212
  return React81.cloneElement(trigger, __spreadProps(__spreadValues({
@@ -13635,7 +13679,7 @@ var ModalTabs = createTabsComponent(
13635
13679
  );
13636
13680
 
13637
13681
  // src/molecules/MultiInput/MultiInput.tsx
13638
- import React93, { useEffect as useEffect9, useRef as useRef11, useState as useState12 } from "react";
13682
+ import React93, { useEffect as useEffect9, useRef as useRef12, useState as useState12 } from "react";
13639
13683
  import { useId as useId12 } from "@react-aria/utils";
13640
13684
  import castArray5 from "lodash/castArray";
13641
13685
  import identity from "lodash/identity";
@@ -13643,7 +13687,7 @@ import omit12 from "lodash/omit";
13643
13687
 
13644
13688
  // src/molecules/MultiInput/InputChip.tsx
13645
13689
  import React92 from "react";
13646
- var import_smallCross2 = __toESM(require_smallCross());
13690
+ var import_smallCross3 = __toESM(require_smallCross());
13647
13691
  var InputChip = React92.forwardRef(
13648
13692
  (_a, ref) => {
13649
13693
  var _b = _a, { invalid = false, disabled, readOnly, className, onClick: _onClick, children } = _b, props = __objRest(_b, ["invalid", "disabled", "readOnly", "className", "onClick", "children"]);
@@ -13675,7 +13719,7 @@ var InputChip = React92.forwardRef(
13675
13719
  role: "button",
13676
13720
  "aria-label": `Remove ${String(children)}`
13677
13721
  }), !disabled && /* @__PURE__ */ React92.createElement(Icon, {
13678
- icon: import_smallCross2.default,
13722
+ icon: import_smallCross3.default,
13679
13723
  className: tw({
13680
13724
  "text-danger-default": invalid,
13681
13725
  "text-default": !invalid
@@ -13732,7 +13776,7 @@ var MultiInputBase = (_a) => {
13732
13776
  "valid"
13733
13777
  ]);
13734
13778
  var _a2;
13735
- const inputRef = useRef11(null);
13779
+ const inputRef = useRef12(null);
13736
13780
  const [items, setItems] = useState12((_a2 = value != null ? value : defaultValue) != null ? _a2 : []);
13737
13781
  const [hasFocus, setFocus] = useState12(false);
13738
13782
  const keyCodes = [delimiter !== "enter" ? " " : null, delimiter !== "space" ? "Enter" : null].filter(identity);
@@ -13897,7 +13941,7 @@ MultiInput.Skeleton = MultiInputSkeleton;
13897
13941
  MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
13898
13942
 
13899
13943
  // src/molecules/MultiSelect/MultiSelect.tsx
13900
- import React94, { useEffect as useEffect10, useRef as useRef12, useState as useState13 } from "react";
13944
+ import React94, { useEffect as useEffect10, useRef as useRef13, useState as useState13 } from "react";
13901
13945
  import { ariaHideOutside as ariaHideOutside2 } from "@react-aria/overlays";
13902
13946
  import { useId as useId13 } from "@react-aria/utils";
13903
13947
  import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
@@ -13963,10 +14007,10 @@ var MultiSelectBase = (_a) => {
13963
14007
  "children"
13964
14008
  ]);
13965
14009
  var _a2;
13966
- const popoverRef = useRef12(null);
13967
- const targetRef = useRef12(null);
13968
- const menuRef = useRef12(null);
13969
- const inputRef = useRef12(null);
14010
+ const popoverRef = useRef13(null);
14011
+ const targetRef = useRef13(null);
14012
+ const menuRef = useRef13(null);
14013
+ const inputRef = useRef13(null);
13970
14014
  const [inputValue, setInputValue] = useState13("");
13971
14015
  const [hasFocus, setFocus] = useState13(false);
13972
14016
  const { selectedItems, addSelectedItem, removeSelectedItem, getDropdownProps, getSelectedItemProps } = useMultipleSelection(
@@ -14766,7 +14810,8 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
14766
14810
  RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
14767
14811
 
14768
14812
  // src/molecules/Section/Section.tsx
14769
- import React110 from "react";
14813
+ import React110, { useRef as useRef14 } from "react";
14814
+ import { useButton as useButton4 } from "@react-aria/button";
14770
14815
  import { useId as useId16 } from "@react-aria/utils";
14771
14816
  import { animated as animated6, useSpring as useSpring5 } from "@react-spring/web";
14772
14817
  import castArray7 from "lodash/castArray";
@@ -14917,20 +14962,27 @@ Section3.Header = (_a) => {
14917
14962
  var _b = _a, { children, className, expanded } = _b, rest = __objRest(_b, ["children", "className", "expanded"]);
14918
14963
  return /* @__PURE__ */ React109.createElement("div", __spreadProps(__spreadValues({}, rest), {
14919
14964
  className: classNames(
14920
- tw("px-6 flex gap-5 justify-between items-center h-[72px]", { "bg-muted": expanded }),
14921
- className
14922
- )
14923
- }), children);
14924
- };
14925
- Section3.TitleContainer = (_a) => {
14926
- var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
14927
- return /* @__PURE__ */ React109.createElement("div", __spreadProps(__spreadValues({}, rest), {
14928
- className: classNames(
14929
- tw("grow grid grid-cols-[auto_1fr] gap-x-3 items-center", { "cursor-pointer": collapsible }),
14965
+ tw("px-6 flex gap-5 justify-between items-center h-[72px]", {
14966
+ "bg-muted": expanded
14967
+ }),
14930
14968
  className
14931
14969
  )
14932
14970
  }), children);
14933
14971
  };
14972
+ Section3.TitleContainer = React109.forwardRef(
14973
+ (_a, ref) => {
14974
+ var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
14975
+ return /* @__PURE__ */ React109.createElement("div", __spreadProps(__spreadValues({}, rest), {
14976
+ ref,
14977
+ className: classNames(
14978
+ tw("grow grid grid-cols-[auto_1fr] gap-x-3 items-center", {
14979
+ "cursor-pointer focus:outline-none focusable": collapsible
14980
+ }),
14981
+ className
14982
+ )
14983
+ }), children);
14984
+ }
14985
+ );
14934
14986
  Section3.Toggle = (props) => /* @__PURE__ */ React109.createElement(Icon, __spreadProps(__spreadValues({}, props), {
14935
14987
  icon: import_caretUp2.default,
14936
14988
  height: 22,
@@ -14976,6 +15028,7 @@ var Section4 = (props) => {
14976
15028
  const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
14977
15029
  const [isCollapsed, setCollapsed] = React110.useState(_collapsed != null ? _collapsed : _defaultCollapsed);
14978
15030
  const [ref, { height }] = useMeasure();
15031
+ const toggleAreaRef = useRef14(null);
14979
15032
  const menu = title ? (_c = props.menu) != null ? _c : void 0 : void 0;
14980
15033
  const menuAriaLabel = title ? (_e = (_d = props.menuAriaLabel) != null ? _d : props.menuLabel) != null ? _e : "Context menu" : void 0;
14981
15034
  const onAction = title ? props.onAction : void 0;
@@ -15009,19 +15062,25 @@ var Section4 = (props) => {
15009
15062
  const regionId = useId16();
15010
15063
  const titleId = useId16();
15011
15064
  const hasTabs = isComponentType(children, Tabs);
15065
+ const { buttonProps } = useButton4(
15066
+ { "elementType": "div", "onPress": handleTitleClick, "aria-expanded": !isCollapsed, "aria-controls": regionId },
15067
+ toggleAreaRef
15068
+ );
15012
15069
  return /* @__PURE__ */ React110.createElement(Section3, {
15013
15070
  "aria-label": title,
15014
15071
  className: "Aquarium-Section"
15015
15072
  }, title && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(Section3.Header, {
15016
15073
  expanded: _collapsible && !isCollapsed
15017
- }, /* @__PURE__ */ React110.createElement(Section3.TitleContainer, {
15018
- role: _collapsible ? "button" : void 0,
15074
+ }, /* @__PURE__ */ React110.createElement(Section3.TitleContainer, __spreadProps(__spreadValues({}, _collapsible ? __spreadProps(__spreadValues({}, buttonProps), {
15075
+ onPointerDown: (e) => {
15076
+ e.preventDefault();
15077
+ handleTitleClick();
15078
+ }
15079
+ }) : { onClick: handleTitleClick }), {
15080
+ ref: _collapsible ? toggleAreaRef : void 0,
15019
15081
  id: toggleId,
15020
- collapsible: _collapsible,
15021
- onClick: handleTitleClick,
15022
- "aria-expanded": _collapsible ? !isCollapsed : void 0,
15023
- "aria-controls": _collapsible ? regionId : void 0
15024
- }, _collapsible && /* @__PURE__ */ React110.createElement(animated6.div, {
15082
+ collapsible: _collapsible
15083
+ }), _collapsible && /* @__PURE__ */ React110.createElement(animated6.div, {
15025
15084
  style: { transform }
15026
15085
  }, /* @__PURE__ */ React110.createElement(Section3.Toggle, null)), /* @__PURE__ */ React110.createElement(Section3.Title, {
15027
15086
  id: titleId
@@ -15044,7 +15103,7 @@ var Section4 = (props) => {
15044
15103
  icon: import_more6.default
15045
15104
  })), menu)), props.actions && castArray7(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */ React110.createElement(Switch2, __spreadValues({}, props.switch)), props.select && /* @__PURE__ */ React110.createElement(SelectBase, __spreadValues({
15046
15105
  "aria-labelledby": titleId
15047
- }, props.select)))), !hasTabs && /* @__PURE__ */ React110.createElement(animated6.div, {
15106
+ }, props.select)))), !hasTabs && !isCollapsed && /* @__PURE__ */ React110.createElement(animated6.div, {
15048
15107
  className: tw(`h-[1px]`),
15049
15108
  style: { backgroundColor }
15050
15109
  })), /* @__PURE__ */ React110.createElement(animated6.div, {
@@ -15068,8 +15127,8 @@ var SegmentedControl = (_a) => {
15068
15127
  var _b = _a, {
15069
15128
  children,
15070
15129
  value,
15071
- dense = false,
15072
- variant = "filled",
15130
+ dense: _dense = false,
15131
+ variant: _variant = "filled",
15073
15132
  selected = false,
15074
15133
  className
15075
15134
  } = _b, rest = __objRest(_b, [
@@ -15083,12 +15142,7 @@ var SegmentedControl = (_a) => {
15083
15142
  return /* @__PURE__ */ React111.createElement("li", null, /* @__PURE__ */ React111.createElement("button", __spreadProps(__spreadValues({
15084
15143
  type: "button"
15085
15144
  }, rest), {
15086
- className: classNames(
15087
- getCommonClassNames(dense, selected),
15088
- !rest.disabled && getHoverClassNames(variant),
15089
- selected && getSelectedClassNames(variant),
15090
- className
15091
- ),
15145
+ className: classNames(getBaseSegmentedControlClassNames(selected), className),
15092
15146
  "aria-pressed": selected
15093
15147
  }), children));
15094
15148
  };
@@ -15096,8 +15150,8 @@ var SegmentedControlGroup = (_a) => {
15096
15150
  var _b = _a, {
15097
15151
  value,
15098
15152
  onChange,
15099
- variant = "filled",
15100
- dense = false,
15153
+ variant: _variant = "filled",
15154
+ dense: _dense = false,
15101
15155
  children,
15102
15156
  className,
15103
15157
  ariaLabel
@@ -15110,49 +15164,28 @@ var SegmentedControlGroup = (_a) => {
15110
15164
  "className",
15111
15165
  "ariaLabel"
15112
15166
  ]);
15113
- const classes2 = tw("rounded flex", {
15114
- "border border-default text-muted": variant === "outlined",
15115
- "bg-muted": variant === "raised"
15116
- });
15117
15167
  return /* @__PURE__ */ React111.createElement("ul", __spreadProps(__spreadValues({}, rest), {
15118
15168
  "aria-label": ariaLabel,
15119
- className: classNames("Aquarium-SegmentedControl", classes2, className)
15169
+ className: classNames(
15170
+ "Aquarium-SegmentedControl",
15171
+ "flex border border-default rounded-sm divide-x divide-grey-20",
15172
+ className
15173
+ )
15120
15174
  }), React111.Children.map(
15121
15175
  children,
15122
15176
  (child) => React111.cloneElement(child, {
15123
- dense,
15124
- variant,
15125
15177
  onClick: () => onChange(child.props.value),
15126
15178
  selected: child.props.value === value
15127
15179
  })
15128
15180
  ));
15129
15181
  };
15130
- var getHoverClassNames = (variant) => tw(
15131
- "hover:text-intense",
15132
- {
15133
- "hover:bg-muted": variant !== "raised",
15134
- "hover:bg-default": variant === "raised"
15135
- },
15136
- {
15137
- "active:bg-default": variant !== "raised",
15138
- "active:bg-intense": variant === "raised"
15139
- }
15140
- );
15141
- var getSelectedClassNames = (variant) => tw("relative z-40 text-intense", {
15142
- "bg-white ring-2 ring-offset-0 ring-grey-30 focus:ring-2": variant === "outlined",
15143
- "bg-white shadow-2dp": variant === "raised",
15144
- "bg-default": variant === "filled"
15145
- });
15146
- var getCommonClassNames = (dense, selected) => tw(
15147
- "transition whitespace-nowrap rounded mr-1",
15148
- "focus:outline-none focus:ring-1 focus:ring-offset-0 focus:ring-grey-60",
15149
- "disabled:cursor-not-allowed disabled:text-inactive",
15182
+ var getBaseSegmentedControlClassNames = (selected) => tw(
15183
+ "transition whitespace-nowrap rounded-sm px-4 py-[10px] hover:bg-primary-hover",
15184
+ "focus-visible:outline-none focus-visible:relative focus-visible:z-50 focus-visible:ring-1 focus-visible:ring-offset-0 focusable",
15185
+ "disabled:cursor-not-allowed disabled:text-inactive disabled:bg-muted",
15150
15186
  {
15151
- "py-4 px-5": !dense,
15152
- "py-2 px-4": dense,
15153
- "typography-default-strong": !dense,
15154
- "typography-small-strong": dense,
15155
- "text-muted": !selected
15187
+ "typography-small text-default bg-body": !selected,
15188
+ "typography-small-strong text-primary-intense relative z-40 ring-1 ring-offset-0 ring-primary-80": selected
15156
15189
  }
15157
15190
  );
15158
15191
 
@@ -70,6 +70,7 @@ const originalTheme = {
70
70
  'status-warning': 'var(--aquarium-colors-warning-5)',
71
71
  'status-danger': 'var(--aquarium-colors-error-5)',
72
72
  'status-success': 'var(--aquarium-colors-success-5)',
73
+ 'icon-button-hover': 'rgba(25,25,29,.05)', // rgb value is from grey-100
73
74
  },
74
75
  textColor: {
75
76
  'inactive': 'var(--aquarium-colors-grey-40)',
@@ -385,7 +385,8 @@
385
385
  "status-info": "var(--aquarium-background-color-status-info)",
386
386
  "status-warning": "var(--aquarium-background-color-status-warning)",
387
387
  "status-danger": "var(--aquarium-background-color-status-danger)",
388
- "status-success": "var(--aquarium-background-color-status-success)"
388
+ "status-success": "var(--aquarium-background-color-status-success)",
389
+ "icon-button-hover": "rgba(25,25,29,.05)"
389
390
  },
390
391
  "textColor": {
391
392
  "error-100": "var(--aquarium-colors-error-100, #aa0000)",