@dataverse-kit/surface-kit 0.1.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 ADDED
@@ -0,0 +1,1202 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ ActionBar: () => ActionBar,
24
+ BREAKPOINTS: () => BREAKPOINTS,
25
+ CALLOUT_DEFAULT_WIDTH: () => CALLOUT_DEFAULT_WIDTH,
26
+ CARD_REFLOW_WIDTH: () => CARD_REFLOW_WIDTH,
27
+ CalloutSurface: () => CalloutSurface,
28
+ ColumnLayout: () => ColumnLayout,
29
+ CommandSurface: () => CommandSurface,
30
+ DIALOG_SIZE_PX: () => DIALOG_SIZE_PX,
31
+ DashboardSurface: () => DashboardSurface,
32
+ FieldRow: () => FieldRow,
33
+ Footer: () => Footer,
34
+ FormDialogSurface: () => FormDialogSurface,
35
+ FormHeader: () => FormHeader,
36
+ FormSurface: () => FormSurface,
37
+ MODAL_AUTOSIZE_MIN_WIDTH: () => MODAL_AUTOSIZE_MIN_WIDTH,
38
+ MasterDetailSurface: () => MasterDetailSurface,
39
+ ModalSurface: () => ModalSurface,
40
+ PANEL_DEFAULT_WIDTH: () => PANEL_DEFAULT_WIDTH,
41
+ PageSurface: () => PageSurface,
42
+ PanelSurface: () => PanelSurface,
43
+ PivotSurface: () => PivotSurface,
44
+ Section: () => Section,
45
+ SectionCard: () => SectionCard,
46
+ SectionHeader: () => SectionHeader,
47
+ TooltipSurface: () => TooltipSurface,
48
+ TwoColumnLayout: () => TwoColumnLayout,
49
+ calloutFormDefaults: () => calloutFormDefaults,
50
+ calloutWidthPx: () => calloutWidthPx,
51
+ clampSpan: () => clampSpan,
52
+ colors: () => colors,
53
+ createDynamicsTheme: () => createDynamicsTheme,
54
+ densityScale: () => densityScale,
55
+ dialogHeightCss: () => dialogHeightCss,
56
+ dialogWidthCss: () => dialogWidthCss,
57
+ dialogWidthPx: () => dialogWidthPx,
58
+ fieldGridStyle: () => fieldGridStyle,
59
+ fieldRowStyle: () => fieldRowStyle,
60
+ fromFormDefinition: () => fromFormDefinition,
61
+ gridTemplateForColumns: () => gridTemplateForColumns,
62
+ layout: () => layout,
63
+ panelCustomWidthPx: () => panelCustomWidthPx,
64
+ panelKindFromWidth: () => panelKindFromWidth,
65
+ radius: () => radius,
66
+ resolveBreakpoint: () => resolveBreakpoint,
67
+ resolveResponsiveValue: () => resolveResponsiveValue,
68
+ scaleSpacing: () => scaleSpacing,
69
+ sectionStackingStyle: () => sectionStackingStyle,
70
+ spacing: () => spacing,
71
+ typography: () => typography,
72
+ useContainerBreakpoint: () => useContainerBreakpoint,
73
+ useContainerSize: () => useContainerSize,
74
+ useContainerWidth: () => useContainerWidth,
75
+ useMediaQuery: () => useMediaQuery,
76
+ useResponsiveValue: () => useResponsiveValue
77
+ });
78
+ module.exports = __toCommonJS(src_exports);
79
+
80
+ // src/core/sizePresets.ts
81
+ var DIALOG_SIZE_PX = {
82
+ sm: 600,
83
+ md: 900,
84
+ lg: 1200,
85
+ xl: 1600
86
+ };
87
+ function dialogWidthPx(opts = {}) {
88
+ if (typeof opts.width === "number") return opts.width;
89
+ const size = opts.size ?? "lg";
90
+ if (size === "fullscreen") return DIALOG_SIZE_PX.xl;
91
+ return DIALOG_SIZE_PX[size];
92
+ }
93
+ function dialogWidthCss(opts = {}) {
94
+ if (opts.size === "fullscreen" && opts.width == null) return "95vw";
95
+ return `${dialogWidthPx(opts)}px`;
96
+ }
97
+ function dialogHeightCss(height) {
98
+ return height != null && height <= 100 ? `${height}vh` : "95vh";
99
+ }
100
+ var MODAL_AUTOSIZE_MIN_WIDTH = 1e3;
101
+ var PANEL_DEFAULT_WIDTH = 480;
102
+ function panelKindFromWidth(width) {
103
+ return (width ?? PANEL_DEFAULT_WIDTH) > 500 ? "medium" : "custom";
104
+ }
105
+ function panelCustomWidthPx(width) {
106
+ return width ?? PANEL_DEFAULT_WIDTH;
107
+ }
108
+ var CALLOUT_DEFAULT_WIDTH = 320;
109
+ var calloutFormDefaults = {
110
+ width: CALLOUT_DEFAULT_WIDTH,
111
+ directionalHint: "bottomLeftEdge"
112
+ };
113
+ function calloutWidthPx(width) {
114
+ return width ?? CALLOUT_DEFAULT_WIDTH;
115
+ }
116
+
117
+ // src/core/columns.ts
118
+ function gridTemplateForColumns(columns) {
119
+ return `repeat(${columns}, 1fr)`;
120
+ }
121
+ function clampSpan(span, columns) {
122
+ if (!Number.isFinite(span)) return 1;
123
+ return Math.max(1, Math.min(Math.round(span), columns));
124
+ }
125
+
126
+ // src/responsive/breakpoints.ts
127
+ var BREAKPOINTS = {
128
+ xs: 0,
129
+ sm: 480,
130
+ md: 768,
131
+ lg: 1024,
132
+ xl: 1366
133
+ };
134
+ var CARD_REFLOW_WIDTH = 900;
135
+ var DESCENDING = ["xl", "lg", "md", "sm", "xs"];
136
+ var ASCENDING = ["xs", "sm", "md", "lg", "xl"];
137
+ function resolveBreakpoint(width) {
138
+ for (const bp of DESCENDING) {
139
+ if (width >= BREAKPOINTS[bp]) return bp;
140
+ }
141
+ return "xs";
142
+ }
143
+ function isResponsiveMap(v) {
144
+ return typeof v === "object" && v !== null && ASCENDING.some((bp) => bp in v);
145
+ }
146
+ function resolveResponsiveValue(value, breakpoint) {
147
+ if (!isResponsiveMap(value)) return value;
148
+ const map = value;
149
+ const idx = ASCENDING.indexOf(breakpoint);
150
+ for (let i = idx; i >= 0; i--) {
151
+ const v = map[ASCENDING[i]];
152
+ if (v !== void 0) return v;
153
+ }
154
+ for (let i = idx + 1; i < ASCENDING.length; i++) {
155
+ const v = map[ASCENDING[i]];
156
+ if (v !== void 0) return v;
157
+ }
158
+ return void 0;
159
+ }
160
+
161
+ // src/responsive/builders.ts
162
+ function atRule(mode, maxPx) {
163
+ return mode === "container" ? `@container (max-width: ${maxPx}px)` : `@media (max-width: ${maxPx}px)`;
164
+ }
165
+ function fieldGridStyle(columns, mode = "media") {
166
+ const capped = Math.min(columns, 2);
167
+ return {
168
+ display: "grid",
169
+ gridTemplateColumns: gridTemplateForColumns(columns),
170
+ gap: "4px 24px",
171
+ selectors: {
172
+ [atRule(mode, BREAKPOINTS.md)]: { gridTemplateColumns: gridTemplateForColumns(capped) },
173
+ [atRule(mode, BREAKPOINTS.sm)]: { gridTemplateColumns: "1fr" }
174
+ }
175
+ };
176
+ }
177
+ function sectionStackingStyle(gridTemplateColumns, mode = "media") {
178
+ return {
179
+ display: "grid",
180
+ gridTemplateColumns,
181
+ gap: 16,
182
+ alignItems: "start",
183
+ selectors: {
184
+ [atRule(mode, BREAKPOINTS.md)]: { gridTemplateColumns: "1fr" }
185
+ }
186
+ };
187
+ }
188
+ function fieldRowStyle(labelWidth = "130px", mode = "media") {
189
+ return {
190
+ display: "grid",
191
+ gridTemplateColumns: `${labelWidth} 1fr`,
192
+ alignItems: "center",
193
+ gap: 8,
194
+ minHeight: 38,
195
+ selectors: {
196
+ [atRule(mode, BREAKPOINTS.sm)]: { gridTemplateColumns: "1fr", alignItems: "flex-start", minHeight: 0, gap: 4 }
197
+ }
198
+ };
199
+ }
200
+
201
+ // src/tokens/tokens.ts
202
+ var colors = {
203
+ brand: "#0078d4",
204
+ brandHover: "#106ebe",
205
+ brandDark: "#005a9e",
206
+ borderNeutral: "#edebe9",
207
+ textPrimary: "#323130",
208
+ textSecondary: "#605e5c",
209
+ surface: "#ffffff",
210
+ surfaceAlt: "#f5f5f5",
211
+ // App canvas behind cards/forms (matches the Dynamics model-driven form background).
212
+ canvas: "#fafafa",
213
+ // Required-field asterisk / error accent (Fluent error red).
214
+ danger: "#a4262c",
215
+ // Field input: subtle idle fill + neutral border (Dynamics-style).
216
+ fieldFill: "#faf9f8",
217
+ fieldFillReadonly: "#f3f2f1",
218
+ fieldBorder: "#e1dfdd"
219
+ };
220
+ var spacing = {
221
+ xs: 4,
222
+ sm: 8,
223
+ md: 12,
224
+ lg: 16,
225
+ xl: 24,
226
+ xxl: 40
227
+ };
228
+ var typography = {
229
+ fontFamily: '"Segoe UI", Arial, sans-serif',
230
+ fontFamilySemibold: '"Segoe UI Semibold", "Segoe UI", sans-serif',
231
+ fontSize: {
232
+ sm: "12px",
233
+ smPlus: "13px",
234
+ md: "14px",
235
+ lg: "17px"
236
+ },
237
+ fontWeight: {
238
+ regular: 400,
239
+ semibold: 600
240
+ }
241
+ };
242
+ var radius = {
243
+ card: "4px",
244
+ // Softer rounding for the outer form shell (matches Dynamics cards).
245
+ lg: "8px"
246
+ };
247
+ var layout = {
248
+ // Width of the label column in a two-column "Label : input" field row.
249
+ labelColWidth: "130px"
250
+ };
251
+
252
+ // src/tokens/theme.ts
253
+ var import_react = require("@fluentui/react");
254
+ function createDynamicsTheme() {
255
+ return (0, import_react.createTheme)({
256
+ palette: {
257
+ themePrimary: colors.brand,
258
+ themeDarkAlt: colors.brandHover,
259
+ themeDark: colors.brandDark,
260
+ themeDarker: colors.brandDark,
261
+ neutralPrimary: colors.textPrimary,
262
+ neutralSecondary: colors.textSecondary,
263
+ neutralLight: colors.borderNeutral,
264
+ neutralLighter: colors.surfaceAlt,
265
+ white: colors.surface,
266
+ redDark: colors.danger
267
+ },
268
+ defaultFontStyle: {
269
+ fontFamily: typography.fontFamily
270
+ },
271
+ semanticColors: {
272
+ errorText: colors.danger,
273
+ inputBorder: colors.fieldBorder,
274
+ inputBackground: colors.fieldFill,
275
+ bodyBackground: colors.surface
276
+ }
277
+ });
278
+ }
279
+
280
+ // src/tokens/density.ts
281
+ var densityScale = {
282
+ comfortable: 1,
283
+ compact: 0.75
284
+ };
285
+ function scaleSpacing(value, density = "comfortable") {
286
+ return Math.round(value * densityScale[density]);
287
+ }
288
+
289
+ // src/hooks/useContainerSize.ts
290
+ var import_react2 = require("react");
291
+ function useContainerSize(ref) {
292
+ const [size, setSize] = (0, import_react2.useState)({ width: 0, height: 0, inlineSize: 0, blockSize: 0 });
293
+ (0, import_react2.useEffect)(() => {
294
+ if (!ref.current || typeof ResizeObserver === "undefined") return;
295
+ const observer = new ResizeObserver((entries) => {
296
+ for (const entry of entries) {
297
+ const { width, height } = entry.contentRect;
298
+ const inlineSize = entry.borderBoxSize?.[0]?.inlineSize ?? width;
299
+ const blockSize = entry.borderBoxSize?.[0]?.blockSize ?? height;
300
+ setSize({ width, height, inlineSize, blockSize });
301
+ }
302
+ });
303
+ observer.observe(ref.current);
304
+ return () => observer.disconnect();
305
+ }, [ref]);
306
+ return size;
307
+ }
308
+
309
+ // src/hooks/useContainerWidth.ts
310
+ var import_react3 = require("react");
311
+ function useContainerWidth() {
312
+ const ref = (0, import_react3.useRef)(null);
313
+ const { width } = useContainerSize(ref);
314
+ return [ref, width];
315
+ }
316
+
317
+ // src/hooks/useContainerBreakpoint.ts
318
+ function useContainerBreakpoint() {
319
+ const [ref, width] = useContainerWidth();
320
+ return [ref, resolveBreakpoint(width), width];
321
+ }
322
+
323
+ // src/hooks/useResponsiveValue.ts
324
+ function useResponsiveValue(value) {
325
+ const [ref, breakpoint] = useContainerBreakpoint();
326
+ return [ref, resolveResponsiveValue(value, breakpoint)];
327
+ }
328
+
329
+ // src/hooks/useMediaQuery.ts
330
+ var import_react4 = require("react");
331
+ function useMediaQuery(query) {
332
+ const [matches, setMatches] = (0, import_react4.useState)(() => {
333
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
334
+ return window.matchMedia(query).matches;
335
+ });
336
+ (0, import_react4.useEffect)(() => {
337
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
338
+ const mql = window.matchMedia(query);
339
+ const onChange = () => setMatches(mql.matches);
340
+ onChange();
341
+ mql.addEventListener("change", onChange);
342
+ return () => mql.removeEventListener("change", onChange);
343
+ }, [query]);
344
+ return matches;
345
+ }
346
+
347
+ // src/layouts/ColumnLayout.tsx
348
+ var import_react5 = require("@fluentui/react");
349
+ var import_jsx_runtime = require("react/jsx-runtime");
350
+ var ColumnLayout = ({
351
+ columns,
352
+ gap = "4px 24px",
353
+ responsive = true,
354
+ mode = "media",
355
+ className,
356
+ style,
357
+ children
358
+ }) => {
359
+ const base = responsive ? fieldGridStyle(columns, mode) : { display: "grid", gridTemplateColumns: gridTemplateForColumns(columns) };
360
+ const cls = (0, import_react5.mergeStyles)(base, { gap }, className);
361
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cls, style, children });
362
+ };
363
+
364
+ // src/layouts/TwoColumnLayout.tsx
365
+ var import_react6 = require("@fluentui/react");
366
+ var import_jsx_runtime2 = require("react/jsx-runtime");
367
+ var TwoColumnLayout = ({
368
+ gap = 16,
369
+ collapseBelow = "sm",
370
+ className,
371
+ style,
372
+ children
373
+ }) => {
374
+ const cls = (0, import_react6.mergeStyles)(
375
+ {
376
+ display: "grid",
377
+ gridTemplateColumns: "1fr 1fr",
378
+ gap,
379
+ alignItems: "start",
380
+ selectors: {
381
+ [`@media (max-width: ${BREAKPOINTS[collapseBelow]}px)`]: { gridTemplateColumns: "1fr" }
382
+ }
383
+ },
384
+ className
385
+ );
386
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cls, style, children });
387
+ };
388
+
389
+ // src/layouts/FieldRow.tsx
390
+ var import_react7 = require("@fluentui/react");
391
+ var import_jsx_runtime3 = require("react/jsx-runtime");
392
+ var FieldRow = ({
393
+ label,
394
+ required,
395
+ fullWidth,
396
+ labelWidth = "130px",
397
+ labelPosition = "beside",
398
+ className,
399
+ children
400
+ }) => {
401
+ const styles = (0, import_react7.mergeStyleSets)({
402
+ // The beside layout IS the shared responsive builder (130px label grid + @480
403
+ // stack) — no hand-written breakpoint here.
404
+ rowBeside: fieldRowStyle(labelWidth, "media"),
405
+ rowAbove: {
406
+ display: "grid",
407
+ gridTemplateColumns: "1fr",
408
+ gap: 2,
409
+ minHeight: 38
410
+ },
411
+ label: {
412
+ fontSize: typography.fontSize.sm,
413
+ fontWeight: typography.fontWeight.semibold,
414
+ color: colors.textPrimary,
415
+ fontFamily: typography.fontFamily,
416
+ lineHeight: "1.3",
417
+ wordBreak: "break-word"
418
+ },
419
+ required: { color: colors.danger, marginLeft: 2, fontWeight: typography.fontWeight.semibold },
420
+ full: { gridColumn: "1 / -1" }
421
+ });
422
+ const cls = [
423
+ labelPosition === "above" ? styles.rowAbove : styles.rowBeside,
424
+ fullWidth ? styles.full : "",
425
+ className
426
+ ].filter(Boolean).join(" ");
427
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cls, children: [
428
+ label != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: styles.label, children: [
429
+ label,
430
+ required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: styles.required, children: "*" })
431
+ ] }),
432
+ children
433
+ ] });
434
+ };
435
+
436
+ // src/containers/FormSurface.tsx
437
+ var import_react8 = require("@fluentui/react");
438
+
439
+ // src/internal/styles.ts
440
+ var sharedTitleStyle = {
441
+ fontWeight: typography.fontWeight.semibold,
442
+ fontSize: typography.fontSize.md,
443
+ color: colors.textPrimary,
444
+ fontFamily: typography.fontFamilySemibold,
445
+ paddingBottom: 0,
446
+ marginBottom: 0
447
+ };
448
+ var dynamicsCardStyle = {
449
+ background: colors.surface,
450
+ border: `1px solid ${colors.borderNeutral}`,
451
+ borderRadius: radius.card,
452
+ overflow: "hidden"
453
+ };
454
+ var cardShadow = "0 1.6px 3.6px rgba(0, 0, 0, 0.08), 0 0.3px 0.9px rgba(0, 0, 0, 0.05)";
455
+ function stackChildrenBelow(maxPx) {
456
+ return {
457
+ selectors: {
458
+ [`@media (max-width: ${maxPx}px)`]: {
459
+ selectors: { "> *": { gridColumn: "1 / -1" } }
460
+ }
461
+ }
462
+ };
463
+ }
464
+
465
+ // src/containers/FormSurface.tsx
466
+ var import_jsx_runtime4 = require("react/jsx-runtime");
467
+ var FormSurface = ({
468
+ columns = 12,
469
+ gap = 20,
470
+ padding = 20,
471
+ background = colors.canvas,
472
+ containerWidth,
473
+ collapseBelow = "sm",
474
+ maxWidth,
475
+ className,
476
+ style,
477
+ children
478
+ }) => {
479
+ const collapsePx = BREAKPOINTS[collapseBelow];
480
+ const forceStack = containerWidth != null && containerWidth <= collapsePx;
481
+ const cls = (0, import_react8.mergeStyles)(
482
+ {
483
+ display: "grid",
484
+ gridTemplateColumns: forceStack ? "1fr" : `repeat(${columns}, 1fr)`,
485
+ gap,
486
+ padding,
487
+ background,
488
+ alignItems: "start",
489
+ ...maxWidth != null ? { maxWidth, marginLeft: "auto", marginRight: "auto" } : {},
490
+ // When the container forces a single column, reset child spans the same way the
491
+ // viewport fallback does — otherwise a Section with `columnStart` references grid
492
+ // lines that no longer exist and escapes the stack. (Mutually exclusive with the
493
+ // @media fallback below, which only applies when containerWidth is unset.)
494
+ ...forceStack ? { selectors: { "> *": { gridColumn: "1 / -1" } } } : {},
495
+ // Viewport fallback only when the container width isn't explicitly provided.
496
+ ...containerWidth == null ? stackChildrenBelow(collapsePx) : {}
497
+ },
498
+ className
499
+ );
500
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cls, style, children });
501
+ };
502
+
503
+ // src/containers/PageSurface.tsx
504
+ var import_jsx_runtime5 = require("react/jsx-runtime");
505
+ var PageSurface = ({ centered, maxWidth, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FormSurface, { maxWidth: maxWidth ?? (centered ? 1200 : void 0), ...rest });
506
+
507
+ // src/containers/Section.tsx
508
+ var import_react10 = require("react");
509
+ var import_react11 = require("@fluentui/react");
510
+
511
+ // src/containers/SectionHeader.tsx
512
+ var import_react9 = require("@fluentui/react");
513
+ var import_jsx_runtime6 = require("react/jsx-runtime");
514
+ var SectionHeader = ({
515
+ title,
516
+ statusText,
517
+ showCommandBar,
518
+ commandBarItems = [],
519
+ actions,
520
+ collapsible,
521
+ collapsed,
522
+ onToggle
523
+ }) => {
524
+ const styles = (0, import_react9.mergeStyleSets)({
525
+ root: {
526
+ display: "flex",
527
+ justifyContent: "space-between",
528
+ alignItems: "center",
529
+ flexWrap: "nowrap",
530
+ borderBottom: `1px solid ${colors.borderNeutral}`,
531
+ marginBottom: 16,
532
+ minHeight: 48,
533
+ width: "100%"
534
+ },
535
+ left: { display: "flex", alignItems: "center", gap: 8, minWidth: 0 },
536
+ title: sharedTitleStyle,
537
+ status: { marginLeft: 8, fontSize: "0.9em", color: colors.textSecondary },
538
+ chevron: {
539
+ cursor: "pointer",
540
+ border: "none",
541
+ background: "transparent",
542
+ padding: 4,
543
+ display: "flex",
544
+ alignItems: "center",
545
+ color: colors.textSecondary
546
+ }
547
+ });
548
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: styles.root, children: [
549
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: styles.left, children: [
550
+ collapsible && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
551
+ "button",
552
+ {
553
+ type: "button",
554
+ className: styles.chevron,
555
+ onClick: onToggle,
556
+ "aria-label": collapsed ? "Expand section" : "Collapse section",
557
+ "aria-expanded": !collapsed,
558
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react9.Icon, { iconName: collapsed ? "ChevronRight" : "ChevronDown" })
559
+ }
560
+ ),
561
+ title && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: styles.title, children: title }),
562
+ statusText && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: styles.status, children: statusText })
563
+ ] }),
564
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { children: actions }) : showCommandBar && commandBarItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
565
+ import_react9.CommandBar,
566
+ {
567
+ items: commandBarItems.slice(0, 2),
568
+ overflowItems: commandBarItems.slice(2),
569
+ styles: { root: { background: "transparent", padding: 0, height: "auto" } }
570
+ }
571
+ ) : null
572
+ ] });
573
+ };
574
+
575
+ // src/containers/Section.tsx
576
+ var import_jsx_runtime7 = require("react/jsx-runtime");
577
+ var Section = ({
578
+ title,
579
+ columnSpan = 12,
580
+ columnStart,
581
+ rowPosition,
582
+ internalColumns = 12,
583
+ showCommandBar,
584
+ commandBarItems,
585
+ statusText,
586
+ notification,
587
+ collapsible,
588
+ defaultCollapsed = false,
589
+ collapsed: controlledCollapsed,
590
+ onCollapsedChange,
591
+ variant = "card",
592
+ minHeight = 80,
593
+ className,
594
+ style,
595
+ children
596
+ }) => {
597
+ const [internalCollapsed, setInternalCollapsed] = (0, import_react10.useState)(defaultCollapsed);
598
+ const collapsed = controlledCollapsed ?? internalCollapsed;
599
+ const toggle = () => {
600
+ const next = !collapsed;
601
+ if (controlledCollapsed == null) setInternalCollapsed(next);
602
+ onCollapsedChange?.(next);
603
+ };
604
+ const gridColumn = columnStart ? `${columnStart} / span ${columnSpan}` : `span ${columnSpan}`;
605
+ const rootStyle = {
606
+ gridColumn,
607
+ ...rowPosition ? { gridRowStart: rowPosition } : {},
608
+ ...style
609
+ };
610
+ const styles = (0, import_react11.mergeStyleSets)({
611
+ card: { ...dynamicsCardStyle, boxShadow: cardShadow, padding: "3px 20px 20px 20px", minWidth: 300, width: "100%" },
612
+ flat: {
613
+ background: colors.surface,
614
+ borderRadius: radius.card,
615
+ padding: "3px 20px 20px 20px",
616
+ minWidth: 300,
617
+ width: "100%",
618
+ overflow: "hidden"
619
+ },
620
+ placeholder: {
621
+ border: `1px dashed ${colors.borderNeutral}`,
622
+ borderRadius: radius.card,
623
+ minHeight,
624
+ width: "100%",
625
+ background: "transparent"
626
+ },
627
+ notification: { marginBottom: 8 },
628
+ body: {
629
+ display: "grid",
630
+ gridTemplateColumns: `repeat(${internalColumns}, 1fr)`,
631
+ gap: 7,
632
+ alignItems: "start",
633
+ selectors: {
634
+ [`@media (max-width: ${BREAKPOINTS.sm}px)`]: { selectors: { "> *": { gridColumn: "1 / -1" } } }
635
+ }
636
+ }
637
+ });
638
+ if (variant === "placeholder") {
639
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: [styles.placeholder, className].filter(Boolean).join(" "), style: rootStyle });
640
+ }
641
+ const showHeader = Boolean(title) || showCommandBar || collapsible;
642
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: [variant === "flat" ? styles.flat : styles.card, className].filter(Boolean).join(" "), style: rootStyle, children: [
643
+ notification && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: styles.notification, children: notification }),
644
+ showHeader && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
645
+ SectionHeader,
646
+ {
647
+ title,
648
+ statusText,
649
+ showCommandBar,
650
+ commandBarItems,
651
+ collapsible,
652
+ collapsed,
653
+ onToggle: toggle
654
+ }
655
+ ),
656
+ !collapsed && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: styles.body, children })
657
+ ] });
658
+ };
659
+
660
+ // src/containers/SectionCard.tsx
661
+ var import_jsx_runtime8 = require("react/jsx-runtime");
662
+ var SectionCard = ({
663
+ accentColor = colors.brand,
664
+ accentWidth = 3,
665
+ variant = "card",
666
+ style,
667
+ ...rest
668
+ }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
669
+ Section,
670
+ {
671
+ variant,
672
+ ...rest,
673
+ style: { borderTop: `${accentWidth}px solid ${accentColor}`, ...style }
674
+ }
675
+ );
676
+
677
+ // src/containers/FormHeader.tsx
678
+ var import_react12 = require("@fluentui/react");
679
+ var import_jsx_runtime9 = require("react/jsx-runtime");
680
+ var FormHeader = ({
681
+ title,
682
+ subtitle,
683
+ status,
684
+ titleColor,
685
+ subtitleColor,
686
+ persona,
687
+ actions,
688
+ className
689
+ }) => {
690
+ const styles = (0, import_react12.mergeStyleSets)({
691
+ root: {
692
+ display: "flex",
693
+ alignItems: "center",
694
+ justifyContent: "space-between",
695
+ gap: 12,
696
+ padding: "12px 24px",
697
+ borderBottom: `1px solid ${colors.borderNeutral}`,
698
+ background: colors.surface
699
+ },
700
+ main: { display: "flex", alignItems: "center", gap: 12, minWidth: 0 },
701
+ titleRow: { display: "flex", alignItems: "baseline", gap: 8, flexWrap: "wrap" },
702
+ title: {
703
+ fontSize: typography.fontSize.lg,
704
+ fontWeight: typography.fontWeight.semibold,
705
+ fontFamily: typography.fontFamilySemibold,
706
+ color: titleColor || colors.textPrimary,
707
+ lineHeight: "1.3"
708
+ },
709
+ status: { fontSize: typography.fontSize.smPlus, color: colors.textSecondary },
710
+ subtitle: { fontSize: typography.fontSize.smPlus, color: subtitleColor || colors.textSecondary, marginTop: 2 }
711
+ });
712
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: [styles.root, className].filter(Boolean).join(" "), children: [
713
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.main, children: [
714
+ persona,
715
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
716
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.titleRow, children: [
717
+ title != null && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: styles.title, children: title }),
718
+ status != null && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: styles.status, children: status })
719
+ ] }),
720
+ subtitle != null && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: styles.subtitle, children: subtitle })
721
+ ] })
722
+ ] }),
723
+ actions != null && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: actions })
724
+ ] });
725
+ };
726
+
727
+ // src/containers/PivotSurface.tsx
728
+ var import_react13 = require("react");
729
+ var import_react14 = require("@fluentui/react");
730
+ var import_jsx_runtime10 = require("react/jsx-runtime");
731
+ var PivotSurface = ({
732
+ tabs,
733
+ selectedId,
734
+ defaultSelectedId,
735
+ onTabChange,
736
+ linkFormat = "links",
737
+ className
738
+ }) => {
739
+ const firstEnabledId = tabs.find((t) => !t.disabled)?.id ?? tabs[0]?.id;
740
+ const [internal, setInternal] = (0, import_react13.useState)(defaultSelectedId ?? firstEnabledId);
741
+ const selected = selectedId ?? internal;
742
+ const handleLinkClick = (item) => {
743
+ const id = item?.props.itemKey;
744
+ if (!id) return;
745
+ if (selectedId == null) setInternal(id);
746
+ onTabChange?.(id);
747
+ };
748
+ const active = tabs.find((t) => t.id === selected) ?? tabs[0];
749
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className, children: [
750
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
751
+ import_react14.Pivot,
752
+ {
753
+ selectedKey: selected,
754
+ onLinkClick: handleLinkClick,
755
+ linkFormat,
756
+ headersOnly: true,
757
+ children: tabs.map((t) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
758
+ import_react14.PivotItem,
759
+ {
760
+ itemKey: t.id,
761
+ headerText: t.label,
762
+ itemIcon: t.iconName,
763
+ headerButtonProps: t.disabled ? { disabled: true } : void 0
764
+ },
765
+ t.id
766
+ ))
767
+ }
768
+ ),
769
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: active?.content })
770
+ ] });
771
+ };
772
+
773
+ // src/containers/CommandSurface.tsx
774
+ var import_react15 = require("@fluentui/react");
775
+ var import_jsx_runtime11 = require("react/jsx-runtime");
776
+ var CommandSurface = ({ items, overflowItems, farItems, className }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react15.CommandBar, { items, overflowItems, farItems, styles: { root: { padding: 0 } } }) });
777
+
778
+ // src/containers/ActionBar.tsx
779
+ var import_react16 = require("@fluentui/react");
780
+ var import_jsx_runtime12 = require("react/jsx-runtime");
781
+ function renderButton(b) {
782
+ const common = {
783
+ text: b.label,
784
+ disabled: b.disabled,
785
+ onClick: b.onClick,
786
+ iconProps: b.iconName ? { iconName: b.iconName } : void 0
787
+ };
788
+ if (b.appearance === "primary") return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react16.PrimaryButton, { ...common }, b.id);
789
+ if (b.appearance === "subtle") return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react16.ActionButton, { ...common }, b.id);
790
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react16.DefaultButton, { ...common }, b.id);
791
+ }
792
+ var ActionBar = ({ buttons, alignment = "right", sticky = true, className }) => {
793
+ const justify = alignment === "left" ? "flex-start" : alignment === "center" ? "center" : "flex-end";
794
+ const visible = buttons.filter((b) => !b.hidden);
795
+ const left = visible.filter((b) => b.position === "left");
796
+ const right = visible.filter((b) => b.position !== "left");
797
+ const cls = (0, import_react16.mergeStyles)(
798
+ {
799
+ display: "flex",
800
+ alignItems: "center",
801
+ justifyContent: left.length ? "space-between" : justify,
802
+ gap: 8,
803
+ padding: "12px 24px",
804
+ borderTop: `1px solid ${colors.borderNeutral}`,
805
+ background: colors.surface,
806
+ ...sticky ? { position: "sticky", bottom: 0, zIndex: 1 } : {}
807
+ },
808
+ className
809
+ );
810
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: cls, children: [
811
+ left.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { display: "flex", gap: 8 }, children: left.map(renderButton) }),
812
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { display: "flex", gap: 8, justifyContent: justify }, children: right.map(renderButton) })
813
+ ] });
814
+ };
815
+
816
+ // src/containers/Footer.tsx
817
+ var import_react17 = require("@fluentui/react");
818
+ var import_jsx_runtime13 = require("react/jsx-runtime");
819
+ var Footer = ({ sticky = true, align = "right", className, children }) => {
820
+ const justify = align === "left" ? "flex-start" : align === "center" ? "center" : "flex-end";
821
+ const cls = (0, import_react17.mergeStyles)(
822
+ {
823
+ display: "flex",
824
+ alignItems: "center",
825
+ justifyContent: justify,
826
+ gap: 8,
827
+ padding: "12px 24px",
828
+ borderTop: `1px solid ${colors.borderNeutral}`,
829
+ background: colors.surface,
830
+ ...sticky ? { position: "sticky", bottom: 0, zIndex: 1 } : {}
831
+ },
832
+ className
833
+ );
834
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: cls, children });
835
+ };
836
+
837
+ // src/overlays/FormDialogSurface.tsx
838
+ var import_react18 = require("@fluentui/react");
839
+ var import_jsx_runtime14 = require("react/jsx-runtime");
840
+ var FormDialogSurface = ({
841
+ isOpen,
842
+ onDismiss,
843
+ title,
844
+ subheader,
845
+ size,
846
+ width,
847
+ height,
848
+ isBlocking = true,
849
+ recordCounter,
850
+ footer,
851
+ className,
852
+ children
853
+ }) => {
854
+ const widthCss = dialogWidthCss({ width, size });
855
+ const heightCss = dialogHeightCss(height);
856
+ const styles = (0, import_react18.mergeStyleSets)({
857
+ header: {
858
+ display: "flex",
859
+ alignItems: "center",
860
+ justifyContent: "space-between",
861
+ gap: 12,
862
+ padding: "12px 20px",
863
+ borderBottom: `1px solid ${colors.borderNeutral}`
864
+ },
865
+ headerLeft: { display: "flex", flexDirection: "column", minWidth: 0 },
866
+ title: {
867
+ fontSize: typography.fontSize.lg,
868
+ fontWeight: typography.fontWeight.semibold,
869
+ fontFamily: typography.fontFamilySemibold,
870
+ color: colors.textPrimary
871
+ },
872
+ subheader: { fontSize: typography.fontSize.smPlus, color: colors.textSecondary, marginTop: 2 },
873
+ headerRight: { display: "flex", alignItems: "center", gap: 8 },
874
+ counter: { fontSize: typography.fontSize.smPlus, color: colors.textSecondary },
875
+ content: { flex: 1, minHeight: 0, overflow: "auto", padding: 20 },
876
+ footer: { borderTop: `1px solid ${colors.borderNeutral}`, padding: "12px 20px" }
877
+ });
878
+ const showHeader = Boolean(title) || Boolean(recordCounter) || Boolean(onDismiss);
879
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
880
+ import_react18.Modal,
881
+ {
882
+ isOpen,
883
+ onDismiss,
884
+ isBlocking,
885
+ className,
886
+ styles: {
887
+ main: {
888
+ maxWidth: "95vw",
889
+ width: widthCss,
890
+ height: heightCss,
891
+ maxHeight: "95vh",
892
+ display: "flex",
893
+ flexDirection: "column"
894
+ },
895
+ scrollableContent: {
896
+ overflow: "hidden",
897
+ display: "flex",
898
+ flexDirection: "column",
899
+ flex: 1,
900
+ minHeight: 0
901
+ }
902
+ },
903
+ children: [
904
+ showHeader && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: styles.header, children: [
905
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: styles.headerLeft, children: [
906
+ title && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: styles.title, children: title }),
907
+ subheader && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: styles.subheader, children: subheader })
908
+ ] }),
909
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: styles.headerRight, children: [
910
+ recordCounter && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: styles.counter, children: [
911
+ recordCounter.current,
912
+ " of ",
913
+ recordCounter.total
914
+ ] }),
915
+ onDismiss && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
916
+ import_react18.IconButton,
917
+ {
918
+ iconProps: { iconName: "Cancel" },
919
+ ariaLabel: "Close",
920
+ onClick: onDismiss,
921
+ styles: { root: { color: colors.textSecondary } }
922
+ }
923
+ )
924
+ ] })
925
+ ] }),
926
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: styles.content, children }),
927
+ footer && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: styles.footer, children: footer })
928
+ ]
929
+ }
930
+ );
931
+ };
932
+
933
+ // src/overlays/ModalSurface.tsx
934
+ var import_react19 = require("@fluentui/react");
935
+ var import_jsx_runtime15 = require("react/jsx-runtime");
936
+ var ModalSurface = ({
937
+ isOpen,
938
+ onDismiss,
939
+ title,
940
+ size,
941
+ width,
942
+ isBlocking = true,
943
+ autoSize,
944
+ footer,
945
+ className,
946
+ children
947
+ }) => {
948
+ const main = autoSize ? { width: "auto", minWidth: MODAL_AUTOSIZE_MIN_WIDTH, maxWidth: "100%" } : { maxWidth: "95vw", width: `${dialogWidthPx({ width, size })}px` };
949
+ const styles = (0, import_react19.mergeStyleSets)({
950
+ title: {
951
+ fontSize: typography.fontSize.lg,
952
+ fontWeight: typography.fontWeight.semibold,
953
+ fontFamily: typography.fontFamilySemibold,
954
+ color: colors.textPrimary,
955
+ padding: "16px 20px 0"
956
+ },
957
+ content: { padding: 20 },
958
+ footer: {
959
+ borderTop: `1px solid ${colors.borderNeutral}`,
960
+ padding: "12px 20px",
961
+ display: "flex",
962
+ justifyContent: "flex-end",
963
+ gap: 8
964
+ }
965
+ });
966
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react19.Modal, { isOpen, onDismiss, isBlocking, className, styles: { main }, children: [
967
+ title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: styles.title, children: title }),
968
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: styles.content, children }),
969
+ footer && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: styles.footer, children: footer })
970
+ ] });
971
+ };
972
+
973
+ // src/overlays/PanelSurface.tsx
974
+ var import_react20 = require("@fluentui/react");
975
+ var import_jsx_runtime16 = require("react/jsx-runtime");
976
+ var PanelSurface = ({
977
+ isOpen,
978
+ onDismiss,
979
+ title,
980
+ panelType,
981
+ width,
982
+ hasCloseButton = true,
983
+ isLightDismiss = false,
984
+ isFooterAtBottom = true,
985
+ isNonModal = false,
986
+ footer,
987
+ children
988
+ }) => {
989
+ const kind = panelType ?? panelKindFromWidth(width);
990
+ const resolvedType = import_react20.PanelType[kind];
991
+ const customWidth = kind === "custom" || kind === "customNear" ? `${panelCustomWidthPx(width)}px` : void 0;
992
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
993
+ import_react20.Panel,
994
+ {
995
+ isOpen,
996
+ onDismiss,
997
+ headerText: title,
998
+ type: resolvedType,
999
+ customWidth,
1000
+ hasCloseButton,
1001
+ isLightDismiss,
1002
+ isFooterAtBottom,
1003
+ isBlocking: !isNonModal,
1004
+ onRenderFooterContent: footer ? () => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: footer }) : void 0,
1005
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { padding: "12px 0" }, children })
1006
+ }
1007
+ );
1008
+ };
1009
+
1010
+ // src/overlays/CalloutSurface.tsx
1011
+ var import_react21 = require("@fluentui/react");
1012
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1013
+ var CalloutSurface = ({
1014
+ target,
1015
+ isOpen = true,
1016
+ onDismiss,
1017
+ width,
1018
+ directionalHint = "bottomLeftEdge",
1019
+ isBeakVisible = true,
1020
+ beakWidth = 16,
1021
+ gapSpace = 0,
1022
+ className,
1023
+ children
1024
+ }) => {
1025
+ if (!isOpen) return null;
1026
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1027
+ import_react21.Callout,
1028
+ {
1029
+ target: target ?? void 0,
1030
+ onDismiss,
1031
+ directionalHint: import_react21.DirectionalHint[directionalHint],
1032
+ isBeakVisible,
1033
+ beakWidth,
1034
+ gapSpace,
1035
+ className,
1036
+ styles: { root: { width: calloutWidthPx(width), padding: 16 } },
1037
+ children
1038
+ }
1039
+ );
1040
+ };
1041
+
1042
+ // src/overlays/TooltipSurface.tsx
1043
+ var import_react22 = require("@fluentui/react");
1044
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1045
+ var DELAY_MAP = {
1046
+ zero: import_react22.TooltipDelay.zero,
1047
+ medium: import_react22.TooltipDelay.medium,
1048
+ long: import_react22.TooltipDelay.long
1049
+ };
1050
+ var TooltipSurface = ({
1051
+ content,
1052
+ directionalHint = "bottomCenter",
1053
+ delay = "medium",
1054
+ children
1055
+ }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react22.TooltipHost, { content, directionalHint: import_react22.DirectionalHint[directionalHint], delay: DELAY_MAP[delay], children });
1056
+
1057
+ // src/composites/MasterDetailSurface.tsx
1058
+ var import_react23 = require("@fluentui/react");
1059
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1060
+ var MasterDetailSurface = ({
1061
+ master,
1062
+ detail,
1063
+ detailFallback,
1064
+ splitRatio = 0.38,
1065
+ collapseBelow = "md",
1066
+ className
1067
+ }) => {
1068
+ const masterFr = Math.min(90, Math.max(10, Math.round(splitRatio * 100)));
1069
+ const detailFr = 100 - masterFr;
1070
+ const collapsePx = BREAKPOINTS[collapseBelow];
1071
+ const rootCls = (0, import_react23.mergeStyles)(
1072
+ {
1073
+ display: "grid",
1074
+ gridTemplateColumns: `${masterFr}fr ${detailFr}fr`,
1075
+ minHeight: 0,
1076
+ selectors: { [`@media (max-width: ${collapsePx}px)`]: { gridTemplateColumns: "1fr" } }
1077
+ },
1078
+ className
1079
+ );
1080
+ const masterCls = (0, import_react23.mergeStyles)({
1081
+ minWidth: 0,
1082
+ overflow: "auto",
1083
+ borderRight: `1px solid ${colors.borderNeutral}`,
1084
+ selectors: {
1085
+ [`@media (max-width: ${collapsePx}px)`]: {
1086
+ borderRight: "none",
1087
+ borderBottom: `1px solid ${colors.borderNeutral}`
1088
+ }
1089
+ }
1090
+ });
1091
+ const detailCls = (0, import_react23.mergeStyles)({ minWidth: 0, overflow: "auto" });
1092
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: rootCls, children: [
1093
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: masterCls, children: master }),
1094
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: detailCls, children: detail ?? detailFallback })
1095
+ ] });
1096
+ };
1097
+
1098
+ // src/composites/DashboardSurface.tsx
1099
+ var import_react24 = require("@fluentui/react");
1100
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1101
+ var DashboardSurface = ({ tiles, columns = 2, gap = 16, className }) => {
1102
+ const cls = (0, import_react24.mergeStyles)(
1103
+ {
1104
+ display: "grid",
1105
+ gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`,
1106
+ gap,
1107
+ alignItems: "start",
1108
+ selectors: {
1109
+ [`@media (max-width: ${CARD_REFLOW_WIDTH}px)`]: { gridTemplateColumns: "repeat(2, minmax(0, 1fr))" },
1110
+ [`@media (max-width: ${BREAKPOINTS.sm}px)`]: { gridTemplateColumns: "1fr" }
1111
+ }
1112
+ },
1113
+ className
1114
+ );
1115
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cls, children: tiles.map((tile, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: tile }, `tile-${i}`)) });
1116
+ };
1117
+
1118
+ // src/adapters/fromFormDefinition.ts
1119
+ function fromFormDefinition(def) {
1120
+ const s = def.settings ?? {};
1121
+ switch (def.type) {
1122
+ case "dialog":
1123
+ return {
1124
+ kind: "dialog",
1125
+ widthPx: dialogWidthPx({ width: s.width }),
1126
+ heightCss: dialogHeightCss(s.height),
1127
+ title: def.name
1128
+ };
1129
+ case "panel": {
1130
+ const panelType = s.panelType ?? panelKindFromWidth(s.width);
1131
+ return {
1132
+ kind: "panel",
1133
+ panelType,
1134
+ customWidthPx: panelType === "custom" ? panelCustomWidthPx(s.width) : void 0,
1135
+ title: def.name
1136
+ };
1137
+ }
1138
+ case "callout":
1139
+ return { kind: "callout", widthPx: calloutWidthPx(s.width), title: def.name };
1140
+ case "main":
1141
+ default:
1142
+ return { kind: "main" };
1143
+ }
1144
+ }
1145
+ // Annotate the CommonJS export names for ESM import in node:
1146
+ 0 && (module.exports = {
1147
+ ActionBar,
1148
+ BREAKPOINTS,
1149
+ CALLOUT_DEFAULT_WIDTH,
1150
+ CARD_REFLOW_WIDTH,
1151
+ CalloutSurface,
1152
+ ColumnLayout,
1153
+ CommandSurface,
1154
+ DIALOG_SIZE_PX,
1155
+ DashboardSurface,
1156
+ FieldRow,
1157
+ Footer,
1158
+ FormDialogSurface,
1159
+ FormHeader,
1160
+ FormSurface,
1161
+ MODAL_AUTOSIZE_MIN_WIDTH,
1162
+ MasterDetailSurface,
1163
+ ModalSurface,
1164
+ PANEL_DEFAULT_WIDTH,
1165
+ PageSurface,
1166
+ PanelSurface,
1167
+ PivotSurface,
1168
+ Section,
1169
+ SectionCard,
1170
+ SectionHeader,
1171
+ TooltipSurface,
1172
+ TwoColumnLayout,
1173
+ calloutFormDefaults,
1174
+ calloutWidthPx,
1175
+ clampSpan,
1176
+ colors,
1177
+ createDynamicsTheme,
1178
+ densityScale,
1179
+ dialogHeightCss,
1180
+ dialogWidthCss,
1181
+ dialogWidthPx,
1182
+ fieldGridStyle,
1183
+ fieldRowStyle,
1184
+ fromFormDefinition,
1185
+ gridTemplateForColumns,
1186
+ layout,
1187
+ panelCustomWidthPx,
1188
+ panelKindFromWidth,
1189
+ radius,
1190
+ resolveBreakpoint,
1191
+ resolveResponsiveValue,
1192
+ scaleSpacing,
1193
+ sectionStackingStyle,
1194
+ spacing,
1195
+ typography,
1196
+ useContainerBreakpoint,
1197
+ useContainerSize,
1198
+ useContainerWidth,
1199
+ useMediaQuery,
1200
+ useResponsiveValue
1201
+ });
1202
+ //# sourceMappingURL=index.cjs.map