@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/columns-BlpFO5VD.d.cts +7 -0
- package/dist/columns-BlpFO5VD.d.ts +7 -0
- package/dist/core.cjs +100 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.cts +38 -0
- package/dist/core.d.ts +38 -0
- package/dist/core.mjs +61 -0
- package/dist/core.mjs.map +1 -0
- package/dist/index.cjs +1202 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +445 -0
- package/dist/index.d.ts +445 -0
- package/dist/index.mjs +1122 -0
- package/dist/index.mjs.map +1 -0
- package/dist/responsive.cjs +122 -0
- package/dist/responsive.cjs.map +1 -0
- package/dist/responsive.d.cts +25 -0
- package/dist/responsive.d.ts +25 -0
- package/dist/responsive.mjs +89 -0
- package/dist/responsive.mjs.map +1 -0
- package/package.json +72 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
import { DialogSizePreset } from './core.js';
|
|
2
|
+
export { CALLOUT_DEFAULT_WIDTH, DIALOG_SIZE_PX, MODAL_AUTOSIZE_MIN_WIDTH, PANEL_DEFAULT_WIDTH, PanelKind, calloutFormDefaults, calloutWidthPx, dialogHeightCss, dialogWidthCss, dialogWidthPx, panelCustomWidthPx, panelKindFromWidth } from './core.js';
|
|
3
|
+
import { C as ColumnCount } from './columns-BlpFO5VD.js';
|
|
4
|
+
export { c as clampSpan, g as gridTemplateForColumns } from './columns-BlpFO5VD.js';
|
|
5
|
+
import { Breakpoint, ResponsiveValue } from './responsive.js';
|
|
6
|
+
export { BREAKPOINTS, CARD_REFLOW_WIDTH, ResponsiveMode, StyleObject, fieldGridStyle, fieldRowStyle, resolveBreakpoint, resolveResponsiveValue, sectionStackingStyle } from './responsive.js';
|
|
7
|
+
import { Theme, ICommandBarItemProps } from '@fluentui/react';
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import React__default, { CSSProperties, ReactNode, RefObject, ReactElement } from 'react';
|
|
10
|
+
|
|
11
|
+
declare const colors: {
|
|
12
|
+
readonly brand: "#0078d4";
|
|
13
|
+
readonly brandHover: "#106ebe";
|
|
14
|
+
readonly brandDark: "#005a9e";
|
|
15
|
+
readonly borderNeutral: "#edebe9";
|
|
16
|
+
readonly textPrimary: "#323130";
|
|
17
|
+
readonly textSecondary: "#605e5c";
|
|
18
|
+
readonly surface: "#ffffff";
|
|
19
|
+
readonly surfaceAlt: "#f5f5f5";
|
|
20
|
+
readonly canvas: "#fafafa";
|
|
21
|
+
readonly danger: "#a4262c";
|
|
22
|
+
readonly fieldFill: "#faf9f8";
|
|
23
|
+
readonly fieldFillReadonly: "#f3f2f1";
|
|
24
|
+
readonly fieldBorder: "#e1dfdd";
|
|
25
|
+
};
|
|
26
|
+
declare const spacing: {
|
|
27
|
+
readonly xs: 4;
|
|
28
|
+
readonly sm: 8;
|
|
29
|
+
readonly md: 12;
|
|
30
|
+
readonly lg: 16;
|
|
31
|
+
readonly xl: 24;
|
|
32
|
+
readonly xxl: 40;
|
|
33
|
+
};
|
|
34
|
+
declare const typography: {
|
|
35
|
+
readonly fontFamily: "\"Segoe UI\", Arial, sans-serif";
|
|
36
|
+
readonly fontFamilySemibold: "\"Segoe UI Semibold\", \"Segoe UI\", sans-serif";
|
|
37
|
+
readonly fontSize: {
|
|
38
|
+
readonly sm: "12px";
|
|
39
|
+
readonly smPlus: "13px";
|
|
40
|
+
readonly md: "14px";
|
|
41
|
+
readonly lg: "17px";
|
|
42
|
+
};
|
|
43
|
+
readonly fontWeight: {
|
|
44
|
+
readonly regular: 400;
|
|
45
|
+
readonly semibold: 600;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
declare const radius: {
|
|
49
|
+
readonly card: "4px";
|
|
50
|
+
readonly lg: "8px";
|
|
51
|
+
};
|
|
52
|
+
declare const layout: {
|
|
53
|
+
readonly labelColWidth: "130px";
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
declare function createDynamicsTheme(): Theme;
|
|
57
|
+
|
|
58
|
+
type Density = 'comfortable' | 'compact';
|
|
59
|
+
declare const densityScale: {
|
|
60
|
+
readonly comfortable: 1;
|
|
61
|
+
readonly compact: 0.75;
|
|
62
|
+
};
|
|
63
|
+
/** Scale a base spacing value (px) by the active density. */
|
|
64
|
+
declare function scaleSpacing(value: number, density?: Density): number;
|
|
65
|
+
|
|
66
|
+
interface ContainerSize {
|
|
67
|
+
width: number;
|
|
68
|
+
height: number;
|
|
69
|
+
inlineSize: number;
|
|
70
|
+
blockSize: number;
|
|
71
|
+
}
|
|
72
|
+
/** Observe an element's size via ResizeObserver. Pass a ref; returns {width,height,inlineSize,blockSize}. */
|
|
73
|
+
declare function useContainerSize<T extends HTMLElement = HTMLElement>(ref: React.RefObject<T>): ContainerSize;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Create-and-return a ref plus the observed width of the element it is attached to.
|
|
77
|
+
* `const [ref, width] = useContainerWidth(); return <div ref={ref}>…</div>`.
|
|
78
|
+
*/
|
|
79
|
+
declare function useContainerWidth<T extends HTMLElement = HTMLDivElement>(): [React.RefObject<T>, number];
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Resolve the *container's* current breakpoint (not the viewport's) — the correctness
|
|
83
|
+
* fix for a surface inside a PCF, where width comes from `context.allocatedWidth`.
|
|
84
|
+
* Returns `[ref, breakpoint, width]`.
|
|
85
|
+
*/
|
|
86
|
+
declare function useContainerBreakpoint<T extends HTMLElement = HTMLDivElement>(): [React.RefObject<T>, Breakpoint, number];
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Resolve a responsive value against the *container's* current breakpoint.
|
|
90
|
+
* `const [ref, cols] = useResponsiveValue({ xs: 1, md: 2, lg: 3 });`
|
|
91
|
+
*/
|
|
92
|
+
declare function useResponsiveValue<T, E extends HTMLElement = HTMLDivElement>(value: ResponsiveValue<T>): [React.RefObject<E>, T | undefined];
|
|
93
|
+
|
|
94
|
+
/** Viewport media-query match — the SSR-safe / no-ResizeObserver fallback to the container hooks. */
|
|
95
|
+
declare function useMediaQuery(query: string): boolean;
|
|
96
|
+
|
|
97
|
+
type SurfaceVariant = 'card' | 'flat' | 'placeholder';
|
|
98
|
+
type Alignment = 'left' | 'center' | 'right';
|
|
99
|
+
interface SurfaceActionButton {
|
|
100
|
+
id: string;
|
|
101
|
+
label: string;
|
|
102
|
+
iconName?: string;
|
|
103
|
+
appearance?: 'primary' | 'default' | 'subtle';
|
|
104
|
+
position?: 'left' | 'right';
|
|
105
|
+
disabled?: boolean;
|
|
106
|
+
hidden?: boolean;
|
|
107
|
+
onClick?: () => void;
|
|
108
|
+
}
|
|
109
|
+
interface ColumnLayoutProps {
|
|
110
|
+
columns: ColumnCount;
|
|
111
|
+
/** Gap (px number or any CSS value). Default `'4px 24px'`. */
|
|
112
|
+
gap?: number | string;
|
|
113
|
+
/** Stack responsively (caps at 2 cols <=768, 1 col <=480). Default true. */
|
|
114
|
+
responsive?: boolean;
|
|
115
|
+
/** Responsive driver: viewport `@media` (default) or `@container`. */
|
|
116
|
+
mode?: 'media' | 'container';
|
|
117
|
+
className?: string;
|
|
118
|
+
style?: CSSProperties;
|
|
119
|
+
children?: ReactNode;
|
|
120
|
+
}
|
|
121
|
+
interface TwoColumnLayoutProps {
|
|
122
|
+
gap?: number | string;
|
|
123
|
+
/** Collapse to one column below this breakpoint. Default `'sm'`. */
|
|
124
|
+
collapseBelow?: Breakpoint;
|
|
125
|
+
className?: string;
|
|
126
|
+
style?: CSSProperties;
|
|
127
|
+
children?: ReactNode;
|
|
128
|
+
}
|
|
129
|
+
interface FieldRowProps {
|
|
130
|
+
label?: ReactNode;
|
|
131
|
+
required?: boolean;
|
|
132
|
+
/** Span both columns of a two-column grid. */
|
|
133
|
+
fullWidth?: boolean;
|
|
134
|
+
/** Label column width. Default `'130px'`. */
|
|
135
|
+
labelWidth?: string;
|
|
136
|
+
/** Label beside the control (default) or stacked above it. */
|
|
137
|
+
labelPosition?: 'beside' | 'above';
|
|
138
|
+
className?: string;
|
|
139
|
+
children?: ReactNode;
|
|
140
|
+
}
|
|
141
|
+
interface FormSurfaceProps {
|
|
142
|
+
/** Outer grid column count. Default 12. */
|
|
143
|
+
columns?: number;
|
|
144
|
+
/** Grid gap in px. Default 20. */
|
|
145
|
+
gap?: number;
|
|
146
|
+
/** Padding in px. Default 20. */
|
|
147
|
+
padding?: number;
|
|
148
|
+
/** Canvas background. Default the Dynamics form canvas. */
|
|
149
|
+
background?: string;
|
|
150
|
+
/** Container width hint (e.g. a PCF `context.allocatedWidth`) — drives stacking off the container, not the viewport. */
|
|
151
|
+
containerWidth?: number;
|
|
152
|
+
/** Collapse children to full width below this breakpoint. Default `'sm'`. */
|
|
153
|
+
collapseBelow?: Breakpoint;
|
|
154
|
+
maxWidth?: number | string;
|
|
155
|
+
className?: string;
|
|
156
|
+
style?: CSSProperties;
|
|
157
|
+
children?: ReactNode;
|
|
158
|
+
}
|
|
159
|
+
interface PageSurfaceProps extends FormSurfaceProps {
|
|
160
|
+
/** Center the form and apply a comfortable max width. */
|
|
161
|
+
centered?: boolean;
|
|
162
|
+
}
|
|
163
|
+
interface SectionProps {
|
|
164
|
+
title?: string;
|
|
165
|
+
/** Span within the parent form grid. Default 12. */
|
|
166
|
+
columnSpan?: number;
|
|
167
|
+
columnStart?: number;
|
|
168
|
+
rowPosition?: number;
|
|
169
|
+
/** Internal field-grid column count. Default 12. */
|
|
170
|
+
internalColumns?: number;
|
|
171
|
+
showCommandBar?: boolean;
|
|
172
|
+
commandBarItems?: ICommandBarItemProps[];
|
|
173
|
+
statusText?: string;
|
|
174
|
+
notification?: ReactNode;
|
|
175
|
+
collapsible?: boolean;
|
|
176
|
+
/** Uncontrolled initial collapsed state. */
|
|
177
|
+
defaultCollapsed?: boolean;
|
|
178
|
+
/** Controlled collapsed state (pair with `onCollapsedChange`). */
|
|
179
|
+
collapsed?: boolean;
|
|
180
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
181
|
+
/** `card` (default), `flat` (no shadow), or `placeholder` (empty dashed spacer). */
|
|
182
|
+
variant?: SurfaceVariant;
|
|
183
|
+
/** Min height for the `placeholder` variant. */
|
|
184
|
+
minHeight?: number;
|
|
185
|
+
className?: string;
|
|
186
|
+
style?: CSSProperties;
|
|
187
|
+
children?: ReactNode;
|
|
188
|
+
}
|
|
189
|
+
interface SectionCardProps extends SectionProps {
|
|
190
|
+
/** Accent color of the top border (Dynamics blue). Default brand. */
|
|
191
|
+
accentColor?: string;
|
|
192
|
+
/** Accent top-border width in px. Default 3. */
|
|
193
|
+
accentWidth?: number;
|
|
194
|
+
}
|
|
195
|
+
interface SectionHeaderProps {
|
|
196
|
+
title?: string;
|
|
197
|
+
statusText?: string;
|
|
198
|
+
showCommandBar?: boolean;
|
|
199
|
+
commandBarItems?: ICommandBarItemProps[];
|
|
200
|
+
actions?: ReactNode;
|
|
201
|
+
collapsible?: boolean;
|
|
202
|
+
collapsed?: boolean;
|
|
203
|
+
onToggle?: () => void;
|
|
204
|
+
}
|
|
205
|
+
interface FormHeaderProps {
|
|
206
|
+
title?: ReactNode;
|
|
207
|
+
subtitle?: ReactNode;
|
|
208
|
+
status?: ReactNode;
|
|
209
|
+
titleColor?: string;
|
|
210
|
+
subtitleColor?: string;
|
|
211
|
+
/** Avatar/persona shown to the left of the title. */
|
|
212
|
+
persona?: ReactNode;
|
|
213
|
+
/** Right side of the header (e.g. KPI header fields). */
|
|
214
|
+
actions?: ReactNode;
|
|
215
|
+
className?: string;
|
|
216
|
+
}
|
|
217
|
+
interface SurfaceTab {
|
|
218
|
+
id: string;
|
|
219
|
+
label: string;
|
|
220
|
+
content: ReactNode;
|
|
221
|
+
iconName?: string;
|
|
222
|
+
disabled?: boolean;
|
|
223
|
+
}
|
|
224
|
+
interface PivotSurfaceProps {
|
|
225
|
+
tabs: SurfaceTab[];
|
|
226
|
+
selectedId?: string;
|
|
227
|
+
defaultSelectedId?: string;
|
|
228
|
+
onTabChange?: (id: string) => void;
|
|
229
|
+
/** Fluent Pivot link format. */
|
|
230
|
+
linkFormat?: 'links' | 'tabs';
|
|
231
|
+
className?: string;
|
|
232
|
+
}
|
|
233
|
+
interface CommandSurfaceProps {
|
|
234
|
+
items: ICommandBarItemProps[];
|
|
235
|
+
overflowItems?: ICommandBarItemProps[];
|
|
236
|
+
farItems?: ICommandBarItemProps[];
|
|
237
|
+
className?: string;
|
|
238
|
+
}
|
|
239
|
+
interface ActionBarProps {
|
|
240
|
+
buttons: SurfaceActionButton[];
|
|
241
|
+
/** Default `'right'`. */
|
|
242
|
+
alignment?: Alignment;
|
|
243
|
+
/** Stick to the bottom of the scroll container. Default true. */
|
|
244
|
+
sticky?: boolean;
|
|
245
|
+
className?: string;
|
|
246
|
+
}
|
|
247
|
+
interface FooterProps {
|
|
248
|
+
/** Default true. */
|
|
249
|
+
sticky?: boolean;
|
|
250
|
+
align?: Alignment;
|
|
251
|
+
className?: string;
|
|
252
|
+
children?: ReactNode;
|
|
253
|
+
}
|
|
254
|
+
interface MasterDetailSurfaceProps {
|
|
255
|
+
master: ReactNode;
|
|
256
|
+
detail: ReactNode;
|
|
257
|
+
/** Rendered in the detail pane when `detail` is null/undefined. */
|
|
258
|
+
detailFallback?: ReactNode;
|
|
259
|
+
/** Master pane width fraction (0–1). Default 0.38. */
|
|
260
|
+
splitRatio?: number;
|
|
261
|
+
/** Stack master over detail below this breakpoint. Default `'md'`. */
|
|
262
|
+
collapseBelow?: Breakpoint;
|
|
263
|
+
className?: string;
|
|
264
|
+
}
|
|
265
|
+
interface DashboardSurfaceProps {
|
|
266
|
+
tiles: ReactNode[];
|
|
267
|
+
/** Tile columns. Default 2. */
|
|
268
|
+
columns?: ColumnCount;
|
|
269
|
+
gap?: number;
|
|
270
|
+
className?: string;
|
|
271
|
+
}
|
|
272
|
+
type FluentPanelType = 'smallFixedFar' | 'smallFixedNear' | 'medium' | 'large' | 'largeFixed' | 'extraLarge' | 'custom' | 'customNear';
|
|
273
|
+
type CalloutDirection = 'topLeftEdge' | 'topCenter' | 'topRightEdge' | 'topAutoEdge' | 'bottomLeftEdge' | 'bottomCenter' | 'bottomRightEdge' | 'bottomAutoEdge' | 'leftTopEdge' | 'leftCenter' | 'leftBottomEdge' | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge';
|
|
274
|
+
/** Full form-dialog (Fluent v8 Modal) with header/counter/close + sticky footer. */
|
|
275
|
+
interface FormDialogSurfaceProps {
|
|
276
|
+
isOpen: boolean;
|
|
277
|
+
onDismiss?: () => void;
|
|
278
|
+
title?: string;
|
|
279
|
+
subheader?: string;
|
|
280
|
+
/** Size preset (default `lg` = 1200). Explicit `width` wins. */
|
|
281
|
+
size?: DialogSizePreset;
|
|
282
|
+
width?: number;
|
|
283
|
+
height?: number;
|
|
284
|
+
isBlocking?: boolean;
|
|
285
|
+
/** "X of Y" record counter in the header. */
|
|
286
|
+
recordCounter?: {
|
|
287
|
+
current: number;
|
|
288
|
+
total: number;
|
|
289
|
+
};
|
|
290
|
+
/** Footer content (e.g. an ActionBar). */
|
|
291
|
+
footer?: ReactNode;
|
|
292
|
+
className?: string;
|
|
293
|
+
children?: ReactNode;
|
|
294
|
+
}
|
|
295
|
+
/** Generic modal (Fluent v8 Modal) — lighter than FormDialogSurface. */
|
|
296
|
+
interface ModalSurfaceProps {
|
|
297
|
+
isOpen: boolean;
|
|
298
|
+
onDismiss?: () => void;
|
|
299
|
+
title?: string;
|
|
300
|
+
size?: DialogSizePreset;
|
|
301
|
+
width?: number;
|
|
302
|
+
isBlocking?: boolean;
|
|
303
|
+
/** Auto width with a 1000px min (Track-and-Ship pattern) instead of a fixed preset. */
|
|
304
|
+
autoSize?: boolean;
|
|
305
|
+
footer?: ReactNode;
|
|
306
|
+
className?: string;
|
|
307
|
+
children?: ReactNode;
|
|
308
|
+
}
|
|
309
|
+
interface PanelSurfaceProps {
|
|
310
|
+
isOpen: boolean;
|
|
311
|
+
onDismiss?: () => void;
|
|
312
|
+
title?: string;
|
|
313
|
+
/** Fluent PanelType (default derived from `width`: >500 → medium, else custom). */
|
|
314
|
+
panelType?: FluentPanelType;
|
|
315
|
+
width?: number;
|
|
316
|
+
hasCloseButton?: boolean;
|
|
317
|
+
isLightDismiss?: boolean;
|
|
318
|
+
isFooterAtBottom?: boolean;
|
|
319
|
+
isNonModal?: boolean;
|
|
320
|
+
footer?: ReactNode;
|
|
321
|
+
children?: ReactNode;
|
|
322
|
+
}
|
|
323
|
+
interface CalloutSurfaceProps {
|
|
324
|
+
/** Anchor — a selector string, an element, or a ref. */
|
|
325
|
+
target: string | Element | RefObject<Element> | null;
|
|
326
|
+
isOpen?: boolean;
|
|
327
|
+
onDismiss?: () => void;
|
|
328
|
+
width?: number;
|
|
329
|
+
directionalHint?: CalloutDirection;
|
|
330
|
+
isBeakVisible?: boolean;
|
|
331
|
+
beakWidth?: number;
|
|
332
|
+
gapSpace?: number;
|
|
333
|
+
className?: string;
|
|
334
|
+
children?: ReactNode;
|
|
335
|
+
}
|
|
336
|
+
interface TooltipSurfaceProps {
|
|
337
|
+
/** Tooltip body — what Fluent's TooltipHost actually renders (string or element(s)). */
|
|
338
|
+
content: string | ReactElement | ReactElement[];
|
|
339
|
+
directionalHint?: CalloutDirection;
|
|
340
|
+
delay?: 'zero' | 'medium' | 'long';
|
|
341
|
+
children: ReactElement;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/** N-column grid for form fields. Responsive by default (caps at 2 cols <=768, 1 <=480). */
|
|
345
|
+
declare const ColumnLayout: React__default.FC<ColumnLayoutProps>;
|
|
346
|
+
|
|
347
|
+
/** Two equal columns that collapse to one below `collapseBelow` (default 'sm' = 480). */
|
|
348
|
+
declare const TwoColumnLayout: React__default.FC<TwoColumnLayoutProps>;
|
|
349
|
+
|
|
350
|
+
/** A two-column "Label : control" row. The control goes in `children` (right column). */
|
|
351
|
+
declare const FieldRow: React__default.FC<FieldRowProps>;
|
|
352
|
+
|
|
353
|
+
/** The N-column form canvas that hosts Sections. */
|
|
354
|
+
declare const FormSurface: React__default.FC<FormSurfaceProps>;
|
|
355
|
+
|
|
356
|
+
/** A full-page FormSurface — optionally centered with a comfortable max width. */
|
|
357
|
+
declare const PageSurface: React__default.FC<PageSurfaceProps>;
|
|
358
|
+
|
|
359
|
+
/** A Dynamics-CE form section: positioned card with a header and an internal field grid. */
|
|
360
|
+
declare const Section: React__default.FC<SectionProps>;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* A Section with the Dynamics blue 3px accent top border.
|
|
364
|
+
* NOTE: the accent is an inline style so it wins over the `card` variant's shorthand
|
|
365
|
+
* `border` (mergeStyles class). If the accent ever moves into a class, use the
|
|
366
|
+
* `borderTop*` longhand so it isn't clobbered by the shorthand `border`.
|
|
367
|
+
*/
|
|
368
|
+
declare const SectionCard: React__default.FC<SectionCardProps>;
|
|
369
|
+
|
|
370
|
+
/** Section header bar: title + status (left), command bar / actions (right), optional collapse toggle. */
|
|
371
|
+
declare const SectionHeader: React__default.FC<SectionHeaderProps>;
|
|
372
|
+
|
|
373
|
+
/** Dynamics form header: persona + title/status (left), KPI/header fields (right). */
|
|
374
|
+
declare const FormHeader: React__default.FC<FormHeaderProps>;
|
|
375
|
+
|
|
376
|
+
/** Tabbed surface (Fluent Pivot). Controlled via `selectedId`/`onTabChange` or uncontrolled. */
|
|
377
|
+
declare const PivotSurface: React__default.FC<PivotSurfaceProps>;
|
|
378
|
+
|
|
379
|
+
/** A Dynamics-style command bar (thin wrapper over Fluent CommandBar, no card chrome). */
|
|
380
|
+
declare const CommandSurface: React__default.FC<CommandSurfaceProps>;
|
|
381
|
+
|
|
382
|
+
/** A sticky footer bar of action buttons, with optional left-aligned buttons. */
|
|
383
|
+
declare const ActionBar: React__default.FC<ActionBarProps>;
|
|
384
|
+
|
|
385
|
+
/** A sticky footer region (free-form children) — e.g. for dialog/panel actions. */
|
|
386
|
+
declare const Footer: React__default.FC<FooterProps>;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Full Dynamics form-dialog (Fluent v8 Modal). Default width 1200 (lg), height 95vh.
|
|
390
|
+
* `onDismiss` is the close affordance — when omitted, no close button renders, so a
|
|
391
|
+
* blocking dialog without `onDismiss` is intentionally non-dismissible.
|
|
392
|
+
*/
|
|
393
|
+
declare const FormDialogSurface: React__default.FC<FormDialogSurfaceProps>;
|
|
394
|
+
|
|
395
|
+
/** A generic modal (Fluent v8 Modal) — title + content + optional footer; lighter than FormDialogSurface. */
|
|
396
|
+
declare const ModalSurface: React__default.FC<ModalSurfaceProps>;
|
|
397
|
+
|
|
398
|
+
/** A Dynamics side panel (Fluent v8 Panel). */
|
|
399
|
+
declare const PanelSurface: React__default.FC<PanelSurfaceProps>;
|
|
400
|
+
|
|
401
|
+
/** A lightweight contextual callout (Fluent v8 Callout) anchored to a target. */
|
|
402
|
+
declare const CalloutSurface: React__default.FC<CalloutSurfaceProps>;
|
|
403
|
+
|
|
404
|
+
/** A tooltip wrapper (Fluent v8 TooltipHost). New surface — no codegen counterpart. */
|
|
405
|
+
declare const TooltipSurface: React__default.FC<TooltipSurfaceProps>;
|
|
406
|
+
|
|
407
|
+
/** Master (left rail) + detail (right pane) split that stacks vertically below `collapseBelow`. */
|
|
408
|
+
declare const MasterDetailSurface: React__default.FC<MasterDetailSurfaceProps>;
|
|
409
|
+
|
|
410
|
+
/** A reflowing grid of dashboard tiles (N cols → 2 below 900px → 1 below 480px). */
|
|
411
|
+
declare const DashboardSurface: React__default.FC<DashboardSurfaceProps>;
|
|
412
|
+
|
|
413
|
+
/** The overlay FormTypes surface-kit knows how to resolve (form-runtime also has the tab-only 'related'/'audit'). */
|
|
414
|
+
type SurfaceFormType = 'main' | 'dialog' | 'panel' | 'callout';
|
|
415
|
+
interface FormSettingsLike {
|
|
416
|
+
width?: number;
|
|
417
|
+
height?: number;
|
|
418
|
+
panelType?: string;
|
|
419
|
+
}
|
|
420
|
+
interface FormDefinitionLike {
|
|
421
|
+
type?: SurfaceFormType;
|
|
422
|
+
name?: string;
|
|
423
|
+
settings?: FormSettingsLike;
|
|
424
|
+
}
|
|
425
|
+
type ResolvedSurface = {
|
|
426
|
+
kind: 'main';
|
|
427
|
+
} | {
|
|
428
|
+
kind: 'dialog';
|
|
429
|
+
widthPx: number;
|
|
430
|
+
heightCss: string;
|
|
431
|
+
title?: string;
|
|
432
|
+
} | {
|
|
433
|
+
kind: 'panel';
|
|
434
|
+
panelType: string;
|
|
435
|
+
customWidthPx?: number;
|
|
436
|
+
title?: string;
|
|
437
|
+
} | {
|
|
438
|
+
kind: 'callout';
|
|
439
|
+
widthPx: number;
|
|
440
|
+
title?: string;
|
|
441
|
+
};
|
|
442
|
+
/** Resolve a (duck-typed) form-runtime FormDefinition to the right surface + sizing props. */
|
|
443
|
+
declare function fromFormDefinition(def: FormDefinitionLike): ResolvedSurface;
|
|
444
|
+
|
|
445
|
+
export { ActionBar, type ActionBarProps, type Alignment, Breakpoint, type CalloutDirection, CalloutSurface, type CalloutSurfaceProps, ColumnCount, ColumnLayout, type ColumnLayoutProps, CommandSurface, type CommandSurfaceProps, type ContainerSize, DashboardSurface, type DashboardSurfaceProps, type Density, DialogSizePreset, FieldRow, type FieldRowProps, type FluentPanelType, Footer, type FooterProps, type FormDefinitionLike, FormDialogSurface, type FormDialogSurfaceProps, FormHeader, type FormHeaderProps, type FormSettingsLike, FormSurface, type FormSurfaceProps, MasterDetailSurface, type MasterDetailSurfaceProps, ModalSurface, type ModalSurfaceProps, PageSurface, type PageSurfaceProps, PanelSurface, type PanelSurfaceProps, PivotSurface, type PivotSurfaceProps, type ResolvedSurface, ResponsiveValue, Section, SectionCard, type SectionCardProps, SectionHeader, type SectionHeaderProps, type SectionProps, type SurfaceActionButton, type SurfaceFormType, type SurfaceTab, type SurfaceVariant, TooltipSurface, type TooltipSurfaceProps, TwoColumnLayout, type TwoColumnLayoutProps, colors, createDynamicsTheme, densityScale, fromFormDefinition, layout, radius, scaleSpacing, spacing, typography, useContainerBreakpoint, useContainerSize, useContainerWidth, useMediaQuery, useResponsiveValue };
|