@aivenio/aquarium 1.43.0 → 1.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_variables.scss +1 -1
- package/dist/atoms.cjs +537 -283
- package/dist/atoms.mjs +536 -283
- package/dist/charts.cjs +196 -11
- package/dist/charts.mjs +183 -4
- 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 +1 -3
- package/dist/src/charts/AreaChart/AreaChart.js +2 -2
- package/dist/src/charts/BarChart/BarChart.d.ts +1 -3
- package/dist/src/charts/BarChart/BarChart.js +1 -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 +1 -3
- package/dist/src/charts/LineChart/LineChart.js +1 -1
- 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 +13 -0
- package/dist/src/charts/PieChart/DoughnutChart.js +31 -0
- package/dist/src/charts/PieChart/PieChart.d.ts +11 -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/index.d.ts +3 -0
- package/dist/src/charts/index.js +4 -1
- package/dist/src/charts/lib/utils.d.ts +5 -0
- package/dist/src/charts/lib/utils.js +7 -1
- 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 +2 -2
- 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 +17 -0
- package/dist/system.cjs +912 -646
- package/dist/system.mjs +898 -632
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +1 -1
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,8 +7203,8 @@ 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 descriptionID = (0,
|
7016
|
-
const titleID = (0,
|
7206
|
+
const descriptionID = (0, import_utils2.useId)();
|
7207
|
+
const titleID = (0, import_utils2.useId)();
|
7017
7208
|
return /* @__PURE__ */ import_react22.default.createElement(Alert, {
|
7018
7209
|
className: "Aquarium-Alert",
|
7019
7210
|
type,
|
@@ -7044,20 +7235,33 @@ var import_react24 = __toESM(require("react"));
|
|
7044
7235
|
var import_react23 = __toESM(require("react"));
|
7045
7236
|
var import_isNumber = __toESM(require("lodash/isNumber"));
|
7046
7237
|
var import_isUndefined7 = __toESM(require("lodash/isUndefined"));
|
7047
|
-
var Skeleton = ({
|
7048
|
-
|
7049
|
-
|
7050
|
-
|
7051
|
-
|
7052
|
-
|
7053
|
-
|
7054
|
-
|
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
|
+
]);
|
7055
7256
|
const styles = {
|
7056
7257
|
width: (0, import_isNumber.default)(width) ? `${width}px` : width,
|
7057
7258
|
height: (0, import_isNumber.default)(height) ? `${height}px` : height
|
7058
7259
|
};
|
7059
|
-
return /* @__PURE__ */ import_react23.default.createElement("div", {
|
7060
|
-
|
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",
|
7061
7265
|
className: classNames(
|
7062
7266
|
"Aquarium-Skeleton",
|
7063
7267
|
tw("bg-grey-5", {
|
@@ -7069,7 +7273,7 @@ var Skeleton = ({
|
|
7069
7273
|
}),
|
7070
7274
|
className
|
7071
7275
|
)
|
7072
|
-
});
|
7276
|
+
}));
|
7073
7277
|
};
|
7074
7278
|
|
7075
7279
|
// src/molecules/Avatar/Avatar.tsx
|
@@ -7362,9 +7566,8 @@ var ActiveCrumb = asCrumb("span", "ActiveCrumb", { isActive: true });
|
|
7362
7566
|
Breadcrumbs.Crumb = Crumb;
|
7363
7567
|
|
7364
7568
|
// src/molecules/Card/Card.tsx
|
7365
|
-
var
|
7569
|
+
var import_react37 = __toESM(require("react"));
|
7366
7570
|
var import_button2 = require("@react-aria/button");
|
7367
|
-
var import_omit3 = __toESM(require("lodash/omit"));
|
7368
7571
|
|
7369
7572
|
// src/molecules/Chip/Chip.tsx
|
7370
7573
|
var import_react31 = __toESM(require("react"));
|
@@ -7609,12 +7812,28 @@ Typography2.SmallTextBold = (_a) => {
|
|
7609
7812
|
};
|
7610
7813
|
|
7611
7814
|
// src/atoms/Card/Card.tsx
|
7612
|
-
var
|
7815
|
+
var import_react34 = __toESM(require("react"));
|
7613
7816
|
var import_isNumber3 = __toESM(require("lodash/isNumber"));
|
7614
|
-
|
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(
|
7615
7834
|
(_a, ref) => {
|
7616
7835
|
var _b = _a, { disabled, fullWidth, enableMinWidth = true, clickable, className, children } = _b, rest = __objRest(_b, ["disabled", "fullWidth", "enableMinWidth", "clickable", "className", "children"]);
|
7617
|
-
return /* @__PURE__ */
|
7836
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", __spreadProps(__spreadValues({
|
7618
7837
|
ref
|
7619
7838
|
}, rest), {
|
7620
7839
|
className: classNames(
|
@@ -7632,14 +7851,14 @@ var Card = import_react33.default.forwardRef(
|
|
7632
7851
|
);
|
7633
7852
|
var ColorHighlight = (_a) => {
|
7634
7853
|
var _b = _a, { color, className } = _b, rest = __objRest(_b, ["color", "className"]);
|
7635
|
-
return /* @__PURE__ */
|
7854
|
+
return /* @__PURE__ */ import_react34.default.createElement(Box, __spreadProps(__spreadValues({}, rest), {
|
7636
7855
|
backgroundColor: color,
|
7637
7856
|
className: classNames(tw("h-1 w-full absolute top-0 left-0 right-0"), className)
|
7638
7857
|
}));
|
7639
7858
|
};
|
7640
7859
|
var ImageContainer = (_a) => {
|
7641
7860
|
var _b = _a, { className, fullSize } = _b, rest = __objRest(_b, ["className", "fullSize"]);
|
7642
|
-
return /* @__PURE__ */
|
7861
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7643
7862
|
className: classNames(
|
7644
7863
|
tw("-mx-4", {
|
7645
7864
|
"-mt-4": Boolean(fullSize)
|
@@ -7649,7 +7868,7 @@ var ImageContainer = (_a) => {
|
|
7649
7868
|
}));
|
7650
7869
|
};
|
7651
7870
|
var classes = "w-full bg-cover object-cover";
|
7652
|
-
var Image = ({ image, imageAlt, fullSize = false, imageHeight }) => /* @__PURE__ */
|
7871
|
+
var Image = ({ image, imageAlt, fullSize = false, imageHeight }) => /* @__PURE__ */ import_react34.default.createElement("img", {
|
7653
7872
|
src: image,
|
7654
7873
|
alt: imageAlt,
|
7655
7874
|
className: tw(classes, {
|
@@ -7658,42 +7877,73 @@ var Image = ({ image, imageAlt, fullSize = false, imageHeight }) => /* @__PURE__
|
|
7658
7877
|
}),
|
7659
7878
|
style: { height: (0, import_isNumber3.default)(imageHeight) ? `${imageHeight}px` : imageHeight }
|
7660
7879
|
});
|
7880
|
+
var Title = (props) => /* @__PURE__ */ import_react34.default.createElement(Box.Flex, __spreadValues({
|
7881
|
+
component: "div",
|
7882
|
+
alignItems: "center",
|
7883
|
+
gap: "2"
|
7884
|
+
}, props));
|
7661
7885
|
var Content = (_a) => {
|
7662
7886
|
var _b = _a, { className, dense } = _b, rest = __objRest(_b, ["className", "dense"]);
|
7663
|
-
return /* @__PURE__ */
|
7887
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7664
7888
|
className: classNames(tw("flex flex-col", { "gap-4": !dense }), className)
|
7665
7889
|
}));
|
7666
7890
|
};
|
7667
7891
|
var Actions = (_a) => {
|
7668
7892
|
var _b = _a, { className, dense } = _b, rest = __objRest(_b, ["className", "dense"]);
|
7669
|
-
return /* @__PURE__ */
|
7893
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7670
7894
|
className: classNames(tw("flex gap-3 items-center", { "pt-3 ": !dense }), className)
|
7671
7895
|
}));
|
7672
7896
|
};
|
7897
|
+
Card.Title = Title;
|
7673
7898
|
Card.Content = Content;
|
7674
7899
|
Card.Actions = Actions;
|
7675
7900
|
Card.ImageContainer = ImageContainer;
|
7676
7901
|
Card.Image = Image;
|
7677
7902
|
Card.ColorHiglight = ColorHighlight;
|
7678
|
-
|
7679
|
-
|
7680
|
-
|
7681
|
-
var
|
7682
|
-
|
7683
|
-
|
7684
|
-
|
7685
|
-
|
7686
|
-
|
7687
|
-
|
7688
|
-
|
7689
|
-
|
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
|
+
);
|
7690
7915
|
}
|
7691
|
-
|
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
|
+
};
|
7692
7928
|
|
7693
|
-
// src/
|
7929
|
+
// src/utils/actions.tsx
|
7694
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"));
|
7695
7946
|
var import_button = require("@react-aria/button");
|
7696
|
-
var import_lodash = require("lodash");
|
7697
7947
|
var CompactCard = ({
|
7698
7948
|
title,
|
7699
7949
|
clampTitle,
|
@@ -7702,82 +7952,73 @@ var CompactCard = ({
|
|
7702
7952
|
color,
|
7703
7953
|
action,
|
7704
7954
|
link,
|
7955
|
+
primaryAction = action,
|
7956
|
+
secondaryAction = link,
|
7705
7957
|
onClick,
|
7706
7958
|
disabled,
|
7707
7959
|
fullWidth,
|
7708
7960
|
children
|
7709
7961
|
}) => {
|
7710
|
-
const ref = (0,
|
7962
|
+
const ref = (0, import_react36.useRef)(null);
|
7711
7963
|
const { buttonProps } = (0, import_button.useButton)({ elementType: "div", onPress: onClick, isDisabled: disabled }, ref);
|
7712
|
-
|
7713
|
-
color: "black"
|
7714
|
-
}, title);
|
7715
|
-
return /* @__PURE__ */ import_react35.default.createElement(Card, __spreadProps(__spreadValues({
|
7964
|
+
return /* @__PURE__ */ import_react36.default.createElement(Card, __spreadProps(__spreadValues({
|
7716
7965
|
ref,
|
7717
7966
|
className: "Aquarium-Card.Compact",
|
7718
7967
|
clickable: Boolean(onClick),
|
7719
7968
|
fullWidth,
|
7720
|
-
enableMinWidth: Boolean(
|
7969
|
+
enableMinWidth: Boolean(primaryAction || secondaryAction || chips.length)
|
7721
7970
|
}, onClick ? buttonProps : {}), {
|
7722
7971
|
disabled
|
7723
|
-
}), color && /* @__PURE__ */
|
7972
|
+
}), color && /* @__PURE__ */ import_react36.default.createElement(Card.ColorHiglight, {
|
7724
7973
|
color
|
7725
|
-
}), chips.length > 0 && /* @__PURE__ */
|
7974
|
+
}), chips.length > 0 && /* @__PURE__ */ import_react36.default.createElement(ChipContainer, {
|
7726
7975
|
dense: true
|
7727
|
-
}, chips.map((chip) => /* @__PURE__ */
|
7976
|
+
}, chips.map((chip) => /* @__PURE__ */ import_react36.default.createElement(Chip2, {
|
7728
7977
|
key: chip,
|
7729
7978
|
text: chip
|
7730
|
-
}))), /* @__PURE__ */
|
7979
|
+
}))), /* @__PURE__ */ import_react36.default.createElement(Box, {
|
7731
7980
|
display: "flex",
|
7732
7981
|
gap: "5"
|
7733
|
-
}, icon && /* @__PURE__ */
|
7982
|
+
}, icon && /* @__PURE__ */ import_react36.default.createElement(Avatar, {
|
7734
7983
|
image: icon
|
7735
|
-
}), /* @__PURE__ */
|
7984
|
+
}), /* @__PURE__ */ import_react36.default.createElement(Card.Content, {
|
7736
7985
|
dense: true
|
7737
|
-
}, clampTitle
|
7738
|
-
lines: clampTitle,
|
7739
|
-
wordBreak: "break-all"
|
7740
|
-
}, titleContent) : titleContent, /* @__PURE__ */ import_react35.default.createElement(Typography2.Caption, {
|
7986
|
+
}, getTitleContent({ title, clampTitle, dense: true }), /* @__PURE__ */ import_react36.default.createElement(Typography2.Caption, {
|
7741
7987
|
color: "grey-70"
|
7742
|
-
}, children))), (
|
7743
|
-
dense: true
|
7744
|
-
}, action && /* @__PURE__ */ import_react35.default.createElement(Button.Secondary, __spreadValues({
|
7988
|
+
}, children))), (primaryAction || secondaryAction) && /* @__PURE__ */ import_react36.default.createElement(Card.Actions, {
|
7745
7989
|
dense: true
|
7746
|
-
},
|
7747
|
-
dense: true,
|
7748
|
-
kind: "ghost"
|
7749
|
-
}, (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 })));
|
7750
7991
|
};
|
7751
7992
|
var CompactSkeleton = ({
|
7752
7993
|
chips = true,
|
7753
7994
|
icon = true,
|
7754
7995
|
actions = true,
|
7755
7996
|
fullWidth = false
|
7756
|
-
}) => /* @__PURE__ */
|
7997
|
+
}) => /* @__PURE__ */ import_react36.default.createElement(Card, {
|
7757
7998
|
fullWidth
|
7758
|
-
}, chips && /* @__PURE__ */
|
7999
|
+
}, chips && /* @__PURE__ */ import_react36.default.createElement(ChipContainer, {
|
7759
8000
|
dense: true
|
7760
|
-
}, Array.from({ length: 5 }).map((_, idx) => /* @__PURE__ */
|
8001
|
+
}, Array.from({ length: 5 }).map((_, idx) => /* @__PURE__ */ import_react36.default.createElement(Chip2.Skeleton, {
|
7761
8002
|
key: idx
|
7762
|
-
}))), /* @__PURE__ */
|
8003
|
+
}))), /* @__PURE__ */ import_react36.default.createElement(Box, {
|
7763
8004
|
display: "flex",
|
7764
8005
|
gap: "5"
|
7765
|
-
}, icon && /* @__PURE__ */
|
8006
|
+
}, icon && /* @__PURE__ */ import_react36.default.createElement(Avatar.Skeleton, null), /* @__PURE__ */ import_react36.default.createElement(Card.Content, {
|
7766
8007
|
dense: true
|
7767
|
-
}, /* @__PURE__ */
|
8008
|
+
}, /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
|
7768
8009
|
width: 80,
|
7769
8010
|
height: 20
|
7770
|
-
}), /* @__PURE__ */
|
8011
|
+
}), /* @__PURE__ */ import_react36.default.createElement(Box, {
|
7771
8012
|
height: "1"
|
7772
|
-
}), /* @__PURE__ */
|
8013
|
+
}), /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
|
7773
8014
|
width: 145,
|
7774
8015
|
height: 16
|
7775
|
-
}))), actions && /* @__PURE__ */
|
8016
|
+
}))), actions && /* @__PURE__ */ import_react36.default.createElement(Card.Actions, {
|
7776
8017
|
dense: true
|
7777
|
-
}, /* @__PURE__ */
|
8018
|
+
}, /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
|
7778
8019
|
width: 115,
|
7779
8020
|
height: 25
|
7780
|
-
}), /* @__PURE__ */
|
8021
|
+
}), /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
|
7781
8022
|
width: 60,
|
7782
8023
|
height: 25
|
7783
8024
|
})));
|
@@ -7796,17 +8037,16 @@ var Card2 = ({
|
|
7796
8037
|
color,
|
7797
8038
|
action,
|
7798
8039
|
link,
|
8040
|
+
primaryAction = action,
|
8041
|
+
secondaryAction = link,
|
7799
8042
|
onClick,
|
7800
8043
|
disabled,
|
7801
8044
|
fullWidth,
|
7802
8045
|
children
|
7803
8046
|
}) => {
|
7804
|
-
const ref = (0,
|
8047
|
+
const ref = (0, import_react37.useRef)(null);
|
7805
8048
|
const { buttonProps } = (0, import_button2.useButton)({ elementType: "div", onPress: onClick, isDisabled: disabled }, ref);
|
7806
|
-
|
7807
|
-
color: "black"
|
7808
|
-
}, title);
|
7809
|
-
return /* @__PURE__ */ import_react36.default.createElement(Card, __spreadProps(__spreadValues({
|
8049
|
+
return /* @__PURE__ */ import_react37.default.createElement(Card, __spreadProps(__spreadValues({
|
7810
8050
|
ref,
|
7811
8051
|
className: "Aquarium-Card",
|
7812
8052
|
clickable: Boolean(onClick),
|
@@ -7814,35 +8054,29 @@ var Card2 = ({
|
|
7814
8054
|
enableMinWidth: Boolean(image || action || link || chips.length || icons.length)
|
7815
8055
|
}, onClick ? buttonProps : {}), {
|
7816
8056
|
disabled
|
7817
|
-
}), color && /* @__PURE__ */
|
8057
|
+
}), color && /* @__PURE__ */ import_react37.default.createElement(Card.ColorHiglight, {
|
7818
8058
|
color
|
7819
|
-
}), chips.length > 0 && /* @__PURE__ */
|
8059
|
+
}), chips.length > 0 && /* @__PURE__ */ import_react37.default.createElement(ChipContainer, {
|
7820
8060
|
dense: true
|
7821
|
-
}, chips.map((chip) => /* @__PURE__ */
|
8061
|
+
}, chips.map((chip) => /* @__PURE__ */ import_react37.default.createElement(Chip2, {
|
7822
8062
|
key: chip,
|
7823
8063
|
text: chip
|
7824
|
-
}))), icons.length > 0 && /* @__PURE__ */
|
8064
|
+
}))), icons.length > 0 && /* @__PURE__ */ import_react37.default.createElement(AvatarStack, {
|
7825
8065
|
images: icons
|
7826
|
-
}), image !== void 0 && (imageHeight ? /* @__PURE__ */
|
8066
|
+
}), image !== void 0 && (imageHeight ? /* @__PURE__ */ import_react37.default.createElement(CardImage, {
|
7827
8067
|
image,
|
7828
8068
|
imageAlt,
|
7829
8069
|
imageHeight
|
7830
|
-
}) : /* @__PURE__ */
|
8070
|
+
}) : /* @__PURE__ */ import_react37.default.createElement(CardImage, {
|
7831
8071
|
image,
|
7832
8072
|
imageAlt,
|
7833
8073
|
fullSize: chips.length === 0
|
7834
|
-
})), /* @__PURE__ */
|
7835
|
-
lines: clampTitle,
|
7836
|
-
wordBreak: "break-all"
|
7837
|
-
}, 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, {
|
7838
8075
|
color: "grey-70"
|
7839
|
-
}, children || description)), (
|
7840
|
-
dense: true
|
7841
|
-
}, (0, import_omit3.default)(action, "text")), action.text), link && /* @__PURE__ */ import_react36.default.createElement(Button.ExternalLink, __spreadValues({
|
7842
|
-
dense: true,
|
7843
|
-
kind: "ghost"
|
7844
|
-
}, (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 })));
|
7845
8077
|
};
|
8078
|
+
Card2.Title = Card.Title;
|
8079
|
+
Card2.Title.displayName = "Card.Title";
|
7846
8080
|
var CardSkeleton = ({
|
7847
8081
|
chips = true,
|
7848
8082
|
icons = false,
|
@@ -7850,60 +8084,60 @@ var CardSkeleton = ({
|
|
7850
8084
|
actions = true,
|
7851
8085
|
fullWidth = false,
|
7852
8086
|
imageHeight
|
7853
|
-
}) => /* @__PURE__ */
|
8087
|
+
}) => /* @__PURE__ */ import_react37.default.createElement(Card, {
|
7854
8088
|
fullWidth
|
7855
|
-
}, chips && /* @__PURE__ */
|
8089
|
+
}, chips && /* @__PURE__ */ import_react37.default.createElement(ChipContainer, {
|
7856
8090
|
dense: true
|
7857
|
-
}, Array.from({ length: 5 }).map((_, idx) => /* @__PURE__ */
|
8091
|
+
}, Array.from({ length: 5 }).map((_, idx) => /* @__PURE__ */ import_react37.default.createElement(Chip2.Skeleton, {
|
7858
8092
|
key: idx
|
7859
|
-
}))), icons && /* @__PURE__ */
|
8093
|
+
}))), icons && /* @__PURE__ */ import_react37.default.createElement(AvatarStack, {
|
7860
8094
|
images: [null]
|
7861
|
-
}), image && (imageHeight ? /* @__PURE__ */
|
8095
|
+
}), image && (imageHeight ? /* @__PURE__ */ import_react37.default.createElement(CardImage, {
|
7862
8096
|
image: null,
|
7863
8097
|
imageHeight
|
7864
|
-
}) : /* @__PURE__ */
|
8098
|
+
}) : /* @__PURE__ */ import_react37.default.createElement(CardImage, {
|
7865
8099
|
image: null,
|
7866
8100
|
fullSize: !chips
|
7867
|
-
})), /* @__PURE__ */
|
8101
|
+
})), /* @__PURE__ */ import_react37.default.createElement(Card.Content, null, /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7868
8102
|
width: 145,
|
7869
8103
|
height: 25
|
7870
|
-
}), /* @__PURE__ */
|
8104
|
+
}), /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7871
8105
|
width: 145,
|
7872
8106
|
height: 16
|
7873
|
-
})), actions && /* @__PURE__ */
|
8107
|
+
})), actions && /* @__PURE__ */ import_react37.default.createElement(Card.Actions, null, /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7874
8108
|
width: 115,
|
7875
8109
|
height: 25
|
7876
|
-
}), /* @__PURE__ */
|
8110
|
+
}), /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7877
8111
|
width: 60,
|
7878
8112
|
height: 25
|
7879
8113
|
})));
|
7880
8114
|
Card2.Skeleton = CardSkeleton;
|
7881
8115
|
Card2.Compact = CompactCard;
|
7882
|
-
var CardImage = ({ image, imageAlt, imageHeight, fullSize = false }) => /* @__PURE__ */
|
8116
|
+
var CardImage = ({ image, imageAlt, imageHeight, fullSize = false }) => /* @__PURE__ */ import_react37.default.createElement(Card.ImageContainer, {
|
7883
8117
|
fullSize
|
7884
|
-
}, image ? imageHeight ? /* @__PURE__ */
|
8118
|
+
}, image ? imageHeight ? /* @__PURE__ */ import_react37.default.createElement(Card.Image, {
|
7885
8119
|
image,
|
7886
8120
|
imageAlt,
|
7887
8121
|
imageHeight
|
7888
|
-
}) : /* @__PURE__ */
|
8122
|
+
}) : /* @__PURE__ */ import_react37.default.createElement(Card.Image, {
|
7889
8123
|
image,
|
7890
8124
|
imageAlt,
|
7891
8125
|
fullSize
|
7892
|
-
}) : /* @__PURE__ */
|
8126
|
+
}) : /* @__PURE__ */ import_react37.default.createElement(CardImage.Skeleton, {
|
7893
8127
|
fullSize,
|
7894
8128
|
imageHeight
|
7895
8129
|
}));
|
7896
|
-
var CardImageSkeleton = ({ imageHeight, fullSize }) => imageHeight ? /* @__PURE__ */
|
8130
|
+
var CardImageSkeleton = ({ imageHeight, fullSize }) => imageHeight ? /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7897
8131
|
height: imageHeight,
|
7898
8132
|
width: "100%"
|
7899
|
-
}) : /* @__PURE__ */
|
8133
|
+
}) : /* @__PURE__ */ import_react37.default.createElement(Skeleton, {
|
7900
8134
|
height: fullSize ? 225 : 174,
|
7901
8135
|
width: "100%"
|
7902
8136
|
});
|
7903
8137
|
CardImage.Skeleton = CardImageSkeleton;
|
7904
8138
|
|
7905
8139
|
// src/molecules/Carousel/Carousel.tsx
|
7906
|
-
var
|
8140
|
+
var import_react38 = __toESM(require("react"));
|
7907
8141
|
var import_classnames5 = __toESM(require("classnames"));
|
7908
8142
|
var import_chevronLeft2 = __toESM(require_chevronLeft());
|
7909
8143
|
var import_chevronRight2 = __toESM(require_chevronRight());
|
@@ -7913,13 +8147,13 @@ var Carousel = ({
|
|
7913
8147
|
onPageChange,
|
7914
8148
|
children
|
7915
8149
|
}) => {
|
7916
|
-
const containerRef = (0,
|
7917
|
-
const scrollbarContainerRef = (0,
|
7918
|
-
const items =
|
7919
|
-
const [width, setWidth] = (0,
|
7920
|
-
const [isUpdating, setIsUpdating] = (0,
|
7921
|
-
const [currentPage, setCurrentPage] = (0,
|
7922
|
-
(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)(() => {
|
7923
8157
|
const updateContainerWidth = () => {
|
7924
8158
|
var _a;
|
7925
8159
|
const containerWidth = (_a = containerRef.current) == null ? void 0 : _a.getBoundingClientRect().width;
|
@@ -7936,7 +8170,7 @@ var Carousel = ({
|
|
7936
8170
|
if (typeof currentPageProp === "number" && currentPageProp !== currentPage && onPageChange && width !== 0) {
|
7937
8171
|
setCurrentPage(currentPageProp);
|
7938
8172
|
}
|
7939
|
-
(0,
|
8173
|
+
(0, import_react38.useEffect)(() => {
|
7940
8174
|
var _a, _b;
|
7941
8175
|
if (width === 0) {
|
7942
8176
|
return;
|
@@ -7965,30 +8199,30 @@ var Carousel = ({
|
|
7965
8199
|
onPageChange && onPageChange(newPage);
|
7966
8200
|
}
|
7967
8201
|
};
|
7968
|
-
return items.length > 0 ? /* @__PURE__ */
|
8202
|
+
return items.length > 0 ? /* @__PURE__ */ import_react38.default.createElement("div", {
|
7969
8203
|
className: (0, import_classnames5.default)("Aquarium-Carousel", tw("w-full flex flex-col")),
|
7970
8204
|
ref: containerRef
|
7971
|
-
}, containerRef !== null && /* @__PURE__ */
|
8205
|
+
}, containerRef !== null && /* @__PURE__ */ import_react38.default.createElement("ul", {
|
7972
8206
|
ref: scrollbarContainerRef,
|
7973
8207
|
tabIndex: 0,
|
7974
8208
|
onScroll: handleScroll,
|
7975
8209
|
className: tw(
|
7976
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"
|
7977
8211
|
)
|
7978
|
-
}, width !== 0 &&
|
8212
|
+
}, width !== 0 && import_react38.default.Children.map(children, (child, index) => /* @__PURE__ */ import_react38.default.createElement(CarouselItem, {
|
7979
8213
|
key: index,
|
7980
8214
|
width,
|
7981
8215
|
ariaHidden: index + 1 === currentPage ? void 0 : true
|
7982
|
-
}, child))), /* @__PURE__ */
|
8216
|
+
}, child))), /* @__PURE__ */ import_react38.default.createElement(Flexbox, {
|
7983
8217
|
direction: "row",
|
7984
8218
|
justifyContent: "flex-end",
|
7985
8219
|
alignItems: "center"
|
7986
|
-
}, /* @__PURE__ */
|
8220
|
+
}, /* @__PURE__ */ import_react38.default.createElement(IconButton, {
|
7987
8221
|
"aria-label": "Previous",
|
7988
8222
|
onClick: () => handleNavigationClick("left"),
|
7989
8223
|
icon: import_chevronLeft2.default,
|
7990
8224
|
disabled: currentPage === 1
|
7991
|
-
}), /* @__PURE__ */
|
8225
|
+
}), /* @__PURE__ */ import_react38.default.createElement(Typography2.Caption, null, `${currentPage}/${import_react38.default.Children.count(children)}`), /* @__PURE__ */ import_react38.default.createElement(IconButton, {
|
7992
8226
|
"aria-label": "Next",
|
7993
8227
|
onClick: () => handleNavigationClick("right"),
|
7994
8228
|
icon: import_chevronRight2.default,
|
@@ -7996,7 +8230,7 @@ var Carousel = ({
|
|
7996
8230
|
}))) : null;
|
7997
8231
|
};
|
7998
8232
|
var CarouselItem = ({ width, children, ariaHidden }) => {
|
7999
|
-
return /* @__PURE__ */
|
8233
|
+
return /* @__PURE__ */ import_react38.default.createElement("li", {
|
8000
8234
|
style: { width },
|
8001
8235
|
"aria-hidden": ariaHidden,
|
8002
8236
|
className: tw("flex justify-center snap-start")
|
@@ -8004,10 +8238,10 @@ var CarouselItem = ({ width, children, ariaHidden }) => {
|
|
8004
8238
|
};
|
8005
8239
|
|
8006
8240
|
// src/molecules/Checkbox/Checkbox.tsx
|
8007
|
-
var
|
8241
|
+
var import_react41 = __toESM(require("react"));
|
8008
8242
|
|
8009
8243
|
// src/molecules/ControlLabel/ControlLabel.tsx
|
8010
|
-
var
|
8244
|
+
var import_react39 = __toESM(require("react"));
|
8011
8245
|
var ControlLabel = (_a) => {
|
8012
8246
|
var _b = _a, {
|
8013
8247
|
label,
|
@@ -8030,10 +8264,10 @@ var ControlLabel = (_a) => {
|
|
8030
8264
|
]);
|
8031
8265
|
const textClass = disabled ? "text-grey-40" : "text-grey-70";
|
8032
8266
|
const rtl = labelPlacement === "left";
|
8033
|
-
const labelEl = label && /* @__PURE__ */
|
8267
|
+
const labelEl = label && /* @__PURE__ */ import_react39.default.createElement("span", {
|
8034
8268
|
className: tw("typography-small self-center", { "text-right": rtl })
|
8035
8269
|
}, label);
|
8036
|
-
return /* @__PURE__ */
|
8270
|
+
return /* @__PURE__ */ import_react39.default.createElement("label", __spreadValues({
|
8037
8271
|
className: classNames(
|
8038
8272
|
className,
|
8039
8273
|
tw(
|
@@ -8048,7 +8282,7 @@ var ControlLabel = (_a) => {
|
|
8048
8282
|
)
|
8049
8283
|
),
|
8050
8284
|
style: __spreadValues({}, style)
|
8051
|
-
}, rest), rtl ? labelEl : children, rtl ? children : labelEl, caption && /* @__PURE__ */
|
8285
|
+
}, rest), rtl ? labelEl : children, rtl ? children : labelEl, caption && /* @__PURE__ */ import_react39.default.createElement(Typography2, {
|
8052
8286
|
className: tw({ "col-start-2": !rtl }),
|
8053
8287
|
variant: "caption",
|
8054
8288
|
color: disabled ? "grey-40" : "grey-50"
|
@@ -8056,18 +8290,18 @@ var ControlLabel = (_a) => {
|
|
8056
8290
|
};
|
8057
8291
|
|
8058
8292
|
// src/atoms/Checkbox/Checkbox.tsx
|
8059
|
-
var
|
8293
|
+
var import_react40 = __toESM(require("react"));
|
8060
8294
|
var import_minus2 = __toESM(require_minus());
|
8061
8295
|
var import_tick3 = __toESM(require_tick());
|
8062
|
-
var Checkbox =
|
8296
|
+
var Checkbox = import_react40.default.forwardRef(
|
8063
8297
|
(_a, ref) => {
|
8064
8298
|
var _b = _a, { id, children, name, disabled = false, readOnly = false, indeterminate = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly", "indeterminate"]);
|
8065
|
-
return /* @__PURE__ */
|
8299
|
+
return /* @__PURE__ */ import_react40.default.createElement("span", {
|
8066
8300
|
className: classNames(tw("inline-flex justify-center items-center self-center relative"), {
|
8067
8301
|
"hover:border-grey-50 peer-checked:border-primary-80": !disabled,
|
8068
8302
|
"border-grey-5": disabled
|
8069
8303
|
})
|
8070
|
-
}, /* @__PURE__ */
|
8304
|
+
}, /* @__PURE__ */ import_react40.default.createElement("input", __spreadProps(__spreadValues({
|
8071
8305
|
id,
|
8072
8306
|
ref,
|
8073
8307
|
type: "checkbox",
|
@@ -8081,7 +8315,7 @@ var Checkbox = import_react39.default.forwardRef(
|
|
8081
8315
|
),
|
8082
8316
|
readOnly,
|
8083
8317
|
disabled
|
8084
|
-
})), /* @__PURE__ */
|
8318
|
+
})), /* @__PURE__ */ import_react40.default.createElement(Icon, {
|
8085
8319
|
icon: indeterminate ? import_minus2.default : import_tick3.default,
|
8086
8320
|
strokeWidth: "2px",
|
8087
8321
|
className: classNames(
|
@@ -8101,7 +8335,7 @@ var Checkbox = import_react39.default.forwardRef(
|
|
8101
8335
|
);
|
8102
8336
|
|
8103
8337
|
// src/molecules/Checkbox/Checkbox.tsx
|
8104
|
-
var Checkbox2 =
|
8338
|
+
var Checkbox2 = import_react41.default.forwardRef(
|
8105
8339
|
(_a, ref) => {
|
8106
8340
|
var _b = _a, {
|
8107
8341
|
id,
|
@@ -8124,7 +8358,7 @@ var Checkbox2 = import_react40.default.forwardRef(
|
|
8124
8358
|
]);
|
8125
8359
|
var _a2;
|
8126
8360
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
8127
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
8361
|
+
return !readOnly || isChecked ? /* @__PURE__ */ import_react41.default.createElement(ControlLabel, {
|
8128
8362
|
htmlFor: id,
|
8129
8363
|
label: children,
|
8130
8364
|
labelPlacement,
|
@@ -8134,7 +8368,7 @@ var Checkbox2 = import_react40.default.forwardRef(
|
|
8134
8368
|
disabled,
|
8135
8369
|
className: "Aquarium-Checkbox",
|
8136
8370
|
style: { gap: "0 8px" }
|
8137
|
-
}, !readOnly && /* @__PURE__ */
|
8371
|
+
}, !readOnly && /* @__PURE__ */ import_react41.default.createElement(Checkbox, __spreadProps(__spreadValues({
|
8138
8372
|
id,
|
8139
8373
|
ref,
|
8140
8374
|
name
|
@@ -8145,12 +8379,12 @@ var Checkbox2 = import_react40.default.forwardRef(
|
|
8145
8379
|
}
|
8146
8380
|
);
|
8147
8381
|
Checkbox2.displayName = "Checkbox";
|
8148
|
-
var CheckboxSkeleton = () => /* @__PURE__ */
|
8382
|
+
var CheckboxSkeleton = () => /* @__PURE__ */ import_react41.default.createElement("div", {
|
8149
8383
|
className: tw("flex gap-3")
|
8150
|
-
}, /* @__PURE__ */
|
8384
|
+
}, /* @__PURE__ */ import_react41.default.createElement(Skeleton, {
|
8151
8385
|
height: 20,
|
8152
8386
|
width: 20
|
8153
|
-
}), /* @__PURE__ */
|
8387
|
+
}), /* @__PURE__ */ import_react41.default.createElement(Skeleton, {
|
8154
8388
|
height: 20,
|
8155
8389
|
width: 150
|
8156
8390
|
}));
|
@@ -8158,14 +8392,14 @@ Checkbox2.Skeleton = CheckboxSkeleton;
|
|
8158
8392
|
Checkbox2.Skeleton.displayName = "Checkbox.Skeleton";
|
8159
8393
|
|
8160
8394
|
// src/molecules/CheckboxGroup/CheckboxGroup.tsx
|
8161
|
-
var
|
8162
|
-
var
|
8395
|
+
var import_react48 = __toESM(require("react"));
|
8396
|
+
var import_utils4 = require("@react-aria/utils");
|
8163
8397
|
|
8164
8398
|
// src/atoms/InputGroup/InputGroup.tsx
|
8165
|
-
var
|
8399
|
+
var import_react43 = __toESM(require("react"));
|
8166
8400
|
|
8167
8401
|
// src/molecules/Grid/Grid.tsx
|
8168
|
-
var
|
8402
|
+
var import_react42 = __toESM(require("react"));
|
8169
8403
|
var import_isEmpty = __toESM(require("lodash/isEmpty"));
|
8170
8404
|
var import_mapValues = __toESM(require("lodash/mapValues"));
|
8171
8405
|
var import_pick = __toESM(require("lodash/pick"));
|
@@ -8216,14 +8450,14 @@ var GridItem = Tailwindify(
|
|
8216
8450
|
gridRowEnd: rowEnd
|
8217
8451
|
});
|
8218
8452
|
const HtmlElement = htmlTag;
|
8219
|
-
return /* @__PURE__ */
|
8453
|
+
return /* @__PURE__ */ import_react42.default.createElement(HtmlElement, {
|
8220
8454
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
8221
8455
|
className
|
8222
8456
|
}, children);
|
8223
8457
|
}
|
8224
8458
|
);
|
8225
8459
|
var Grid = (props) => {
|
8226
|
-
return /* @__PURE__ */
|
8460
|
+
return /* @__PURE__ */ import_react42.default.createElement(GridComponent, __spreadValues({}, props));
|
8227
8461
|
};
|
8228
8462
|
var GridComponent = Tailwindify(
|
8229
8463
|
({
|
@@ -8277,12 +8511,13 @@ var GridComponent = Tailwindify(
|
|
8277
8511
|
gridRowEnd: rowEnd
|
8278
8512
|
});
|
8279
8513
|
const HtmlElement = htmlTag;
|
8280
|
-
return /* @__PURE__ */
|
8514
|
+
return /* @__PURE__ */ import_react42.default.createElement(HtmlElement, {
|
8281
8515
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
8282
8516
|
className
|
8283
8517
|
}, children);
|
8284
8518
|
}
|
8285
8519
|
);
|
8520
|
+
Grid.displayName = "Grid";
|
8286
8521
|
Grid.Item = GridItem;
|
8287
8522
|
Grid.Item.displayName = "Grid.Item";
|
8288
8523
|
|
@@ -8295,7 +8530,7 @@ var gridColumnStyles = {
|
|
8295
8530
|
};
|
8296
8531
|
var InputGroup = (_a) => {
|
8297
8532
|
var _b = _a, { cols = "1", children } = _b, rest = __objRest(_b, ["cols", "children"]);
|
8298
|
-
return /* @__PURE__ */
|
8533
|
+
return /* @__PURE__ */ import_react43.default.createElement(Grid, __spreadProps(__spreadValues({}, rest), {
|
8299
8534
|
display: "inline-grid",
|
8300
8535
|
colGap: "l4",
|
8301
8536
|
rowGap: "3",
|
@@ -8305,12 +8540,12 @@ var InputGroup = (_a) => {
|
|
8305
8540
|
};
|
8306
8541
|
|
8307
8542
|
// src/utils/form/Label/Label.tsx
|
8308
|
-
var
|
8543
|
+
var import_react47 = __toESM(require("react"));
|
8309
8544
|
|
8310
8545
|
// src/utils/form/FormControl/FormControl.tsx
|
8311
|
-
var
|
8546
|
+
var import_react44 = __toESM(require("react"));
|
8312
8547
|
var FormControl = ({ className, inline, children }) => {
|
8313
|
-
return /* @__PURE__ */
|
8548
|
+
return /* @__PURE__ */ import_react44.default.createElement(Flexbox, {
|
8314
8549
|
direction: "column",
|
8315
8550
|
display: inline ? "inline-flex" : "flex",
|
8316
8551
|
className
|
@@ -8318,14 +8553,14 @@ var FormControl = ({ className, inline, children }) => {
|
|
8318
8553
|
};
|
8319
8554
|
|
8320
8555
|
// src/utils/form/HelperText/HelperText.tsx
|
8321
|
-
var
|
8556
|
+
var import_react46 = __toESM(require("react"));
|
8322
8557
|
var import_classnames6 = __toESM(require("classnames"));
|
8323
8558
|
var import_isNumber4 = __toESM(require("lodash/isNumber"));
|
8324
8559
|
|
8325
8560
|
// src/utils/form/CharCounter/CharCounter.tsx
|
8326
|
-
var
|
8561
|
+
var import_react45 = __toESM(require("react"));
|
8327
8562
|
var CharCounter = ({ dense = true, length, maxLength, valid = true }) => {
|
8328
|
-
return /* @__PURE__ */
|
8563
|
+
return /* @__PURE__ */ import_react45.default.createElement("span", {
|
8329
8564
|
className: tw(
|
8330
8565
|
`whitespace-nowrap`,
|
8331
8566
|
valid ? "text-grey-50" : "text-error-70",
|
@@ -8347,34 +8582,34 @@ var HelperText = ({
|
|
8347
8582
|
const hasMaxLength = (0, import_isNumber4.default)(maxLength) && maxLength > 0;
|
8348
8583
|
const showMessage = hasError || hasMaxLength;
|
8349
8584
|
if (!showMessage) {
|
8350
|
-
return reserveSpaceForError ? /* @__PURE__ */
|
8585
|
+
return reserveSpaceForError ? /* @__PURE__ */ import_react46.default.createElement("p", {
|
8351
8586
|
className: tw("block mt-1 mb-3 typography-caption")
|
8352
8587
|
}, "\xA0") : null;
|
8353
8588
|
}
|
8354
|
-
return /* @__PURE__ */
|
8589
|
+
return /* @__PURE__ */ import_react46.default.createElement(Grid, {
|
8355
8590
|
cols: "1",
|
8356
8591
|
rows: "1",
|
8357
8592
|
colGap: "3",
|
8358
8593
|
alignItems: "start",
|
8359
8594
|
autoCols: "min",
|
8360
8595
|
className: tw("mt-1 mb-3")
|
8361
|
-
}, /* @__PURE__ */
|
8596
|
+
}, /* @__PURE__ */ import_react46.default.createElement(GridItem2, {
|
8362
8597
|
colStart: "1",
|
8363
8598
|
colEnd: "2"
|
8364
|
-
}, hasError && /* @__PURE__ */
|
8599
|
+
}, hasError && /* @__PURE__ */ import_react46.default.createElement("p", {
|
8365
8600
|
id: messageId,
|
8366
8601
|
className: tw("text-error-50 block typography-caption")
|
8367
|
-
}, helperText)), /* @__PURE__ */
|
8602
|
+
}, helperText)), /* @__PURE__ */ import_react46.default.createElement(GridItem2, {
|
8368
8603
|
colStart: "2",
|
8369
8604
|
colEnd: "3",
|
8370
8605
|
display: "flex"
|
8371
|
-
}, (0, import_isNumber4.default)(length) && hasMaxLength && /* @__PURE__ */
|
8606
|
+
}, (0, import_isNumber4.default)(length) && hasMaxLength && /* @__PURE__ */ import_react46.default.createElement(CharCounter, {
|
8372
8607
|
length,
|
8373
8608
|
maxLength,
|
8374
8609
|
valid: !error2
|
8375
8610
|
})));
|
8376
8611
|
};
|
8377
|
-
var Skeleton2 = ({ className, children }) => /* @__PURE__ */
|
8612
|
+
var Skeleton2 = ({ className, children }) => /* @__PURE__ */ import_react46.default.createElement("div", {
|
8378
8613
|
className: (0, import_classnames6.default)(className, "h-[25px]")
|
8379
8614
|
}, children);
|
8380
8615
|
HelperText.Skeleton = Skeleton2;
|
@@ -8390,40 +8625,40 @@ var LabelText = ({
|
|
8390
8625
|
helpTooltipPlacement,
|
8391
8626
|
description
|
8392
8627
|
}) => {
|
8393
|
-
return /* @__PURE__ */
|
8628
|
+
return /* @__PURE__ */ import_react47.default.createElement("span", {
|
8394
8629
|
className: tw("block mb-2")
|
8395
|
-
}, /* @__PURE__ */
|
8630
|
+
}, /* @__PURE__ */ import_react47.default.createElement("span", {
|
8396
8631
|
className: tw("inline-flex items-center typography-small-strong", {
|
8397
8632
|
"text-grey-70": variant === "default",
|
8398
8633
|
"text-error-50": variant === "error",
|
8399
8634
|
"text-grey-40": variant === "disabled"
|
8400
8635
|
})
|
8401
|
-
}, labelText, required && /* @__PURE__ */
|
8636
|
+
}, labelText, required && /* @__PURE__ */ import_react47.default.createElement("span", {
|
8402
8637
|
className: tw("text-error-50")
|
8403
|
-
}, "*"), helpTooltip && /* @__PURE__ */
|
8638
|
+
}, "*"), helpTooltip && /* @__PURE__ */ import_react47.default.createElement(Tooltip, {
|
8404
8639
|
content: helpTooltip,
|
8405
8640
|
placement: helpTooltipPlacement
|
8406
|
-
}, /* @__PURE__ */
|
8641
|
+
}, /* @__PURE__ */ import_react47.default.createElement("span", {
|
8407
8642
|
tabIndex: 0,
|
8408
8643
|
className: tw("text-grey-40 flex items-center cursor-pointer ml-2")
|
8409
|
-
}, /* @__PURE__ */
|
8644
|
+
}, /* @__PURE__ */ import_react47.default.createElement(InlineIcon, {
|
8410
8645
|
icon: import_questionMark2.default,
|
8411
8646
|
"data-testid": "icon-info"
|
8412
|
-
})))), description && /* @__PURE__ */
|
8647
|
+
})))), description && /* @__PURE__ */ import_react47.default.createElement("span", {
|
8413
8648
|
className: tw("block text-grey-50 typography-caption mt-1")
|
8414
8649
|
}, description));
|
8415
8650
|
};
|
8416
8651
|
var Label = (props) => {
|
8417
8652
|
const _a = props, { id, htmlFor, labelText, labelProps: _b = {} } = _a, labelProps = __objRest(_b, []), { "data-testid": dataTestid, children } = _a;
|
8418
|
-
return /* @__PURE__ */
|
8653
|
+
return /* @__PURE__ */ import_react47.default.createElement("label", __spreadValues({
|
8419
8654
|
id,
|
8420
8655
|
className: tw("w-full"),
|
8421
8656
|
"data-testid": dataTestid,
|
8422
8657
|
htmlFor
|
8423
|
-
}, labelProps), labelText && /* @__PURE__ */
|
8658
|
+
}, labelProps), labelText && /* @__PURE__ */ import_react47.default.createElement(LabelText, __spreadValues({}, props)), children);
|
8424
8659
|
};
|
8425
8660
|
var LabelSkeleton = () => {
|
8426
|
-
return /* @__PURE__ */
|
8661
|
+
return /* @__PURE__ */ import_react47.default.createElement(Skeleton, {
|
8427
8662
|
height: 20,
|
8428
8663
|
width: 100,
|
8429
8664
|
className: tw("mb-[7px]")
|
@@ -8458,17 +8693,17 @@ var LabelControl = (_a) => {
|
|
8458
8693
|
]);
|
8459
8694
|
const legacyError = error2 !== void 0 && valid === false;
|
8460
8695
|
const variant = !valid || legacyError ? "error" : disabled ? "disabled" : "default";
|
8461
|
-
return /* @__PURE__ */
|
8696
|
+
return /* @__PURE__ */ import_react47.default.createElement(FormControl, {
|
8462
8697
|
className
|
8463
|
-
}, !fieldset && /* @__PURE__ */
|
8698
|
+
}, !fieldset && /* @__PURE__ */ import_react47.default.createElement(Label, __spreadProps(__spreadValues({}, rest), {
|
8464
8699
|
variant
|
8465
|
-
}), children), fieldset && /* @__PURE__ */
|
8700
|
+
}), children), fieldset && /* @__PURE__ */ import_react47.default.createElement("fieldset", {
|
8466
8701
|
id: rest.id
|
8467
|
-
}, /* @__PURE__ */
|
8702
|
+
}, /* @__PURE__ */ import_react47.default.createElement("legend", {
|
8468
8703
|
className: tw("w-full mb-2")
|
8469
|
-
}, /* @__PURE__ */
|
8704
|
+
}, /* @__PURE__ */ import_react47.default.createElement(LabelText, __spreadProps(__spreadValues({}, rest), {
|
8470
8705
|
variant
|
8471
|
-
}))), children), /* @__PURE__ */
|
8706
|
+
}))), children), /* @__PURE__ */ import_react47.default.createElement(HelperText, {
|
8472
8707
|
messageId,
|
8473
8708
|
error: !valid,
|
8474
8709
|
helperText,
|
@@ -8477,7 +8712,7 @@ var LabelControl = (_a) => {
|
|
8477
8712
|
reserveSpaceForError
|
8478
8713
|
}));
|
8479
8714
|
};
|
8480
|
-
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));
|
8481
8716
|
LabelControl.Skeleton = LabelControlSkeleton;
|
8482
8717
|
var getLabelControlProps = (_a) => {
|
8483
8718
|
var _b = _a, {
|
@@ -8515,7 +8750,7 @@ var getLabelControlProps = (_a) => {
|
|
8515
8750
|
|
8516
8751
|
// src/molecules/CheckboxGroup/CheckboxGroup.tsx
|
8517
8752
|
var isCheckbox = (c) => {
|
8518
|
-
return
|
8753
|
+
return import_react48.default.isValidElement(c) && c.type === Checkbox2;
|
8519
8754
|
};
|
8520
8755
|
var CheckboxGroup = (_a) => {
|
8521
8756
|
var _b = _a, {
|
@@ -8534,11 +8769,11 @@ var CheckboxGroup = (_a) => {
|
|
8534
8769
|
"children"
|
8535
8770
|
]);
|
8536
8771
|
var _a2;
|
8537
|
-
const [selectedItems, setSelectedItems] = (0,
|
8772
|
+
const [selectedItems, setSelectedItems] = (0, import_react48.useState)((_a2 = value != null ? value : defaultValue) != null ? _a2 : []);
|
8538
8773
|
if (value !== void 0 && value !== selectedItems) {
|
8539
8774
|
setSelectedItems(value);
|
8540
8775
|
}
|
8541
|
-
const errorMessageId = (0,
|
8776
|
+
const errorMessageId = (0, import_utils4.useId)();
|
8542
8777
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
8543
8778
|
const labelControlProps = getLabelControlProps(props);
|
8544
8779
|
const handleChange = (e) => {
|
@@ -8547,13 +8782,13 @@ var CheckboxGroup = (_a) => {
|
|
8547
8782
|
setSelectedItems(updated);
|
8548
8783
|
onChange == null ? void 0 : onChange(updated);
|
8549
8784
|
};
|
8550
|
-
return /* @__PURE__ */
|
8785
|
+
return /* @__PURE__ */ import_react48.default.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
8551
8786
|
fieldset: true
|
8552
8787
|
}, labelControlProps), errorProps), {
|
8553
8788
|
className: "Aquarium-CheckboxGroup"
|
8554
|
-
}), /* @__PURE__ */
|
8789
|
+
}), /* @__PURE__ */ import_react48.default.createElement(InputGroup, {
|
8555
8790
|
cols
|
8556
|
-
},
|
8791
|
+
}, import_react48.default.Children.map(children, (c) => {
|
8557
8792
|
var _a3, _b2;
|
8558
8793
|
if (!isCheckbox(c)) {
|
8559
8794
|
return null;
|
@@ -8561,7 +8796,7 @@ var CheckboxGroup = (_a) => {
|
|
8561
8796
|
const str = (_a3 = c.props.value) == null ? void 0 : _a3.toString();
|
8562
8797
|
const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
|
8563
8798
|
const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
|
8564
|
-
return
|
8799
|
+
return import_react48.default.cloneElement(c, {
|
8565
8800
|
defaultChecked,
|
8566
8801
|
checked,
|
8567
8802
|
onChange: (_b2 = c.props.onChange) != null ? _b2 : handleChange,
|
@@ -8571,9 +8806,9 @@ var CheckboxGroup = (_a) => {
|
|
8571
8806
|
})));
|
8572
8807
|
};
|
8573
8808
|
var CheckboxGroupSkeleton = ({ options = 2 }) => {
|
8574
|
-
return /* @__PURE__ */
|
8809
|
+
return /* @__PURE__ */ import_react48.default.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ import_react48.default.createElement("div", {
|
8575
8810
|
className: tw("flex flex-wrap flex-col gap-2")
|
8576
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
8811
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ import_react48.default.createElement(Checkbox2.Skeleton, {
|
8577
8812
|
key
|
8578
8813
|
}))));
|
8579
8814
|
};
|
@@ -8581,12 +8816,12 @@ CheckboxGroup.Skeleton = CheckboxGroupSkeleton;
|
|
8581
8816
|
CheckboxGroup.Skeleton.displayName = "CheckboxGroup.Skeleton";
|
8582
8817
|
|
8583
8818
|
// src/molecules/ChoiceChip/ChoiceChip.tsx
|
8584
|
-
var
|
8819
|
+
var import_react49 = __toESM(require("react"));
|
8585
8820
|
var ChoiceChip = (_a) => {
|
8586
8821
|
var _b = _a, { text, dense, defaultValue, value, onChange } = _b, rest = __objRest(_b, ["text", "dense", "defaultValue", "value", "onChange"]);
|
8587
8822
|
var _a2;
|
8588
|
-
const [prevValue, setPrevValue] = (0,
|
8589
|
-
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);
|
8590
8825
|
if (value !== prevValue) {
|
8591
8826
|
setSelected(value != null ? value : false);
|
8592
8827
|
setPrevValue(value);
|
@@ -8595,7 +8830,7 @@ var ChoiceChip = (_a) => {
|
|
8595
8830
|
setSelected(!selected);
|
8596
8831
|
onChange == null ? void 0 : onChange(!selected);
|
8597
8832
|
};
|
8598
|
-
return /* @__PURE__ */
|
8833
|
+
return /* @__PURE__ */ import_react49.default.createElement("span", __spreadProps(__spreadValues({
|
8599
8834
|
role: "button",
|
8600
8835
|
"aria-pressed": selected
|
8601
8836
|
}, rest), {
|
@@ -8613,22 +8848,22 @@ var ChoiceChip = (_a) => {
|
|
8613
8848
|
};
|
8614
8849
|
|
8615
8850
|
// src/molecules/Combobox/Combobox.tsx
|
8616
|
-
var
|
8851
|
+
var import_react52 = __toESM(require("react"));
|
8617
8852
|
var import_overlays5 = require("@react-aria/overlays");
|
8853
|
+
var import_utils5 = require("@react-aria/utils");
|
8618
8854
|
var import_downshift = require("downshift");
|
8619
8855
|
var import_omit4 = __toESM(require("lodash/omit"));
|
8620
|
-
var import_uniqueId2 = __toESM(require("lodash/uniqueId"));
|
8621
8856
|
var import_match_sorter = require("match-sorter");
|
8622
8857
|
|
8623
8858
|
// src/molecules/Popover/PopoverOverlay.tsx
|
8624
|
-
var
|
8859
|
+
var import_react51 = __toESM(require("react"));
|
8625
8860
|
var import_overlays4 = require("@react-aria/overlays");
|
8626
8861
|
|
8627
8862
|
// src/atoms/Popover/Popover.tsx
|
8628
|
-
var
|
8629
|
-
var PopoverPanel =
|
8863
|
+
var import_react50 = __toESM(require("react"));
|
8864
|
+
var PopoverPanel = import_react50.default.forwardRef((_a, ref) => {
|
8630
8865
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
8631
|
-
return /* @__PURE__ */
|
8866
|
+
return /* @__PURE__ */ import_react50.default.createElement("div", __spreadValues({
|
8632
8867
|
ref,
|
8633
8868
|
className: classNames(
|
8634
8869
|
className,
|
@@ -8637,7 +8872,7 @@ var PopoverPanel = import_react49.default.forwardRef((_a, ref) => {
|
|
8637
8872
|
}, props), children);
|
8638
8873
|
});
|
8639
8874
|
PopoverPanel.displayName = "Popover.Panel";
|
8640
|
-
var PopoverUnderlay =
|
8875
|
+
var PopoverUnderlay = import_react50.default.forwardRef((props, ref) => /* @__PURE__ */ import_react50.default.createElement("div", __spreadProps(__spreadValues({
|
8641
8876
|
ref
|
8642
8877
|
}, props), {
|
8643
8878
|
className: tw("fixed inset-0")
|
@@ -8649,12 +8884,12 @@ var Popover = {
|
|
8649
8884
|
};
|
8650
8885
|
|
8651
8886
|
// src/molecules/Popover/PopoverOverlay.tsx
|
8652
|
-
var PopoverOverlay =
|
8653
|
-
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({
|
8654
8889
|
ref
|
8655
8890
|
}, props)));
|
8656
8891
|
});
|
8657
|
-
var Wrapper =
|
8892
|
+
var Wrapper = import_react51.default.forwardRef(
|
8658
8893
|
(_a, ref) => {
|
8659
8894
|
var _b = _a, {
|
8660
8895
|
id,
|
@@ -8683,9 +8918,9 @@ var Wrapper = import_react50.default.forwardRef(
|
|
8683
8918
|
"children",
|
8684
8919
|
"popoverRef"
|
8685
8920
|
]);
|
8686
|
-
const popoverRef =
|
8687
|
-
|
8688
|
-
(0,
|
8921
|
+
const popoverRef = import_react51.default.useRef(null);
|
8922
|
+
import_react51.default.useImperativeHandle(ref, () => popoverRef.current);
|
8923
|
+
(0, import_react51.useEffect)(() => {
|
8689
8924
|
if (autoFocus && popoverRef.current) {
|
8690
8925
|
popoverRef.current.focus();
|
8691
8926
|
}
|
@@ -8698,7 +8933,7 @@ var Wrapper = import_react50.default.forwardRef(
|
|
8698
8933
|
}),
|
8699
8934
|
state
|
8700
8935
|
);
|
8701
|
-
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({
|
8702
8937
|
ref: popoverRef,
|
8703
8938
|
tabIndex: focusable ? 0 : -1,
|
8704
8939
|
role: role != null ? role : "presentation"
|
@@ -8706,7 +8941,7 @@ var Wrapper = import_react50.default.forwardRef(
|
|
8706
8941
|
id: id != null ? id : popoverProps.id,
|
8707
8942
|
style: __spreadValues(__spreadValues({}, popoverProps.style), style),
|
8708
8943
|
className
|
8709
|
-
}), children, /* @__PURE__ */
|
8944
|
+
}), children, /* @__PURE__ */ import_react51.default.createElement(import_overlays4.DismissButton, {
|
8710
8945
|
onDismiss: state.close
|
8711
8946
|
})));
|
8712
8947
|
}
|
@@ -8756,12 +8991,12 @@ var ComboboxBase = (_a) => {
|
|
8756
8991
|
"readOnly"
|
8757
8992
|
]);
|
8758
8993
|
var _a2;
|
8759
|
-
const popoverRef = (0,
|
8760
|
-
const targetRef = (0,
|
8761
|
-
const menuRef = (0,
|
8762
|
-
const inputRef = (0,
|
8763
|
-
const [inputItems, setInputItems] = (0,
|
8764
|
-
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);
|
8765
9000
|
const updateInputItems = (query) => {
|
8766
9001
|
const keys = typeof options[0] === "string" ? void 0 : optionKeys;
|
8767
9002
|
setInputItems(query ? (0, import_match_sorter.matchSorter)(options, query, { keys }) : options);
|
@@ -8807,10 +9042,10 @@ var ComboboxBase = (_a) => {
|
|
8807
9042
|
toggle: toggleMenu,
|
8808
9043
|
setOpen: (isOpen2) => isOpen2 ? openMenu() : closeMenu()
|
8809
9044
|
};
|
8810
|
-
(0,
|
9045
|
+
(0, import_react52.useEffect)(() => {
|
8811
9046
|
updateInputItems(inputValue);
|
8812
9047
|
}, [JSON.stringify(options)]);
|
8813
|
-
(0,
|
9048
|
+
(0, import_react52.useEffect)(() => {
|
8814
9049
|
if (state.isOpen && inputRef.current && popoverRef.current) {
|
8815
9050
|
return (0, import_overlays5.ariaHideOutside)([inputRef.current, popoverRef.current]);
|
8816
9051
|
}
|
@@ -8818,12 +9053,12 @@ var ComboboxBase = (_a) => {
|
|
8818
9053
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
8819
9054
|
const inputProps = getInputProps({ ref: inputRef, disabled: disabled || readOnly });
|
8820
9055
|
const hasNoResults = options.length === 0 || inputItems.length === 0;
|
8821
|
-
return /* @__PURE__ */
|
9056
|
+
return /* @__PURE__ */ import_react52.default.createElement("div", {
|
8822
9057
|
className: classNames("Aquarium-ComboboxBase", tw("relative"))
|
8823
|
-
}, /* @__PURE__ */
|
9058
|
+
}, /* @__PURE__ */ import_react52.default.createElement(Select.InputContainer, {
|
8824
9059
|
ref: targetRef,
|
8825
9060
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
8826
|
-
}, /* @__PURE__ */
|
9061
|
+
}, /* @__PURE__ */ import_react52.default.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
|
8827
9062
|
id,
|
8828
9063
|
ref: inputRef,
|
8829
9064
|
name,
|
@@ -8846,10 +9081,10 @@ var ComboboxBase = (_a) => {
|
|
8846
9081
|
(_a3 = inputProps.onKeyDown) == null ? void 0 : _a3.call(inputProps, e);
|
8847
9082
|
},
|
8848
9083
|
onKeyUp: (e) => e.stopPropagation()
|
8849
|
-
})), !readOnly && /* @__PURE__ */
|
9084
|
+
})), !readOnly && /* @__PURE__ */ import_react52.default.createElement(Select.Toggle, __spreadValues({
|
8850
9085
|
hasFocus,
|
8851
9086
|
isOpen
|
8852
|
-
}, getToggleButtonProps({ disabled })))), isOpen && /* @__PURE__ */
|
9087
|
+
}, getToggleButtonProps({ disabled })))), isOpen && /* @__PURE__ */ import_react52.default.createElement(PopoverOverlay, {
|
8853
9088
|
ref: popoverRef,
|
8854
9089
|
triggerRef: targetRef,
|
8855
9090
|
state,
|
@@ -8857,16 +9092,16 @@ var ComboboxBase = (_a) => {
|
|
8857
9092
|
shouldFlip: true,
|
8858
9093
|
isNonModal: true,
|
8859
9094
|
style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
|
8860
|
-
}, /* @__PURE__ */
|
9095
|
+
}, /* @__PURE__ */ import_react52.default.createElement(Select.Menu, __spreadValues({
|
8861
9096
|
ref: menuRef,
|
8862
9097
|
maxHeight
|
8863
|
-
}, 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({
|
8864
9099
|
key: itemToString(item),
|
8865
9100
|
selected: item === selectedItem,
|
8866
9101
|
highlighted: index === highlightedIndex
|
8867
9102
|
}, getItemProps({ item, index, disabled: isOptionDisabled(item, index) })), renderOption(item))))));
|
8868
9103
|
};
|
8869
|
-
var ComboboxBaseSkeleton = () => /* @__PURE__ */
|
9104
|
+
var ComboboxBaseSkeleton = () => /* @__PURE__ */ import_react52.default.createElement(Skeleton, {
|
8870
9105
|
height: 38
|
8871
9106
|
});
|
8872
9107
|
ComboboxBase.Skeleton = ComboboxBaseSkeleton;
|
@@ -8881,32 +9116,33 @@ var Combobox = (_a) => {
|
|
8881
9116
|
"emptyState"
|
8882
9117
|
]);
|
8883
9118
|
var _a2;
|
8884
|
-
const
|
8885
|
-
const
|
9119
|
+
const defaultId = (0, import_utils5.useId)();
|
9120
|
+
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
9121
|
+
const errorMessageId = (0, import_utils5.useId)();
|
8886
9122
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
8887
9123
|
const labelControlProps = getLabelControlProps(props);
|
8888
9124
|
const baseProps = (0, import_omit4.default)(props, Object.keys(labelControlProps));
|
8889
|
-
return /* @__PURE__ */
|
8890
|
-
id: `${id
|
8891
|
-
htmlFor: `${id
|
9125
|
+
return /* @__PURE__ */ import_react52.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
9126
|
+
id: `${id}-label`,
|
9127
|
+
htmlFor: `${id}-input`,
|
8892
9128
|
messageId: errorMessageId
|
8893
9129
|
}, labelControlProps), {
|
8894
9130
|
className: "Aquarium-Combobox"
|
8895
|
-
}), /* @__PURE__ */
|
8896
|
-
id
|
9131
|
+
}), /* @__PURE__ */ import_react52.default.createElement(ComboboxBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
9132
|
+
id,
|
8897
9133
|
options,
|
8898
9134
|
emptyState,
|
8899
9135
|
disabled: props.disabled,
|
8900
9136
|
valid: props.valid
|
8901
9137
|
})));
|
8902
9138
|
};
|
8903
|
-
var ComboboxSkeleton = () => /* @__PURE__ */
|
9139
|
+
var ComboboxSkeleton = () => /* @__PURE__ */ import_react52.default.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ import_react52.default.createElement(ComboboxBase.Skeleton, null));
|
8904
9140
|
Combobox.Skeleton = ComboboxSkeleton;
|
8905
9141
|
Combobox.Skeleton.displayName = "Combobox.Skeleton";
|
8906
9142
|
|
8907
9143
|
// src/molecules/Container/Container.tsx
|
8908
|
-
var
|
8909
|
-
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, {
|
8910
9146
|
marginLeft: "auto",
|
8911
9147
|
marginRight: "auto",
|
8912
9148
|
width: "full",
|
@@ -8921,54 +9157,55 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ import_react
|
|
8921
9157
|
}, children);
|
8922
9158
|
|
8923
9159
|
// src/molecules/DataList/DataList.tsx
|
8924
|
-
var
|
9160
|
+
var import_react72 = __toESM(require("react"));
|
8925
9161
|
var import_compact = __toESM(require("lodash/compact"));
|
8926
9162
|
var import_groupBy2 = __toESM(require("lodash/groupBy"));
|
8927
9163
|
var import_isFunction = __toESM(require("lodash/isFunction"));
|
8928
9164
|
|
8929
9165
|
// src/molecules/DropdownMenu/DropdownMenu.tsx
|
8930
|
-
var
|
9166
|
+
var import_react57 = __toESM(require("react"));
|
8931
9167
|
var import_i18n = require("@react-aria/i18n");
|
8932
9168
|
var import_interactions2 = require("@react-aria/interactions");
|
8933
9169
|
var import_menu2 = require("@react-aria/menu");
|
8934
9170
|
var import_separator = require("@react-aria/separator");
|
8935
|
-
var
|
9171
|
+
var import_utils7 = require("@react-aria/utils");
|
8936
9172
|
var import_collections = require("@react-stately/collections");
|
8937
9173
|
var import_menu3 = require("@react-stately/menu");
|
8938
9174
|
var import_tree = require("@react-stately/tree");
|
9175
|
+
var import_omit6 = __toESM(require("lodash/omit"));
|
8939
9176
|
|
8940
9177
|
// src/molecules/Input/Input.tsx
|
8941
|
-
var
|
9178
|
+
var import_react55 = __toESM(require("react"));
|
9179
|
+
var import_utils6 = require("@react-aria/utils");
|
8942
9180
|
var import_omit5 = __toESM(require("lodash/omit"));
|
8943
9181
|
var import_toString = __toESM(require("lodash/toString"));
|
8944
|
-
var import_uniqueId3 = __toESM(require("lodash/uniqueId"));
|
8945
9182
|
|
8946
9183
|
// src/utils/form/InputAdornment/InputAdornment.tsx
|
8947
|
-
var
|
9184
|
+
var import_react54 = __toESM(require("react"));
|
8948
9185
|
var import_cross5 = __toESM(require_cross());
|
8949
9186
|
var import_error3 = __toESM(require_error());
|
8950
9187
|
var import_search3 = __toESM(require_search());
|
8951
9188
|
var import_tick4 = __toESM(require_tick());
|
8952
9189
|
var InputAdornment = ({ placement = "right", className, dense, children }) => {
|
8953
|
-
return /* @__PURE__ */
|
9190
|
+
return /* @__PURE__ */ import_react54.default.createElement("span", {
|
8954
9191
|
className: classNames(className, "absolute inset-y-0 grow-0 text-grey-40 flex items-center mx-3", {
|
8955
9192
|
"right-0": placement === "right",
|
8956
9193
|
"left-0": placement === "left",
|
8957
9194
|
"typography-small": dense,
|
8958
9195
|
"typography-default-strong": !dense
|
8959
9196
|
})
|
8960
|
-
}, /* @__PURE__ */
|
9197
|
+
}, /* @__PURE__ */ import_react54.default.createElement(Flexbox, {
|
8961
9198
|
gap: "3",
|
8962
9199
|
wrap: "wrap"
|
8963
9200
|
}, children));
|
8964
9201
|
};
|
8965
|
-
var SearchIcon = ({ onClick }) => /* @__PURE__ */
|
9202
|
+
var SearchIcon = ({ onClick }) => /* @__PURE__ */ import_react54.default.createElement(Icon, {
|
8966
9203
|
icon: import_search3.default,
|
8967
9204
|
color: "grey-30",
|
8968
9205
|
"data-testid": "icon-search",
|
8969
9206
|
onClick
|
8970
9207
|
});
|
8971
|
-
var ResetIcon = ({ onClick }) => /* @__PURE__ */
|
9208
|
+
var ResetIcon = ({ onClick }) => /* @__PURE__ */ import_react54.default.createElement(Icon, {
|
8972
9209
|
className: "hover:cursor-pointer",
|
8973
9210
|
icon: import_cross5.default,
|
8974
9211
|
color: "grey-30",
|
@@ -8978,7 +9215,7 @@ var ResetIcon = ({ onClick }) => /* @__PURE__ */ import_react53.default.createEl
|
|
8978
9215
|
|
8979
9216
|
// src/molecules/Input/Input.tsx
|
8980
9217
|
var createInput = (displayName, opts = {}) => {
|
8981
|
-
const InputComponent = (0,
|
9218
|
+
const InputComponent = (0, import_react55.forwardRef)(
|
8982
9219
|
(_a, ref) => {
|
8983
9220
|
var _b = _a, {
|
8984
9221
|
type = "text",
|
@@ -8998,8 +9235,8 @@ var createInput = (displayName, opts = {}) => {
|
|
8998
9235
|
"readOnly"
|
8999
9236
|
]);
|
9000
9237
|
var _a2;
|
9001
|
-
const inputRef =
|
9002
|
-
(0,
|
9238
|
+
const inputRef = import_react55.default.useRef(null);
|
9239
|
+
(0, import_react55.useImperativeHandle)(ref, () => inputRef.current);
|
9003
9240
|
const handleReset = () => {
|
9004
9241
|
var _a3;
|
9005
9242
|
const el = inputRef.current;
|
@@ -9011,11 +9248,11 @@ var createInput = (displayName, opts = {}) => {
|
|
9011
9248
|
el.focus();
|
9012
9249
|
}
|
9013
9250
|
};
|
9014
|
-
return /* @__PURE__ */
|
9251
|
+
return /* @__PURE__ */ import_react55.default.createElement("span", {
|
9015
9252
|
className: classNames("Aquarium-InputBase", tw("relative block"))
|
9016
|
-
}, opts.adornment && /* @__PURE__ */
|
9253
|
+
}, opts.adornment && /* @__PURE__ */ import_react55.default.createElement(InputAdornment, {
|
9017
9254
|
placement: "left"
|
9018
|
-
}, opts.adornment), /* @__PURE__ */
|
9255
|
+
}, opts.adornment), /* @__PURE__ */ import_react55.default.createElement("input", __spreadProps(__spreadValues({
|
9019
9256
|
ref: inputRef,
|
9020
9257
|
type
|
9021
9258
|
}, props), {
|
@@ -9031,40 +9268,41 @@ var createInput = (displayName, opts = {}) => {
|
|
9031
9268
|
getCommonInputStyles({ readOnly, valid }),
|
9032
9269
|
props.className
|
9033
9270
|
)
|
9034
|
-
})), 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", {
|
9035
9272
|
"aria-label": "reset search",
|
9036
9273
|
onClick: handleReset
|
9037
|
-
}, /* @__PURE__ */
|
9274
|
+
}, /* @__PURE__ */ import_react55.default.createElement(ResetIcon, null))), !opts.canReset && endAdornment && /* @__PURE__ */ import_react55.default.createElement(InputAdornment, null, endAdornment));
|
9038
9275
|
}
|
9039
9276
|
);
|
9040
9277
|
InputComponent.displayName = displayName;
|
9041
|
-
InputComponent.Skeleton = () => /* @__PURE__ */
|
9278
|
+
InputComponent.Skeleton = () => /* @__PURE__ */ import_react55.default.createElement(Skeleton, {
|
9042
9279
|
height: 38
|
9043
9280
|
});
|
9044
9281
|
return InputComponent;
|
9045
9282
|
};
|
9046
9283
|
var InputBase = createInput("InputBase");
|
9047
|
-
var SearchInput = createInput("SearchInput", { adornment: /* @__PURE__ */
|
9048
|
-
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) => {
|
9049
9286
|
var _b = _a, { readOnly = false } = _b, props = __objRest(_b, ["readOnly"]);
|
9050
9287
|
var _a2, _b2, _c;
|
9051
|
-
const [value, setValue] = (0,
|
9052
|
-
const
|
9053
|
-
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)();
|
9054
9292
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
9055
9293
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
9056
9294
|
const baseProps = (0, import_omit5.default)(props, Object.keys(labelControlProps));
|
9057
|
-
return /* @__PURE__ */
|
9058
|
-
id: `${id
|
9059
|
-
htmlFor: id
|
9295
|
+
return /* @__PURE__ */ import_react55.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
9296
|
+
id: `${id}-label`,
|
9297
|
+
htmlFor: id,
|
9060
9298
|
messageId: errorMessageId,
|
9061
9299
|
length: value !== void 0 ? (0, import_toString.default)(value).length : void 0
|
9062
9300
|
}, labelControlProps), {
|
9063
9301
|
className: "Aquarium-Input"
|
9064
|
-
}), /* @__PURE__ */
|
9302
|
+
}), /* @__PURE__ */ import_react55.default.createElement(InputBase, __spreadProps(__spreadValues(__spreadValues({
|
9065
9303
|
ref
|
9066
9304
|
}, baseProps), errorProps), {
|
9067
|
-
id
|
9305
|
+
id,
|
9068
9306
|
"data-testid": dataTestId,
|
9069
9307
|
onChange: (e) => {
|
9070
9308
|
var _a3;
|
@@ -9079,42 +9317,42 @@ var Input2 = import_react54.default.forwardRef((_a, ref) => {
|
|
9079
9317
|
})));
|
9080
9318
|
});
|
9081
9319
|
Input2.displayName = "Input";
|
9082
|
-
Input2.Skeleton = () => /* @__PURE__ */
|
9320
|
+
Input2.Skeleton = () => /* @__PURE__ */ import_react55.default.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ import_react55.default.createElement(InputBase.Skeleton, null));
|
9083
9321
|
Input2.Skeleton.displayName = "Input.Skeleton";
|
9084
9322
|
|
9085
9323
|
// src/atoms/DropdownMenu/DropdownMenu.tsx
|
9086
|
-
var
|
9324
|
+
var import_react56 = __toESM(require("react"));
|
9087
9325
|
var import_tick5 = __toESM(require_tick());
|
9088
|
-
var DropdownMenu =
|
9326
|
+
var DropdownMenu = import_react56.default.forwardRef(
|
9089
9327
|
(_a, ref) => {
|
9090
9328
|
var _b = _a, { maxHeight = "450px", minWidth = "125px", maxWidth, className, children } = _b, props = __objRest(_b, ["maxHeight", "minWidth", "maxWidth", "className", "children"]);
|
9091
|
-
return /* @__PURE__ */
|
9329
|
+
return /* @__PURE__ */ import_react56.default.createElement("div", __spreadValues({
|
9092
9330
|
ref,
|
9093
9331
|
style: { maxHeight, minWidth, maxWidth },
|
9094
9332
|
className: classNames(className, "bg-white w-full flex flex-col overflow-x-hidden typography-small text-grey-70")
|
9095
9333
|
}, props), children);
|
9096
9334
|
}
|
9097
9335
|
);
|
9098
|
-
var ContentContainer = ({ children }) => /* @__PURE__ */
|
9336
|
+
var ContentContainer = ({ children }) => /* @__PURE__ */ import_react56.default.createElement("div", {
|
9099
9337
|
className: tw("p-3 overflow-y-auto overflow-x-hidden")
|
9100
9338
|
}, children);
|
9101
9339
|
DropdownMenu.ContentContainer = ContentContainer;
|
9102
|
-
var List =
|
9340
|
+
var List = import_react56.default.forwardRef(
|
9103
9341
|
(_a, ref) => {
|
9104
9342
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
9105
|
-
return /* @__PURE__ */
|
9343
|
+
return /* @__PURE__ */ import_react56.default.createElement("ul", __spreadValues({
|
9106
9344
|
ref,
|
9107
9345
|
className: classNames(className, "outline-none ring-0")
|
9108
9346
|
}, props), children);
|
9109
9347
|
}
|
9110
9348
|
);
|
9111
9349
|
DropdownMenu.List = List;
|
9112
|
-
var Group2 =
|
9350
|
+
var Group2 = import_react56.default.forwardRef(
|
9113
9351
|
(_a, ref) => {
|
9114
9352
|
var _b = _a, { className, title, titleProps, children } = _b, props = __objRest(_b, ["className", "title", "titleProps", "children"]);
|
9115
|
-
return /* @__PURE__ */
|
9353
|
+
return /* @__PURE__ */ import_react56.default.createElement("li", __spreadValues({
|
9116
9354
|
ref
|
9117
|
-
}, props), title && /* @__PURE__ */
|
9355
|
+
}, props), title && /* @__PURE__ */ import_react56.default.createElement("div", __spreadValues({
|
9118
9356
|
className: classNames(className, "p-3 text-grey-40 uppercase cursor-default typography-caption", {
|
9119
9357
|
"text-grey-20": props.disabled
|
9120
9358
|
})
|
@@ -9122,10 +9360,10 @@ var Group2 = import_react55.default.forwardRef(
|
|
9122
9360
|
}
|
9123
9361
|
);
|
9124
9362
|
DropdownMenu.Group = Group2;
|
9125
|
-
var Item2 =
|
9363
|
+
var Item2 = import_react56.default.forwardRef(
|
9126
9364
|
(_a, ref) => {
|
9127
9365
|
var _b = _a, { kind, highlighted, selected, className, icon, showNotification = false, children } = _b, props = __objRest(_b, ["kind", "highlighted", "selected", "className", "icon", "showNotification", "children"]);
|
9128
|
-
return /* @__PURE__ */
|
9366
|
+
return /* @__PURE__ */ import_react56.default.createElement("li", __spreadValues({
|
9129
9367
|
ref,
|
9130
9368
|
className: classNames(className, "flex items-center gap-x-3 p-3 outline-none", {
|
9131
9369
|
"cursor-pointer hover:bg-grey-0": !props.disabled,
|
@@ -9133,32 +9371,32 @@ var Item2 = import_react55.default.forwardRef(
|
|
9133
9371
|
"text-primary-80": kind === "action",
|
9134
9372
|
"text-grey-20 cursor-not-allowed": props.disabled
|
9135
9373
|
})
|
9136
|
-
}, props), icon && showNotification && /* @__PURE__ */
|
9374
|
+
}, props), icon && showNotification && /* @__PURE__ */ import_react56.default.createElement(Badge.Notification, null, /* @__PURE__ */ import_react56.default.createElement(InlineIcon, {
|
9137
9375
|
icon
|
9138
|
-
})), icon && !showNotification && /* @__PURE__ */
|
9376
|
+
})), icon && !showNotification && /* @__PURE__ */ import_react56.default.createElement(InlineIcon, {
|
9139
9377
|
icon
|
9140
|
-
}), /* @__PURE__ */
|
9378
|
+
}), /* @__PURE__ */ import_react56.default.createElement("span", {
|
9141
9379
|
className: tw("grow")
|
9142
|
-
}, children), selected && /* @__PURE__ */
|
9380
|
+
}, children), selected && /* @__PURE__ */ import_react56.default.createElement(InlineIcon, {
|
9143
9381
|
icon: import_tick5.default
|
9144
9382
|
}));
|
9145
9383
|
}
|
9146
9384
|
);
|
9147
9385
|
DropdownMenu.Item = Item2;
|
9148
|
-
var Description = ({ disabled, children }) => /* @__PURE__ */
|
9386
|
+
var Description = ({ disabled, children }) => /* @__PURE__ */ import_react56.default.createElement(Typography2.Caption, {
|
9149
9387
|
color: disabled ? "grey-20" : "grey-40"
|
9150
9388
|
}, children);
|
9151
9389
|
DropdownMenu.Description = Description;
|
9152
9390
|
var Separator = (_a) => {
|
9153
9391
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
9154
|
-
return /* @__PURE__ */
|
9392
|
+
return /* @__PURE__ */ import_react56.default.createElement("li", __spreadProps(__spreadValues({}, props), {
|
9155
9393
|
className: classNames(className, tw("m-3 block bg-grey-5 h-[1px]"))
|
9156
9394
|
}));
|
9157
9395
|
};
|
9158
9396
|
DropdownMenu.Separator = Separator;
|
9159
9397
|
var EmptyStateContainer2 = (_a) => {
|
9160
9398
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
9161
|
-
return /* @__PURE__ */
|
9399
|
+
return /* @__PURE__ */ import_react56.default.createElement("div", __spreadValues({
|
9162
9400
|
className: classNames(tw("border border-dashed border-grey-10 p-3"), className)
|
9163
9401
|
}, props), children);
|
9164
9402
|
};
|
@@ -9214,20 +9452,20 @@ var DropdownMenu2 = (_a) => {
|
|
9214
9452
|
"footer",
|
9215
9453
|
"children"
|
9216
9454
|
]);
|
9217
|
-
const triggerRef =
|
9455
|
+
const triggerRef = import_react57.default.useRef(null);
|
9218
9456
|
const [trigger, items] = extractTriggerAndItems(children);
|
9219
9457
|
const state = (0, import_menu3.useMenuTriggerState)(props);
|
9220
9458
|
const { menuTriggerProps, menuProps } = (0, import_menu2.useMenuTrigger)({}, state, triggerRef);
|
9221
|
-
return /* @__PURE__ */
|
9459
|
+
return /* @__PURE__ */ import_react57.default.createElement("div", null, /* @__PURE__ */ import_react57.default.createElement(import_interactions2.PressResponder, __spreadValues({
|
9222
9460
|
ref: triggerRef,
|
9223
9461
|
onPress: () => state.toggle()
|
9224
|
-
}, 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, {
|
9225
9463
|
className: "Aquarium-DropdownMenu",
|
9226
9464
|
triggerRef,
|
9227
9465
|
state,
|
9228
9466
|
placement,
|
9229
9467
|
focusable: false
|
9230
|
-
}, /* @__PURE__ */
|
9468
|
+
}, /* @__PURE__ */ import_react57.default.createElement(MenuWrapper, __spreadValues({
|
9231
9469
|
onAction,
|
9232
9470
|
selectionMode,
|
9233
9471
|
selection,
|
@@ -9253,13 +9491,13 @@ DropdownMenu2.Section = import_collections.Section;
|
|
9253
9491
|
DropdownMenu2.Section.displayName = "DropdownMenu.Section";
|
9254
9492
|
var TriggerWrapper = (_a) => {
|
9255
9493
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
9256
|
-
const ref =
|
9494
|
+
const ref = import_react57.default.useRef(null);
|
9257
9495
|
const { pressProps } = (0, import_interactions2.usePress)(__spreadProps(__spreadValues({}, props), { ref }));
|
9258
|
-
const trigger =
|
9259
|
-
if (!trigger || !
|
9496
|
+
const trigger = import_react57.default.Children.only(children);
|
9497
|
+
if (!trigger || !import_react57.default.isValidElement(trigger)) {
|
9260
9498
|
throw new Error("<DropdownMenu.Trigger> must have valid child");
|
9261
9499
|
}
|
9262
|
-
return
|
9500
|
+
return import_react57.default.cloneElement(trigger, __spreadValues({ ref }, (0, import_utils7.mergeProps)(pressProps, props)));
|
9263
9501
|
};
|
9264
9502
|
var isSectionNode = (item) => item.type === "section";
|
9265
9503
|
var isItemNode = (item) => item.type === "item";
|
@@ -9281,7 +9519,7 @@ var MenuWrapper = (_a) => {
|
|
9281
9519
|
"header",
|
9282
9520
|
"footer"
|
9283
9521
|
]);
|
9284
|
-
const ref =
|
9522
|
+
const ref = import_react57.default.useRef(null);
|
9285
9523
|
const disabledKeys = getDisabledItemKeys(props.children);
|
9286
9524
|
const state = (0, import_tree.useTreeState)(__spreadValues({
|
9287
9525
|
disabledKeys,
|
@@ -9289,30 +9527,30 @@ var MenuWrapper = (_a) => {
|
|
9289
9527
|
}, props));
|
9290
9528
|
const { menuProps } = (0, import_menu2.useMenu)(props, state, ref);
|
9291
9529
|
const { contains } = (0, import_i18n.useFilter)({ sensitivity: "base" });
|
9292
|
-
const [search, setSearch] =
|
9293
|
-
const filteredCollection =
|
9530
|
+
const [search, setSearch] = import_react57.default.useState("");
|
9531
|
+
const filteredCollection = import_react57.default.useMemo(
|
9294
9532
|
() => searchable ? filterCollection(state.collection, search, contains) : state.collection,
|
9295
9533
|
[searchable, state.collection, search, contains]
|
9296
9534
|
);
|
9297
|
-
return /* @__PURE__ */
|
9535
|
+
return /* @__PURE__ */ import_react57.default.createElement(DropdownMenu, {
|
9298
9536
|
minWidth: minWidth !== void 0 ? `${minWidth}px` : void 0,
|
9299
9537
|
maxWidth: maxWidth !== void 0 ? `${maxWidth}px` : void 0
|
9300
|
-
}, header, /* @__PURE__ */
|
9538
|
+
}, header, /* @__PURE__ */ import_react57.default.createElement(DropdownMenu.ContentContainer, null, searchable && /* @__PURE__ */ import_react57.default.createElement(SearchInput, {
|
9301
9539
|
"aria-label": "search",
|
9302
9540
|
value: search,
|
9303
9541
|
onChange: (e) => setSearch(e.target.value),
|
9304
9542
|
className: tw("mb-5")
|
9305
|
-
}), 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({
|
9306
9544
|
ref
|
9307
9545
|
}, menuProps), Array.from(filteredCollection).map((item) => {
|
9308
9546
|
if (isSectionNode(item)) {
|
9309
|
-
return /* @__PURE__ */
|
9547
|
+
return /* @__PURE__ */ import_react57.default.createElement(SectionWrapper, {
|
9310
9548
|
key: item.key,
|
9311
9549
|
section: item,
|
9312
9550
|
state
|
9313
9551
|
});
|
9314
9552
|
} else if (isItemNode(item)) {
|
9315
|
-
return /* @__PURE__ */
|
9553
|
+
return /* @__PURE__ */ import_react57.default.createElement(ItemWrapper, {
|
9316
9554
|
key: item.key,
|
9317
9555
|
item,
|
9318
9556
|
state
|
@@ -9321,14 +9559,14 @@ var MenuWrapper = (_a) => {
|
|
9321
9559
|
}))), footer);
|
9322
9560
|
};
|
9323
9561
|
var ItemWrapper = ({ item, state }) => {
|
9324
|
-
const ref =
|
9562
|
+
const ref = import_react57.default.useRef(null);
|
9325
9563
|
const { menuItemProps, descriptionProps, isSelected, isFocused, isDisabled } = (0, import_menu2.useMenuItem)(
|
9326
9564
|
{ key: item.key, closeOnSelect: item.props.closeOnSelect },
|
9327
9565
|
state,
|
9328
9566
|
ref
|
9329
9567
|
);
|
9330
9568
|
const { icon, description, kind = "default", showNotification = false } = item.props;
|
9331
|
-
return /* @__PURE__ */
|
9569
|
+
return /* @__PURE__ */ import_react57.default.createElement(DropdownMenu.Item, __spreadProps(__spreadValues({
|
9332
9570
|
ref
|
9333
9571
|
}, menuItemProps), {
|
9334
9572
|
kind,
|
@@ -9337,7 +9575,7 @@ var ItemWrapper = ({ item, state }) => {
|
|
9337
9575
|
disabled: isDisabled,
|
9338
9576
|
icon,
|
9339
9577
|
showNotification
|
9340
|
-
}), item.rendered, description && /* @__PURE__ */
|
9578
|
+
}), item.rendered, description && /* @__PURE__ */ import_react57.default.createElement(DropdownMenu.Description, __spreadValues({
|
9341
9579
|
disabled: isDisabled
|
9342
9580
|
}, descriptionProps), description));
|
9343
9581
|
};
|
@@ -9349,24 +9587,24 @@ var SectionWrapper = ({ section, state }) => {
|
|
9349
9587
|
const { separatorProps } = (0, import_separator.useSeparator)({
|
9350
9588
|
elementType: "li"
|
9351
9589
|
});
|
9352
|
-
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({
|
9353
9591
|
title: section.rendered,
|
9354
9592
|
titleProps: headingProps
|
9355
|
-
}, itemProps), /* @__PURE__ */
|
9593
|
+
}, itemProps), /* @__PURE__ */ import_react57.default.createElement("ul", __spreadValues({}, groupProps), Array.from(section.childNodes).map((node) => /* @__PURE__ */ import_react57.default.createElement(ItemWrapper, {
|
9356
9594
|
key: node.key,
|
9357
9595
|
item: node,
|
9358
9596
|
state
|
9359
9597
|
})))));
|
9360
9598
|
};
|
9361
9599
|
var extractTriggerAndItems = (children) => {
|
9362
|
-
const [trigger, items] =
|
9600
|
+
const [trigger, items] = import_react57.default.Children.toArray(children);
|
9363
9601
|
if (!isComponentType(trigger, MenuTrigger) || !isComponentType(items, MenuItems)) {
|
9364
9602
|
throw new Error("<DropdownMenu> must have <DropdownMenu.Trigger> and <DropdownMenu.Items> defined");
|
9365
9603
|
}
|
9366
9604
|
return [trigger, items];
|
9367
9605
|
};
|
9368
9606
|
var getDisabledItemKeys = (children) => {
|
9369
|
-
const keys =
|
9607
|
+
const keys = import_react57.default.Children.map(children, (child) => {
|
9370
9608
|
var _a, _b;
|
9371
9609
|
if (!child || typeof child === "function") {
|
9372
9610
|
return null;
|
@@ -9383,21 +9621,21 @@ var getDisabledItemKeys = (children) => {
|
|
9383
9621
|
};
|
9384
9622
|
|
9385
9623
|
// src/molecules/List/List.tsx
|
9386
|
-
var
|
9624
|
+
var import_react61 = __toESM(require("react"));
|
9387
9625
|
var import_isObject = __toESM(require("lodash/isObject"));
|
9388
9626
|
|
9389
9627
|
// src/molecules/Pagination/Pagination.tsx
|
9390
|
-
var
|
9628
|
+
var import_react59 = __toESM(require("react"));
|
9391
9629
|
var import_clamp = __toESM(require("lodash/clamp"));
|
9392
9630
|
|
9393
9631
|
// src/molecules/Select/Select.tsx
|
9394
|
-
var
|
9632
|
+
var import_react58 = __toESM(require("react"));
|
9633
|
+
var import_utils10 = require("@react-aria/utils");
|
9395
9634
|
var import_downshift2 = require("downshift");
|
9396
9635
|
var import_defaults = __toESM(require("lodash/defaults"));
|
9397
9636
|
var import_isArray = __toESM(require("lodash/isArray"));
|
9398
9637
|
var import_isNil = __toESM(require("lodash/isNil"));
|
9399
|
-
var
|
9400
|
-
var import_uniqueId4 = __toESM(require("lodash/uniqueId"));
|
9638
|
+
var import_omit7 = __toESM(require("lodash/omit"));
|
9401
9639
|
var hasIconProperty = (val) => {
|
9402
9640
|
var _a;
|
9403
9641
|
return typeof val === "string" || ((_a = val == null ? void 0 : val.icon) == null ? void 0 : _a.body) !== void 0;
|
@@ -9407,10 +9645,10 @@ var hasOptionGroups = (val) => {
|
|
9407
9645
|
};
|
9408
9646
|
var defaultRenderOption = (item, props, { selectedItem }, { getOptionKey, getValue, optionToString = getOptionLabelBuiltin }) => {
|
9409
9647
|
var _a, _b;
|
9410
|
-
return /* @__PURE__ */
|
9648
|
+
return /* @__PURE__ */ import_react58.default.createElement(Select.Item, __spreadValues({
|
9411
9649
|
key: (_b = (_a = getOptionKey == null ? void 0 : getOptionKey(item)) != null ? _a : getValue == null ? void 0 : getValue(item)) != null ? _b : optionToString(item),
|
9412
9650
|
selected: item === selectedItem
|
9413
|
-
}, props), hasIconProperty(item) && /* @__PURE__ */
|
9651
|
+
}, props), hasIconProperty(item) && /* @__PURE__ */ import_react58.default.createElement(InlineIcon, {
|
9414
9652
|
icon: item.icon
|
9415
9653
|
}), optionToString(item));
|
9416
9654
|
};
|
@@ -9481,9 +9719,9 @@ var _SelectBase = (props) => {
|
|
9481
9719
|
"children",
|
9482
9720
|
"labelWrapper"
|
9483
9721
|
]);
|
9484
|
-
const [hasFocus, setFocus] = (0,
|
9485
|
-
const targetRef = (0,
|
9486
|
-
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);
|
9487
9725
|
const items = hasOptionGroups(options) ? options.flatMap((g) => g.options) : options;
|
9488
9726
|
const findItemByValue = (val) => {
|
9489
9727
|
if (val === null) {
|
@@ -9529,13 +9767,13 @@ var _SelectBase = (props) => {
|
|
9529
9767
|
},
|
9530
9768
|
withDefaults
|
9531
9769
|
);
|
9532
|
-
const renderGroup = (group) => /* @__PURE__ */
|
9770
|
+
const renderGroup = (group) => /* @__PURE__ */ import_react58.default.createElement(import_react58.default.Fragment, {
|
9533
9771
|
key: group.label
|
9534
|
-
}, /* @__PURE__ */
|
9535
|
-
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 })), {
|
9536
9774
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default",
|
9537
9775
|
tabIndex: 0
|
9538
|
-
}), /* @__PURE__ */
|
9776
|
+
}), /* @__PURE__ */ import_react58.default.createElement(Select.Input, __spreadProps(__spreadValues({
|
9539
9777
|
id,
|
9540
9778
|
name
|
9541
9779
|
}, rest), {
|
@@ -9547,26 +9785,26 @@ var _SelectBase = (props) => {
|
|
9547
9785
|
tabIndex: -1,
|
9548
9786
|
onFocus: () => setFocus(true),
|
9549
9787
|
onBlur: () => setFocus(false)
|
9550
|
-
})), !readOnly && /* @__PURE__ */
|
9788
|
+
})), !readOnly && /* @__PURE__ */ import_react58.default.createElement(Select.Toggle, {
|
9551
9789
|
disabled,
|
9552
9790
|
isOpen,
|
9553
9791
|
tabIndex: -1
|
9554
9792
|
}));
|
9555
9793
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
9556
|
-
return /* @__PURE__ */
|
9794
|
+
return /* @__PURE__ */ import_react58.default.createElement("div", {
|
9557
9795
|
className: classNames("Aquarium-SelectBase", tw("relative"))
|
9558
|
-
}, labelWrapper ?
|
9796
|
+
}, labelWrapper ? import_react58.default.cloneElement(labelWrapper, { children: input }) : input, isOpen && /* @__PURE__ */ import_react58.default.createElement(PopoverOverlay, {
|
9559
9797
|
state,
|
9560
9798
|
triggerRef: targetRef,
|
9561
9799
|
placement: "bottom-left",
|
9562
9800
|
shouldFlip: true,
|
9563
9801
|
style: { width: (_b = targetRef.current) == null ? void 0 : _b.offsetWidth }
|
9564
|
-
}, /* @__PURE__ */
|
9802
|
+
}, /* @__PURE__ */ import_react58.default.createElement(Select.Menu, __spreadValues({
|
9565
9803
|
ref: menuRef,
|
9566
9804
|
maxHeight
|
9567
|
-
}, 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, {
|
9568
9806
|
onMouseOver: () => setHighlightedIndex(-1)
|
9569
|
-
}), actions.map((act, index) => /* @__PURE__ */
|
9807
|
+
}), actions.map((act, index) => /* @__PURE__ */ import_react58.default.createElement(Select.ActionItem, __spreadProps(__spreadValues({
|
9570
9808
|
key: `${index}`
|
9571
9809
|
}, act), {
|
9572
9810
|
onMouseOver: () => setHighlightedIndex(-1),
|
@@ -9576,10 +9814,10 @@ var _SelectBase = (props) => {
|
|
9576
9814
|
}
|
9577
9815
|
}), act.label))))));
|
9578
9816
|
};
|
9579
|
-
var SelectBase = (props) => /* @__PURE__ */
|
9817
|
+
var SelectBase = (props) => /* @__PURE__ */ import_react58.default.createElement(_SelectBase, __spreadProps(__spreadValues({}, props), {
|
9580
9818
|
labelWrapper: void 0
|
9581
9819
|
}));
|
9582
|
-
var SelectBaseSkeleton = () => /* @__PURE__ */
|
9820
|
+
var SelectBaseSkeleton = () => /* @__PURE__ */ import_react58.default.createElement(Skeleton, {
|
9583
9821
|
height: 38
|
9584
9822
|
});
|
9585
9823
|
SelectBase.Skeleton = SelectBaseSkeleton;
|
@@ -9590,28 +9828,29 @@ var Select2 = (_a) => {
|
|
9590
9828
|
"options"
|
9591
9829
|
]);
|
9592
9830
|
var _a2;
|
9593
|
-
const
|
9594
|
-
const
|
9831
|
+
const defaultId = (0, import_utils10.useId)();
|
9832
|
+
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
9833
|
+
const errorMessageId = (0, import_utils10.useId)();
|
9595
9834
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
9596
9835
|
const labelProps = getLabelControlProps(props);
|
9597
|
-
const baseProps = (0,
|
9836
|
+
const baseProps = (0, import_omit7.default)(props, Object.keys(labelProps));
|
9598
9837
|
const legacyError = labelProps.error !== void 0 && labelProps.valid === false;
|
9599
9838
|
const variant = !labelProps.valid || legacyError ? "error" : labelProps.disabled ? "disabled" : "default";
|
9600
|
-
const label = /* @__PURE__ */
|
9601
|
-
id: `${id
|
9602
|
-
htmlFor: `${id
|
9839
|
+
const label = /* @__PURE__ */ import_react58.default.createElement(Label, __spreadValues({
|
9840
|
+
id: `${id}-label`,
|
9841
|
+
htmlFor: `${id}-input`,
|
9603
9842
|
variant,
|
9604
9843
|
messageId: errorMessageId
|
9605
9844
|
}, labelProps));
|
9606
|
-
return /* @__PURE__ */
|
9845
|
+
return /* @__PURE__ */ import_react58.default.createElement(FormControl, {
|
9607
9846
|
className: "Aquarium-Select"
|
9608
|
-
}, /* @__PURE__ */
|
9609
|
-
id: `${id
|
9847
|
+
}, /* @__PURE__ */ import_react58.default.createElement(_SelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
9848
|
+
id: `${id}-input`,
|
9610
9849
|
options,
|
9611
9850
|
disabled: props.disabled,
|
9612
9851
|
valid: props.valid,
|
9613
9852
|
labelWrapper: label
|
9614
|
-
})), /* @__PURE__ */
|
9853
|
+
})), /* @__PURE__ */ import_react58.default.createElement(HelperText, {
|
9615
9854
|
messageId: errorMessageId,
|
9616
9855
|
error: !labelProps.valid,
|
9617
9856
|
helperText: labelProps.helperText,
|
@@ -9620,7 +9859,7 @@ var Select2 = (_a) => {
|
|
9620
9859
|
reserveSpaceForError: labelProps.reserveSpaceForError
|
9621
9860
|
}));
|
9622
9861
|
};
|
9623
|
-
var SelectSkeleton = () => /* @__PURE__ */
|
9862
|
+
var SelectSkeleton = () => /* @__PURE__ */ import_react58.default.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ import_react58.default.createElement(SelectBase.Skeleton, null));
|
9624
9863
|
Select2.Skeleton = SelectSkeleton;
|
9625
9864
|
Select2.Skeleton.displayName = "Select.Skeleton";
|
9626
9865
|
|
@@ -9639,26 +9878,26 @@ var Pagination = ({
|
|
9639
9878
|
pageSizes,
|
9640
9879
|
onPageSizeChange
|
9641
9880
|
}) => {
|
9642
|
-
const [value, setValue] =
|
9643
|
-
|
9881
|
+
const [value, setValue] = import_react59.default.useState(currentPage);
|
9882
|
+
import_react59.default.useEffect(() => {
|
9644
9883
|
setValue(currentPage);
|
9645
9884
|
}, [currentPage]);
|
9646
|
-
return /* @__PURE__ */
|
9885
|
+
return /* @__PURE__ */ import_react59.default.createElement(Box, {
|
9647
9886
|
className: classNames(
|
9648
9887
|
"Aquarium-Pagination",
|
9649
9888
|
tw({ "grid grid-cols-[200px_1fr_200px]": !!pageSizes, "flex flex-nowrap justify-center": !pageSizes })
|
9650
9889
|
),
|
9651
9890
|
backgroundColor: "grey-0",
|
9652
9891
|
padding: "4"
|
9653
|
-
}, pageSizes && onPageSizeChange && typeof pageSize === "number" ? /* @__PURE__ */
|
9892
|
+
}, pageSizes && onPageSizeChange && typeof pageSize === "number" ? /* @__PURE__ */ import_react59.default.createElement(Box, {
|
9654
9893
|
display: "flex",
|
9655
9894
|
alignItems: "center",
|
9656
9895
|
gap: "4"
|
9657
|
-
}, /* @__PURE__ */
|
9896
|
+
}, /* @__PURE__ */ import_react59.default.createElement(Typography2.Small, {
|
9658
9897
|
color: "grey-50"
|
9659
|
-
}, "Items per page "), /* @__PURE__ */
|
9898
|
+
}, "Items per page "), /* @__PURE__ */ import_react59.default.createElement("div", {
|
9660
9899
|
className: tw("max-w-[70px]")
|
9661
|
-
}, /* @__PURE__ */
|
9900
|
+
}, /* @__PURE__ */ import_react59.default.createElement(SelectBase, {
|
9662
9901
|
options: pageSizes.map((size) => size.toString()),
|
9663
9902
|
value: pageSize.toString(),
|
9664
9903
|
onChange: (size) => {
|
@@ -9669,26 +9908,26 @@ var Pagination = ({
|
|
9669
9908
|
}
|
9670
9909
|
}
|
9671
9910
|
}
|
9672
|
-
}))) : /* @__PURE__ */
|
9911
|
+
}))) : /* @__PURE__ */ import_react59.default.createElement("div", null), /* @__PURE__ */ import_react59.default.createElement(Box, {
|
9673
9912
|
display: "flex",
|
9674
9913
|
justifyContent: "center",
|
9675
9914
|
alignItems: "center",
|
9676
9915
|
className: tw("grow")
|
9677
|
-
}, /* @__PURE__ */
|
9916
|
+
}, /* @__PURE__ */ import_react59.default.createElement(Button.Icon, {
|
9678
9917
|
"aria-label": "First",
|
9679
9918
|
onClick: () => onPageChange(1),
|
9680
9919
|
icon: import_chevronBackward2.default,
|
9681
9920
|
disabled: !hasPreviousPage
|
9682
|
-
}), /* @__PURE__ */
|
9921
|
+
}), /* @__PURE__ */ import_react59.default.createElement(Button.Icon, {
|
9683
9922
|
"aria-label": "Previous",
|
9684
9923
|
onClick: () => onPageChange(currentPage - 1),
|
9685
9924
|
icon: import_chevronLeft3.default,
|
9686
9925
|
disabled: !hasPreviousPage
|
9687
|
-
}), /* @__PURE__ */
|
9926
|
+
}), /* @__PURE__ */ import_react59.default.createElement(Box, {
|
9688
9927
|
paddingX: "4"
|
9689
|
-
}, /* @__PURE__ */
|
9928
|
+
}, /* @__PURE__ */ import_react59.default.createElement(Typography2.Small, {
|
9690
9929
|
color: "grey-60"
|
9691
|
-
}, "Page")), /* @__PURE__ */
|
9930
|
+
}, "Page")), /* @__PURE__ */ import_react59.default.createElement(InputBase, {
|
9692
9931
|
className: classNames(tw("text-center max-w-[40px]"), "no-arrows"),
|
9693
9932
|
type: "number",
|
9694
9933
|
min: 1,
|
@@ -9705,25 +9944,25 @@ var Pagination = ({
|
|
9705
9944
|
const newPage = !isNaN(numberValue) ? (0, import_clamp.default)(numberValue, 1, totalPages) : 1;
|
9706
9945
|
onPageChange(newPage);
|
9707
9946
|
}
|
9708
|
-
}), /* @__PURE__ */
|
9947
|
+
}), /* @__PURE__ */ import_react59.default.createElement(Box, {
|
9709
9948
|
paddingX: "4"
|
9710
|
-
}, /* @__PURE__ */
|
9949
|
+
}, /* @__PURE__ */ import_react59.default.createElement(Typography2.Small, {
|
9711
9950
|
color: "grey-60"
|
9712
|
-
}, "of ", totalPages)), /* @__PURE__ */
|
9951
|
+
}, "of ", totalPages)), /* @__PURE__ */ import_react59.default.createElement(Button.Icon, {
|
9713
9952
|
"aria-label": "Next",
|
9714
9953
|
onClick: () => onPageChange(currentPage + 1),
|
9715
9954
|
icon: import_chevronRight3.default,
|
9716
9955
|
disabled: !hasNextPage
|
9717
|
-
}), /* @__PURE__ */
|
9956
|
+
}), /* @__PURE__ */ import_react59.default.createElement(Button.Icon, {
|
9718
9957
|
"aria-label": "Last",
|
9719
9958
|
onClick: () => onPageChange(totalPages),
|
9720
9959
|
icon: import_chevronForward2.default,
|
9721
9960
|
disabled: !hasNextPage
|
9722
|
-
})), pageSizes && /* @__PURE__ */
|
9961
|
+
})), pageSizes && /* @__PURE__ */ import_react59.default.createElement("div", null));
|
9723
9962
|
};
|
9724
9963
|
|
9725
9964
|
// src/molecules/Pagination/usePagination.tsx
|
9726
|
-
var
|
9965
|
+
var import_react60 = require("react");
|
9727
9966
|
var import_clamp2 = __toESM(require("lodash/clamp"));
|
9728
9967
|
var initialState = {
|
9729
9968
|
currentPage: 1,
|
@@ -9731,8 +9970,8 @@ var initialState = {
|
|
9731
9970
|
};
|
9732
9971
|
var getPageIndex = (currentPage, pageSize) => currentPage === 0 ? 0 : (currentPage - 1) * pageSize;
|
9733
9972
|
var usePagination = (items, options) => {
|
9734
|
-
const [currentPage, setCurrentPage] = (0,
|
9735
|
-
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);
|
9736
9975
|
const totalPages = items.length > 0 ? Math.ceil(items.length / pageSize) : 1;
|
9737
9976
|
const hasPreviousPage = currentPage > 1;
|
9738
9977
|
const hasNextPage = currentPage < totalPages;
|
@@ -9742,7 +9981,7 @@ var usePagination = (items, options) => {
|
|
9742
9981
|
setPageSize(pageSize2);
|
9743
9982
|
setCurrentPage((0, import_clamp2.default)((options == null ? void 0 : options.initialPage) || initialState.currentPage, 1, newTotalPages));
|
9744
9983
|
};
|
9745
|
-
(0,
|
9984
|
+
(0, import_react60.useEffect)(() => {
|
9746
9985
|
setCurrentPage((0, import_clamp2.default)((options == null ? void 0 : options.initialPage) || initialState.currentPage, 1, totalPages));
|
9747
9986
|
}, [items.length]);
|
9748
9987
|
return [
|
@@ -9763,8 +10002,8 @@ var usePagination = (items, options) => {
|
|
9763
10002
|
var List2 = ({
|
9764
10003
|
items,
|
9765
10004
|
renderItem,
|
9766
|
-
container =
|
9767
|
-
paginationContainer =
|
10005
|
+
container = import_react61.default.Fragment,
|
10006
|
+
paginationContainer = import_react61.default.Fragment,
|
9768
10007
|
pagination
|
9769
10008
|
}) => {
|
9770
10009
|
const Component = container;
|
@@ -9772,11 +10011,11 @@ var List2 = ({
|
|
9772
10011
|
const paginationProps = (0, import_isObject.default)(pagination) ? pagination : {};
|
9773
10012
|
const [paginatedItems, paginationState] = usePagination(items, paginationProps);
|
9774
10013
|
const listItems = pagination ? paginatedItems : items;
|
9775
|
-
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))));
|
9776
10015
|
};
|
9777
10016
|
|
9778
10017
|
// src/molecules/Template/Template.tsx
|
9779
|
-
var
|
10018
|
+
var import_react62 = __toESM(require("react"));
|
9780
10019
|
var Template = ({
|
9781
10020
|
children,
|
9782
10021
|
columns,
|
@@ -9803,24 +10042,24 @@ var Template = ({
|
|
9803
10042
|
rowGap,
|
9804
10043
|
columnGap
|
9805
10044
|
});
|
9806
|
-
return /* @__PURE__ */
|
10045
|
+
return /* @__PURE__ */ import_react62.default.createElement("div", {
|
9807
10046
|
className,
|
9808
10047
|
style: __spreadValues({}, styles)
|
9809
10048
|
}, children);
|
9810
10049
|
};
|
9811
10050
|
|
9812
10051
|
// src/atoms/DataList/DataList.tsx
|
9813
|
-
var
|
10052
|
+
var import_react65 = __toESM(require("react"));
|
9814
10053
|
|
9815
10054
|
// src/atoms/Table/Table.tsx
|
9816
|
-
var
|
10055
|
+
var import_react64 = __toESM(require("react"));
|
9817
10056
|
|
9818
10057
|
// src/atoms/RadioButton/RadioButton.tsx
|
9819
|
-
var
|
9820
|
-
var RadioButton =
|
10058
|
+
var import_react63 = __toESM(require("react"));
|
10059
|
+
var RadioButton = import_react63.default.forwardRef(
|
9821
10060
|
(_a, ref) => {
|
9822
10061
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
9823
|
-
return /* @__PURE__ */
|
10062
|
+
return /* @__PURE__ */ import_react63.default.createElement("input", __spreadProps(__spreadValues({
|
9824
10063
|
id,
|
9825
10064
|
ref,
|
9826
10065
|
type: "radio",
|
@@ -9846,29 +10085,29 @@ var RadioButton = import_react62.default.forwardRef(
|
|
9846
10085
|
// src/atoms/Table/Table.tsx
|
9847
10086
|
var import_chevronDown4 = __toESM(require_chevronDown());
|
9848
10087
|
var import_chevronUp3 = __toESM(require_chevronUp());
|
9849
|
-
var HeadContext =
|
10088
|
+
var HeadContext = import_react64.default.createContext(null);
|
9850
10089
|
var tableClassNames = tw("w-full relative typography-default border-spacing-0");
|
9851
10090
|
var Table = (_a) => {
|
9852
10091
|
var _b = _a, { children, ariaLabel, className } = _b, rest = __objRest(_b, ["children", "ariaLabel", "className"]);
|
9853
|
-
return /* @__PURE__ */
|
10092
|
+
return /* @__PURE__ */ import_react64.default.createElement("table", __spreadProps(__spreadValues({}, rest), {
|
9854
10093
|
className: classNames(tableClassNames, className),
|
9855
10094
|
"aria-label": ariaLabel
|
9856
10095
|
}), children);
|
9857
10096
|
};
|
9858
10097
|
var TableHead = (_a) => {
|
9859
10098
|
var _b = _a, { children, sticky } = _b, rest = __objRest(_b, ["children", "sticky"]);
|
9860
|
-
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, {
|
9861
10100
|
value: { children, sticky }
|
9862
10101
|
}, children)));
|
9863
10102
|
};
|
9864
10103
|
var TableBody = (_a) => {
|
9865
10104
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
9866
|
-
return /* @__PURE__ */
|
10105
|
+
return /* @__PURE__ */ import_react64.default.createElement("tbody", __spreadValues({}, rest), children);
|
9867
10106
|
};
|
9868
10107
|
var rowClassNames = tw("children:border-grey-10 group children:last:border-b-0 hover:bg-grey-0");
|
9869
10108
|
var TableRow = (_a) => {
|
9870
10109
|
var _b = _a, { children, className, disabled } = _b, rest = __objRest(_b, ["children", "className", "disabled"]);
|
9871
|
-
return /* @__PURE__ */
|
10110
|
+
return /* @__PURE__ */ import_react64.default.createElement("tr", __spreadProps(__spreadValues(__spreadValues({}, rest), { inert: disabled ? "" : void 0 }), {
|
9872
10111
|
className: classNames(rowClassNames, className, {
|
9873
10112
|
"opacity-70": disabled
|
9874
10113
|
})
|
@@ -9897,15 +10136,15 @@ var getHeadCellClassNames = (sticky = true, stickyColumn) => {
|
|
9897
10136
|
};
|
9898
10137
|
var TableCell = (_a) => {
|
9899
10138
|
var _b = _a, { children, className, stickyColumn, align = "left" } = _b, rest = __objRest(_b, ["children", "className", "stickyColumn", "align"]);
|
9900
|
-
const headContext =
|
9901
|
-
return headContext ? /* @__PURE__ */
|
10139
|
+
const headContext = import_react64.default.useContext(HeadContext);
|
10140
|
+
return headContext ? /* @__PURE__ */ import_react64.default.createElement("th", __spreadProps(__spreadValues({}, rest), {
|
9902
10141
|
className: classNames(
|
9903
10142
|
cellClassNames,
|
9904
10143
|
getHeadCellClassNames(headContext.sticky, stickyColumn),
|
9905
10144
|
getAlignClassNames(align),
|
9906
10145
|
className
|
9907
10146
|
)
|
9908
|
-
}), children) : /* @__PURE__ */
|
10147
|
+
}), children) : /* @__PURE__ */ import_react64.default.createElement("td", __spreadProps(__spreadValues({}, rest), {
|
9909
10148
|
className: classNames(
|
9910
10149
|
cellClassNames,
|
9911
10150
|
getBodyCellClassNames(true, stickyColumn),
|
@@ -9916,11 +10155,11 @@ var TableCell = (_a) => {
|
|
9916
10155
|
};
|
9917
10156
|
var TableSelectCell = (_a) => {
|
9918
10157
|
var _b = _a, { ariaLabel } = _b, props = __objRest(_b, ["ariaLabel"]);
|
9919
|
-
return /* @__PURE__ */
|
10158
|
+
return /* @__PURE__ */ import_react64.default.createElement(Table.Cell, {
|
9920
10159
|
className: tw("leading-[0px]")
|
9921
|
-
}, props.type === "radio" ? /* @__PURE__ */
|
10160
|
+
}, props.type === "radio" ? /* @__PURE__ */ import_react64.default.createElement(RadioButton, __spreadValues({
|
9922
10161
|
"aria-label": ariaLabel
|
9923
|
-
}, props)) : /* @__PURE__ */
|
10162
|
+
}, props)) : /* @__PURE__ */ import_react64.default.createElement(Checkbox, __spreadValues({
|
9924
10163
|
"aria-label": ariaLabel
|
9925
10164
|
}, props)));
|
9926
10165
|
};
|
@@ -9930,39 +10169,39 @@ var getSortCellIconClassNames = (active) => {
|
|
9930
10169
|
};
|
9931
10170
|
var TableSortCell = (_a) => {
|
9932
10171
|
var _b = _a, { children, direction = "none", onClick } = _b, rest = __objRest(_b, ["children", "direction", "onClick"]);
|
9933
|
-
return /* @__PURE__ */
|
10172
|
+
return /* @__PURE__ */ import_react64.default.createElement(Table.Cell, __spreadProps(__spreadValues({}, rest), {
|
9934
10173
|
"aria-sort": direction
|
9935
|
-
}), /* @__PURE__ */
|
10174
|
+
}), /* @__PURE__ */ import_react64.default.createElement("span", {
|
9936
10175
|
className: getSortCellButtonClassNames(rest.align),
|
9937
10176
|
role: "button",
|
9938
10177
|
tabIndex: -1,
|
9939
10178
|
onClick
|
9940
|
-
}, children, /* @__PURE__ */
|
10179
|
+
}, children, /* @__PURE__ */ import_react64.default.createElement("div", {
|
9941
10180
|
"data-sort-icons": true,
|
9942
10181
|
className: tw("flex flex-col", {
|
9943
10182
|
"invisible group-hover:visible": direction === "none"
|
9944
10183
|
})
|
9945
|
-
}, /* @__PURE__ */
|
10184
|
+
}, /* @__PURE__ */ import_react64.default.createElement(InlineIcon, {
|
9946
10185
|
icon: import_chevronUp3.default,
|
9947
10186
|
className: getSortCellIconClassNames(direction === "descending")
|
9948
|
-
}), /* @__PURE__ */
|
10187
|
+
}), /* @__PURE__ */ import_react64.default.createElement(InlineIcon, {
|
9949
10188
|
icon: import_chevronDown4.default,
|
9950
10189
|
className: getSortCellIconClassNames(direction === "ascending")
|
9951
10190
|
}))));
|
9952
10191
|
};
|
9953
|
-
var Item4 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */
|
10192
|
+
var Item4 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */ import_react64.default.createElement("div", {
|
9954
10193
|
className: tw("flex gap-4 items-center")
|
9955
|
-
}, image && /* @__PURE__ */
|
10194
|
+
}, image && /* @__PURE__ */ import_react64.default.createElement("img", {
|
9956
10195
|
src: image,
|
9957
10196
|
alt: imageAlt,
|
9958
10197
|
style: { width: imageSize, height: imageSize }
|
9959
|
-
}), /* @__PURE__ */
|
9960
|
-
Table.Head =
|
9961
|
-
Table.Body =
|
9962
|
-
Table.Row =
|
9963
|
-
Table.Cell =
|
9964
|
-
Table.SortCell =
|
9965
|
-
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);
|
9966
10205
|
|
9967
10206
|
// src/atoms/DataList/DataList.tsx
|
9968
10207
|
var import_chevronDown5 = __toESM(require_chevronDown());
|
@@ -9974,7 +10213,7 @@ var getAlignClassNames2 = (align) => tw("flex items-center", {
|
|
9974
10213
|
});
|
9975
10214
|
var DataList = (_a) => {
|
9976
10215
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
9977
|
-
return /* @__PURE__ */
|
10216
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", __spreadValues({}, rest));
|
9978
10217
|
};
|
9979
10218
|
var HeadCell = (_a) => {
|
9980
10219
|
var _b = _a, {
|
@@ -9988,7 +10227,7 @@ var HeadCell = (_a) => {
|
|
9988
10227
|
"align",
|
9989
10228
|
"stickyColumn"
|
9990
10229
|
]);
|
9991
|
-
return /* @__PURE__ */
|
10230
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
9992
10231
|
role: "cell",
|
9993
10232
|
className: classNames(
|
9994
10233
|
cellClassNames,
|
@@ -10008,7 +10247,7 @@ var Cell = (_a) => {
|
|
10008
10247
|
"align",
|
10009
10248
|
"stickyColumn"
|
10010
10249
|
]);
|
10011
|
-
return /* @__PURE__ */
|
10250
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10012
10251
|
role: "cell",
|
10013
10252
|
className: classNames(
|
10014
10253
|
cellClassNames,
|
@@ -10021,7 +10260,7 @@ var Cell = (_a) => {
|
|
10021
10260
|
};
|
10022
10261
|
var Row = (_a) => {
|
10023
10262
|
var _b = _a, { className, disabled, subgroup } = _b, rest = __objRest(_b, ["className", "disabled", "subgroup"]);
|
10024
|
-
return /* @__PURE__ */
|
10263
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", __spreadProps(__spreadValues(__spreadValues({}, rest), { inert: disabled ? "" : void 0 }), {
|
10025
10264
|
className: classNames(tw("contents"), className, {
|
10026
10265
|
"children:opacity-70": disabled,
|
10027
10266
|
"[&>.group>*]:bg-grey-0 [&>.group>*:first-child]:border-b-0 ": subgroup,
|
@@ -10032,7 +10271,7 @@ var Row = (_a) => {
|
|
10032
10271
|
};
|
10033
10272
|
var SubGroupSpacing = (_a) => {
|
10034
10273
|
var _b = _a, { className, divider } = _b, rest = __objRest(_b, ["className", "divider"]);
|
10035
|
-
return /* @__PURE__ */
|
10274
|
+
return /* @__PURE__ */ import_react65.default.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
10036
10275
|
"aria-hidden": true,
|
10037
10276
|
className: classNames(
|
10038
10277
|
tw("col-span-full h-6 bg-grey-0", { "border-b border-grey-10": Boolean(divider) }),
|
@@ -10042,24 +10281,24 @@ var SubGroupSpacing = (_a) => {
|
|
10042
10281
|
};
|
10043
10282
|
var SortCell = (_a) => {
|
10044
10283
|
var _b = _a, { children, direction = "none", onClick, sticky } = _b, rest = __objRest(_b, ["children", "direction", "onClick", "sticky"]);
|
10045
|
-
return /* @__PURE__ */
|
10284
|
+
return /* @__PURE__ */ import_react65.default.createElement(HeadCell, __spreadProps(__spreadValues({}, rest), {
|
10046
10285
|
"aria-sort": direction,
|
10047
10286
|
role: "cell",
|
10048
10287
|
sticky
|
10049
|
-
}), /* @__PURE__ */
|
10288
|
+
}), /* @__PURE__ */ import_react65.default.createElement("span", {
|
10050
10289
|
className: getSortCellButtonClassNames(rest.align),
|
10051
10290
|
role: "button",
|
10052
10291
|
tabIndex: -1,
|
10053
10292
|
onClick
|
10054
|
-
}, children, /* @__PURE__ */
|
10293
|
+
}, children, /* @__PURE__ */ import_react65.default.createElement("div", {
|
10055
10294
|
"data-sort-icons": true,
|
10056
10295
|
className: tw("flex flex-col", {
|
10057
10296
|
"invisible group-hover:visible": direction === "none"
|
10058
10297
|
})
|
10059
|
-
}, /* @__PURE__ */
|
10298
|
+
}, /* @__PURE__ */ import_react65.default.createElement(InlineIcon, {
|
10060
10299
|
icon: import_chevronUp4.default,
|
10061
10300
|
className: getSortCellIconClassNames(direction === "descending")
|
10062
|
-
}), /* @__PURE__ */
|
10301
|
+
}), /* @__PURE__ */ import_react65.default.createElement(InlineIcon, {
|
10063
10302
|
icon: import_chevronDown5.default,
|
10064
10303
|
className: getSortCellIconClassNames(direction === "ascending")
|
10065
10304
|
}))));
|
@@ -10093,9 +10332,9 @@ var cellProps = (column) => ({
|
|
10093
10332
|
var columnIsFieldColumn = (column) => Boolean(column && column.field);
|
10094
10333
|
|
10095
10334
|
// src/utils/table/useTableSort.tsx
|
10096
|
-
var
|
10335
|
+
var import_react66 = __toESM(require("react"));
|
10097
10336
|
var useTableSort = () => {
|
10098
|
-
const [sort, setSort] =
|
10337
|
+
const [sort, setSort] = import_react66.default.useState();
|
10099
10338
|
const handleSortClick = (column) => {
|
10100
10339
|
if (sort && sort.column.headerName === column.headerName) {
|
10101
10340
|
if (sort.direction === "ascending") {
|
@@ -10129,19 +10368,21 @@ var sortRowsBy = (rows, sort) => {
|
|
10129
10368
|
var import_more2 = __toESM(require_more());
|
10130
10369
|
|
10131
10370
|
// src/molecules/Accordion/Accordion.tsx
|
10132
|
-
var
|
10133
|
-
var
|
10371
|
+
var import_react69 = __toESM(require("react"));
|
10372
|
+
var import_react70 = require("@iconify/react");
|
10373
|
+
var import_utils11 = require("@react-aria/utils");
|
10134
10374
|
var import_web3 = require("@react-spring/web");
|
10375
|
+
var import_isUndefined8 = __toESM(require("lodash/isUndefined"));
|
10135
10376
|
|
10136
10377
|
// src/utils/useMeasure.ts
|
10137
|
-
var
|
10378
|
+
var import_react67 = __toESM(require("react"));
|
10138
10379
|
function useMeasure() {
|
10139
|
-
const ref =
|
10140
|
-
const [rect, setRect] =
|
10380
|
+
const ref = import_react67.default.useRef(null);
|
10381
|
+
const [rect, setRect] = import_react67.default.useState({
|
10141
10382
|
width: null,
|
10142
10383
|
height: null
|
10143
10384
|
});
|
10144
|
-
|
10385
|
+
import_react67.default.useLayoutEffect(() => {
|
10145
10386
|
if (!ref.current || !window.ResizeObserver) {
|
10146
10387
|
return;
|
10147
10388
|
}
|
@@ -10162,7 +10403,7 @@ function useMeasure() {
|
|
10162
10403
|
}
|
10163
10404
|
|
10164
10405
|
// src/molecules/Divider/Divider.tsx
|
10165
|
-
var
|
10406
|
+
var import_react68 = __toESM(require("react"));
|
10166
10407
|
var sizeClasses = {
|
10167
10408
|
horizontal: {
|
10168
10409
|
1: "h-1px",
|
@@ -10184,7 +10425,7 @@ var sizeClasses = {
|
|
10184
10425
|
var Divider2 = (_a) => {
|
10185
10426
|
var _b = _a, { direction = "horizontal", size = 1 } = _b, props = __objRest(_b, ["direction", "size"]);
|
10186
10427
|
const sizeClass = sizeClasses[direction][size];
|
10187
|
-
return /* @__PURE__ */
|
10428
|
+
return /* @__PURE__ */ import_react68.default.createElement("div", __spreadProps(__spreadValues({}, props), {
|
10188
10429
|
className: classNames(
|
10189
10430
|
"Aquarium-Divider",
|
10190
10431
|
tw(`bg-grey-5 ${sizeClass}`, {
|
@@ -10196,39 +10437,59 @@ var Divider2 = (_a) => {
|
|
10196
10437
|
};
|
10197
10438
|
|
10198
10439
|
// src/molecules/Accordion/Accordion.tsx
|
10199
|
-
var AccordionContext = (0,
|
10440
|
+
var AccordionContext = (0, import_react69.createContext)(null);
|
10441
|
+
var PanelContext = (0, import_react69.createContext)(null);
|
10200
10442
|
var useAccordionContext = () => {
|
10201
|
-
const context2 = (0,
|
10443
|
+
const context2 = (0, import_react69.useContext)(AccordionContext);
|
10202
10444
|
if (context2 === null) {
|
10203
10445
|
throw new Error("AccordionContext was used outside of provider.");
|
10204
10446
|
}
|
10205
10447
|
return context2;
|
10206
10448
|
};
|
10207
|
-
var
|
10208
|
-
const
|
10209
|
-
|
10210
|
-
|
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]
|
10211
10468
|
}, children);
|
10212
10469
|
};
|
10213
10470
|
var AccordionToggle = (_a) => {
|
10214
|
-
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);
|
10215
10473
|
const [openPanelId, setOpenPanelId] = useAccordionContext();
|
10216
|
-
const isOpen = openPanelId ===
|
10217
|
-
const handleClick = () =>
|
10474
|
+
const isOpen = openPanelId === id;
|
10475
|
+
const handleClick = () => {
|
10476
|
+
onChange ? onChange(id, isOpen) : setOpenPanelId(isOpen ? void 0 : id);
|
10477
|
+
};
|
10218
10478
|
const { transform } = (0, import_web3.useSpring)({
|
10219
10479
|
transform: `rotate(${isOpen ? 0 : 180}deg)`,
|
10220
10480
|
config: {
|
10221
10481
|
duration: 150
|
10222
10482
|
}
|
10223
10483
|
});
|
10224
|
-
return /* @__PURE__ */
|
10484
|
+
return /* @__PURE__ */ import_react69.default.createElement(import_web3.animated.div, __spreadProps(__spreadValues({}, rest), {
|
10225
10485
|
role: "button",
|
10226
10486
|
tabIndex: 0,
|
10227
|
-
"aria-
|
10228
|
-
"aria-
|
10487
|
+
"aria-label": "accordion toggle",
|
10488
|
+
"aria-expanded": openPanelId === id,
|
10489
|
+
"aria-controls": `${id}-content`,
|
10229
10490
|
onClick: handleClick,
|
10230
10491
|
style: { transform }
|
10231
|
-
}), /* @__PURE__ */
|
10492
|
+
}), /* @__PURE__ */ import_react69.default.createElement(import_react70.Icon, {
|
10232
10493
|
icon: import_caretUp.default,
|
10233
10494
|
height: 22,
|
10234
10495
|
width: 22
|
@@ -10236,8 +10497,9 @@ var AccordionToggle = (_a) => {
|
|
10236
10497
|
};
|
10237
10498
|
var AccordionPanel = (_a) => {
|
10238
10499
|
var _b = _a, { children, panelId } = _b, rest = __objRest(_b, ["children", "panelId"]);
|
10500
|
+
const id = usePanelContext(panelId);
|
10239
10501
|
const [openPanelId] = useAccordionContext();
|
10240
|
-
const isOpen = openPanelId ===
|
10502
|
+
const isOpen = openPanelId === id;
|
10241
10503
|
const [ref, { height }] = useMeasure();
|
10242
10504
|
const style = (0, import_web3.useSpring)({
|
10243
10505
|
height: isOpen ? height != null ? height : 0 : 0,
|
@@ -10246,31 +10508,38 @@ var AccordionPanel = (_a) => {
|
|
10246
10508
|
duration: 150
|
10247
10509
|
}
|
10248
10510
|
});
|
10249
|
-
return /* @__PURE__ */
|
10511
|
+
return /* @__PURE__ */ import_react69.default.createElement(import_web3.animated.div, __spreadProps(__spreadValues({}, rest), {
|
10250
10512
|
role: "region",
|
10251
|
-
id:
|
10513
|
+
id: `${id}-content`,
|
10514
|
+
"aria-labelledby": `${id}-summary`,
|
10252
10515
|
style
|
10253
|
-
}), /* @__PURE__ */
|
10516
|
+
}), /* @__PURE__ */ import_react69.default.createElement("div", {
|
10254
10517
|
ref
|
10255
10518
|
}, children));
|
10256
10519
|
};
|
10257
10520
|
var AccordionUnanimatedPanel = ({ children, panelId }) => {
|
10521
|
+
const id = usePanelContext(panelId);
|
10258
10522
|
const [openPanelId] = useAccordionContext();
|
10259
|
-
const isOpen = openPanelId ===
|
10260
|
-
return /* @__PURE__ */
|
10523
|
+
const isOpen = openPanelId === id;
|
10524
|
+
return /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, isOpen ? children : null);
|
10261
10525
|
};
|
10262
10526
|
var AccordionSummary = (_a) => {
|
10263
|
-
var _b = _a, { title, description, toggle } = _b, rest = __objRest(_b, ["title", "description", "toggle"]);
|
10264
|
-
|
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({
|
10265
10530
|
justifyContent: "space-between",
|
10266
|
-
padding: "4"
|
10267
|
-
|
10531
|
+
padding: "4",
|
10532
|
+
id: `${id}-summary`
|
10533
|
+
}, rest), /* @__PURE__ */ import_react69.default.createElement(Typography2, null, title), /* @__PURE__ */ import_react69.default.createElement(Typography2.Small, {
|
10268
10534
|
color: "grey-40"
|
10269
10535
|
}, description), toggle);
|
10270
10536
|
};
|
10271
10537
|
var AccordionContainer = (_a) => {
|
10272
|
-
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
10273
|
-
|
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)));
|
10274
10543
|
};
|
10275
10544
|
Accordion.displayName = "Accordion";
|
10276
10545
|
Accordion.Container = AccordionContainer;
|
@@ -10285,25 +10554,25 @@ Accordion.UnanimatedPanel = AccordionUnanimatedPanel;
|
|
10285
10554
|
Accordion.UnanimatedPanel.displayName = "Accordion.UnanimatedPanel";
|
10286
10555
|
|
10287
10556
|
// src/molecules/DataList/DataListSkeleton.tsx
|
10288
|
-
var
|
10557
|
+
var import_react71 = __toESM(require("react"));
|
10289
10558
|
var DataListSkeleton = ({ columns = ["1", "2", "2", 52], rows = 5 }) => {
|
10290
10559
|
const columnsAmount = [...Array(typeof columns === "number" ? columns : columns.length).keys()];
|
10291
|
-
return /* @__PURE__ */
|
10560
|
+
return /* @__PURE__ */ import_react71.default.createElement(Template, {
|
10292
10561
|
columns
|
10293
|
-
}, columnsAmount.map((_, index) => /* @__PURE__ */
|
10562
|
+
}, columnsAmount.map((_, index) => /* @__PURE__ */ import_react71.default.createElement(DataList.HeadCell, {
|
10294
10563
|
key: index
|
10295
|
-
}, /* @__PURE__ */
|
10564
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Skeleton, {
|
10296
10565
|
width: "100%",
|
10297
10566
|
height: 17.5
|
10298
|
-
}))), /* @__PURE__ */
|
10567
|
+
}))), /* @__PURE__ */ import_react71.default.createElement(List2, {
|
10299
10568
|
items: [...Array(rows).keys()],
|
10300
|
-
renderItem: (item) => /* @__PURE__ */
|
10569
|
+
renderItem: (item) => /* @__PURE__ */ import_react71.default.createElement(DataList.Row, {
|
10301
10570
|
key: item
|
10302
|
-
}, /* @__PURE__ */
|
10571
|
+
}, /* @__PURE__ */ import_react71.default.createElement(List2, {
|
10303
10572
|
items: columnsAmount,
|
10304
|
-
renderItem: (key) => /* @__PURE__ */
|
10573
|
+
renderItem: (key) => /* @__PURE__ */ import_react71.default.createElement(DataList.Cell, {
|
10305
10574
|
key
|
10306
|
-
}, /* @__PURE__ */
|
10575
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Skeleton, {
|
10307
10576
|
width: "100%",
|
10308
10577
|
height: 17.5
|
10309
10578
|
}))
|
@@ -10327,11 +10596,13 @@ var DataList2 = ({
|
|
10327
10596
|
pagination,
|
10328
10597
|
group,
|
10329
10598
|
disabled,
|
10330
|
-
getGroupRow
|
10599
|
+
getGroupRow,
|
10600
|
+
onGroupToggled,
|
10601
|
+
expandedGroupIds
|
10331
10602
|
}) => {
|
10332
10603
|
const [sort, updateSort] = useTableSort();
|
10333
10604
|
const sortedRows = sortRowsBy(rows, sort);
|
10334
|
-
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;
|
10335
10606
|
const groupKeys = groups ? Object.keys(groups) : void 0;
|
10336
10607
|
const hasCustomRenderForGroupRow = (0, import_isFunction.default)(getGroupRow);
|
10337
10608
|
const isCollapsible = (0, import_isFunction.default)(rowDetails) || group;
|
@@ -10343,36 +10614,36 @@ var DataList2 = ({
|
|
10343
10614
|
}),
|
10344
10615
|
menu ? "auto" : void 0
|
10345
10616
|
]);
|
10346
|
-
const PaginationFooter =
|
10347
|
-
({ children }) => /* @__PURE__ */
|
10617
|
+
const PaginationFooter = import_react72.default.useCallback(
|
10618
|
+
({ children }) => /* @__PURE__ */ import_react72.default.createElement("div", {
|
10348
10619
|
style: { gridColumn: "1 / -1" }
|
10349
10620
|
}, children),
|
10350
10621
|
[]
|
10351
10622
|
);
|
10352
|
-
return /* @__PURE__ */
|
10623
|
+
return /* @__PURE__ */ import_react72.default.createElement(Template, {
|
10353
10624
|
className: "Aquarium-DataList",
|
10354
10625
|
columns: templateColumns
|
10355
|
-
}, isCollapsible && /* @__PURE__ */
|
10626
|
+
}, isCollapsible && /* @__PURE__ */ import_react72.default.createElement(DataList.HeadCell, {
|
10356
10627
|
align: "left"
|
10357
10628
|
}), columns.map((column) => {
|
10358
|
-
const content = column.headerTooltip ? /* @__PURE__ */
|
10629
|
+
const content = column.headerTooltip ? /* @__PURE__ */ import_react72.default.createElement(Tooltip, {
|
10359
10630
|
placement: column.headerTooltip.placement,
|
10360
10631
|
content: column.headerTooltip.content
|
10361
10632
|
}, column.headerName) : column.headerName;
|
10362
|
-
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
10633
|
+
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ import_react72.default.createElement(DataList.SortCell, __spreadValues({
|
10363
10634
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
10364
10635
|
onClick: () => updateSort(column),
|
10365
10636
|
sticky
|
10366
|
-
}, cellProps(column)), content) : /* @__PURE__ */
|
10637
|
+
}, cellProps(column)), content) : /* @__PURE__ */ import_react72.default.createElement(DataList.HeadCell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
10367
10638
|
sticky
|
10368
10639
|
}), content);
|
10369
|
-
}), menu && /* @__PURE__ */
|
10640
|
+
}), menu && /* @__PURE__ */ import_react72.default.createElement(DataList.HeadCell, {
|
10370
10641
|
align: "right",
|
10371
10642
|
"aria-label": menuAriaLabel
|
10372
|
-
}, menuHeaderName), groups && groupKeys ? /* @__PURE__ */
|
10643
|
+
}, menuHeaderName), groups && groupKeys ? /* @__PURE__ */ import_react72.default.createElement(List2, {
|
10373
10644
|
items: sortGroupKeys(groupKeys),
|
10374
10645
|
renderItem: (key) => {
|
10375
|
-
const groupContent = /* @__PURE__ */
|
10646
|
+
const groupContent = /* @__PURE__ */ import_react72.default.createElement(List2, {
|
10376
10647
|
key,
|
10377
10648
|
items: groups[key],
|
10378
10649
|
renderItem: (row, index) => renderRow(
|
@@ -10382,34 +10653,37 @@ var DataList2 = ({
|
|
10382
10653
|
sortedRows,
|
10383
10654
|
renderRowMenu(row, index, { menu, onAction, onMenuOpenChange, menuAriaLabel }),
|
10384
10655
|
disabled,
|
10385
|
-
() => /* @__PURE__ */
|
10656
|
+
() => /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, null)
|
10386
10657
|
)
|
10387
10658
|
});
|
10388
|
-
return key === "undefined" ? groupContent : /* @__PURE__ */
|
10389
|
-
key
|
10390
|
-
|
10391
|
-
|
10392
|
-
|
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, {
|
10393
10666
|
items: columns,
|
10394
|
-
renderItem: (column) => /* @__PURE__ */
|
10667
|
+
renderItem: (column) => /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, __spreadValues({}, cellProps(column)), renderCell(column, getGroupRow(key, groups[key]), -1, []))
|
10395
10668
|
}), renderRowMenu(getGroupRow(key, groups[key]), -1, {
|
10396
10669
|
menu,
|
10397
10670
|
onAction,
|
10398
10671
|
onMenuOpenChange,
|
10399
10672
|
menuAriaLabel
|
10400
|
-
})) : /* @__PURE__ */
|
10401
|
-
panelId: key
|
10402
|
-
|
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, {
|
10403
10677
|
style: { gridColumn: "2 / -1", gap: 4 }
|
10404
|
-
}, "Group: ", /* @__PURE__ */
|
10678
|
+
}, "Group: ", /* @__PURE__ */ import_react72.default.createElement("b", null, key))), /* @__PURE__ */ import_react72.default.createElement(DataList.Row, {
|
10405
10679
|
subgroup: true
|
10406
|
-
}, /* @__PURE__ */
|
10680
|
+
}, /* @__PURE__ */ import_react72.default.createElement(Accordion.UnanimatedPanel, {
|
10407
10681
|
panelId: key
|
10408
|
-
}, /* @__PURE__ */
|
10682
|
+
}, /* @__PURE__ */ import_react72.default.createElement(DataList.SubGroupSpacing, null), groupContent, /* @__PURE__ */ import_react72.default.createElement(DataList.SubGroupSpacing, {
|
10409
10683
|
divider: true
|
10410
10684
|
}))));
|
10411
10685
|
}
|
10412
|
-
}) : /* @__PURE__ */
|
10686
|
+
}) : /* @__PURE__ */ import_react72.default.createElement(List2, {
|
10413
10687
|
pagination,
|
10414
10688
|
paginationContainer: PaginationFooter,
|
10415
10689
|
items: sortedRows,
|
@@ -10422,15 +10696,18 @@ var DataList2 = ({
|
|
10422
10696
|
sortedRows,
|
10423
10697
|
renderRowMenu(row, index, { menu, onAction, onMenuOpenChange, menuAriaLabel }),
|
10424
10698
|
disabled,
|
10425
|
-
() => rowDetails !== void 0 && /* @__PURE__ */
|
10426
|
-
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
|
10427
10702
|
}))
|
10428
10703
|
);
|
10429
|
-
return details ? /* @__PURE__ */
|
10430
|
-
key: row.id
|
10431
|
-
|
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, {
|
10432
10708
|
panelId: row.id.toString(),
|
10433
|
-
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`
|
10434
10711
|
}, details)) : content;
|
10435
10712
|
}
|
10436
10713
|
}));
|
@@ -10443,12 +10720,12 @@ var renderRowMenu = (row, index, {
|
|
10443
10720
|
}) => {
|
10444
10721
|
if (menu) {
|
10445
10722
|
const menuContent = (0, import_isFunction.default)(menu) ? menu(row, index) : menu;
|
10446
|
-
return /* @__PURE__ */
|
10723
|
+
return /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, {
|
10447
10724
|
align: "right"
|
10448
|
-
}, menuContent && /* @__PURE__ */
|
10725
|
+
}, menuContent && /* @__PURE__ */ import_react72.default.createElement(DropdownMenu2, {
|
10449
10726
|
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index),
|
10450
10727
|
onOpenChange: onMenuOpenChange
|
10451
|
-
}, /* @__PURE__ */
|
10728
|
+
}, /* @__PURE__ */ import_react72.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react72.default.createElement(Button.Icon, {
|
10452
10729
|
"aria-label": menuAriaLabel,
|
10453
10730
|
icon: import_more2.default
|
10454
10731
|
})), menuContent));
|
@@ -10458,12 +10735,12 @@ var renderRowMenu = (row, index, {
|
|
10458
10735
|
var renderRow = (columns, row, index, rows, menu, disabled, renderFirstColumn) => {
|
10459
10736
|
var _a;
|
10460
10737
|
const isRowDisabled = (_a = disabled == null ? void 0 : disabled(row, index, rows)) != null ? _a : false;
|
10461
|
-
return /* @__PURE__ */
|
10738
|
+
return /* @__PURE__ */ import_react72.default.createElement(DataList.Row, {
|
10462
10739
|
key: row.id,
|
10463
10740
|
disabled: isRowDisabled
|
10464
|
-
}, renderFirstColumn == null ? void 0 : renderFirstColumn(row, index, rows), /* @__PURE__ */
|
10741
|
+
}, renderFirstColumn == null ? void 0 : renderFirstColumn(row, index, rows), /* @__PURE__ */ import_react72.default.createElement(List2, {
|
10465
10742
|
items: columns,
|
10466
|
-
renderItem: (column) => /* @__PURE__ */
|
10743
|
+
renderItem: (column) => /* @__PURE__ */ import_react72.default.createElement(DataList.Cell, __spreadValues({}, cellProps(column)), renderCell(column, row, index, rows))
|
10467
10744
|
}), menu);
|
10468
10745
|
};
|
10469
10746
|
var DEFAULT_CONTENT = "";
|
@@ -10472,14 +10749,14 @@ var renderCell = (column, row, index, rows) => {
|
|
10472
10749
|
if (column.type === "status") {
|
10473
10750
|
const status = column.status(row, index, rows);
|
10474
10751
|
if (status) {
|
10475
|
-
cellContent = /* @__PURE__ */
|
10752
|
+
cellContent = /* @__PURE__ */ import_react72.default.createElement(StatusChip, __spreadValues({
|
10476
10753
|
dense: true
|
10477
10754
|
}, status));
|
10478
10755
|
}
|
10479
10756
|
} else if (column.type === "action") {
|
10480
10757
|
const action = renameProperty("text", "children", column.action(row, index, rows));
|
10481
10758
|
if (action) {
|
10482
|
-
cellContent = /* @__PURE__ */
|
10759
|
+
cellContent = /* @__PURE__ */ import_react72.default.createElement(Button.Secondary, __spreadValues({
|
10483
10760
|
dense: true
|
10484
10761
|
}, action));
|
10485
10762
|
}
|
@@ -10488,30 +10765,30 @@ var renderCell = (column, row, index, rows) => {
|
|
10488
10765
|
} else if (column.type === "item") {
|
10489
10766
|
const item = column.item(row, index, rows);
|
10490
10767
|
if (item) {
|
10491
|
-
cellContent = /* @__PURE__ */
|
10768
|
+
cellContent = /* @__PURE__ */ import_react72.default.createElement(Item4, __spreadValues({}, item));
|
10492
10769
|
}
|
10493
10770
|
} else if (column.formatter) {
|
10494
10771
|
cellContent = column.formatter(row[column.field], row, index, rows);
|
10495
10772
|
} else {
|
10496
10773
|
cellContent = row[column.field];
|
10497
10774
|
}
|
10498
|
-
return column.tooltip ? /* @__PURE__ */
|
10775
|
+
return column.tooltip ? /* @__PURE__ */ import_react72.default.createElement(Tooltip, __spreadValues({}, column.tooltip(row, index, rows)), cellContent) : cellContent;
|
10499
10776
|
};
|
10500
10777
|
DataList2.Skeleton = DataListSkeleton;
|
10501
10778
|
|
10502
10779
|
// src/molecules/DataTable/DataTable.tsx
|
10503
|
-
var
|
10780
|
+
var import_react75 = __toESM(require("react"));
|
10504
10781
|
var import_compact2 = __toESM(require("lodash/compact"));
|
10505
10782
|
var import_isFunction2 = __toESM(require("lodash/isFunction"));
|
10506
10783
|
|
10507
10784
|
// src/molecules/Table/Table.tsx
|
10508
|
-
var
|
10785
|
+
var import_react74 = __toESM(require("react"));
|
10509
10786
|
|
10510
10787
|
// src/utils/table/useScrollTarget.ts
|
10511
|
-
var
|
10788
|
+
var import_react73 = __toESM(require("react"));
|
10512
10789
|
var useScrollTarget = (callback) => {
|
10513
|
-
const targetRef =
|
10514
|
-
|
10790
|
+
const targetRef = import_react73.default.useRef(null);
|
10791
|
+
import_react73.default.useLayoutEffect(() => {
|
10515
10792
|
const observer = new IntersectionObserver((entries) => entries[0].isIntersecting && callback && callback(), {
|
10516
10793
|
root: null,
|
10517
10794
|
rootMargin: `0px 0px 200px 0px`
|
@@ -10529,12 +10806,12 @@ var Table2 = (_a) => {
|
|
10529
10806
|
var _b = _a, { children, onPrev, onNext } = _b, rest = __objRest(_b, ["children", "onPrev", "onNext"]);
|
10530
10807
|
const bottomRef = useScrollTarget(onNext);
|
10531
10808
|
const topRef = useScrollTarget(onPrev);
|
10532
|
-
return /* @__PURE__ */
|
10809
|
+
return /* @__PURE__ */ import_react74.default.createElement("div", {
|
10533
10810
|
className: classNames("Aquarium-Table", tw("relative w-full"))
|
10534
|
-
}, /* @__PURE__ */
|
10811
|
+
}, /* @__PURE__ */ import_react74.default.createElement("div", {
|
10535
10812
|
ref: topRef,
|
10536
10813
|
className: tw("absolute top-0 h-1 w-full left-0 bg-transparent")
|
10537
|
-
}), /* @__PURE__ */
|
10814
|
+
}), /* @__PURE__ */ import_react74.default.createElement(Table, __spreadValues({}, rest), children), /* @__PURE__ */ import_react74.default.createElement("div", {
|
10538
10815
|
ref: bottomRef,
|
10539
10816
|
className: tw("absolute bottom-0 h-1 w-full left-0 bg-transparent")
|
10540
10817
|
}));
|
@@ -10581,13 +10858,13 @@ var DataTable = (_a) => {
|
|
10581
10858
|
const [sort, updateSort] = useTableSort();
|
10582
10859
|
const sortedRows = sortRowsBy(rows, sort);
|
10583
10860
|
const amountOfColumns = columns.length + (menu ? 1 : 0);
|
10584
|
-
const PaginationFooter =
|
10585
|
-
({ 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", {
|
10586
10863
|
colSpan: amountOfColumns
|
10587
10864
|
}, children))),
|
10588
10865
|
[amountOfColumns]
|
10589
10866
|
);
|
10590
|
-
return /* @__PURE__ */
|
10867
|
+
return /* @__PURE__ */ import_react75.default.createElement(Table2, __spreadProps(__spreadValues({}, rest), {
|
10591
10868
|
className: classNames(
|
10592
10869
|
"Aquarium-DataTable",
|
10593
10870
|
tw({
|
@@ -10596,30 +10873,30 @@ var DataTable = (_a) => {
|
|
10596
10873
|
"table-fixed": layout === "fixed"
|
10597
10874
|
})
|
10598
10875
|
)
|
10599
|
-
}), /* @__PURE__ */
|
10876
|
+
}), /* @__PURE__ */ import_react75.default.createElement(Table2.Head, {
|
10600
10877
|
sticky
|
10601
10878
|
}, (0, import_compact2.default)([
|
10602
10879
|
...columns.map((column) => {
|
10603
|
-
const content = column.headerTooltip && !column.headerInvisible ? /* @__PURE__ */
|
10880
|
+
const content = column.headerTooltip && !column.headerInvisible ? /* @__PURE__ */ import_react75.default.createElement(Tooltip, {
|
10604
10881
|
placement: column.headerTooltip.placement,
|
10605
10882
|
content: column.headerTooltip.content
|
10606
10883
|
}, column.headerName) : !column.headerInvisible && column.headerName;
|
10607
|
-
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
10884
|
+
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ import_react75.default.createElement(Table2.SortCell, __spreadValues({
|
10608
10885
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
10609
10886
|
onClick: () => updateSort(column),
|
10610
10887
|
style: { width: column.width },
|
10611
10888
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
10612
|
-
}, cellProps(column)), content) : /* @__PURE__ */
|
10889
|
+
}, cellProps(column)), content) : /* @__PURE__ */ import_react75.default.createElement(Table2.Cell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
10613
10890
|
style: { width: column.width },
|
10614
10891
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
10615
10892
|
}), content);
|
10616
10893
|
}),
|
10617
|
-
menu ? /* @__PURE__ */
|
10894
|
+
menu ? /* @__PURE__ */ import_react75.default.createElement(Table2.Cell, {
|
10618
10895
|
key: "__contextMenu",
|
10619
10896
|
align: "right",
|
10620
10897
|
"aria-label": menuAriaLabel
|
10621
10898
|
}, menuHeaderName) : null
|
10622
|
-
])), /* @__PURE__ */
|
10899
|
+
])), /* @__PURE__ */ import_react75.default.createElement(List2, {
|
10623
10900
|
container: Table2.Body,
|
10624
10901
|
paginationContainer: PaginationFooter,
|
10625
10902
|
pagination,
|
@@ -10627,12 +10904,12 @@ var DataTable = (_a) => {
|
|
10627
10904
|
renderItem: (row, index) => {
|
10628
10905
|
var _a2;
|
10629
10906
|
const isRowDisabled = (_a2 = disabled == null ? void 0 : disabled(row, index, sortedRows)) != null ? _a2 : false;
|
10630
|
-
return /* @__PURE__ */
|
10907
|
+
return /* @__PURE__ */ import_react75.default.createElement(Table2.Row, {
|
10631
10908
|
key: row.id,
|
10632
10909
|
disabled: isRowDisabled
|
10633
|
-
}, /* @__PURE__ */
|
10910
|
+
}, /* @__PURE__ */ import_react75.default.createElement(List2, {
|
10634
10911
|
items: columns,
|
10635
|
-
renderItem: (column) => /* @__PURE__ */
|
10912
|
+
renderItem: (column) => /* @__PURE__ */ import_react75.default.createElement(Table2.Cell, __spreadValues({}, cellProps(column)), renderCell2(column, row, index, sortedRows))
|
10636
10913
|
}), renderRowMenu2(row, index, { menu, menuAriaLabel, onAction, onMenuOpenChange }));
|
10637
10914
|
}
|
10638
10915
|
}));
|
@@ -10645,12 +10922,12 @@ var renderRowMenu2 = (row, index, {
|
|
10645
10922
|
}) => {
|
10646
10923
|
if (menu) {
|
10647
10924
|
const menuContent = (0, import_isFunction2.default)(menu) ? menu(row, index) : menu;
|
10648
|
-
return /* @__PURE__ */
|
10925
|
+
return /* @__PURE__ */ import_react75.default.createElement(Table2.Cell, {
|
10649
10926
|
align: "right"
|
10650
|
-
}, menuContent && /* @__PURE__ */
|
10927
|
+
}, menuContent && /* @__PURE__ */ import_react75.default.createElement(DropdownMenu2, {
|
10651
10928
|
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index),
|
10652
10929
|
onOpenChange: onMenuOpenChange
|
10653
|
-
}, /* @__PURE__ */
|
10930
|
+
}, /* @__PURE__ */ import_react75.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react75.default.createElement(Button.Icon, {
|
10654
10931
|
"aria-label": menuAriaLabel,
|
10655
10932
|
icon: import_more3.default
|
10656
10933
|
})), menuContent));
|
@@ -10663,14 +10940,14 @@ var renderCell2 = (column, row, index, rows) => {
|
|
10663
10940
|
if (column.type === "status") {
|
10664
10941
|
const status = column.status(row, index, rows);
|
10665
10942
|
if (status) {
|
10666
|
-
cellContent = /* @__PURE__ */
|
10943
|
+
cellContent = /* @__PURE__ */ import_react75.default.createElement(StatusChip, __spreadValues({
|
10667
10944
|
dense: true
|
10668
10945
|
}, status));
|
10669
10946
|
}
|
10670
10947
|
} else if (column.type === "action") {
|
10671
10948
|
const action = renameProperty("text", "children", column.action(row, index, rows));
|
10672
10949
|
if (action) {
|
10673
|
-
cellContent = /* @__PURE__ */
|
10950
|
+
cellContent = /* @__PURE__ */ import_react75.default.createElement(Button.Secondary, __spreadValues({
|
10674
10951
|
dense: true
|
10675
10952
|
}, action));
|
10676
10953
|
}
|
@@ -10679,24 +10956,24 @@ var renderCell2 = (column, row, index, rows) => {
|
|
10679
10956
|
} else if (column.type === "item") {
|
10680
10957
|
const item = column.item(row, index, rows);
|
10681
10958
|
if (item) {
|
10682
|
-
cellContent = /* @__PURE__ */
|
10959
|
+
cellContent = /* @__PURE__ */ import_react75.default.createElement(Item4, __spreadValues({}, item));
|
10683
10960
|
}
|
10684
10961
|
} else if (column.formatter) {
|
10685
10962
|
cellContent = column.formatter(row[column.field], row, index, rows);
|
10686
10963
|
} else {
|
10687
10964
|
cellContent = row[column.field];
|
10688
10965
|
}
|
10689
|
-
return column.tooltip ? /* @__PURE__ */
|
10966
|
+
return column.tooltip ? /* @__PURE__ */ import_react75.default.createElement(Tooltip, __spreadValues({}, column.tooltip(row, index, rows)), cellContent) : cellContent;
|
10690
10967
|
};
|
10691
10968
|
DataTable.Skeleton = DataListSkeleton;
|
10692
10969
|
|
10693
10970
|
// src/molecules/Dialog/Dialog.tsx
|
10694
|
-
var
|
10971
|
+
var import_react77 = __toESM(require("react"));
|
10695
10972
|
var import_dialog = require("@react-aria/dialog");
|
10696
10973
|
var import_overlays6 = require("@react-aria/overlays");
|
10697
|
-
var
|
10974
|
+
var import_utils14 = require("@react-aria/utils");
|
10698
10975
|
var import_overlays7 = require("@react-stately/overlays");
|
10699
|
-
var
|
10976
|
+
var import_omit8 = __toESM(require("lodash/omit"));
|
10700
10977
|
|
10701
10978
|
// src/atoms/Dialog/Dialog.tsx
|
10702
10979
|
var import_confirm2 = __toESM(require_confirm());
|
@@ -10718,10 +10995,10 @@ var DIALOG_ICONS_AND_COLORS = {
|
|
10718
10995
|
};
|
10719
10996
|
|
10720
10997
|
// src/atoms/Modal/Modal.tsx
|
10721
|
-
var
|
10998
|
+
var import_react76 = __toESM(require("react"));
|
10722
10999
|
var Modal = (_a) => {
|
10723
11000
|
var _b = _a, { children, className, open } = _b, rest = __objRest(_b, ["children", "className", "open"]);
|
10724
|
-
return open ? /* @__PURE__ */
|
11001
|
+
return open ? /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10725
11002
|
className: classNames(
|
10726
11003
|
tw("inset-0 overflow-y-auto z-modal flex justify-center items-center fixed py-7"),
|
10727
11004
|
className
|
@@ -10730,14 +11007,14 @@ var Modal = (_a) => {
|
|
10730
11007
|
};
|
10731
11008
|
Modal.BackDrop = (_a) => {
|
10732
11009
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
10733
|
-
return /* @__PURE__ */
|
11010
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10734
11011
|
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-primary-100 opacity-60"), className)
|
10735
11012
|
}));
|
10736
11013
|
};
|
10737
|
-
Modal.Dialog =
|
11014
|
+
Modal.Dialog = import_react76.default.forwardRef(
|
10738
11015
|
(_a, ref) => {
|
10739
11016
|
var _b = _a, { children, className, size = "sm" } = _b, rest = __objRest(_b, ["children", "className", "size"]);
|
10740
|
-
return /* @__PURE__ */
|
11017
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({
|
10741
11018
|
ref,
|
10742
11019
|
"aria-modal": "true"
|
10743
11020
|
}, rest), {
|
@@ -10755,31 +11032,31 @@ Modal.Dialog = import_react75.default.forwardRef(
|
|
10755
11032
|
);
|
10756
11033
|
Modal.Header = (_a) => {
|
10757
11034
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
10758
|
-
return /* @__PURE__ */
|
11035
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10759
11036
|
className: classNames(tw("px-7 py-6 gap-3 flex items-center"), className)
|
10760
11037
|
}), children);
|
10761
11038
|
};
|
10762
11039
|
Modal.HeaderImage = (_a) => {
|
10763
11040
|
var _b = _a, { backgroundImage, className } = _b, rest = __objRest(_b, ["backgroundImage", "className"]);
|
10764
11041
|
const common = tw("h-[120px] min-h-[120px] w-full ");
|
10765
|
-
return backgroundImage ? /* @__PURE__ */
|
11042
|
+
return backgroundImage ? /* @__PURE__ */ import_react76.default.createElement("img", __spreadProps(__spreadValues({
|
10766
11043
|
"aria-hidden": true,
|
10767
11044
|
src: backgroundImage != null ? backgroundImage : void 0
|
10768
11045
|
}, rest), {
|
10769
11046
|
className: classNames(common, tw("object-cover"), className)
|
10770
|
-
})) : /* @__PURE__ */
|
11047
|
+
})) : /* @__PURE__ */ import_react76.default.createElement("div", {
|
10771
11048
|
className: classNames(common, tw("bg-grey-5"), className)
|
10772
11049
|
});
|
10773
11050
|
};
|
10774
11051
|
Modal.CloseButtonContainer = (_a) => {
|
10775
11052
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
10776
|
-
return /* @__PURE__ */
|
11053
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10777
11054
|
className: classNames(tw("absolute top-[20px] right-[28px]"), className)
|
10778
11055
|
}));
|
10779
11056
|
};
|
10780
11057
|
Modal.Title = (_a) => {
|
10781
11058
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
10782
|
-
return /* @__PURE__ */
|
11059
|
+
return /* @__PURE__ */ import_react76.default.createElement(Typography, __spreadValues({
|
10783
11060
|
htmlTag: "h2",
|
10784
11061
|
variant: "subheading",
|
10785
11062
|
color: "grey-90",
|
@@ -10788,52 +11065,52 @@ Modal.Title = (_a) => {
|
|
10788
11065
|
};
|
10789
11066
|
Modal.Subtitle = (_a) => {
|
10790
11067
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
10791
|
-
return /* @__PURE__ */
|
11068
|
+
return /* @__PURE__ */ import_react76.default.createElement(Typography, __spreadValues({
|
10792
11069
|
variant: "small",
|
10793
11070
|
color: "grey-60"
|
10794
11071
|
}, rest), children);
|
10795
11072
|
};
|
10796
11073
|
Modal.TitleContainer = (_a) => {
|
10797
11074
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
10798
|
-
return /* @__PURE__ */
|
11075
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10799
11076
|
className: classNames(tw("flex flex-col grow gap-2"), className)
|
10800
11077
|
}), children);
|
10801
11078
|
};
|
10802
11079
|
Modal.Body = (_a) => {
|
10803
11080
|
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
10804
|
-
return /* @__PURE__ */
|
11081
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10805
11082
|
className: classNames(tw("px-7 grow overflow-y-auto", { "pb-6": noFooter }), className),
|
10806
11083
|
style: __spreadValues({ maxHeight }, style)
|
10807
11084
|
}), children);
|
10808
11085
|
};
|
10809
11086
|
Modal.Footer = (_a) => {
|
10810
11087
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
10811
|
-
return /* @__PURE__ */
|
11088
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10812
11089
|
className: classNames(tw("px-7 py-6"), className)
|
10813
11090
|
}), children);
|
10814
11091
|
};
|
10815
11092
|
Modal.Actions = (_a) => {
|
10816
11093
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
10817
|
-
return /* @__PURE__ */
|
11094
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10818
11095
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
10819
11096
|
}), children);
|
10820
11097
|
};
|
10821
11098
|
|
10822
11099
|
// src/molecules/Dialog/Dialog.tsx
|
10823
11100
|
var Dialog = (props) => {
|
10824
|
-
const ref =
|
11101
|
+
const ref = import_react77.default.useRef(null);
|
10825
11102
|
const state = (0, import_overlays7.useOverlayTriggerState)({ isOpen: props.open });
|
10826
11103
|
const { modalProps, underlayProps } = (0, import_overlays6.useModalOverlay)({}, state, ref);
|
10827
11104
|
if (!state.isOpen) {
|
10828
11105
|
return null;
|
10829
11106
|
}
|
10830
|
-
return /* @__PURE__ */
|
11107
|
+
return /* @__PURE__ */ import_react77.default.createElement(import_overlays6.Overlay, null, /* @__PURE__ */ import_react77.default.createElement(Modal, {
|
10831
11108
|
className: "Aquarium-Dialog",
|
10832
11109
|
open: true
|
10833
|
-
}, /* @__PURE__ */
|
11110
|
+
}, /* @__PURE__ */ import_react77.default.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ import_react77.default.createElement(Modal.Dialog, __spreadValues({
|
10834
11111
|
ref,
|
10835
11112
|
size: "sm"
|
10836
|
-
}, modalProps), /* @__PURE__ */
|
11113
|
+
}, modalProps), /* @__PURE__ */ import_react77.default.createElement(DialogWrapper, __spreadValues({}, props)))));
|
10837
11114
|
};
|
10838
11115
|
var DialogWrapper = ({
|
10839
11116
|
title,
|
@@ -10842,54 +11119,54 @@ var DialogWrapper = ({
|
|
10842
11119
|
primaryAction,
|
10843
11120
|
secondaryAction
|
10844
11121
|
}) => {
|
10845
|
-
const ref =
|
10846
|
-
const labelledBy = (0,
|
10847
|
-
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)();
|
10848
11125
|
const { dialogProps } = (0, import_dialog.useDialog)(
|
10849
11126
|
{ "role": "alertdialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
10850
11127
|
ref
|
10851
11128
|
);
|
10852
|
-
return /* @__PURE__ */
|
11129
|
+
return /* @__PURE__ */ import_react77.default.createElement("div", __spreadProps(__spreadValues({
|
10853
11130
|
ref
|
10854
11131
|
}, dialogProps), {
|
10855
11132
|
className: tw("outline-none")
|
10856
|
-
}), /* @__PURE__ */
|
11133
|
+
}), /* @__PURE__ */ import_react77.default.createElement(Modal.Header, {
|
10857
11134
|
className: tw("icon-stroke-2")
|
10858
|
-
}, /* @__PURE__ */
|
11135
|
+
}, /* @__PURE__ */ import_react77.default.createElement(Icon, {
|
10859
11136
|
icon: DIALOG_ICONS_AND_COLORS[type].icon,
|
10860
11137
|
color: DIALOG_ICONS_AND_COLORS[type].color,
|
10861
11138
|
fontSize: 20
|
10862
|
-
}), /* @__PURE__ */
|
11139
|
+
}), /* @__PURE__ */ import_react77.default.createElement(Modal.Title, {
|
10863
11140
|
id: labelledBy,
|
10864
11141
|
variant: "large",
|
10865
11142
|
color: DIALOG_ICONS_AND_COLORS[type].color
|
10866
|
-
}, title)), /* @__PURE__ */
|
11143
|
+
}, title)), /* @__PURE__ */ import_react77.default.createElement(Modal.Body, {
|
10867
11144
|
id: describedBy
|
10868
|
-
}, /* @__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({
|
10869
11146
|
key: secondaryAction.text
|
10870
|
-
}, (0,
|
11147
|
+
}, (0, import_omit8.default)(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ import_react77.default.createElement(Button.Secondary, __spreadValues({
|
10871
11148
|
key: primaryAction.text
|
10872
|
-
}, (0,
|
11149
|
+
}, (0, import_omit8.default)(primaryAction, "text")), primaryAction.text))));
|
10873
11150
|
};
|
10874
11151
|
|
10875
11152
|
// src/molecules/Dropdown/Dropdown.tsx
|
10876
|
-
var
|
11153
|
+
var import_react81 = __toESM(require("react"));
|
10877
11154
|
|
10878
11155
|
// src/molecules/Popover/Popover.tsx
|
10879
|
-
var
|
11156
|
+
var import_react80 = __toESM(require("react"));
|
10880
11157
|
var import_interactions3 = require("@react-aria/interactions");
|
10881
11158
|
var import_overlays8 = require("@react-aria/overlays");
|
10882
|
-
var
|
11159
|
+
var import_utils15 = require("@react-aria/utils");
|
10883
11160
|
var import_overlays9 = require("@react-stately/overlays");
|
10884
11161
|
var import_classnames7 = __toESM(require("classnames"));
|
10885
11162
|
|
10886
11163
|
// src/molecules/Popover/Dialog.tsx
|
10887
|
-
var
|
11164
|
+
var import_react78 = __toESM(require("react"));
|
10888
11165
|
var import_dialog2 = require("@react-aria/dialog");
|
10889
11166
|
var Dialog2 = ({ children }) => {
|
10890
|
-
const ref =
|
11167
|
+
const ref = import_react78.default.useRef(null);
|
10891
11168
|
const { dialogProps } = (0, import_dialog2.useDialog)({}, ref);
|
10892
|
-
return /* @__PURE__ */
|
11169
|
+
return /* @__PURE__ */ import_react78.default.createElement("div", __spreadProps(__spreadValues({
|
10893
11170
|
ref
|
10894
11171
|
}, dialogProps), {
|
10895
11172
|
className: tw("outline-none")
|
@@ -10897,10 +11174,10 @@ var Dialog2 = ({ children }) => {
|
|
10897
11174
|
};
|
10898
11175
|
|
10899
11176
|
// src/molecules/Popover/PopoverContext.tsx
|
10900
|
-
var
|
10901
|
-
var PopoverContext = (0,
|
11177
|
+
var import_react79 = require("react");
|
11178
|
+
var PopoverContext = (0, import_react79.createContext)(null);
|
10902
11179
|
var usePopoverContext = () => {
|
10903
|
-
const ctx = (0,
|
11180
|
+
const ctx = (0, import_react79.useContext)(PopoverContext);
|
10904
11181
|
if (ctx === null) {
|
10905
11182
|
throw new Error("PopoverContext was used outside of provider.");
|
10906
11183
|
}
|
@@ -10920,24 +11197,24 @@ var Popover2 = (props) => {
|
|
10920
11197
|
crossOffset,
|
10921
11198
|
shouldFlip
|
10922
11199
|
} = props;
|
10923
|
-
const triggerRef = (0,
|
11200
|
+
const triggerRef = (0, import_react80.useRef)(null);
|
10924
11201
|
const state = (0, import_overlays9.useOverlayTriggerState)(props);
|
10925
11202
|
const { triggerProps, overlayProps } = (0, import_overlays8.useOverlayTrigger)({ type: type != null ? type : "dialog" }, state, triggerRef);
|
10926
|
-
return /* @__PURE__ */
|
11203
|
+
return /* @__PURE__ */ import_react80.default.createElement(PopoverContext.Provider, {
|
10927
11204
|
value: {
|
10928
11205
|
state
|
10929
11206
|
}
|
10930
|
-
},
|
11207
|
+
}, import_react80.default.Children.map(props.children, (child) => {
|
10931
11208
|
if (isComponentType(child, Popover2.Trigger)) {
|
10932
|
-
return /* @__PURE__ */
|
11209
|
+
return /* @__PURE__ */ import_react80.default.createElement(import_interactions3.PressResponder, __spreadValues({
|
10933
11210
|
ref: triggerRef
|
10934
|
-
}, triggerProps), /* @__PURE__ */
|
11211
|
+
}, triggerProps), /* @__PURE__ */ import_react80.default.createElement(PopoverTriggerWrapper, {
|
10935
11212
|
"data-testid": props["data-testid"],
|
10936
11213
|
"aria-controls": id
|
10937
11214
|
}, child.props.children));
|
10938
11215
|
}
|
10939
11216
|
if (isComponentType(child, Popover2.Panel)) {
|
10940
|
-
return state.isOpen && /* @__PURE__ */
|
11217
|
+
return state.isOpen && /* @__PURE__ */ import_react80.default.createElement(PopoverOverlay, __spreadValues({
|
10941
11218
|
triggerRef: targetRef != null ? targetRef : triggerRef,
|
10942
11219
|
state,
|
10943
11220
|
placement,
|
@@ -10948,7 +11225,7 @@ var Popover2 = (props) => {
|
|
10948
11225
|
offset,
|
10949
11226
|
crossOffset,
|
10950
11227
|
shouldFlip
|
10951
|
-
}, overlayProps), containFocus ? /* @__PURE__ */
|
11228
|
+
}, overlayProps), containFocus ? /* @__PURE__ */ import_react80.default.createElement(Dialog2, null, child.props.children) : child.props.children);
|
10952
11229
|
}
|
10953
11230
|
throw new Error("Invalid children element type");
|
10954
11231
|
}));
|
@@ -10967,7 +11244,7 @@ var asPopoverButton = (Component, displayName) => {
|
|
10967
11244
|
state.close();
|
10968
11245
|
onClick == null ? void 0 : onClick(e);
|
10969
11246
|
};
|
10970
|
-
return /* @__PURE__ */
|
11247
|
+
return /* @__PURE__ */ import_react80.default.createElement(Component, __spreadProps(__spreadValues({}, props), {
|
10971
11248
|
onClick: handleClick
|
10972
11249
|
}));
|
10973
11250
|
};
|
@@ -10979,22 +11256,22 @@ Popover2.Button = PopoverButton;
|
|
10979
11256
|
var PopoverTriggerWrapper = (_a) => {
|
10980
11257
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
10981
11258
|
var _a2;
|
10982
|
-
const ref = (0,
|
10983
|
-
const trigger =
|
11259
|
+
const ref = (0, import_react80.useRef)(null);
|
11260
|
+
const trigger = import_react80.default.Children.only(children);
|
10984
11261
|
const { pressProps } = (0, import_interactions3.usePress)(__spreadProps(__spreadValues({}, rest), { ref }));
|
10985
|
-
return
|
11262
|
+
return import_react80.default.cloneElement(trigger, __spreadProps(__spreadValues({
|
10986
11263
|
"ref": ref
|
10987
|
-
}, (0,
|
11264
|
+
}, (0, import_utils15.mergeProps)(pressProps, trigger.props)), {
|
10988
11265
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
10989
11266
|
}));
|
10990
11267
|
};
|
10991
11268
|
|
10992
11269
|
// src/molecules/Dropdown/Dropdown.tsx
|
10993
11270
|
var Dropdown = ({ children, content, placement = "bottom-left" }) => {
|
10994
|
-
return /* @__PURE__ */
|
11271
|
+
return /* @__PURE__ */ import_react81.default.createElement(Popover2, {
|
10995
11272
|
type: "menu",
|
10996
11273
|
placement
|
10997
|
-
}, /* @__PURE__ */
|
11274
|
+
}, /* @__PURE__ */ import_react81.default.createElement(Popover2.Trigger, null, children), /* @__PURE__ */ import_react81.default.createElement(Popover2.Panel, {
|
10998
11275
|
className: "Aquarium-Dropdown"
|
10999
11276
|
}, content));
|
11000
11277
|
};
|
@@ -11005,26 +11282,26 @@ var DropdownMenu3 = ({
|
|
11005
11282
|
triggerId,
|
11006
11283
|
setClose = () => void 0
|
11007
11284
|
}) => {
|
11008
|
-
const menuRef =
|
11009
|
-
|
11285
|
+
const menuRef = import_react81.default.useRef(null);
|
11286
|
+
import_react81.default.useEffect(() => {
|
11010
11287
|
const id = setTimeout(() => {
|
11011
11288
|
var _a, _b, _c;
|
11012
11289
|
return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
|
11013
11290
|
});
|
11014
11291
|
return () => clearTimeout(id);
|
11015
11292
|
}, [menuRef.current]);
|
11016
|
-
return /* @__PURE__ */
|
11293
|
+
return /* @__PURE__ */ import_react81.default.createElement("div", {
|
11017
11294
|
style: { minWidth: "250px" },
|
11018
11295
|
className: tw("py-3 bg-white")
|
11019
|
-
}, !!title && /* @__PURE__ */
|
11296
|
+
}, !!title && /* @__PURE__ */ import_react81.default.createElement("div", {
|
11020
11297
|
className: tw("px-4 py-4 text-left text-grey-100 typography-default-strong")
|
11021
|
-
}, title), /* @__PURE__ */
|
11298
|
+
}, title), /* @__PURE__ */ import_react81.default.createElement("ol", {
|
11022
11299
|
role: "menu",
|
11023
11300
|
ref: menuRef,
|
11024
11301
|
id: contentId,
|
11025
11302
|
"aria-labelledby": triggerId
|
11026
|
-
},
|
11027
|
-
return
|
11303
|
+
}, import_react81.default.Children.map(children, (child) => {
|
11304
|
+
return import_react81.default.cloneElement(child, { setClose });
|
11028
11305
|
})));
|
11029
11306
|
};
|
11030
11307
|
var DropdownItem = (_a) => {
|
@@ -11079,10 +11356,10 @@ var DropdownItem = (_a) => {
|
|
11079
11356
|
handleSelect();
|
11080
11357
|
}
|
11081
11358
|
};
|
11082
|
-
const itemContent = /* @__PURE__ */
|
11359
|
+
const itemContent = /* @__PURE__ */ import_react81.default.createElement("div", {
|
11083
11360
|
className: tw("py-3 px-4")
|
11084
11361
|
}, children);
|
11085
|
-
return /* @__PURE__ */
|
11362
|
+
return /* @__PURE__ */ import_react81.default.createElement("li", __spreadProps(__spreadValues({
|
11086
11363
|
role: "menuitem",
|
11087
11364
|
tabIndex: -1,
|
11088
11365
|
onClick: handleClick,
|
@@ -11093,11 +11370,11 @@ var DropdownItem = (_a) => {
|
|
11093
11370
|
"text-grey-10 cursor-not-allowed": disabled,
|
11094
11371
|
"text-primary-70 hover:text-primary-80": color === "danger" && !disabled
|
11095
11372
|
})
|
11096
|
-
}), tooltip ? /* @__PURE__ */
|
11373
|
+
}), tooltip ? /* @__PURE__ */ import_react81.default.createElement(Tooltip, {
|
11097
11374
|
content: tooltip,
|
11098
11375
|
placement: tooltipPlacement,
|
11099
11376
|
inline: false
|
11100
|
-
}, /* @__PURE__ */
|
11377
|
+
}, /* @__PURE__ */ import_react81.default.createElement("div", {
|
11101
11378
|
tabIndex: 0,
|
11102
11379
|
className: tw("grow")
|
11103
11380
|
}, itemContent)) : itemContent);
|
@@ -11107,21 +11384,6 @@ Dropdown.Item = DropdownItem;
|
|
11107
11384
|
|
11108
11385
|
// src/molecules/EmptyState/EmptyState.tsx
|
11109
11386
|
var import_react82 = __toESM(require("react"));
|
11110
|
-
|
11111
|
-
// src/utils/actions.tsx
|
11112
|
-
var import_react81 = __toESM(require("react"));
|
11113
|
-
var import_omit8 = __toESM(require("lodash/omit"));
|
11114
|
-
var renderAction = (kind = "primary", action) => {
|
11115
|
-
return isLink(action) ? /* @__PURE__ */ import_react81.default.createElement(Button.ExternalLink, __spreadValues({
|
11116
|
-
key: action.text,
|
11117
|
-
kind
|
11118
|
-
}, (0, import_omit8.default)(action, "text")), action.text) : /* @__PURE__ */ import_react81.default.createElement(Button, __spreadValues({
|
11119
|
-
key: action.text,
|
11120
|
-
kind
|
11121
|
-
}, (0, import_omit8.default)(action, "text")), action.text);
|
11122
|
-
};
|
11123
|
-
|
11124
|
-
// src/molecules/EmptyState/EmptyState.tsx
|
11125
11387
|
var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
|
11126
11388
|
EmptyStateLayout2["Vertical"] = "vertical";
|
11127
11389
|
EmptyStateLayout2["Horizontal"] = "horizontal";
|
@@ -11214,8 +11476,8 @@ var EmptyState = ({
|
|
11214
11476
|
gap: "4",
|
11215
11477
|
justifyContent: "center",
|
11216
11478
|
alignItems: "center",
|
11217
|
-
|
11218
|
-
}, 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, {
|
11219
11481
|
marginTop: "5"
|
11220
11482
|
}, /* @__PURE__ */ import_react82.default.createElement(Typography2.Small, {
|
11221
11483
|
color: "grey-60"
|
@@ -11350,7 +11612,6 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
11350
11612
|
className: `px-4 py-2 rounded-full ${active ? "bg-grey-5" : "hover:bg-grey-0"}`
|
11351
11613
|
}, /* @__PURE__ */ import_react88.default.createElement("img", {
|
11352
11614
|
src: icon,
|
11353
|
-
alt: name,
|
11354
11615
|
className: "inline mr-4",
|
11355
11616
|
height: 28,
|
11356
11617
|
width: 28
|
@@ -11361,7 +11622,7 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
11361
11622
|
var import_react90 = __toESM(require("react"));
|
11362
11623
|
var import_dialog3 = require("@react-aria/dialog");
|
11363
11624
|
var import_overlays10 = require("@react-aria/overlays");
|
11364
|
-
var
|
11625
|
+
var import_utils17 = require("@react-aria/utils");
|
11365
11626
|
var import_overlays11 = require("@react-stately/overlays");
|
11366
11627
|
var import_castArray = __toESM(require("lodash/castArray"));
|
11367
11628
|
var import_omit9 = __toESM(require("lodash/omit"));
|
@@ -11691,8 +11952,8 @@ var Modal2 = (_a) => {
|
|
11691
11952
|
var ModalWrapper = import_react90.default.forwardRef(
|
11692
11953
|
(_a, ref) => {
|
11693
11954
|
var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
|
11694
|
-
const labelledBy = (0,
|
11695
|
-
const describedBy = (0,
|
11955
|
+
const labelledBy = (0, import_utils17.useId)();
|
11956
|
+
const describedBy = (0, import_utils17.useId)();
|
11696
11957
|
const { dialogProps } = (0, import_dialog3.useDialog)(
|
11697
11958
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
11698
11959
|
ref
|
@@ -11738,10 +11999,10 @@ var ModalTabs = createTabsComponent(
|
|
11738
11999
|
|
11739
12000
|
// src/molecules/MultiInput/MultiInput.tsx
|
11740
12001
|
var import_react92 = __toESM(require("react"));
|
12002
|
+
var import_utils19 = require("@react-aria/utils");
|
11741
12003
|
var import_castArray2 = __toESM(require("lodash/castArray"));
|
11742
12004
|
var import_identity = __toESM(require("lodash/identity"));
|
11743
12005
|
var import_omit10 = __toESM(require("lodash/omit"));
|
11744
|
-
var import_uniqueId5 = __toESM(require("lodash/uniqueId"));
|
11745
12006
|
|
11746
12007
|
// src/molecules/MultiInput/InputChip.tsx
|
11747
12008
|
var import_react91 = __toESM(require("react"));
|
@@ -11968,21 +12229,22 @@ var MultiInput = (props) => {
|
|
11968
12229
|
var _a2;
|
11969
12230
|
setValue((_a2 = props.value) != null ? _a2 : []);
|
11970
12231
|
}, [JSON.stringify(props.value)]);
|
11971
|
-
const
|
11972
|
-
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)();
|
11973
12235
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
11974
12236
|
const labelControlProps = getLabelControlProps(props);
|
11975
12237
|
const baseProps = (0, import_omit10.default)(props, Object.keys(labelControlProps));
|
11976
12238
|
return /* @__PURE__ */ import_react92.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
11977
|
-
id: `${id
|
11978
|
-
htmlFor: `${id
|
12239
|
+
id: `${id}-label`,
|
12240
|
+
htmlFor: `${id}-input`,
|
11979
12241
|
messageId: errorMessageId
|
11980
12242
|
}, labelControlProps), {
|
11981
12243
|
length: value.length,
|
11982
12244
|
maxLength,
|
11983
12245
|
className: "Aquarium-MultiInput"
|
11984
12246
|
}), /* @__PURE__ */ import_react92.default.createElement(MultiInputBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
11985
|
-
id: `${id
|
12247
|
+
id: `${id}-input`,
|
11986
12248
|
onChange: (value2) => {
|
11987
12249
|
var _a2;
|
11988
12250
|
setValue(value2 != null ? value2 : []);
|
@@ -12000,12 +12262,12 @@ MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
|
12000
12262
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
12001
12263
|
var import_react93 = __toESM(require("react"));
|
12002
12264
|
var import_overlays12 = require("@react-aria/overlays");
|
12265
|
+
var import_utils20 = require("@react-aria/utils");
|
12003
12266
|
var import_downshift3 = require("downshift");
|
12004
12267
|
var import_isEqual = __toESM(require("lodash/isEqual"));
|
12005
12268
|
var import_isNil2 = __toESM(require("lodash/isNil"));
|
12006
12269
|
var import_omit11 = __toESM(require("lodash/omit"));
|
12007
12270
|
var import_omitBy = __toESM(require("lodash/omitBy"));
|
12008
|
-
var import_uniqueId6 = __toESM(require("lodash/uniqueId"));
|
12009
12271
|
var import_match_sorter2 = require("match-sorter");
|
12010
12272
|
var MultiSelectBase = (_a) => {
|
12011
12273
|
var _b = _a, {
|
@@ -12227,19 +12489,20 @@ var MultiSelect = (_a) => {
|
|
12227
12489
|
"emptyState"
|
12228
12490
|
]);
|
12229
12491
|
var _a2;
|
12230
|
-
const
|
12231
|
-
const
|
12492
|
+
const defaultId = (0, import_utils20.useId)();
|
12493
|
+
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
12494
|
+
const errorMessageId = (0, import_utils20.useId)();
|
12232
12495
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12233
12496
|
const labelControlProps = getLabelControlProps(props);
|
12234
12497
|
const baseProps = (0, import_omit11.default)(props, Object.keys(labelControlProps));
|
12235
12498
|
return /* @__PURE__ */ import_react93.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
12236
|
-
id: `${id
|
12237
|
-
htmlFor: `${id
|
12499
|
+
id: `${id}-label`,
|
12500
|
+
htmlFor: `${id}-input`,
|
12238
12501
|
messageId: errorMessageId
|
12239
12502
|
}, labelControlProps), {
|
12240
12503
|
className: "Aquarium-MultiSelect"
|
12241
12504
|
}), /* @__PURE__ */ import_react93.default.createElement(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
12242
|
-
id
|
12505
|
+
id,
|
12243
12506
|
options,
|
12244
12507
|
emptyState,
|
12245
12508
|
disabled: props.disabled,
|
@@ -12252,13 +12515,14 @@ MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
|
12252
12515
|
|
12253
12516
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
12254
12517
|
var import_react94 = __toESM(require("react"));
|
12518
|
+
var import_utils21 = require("@react-aria/utils");
|
12255
12519
|
var import_omit12 = __toESM(require("lodash/omit"));
|
12256
|
-
var
|
12520
|
+
var import_uniqueId = __toESM(require("lodash/uniqueId"));
|
12257
12521
|
var import_caretDown2 = __toESM(require_caretDown());
|
12258
12522
|
var NativeSelectBase = import_react94.default.forwardRef(
|
12259
12523
|
(_a, ref) => {
|
12260
12524
|
var _b = _a, { children, disabled = false, required = false, valid = true, readOnly = false } = _b, props = __objRest(_b, ["children", "disabled", "required", "valid", "readOnly"]);
|
12261
|
-
const placeholderValue = (0,
|
12525
|
+
const placeholderValue = (0, import_uniqueId.default)("default_value_for_placeholder");
|
12262
12526
|
const defaultValue = props.defaultValue ? props.defaultValue : props.placeholder ? placeholderValue : void 0;
|
12263
12527
|
const handleBlur = (event) => {
|
12264
12528
|
var _a2, _b2;
|
@@ -12313,21 +12577,22 @@ var NativeSelect = import_react94.default.forwardRef(
|
|
12313
12577
|
(_a, ref) => {
|
12314
12578
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
12315
12579
|
var _a2;
|
12316
|
-
const
|
12317
|
-
const
|
12580
|
+
const defaultId = (0, import_utils21.useId)();
|
12581
|
+
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
12582
|
+
const errorMessageId = (0, import_utils21.useId)();
|
12318
12583
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12319
12584
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
12320
12585
|
const baseProps = (0, import_omit12.default)(props, Object.keys(labelControlProps));
|
12321
12586
|
return /* @__PURE__ */ import_react94.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
12322
|
-
id: `${id
|
12323
|
-
htmlFor: id
|
12587
|
+
id: `${id}-label`,
|
12588
|
+
htmlFor: id,
|
12324
12589
|
messageId: errorMessageId
|
12325
12590
|
}, labelControlProps), {
|
12326
12591
|
className: "Aquarium-NativeSelect"
|
12327
12592
|
}), /* @__PURE__ */ import_react94.default.createElement(NativeSelectBase, __spreadProps(__spreadValues(__spreadValues({
|
12328
12593
|
ref
|
12329
12594
|
}, baseProps), errorProps), {
|
12330
|
-
id
|
12595
|
+
id,
|
12331
12596
|
"data-testid": dataTestId,
|
12332
12597
|
disabled: props.disabled,
|
12333
12598
|
required: props.required,
|
@@ -12549,7 +12814,7 @@ var CommonPageHeader = ({
|
|
12549
12814
|
}, /* @__PURE__ */ import_react98.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react98.default.createElement(Button.Icon, {
|
12550
12815
|
"aria-label": menuAriaLabel,
|
12551
12816
|
icon: import_more4.default
|
12552
|
-
})), 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 })));
|
12553
12818
|
};
|
12554
12819
|
var PageHeader2 = (props) => /* @__PURE__ */ import_react98.default.createElement(CommonPageHeader, __spreadValues({}, props));
|
12555
12820
|
PageHeader2.displayName = "PageHeader";
|
@@ -12571,7 +12836,7 @@ var Header2 = (_a) => {
|
|
12571
12836
|
className: classNames(tw("p-5 gap-3 flex items-center"), className)
|
12572
12837
|
}), children);
|
12573
12838
|
};
|
12574
|
-
var
|
12839
|
+
var Title2 = (_a) => {
|
12575
12840
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12576
12841
|
return /* @__PURE__ */ import_react99.default.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
12577
12842
|
htmlTag: "h1",
|
@@ -12600,7 +12865,7 @@ var Actions2 = (_a) => {
|
|
12600
12865
|
};
|
12601
12866
|
var PopoverDialog = {
|
12602
12867
|
Header: Header2,
|
12603
|
-
Title,
|
12868
|
+
Title: Title2,
|
12604
12869
|
Body,
|
12605
12870
|
Footer: Footer2,
|
12606
12871
|
Actions: Actions2
|
@@ -12768,7 +13033,7 @@ RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
|
12768
13033
|
|
12769
13034
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
12770
13035
|
var import_react104 = __toESM(require("react"));
|
12771
|
-
var
|
13036
|
+
var import_utils23 = require("@react-aria/utils");
|
12772
13037
|
var isRadioButton = (c) => {
|
12773
13038
|
return import_react104.default.isValidElement(c) && c.type === RadioButton2;
|
12774
13039
|
};
|
@@ -12794,7 +13059,7 @@ var RadioButtonGroup = (_a) => {
|
|
12794
13059
|
]);
|
12795
13060
|
var _a2;
|
12796
13061
|
const [value, setValue] = import_react104.default.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
12797
|
-
const errorMessageId = (0,
|
13062
|
+
const errorMessageId = (0, import_utils23.useId)();
|
12798
13063
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12799
13064
|
const labelControlProps = getLabelControlProps(props);
|
12800
13065
|
if (_value !== void 0 && _value !== value) {
|
@@ -12849,10 +13114,10 @@ RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
|
12849
13114
|
|
12850
13115
|
// src/molecules/Section/Section.tsx
|
12851
13116
|
var import_react109 = __toESM(require("react"));
|
12852
|
-
var
|
13117
|
+
var import_utils24 = require("@react-aria/utils");
|
12853
13118
|
var import_web4 = require("@react-spring/web");
|
12854
13119
|
var import_castArray4 = __toESM(require("lodash/castArray"));
|
12855
|
-
var
|
13120
|
+
var import_isUndefined9 = __toESM(require("lodash/isUndefined"));
|
12856
13121
|
|
12857
13122
|
// src/molecules/Switch/Switch.tsx
|
12858
13123
|
var import_react106 = __toESM(require("react"));
|
@@ -13052,7 +13317,7 @@ Section3.Body = (_a) => {
|
|
13052
13317
|
var import_more5 = __toESM(require_more());
|
13053
13318
|
var Section4 = (props) => {
|
13054
13319
|
var _a, _b, _c, _d, _e;
|
13055
|
-
const { title, subtitle,
|
13320
|
+
const { title, subtitle, children } = props;
|
13056
13321
|
const _collapsible = title ? (_a = props.collapsible) != null ? _a : false : false;
|
13057
13322
|
const _collapsed = title ? props.collapsed : void 0;
|
13058
13323
|
const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
|
@@ -13063,7 +13328,7 @@ var Section4 = (props) => {
|
|
13063
13328
|
const onAction = title ? props.onAction : void 0;
|
13064
13329
|
const onMenuOpenChange = title ? props.onMenuOpenChange : void 0;
|
13065
13330
|
const onCollapsedChange = title ? props.onCollapsedChange : void 0;
|
13066
|
-
if (title && !(0,
|
13331
|
+
if (title && !(0, import_isUndefined9.default)(props.collapsed) && props.collapsed !== isCollapsed) {
|
13067
13332
|
setCollapsed(props.collapsed);
|
13068
13333
|
}
|
13069
13334
|
const handleTitleClick = () => {
|
@@ -13087,8 +13352,8 @@ var Section4 = (props) => {
|
|
13087
13352
|
},
|
13088
13353
|
immediate: !_collapsible
|
13089
13354
|
}), { transform, backgroundColor } = _f, spring = __objRest(_f, ["transform", "backgroundColor"]);
|
13090
|
-
const toggleId = (0,
|
13091
|
-
const regionId = (0,
|
13355
|
+
const toggleId = (0, import_utils24.useId)();
|
13356
|
+
const regionId = (0, import_utils24.useId)();
|
13092
13357
|
return /* @__PURE__ */ import_react109.default.createElement(Section3, {
|
13093
13358
|
"aria-label": title,
|
13094
13359
|
className: "Aquarium-Section"
|
@@ -13119,7 +13384,7 @@ var Section4 = (props) => {
|
|
13119
13384
|
}, /* @__PURE__ */ import_react109.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react109.default.createElement(Button.Icon, {
|
13120
13385
|
"aria-label": menuAriaLabel,
|
13121
13386
|
icon: import_more5.default
|
13122
|
-
})), 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, {
|
13123
13388
|
className: tw(`h-[1px]`),
|
13124
13389
|
style: { backgroundColor }
|
13125
13390
|
})), /* @__PURE__ */ import_react109.default.createElement(import_web4.animated.div, {
|
@@ -13345,7 +13610,7 @@ Stepper2.Step = Step2;
|
|
13345
13610
|
|
13346
13611
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
13347
13612
|
var import_react113 = __toESM(require("react"));
|
13348
|
-
var
|
13613
|
+
var import_utils26 = require("@react-aria/utils");
|
13349
13614
|
var SwitchGroup = (_a) => {
|
13350
13615
|
var _b = _a, {
|
13351
13616
|
value,
|
@@ -13367,7 +13632,7 @@ var SwitchGroup = (_a) => {
|
|
13367
13632
|
if (value !== void 0 && value !== selectedItems) {
|
13368
13633
|
setSelectedItems(value);
|
13369
13634
|
}
|
13370
|
-
const errorMessageId = (0,
|
13635
|
+
const errorMessageId = (0, import_utils26.useId)();
|
13371
13636
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13372
13637
|
const labelControlProps = getLabelControlProps(props);
|
13373
13638
|
const handleChange = (e) => {
|
@@ -13411,9 +13676,9 @@ SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
|
13411
13676
|
|
13412
13677
|
// src/molecules/Textarea/Textarea.tsx
|
13413
13678
|
var import_react114 = __toESM(require("react"));
|
13679
|
+
var import_utils28 = require("@react-aria/utils");
|
13414
13680
|
var import_omit14 = __toESM(require("lodash/omit"));
|
13415
13681
|
var import_toString2 = __toESM(require("lodash/toString"));
|
13416
|
-
var import_uniqueId10 = __toESM(require("lodash/uniqueId"));
|
13417
13682
|
var TextareaBase = import_react114.default.forwardRef(
|
13418
13683
|
(_a, ref) => {
|
13419
13684
|
var _b = _a, { readOnly = false, valid = true } = _b, props = __objRest(_b, ["readOnly", "valid"]);
|
@@ -13431,14 +13696,15 @@ TextareaBase.Skeleton = () => /* @__PURE__ */ import_react114.default.createElem
|
|
13431
13696
|
var Textarea = import_react114.default.forwardRef((props, ref) => {
|
13432
13697
|
var _a, _b, _c;
|
13433
13698
|
const [value, setValue] = (0, import_react114.useState)((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
13434
|
-
const
|
13435
|
-
const
|
13699
|
+
const defaultId = (0, import_utils28.useId)();
|
13700
|
+
const id = (_c = props.id) != null ? _c : defaultId;
|
13701
|
+
const errorMessageId = (0, import_utils28.useId)();
|
13436
13702
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13437
13703
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
13438
13704
|
const baseProps = (0, import_omit14.default)(props, Object.keys(labelControlProps));
|
13439
13705
|
return /* @__PURE__ */ import_react114.default.createElement(LabelControl, __spreadProps(__spreadValues({
|
13440
|
-
id: `${id
|
13441
|
-
htmlFor: id
|
13706
|
+
id: `${id}-label`,
|
13707
|
+
htmlFor: id,
|
13442
13708
|
messageId: errorMessageId,
|
13443
13709
|
length: value !== void 0 ? (0, import_toString2.default)(value).length : void 0
|
13444
13710
|
}, labelControlProps), {
|
@@ -13446,7 +13712,7 @@ var Textarea = import_react114.default.forwardRef((props, ref) => {
|
|
13446
13712
|
}), /* @__PURE__ */ import_react114.default.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
|
13447
13713
|
ref
|
13448
13714
|
}, baseProps), errorProps), {
|
13449
|
-
id
|
13715
|
+
id,
|
13450
13716
|
"data-testid": dataTestId,
|
13451
13717
|
onChange: (e) => {
|
13452
13718
|
var _a2;
|