@bwp-web/components 1.11.0 → 2.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +4 -8
  2. package/dist/BiampBanner/BiampBanner.d.ts +4 -4
  3. package/dist/BiampBanner/BiampBanner.d.ts.map +1 -1
  4. package/dist/BiampCheckboxListPopover/BiampCheckboxListPopover.d.ts +1 -1
  5. package/dist/BiampCheckboxListPopover/BiampCheckboxListPopover.d.ts.map +1 -1
  6. package/dist/BiampGlobalSearch/BiampGlobalSearch.d.ts +1 -1
  7. package/dist/BiampGlobalSearch/BiampGlobalSearch.d.ts.map +1 -1
  8. package/dist/BiampHeader/BiampHeader.d.ts +11 -38
  9. package/dist/BiampHeader/BiampHeader.d.ts.map +1 -1
  10. package/dist/BiampHeader/index.d.ts +1 -1
  11. package/dist/BiampHeader/index.d.ts.map +1 -1
  12. package/dist/BiampLayout/BiampLayout.d.ts +1 -1
  13. package/dist/BiampLayout/BiampLayout.d.ts.map +1 -1
  14. package/dist/BiampListPopover/BiampListPopover.d.ts +3 -3
  15. package/dist/BiampListPopover/BiampListPopover.d.ts.map +1 -1
  16. package/dist/BiampNotificationPopover/BiampNotificationPopover.d.ts +3 -3
  17. package/dist/BiampNotificationPopover/BiampNotificationPopover.d.ts.map +1 -1
  18. package/dist/BiampSegmentedButton/SegmentedButton.d.ts +1 -1
  19. package/dist/BiampSegmentedButton/SegmentedButton.d.ts.map +1 -1
  20. package/dist/BiampSegmentedButton/SegmentedButtonGroup.d.ts +1 -1
  21. package/dist/BiampSegmentedButton/SegmentedButtonGroup.d.ts.map +1 -1
  22. package/dist/BiampSidebar/BiampSidebar.d.ts +4 -4
  23. package/dist/BiampSidebar/BiampSidebar.d.ts.map +1 -1
  24. package/dist/BiampTable/BiampTable.d.ts +1 -1
  25. package/dist/BiampTable/BiampTable.d.ts.map +1 -1
  26. package/dist/BiampTable/BiampTableCellActionButton.d.ts +1 -1
  27. package/dist/BiampTable/BiampTableCellActionButton.d.ts.map +1 -1
  28. package/dist/BiampTable/BiampTableColumnVisibility.d.ts +1 -1
  29. package/dist/BiampTable/BiampTableColumnVisibility.d.ts.map +1 -1
  30. package/dist/BiampTable/BiampTableContainer.d.ts +1 -1
  31. package/dist/BiampTable/BiampTableContainer.d.ts.map +1 -1
  32. package/dist/BiampTable/BiampTableEmptyState.d.ts +1 -1
  33. package/dist/BiampTable/BiampTableEmptyState.d.ts.map +1 -1
  34. package/dist/BiampTable/BiampTableErrorState.d.ts +1 -1
  35. package/dist/BiampTable/BiampTableErrorState.d.ts.map +1 -1
  36. package/dist/BiampTable/BiampTableExpandGuidelines.d.ts +1 -1
  37. package/dist/BiampTable/BiampTableExpandGuidelines.d.ts.map +1 -1
  38. package/dist/BiampTable/BiampTablePagination.d.ts +1 -1
  39. package/dist/BiampTable/BiampTablePagination.d.ts.map +1 -1
  40. package/dist/BiampTable/BiampTableRow.d.ts +2 -1
  41. package/dist/BiampTable/BiampTableRow.d.ts.map +1 -1
  42. package/dist/BiampTable/BiampTableStatusMessage.d.ts +1 -1
  43. package/dist/BiampTable/BiampTableStatusMessage.d.ts.map +1 -1
  44. package/dist/BiampTable/BiampTableToolbar.d.ts +1 -1
  45. package/dist/BiampTable/BiampTableToolbar.d.ts.map +1 -1
  46. package/dist/BiampTable/BiampTableToolbarActionButton.d.ts +1 -1
  47. package/dist/BiampTable/BiampTableToolbarActionButton.d.ts.map +1 -1
  48. package/dist/BiampTable/BiampTableToolbarActions.d.ts +1 -1
  49. package/dist/BiampTable/BiampTableToolbarActions.d.ts.map +1 -1
  50. package/dist/BiampTable/BiampTableToolbarColumnVisibility.d.ts +2 -2
  51. package/dist/BiampTable/BiampTableToolbarColumnVisibility.d.ts.map +1 -1
  52. package/dist/BiampTable/BiampTableToolbarExport.d.ts +2 -2
  53. package/dist/BiampTable/BiampTableToolbarExport.d.ts.map +1 -1
  54. package/dist/BiampTable/BiampTableToolbarFilters.d.ts +1 -1
  55. package/dist/BiampTable/BiampTableToolbarFilters.d.ts.map +1 -1
  56. package/dist/BiampTable/BiampTableToolbarSearch.d.ts +1 -1
  57. package/dist/BiampTable/BiampTableToolbarSearch.d.ts.map +1 -1
  58. package/dist/BiampTable/BiampTableTruncatedCell.d.ts +1 -1
  59. package/dist/BiampTable/BiampTableTruncatedCell.d.ts.map +1 -1
  60. package/dist/BiampTable/useDebouncedCallback.d.ts.map +1 -1
  61. package/dist/BiampWrapper/BiampWrapper.d.ts +1 -1
  62. package/dist/BiampWrapper/BiampWrapper.d.ts.map +1 -1
  63. package/dist/DynamicSvgIcon/DynamicSvgIcon.d.ts +1 -1
  64. package/dist/DynamicSvgIcon/DynamicSvgIcon.d.ts.map +1 -1
  65. package/dist/LandingPage/LandingFormPanel.d.ts +4 -4
  66. package/dist/LandingPage/LandingFormPanel.d.ts.map +1 -1
  67. package/dist/LandingPage/OrganizationsPanel.d.ts +4 -4
  68. package/dist/LandingPage/OrganizationsPanel.d.ts.map +1 -1
  69. package/dist/OrganizationSelector/OrganizationSelector.d.ts +5 -5
  70. package/dist/OrganizationSelector/OrganizationSelector.d.ts.map +1 -1
  71. package/dist/UserInitialsIcon/UserInitialsIcon.d.ts +7 -1
  72. package/dist/UserInitialsIcon/UserInitialsIcon.d.ts.map +1 -1
  73. package/dist/hooks/useLoadingDelay.d.ts.map +1 -1
  74. package/dist/index.cjs +919 -769
  75. package/dist/index.cjs.map +1 -1
  76. package/dist/index.js +896 -742
  77. package/dist/index.js.map +1 -1
  78. package/dist/slotProps.d.ts +5 -5
  79. package/dist/slotProps.d.ts.map +1 -1
  80. package/package.json +13 -13
package/dist/index.cjs CHANGED
@@ -408,11 +408,7 @@ __export(index_exports, {
408
408
  BiampBannerActions: () => BiampBannerActions,
409
409
  BiampBannerContent: () => BiampBannerContent,
410
410
  BiampBannerIcon: () => BiampBannerIcon,
411
- BiampBuildAppContent: () => BiampBuildAppContent,
412
- BiampBuildAppContentItem: () => BiampBuildAppContentItem,
413
411
  BiampCheckboxListPopover: () => BiampCheckboxListPopover,
414
- BiampEndUserAppContent: () => BiampEndUserAppContent,
415
- BiampEndUserAppContentItem: () => BiampEndUserAppContentItem,
416
412
  BiampGlobalSearch: () => BiampGlobalSearch,
417
413
  BiampHeader: () => BiampHeader,
418
414
  BiampHeaderActions: () => BiampHeaderActions,
@@ -496,33 +492,31 @@ var import_material = require("@mui/material");
496
492
  var import_react = require("react");
497
493
  function useLoadingDelay(loading, { delay = 150, minDuration = 500 } = {}) {
498
494
  const [status, setStatus] = (0, import_react.useState)("idle");
499
- const timeoutRef = (0, import_react.useRef)(null);
500
- function clearPending() {
501
- if (timeoutRef.current !== null) {
502
- clearTimeout(timeoutRef.current);
503
- timeoutRef.current = null;
504
- }
495
+ if (loading && status === "idle") {
496
+ setStatus("delaying");
497
+ } else if (!loading && (status === "delaying" || status === "ending")) {
498
+ setStatus("idle");
505
499
  }
506
500
  (0, import_react.useEffect)(() => {
507
- if (loading && status === "idle") {
508
- clearPending();
509
- timeoutRef.current = setTimeout(() => {
510
- timeoutRef.current = setTimeout(() => {
511
- setStatus("ending");
512
- }, minDuration);
513
- setStatus("loading");
514
- }, delay);
515
- setStatus("delaying");
516
- }
517
- if (!loading && status !== "loading") {
518
- clearPending();
519
- setStatus("idle");
520
- }
521
- }, [loading, delay, minDuration, status]);
522
- (0, import_react.useEffect)(() => clearPending, []);
501
+ if (status !== "delaying" && status !== "loading") return;
502
+ const timeout = setTimeout(
503
+ () => setStatus(status === "delaying" ? "loading" : "ending"),
504
+ status === "delaying" ? delay : minDuration
505
+ );
506
+ return () => clearTimeout(timeout);
507
+ }, [status, delay, minDuration]);
523
508
  return status === "loading" || status === "ending";
524
509
  }
525
510
 
511
+ // src/slotProps.ts
512
+ function resolveSlot(slot, ctx) {
513
+ if (!slot) return void 0;
514
+ return typeof slot === "function" ? slot(ctx) : slot;
515
+ }
516
+ function mergeSx(...inputs) {
517
+ return inputs.filter((v) => Boolean(v)).flatMap((v) => Array.isArray(v) ? v : [v]);
518
+ }
519
+
526
520
  // src/BiampWrapper/BiampWrapper.tsx
527
521
  var import_jsx_runtime = require("react/jsx-runtime");
528
522
  function BiampWrapper({
@@ -537,19 +531,21 @@ function BiampWrapper({
537
531
  import_material.Stack,
538
532
  {
539
533
  direction: "column",
540
- padding: "16px",
541
- sx: {
542
- position: "relative",
543
- flex: 1,
544
- height: "100%",
545
- width: "100%",
546
- borderRadius: "8px",
547
- overflow: "auto",
548
- overscrollBehavior: "none",
549
- backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[800] : palette.common.white,
550
- ...sx
551
- },
552
534
  ...props,
535
+ sx: mergeSx(
536
+ {
537
+ padding: "16px",
538
+ position: "relative",
539
+ flex: 1,
540
+ height: "100%",
541
+ width: "100%",
542
+ borderRadius: "8px",
543
+ overflow: "auto",
544
+ overscrollBehavior: "none",
545
+ backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[800] : palette.common.white
546
+ },
547
+ sx
548
+ ),
553
549
  children: [
554
550
  showLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
555
551
  import_material.Box,
@@ -624,24 +620,28 @@ function BiampLayout({
624
620
  import_material2.Stack,
625
621
  {
626
622
  direction: "column",
627
- height: "100vh",
628
- sx: {
629
- backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[900] : palette.grey[100],
630
- ...sx
631
- },
632
623
  ...props,
624
+ sx: mergeSx(
625
+ {
626
+ height: "100vh",
627
+ backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[900] : palette.grey[100]
628
+ },
629
+ sx
630
+ ),
633
631
  children: [
634
632
  header,
635
633
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
636
634
  import_material2.Stack,
637
635
  {
638
636
  direction: "row",
639
- flex: 1,
640
- minHeight: 0,
641
- gap: { xs: 1.5, md: 2.5 },
642
- px: { xs: 1.5, md: 2.5 },
643
- pb: { xs: 1.5, md: 2.5 },
644
- pt: { xs: header ? 0 : 1.5, md: header ? 0 : 2.5 },
637
+ sx: {
638
+ flex: 1,
639
+ minHeight: 0,
640
+ gap: { xs: 1.5, md: 2.5 },
641
+ px: { xs: 1.5, md: 2.5 },
642
+ pb: { xs: 1.5, md: 2.5 },
643
+ pt: { xs: header ? 0 : 1.5, md: header ? 0 : 2.5 }
644
+ },
645
645
  children: [
646
646
  !isDrawer && !(responsive && mobileSidebarOnly) && sidebar,
647
647
  children
@@ -669,9 +669,13 @@ function BiampLayout({
669
669
  import_material2.Stack,
670
670
  {
671
671
  direction: "row",
672
- alignItems: "center",
673
- gap: 1,
674
- sx: { height: 40, mb: 1.5, flexShrink: 0 },
672
+ sx: {
673
+ alignItems: "center",
674
+ gap: 1,
675
+ height: 40,
676
+ mb: 1.5,
677
+ flexShrink: 0
678
+ },
675
679
  children: [
676
680
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
677
681
  import_material2.IconButton,
@@ -733,16 +737,18 @@ function BiampSidebar({
733
737
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BiampSidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
734
738
  import_material3.Stack,
735
739
  {
736
- sx: {
737
- width,
738
- minWidth: width,
739
- height: "100%",
740
- transition: ({ transitions }) => transitions.create(["width", "min-width"], {
741
- easing: transitions.easing.sharp,
742
- duration: expanded ? transitions.duration.enteringScreen : transitions.duration.leavingScreen
743
- }),
744
- ...sx
745
- },
740
+ sx: mergeSx(
741
+ {
742
+ width,
743
+ minWidth: width,
744
+ height: "100%",
745
+ transition: ({ transitions }) => transitions.create(["width", "min-width"], {
746
+ easing: transitions.easing.sharp,
747
+ duration: expanded ? transitions.duration.enteringScreen : transitions.duration.leavingScreen
748
+ })
749
+ },
750
+ sx
751
+ ),
746
752
  ...props,
747
753
  children: [
748
754
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material3.Stack, { sx: { flex: 1, minHeight: 0 }, children }),
@@ -768,9 +774,12 @@ function BiampSidebar({
768
774
  import_material3.Stack,
769
775
  {
770
776
  direction: "row",
771
- alignItems: "center",
772
- justifyContent: "space-between",
773
- sx: { mt: 2, overflow: "hidden" },
777
+ sx: {
778
+ alignItems: "center",
779
+ justifyContent: "space-between",
780
+ mt: 2,
781
+ overflow: "hidden"
782
+ },
774
783
  children: [
775
784
  bottomLogoIcon ?? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
776
785
  import_assets2.BiampLogoIcon,
@@ -782,10 +791,10 @@ function BiampSidebar({
782
791
  import_material3.Typography,
783
792
  {
784
793
  variant: "caption",
785
- fontWeight: 500,
786
- color: "text.secondary",
787
794
  noWrap: true,
788
795
  sx: {
796
+ fontWeight: 500,
797
+ color: "text.secondary",
789
798
  opacity: expanded ? 1 : 0,
790
799
  transition: ({ transitions }) => transitions.create("opacity", {
791
800
  duration: expanded ? transitions.duration.enteringScreen : transitions.duration.leavingScreen
@@ -809,14 +818,16 @@ function BiampSidebarIconList({
809
818
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
810
819
  import_material3.Stack,
811
820
  {
812
- sx: {
813
- flex: 1,
814
- minHeight: 0,
815
- gap: "4px",
816
- overflowY: "auto",
817
- overscrollBehavior: "none",
818
- ...sx
819
- },
821
+ sx: mergeSx(
822
+ {
823
+ flex: 1,
824
+ minHeight: 0,
825
+ gap: "4px",
826
+ overflowY: "auto",
827
+ overscrollBehavior: "none"
828
+ },
829
+ sx
830
+ ),
820
831
  ...props,
821
832
  children
822
833
  }
@@ -847,21 +858,23 @@ function BiampSidebarIcon({
847
858
  layoutDrawer.setOpen(false);
848
859
  }
849
860
  },
850
- sx: {
851
- minWidth: "48px",
852
- minHeight: "48px",
853
- maxHeight: "48px",
854
- borderRadius: "8px",
855
- justifyContent: "flex-start",
856
- alignItems: "center",
857
- padding: 0,
858
- overflow: "hidden",
859
- color: "text.secondary",
860
- "&.Mui-selected": {
861
- color: "primary.main"
861
+ sx: mergeSx(
862
+ {
863
+ minWidth: "48px",
864
+ minHeight: "48px",
865
+ maxHeight: "48px",
866
+ borderRadius: "8px",
867
+ justifyContent: "flex-start",
868
+ alignItems: "center",
869
+ padding: 0,
870
+ overflow: "hidden",
871
+ color: "text.secondary",
872
+ "&.Mui-selected": {
873
+ color: "primary.main"
874
+ }
862
875
  },
863
- ...sx
864
- },
876
+ sx
877
+ ),
865
878
  ...props,
866
879
  children: [
867
880
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -891,10 +904,10 @@ function BiampSidebarIcon({
891
904
  import_material3.Typography,
892
905
  {
893
906
  variant: "body1",
894
- fontWeight: 600,
895
- color: "inherit",
896
907
  noWrap: true,
897
908
  sx: {
909
+ fontWeight: 600,
910
+ color: "inherit",
898
911
  pr: 2,
899
912
  opacity: expanded ? 1 : 0,
900
913
  transition: ({ transitions }) => transitions.create("opacity", {
@@ -916,18 +929,20 @@ function BiampSidebarComponent({
916
929
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
917
930
  import_material3.Box,
918
931
  {
919
- sx: {
920
- minWidth: "48px",
921
- maxWidth: "48px",
922
- minHeight: "48px",
923
- maxHeight: "48px",
924
- borderRadius: "8px",
925
- overflow: "hidden",
926
- justifyContent: "center",
927
- alignItems: "center",
928
- border: ({ palette }) => `0.6px solid ${palette.divider}`,
929
- ...sx
930
- },
932
+ sx: mergeSx(
933
+ {
934
+ minWidth: "48px",
935
+ maxWidth: "48px",
936
+ minHeight: "48px",
937
+ maxHeight: "48px",
938
+ borderRadius: "8px",
939
+ overflow: "hidden",
940
+ justifyContent: "center",
941
+ alignItems: "center",
942
+ border: ({ palette }) => `0.6px solid ${palette.divider}`
943
+ },
944
+ sx
945
+ ),
931
946
  ...props,
932
947
  children
933
948
  }
@@ -936,12 +951,12 @@ function BiampSidebarComponent({
936
951
 
937
952
  // src/BiampHeader/BiampHeader.tsx
938
953
  var import_material5 = require("@mui/material");
939
- var import_react5 = require("react");
940
954
  var import_assets4 = require("@bwp-web/assets");
941
955
 
942
956
  // src/BiampGlobalSearch/BiampGlobalSearch.tsx
943
957
  var import_react4 = require("react");
944
958
  var import_material4 = require("@mui/material");
959
+ var import_utils = require("@mui/material/utils");
945
960
  var import_assets3 = require("@bwp-web/assets");
946
961
  var import_jsx_runtime4 = require("react/jsx-runtime");
947
962
  var SearchContext = (0, import_react4.createContext)({
@@ -987,8 +1002,11 @@ var BiampGlobalSearchPaper = (0, import_react4.forwardRef)(
987
1002
  import_material4.Typography,
988
1003
  {
989
1004
  variant: "body2",
990
- color: "text.secondary",
991
- sx: { px: 2, py: 1.5 },
1005
+ sx: {
1006
+ color: "text.secondary",
1007
+ px: 2,
1008
+ py: 1.5
1009
+ },
992
1010
  children: noResultsText
993
1011
  }
994
1012
  ),
@@ -1012,8 +1030,10 @@ var BiampGlobalSearchPaper = (0, import_react4.forwardRef)(
1012
1030
  import_material4.Typography,
1013
1031
  {
1014
1032
  variant: "caption",
1015
- fontWeight: (theme) => theme.typography.fontWeightMedium,
1016
- color: "text.secondary",
1033
+ sx: {
1034
+ fontWeight: (theme) => theme.typography.fontWeightMedium,
1035
+ color: "text.secondary"
1036
+ },
1017
1037
  children: "Select"
1018
1038
  }
1019
1039
  )
@@ -1024,8 +1044,10 @@ var BiampGlobalSearchPaper = (0, import_react4.forwardRef)(
1024
1044
  import_material4.Typography,
1025
1045
  {
1026
1046
  variant: "caption",
1027
- fontWeight: (theme) => theme.typography.fontWeightMedium,
1028
- color: "text.secondary",
1047
+ sx: {
1048
+ fontWeight: (theme) => theme.typography.fontWeightMedium,
1049
+ color: "text.secondary"
1050
+ },
1029
1051
  children: "Open"
1030
1052
  }
1031
1053
  )
@@ -1111,9 +1133,13 @@ function BiampGlobalSearchListItem({
1111
1133
  {
1112
1134
  className: "hoverContent",
1113
1135
  variant: "body2",
1114
- color: "text.secondary",
1115
1136
  noWrap: true,
1116
- sx: { flexShrink: 1, minWidth: 0, display: "none" },
1137
+ sx: {
1138
+ color: "text.secondary",
1139
+ flexShrink: 1,
1140
+ minWidth: 0,
1141
+ display: "none"
1142
+ },
1117
1143
  children: option.subtitle
1118
1144
  }
1119
1145
  ),
@@ -1206,6 +1232,7 @@ function BiampGlobalSearch({
1206
1232
  onChange,
1207
1233
  onInputChange,
1208
1234
  sx,
1235
+ slotProps,
1209
1236
  ...props
1210
1237
  }) {
1211
1238
  const hasOptions = options.length > 0;
@@ -1246,25 +1273,36 @@ function BiampGlobalSearch({
1246
1273
  inputValue,
1247
1274
  loading,
1248
1275
  fullWidth,
1249
- sx: {
1250
- px: 1.5,
1251
- "& .MuiOutlinedInput-root": {
1252
- height: "40px !important",
1253
- minHeight: "40px"
1254
- },
1255
- "& .MuiOutlinedInput-input": {
1256
- height: "40px !important"
1257
- },
1258
- "& .MuiOutlinedInput-notchedOutline": {
1259
- height: "40px !important",
1260
- border: "none",
1261
- boxShadow: "none"
1276
+ sx: mergeSx(
1277
+ {
1278
+ px: 1.5,
1279
+ "& .MuiOutlinedInput-root": {
1280
+ height: "40px !important",
1281
+ minHeight: "40px"
1282
+ },
1283
+ "& .MuiOutlinedInput-input": {
1284
+ height: "40px !important"
1285
+ },
1286
+ "& .MuiOutlinedInput-notchedOutline": {
1287
+ height: "40px !important",
1288
+ border: "none",
1289
+ boxShadow: "none"
1290
+ }
1262
1291
  },
1263
- ...sx
1264
- },
1292
+ sx
1293
+ ),
1265
1294
  onChange: handleChange,
1266
1295
  onInputChange: handleInputChange,
1267
- loadingText: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_material4.Typography, { variant: "body2", color: "text.secondary", children: "Loading\u2026" }),
1296
+ loadingText: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1297
+ import_material4.Typography,
1298
+ {
1299
+ variant: "body2",
1300
+ sx: {
1301
+ color: "text.secondary"
1302
+ },
1303
+ children: "Loading\u2026"
1304
+ }
1305
+ ),
1268
1306
  freeSolo: true,
1269
1307
  filterOptions: (x) => x,
1270
1308
  getOptionLabel: (option) => typeof option === "string" ? option : option.title,
@@ -1272,7 +1310,14 @@ function BiampGlobalSearch({
1272
1310
  noOptionsText: noResultsText,
1273
1311
  slots: { paper: BiampGlobalSearchPaper },
1274
1312
  slotProps: {
1275
- listbox: {
1313
+ ...slotProps,
1314
+ // In freeSolo mode MUI 9 skips the Popper when there are no options
1315
+ // (unless `keepMounted`), so the Paper's `noResultsText` would never
1316
+ // show. A closed, kept-mounted Popper is `display: none`.
1317
+ popper: (0, import_utils.mergeSlotProps)(slotProps?.popper, {
1318
+ keepMounted: !hasOptions
1319
+ }),
1320
+ listbox: (0, import_utils.mergeSlotProps)(slotProps?.listbox, {
1276
1321
  sx: {
1277
1322
  "& .MuiAutocomplete-option": {
1278
1323
  paddingRight: "0px !important"
@@ -1287,7 +1332,7 @@ function BiampGlobalSearch({
1287
1332
  visibility: "visible"
1288
1333
  }
1289
1334
  }
1290
- }
1335
+ })
1291
1336
  },
1292
1337
  renderInput: (params) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1293
1338
  import_material4.TextField,
@@ -1300,11 +1345,12 @@ function BiampGlobalSearch({
1300
1345
  "& .MuiInputBase-input": { paddingLeft: "8px !important" }
1301
1346
  },
1302
1347
  slotProps: {
1348
+ ...params.slotProps,
1303
1349
  input: {
1304
- ...params.InputProps,
1350
+ ...params.slotProps.input,
1305
1351
  startAdornment: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1306
1352
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_material4.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_assets3.SearchIcon, {}) }),
1307
- params.InputProps.startAdornment
1353
+ params.slotProps.input.startAdornment
1308
1354
  ] })
1309
1355
  }
1310
1356
  }
@@ -1332,10 +1378,16 @@ function BiampHeader({ children, sx, ...props }) {
1332
1378
  import_material5.Stack,
1333
1379
  {
1334
1380
  direction: "row",
1335
- alignItems: "center",
1336
- gap: { xs: 0.5, md: 3 },
1337
- sx: { px: 2.5, py: 1.5, ...sx },
1338
1381
  ...props,
1382
+ sx: mergeSx(
1383
+ {
1384
+ alignItems: "center",
1385
+ gap: { xs: 0.5, md: 3 },
1386
+ px: 2.5,
1387
+ py: 1.5
1388
+ },
1389
+ sx
1390
+ ),
1339
1391
  children
1340
1392
  }
1341
1393
  );
@@ -1350,12 +1402,7 @@ function BiampHeaderTitle({
1350
1402
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1351
1403
  import_material5.Box,
1352
1404
  {
1353
- sx: {
1354
- display: "flex",
1355
- alignItems: "center",
1356
- gap: "12px",
1357
- ...sx
1358
- },
1405
+ sx: mergeSx({ display: "flex", alignItems: "center", gap: "12px" }, sx),
1359
1406
  ...props,
1360
1407
  children: [
1361
1408
  icon ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
@@ -1379,10 +1426,28 @@ function BiampHeaderTitle({
1379
1426
  sx: { width: 24, height: 24 }
1380
1427
  }
1381
1428
  ),
1382
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_material5.Stack, { direction: "row", gap: 0.5, children: [
1383
- title && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "h4", children: title }),
1384
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "h4", color: "text.secondary", children: subtitle })
1385
- ] })
1429
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1430
+ import_material5.Stack,
1431
+ {
1432
+ direction: "row",
1433
+ sx: {
1434
+ gap: 0.5
1435
+ },
1436
+ children: [
1437
+ title && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "h4", children: title }),
1438
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1439
+ import_material5.Typography,
1440
+ {
1441
+ variant: "h4",
1442
+ sx: {
1443
+ color: "text.secondary"
1444
+ },
1445
+ children: subtitle
1446
+ }
1447
+ )
1448
+ ]
1449
+ }
1450
+ )
1386
1451
  ]
1387
1452
  }
1388
1453
  );
@@ -1401,13 +1466,15 @@ function BiampHeaderActions({
1401
1466
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1402
1467
  import_material5.Box,
1403
1468
  {
1404
- sx: {
1405
- ml: "auto",
1406
- gap: { xs: 1, md: 2 },
1407
- display: "flex",
1408
- alignItems: "center",
1409
- ...sx
1410
- },
1469
+ sx: mergeSx(
1470
+ {
1471
+ ml: "auto",
1472
+ gap: { xs: 1, md: 2 },
1473
+ display: "flex",
1474
+ alignItems: "center"
1475
+ },
1476
+ sx
1477
+ ),
1411
1478
  ...props,
1412
1479
  children
1413
1480
  }
@@ -1421,12 +1488,10 @@ function BiampHeaderButtonList({
1421
1488
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1422
1489
  import_material5.Box,
1423
1490
  {
1424
- sx: {
1425
- display: "flex",
1426
- alignItems: "center",
1427
- gap: { xs: 0, md: 0.5 },
1428
- ...sx
1429
- },
1491
+ sx: mergeSx(
1492
+ { display: "flex", alignItems: "center", gap: { xs: 0, md: 0.5 } },
1493
+ sx
1494
+ ),
1430
1495
  ...props,
1431
1496
  children
1432
1497
  }
@@ -1475,16 +1540,18 @@ function BiampHeaderButton({
1475
1540
  selected,
1476
1541
  disableGutters: true,
1477
1542
  disableRipple: true,
1478
- sx: {
1479
- minWidth: "40px",
1480
- maxWidth: "40px",
1481
- minHeight: "40px",
1482
- maxHeight: "40px",
1483
- borderRadius: "4px",
1484
- justifyContent: "center",
1485
- alignItems: "center",
1486
- ...sx
1487
- },
1543
+ sx: mergeSx(
1544
+ {
1545
+ minWidth: "40px",
1546
+ maxWidth: "40px",
1547
+ minHeight: "40px",
1548
+ maxHeight: "40px",
1549
+ borderRadius: "4px",
1550
+ justifyContent: "center",
1551
+ alignItems: "center"
1552
+ },
1553
+ sx
1554
+ ),
1488
1555
  ...props,
1489
1556
  children: selected ? displayedSelectedIcon : icon
1490
1557
  }
@@ -1503,7 +1570,7 @@ function BiampAppPopover({
1503
1570
  open,
1504
1571
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
1505
1572
  transformOrigin: { vertical: -4, horizontal: APP_POPOVER_MAX_WIDTH },
1506
- sx: { ...sx },
1573
+ sx,
1507
1574
  slotProps: {
1508
1575
  paper: {
1509
1576
  sx: {
@@ -1527,120 +1594,6 @@ function BiampAppPopover({
1527
1594
  }
1528
1595
  );
1529
1596
  }
1530
- function BiampBuildAppContent({
1531
- children,
1532
- sx,
1533
- ...props
1534
- }) {
1535
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1536
- import_material5.Box,
1537
- {
1538
- sx: {
1539
- display: "grid",
1540
- gridTemplateColumns: "1fr 1fr",
1541
- gap: 1.5,
1542
- ...sx
1543
- },
1544
- ...props,
1545
- children
1546
- }
1547
- );
1548
- }
1549
- function BiampBuildAppContentItem({
1550
- image,
1551
- name,
1552
- description,
1553
- button,
1554
- sx,
1555
- ...props
1556
- }) {
1557
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1558
- import_material5.Stack,
1559
- {
1560
- direction: "column",
1561
- position: "relative",
1562
- sx: {
1563
- p: 1.5,
1564
- borderRadius: 1.5,
1565
- outlineWidth: "1px",
1566
- outlineStyle: "solid",
1567
- outlineColor: ({ palette }) => palette.dividers,
1568
- ...sx
1569
- },
1570
- ...props,
1571
- children: [
1572
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Box, { sx: { width: 54, height: 54 }, mb: 0.5, children: image }),
1573
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "caption", fontWeight: 600, mb: 0.5, children: name }),
1574
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "caption", color: "text.secondary", children: description }),
1575
- button && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Box, { position: "absolute", top: "12px", right: "12px", children: button })
1576
- ]
1577
- }
1578
- );
1579
- }
1580
- function BiampEndUserAppContent({
1581
- children,
1582
- sx,
1583
- ...props
1584
- }) {
1585
- const isGrid = import_react5.Children.count(children) > 1;
1586
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1587
- import_material5.Stack,
1588
- {
1589
- direction: "column",
1590
- sx: {
1591
- gap: 1.5,
1592
- ...isGrid && {
1593
- display: "grid",
1594
- gridTemplateColumns: "1fr 1fr"
1595
- },
1596
- ...sx
1597
- },
1598
- ...props,
1599
- children
1600
- }
1601
- );
1602
- }
1603
- function BiampEndUserAppContentItem({
1604
- image,
1605
- name,
1606
- description,
1607
- href,
1608
- target,
1609
- sx,
1610
- ...props
1611
- }) {
1612
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1613
- import_material5.Stack,
1614
- {
1615
- component: href ? "a" : "div",
1616
- href,
1617
- target,
1618
- direction: "row",
1619
- alignItems: "center",
1620
- sx: {
1621
- gap: 1.5,
1622
- p: 1.5,
1623
- borderRadius: 1.5,
1624
- outlineWidth: "1px",
1625
- outlineStyle: "solid",
1626
- outlineColor: ({ palette }) => palette.divider,
1627
- textDecoration: "none",
1628
- color: "inherit",
1629
- cursor: href ? "pointer" : void 0,
1630
- ...sx
1631
- },
1632
- ...props,
1633
- children: [
1634
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Box, { sx: { width: 32, height: 32 }, children: image }),
1635
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_material5.Stack, { direction: "column", children: [
1636
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "caption", fontWeight: 600, children: name }),
1637
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "caption", color: "text.secondary", children: description })
1638
- ] }),
1639
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_assets4.ExternalLinkIcon, { sx: { width: 16, height: 16, ml: "auto" } })
1640
- ]
1641
- }
1642
- );
1643
- }
1644
1597
  function BiampAppListContent({
1645
1598
  children,
1646
1599
  sx,
@@ -1656,12 +1609,14 @@ function BiampAppListContent({
1656
1609
  sx: { borderColor: ({ palette }) => palette.dividers.secondary }
1657
1610
  }
1658
1611
  ),
1659
- sx: {
1660
- borderRadius: 2,
1661
- border: ({ palette }) => `1px solid ${palette.dividers.secondary}`,
1662
- overflow: "hidden",
1663
- ...sx
1664
- },
1612
+ sx: mergeSx(
1613
+ {
1614
+ borderRadius: 2,
1615
+ border: ({ palette }) => `1px solid ${palette.dividers.secondary}`,
1616
+ overflow: "hidden"
1617
+ },
1618
+ sx
1619
+ ),
1665
1620
  ...props,
1666
1621
  children
1667
1622
  }
@@ -1680,12 +1635,29 @@ function BiampAppListItem({
1680
1635
  import_material5.Stack,
1681
1636
  {
1682
1637
  direction: "row",
1683
- alignItems: "center",
1684
- sx: { gap: 1.5, py: 1.5, px: 2, ...sx },
1685
1638
  ...props,
1639
+ sx: mergeSx(
1640
+ {
1641
+ alignItems: "center",
1642
+ gap: 1.5,
1643
+ py: 1.5,
1644
+ px: 2
1645
+ },
1646
+ sx
1647
+ ),
1686
1648
  children: [
1687
1649
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Box, { sx: { width: 40, height: 40, flexShrink: 0 }, children: image }),
1688
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "body2", fontWeight: 600, sx: { flex: 1 }, children: name }),
1650
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1651
+ import_material5.Typography,
1652
+ {
1653
+ variant: "body2",
1654
+ sx: {
1655
+ fontWeight: 600,
1656
+ flex: 1
1657
+ },
1658
+ children: name
1659
+ }
1660
+ ),
1689
1661
  hasActions && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1690
1662
  import_material5.Stack,
1691
1663
  {
@@ -1765,16 +1737,18 @@ function BiampHeaderProfile({
1765
1737
  selected,
1766
1738
  disableGutters: true,
1767
1739
  disableRipple: true,
1768
- sx: {
1769
- minWidth: "36px",
1770
- maxWidth: "36px",
1771
- minHeight: "36px",
1772
- maxHeight: "36px",
1773
- borderRadius: "6px",
1774
- justifyContent: "center",
1775
- alignItems: "center",
1776
- ...sx
1777
- },
1740
+ sx: mergeSx(
1741
+ {
1742
+ minWidth: "36px",
1743
+ maxWidth: "36px",
1744
+ minHeight: "36px",
1745
+ maxHeight: "36px",
1746
+ borderRadius: "6px",
1747
+ justifyContent: "center",
1748
+ alignItems: "center"
1749
+ },
1750
+ sx
1751
+ ),
1778
1752
  ...props,
1779
1753
  children: image ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1780
1754
  import_material5.Box,
@@ -1813,7 +1787,7 @@ function BiampNotificationPopover({
1813
1787
  vertical: -4,
1814
1788
  horizontal: NOTIFICATION_POPOVER_MAX_WIDTH
1815
1789
  },
1816
- sx: { ...sx },
1790
+ sx,
1817
1791
  slotProps: {
1818
1792
  paper: {
1819
1793
  sx: {
@@ -1845,16 +1819,18 @@ function BiampNotificationPopoverHeader({
1845
1819
  import_material6.Stack,
1846
1820
  {
1847
1821
  direction: "row",
1848
- alignItems: "center",
1849
- justifyContent: "space-between",
1850
- sx: {
1851
- flexShrink: 0,
1852
- gap: 2,
1853
- px: 2,
1854
- pt: 2,
1855
- ...sx
1856
- },
1857
- ...props
1822
+ ...props,
1823
+ sx: mergeSx(
1824
+ {
1825
+ alignItems: "center",
1826
+ justifyContent: "space-between",
1827
+ flexShrink: 0,
1828
+ gap: 2,
1829
+ px: 2,
1830
+ pt: 2
1831
+ },
1832
+ sx
1833
+ )
1858
1834
  }
1859
1835
  );
1860
1836
  }
@@ -1865,15 +1841,17 @@ function BiampNotificationPopoverBody({
1865
1841
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1866
1842
  import_material6.Box,
1867
1843
  {
1868
- sx: {
1869
- flex: 1,
1870
- minHeight: 0,
1871
- overflowY: "auto",
1872
- overscrollBehavior: "none",
1873
- px: 2,
1874
- pb: 2,
1875
- ...sx
1876
- },
1844
+ sx: mergeSx(
1845
+ {
1846
+ flex: 1,
1847
+ minHeight: 0,
1848
+ overflowY: "auto",
1849
+ overscrollBehavior: "none",
1850
+ px: 2,
1851
+ pb: 2
1852
+ },
1853
+ sx
1854
+ ),
1877
1855
  ...props
1878
1856
  }
1879
1857
  );
@@ -1922,14 +1900,7 @@ function BiampListPopoverItem({
1922
1900
  sx,
1923
1901
  ...props
1924
1902
  }) {
1925
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1926
- import_material7.ListItem,
1927
- {
1928
- dense: true,
1929
- sx: [listItemSx, ...Array.isArray(sx) ? sx : [sx]],
1930
- ...props
1931
- }
1932
- );
1903
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material7.ListItem, { dense: true, sx: mergeSx(listItemSx, sx), ...props });
1933
1904
  }
1934
1905
  function BiampListPopoverScrollArea({
1935
1906
  maxHeight = 340,
@@ -1939,7 +1910,10 @@ function BiampListPopoverScrollArea({
1939
1910
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1940
1911
  import_material7.Box,
1941
1912
  {
1942
- sx: { maxHeight, overflow: "auto", overscrollBehavior: "none", ...sx },
1913
+ sx: mergeSx(
1914
+ { maxHeight, overflow: "auto", overscrollBehavior: "none" },
1915
+ sx
1916
+ ),
1943
1917
  ...props
1944
1918
  }
1945
1919
  );
@@ -1972,7 +1946,16 @@ function BiampCheckboxListPopover({
1972
1946
  slotProps: { input: { "aria-label": selectAllLabel } }
1973
1947
  }
1974
1948
  ),
1975
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material8.Typography, { variant: "caption", fontWeight: 600, children: selectAllLabel })
1949
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1950
+ import_material8.Typography,
1951
+ {
1952
+ variant: "caption",
1953
+ sx: {
1954
+ fontWeight: 600
1955
+ },
1956
+ children: selectAllLabel
1957
+ }
1958
+ )
1976
1959
  ] }),
1977
1960
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material8.Divider, {})
1978
1961
  ] }),
@@ -2005,14 +1988,14 @@ function BiampCheckboxListPopover({
2005
1988
  var import_material13 = require("@mui/material");
2006
1989
  var import_assets8 = require("@bwp-web/assets");
2007
1990
  var import_react_table2 = require("@tanstack/react-table");
2008
- var import_react9 = require("react");
1991
+ var import_react8 = require("react");
2009
1992
 
2010
1993
  // src/BiampTable/BiampTableEmptyState.tsx
2011
1994
  var import_assets5 = require("@bwp-web/assets");
2012
1995
 
2013
1996
  // src/BiampTable/BiampTableStatusMessage.tsx
2014
1997
  var import_material9 = require("@mui/material");
2015
- var import_react6 = require("react");
1998
+ var import_react5 = require("react");
2016
1999
  var import_jsx_runtime9 = require("react/jsx-runtime");
2017
2000
  function BiampTableStatusMessage({
2018
2001
  icon,
@@ -2021,15 +2004,28 @@ function BiampTableStatusMessage({
2021
2004
  children,
2022
2005
  ...stackProps
2023
2006
  }) {
2024
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_material9.Stack, { alignItems: "center", gap: 1.5, ...stackProps, children: [
2025
- (0, import_react6.cloneElement)(icon, {
2026
- "aria-hidden": true,
2027
- sx: { width: 56, height: 56, ...icon.props.sx }
2028
- }),
2029
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material9.Typography, { variant: "h2", children: title }),
2030
- description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material9.Typography, { variant: "body1", children: description }),
2031
- children
2032
- ] });
2007
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2008
+ import_material9.Stack,
2009
+ {
2010
+ ...stackProps,
2011
+ sx: mergeSx(
2012
+ {
2013
+ alignItems: "center",
2014
+ gap: 1.5
2015
+ },
2016
+ stackProps.sx
2017
+ ),
2018
+ children: [
2019
+ (0, import_react5.cloneElement)(icon, {
2020
+ "aria-hidden": true,
2021
+ sx: mergeSx({ width: 56, height: 56 }, icon.props.sx)
2022
+ }),
2023
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material9.Typography, { variant: "h2", children: title }),
2024
+ description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material9.Typography, { variant: "body1", children: description }),
2025
+ children
2026
+ ]
2027
+ }
2028
+ );
2033
2029
  }
2034
2030
 
2035
2031
  // src/BiampTable/BiampTableEmptyState.tsx
@@ -2065,24 +2061,24 @@ function BiampTableErrorState({
2065
2061
  var import_material12 = require("@mui/material");
2066
2062
  var import_assets7 = require("@bwp-web/assets");
2067
2063
  var import_react_table = require("@tanstack/react-table");
2068
- var import_react8 = __toESM(require("react"), 1);
2064
+ var import_react7 = __toESM(require("react"), 1);
2069
2065
 
2070
2066
  // src/BiampTable/BiampTableTruncatedCell.tsx
2071
2067
  var import_material10 = require("@mui/material");
2072
- var import_react7 = require("react");
2068
+ var import_react6 = require("react");
2073
2069
  var import_jsx_runtime12 = require("react/jsx-runtime");
2074
2070
  function BiampTableTruncatedCell({
2075
2071
  children
2076
2072
  }) {
2077
- const textRef = (0, import_react7.useRef)(null);
2078
- const [open, setOpen] = (0, import_react7.useState)(false);
2079
- const handleMouseEnter = (0, import_react7.useCallback)(() => {
2073
+ const textRef = (0, import_react6.useRef)(null);
2074
+ const [open, setOpen] = (0, import_react6.useState)(false);
2075
+ const handleMouseEnter = (0, import_react6.useCallback)(() => {
2080
2076
  const el = textRef.current;
2081
2077
  if (el && el.scrollWidth > el.clientWidth) {
2082
2078
  setOpen(true);
2083
2079
  }
2084
2080
  }, []);
2085
- const handleMouseLeave = (0, import_react7.useCallback)(() => {
2081
+ const handleMouseLeave = (0, import_react6.useCallback)(() => {
2086
2082
  setOpen(false);
2087
2083
  }, []);
2088
2084
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
@@ -2113,21 +2109,6 @@ function BiampTableTruncatedCell({
2113
2109
  );
2114
2110
  }
2115
2111
 
2116
- // src/slotProps.ts
2117
- function resolveSlot(slot, ctx) {
2118
- if (!slot) return void 0;
2119
- return typeof slot === "function" ? slot(ctx) : slot;
2120
- }
2121
- function mergeSx(...inputs) {
2122
- return inputs.filter((v) => Boolean(v)).flatMap((v) => Array.isArray(v) ? v : [v]);
2123
- }
2124
- function mergeSlotProps(ownProps, userProps) {
2125
- return typeof userProps === "function" ? (ownerState) => ({
2126
- ...ownProps,
2127
- ...userProps(ownerState)
2128
- }) : { ...ownProps, ...userProps };
2129
- }
2130
-
2131
2112
  // src/BiampTable/cellSx.ts
2132
2113
  var stickyHoverBg = {
2133
2114
  ".MuiTableRow-hover:hover > &, .Mui-selected > &": {
@@ -2483,7 +2464,7 @@ function BiampTableRowInner({
2483
2464
  function biampTableRowPropsAreEqual(prev, next) {
2484
2465
  return prev.row.id === next.row.id && prev.row.original === next.row.original && prev.isSelected === next.isSelected && prev.isExpanded === next.isExpanded && prev.visibleColumnsKey === next.visibleColumnsKey && prev.enableRowSelection === next.enableRowSelection && prev.enableExpanding === next.enableExpanding && prev.alwaysExpanded === next.alwaysExpanded && prev.hasExpandableRows === next.hasExpandableRows && prev.selectChildrenWithParent === next.selectChildrenWithParent && prev.showExpandGuidelines === next.showExpandGuidelines && prev.onRowClick === next.onRowClick && prev.isRowClickable === next.isRowClickable && prev.getRowLabel === next.getRowLabel && prev.customColor === next.customColor && prev.rowSlotProps === next.rowSlotProps && prev.cellSlotProps === next.cellSlotProps;
2485
2466
  }
2486
- var BiampTableRow = import_react8.default.memo(
2467
+ var BiampTableRow = import_react7.default.memo(
2487
2468
  BiampTableRowInner,
2488
2469
  biampTableRowPropsAreEqual
2489
2470
  );
@@ -2539,8 +2520,8 @@ function BiampTable({
2539
2520
  enableRowSelection ? 48 : 0
2540
2521
  );
2541
2522
  const visibleColumnsKey = table.getVisibleLeafColumns().map((col) => col.id).join(",");
2542
- const containerRef = (0, import_react9.useRef)(null);
2543
- (0, import_react9.useEffect)(() => {
2523
+ const containerRef = (0, import_react8.useRef)(null);
2524
+ (0, import_react8.useEffect)(() => {
2544
2525
  if (enableExpanding && alwaysExpanded) {
2545
2526
  table.toggleAllRowsExpanded(true);
2546
2527
  }
@@ -2556,13 +2537,15 @@ function BiampTable({
2556
2537
  component: import_material13.Box,
2557
2538
  ...boxProps,
2558
2539
  ref: containerRef,
2559
- sx: {
2560
- display: "flex",
2561
- flexDirection: "column",
2562
- height: "100%",
2563
- position: "relative",
2564
- ...sx
2565
- },
2540
+ sx: mergeSx(
2541
+ {
2542
+ display: "flex",
2543
+ flexDirection: "column",
2544
+ height: "100%",
2545
+ position: "relative"
2546
+ },
2547
+ sx
2548
+ ),
2566
2549
  children: [
2567
2550
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2568
2551
  import_material13.Table,
@@ -2694,14 +2677,18 @@ function BiampTableContainer({
2694
2677
  import_material14.Stack,
2695
2678
  {
2696
2679
  direction: "column",
2697
- width: "100%",
2698
- height: "100%",
2699
- overflow: "hidden",
2700
- pt: { xs: 0, md: 1.5 },
2701
- borderTop: withBorderTop ? ({ palette }) => `0.6px solid ${palette.divider}` : void 0,
2702
- borderBottom: withBorderBottom ? ({ palette }) => `0.6px solid ${palette.divider}` : void 0,
2703
- sx: { ...sx },
2704
2680
  ...props,
2681
+ sx: mergeSx(
2682
+ {
2683
+ width: "100%",
2684
+ height: "100%",
2685
+ overflow: "hidden",
2686
+ pt: { xs: 0, md: 1.5 },
2687
+ borderTop: withBorderTop ? ({ palette }) => `0.6px solid ${palette.divider}` : void 0,
2688
+ borderBottom: withBorderBottom ? ({ palette }) => `0.6px solid ${palette.divider}` : void 0
2689
+ },
2690
+ sx
2691
+ ),
2705
2692
  children
2706
2693
  }
2707
2694
  );
@@ -2795,7 +2782,7 @@ function BiampTableColumnVisibility({
2795
2782
 
2796
2783
  // src/BiampTable/BiampTableToolbarColumnVisibility.tsx
2797
2784
  var import_assets9 = require("@bwp-web/assets");
2798
- var import_react10 = require("react");
2785
+ var import_react9 = require("react");
2799
2786
 
2800
2787
  // src/BiampTable/BiampTableToolbarActionButton.tsx
2801
2788
  var import_material16 = require("@mui/material");
@@ -2845,7 +2832,7 @@ function BiampTableToolbarColumnVisibility({
2845
2832
  showAllLabel,
2846
2833
  ...actionButtonProps
2847
2834
  }) {
2848
- const [anchorEl, setAnchorEl] = (0, import_react10.useState)(null);
2835
+ const [anchorEl, setAnchorEl] = (0, import_react9.useState)(null);
2849
2836
  const defaults = defaultColumnVisibility ?? getDefaultColumnVisibility(table);
2850
2837
  const dirtyCount = getColumnVisibilityDirtyCount(table, defaults);
2851
2838
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
@@ -2872,7 +2859,7 @@ function BiampTableToolbarColumnVisibility({
2872
2859
  }
2873
2860
 
2874
2861
  // src/BiampTable/BiampTablePagination.tsx
2875
- var import_react11 = require("react");
2862
+ var import_react10 = require("react");
2876
2863
  var import_material17 = require("@mui/material");
2877
2864
  var import_jsx_runtime21 = require("react/jsx-runtime");
2878
2865
  var positionMap = {
@@ -2890,14 +2877,14 @@ function BiampTablePagination({
2890
2877
  ...paginationProps
2891
2878
  }) {
2892
2879
  const rowCount = table.getRowCount();
2893
- const lastRowCountRef = (0, import_react11.useRef)(rowCount);
2894
- if (!loading && rowCount >= 0) {
2895
- lastRowCountRef.current = rowCount;
2880
+ const [lastRowCount, setLastRowCount] = (0, import_react10.useState)(rowCount);
2881
+ if (!loading && rowCount >= 0 && rowCount !== lastRowCount) {
2882
+ setLastRowCount(rowCount);
2896
2883
  }
2897
- const stableCount = loading ? lastRowCountRef.current : rowCount;
2884
+ const stableCount = loading ? lastRowCount : rowCount;
2898
2885
  const { pageSize, pageIndex } = table.getState().pagination;
2899
2886
  const maxPage = Math.max(0, Math.ceil(stableCount / pageSize) - 1);
2900
- (0, import_react11.useEffect)(() => {
2887
+ (0, import_react10.useEffect)(() => {
2901
2888
  if (!loading && pageIndex > maxPage) {
2902
2889
  table.setPageIndex(maxPage);
2903
2890
  }
@@ -2918,17 +2905,19 @@ function BiampTablePagination({
2918
2905
  rowsPerPageOptions: rowsPerPageOptions ?? [],
2919
2906
  showFirstButton: true,
2920
2907
  showLastButton: true,
2921
- sx: {
2922
- display: "flex",
2923
- justifyContent: positionMap[position],
2924
- height: 40,
2925
- minHeight: 40,
2926
- "& .MuiToolbar-root": {
2908
+ sx: mergeSx(
2909
+ {
2910
+ display: "flex",
2911
+ justifyContent: positionMap[position],
2912
+ height: 40,
2927
2913
  minHeight: 40,
2928
- px: 0
2914
+ "& .MuiToolbar-root": {
2915
+ minHeight: 40,
2916
+ px: 0
2917
+ }
2929
2918
  },
2930
- ...sx
2931
- },
2919
+ sx
2920
+ ),
2932
2921
  ...paginationProps
2933
2922
  }
2934
2923
  );
@@ -2946,14 +2935,18 @@ function BiampTableToolbar({
2946
2935
  import_material18.Box,
2947
2936
  {
2948
2937
  role: "toolbar",
2949
- display: "flex",
2950
- justifyContent: "space-between",
2951
- alignItems: "center",
2952
- gap: { xs: 0, md: 1 },
2953
- width: "100%",
2954
- minHeight: 44,
2955
- sx: { ...sx },
2956
2938
  ...props,
2939
+ sx: mergeSx(
2940
+ {
2941
+ display: "flex",
2942
+ justifyContent: "space-between",
2943
+ alignItems: "center",
2944
+ gap: { xs: 0, md: 1 },
2945
+ width: "100%",
2946
+ minHeight: 44
2947
+ },
2948
+ sx
2949
+ ),
2957
2950
  children
2958
2951
  }
2959
2952
  );
@@ -2969,12 +2962,17 @@ function BiampTableToolbarActions({
2969
2962
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2970
2963
  import_material19.Box,
2971
2964
  {
2972
- display: "flex",
2973
- alignItems: "center",
2974
- ml: "auto",
2975
- gap: { xs: 0, md: 1 },
2976
- mr: { xs: 1, md: 0 },
2977
2965
  ...props,
2966
+ sx: mergeSx(
2967
+ {
2968
+ display: "flex",
2969
+ alignItems: "center",
2970
+ ml: "auto",
2971
+ gap: { xs: 0, md: 1 },
2972
+ mr: { xs: 1, md: 0 }
2973
+ },
2974
+ props.sx
2975
+ ),
2978
2976
  children
2979
2977
  }
2980
2978
  );
@@ -3026,7 +3024,8 @@ function BiampTableToolbarExportTextButton({
3026
3024
  // src/BiampTable/BiampTableToolbarFilters.tsx
3027
3025
  var import_material21 = require("@mui/material");
3028
3026
  var import_assets11 = require("@bwp-web/assets");
3029
- var import_react12 = require("react");
3027
+ var import_react11 = require("react");
3028
+ var import_utils2 = require("@mui/material/utils");
3030
3029
  var import_jsx_runtime25 = require("react/jsx-runtime");
3031
3030
  function BiampTableToolbarFilters({
3032
3031
  activeFilterCount,
@@ -3041,8 +3040,8 @@ function BiampTableToolbarFilters({
3041
3040
  buttonLabel = "Filters",
3042
3041
  DrawerProps: drawerProps
3043
3042
  }) {
3044
- const [open, setOpen] = (0, import_react12.useState)(false);
3045
- const titleId = (0, import_react12.useId)();
3043
+ const [open, setOpen] = (0, import_react11.useState)(false);
3044
+ const titleId = (0, import_react11.useId)();
3046
3045
  const theme = (0, import_material21.useTheme)();
3047
3046
  function handleClose() {
3048
3047
  onApply?.();
@@ -3066,27 +3065,33 @@ function BiampTableToolbarFilters({
3066
3065
  onClose: handleClose,
3067
3066
  "aria-labelledby": titleId,
3068
3067
  ...drawerProps,
3069
- PaperProps: {
3070
- sx: { width: { xs: "100%", sm: 480 } },
3071
- ...drawerProps?.PaperProps
3068
+ slotProps: {
3069
+ ...drawerProps?.slotProps,
3070
+ paper: (0, import_utils2.mergeSlotProps)(drawerProps?.slotProps?.paper, {
3071
+ sx: { width: { xs: "100%", sm: 480 } }
3072
+ })
3072
3073
  },
3073
3074
  children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3074
3075
  import_material21.Box,
3075
3076
  {
3076
- height: "100%",
3077
- display: "flex",
3078
- flexDirection: "column",
3079
- justifyContent: "space-between",
3077
+ sx: {
3078
+ height: "100%",
3079
+ display: "flex",
3080
+ flexDirection: "column",
3081
+ justifyContent: "space-between"
3082
+ },
3080
3083
  children: [
3081
3084
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_material21.Box, { children: [
3082
3085
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3083
3086
  import_material21.Box,
3084
3087
  {
3085
- display: "flex",
3086
- justifyContent: "space-between",
3087
- alignItems: "center",
3088
- px: 3.5,
3089
- py: 2.5,
3088
+ sx: {
3089
+ display: "flex",
3090
+ justifyContent: "space-between",
3091
+ alignItems: "center",
3092
+ px: 3.5,
3093
+ py: 2.5
3094
+ },
3090
3095
  children: [
3091
3096
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_material21.Typography, { id: titleId, variant: "h2", children: [
3092
3097
  title,
@@ -3124,38 +3129,48 @@ function BiampTableToolbarFilters({
3124
3129
  {
3125
3130
  role: "group",
3126
3131
  "aria-label": "Filter options",
3127
- display: "flex",
3128
- flexDirection: "column",
3129
- gap: 2,
3130
- p: 3.5,
3131
- overflow: "auto",
3132
+ sx: {
3133
+ display: "flex",
3134
+ flexDirection: "column",
3135
+ gap: 2,
3136
+ p: 3.5,
3137
+ overflow: "auto"
3138
+ },
3132
3139
  children
3133
3140
  }
3134
3141
  )
3135
3142
  ] }),
3136
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_material21.Box, { display: "flex", children: [
3137
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3138
- import_material21.Button,
3139
- {
3140
- variant: "overlay",
3141
- color: "secondary",
3142
- fullWidth: true,
3143
- onClick: onReset,
3144
- disabled: activeFilterCount === 0,
3145
- children: resetLabel
3146
- }
3147
- ),
3148
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3149
- import_material21.Button,
3150
- {
3151
- variant: "overlay",
3152
- color: "primary",
3153
- fullWidth: true,
3154
- onClick: handleClose,
3155
- children: applyLabel
3156
- }
3157
- )
3158
- ] })
3143
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3144
+ import_material21.Box,
3145
+ {
3146
+ sx: {
3147
+ display: "flex"
3148
+ },
3149
+ children: [
3150
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3151
+ import_material21.Button,
3152
+ {
3153
+ variant: "overlay",
3154
+ color: "secondary",
3155
+ fullWidth: true,
3156
+ onClick: onReset,
3157
+ disabled: activeFilterCount === 0,
3158
+ children: resetLabel
3159
+ }
3160
+ ),
3161
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3162
+ import_material21.Button,
3163
+ {
3164
+ variant: "overlay",
3165
+ color: "primary",
3166
+ fullWidth: true,
3167
+ onClick: handleClose,
3168
+ children: applyLabel
3169
+ }
3170
+ )
3171
+ ]
3172
+ }
3173
+ )
3159
3174
  ]
3160
3175
  }
3161
3176
  )
@@ -3167,21 +3182,23 @@ function BiampTableToolbarFilters({
3167
3182
  // src/BiampTable/BiampTableToolbarSearch.tsx
3168
3183
  var import_material22 = require("@mui/material");
3169
3184
  var import_assets12 = require("@bwp-web/assets");
3170
- var import_react14 = require("react");
3185
+ var import_react13 = require("react");
3171
3186
 
3172
3187
  // src/BiampTable/useDebouncedCallback.ts
3173
- var import_react13 = require("react");
3188
+ var import_react12 = require("react");
3174
3189
  var BIAMP_TABLE_DEBOUNCE_DELAY = 300;
3175
3190
  function useDebouncedCallback(callback, delay = BIAMP_TABLE_DEBOUNCE_DELAY) {
3176
- const timeoutRef = (0, import_react13.useRef)(null);
3177
- const callbackRef = (0, import_react13.useRef)(callback);
3178
- callbackRef.current = callback;
3179
- (0, import_react13.useEffect)(() => {
3191
+ const timeoutRef = (0, import_react12.useRef)(null);
3192
+ const callbackRef = (0, import_react12.useRef)(callback);
3193
+ (0, import_react12.useEffect)(() => {
3194
+ callbackRef.current = callback;
3195
+ });
3196
+ (0, import_react12.useEffect)(() => {
3180
3197
  return () => {
3181
3198
  if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);
3182
3199
  };
3183
3200
  }, []);
3184
- return (0, import_react13.useCallback)(
3201
+ return (0, import_react12.useCallback)(
3185
3202
  (...args) => {
3186
3203
  if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);
3187
3204
  timeoutRef.current = setTimeout(
@@ -3219,12 +3236,14 @@ function BiampTableToolbarSearch({
3219
3236
  ...textFieldProps
3220
3237
  }) {
3221
3238
  const isMobile = (0, import_material22.useMediaQuery)((t) => t.breakpoints.down("md"));
3222
- const [inputValue, setInputValue] = (0, import_react14.useState)(defaultValue);
3223
- const [isExpanded, setIsExpanded] = (0, import_react14.useState)(false);
3239
+ const [inputValue, setInputValue] = (0, import_react13.useState)(defaultValue);
3240
+ const [isExpanded, setIsExpanded] = (0, import_react13.useState)(false);
3224
3241
  const debouncedOnChange = useDebouncedCallback(onChange, debounceDelay);
3225
- (0, import_react14.useEffect)(() => {
3242
+ const [prevDefaultValue, setPrevDefaultValue] = (0, import_react13.useState)(defaultValue);
3243
+ if (defaultValue !== prevDefaultValue) {
3244
+ setPrevDefaultValue(defaultValue);
3226
3245
  setInputValue(defaultValue);
3227
- }, [defaultValue]);
3246
+ }
3228
3247
  const handleChange = (e) => {
3229
3248
  setInputValue(e.target.value);
3230
3249
  debouncedOnChange(e.target.value);
@@ -3290,11 +3309,11 @@ function BiampTableToolbarSearch({
3290
3309
  }
3291
3310
  },
3292
3311
  fullWidth: true,
3293
- sx: [
3312
+ sx: mergeSx(
3294
3313
  searchFieldSx,
3295
3314
  expandable ? { width: 170 } : { maxWidth },
3296
- ...Array.isArray(sx) ? sx : sx ? [sx] : []
3297
- ],
3315
+ sx
3316
+ ),
3298
3317
  variant: "outlined",
3299
3318
  value: inputValue,
3300
3319
  onChange: handleChange,
@@ -3304,64 +3323,86 @@ function BiampTableToolbarSearch({
3304
3323
  }
3305
3324
  );
3306
3325
  if (isMobile && enableMobileView) {
3307
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material22.Box, { display: "flex", alignItems: "center", width: "100%", pr: 1, gap: 1, children: [
3308
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_assets12.SearchIcon, { sx: { width: 16, height: 16 } }),
3309
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3310
- import_material22.InputBase,
3311
- {
3312
- name: "search",
3313
- type: "text",
3314
- placeholder,
3315
- inputProps: { maxLength, "aria-label": "Search" },
3316
- fullWidth: true,
3317
- value: inputValue,
3318
- sx: {
3319
- paddingLeft: 1,
3320
- height: "36px !important",
3321
- minHeight: "36px !important",
3322
- fontSize: (t) => t.typography.body2.fontSize
3323
- },
3324
- onChange: handleChange,
3325
- endAdornment: clearButton
3326
- }
3327
- )
3328
- ] });
3326
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3327
+ import_material22.Box,
3328
+ {
3329
+ sx: {
3330
+ display: "flex",
3331
+ alignItems: "center",
3332
+ width: "100%",
3333
+ pr: 1,
3334
+ gap: 1
3335
+ },
3336
+ children: [
3337
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_assets12.SearchIcon, { sx: { width: 16, height: 16 } }),
3338
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3339
+ import_material22.InputBase,
3340
+ {
3341
+ name: "search",
3342
+ type: "text",
3343
+ placeholder,
3344
+ slotProps: { input: { maxLength, "aria-label": "Search" } },
3345
+ fullWidth: true,
3346
+ value: inputValue,
3347
+ sx: {
3348
+ paddingLeft: 1,
3349
+ height: "36px !important",
3350
+ minHeight: "36px !important",
3351
+ fontSize: (t) => t.typography.body2.fontSize
3352
+ },
3353
+ onChange: handleChange,
3354
+ endAdornment: clearButton
3355
+ }
3356
+ )
3357
+ ]
3358
+ }
3359
+ );
3329
3360
  }
3330
3361
  if (expandable) {
3331
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material22.Box, { display: "flex", alignItems: "center", minWidth: 28, children: [
3332
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3333
- import_material22.IconButton,
3334
- {
3335
- "aria-label": expandLabel ?? placeholder,
3336
- onClick: () => setIsExpanded(true),
3337
- sx: { display: isExpanded || inputValue ? "none" : "flex" },
3338
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3339
- import_assets12.SearchIcon,
3362
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3363
+ import_material22.Box,
3364
+ {
3365
+ sx: {
3366
+ display: "flex",
3367
+ alignItems: "center",
3368
+ minWidth: 28
3369
+ },
3370
+ children: [
3371
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3372
+ import_material22.IconButton,
3340
3373
  {
3341
- variant: "xs",
3342
- color: "inherit",
3343
- sx: { width: 16, height: 16 }
3374
+ "aria-label": expandLabel ?? placeholder,
3375
+ onClick: () => setIsExpanded(true),
3376
+ sx: { display: isExpanded || inputValue ? "none" : "flex" },
3377
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3378
+ import_assets12.SearchIcon,
3379
+ {
3380
+ variant: "xs",
3381
+ color: "inherit",
3382
+ sx: { width: 16, height: 16 }
3383
+ }
3384
+ )
3385
+ }
3386
+ ),
3387
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3388
+ import_material22.Collapse,
3389
+ {
3390
+ in: isExpanded || !!inputValue,
3391
+ orientation: "horizontal",
3392
+ unmountOnExit: true,
3393
+ children: textField
3344
3394
  }
3345
3395
  )
3346
- }
3347
- ),
3348
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3349
- import_material22.Collapse,
3350
- {
3351
- in: isExpanded || !!inputValue,
3352
- orientation: "horizontal",
3353
- unmountOnExit: true,
3354
- children: textField
3355
- }
3356
- )
3357
- ] });
3396
+ ]
3397
+ }
3398
+ );
3358
3399
  }
3359
3400
  return textField;
3360
3401
  }
3361
3402
 
3362
3403
  // src/BiampTable/useBiampServerSideTable.ts
3363
3404
  var import_react_table3 = require("@tanstack/react-table");
3364
- var import_react15 = require("react");
3405
+ var import_react14 = require("react");
3365
3406
 
3366
3407
  // src/BiampTable/serverSideTableUtils.ts
3367
3408
  function orderToSorting(order, fieldToColumnId) {
@@ -3453,7 +3494,7 @@ function useBiampServerSideTable({
3453
3494
  nonHideableColumnIds,
3454
3495
  columnIdToField,
3455
3496
  fieldToColumnId
3456
- } = (0, import_react15.useMemo)(
3497
+ } = (0, import_react14.useMemo)(
3457
3498
  () => ({
3458
3499
  defaultColumnVisibility: getDefaultColumnVisibilityFromDefs(columns),
3459
3500
  nonHideableColumnIds: getNonHideableColumnIds(columns),
@@ -3461,21 +3502,21 @@ function useBiampServerSideTable({
3461
3502
  }),
3462
3503
  [columns]
3463
3504
  );
3464
- const sorting = (0, import_react15.useMemo)(
3505
+ const sorting = (0, import_react14.useMemo)(
3465
3506
  () => orderToSorting(order, fieldToColumnId),
3466
3507
  [order, fieldToColumnId]
3467
3508
  );
3468
3509
  const hasPagination = page != null && rowsPerPage != null;
3469
- const pagination = (0, import_react15.useMemo)(
3510
+ const pagination = (0, import_react14.useMemo)(
3470
3511
  () => hasPagination ? { pageIndex: page, pageSize: rowsPerPage } : void 0,
3471
3512
  [hasPagination, page, rowsPerPage]
3472
3513
  );
3473
3514
  const hasSelection = selectedRowIds != null;
3474
- const rowSelection = (0, import_react15.useMemo)(
3515
+ const rowSelection = (0, import_react14.useMemo)(
3475
3516
  () => hasSelection ? selectedIdsToRowSelection(selectedRowIds) : void 0,
3476
3517
  [hasSelection, selectedRowIds]
3477
3518
  );
3478
- const mergedVisibility = (0, import_react15.useMemo)(() => {
3519
+ const mergedVisibility = (0, import_react14.useMemo)(() => {
3479
3520
  const merged = {
3480
3521
  ...defaultColumnVisibility,
3481
3522
  ...columnVisibility
@@ -3593,15 +3634,15 @@ function BiampBanner({ show, children, severity }) {
3593
3634
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material23.Collapse, { in: show, unmountOnExit: true, component: "aside", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3594
3635
  import_material23.Box,
3595
3636
  {
3596
- bgcolor: ({ palette }) => palette.background[severity],
3597
- display: "flex",
3598
- flexDirection: "row",
3599
- alignItems: "center",
3600
- justifyContent: "space-between",
3601
- gap: 1,
3602
- px: { xs: 2, sm: 2.5 },
3603
- minHeight: 48,
3604
3637
  sx: {
3638
+ bgcolor: ({ palette }) => palette.background[severity],
3639
+ display: "flex",
3640
+ flexDirection: "row",
3641
+ alignItems: "center",
3642
+ justifyContent: "space-between",
3643
+ gap: 1,
3644
+ px: { xs: 2, sm: 2.5 },
3645
+ minHeight: 48,
3605
3646
  borderBottom: ({ palette }) => `0.6px solid ${palette[severity].main}`
3606
3647
  },
3607
3648
  children
@@ -3618,10 +3659,37 @@ function BiampBannerIcon({ severity, children }) {
3618
3659
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: severity ? iconMapping[severity] : children });
3619
3660
  }
3620
3661
  function BiampBannerContent({ children, ...props }) {
3621
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material23.Typography, { textAlign: "center", variant: "h3", ...props, children });
3662
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3663
+ import_material23.Typography,
3664
+ {
3665
+ variant: "h3",
3666
+ ...props,
3667
+ sx: mergeSx(
3668
+ {
3669
+ textAlign: "center"
3670
+ },
3671
+ props.sx
3672
+ ),
3673
+ children
3674
+ }
3675
+ );
3622
3676
  }
3623
3677
  function BiampBannerActions({ children, ...props }) {
3624
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material23.Box, { display: "flex", gap: 1, alignItems: "center", ...props, children });
3678
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3679
+ import_material23.Box,
3680
+ {
3681
+ ...props,
3682
+ sx: mergeSx(
3683
+ {
3684
+ display: "flex",
3685
+ gap: 1,
3686
+ alignItems: "center"
3687
+ },
3688
+ props.sx
3689
+ ),
3690
+ children
3691
+ }
3692
+ );
3625
3693
  }
3626
3694
 
3627
3695
  // src/BiampSegmentedButton/SegmentedButton.tsx
@@ -3643,20 +3711,22 @@ function SegmentedButton({
3643
3711
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3644
3712
  import_material24.Button,
3645
3713
  {
3646
- sx: {
3647
- backgroundColor,
3648
- color: textColor,
3649
- borderRadius: "4px",
3650
- border,
3651
- borderColor: "divider",
3652
- lineHeight: 1.5,
3653
- px: 1.5,
3654
- py: 0,
3655
- height: small ? "22px" : "26px",
3656
- ...small && { fontSize: "12px", letterSpacing: "-0.24px" },
3657
- boxShadow: active ? `0 1px 2px 0 ${(0, import_styles.alpha)(theme.palette.common.black, 0.05)} !important` : "none !important",
3658
- ...sx
3659
- },
3714
+ sx: mergeSx(
3715
+ {
3716
+ backgroundColor,
3717
+ color: textColor,
3718
+ borderRadius: "4px",
3719
+ border,
3720
+ borderColor: "divider",
3721
+ lineHeight: 1.5,
3722
+ px: 1.5,
3723
+ py: 0,
3724
+ height: small ? "22px" : "26px",
3725
+ ...small && { fontSize: "12px", letterSpacing: "-0.24px" },
3726
+ boxShadow: active ? `0 1px 2px 0 ${(0, import_styles.alpha)(theme.palette.common.black, 0.05)} !important` : "none !important"
3727
+ },
3728
+ sx
3729
+ ),
3660
3730
  ...props,
3661
3731
  children
3662
3732
  }
@@ -3673,14 +3743,16 @@ function SegmentedButtonGroup({ children, sx, ...props }) {
3673
3743
  import_material25.Stack,
3674
3744
  {
3675
3745
  direction: "row",
3676
- p: 0.5,
3677
- borderRadius: "6px",
3678
- gap: 1,
3679
- sx: {
3680
- backgroundColor: isDarkMode ? theme.palette.grey[900] : theme.palette.grey[100],
3681
- ...sx
3682
- },
3683
3746
  ...props,
3747
+ sx: mergeSx(
3748
+ {
3749
+ p: 0.5,
3750
+ borderRadius: "6px",
3751
+ gap: 1,
3752
+ backgroundColor: isDarkMode ? theme.palette.grey[900] : theme.palette.grey[100]
3753
+ },
3754
+ sx
3755
+ ),
3684
3756
  children
3685
3757
  }
3686
3758
  );
@@ -3688,7 +3760,7 @@ function SegmentedButtonGroup({ children, sx, ...props }) {
3688
3760
 
3689
3761
  // src/OrganizationSelector/OrganizationSelector.tsx
3690
3762
  var import_material26 = require("@mui/material");
3691
- var import_react16 = require("react");
3763
+ var import_react15 = require("react");
3692
3764
  var import_assets14 = require("@bwp-web/assets");
3693
3765
  var import_jsx_runtime30 = require("react/jsx-runtime");
3694
3766
  function OrganizationSelector({
@@ -3700,17 +3772,19 @@ function OrganizationSelector({
3700
3772
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3701
3773
  import_material26.Stack,
3702
3774
  {
3703
- sx: {
3704
- width: "min(370px, calc(100vw - 24px))",
3705
- minHeight: 64,
3706
- maxHeight: "min(700px, 90vh)",
3707
- backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[700] : palette.grey[100],
3708
- borderRadius: 3,
3709
- p: 1.5,
3710
- boxShadow: ({ palette }) => `0 4px 24px 0 ${(0, import_material26.alpha)(palette.common.black, 0.15)}`,
3711
- overflow: "auto",
3712
- ...sx
3713
- },
3775
+ sx: mergeSx(
3776
+ {
3777
+ width: "min(370px, calc(100vw - 24px))",
3778
+ minHeight: 64,
3779
+ maxHeight: "min(700px, 90vh)",
3780
+ backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[700] : palette.grey[100],
3781
+ borderRadius: 3,
3782
+ p: 1.5,
3783
+ boxShadow: ({ palette }) => `0 4px 24px 0 ${(0, import_material26.alpha)(palette.common.black, 0.15)}`,
3784
+ overflow: "auto"
3785
+ },
3786
+ sx
3787
+ ),
3714
3788
  ...props,
3715
3789
  children: loading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_material26.CircularProgress, { size: 40, sx: { mx: "auto", my: "auto" } }) : children
3716
3790
  }
@@ -3722,23 +3796,25 @@ function OrganizationItemList({
3722
3796
  maxHeight,
3723
3797
  sx
3724
3798
  }) {
3725
- const items = import_react16.Children.toArray(children).filter(import_react16.isValidElement);
3799
+ const items = import_react15.Children.toArray(children).filter(import_react15.isValidElement);
3726
3800
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
3727
3801
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3728
3802
  import_material26.List,
3729
3803
  {
3730
3804
  disablePadding: true,
3731
- sx: {
3732
- border: 0.6,
3733
- borderColor: ({ palette }) => palette.mode === "dark" ? (0, import_material26.alpha)(palette.common.white, 0.12) : (0, import_material26.alpha)(palette.grey[900], 0.15),
3734
- borderRadius: 2,
3735
- ...maxHeight !== void 0 && {
3736
- overflow: "auto",
3737
- maxHeight
3805
+ sx: mergeSx(
3806
+ {
3807
+ border: 0.6,
3808
+ borderColor: ({ palette }) => palette.mode === "dark" ? (0, import_material26.alpha)(palette.common.white, 0.12) : (0, import_material26.alpha)(palette.grey[900], 0.15),
3809
+ borderRadius: 2,
3810
+ ...maxHeight !== void 0 && {
3811
+ overflow: "auto",
3812
+ maxHeight
3813
+ }
3738
3814
  },
3739
- ...sx
3740
- },
3741
- children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react16.Fragment, { children: [
3815
+ sx
3816
+ ),
3817
+ children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react15.Fragment, { children: [
3742
3818
  item,
3743
3819
  i !== items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_material26.Divider, {})
3744
3820
  ] }, item.key ?? i))
@@ -3753,9 +3829,11 @@ function renderText(value, defaults) {
3753
3829
  import_material26.Typography,
3754
3830
  {
3755
3831
  variant: defaults.variant,
3756
- fontWeight: defaults.fontWeight,
3757
- color: defaults.color,
3758
3832
  noWrap: true,
3833
+ sx: {
3834
+ fontWeight: defaults.fontWeight,
3835
+ color: defaults.color
3836
+ },
3759
3837
  children: value
3760
3838
  }
3761
3839
  );
@@ -3778,13 +3856,10 @@ function OrganizationItem({
3778
3856
  {
3779
3857
  disabled: disabled ?? isCurrent,
3780
3858
  disableRipple: true,
3781
- sx: {
3782
- p: 1,
3783
- pr: 1.5,
3784
- gap: 1.5,
3785
- "&.Mui-disabled": { opacity: 1 },
3786
- ...sx
3787
- },
3859
+ sx: mergeSx(
3860
+ { p: 1, pr: 1.5, gap: 1.5, "&.Mui-disabled": { opacity: 1 } },
3861
+ sx
3862
+ ),
3788
3863
  ...props,
3789
3864
  children: [
3790
3865
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
@@ -3814,20 +3889,40 @@ function OrganizationItem({
3814
3889
  ) : logo
3815
3890
  }
3816
3891
  ),
3817
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_material26.Stack, { gap: 0.25, sx: { width: "100%", minWidth: 0 }, children: [
3818
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_material26.Stack, { direction: "row", justifyContent: "space-between", gap: 1, children: [
3819
- renderText(primaryText, {
3820
- variant: "body2",
3821
- fontWeight: 600,
3822
- color: "primary"
3823
- }),
3824
- meta && renderText(meta, { variant: "body2", color: "text.secondary" })
3825
- ] }),
3826
- secondaryText && renderText(secondaryText, {
3827
- variant: "caption",
3828
- color: "text.secondary"
3829
- })
3830
- ] }),
3892
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3893
+ import_material26.Stack,
3894
+ {
3895
+ sx: {
3896
+ gap: 0.25,
3897
+ width: "100%",
3898
+ minWidth: 0
3899
+ },
3900
+ children: [
3901
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3902
+ import_material26.Stack,
3903
+ {
3904
+ direction: "row",
3905
+ sx: {
3906
+ justifyContent: "space-between",
3907
+ gap: 1
3908
+ },
3909
+ children: [
3910
+ renderText(primaryText, {
3911
+ variant: "body2",
3912
+ fontWeight: 600,
3913
+ color: "primary.main"
3914
+ }),
3915
+ meta && renderText(meta, { variant: "body2", color: "text.secondary" })
3916
+ ]
3917
+ }
3918
+ ),
3919
+ secondaryText && renderText(secondaryText, {
3920
+ variant: "caption",
3921
+ color: "text.secondary"
3922
+ })
3923
+ ]
3924
+ }
3925
+ ),
3831
3926
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3832
3927
  import_assets14.ChevronRightIcon,
3833
3928
  {
@@ -3856,15 +3951,17 @@ function OrganizationSelectorButton({
3856
3951
  import_material26.ButtonBase,
3857
3952
  {
3858
3953
  disableRipple: true,
3859
- sx: {
3860
- display: "flex",
3861
- alignItems: "center",
3862
- gap: 1,
3863
- borderRadius: 1,
3864
- p: 0.75,
3865
- border: ({ palette }) => `0.6px solid ${palette.dividers.secondary}`,
3866
- ...sx
3867
- },
3954
+ sx: mergeSx(
3955
+ {
3956
+ display: "flex",
3957
+ alignItems: "center",
3958
+ gap: 1,
3959
+ borderRadius: 1,
3960
+ p: 0.75,
3961
+ border: ({ palette }) => `0.6px solid ${palette.dividers.secondary}`
3962
+ },
3963
+ sx
3964
+ ),
3868
3965
  ...props,
3869
3966
  children: [
3870
3967
  icon,
@@ -3872,9 +3969,11 @@ function OrganizationSelectorButton({
3872
3969
  import_material26.Typography,
3873
3970
  {
3874
3971
  variant: "caption",
3875
- fontWeight: 600,
3876
3972
  noWrap: true,
3877
- sx: { flexShrink: 0 },
3973
+ sx: {
3974
+ fontWeight: 600,
3975
+ flexShrink: 0
3976
+ },
3878
3977
  children: name
3879
3978
  }
3880
3979
  ),
@@ -3925,7 +4024,8 @@ function OrganizationSelectorPopover({
3925
4024
 
3926
4025
  // src/LandingPage/LandingFormPanel.tsx
3927
4026
  var import_material27 = require("@mui/material");
3928
- var import_react17 = require("react");
4027
+ var import_react16 = require("react");
4028
+ var import_utils3 = require("@mui/material/utils");
3929
4029
  var import_jsx_runtime31 = require("react/jsx-runtime");
3930
4030
  function LandingFormPanel({
3931
4031
  children,
@@ -3945,20 +4045,20 @@ function LandingFormPanel({
3945
4045
  component: "form",
3946
4046
  onSubmit: handleSubmit,
3947
4047
  noValidate,
3948
- gap: 2,
3949
- p: 1.5,
3950
- borderRadius: 4,
3951
- width,
3952
- maxWidth: "100%",
4048
+ ...stackProps,
3953
4049
  sx: mergeSx(
3954
4050
  {
4051
+ gap: 2,
4052
+ p: 1.5,
4053
+ borderRadius: 4,
4054
+ width,
4055
+ maxWidth: "100%",
3955
4056
  // Figma's `background_default` (#F5F5F5) is `grey[100]` here, not
3956
4057
  // `palette.background.default` — that token is #FFFFFF in light mode.
3957
4058
  backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[700] : palette.grey[100]
3958
4059
  },
3959
4060
  sx
3960
4061
  ),
3961
- ...stackProps,
3962
4062
  children
3963
4063
  }
3964
4064
  );
@@ -3985,46 +4085,65 @@ function LandingFormField({
3985
4085
  label: labelSlotProps,
3986
4086
  ...fieldSlotProps
3987
4087
  } = slotProps ?? {};
3988
- const generatedId = (0, import_react17.useId)();
4088
+ const generatedId = (0, import_react16.useId)();
3989
4089
  const fieldId = id ?? generatedId;
3990
4090
  const labelId = labelSlotProps?.id ?? `${fieldId}-label`;
3991
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_material27.Stack, { gap: 0.5, width: "100%", ...containerSlotProps, children: [
3992
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3993
- import_material27.Typography,
3994
- {
3995
- component: "label",
3996
- id: labelId,
3997
- htmlFor: fieldId,
3998
- fontSize: 12,
3999
- fontWeight: 600,
4000
- color: "text.primary",
4001
- ...labelSlotProps,
4002
- children: label
4003
- }
4004
- ),
4005
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4006
- import_material27.TextField,
4007
- {
4008
- id: fieldId,
4009
- fullWidth: true,
4010
- variant: "outlined",
4011
- slotProps: {
4012
- ...fieldSlotProps,
4013
- // `select` renders a `div[role="combobox"]`, which `<label for>`
4014
- // cannot name — and MUI points its `aria-labelledby` at the div
4015
- // itself, so the name would come out as the selected value. Naming
4016
- // the label explicitly is what MUI's own floating label does.
4017
- // Inert on a text field: `slotProps.select` only reaches a `Select`.
4018
- select: mergeSlotProps({ labelId }, fieldSlotProps.select)
4019
- },
4020
- sx: mergeSx(fieldSx, sx),
4021
- ...textFieldProps
4022
- }
4023
- )
4024
- ] });
4091
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
4092
+ import_material27.Stack,
4093
+ {
4094
+ ...containerSlotProps,
4095
+ sx: mergeSx({ gap: 0.5, width: "100%" }, containerSlotProps?.sx),
4096
+ children: [
4097
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4098
+ import_material27.Typography,
4099
+ {
4100
+ component: "label",
4101
+ id: labelId,
4102
+ htmlFor: fieldId,
4103
+ color: "textPrimary",
4104
+ ...labelSlotProps,
4105
+ sx: mergeSx({ fontSize: 12, fontWeight: 600 }, labelSlotProps?.sx),
4106
+ children: label
4107
+ }
4108
+ ),
4109
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4110
+ import_material27.TextField,
4111
+ {
4112
+ id: fieldId,
4113
+ fullWidth: true,
4114
+ variant: "outlined",
4115
+ slotProps: {
4116
+ ...fieldSlotProps,
4117
+ // `select` renders a `div[role="combobox"]`, which `<label for>`
4118
+ // cannot name — and MUI points its `aria-labelledby` at the div
4119
+ // itself, so the name would come out as the selected value. Naming
4120
+ // the label explicitly is what MUI's own floating label does.
4121
+ // Inert on a text field: `slotProps.select` only reaches a `Select`.
4122
+ select: (0, import_utils3.mergeSlotProps)(fieldSlotProps.select, { labelId })
4123
+ },
4124
+ sx: mergeSx(fieldSx, sx),
4125
+ ...textFieldProps
4126
+ }
4127
+ )
4128
+ ]
4129
+ }
4130
+ );
4025
4131
  }
4026
4132
  function LandingFormActions(props) {
4027
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material27.Stack, { direction: "row", gap: 1, width: "100%", ...props });
4133
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4134
+ import_material27.Stack,
4135
+ {
4136
+ direction: "row",
4137
+ ...props,
4138
+ sx: mergeSx(
4139
+ {
4140
+ gap: 1,
4141
+ width: "100%"
4142
+ },
4143
+ props.sx
4144
+ )
4145
+ }
4146
+ );
4028
4147
  }
4029
4148
  function LandingFormCheckbox({
4030
4149
  label,
@@ -4046,10 +4165,9 @@ function LandingFormCheckbox({
4046
4165
  label,
4047
4166
  slotProps: {
4048
4167
  ...labelSlotProps,
4049
- typography: mergeSlotProps(
4050
- { variant: "body2" },
4051
- labelSlotProps.typography
4052
- )
4168
+ typography: (0, import_utils3.mergeSlotProps)(labelSlotProps.typography, {
4169
+ variant: "body2"
4170
+ })
4053
4171
  },
4054
4172
  ...formControlLabelProps,
4055
4173
  sx: mergeSx({ m: 0, gap: 1, alignItems: "center" }, sx)
@@ -4059,8 +4177,9 @@ function LandingFormCheckbox({
4059
4177
 
4060
4178
  // src/LandingPage/OrganizationsPanel.tsx
4061
4179
  var import_material28 = require("@mui/material");
4062
- var import_react18 = require("react");
4180
+ var import_react17 = require("react");
4063
4181
  var import_assets15 = require("@bwp-web/assets");
4182
+ var import_utils4 = require("@mui/material/utils");
4064
4183
  var import_jsx_runtime32 = require("react/jsx-runtime");
4065
4184
  function OrganizationRow({
4066
4185
  primaryText,
@@ -4123,12 +4242,24 @@ function OrganizationRow({
4123
4242
  {
4124
4243
  noWrap: true,
4125
4244
  variant: "body2",
4126
- fontWeight: 600,
4127
- color: disabled ? "text.secondary" : "text.primary",
4245
+ sx: {
4246
+ fontWeight: 600,
4247
+ color: disabled ? "text.secondary" : "text.primary"
4248
+ },
4128
4249
  children: primaryText
4129
4250
  }
4130
4251
  ),
4131
- secondaryText && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material28.Typography, { noWrap: true, variant: "caption", color: "text.secondary", children: secondaryText })
4252
+ secondaryText && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4253
+ import_material28.Typography,
4254
+ {
4255
+ noWrap: true,
4256
+ variant: "caption",
4257
+ sx: {
4258
+ color: "text.secondary"
4259
+ },
4260
+ children: secondaryText
4261
+ }
4262
+ )
4132
4263
  ] }),
4133
4264
  !disabled && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4134
4265
  import_assets15.ChevronRightIcon,
@@ -4158,7 +4289,7 @@ function OrganizationRowGroup({
4158
4289
  sx,
4159
4290
  ...boxProps
4160
4291
  }) {
4161
- const items = import_react18.Children.toArray(children).filter(import_react18.isValidElement);
4292
+ const items = import_react17.Children.toArray(children).filter(import_react17.isValidElement);
4162
4293
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4163
4294
  import_material28.Box,
4164
4295
  {
@@ -4173,7 +4304,7 @@ function OrganizationRowGroup({
4173
4304
  sx
4174
4305
  ),
4175
4306
  ...boxProps,
4176
- children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react18.Fragment, { children: [
4307
+ children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react17.Fragment, { children: [
4177
4308
  item,
4178
4309
  i !== items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material28.Divider, {})
4179
4310
  ] }, item.key ?? i))
@@ -4209,34 +4340,53 @@ function OrganizationsEmptyState({
4209
4340
  import_material28.Stack,
4210
4341
  {
4211
4342
  role: "status",
4212
- alignItems: "center",
4213
- gap: 0.5,
4214
- width: "100%",
4215
- py: 2,
4216
- px: 2,
4217
4343
  ...stackProps,
4344
+ sx: mergeSx(
4345
+ {
4346
+ alignItems: "center",
4347
+ gap: 0.5,
4348
+ width: "100%",
4349
+ py: 2,
4350
+ px: 2
4351
+ },
4352
+ stackProps.sx
4353
+ ),
4218
4354
  children: [
4219
- (0, import_react18.cloneElement)(icon, {
4355
+ (0, import_react17.cloneElement)(icon, {
4220
4356
  "aria-hidden": true,
4221
- sx: {
4222
- width: 24,
4223
- height: 24,
4224
- mb: 0.5,
4225
- color: "text.secondary",
4226
- ...icon.props.sx
4227
- }
4357
+ sx: mergeSx(
4358
+ {
4359
+ width: 24,
4360
+ height: 24,
4361
+ mb: 0.5,
4362
+ color: "text.secondary"
4363
+ },
4364
+ icon.props.sx
4365
+ )
4228
4366
  }),
4229
4367
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4230
4368
  import_material28.Typography,
4231
4369
  {
4232
4370
  variant: "body2",
4233
- fontWeight: 600,
4234
- color: "text.primary",
4235
- textAlign: "center",
4371
+ sx: {
4372
+ fontWeight: 600,
4373
+ color: "text.primary",
4374
+ textAlign: "center"
4375
+ },
4236
4376
  children: title
4237
4377
  }
4238
4378
  ),
4239
- description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material28.Typography, { variant: "caption", color: "text.secondary", textAlign: "center", children: description })
4379
+ description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4380
+ import_material28.Typography,
4381
+ {
4382
+ variant: "caption",
4383
+ sx: {
4384
+ color: "text.secondary",
4385
+ textAlign: "center"
4386
+ },
4387
+ children: description
4388
+ }
4389
+ )
4240
4390
  ]
4241
4391
  }
4242
4392
  );
@@ -4265,22 +4415,22 @@ function OrganizationsPanel({
4265
4415
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
4266
4416
  import_material28.Stack,
4267
4417
  {
4268
- gap: 2,
4269
- alignItems: "center",
4270
- justifyContent: "center",
4271
- p: 1.5,
4272
- borderRadius: 4,
4273
- width,
4274
- maxWidth: "100%",
4418
+ ...stackProps,
4275
4419
  sx: mergeSx(
4276
4420
  {
4421
+ gap: 2,
4422
+ alignItems: "center",
4423
+ justifyContent: "center",
4424
+ p: 1.5,
4425
+ borderRadius: 4,
4426
+ width,
4427
+ maxWidth: "100%",
4277
4428
  // Figma's `background_default` (#F5F5F5) is `grey[100]` here, not
4278
4429
  // `palette.background.default` — that token is #FFFFFF in light mode.
4279
4430
  backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[700] : palette.grey[100]
4280
4431
  },
4281
4432
  sx
4282
4433
  ),
4283
- ...stackProps,
4284
4434
  children: [
4285
4435
  search && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4286
4436
  import_material28.TextField,
@@ -4303,16 +4453,12 @@ function OrganizationsPanel({
4303
4453
  ),
4304
4454
  slotProps: {
4305
4455
  ...searchFieldSlotProps,
4306
- input: mergeSlotProps(
4307
- {
4308
- startAdornment: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material28.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_assets15.SearchIcon, { sx: { ml: 1 } }) })
4309
- },
4310
- searchFieldSlotProps?.input
4311
- ),
4312
- htmlInput: mergeSlotProps(
4313
- { "aria-label": search.placeholder },
4314
- searchFieldSlotProps?.htmlInput
4315
- )
4456
+ input: (0, import_utils4.mergeSlotProps)(searchFieldSlotProps?.input, {
4457
+ startAdornment: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material28.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_assets15.SearchIcon, { sx: { ml: 1 } }) })
4458
+ }),
4459
+ htmlInput: (0, import_utils4.mergeSlotProps)(searchFieldSlotProps?.htmlInput, {
4460
+ "aria-label": search.placeholder
4461
+ })
4316
4462
  },
4317
4463
  ...searchSlotProps
4318
4464
  }
@@ -4330,10 +4476,17 @@ function OrganizationsPanel({
4330
4476
  )
4331
4477
  ] }),
4332
4478
  empty ? empty === true ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OrganizationsEmptyState, {}) : empty : orLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TextDivider, { ...slotProps?.orLabel, children: orLabel }),
4333
- (joinAction || createAction) && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_material28.Stack, { gap: 1, width: "100%", ...slotProps?.actions, children: [
4334
- joinAction && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OrganizationRowGroup, { ...slotProps?.joinGroup, children: joinAction }),
4335
- createAction && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OrganizationRowGroup, { ...slotProps?.createGroup, children: createAction })
4336
- ] })
4479
+ (joinAction || createAction) && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
4480
+ import_material28.Stack,
4481
+ {
4482
+ ...slotProps?.actions,
4483
+ sx: mergeSx({ gap: 1, width: "100%" }, slotProps?.actions?.sx),
4484
+ children: [
4485
+ joinAction && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OrganizationRowGroup, { ...slotProps?.joinGroup, children: joinAction }),
4486
+ createAction && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OrganizationRowGroup, { ...slotProps?.createGroup, children: createAction })
4487
+ ]
4488
+ }
4489
+ )
4337
4490
  ]
4338
4491
  }
4339
4492
  );
@@ -4364,23 +4517,27 @@ function UserInitialsIcon({
4364
4517
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4365
4518
  import_material29.Box,
4366
4519
  {
4367
- minWidth: width,
4368
- width,
4369
- minHeight: height,
4370
- height,
4371
- borderRadius,
4372
- bgcolor: bgColor,
4373
- display: "flex",
4374
- alignItems: "center",
4375
- justifyContent: "center",
4376
- sx: { ...sx },
4377
4520
  ...props,
4521
+ sx: mergeSx(
4522
+ {
4523
+ minWidth: width,
4524
+ width,
4525
+ minHeight: height,
4526
+ height,
4527
+ borderRadius,
4528
+ bgcolor: bgColor,
4529
+ display: "flex",
4530
+ alignItems: "center",
4531
+ justifyContent: "center"
4532
+ },
4533
+ sx
4534
+ ),
4378
4535
  children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4379
4536
  import_material29.Typography,
4380
4537
  {
4381
4538
  variant: "h3",
4382
- color: textColor,
4383
4539
  sx: {
4540
+ color: textColor,
4384
4541
  userSelect: "none",
4385
4542
  fontSize: size !== DEFAULT_SIZE ? `${fontSize}px` : void 0
4386
4543
  },
@@ -4399,9 +4556,19 @@ var getInitials = (name) => {
4399
4556
 
4400
4557
  // src/DynamicSvgIcon/DynamicSvgIcon.tsx
4401
4558
  var import_material30 = require("@mui/material");
4402
- var import_react19 = require("react");
4559
+ var import_react18 = require("react");
4403
4560
  var import_jsx_runtime34 = require("react/jsx-runtime");
4404
4561
  var svgCache = /* @__PURE__ */ new Map();
4562
+ function iconStateFor(url, transform) {
4563
+ const cached = url ? svgCache.get(url) : void 0;
4564
+ return {
4565
+ url,
4566
+ svgContent: cached ? transform(cached.innerContent) : null,
4567
+ svgViewBox: cached?.viewBox ?? null,
4568
+ loading: !!url && !cached,
4569
+ error: url ? null : "No URL provided"
4570
+ };
4571
+ }
4405
4572
  function clearDynamicSvgIconCache() {
4406
4573
  svgCache.clear();
4407
4574
  }
@@ -4411,67 +4578,57 @@ function applyCurrentColor(svg) {
4411
4578
  function useDynamicSvgIcon(url, options = {}) {
4412
4579
  const { replaceColors = false, onLoad, onError } = options;
4413
4580
  const transform = replaceColors ? applyCurrentColor : (s) => s;
4414
- const [svgContent, setSvgContent] = (0, import_react19.useState)(() => {
4415
- const cached = svgCache.get(url);
4416
- return cached ? transform(cached.innerContent) : null;
4417
- });
4418
- const [svgViewBox, setSvgViewBox] = (0, import_react19.useState)(() => {
4419
- const cached = svgCache.get(url);
4420
- return cached?.viewBox ?? null;
4421
- });
4422
- const [loading, setLoading] = (0, import_react19.useState)(() => !svgCache.has(url));
4423
- const [error, setError] = (0, import_react19.useState)(null);
4424
- (0, import_react19.useEffect)(() => {
4425
- if (!url) {
4426
- setLoading(false);
4427
- setError("No URL provided");
4428
- setSvgContent(null);
4429
- setSvgViewBox(null);
4430
- return;
4431
- }
4432
- let cancelled = false;
4433
- const cached = svgCache.get(url);
4434
- if (cached) {
4435
- setSvgContent(transform(cached.innerContent));
4436
- setSvgViewBox(cached.viewBox);
4437
- setLoading(false);
4438
- setError(null);
4581
+ const [state, setState] = (0, import_react18.useState)(() => iconStateFor(url, transform));
4582
+ if (state.url !== url) {
4583
+ setState(iconStateFor(url, transform));
4584
+ }
4585
+ (0, import_react18.useEffect)(() => {
4586
+ if (!url) return;
4587
+ if (!state.loading) {
4439
4588
  onLoad?.();
4440
4589
  return;
4441
4590
  }
4442
- setLoading(true);
4443
- setError(null);
4444
- setSvgContent(null);
4445
- setSvgViewBox(null);
4591
+ let cancelled = false;
4446
4592
  (async () => {
4447
4593
  try {
4448
- const response = await fetch(url);
4449
- if (!response.ok) {
4450
- throw new Error(
4451
- `Failed to fetch SVG: ${response.status} ${response.statusText}`
4452
- );
4453
- }
4454
- const contentType = response.headers.get("content-type") ?? "";
4455
- const text = await response.text();
4456
- if (!text.includes("<svg") && !contentType.includes("svg")) {
4457
- throw new Error("Response is not an SVG");
4594
+ let entry = svgCache.get(url);
4595
+ if (!entry) {
4596
+ const response = await fetch(url);
4597
+ if (!response.ok) {
4598
+ throw new Error(
4599
+ `Failed to fetch SVG: ${response.status} ${response.statusText}`
4600
+ );
4601
+ }
4602
+ const contentType = response.headers.get("content-type") ?? "";
4603
+ const text = await response.text();
4604
+ if (!text.includes("<svg") && !contentType.includes("svg")) {
4605
+ throw new Error("Response is not an SVG");
4606
+ }
4607
+ const viewBoxMatch = text.match(/viewBox="([^"]*)"/);
4608
+ const viewBox = viewBoxMatch ? viewBoxMatch[1] : null;
4609
+ const svgMatch = text.match(/<svg[^>]*>([\s\S]*?)<\/svg>/);
4610
+ const innerContent = svgMatch ? svgMatch[1] : text;
4611
+ entry = { innerContent, viewBox };
4612
+ svgCache.set(url, entry);
4458
4613
  }
4459
- const viewBoxMatch = text.match(/viewBox="([^"]*)"/);
4460
- const viewBox = viewBoxMatch ? viewBoxMatch[1] : null;
4461
- const svgMatch = text.match(/<svg[^>]*>([\s\S]*?)<\/svg>/);
4462
- const innerContent = svgMatch ? svgMatch[1] : text;
4463
- svgCache.set(url, { innerContent, viewBox });
4464
4614
  if (!cancelled) {
4465
- setSvgContent(transform(innerContent));
4466
- setSvgViewBox(viewBox);
4467
- setLoading(false);
4615
+ const { innerContent, viewBox } = entry;
4616
+ setState(
4617
+ (prev) => prev.url === url ? {
4618
+ ...prev,
4619
+ svgContent: transform(innerContent),
4620
+ svgViewBox: viewBox,
4621
+ loading: false
4622
+ } : prev
4623
+ );
4468
4624
  onLoad?.();
4469
4625
  }
4470
4626
  } catch (err) {
4471
4627
  if (!cancelled) {
4472
4628
  const message = err instanceof Error ? err.message : "Failed to load SVG";
4473
- setError(message);
4474
- setLoading(false);
4629
+ setState(
4630
+ (prev) => prev.url === url ? { ...prev, error: message, loading: false } : prev
4631
+ );
4475
4632
  onError?.(message);
4476
4633
  }
4477
4634
  }
@@ -4480,6 +4637,7 @@ function useDynamicSvgIcon(url, options = {}) {
4480
4637
  cancelled = true;
4481
4638
  };
4482
4639
  }, [url]);
4640
+ const { loading, error, svgContent, svgViewBox } = state;
4483
4641
  return { loading, error, svgContent, svgViewBox };
4484
4642
  }
4485
4643
  var DEFAULT_SIZE2 = 24;
@@ -4537,11 +4695,7 @@ function DynamicSvgIcon({
4537
4695
  {
4538
4696
  ...svgIconProps,
4539
4697
  ...svgViewBox && { viewBox: svgViewBox },
4540
- sx: {
4541
- ...typeof sx === "object" && sx !== null && !Array.isArray(sx) ? sx : void 0,
4542
- width,
4543
- height
4544
- },
4698
+ sx: mergeSx(sx, { width, height }),
4545
4699
  children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("g", { dangerouslySetInnerHTML: { __html: svgContent } })
4546
4700
  }
4547
4701
  );
@@ -4556,11 +4710,7 @@ function DynamicSvgIcon({
4556
4710
  BiampBannerActions,
4557
4711
  BiampBannerContent,
4558
4712
  BiampBannerIcon,
4559
- BiampBuildAppContent,
4560
- BiampBuildAppContentItem,
4561
4713
  BiampCheckboxListPopover,
4562
- BiampEndUserAppContent,
4563
- BiampEndUserAppContentItem,
4564
4714
  BiampGlobalSearch,
4565
4715
  BiampHeader,
4566
4716
  BiampHeaderActions,