@dataverse-kit/surface-kit 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +115 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -4
- package/dist/index.d.ts +23 -4
- package/dist/index.mjs +68 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/index.ts
|
|
@@ -575,18 +585,23 @@ var Section = ({
|
|
|
575
585
|
...style
|
|
576
586
|
};
|
|
577
587
|
const styles = (0, import_react12.mergeStyleSets)({
|
|
578
|
-
|
|
588
|
+
// box-sizing:border-box so the 20px padding + 1px border are contained within
|
|
589
|
+
// `width:100%` — otherwise the card renders 42px wider than its grid cell and
|
|
590
|
+
// spills off the right edge (dashboards, page sections, fields inside dialogs).
|
|
591
|
+
card: { ...dynamicsCardStyle, boxSizing: "border-box", boxShadow: cardShadow, padding: cardPad, minWidth: 0, width: "100%" },
|
|
579
592
|
flat: {
|
|
580
593
|
background: import_design_tokens.colors.surface,
|
|
581
594
|
borderRadius: import_design_tokens.radius.card,
|
|
595
|
+
boxSizing: "border-box",
|
|
582
596
|
padding: cardPad,
|
|
583
|
-
minWidth:
|
|
597
|
+
minWidth: 0,
|
|
584
598
|
width: "100%",
|
|
585
599
|
overflow: "hidden"
|
|
586
600
|
},
|
|
587
601
|
placeholder: {
|
|
588
602
|
border: `1px dashed ${import_design_tokens.colors.borderNeutral}`,
|
|
589
603
|
borderRadius: import_design_tokens.radius.card,
|
|
604
|
+
boxSizing: "border-box",
|
|
590
605
|
minHeight,
|
|
591
606
|
width: "100%",
|
|
592
607
|
background: "transparent"
|
|
@@ -642,7 +657,8 @@ var SectionCard = ({
|
|
|
642
657
|
);
|
|
643
658
|
|
|
644
659
|
// src/containers/FormHeader.tsx
|
|
645
|
-
var import_react13 = require("
|
|
660
|
+
var import_react13 = __toESM(require("react"), 1);
|
|
661
|
+
var import_react14 = require("@fluentui/react");
|
|
646
662
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
647
663
|
var FormHeader = ({
|
|
648
664
|
title,
|
|
@@ -651,10 +667,11 @@ var FormHeader = ({
|
|
|
651
667
|
titleColor,
|
|
652
668
|
subtitleColor,
|
|
653
669
|
persona,
|
|
670
|
+
headerFields,
|
|
654
671
|
actions,
|
|
655
672
|
className
|
|
656
673
|
}) => {
|
|
657
|
-
const styles = (0,
|
|
674
|
+
const styles = (0, import_react14.mergeStyleSets)({
|
|
658
675
|
root: {
|
|
659
676
|
display: "flex",
|
|
660
677
|
alignItems: "center",
|
|
@@ -674,8 +691,29 @@ var FormHeader = ({
|
|
|
674
691
|
lineHeight: "1.3"
|
|
675
692
|
},
|
|
676
693
|
status: { fontSize: import_design_tokens.typography.fontSize.smPlus, color: import_design_tokens.colors.textSecondary },
|
|
677
|
-
subtitle: { fontSize: import_design_tokens.typography.fontSize.smPlus, color: subtitleColor || import_design_tokens.colors.textSecondary, marginTop: 2 }
|
|
694
|
+
subtitle: { fontSize: import_design_tokens.typography.fontSize.smPlus, color: subtitleColor || import_design_tokens.colors.textSecondary, marginTop: 2 },
|
|
695
|
+
// Right cluster: Dynamics header-field summary tiles (value over label) separated by
|
|
696
|
+
// hairline dividers — mirrors form-runtime HeaderShell's SummaryTile.
|
|
697
|
+
right: { display: "flex", alignItems: "center", justifyContent: "flex-end", flexWrap: "wrap", minWidth: 0 },
|
|
698
|
+
field: { display: "flex", flexDirection: "column", gap: 2, maxWidth: 200, minWidth: 0 },
|
|
699
|
+
fieldValue: {
|
|
700
|
+
fontSize: import_design_tokens.typography.fontSize.md,
|
|
701
|
+
fontWeight: import_design_tokens.typography.fontWeight.semibold,
|
|
702
|
+
color: import_design_tokens.colors.textPrimary,
|
|
703
|
+
whiteSpace: "nowrap",
|
|
704
|
+
overflow: "hidden",
|
|
705
|
+
textOverflow: "ellipsis"
|
|
706
|
+
},
|
|
707
|
+
fieldLabel: {
|
|
708
|
+
fontSize: import_design_tokens.typography.fontSize.sm,
|
|
709
|
+
color: import_design_tokens.colors.textSecondary,
|
|
710
|
+
whiteSpace: "nowrap",
|
|
711
|
+
overflow: "hidden",
|
|
712
|
+
textOverflow: "ellipsis"
|
|
713
|
+
},
|
|
714
|
+
divider: { width: 1, height: 24, background: import_design_tokens.colors.borderNeutral, margin: "0 12px", flexShrink: 0 }
|
|
678
715
|
});
|
|
716
|
+
const hasFields = headerFields != null && headerFields.length > 0;
|
|
679
717
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: [styles.root, className].filter(Boolean).join(" "), children: [
|
|
680
718
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.main, children: [
|
|
681
719
|
persona,
|
|
@@ -687,13 +725,29 @@ var FormHeader = ({
|
|
|
687
725
|
subtitle != null && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: styles.subtitle, children: subtitle })
|
|
688
726
|
] })
|
|
689
727
|
] }),
|
|
690
|
-
actions != null && /* @__PURE__ */ (0, import_jsx_runtime9.
|
|
728
|
+
(hasFields || actions != null) && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.right, children: [
|
|
729
|
+
hasFields && headerFields.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react13.default.Fragment, { children: [
|
|
730
|
+
i > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: styles.divider, "aria-hidden": true }),
|
|
731
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.field, children: [
|
|
732
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
733
|
+
"div",
|
|
734
|
+
{
|
|
735
|
+
className: styles.fieldValue,
|
|
736
|
+
title: typeof f.value === "string" ? f.value : void 0,
|
|
737
|
+
children: f.value
|
|
738
|
+
}
|
|
739
|
+
),
|
|
740
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: styles.fieldLabel, children: f.label })
|
|
741
|
+
] })
|
|
742
|
+
] }, i)),
|
|
743
|
+
actions != null && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: { marginLeft: hasFields ? 12 : 0 }, children: actions })
|
|
744
|
+
] })
|
|
691
745
|
] });
|
|
692
746
|
};
|
|
693
747
|
|
|
694
748
|
// src/containers/PivotSurface.tsx
|
|
695
|
-
var
|
|
696
|
-
var
|
|
749
|
+
var import_react15 = require("react");
|
|
750
|
+
var import_react16 = require("@fluentui/react");
|
|
697
751
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
698
752
|
var PivotSurface = ({
|
|
699
753
|
tabs,
|
|
@@ -704,30 +758,33 @@ var PivotSurface = ({
|
|
|
704
758
|
className
|
|
705
759
|
}) => {
|
|
706
760
|
const firstEnabledId = tabs.find((t) => !t.disabled)?.id ?? tabs[0]?.id;
|
|
707
|
-
const [internal, setInternal] = (0,
|
|
761
|
+
const [internal, setInternal] = (0, import_react15.useState)(defaultSelectedId ?? firstEnabledId);
|
|
708
762
|
const selected = selectedId ?? internal;
|
|
709
763
|
const handleLinkClick = (item) => {
|
|
710
764
|
const id = item?.props.itemKey;
|
|
711
765
|
if (!id) return;
|
|
766
|
+
if (tabs.find((t) => t.id === id)?.disabled) return;
|
|
712
767
|
if (selectedId == null) setInternal(id);
|
|
713
768
|
onTabChange?.(id);
|
|
714
769
|
};
|
|
715
770
|
const active = tabs.find((t) => t.id === selected) ?? tabs[0];
|
|
771
|
+
const renderItemLink = (tab) => tab.tooltip ? (props, defaultRender) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react16.TooltipHost, { content: tab.tooltip, children: defaultRender?.(props) }) : void 0;
|
|
716
772
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className, children: [
|
|
717
773
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
718
|
-
|
|
774
|
+
import_react16.Pivot,
|
|
719
775
|
{
|
|
720
776
|
selectedKey: selected,
|
|
721
777
|
onLinkClick: handleLinkClick,
|
|
722
778
|
linkFormat,
|
|
723
779
|
headersOnly: true,
|
|
724
780
|
children: tabs.map((t) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
725
|
-
|
|
781
|
+
import_react16.PivotItem,
|
|
726
782
|
{
|
|
727
783
|
itemKey: t.id,
|
|
728
784
|
headerText: t.label,
|
|
729
785
|
itemIcon: t.iconName,
|
|
730
|
-
|
|
786
|
+
onRenderItemLink: renderItemLink(t),
|
|
787
|
+
headerButtonProps: t.disabled ? { disabled: true, style: { opacity: 0.4, cursor: "not-allowed", pointerEvents: "none" } } : void 0
|
|
731
788
|
},
|
|
732
789
|
t.id
|
|
733
790
|
))
|
|
@@ -738,12 +795,12 @@ var PivotSurface = ({
|
|
|
738
795
|
};
|
|
739
796
|
|
|
740
797
|
// src/containers/CommandSurface.tsx
|
|
741
|
-
var
|
|
798
|
+
var import_react17 = require("@fluentui/react");
|
|
742
799
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
743
|
-
var CommandSurface = ({ items, overflowItems, farItems, className }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
800
|
+
var CommandSurface = ({ items, overflowItems, farItems, className }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react17.CommandBar, { items, overflowItems, farItems, styles: { root: { padding: 0 } } }) });
|
|
744
801
|
|
|
745
802
|
// src/containers/ActionBar.tsx
|
|
746
|
-
var
|
|
803
|
+
var import_react18 = require("@fluentui/react");
|
|
747
804
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
748
805
|
function renderButton(b) {
|
|
749
806
|
const common = {
|
|
@@ -752,20 +809,26 @@ function renderButton(b) {
|
|
|
752
809
|
onClick: b.onClick,
|
|
753
810
|
iconProps: b.iconName ? { iconName: b.iconName } : void 0
|
|
754
811
|
};
|
|
755
|
-
if (b.appearance === "primary") return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
756
|
-
if (b.appearance === "subtle") return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
757
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
812
|
+
if (b.appearance === "primary") return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react18.PrimaryButton, { ...common }, b.id);
|
|
813
|
+
if (b.appearance === "subtle") return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react18.ActionButton, { ...common }, b.id);
|
|
814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react18.DefaultButton, { ...common }, b.id);
|
|
758
815
|
}
|
|
759
|
-
var ActionBar = ({
|
|
816
|
+
var ActionBar = ({
|
|
817
|
+
buttons,
|
|
818
|
+
alignment = "right",
|
|
819
|
+
inverted = false,
|
|
820
|
+
sticky = true,
|
|
821
|
+
className
|
|
822
|
+
}) => {
|
|
760
823
|
const justify = alignment === "left" ? "flex-start" : alignment === "center" ? "center" : "flex-end";
|
|
761
824
|
const visible = buttons.filter((b) => !b.hidden);
|
|
762
825
|
const left = visible.filter((b) => b.position === "left");
|
|
763
826
|
const right = visible.filter((b) => b.position !== "left");
|
|
764
|
-
const
|
|
827
|
+
const rightOrdered = inverted ? [...right].reverse() : right;
|
|
828
|
+
const cls = (0, import_react18.mergeStyles)(
|
|
765
829
|
{
|
|
766
830
|
display: "flex",
|
|
767
831
|
alignItems: "center",
|
|
768
|
-
justifyContent: left.length ? "space-between" : justify,
|
|
769
832
|
gap: 8,
|
|
770
833
|
padding: "12px 24px",
|
|
771
834
|
borderTop: `1px solid ${import_design_tokens.colors.borderNeutral}`,
|
|
@@ -776,16 +839,16 @@ var ActionBar = ({ buttons, alignment = "right", sticky = true, className }) =>
|
|
|
776
839
|
);
|
|
777
840
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: cls, children: [
|
|
778
841
|
left.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { display: "flex", gap: 8 }, children: left.map(renderButton) }),
|
|
779
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { display: "flex", gap: 8, justifyContent: justify }, children:
|
|
842
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { display: "flex", flex: 1, gap: 8, justifyContent: justify }, children: rightOrdered.map(renderButton) })
|
|
780
843
|
] });
|
|
781
844
|
};
|
|
782
845
|
|
|
783
846
|
// src/containers/Footer.tsx
|
|
784
|
-
var
|
|
847
|
+
var import_react19 = require("@fluentui/react");
|
|
785
848
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
786
849
|
var Footer = ({ sticky = true, align = "right", className, children }) => {
|
|
787
850
|
const justify = align === "left" ? "flex-start" : align === "center" ? "center" : "flex-end";
|
|
788
|
-
const cls = (0,
|
|
851
|
+
const cls = (0, import_react19.mergeStyles)(
|
|
789
852
|
{
|
|
790
853
|
display: "flex",
|
|
791
854
|
alignItems: "center",
|
|
@@ -802,7 +865,7 @@ var Footer = ({ sticky = true, align = "right", className, children }) => {
|
|
|
802
865
|
};
|
|
803
866
|
|
|
804
867
|
// src/overlays/FormDialogSurface.tsx
|
|
805
|
-
var
|
|
868
|
+
var import_react20 = require("@fluentui/react");
|
|
806
869
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
807
870
|
var FormDialogSurface = ({
|
|
808
871
|
isOpen,
|
|
@@ -820,7 +883,7 @@ var FormDialogSurface = ({
|
|
|
820
883
|
}) => {
|
|
821
884
|
const widthCss = dialogWidthCss({ width, size });
|
|
822
885
|
const heightCss = dialogHeightCss(height);
|
|
823
|
-
const styles = (0,
|
|
886
|
+
const styles = (0, import_react20.mergeStyleSets)({
|
|
824
887
|
header: {
|
|
825
888
|
display: "flex",
|
|
826
889
|
alignItems: "center",
|
|
@@ -839,12 +902,11 @@ var FormDialogSurface = ({
|
|
|
839
902
|
subheader: { fontSize: import_design_tokens.typography.fontSize.smPlus, color: import_design_tokens.colors.textSecondary, marginTop: 2 },
|
|
840
903
|
headerRight: { display: "flex", alignItems: "center", gap: 8 },
|
|
841
904
|
counter: { fontSize: import_design_tokens.typography.fontSize.smPlus, color: import_design_tokens.colors.textSecondary },
|
|
842
|
-
content: { flex: 1, minHeight: 0, overflow: "auto", padding: 20 }
|
|
843
|
-
footer: { borderTop: `1px solid ${import_design_tokens.colors.borderNeutral}`, padding: "12px 20px" }
|
|
905
|
+
content: { flex: 1, minHeight: 0, overflow: "auto", padding: 20 }
|
|
844
906
|
});
|
|
845
907
|
const showHeader = Boolean(title) || Boolean(recordCounter) || Boolean(onDismiss);
|
|
846
908
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
847
|
-
|
|
909
|
+
import_react20.Modal,
|
|
848
910
|
{
|
|
849
911
|
isOpen,
|
|
850
912
|
onDismiss,
|
|
@@ -880,7 +942,7 @@ var FormDialogSurface = ({
|
|
|
880
942
|
recordCounter.total
|
|
881
943
|
] }),
|
|
882
944
|
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
883
|
-
|
|
945
|
+
import_react20.IconButton,
|
|
884
946
|
{
|
|
885
947
|
iconProps: { iconName: "Cancel" },
|
|
886
948
|
ariaLabel: "Close",
|
|
@@ -891,14 +953,14 @@ var FormDialogSurface = ({
|
|
|
891
953
|
] })
|
|
892
954
|
] }),
|
|
893
955
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: styles.content, children }),
|
|
894
|
-
footer
|
|
956
|
+
footer
|
|
895
957
|
]
|
|
896
958
|
}
|
|
897
959
|
);
|
|
898
960
|
};
|
|
899
961
|
|
|
900
962
|
// src/overlays/ModalSurface.tsx
|
|
901
|
-
var
|
|
963
|
+
var import_react21 = require("@fluentui/react");
|
|
902
964
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
903
965
|
var ModalSurface = ({
|
|
904
966
|
isOpen,
|
|
@@ -913,7 +975,7 @@ var ModalSurface = ({
|
|
|
913
975
|
children
|
|
914
976
|
}) => {
|
|
915
977
|
const main = autoSize ? { width: "auto", minWidth: MODAL_AUTOSIZE_MIN_WIDTH, maxWidth: "100%" } : { maxWidth: "95vw", width: `${dialogWidthPx({ width, size })}px` };
|
|
916
|
-
const styles = (0,
|
|
978
|
+
const styles = (0, import_react21.mergeStyleSets)({
|
|
917
979
|
title: {
|
|
918
980
|
fontSize: import_design_tokens.typography.fontSize.lg,
|
|
919
981
|
fontWeight: import_design_tokens.typography.fontWeight.semibold,
|
|
@@ -921,24 +983,17 @@ var ModalSurface = ({
|
|
|
921
983
|
color: import_design_tokens.colors.textPrimary,
|
|
922
984
|
padding: "16px 20px 0"
|
|
923
985
|
},
|
|
924
|
-
content: { padding: 20 }
|
|
925
|
-
footer: {
|
|
926
|
-
borderTop: `1px solid ${import_design_tokens.colors.borderNeutral}`,
|
|
927
|
-
padding: "12px 20px",
|
|
928
|
-
display: "flex",
|
|
929
|
-
justifyContent: "flex-end",
|
|
930
|
-
gap: 8
|
|
931
|
-
}
|
|
986
|
+
content: { padding: 20 }
|
|
932
987
|
});
|
|
933
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react21.Modal, { isOpen, onDismiss, isBlocking, className, styles: { main }, children: [
|
|
934
989
|
title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: styles.title, children: title }),
|
|
935
990
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: styles.content, children }),
|
|
936
|
-
footer
|
|
991
|
+
footer
|
|
937
992
|
] });
|
|
938
993
|
};
|
|
939
994
|
|
|
940
995
|
// src/overlays/PanelSurface.tsx
|
|
941
|
-
var
|
|
996
|
+
var import_react22 = require("@fluentui/react");
|
|
942
997
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
943
998
|
var PanelSurface = ({
|
|
944
999
|
isOpen,
|
|
@@ -954,10 +1009,10 @@ var PanelSurface = ({
|
|
|
954
1009
|
children
|
|
955
1010
|
}) => {
|
|
956
1011
|
const kind = panelType ?? panelKindFromWidth(width);
|
|
957
|
-
const resolvedType =
|
|
1012
|
+
const resolvedType = import_react22.PanelType[kind];
|
|
958
1013
|
const customWidth = kind === "custom" || kind === "customNear" ? `${panelCustomWidthPx(width)}px` : void 0;
|
|
959
1014
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
960
|
-
|
|
1015
|
+
import_react22.Panel,
|
|
961
1016
|
{
|
|
962
1017
|
isOpen,
|
|
963
1018
|
onDismiss,
|
|
@@ -975,7 +1030,7 @@ var PanelSurface = ({
|
|
|
975
1030
|
};
|
|
976
1031
|
|
|
977
1032
|
// src/overlays/CalloutSurface.tsx
|
|
978
|
-
var
|
|
1033
|
+
var import_react23 = require("@fluentui/react");
|
|
979
1034
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
980
1035
|
var CalloutSurface = ({
|
|
981
1036
|
target,
|
|
@@ -991,11 +1046,11 @@ var CalloutSurface = ({
|
|
|
991
1046
|
}) => {
|
|
992
1047
|
if (!isOpen) return null;
|
|
993
1048
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
994
|
-
|
|
1049
|
+
import_react23.Callout,
|
|
995
1050
|
{
|
|
996
1051
|
target: target ?? void 0,
|
|
997
1052
|
onDismiss,
|
|
998
|
-
directionalHint:
|
|
1053
|
+
directionalHint: import_react23.DirectionalHint[directionalHint],
|
|
999
1054
|
isBeakVisible,
|
|
1000
1055
|
beakWidth,
|
|
1001
1056
|
gapSpace,
|
|
@@ -1007,22 +1062,22 @@ var CalloutSurface = ({
|
|
|
1007
1062
|
};
|
|
1008
1063
|
|
|
1009
1064
|
// src/overlays/TooltipSurface.tsx
|
|
1010
|
-
var
|
|
1065
|
+
var import_react24 = require("@fluentui/react");
|
|
1011
1066
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1012
1067
|
var DELAY_MAP = {
|
|
1013
|
-
zero:
|
|
1014
|
-
medium:
|
|
1015
|
-
long:
|
|
1068
|
+
zero: import_react24.TooltipDelay.zero,
|
|
1069
|
+
medium: import_react24.TooltipDelay.medium,
|
|
1070
|
+
long: import_react24.TooltipDelay.long
|
|
1016
1071
|
};
|
|
1017
1072
|
var TooltipSurface = ({
|
|
1018
1073
|
content,
|
|
1019
1074
|
directionalHint = "bottomCenter",
|
|
1020
1075
|
delay = "medium",
|
|
1021
1076
|
children
|
|
1022
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1077
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react24.TooltipHost, { content, directionalHint: import_react24.DirectionalHint[directionalHint], delay: DELAY_MAP[delay], children });
|
|
1023
1078
|
|
|
1024
1079
|
// src/composites/MasterDetailSurface.tsx
|
|
1025
|
-
var
|
|
1080
|
+
var import_react25 = require("@fluentui/react");
|
|
1026
1081
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1027
1082
|
var MasterDetailSurface = ({
|
|
1028
1083
|
master,
|
|
@@ -1035,7 +1090,7 @@ var MasterDetailSurface = ({
|
|
|
1035
1090
|
const masterFr = Math.min(90, Math.max(10, Math.round(splitRatio * 100)));
|
|
1036
1091
|
const detailFr = 100 - masterFr;
|
|
1037
1092
|
const collapsePx = BREAKPOINTS[collapseBelow];
|
|
1038
|
-
const rootCls = (0,
|
|
1093
|
+
const rootCls = (0, import_react25.mergeStyles)(
|
|
1039
1094
|
{
|
|
1040
1095
|
display: "grid",
|
|
1041
1096
|
gridTemplateColumns: `${masterFr}fr ${detailFr}fr`,
|
|
@@ -1044,7 +1099,7 @@ var MasterDetailSurface = ({
|
|
|
1044
1099
|
},
|
|
1045
1100
|
className
|
|
1046
1101
|
);
|
|
1047
|
-
const masterCls = (0,
|
|
1102
|
+
const masterCls = (0, import_react25.mergeStyles)({
|
|
1048
1103
|
minWidth: 0,
|
|
1049
1104
|
overflow: "auto",
|
|
1050
1105
|
borderRight: `1px solid ${import_design_tokens.colors.borderNeutral}`,
|
|
@@ -1055,7 +1110,7 @@ var MasterDetailSurface = ({
|
|
|
1055
1110
|
}
|
|
1056
1111
|
}
|
|
1057
1112
|
});
|
|
1058
|
-
const detailCls = (0,
|
|
1113
|
+
const detailCls = (0, import_react25.mergeStyles)({ minWidth: 0, overflow: "auto" });
|
|
1059
1114
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: rootCls, children: [
|
|
1060
1115
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: masterCls, children: master }),
|
|
1061
1116
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: detailCls, children: detail ?? detailFallback })
|
|
@@ -1063,10 +1118,10 @@ var MasterDetailSurface = ({
|
|
|
1063
1118
|
};
|
|
1064
1119
|
|
|
1065
1120
|
// src/composites/DashboardSurface.tsx
|
|
1066
|
-
var
|
|
1121
|
+
var import_react26 = require("@fluentui/react");
|
|
1067
1122
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1068
1123
|
var DashboardSurface = ({ tiles, columns = 2, gap = 16, className }) => {
|
|
1069
|
-
const cls = (0,
|
|
1124
|
+
const cls = (0, import_react26.mergeStyles)(
|
|
1070
1125
|
{
|
|
1071
1126
|
display: "grid",
|
|
1072
1127
|
gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`,
|