@aivenio/aquarium 1.42.0 → 1.44.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/_variables.scss +1 -1
- package/dist/atoms.cjs +537 -283
- package/dist/atoms.mjs +536 -283
- package/dist/charts.cjs +360 -17
- package/dist/charts.mjs +351 -16
- package/dist/src/atoms/Banner/Banner.d.ts +1 -1
- package/dist/src/atoms/Banner/Banner.js +1 -1
- package/dist/src/atoms/Card/Card.d.ts +9 -0
- package/dist/src/atoms/Card/Card.js +18 -1
- package/dist/src/charts/AreaChart/AreaChart.d.ts +12 -0
- package/dist/src/charts/AreaChart/AreaChart.js +46 -0
- package/dist/src/charts/BarChart/BarChart.d.ts +2 -0
- package/dist/src/charts/BarChart/BarChart.js +6 -1
- package/dist/src/charts/Cell/Cell.d.ts +2 -0
- package/dist/src/charts/Cell/Cell.js +2 -0
- package/dist/src/charts/LineChart/LineChart.d.ts +12 -0
- package/dist/src/charts/LineChart/LineChart.js +39 -0
- package/dist/src/charts/PieChart/ChartValue.d.ts +8 -0
- package/dist/src/charts/PieChart/ChartValue.js +10 -0
- package/dist/src/charts/PieChart/DoughnutChart.d.ts +15 -0
- package/dist/src/charts/PieChart/DoughnutChart.js +31 -0
- package/dist/src/charts/PieChart/PieChart.d.ts +13 -0
- package/dist/src/charts/PieChart/PieChart.js +17 -0
- package/dist/src/charts/PieChart/TooltipContentWrapper.d.ts +9 -0
- package/dist/src/charts/PieChart/TooltipContentWrapper.js +31 -0
- package/dist/src/charts/PieChart/renderPieChildren.d.ts +2 -0
- package/dist/src/charts/PieChart/renderPieChildren.js +30 -0
- package/dist/src/charts/PieChart/renderScaledChartValue.d.ts +8 -0
- package/dist/src/charts/PieChart/renderScaledChartValue.js +15 -0
- package/dist/src/charts/Reference/Reference.d.ts +10 -0
- package/dist/src/charts/Reference/Reference.js +9 -0
- package/dist/src/charts/Tooltip/Tooltip.d.ts +6 -3
- package/dist/src/charts/Tooltip/Tooltip.js +19 -7
- package/dist/src/charts/index.d.ts +6 -0
- package/dist/src/charts/index.js +7 -1
- package/dist/src/charts/lib/utils.d.ts +6 -1
- package/dist/src/charts/lib/utils.js +9 -2
- package/dist/src/icons/appUsers.d.ts +9 -0
- package/dist/src/icons/appUsers.js +11 -0
- package/dist/src/icons/deliveryLocation.d.ts +9 -0
- package/dist/src/icons/deliveryLocation.js +11 -0
- package/dist/src/icons/gitDiff.d.ts +9 -0
- package/dist/src/icons/gitDiff.js +11 -0
- package/dist/src/icons/index.d.ts +11 -0
- package/dist/src/icons/index.js +12 -1
- package/dist/src/icons/managedUsers.d.ts +9 -0
- package/dist/src/icons/managedUsers.js +11 -0
- package/dist/src/icons/orgAdmin.d.ts +9 -0
- package/dist/src/icons/orgAdmin.js +11 -0
- package/dist/src/icons/orgUnit.d.ts +9 -0
- package/dist/src/icons/orgUnit.js +11 -0
- package/dist/src/icons/proPlans.d.ts +9 -0
- package/dist/src/icons/proPlans.js +11 -0
- package/dist/src/icons/queriesEditor.d.ts +9 -0
- package/dist/src/icons/queriesEditor.js +11 -0
- package/dist/src/icons/queriesStatistics.d.ts +9 -0
- package/dist/src/icons/queriesStatistics.js +11 -0
- package/dist/src/icons/save.d.ts +9 -0
- package/dist/src/icons/save.js +11 -0
- package/dist/src/icons/tools.d.ts +9 -0
- package/dist/src/icons/tools.js +11 -0
- package/dist/src/molecules/Accordion/Accordion.d.ts +23 -5
- package/dist/src/molecules/Accordion/Accordion.js +41 -17
- package/dist/src/molecules/Alert/Alert.js +7 -6
- package/dist/src/molecules/Box/Box.d.ts +9 -36
- package/dist/src/molecules/Box/Box.js +4 -2
- package/dist/src/molecules/Card/Card.d.ts +4 -2
- package/dist/src/molecules/Card/Card.js +10 -11
- package/dist/src/molecules/Card/Compact.d.ts +3 -2
- package/dist/src/molecules/Card/Compact.js +9 -12
- package/dist/src/molecules/Card/types.d.ts +12 -2
- package/dist/src/molecules/CheckboxGroup/CheckboxGroup.js +3 -3
- package/dist/src/molecules/Combobox/Combobox.js +7 -6
- package/dist/src/molecules/DataList/DataList.d.ts +11 -2
- package/dist/src/molecules/DataList/DataList.js +9 -9
- package/dist/src/molecules/DropdownMenu/DropdownMenu.js +3 -2
- package/dist/src/molecules/Element/Element.d.ts +1 -1
- package/dist/src/molecules/Element/Element.js +1 -1
- package/dist/src/molecules/EmptyState/EmptyState.js +4 -4
- package/dist/src/molecules/Grid/Grid.js +2 -1
- package/dist/src/molecules/Input/Input.js +8 -7
- package/dist/src/molecules/ListItem/ListItem.js +2 -2
- package/dist/src/molecules/MultiInput/MultiInput.js +7 -6
- package/dist/src/molecules/MultiSelect/MultiSelect.js +7 -6
- package/dist/src/molecules/NativeSelect/NativeSelect.js +8 -6
- package/dist/src/molecules/PageHeader/PageHeader.js +3 -3
- package/dist/src/molecules/Popover/PopoverOverlay.d.ts +1 -1
- package/dist/src/molecules/RadioButtonGroup/RadioButtonGroup.js +3 -3
- package/dist/src/molecules/Section/Section.d.ts +10 -3
- package/dist/src/molecules/Section/Section.js +9 -7
- package/dist/src/molecules/Select/Select.js +7 -6
- package/dist/src/molecules/Skeleton/Skeleton.d.ts +1 -1
- package/dist/src/molecules/Skeleton/Skeleton.js +16 -4
- package/dist/src/molecules/Spacing/Spacing.d.ts +1 -1
- package/dist/src/molecules/Spacing/Spacing.js +1 -1
- package/dist/src/molecules/SwitchGroup/SwitchGroup.js +3 -3
- package/dist/src/molecules/Textarea/Textarea.js +8 -7
- package/dist/src/utils/Blueprint.js +3 -5
- package/dist/src/utils/actions.d.ts +8 -1
- package/dist/src/utils/actions.js +3 -3
- package/dist/src/utils/setupTests.js +7 -1
- package/dist/styles.css +64 -14
- package/dist/system.cjs +918 -648
- package/dist/system.mjs +906 -636
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +2 -2
package/dist/system.cjs
CHANGED
@@ -982,6 +982,22 @@ var require_announcement = __commonJS({
|
|
982
982
|
}
|
983
983
|
});
|
984
984
|
|
985
|
+
// src/icons/appUsers.js
|
986
|
+
var require_appUsers = __commonJS({
|
987
|
+
"src/icons/appUsers.js"(exports) {
|
988
|
+
"use strict";
|
989
|
+
var data = {
|
990
|
+
"body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path stroke-width="1.5" d="M11.167 14.458H7.042c-1.28 0-1.92 0-2.44.158a3.667 3.667 0 00-2.444 2.445C2 17.58 2 18.22 2 19.5M13.458 7.125a4.125 4.125 0 11-8.25 0 4.125 4.125 0 018.25 0Z"/><path d="M16.865 17.598a1.1 1.1 0 100-2.2 1.1 1.1 0 000 2.2Z"/><path d="M19.33 17.498a.55.55 0 00.11.606l.02.02a.665.665 0 01-.471 1.139.667.667 0 01-.471-.196l-.02-.02a.55.55 0 00-.607-.11.55.55 0 00-.333.503v.057a.666.666 0 11-1.333 0v-.03a.55.55 0 00-.36-.503.55.55 0 00-.606.11l-.02.02a.665.665 0 01-1.138-.472.667.667 0 01.195-.471l.02-.02a.55.55 0 00.11-.607.55.55 0 00-.503-.333h-.057a.667.667 0 110-1.332h.03a.55.55 0 00.503-.36.551.551 0 00-.11-.607l-.02-.02a.667.667 0 11.943-.942l.02.02a.55.55 0 00.607.11h.027a.55.55 0 00.333-.504V13.5a.667.667 0 011.332 0v.03a.55.55 0 00.334.503.55.55 0 00.606-.11l.02-.02a.667.667 0 11.943.943l-.02.02a.55.55 0 00-.11.606v.027a.55.55 0 00.503.333h.057a.666.666 0 010 1.333h-.03a.55.55 0 00-.503.333Z"/></g>',
|
991
|
+
"left": 0,
|
992
|
+
"top": 0,
|
993
|
+
"width": 22,
|
994
|
+
"height": 22
|
995
|
+
};
|
996
|
+
exports.__esModule = true;
|
997
|
+
exports.default = data;
|
998
|
+
}
|
999
|
+
});
|
1000
|
+
|
985
1001
|
// src/icons/applications.js
|
986
1002
|
var require_applications = __commonJS({
|
987
1003
|
"src/icons/applications.js"(exports) {
|
@@ -1990,6 +2006,22 @@ var require_delete = __commonJS({
|
|
1990
2006
|
}
|
1991
2007
|
});
|
1992
2008
|
|
2009
|
+
// src/icons/deliveryLocation.js
|
2010
|
+
var require_deliveryLocation = __commonJS({
|
2011
|
+
"src/icons/deliveryLocation.js"(exports) {
|
2012
|
+
"use strict";
|
2013
|
+
var data = {
|
2014
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4.75 13.262C3.053 14.012 2 15.054 2 16.209c0 2.279 4.104 4.125 9.167 4.125 5.062 0 9.166-1.846 9.166-4.125 0-1.154-1.053-2.197-2.75-2.945M16.667 7.5c0 3.725-4.125 5.5-5.5 8.25-1.375-2.75-5.5-4.525-5.5-8.25a5.5 5.5 0 0111 0Zm-4.584 0a.917.917 0 11-1.833 0 .917.917 0 011.833 0Z"/>',
|
2015
|
+
"left": 0,
|
2016
|
+
"top": 0,
|
2017
|
+
"width": 22,
|
2018
|
+
"height": 22
|
2019
|
+
};
|
2020
|
+
exports.__esModule = true;
|
2021
|
+
exports.default = data;
|
2022
|
+
}
|
2023
|
+
});
|
2024
|
+
|
1993
2025
|
// src/icons/document.js
|
1994
2026
|
var require_document = __commonJS({
|
1995
2027
|
"src/icons/document.js"(exports) {
|
@@ -2486,6 +2518,22 @@ var require_gitCommit = __commonJS({
|
|
2486
2518
|
}
|
2487
2519
|
});
|
2488
2520
|
|
2521
|
+
// src/icons/gitDiff.js
|
2522
|
+
var require_gitDiff = __commonJS({
|
2523
|
+
"src/icons/gitDiff.js"(exports) {
|
2524
|
+
"use strict";
|
2525
|
+
var data = {
|
2526
|
+
"body": '<path fill="currentColor" fill-rule="evenodd" d="M12.348 7.824a.75.75 0 101.06-1.06l-.991-.992h2.96a1.067 1.067 0 011.067 1.067v5.692a3.477 3.477 0 101.5 0V6.84a2.567 2.567 0 00-2.567-2.567h-2.96l.991-.992a.75.75 0 00-1.06-1.06L10.076 4.49a.75.75 0 000 1.061l2.272 2.272Zm2.87 8.102a1.976 1.976 0 113.952 0 1.976 1.976 0 01-3.952 0Zm-6.327-2.347a.75.75 0 10-1.06 1.06l.991.992H6.294a1.067 1.067 0 01-1.068-1.068V8.871A3.477 3.477 0 004.476 2a3.476 3.476 0 00-.75 6.871v5.692a2.567 2.567 0 002.568 2.568h2.528l-.991.991a.75.75 0 001.06 1.06l2.272-2.27a.75.75 0 000-1.062l-2.272-2.27ZM6.452 5.476a1.976 1.976 0 11-3.952 0 1.976 1.976 0 013.952 0Z" clip-rule="evenodd"/>',
|
2527
|
+
"left": 0,
|
2528
|
+
"top": 0,
|
2529
|
+
"width": 22,
|
2530
|
+
"height": 22
|
2531
|
+
};
|
2532
|
+
exports.__esModule = true;
|
2533
|
+
exports.default = data;
|
2534
|
+
}
|
2535
|
+
});
|
2536
|
+
|
2489
2537
|
// src/icons/gitMerge.js
|
2490
2538
|
var require_gitMerge = __commonJS({
|
2491
2539
|
"src/icons/gitMerge.js"(exports) {
|
@@ -3078,6 +3126,22 @@ var require_logOut = __commonJS({
|
|
3078
3126
|
}
|
3079
3127
|
});
|
3080
3128
|
|
3129
|
+
// src/icons/managedUsers.js
|
3130
|
+
var require_managedUsers = __commonJS({
|
3131
|
+
"src/icons/managedUsers.js"(exports) {
|
3132
|
+
"use strict";
|
3133
|
+
var data = {
|
3134
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M8.417 14.458H7.042c-1.28 0-1.92 0-2.44.158a3.667 3.667 0 00-2.444 2.445C2 17.58 2 18.22 2 19.5M13.458 7.125a4.125 4.125 0 11-8.25 0 4.125 4.125 0 018.25 0ZM10.25 19.5l2.843-.812c.136-.04.204-.059.268-.088a.911.911 0 00.16-.094c.056-.041.106-.091.206-.191l5.919-5.92a1.62 1.62 0 00-2.292-2.29l-5.919 5.918c-.1.1-.15.15-.191.206a.911.911 0 00-.094.16c-.03.064-.049.132-.088.268L10.25 19.5Z"/>',
|
3135
|
+
"left": 0,
|
3136
|
+
"top": 0,
|
3137
|
+
"width": 22,
|
3138
|
+
"height": 22
|
3139
|
+
};
|
3140
|
+
exports.__esModule = true;
|
3141
|
+
exports.default = data;
|
3142
|
+
}
|
3143
|
+
});
|
3144
|
+
|
3081
3145
|
// src/icons/manual.js
|
3082
3146
|
var require_manual = __commonJS({
|
3083
3147
|
"src/icons/manual.js"(exports) {
|
@@ -3382,6 +3446,38 @@ var require_office = __commonJS({
|
|
3382
3446
|
}
|
3383
3447
|
});
|
3384
3448
|
|
3449
|
+
// src/icons/orgAdmin.js
|
3450
|
+
var require_orgAdmin = __commonJS({
|
3451
|
+
"src/icons/orgAdmin.js"(exports) {
|
3452
|
+
"use strict";
|
3453
|
+
var data = {
|
3454
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6.508 3.27a9.167 9.167 0 0113.825 7.988M3.266 6.515A9.124 9.124 0 002 11.167a9.169 9.169 0 006.875 8.877m10.274-4.367a9.186 9.186 0 01-5.69 4.367M13.081 6.01a5.5 5.5 0 00-7.069 7.082m10.31-3.842a5.5 5.5 0 01-7.06 7.08m1.904-6.996V13"/>',
|
3455
|
+
"left": 0,
|
3456
|
+
"top": 0,
|
3457
|
+
"width": 22,
|
3458
|
+
"height": 22
|
3459
|
+
};
|
3460
|
+
exports.__esModule = true;
|
3461
|
+
exports.default = data;
|
3462
|
+
}
|
3463
|
+
});
|
3464
|
+
|
3465
|
+
// src/icons/orgUnit.js
|
3466
|
+
var require_orgUnit = __commonJS({
|
3467
|
+
"src/icons/orgUnit.js"(exports) {
|
3468
|
+
"use strict";
|
3469
|
+
var data = {
|
3470
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M8.708 6.417h4.584m-4.584 3.666h4.584M8.708 13.75h4.584m3.208 5.5V5.683c0-1.026 0-1.54-.2-1.932a1.833 1.833 0 00-.801-.801c-.392-.2-.905-.2-1.932-.2H8.433c-1.026 0-1.54 0-1.932.2a1.833 1.833 0 00-.801.801c-.2.392-.2.906-.2 1.932V19.25m12.833 0H3.667"/>',
|
3471
|
+
"left": 0,
|
3472
|
+
"top": 0,
|
3473
|
+
"width": 22,
|
3474
|
+
"height": 22
|
3475
|
+
};
|
3476
|
+
exports.__esModule = true;
|
3477
|
+
exports.default = data;
|
3478
|
+
}
|
3479
|
+
});
|
3480
|
+
|
3385
3481
|
// src/icons/outdated.js
|
3386
3482
|
var require_outdated = __commonJS({
|
3387
3483
|
"src/icons/outdated.js"(exports) {
|
@@ -3638,6 +3734,22 @@ var require_power = __commonJS({
|
|
3638
3734
|
}
|
3639
3735
|
});
|
3640
3736
|
|
3737
|
+
// src/icons/proPlans.js
|
3738
|
+
var require_proPlans = __commonJS({
|
3739
|
+
"src/icons/proPlans.js"(exports) {
|
3740
|
+
"use strict";
|
3741
|
+
var data = {
|
3742
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4.292 20.333V15.75m0-9.167V2M2 4.292h4.583M2 18.042h4.583m5.5-15.125-1.59 4.133c-.258.672-.387 1.008-.588 1.29a2.75 2.75 0 01-.648.648c-.282.201-.618.33-1.29.589l-4.134 1.59 4.133 1.59c.673.258 1.009.387 1.291.588.25.178.47.397.648.648.2.282.33.618.589 1.29l1.59 4.134 1.589-4.134c.258-.672.388-1.008.589-1.29.178-.25.397-.47.647-.648.283-.2.62-.33 1.291-.589l4.133-1.59L16.2 9.578c-.672-.259-1.008-.388-1.29-.589a2.75 2.75 0 01-.648-.647c-.201-.283-.33-.62-.589-1.291l-1.59-4.133Z"/>',
|
3743
|
+
"left": 0,
|
3744
|
+
"top": 0,
|
3745
|
+
"width": 22,
|
3746
|
+
"height": 22
|
3747
|
+
};
|
3748
|
+
exports.__esModule = true;
|
3749
|
+
exports.default = data;
|
3750
|
+
}
|
3751
|
+
});
|
3752
|
+
|
3641
3753
|
// src/icons/projects.js
|
3642
3754
|
var require_projects = __commonJS({
|
3643
3755
|
"src/icons/projects.js"(exports) {
|
@@ -3718,6 +3830,38 @@ var require_puzzlePiece = __commonJS({
|
|
3718
3830
|
}
|
3719
3831
|
});
|
3720
3832
|
|
3833
|
+
// src/icons/queriesEditor.js
|
3834
|
+
var require_queriesEditor = __commonJS({
|
3835
|
+
"src/icons/queriesEditor.js"(exports) {
|
3836
|
+
"use strict";
|
3837
|
+
var data = {
|
3838
|
+
"body": '<g fill="none"><path fill="currentColor" d="m14 19.992.75.044-.75-.044Zm.281.19.289.693-.289-.692Zm1.877-.783.609.438-.609-.438Zm-.001 0 .289.693-.289-.692Zm-2.04-1.39.609.439-.609-.439Zm0 .003.748.044-.749-.044Zm3.233-4.488.608.439-.608-.439Zm2.042 1.39-.609-.44.609.44Zm-2.65-1.828-3.233 4.485 1.217.877 3.232-4.485-1.216-.877Zm.025 6.751L20 15.352l-1.217-.877-3.233 4.485 1.217.877Zm-3.4-1.868-.115 1.98 1.497.087.116-1.98-1.498-.087Zm1.203 2.906 1.876-.783-.578-1.384-1.876.783.578 1.384Zm-1.318-.927c-.043.736.702 1.183 1.318.927l-.578-1.384a.55.55 0 01.757.545l-1.497-.088Zm2.298-.988a.747.747 0 01.318-.252l.578 1.384a.752.752 0 00.32-.255l-1.216-.877Zm-2.041-1.39a.755.755 0 00-.142.399l1.498.087a.743.743 0 01-.14.392l-1.216-.877Zm6.006-4.973a2.026 2.026 0 00-2.773.489l1.216.877a.526.526 0 01.713-.126l.844-1.24Zm-.844 1.24a.445.445 0 01.112.638l1.217.877a1.945 1.945 0 00-.485-2.755l-.844 1.24Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 4.583c0 1.52-3.694 2.75-8.25 2.75s-8.25-1.23-8.25-2.75m16.5 0c0-1.518-3.694-2.75-8.25-2.75s-8.25 1.232-8.25 2.75m16.5 0V9M2.75 4.583v12.834c0 1.521 3.667 2.75 8.25 2.75M19.25 8.91c0 1.522-3.667 2.75-8.25 2.75s-8.25-1.228-8.25-2.75M11 15.987c-4.583 0-8.25-1.229-8.25-2.75"/></g>',
|
3839
|
+
"left": 0,
|
3840
|
+
"top": 0,
|
3841
|
+
"width": 22,
|
3842
|
+
"height": 22
|
3843
|
+
};
|
3844
|
+
exports.__esModule = true;
|
3845
|
+
exports.default = data;
|
3846
|
+
}
|
3847
|
+
});
|
3848
|
+
|
3849
|
+
// src/icons/queriesStatistics.js
|
3850
|
+
var require_queriesStatistics = __commonJS({
|
3851
|
+
"src/icons/queriesStatistics.js"(exports) {
|
3852
|
+
"use strict";
|
3853
|
+
var data = {
|
3854
|
+
"body": '<path fill="currentColor" fill-rule="evenodd" d="M3.5 4.583c0-.051.03-.22.363-.481.323-.255.838-.517 1.54-.752C6.802 2.884 8.78 2.583 11 2.583c2.22 0 4.199.301 5.596.767.703.235 1.218.497 1.541.752.332.262.363.43.363.481 0 .052-.03.22-.363.482-.323.255-.838.517-1.54.751-1.398.466-3.377.767-5.597.767-2.22 0-4.199-.3-5.596-.767-.703-.234-1.218-.496-1.541-.751-.332-.262-.363-.43-.363-.482ZM17.07 7.24a8.024 8.024 0 001.43-.619v2.29c0 .055-.032.224-.36.484-.321.254-.833.516-1.534.75-1.394.466-3.372.766-5.606.766s-4.212-.3-5.606-.766c-.701-.234-1.213-.496-1.534-.75-.328-.26-.36-.43-.36-.484V6.62c.416.238.901.443 1.43.62 1.587.529 3.734.843 6.07.843 2.336 0 4.483-.314 6.07-.844ZM4.92 11.567a7.978 7.978 0 01-1.419-.615v2.285c0 .044.018.155.193.334.179.183.477.388.917.592.876.407 2.165.741 3.727.924.829.097 1.725.15 2.663.15a.75.75 0 010 1.5c-.994 0-1.948-.056-2.837-.16-1.655-.194-3.115-.556-4.185-1.053a6.391 6.391 0 01-.478-.246v2.139c0 .054.032.223.36.483.321.255.833.517 1.534.75 1.394.466 3.372.767 5.606.767a.75.75 0 010 1.5c-2.35 0-4.496-.314-6.081-.843-.79-.264-1.48-.594-1.99-.998-.502-.398-.929-.953-.929-1.66V4.584c0-.708.431-1.263.934-1.66.511-.402 1.205-.732 1.995-.996 1.588-.53 3.735-.844 6.071-.844s4.483.315 6.07.844c.791.264 1.485.594 1.996.997.503.396.934.951.934 1.66V8.91c0 .706-.427 1.262-.929 1.66-.51.403-1.2.734-1.99.997-1.585.53-3.732.843-6.081.843-2.35 0-4.496-.313-6.081-.843ZM17.45 14.7a.75.75 0 00-1.5 0v5.5a.75.75 0 001.5 0v-5.5Zm-3.45.75a.75.75 0 01.75.75v4a.75.75 0 01-1.5 0v-4a.75.75 0 01.75-.75Zm6.05-2.25a.75.75 0 00-1.5 0v7a.75.75 0 001.5 0v-7Z" clip-rule="evenodd"/>',
|
3855
|
+
"left": 0,
|
3856
|
+
"top": 0,
|
3857
|
+
"width": 22,
|
3858
|
+
"height": 22
|
3859
|
+
};
|
3860
|
+
exports.__esModule = true;
|
3861
|
+
exports.default = data;
|
3862
|
+
}
|
3863
|
+
});
|
3864
|
+
|
3721
3865
|
// src/icons/queries.js
|
3722
3866
|
var require_queries = __commonJS({
|
3723
3867
|
"src/icons/queries.js"(exports) {
|
@@ -3862,6 +4006,22 @@ var require_roadmap = __commonJS({
|
|
3862
4006
|
}
|
3863
4007
|
});
|
3864
4008
|
|
4009
|
+
// src/icons/save.js
|
4010
|
+
var require_save = __commonJS({
|
4011
|
+
"src/icons/save.js"(exports) {
|
4012
|
+
"use strict";
|
4013
|
+
var data = {
|
4014
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6.417 2.75v3.117c0 .513 0 .77.1.966a.917.917 0 00.4.4c.196.1.453.1.966.1h6.234c.513 0 .77 0 .966-.1a.917.917 0 00.4-.4c.1-.196.1-.453.1-.966v-2.2m0 15.583v-5.867c0-.513 0-.77-.1-.966a.917.917 0 00-.4-.4c-.196-.1-.453-.1-.966-.1H7.883c-.513 0-.77 0-.966.1a.917.917 0 00-.4.4c-.1.196-.1.453-.1.966v5.867M19.25 8.548v6.302c0 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-7.7c0-1.54 0-2.31.3-2.898A2.75 2.75 0 014.252 3.05c.588-.3 1.358-.3 2.898-.3h6.302c.448 0 .672 0 .883.05.187.046.366.12.53.22.185.114.344.272.66.59l2.866 2.864c.317.317.476.476.589.66.1.165.174.344.22.53.05.212.05.436.05.884Z"/>',
|
4015
|
+
"left": 0,
|
4016
|
+
"top": 0,
|
4017
|
+
"width": 22,
|
4018
|
+
"height": 22
|
4019
|
+
};
|
4020
|
+
exports.__esModule = true;
|
4021
|
+
exports.default = data;
|
4022
|
+
}
|
4023
|
+
});
|
4024
|
+
|
3865
4025
|
// src/icons/saved.js
|
3866
4026
|
var require_saved = __commonJS({
|
3867
4027
|
"src/icons/saved.js"(exports) {
|
@@ -4310,6 +4470,22 @@ var require_timelineLineChart = __commonJS({
|
|
4310
4470
|
}
|
4311
4471
|
});
|
4312
4472
|
|
4473
|
+
// src/icons/tools.js
|
4474
|
+
var require_tools = __commonJS({
|
4475
|
+
"src/icons/tools.js"(exports) {
|
4476
|
+
"use strict";
|
4477
|
+
var data = {
|
4478
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m5.667 5.667 4.125 4.125M5.667 5.667h-2.75L2 2.917 2.917 2l2.75.917v2.75ZM17.82 2.679l-2.409 2.409c-.363.363-.544.544-.612.754a.916.916 0 000 .566c.068.21.25.391.612.754l.218.218c.363.363.544.544.753.612.184.06.383.06.567 0 .21-.068.39-.25.754-.612l2.253-2.254a5.042 5.042 0 01-5.646 6.861c-.446-.087-.669-.13-.804-.117a.766.766 0 00-.341.104c-.12.063-.24.184-.48.424l-6.561 6.56a1.945 1.945 0 11-2.75-2.75l6.56-6.56c.24-.24.36-.36.425-.48a.766.766 0 00.104-.342c.013-.135-.03-.358-.119-.803A5.042 5.042 0 0117.82 2.68Zm-6.654 11.238 5.041 5.041a1.945 1.945 0 102.75-2.75l-4.147-4.147a5.029 5.029 0 01-.857-.157c-.357-.098-.748-.027-1.01.235l-1.777 1.778Z"/>',
|
4479
|
+
"left": 0,
|
4480
|
+
"top": 0,
|
4481
|
+
"width": 22,
|
4482
|
+
"height": 22
|
4483
|
+
};
|
4484
|
+
exports.__esModule = true;
|
4485
|
+
exports.default = data;
|
4486
|
+
}
|
4487
|
+
});
|
4488
|
+
|
4313
4489
|
// src/icons/trash.js
|
4314
4490
|
var require_trash = __commonJS({
|
4315
4491
|
"src/icons/trash.js"(exports) {
|
@@ -4926,7 +5102,7 @@ var Select = {
|
|
4926
5102
|
|
4927
5103
|
// src/molecules/Alert/Alert.tsx
|
4928
5104
|
var import_react22 = __toESM(require("react"));
|
4929
|
-
var
|
5105
|
+
var import_utils2 = require("@react-aria/utils");
|
4930
5106
|
var import_omit = __toESM(require("lodash/omit"));
|
4931
5107
|
|
4932
5108
|
// src/molecules/Button/Button.tsx
|
@@ -5721,7 +5897,11 @@ var Box = (_a) => {
|
|
5721
5897
|
style: __spreadValues(__spreadValues({}, styles), style)
|
5722
5898
|
}, rest));
|
5723
5899
|
};
|
5724
|
-
|
5900
|
+
var FlexBox = (props) => /* @__PURE__ */ import_react7.default.createElement(Box, __spreadValues({
|
5901
|
+
display: "flex"
|
5902
|
+
}, props));
|
5903
|
+
FlexBox.displayName = "Box.Flex";
|
5904
|
+
Box.Flex = FlexBox;
|
5725
5905
|
var BorderBox = createSimpleComponent(
|
5726
5906
|
Box,
|
5727
5907
|
{ className: "rounded border", borderColor: "grey-10" },
|
@@ -5814,6 +5994,7 @@ var import_alignmentVerticalCenter = __toESM(require_alignmentVerticalCenter());
|
|
5814
5994
|
var import_amexCard = __toESM(require_amexCard());
|
5815
5995
|
var import_annotation = __toESM(require_annotation());
|
5816
5996
|
var import_announcement = __toESM(require_announcement());
|
5997
|
+
var import_appUsers = __toESM(require_appUsers());
|
5817
5998
|
var import_applications = __toESM(require_applications());
|
5818
5999
|
var import_archive = __toESM(require_archive());
|
5819
6000
|
var import_arrowCircleDown = __toESM(require_arrowCircleDown());
|
@@ -5879,6 +6060,7 @@ var import_dataflow02 = __toESM(require_dataflow02());
|
|
5879
6060
|
var import_dataflow03 = __toESM(require_dataflow03());
|
5880
6061
|
var import_dbBackup = __toESM(require_dbBackup());
|
5881
6062
|
var import_delete = __toESM(require_delete());
|
6063
|
+
var import_deliveryLocation = __toESM(require_deliveryLocation());
|
5882
6064
|
var import_document = __toESM(require_document());
|
5883
6065
|
var import_dot = __toESM(require_dot());
|
5884
6066
|
var import_doubleCaretHorizontal = __toESM(require_doubleCaretHorizontal());
|
@@ -5910,6 +6092,7 @@ var import_following = __toESM(require_following());
|
|
5910
6092
|
var import_gift = __toESM(require_gift());
|
5911
6093
|
var import_gitBranch = __toESM(require_gitBranch());
|
5912
6094
|
var import_gitCommit = __toESM(require_gitCommit());
|
6095
|
+
var import_gitDiff = __toESM(require_gitDiff());
|
5913
6096
|
var import_gitMerge = __toESM(require_gitMerge());
|
5914
6097
|
var import_gitNewBranch = __toESM(require_gitNewBranch());
|
5915
6098
|
var import_gitPull = __toESM(require_gitPull());
|
@@ -5947,6 +6130,7 @@ var import_loading = __toESM(require_loading());
|
|
5947
6130
|
var import_lock = __toESM(require_lock());
|
5948
6131
|
var import_logIn = __toESM(require_logIn());
|
5949
6132
|
var import_logOut = __toESM(require_logOut());
|
6133
|
+
var import_managedUsers = __toESM(require_managedUsers());
|
5950
6134
|
var import_manual = __toESM(require_manual());
|
5951
6135
|
var import_mapMarker = __toESM(require_mapMarker());
|
5952
6136
|
var import_map = __toESM(require_map());
|
@@ -5966,6 +6150,8 @@ var import_nodes = __toESM(require_nodes());
|
|
5966
6150
|
var import_notificationsUpdated = __toESM(require_notificationsUpdated());
|
5967
6151
|
var import_notifications = __toESM(require_notifications());
|
5968
6152
|
var import_office = __toESM(require_office());
|
6153
|
+
var import_orgAdmin = __toESM(require_orgAdmin());
|
6154
|
+
var import_orgUnit = __toESM(require_orgUnit());
|
5969
6155
|
var import_outdated = __toESM(require_outdated());
|
5970
6156
|
var import_packageCheck = __toESM(require_packageCheck());
|
5971
6157
|
var import_packageSearch = __toESM(require_packageSearch());
|
@@ -5982,11 +6168,14 @@ var import_plusCircle = __toESM(require_plusCircle());
|
|
5982
6168
|
var import_plus = __toESM(require_plus());
|
5983
6169
|
var import_pools = __toESM(require_pools());
|
5984
6170
|
var import_power = __toESM(require_power());
|
6171
|
+
var import_proPlans = __toESM(require_proPlans());
|
5985
6172
|
var import_projects = __toESM(require_projects());
|
5986
6173
|
var import_properties = __toESM(require_properties());
|
5987
6174
|
var import_property = __toESM(require_property());
|
5988
6175
|
var import_pulse = __toESM(require_pulse());
|
5989
6176
|
var import_puzzlePiece = __toESM(require_puzzlePiece());
|
6177
|
+
var import_queriesEditor = __toESM(require_queriesEditor());
|
6178
|
+
var import_queriesStatistics = __toESM(require_queriesStatistics());
|
5990
6179
|
var import_queries = __toESM(require_queries());
|
5991
6180
|
var import_questionMark = __toESM(require_questionMark());
|
5992
6181
|
var import_recoverySwap = __toESM(require_recoverySwap());
|
@@ -5996,6 +6185,7 @@ var import_repeat = __toESM(require_repeat());
|
|
5996
6185
|
var import_replicationFlow = __toESM(require_replicationFlow());
|
5997
6186
|
var import_reset = __toESM(require_reset());
|
5998
6187
|
var import_roadmap = __toESM(require_roadmap());
|
6188
|
+
var import_save = __toESM(require_save());
|
5999
6189
|
var import_saved = __toESM(require_saved());
|
6000
6190
|
var import_scatterPlot = __toESM(require_scatterPlot());
|
6001
6191
|
var import_search2 = __toESM(require_search());
|
@@ -6026,6 +6216,7 @@ var import_time = __toESM(require_time());
|
|
6026
6216
|
var import_timelineAreaChart = __toESM(require_timelineAreaChart());
|
6027
6217
|
var import_timelineBarChart = __toESM(require_timelineBarChart());
|
6028
6218
|
var import_timelineLineChart = __toESM(require_timelineLineChart());
|
6219
|
+
var import_tools = __toESM(require_tools());
|
6029
6220
|
var import_trash = __toESM(require_trash());
|
6030
6221
|
var import_unlock = __toESM(require_unlock());
|
6031
6222
|
var import_unpin = __toESM(require_unpin());
|
@@ -7012,17 +7203,21 @@ var isLink = (action) => action.href !== void 0;
|
|
7012
7203
|
|
7013
7204
|
// src/molecules/Alert/Alert.tsx
|
7014
7205
|
var Alert2 = ({ description, type, title, onDismiss, children, action }) => {
|
7015
|
-
const
|
7206
|
+
const descriptionID = (0, import_utils2.useId)();
|
7207
|
+
const titleID = (0, import_utils2.useId)();
|
7016
7208
|
return /* @__PURE__ */ import_react22.default.createElement(Alert, {
|
7017
7209
|
className: "Aquarium-Alert",
|
7018
7210
|
type,
|
7019
7211
|
dense: Boolean(title),
|
7020
|
-
"aria-describedby":
|
7212
|
+
"aria-describedby": descriptionID,
|
7213
|
+
"aria-labelledby": title ? titleID : void 0
|
7021
7214
|
}, /* @__PURE__ */ import_react22.default.createElement(Alert.Icon, {
|
7022
7215
|
type,
|
7023
7216
|
dense: Boolean(title)
|
7024
|
-
}), title && /* @__PURE__ */ import_react22.default.createElement(Alert.Title,
|
7025
|
-
id
|
7217
|
+
}), title && /* @__PURE__ */ import_react22.default.createElement(Alert.Title, {
|
7218
|
+
id: titleID
|
7219
|
+
}, title), /* @__PURE__ */ import_react22.default.createElement(Alert.Description, {
|
7220
|
+
id: descriptionID
|
7026
7221
|
}, children || description), action && /* @__PURE__ */ import_react22.default.createElement(Alert.Actions, null, !isLink(action) && /* @__PURE__ */ import_react22.default.createElement(Button.Ghost, __spreadValues({
|
7027
7222
|
dense: true
|
7028
7223
|
}, (0, import_omit.default)(action, "text")), action.text), isLink(action) && /* @__PURE__ */ import_react22.default.createElement(Button.ExternalLink, __spreadValues({
|
@@ -7040,20 +7235,33 @@ var import_react24 = __toESM(require("react"));
|
|
7040
7235
|
var import_react23 = __toESM(require("react"));
|
7041
7236
|
var import_isNumber = __toESM(require("lodash/isNumber"));
|
7042
7237
|
var import_isUndefined7 = __toESM(require("lodash/isUndefined"));
|
7043
|
-
var Skeleton = ({
|
7044
|
-
|
7045
|
-
|
7046
|
-
|
7047
|
-
|
7048
|
-
|
7049
|
-
|
7050
|
-
|
7238
|
+
var Skeleton = (_a) => {
|
7239
|
+
var _b = _a, {
|
7240
|
+
width,
|
7241
|
+
height,
|
7242
|
+
display = "block",
|
7243
|
+
className,
|
7244
|
+
animate = true,
|
7245
|
+
rounded = false,
|
7246
|
+
style
|
7247
|
+
} = _b, rest = __objRest(_b, [
|
7248
|
+
"width",
|
7249
|
+
"height",
|
7250
|
+
"display",
|
7251
|
+
"className",
|
7252
|
+
"animate",
|
7253
|
+
"rounded",
|
7254
|
+
"style"
|
7255
|
+
]);
|
7051
7256
|
const styles = {
|
7052
7257
|
width: (0, import_isNumber.default)(width) ? `${width}px` : width,
|
7053
7258
|
height: (0, import_isNumber.default)(height) ? `${height}px` : height
|
7054
7259
|
};
|
7055
|
-
return /* @__PURE__ */ import_react23.default.createElement("div", {
|
7056
|
-
|
7260
|
+
return /* @__PURE__ */ import_react23.default.createElement("div", __spreadProps(__spreadValues({
|
7261
|
+
"aria-label": "Loading..."
|
7262
|
+
}, rest), {
|
7263
|
+
style: __spreadValues(__spreadValues({}, styles), style),
|
7264
|
+
role: "progressbar",
|
7057
7265
|
className: classNames(
|
7058
7266
|
"Aquarium-Skeleton",
|
7059
7267
|
tw("bg-grey-5", {
|
@@ -7065,7 +7273,7 @@ var Skeleton = ({
|
|
7065
7273
|
}),
|
7066
7274
|
className
|
7067
7275
|
)
|
7068
|
-
});
|
7276
|
+
}));
|
7069
7277
|
};
|
7070
7278
|
|
7071
7279
|
// src/molecules/Avatar/Avatar.tsx
|
@@ -7358,9 +7566,8 @@ var ActiveCrumb = asCrumb("span", "ActiveCrumb", { isActive: true });
|
|
7358
7566
|
Breadcrumbs.Crumb = Crumb;
|
7359
7567
|
|
7360
7568
|
// src/molecules/Card/Card.tsx
|
7361
|
-
var
|
7569
|
+
var import_react37 = __toESM(require("react"));
|
7362
7570
|
var import_button2 = require("@react-aria/button");
|
7363
|
-
var import_omit3 = __toESM(require("lodash/omit"));
|
7364
7571
|
|
7365
7572
|
// src/molecules/Chip/Chip.tsx
|
7366
7573
|
var import_react31 = __toESM(require("react"));
|
@@ -7605,12 +7812,28 @@ Typography2.SmallTextBold = (_a) => {
|
|
7605
7812
|
};
|
7606
7813
|
|
7607
7814
|
// src/atoms/Card/Card.tsx
|
7608
|
-
var
|
7815
|
+
var import_react34 = __toESM(require("react"));
|
7609
7816
|
var import_isNumber3 = __toESM(require("lodash/isNumber"));
|
7610
|
-
|
7817
|
+
|
7818
|
+
// src/atoms/LineClamp/LineClamp.tsx
|
7819
|
+
var import_react33 = __toESM(require("react"));
|
7820
|
+
var LineClamp = import_react33.default.forwardRef(
|
7821
|
+
(_a, ref) => {
|
7822
|
+
var _b = _a, { lines = 1, clamped = true, children, className, wordBreak = "break-words" } = _b, props = __objRest(_b, ["lines", "clamped", "children", "className", "wordBreak"]);
|
7823
|
+
return /* @__PURE__ */ import_react33.default.createElement("div", __spreadValues({
|
7824
|
+
ref,
|
7825
|
+
className: classNames(className, wordBreak === "break-words" ? "break-words" : "break-all", {
|
7826
|
+
[`line-clamp-${lines}`]: clamped
|
7827
|
+
})
|
7828
|
+
}, props), children);
|
7829
|
+
}
|
7830
|
+
);
|
7831
|
+
|
7832
|
+
// src/atoms/Card/Card.tsx
|
7833
|
+
var Card = import_react34.default.forwardRef(
|
7611
7834
|
(_a, ref) => {
|
7612
7835
|
var _b = _a, { disabled, fullWidth, enableMinWidth = true, clickable, className, children } = _b, rest = __objRest(_b, ["disabled", "fullWidth", "enableMinWidth", "clickable", "className", "children"]);
|
7613
|
-
return /* @__PURE__ */
|
7836
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", __spreadProps(__spreadValues({
|
7614
7837
|
ref
|
7615
7838
|
}, rest), {
|
7616
7839
|
className: classNames(
|
@@ -7628,14 +7851,14 @@ var Card = import_react33.default.forwardRef(
|
|
7628
7851
|
);
|
7629
7852
|
var ColorHighlight = (_a) => {
|
7630
7853
|
var _b = _a, { color, className } = _b, rest = __objRest(_b, ["color", "className"]);
|
7631
|
-
return /* @__PURE__ */
|
7854
|
+
return /* @__PURE__ */ import_react34.default.createElement(Box, __spreadProps(__spreadValues({}, rest), {
|
7632
7855
|
backgroundColor: color,
|
7633
7856
|
className: classNames(tw("h-1 w-full absolute top-0 left-0 right-0"), className)
|
7634
7857
|
}));
|
7635
7858
|
};
|
7636
7859
|
var ImageContainer = (_a) => {
|
7637
7860
|
var _b = _a, { className, fullSize } = _b, rest = __objRest(_b, ["className", "fullSize"]);
|
7638
|
-
return /* @__PURE__ */
|
7861
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7639
7862
|
className: classNames(
|
7640
7863
|
tw("-mx-4", {
|
7641
7864
|
"-mt-4": Boolean(fullSize)
|
@@ -7645,7 +7868,7 @@ var ImageContainer = (_a) => {
|
|
7645
7868
|
}));
|
7646
7869
|
};
|
7647
7870
|
var classes = "w-full bg-cover object-cover";
|
7648
|
-
var Image = ({ image, imageAlt, fullSize = false, imageHeight }) => /* @__PURE__ */
|
7871
|
+
var Image = ({ image, imageAlt, fullSize = false, imageHeight }) => /* @__PURE__ */ import_react34.default.createElement("img", {
|
7649
7872
|
src: image,
|
7650
7873
|
alt: imageAlt,
|
7651
7874
|
className: tw(classes, {
|
@@ -7654,42 +7877,73 @@ var Image = ({ image, imageAlt, fullSize = false, imageHeight }) => /* @__PURE__
|
|
7654
7877
|
}),
|
7655
7878
|
style: { height: (0, import_isNumber3.default)(imageHeight) ? `${imageHeight}px` : imageHeight }
|
7656
7879
|
});
|
7880
|
+
var Title = (props) => /* @__PURE__ */ import_react34.default.createElement(Box.Flex, __spreadValues({
|
7881
|
+
component: "div",
|
7882
|
+
alignItems: "center",
|
7883
|
+
gap: "2"
|
7884
|
+
}, props));
|
7657
7885
|
var Content = (_a) => {
|
7658
7886
|
var _b = _a, { className, dense } = _b, rest = __objRest(_b, ["className", "dense"]);
|
7659
|
-
return /* @__PURE__ */
|
7887
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7660
7888
|
className: classNames(tw("flex flex-col", { "gap-4": !dense }), className)
|
7661
7889
|
}));
|
7662
7890
|
};
|
7663
7891
|
var Actions = (_a) => {
|
7664
7892
|
var _b = _a, { className, dense } = _b, rest = __objRest(_b, ["className", "dense"]);
|
7665
|
-
return /* @__PURE__ */
|
7893
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7666
7894
|
className: classNames(tw("flex gap-3 items-center", { "pt-3 ": !dense }), className)
|
7667
7895
|
}));
|
7668
7896
|
};
|
7897
|
+
Card.Title = Title;
|
7669
7898
|
Card.Content = Content;
|
7670
7899
|
Card.Actions = Actions;
|
7671
7900
|
Card.ImageContainer = ImageContainer;
|
7672
7901
|
Card.Image = Image;
|
7673
7902
|
Card.ColorHiglight = ColorHighlight;
|
7674
|
-
|
7675
|
-
|
7676
|
-
|
7677
|
-
var
|
7678
|
-
|
7679
|
-
|
7680
|
-
|
7681
|
-
|
7682
|
-
|
7683
|
-
|
7684
|
-
|
7685
|
-
|
7903
|
+
var isCardTitleComponent = (c) => {
|
7904
|
+
return import_react34.default.isValidElement(c) && c.type === Card.Title;
|
7905
|
+
};
|
7906
|
+
var getTitleContent = ({
|
7907
|
+
title,
|
7908
|
+
clampTitle,
|
7909
|
+
dense = false
|
7910
|
+
}) => {
|
7911
|
+
if (typeof title !== "string" && !isCardTitleComponent(title)) {
|
7912
|
+
throw new Error(
|
7913
|
+
"Wrap a custom card title element with <Card.Title> to get the desired spacing between children elements applied."
|
7914
|
+
);
|
7686
7915
|
}
|
7687
|
-
|
7916
|
+
const titleContent = /* @__PURE__ */ import_react34.default.createElement(Typography2, {
|
7917
|
+
variant: dense ? "small-strong" : "default-strong",
|
7918
|
+
color: "black"
|
7919
|
+
}, title);
|
7920
|
+
if (clampTitle) {
|
7921
|
+
return /* @__PURE__ */ import_react34.default.createElement(LineClamp, {
|
7922
|
+
lines: clampTitle,
|
7923
|
+
wordBreak: "break-all"
|
7924
|
+
}, titleContent);
|
7925
|
+
}
|
7926
|
+
return titleContent;
|
7927
|
+
};
|
7688
7928
|
|
7689
|
-
// src/
|
7929
|
+
// src/utils/actions.tsx
|
7690
7930
|
var import_react35 = __toESM(require("react"));
|
7931
|
+
var import_omit3 = __toESM(require("lodash/omit"));
|
7932
|
+
var renderAction = ({ kind = "primary", dense = false, action }) => {
|
7933
|
+
return isLink(action) ? /* @__PURE__ */ import_react35.default.createElement(Button.ExternalLink, __spreadValues({
|
7934
|
+
key: action.text,
|
7935
|
+
kind,
|
7936
|
+
dense
|
7937
|
+
}, (0, import_omit3.default)(action, "text")), action.text) : /* @__PURE__ */ import_react35.default.createElement(Button, __spreadValues({
|
7938
|
+
key: action.text,
|
7939
|
+
kind,
|
7940
|
+
dense
|
7941
|
+
}, (0, import_omit3.default)(action, "text")), action.text);
|
7942
|
+
};
|
7943
|
+
|
7944
|
+
// src/molecules/Card/Compact.tsx
|
7945
|
+
var import_react36 = __toESM(require("react"));
|
7691
7946
|
var import_button = require("@react-aria/button");
|
7692
|
-
var import_lodash = require("lodash");
|
7693
7947
|
var CompactCard = ({
|
7694
7948
|
title,
|
7695
7949
|
clampTitle,
|
@@ -7698,82 +7952,73 @@ var CompactCard = ({
|
|
7698
7952
|
color,
|
7699
7953
|
action,
|
7700
7954
|
link,
|
7955
|
+
primaryAction = action,
|
7956
|
+
secondaryAction = link,
|
7701
7957
|
onClick,
|
7702
7958
|
disabled,
|
7703
7959
|
fullWidth,
|
7704
7960
|
children
|
7705
7961
|
}) => {
|
7706
|
-
const ref = (0,
|
7962
|
+
const ref = (0, import_react36.useRef)(null);
|
7707
7963
|
const { buttonProps } = (0, import_button.useButton)({ elementType: "div", onPress: onClick, isDisabled: disabled }, ref);
|
7708
|
-
|
7709
|
-
color: "black"
|
7710
|
-
}, title);
|
7711
|
-
return /* @__PURE__ */ import_react35.default.createElement(Card, __spreadProps(__spreadValues({
|
7964
|
+
return /* @__PURE__ */ import_react36.default.createElement(Card, __spreadProps(__spreadValues({
|
7712
7965
|
ref,
|
7713
7966
|
className: "Aquarium-Card.Compact",
|
7714
7967
|
clickable: Boolean(onClick),
|
7715
7968
|
fullWidth,
|
7716
|
-
enableMinWidth: Boolean(
|
7969
|
+
enableMinWidth: Boolean(primaryAction || secondaryAction || chips.length)
|
7717
7970
|
}, onClick ? buttonProps : {}), {
|
7718
7971
|
disabled
|
7719
|
-
}), color && /* @__PURE__ */
|
7972
|
+
}), color && /* @__PURE__ */ import_react36.default.createElement(Card.ColorHiglight, {
|
7720
7973
|
color
|
7721
|
-
}), chips.length > 0 && /* @__PURE__ */
|
7974
|
+
}), chips.length > 0 && /* @__PURE__ */ import_react36.default.createElement(ChipContainer, {
|
7722
7975
|
dense: true
|
7723
|
-
}, chips.map((chip) => /* @__PURE__ */
|
7976
|
+
}, chips.map((chip) => /* @__PURE__ */ import_react36.default.createElement(Chip2, {
|
7724
7977
|
key: chip,
|
7725
7978
|
text: chip
|
7726
|
-
}))), /* @__PURE__ */
|
7979
|
+
}))), /* @__PURE__ */ import_react36.default.createElement(Box, {
|
7727
7980
|
display: "flex",
|
7728
7981
|
gap: "5"
|
7729
|
-
}, icon && /* @__PURE__ */
|
7982
|
+
}, icon && /* @__PURE__ */ import_react36.default.createElement(Avatar, {
|
7730
7983
|
image: icon
|
7731
|
-
}), /* @__PURE__ */
|
7984
|
+
}), /* @__PURE__ */ import_react36.default.createElement(Card.Content, {
|
7732
7985
|
dense: true
|
7733
|
-
}, clampTitle
|
7734
|
-
lines: clampTitle,
|
7735
|
-
wordBreak: "break-all"
|
7736
|
-
}, titleContent) : titleContent, /* @__PURE__ */ import_react35.default.createElement(Typography2.Caption, {
|
7986
|
+
}, getTitleContent({ title, clampTitle, dense: true }), /* @__PURE__ */ import_react36.default.createElement(Typography2.Caption, {
|
7737
7987
|
color: "grey-70"
|
7738
|
-
}, children))), (
|
7739
|
-
dense: true
|
7740
|
-
}, action && /* @__PURE__ */ import_react35.default.createElement(Button.Secondary, __spreadValues({
|
7988
|
+
}, children))), (primaryAction || secondaryAction) && /* @__PURE__ */ import_react36.default.createElement(Card.Actions, {
|
7741
7989
|
dense: true
|
7742
|
-
},
|
7743
|
-
dense: true,
|
7744
|
-
kind: "ghost"
|
7745
|
-
}, (0, import_lodash.omit)(link, "text")), link.text)));
|
7990
|
+
}, primaryAction && renderAction({ kind: "secondary", dense: true, action: primaryAction }), secondaryAction && renderAction({ kind: "ghost", dense: true, action: secondaryAction })));
|
7746
7991
|
};
|
7747
7992
|
var CompactSkeleton = ({
|
7748
7993
|
chips = true,
|
7749
7994
|
icon = true,
|
7750
7995
|
actions = true,
|
7751
7996
|
fullWidth = false
|
7752
|
-
}) => /* @__PURE__ */
|
7997
|
+
}) => /* @__PURE__ */ import_react36.default.createElement(Card, {
|
7753
7998
|
fullWidth
|
7754
|
-
}, chips && /* @__PURE__ */
|
7999
|
+
}, chips && /* @__PURE__ */ import_react36.default.createElement(ChipContainer, {
|
7755
8000
|
dense: true
|
7756
|
-
}, Array.from({ length: 5 }).map((_, idx) => /* @__PURE__ */
|
8001
|
+
}, Array.from({ length: 5 }).map((_, idx) => /* @__PURE__ */ import_react36.default.createElement(Chip2.Skeleton, {
|
7757
8002
|
key: idx
|
7758
|
-
}))), /* @__PURE__ */
|
8003
|
+
}))), /* @__PURE__ */ import_react36.default.createElement(Box, {
|
7759
8004
|
display: "flex",
|
7760
8005
|
gap: "5"
|
7761
|
-
}, icon && /* @__PURE__ */
|
8006
|
+
}, icon && /* @__PURE__ */ import_react36.default.createElement(Avatar.Skeleton, null), /* @__PURE__ */ import_react36.default.createElement(Card.Content, {
|
7762
8007
|
dense: true
|
7763
|
-
}, /* @__PURE__ */
|
8008
|
+
}, /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
|
7764
8009
|
width: 80,
|
7765
8010
|
height: 20
|
7766
|
-
}), /* @__PURE__ */
|
8011
|
+
}), /* @__PURE__ */ import_react36.default.createElement(Box, {
|
7767
8012
|
height: "1"
|
7768
|
-
}), /* @__PURE__ */
|
8013
|
+
}), /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
|
7769
8014
|
width: 145,
|
7770
8015
|
height: 16
|
7771
|
-
}))), actions && /* @__PURE__ */
|
8016
|
+
}))), actions && /* @__PURE__ */ import_react36.default.createElement(Card.Actions, {
|
7772
8017
|
dense: true
|
7773
|
-
}, /* @__PURE__ */
|
8018
|
+
}, /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
|
7774
8019
|
width: 115,
|
7775
8020
|
height: 25
|
7776
|
-
}), /* @__PURE__ */
|
8021
|
+
}), /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
|
7777
8022
|
width: 60,
|
7778
8023
|
height: 25
|
7779
8024
|
})));
|
@@ -7792,17 +8037,16 @@ var Card2 = ({
|
|
7792
8037
|
color,
|
7793
8038
|
action,
|
7794
8039
|
link,
|
8040
|
+
primaryAction = action,
|
8041
|
+
secondaryAction = link,
|
7795
8042
|
onClick,
|
7796
8043
|
disabled,
|
7797
8044
|
fullWidth,
|
7798
8045
|
children
|
7799
8046
|
}) => {
|
7800
|
-
const ref = (0,
|
8047
|
+
const ref = (0, import_react37.useRef)(null);
|
7801
8048
|
const { buttonProps } = (0, import_button2.useButton)({ elementType: "div", onPress: onClick, isDisabled: disabled }, ref);
|
7802
|
-
|
7803
|
-
color: "black"
|
7804
|
-
}, title);
|
7805
|
-
return /* @__PURE__ */ import_react36.default.createElement(Card, __spreadProps(__spreadValues({
|
8049
|
+
return /* @__PURE__ */ import_react37.default.createElement(Card, __spreadProps(__spreadValues({
|
7806
8050
|
ref,
|
7807
8051
|
className: "Aquarium-Card",
|
7808
8052
|
clickable: Boolean(onClick),
|
@@ -7810,35 +8054,29 @@ var Card2 = ({
|
|
7810
8054
|
enableMinWidth: Boolean(image || action || link || chips.length || icons.length)
|
7811
8055
|
}, onClick ? buttonProps : {}), {
|
7812
8056
|
disabled
|
7813
|
-
}), color && /* @__PURE__ */
|
8057
|
+
}), color && /* @__PURE__ */ import_react37.default.createElement(Card.ColorHiglight, {
|
7814
8058
|
color
|
7815
|
-
}), chips.length > 0 && /* @__PURE__ */
|
8059
|
+
}), chips.length > 0 && /* @__PURE__ */ import_react37.default.createElement(ChipContainer, {
|
7816
8060
|
dense: true
|
7817
|
-
}, chips.map((chip) => /* @__PURE__ */
|
8061
|
+
}, chips.map((chip) => /* @__PURE__ */ import_react37.default.createElement(Chip2, {
|
7818
8062
|
key: chip,
|
7819
8063
|
text: chip
|
7820
|
-
}))), icons.length > 0 && /* @__PURE__ */
|
8064
|
+
}))), icons.length > 0 && /* @__PURE__ */ import_react37.default.createElement(AvatarStack, {
|
7821
8065
|
images: icons
|
7822
|
-
}), image !== void 0 && (imageHeight ? /* @__PURE__ */
|
8066
|
+
}), image !== void 0 && (imageHeight ? /* @__PURE__ */ import_react37.default.createElement(CardImage, {
|
7823
8067
|
image,
|
7824
8068
|
imageAlt,
|
7825
8069
|
imageHeight
|
7826
|
-
}) : /* @__PURE__ */
|
8070
|
+
}) : /* @__PURE__ */ import_react37.default.createElement(CardImage, {
|
7827
8071
|
image,
|
7828
8072
|
imageAlt,
|
7829
8073
|
fullSize: chips.length === 0
|
7830
|
-
})), /* @__PURE__ */
|
7831
|
-
lines: clampTitle,
|
7832
|
-
wordBreak: "break-all"
|
7833
|
-
}, titleContent) : titleContent, /* @__PURE__ */ import_react36.default.createElement(Typography2.Caption, {
|
8074
|
+
})), /* @__PURE__ */ import_react37.default.createElement(Card.Content, null, getTitleContent({ title, clampTitle }), /* @__PURE__ */ import_react37.default.createElement(Typography2.Caption, {
|
7834
8075
|
color: "grey-70"
|
7835
|
-
}, children || description)), (
|
7836
|
-
dense: true
|
7837
|
-
}, (0, import_omit3.default)(action, "text")), action.text), link && /* @__PURE__ */ import_react36.default.createElement(Button.ExternalLink, __spreadValues({
|
7838
|
-
dense: true,
|
7839
|
-
kind: "ghost"
|
7840
|
-
}, (0, import_omit3.default)(link, "text")), link.text)));
|
8076
|
+
}, children || description)), (primaryAction || secondaryAction) && /* @__PURE__ */ import_react37.default.createElement(Card.Actions, null, primaryAction && renderAction({ kind: "secondary", dense: true, action: primaryAction }), secondaryAction && renderAction({ kind: "ghost", dense: true, action: secondaryAction })));
|
7841
8077
|
};
|
8078
|
+
Card2.Title = Card.Title;
|
8079
|
+
Card2.Title.displayName = "Card.Title";
|
7842
8080
|
var CardSkeleton = ({
|
7843
8081
|
chips = true,
|
7844
8082
|
icons = false,
|
@@ -7846,60 +8084,60 @@ var CardSkeleton = ({
|
|
7846
8084
|
actions = true,
|
7847
8085
|
fullWidth = false,
|
7848
8086
|
imageHeight
|
7849
|
-
}) => /* @__PURE__ */
|
8087
|
+
}) => /* @__PURE__ */ import_react37.default.createElement(Card, {
|
7850
8088
|
fullWidth
|
7851
|
-
}, chips && /* @__PURE__ */
|
8089
|
+
}, chips && /* @__PURE__ */ import_react37.default.createElement(ChipContainer, {
|
7852
8090
|
dense: true
|
7853
|
-
}, Array.from({ length: 5 }).map((_, idx) => /* @__PURE__ */
|
8091
|
+
}, Array.from({ length: 5 }).map((_, idx) => /* @__PURE__ */ import_react37.default.createElement(Chip2.Skeleton, {
|
7854
8092
|
key: idx
|
7855
|
-
}))), icons && /* @__PURE__ */
|
8093
|
+
}))), icons && /* @__PURE__ */ import_react37.default.createElement(AvatarStack, {
|
7856
8094
|
images: [null]
|
7857
|
-
}), image && (imageHeight ? /* @__PURE__ */
|
8095
|
+
}), image && (imageHeight ? /* @__PURE__ */ import_react37.default.createElement(CardImage, {
|
7858
8096
|
image: null,
|
7859
8097
|
imageHeight
|
7860
|
-
}) : /* @__PURE__ */
|
8098
|
+
}) : /* @__PURE__ */ import_react37.default.createElement(CardImage, {
|
7861
8099
|
image: null,
|
7862
8100
|
fullSize: !chips
|
7863
|
-
})), /* @__PURE__ */
|
8101
|
+
})), /* @__PURE__ */ import_react37.default.createElement(Card.Content, null, /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7864
8102
|
width: 145,
|
7865
8103
|
height: 25
|
7866
|
-
}), /* @__PURE__ */
|
8104
|
+
}), /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7867
8105
|
width: 145,
|
7868
8106
|
height: 16
|
7869
|
-
})), actions && /* @__PURE__ */
|
8107
|
+
})), actions && /* @__PURE__ */ import_react37.default.createElement(Card.Actions, null, /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7870
8108
|
width: 115,
|
7871
8109
|
height: 25
|
7872
|
-
}), /* @__PURE__ */
|
8110
|
+
}), /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7873
8111
|
width: 60,
|
7874
8112
|
height: 25
|
7875
8113
|
})));
|
7876
8114
|
Card2.Skeleton = CardSkeleton;
|
7877
8115
|
Card2.Compact = CompactCard;
|
7878
|
-
var CardImage = ({ image, imageAlt, imageHeight, fullSize = false }) => /* @__PURE__ */
|
8116
|
+
var CardImage = ({ image, imageAlt, imageHeight, fullSize = false }) => /* @__PURE__ */ import_react37.default.createElement(Card.ImageContainer, {
|
7879
8117
|
fullSize
|
7880
|
-
}, image ? imageHeight ? /* @__PURE__ */
|
8118
|
+
}, image ? imageHeight ? /* @__PURE__ */ import_react37.default.createElement(Card.Image, {
|
7881
8119
|
image,
|
7882
8120
|
imageAlt,
|
7883
8121
|
imageHeight
|
7884
|
-
}) : /* @__PURE__ */
|
8122
|
+
}) : /* @__PURE__ */ import_react37.default.createElement(Card.Image, {
|
7885
8123
|
image,
|
7886
8124
|
imageAlt,
|
7887
8125
|
fullSize
|
7888
|
-
}) : /* @__PURE__ */
|
8126
|
+
}) : /* @__PURE__ */ import_react37.default.createElement(CardImage.Skeleton, {
|
7889
8127
|
fullSize,
|
7890
8128
|
imageHeight
|
7891
8129
|
}));
|
7892
|
-
var CardImageSkeleton = ({ imageHeight, fullSize }) => imageHeight ? /* @__PURE__ */
|
8130
|
+
var CardImageSkeleton = ({ imageHeight, fullSize }) => imageHeight ? /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7893
8131
|
height: imageHeight,
|
7894
8132
|
width: "100%"
|
7895
|
-
}) : /* @__PURE__ */
|
8133
|
+
}) : /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7896
8134
|
height: fullSize ? 225 : 174,
|
7897
8135
|
width: "100%"
|
7898
8136
|
});
|
7899
8137
|
CardImage.Skeleton = CardImageSkeleton;
|
7900
8138
|
|
7901
8139
|
// src/molecules/Carousel/Carousel.tsx
|
7902
|
-
var
|
8140
|
+
var import_react38 = __toESM(require("react"));
|
7903
8141
|
var import_classnames5 = __toESM(require("classnames"));
|
7904
8142
|
var import_chevronLeft2 = __toESM(require_chevronLeft());
|
7905
8143
|
var import_chevronRight2 = __toESM(require_chevronRight());
|
@@ -7909,13 +8147,13 @@ var Carousel = ({
|
|
7909
8147
|
onPageChange,
|
7910
8148
|
children
|
7911
8149
|
}) => {
|
7912
|
-
const containerRef = (0,
|
7913
|
-
const scrollbarContainerRef = (0,
|
7914
|
-
const items =
|
7915
|
-
const [width, setWidth] = (0,
|
7916
|
-
const [isUpdating, setIsUpdating] = (0,
|
7917
|
-
const [currentPage, setCurrentPage] = (0,
|
7918
|
-
(0,
|
8150
|
+
const containerRef = (0, import_react38.useRef)(null);
|
8151
|
+
const scrollbarContainerRef = (0, import_react38.useRef)(null);
|
8152
|
+
const items = import_react38.default.Children.toArray(children);
|
8153
|
+
const [width, setWidth] = (0, import_react38.useState)(0);
|
8154
|
+
const [isUpdating, setIsUpdating] = (0, import_react38.useState)(false);
|
8155
|
+
const [currentPage, setCurrentPage] = (0, import_react38.useState)(currentPageProp != null ? currentPageProp : defaultPage);
|
8156
|
+
(0, import_react38.useLayoutEffect)(() => {
|
7919
8157
|
const updateContainerWidth = () => {
|
7920
8158
|
var _a;
|
7921
8159
|
const containerWidth = (_a = containerRef.current) == null ? void 0 : _a.getBoundingClientRect().width;
|
@@ -7932,7 +8170,7 @@ var Carousel = ({
|
|
7932
8170
|
if (typeof currentPageProp === "number" && currentPageProp !== currentPage && onPageChange && width !== 0) {
|
7933
8171
|
setCurrentPage(currentPageProp);
|
7934
8172
|
}
|
7935
|
-
(0,
|
8173
|
+
(0, import_react38.useEffect)(() => {
|
7936
8174
|
var _a, _b;
|
7937
8175
|
if (width === 0) {
|
7938
8176
|
return;
|
@@ -7961,30 +8199,30 @@ var Carousel = ({
|
|
7961
8199
|
onPageChange && onPageChange(newPage);
|
7962
8200
|
}
|
7963
8201
|
};
|
7964
|
-
return items.length > 0 ? /* @__PURE__ */
|
8202
|
+
return items.length > 0 ? /* @__PURE__ */ import_react38.default.createElement("div", {
|
7965
8203
|
className: (0, import_classnames5.default)("Aquarium-Carousel", tw("w-full flex flex-col")),
|
7966
8204
|
ref: containerRef
|
7967
|
-
}, containerRef !== null && /* @__PURE__ */
|
8205
|
+
}, containerRef !== null && /* @__PURE__ */ import_react38.default.createElement("ul", {
|
7968
8206
|
ref: scrollbarContainerRef,
|
7969
8207
|
tabIndex: 0,
|
7970
8208
|
onScroll: handleScroll,
|
7971
8209
|
className: tw(
|
7972
8210
|
"grid items-stretch grid-flow-col overflow-x-scroll scroll-smooth snap-x snap-mandatory scrollbar-hide focus-visible:outline-0 focus-visible:ring-1 focus-visible:ring-info-70"
|
7973
8211
|
)
|
7974
|
-
}, width !== 0 &&
|
8212
|
+
}, width !== 0 && import_react38.default.Children.map(children, (child, index) => /* @__PURE__ */ import_react38.default.createElement(CarouselItem, {
|
7975
8213
|
key: index,
|
7976
8214
|
width,
|
7977
8215
|
ariaHidden: index + 1 === currentPage ? void 0 : true
|
7978
|
-
}, child))), /* @__PURE__ */
|
8216
|
+
}, child))), /* @__PURE__ */ import_react38.default.createElement(Flexbox, {
|
7979
8217
|
direction: "row",
|
7980
8218
|
justifyContent: "flex-end",
|
7981
8219
|
alignItems: "center"
|
7982
|
-
}, /* @__PURE__ */
|
8220
|
+
}, /* @__PURE__ */ import_react38.default.createElement(IconButton, {
|
7983
8221
|
"aria-label": "Previous",
|
7984
8222
|
onClick: () => handleNavigationClick("left"),
|
7985
8223
|
icon: import_chevronLeft2.default,
|
7986
8224
|
disabled: currentPage === 1
|
7987
|
-
}), /* @__PURE__ */
|
8225
|
+
}), /* @__PURE__ */ import_react38.default.createElement(Typography2.Caption, null, `${currentPage}/${import_react38.default.Children.count(children)}`), /* @__PURE__ */ import_react38.default.createElement(IconButton, {
|
7988
8226
|
"aria-label": "Next",
|
7989
8227
|
onClick: () => handleNavigationClick("right"),
|
7990
8228
|
icon: import_chevronRight2.default,
|
@@ -7992,7 +8230,7 @@ var Carousel = ({
|
|
7992
8230
|
}))) : null;
|
7993
8231
|
};
|
7994
8232
|
var CarouselItem = ({ width, children, ariaHidden }) => {
|
7995
|
-
return /* @__PURE__ */
|
8233
|
+
return /* @__PURE__ */ import_react38.default.createElement("li", {
|
7996
8234
|
style: { width },
|
7997
8235
|
"aria-hidden": ariaHidden,
|
7998
8236
|
className: tw("flex justify-center snap-start")
|
@@ -8000,10 +8238,10 @@ var CarouselItem = ({ width, children, ariaHidden }) => {
|
|
8000
8238
|
};
|
8001
8239
|
|
8002
8240
|
// src/molecules/Checkbox/Checkbox.tsx
|
8003
|
-
var
|
8241
|
+
var import_react41 = __toESM(require("react"));
|
8004
8242
|
|
8005
8243
|
// src/molecules/ControlLabel/ControlLabel.tsx
|
8006
|
-
var
|
8244
|
+
var import_react39 = __toESM(require("react"));
|
8007
8245
|
var ControlLabel = (_a) => {
|
8008
8246
|
var _b = _a, {
|
8009
8247
|
label,
|
@@ -8026,10 +8264,10 @@ var ControlLabel = (_a) => {
|
|
8026
8264
|
]);
|
8027
8265
|
const textClass = disabled ? "text-grey-40" : "text-grey-70";
|
8028
8266
|
const rtl = labelPlacement === "left";
|
8029
|
-
const labelEl = label && /* @__PURE__ */
|
8267
|
+
const labelEl = label && /* @__PURE__ */ import_react39.default.createElement("span", {
|
8030
8268
|
className: tw("typography-small self-center", { "text-right": rtl })
|
8031
8269
|
}, label);
|
8032
|
-
return /* @__PURE__ */
|
8270
|
+
return /* @__PURE__ */ import_react39.default.createElement("label", __spreadValues({
|
8033
8271
|
className: classNames(
|
8034
8272
|
className,
|
8035
8273
|
tw(
|
@@ -8044,7 +8282,7 @@ var ControlLabel = (_a) => {
|
|
8044
8282
|
)
|
8045
8283
|
),
|
8046
8284
|
style: __spreadValues({}, style)
|
8047
|
-
}, rest), rtl ? labelEl : children, rtl ? children : labelEl, caption && /* @__PURE__ */
|
8285
|
+
}, rest), rtl ? labelEl : children, rtl ? children : labelEl, caption && /* @__PURE__ */ import_react39.default.createElement(Typography2, {
|
8048
8286
|
className: tw({ "col-start-2": !rtl }),
|
8049
8287
|
variant: "caption",
|
8050
8288
|
color: disabled ? "grey-40" : "grey-50"
|
@@ -8052,18 +8290,18 @@ var ControlLabel = (_a) => {
|
|
8052
8290
|
};
|
8053
8291
|
|
8054
8292
|
// src/atoms/Checkbox/Checkbox.tsx
|
8055
|
-
var
|
8293
|
+
var import_react40 = __toESM(require("react"));
|
8056
8294
|
var import_minus2 = __toESM(require_minus());
|
8057
8295
|
var import_tick3 = __toESM(require_tick());
|
8058
|
-
var Checkbox =
|
8296
|
+
var Checkbox = import_react40.default.forwardRef(
|
8059
8297
|
(_a, ref) => {
|
8060
8298
|
var _b = _a, { id, children, name, disabled = false, readOnly = false, indeterminate = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly", "indeterminate"]);
|
8061
|
-
return /* @__PURE__ */
|
8299
|
+
return /* @__PURE__ */ import_react40.default.createElement("span", {
|
8062
8300
|
className: classNames(tw("inline-flex justify-center items-center self-center relative"), {
|
8063
8301
|
"hover:border-grey-50 peer-checked:border-primary-80": !disabled,
|
8064
8302
|
"border-grey-5": disabled
|
8065
8303
|
})
|
8066
|
-
}, /* @__PURE__ */
|
8304
|
+
}, /* @__PURE__ */ import_react40.default.createElement("input", __spreadProps(__spreadValues({
|
8067
8305
|
id,
|
8068
8306
|
ref,
|
8069
8307
|
type: "checkbox",
|
@@ -8077,7 +8315,7 @@ var Checkbox = import_react39.default.forwardRef(
|
|
8077
8315
|
),
|
8078
8316
|
readOnly,
|
8079
8317
|
disabled
|
8080
|
-
})), /* @__PURE__ */
|
8318
|
+
})), /* @__PURE__ */ import_react40.default.createElement(Icon, {
|
8081
8319
|
icon: indeterminate ? import_minus2.default : import_tick3.default,
|
8082
8320
|
strokeWidth: "2px",
|
8083
8321
|
className: classNames(
|
@@ -8097,7 +8335,7 @@ var Checkbox = import_react39.default.forwardRef(
|
|
8097
8335
|
);
|
8098
8336
|
|
8099
8337
|
// src/molecules/Checkbox/Checkbox.tsx
|
8100
|
-
var Checkbox2 =
|
8338
|
+
var Checkbox2 = import_react41.default.forwardRef(
|
8101
8339
|
(_a, ref) => {
|
8102
8340
|
var _b = _a, {
|
8103
8341
|
id,
|
@@ -8120,7 +8358,7 @@ var Checkbox2 = import_react40.default.forwardRef(
|
|
8120
8358
|
]);
|
8121
8359
|
var _a2;
|
8122
8360
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
8123
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
8361
|
+
return !readOnly || isChecked ? /* @__PURE__ */ import_react41.default.createElement(ControlLabel, {
|
8124
8362
|
htmlFor: id,
|
8125
8363
|
label: children,
|
8126
8364
|
labelPlacement,
|
@@ -8130,7 +8368,7 @@ var Checkbox2 = import_react40.default.forwardRef(
|
|
8130
8368
|
disabled,
|
8131
8369
|
className: "Aquarium-Checkbox",
|
8132
8370
|
style: { gap: "0 8px" }
|
8133
|
-
}, !readOnly && /* @__PURE__ */
|
8371
|
+
}, !readOnly && /* @__PURE__ */ import_react41.default.createElement(Checkbox, __spreadProps(__spreadValues({
|
8134
8372
|
id,
|
8135
8373
|
ref,
|
8136
8374
|
name
|
@@ -8141,12 +8379,12 @@ var Checkbox2 = import_react40.default.forwardRef(
|
|
8141
8379
|
}
|
8142
8380
|
);
|
8143
8381
|
Checkbox2.displayName = "Checkbox";
|
8144
|
-
var CheckboxSkeleton = () => /* @__PURE__ */
|
8382
|
+
var CheckboxSkeleton = () => /* @__PURE__ */ import_react41.default.createElement("div", {
|
8145
8383
|
className: tw("flex gap-3")
|
8146
|
-
}, /* @__PURE__ */
|
8384
|
+
}, /* @__PURE__ */ import_react41.default.createElement(Skeleton, {
|
8147
8385
|
height: 20,
|
8148
8386
|
width: 20
|
8149
|
-
}), /* @__PURE__ */
|
8387
|
+
}), /* @__PURE__ */ import_react41.default.createElement(Skeleton, {
|
8150
8388
|
height: 20,
|
8151
8389
|
width: 150
|
8152
8390
|
}));
|
@@ -8154,14 +8392,14 @@ Checkbox2.Skeleton = CheckboxSkeleton;
|
|
8154
8392
|
Checkbox2.Skeleton.displayName = "Checkbox.Skeleton";
|
8155
8393
|
|
8156
8394
|
// src/molecules/CheckboxGroup/CheckboxGroup.tsx
|
8157
|
-
var
|
8158
|
-
var
|
8395
|
+
var import_react48 = __toESM(require("react"));
|
8396
|
+
var import_utils4 = require("@react-aria/utils");
|
8159
8397
|
|
8160
8398
|
// src/atoms/InputGroup/InputGroup.tsx
|
8161
|
-
var
|
8399
|
+
var import_react43 = __toESM(require("react"));
|
8162
8400
|
|
8163
8401
|
// src/molecules/Grid/Grid.tsx
|
8164
|
-
var
|
8402
|
+
var import_react42 = __toESM(require("react"));
|
8165
8403
|
var import_isEmpty = __toESM(require("lodash/isEmpty"));
|
8166
8404
|
var import_mapValues = __toESM(require("lodash/mapValues"));
|
8167
8405
|
var import_pick = __toESM(require("lodash/pick"));
|
@@ -8212,14 +8450,14 @@ var GridItem = Tailwindify(
|
|
8212
8450
|
gridRowEnd: rowEnd
|
8213
8451
|
});
|
8214
8452
|
const HtmlElement = htmlTag;
|
8215
|
-
return /* @__PURE__ */
|
8453
|
+
return /* @__PURE__ */ import_react42.default.createElement(HtmlElement, {
|
8216
8454
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
8217
8455
|
className
|
8218
8456
|
}, children);
|
8219
8457
|
}
|
8220
8458
|
);
|
8221
8459
|
var Grid = (props) => {
|
8222
|
-
return /* @__PURE__ */
|
8460
|
+
return /* @__PURE__ */ import_react42.default.createElement(GridComponent, __spreadValues({}, props));
|
8223
8461
|
};
|
8224
8462
|
var GridComponent = Tailwindify(
|
8225
8463
|
({
|
@@ -8273,12 +8511,13 @@ var GridComponent = Tailwindify(
|
|
8273
8511
|
gridRowEnd: rowEnd
|
8274
8512
|
});
|
8275
8513
|
const HtmlElement = htmlTag;
|
8276
|
-
return /* @__PURE__ */
|
8514
|
+
return /* @__PURE__ */ import_react42.default.createElement(HtmlElement, {
|
8277
8515
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
8278
8516
|
className
|
8279
8517
|
}, children);
|
8280
8518
|
}
|
8281
8519
|
);
|
8520
|
+
Grid.displayName = "Grid";
|
8282
8521
|
Grid.Item = GridItem;
|
8283
8522
|
Grid.Item.displayName = "Grid.Item";
|
8284
8523
|
|
@@ -8291,7 +8530,7 @@ var gridColumnStyles = {
|
|
8291
8530
|
};
|
8292
8531
|
var InputGroup = (_a) => {
|
8293
8532
|
var _b = _a, { cols = "1", children } = _b, rest = __objRest(_b, ["cols", "children"]);
|
8294
|
-
return /* @__PURE__ */
|
8533
|
+
return /* @__PURE__ */ import_react43.default.createElement(Grid, __spreadProps(__spreadValues({}, rest), {
|
8295
8534
|
display: "inline-grid",
|
8296
8535
|
colGap: "l4",
|
8297
8536
|
rowGap: "3",
|
@@ -8301,12 +8540,12 @@ var InputGroup = (_a) => {
|
|
8301
8540
|
};
|
8302
8541
|
|
8303
8542
|
// src/utils/form/Label/Label.tsx
|
8304
|
-
var
|
8543
|
+
var import_react47 = __toESM(require("react"));
|
8305
8544
|
|
8306
8545
|
// src/utils/form/FormControl/FormControl.tsx
|
8307
|
-
var
|
8546
|
+
var import_react44 = __toESM(require("react"));
|
8308
8547
|
var FormControl = ({ className, inline, children }) => {
|
8309
|
-
return /* @__PURE__ */
|
8548
|
+
return /* @__PURE__ */ import_react44.default.createElement(Flexbox, {
|
8310
8549
|
direction: "column",
|
8311
8550
|
display: inline ? "inline-flex" : "flex",
|
8312
8551
|
className
|
@@ -8314,14 +8553,14 @@ var FormControl = ({ className, inline, children }) => {
|
|
8314
8553
|
};
|
8315
8554
|
|
8316
8555
|
// src/utils/form/HelperText/HelperText.tsx
|
8317
|
-
var
|
8556
|
+
var import_react46 = __toESM(require("react"));
|
8318
8557
|
var import_classnames6 = __toESM(require("classnames"));
|
8319
8558
|
var import_isNumber4 = __toESM(require("lodash/isNumber"));
|
8320
8559
|
|
8321
8560
|
// src/utils/form/CharCounter/CharCounter.tsx
|
8322
|
-
var
|
8561
|
+
var import_react45 = __toESM(require("react"));
|
8323
8562
|
var CharCounter = ({ dense = true, length, maxLength, valid = true }) => {
|
8324
|
-
return /* @__PURE__ */
|
8563
|
+
return /* @__PURE__ */ import_react45.default.createElement("span", {
|
8325
8564
|
className: tw(
|
8326
8565
|
`whitespace-nowrap`,
|
8327
8566
|
valid ? "text-grey-50" : "text-error-70",
|
@@ -8343,34 +8582,34 @@ var HelperText = ({
|
|
8343
8582
|
const hasMaxLength = (0, import_isNumber4.default)(maxLength) && maxLength > 0;
|
8344
8583
|
const showMessage = hasError || hasMaxLength;
|
8345
8584
|
if (!showMessage) {
|
8346
|
-
return reserveSpaceForError ? /* @__PURE__ */
|
8585
|
+
return reserveSpaceForError ? /* @__PURE__ */ import_react46.default.createElement("p", {
|
8347
8586
|
className: tw("block mt-1 mb-3 typography-caption")
|
8348
8587
|
}, "\xA0") : null;
|
8349
8588
|
}
|
8350
|
-
return /* @__PURE__ */
|
8589
|
+
return /* @__PURE__ */ import_react46.default.createElement(Grid, {
|
8351
8590
|
cols: "1",
|
8352
8591
|
rows: "1",
|
8353
8592
|
colGap: "3",
|
8354
8593
|
alignItems: "start",
|
8355
8594
|
autoCols: "min",
|
8356
8595
|
className: tw("mt-1 mb-3")
|
8357
|
-
}, /* @__PURE__ */
|
8596
|
+
}, /* @__PURE__ */ import_react46.default.createElement(GridItem2, {
|
8358
8597
|
colStart: "1",
|
8359
8598
|
colEnd: "2"
|
8360
|
-
}, hasError && /* @__PURE__ */
|
8599
|
+
}, hasError && /* @__PURE__ */ import_react46.default.createElement("p", {
|
8361
8600
|
id: messageId,
|
8362
8601
|
className: tw("text-error-50 block typography-caption")
|
8363
|
-
}, helperText)), /* @__PURE__ */
|
8602
|
+
}, helperText)), /* @__PURE__ */ import_react46.default.createElement(GridItem2, {
|
8364
8603
|
colStart: "2",
|
8365
8604
|
colEnd: "3",
|
8366
8605
|
display: "flex"
|
8367
|
-
}, (0, import_isNumber4.default)(length) && hasMaxLength && /* @__PURE__ */
|
8606
|
+
}, (0, import_isNumber4.default)(length) && hasMaxLength && /* @__PURE__ */ import_react46.default.createElement(CharCounter, {
|
8368
8607
|
length,
|
8369
8608
|
maxLength,
|
8370
8609
|
valid: !error2
|
8371
8610
|
})));
|
8372
8611
|
};
|
8373
|
-
var Skeleton2 = ({ className, children }) => /* @__PURE__ */
|
8612
|
+
var Skeleton2 = ({ className, children }) => /* @__PURE__ */ import_react46.default.createElement("div", {
|
8374
8613
|
className: (0, import_classnames6.default)(className, "h-[25px]")
|
8375
8614
|
}, children);
|
8376
8615
|
HelperText.Skeleton = Skeleton2;
|
@@ -8386,40 +8625,40 @@ var LabelText = ({
|
|
8386
8625
|
helpTooltipPlacement,
|
8387
8626
|
description
|
8388
8627
|
}) => {
|
8389
|
-
return /* @__PURE__ */
|
8628
|
+
return /* @__PURE__ */ import_react47.default.createElement("span", {
|
8390
8629
|
className: tw("block mb-2")
|
8391
|
-
}, /* @__PURE__ */
|
8630
|
+
}, /* @__PURE__ */ import_react47.default.createElement("span", {
|
8392
8631
|
className: tw("inline-flex items-center typography-small-strong", {
|
8393
8632
|
"text-grey-70": variant === "default",
|
8394
8633
|
"text-error-50": variant === "error",
|
8395
8634
|
"text-grey-40": variant === "disabled"
|
8396
8635
|
})
|
8397
|
-
}, labelText, required && /* @__PURE__ */
|
8636
|
+
}, labelText, required && /* @__PURE__ */ import_react47.default.createElement("span", {
|
8398
8637
|
className: tw("text-error-50")
|
8399
|
-
}, "*"), helpTooltip && /* @__PURE__ */
|
8638
|
+
}, "*"), helpTooltip && /* @__PURE__ */ import_react47.default.createElement(Tooltip, {
|
8400
8639
|
content: helpTooltip,
|
8401
8640
|
placement: helpTooltipPlacement
|
8402
|
-
}, /* @__PURE__ */
|
8641
|
+
}, /* @__PURE__ */ import_react47.default.createElement("span", {
|
8403
8642
|
tabIndex: 0,
|
8404
8643
|
className: tw("text-grey-40 flex items-center cursor-pointer ml-2")
|
8405
|
-
}, /* @__PURE__ */
|
8644
|
+
}, /* @__PURE__ */ import_react47.default.createElement(InlineIcon, {
|
8406
8645
|
icon: import_questionMark2.default,
|
8407
8646
|
"data-testid": "icon-info"
|
8408
|
-
})))), description && /* @__PURE__ */
|
8647
|
+
})))), description && /* @__PURE__ */ import_react47.default.createElement("span", {
|
8409
8648
|
className: tw("block text-grey-50 typography-caption mt-1")
|
8410
8649
|
}, description));
|
8411
8650
|
};
|
8412
8651
|
var Label = (props) => {
|
8413
8652
|
const _a = props, { id, htmlFor, labelText, labelProps: _b = {} } = _a, labelProps = __objRest(_b, []), { "data-testid": dataTestid, children } = _a;
|
8414
|
-
return /* @__PURE__ */
|
8653
|
+
return /* @__PURE__ */ import_react47.default.createElement("label", __spreadValues({
|
8415
8654
|
id,
|
8416
8655
|
className: tw("w-full"),
|
8417
8656
|
"data-testid": dataTestid,
|
8418
8657
|
htmlFor
|
8419
|
-
}, labelProps), labelText && /* @__PURE__ */
|
8658
|
+
}, labelProps), labelText && /* @__PURE__ */ import_react47.default.createElement(LabelText, __spreadValues({}, props)), children);
|
8420
8659
|
};
|
8421
8660
|
var LabelSkeleton = () => {
|
8422
|
-
return /* @__PURE__ */
|
8661
|
+
return /* @__PURE__ */ import_react47.default.createElement(Skeleton, {
|
8423
8662
|
height: 20,
|
8424
8663
|
width: 100,
|
8425
8664
|
className: tw("mb-[7px]")
|
@@ -8454,17 +8693,17 @@ var LabelControl = (_a) => {
|
|
8454
8693
|
]);
|
8455
8694
|
const legacyError = error2 !== void 0 && valid === false;
|
8456
8695
|
const variant = !valid || legacyError ? "error" : disabled ? "disabled" : "default";
|
8457
|
-
return /* @__PURE__ */
|
8696
|
+
return /* @__PURE__ */ import_react47.default.createElement(FormControl, {
|
8458
8697
|
className
|
8459
|
-
}, !fieldset && /* @__PURE__ */
|
8698
|
+
}, !fieldset && /* @__PURE__ */ import_react47.default.createElement(Label, __spreadProps(__spreadValues({}, rest), {
|
8460
8699
|
variant
|
8461
|
-
}), children), fieldset && /* @__PURE__ */
|
8700
|
+
}), children), fieldset && /* @__PURE__ */ import_react47.default.createElement("fieldset", {
|
8462
8701
|
id: rest.id
|
8463
|
-
}, /* @__PURE__ */
|
8702
|
+
}, /* @__PURE__ */ import_react47.default.createElement("legend", {
|
8464
8703
|
className: tw("w-full mb-2")
|
8465
|
-
}, /* @__PURE__ */
|
8704
|
+
}, /* @__PURE__ */ import_react47.default.createElement(LabelText, __spreadProps(__spreadValues({}, rest), {
|
8466
8705
|
variant
|
8467
|
-
}))), children), /* @__PURE__ */
|
8706
|
+
}))), children), /* @__PURE__ */ import_react47.default.createElement(HelperText, {
|
8468
8707
|
messageId,
|
8469
8708
|
error: !valid,
|
8470
8709
|
helperText,
|
@@ -8473,7 +8712,7 @@ var LabelControl = (_a) => {
|
|
8473
8712
|
reserveSpaceForError
|
8474
8713
|
}));
|
8475
8714
|
};
|
8476
|
-
var LabelControlSkeleton = ({ children }) => /* @__PURE__ */
|
8715
|
+
var LabelControlSkeleton = ({ children }) => /* @__PURE__ */ import_react47.default.createElement("div", null, /* @__PURE__ */ import_react47.default.createElement(Label.Skeleton, null), children, /* @__PURE__ */ import_react47.default.createElement(HelperText.Skeleton, null));
|
8477
8716
|
LabelControl.Skeleton = LabelControlSkeleton;
|
8478
8717
|
var getLabelControlProps = (_a) => {
|
8479
8718
|
var _b = _a, {
|
@@ -8511,7 +8750,7 @@ var getLabelControlProps = (_a) => {
|
|
8511
8750
|
|
8512
8751
|
// src/molecules/CheckboxGroup/CheckboxGroup.tsx
|
8513
8752
|
var isCheckbox = (c) => {
|
8514
|
-
return
|
8753
|
+
return import_react48.default.isValidElement(c) && c.type === Checkbox2;
|
8515
8754
|
};
|
8516
8755
|
var CheckboxGroup = (_a) => {
|
8517
8756
|
var _b = _a, {
|
@@ -8530,11 +8769,11 @@ var CheckboxGroup = (_a) => {
|
|
8530
8769
|
"children"
|
8531
8770
|
]);
|
8532
8771
|
var _a2;
|
8533
|
-
const [selectedItems, setSelectedItems] = (0,
|
8772
|
+
const [selectedItems, setSelectedItems] = (0, import_react48.useState)((_a2 = value != null ? value : defaultValue) != null ? _a2 : []);
|
8534
8773
|
if (value !== void 0 && value !== selectedItems) {
|
8535
8774
|
setSelectedItems(value);
|
8536
8775
|
}
|
8537
|
-
const errorMessageId = (0,
|
8776
|
+
const errorMessageId = (0, import_utils4.useId)();
|
8538
8777
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
8539
8778
|
const labelControlProps = getLabelControlProps(props);
|
8540
8779
|
const handleChange = (e) => {
|
@@ -8543,13 +8782,13 @@ var CheckboxGroup = (_a) => {
|
|
8543
8782
|
setSelectedItems(updated);
|
8544
8783
|
onChange == null ? void 0 : onChange(updated);
|
8545
8784
|
};
|
8546
|
-
return /* @__PURE__ */
|
8785
|
+
return /* @__PURE__ */ import_react48.default.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
8547
8786
|
fieldset: true
|
8548
8787
|
}, labelControlProps), errorProps), {
|
8549
8788
|
className: "Aquarium-CheckboxGroup"
|
8550
|
-
}), /* @__PURE__ */
|
8789
|
+
}), /* @__PURE__ */ import_react48.default.createElement(InputGroup, {
|
8551
8790
|
cols
|
8552
|
-
},
|
8791
|
+
}, import_react48.default.Children.map(children, (c) => {
|
8553
8792
|
var _a3, _b2;
|
8554
8793
|
if (!isCheckbox(c)) {
|
8555
8794
|
return null;
|
@@ -8557,7 +8796,7 @@ var CheckboxGroup = (_a) => {
|
|
8557
8796
|
const str = (_a3 = c.props.value) == null ? void 0 : _a3.toString();
|
8558
8797
|
const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
|
8559
8798
|
const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
|
8560
|
-
return
|
8799
|
+
return import_react48.default.cloneElement(c, {
|
8561
8800
|
defaultChecked,
|
8562
8801
|
checked,
|
8563
8802
|
onChange: (_b2 = c.props.onChange) != null ? _b2 : handleChange,
|
@@ -8567,9 +8806,9 @@ var CheckboxGroup = (_a) => {
|
|
8567
8806
|
})));
|
8568
8807
|
};
|
8569
8808
|
var CheckboxGroupSkeleton = ({ options = 2 }) => {
|
8570
|
-
return /* @__PURE__ */
|
8809
|
+
return /* @__PURE__ */ import_react48.default.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ import_react48.default.createElement("div", {
|
8571
8810
|
className: tw("flex flex-wrap flex-col gap-2")
|
8572
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
8811
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ import_react48.default.createElement(Checkbox2.Skeleton, {
|
8573
8812
|
key
|
8574
8813
|
}))));
|
8575
8814
|
};
|
@@ -8577,12 +8816,12 @@ CheckboxGroup.Skeleton = CheckboxGroupSkeleton;
|
|
8577
8816
|
CheckboxGroup.Skeleton.displayName = "CheckboxGroup.Skeleton";
|
8578
8817
|
|
8579
8818
|
// src/molecules/ChoiceChip/ChoiceChip.tsx
|
8580
|
-
var
|
8819
|
+
var import_react49 = __toESM(require("react"));
|
8581
8820
|
var ChoiceChip = (_a) => {
|
8582
8821
|
var _b = _a, { text, dense, defaultValue, value, onChange } = _b, rest = __objRest(_b, ["text", "dense", "defaultValue", "value", "onChange"]);
|
8583
8822
|
var _a2;
|
8584
|
-
const [prevValue, setPrevValue] = (0,
|
8585
|
-
const [selected, setSelected] = (0,
|
8823
|
+
const [prevValue, setPrevValue] = (0, import_react49.useState)(value != null ? value : defaultValue);
|
8824
|
+
const [selected, setSelected] = (0, import_react49.useState)((_a2 = value != null ? value : defaultValue) != null ? _a2 : false);
|
8586
8825
|
if (value !== prevValue) {
|
8587
8826
|
setSelected(value != null ? value : false);
|
8588
8827
|
setPrevValue(value);
|
@@ -8591,7 +8830,7 @@ var ChoiceChip = (_a) => {
|
|
8591
8830
|
setSelected(!selected);
|
8592
8831
|
onChange == null ? void 0 : onChange(!selected);
|
8593
8832
|
};
|
8594
|
-
return /* @__PURE__ */
|
8833
|
+
return /* @__PURE__ */ import_react49.default.createElement("span", __spreadProps(__spreadValues({
|
8595
8834
|
role: "button",
|
8596
8835
|
"aria-pressed": selected
|
8597
8836
|
}, rest), {
|
@@ -8609,22 +8848,22 @@ var ChoiceChip = (_a) => {
|
|
8609
8848
|
};
|
8610
8849
|
|
8611
8850
|
// src/molecules/Combobox/Combobox.tsx
|
8612
|
-
var
|
8851
|
+
var import_react52 = __toESM(require("react"));
|
8613
8852
|
var import_overlays5 = require("@react-aria/overlays");
|
8853
|
+
var import_utils5 = require("@react-aria/utils");
|
8614
8854
|
var import_downshift = require("downshift");
|
8615
8855
|
var import_omit4 = __toESM(require("lodash/omit"));
|
8616
|
-
var import_uniqueId2 = __toESM(require("lodash/uniqueId"));
|
8617
8856
|
var import_match_sorter = require("match-sorter");
|
8618
8857
|
|
8619
8858
|
// src/molecules/Popover/PopoverOverlay.tsx
|
8620
|
-
var
|
8859
|
+
var import_react51 = __toESM(require("react"));
|
8621
8860
|
var import_overlays4 = require("@react-aria/overlays");
|
8622
8861
|
|
8623
8862
|
// src/atoms/Popover/Popover.tsx
|
8624
|
-
var
|
8625
|
-
var PopoverPanel =
|
8863
|
+
var import_react50 = __toESM(require("react"));
|
8864
|
+
var PopoverPanel = import_react50.default.forwardRef((_a, ref) => {
|
8626
8865
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
8627
|
-
return /* @__PURE__ */
|
8866
|
+
return /* @__PURE__ */ import_react50.default.createElement("div", __spreadValues({
|
8628
8867
|
ref,
|
8629
8868
|
className: classNames(
|
8630
8869
|
className,
|
@@ -8633,7 +8872,7 @@ var PopoverPanel = import_react49.default.forwardRef((_a, ref) => {
|
|
8633
8872
|
}, props), children);
|
8634
8873
|
});
|
8635
8874
|
PopoverPanel.displayName = "Popover.Panel";
|
8636
|
-
var PopoverUnderlay =
|
8875
|
+
var PopoverUnderlay = import_react50.default.forwardRef((props, ref) => /* @__PURE__ */ import_react50.default.createElement("div", __spreadProps(__spreadValues({
|
8637
8876
|
ref
|
8638
8877
|
}, props), {
|
8639
8878
|
className: tw("fixed inset-0")
|
@@ -8645,12 +8884,12 @@ var Popover = {
|
|
8645
8884
|
};
|
8646
8885
|
|
8647
8886
|
// src/molecules/Popover/PopoverOverlay.tsx
|
8648
|
-
var PopoverOverlay =
|
8649
|
-
return /* @__PURE__ */
|
8887
|
+
var PopoverOverlay = import_react51.default.forwardRef((props, ref) => {
|
8888
|
+
return /* @__PURE__ */ import_react51.default.createElement(import_overlays4.Overlay, null, /* @__PURE__ */ import_react51.default.createElement(Wrapper, __spreadValues({
|
8650
8889
|
ref
|
8651
8890
|
}, props)));
|
8652
8891
|
});
|
8653
|
-
var Wrapper =
|
8892
|
+
var Wrapper = import_react51.default.forwardRef(
|
8654
8893
|
(_a, ref) => {
|
8655
8894
|
var _b = _a, {
|
8656
8895
|
id,
|
@@ -8679,9 +8918,9 @@ var Wrapper = import_react50.default.forwardRef(
|
|
8679
8918
|
"children",
|
8680
8919
|
"popoverRef"
|
8681
8920
|
]);
|
8682
|
-
const popoverRef =
|
8683
|
-
|
8684
|
-
(0,
|
8921
|
+
const popoverRef = import_react51.default.useRef(null);
|
8922
|
+
import_react51.default.useImperativeHandle(ref, () => popoverRef.current);
|
8923
|
+
(0, import_react51.useEffect)(() => {
|
8685
8924
|
if (autoFocus && popoverRef.current) {
|
8686
8925
|
popoverRef.current.focus();
|
8687
8926
|
}
|
@@ -8694,7 +8933,7 @@ var Wrapper = import_react50.default.forwardRef(
|
|
8694
8933
|
}),
|
8695
8934
|
state
|
8696
8935
|
);
|
8697
|
-
return /* @__PURE__ */
|
8936
|
+
return /* @__PURE__ */ import_react51.default.createElement("div", null, !isNonModal && /* @__PURE__ */ import_react51.default.createElement(Popover.Underlay, __spreadValues({}, underlayProps)), /* @__PURE__ */ import_react51.default.createElement(Popover.Panel, __spreadProps(__spreadValues({
|
8698
8937
|
ref: popoverRef,
|
8699
8938
|
tabIndex: focusable ? 0 : -1,
|
8700
8939
|
role: role != null ? role : "presentation"
|
@@ -8702,7 +8941,7 @@ var Wrapper = import_react50.default.forwardRef(
|
|
8702
8941
|
id: id != null ? id : popoverProps.id,
|
8703
8942
|
style: __spreadValues(__spreadValues({}, popoverProps.style), style),
|
8704
8943
|
className
|
8705
|
-
}), children, /* @__PURE__ */
|
8944
|
+
}), children, /* @__PURE__ */ import_react51.default.createElement(import_overlays4.DismissButton, {
|
8706
8945
|
onDismiss: state.close
|
8707
8946
|
})));
|
8708
8947
|
}
|
@@ -8752,12 +8991,12 @@ var ComboboxBase = (_a) => {
|
|
8752
8991
|
"readOnly"
|
8753
8992
|
]);
|
8754
8993
|
var _a2;
|
8755
|
-
const popoverRef = (0,
|
8756
|
-
const targetRef = (0,
|
8757
|
-
const menuRef = (0,
|
8758
|
-
const inputRef = (0,
|
8759
|
-
const [inputItems, setInputItems] = (0,
|
8760
|
-
const [hasFocus, setFocus] = (0,
|
8994
|
+
const popoverRef = (0, import_react52.useRef)(null);
|
8995
|
+
const targetRef = (0, import_react52.useRef)(null);
|
8996
|
+
const menuRef = (0, import_react52.useRef)(null);
|
8997
|
+
const inputRef = (0, import_react52.useRef)(null);
|
8998
|
+
const [inputItems, setInputItems] = (0, import_react52.useState)(options);
|
8999
|
+
const [hasFocus, setFocus] = (0, import_react52.useState)(false);
|
8761
9000
|
const updateInputItems = (query) => {
|
8762
9001
|
const keys = typeof options[0] === "string" ? void 0 : optionKeys;
|
8763
9002
|
setInputItems(query ? (0, import_match_sorter.matchSorter)(options, query, { keys }) : options);
|
@@ -8803,10 +9042,10 @@ var ComboboxBase = (_a) => {
|
|
8803
9042
|
toggle: toggleMenu,
|
8804
9043
|
setOpen: (isOpen2) => isOpen2 ? openMenu() : closeMenu()
|
8805
9044
|
};
|
8806
|
-
(0,
|
9045
|
+
(0, import_react52.useEffect)(() => {
|
8807
9046
|
updateInputItems(inputValue);
|
8808
9047
|
}, [JSON.stringify(options)]);
|
8809
|
-
(0,
|
9048
|
+
(0, import_react52.useEffect)(() => {
|
8810
9049
|
if (state.isOpen && inputRef.current && popoverRef.current) {
|
8811
9050
|
return (0, import_overlays5.ariaHideOutside)([inputRef.current, popoverRef.current]);
|
8812
9051
|
}
|
@@ -8814,12 +9053,12 @@ var ComboboxBase = (_a) => {
|
|
8814
9053
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
8815
9054
|
const inputProps = getInputProps({ ref: inputRef, disabled: disabled || readOnly });
|
8816
9055
|
const hasNoResults = options.length === 0 || inputItems.length === 0;
|
8817
|
-
return /* @__PURE__ */
|
9056
|
+
return /* @__PURE__ */ import_react52.default.createElement("div", {
|
8818
9057
|
className: classNames("Aquarium-ComboboxBase", tw("relative"))
|
8819
|
-
}, /* @__PURE__ */
|
9058
|
+
}, /* @__PURE__ */ import_react52.default.createElement(Select.InputContainer, {
|
8820
9059
|
ref: targetRef,
|
8821
9060
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
8822
|
-
}, /* @__PURE__ */
|
9061
|
+
}, /* @__PURE__ */ import_react52.default.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
|
8823
9062
|
id,
|
8824
9063
|
ref: inputRef,
|
8825
9064
|
name,
|
@@ -8842,10 +9081,10 @@ var ComboboxBase = (_a) => {
|
|
8842
9081
|
(_a3 = inputProps.onKeyDown) == null ? void 0 : _a3.call(inputProps, e);
|
8843
9082
|
},
|
8844
9083
|
onKeyUp: (e) => e.stopPropagation()
|
8845
|
-
})), !readOnly && /* @__PURE__ */
|
9084
|
+
})), !readOnly && /* @__PURE__ */ import_react52.default.createElement(Select.Toggle, __spreadValues({
|
8846
9085
|
hasFocus,
|
8847
9086
|
isOpen
|
8848
|
-
}, getToggleButtonProps({ disabled })))), isOpen && /* @__PURE__ */
|
9087
|
+
}, getToggleButtonProps({ disabled })))), isOpen && /* @__PURE__ */ import_react52.default.createElement(PopoverOverlay, {
|
8849
9088
|
ref: popoverRef,
|
8850
9089
|
triggerRef: targetRef,
|
8851
9090
|
state,
|
@@ -8853,16 +9092,16 @@ var ComboboxBase = (_a) => {
|
|
8853
9092
|
shouldFlip: true,
|
8854
9093
|
isNonModal: true,
|
8855
9094
|
style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
|
8856
|
-
}, /* @__PURE__ */
|
9095
|
+
}, /* @__PURE__ */ import_react52.default.createElement(Select.Menu, __spreadValues({
|
8857
9096
|
ref: menuRef,
|
8858
9097
|
maxHeight
|
8859
|
-
}, menuProps), hasNoResults && /* @__PURE__ */
|
9098
|
+
}, menuProps), hasNoResults && /* @__PURE__ */ import_react52.default.createElement(Select.NoResults, null, emptyState), inputItems.map((item, index) => /* @__PURE__ */ import_react52.default.createElement(Select.Item, __spreadValues({
|
8860
9099
|
key: itemToString(item),
|
8861
9100
|
selected: item === selectedItem,
|
8862
9101
|
highlighted: index === highlightedIndex
|
8863
9102
|
}, getItemProps({ item, index, disabled: isOptionDisabled(item, index) })), renderOption(item))))));
|
8864
9103
|
};
|
8865
|
-
var ComboboxBaseSkeleton = () => /* @__PURE__ */
|
9104
|
+
var ComboboxBaseSkeleton = () => /* @__PURE__ */ import_react52.default.createElement(Skeleton, {
|
8866
9105
|
height: 38
|
8867
9106
|
});
|
8868
9107
|
ComboboxBase.Skeleton = ComboboxBaseSkeleton;
|
@@ -8877,32 +9116,33 @@ var Combobox = (_a) => {
|
|
8877
9116
|
"emptyState"
|
8878
9117
|
]);
|
8879
9118
|
var _a2;
|
8880
|
-
const
|
8881
|
-
const
|
9119
|
+
const defaultId = (0, import_utils5.useId)();
|
9120
|
+
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
9121
|
+
const errorMessageId = (0, import_utils5.useId)();
|
8882
9122
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
8883
9123
|
const labelControlProps = getLabelControlProps(props);
|
8884
9124
|
const baseProps = (0, import_omit4.default)(props, Object.keys(labelControlProps));
|
8885
|
-
return /* @__PURE__ */
|
8886
|
-
id: `${id
|
8887
|
-
htmlFor: `${id
|
9125
|
+
return /* @__PURE__ */ import_react52.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
9126
|
+
id: `${id}-label`,
|
9127
|
+
htmlFor: `${id}-input`,
|
8888
9128
|
messageId: errorMessageId
|
8889
9129
|
}, labelControlProps), {
|
8890
9130
|
className: "Aquarium-Combobox"
|
8891
|
-
}), /* @__PURE__ */
|
8892
|
-
id
|
9131
|
+
}), /* @__PURE__ */ import_react52.default.createElement(ComboboxBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
9132
|
+
id,
|
8893
9133
|
options,
|
8894
9134
|
emptyState,
|
8895
9135
|
disabled: props.disabled,
|
8896
9136
|
valid: props.valid
|
8897
9137
|
})));
|
8898
9138
|
};
|
8899
|
-
var ComboboxSkeleton = () => /* @__PURE__ */
|
9139
|
+
var ComboboxSkeleton = () => /* @__PURE__ */ import_react52.default.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ import_react52.default.createElement(ComboboxBase.Skeleton, null));
|
8900
9140
|
Combobox.Skeleton = ComboboxSkeleton;
|
8901
9141
|
Combobox.Skeleton.displayName = "Combobox.Skeleton";
|
8902
9142
|
|
8903
9143
|
// src/molecules/Container/Container.tsx
|
8904
|
-
var
|
8905
|
-
var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */
|
9144
|
+
var import_react53 = __toESM(require("react"));
|
9145
|
+
var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ import_react53.default.createElement(Box, {
|
8906
9146
|
marginLeft: "auto",
|
8907
9147
|
marginRight: "auto",
|
8908
9148
|
width: "full",
|
@@ -8917,54 +9157,55 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ import_react
|
|
8917
9157
|
}, children);
|
8918
9158
|
|
8919
9159
|
// src/molecules/DataList/DataList.tsx
|
8920
|
-
var
|
9160
|
+
var import_react72 = __toESM(require("react"));
|
8921
9161
|
var import_compact = __toESM(require("lodash/compact"));
|
8922
9162
|
var import_groupBy2 = __toESM(require("lodash/groupBy"));
|
8923
9163
|
var import_isFunction = __toESM(require("lodash/isFunction"));
|
8924
9164
|
|
8925
9165
|
// src/molecules/DropdownMenu/DropdownMenu.tsx
|
8926
|
-
var
|
9166
|
+
var import_react57 = __toESM(require("react"));
|
8927
9167
|
var import_i18n = require("@react-aria/i18n");
|
8928
9168
|
var import_interactions2 = require("@react-aria/interactions");
|
8929
9169
|
var import_menu2 = require("@react-aria/menu");
|
8930
9170
|
var import_separator = require("@react-aria/separator");
|
8931
|
-
var
|
9171
|
+
var import_utils7 = require("@react-aria/utils");
|
8932
9172
|
var import_collections = require("@react-stately/collections");
|
8933
9173
|
var import_menu3 = require("@react-stately/menu");
|
8934
9174
|
var import_tree = require("@react-stately/tree");
|
9175
|
+
var import_omit6 = __toESM(require("lodash/omit"));
|
8935
9176
|
|
8936
9177
|
// src/molecules/Input/Input.tsx
|
8937
|
-
var
|
9178
|
+
var import_react55 = __toESM(require("react"));
|
9179
|
+
var import_utils6 = require("@react-aria/utils");
|
8938
9180
|
var import_omit5 = __toESM(require("lodash/omit"));
|
8939
9181
|
var import_toString = __toESM(require("lodash/toString"));
|
8940
|
-
var import_uniqueId3 = __toESM(require("lodash/uniqueId"));
|
8941
9182
|
|
8942
9183
|
// src/utils/form/InputAdornment/InputAdornment.tsx
|
8943
|
-
var
|
9184
|
+
var import_react54 = __toESM(require("react"));
|
8944
9185
|
var import_cross5 = __toESM(require_cross());
|
8945
9186
|
var import_error3 = __toESM(require_error());
|
8946
9187
|
var import_search3 = __toESM(require_search());
|
8947
9188
|
var import_tick4 = __toESM(require_tick());
|
8948
9189
|
var InputAdornment = ({ placement = "right", className, dense, children }) => {
|
8949
|
-
return /* @__PURE__ */
|
9190
|
+
return /* @__PURE__ */ import_react54.default.createElement("span", {
|
8950
9191
|
className: classNames(className, "absolute inset-y-0 grow-0 text-grey-40 flex items-center mx-3", {
|
8951
9192
|
"right-0": placement === "right",
|
8952
9193
|
"left-0": placement === "left",
|
8953
9194
|
"typography-small": dense,
|
8954
9195
|
"typography-default-strong": !dense
|
8955
9196
|
})
|
8956
|
-
}, /* @__PURE__ */
|
9197
|
+
}, /* @__PURE__ */ import_react54.default.createElement(Flexbox, {
|
8957
9198
|
gap: "3",
|
8958
9199
|
wrap: "wrap"
|
8959
9200
|
}, children));
|
8960
9201
|
};
|
8961
|
-
var SearchIcon = ({ onClick }) => /* @__PURE__ */
|
9202
|
+
var SearchIcon = ({ onClick }) => /* @__PURE__ */ import_react54.default.createElement(Icon, {
|
8962
9203
|
icon: import_search3.default,
|
8963
9204
|
color: "grey-30",
|
8964
9205
|
"data-testid": "icon-search",
|
8965
9206
|
onClick
|
8966
9207
|
});
|
8967
|
-
var ResetIcon = ({ onClick }) => /* @__PURE__ */
|
9208
|
+
var ResetIcon = ({ onClick }) => /* @__PURE__ */ import_react54.default.createElement(Icon, {
|
8968
9209
|
className: "hover:cursor-pointer",
|
8969
9210
|
icon: import_cross5.default,
|
8970
9211
|
color: "grey-30",
|
@@ -8974,7 +9215,7 @@ var ResetIcon = ({ onClick }) => /* @__PURE__ */ import_react53.default.createEl
|
|
8974
9215
|
|
8975
9216
|
// src/molecules/Input/Input.tsx
|
8976
9217
|
var createInput = (displayName, opts = {}) => {
|
8977
|
-
const InputComponent = (0,
|
9218
|
+
const InputComponent = (0, import_react55.forwardRef)(
|
8978
9219
|
(_a, ref) => {
|
8979
9220
|
var _b = _a, {
|
8980
9221
|
type = "text",
|
@@ -8994,8 +9235,8 @@ var createInput = (displayName, opts = {}) => {
|
|
8994
9235
|
"readOnly"
|
8995
9236
|
]);
|
8996
9237
|
var _a2;
|
8997
|
-
const inputRef =
|
8998
|
-
(0,
|
9238
|
+
const inputRef = import_react55.default.useRef(null);
|
9239
|
+
(0, import_react55.useImperativeHandle)(ref, () => inputRef.current);
|
8999
9240
|
const handleReset = () => {
|
9000
9241
|
var _a3;
|
9001
9242
|
const el = inputRef.current;
|
@@ -9007,11 +9248,11 @@ var createInput = (displayName, opts = {}) => {
|
|
9007
9248
|
el.focus();
|
9008
9249
|
}
|
9009
9250
|
};
|
9010
|
-
return /* @__PURE__ */
|
9251
|
+
return /* @__PURE__ */ import_react55.default.createElement("span", {
|
9011
9252
|
className: classNames("Aquarium-InputBase", tw("relative block"))
|
9012
|
-
}, opts.adornment && /* @__PURE__ */
|
9253
|
+
}, opts.adornment && /* @__PURE__ */ import_react55.default.createElement(InputAdornment, {
|
9013
9254
|
placement: "left"
|
9014
|
-
}, opts.adornment), /* @__PURE__ */
|
9255
|
+
}, opts.adornment), /* @__PURE__ */ import_react55.default.createElement("input", __spreadProps(__spreadValues({
|
9015
9256
|
ref: inputRef,
|
9016
9257
|
type
|
9017
9258
|
}, props), {
|
@@ -9027,40 +9268,41 @@ var createInput = (displayName, opts = {}) => {
|
|
9027
9268
|
getCommonInputStyles({ readOnly, valid }),
|
9028
9269
|
props.className
|
9029
9270
|
)
|
9030
|
-
})), opts.canReset && (props.value || ((_a2 = inputRef.current) == null ? void 0 : _a2.value)) && /* @__PURE__ */
|
9271
|
+
})), opts.canReset && (props.value || ((_a2 = inputRef.current) == null ? void 0 : _a2.value)) && /* @__PURE__ */ import_react55.default.createElement(InputAdornment, null, /* @__PURE__ */ import_react55.default.createElement("button", {
|
9031
9272
|
"aria-label": "reset search",
|
9032
9273
|
onClick: handleReset
|
9033
|
-
}, /* @__PURE__ */
|
9274
|
+
}, /* @__PURE__ */ import_react55.default.createElement(ResetIcon, null))), !opts.canReset && endAdornment && /* @__PURE__ */ import_react55.default.createElement(InputAdornment, null, endAdornment));
|
9034
9275
|
}
|
9035
9276
|
);
|
9036
9277
|
InputComponent.displayName = displayName;
|
9037
|
-
InputComponent.Skeleton = () => /* @__PURE__ */
|
9278
|
+
InputComponent.Skeleton = () => /* @__PURE__ */ import_react55.default.createElement(Skeleton, {
|
9038
9279
|
height: 38
|
9039
9280
|
});
|
9040
9281
|
return InputComponent;
|
9041
9282
|
};
|
9042
9283
|
var InputBase = createInput("InputBase");
|
9043
|
-
var SearchInput = createInput("SearchInput", { adornment: /* @__PURE__ */
|
9044
|
-
var Input2 =
|
9284
|
+
var SearchInput = createInput("SearchInput", { adornment: /* @__PURE__ */ import_react55.default.createElement(SearchIcon, null), canReset: true });
|
9285
|
+
var Input2 = import_react55.default.forwardRef((_a, ref) => {
|
9045
9286
|
var _b = _a, { readOnly = false } = _b, props = __objRest(_b, ["readOnly"]);
|
9046
9287
|
var _a2, _b2, _c;
|
9047
|
-
const [value, setValue] = (0,
|
9048
|
-
const
|
9049
|
-
const
|
9288
|
+
const [value, setValue] = (0, import_react55.useState)((_b2 = (_a2 = props.value) != null ? _a2 : props.defaultValue) != null ? _b2 : "");
|
9289
|
+
const defaultId = (0, import_utils6.useId)();
|
9290
|
+
const id = (_c = props.id) != null ? _c : defaultId;
|
9291
|
+
const errorMessageId = (0, import_utils6.useId)();
|
9050
9292
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
9051
9293
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
9052
9294
|
const baseProps = (0, import_omit5.default)(props, Object.keys(labelControlProps));
|
9053
|
-
return /* @__PURE__ */
|
9054
|
-
id: `${id
|
9055
|
-
htmlFor: id
|
9295
|
+
return /* @__PURE__ */ import_react55.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
9296
|
+
id: `${id}-label`,
|
9297
|
+
htmlFor: id,
|
9056
9298
|
messageId: errorMessageId,
|
9057
9299
|
length: value !== void 0 ? (0, import_toString.default)(value).length : void 0
|
9058
9300
|
}, labelControlProps), {
|
9059
9301
|
className: "Aquarium-Input"
|
9060
|
-
}), /* @__PURE__ */
|
9302
|
+
}), /* @__PURE__ */ import_react55.default.createElement(InputBase, __spreadProps(__spreadValues(__spreadValues({
|
9061
9303
|
ref
|
9062
9304
|
}, baseProps), errorProps), {
|
9063
|
-
id
|
9305
|
+
id,
|
9064
9306
|
"data-testid": dataTestId,
|
9065
9307
|
onChange: (e) => {
|
9066
9308
|
var _a3;
|
@@ -9075,42 +9317,42 @@ var Input2 = import_react54.default.forwardRef((_a, ref) => {
|
|
9075
9317
|
})));
|
9076
9318
|
});
|
9077
9319
|
Input2.displayName = "Input";
|
9078
|
-
Input2.Skeleton = () => /* @__PURE__ */
|
9320
|
+
Input2.Skeleton = () => /* @__PURE__ */ import_react55.default.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ import_react55.default.createElement(InputBase.Skeleton, null));
|
9079
9321
|
Input2.Skeleton.displayName = "Input.Skeleton";
|
9080
9322
|
|
9081
9323
|
// src/atoms/DropdownMenu/DropdownMenu.tsx
|
9082
|
-
var
|
9324
|
+
var import_react56 = __toESM(require("react"));
|
9083
9325
|
var import_tick5 = __toESM(require_tick());
|
9084
|
-
var DropdownMenu =
|
9326
|
+
var DropdownMenu = import_react56.default.forwardRef(
|
9085
9327
|
(_a, ref) => {
|
9086
9328
|
var _b = _a, { maxHeight = "450px", minWidth = "125px", maxWidth, className, children } = _b, props = __objRest(_b, ["maxHeight", "minWidth", "maxWidth", "className", "children"]);
|
9087
|
-
return /* @__PURE__ */
|
9329
|
+
return /* @__PURE__ */ import_react56.default.createElement("div", __spreadValues({
|
9088
9330
|
ref,
|
9089
9331
|
style: { maxHeight, minWidth, maxWidth },
|
9090
9332
|
className: classNames(className, "bg-white w-full flex flex-col overflow-x-hidden typography-small text-grey-70")
|
9091
9333
|
}, props), children);
|
9092
9334
|
}
|
9093
9335
|
);
|
9094
|
-
var ContentContainer = ({ children }) => /* @__PURE__ */
|
9336
|
+
var ContentContainer = ({ children }) => /* @__PURE__ */ import_react56.default.createElement("div", {
|
9095
9337
|
className: tw("p-3 overflow-y-auto overflow-x-hidden")
|
9096
9338
|
}, children);
|
9097
9339
|
DropdownMenu.ContentContainer = ContentContainer;
|
9098
|
-
var List =
|
9340
|
+
var List = import_react56.default.forwardRef(
|
9099
9341
|
(_a, ref) => {
|
9100
9342
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
9101
|
-
return /* @__PURE__ */
|
9343
|
+
return /* @__PURE__ */ import_react56.default.createElement("ul", __spreadValues({
|
9102
9344
|
ref,
|
9103
9345
|
className: classNames(className, "outline-none ring-0")
|
9104
9346
|
}, props), children);
|
9105
9347
|
}
|
9106
9348
|
);
|
9107
9349
|
DropdownMenu.List = List;
|
9108
|
-
var Group2 =
|
9350
|
+
var Group2 = import_react56.default.forwardRef(
|
9109
9351
|
(_a, ref) => {
|
9110
9352
|
var _b = _a, { className, title, titleProps, children } = _b, props = __objRest(_b, ["className", "title", "titleProps", "children"]);
|
9111
|
-
return /* @__PURE__ */
|
9353
|
+
return /* @__PURE__ */ import_react56.default.createElement("li", __spreadValues({
|
9112
9354
|
ref
|
9113
|
-
}, props), title && /* @__PURE__ */
|
9355
|
+
}, props), title && /* @__PURE__ */ import_react56.default.createElement("div", __spreadValues({
|
9114
9356
|
className: classNames(className, "p-3 text-grey-40 uppercase cursor-default typography-caption", {
|
9115
9357
|
"text-grey-20": props.disabled
|
9116
9358
|
})
|
@@ -9118,10 +9360,10 @@ var Group2 = import_react55.default.forwardRef(
|
|
9118
9360
|
}
|
9119
9361
|
);
|
9120
9362
|
DropdownMenu.Group = Group2;
|
9121
|
-
var Item2 =
|
9363
|
+
var Item2 = import_react56.default.forwardRef(
|
9122
9364
|
(_a, ref) => {
|
9123
9365
|
var _b = _a, { kind, highlighted, selected, className, icon, showNotification = false, children } = _b, props = __objRest(_b, ["kind", "highlighted", "selected", "className", "icon", "showNotification", "children"]);
|
9124
|
-
return /* @__PURE__ */
|
9366
|
+
return /* @__PURE__ */ import_react56.default.createElement("li", __spreadValues({
|
9125
9367
|
ref,
|
9126
9368
|
className: classNames(className, "flex items-center gap-x-3 p-3 outline-none", {
|
9127
9369
|
"cursor-pointer hover:bg-grey-0": !props.disabled,
|
@@ -9129,32 +9371,32 @@ var Item2 = import_react55.default.forwardRef(
|
|
9129
9371
|
"text-primary-80": kind === "action",
|
9130
9372
|
"text-grey-20 cursor-not-allowed": props.disabled
|
9131
9373
|
})
|
9132
|
-
}, props), icon && showNotification && /* @__PURE__ */
|
9374
|
+
}, props), icon && showNotification && /* @__PURE__ */ import_react56.default.createElement(Badge.Notification, null, /* @__PURE__ */ import_react56.default.createElement(InlineIcon, {
|
9133
9375
|
icon
|
9134
|
-
})), icon && !showNotification && /* @__PURE__ */
|
9376
|
+
})), icon && !showNotification && /* @__PURE__ */ import_react56.default.createElement(InlineIcon, {
|
9135
9377
|
icon
|
9136
|
-
}), /* @__PURE__ */
|
9378
|
+
}), /* @__PURE__ */ import_react56.default.createElement("span", {
|
9137
9379
|
className: tw("grow")
|
9138
|
-
}, children), selected && /* @__PURE__ */
|
9380
|
+
}, children), selected && /* @__PURE__ */ import_react56.default.createElement(InlineIcon, {
|
9139
9381
|
icon: import_tick5.default
|
9140
9382
|
}));
|
9141
9383
|
}
|
9142
9384
|
);
|
9143
9385
|
DropdownMenu.Item = Item2;
|
9144
|
-
var Description = ({ disabled, children }) => /* @__PURE__ */
|
9386
|
+
var Description = ({ disabled, children }) => /* @__PURE__ */ import_react56.default.createElement(Typography2.Caption, {
|
9145
9387
|
color: disabled ? "grey-20" : "grey-40"
|
9146
9388
|
}, children);
|
9147
9389
|
DropdownMenu.Description = Description;
|
9148
9390
|
var Separator = (_a) => {
|
9149
9391
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
9150
|
-
return /* @__PURE__ */
|
9392
|
+
return /* @__PURE__ */ import_react56.default.createElement("li", __spreadProps(__spreadValues({}, props), {
|
9151
9393
|
className: classNames(className, tw("m-3 block bg-grey-5 h-[1px]"))
|
9152
9394
|
}));
|
9153
9395
|
};
|
9154
9396
|
DropdownMenu.Separator = Separator;
|
9155
9397
|
var EmptyStateContainer2 = (_a) => {
|
9156
9398
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
9157
|
-
return /* @__PURE__ */
|
9399
|
+
return /* @__PURE__ */ import_react56.default.createElement("div", __spreadValues({
|
9158
9400
|
className: classNames(tw("border border-dashed border-grey-10 p-3"), className)
|
9159
9401
|
}, props), children);
|
9160
9402
|
};
|
@@ -9210,20 +9452,20 @@ var DropdownMenu2 = (_a) => {
|
|
9210
9452
|
"footer",
|
9211
9453
|
"children"
|
9212
9454
|
]);
|
9213
|
-
const triggerRef =
|
9455
|
+
const triggerRef = import_react57.default.useRef(null);
|
9214
9456
|
const [trigger, items] = extractTriggerAndItems(children);
|
9215
9457
|
const state = (0, import_menu3.useMenuTriggerState)(props);
|
9216
9458
|
const { menuTriggerProps, menuProps } = (0, import_menu2.useMenuTrigger)({}, state, triggerRef);
|
9217
|
-
return /* @__PURE__ */
|
9459
|
+
return /* @__PURE__ */ import_react57.default.createElement("div", null, /* @__PURE__ */ import_react57.default.createElement(import_interactions2.PressResponder, __spreadValues({
|
9218
9460
|
ref: triggerRef,
|
9219
9461
|
onPress: () => state.toggle()
|
9220
|
-
}, menuTriggerProps), /* @__PURE__ */
|
9462
|
+
}, (0, import_omit6.default)(menuTriggerProps, "id")), /* @__PURE__ */ import_react57.default.createElement(TriggerWrapper, null, trigger.props.children)), state.isOpen && /* @__PURE__ */ import_react57.default.createElement(PopoverOverlay, {
|
9221
9463
|
className: "Aquarium-DropdownMenu",
|
9222
9464
|
triggerRef,
|
9223
9465
|
state,
|
9224
9466
|
placement,
|
9225
9467
|
focusable: false
|
9226
|
-
}, /* @__PURE__ */
|
9468
|
+
}, /* @__PURE__ */ import_react57.default.createElement(MenuWrapper, __spreadValues({
|
9227
9469
|
onAction,
|
9228
9470
|
selectionMode,
|
9229
9471
|
selection,
|
@@ -9249,13 +9491,13 @@ DropdownMenu2.Section = import_collections.Section;
|
|
9249
9491
|
DropdownMenu2.Section.displayName = "DropdownMenu.Section";
|
9250
9492
|
var TriggerWrapper = (_a) => {
|
9251
9493
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
9252
|
-
const ref =
|
9494
|
+
const ref = import_react57.default.useRef(null);
|
9253
9495
|
const { pressProps } = (0, import_interactions2.usePress)(__spreadProps(__spreadValues({}, props), { ref }));
|
9254
|
-
const trigger =
|
9255
|
-
if (!trigger || !
|
9496
|
+
const trigger = import_react57.default.Children.only(children);
|
9497
|
+
if (!trigger || !import_react57.default.isValidElement(trigger)) {
|
9256
9498
|
throw new Error("<DropdownMenu.Trigger> must have valid child");
|
9257
9499
|
}
|
9258
|
-
return
|
9500
|
+
return import_react57.default.cloneElement(trigger, __spreadValues({ ref }, (0, import_utils7.mergeProps)(pressProps, props)));
|
9259
9501
|
};
|
9260
9502
|
var isSectionNode = (item) => item.type === "section";
|
9261
9503
|
var isItemNode = (item) => item.type === "item";
|
@@ -9277,7 +9519,7 @@ var MenuWrapper = (_a) => {
|
|
9277
9519
|
"header",
|
9278
9520
|
"footer"
|
9279
9521
|
]);
|
9280
|
-
const ref =
|
9522
|
+
const ref = import_react57.default.useRef(null);
|
9281
9523
|
const disabledKeys = getDisabledItemKeys(props.children);
|
9282
9524
|
const state = (0, import_tree.useTreeState)(__spreadValues({
|
9283
9525
|
disabledKeys,
|
@@ -9285,30 +9527,30 @@ var MenuWrapper = (_a) => {
|
|
9285
9527
|
}, props));
|
9286
9528
|
const { menuProps } = (0, import_menu2.useMenu)(props, state, ref);
|
9287
9529
|
const { contains } = (0, import_i18n.useFilter)({ sensitivity: "base" });
|
9288
|
-
const [search, setSearch] =
|
9289
|
-
const filteredCollection =
|
9530
|
+
const [search, setSearch] = import_react57.default.useState("");
|
9531
|
+
const filteredCollection = import_react57.default.useMemo(
|
9290
9532
|
() => searchable ? filterCollection(state.collection, search, contains) : state.collection,
|
9291
9533
|
[searchable, state.collection, search, contains]
|
9292
9534
|
);
|
9293
|
-
return /* @__PURE__ */
|
9535
|
+
return /* @__PURE__ */ import_react57.default.createElement(DropdownMenu, {
|
9294
9536
|
minWidth: minWidth !== void 0 ? `${minWidth}px` : void 0,
|
9295
9537
|
maxWidth: maxWidth !== void 0 ? `${maxWidth}px` : void 0
|
9296
|
-
}, header, /* @__PURE__ */
|
9538
|
+
}, header, /* @__PURE__ */ import_react57.default.createElement(DropdownMenu.ContentContainer, null, searchable && /* @__PURE__ */ import_react57.default.createElement(SearchInput, {
|
9297
9539
|
"aria-label": "search",
|
9298
9540
|
value: search,
|
9299
9541
|
onChange: (e) => setSearch(e.target.value),
|
9300
9542
|
className: tw("mb-5")
|
9301
|
-
}), filteredCollection.size === 0 && emptyState && /* @__PURE__ */
|
9543
|
+
}), filteredCollection.size === 0 && emptyState && /* @__PURE__ */ import_react57.default.createElement(DropdownMenu.EmptyStateContainer, null, emptyState), /* @__PURE__ */ import_react57.default.createElement(DropdownMenu.List, __spreadValues({
|
9302
9544
|
ref
|
9303
9545
|
}, menuProps), Array.from(filteredCollection).map((item) => {
|
9304
9546
|
if (isSectionNode(item)) {
|
9305
|
-
return /* @__PURE__ */
|
9547
|
+
return /* @__PURE__ */ import_react57.default.createElement(SectionWrapper, {
|
9306
9548
|
key: item.key,
|
9307
9549
|
section: item,
|
9308
9550
|
state
|
9309
9551
|
});
|
9310
9552
|
} else if (isItemNode(item)) {
|
9311
|
-
return /* @__PURE__ */
|
9553
|
+
return /* @__PURE__ */ import_react57.default.createElement(ItemWrapper, {
|
9312
9554
|
key: item.key,
|
9313
9555
|
item,
|
9314
9556
|
state
|
@@ -9317,14 +9559,14 @@ var MenuWrapper = (_a) => {
|
|
9317
9559
|
}))), footer);
|
9318
9560
|
};
|
9319
9561
|
var ItemWrapper = ({ item, state }) => {
|
9320
|
-
const ref =
|
9562
|
+
const ref = import_react57.default.useRef(null);
|
9321
9563
|
const { menuItemProps, descriptionProps, isSelected, isFocused, isDisabled } = (0, import_menu2.useMenuItem)(
|
9322
9564
|
{ key: item.key, closeOnSelect: item.props.closeOnSelect },
|
9323
9565
|
state,
|
9324
9566
|
ref
|
9325
9567
|
);
|
9326
9568
|
const { icon, description, kind = "default", showNotification = false } = item.props;
|
9327
|
-
return /* @__PURE__ */
|
9569
|
+
return /* @__PURE__ */ import_react57.default.createElement(DropdownMenu.Item, __spreadProps(__spreadValues({
|
9328
9570
|
ref
|
9329
9571
|
}, menuItemProps), {
|
9330
9572
|
kind,
|
@@ -9333,7 +9575,7 @@ var ItemWrapper = ({ item, state }) => {
|
|
9333
9575
|
disabled: isDisabled,
|
9334
9576
|
icon,
|
9335
9577
|
showNotification
|
9336
|
-
}), item.rendered, description && /* @__PURE__ */
|
9578
|
+
}), item.rendered, description && /* @__PURE__ */ import_react57.default.createElement(DropdownMenu.Description, __spreadValues({
|
9337
9579
|
disabled: isDisabled
|
9338
9580
|
}, descriptionProps), description));
|
9339
9581
|
};
|
@@ -9345,24 +9587,24 @@ var SectionWrapper = ({ section, state }) => {
|
|
9345
9587
|
const { separatorProps } = (0, import_separator.useSeparator)({
|
9346
9588
|
elementType: "li"
|
9347
9589
|
});
|
9348
|
-
return /* @__PURE__ */
|
9590
|
+
return /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, section.key !== state.collection.getFirstKey() && /* @__PURE__ */ import_react57.default.createElement(DropdownMenu.Separator, __spreadValues({}, separatorProps)), /* @__PURE__ */ import_react57.default.createElement(DropdownMenu.Group, __spreadValues({
|
9349
9591
|
title: section.rendered,
|
9350
9592
|
titleProps: headingProps
|
9351
|
-
}, itemProps), /* @__PURE__ */
|
9593
|
+
}, itemProps), /* @__PURE__ */ import_react57.default.createElement("ul", __spreadValues({}, groupProps), Array.from(section.childNodes).map((node) => /* @__PURE__ */ import_react57.default.createElement(ItemWrapper, {
|
9352
9594
|
key: node.key,
|
9353
9595
|
item: node,
|
9354
9596
|
state
|
9355
9597
|
})))));
|
9356
9598
|
};
|
9357
9599
|
var extractTriggerAndItems = (children) => {
|
9358
|
-
const [trigger, items] =
|
9600
|
+
const [trigger, items] = import_react57.default.Children.toArray(children);
|
9359
9601
|
if (!isComponentType(trigger, MenuTrigger) || !isComponentType(items, MenuItems)) {
|
9360
9602
|
throw new Error("<DropdownMenu> must have <DropdownMenu.Trigger> and <DropdownMenu.Items> defined");
|
9361
9603
|
}
|
9362
9604
|
return [trigger, items];
|
9363
9605
|
};
|
9364
9606
|
var getDisabledItemKeys = (children) => {
|
9365
|
-
const keys =
|
9607
|
+
const keys = import_react57.default.Children.map(children, (child) => {
|
9366
9608
|
var _a, _b;
|
9367
9609
|
if (!child || typeof child === "function") {
|
9368
9610
|
return null;
|
@@ -9379,21 +9621,21 @@ var getDisabledItemKeys = (children) => {
|
|
9379
9621
|
};
|
9380
9622
|
|
9381
9623
|
// src/molecules/List/List.tsx
|
9382
|
-
var
|
9624
|
+
var import_react61 = __toESM(require("react"));
|
9383
9625
|
var import_isObject = __toESM(require("lodash/isObject"));
|
9384
9626
|
|
9385
9627
|
// src/molecules/Pagination/Pagination.tsx
|
9386
|
-
var
|
9628
|
+
var import_react59 = __toESM(require("react"));
|
9387
9629
|
var import_clamp = __toESM(require("lodash/clamp"));
|
9388
9630
|
|
9389
9631
|
// src/molecules/Select/Select.tsx
|
9390
|
-
var
|
9632
|
+
var import_react58 = __toESM(require("react"));
|
9633
|
+
var import_utils10 = require("@react-aria/utils");
|
9391
9634
|
var import_downshift2 = require("downshift");
|
9392
9635
|
var import_defaults = __toESM(require("lodash/defaults"));
|
9393
9636
|
var import_isArray = __toESM(require("lodash/isArray"));
|
9394
9637
|
var import_isNil = __toESM(require("lodash/isNil"));
|
9395
|
-
var
|
9396
|
-
var import_uniqueId4 = __toESM(require("lodash/uniqueId"));
|
9638
|
+
var import_omit7 = __toESM(require("lodash/omit"));
|
9397
9639
|
var hasIconProperty = (val) => {
|
9398
9640
|
var _a;
|
9399
9641
|
return typeof val === "string" || ((_a = val == null ? void 0 : val.icon) == null ? void 0 : _a.body) !== void 0;
|
@@ -9403,10 +9645,10 @@ var hasOptionGroups = (val) => {
|
|
9403
9645
|
};
|
9404
9646
|
var defaultRenderOption = (item, props, { selectedItem }, { getOptionKey, getValue, optionToString = getOptionLabelBuiltin }) => {
|
9405
9647
|
var _a, _b;
|
9406
|
-
return /* @__PURE__ */
|
9648
|
+
return /* @__PURE__ */ import_react58.default.createElement(Select.Item, __spreadValues({
|
9407
9649
|
key: (_b = (_a = getOptionKey == null ? void 0 : getOptionKey(item)) != null ? _a : getValue == null ? void 0 : getValue(item)) != null ? _b : optionToString(item),
|
9408
9650
|
selected: item === selectedItem
|
9409
|
-
}, props), hasIconProperty(item) && /* @__PURE__ */
|
9651
|
+
}, props), hasIconProperty(item) && /* @__PURE__ */ import_react58.default.createElement(InlineIcon, {
|
9410
9652
|
icon: item.icon
|
9411
9653
|
}), optionToString(item));
|
9412
9654
|
};
|
@@ -9477,9 +9719,9 @@ var _SelectBase = (props) => {
|
|
9477
9719
|
"children",
|
9478
9720
|
"labelWrapper"
|
9479
9721
|
]);
|
9480
|
-
const [hasFocus, setFocus] = (0,
|
9481
|
-
const targetRef = (0,
|
9482
|
-
const menuRef = (0,
|
9722
|
+
const [hasFocus, setFocus] = (0, import_react58.useState)(false);
|
9723
|
+
const targetRef = (0, import_react58.useRef)(null);
|
9724
|
+
const menuRef = (0, import_react58.useRef)(null);
|
9483
9725
|
const items = hasOptionGroups(options) ? options.flatMap((g) => g.options) : options;
|
9484
9726
|
const findItemByValue = (val) => {
|
9485
9727
|
if (val === null) {
|
@@ -9525,13 +9767,13 @@ var _SelectBase = (props) => {
|
|
9525
9767
|
},
|
9526
9768
|
withDefaults
|
9527
9769
|
);
|
9528
|
-
const renderGroup = (group) => /* @__PURE__ */
|
9770
|
+
const renderGroup = (group) => /* @__PURE__ */ import_react58.default.createElement(import_react58.default.Fragment, {
|
9529
9771
|
key: group.label
|
9530
|
-
}, /* @__PURE__ */
|
9531
|
-
const input = /* @__PURE__ */
|
9772
|
+
}, /* @__PURE__ */ import_react58.default.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, items.indexOf(opt))));
|
9773
|
+
const input = /* @__PURE__ */ import_react58.default.createElement(Select.InputContainer, __spreadProps(__spreadValues({}, getToggleButtonProps({ disabled: disabled || readOnly, ref: targetRef })), {
|
9532
9774
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default",
|
9533
9775
|
tabIndex: 0
|
9534
|
-
}), /* @__PURE__ */
|
9776
|
+
}), /* @__PURE__ */ import_react58.default.createElement(Select.Input, __spreadProps(__spreadValues({
|
9535
9777
|
id,
|
9536
9778
|
name
|
9537
9779
|
}, rest), {
|
@@ -9543,26 +9785,26 @@ var _SelectBase = (props) => {
|
|
9543
9785
|
tabIndex: -1,
|
9544
9786
|
onFocus: () => setFocus(true),
|
9545
9787
|
onBlur: () => setFocus(false)
|
9546
|
-
})), !readOnly && /* @__PURE__ */
|
9788
|
+
})), !readOnly && /* @__PURE__ */ import_react58.default.createElement(Select.Toggle, {
|
9547
9789
|
disabled,
|
9548
9790
|
isOpen,
|
9549
9791
|
tabIndex: -1
|
9550
9792
|
}));
|
9551
9793
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
9552
|
-
return /* @__PURE__ */
|
9794
|
+
return /* @__PURE__ */ import_react58.default.createElement("div", {
|
9553
9795
|
className: classNames("Aquarium-SelectBase", tw("relative"))
|
9554
|
-
}, labelWrapper ?
|
9796
|
+
}, labelWrapper ? import_react58.default.cloneElement(labelWrapper, { children: input }) : input, isOpen && /* @__PURE__ */ import_react58.default.createElement(PopoverOverlay, {
|
9555
9797
|
state,
|
9556
9798
|
triggerRef: targetRef,
|
9557
9799
|
placement: "bottom-left",
|
9558
9800
|
shouldFlip: true,
|
9559
9801
|
style: { width: (_b = targetRef.current) == null ? void 0 : _b.offsetWidth }
|
9560
|
-
}, /* @__PURE__ */
|
9802
|
+
}, /* @__PURE__ */ import_react58.default.createElement(Select.Menu, __spreadValues({
|
9561
9803
|
ref: menuRef,
|
9562
9804
|
maxHeight
|
9563
|
-
}, menuProps), options.length === 0 && /* @__PURE__ */
|
9805
|
+
}, menuProps), options.length === 0 && /* @__PURE__ */ import_react58.default.createElement(Select.EmptyStateContainer, null, emptyState), options.length > 0 && !hasOptionGroups(options) && options.map(renderItem), options.length > 0 && hasOptionGroups(options) && options.map(renderGroup), actions.length > 0 && /* @__PURE__ */ import_react58.default.createElement(import_react58.default.Fragment, null, /* @__PURE__ */ import_react58.default.createElement(Select.Divider, {
|
9564
9806
|
onMouseOver: () => setHighlightedIndex(-1)
|
9565
|
-
}), actions.map((act, index) => /* @__PURE__ */
|
9807
|
+
}), actions.map((act, index) => /* @__PURE__ */ import_react58.default.createElement(Select.ActionItem, __spreadProps(__spreadValues({
|
9566
9808
|
key: `${index}`
|
9567
9809
|
}, act), {
|
9568
9810
|
onMouseOver: () => setHighlightedIndex(-1),
|
@@ -9572,10 +9814,10 @@ var _SelectBase = (props) => {
|
|
9572
9814
|
}
|
9573
9815
|
}), act.label))))));
|
9574
9816
|
};
|
9575
|
-
var SelectBase = (props) => /* @__PURE__ */
|
9817
|
+
var SelectBase = (props) => /* @__PURE__ */ import_react58.default.createElement(_SelectBase, __spreadProps(__spreadValues({}, props), {
|
9576
9818
|
labelWrapper: void 0
|
9577
9819
|
}));
|
9578
|
-
var SelectBaseSkeleton = () => /* @__PURE__ */
|
9820
|
+
var SelectBaseSkeleton = () => /* @__PURE__ */ import_react58.default.createElement(Skeleton, {
|
9579
9821
|
height: 38
|
9580
9822
|
});
|
9581
9823
|
SelectBase.Skeleton = SelectBaseSkeleton;
|
@@ -9586,28 +9828,29 @@ var Select2 = (_a) => {
|
|
9586
9828
|
"options"
|
9587
9829
|
]);
|
9588
9830
|
var _a2;
|
9589
|
-
const
|
9590
|
-
const
|
9831
|
+
const defaultId = (0, import_utils10.useId)();
|
9832
|
+
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
9833
|
+
const errorMessageId = (0, import_utils10.useId)();
|
9591
9834
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
9592
9835
|
const labelProps = getLabelControlProps(props);
|
9593
|
-
const baseProps = (0,
|
9836
|
+
const baseProps = (0, import_omit7.default)(props, Object.keys(labelProps));
|
9594
9837
|
const legacyError = labelProps.error !== void 0 && labelProps.valid === false;
|
9595
9838
|
const variant = !labelProps.valid || legacyError ? "error" : labelProps.disabled ? "disabled" : "default";
|
9596
|
-
const label = /* @__PURE__ */
|
9597
|
-
id: `${id
|
9598
|
-
htmlFor: `${id
|
9839
|
+
const label = /* @__PURE__ */ import_react58.default.createElement(Label, __spreadValues({
|
9840
|
+
id: `${id}-label`,
|
9841
|
+
htmlFor: `${id}-input`,
|
9599
9842
|
variant,
|
9600
9843
|
messageId: errorMessageId
|
9601
9844
|
}, labelProps));
|
9602
|
-
return /* @__PURE__ */
|
9845
|
+
return /* @__PURE__ */ import_react58.default.createElement(FormControl, {
|
9603
9846
|
className: "Aquarium-Select"
|
9604
|
-
}, /* @__PURE__ */
|
9605
|
-
id: `${id
|
9847
|
+
}, /* @__PURE__ */ import_react58.default.createElement(_SelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
9848
|
+
id: `${id}-input`,
|
9606
9849
|
options,
|
9607
9850
|
disabled: props.disabled,
|
9608
9851
|
valid: props.valid,
|
9609
9852
|
labelWrapper: label
|
9610
|
-
})), /* @__PURE__ */
|
9853
|
+
})), /* @__PURE__ */ import_react58.default.createElement(HelperText, {
|
9611
9854
|
messageId: errorMessageId,
|
9612
9855
|
error: !labelProps.valid,
|
9613
9856
|
helperText: labelProps.helperText,
|
@@ -9616,7 +9859,7 @@ var Select2 = (_a) => {
|
|
9616
9859
|
reserveSpaceForError: labelProps.reserveSpaceForError
|
9617
9860
|
}));
|
9618
9861
|
};
|
9619
|
-
var SelectSkeleton = () => /* @__PURE__ */
|
9862
|
+
var SelectSkeleton = () => /* @__PURE__ */ import_react58.default.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ import_react58.default.createElement(SelectBase.Skeleton, null));
|
9620
9863
|
Select2.Skeleton = SelectSkeleton;
|
9621
9864
|
Select2.Skeleton.displayName = "Select.Skeleton";
|
9622
9865
|
|
@@ -9635,26 +9878,26 @@ var Pagination = ({
|
|
9635
9878
|
pageSizes,
|
9636
9879
|
onPageSizeChange
|
9637
9880
|
}) => {
|
9638
|
-
const [value, setValue] =
|
9639
|
-
|
9881
|
+
const [value, setValue] = import_react59.default.useState(currentPage);
|
9882
|
+
import_react59.default.useEffect(() => {
|
9640
9883
|
setValue(currentPage);
|
9641
9884
|
}, [currentPage]);
|
9642
|
-
return /* @__PURE__ */
|
9885
|
+
return /* @__PURE__ */ import_react59.default.createElement(Box, {
|
9643
9886
|
className: classNames(
|
9644
9887
|
"Aquarium-Pagination",
|
9645
9888
|
tw({ "grid grid-cols-[200px_1fr_200px]": !!pageSizes, "flex flex-nowrap justify-center": !pageSizes })
|
9646
9889
|
),
|
9647
9890
|
backgroundColor: "grey-0",
|
9648
9891
|
padding: "4"
|
9649
|
-
}, pageSizes && onPageSizeChange && typeof pageSize === "number" ? /* @__PURE__ */
|
9892
|
+
}, pageSizes && onPageSizeChange && typeof pageSize === "number" ? /* @__PURE__ */ import_react59.default.createElement(Box, {
|
9650
9893
|
display: "flex",
|
9651
9894
|
alignItems: "center",
|
9652
9895
|
gap: "4"
|
9653
|
-
}, /* @__PURE__ */
|
9896
|
+
}, /* @__PURE__ */ import_react59.default.createElement(Typography2.Small, {
|
9654
9897
|
color: "grey-50"
|
9655
|
-
}, "Items per page "), /* @__PURE__ */
|
9898
|
+
}, "Items per page "), /* @__PURE__ */ import_react59.default.createElement("div", {
|
9656
9899
|
className: tw("max-w-[70px]")
|
9657
|
-
}, /* @__PURE__ */
|
9900
|
+
}, /* @__PURE__ */ import_react59.default.createElement(SelectBase, {
|
9658
9901
|
options: pageSizes.map((size) => size.toString()),
|
9659
9902
|
value: pageSize.toString(),
|
9660
9903
|
onChange: (size) => {
|
@@ -9665,26 +9908,26 @@ var Pagination = ({
|
|
9665
9908
|
}
|
9666
9909
|
}
|
9667
9910
|
}
|
9668
|
-
}))) : /* @__PURE__ */
|
9911
|
+
}))) : /* @__PURE__ */ import_react59.default.createElement("div", null), /* @__PURE__ */ import_react59.default.createElement(Box, {
|
9669
9912
|
display: "flex",
|
9670
9913
|
justifyContent: "center",
|
9671
9914
|
alignItems: "center",
|
9672
9915
|
className: tw("grow")
|
9673
|
-
}, /* @__PURE__ */
|
9916
|
+
}, /* @__PURE__ */ import_react59.default.createElement(Button.Icon, {
|
9674
9917
|
"aria-label": "First",
|
9675
9918
|
onClick: () => onPageChange(1),
|
9676
9919
|
icon: import_chevronBackward2.default,
|
9677
9920
|
disabled: !hasPreviousPage
|
9678
|
-
}), /* @__PURE__ */
|
9921
|
+
}), /* @__PURE__ */ import_react59.default.createElement(Button.Icon, {
|
9679
9922
|
"aria-label": "Previous",
|
9680
9923
|
onClick: () => onPageChange(currentPage - 1),
|
9681
9924
|
icon: import_chevronLeft3.default,
|
9682
9925
|
disabled: !hasPreviousPage
|
9683
|
-
}), /* @__PURE__ */
|
9926
|
+
}), /* @__PURE__ */ import_react59.default.createElement(Box, {
|
9684
9927
|
paddingX: "4"
|
9685
|
-
}, /* @__PURE__ */
|
9928
|
+
}, /* @__PURE__ */ import_react59.default.createElement(Typography2.Small, {
|
9686
9929
|
color: "grey-60"
|
9687
|
-
}, "Page")), /* @__PURE__ */
|
9930
|
+
}, "Page")), /* @__PURE__ */ import_react59.default.createElement(InputBase, {
|
9688
9931
|
className: classNames(tw("text-center max-w-[40px]"), "no-arrows"),
|
9689
9932
|
type: "number",
|
9690
9933
|
min: 1,
|
@@ -9701,25 +9944,25 @@ var Pagination = ({
|
|
9701
9944
|
const newPage = !isNaN(numberValue) ? (0, import_clamp.default)(numberValue, 1, totalPages) : 1;
|
9702
9945
|
onPageChange(newPage);
|
9703
9946
|
}
|
9704
|
-
}), /* @__PURE__ */
|
9947
|
+
}), /* @__PURE__ */ import_react59.default.createElement(Box, {
|
9705
9948
|
paddingX: "4"
|
9706
|
-
}, /* @__PURE__ */
|
9949
|
+
}, /* @__PURE__ */ import_react59.default.createElement(Typography2.Small, {
|
9707
9950
|
color: "grey-60"
|
9708
|
-
}, "of ", totalPages)), /* @__PURE__ */
|
9951
|
+
}, "of ", totalPages)), /* @__PURE__ */ import_react59.default.createElement(Button.Icon, {
|
9709
9952
|
"aria-label": "Next",
|
9710
9953
|
onClick: () => onPageChange(currentPage + 1),
|
9711
9954
|
icon: import_chevronRight3.default,
|
9712
9955
|
disabled: !hasNextPage
|
9713
|
-
}), /* @__PURE__ */
|
9956
|
+
}), /* @__PURE__ */ import_react59.default.createElement(Button.Icon, {
|
9714
9957
|
"aria-label": "Last",
|
9715
9958
|
onClick: () => onPageChange(totalPages),
|
9716
9959
|
icon: import_chevronForward2.default,
|
9717
9960
|
disabled: !hasNextPage
|
9718
|
-
})), pageSizes && /* @__PURE__ */
|
9961
|
+
})), pageSizes && /* @__PURE__ */ import_react59.default.createElement("div", null));
|
9719
9962
|
};
|
9720
9963
|
|
9721
9964
|
// src/molecules/Pagination/usePagination.tsx
|
9722
|
-
var
|
9965
|
+
var import_react60 = require("react");
|
9723
9966
|
var import_clamp2 = __toESM(require("lodash/clamp"));
|
9724
9967
|
var initialState = {
|
9725
9968
|
currentPage: 1,
|
@@ -9727,8 +9970,8 @@ var initialState = {
|
|
9727
9970
|
};
|
9728
9971
|
var getPageIndex = (currentPage, pageSize) => currentPage === 0 ? 0 : (currentPage - 1) * pageSize;
|
9729
9972
|
var usePagination = (items, options) => {
|
9730
|
-
const [currentPage, setCurrentPage] = (0,
|
9731
|
-
const [pageSize, setPageSize] = (0,
|
9973
|
+
const [currentPage, setCurrentPage] = (0, import_react60.useState)((options == null ? void 0 : options.initialPage) || initialState.currentPage);
|
9974
|
+
const [pageSize, setPageSize] = (0, import_react60.useState)((options == null ? void 0 : options.initialPageSize) || initialState.pageSize);
|
9732
9975
|
const totalPages = items.length > 0 ? Math.ceil(items.length / pageSize) : 1;
|
9733
9976
|
const hasPreviousPage = currentPage > 1;
|
9734
9977
|
const hasNextPage = currentPage < totalPages;
|
@@ -9738,7 +9981,7 @@ var usePagination = (items, options) => {
|
|
9738
9981
|
setPageSize(pageSize2);
|
9739
9982
|
setCurrentPage((0, import_clamp2.default)((options == null ? void 0 : options.initialPage) || initialState.currentPage, 1, newTotalPages));
|
9740
9983
|
};
|
9741
|
-
(0,
|
9984
|
+
(0, import_react60.useEffect)(() => {
|
9742
9985
|
setCurrentPage((0, import_clamp2.default)((options == null ? void 0 : options.initialPage) || initialState.currentPage, 1, totalPages));
|
9743
9986
|
}, [items.length]);
|
9744
9987
|
return [
|
@@ -9759,8 +10002,8 @@ var usePagination = (items, options) => {
|
|
9759
10002
|
var List2 = ({
|
9760
10003
|
items,
|
9761
10004
|
renderItem,
|
9762
|
-
container =
|
9763
|
-
paginationContainer =
|
10005
|
+
container = import_react61.default.Fragment,
|
10006
|
+
paginationContainer = import_react61.default.Fragment,
|
9764
10007
|
pagination
|
9765
10008
|
}) => {
|
9766
10009
|
const Component = container;
|
@@ -9768,11 +10011,11 @@ var List2 = ({
|
|
9768
10011
|
const paginationProps = (0, import_isObject.default)(pagination) ? pagination : {};
|
9769
10012
|
const [paginatedItems, paginationState] = usePagination(items, paginationProps);
|
9770
10013
|
const listItems = pagination ? paginatedItems : items;
|
9771
|
-
return /* @__PURE__ */
|
10014
|
+
return /* @__PURE__ */ import_react61.default.createElement(import_react61.default.Fragment, null, /* @__PURE__ */ import_react61.default.createElement(Component, null, listItems.map(renderItem)), pagination && /* @__PURE__ */ import_react61.default.createElement(PaginationComponent, null, /* @__PURE__ */ import_react61.default.createElement(Pagination, __spreadValues(__spreadValues({}, paginationState), paginationProps))));
|
9772
10015
|
};
|
9773
10016
|
|
9774
10017
|
// src/molecules/Template/Template.tsx
|
9775
|
-
var
|
10018
|
+
var import_react62 = __toESM(require("react"));
|
9776
10019
|
var Template = ({
|
9777
10020
|
children,
|
9778
10021
|
columns,
|
@@ -9799,24 +10042,24 @@ var Template = ({
|
|
9799
10042
|
rowGap,
|
9800
10043
|
columnGap
|
9801
10044
|
});
|
9802
|
-
return /* @__PURE__ */
|
10045
|
+
return /* @__PURE__ */ import_react62.default.createElement("div", {
|
9803
10046
|
className,
|
9804
10047
|
style: __spreadValues({}, styles)
|
9805
10048
|
}, children);
|
9806
10049
|
};
|
9807
10050
|
|
9808
10051
|
// src/atoms/DataList/DataList.tsx
|
9809
|
-
var
|
10052
|
+
var import_react65 = __toESM(require("react"));
|
9810
10053
|
|
9811
10054
|
// src/atoms/Table/Table.tsx
|
9812
|
-
var
|
10055
|
+
var import_react64 = __toESM(require("react"));
|
9813
10056
|
|
9814
10057
|
// src/atoms/RadioButton/RadioButton.tsx
|
9815
|
-
var
|
9816
|
-
var RadioButton =
|
10058
|
+
var import_react63 = __toESM(require("react"));
|
10059
|
+
var RadioButton = import_react63.default.forwardRef(
|
9817
10060
|
(_a, ref) => {
|
9818
10061
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
9819
|
-
return /* @__PURE__ */
|
10062
|
+
return /* @__PURE__ */ import_react63.default.createElement("input", __spreadProps(__spreadValues({
|
9820
10063
|
id,
|
9821
10064
|
ref,
|
9822
10065
|
type: "radio",
|
@@ -9842,29 +10085,29 @@ var RadioButton = import_react62.default.forwardRef(
|
|
9842
10085
|
// src/atoms/Table/Table.tsx
|
9843
10086
|
var import_chevronDown4 = __toESM(require_chevronDown());
|
9844
10087
|
var import_chevronUp3 = __toESM(require_chevronUp());
|
9845
|
-
var HeadContext =
|
10088
|
+
var HeadContext = import_react64.default.createContext(null);
|
9846
10089
|
var tableClassNames = tw("w-full relative typography-default border-spacing-0");
|
9847
10090
|
var Table = (_a) => {
|
9848
10091
|
var _b = _a, { children, ariaLabel, className } = _b, rest = __objRest(_b, ["children", "ariaLabel", "className"]);
|
9849
|
-
return /* @__PURE__ */
|
10092
|
+
return /* @__PURE__ */ import_react64.default.createElement("table", __spreadProps(__spreadValues({}, rest), {
|
9850
10093
|
className: classNames(tableClassNames, className),
|
9851
10094
|
"aria-label": ariaLabel
|
9852
10095
|
}), children);
|
9853
10096
|
};
|
9854
10097
|
var TableHead = (_a) => {
|
9855
10098
|
var _b = _a, { children, sticky } = _b, rest = __objRest(_b, ["children", "sticky"]);
|
9856
|
-
return /* @__PURE__ */
|
10099
|
+
return /* @__PURE__ */ import_react64.default.createElement("thead", __spreadValues({}, rest), /* @__PURE__ */ import_react64.default.createElement("tr", null, /* @__PURE__ */ import_react64.default.createElement(HeadContext.Provider, {
|
9857
10100
|
value: { children, sticky }
|
9858
10101
|
}, children)));
|
9859
10102
|
};
|
9860
10103
|
var TableBody = (_a) => {
|
9861
10104
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
9862
|
-
return /* @__PURE__ */
|
10105
|
+
return /* @__PURE__ */ import_react64.default.createElement("tbody", __spreadValues({}, rest), children);
|
9863
10106
|
};
|
9864
10107
|
var rowClassNames = tw("children:border-grey-10 group children:last:border-b-0 hover:bg-grey-0");
|
9865
10108
|
var TableRow = (_a) => {
|
9866
10109
|
var _b = _a, { children, className, disabled } = _b, rest = __objRest(_b, ["children", "className", "disabled"]);
|
9867
|
-
return /* @__PURE__ */
|
10110
|
+
return /* @__PURE__ */ import_react64.default.createElement("tr", __spreadProps(__spreadValues(__spreadValues({}, rest), { inert: disabled ? "" : void 0 }), {
|
9868
10111
|
className: classNames(rowClassNames, className, {
|
9869
10112
|
"opacity-70": disabled
|
9870
10113
|
})
|
@@ -9893,15 +10136,15 @@ var getHeadCellClassNames = (sticky = true, stickyColumn) => {
|
|
9893
10136
|
};
|
9894
10137
|
var TableCell = (_a) => {
|
9895
10138
|
var _b = _a, { children, className, stickyColumn, align = "left" } = _b, rest = __objRest(_b, ["children", "className", "stickyColumn", "align"]);
|
9896
|
-
const headContext =
|
9897
|
-
return headContext ? /* @__PURE__ */
|
10139
|
+
const headContext = import_react64.default.useContext(HeadContext);
|
10140
|
+
return headContext ? /* @__PURE__ */ import_react64.default.createElement("th", __spreadProps(__spreadValues({}, rest), {
|
9898
10141
|
className: classNames(
|
9899
10142
|
cellClassNames,
|
9900
10143
|
getHeadCellClassNames(headContext.sticky, stickyColumn),
|
9901
10144
|
getAlignClassNames(align),
|
9902
10145
|
className
|
9903
10146
|
)
|
9904
|
-
}), children) : /* @__PURE__ */
|
10147
|
+
}), children) : /* @__PURE__ */ import_react64.default.createElement("td", __spreadProps(__spreadValues({}, rest), {
|
9905
10148
|
className: classNames(
|
9906
10149
|
cellClassNames,
|
9907
10150
|
getBodyCellClassNames(true, stickyColumn),
|
@@ -9912,11 +10155,11 @@ var TableCell = (_a) => {
|
|
9912
10155
|
};
|
9913
10156
|
var TableSelectCell = (_a) => {
|
9914
10157
|
var _b = _a, { ariaLabel } = _b, props = __objRest(_b, ["ariaLabel"]);
|
9915
|
-
return /* @__PURE__ */
|
10158
|
+
return /* @__PURE__ */ import_react64.default.createElement(Table.Cell, {
|
9916
10159
|
className: tw("leading-[0px]")
|
9917
|
-
}, props.type === "radio" ? /* @__PURE__ */
|
10160
|
+
}, props.type === "radio" ? /* @__PURE__ */ import_react64.default.createElement(RadioButton, __spreadValues({
|
9918
10161
|
"aria-label": ariaLabel
|
9919
|
-
}, props)) : /* @__PURE__ */
|
10162
|
+
}, props)) : /* @__PURE__ */ import_react64.default.createElement(Checkbox, __spreadValues({
|
9920
10163
|
"aria-label": ariaLabel
|
9921
10164
|
}, props)));
|
9922
10165
|
};
|
@@ -9926,39 +10169,39 @@ var getSortCellIconClassNames = (active) => {
|
|
9926
10169
|
};
|
9927
10170
|
var TableSortCell = (_a) => {
|
9928
10171
|
var _b = _a, { children, direction = "none", onClick } = _b, rest = __objRest(_b, ["children", "direction", "onClick"]);
|
9929
|
-
return /* @__PURE__ */
|
10172
|
+
return /* @__PURE__ */ import_react64.default.createElement(Table.Cell, __spreadProps(__spreadValues({}, rest), {
|
9930
10173
|
"aria-sort": direction
|
9931
|
-
}), /* @__PURE__ */
|
10174
|
+
}), /* @__PURE__ */ import_react64.default.createElement("span", {
|
9932
10175
|
className: getSortCellButtonClassNames(rest.align),
|
9933
10176
|
role: "button",
|
9934
10177
|
tabIndex: -1,
|
9935
10178
|
onClick
|
9936
|
-
}, children, /* @__PURE__ */
|
10179
|
+
}, children, /* @__PURE__ */ import_react64.default.createElement("div", {
|
9937
10180
|
"data-sort-icons": true,
|
9938
10181
|
className: tw("flex flex-col", {
|
9939
10182
|
"invisible group-hover:visible": direction === "none"
|
9940
10183
|
})
|
9941
|
-
}, /* @__PURE__ */
|
10184
|
+
}, /* @__PURE__ */ import_react64.default.createElement(InlineIcon, {
|
9942
10185
|
icon: import_chevronUp3.default,
|
9943
10186
|
className: getSortCellIconClassNames(direction === "descending")
|
9944
|
-
}), /* @__PURE__ */
|
10187
|
+
}), /* @__PURE__ */ import_react64.default.createElement(InlineIcon, {
|
9945
10188
|
icon: import_chevronDown4.default,
|
9946
10189
|
className: getSortCellIconClassNames(direction === "ascending")
|
9947
10190
|
}))));
|
9948
10191
|
};
|
9949
|
-
var Item4 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */
|
10192
|
+
var Item4 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */ import_react64.default.createElement("div", {
|
9950
10193
|
className: tw("flex gap-4 items-center")
|
9951
|
-
}, image && /* @__PURE__ */
|
10194
|
+
}, image && /* @__PURE__ */ import_react64.default.createElement("img", {
|
9952
10195
|
src: image,
|
9953
10196
|
alt: imageAlt,
|
9954
10197
|
style: { width: imageSize, height: imageSize }
|
9955
|
-
}), /* @__PURE__ */
|
9956
|
-
Table.Head =
|
9957
|
-
Table.Body =
|
9958
|
-
Table.Row =
|
9959
|
-
Table.Cell =
|
9960
|
-
Table.SortCell =
|
9961
|
-
Table.SelectCell =
|
10198
|
+
}), /* @__PURE__ */ import_react64.default.createElement("div", null, title, caption && /* @__PURE__ */ import_react64.default.createElement(Typography2.Caption, null, caption)));
|
10199
|
+
Table.Head = import_react64.default.memo(TableHead);
|
10200
|
+
Table.Body = import_react64.default.memo(TableBody);
|
10201
|
+
Table.Row = import_react64.default.memo(TableRow);
|
10202
|
+
Table.Cell = import_react64.default.memo(TableCell);
|
10203
|
+
Table.SortCell = import_react64.default.memo(TableSortCell);
|
10204
|
+
Table.SelectCell = import_react64.default.memo(TableSelectCell);
|
9962
10205
|
|
9963
10206
|
// src/atoms/DataList/DataList.tsx
|
9964
10207
|
var import_chevronDown5 = __toESM(require_chevronDown());
|
@@ -9970,7 +10213,7 @@ var getAlignClassNames2 = (align) => tw("flex items-center", {
|
|
9970
10213
|
});
|
9971
10214
|
var DataList = (_a) => {
|
9972
10215
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
9973
|
-
return /* @__PURE__ */
|
10216
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", __spreadValues({}, rest));
|
9974
10217
|
};
|
9975
10218
|
var HeadCell = (_a) => {
|
9976
10219
|
var _b = _a, {
|
@@ -9984,7 +10227,7 @@ var HeadCell = (_a) => {
|
|
9984
10227
|
"align",
|
9985
10228
|
"stickyColumn"
|
9986
10229
|
]);
|
9987
|
-
return /* @__PURE__ */
|
10230
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
9988
10231
|
role: "cell",
|
9989
10232
|
className: classNames(
|
9990
10233
|
cellClassNames,
|
@@ -10004,7 +10247,7 @@ var Cell = (_a) => {
|
|
10004
10247
|
"align",
|
10005
10248
|
"stickyColumn"
|
10006
10249
|
]);
|
10007
|
-
return /* @__PURE__ */
|
10250
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10008
10251
|
role: "cell",
|
10009
10252
|
className: classNames(
|
10010
10253
|
cellClassNames,
|
@@ -10017,7 +10260,7 @@ var Cell = (_a) => {
|
|
10017
10260
|
};
|
10018
10261
|
var Row = (_a) => {
|
10019
10262
|
var _b = _a, { className, disabled, subgroup } = _b, rest = __objRest(_b, ["className", "disabled", "subgroup"]);
|
10020
|
-
return /* @__PURE__ */
|
10263
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", __spreadProps(__spreadValues(__spreadValues({}, rest), { inert: disabled ? "" : void 0 }), {
|
10021
10264
|
className: classNames(tw("contents"), className, {
|
10022
10265
|
"children:opacity-70": disabled,
|
10023
10266
|
"[&>.group>*]:bg-grey-0 [&>.group>*:first-child]:border-b-0 ": subgroup,
|
@@ -10028,7 +10271,7 @@ var Row = (_a) => {
|
|
10028
10271
|
};
|
10029
10272
|
var SubGroupSpacing = (_a) => {
|
10030
10273
|
var _b = _a, { className, divider } = _b, rest = __objRest(_b, ["className", "divider"]);
|
10031
|
-
return /* @__PURE__ */
|
10274
|
+
return /* @__PURE__ */ import_react65.default.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
10032
10275
|
"aria-hidden": true,
|
10033
10276
|
className: classNames(
|
10034
10277
|
tw("col-span-full h-6 bg-grey-0", { "border-b border-grey-10": Boolean(divider) }),
|
@@ -10038,24 +10281,24 @@ var SubGroupSpacing = (_a) => {
|
|
10038
10281
|
};
|
10039
10282
|
var SortCell = (_a) => {
|
10040
10283
|
var _b = _a, { children, direction = "none", onClick, sticky } = _b, rest = __objRest(_b, ["children", "direction", "onClick", "sticky"]);
|
10041
|
-
return /* @__PURE__ */
|
10284
|
+
return /* @__PURE__ */ import_react65.default.createElement(HeadCell, __spreadProps(__spreadValues({}, rest), {
|
10042
10285
|
"aria-sort": direction,
|
10043
10286
|
role: "cell",
|
10044
10287
|
sticky
|
10045
|
-
}), /* @__PURE__ */
|
10288
|
+
}), /* @__PURE__ */ import_react65.default.createElement("span", {
|
10046
10289
|
className: getSortCellButtonClassNames(rest.align),
|
10047
10290
|
role: "button",
|
10048
10291
|
tabIndex: -1,
|
10049
10292
|
onClick
|
10050
|
-
}, children, /* @__PURE__ */
|
10293
|
+
}, children, /* @__PURE__ */ import_react65.default.createElement("div", {
|
10051
10294
|
"data-sort-icons": true,
|
10052
10295
|
className: tw("flex flex-col", {
|
10053
10296
|
"invisible group-hover:visible": direction === "none"
|
10054
10297
|
})
|
10055
|
-
}, /* @__PURE__ */
|
10298
|
+
}, /* @__PURE__ */ import_react65.default.createElement(InlineIcon, {
|
10056
10299
|
icon: import_chevronUp4.default,
|
10057
10300
|
className: getSortCellIconClassNames(direction === "descending")
|
10058
|
-
}), /* @__PURE__ */
|
10301
|
+
}), /* @__PURE__ */ import_react65.default.createElement(InlineIcon, {
|
10059
10302
|
icon: import_chevronDown5.default,
|
10060
10303
|
className: getSortCellIconClassNames(direction === "ascending")
|
10061
10304
|
}))));
|
@@ -10089,9 +10332,9 @@ var cellProps = (column) => ({
|
|
10089
10332
|
var columnIsFieldColumn = (column) => Boolean(column && column.field);
|
10090
10333
|
|
10091
10334
|
// src/utils/table/useTableSort.tsx
|
10092
|
-
var
|
10335
|
+
var import_react66 = __toESM(require("react"));
|
10093
10336
|
var useTableSort = () => {
|
10094
|
-
const [sort, setSort] =
|
10337
|
+
const [sort, setSort] = import_react66.default.useState();
|
10095
10338
|
const handleSortClick = (column) => {
|
10096
10339
|
if (sort && sort.column.headerName === column.headerName) {
|
10097
10340
|
if (sort.direction === "ascending") {
|
@@ -10125,19 +10368,21 @@ var sortRowsBy = (rows, sort) => {
|
|
10125
10368
|
var import_more2 = __toESM(require_more());
|
10126
10369
|
|
10127
10370
|
// src/molecules/Accordion/Accordion.tsx
|
10128
|
-
var
|
10129
|
-
var
|
10371
|
+
var import_react69 = __toESM(require("react"));
|
10372
|
+
var import_react70 = require("@iconify/react");
|
10373
|
+
var import_utils11 = require("@react-aria/utils");
|
10130
10374
|
var import_web3 = require("@react-spring/web");
|
10375
|
+
var import_isUndefined8 = __toESM(require("lodash/isUndefined"));
|
10131
10376
|
|
10132
10377
|
// src/utils/useMeasure.ts
|
10133
|
-
var
|
10378
|
+
var import_react67 = __toESM(require("react"));
|
10134
10379
|
function useMeasure() {
|
10135
|
-
const ref =
|
10136
|
-
const [rect, setRect] =
|
10380
|
+
const ref = import_react67.default.useRef(null);
|
10381
|
+
const [rect, setRect] = import_react67.default.useState({
|
10137
10382
|
width: null,
|
10138
10383
|
height: null
|
10139
10384
|
});
|
10140
|
-
|
10385
|
+
import_react67.default.useLayoutEffect(() => {
|
10141
10386
|
if (!ref.current || !window.ResizeObserver) {
|
10142
10387
|
return;
|
10143
10388
|
}
|
@@ -10158,7 +10403,7 @@ function useMeasure() {
|
|
10158
10403
|
}
|
10159
10404
|
|
10160
10405
|
// src/molecules/Divider/Divider.tsx
|
10161
|
-
var
|
10406
|
+
var import_react68 = __toESM(require("react"));
|
10162
10407
|
var sizeClasses = {
|
10163
10408
|
horizontal: {
|
10164
10409
|
1: "h-1px",
|
@@ -10180,7 +10425,7 @@ var sizeClasses = {
|
|
10180
10425
|
var Divider2 = (_a) => {
|
10181
10426
|
var _b = _a, { direction = "horizontal", size = 1 } = _b, props = __objRest(_b, ["direction", "size"]);
|
10182
10427
|
const sizeClass = sizeClasses[direction][size];
|
10183
|
-
return /* @__PURE__ */
|
10428
|
+
return /* @__PURE__ */ import_react68.default.createElement("div", __spreadProps(__spreadValues({}, props), {
|
10184
10429
|
className: classNames(
|
10185
10430
|
"Aquarium-Divider",
|
10186
10431
|
tw(`bg-grey-5 ${sizeClass}`, {
|
@@ -10192,39 +10437,59 @@ var Divider2 = (_a) => {
|
|
10192
10437
|
};
|
10193
10438
|
|
10194
10439
|
// src/molecules/Accordion/Accordion.tsx
|
10195
|
-
var AccordionContext = (0,
|
10440
|
+
var AccordionContext = (0, import_react69.createContext)(null);
|
10441
|
+
var PanelContext = (0, import_react69.createContext)(null);
|
10196
10442
|
var useAccordionContext = () => {
|
10197
|
-
const context2 = (0,
|
10443
|
+
const context2 = (0, import_react69.useContext)(AccordionContext);
|
10198
10444
|
if (context2 === null) {
|
10199
10445
|
throw new Error("AccordionContext was used outside of provider.");
|
10200
10446
|
}
|
10201
10447
|
return context2;
|
10202
10448
|
};
|
10203
|
-
var
|
10204
|
-
const
|
10205
|
-
|
10206
|
-
|
10449
|
+
var usePanelContext = (defaultId) => {
|
10450
|
+
const context2 = (0, import_react69.useContext)(PanelContext);
|
10451
|
+
if (defaultId) {
|
10452
|
+
return defaultId;
|
10453
|
+
}
|
10454
|
+
if (context2 === null) {
|
10455
|
+
throw new Error(
|
10456
|
+
"Accordion panel missing ID. Either wrap the panel in <Accordion.Container /> or provide an id as a prop"
|
10457
|
+
);
|
10458
|
+
}
|
10459
|
+
return context2;
|
10460
|
+
};
|
10461
|
+
var Accordion = ({ children, openPanelId: panelId }) => {
|
10462
|
+
const [openPanelId, setOpenPanelId] = (0, import_react69.useState)(panelId);
|
10463
|
+
if (!(0, import_isUndefined8.default)(panelId) && panelId !== openPanelId) {
|
10464
|
+
setOpenPanelId(panelId);
|
10465
|
+
}
|
10466
|
+
return /* @__PURE__ */ import_react69.default.createElement(AccordionContext.Provider, {
|
10467
|
+
value: [openPanelId, setOpenPanelId]
|
10207
10468
|
}, children);
|
10208
10469
|
};
|
10209
10470
|
var AccordionToggle = (_a) => {
|
10210
|
-
var _b = _a, { panelId } = _b, rest = __objRest(_b, ["panelId"]);
|
10471
|
+
var _b = _a, { panelId, onChange } = _b, rest = __objRest(_b, ["panelId", "onChange"]);
|
10472
|
+
const id = usePanelContext(panelId);
|
10211
10473
|
const [openPanelId, setOpenPanelId] = useAccordionContext();
|
10212
|
-
const isOpen = openPanelId ===
|
10213
|
-
const handleClick = () =>
|
10474
|
+
const isOpen = openPanelId === id;
|
10475
|
+
const handleClick = () => {
|
10476
|
+
onChange ? onChange(id, isOpen) : setOpenPanelId(isOpen ? void 0 : id);
|
10477
|
+
};
|
10214
10478
|
const { transform } = (0, import_web3.useSpring)({
|
10215
10479
|
transform: `rotate(${isOpen ? 0 : 180}deg)`,
|
10216
10480
|
config: {
|
10217
10481
|
duration: 150
|
10218
10482
|
}
|
10219
10483
|
});
|
10220
|
-
return /* @__PURE__ */
|
10484
|
+
return /* @__PURE__ */ import_react69.default.createElement(import_web3.animated.div, __spreadProps(__spreadValues({}, rest), {
|
10221
10485
|
role: "button",
|
10222
10486
|
tabIndex: 0,
|
10223
|
-
"aria-
|
10224
|
-
"aria-
|
10487
|
+
"aria-label": "accordion toggle",
|
10488
|
+
"aria-expanded": openPanelId === id,
|
10489
|
+
"aria-controls": `${id}-content`,
|
10225
10490
|
onClick: handleClick,
|
10226
10491
|
style: { transform }
|
10227
|
-
}), /* @__PURE__ */
|
10492
|
+
}), /* @__PURE__ */ import_react69.default.createElement(import_react70.Icon, {
|
10228
10493
|
icon: import_caretUp.default,
|
10229
10494
|
height: 22,
|
10230
10495
|
width: 22
|
@@ -10232,8 +10497,9 @@ var AccordionToggle = (_a) => {
|
|
10232
10497
|
};
|
10233
10498
|
var AccordionPanel = (_a) => {
|
10234
10499
|
var _b = _a, { children, panelId } = _b, rest = __objRest(_b, ["children", "panelId"]);
|
10500
|
+
const id = usePanelContext(panelId);
|
10235
10501
|
const [openPanelId] = useAccordionContext();
|
10236
|
-
const isOpen = openPanelId ===
|
10502
|
+
const isOpen = openPanelId === id;
|
10237
10503
|
const [ref, { height }] = useMeasure();
|
10238
10504
|
const style = (0, import_web3.useSpring)({
|
10239
10505
|
height: isOpen ? height != null ? height : 0 : 0,
|
@@ -10242,31 +10508,38 @@ var AccordionPanel = (_a) => {
|
|
10242
10508
|
duration: 150
|
10243
10509
|
}
|
10244
10510
|
});
|
10245
|
-
return /* @__PURE__ */
|
10511
|
+
return /* @__PURE__ */ import_react69.default.createElement(import_web3.animated.div, __spreadProps(__spreadValues({}, rest), {
|
10246
10512
|
role: "region",
|
10247
|
-
id:
|
10513
|
+
id: `${id}-content`,
|
10514
|
+
"aria-labelledby": `${id}-summary`,
|
10248
10515
|
style
|
10249
|
-
}), /* @__PURE__ */
|
10516
|
+
}), /* @__PURE__ */ import_react69.default.createElement("div", {
|
10250
10517
|
ref
|
10251
10518
|
}, children));
|
10252
10519
|
};
|
10253
10520
|
var AccordionUnanimatedPanel = ({ children, panelId }) => {
|
10521
|
+
const id = usePanelContext(panelId);
|
10254
10522
|
const [openPanelId] = useAccordionContext();
|
10255
|
-
const isOpen = openPanelId ===
|
10256
|
-
return /* @__PURE__ */
|
10523
|
+
const isOpen = openPanelId === id;
|
10524
|
+
return /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, isOpen ? children : null);
|
10257
10525
|
};
|
10258
10526
|
var AccordionSummary = (_a) => {
|
10259
|
-
var _b = _a, { title, description, toggle } = _b, rest = __objRest(_b, ["title", "description", "toggle"]);
|
10260
|
-
|
10527
|
+
var _b = _a, { title, description, toggle, panelId } = _b, rest = __objRest(_b, ["title", "description", "toggle", "panelId"]);
|
10528
|
+
const id = usePanelContext(panelId);
|
10529
|
+
return /* @__PURE__ */ import_react69.default.createElement(Box.Flex, __spreadValues({
|
10261
10530
|
justifyContent: "space-between",
|
10262
|
-
padding: "4"
|
10263
|
-
|
10531
|
+
padding: "4",
|
10532
|
+
id: `${id}-summary`
|
10533
|
+
}, rest), /* @__PURE__ */ import_react69.default.createElement(Typography2, null, title), /* @__PURE__ */ import_react69.default.createElement(Typography2.Small, {
|
10264
10534
|
color: "grey-40"
|
10265
10535
|
}, description), toggle);
|
10266
10536
|
};
|
10267
10537
|
var AccordionContainer = (_a) => {
|
10268
|
-
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
10269
|
-
|
10538
|
+
var _b = _a, { children, panelId } = _b, rest = __objRest(_b, ["children", "panelId"]);
|
10539
|
+
const generatedId = (0, import_utils11.useId)();
|
10540
|
+
return /* @__PURE__ */ import_react69.default.createElement(PanelContext.Provider, {
|
10541
|
+
value: panelId != null ? panelId : generatedId
|
10542
|
+
}, /* @__PURE__ */ import_react69.default.createElement("div", __spreadValues({}, rest), children, /* @__PURE__ */ import_react69.default.createElement(Divider2, null)));
|
10270
10543
|
};
|
10271
10544
|
Accordion.displayName = "Accordion";
|
10272
10545
|
Accordion.Container = AccordionContainer;
|
@@ -10281,25 +10554,25 @@ Accordion.UnanimatedPanel = AccordionUnanimatedPanel;
|
|
10281
10554
|
Accordion.UnanimatedPanel.displayName = "Accordion.UnanimatedPanel";
|
10282
10555
|
|
10283
10556
|
// src/molecules/DataList/DataListSkeleton.tsx
|
10284
|
-
var
|
10557
|
+
var import_react71 = __toESM(require("react"));
|
10285
10558
|
var DataListSkeleton = ({ columns = ["1", "2", "2", 52], rows = 5 }) => {
|
10286
10559
|
const columnsAmount = [...Array(typeof columns === "number" ? columns : columns.length).keys()];
|
10287
|
-
return /* @__PURE__ */
|
10560
|
+
return /* @__PURE__ */ import_react71.default.createElement(Template, {
|
10288
10561
|
columns
|
10289
|
-
}, columnsAmount.map((_, index) => /* @__PURE__ */
|
10562
|
+
}, columnsAmount.map((_, index) => /* @__PURE__ */ import_react71.default.createElement(DataList.HeadCell, {
|
10290
10563
|
key: index
|
10291
|
-
}, /* @__PURE__ */
|
10564
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Skeleton, {
|
10292
10565
|
width: "100%",
|
10293
10566
|
height: 17.5
|
10294
|
-
}))), /* @__PURE__ */
|
10567
|
+
}))), /* @__PURE__ */ import_react71.default.createElement(List2, {
|
10295
10568
|
items: [...Array(rows).keys()],
|
10296
|
-
renderItem: (item) => /* @__PURE__ */
|
10569
|
+
renderItem: (item) => /* @__PURE__ */ import_react71.default.createElement(DataList.Row, {
|
10297
10570
|
key: item
|
10298
|
-
}, /* @__PURE__ */
|
10571
|
+
}, /* @__PURE__ */ import_react71.default.createElement(List2, {
|
10299
10572
|
items: columnsAmount,
|
10300
|
-
renderItem: (key) => /* @__PURE__ */
|
10573
|
+
renderItem: (key) => /* @__PURE__ */ import_react71.default.createElement(DataList.Cell, {
|
10301
10574
|
key
|
10302
|
-
}, /* @__PURE__ */
|
10575
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Skeleton, {
|
10303
10576
|
width: "100%",
|
10304
10577
|
height: 17.5
|
10305
10578
|
}))
|
@@ -10323,11 +10596,13 @@ var DataList2 = ({
|
|
10323
10596
|
pagination,
|
10324
10597
|
group,
|
10325
10598
|
disabled,
|
10326
|
-
getGroupRow
|
10599
|
+
getGroupRow,
|
10600
|
+
onGroupToggled,
|
10601
|
+
expandedGroupIds
|
10327
10602
|
}) => {
|
10328
10603
|
const [sort, updateSort] = useTableSort();
|
10329
10604
|
const sortedRows = sortRowsBy(rows, sort);
|
10330
|
-
const groups = group ? (0, import_groupBy2.default)(sortedRows, group) : void 0;
|
10605
|
+
const groups = group ? (0, import_isFunction.default)(group) ? group(sortedRows) : (0, import_groupBy2.default)(sortedRows, group) : void 0;
|
10331
10606
|
const groupKeys = groups ? Object.keys(groups) : void 0;
|
10332
10607
|
const hasCustomRenderForGroupRow = (0, import_isFunction.default)(getGroupRow);
|
10333
10608
|
const isCollapsible = (0, import_isFunction.default)(rowDetails) || group;
|
@@ -10339,36 +10614,36 @@ var DataList2 = ({
|
|
10339
10614
|
}),
|
10340
10615
|
menu ? "auto" : void 0
|
10341
10616
|
]);
|
10342
|
-
const PaginationFooter =
|
10343
|
-
({ children }) => /* @__PURE__ */
|
10617
|
+
const PaginationFooter = import_react72.default.useCallback(
|
10618
|
+
({ children }) => /* @__PURE__ */ import_react72.default.createElement("div", {
|
10344
10619
|
style: { gridColumn: "1 / -1" }
|
10345
10620
|
}, children),
|
10346
10621
|
[]
|
10347
10622
|
);
|
10348
|
-
return /* @__PURE__ */
|
10623
|
+
return /* @__PURE__ */ import_react72.default.createElement(Template, {
|
10349
10624
|
className: "Aquarium-DataList",
|
10350
10625
|
columns: templateColumns
|
10351
|
-
}, isCollapsible && /* @__PURE__ */
|
10626
|
+
}, isCollapsible && /* @__PURE__ */ import_react72.default.createElement(DataList.HeadCell, {
|
10352
10627
|
align: "left"
|
10353
10628
|
}), columns.map((column) => {
|
10354
|
-
const content = column.headerTooltip ? /* @__PURE__ */
|
10629
|
+
const content = column.headerTooltip ? /* @__PURE__ */ import_react72.default.createElement(Tooltip, {
|
10355
10630
|
placement: column.headerTooltip.placement,
|
10356
10631
|
content: column.headerTooltip.content
|
10357
10632
|
}, column.headerName) : column.headerName;
|
10358
|
-
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
10633
|
+
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ import_react72.default.createElement(DataList.SortCell, __spreadValues({
|
10359
10634
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
10360
10635
|
onClick: () => updateSort(column),
|
10361
10636
|
sticky
|
10362
|
-
}, cellProps(column)), content) : /* @__PURE__ */
|
10637
|
+
}, cellProps(column)), content) : /* @__PURE__ */ import_react72.default.createElement(DataList.HeadCell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
10363
10638
|
sticky
|
10364
10639
|
}), content);
|
10365
|
-
}), menu && /* @__PURE__ */
|
10640
|
+
}), menu && /* @__PURE__ */ import_react72.default.createElement(DataList.HeadCell, {
|
10366
10641
|
align: "right",
|
10367
10642
|
"aria-label": menuAriaLabel
|
10368
|
-
}, menuHeaderName), groups && groupKeys ? /* @__PURE__ */
|
10643
|
+
}, menuHeaderName), groups && groupKeys ? /* @__PURE__ */ import_react72.default.createElement(List2, {
|
10369
10644
|
items: sortGroupKeys(groupKeys),
|
10370
10645
|
renderItem: (key) => {
|
10371
|
-
const groupContent = /* @__PURE__ */
|
10646
|
+
const groupContent = /* @__PURE__ */ import_react72.default.createElement(List2, {
|
10372
10647
|
key,
|
10373
10648
|
items: groups[key],
|
10374
10649
|
renderItem: (row, index) => renderRow(
|
@@ -10378,34 +10653,37 @@ var DataList2 = ({
|
|
10378
10653
|
sortedRows,
|
10379
10654
|
renderRowMenu(row, index, { menu, onAction, onMenuOpenChange, menuAriaLabel }),
|
10380
10655
|
disabled,
|
10381
|
-
() => /* @__PURE__ */
|
10656
|
+
() => /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, null)
|
10382
10657
|
)
|
10383
10658
|
});
|
10384
|
-
return key === "undefined" ? groupContent : /* @__PURE__ */
|
10385
|
-
key
|
10386
|
-
|
10387
|
-
|
10388
|
-
|
10659
|
+
return key === "undefined" ? groupContent : /* @__PURE__ */ import_react72.default.createElement(Accordion, {
|
10660
|
+
key,
|
10661
|
+
openPanelId: expandedGroupIds ? expandedGroupIds.find((id) => id === key) || null : void 0
|
10662
|
+
}, hasCustomRenderForGroupRow ? /* @__PURE__ */ import_react72.default.createElement(DataList.Row, null, /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, null, /* @__PURE__ */ import_react72.default.createElement(Accordion.Toggle, {
|
10663
|
+
panelId: key,
|
10664
|
+
onChange: onGroupToggled
|
10665
|
+
})), /* @__PURE__ */ import_react72.default.createElement(List2, {
|
10389
10666
|
items: columns,
|
10390
|
-
renderItem: (column) => /* @__PURE__ */
|
10667
|
+
renderItem: (column) => /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, __spreadValues({}, cellProps(column)), renderCell(column, getGroupRow(key, groups[key]), -1, []))
|
10391
10668
|
}), renderRowMenu(getGroupRow(key, groups[key]), -1, {
|
10392
10669
|
menu,
|
10393
10670
|
onAction,
|
10394
10671
|
onMenuOpenChange,
|
10395
10672
|
menuAriaLabel
|
10396
|
-
})) : /* @__PURE__ */
|
10397
|
-
panelId: key
|
10398
|
-
|
10673
|
+
})) : /* @__PURE__ */ import_react72.default.createElement(DataList.Row, null, /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, null, /* @__PURE__ */ import_react72.default.createElement(Accordion.Toggle, {
|
10674
|
+
panelId: key,
|
10675
|
+
onChange: onGroupToggled
|
10676
|
+
})), /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, {
|
10399
10677
|
style: { gridColumn: "2 / -1", gap: 4 }
|
10400
|
-
}, "Group: ", /* @__PURE__ */
|
10678
|
+
}, "Group: ", /* @__PURE__ */ import_react72.default.createElement("b", null, key))), /* @__PURE__ */ import_react72.default.createElement(DataList.Row, {
|
10401
10679
|
subgroup: true
|
10402
|
-
}, /* @__PURE__ */
|
10680
|
+
}, /* @__PURE__ */ import_react72.default.createElement(Accordion.UnanimatedPanel, {
|
10403
10681
|
panelId: key
|
10404
|
-
}, /* @__PURE__ */
|
10682
|
+
}, /* @__PURE__ */ import_react72.default.createElement(DataList.SubGroupSpacing, null), groupContent, /* @__PURE__ */ import_react72.default.createElement(DataList.SubGroupSpacing, {
|
10405
10683
|
divider: true
|
10406
10684
|
}))));
|
10407
10685
|
}
|
10408
|
-
}) : /* @__PURE__ */
|
10686
|
+
}) : /* @__PURE__ */ import_react72.default.createElement(List2, {
|
10409
10687
|
pagination,
|
10410
10688
|
paginationContainer: PaginationFooter,
|
10411
10689
|
items: sortedRows,
|
@@ -10418,15 +10696,18 @@ var DataList2 = ({
|
|
10418
10696
|
sortedRows,
|
10419
10697
|
renderRowMenu(row, index, { menu, onAction, onMenuOpenChange, menuAriaLabel }),
|
10420
10698
|
disabled,
|
10421
|
-
() => rowDetails !== void 0 && /* @__PURE__ */
|
10422
|
-
panelId: row.id.toString()
|
10699
|
+
() => rowDetails !== void 0 && /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, null, details && /* @__PURE__ */ import_react72.default.createElement(Accordion.Toggle, {
|
10700
|
+
panelId: row.id.toString(),
|
10701
|
+
onChange: onGroupToggled
|
10423
10702
|
}))
|
10424
10703
|
);
|
10425
|
-
return details ? /* @__PURE__ */
|
10426
|
-
key: row.id
|
10427
|
-
|
10704
|
+
return details ? /* @__PURE__ */ import_react72.default.createElement(Accordion, {
|
10705
|
+
key: row.id,
|
10706
|
+
openPanelId: expandedGroupIds ? expandedGroupIds.find((id) => id === row.id) || null : void 0
|
10707
|
+
}, content, /* @__PURE__ */ import_react72.default.createElement(Accordion.Panel, {
|
10428
10708
|
panelId: row.id.toString(),
|
10429
|
-
className: tw("col-span-full bg-grey-0")
|
10709
|
+
className: tw("col-span-full bg-grey-0"),
|
10710
|
+
"aria-label": `row ${row.id.toString()} details`
|
10430
10711
|
}, details)) : content;
|
10431
10712
|
}
|
10432
10713
|
}));
|
@@ -10439,12 +10720,12 @@ var renderRowMenu = (row, index, {
|
|
10439
10720
|
}) => {
|
10440
10721
|
if (menu) {
|
10441
10722
|
const menuContent = (0, import_isFunction.default)(menu) ? menu(row, index) : menu;
|
10442
|
-
return /* @__PURE__ */
|
10723
|
+
return /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, {
|
10443
10724
|
align: "right"
|
10444
|
-
}, menuContent && /* @__PURE__ */
|
10725
|
+
}, menuContent && /* @__PURE__ */ import_react72.default.createElement(DropdownMenu2, {
|
10445
10726
|
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index),
|
10446
10727
|
onOpenChange: onMenuOpenChange
|
10447
|
-
}, /* @__PURE__ */
|
10728
|
+
}, /* @__PURE__ */ import_react72.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react72.default.createElement(Button.Icon, {
|
10448
10729
|
"aria-label": menuAriaLabel,
|
10449
10730
|
icon: import_more2.default
|
10450
10731
|
})), menuContent));
|
@@ -10454,12 +10735,12 @@ var renderRowMenu = (row, index, {
|
|
10454
10735
|
var renderRow = (columns, row, index, rows, menu, disabled, renderFirstColumn) => {
|
10455
10736
|
var _a;
|
10456
10737
|
const isRowDisabled = (_a = disabled == null ? void 0 : disabled(row, index, rows)) != null ? _a : false;
|
10457
|
-
return /* @__PURE__ */
|
10738
|
+
return /* @__PURE__ */ import_react72.default.createElement(DataList.Row, {
|
10458
10739
|
key: row.id,
|
10459
10740
|
disabled: isRowDisabled
|
10460
|
-
}, renderFirstColumn == null ? void 0 : renderFirstColumn(row, index, rows), /* @__PURE__ */
|
10741
|
+
}, renderFirstColumn == null ? void 0 : renderFirstColumn(row, index, rows), /* @__PURE__ */ import_react72.default.createElement(List2, {
|
10461
10742
|
items: columns,
|
10462
|
-
renderItem: (column) => /* @__PURE__ */
|
10743
|
+
renderItem: (column) => /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, __spreadValues({}, cellProps(column)), renderCell(column, row, index, rows))
|
10463
10744
|
}), menu);
|
10464
10745
|
};
|
10465
10746
|
var DEFAULT_CONTENT = "";
|
@@ -10468,14 +10749,14 @@ var renderCell = (column, row, index, rows) => {
|
|
10468
10749
|
if (column.type === "status") {
|
10469
10750
|
const status = column.status(row, index, rows);
|
10470
10751
|
if (status) {
|
10471
|
-
cellContent = /* @__PURE__ */
|
10752
|
+
cellContent = /* @__PURE__ */ import_react72.default.createElement(StatusChip, __spreadValues({
|
10472
10753
|
dense: true
|
10473
10754
|
}, status));
|
10474
10755
|
}
|
10475
10756
|
} else if (column.type === "action") {
|
10476
10757
|
const action = renameProperty("text", "children", column.action(row, index, rows));
|
10477
10758
|
if (action) {
|
10478
|
-
cellContent = /* @__PURE__ */
|
10759
|
+
cellContent = /* @__PURE__ */ import_react72.default.createElement(Button.Secondary, __spreadValues({
|
10479
10760
|
dense: true
|
10480
10761
|
}, action));
|
10481
10762
|
}
|
@@ -10484,30 +10765,30 @@ var renderCell = (column, row, index, rows) => {
|
|
10484
10765
|
} else if (column.type === "item") {
|
10485
10766
|
const item = column.item(row, index, rows);
|
10486
10767
|
if (item) {
|
10487
|
-
cellContent = /* @__PURE__ */
|
10768
|
+
cellContent = /* @__PURE__ */ import_react72.default.createElement(Item4, __spreadValues({}, item));
|
10488
10769
|
}
|
10489
10770
|
} else if (column.formatter) {
|
10490
10771
|
cellContent = column.formatter(row[column.field], row, index, rows);
|
10491
10772
|
} else {
|
10492
10773
|
cellContent = row[column.field];
|
10493
10774
|
}
|
10494
|
-
return column.tooltip ? /* @__PURE__ */
|
10775
|
+
return column.tooltip ? /* @__PURE__ */ import_react72.default.createElement(Tooltip, __spreadValues({}, column.tooltip(row, index, rows)), cellContent) : cellContent;
|
10495
10776
|
};
|
10496
10777
|
DataList2.Skeleton = DataListSkeleton;
|
10497
10778
|
|
10498
10779
|
// src/molecules/DataTable/DataTable.tsx
|
10499
|
-
var
|
10780
|
+
var import_react75 = __toESM(require("react"));
|
10500
10781
|
var import_compact2 = __toESM(require("lodash/compact"));
|
10501
10782
|
var import_isFunction2 = __toESM(require("lodash/isFunction"));
|
10502
10783
|
|
10503
10784
|
// src/molecules/Table/Table.tsx
|
10504
|
-
var
|
10785
|
+
var import_react74 = __toESM(require("react"));
|
10505
10786
|
|
10506
10787
|
// src/utils/table/useScrollTarget.ts
|
10507
|
-
var
|
10788
|
+
var import_react73 = __toESM(require("react"));
|
10508
10789
|
var useScrollTarget = (callback) => {
|
10509
|
-
const targetRef =
|
10510
|
-
|
10790
|
+
const targetRef = import_react73.default.useRef(null);
|
10791
|
+
import_react73.default.useLayoutEffect(() => {
|
10511
10792
|
const observer = new IntersectionObserver((entries) => entries[0].isIntersecting && callback && callback(), {
|
10512
10793
|
root: null,
|
10513
10794
|
rootMargin: `0px 0px 200px 0px`
|
@@ -10525,12 +10806,12 @@ var Table2 = (_a) => {
|
|
10525
10806
|
var _b = _a, { children, onPrev, onNext } = _b, rest = __objRest(_b, ["children", "onPrev", "onNext"]);
|
10526
10807
|
const bottomRef = useScrollTarget(onNext);
|
10527
10808
|
const topRef = useScrollTarget(onPrev);
|
10528
|
-
return /* @__PURE__ */
|
10809
|
+
return /* @__PURE__ */ import_react74.default.createElement("div", {
|
10529
10810
|
className: classNames("Aquarium-Table", tw("relative w-full"))
|
10530
|
-
}, /* @__PURE__ */
|
10811
|
+
}, /* @__PURE__ */ import_react74.default.createElement("div", {
|
10531
10812
|
ref: topRef,
|
10532
10813
|
className: tw("absolute top-0 h-1 w-full left-0 bg-transparent")
|
10533
|
-
}), /* @__PURE__ */
|
10814
|
+
}), /* @__PURE__ */ import_react74.default.createElement(Table, __spreadValues({}, rest), children), /* @__PURE__ */ import_react74.default.createElement("div", {
|
10534
10815
|
ref: bottomRef,
|
10535
10816
|
className: tw("absolute bottom-0 h-1 w-full left-0 bg-transparent")
|
10536
10817
|
}));
|
@@ -10577,13 +10858,13 @@ var DataTable = (_a) => {
|
|
10577
10858
|
const [sort, updateSort] = useTableSort();
|
10578
10859
|
const sortedRows = sortRowsBy(rows, sort);
|
10579
10860
|
const amountOfColumns = columns.length + (menu ? 1 : 0);
|
10580
|
-
const PaginationFooter =
|
10581
|
-
({ children }) => /* @__PURE__ */
|
10861
|
+
const PaginationFooter = import_react75.default.useCallback(
|
10862
|
+
({ children }) => /* @__PURE__ */ import_react75.default.createElement("tfoot", null, /* @__PURE__ */ import_react75.default.createElement("tr", null, /* @__PURE__ */ import_react75.default.createElement("td", {
|
10582
10863
|
colSpan: amountOfColumns
|
10583
10864
|
}, children))),
|
10584
10865
|
[amountOfColumns]
|
10585
10866
|
);
|
10586
|
-
return /* @__PURE__ */
|
10867
|
+
return /* @__PURE__ */ import_react75.default.createElement(Table2, __spreadProps(__spreadValues({}, rest), {
|
10587
10868
|
className: classNames(
|
10588
10869
|
"Aquarium-DataTable",
|
10589
10870
|
tw({
|
@@ -10592,30 +10873,30 @@ var DataTable = (_a) => {
|
|
10592
10873
|
"table-fixed": layout === "fixed"
|
10593
10874
|
})
|
10594
10875
|
)
|
10595
|
-
}), /* @__PURE__ */
|
10876
|
+
}), /* @__PURE__ */ import_react75.default.createElement(Table2.Head, {
|
10596
10877
|
sticky
|
10597
10878
|
}, (0, import_compact2.default)([
|
10598
10879
|
...columns.map((column) => {
|
10599
|
-
const content = column.headerTooltip && !column.headerInvisible ? /* @__PURE__ */
|
10880
|
+
const content = column.headerTooltip && !column.headerInvisible ? /* @__PURE__ */ import_react75.default.createElement(Tooltip, {
|
10600
10881
|
placement: column.headerTooltip.placement,
|
10601
10882
|
content: column.headerTooltip.content
|
10602
10883
|
}, column.headerName) : !column.headerInvisible && column.headerName;
|
10603
|
-
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
10884
|
+
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ import_react75.default.createElement(Table2.SortCell, __spreadValues({
|
10604
10885
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
10605
10886
|
onClick: () => updateSort(column),
|
10606
10887
|
style: { width: column.width },
|
10607
10888
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
10608
|
-
}, cellProps(column)), content) : /* @__PURE__ */
|
10889
|
+
}, cellProps(column)), content) : /* @__PURE__ */ import_react75.default.createElement(Table2.Cell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
10609
10890
|
style: { width: column.width },
|
10610
10891
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
10611
10892
|
}), content);
|
10612
10893
|
}),
|
10613
|
-
menu ? /* @__PURE__ */
|
10894
|
+
menu ? /* @__PURE__ */ import_react75.default.createElement(Table2.Cell, {
|
10614
10895
|
key: "__contextMenu",
|
10615
10896
|
align: "right",
|
10616
10897
|
"aria-label": menuAriaLabel
|
10617
10898
|
}, menuHeaderName) : null
|
10618
|
-
])), /* @__PURE__ */
|
10899
|
+
])), /* @__PURE__ */ import_react75.default.createElement(List2, {
|
10619
10900
|
container: Table2.Body,
|
10620
10901
|
paginationContainer: PaginationFooter,
|
10621
10902
|
pagination,
|
@@ -10623,12 +10904,12 @@ var DataTable = (_a) => {
|
|
10623
10904
|
renderItem: (row, index) => {
|
10624
10905
|
var _a2;
|
10625
10906
|
const isRowDisabled = (_a2 = disabled == null ? void 0 : disabled(row, index, sortedRows)) != null ? _a2 : false;
|
10626
|
-
return /* @__PURE__ */
|
10907
|
+
return /* @__PURE__ */ import_react75.default.createElement(Table2.Row, {
|
10627
10908
|
key: row.id,
|
10628
10909
|
disabled: isRowDisabled
|
10629
|
-
}, /* @__PURE__ */
|
10910
|
+
}, /* @__PURE__ */ import_react75.default.createElement(List2, {
|
10630
10911
|
items: columns,
|
10631
|
-
renderItem: (column) => /* @__PURE__ */
|
10912
|
+
renderItem: (column) => /* @__PURE__ */ import_react75.default.createElement(Table2.Cell, __spreadValues({}, cellProps(column)), renderCell2(column, row, index, sortedRows))
|
10632
10913
|
}), renderRowMenu2(row, index, { menu, menuAriaLabel, onAction, onMenuOpenChange }));
|
10633
10914
|
}
|
10634
10915
|
}));
|
@@ -10641,12 +10922,12 @@ var renderRowMenu2 = (row, index, {
|
|
10641
10922
|
}) => {
|
10642
10923
|
if (menu) {
|
10643
10924
|
const menuContent = (0, import_isFunction2.default)(menu) ? menu(row, index) : menu;
|
10644
|
-
return /* @__PURE__ */
|
10925
|
+
return /* @__PURE__ */ import_react75.default.createElement(Table2.Cell, {
|
10645
10926
|
align: "right"
|
10646
|
-
}, menuContent && /* @__PURE__ */
|
10927
|
+
}, menuContent && /* @__PURE__ */ import_react75.default.createElement(DropdownMenu2, {
|
10647
10928
|
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index),
|
10648
10929
|
onOpenChange: onMenuOpenChange
|
10649
|
-
}, /* @__PURE__ */
|
10930
|
+
}, /* @__PURE__ */ import_react75.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react75.default.createElement(Button.Icon, {
|
10650
10931
|
"aria-label": menuAriaLabel,
|
10651
10932
|
icon: import_more3.default
|
10652
10933
|
})), menuContent));
|
@@ -10659,14 +10940,14 @@ var renderCell2 = (column, row, index, rows) => {
|
|
10659
10940
|
if (column.type === "status") {
|
10660
10941
|
const status = column.status(row, index, rows);
|
10661
10942
|
if (status) {
|
10662
|
-
cellContent = /* @__PURE__ */
|
10943
|
+
cellContent = /* @__PURE__ */ import_react75.default.createElement(StatusChip, __spreadValues({
|
10663
10944
|
dense: true
|
10664
10945
|
}, status));
|
10665
10946
|
}
|
10666
10947
|
} else if (column.type === "action") {
|
10667
10948
|
const action = renameProperty("text", "children", column.action(row, index, rows));
|
10668
10949
|
if (action) {
|
10669
|
-
cellContent = /* @__PURE__ */
|
10950
|
+
cellContent = /* @__PURE__ */ import_react75.default.createElement(Button.Secondary, __spreadValues({
|
10670
10951
|
dense: true
|
10671
10952
|
}, action));
|
10672
10953
|
}
|
@@ -10675,24 +10956,24 @@ var renderCell2 = (column, row, index, rows) => {
|
|
10675
10956
|
} else if (column.type === "item") {
|
10676
10957
|
const item = column.item(row, index, rows);
|
10677
10958
|
if (item) {
|
10678
|
-
cellContent = /* @__PURE__ */
|
10959
|
+
cellContent = /* @__PURE__ */ import_react75.default.createElement(Item4, __spreadValues({}, item));
|
10679
10960
|
}
|
10680
10961
|
} else if (column.formatter) {
|
10681
10962
|
cellContent = column.formatter(row[column.field], row, index, rows);
|
10682
10963
|
} else {
|
10683
10964
|
cellContent = row[column.field];
|
10684
10965
|
}
|
10685
|
-
return column.tooltip ? /* @__PURE__ */
|
10966
|
+
return column.tooltip ? /* @__PURE__ */ import_react75.default.createElement(Tooltip, __spreadValues({}, column.tooltip(row, index, rows)), cellContent) : cellContent;
|
10686
10967
|
};
|
10687
10968
|
DataTable.Skeleton = DataListSkeleton;
|
10688
10969
|
|
10689
10970
|
// src/molecules/Dialog/Dialog.tsx
|
10690
|
-
var
|
10971
|
+
var import_react77 = __toESM(require("react"));
|
10691
10972
|
var import_dialog = require("@react-aria/dialog");
|
10692
10973
|
var import_overlays6 = require("@react-aria/overlays");
|
10693
|
-
var
|
10974
|
+
var import_utils14 = require("@react-aria/utils");
|
10694
10975
|
var import_overlays7 = require("@react-stately/overlays");
|
10695
|
-
var
|
10976
|
+
var import_omit8 = __toESM(require("lodash/omit"));
|
10696
10977
|
|
10697
10978
|
// src/atoms/Dialog/Dialog.tsx
|
10698
10979
|
var import_confirm2 = __toESM(require_confirm());
|
@@ -10714,10 +10995,10 @@ var DIALOG_ICONS_AND_COLORS = {
|
|
10714
10995
|
};
|
10715
10996
|
|
10716
10997
|
// src/atoms/Modal/Modal.tsx
|
10717
|
-
var
|
10998
|
+
var import_react76 = __toESM(require("react"));
|
10718
10999
|
var Modal = (_a) => {
|
10719
11000
|
var _b = _a, { children, className, open } = _b, rest = __objRest(_b, ["children", "className", "open"]);
|
10720
|
-
return open ? /* @__PURE__ */
|
11001
|
+
return open ? /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10721
11002
|
className: classNames(
|
10722
11003
|
tw("inset-0 overflow-y-auto z-modal flex justify-center items-center fixed py-7"),
|
10723
11004
|
className
|
@@ -10726,14 +11007,14 @@ var Modal = (_a) => {
|
|
10726
11007
|
};
|
10727
11008
|
Modal.BackDrop = (_a) => {
|
10728
11009
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
10729
|
-
return /* @__PURE__ */
|
11010
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10730
11011
|
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-primary-100 opacity-60"), className)
|
10731
11012
|
}));
|
10732
11013
|
};
|
10733
|
-
Modal.Dialog =
|
11014
|
+
Modal.Dialog = import_react76.default.forwardRef(
|
10734
11015
|
(_a, ref) => {
|
10735
11016
|
var _b = _a, { children, className, size = "sm" } = _b, rest = __objRest(_b, ["children", "className", "size"]);
|
10736
|
-
return /* @__PURE__ */
|
11017
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({
|
10737
11018
|
ref,
|
10738
11019
|
"aria-modal": "true"
|
10739
11020
|
}, rest), {
|
@@ -10751,31 +11032,31 @@ Modal.Dialog = import_react75.default.forwardRef(
|
|
10751
11032
|
);
|
10752
11033
|
Modal.Header = (_a) => {
|
10753
11034
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
10754
|
-
return /* @__PURE__ */
|
11035
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10755
11036
|
className: classNames(tw("px-7 py-6 gap-3 flex items-center"), className)
|
10756
11037
|
}), children);
|
10757
11038
|
};
|
10758
11039
|
Modal.HeaderImage = (_a) => {
|
10759
11040
|
var _b = _a, { backgroundImage, className } = _b, rest = __objRest(_b, ["backgroundImage", "className"]);
|
10760
11041
|
const common = tw("h-[120px] min-h-[120px] w-full ");
|
10761
|
-
return backgroundImage ? /* @__PURE__ */
|
11042
|
+
return backgroundImage ? /* @__PURE__ */ import_react76.default.createElement("img", __spreadProps(__spreadValues({
|
10762
11043
|
"aria-hidden": true,
|
10763
11044
|
src: backgroundImage != null ? backgroundImage : void 0
|
10764
11045
|
}, rest), {
|
10765
11046
|
className: classNames(common, tw("object-cover"), className)
|
10766
|
-
})) : /* @__PURE__ */
|
11047
|
+
})) : /* @__PURE__ */ import_react76.default.createElement("div", {
|
10767
11048
|
className: classNames(common, tw("bg-grey-5"), className)
|
10768
11049
|
});
|
10769
11050
|
};
|
10770
11051
|
Modal.CloseButtonContainer = (_a) => {
|
10771
11052
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
10772
|
-
return /* @__PURE__ */
|
11053
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10773
11054
|
className: classNames(tw("absolute top-[20px] right-[28px]"), className)
|
10774
11055
|
}));
|
10775
11056
|
};
|
10776
11057
|
Modal.Title = (_a) => {
|
10777
11058
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
10778
|
-
return /* @__PURE__ */
|
11059
|
+
return /* @__PURE__ */ import_react76.default.createElement(Typography, __spreadValues({
|
10779
11060
|
htmlTag: "h2",
|
10780
11061
|
variant: "subheading",
|
10781
11062
|
color: "grey-90",
|
@@ -10784,52 +11065,52 @@ Modal.Title = (_a) => {
|
|
10784
11065
|
};
|
10785
11066
|
Modal.Subtitle = (_a) => {
|
10786
11067
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
10787
|
-
return /* @__PURE__ */
|
11068
|
+
return /* @__PURE__ */ import_react76.default.createElement(Typography, __spreadValues({
|
10788
11069
|
variant: "small",
|
10789
11070
|
color: "grey-60"
|
10790
11071
|
}, rest), children);
|
10791
11072
|
};
|
10792
11073
|
Modal.TitleContainer = (_a) => {
|
10793
11074
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
10794
|
-
return /* @__PURE__ */
|
11075
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10795
11076
|
className: classNames(tw("flex flex-col grow gap-2"), className)
|
10796
11077
|
}), children);
|
10797
11078
|
};
|
10798
11079
|
Modal.Body = (_a) => {
|
10799
11080
|
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
10800
|
-
return /* @__PURE__ */
|
11081
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10801
11082
|
className: classNames(tw("px-7 grow overflow-y-auto", { "pb-6": noFooter }), className),
|
10802
11083
|
style: __spreadValues({ maxHeight }, style)
|
10803
11084
|
}), children);
|
10804
11085
|
};
|
10805
11086
|
Modal.Footer = (_a) => {
|
10806
11087
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
10807
|
-
return /* @__PURE__ */
|
11088
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10808
11089
|
className: classNames(tw("px-7 py-6"), className)
|
10809
11090
|
}), children);
|
10810
11091
|
};
|
10811
11092
|
Modal.Actions = (_a) => {
|
10812
11093
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
10813
|
-
return /* @__PURE__ */
|
11094
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10814
11095
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
10815
11096
|
}), children);
|
10816
11097
|
};
|
10817
11098
|
|
10818
11099
|
// src/molecules/Dialog/Dialog.tsx
|
10819
11100
|
var Dialog = (props) => {
|
10820
|
-
const ref =
|
11101
|
+
const ref = import_react77.default.useRef(null);
|
10821
11102
|
const state = (0, import_overlays7.useOverlayTriggerState)({ isOpen: props.open });
|
10822
11103
|
const { modalProps, underlayProps } = (0, import_overlays6.useModalOverlay)({}, state, ref);
|
10823
11104
|
if (!state.isOpen) {
|
10824
11105
|
return null;
|
10825
11106
|
}
|
10826
|
-
return /* @__PURE__ */
|
11107
|
+
return /* @__PURE__ */ import_react77.default.createElement(import_overlays6.Overlay, null, /* @__PURE__ */ import_react77.default.createElement(Modal, {
|
10827
11108
|
className: "Aquarium-Dialog",
|
10828
11109
|
open: true
|
10829
|
-
}, /* @__PURE__ */
|
11110
|
+
}, /* @__PURE__ */ import_react77.default.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ import_react77.default.createElement(Modal.Dialog, __spreadValues({
|
10830
11111
|
ref,
|
10831
11112
|
size: "sm"
|
10832
|
-
}, modalProps), /* @__PURE__ */
|
11113
|
+
}, modalProps), /* @__PURE__ */ import_react77.default.createElement(DialogWrapper, __spreadValues({}, props)))));
|
10833
11114
|
};
|
10834
11115
|
var DialogWrapper = ({
|
10835
11116
|
title,
|
@@ -10838,54 +11119,54 @@ var DialogWrapper = ({
|
|
10838
11119
|
primaryAction,
|
10839
11120
|
secondaryAction
|
10840
11121
|
}) => {
|
10841
|
-
const ref =
|
10842
|
-
const labelledBy = (0,
|
10843
|
-
const describedBy = (0,
|
11122
|
+
const ref = import_react77.default.useRef(null);
|
11123
|
+
const labelledBy = (0, import_utils14.useId)();
|
11124
|
+
const describedBy = (0, import_utils14.useId)();
|
10844
11125
|
const { dialogProps } = (0, import_dialog.useDialog)(
|
10845
11126
|
{ "role": "alertdialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
10846
11127
|
ref
|
10847
11128
|
);
|
10848
|
-
return /* @__PURE__ */
|
11129
|
+
return /* @__PURE__ */ import_react77.default.createElement("div", __spreadProps(__spreadValues({
|
10849
11130
|
ref
|
10850
11131
|
}, dialogProps), {
|
10851
11132
|
className: tw("outline-none")
|
10852
|
-
}), /* @__PURE__ */
|
11133
|
+
}), /* @__PURE__ */ import_react77.default.createElement(Modal.Header, {
|
10853
11134
|
className: tw("icon-stroke-2")
|
10854
|
-
}, /* @__PURE__ */
|
11135
|
+
}, /* @__PURE__ */ import_react77.default.createElement(Icon, {
|
10855
11136
|
icon: DIALOG_ICONS_AND_COLORS[type].icon,
|
10856
11137
|
color: DIALOG_ICONS_AND_COLORS[type].color,
|
10857
11138
|
fontSize: 20
|
10858
|
-
}), /* @__PURE__ */
|
11139
|
+
}), /* @__PURE__ */ import_react77.default.createElement(Modal.Title, {
|
10859
11140
|
id: labelledBy,
|
10860
11141
|
variant: "large",
|
10861
11142
|
color: DIALOG_ICONS_AND_COLORS[type].color
|
10862
|
-
}, title)), /* @__PURE__ */
|
11143
|
+
}, title)), /* @__PURE__ */ import_react77.default.createElement(Modal.Body, {
|
10863
11144
|
id: describedBy
|
10864
|
-
}, /* @__PURE__ */
|
11145
|
+
}, /* @__PURE__ */ import_react77.default.createElement(Typography2.Default, null, children)), /* @__PURE__ */ import_react77.default.createElement(Modal.Footer, null, /* @__PURE__ */ import_react77.default.createElement(Modal.Actions, null, secondaryAction && /* @__PURE__ */ import_react77.default.createElement(Button.Ghost, __spreadValues({
|
10865
11146
|
key: secondaryAction.text
|
10866
|
-
}, (0,
|
11147
|
+
}, (0, import_omit8.default)(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ import_react77.default.createElement(Button.Secondary, __spreadValues({
|
10867
11148
|
key: primaryAction.text
|
10868
|
-
}, (0,
|
11149
|
+
}, (0, import_omit8.default)(primaryAction, "text")), primaryAction.text))));
|
10869
11150
|
};
|
10870
11151
|
|
10871
11152
|
// src/molecules/Dropdown/Dropdown.tsx
|
10872
|
-
var
|
11153
|
+
var import_react81 = __toESM(require("react"));
|
10873
11154
|
|
10874
11155
|
// src/molecules/Popover/Popover.tsx
|
10875
|
-
var
|
11156
|
+
var import_react80 = __toESM(require("react"));
|
10876
11157
|
var import_interactions3 = require("@react-aria/interactions");
|
10877
11158
|
var import_overlays8 = require("@react-aria/overlays");
|
10878
|
-
var
|
11159
|
+
var import_utils15 = require("@react-aria/utils");
|
10879
11160
|
var import_overlays9 = require("@react-stately/overlays");
|
10880
11161
|
var import_classnames7 = __toESM(require("classnames"));
|
10881
11162
|
|
10882
11163
|
// src/molecules/Popover/Dialog.tsx
|
10883
|
-
var
|
11164
|
+
var import_react78 = __toESM(require("react"));
|
10884
11165
|
var import_dialog2 = require("@react-aria/dialog");
|
10885
11166
|
var Dialog2 = ({ children }) => {
|
10886
|
-
const ref =
|
11167
|
+
const ref = import_react78.default.useRef(null);
|
10887
11168
|
const { dialogProps } = (0, import_dialog2.useDialog)({}, ref);
|
10888
|
-
return /* @__PURE__ */
|
11169
|
+
return /* @__PURE__ */ import_react78.default.createElement("div", __spreadProps(__spreadValues({
|
10889
11170
|
ref
|
10890
11171
|
}, dialogProps), {
|
10891
11172
|
className: tw("outline-none")
|
@@ -10893,10 +11174,10 @@ var Dialog2 = ({ children }) => {
|
|
10893
11174
|
};
|
10894
11175
|
|
10895
11176
|
// src/molecules/Popover/PopoverContext.tsx
|
10896
|
-
var
|
10897
|
-
var PopoverContext = (0,
|
11177
|
+
var import_react79 = require("react");
|
11178
|
+
var PopoverContext = (0, import_react79.createContext)(null);
|
10898
11179
|
var usePopoverContext = () => {
|
10899
|
-
const ctx = (0,
|
11180
|
+
const ctx = (0, import_react79.useContext)(PopoverContext);
|
10900
11181
|
if (ctx === null) {
|
10901
11182
|
throw new Error("PopoverContext was used outside of provider.");
|
10902
11183
|
}
|
@@ -10916,24 +11197,24 @@ var Popover2 = (props) => {
|
|
10916
11197
|
crossOffset,
|
10917
11198
|
shouldFlip
|
10918
11199
|
} = props;
|
10919
|
-
const triggerRef = (0,
|
11200
|
+
const triggerRef = (0, import_react80.useRef)(null);
|
10920
11201
|
const state = (0, import_overlays9.useOverlayTriggerState)(props);
|
10921
11202
|
const { triggerProps, overlayProps } = (0, import_overlays8.useOverlayTrigger)({ type: type != null ? type : "dialog" }, state, triggerRef);
|
10922
|
-
return /* @__PURE__ */
|
11203
|
+
return /* @__PURE__ */ import_react80.default.createElement(PopoverContext.Provider, {
|
10923
11204
|
value: {
|
10924
11205
|
state
|
10925
11206
|
}
|
10926
|
-
},
|
11207
|
+
}, import_react80.default.Children.map(props.children, (child) => {
|
10927
11208
|
if (isComponentType(child, Popover2.Trigger)) {
|
10928
|
-
return /* @__PURE__ */
|
11209
|
+
return /* @__PURE__ */ import_react80.default.createElement(import_interactions3.PressResponder, __spreadValues({
|
10929
11210
|
ref: triggerRef
|
10930
|
-
}, triggerProps), /* @__PURE__ */
|
11211
|
+
}, triggerProps), /* @__PURE__ */ import_react80.default.createElement(PopoverTriggerWrapper, {
|
10931
11212
|
"data-testid": props["data-testid"],
|
10932
11213
|
"aria-controls": id
|
10933
11214
|
}, child.props.children));
|
10934
11215
|
}
|
10935
11216
|
if (isComponentType(child, Popover2.Panel)) {
|
10936
|
-
return state.isOpen && /* @__PURE__ */
|
11217
|
+
return state.isOpen && /* @__PURE__ */ import_react80.default.createElement(PopoverOverlay, __spreadValues({
|
10937
11218
|
triggerRef: targetRef != null ? targetRef : triggerRef,
|
10938
11219
|
state,
|
10939
11220
|
placement,
|
@@ -10944,7 +11225,7 @@ var Popover2 = (props) => {
|
|
10944
11225
|
offset,
|
10945
11226
|
crossOffset,
|
10946
11227
|
shouldFlip
|
10947
|
-
}, overlayProps), containFocus ? /* @__PURE__ */
|
11228
|
+
}, overlayProps), containFocus ? /* @__PURE__ */ import_react80.default.createElement(Dialog2, null, child.props.children) : child.props.children);
|
10948
11229
|
}
|
10949
11230
|
throw new Error("Invalid children element type");
|
10950
11231
|
}));
|
@@ -10963,7 +11244,7 @@ var asPopoverButton = (Component, displayName) => {
|
|
10963
11244
|
state.close();
|
10964
11245
|
onClick == null ? void 0 : onClick(e);
|
10965
11246
|
};
|
10966
|
-
return /* @__PURE__ */
|
11247
|
+
return /* @__PURE__ */ import_react80.default.createElement(Component, __spreadProps(__spreadValues({}, props), {
|
10967
11248
|
onClick: handleClick
|
10968
11249
|
}));
|
10969
11250
|
};
|
@@ -10975,22 +11256,22 @@ Popover2.Button = PopoverButton;
|
|
10975
11256
|
var PopoverTriggerWrapper = (_a) => {
|
10976
11257
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
10977
11258
|
var _a2;
|
10978
|
-
const ref = (0,
|
10979
|
-
const trigger =
|
11259
|
+
const ref = (0, import_react80.useRef)(null);
|
11260
|
+
const trigger = import_react80.default.Children.only(children);
|
10980
11261
|
const { pressProps } = (0, import_interactions3.usePress)(__spreadProps(__spreadValues({}, rest), { ref }));
|
10981
|
-
return
|
11262
|
+
return import_react80.default.cloneElement(trigger, __spreadProps(__spreadValues({
|
10982
11263
|
"ref": ref
|
10983
|
-
}, (0,
|
11264
|
+
}, (0, import_utils15.mergeProps)(pressProps, trigger.props)), {
|
10984
11265
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
10985
11266
|
}));
|
10986
11267
|
};
|
10987
11268
|
|
10988
11269
|
// src/molecules/Dropdown/Dropdown.tsx
|
10989
11270
|
var Dropdown = ({ children, content, placement = "bottom-left" }) => {
|
10990
|
-
return /* @__PURE__ */
|
11271
|
+
return /* @__PURE__ */ import_react81.default.createElement(Popover2, {
|
10991
11272
|
type: "menu",
|
10992
11273
|
placement
|
10993
|
-
}, /* @__PURE__ */
|
11274
|
+
}, /* @__PURE__ */ import_react81.default.createElement(Popover2.Trigger, null, children), /* @__PURE__ */ import_react81.default.createElement(Popover2.Panel, {
|
10994
11275
|
className: "Aquarium-Dropdown"
|
10995
11276
|
}, content));
|
10996
11277
|
};
|
@@ -11001,26 +11282,26 @@ var DropdownMenu3 = ({
|
|
11001
11282
|
triggerId,
|
11002
11283
|
setClose = () => void 0
|
11003
11284
|
}) => {
|
11004
|
-
const menuRef =
|
11005
|
-
|
11285
|
+
const menuRef = import_react81.default.useRef(null);
|
11286
|
+
import_react81.default.useEffect(() => {
|
11006
11287
|
const id = setTimeout(() => {
|
11007
11288
|
var _a, _b, _c;
|
11008
11289
|
return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
|
11009
11290
|
});
|
11010
11291
|
return () => clearTimeout(id);
|
11011
11292
|
}, [menuRef.current]);
|
11012
|
-
return /* @__PURE__ */
|
11293
|
+
return /* @__PURE__ */ import_react81.default.createElement("div", {
|
11013
11294
|
style: { minWidth: "250px" },
|
11014
11295
|
className: tw("py-3 bg-white")
|
11015
|
-
}, !!title && /* @__PURE__ */
|
11296
|
+
}, !!title && /* @__PURE__ */ import_react81.default.createElement("div", {
|
11016
11297
|
className: tw("px-4 py-4 text-left text-grey-100 typography-default-strong")
|
11017
|
-
}, title), /* @__PURE__ */
|
11298
|
+
}, title), /* @__PURE__ */ import_react81.default.createElement("ol", {
|
11018
11299
|
role: "menu",
|
11019
11300
|
ref: menuRef,
|
11020
11301
|
id: contentId,
|
11021
11302
|
"aria-labelledby": triggerId
|
11022
|
-
},
|
11023
|
-
return
|
11303
|
+
}, import_react81.default.Children.map(children, (child) => {
|
11304
|
+
return import_react81.default.cloneElement(child, { setClose });
|
11024
11305
|
})));
|
11025
11306
|
};
|
11026
11307
|
var DropdownItem = (_a) => {
|
@@ -11075,10 +11356,10 @@ var DropdownItem = (_a) => {
|
|
11075
11356
|
handleSelect();
|
11076
11357
|
}
|
11077
11358
|
};
|
11078
|
-
const itemContent = /* @__PURE__ */
|
11359
|
+
const itemContent = /* @__PURE__ */ import_react81.default.createElement("div", {
|
11079
11360
|
className: tw("py-3 px-4")
|
11080
11361
|
}, children);
|
11081
|
-
return /* @__PURE__ */
|
11362
|
+
return /* @__PURE__ */ import_react81.default.createElement("li", __spreadProps(__spreadValues({
|
11082
11363
|
role: "menuitem",
|
11083
11364
|
tabIndex: -1,
|
11084
11365
|
onClick: handleClick,
|
@@ -11089,11 +11370,11 @@ var DropdownItem = (_a) => {
|
|
11089
11370
|
"text-grey-10 cursor-not-allowed": disabled,
|
11090
11371
|
"text-primary-70 hover:text-primary-80": color === "danger" && !disabled
|
11091
11372
|
})
|
11092
|
-
}), tooltip ? /* @__PURE__ */
|
11373
|
+
}), tooltip ? /* @__PURE__ */ import_react81.default.createElement(Tooltip, {
|
11093
11374
|
content: tooltip,
|
11094
11375
|
placement: tooltipPlacement,
|
11095
11376
|
inline: false
|
11096
|
-
}, /* @__PURE__ */
|
11377
|
+
}, /* @__PURE__ */ import_react81.default.createElement("div", {
|
11097
11378
|
tabIndex: 0,
|
11098
11379
|
className: tw("grow")
|
11099
11380
|
}, itemContent)) : itemContent);
|
@@ -11103,21 +11384,6 @@ Dropdown.Item = DropdownItem;
|
|
11103
11384
|
|
11104
11385
|
// src/molecules/EmptyState/EmptyState.tsx
|
11105
11386
|
var import_react82 = __toESM(require("react"));
|
11106
|
-
|
11107
|
-
// src/utils/actions.tsx
|
11108
|
-
var import_react81 = __toESM(require("react"));
|
11109
|
-
var import_omit8 = __toESM(require("lodash/omit"));
|
11110
|
-
var renderAction = (kind = "primary", action) => {
|
11111
|
-
return isLink(action) ? /* @__PURE__ */ import_react81.default.createElement(Button.ExternalLink, __spreadValues({
|
11112
|
-
key: action.text,
|
11113
|
-
kind
|
11114
|
-
}, (0, import_omit8.default)(action, "text")), action.text) : /* @__PURE__ */ import_react81.default.createElement(Button, __spreadValues({
|
11115
|
-
key: action.text,
|
11116
|
-
kind
|
11117
|
-
}, (0, import_omit8.default)(action, "text")), action.text);
|
11118
|
-
};
|
11119
|
-
|
11120
|
-
// src/molecules/EmptyState/EmptyState.tsx
|
11121
11387
|
var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
|
11122
11388
|
EmptyStateLayout2["Vertical"] = "vertical";
|
11123
11389
|
EmptyStateLayout2["Horizontal"] = "horizontal";
|
@@ -11210,8 +11476,8 @@ var EmptyState = ({
|
|
11210
11476
|
gap: "4",
|
11211
11477
|
justifyContent: "center",
|
11212
11478
|
alignItems: "center",
|
11213
|
-
|
11214
|
-
}, primaryAction && renderAction("primary", primaryAction), secondaryAction && renderAction("secondary", secondaryAction)), footer && /* @__PURE__ */ import_react82.default.createElement(Box, {
|
11479
|
+
flexWrap: "wrap"
|
11480
|
+
}, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */ import_react82.default.createElement(Box, {
|
11215
11481
|
marginTop: "5"
|
11216
11482
|
}, /* @__PURE__ */ import_react82.default.createElement(Typography2.Small, {
|
11217
11483
|
color: "grey-60"
|
@@ -11346,7 +11612,6 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
11346
11612
|
className: `px-4 py-2 rounded-full ${active ? "bg-grey-5" : "hover:bg-grey-0"}`
|
11347
11613
|
}, /* @__PURE__ */ import_react88.default.createElement("img", {
|
11348
11614
|
src: icon,
|
11349
|
-
alt: name,
|
11350
11615
|
className: "inline mr-4",
|
11351
11616
|
height: 28,
|
11352
11617
|
width: 28
|
@@ -11357,7 +11622,7 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
11357
11622
|
var import_react90 = __toESM(require("react"));
|
11358
11623
|
var import_dialog3 = require("@react-aria/dialog");
|
11359
11624
|
var import_overlays10 = require("@react-aria/overlays");
|
11360
|
-
var
|
11625
|
+
var import_utils17 = require("@react-aria/utils");
|
11361
11626
|
var import_overlays11 = require("@react-stately/overlays");
|
11362
11627
|
var import_castArray = __toESM(require("lodash/castArray"));
|
11363
11628
|
var import_omit9 = __toESM(require("lodash/omit"));
|
@@ -11687,8 +11952,8 @@ var Modal2 = (_a) => {
|
|
11687
11952
|
var ModalWrapper = import_react90.default.forwardRef(
|
11688
11953
|
(_a, ref) => {
|
11689
11954
|
var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
|
11690
|
-
const labelledBy = (0,
|
11691
|
-
const describedBy = (0,
|
11955
|
+
const labelledBy = (0, import_utils17.useId)();
|
11956
|
+
const describedBy = (0, import_utils17.useId)();
|
11692
11957
|
const { dialogProps } = (0, import_dialog3.useDialog)(
|
11693
11958
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
11694
11959
|
ref
|
@@ -11734,10 +11999,10 @@ var ModalTabs = createTabsComponent(
|
|
11734
11999
|
|
11735
12000
|
// src/molecules/MultiInput/MultiInput.tsx
|
11736
12001
|
var import_react92 = __toESM(require("react"));
|
12002
|
+
var import_utils19 = require("@react-aria/utils");
|
11737
12003
|
var import_castArray2 = __toESM(require("lodash/castArray"));
|
11738
12004
|
var import_identity = __toESM(require("lodash/identity"));
|
11739
12005
|
var import_omit10 = __toESM(require("lodash/omit"));
|
11740
|
-
var import_uniqueId5 = __toESM(require("lodash/uniqueId"));
|
11741
12006
|
|
11742
12007
|
// src/molecules/MultiInput/InputChip.tsx
|
11743
12008
|
var import_react91 = __toESM(require("react"));
|
@@ -11964,21 +12229,22 @@ var MultiInput = (props) => {
|
|
11964
12229
|
var _a2;
|
11965
12230
|
setValue((_a2 = props.value) != null ? _a2 : []);
|
11966
12231
|
}, [JSON.stringify(props.value)]);
|
11967
|
-
const
|
11968
|
-
const
|
12232
|
+
const defaultId = (0, import_utils19.useId)();
|
12233
|
+
const id = (_e = (_d = props.id) != null ? _d : props.name) != null ? _e : defaultId;
|
12234
|
+
const errorMessageId = (0, import_utils19.useId)();
|
11969
12235
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
11970
12236
|
const labelControlProps = getLabelControlProps(props);
|
11971
12237
|
const baseProps = (0, import_omit10.default)(props, Object.keys(labelControlProps));
|
11972
12238
|
return /* @__PURE__ */ import_react92.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
11973
|
-
id: `${id
|
11974
|
-
htmlFor: `${id
|
12239
|
+
id: `${id}-label`,
|
12240
|
+
htmlFor: `${id}-input`,
|
11975
12241
|
messageId: errorMessageId
|
11976
12242
|
}, labelControlProps), {
|
11977
12243
|
length: value.length,
|
11978
12244
|
maxLength,
|
11979
12245
|
className: "Aquarium-MultiInput"
|
11980
12246
|
}), /* @__PURE__ */ import_react92.default.createElement(MultiInputBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
11981
|
-
id: `${id
|
12247
|
+
id: `${id}-input`,
|
11982
12248
|
onChange: (value2) => {
|
11983
12249
|
var _a2;
|
11984
12250
|
setValue(value2 != null ? value2 : []);
|
@@ -11996,12 +12262,12 @@ MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
|
11996
12262
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
11997
12263
|
var import_react93 = __toESM(require("react"));
|
11998
12264
|
var import_overlays12 = require("@react-aria/overlays");
|
12265
|
+
var import_utils20 = require("@react-aria/utils");
|
11999
12266
|
var import_downshift3 = require("downshift");
|
12000
12267
|
var import_isEqual = __toESM(require("lodash/isEqual"));
|
12001
12268
|
var import_isNil2 = __toESM(require("lodash/isNil"));
|
12002
12269
|
var import_omit11 = __toESM(require("lodash/omit"));
|
12003
12270
|
var import_omitBy = __toESM(require("lodash/omitBy"));
|
12004
|
-
var import_uniqueId6 = __toESM(require("lodash/uniqueId"));
|
12005
12271
|
var import_match_sorter2 = require("match-sorter");
|
12006
12272
|
var MultiSelectBase = (_a) => {
|
12007
12273
|
var _b = _a, {
|
@@ -12223,19 +12489,20 @@ var MultiSelect = (_a) => {
|
|
12223
12489
|
"emptyState"
|
12224
12490
|
]);
|
12225
12491
|
var _a2;
|
12226
|
-
const
|
12227
|
-
const
|
12492
|
+
const defaultId = (0, import_utils20.useId)();
|
12493
|
+
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
12494
|
+
const errorMessageId = (0, import_utils20.useId)();
|
12228
12495
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12229
12496
|
const labelControlProps = getLabelControlProps(props);
|
12230
12497
|
const baseProps = (0, import_omit11.default)(props, Object.keys(labelControlProps));
|
12231
12498
|
return /* @__PURE__ */ import_react93.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
12232
|
-
id: `${id
|
12233
|
-
htmlFor: `${id
|
12499
|
+
id: `${id}-label`,
|
12500
|
+
htmlFor: `${id}-input`,
|
12234
12501
|
messageId: errorMessageId
|
12235
12502
|
}, labelControlProps), {
|
12236
12503
|
className: "Aquarium-MultiSelect"
|
12237
12504
|
}), /* @__PURE__ */ import_react93.default.createElement(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
12238
|
-
id
|
12505
|
+
id,
|
12239
12506
|
options,
|
12240
12507
|
emptyState,
|
12241
12508
|
disabled: props.disabled,
|
@@ -12248,13 +12515,14 @@ MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
|
12248
12515
|
|
12249
12516
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
12250
12517
|
var import_react94 = __toESM(require("react"));
|
12518
|
+
var import_utils21 = require("@react-aria/utils");
|
12251
12519
|
var import_omit12 = __toESM(require("lodash/omit"));
|
12252
|
-
var
|
12520
|
+
var import_uniqueId = __toESM(require("lodash/uniqueId"));
|
12253
12521
|
var import_caretDown2 = __toESM(require_caretDown());
|
12254
12522
|
var NativeSelectBase = import_react94.default.forwardRef(
|
12255
12523
|
(_a, ref) => {
|
12256
12524
|
var _b = _a, { children, disabled = false, required = false, valid = true, readOnly = false } = _b, props = __objRest(_b, ["children", "disabled", "required", "valid", "readOnly"]);
|
12257
|
-
const placeholderValue = (0,
|
12525
|
+
const placeholderValue = (0, import_uniqueId.default)("default_value_for_placeholder");
|
12258
12526
|
const defaultValue = props.defaultValue ? props.defaultValue : props.placeholder ? placeholderValue : void 0;
|
12259
12527
|
const handleBlur = (event) => {
|
12260
12528
|
var _a2, _b2;
|
@@ -12309,21 +12577,22 @@ var NativeSelect = import_react94.default.forwardRef(
|
|
12309
12577
|
(_a, ref) => {
|
12310
12578
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
12311
12579
|
var _a2;
|
12312
|
-
const
|
12313
|
-
const
|
12580
|
+
const defaultId = (0, import_utils21.useId)();
|
12581
|
+
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
12582
|
+
const errorMessageId = (0, import_utils21.useId)();
|
12314
12583
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12315
12584
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
12316
12585
|
const baseProps = (0, import_omit12.default)(props, Object.keys(labelControlProps));
|
12317
12586
|
return /* @__PURE__ */ import_react94.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
12318
|
-
id: `${id
|
12319
|
-
htmlFor: id
|
12587
|
+
id: `${id}-label`,
|
12588
|
+
htmlFor: id,
|
12320
12589
|
messageId: errorMessageId
|
12321
12590
|
}, labelControlProps), {
|
12322
12591
|
className: "Aquarium-NativeSelect"
|
12323
12592
|
}), /* @__PURE__ */ import_react94.default.createElement(NativeSelectBase, __spreadProps(__spreadValues(__spreadValues({
|
12324
12593
|
ref
|
12325
12594
|
}, baseProps), errorProps), {
|
12326
|
-
id
|
12595
|
+
id,
|
12327
12596
|
"data-testid": dataTestId,
|
12328
12597
|
disabled: props.disabled,
|
12329
12598
|
required: props.required,
|
@@ -12545,7 +12814,7 @@ var CommonPageHeader = ({
|
|
12545
12814
|
}, /* @__PURE__ */ import_react98.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react98.default.createElement(Button.Icon, {
|
12546
12815
|
"aria-label": menuAriaLabel,
|
12547
12816
|
icon: import_more4.default
|
12548
|
-
})), menu)), secondaryActions && (0, import_castArray3.default)(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction("secondary", secondaryAction2)), primaryAction && renderAction("primary", primaryAction)));
|
12817
|
+
})), menu)), secondaryActions && (0, import_castArray3.default)(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction({ kind: "secondary", action: secondaryAction2 })), primaryAction && renderAction({ kind: "primary", action: primaryAction })));
|
12549
12818
|
};
|
12550
12819
|
var PageHeader2 = (props) => /* @__PURE__ */ import_react98.default.createElement(CommonPageHeader, __spreadValues({}, props));
|
12551
12820
|
PageHeader2.displayName = "PageHeader";
|
@@ -12567,7 +12836,7 @@ var Header2 = (_a) => {
|
|
12567
12836
|
className: classNames(tw("p-5 gap-3 flex items-center"), className)
|
12568
12837
|
}), children);
|
12569
12838
|
};
|
12570
|
-
var
|
12839
|
+
var Title2 = (_a) => {
|
12571
12840
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12572
12841
|
return /* @__PURE__ */ import_react99.default.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
12573
12842
|
htmlTag: "h1",
|
@@ -12596,7 +12865,7 @@ var Actions2 = (_a) => {
|
|
12596
12865
|
};
|
12597
12866
|
var PopoverDialog = {
|
12598
12867
|
Header: Header2,
|
12599
|
-
Title,
|
12868
|
+
Title: Title2,
|
12600
12869
|
Body,
|
12601
12870
|
Footer: Footer2,
|
12602
12871
|
Actions: Actions2
|
@@ -12764,7 +13033,7 @@ RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
|
12764
13033
|
|
12765
13034
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
12766
13035
|
var import_react104 = __toESM(require("react"));
|
12767
|
-
var
|
13036
|
+
var import_utils23 = require("@react-aria/utils");
|
12768
13037
|
var isRadioButton = (c) => {
|
12769
13038
|
return import_react104.default.isValidElement(c) && c.type === RadioButton2;
|
12770
13039
|
};
|
@@ -12790,7 +13059,7 @@ var RadioButtonGroup = (_a) => {
|
|
12790
13059
|
]);
|
12791
13060
|
var _a2;
|
12792
13061
|
const [value, setValue] = import_react104.default.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
12793
|
-
const errorMessageId = (0,
|
13062
|
+
const errorMessageId = (0, import_utils23.useId)();
|
12794
13063
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12795
13064
|
const labelControlProps = getLabelControlProps(props);
|
12796
13065
|
if (_value !== void 0 && _value !== value) {
|
@@ -12845,10 +13114,10 @@ RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
|
12845
13114
|
|
12846
13115
|
// src/molecules/Section/Section.tsx
|
12847
13116
|
var import_react109 = __toESM(require("react"));
|
12848
|
-
var
|
13117
|
+
var import_utils24 = require("@react-aria/utils");
|
12849
13118
|
var import_web4 = require("@react-spring/web");
|
12850
13119
|
var import_castArray4 = __toESM(require("lodash/castArray"));
|
12851
|
-
var
|
13120
|
+
var import_isUndefined9 = __toESM(require("lodash/isUndefined"));
|
12852
13121
|
|
12853
13122
|
// src/molecules/Switch/Switch.tsx
|
12854
13123
|
var import_react106 = __toESM(require("react"));
|
@@ -13048,7 +13317,7 @@ Section3.Body = (_a) => {
|
|
13048
13317
|
var import_more5 = __toESM(require_more());
|
13049
13318
|
var Section4 = (props) => {
|
13050
13319
|
var _a, _b, _c, _d, _e;
|
13051
|
-
const { title, subtitle,
|
13320
|
+
const { title, subtitle, children } = props;
|
13052
13321
|
const _collapsible = title ? (_a = props.collapsible) != null ? _a : false : false;
|
13053
13322
|
const _collapsed = title ? props.collapsed : void 0;
|
13054
13323
|
const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
|
@@ -13059,7 +13328,7 @@ var Section4 = (props) => {
|
|
13059
13328
|
const onAction = title ? props.onAction : void 0;
|
13060
13329
|
const onMenuOpenChange = title ? props.onMenuOpenChange : void 0;
|
13061
13330
|
const onCollapsedChange = title ? props.onCollapsedChange : void 0;
|
13062
|
-
if (title && !(0,
|
13331
|
+
if (title && !(0, import_isUndefined9.default)(props.collapsed) && props.collapsed !== isCollapsed) {
|
13063
13332
|
setCollapsed(props.collapsed);
|
13064
13333
|
}
|
13065
13334
|
const handleTitleClick = () => {
|
@@ -13083,8 +13352,8 @@ var Section4 = (props) => {
|
|
13083
13352
|
},
|
13084
13353
|
immediate: !_collapsible
|
13085
13354
|
}), { transform, backgroundColor } = _f, spring = __objRest(_f, ["transform", "backgroundColor"]);
|
13086
|
-
const toggleId = (0,
|
13087
|
-
const regionId = (0,
|
13355
|
+
const toggleId = (0, import_utils24.useId)();
|
13356
|
+
const regionId = (0, import_utils24.useId)();
|
13088
13357
|
return /* @__PURE__ */ import_react109.default.createElement(Section3, {
|
13089
13358
|
"aria-label": title,
|
13090
13359
|
className: "Aquarium-Section"
|
@@ -13115,7 +13384,7 @@ var Section4 = (props) => {
|
|
13115
13384
|
}, /* @__PURE__ */ import_react109.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react109.default.createElement(Button.Icon, {
|
13116
13385
|
"aria-label": menuAriaLabel,
|
13117
13386
|
icon: import_more5.default
|
13118
|
-
})), menu)), actions && (0, import_castArray4.default)(actions).filter(Boolean).map((action) => renderAction("secondary", action)), props.switch && /* @__PURE__ */ import_react109.default.createElement(Switch2, __spreadValues({}, props.switch)))), /* @__PURE__ */ import_react109.default.createElement(import_web4.animated.div, {
|
13387
|
+
})), menu)), props.actions && (0, import_castArray4.default)(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */ import_react109.default.createElement(Switch2, __spreadValues({}, props.switch)), props.select && /* @__PURE__ */ import_react109.default.createElement(SelectBase, __spreadValues({}, props.select)))), /* @__PURE__ */ import_react109.default.createElement(import_web4.animated.div, {
|
13119
13388
|
className: tw(`h-[1px]`),
|
13120
13389
|
style: { backgroundColor }
|
13121
13390
|
})), /* @__PURE__ */ import_react109.default.createElement(import_web4.animated.div, {
|
@@ -13341,7 +13610,7 @@ Stepper2.Step = Step2;
|
|
13341
13610
|
|
13342
13611
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
13343
13612
|
var import_react113 = __toESM(require("react"));
|
13344
|
-
var
|
13613
|
+
var import_utils26 = require("@react-aria/utils");
|
13345
13614
|
var SwitchGroup = (_a) => {
|
13346
13615
|
var _b = _a, {
|
13347
13616
|
value,
|
@@ -13363,7 +13632,7 @@ var SwitchGroup = (_a) => {
|
|
13363
13632
|
if (value !== void 0 && value !== selectedItems) {
|
13364
13633
|
setSelectedItems(value);
|
13365
13634
|
}
|
13366
|
-
const errorMessageId = (0,
|
13635
|
+
const errorMessageId = (0, import_utils26.useId)();
|
13367
13636
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13368
13637
|
const labelControlProps = getLabelControlProps(props);
|
13369
13638
|
const handleChange = (e) => {
|
@@ -13407,9 +13676,9 @@ SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
|
13407
13676
|
|
13408
13677
|
// src/molecules/Textarea/Textarea.tsx
|
13409
13678
|
var import_react114 = __toESM(require("react"));
|
13679
|
+
var import_utils28 = require("@react-aria/utils");
|
13410
13680
|
var import_omit14 = __toESM(require("lodash/omit"));
|
13411
13681
|
var import_toString2 = __toESM(require("lodash/toString"));
|
13412
|
-
var import_uniqueId10 = __toESM(require("lodash/uniqueId"));
|
13413
13682
|
var TextareaBase = import_react114.default.forwardRef(
|
13414
13683
|
(_a, ref) => {
|
13415
13684
|
var _b = _a, { readOnly = false, valid = true } = _b, props = __objRest(_b, ["readOnly", "valid"]);
|
@@ -13427,14 +13696,15 @@ TextareaBase.Skeleton = () => /* @__PURE__ */ import_react114.default.createElem
|
|
13427
13696
|
var Textarea = import_react114.default.forwardRef((props, ref) => {
|
13428
13697
|
var _a, _b, _c;
|
13429
13698
|
const [value, setValue] = (0, import_react114.useState)((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
13430
|
-
const
|
13431
|
-
const
|
13699
|
+
const defaultId = (0, import_utils28.useId)();
|
13700
|
+
const id = (_c = props.id) != null ? _c : defaultId;
|
13701
|
+
const errorMessageId = (0, import_utils28.useId)();
|
13432
13702
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13433
13703
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
13434
13704
|
const baseProps = (0, import_omit14.default)(props, Object.keys(labelControlProps));
|
13435
13705
|
return /* @__PURE__ */ import_react114.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
13436
|
-
id: `${id
|
13437
|
-
htmlFor: id
|
13706
|
+
id: `${id}-label`,
|
13707
|
+
htmlFor: id,
|
13438
13708
|
messageId: errorMessageId,
|
13439
13709
|
length: value !== void 0 ? (0, import_toString2.default)(value).length : void 0
|
13440
13710
|
}, labelControlProps), {
|
@@ -13442,7 +13712,7 @@ var Textarea = import_react114.default.forwardRef((props, ref) => {
|
|
13442
13712
|
}), /* @__PURE__ */ import_react114.default.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
|
13443
13713
|
ref
|
13444
13714
|
}, baseProps), errorProps), {
|
13445
|
-
id
|
13715
|
+
id,
|
13446
13716
|
"data-testid": dataTestId,
|
13447
13717
|
onChange: (e) => {
|
13448
13718
|
var _a2;
|