@aivenio/aquarium 6.4.0 → 6.6.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
@@ -393,235 +393,225 @@ var data7 = {
393
393
  };
394
394
  var calendar_default = data7;
395
395
 
396
- // src/icons/caretDownFilled.js
397
- var data8 = {
398
- "body": '<path fill="currentColor" d="M6.386 8.532a.5.5 0 01-.772 0l-3.27-3.964a.5.5 0 01.386-.818h6.54a.5.5 0 01.385.818l-3.27 3.964Z"/>',
399
- "left": 0,
400
- "top": 0,
401
- "width": 12,
402
- "height": 12
403
- };
404
- var caretDownFilled_default = data8;
405
-
406
396
  // src/icons/caretDown.js
407
- var data9 = {
397
+ var data8 = {
408
398
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m5.5 8.25 5.5 5.5 5.5-5.5"/>',
409
399
  "left": 0,
410
400
  "top": 0,
411
401
  "width": 22,
412
402
  "height": 22
413
403
  };
414
- var caretDown_default = data9;
404
+ var caretDown_default = data8;
415
405
 
416
- // src/icons/caretUpFilled.js
417
- var data10 = {
418
- "body": '<path fill="currentColor" d="M5.614 3.468a.5.5 0 01.772 0l3.27 3.964a.5.5 0 01-.386.818H2.73a.5.5 0 01-.385-.818l3.27-3.964Z"/>',
406
+ // src/icons/caretRight.js
407
+ var data9 = {
408
+ "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m8.25 16.5 5.5-5.5-5.5-5.5"/>',
419
409
  "left": 0,
420
410
  "top": 0,
421
- "width": 12,
422
- "height": 12
411
+ "width": 22,
412
+ "height": 22
423
413
  };
424
- var caretUpFilled_default = data10;
414
+ var caretRight_default = data9;
425
415
 
426
416
  // src/icons/caretUp.js
427
- var data11 = {
417
+ var data10 = {
428
418
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16.5 13.75 11 8.25l-5.5 5.5"/>',
429
419
  "left": 0,
430
420
  "top": 0,
431
421
  "width": 22,
432
422
  "height": 22
433
423
  };
434
- var caretUp_default = data11;
424
+ var caretUp_default = data10;
435
425
 
436
426
  // src/icons/chevronBackward.js
437
- var data12 = {
427
+ var data11 = {
438
428
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7 4v14m8-1.25-5.5-5.5 5.5-5.5"/>',
439
429
  "left": 0,
440
430
  "top": 0,
441
431
  "width": 22,
442
432
  "height": 22
443
433
  };
444
- var chevronBackward_default = data12;
434
+ var chevronBackward_default = data11;
445
435
 
446
436
  // src/icons/chevronForward.js
447
- var data13 = {
437
+ var data12 = {
448
438
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15 4v14m-8-1.25 5.5-5.5L7 5.75"/>',
449
439
  "left": 0,
450
440
  "top": 0,
451
441
  "width": 22,
452
442
  "height": 22
453
443
  };
454
- var chevronForward_default = data13;
444
+ var chevronForward_default = data12;
455
445
 
456
446
  // src/icons/chevronLeft.js
457
- var data14 = {
447
+ var data13 = {
458
448
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.75 16.5 8.25 11l5.5-5.5"/>',
459
449
  "left": 0,
460
450
  "top": 0,
461
451
  "width": 22,
462
452
  "height": 22
463
453
  };
464
- var chevronLeft_default = data14;
454
+ var chevronLeft_default = data13;
465
455
 
466
456
  // src/icons/chevronRight.js
467
- var data15 = {
457
+ var data14 = {
468
458
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m8.25 16.5 5.5-5.5-5.5-5.5"/>',
469
459
  "left": 0,
470
460
  "top": 0,
471
461
  "width": 22,
472
462
  "height": 22
473
463
  };
474
- var chevronRight_default = data15;
464
+ var chevronRight_default = data14;
475
465
 
476
466
  // src/icons/confirm.js
477
- var data16 = {
467
+ var data15 = {
478
468
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M20.167 10.162v.843a9.166 9.166 0 11-5.436-8.378m5.436 1.04L11 12.842l-2.75-2.75"/>',
479
469
  "left": 0,
480
470
  "top": 0,
481
471
  "width": 22,
482
472
  "height": 22
483
473
  };
484
- var confirm_default = data16;
474
+ var confirm_default = data15;
485
475
 
486
476
  // src/icons/cross.js
487
- var data17 = {
477
+ var data16 = {
488
478
  "body": '<path fill="currentColor" fill-rule="evenodd" d="m12.293 11 3.932-3.933a.885.885 0 00.275-.65.92.92 0 00-1.568-.651L11 9.707 7.067 5.766a.92.92 0 00-1.302 1.302L9.708 11l-3.932 3.932a.885.885 0 00-.275.651.92.92 0 001.567.651L11 12.292l3.932 3.933a.885.885 0 00.651.275.92.92 0 00.651-1.568L12.292 11Z" clip-rule="evenodd"/>',
489
479
  "left": 0,
490
480
  "top": 0,
491
481
  "width": 22,
492
482
  "height": 22
493
483
  };
494
- var cross_default = data17;
484
+ var cross_default = data16;
495
485
 
496
486
  // src/icons/error.js
497
- var data18 = {
487
+ var data17 = {
498
488
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M11 7.333V11m0 3.667h.01M20.166 11a9.167 9.167 0 11-18.334 0 9.167 9.167 0 0118.334 0Z"/>',
499
489
  "left": 0,
500
490
  "top": 0,
501
491
  "width": 22,
502
492
  "height": 22
503
493
  };
504
- var error_default = data18;
494
+ var error_default = data17;
505
495
 
506
496
  // src/icons/infoSign.js
507
- var data19 = {
497
+ var data18 = {
508
498
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M11 7.333V9m0 7v-4m9.167-1a9.167 9.167 0 11-18.334 0 9.167 9.167 0 0118.334 0Z"/>',
509
499
  "left": 0,
510
500
  "top": 0,
511
501
  "width": 22,
512
502
  "height": 22
513
503
  };
514
- var infoSign_default = data19;
504
+ var infoSign_default = data18;
515
505
 
516
506
  // src/icons/loading.js
517
- var data20 = {
507
+ var data19 = {
518
508
  "body": '<g fill="none" fill-rule="evenodd" stroke="currentColor" stroke-width="3" transform="translate(1 1)"><circle cx="18" cy="18" r="18" stroke-opacity=".5"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" dur="1s" from="0 18 18" repeatCount="indefinite" to="360 18 18" type="rotate"/></path></g>',
519
509
  "left": 0,
520
510
  "top": 0,
521
511
  "width": 38,
522
512
  "height": 38
523
513
  };
524
- var loading_default = data20;
514
+ var loading_default = data19;
525
515
 
526
516
  // src/icons/lock.js
527
- var data21 = {
517
+ var data20 = {
528
518
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.583 9.167V7.333a4.583 4.583 0 10-9.166 0v1.834M11 13.292v1.833M8.067 19.25h5.866c1.54 0 2.31 0 2.899-.3a2.75 2.75 0 001.202-1.201c.3-.589.3-1.359.3-2.899v-1.283c0-1.54 0-2.31-.3-2.899a2.75 2.75 0 00-1.202-1.202c-.588-.3-1.359-.3-2.899-.3H8.067c-1.54 0-2.31 0-2.899.3a2.75 2.75 0 00-1.202 1.202c-.3.588-.3 1.359-.3 2.899v1.283c0 1.54 0 2.31.3 2.899a2.75 2.75 0 001.202 1.201c.588.3 1.359.3 2.899.3Z"/>',
529
519
  "left": 0,
530
520
  "top": 0,
531
521
  "width": 22,
532
522
  "height": 22
533
523
  };
534
- var lock_default = data21;
524
+ var lock_default = data20;
535
525
 
536
526
  // src/icons/minus.js
537
- var data22 = {
527
+ var data21 = {
538
528
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4.583 11h12.834"/>',
539
529
  "left": 0,
540
530
  "top": 0,
541
531
  "width": 22,
542
532
  "height": 22
543
533
  };
544
- var minus_default = data22;
534
+ var minus_default = data21;
545
535
 
546
536
  // src/icons/more.js
547
- var data23 = {
537
+ var data22 = {
548
538
  "body": '<g fill="none"><path fill="currentColor" d="M11 12a1 1 0 100-2 1 1 0 000 2Zm8 0a1 1 0 100-2 1 1 0 000 2ZM3 12a1 1 0 100-2 1 1 0 000 2Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M11 12a1 1 0 100-2 1 1 0 000 2Zm8 0a1 1 0 100-2 1 1 0 000 2ZM3 12a1 1 0 100-2 1 1 0 000 2Z"/></g>',
549
539
  "left": 0,
550
540
  "top": 0,
551
541
  "width": 22,
552
542
  "height": 22
553
543
  };
554
- var more_default = data23;
544
+ var more_default = data22;
555
545
 
556
546
  // src/icons/questionMark.js
557
- var data24 = {
547
+ var data23 = {
558
548
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M8.332 8.25a2.75 2.75 0 015.345.917c0 1.833-2.75 2.75-2.75 2.75M11 16.5s-.004-1.11 0-1.5m9.167-4a9.167 9.167 0 11-18.334 0 9.167 9.167 0 0118.334 0Z"/>',
559
549
  "left": 0,
560
550
  "top": 0,
561
551
  "width": 22,
562
552
  "height": 22
563
553
  };
564
- var questionMark_default = data24;
554
+ var questionMark_default = data23;
565
555
 
566
556
  // src/icons/slash.js
567
- var data25 = {
557
+ var data24 = {
568
558
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m6.417 20.167 9.166-18.334"/>',
569
559
  "left": 0,
570
560
  "top": 0,
571
561
  "width": 22,
572
562
  "height": 22
573
563
  };
574
- var slash_default = data25;
564
+ var slash_default = data24;
575
565
 
576
566
  // src/icons/smallCross.js
577
- var data26 = {
567
+ var data25 = {
578
568
  "body": '<path fill="currentColor" fill-rule="evenodd" d="m12.293 11 3.932-3.933a.885.885 0 00.275-.65.92.92 0 00-1.568-.651L11 9.707 7.067 5.766a.92.92 0 00-1.302 1.302L9.708 11l-3.932 3.932a.885.885 0 00-.275.651.92.92 0 001.567.651L11 12.292l3.932 3.933a.885.885 0 00.651.275.92.92 0 00.651-1.568L12.292 11Z" clip-rule="evenodd"/>',
579
569
  "left": 0,
580
570
  "top": 0,
581
571
  "width": 22,
582
572
  "height": 22
583
573
  };
584
- var smallCross_default = data26;
574
+ var smallCross_default = data25;
585
575
 
586
576
  // src/icons/tickCircle.js
587
- var data27 = {
577
+ var data26 = {
588
578
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m6.875 11 2.75 2.75 5.5-5.5M20.167 11a9.167 9.167 0 11-18.334 0 9.167 9.167 0 0118.334 0Z"/>',
589
579
  "left": 0,
590
580
  "top": 0,
591
581
  "width": 22,
592
582
  "height": 22
593
583
  };
594
- var tickCircle_default = data27;
584
+ var tickCircle_default = data26;
595
585
 
596
586
  // src/icons/time.js
597
- var data28 = {
587
+ var data27 = {
598
588
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M11 5.5V11l3.667 1.833m5.5-1.833a9.167 9.167 0 11-18.334 0 9.167 9.167 0 0118.334 0Z"/>',
599
589
  "left": 0,
600
590
  "top": 0,
601
591
  "width": 22,
602
592
  "height": 22
603
593
  };
604
- var time_default = data28;
594
+ var time_default = data27;
605
595
 
606
596
  // src/icons/upload.js
607
- var data29 = {
597
+ var data28 = {
608
598
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 13.75v1.1c0 1.54 0 2.31-.3 2.899a2.751 2.751 0 01-1.201 1.201c-.589.3-1.359.3-2.899.3h-7.7c-1.54 0-2.31 0-2.898-.3a2.75 2.75 0 01-1.202-1.2c-.3-.589-.3-1.359-.3-2.899v-1.1m12.833-6.417L11 2.75m0 0L6.417 7.333M11 2.75v11"/>',
609
599
  "left": 0,
610
600
  "top": 0,
611
601
  "width": 22,
612
602
  "height": 22
613
603
  };
614
- var upload_default = data29;
604
+ var upload_default = data28;
615
605
 
616
606
  // src/icons/warningSign.js
617
- var data30 = {
607
+ var data29 = {
618
608
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M11 8.25v3.667M11 16l.009-1.5M9.73 3.567 2.191 16.59c-.418.723-.627 1.084-.596 1.38a.917.917 0 00.372.646c.241.176.659.176 1.493.176h15.08c.834 0 1.251 0 1.492-.176a.917.917 0 00.373-.646c.03-.296-.178-.657-.596-1.38l-7.54-13.023c-.417-.72-.625-1.08-.897-1.2a.917.917 0 00-.745 0c-.272.12-.48.48-.897 1.2Z"/>',
619
609
  "left": 0,
620
610
  "top": 0,
621
611
  "width": 22,
622
612
  "height": 22
623
613
  };
624
- var warningSign_default = data30;
614
+ var warningSign_default = data29;
625
615
 
626
616
  // src/utils/useMeasure.ts
627
617
  import React3 from "react";
@@ -1813,7 +1803,7 @@ var tokens_default = {
1813
1803
  }
1814
1804
  },
1815
1805
  code: {
1816
- background: "rgba(250,250,250,1)",
1806
+ background: "rgba(255,255,255,1)",
1817
1807
  text: "rgba(45,46,48,1)",
1818
1808
  variable: "rgba(91,30,103,1)",
1819
1809
  keyword: "rgba(202, 33, 101, 1)",
@@ -2281,7 +2271,7 @@ import React6 from "react";
2281
2271
  import { useFocusWithin } from "@react-aria/interactions";
2282
2272
  import { OverlayContainer, useOverlayPosition } from "@react-aria/overlays";
2283
2273
  import { useTooltip, useTooltipTrigger } from "@react-aria/tooltip";
2284
- import { mergeProps } from "@react-aria/utils";
2274
+ import { isFocusable, mergeProps } from "@react-aria/utils";
2285
2275
 
2286
2276
  // src/molecules/Tooltip/useTooltipTriggerState.ts
2287
2277
  import { useEffect as useEffect2, useMemo, useRef } from "react";
@@ -2417,6 +2407,14 @@ var Tooltip = ({ delay = 200, ...props }) => {
2417
2407
  shouldFlip,
2418
2408
  offset: ARROW_OFFSET
2419
2409
  });
2410
+ const [containsFocusable, setContainsFocusable] = React6.useState(false);
2411
+ React6.useLayoutEffect(() => {
2412
+ if (triggerRef.current) {
2413
+ const elements = Array.from(triggerRef.current.querySelectorAll("*"));
2414
+ const hasFocusable = elements.some((el) => isFocusable(el));
2415
+ setContainsFocusable(hasFocusable);
2416
+ }
2417
+ });
2420
2418
  const { focusWithinProps } = useFocusWithin({
2421
2419
  onFocusWithinChange: (isFocusWithin) => isFocusWithin ? state.open() : state.close()
2422
2420
  });
@@ -2445,6 +2443,7 @@ var Tooltip = ({ delay = 200, ...props }) => {
2445
2443
  {
2446
2444
  className: display,
2447
2445
  ...triggerProps,
2446
+ tabIndex: containsFocusable ? -1 : triggerProps.tabIndex,
2448
2447
  onFocus: (e) => {
2449
2448
  triggerProps.onFocus?.(e);
2450
2449
  focusWithinProps.onFocus?.(e);
@@ -6081,15 +6080,7 @@ Modal.TitleContainer = ({ children, className, ...rest }) => {
6081
6080
  const { titleContainer: titleContainer2 } = modalStyles();
6082
6081
  return /* @__PURE__ */ React59.createElement("div", { ...rest, className: titleContainer2({ className }) }, children);
6083
6082
  };
6084
- var ModalBody = ({
6085
- children,
6086
- className,
6087
- noFooter = false,
6088
- maxHeight,
6089
- style,
6090
- size,
6091
- ...rest
6092
- }) => {
6083
+ var ModalBody = ({ children, className, contentClassName, noFooter = false, maxHeight, style, size, ...rest }) => {
6093
6084
  const { body, bodyContent } = modalStyles({ size });
6094
6085
  const { containerRef, topSentinelRef, bottomSentinelRef, showTopFade, showBottomFade } = useScrollFade();
6095
6086
  return /* @__PURE__ */ React59.createElement(
@@ -6101,7 +6092,7 @@ var ModalBody = ({
6101
6092
  style: { maxHeight, ...style }
6102
6093
  },
6103
6094
  /* @__PURE__ */ React59.createElement("div", { ref: topSentinelRef, "aria-hidden": "true", className: "h-1px" }),
6104
- /* @__PURE__ */ React59.createElement("div", { className: bodyContent({ noFooter }) }, children),
6095
+ /* @__PURE__ */ React59.createElement("div", { className: bodyContent({ noFooter, className: contentClassName }) }, children),
6105
6096
  /* @__PURE__ */ React59.createElement("div", { ref: bottomSentinelRef, "aria-hidden": "true", className: "h-1px -mt-1px" })
6106
6097
  );
6107
6098
  };
@@ -8076,11 +8067,6 @@ var useDataListContext = () => {
8076
8067
  // src/molecules/DataList/DataListGroup.tsx
8077
8068
  import React80 from "react";
8078
8069
  import { isFunction as isFunction2, noop } from "lodash-es";
8079
-
8080
- // src/molecules/DataList/utils.ts
8081
- var flattenRows = (rows) => areRowsGrouped(rows) ? Object.values(rows).flatMap(flattenRows) : rows;
8082
-
8083
- // src/molecules/DataList/DataListGroup.tsx
8084
8070
  var GAP = 8;
8085
8071
  var INDENTATION = 28;
8086
8072
  var sortGroupKeys = (groupKeys) => [...groupKeys].sort((a) => a === "undefined" ? -1 : 1);
@@ -8111,6 +8097,7 @@ var DataListGroup = ({
8111
8097
  rows,
8112
8098
  selectable,
8113
8099
  selectedRows,
8100
+ statsByNode,
8114
8101
  getOnSelectionChangeForId,
8115
8102
  selectionDisabled = () => false,
8116
8103
  getRowSelectionLabel = getDefaultRowSelectionLabel,
@@ -8139,8 +8126,8 @@ var DataListGroup = ({
8139
8126
  items: groups,
8140
8127
  renderItem: (row, index) => {
8141
8128
  const isSelected = selectedRows?.includes(row.id) ?? false;
8142
- const isDisabled = disabled?.(row, index, rows);
8143
- const isSelectionDisabled = selectionDisabled(row, index, rows);
8129
+ const isDisabled = disabled?.(row, index, groups);
8130
+ const isSelectionDisabled = selectionDisabled(row, index, groups);
8144
8131
  const isLastRow = isLastGroup && index === groups.length - 1;
8145
8132
  return /* @__PURE__ */ React80.createElement(
8146
8133
  DataListRow,
@@ -8150,7 +8137,7 @@ var DataListGroup = ({
8150
8137
  row,
8151
8138
  index,
8152
8139
  isLast: isLastRow,
8153
- rows,
8140
+ rows: groups,
8154
8141
  active: selectable && isSelected,
8155
8142
  menu: /* @__PURE__ */ React80.createElement(
8156
8143
  DataListRowMenu,
@@ -8179,7 +8166,7 @@ var DataListGroup = ({
8179
8166
  RadioButton,
8180
8167
  {
8181
8168
  value: row2.id.toString(),
8182
- "aria-label": getRowSelectionLabel(row2, index2, isSelected, rows),
8169
+ "aria-label": getRowSelectionLabel(row2, index2, isSelected, groups),
8183
8170
  onChange: noop,
8184
8171
  checked: isSelected,
8185
8172
  disabled: isDisabled || isSelectionDisabled
@@ -8187,7 +8174,7 @@ var DataListGroup = ({
8187
8174
  ), isMultiSelectionMode && /* @__PURE__ */ React80.createElement(
8188
8175
  Checkbox,
8189
8176
  {
8190
- "aria-label": getRowSelectionLabel(row2, index2, isSelected, rows),
8177
+ "aria-label": getRowSelectionLabel(row2, index2, isSelected, groups),
8191
8178
  onChange: getOnSelectionChangeForId(row2.id),
8192
8179
  checked: isSelected,
8193
8180
  disabled: isDisabled || isSelectionDisabled
@@ -8224,10 +8211,12 @@ var DataListGroup = ({
8224
8211
  );
8225
8212
  }
8226
8213
  const openPanelId = expandedGroupIds ? expandedGroupIds.find((id) => id === key) ?? null : void 0;
8227
- const nestedRowIds = flattenRows(group).map((row) => row.id);
8228
- const nestedSelectedIds = selectedRows?.filter((id) => nestedRowIds.includes(id)) ?? [];
8229
- const allSelected = nestedRowIds.length === nestedSelectedIds.length;
8230
- const isChecked = nestedSelectedIds.length > 0;
8214
+ const { selectableIds, allSelected, isChecked, isDisabled } = statsByNode.get(group) ?? {
8215
+ selectableIds: [],
8216
+ allSelected: false,
8217
+ isChecked: false,
8218
+ isDisabled: true
8219
+ };
8231
8220
  const isActiveRow = !!openPanelId || selectable && isChecked;
8232
8221
  const isLastRow = isLastGroup && index === groupKeys.length - 1 && !openPanelId;
8233
8222
  return /* @__PURE__ */ React80.createElement(Accordion, { key, openPanelId }, hasCustomRowForGroup && /* @__PURE__ */ React80.createElement(DataList.Row, { active: isActiveRow, noDivider: isLastRow }, selectable && /* @__PURE__ */ React80.createElement(DataList.Cell, null, isMultiSelectionMode && /* @__PURE__ */ React80.createElement(
@@ -8236,8 +8225,8 @@ var DataListGroup = ({
8236
8225
  "aria-label": getGroupCheckboxLabel(key, group, index, isChecked, rows),
8237
8226
  checked: isChecked,
8238
8227
  indeterminate: isChecked && !allSelected,
8239
- disabled: group.length === 0,
8240
- onChange: getOnSelectionChangeForId(nestedRowIds)
8228
+ disabled: isDisabled,
8229
+ onChange: getOnSelectionChangeForId(selectableIds)
8241
8230
  }
8242
8231
  )), /* @__PURE__ */ React80.createElement(
8243
8232
  List,
@@ -8271,8 +8260,8 @@ var DataListGroup = ({
8271
8260
  "aria-label": getGroupCheckboxLabel(key, group, index, isChecked, rows),
8272
8261
  checked: isChecked,
8273
8262
  indeterminate: isChecked && !allSelected,
8274
- disabled: group.length === 0,
8275
- onChange: getOnSelectionChangeForId(nestedRowIds)
8263
+ disabled: isDisabled,
8264
+ onChange: getOnSelectionChangeForId(selectableIds)
8276
8265
  }
8277
8266
  )), /* @__PURE__ */ React80.createElement(
8278
8267
  DataList.Cell,
@@ -8410,6 +8399,7 @@ var DataList2 = ({
8410
8399
  const [sort, updateSort] = useTableSort({ ...initialSortState, onSortChanged });
8411
8400
  const sortedRows = isArray2(rows) ? sortRowsBy(rows, sort) : [];
8412
8401
  const groups = areRowsGrouped(rows) ? rows : group ? isFunction3(group) ? group(sortedRows) : groupBy2(sortedRows, group) : void 0;
8402
+ const rootNode = groups ?? sortedRows;
8413
8403
  const isCollapsible = isFunction3(rowDetails);
8414
8404
  const templateColumns = compact([
8415
8405
  selectable ? "fit-content(28px)" : void 0,
@@ -8432,26 +8422,37 @@ var DataList2 = ({
8432
8422
  }
8433
8423
  };
8434
8424
  const isMultiSelectionMode = selectable === "multiple" || selectable === "multiple-not-all";
8435
- const allRows = flattenRows(rows);
8436
- const totalSelected = selected?.length ?? 0;
8437
- const allEnabledRowIds = compact(
8438
- allRows.map(
8439
- (row, index) => disabled?.(row, index, sortedRows) || selectionDisabled(row, index, sortedRows) ? void 0 : row.id
8440
- )
8441
- );
8442
- const allRowsSelected = totalSelected >= allEnabledRowIds.length;
8425
+ const selectedIds = new Set(selected);
8426
+ const buildSelectionStats = (root) => {
8427
+ const statsByNode2 = /* @__PURE__ */ new Map();
8428
+ const recordStats = (node) => {
8429
+ const selectableIds2 = areRowsGrouped(node) ? Object.values(node).flatMap((child) => recordStats(child).selectableIds) : node.filter((row, i) => !disabled?.(row, i, node) && !selectionDisabled(row, i, node)).map((row) => row.id);
8430
+ const selectedSelectableCount = selectableIds2.filter((id) => selectedIds.has(id)).length;
8431
+ const stats = {
8432
+ selectableIds: selectableIds2,
8433
+ selectedSelectableCount,
8434
+ allSelected: selectableIds2.length > 0 && selectedSelectableCount === selectableIds2.length,
8435
+ isChecked: selectedSelectableCount > 0,
8436
+ isDisabled: selectableIds2.length === 0
8437
+ };
8438
+ statsByNode2.set(node, stats);
8439
+ return stats;
8440
+ };
8441
+ return { statsByNode: statsByNode2, rootStats: recordStats(root) };
8442
+ };
8443
+ const { statsByNode, rootStats } = buildSelectionStats(rootNode);
8444
+ const { selectableIds, isChecked, allSelected, isDisabled } = rootStats;
8443
8445
  const componentContent = /* @__PURE__ */ React83.createElement(Template, { className: "Aquarium-DataList", columns: templateColumns, role: "table", "aria-label": ariaLabel }, !hideHeader && /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement(DataList.Row, { header: true }, selectable && /* @__PURE__ */ React83.createElement(DataList.HeadCell, { align: "left", sticky }, selectable === "multiple" && /* @__PURE__ */ React83.createElement(
8444
8446
  Checkbox,
8445
8447
  {
8446
8448
  "aria-label": "Select all rows",
8447
- indeterminate: totalSelected > 0 && totalSelected < allRows.length,
8448
- checked: totalSelected > 0,
8449
+ indeterminate: isChecked && !allSelected,
8450
+ checked: isChecked,
8451
+ disabled: isDisabled,
8449
8452
  onChange: () => {
8450
- if (!allRowsSelected) {
8451
- setSelected(allEnabledRowIds);
8452
- } else {
8453
- setSelected([]);
8454
- }
8453
+ const enabledSet = new Set(selectableIds);
8454
+ const keptSelection = (selected ?? []).filter((id) => !enabledSet.has(id));
8455
+ setSelected(allSelected ? keptSelection : [...keptSelection, ...selectableIds]);
8455
8456
  }
8456
8457
  }
8457
8458
  )), isCollapsible && /* @__PURE__ */ React83.createElement(DataList.HeadCell, { align: "left", sticky }), columns.map((column) => {
@@ -8496,6 +8497,7 @@ var DataList2 = ({
8496
8497
  getGroupCheckboxLabel,
8497
8498
  rows,
8498
8499
  groups,
8500
+ statsByNode,
8499
8501
  groupKey: void 0,
8500
8502
  level: 0,
8501
8503
  isLastGroup: true
@@ -8510,7 +8512,7 @@ var DataList2 = ({
8510
8512
  const details = rowDetails?.(row, index, sortedRows);
8511
8513
  const isSelected = selected?.includes(row.id) ?? false;
8512
8514
  const isSelectionDisabled = selectionDisabled(row, index, sortedRows);
8513
- const isDisabled = disabled?.(row, index, sortedRows);
8515
+ const isDisabled2 = disabled?.(row, index, sortedRows);
8514
8516
  const openPanelId = expandedGroupIds.find((id) => id === row.id.toString()) || null;
8515
8517
  const isLastRow = index === sortedRows.length - 1;
8516
8518
  const content = /* @__PURE__ */ React83.createElement(
@@ -8533,7 +8535,7 @@ var DataList2 = ({
8533
8535
  onAction,
8534
8536
  onMenuOpenChange,
8535
8537
  menuAriaLabel,
8536
- disabled: isDisabled
8538
+ disabled: isDisabled2
8537
8539
  }
8538
8540
  ),
8539
8541
  disabled,
@@ -8550,7 +8552,7 @@ var DataList2 = ({
8550
8552
  "aria-label": getRowSelectionLabel(row2, index2, isSelected, sortedRows),
8551
8553
  onChange: noop2,
8552
8554
  checked: isSelected,
8553
- disabled: isDisabled || isSelectionDisabled
8555
+ disabled: isDisabled2 || isSelectionDisabled
8554
8556
  }
8555
8557
  ), isMultiSelectionMode && /* @__PURE__ */ React83.createElement(
8556
8558
  Checkbox,
@@ -8558,7 +8560,7 @@ var DataList2 = ({
8558
8560
  "aria-label": getRowSelectionLabel(row2, index2, isSelected, sortedRows),
8559
8561
  onChange: getOnSelectionChangeForId(row2.id),
8560
8562
  checked: isSelected,
8561
- disabled: isDisabled || isSelectionDisabled
8563
+ disabled: isDisabled2 || isSelectionDisabled
8562
8564
  }
8563
8565
  )), rowDetails !== void 0 && /* @__PURE__ */ React83.createElement(DataList.Cell, null, details && /* @__PURE__ */ React83.createElement(Accordion.Toggle, { panelId: row2.id.toString(), onChange: onGroupToggled })));
8564
8566
  },
@@ -11766,7 +11768,7 @@ var Dialog2 = (props) => {
11766
11768
  if (!state.isOpen) {
11767
11769
  return null;
11768
11770
  }
11769
- return /* @__PURE__ */ React96.createElement(Overlay, null, /* @__PURE__ */ React96.createElement(Modal, { className: "Aquarium-Dialog", open: true }, /* @__PURE__ */ React96.createElement(Modal.BackDrop, { ...underlayProps }), /* @__PURE__ */ React96.createElement(Modal.Dialog, { ref, size: "sm", isResponsive: false, ...modalProps }, /* @__PURE__ */ React96.createElement(DialogWrapper, { ...props }))));
11771
+ return /* @__PURE__ */ React96.createElement(Overlay, null, /* @__PURE__ */ React96.createElement(Modal, { className: "Aquarium-Dialog", open: true }, /* @__PURE__ */ React96.createElement(Modal.BackDrop, { ...underlayProps }), /* @__PURE__ */ React96.createElement(Modal.Dialog, { ref, size: "sm", isResponsive: false, className: "sm:max-w-[520px]", ...modalProps }, /* @__PURE__ */ React96.createElement(DialogWrapper, { ...props }))));
11770
11772
  };
11771
11773
  var DialogWrapper = ({
11772
11774
  title,
@@ -11786,7 +11788,7 @@ var DialogWrapper = ({
11786
11788
  },
11787
11789
  ref
11788
11790
  );
11789
- return /* @__PURE__ */ React96.createElement("div", { ref, ...dialogProps, className: "outline-none" }, /* @__PURE__ */ React96.createElement(Modal.Header, { className: "icon-stroke-2" }, /* @__PURE__ */ React96.createElement(Icon, { icon: DIALOG_ICONS_AND_COLORS[type].icon, color: DIALOG_ICONS_AND_COLORS[type].color, fontSize: 20 }), /* @__PURE__ */ React96.createElement(Modal.Title, { id: labelledBy, variant: "large", color: DIALOG_ICONS_AND_COLORS[type].color }, title)), /* @__PURE__ */ React96.createElement(Modal.Body, { id: describedBy }, /* @__PURE__ */ React96.createElement(Typography2.Default, null, children)), /* @__PURE__ */ React96.createElement(Modal.Footer, null, /* @__PURE__ */ React96.createElement(Modal.Actions, { className: "gap-4" }, secondaryAction && /* @__PURE__ */ React96.createElement(Button2.Ghost, { key: secondaryAction.text, ...omit10(secondaryAction, "text") }, secondaryAction.text), /* @__PURE__ */ React96.createElement(Button2.Secondary, { key: primaryAction.text, ...omit10(primaryAction, "text") }, primaryAction.text))));
11791
+ return /* @__PURE__ */ React96.createElement("div", { ref, ...dialogProps, className: "outline-none" }, /* @__PURE__ */ React96.createElement(Modal.Header, { className: "icon-stroke-2 px-6 pr-6" }, /* @__PURE__ */ React96.createElement(Icon, { icon: DIALOG_ICONS_AND_COLORS[type].icon, color: DIALOG_ICONS_AND_COLORS[type].color, fontSize: 20 }), /* @__PURE__ */ React96.createElement(Modal.Title, { id: labelledBy, variant: "large", color: "default" }, title)), /* @__PURE__ */ React96.createElement(Modal.Body, { id: describedBy, contentClassName: "px-6" }, /* @__PURE__ */ React96.createElement(Typography2.Default, null, children)), /* @__PURE__ */ React96.createElement(Modal.Footer, { className: "px-6" }, /* @__PURE__ */ React96.createElement(Modal.Actions, { className: "gap-4" }, secondaryAction && /* @__PURE__ */ React96.createElement(Button2.Ghost, { key: secondaryAction.text, ...omit10(secondaryAction, "text") }, secondaryAction.text), /* @__PURE__ */ React96.createElement(Button2.Secondary, { key: primaryAction.text, ...omit10(primaryAction, "text") }, primaryAction.text))));
11790
11792
  };
11791
11793
 
11792
11794
  // src/molecules/Drawer/Drawer.tsx
@@ -13204,17 +13206,18 @@ var navigationClasses = tv28({
13204
13206
  slots: {
13205
13207
  nav: "bg-body h-full border-r border-muted",
13206
13208
  list: "flex flex-col h-full",
13207
- header: "px-6 py-5",
13209
+ header: "px-6 py-4",
13208
13210
  headerTitle: "uppercase text-muted typography-small",
13209
13211
  headerSubtitle: "text-intense",
13210
13212
  footer: "px-6 py-5 mt-auto",
13211
- sectionContainer: "py-5",
13213
+ sectionContainer: "py-4",
13212
13214
  sectionTitle: "py-2 px-6 text-inactive uppercase cursor-default typography-small",
13213
13215
  sectionList: "flex flex-col",
13214
13216
  divider: "border-t border-muted",
13215
13217
  itemContainer: "",
13216
13218
  itemAnchor: "py-3 px-6 hover:bg-medium cursor-pointer flex gap-4 items-center typography-default focusable",
13217
- submenuContainer: "",
13219
+ // `[&+&]:pt-0` prevents doubled spacing when two submenu containers are adjacent (flex items don't margin-collapse).
13220
+ submenuContainer: "py-3 [&+&]:pt-0",
13218
13221
  submenuAnchor: "py-3 pr-6 pl-3 hover:bg-medium cursor-pointer typography-default focusable flex items-center w-full",
13219
13222
  submenuList: "flex flex-col",
13220
13223
  submenuItem: "pl-[56px]"
@@ -13299,13 +13302,22 @@ var Item5 = ({
13299
13302
  showNotification = false,
13300
13303
  ...rest
13301
13304
  }) => /* @__PURE__ */ React113.createElement(Navigation.Item, { ...rest }, icon && showNotification && /* @__PURE__ */ React113.createElement(Badge.Notification, null, /* @__PURE__ */ React113.createElement(InlineIcon, { icon, width: "20px", height: "20px" })), icon && !showNotification && /* @__PURE__ */ React113.createElement(InlineIcon, { icon, width: "20px", height: "20px" }), children);
13305
+ var DisclosureCaret = ({ open }) => /* @__PURE__ */ React113.createElement(
13306
+ InlineIcon,
13307
+ {
13308
+ icon: caretRight_default,
13309
+ width: "12px",
13310
+ height: "12px",
13311
+ className: clsx35("mr-1 transition-transform duration-200 ease-in-out", open ? "rotate-90" : "rotate-0")
13312
+ }
13313
+ );
13302
13314
  var Submenu2 = ({ children, title, icon, defaultOpen = false }) => {
13303
13315
  const [open, setOpen] = React113.useState(defaultOpen);
13304
13316
  const id = uniqueId2();
13305
13317
  return /* @__PURE__ */ React113.createElement(
13306
13318
  Navigation.Submenu,
13307
13319
  {
13308
- title: /* @__PURE__ */ React113.createElement(React113.Fragment, null, /* @__PURE__ */ React113.createElement(InlineIcon, { icon: open ? caretUpFilled_default : caretDownFilled_default, width: "12px", height: "12px", className: "mr-1" }), /* @__PURE__ */ React113.createElement(Box.Flex, { paddingX: "1", gap: "4" }, icon && /* @__PURE__ */ React113.createElement(InlineIcon, { icon, width: "20px", height: "20px" }), title)),
13320
+ title: /* @__PURE__ */ React113.createElement(React113.Fragment, null, /* @__PURE__ */ React113.createElement(DisclosureCaret, { open }), /* @__PURE__ */ React113.createElement(Box.Flex, { paddingX: "1", gap: "4" }, icon && /* @__PURE__ */ React113.createElement(InlineIcon, { icon, width: "20px", height: "20px" }), title)),
13309
13321
  "aria-expanded": open,
13310
13322
  id,
13311
13323
  onClick: (e) => {
@@ -14359,11 +14371,11 @@ var useSortState = (initialSortState) => React136.useState(initialSortState);
14359
14371
 
14360
14372
  // src/utils/table/useTableSelect.ts
14361
14373
  import React137 from "react";
14362
- var useTableSelect = (data31, { key }) => {
14374
+ var useTableSelect = (data30, { key }) => {
14363
14375
  const [selected, setSelected] = React137.useState([]);
14364
- const allSelected = selected.length === data31.length;
14376
+ const allSelected = selected.length === data30.length;
14365
14377
  const isSelected = (dot) => selected.includes(dot[key]);
14366
- const selectAll = () => setSelected(data31.map((dot) => dot[key]));
14378
+ const selectAll = () => setSelected(data30.map((dot) => dot[key]));
14367
14379
  const selectOnlyOne = (dot) => setSelected([dot[key]]);
14368
14380
  const unselectAll = () => setSelected([]);
14369
14381
  const toggle = (dot) => {
package/dist/tokens.json CHANGED
@@ -187,7 +187,7 @@
187
187
  }
188
188
  },
189
189
  "code": {
190
- "background": "rgba(250,250,250,1)",
190
+ "background": "rgba(255,255,255,1)",
191
191
  "text": "rgba(45,46,48,1)",
192
192
  "variable": "rgba(91,30,103,1)",
193
193
  "keyword": "rgba(202, 33, 101, 1)",