@dataverse-kit/surface-kit 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/{useDensity-xEYt-GdJ.d.cts → useDensity-CLglP89q.d.cts} +1 -1
- package/dist/{useDensity-BePwtUzY.d.ts → useDensity-fkCdcf_j.d.ts} +1 -1
- package/dist/v9.cjs +80 -106
- package/dist/v9.cjs.map +1 -1
- package/dist/v9.d.cts +5 -17
- package/dist/v9.d.ts +5 -17
- package/dist/v9.mjs +7 -31
- package/dist/v9.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -6,9 +6,9 @@ import { Breakpoint } from './responsive.cjs';
|
|
|
6
6
|
export { BREAKPOINTS, CARD_REFLOW_WIDTH, ResponsiveMode, ResponsiveValue, StyleObject, fieldGridStyle, fieldRowStyle, resolveBreakpoint, resolveResponsiveValue, sectionStackingStyle } from './responsive.cjs';
|
|
7
7
|
export { colors, layout, radius, spacing, typography } from '@dataverse-kit/design-tokens';
|
|
8
8
|
import { Theme, ICommandBarItemProps } from '@fluentui/react';
|
|
9
|
-
import { D as Density } from './useDensity-
|
|
10
|
-
export { C as ContainerSize,
|
|
11
|
-
import React__default, {
|
|
9
|
+
import { D as Density } from './useDensity-CLglP89q.cjs';
|
|
10
|
+
export { C as ContainerSize, a as DensityContext, d as densityScale, s as scaleSpacing, u as useContainerBreakpoint, b as useContainerSize, c as useContainerWidth, e as useDensity, f as useMediaQuery, g as useResponsiveValue } from './useDensity-CLglP89q.cjs';
|
|
11
|
+
import React__default, { RefObject, ReactNode, CSSProperties, ReactElement } from 'react';
|
|
12
12
|
|
|
13
13
|
declare function createDynamicsTheme(): Theme;
|
|
14
14
|
|
package/dist/index.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ import { Breakpoint } from './responsive.js';
|
|
|
6
6
|
export { BREAKPOINTS, CARD_REFLOW_WIDTH, ResponsiveMode, ResponsiveValue, StyleObject, fieldGridStyle, fieldRowStyle, resolveBreakpoint, resolveResponsiveValue, sectionStackingStyle } from './responsive.js';
|
|
7
7
|
export { colors, layout, radius, spacing, typography } from '@dataverse-kit/design-tokens';
|
|
8
8
|
import { Theme, ICommandBarItemProps } from '@fluentui/react';
|
|
9
|
-
import { D as Density } from './useDensity-
|
|
10
|
-
export { C as ContainerSize,
|
|
11
|
-
import React__default, {
|
|
9
|
+
import { D as Density } from './useDensity-fkCdcf_j.js';
|
|
10
|
+
export { C as ContainerSize, a as DensityContext, d as densityScale, s as scaleSpacing, u as useContainerBreakpoint, b as useContainerSize, c as useContainerWidth, e as useDensity, f as useMediaQuery, g as useResponsiveValue } from './useDensity-fkCdcf_j.js';
|
|
11
|
+
import React__default, { RefObject, ReactNode, CSSProperties, ReactElement } from 'react';
|
|
12
12
|
|
|
13
13
|
declare function createDynamicsTheme(): Theme;
|
|
14
14
|
|
|
@@ -50,4 +50,4 @@ declare const DensityContext: React.Context<Density>;
|
|
|
50
50
|
/** Read the ambient spacing density (defaults to `'comfortable'` outside a provider). */
|
|
51
51
|
declare const useDensity: () => Density;
|
|
52
52
|
|
|
53
|
-
export { type ContainerSize as C, type Density as D,
|
|
53
|
+
export { type ContainerSize as C, type Density as D, DensityContext as a, useContainerSize as b, useContainerWidth as c, densityScale as d, useDensity as e, useMediaQuery as f, useResponsiveValue as g, scaleSpacing as s, useContainerBreakpoint as u };
|
|
@@ -50,4 +50,4 @@ declare const DensityContext: React.Context<Density>;
|
|
|
50
50
|
/** Read the ambient spacing density (defaults to `'comfortable'` outside a provider). */
|
|
51
51
|
declare const useDensity: () => Density;
|
|
52
52
|
|
|
53
|
-
export { type ContainerSize as C, type Density as D,
|
|
53
|
+
export { type ContainerSize as C, type Density as D, DensityContext as a, useContainerSize as b, useContainerWidth as c, densityScale as d, useDensity as e, useMediaQuery as f, useResponsiveValue as g, scaleSpacing as s, useContainerBreakpoint as u };
|
package/dist/v9.cjs
CHANGED
|
@@ -46,14 +46,15 @@ __export(v9_exports, {
|
|
|
46
46
|
calloutWidthPx: () => calloutWidthPx,
|
|
47
47
|
clampSpan: () => clampSpan,
|
|
48
48
|
colors: () => import_design_tokens.colors,
|
|
49
|
-
createDynamicsV9DarkTheme: () => createDynamicsV9DarkTheme,
|
|
50
|
-
createDynamicsV9Theme: () => createDynamicsV9Theme,
|
|
49
|
+
createDynamicsV9DarkTheme: () => import_fluent_theme.createDynamicsV9DarkTheme,
|
|
50
|
+
createDynamicsV9Theme: () => import_fluent_theme.createDynamicsV9Theme,
|
|
51
51
|
densityScale: () => densityScale,
|
|
52
52
|
dialogHeightCss: () => dialogHeightCss,
|
|
53
53
|
dialogWidthCss: () => dialogWidthCss,
|
|
54
54
|
dialogWidthPx: () => dialogWidthPx,
|
|
55
|
-
dynamicsBrandRamp: () => dynamicsBrandRamp,
|
|
56
|
-
|
|
55
|
+
dynamicsBrandRamp: () => import_fluent_theme.dynamicsBrandRamp,
|
|
56
|
+
dynamicsV9DarkTheme: () => import_fluent_theme.dynamicsV9DarkTheme,
|
|
57
|
+
dynamicsV9Theme: () => import_fluent_theme.dynamicsV9Theme,
|
|
57
58
|
fieldGridStyle: () => fieldGridStyle,
|
|
58
59
|
fieldRowStyle: () => fieldRowStyle,
|
|
59
60
|
gridTemplateForColumns: () => gridTemplateForColumns,
|
|
@@ -273,44 +274,16 @@ var DensityContext = (0, import_react4.createContext)("comfortable");
|
|
|
273
274
|
var useDensity = () => (0, import_react4.useContext)(DensityContext);
|
|
274
275
|
|
|
275
276
|
// src/v9/theme.ts
|
|
276
|
-
var
|
|
277
|
-
var dynamicsBrandRamp = {
|
|
278
|
-
10: "#061724",
|
|
279
|
-
20: "#082338",
|
|
280
|
-
30: "#0a2e4a",
|
|
281
|
-
40: "#0c3b5e",
|
|
282
|
-
50: "#0e4775",
|
|
283
|
-
60: import_design_tokens.colors.brandDark,
|
|
284
|
-
// #005a9e — colorBrandBackgroundPressed
|
|
285
|
-
70: import_design_tokens.colors.brandHover,
|
|
286
|
-
// #106ebe — colorBrandBackground(Hover/Selected)
|
|
287
|
-
80: import_design_tokens.colors.brand,
|
|
288
|
-
// #0078d4 — colorBrandBackground + colorBrandForeground1 (the Dynamics blue)
|
|
289
|
-
90: "#2886de",
|
|
290
|
-
100: "#479ef5",
|
|
291
|
-
110: "#62abf5",
|
|
292
|
-
120: "#77b7f7",
|
|
293
|
-
130: "#96c6fa",
|
|
294
|
-
140: "#b4d6fa",
|
|
295
|
-
150: "#cfe4fa",
|
|
296
|
-
160: "#ebf3fc"
|
|
297
|
-
};
|
|
298
|
-
function createDynamicsV9Theme(brand = dynamicsBrandRamp) {
|
|
299
|
-
return (0, import_react_components.createLightTheme)(brand);
|
|
300
|
-
}
|
|
301
|
-
function createDynamicsV9DarkTheme(brand = dynamicsBrandRamp) {
|
|
302
|
-
return (0, import_react_components.createDarkTheme)(brand);
|
|
303
|
-
}
|
|
304
|
-
var dynamicsV9Theme = createDynamicsV9Theme();
|
|
277
|
+
var import_fluent_theme = require("@dataverse-kit/fluent-theme");
|
|
305
278
|
|
|
306
279
|
// src/v9/containers/FormSurface.tsx
|
|
307
|
-
var
|
|
280
|
+
var import_react_components = require("@fluentui/react-components");
|
|
308
281
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
309
|
-
var useStyles = (0,
|
|
282
|
+
var useStyles = (0, import_react_components.makeStyles)({
|
|
310
283
|
root: {
|
|
311
284
|
display: "grid",
|
|
312
285
|
alignItems: "start",
|
|
313
|
-
backgroundColor:
|
|
286
|
+
backgroundColor: import_react_components.tokens.colorNeutralBackground2
|
|
314
287
|
},
|
|
315
288
|
// Container forced a single column: reset every child's span the same way the @media
|
|
316
289
|
// fallback does, so a Section with `columnStart` doesn't escape the stack.
|
|
@@ -351,7 +324,7 @@ var FormSurface = ({
|
|
|
351
324
|
const scaledGap = scaleSpacing(gap, density);
|
|
352
325
|
const scaledPadding = scaleSpacing(padding, density);
|
|
353
326
|
const viewportStackSlot = containerWidth == null ? VIEWPORT_STACK[collapseBelow] : null;
|
|
354
|
-
const cls = (0,
|
|
327
|
+
const cls = (0, import_react_components.mergeClasses)(
|
|
355
328
|
styles.root,
|
|
356
329
|
forceStack && styles.forceStackChildren,
|
|
357
330
|
viewportStackSlot ? styles[viewportStackSlot] : void 0,
|
|
@@ -374,10 +347,10 @@ var PageSurface = ({ centered, maxWidth, ...rest }) => /* @__PURE__ */ (0, impor
|
|
|
374
347
|
|
|
375
348
|
// src/v9/containers/Section.tsx
|
|
376
349
|
var import_react5 = require("react");
|
|
377
|
-
var
|
|
350
|
+
var import_react_components3 = require("@fluentui/react-components");
|
|
378
351
|
|
|
379
352
|
// src/v9/containers/SectionHeader.tsx
|
|
380
|
-
var
|
|
353
|
+
var import_react_components2 = require("@fluentui/react-components");
|
|
381
354
|
var import_react_icons = require("@fluentui/react-icons");
|
|
382
355
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
383
356
|
var SectionHeader = ({
|
|
@@ -395,7 +368,7 @@ var SectionHeader = ({
|
|
|
395
368
|
justifyContent: "space-between",
|
|
396
369
|
alignItems: "center",
|
|
397
370
|
flexWrap: "nowrap",
|
|
398
|
-
borderBottom: `1px solid ${
|
|
371
|
+
borderBottom: `1px solid ${import_react_components2.tokens.colorNeutralStroke2}`,
|
|
399
372
|
marginBottom: 16,
|
|
400
373
|
minHeight: 48,
|
|
401
374
|
width: "100%"
|
|
@@ -403,13 +376,13 @@ var SectionHeader = ({
|
|
|
403
376
|
const leftStyle = { display: "flex", alignItems: "center", gap: 8, minWidth: 0 };
|
|
404
377
|
const statusStyle = {
|
|
405
378
|
marginLeft: 8,
|
|
406
|
-
fontSize:
|
|
407
|
-
color:
|
|
379
|
+
fontSize: import_react_components2.tokens.fontSizeBase200,
|
|
380
|
+
color: import_react_components2.tokens.colorNeutralForeground3
|
|
408
381
|
};
|
|
409
382
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: rootStyle, children: [
|
|
410
383
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: leftStyle, children: [
|
|
411
384
|
collapsible && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
412
|
-
|
|
385
|
+
import_react_components2.Button,
|
|
413
386
|
{
|
|
414
387
|
appearance: "subtle",
|
|
415
388
|
size: "small",
|
|
@@ -419,11 +392,11 @@ var SectionHeader = ({
|
|
|
419
392
|
"aria-expanded": !collapsed
|
|
420
393
|
}
|
|
421
394
|
),
|
|
422
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
395
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_components2.Text, { weight: "semibold", size: 300, children: title }),
|
|
423
396
|
statusText && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: statusStyle, children: statusText })
|
|
424
397
|
] }),
|
|
425
|
-
actions ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: actions }) : showCommandBar && commandItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
426
|
-
|
|
398
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: actions }) : showCommandBar && commandItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_components2.Toolbar, { "aria-label": "Section commands", size: "small", children: commandItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
399
|
+
import_react_components2.ToolbarButton,
|
|
427
400
|
{
|
|
428
401
|
icon: item.icon,
|
|
429
402
|
appearance: item.appearance === "primary" ? "primary" : "subtle",
|
|
@@ -438,7 +411,7 @@ var SectionHeader = ({
|
|
|
438
411
|
|
|
439
412
|
// src/v9/containers/Section.tsx
|
|
440
413
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
441
|
-
var useStyles2 = (0,
|
|
414
|
+
var useStyles2 = (0, import_react_components3.makeStyles)({
|
|
442
415
|
// Phone-stack the internal field grid below `sm` (griffel — inline can't do @media).
|
|
443
416
|
bodyStack: {
|
|
444
417
|
[`@media (max-width: ${BREAKPOINTS.sm}px)`]: { "& > *": { gridColumn: "1 / -1" } }
|
|
@@ -486,8 +459,8 @@ var Section = ({
|
|
|
486
459
|
if (variant === "placeholder") {
|
|
487
460
|
const placeholderStyle = {
|
|
488
461
|
...rootStyle,
|
|
489
|
-
border: `1px dashed ${
|
|
490
|
-
borderRadius:
|
|
462
|
+
border: `1px dashed ${import_react_components3.tokens.colorNeutralStroke2}`,
|
|
463
|
+
borderRadius: import_react_components3.tokens.borderRadiusMedium,
|
|
491
464
|
minHeight,
|
|
492
465
|
width: "100%",
|
|
493
466
|
background: "transparent"
|
|
@@ -495,17 +468,17 @@ var Section = ({
|
|
|
495
468
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className, style: placeholderStyle });
|
|
496
469
|
}
|
|
497
470
|
const chrome = variant === "flat" ? {
|
|
498
|
-
backgroundColor:
|
|
499
|
-
borderRadius:
|
|
471
|
+
backgroundColor: import_react_components3.tokens.colorNeutralBackground1,
|
|
472
|
+
borderRadius: import_react_components3.tokens.borderRadiusMedium,
|
|
500
473
|
padding: cardPad,
|
|
501
474
|
minWidth: 300,
|
|
502
475
|
width: "100%",
|
|
503
476
|
overflow: "hidden"
|
|
504
477
|
} : {
|
|
505
|
-
backgroundColor:
|
|
506
|
-
border: `1px solid ${
|
|
507
|
-
borderRadius:
|
|
508
|
-
boxShadow:
|
|
478
|
+
backgroundColor: import_react_components3.tokens.colorNeutralBackground1,
|
|
479
|
+
border: `1px solid ${import_react_components3.tokens.colorNeutralStroke2}`,
|
|
480
|
+
borderRadius: import_react_components3.tokens.borderRadiusMedium,
|
|
481
|
+
boxShadow: import_react_components3.tokens.shadow4,
|
|
509
482
|
padding: cardPad,
|
|
510
483
|
minWidth: 300,
|
|
511
484
|
width: "100%",
|
|
@@ -532,15 +505,15 @@ var Section = ({
|
|
|
532
505
|
onToggle: toggle
|
|
533
506
|
}
|
|
534
507
|
),
|
|
535
|
-
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0,
|
|
508
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0, import_react_components3.mergeClasses)(styles.bodyStack), style: bodyStyle, children })
|
|
536
509
|
] });
|
|
537
510
|
};
|
|
538
511
|
|
|
539
512
|
// src/v9/containers/SectionCard.tsx
|
|
540
|
-
var
|
|
513
|
+
var import_react_components4 = require("@fluentui/react-components");
|
|
541
514
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
542
515
|
var SectionCard = ({
|
|
543
|
-
accentColor =
|
|
516
|
+
accentColor = import_react_components4.tokens.colorBrandStroke1,
|
|
544
517
|
accentWidth = 3,
|
|
545
518
|
variant = "card",
|
|
546
519
|
style,
|
|
@@ -555,7 +528,7 @@ var SectionCard = ({
|
|
|
555
528
|
);
|
|
556
529
|
|
|
557
530
|
// src/v9/containers/FormHeader.tsx
|
|
558
|
-
var
|
|
531
|
+
var import_react_components5 = require("@fluentui/react-components");
|
|
559
532
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
560
533
|
var FormHeader = ({
|
|
561
534
|
title,
|
|
@@ -573,15 +546,15 @@ var FormHeader = ({
|
|
|
573
546
|
justifyContent: "space-between",
|
|
574
547
|
gap: 12,
|
|
575
548
|
padding: "12px 24px",
|
|
576
|
-
borderBottom: `1px solid ${
|
|
577
|
-
backgroundColor:
|
|
549
|
+
borderBottom: `1px solid ${import_react_components5.tokens.colorNeutralStroke2}`,
|
|
550
|
+
backgroundColor: import_react_components5.tokens.colorNeutralBackground1
|
|
578
551
|
};
|
|
579
552
|
const mainStyle = { display: "flex", alignItems: "center", gap: 12, minWidth: 0 };
|
|
580
553
|
const titleRowStyle = { display: "flex", alignItems: "baseline", gap: 8, flexWrap: "wrap" };
|
|
581
|
-
const statusStyle = { fontSize:
|
|
554
|
+
const statusStyle = { fontSize: import_react_components5.tokens.fontSizeBase200, color: import_react_components5.tokens.colorNeutralForeground3 };
|
|
582
555
|
const subtitleStyle = {
|
|
583
|
-
fontSize:
|
|
584
|
-
color: subtitleColor ||
|
|
556
|
+
fontSize: import_react_components5.tokens.fontSizeBase200,
|
|
557
|
+
color: subtitleColor || import_react_components5.tokens.colorNeutralForeground3,
|
|
585
558
|
marginTop: 2
|
|
586
559
|
};
|
|
587
560
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className, style: rootStyle, children: [
|
|
@@ -589,7 +562,7 @@ var FormHeader = ({
|
|
|
589
562
|
persona,
|
|
590
563
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
591
564
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: titleRowStyle, children: [
|
|
592
|
-
title != null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
565
|
+
title != null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_components5.Text, { weight: "semibold", size: 400, style: titleColor ? { color: titleColor } : void 0, children: title }),
|
|
593
566
|
status != null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: statusStyle, children: status })
|
|
594
567
|
] }),
|
|
595
568
|
subtitle != null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: subtitleStyle, children: subtitle })
|
|
@@ -601,7 +574,7 @@ var FormHeader = ({
|
|
|
601
574
|
|
|
602
575
|
// src/v9/containers/PivotSurface.tsx
|
|
603
576
|
var import_react6 = require("react");
|
|
604
|
-
var
|
|
577
|
+
var import_react_components6 = require("@fluentui/react-components");
|
|
605
578
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
606
579
|
var PivotSurface = ({
|
|
607
580
|
tabs,
|
|
@@ -622,18 +595,18 @@ var PivotSurface = ({
|
|
|
622
595
|
};
|
|
623
596
|
const active = tabs.find((t) => t.id === selected) ?? tabs[0];
|
|
624
597
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className, children: [
|
|
625
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
598
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_components6.TabList, { selectedValue: selected, onTabSelect: handleSelect, appearance, size, children: tabs.map((t) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_components6.Tab, { value: t.id, icon: t.icon, disabled: t.disabled, children: t.label }, t.id)) }),
|
|
626
599
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: active?.content })
|
|
627
600
|
] });
|
|
628
601
|
};
|
|
629
602
|
|
|
630
603
|
// src/v9/containers/CommandSurface.tsx
|
|
631
|
-
var
|
|
604
|
+
var import_react_components7 = require("@fluentui/react-components");
|
|
632
605
|
var import_react_icons2 = require("@fluentui/react-icons");
|
|
633
606
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
634
607
|
function renderToolbarButton(item) {
|
|
635
608
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
636
|
-
|
|
609
|
+
import_react_components7.ToolbarButton,
|
|
637
610
|
{
|
|
638
611
|
icon: item.icon,
|
|
639
612
|
appearance: item.appearance === "primary" ? "primary" : "subtle",
|
|
@@ -655,24 +628,24 @@ var CommandSurface = ({
|
|
|
655
628
|
const hasOverflow = Boolean(overflowItems && overflowItems.length > 0);
|
|
656
629
|
const hasPrimary = items.length > 0 || hasOverflow;
|
|
657
630
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className, style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
658
|
-
hasPrimary && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
631
|
+
hasPrimary && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_components7.Toolbar, { "aria-label": "Commands", size, children: [
|
|
659
632
|
items.map(renderToolbarButton),
|
|
660
|
-
hasOverflow && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
661
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
662
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
633
|
+
hasOverflow && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_components7.Menu, { children: [
|
|
634
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_components7.MenuTrigger, { disableButtonEnhancement: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_components7.ToolbarButton, { "aria-label": "More commands", icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_icons2.MoreHorizontal20Regular, {}) }) }),
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_components7.MenuPopover, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_components7.MenuList, { children: overflowItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_components7.MenuItem, { icon: item.icon, disabled: item.disabled, onClick: item.onClick, children: item.label }, item.id)) }) })
|
|
663
636
|
] })
|
|
664
637
|
] }),
|
|
665
638
|
hasFar && // marginLeft:auto keeps far items right-aligned whether or not a primary toolbar renders.
|
|
666
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
639
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_components7.Toolbar, { "aria-label": "Secondary commands", size, style: { marginLeft: "auto" }, children: farItems.map(renderToolbarButton) })
|
|
667
640
|
] });
|
|
668
641
|
};
|
|
669
642
|
|
|
670
643
|
// src/v9/containers/ActionBar.tsx
|
|
671
|
-
var
|
|
644
|
+
var import_react_components8 = require("@fluentui/react-components");
|
|
672
645
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
673
646
|
function renderButton(b) {
|
|
674
647
|
const appearance = b.appearance === "primary" ? "primary" : b.appearance === "subtle" ? "subtle" : "secondary";
|
|
675
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_components8.Button, { appearance, icon: b.icon, disabled: b.disabled, onClick: b.onClick, children: b.label }, b.id);
|
|
676
649
|
}
|
|
677
650
|
var ActionBar = ({ buttons, alignment = "right", sticky = true, className }) => {
|
|
678
651
|
const justify = alignment === "left" ? "flex-start" : alignment === "center" ? "center" : "flex-end";
|
|
@@ -685,8 +658,8 @@ var ActionBar = ({ buttons, alignment = "right", sticky = true, className }) =>
|
|
|
685
658
|
justifyContent: left.length ? "space-between" : justify,
|
|
686
659
|
gap: 8,
|
|
687
660
|
padding: "12px 24px",
|
|
688
|
-
borderTop: `1px solid ${
|
|
689
|
-
backgroundColor:
|
|
661
|
+
borderTop: `1px solid ${import_react_components8.tokens.colorNeutralStroke2}`,
|
|
662
|
+
backgroundColor: import_react_components8.tokens.colorNeutralBackground1,
|
|
690
663
|
...sticky ? { position: "sticky", bottom: 0, zIndex: 1 } : {}
|
|
691
664
|
};
|
|
692
665
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className, style: rootStyle, children: [
|
|
@@ -696,7 +669,7 @@ var ActionBar = ({ buttons, alignment = "right", sticky = true, className }) =>
|
|
|
696
669
|
};
|
|
697
670
|
|
|
698
671
|
// src/v9/containers/Footer.tsx
|
|
699
|
-
var
|
|
672
|
+
var import_react_components9 = require("@fluentui/react-components");
|
|
700
673
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
701
674
|
var Footer = ({ sticky = true, align = "right", className, children }) => {
|
|
702
675
|
const justify = align === "left" ? "flex-start" : align === "center" ? "center" : "flex-end";
|
|
@@ -706,15 +679,15 @@ var Footer = ({ sticky = true, align = "right", className, children }) => {
|
|
|
706
679
|
justifyContent: justify,
|
|
707
680
|
gap: 8,
|
|
708
681
|
padding: "12px 24px",
|
|
709
|
-
borderTop: `1px solid ${
|
|
710
|
-
backgroundColor:
|
|
682
|
+
borderTop: `1px solid ${import_react_components9.tokens.colorNeutralStroke2}`,
|
|
683
|
+
backgroundColor: import_react_components9.tokens.colorNeutralBackground1,
|
|
711
684
|
...sticky ? { position: "sticky", bottom: 0, zIndex: 1 } : {}
|
|
712
685
|
};
|
|
713
686
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className, style: rootStyle, children });
|
|
714
687
|
};
|
|
715
688
|
|
|
716
689
|
// src/v9/overlays/FormDialogSurface.tsx
|
|
717
|
-
var
|
|
690
|
+
var import_react_components10 = require("@fluentui/react-components");
|
|
718
691
|
var import_react_icons3 = require("@fluentui/react-icons");
|
|
719
692
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
720
693
|
var FormDialogSurface = ({
|
|
@@ -740,11 +713,11 @@ var FormDialogSurface = ({
|
|
|
740
713
|
justifyContent: "space-between",
|
|
741
714
|
gap: 12,
|
|
742
715
|
padding: "12px 20px",
|
|
743
|
-
borderBottom: `1px solid ${
|
|
716
|
+
borderBottom: `1px solid ${import_react_components10.tokens.colorNeutralStroke2}`
|
|
744
717
|
};
|
|
745
|
-
const counterStyle = { fontSize:
|
|
718
|
+
const counterStyle = { fontSize: import_react_components10.tokens.fontSizeBase200, color: import_react_components10.tokens.colorNeutralForeground3 };
|
|
746
719
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
747
|
-
|
|
720
|
+
import_react_components10.Dialog,
|
|
748
721
|
{
|
|
749
722
|
open: isOpen,
|
|
750
723
|
modalType: isBlocking ? "modal" : "non-modal",
|
|
@@ -752,7 +725,7 @@ var FormDialogSurface = ({
|
|
|
752
725
|
if (!data.open) onDismiss?.();
|
|
753
726
|
},
|
|
754
727
|
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
755
|
-
|
|
728
|
+
import_react_components10.DialogSurface,
|
|
756
729
|
{
|
|
757
730
|
className,
|
|
758
731
|
style: {
|
|
@@ -767,8 +740,8 @@ var FormDialogSurface = ({
|
|
|
767
740
|
children: [
|
|
768
741
|
showHeader && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: headerStyle, children: [
|
|
769
742
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: { display: "flex", flexDirection: "column", minWidth: 0 }, children: [
|
|
770
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
771
|
-
subheader && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { fontSize:
|
|
743
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_components10.Text, { weight: "semibold", size: 400, children: title }),
|
|
744
|
+
subheader && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { fontSize: import_react_components10.tokens.fontSizeBase200, color: import_react_components10.tokens.colorNeutralForeground3, marginTop: 2 }, children: subheader })
|
|
772
745
|
] }),
|
|
773
746
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
774
747
|
recordCounter && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { style: counterStyle, children: [
|
|
@@ -776,11 +749,11 @@ var FormDialogSurface = ({
|
|
|
776
749
|
" of ",
|
|
777
750
|
recordCounter.total
|
|
778
751
|
] }),
|
|
779
|
-
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
752
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_components10.Button, { appearance: "subtle", "aria-label": "Close", icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_icons3.Dismiss20Regular, {}), onClick: onDismiss })
|
|
780
753
|
] })
|
|
781
754
|
] }),
|
|
782
755
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { flex: 1, minHeight: 0, overflow: "auto", padding: 20 }, children }),
|
|
783
|
-
footer && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { borderTop: `1px solid ${
|
|
756
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { borderTop: `1px solid ${import_react_components10.tokens.colorNeutralStroke2}`, padding: "12px 20px" }, children: footer })
|
|
784
757
|
]
|
|
785
758
|
}
|
|
786
759
|
)
|
|
@@ -789,7 +762,7 @@ var FormDialogSurface = ({
|
|
|
789
762
|
};
|
|
790
763
|
|
|
791
764
|
// src/v9/overlays/ModalSurface.tsx
|
|
792
|
-
var
|
|
765
|
+
var import_react_components11 = require("@fluentui/react-components");
|
|
793
766
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
794
767
|
var ModalSurface = ({
|
|
795
768
|
isOpen,
|
|
@@ -805,21 +778,21 @@ var ModalSurface = ({
|
|
|
805
778
|
}) => {
|
|
806
779
|
const sizing = autoSize ? { width: "auto", minWidth: MODAL_AUTOSIZE_MIN_WIDTH, maxWidth: "100%" } : { maxWidth: "95vw", width: `${dialogWidthPx({ width, size })}px` };
|
|
807
780
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
808
|
-
|
|
781
|
+
import_react_components11.Dialog,
|
|
809
782
|
{
|
|
810
783
|
open: isOpen,
|
|
811
784
|
modalType: isBlocking ? "modal" : "non-modal",
|
|
812
785
|
onOpenChange: (_e, data) => {
|
|
813
786
|
if (!data.open) onDismiss?.();
|
|
814
787
|
},
|
|
815
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
816
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { padding: "16px 20px 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
788
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_components11.DialogSurface, { className, style: { ...sizing, padding: 0 }, children: [
|
|
789
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { padding: "16px 20px 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_components11.Text, { weight: "semibold", size: 500, children: title }) }),
|
|
817
790
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { padding: 20 }, children }),
|
|
818
791
|
footer && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
819
792
|
"div",
|
|
820
793
|
{
|
|
821
794
|
style: {
|
|
822
|
-
borderTop: `1px solid ${
|
|
795
|
+
borderTop: `1px solid ${import_react_components11.tokens.colorNeutralStroke2}`,
|
|
823
796
|
padding: "12px 20px",
|
|
824
797
|
display: "flex",
|
|
825
798
|
justifyContent: "flex-end",
|
|
@@ -834,7 +807,7 @@ var ModalSurface = ({
|
|
|
834
807
|
};
|
|
835
808
|
|
|
836
809
|
// src/v9/overlays/PanelSurface.tsx
|
|
837
|
-
var
|
|
810
|
+
var import_react_components12 = require("@fluentui/react-components");
|
|
838
811
|
var import_react_icons4 = require("@fluentui/react-icons");
|
|
839
812
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
840
813
|
var PanelSurface = ({
|
|
@@ -852,7 +825,7 @@ var PanelSurface = ({
|
|
|
852
825
|
const size = drawerSize ?? (width != null && width > 500 ? "medium" : "small");
|
|
853
826
|
const customWidthStyle = width != null ? { width: `${width}px` } : void 0;
|
|
854
827
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
855
|
-
|
|
828
|
+
import_react_components12.OverlayDrawer,
|
|
856
829
|
{
|
|
857
830
|
open: isOpen,
|
|
858
831
|
position: "end",
|
|
@@ -865,14 +838,14 @@ var PanelSurface = ({
|
|
|
865
838
|
onDismiss?.();
|
|
866
839
|
},
|
|
867
840
|
children: [
|
|
868
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
869
|
-
|
|
841
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_components12.DrawerHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
842
|
+
import_react_components12.DrawerHeaderTitle,
|
|
870
843
|
{
|
|
871
|
-
action: hasCloseButton && onDismiss ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
844
|
+
action: hasCloseButton && onDismiss ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_components12.Button, { appearance: "subtle", "aria-label": "Close", icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_icons4.Dismiss24Regular, {}), onClick: onDismiss }) : void 0,
|
|
872
845
|
children: title
|
|
873
846
|
}
|
|
874
847
|
) }),
|
|
875
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_components12.DrawerBody, { children: [
|
|
876
849
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { padding: "12px 0" }, children }),
|
|
877
850
|
footer && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { marginTop: "auto", paddingTop: 12 }, children: footer })
|
|
878
851
|
] })
|
|
@@ -882,7 +855,7 @@ var PanelSurface = ({
|
|
|
882
855
|
};
|
|
883
856
|
|
|
884
857
|
// src/v9/overlays/CalloutSurface.tsx
|
|
885
|
-
var
|
|
858
|
+
var import_react_components13 = require("@fluentui/react-components");
|
|
886
859
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
887
860
|
function resolveTarget(target) {
|
|
888
861
|
if (!target) return null;
|
|
@@ -905,7 +878,7 @@ var CalloutSurface = ({
|
|
|
905
878
|
const el = resolveTarget(target);
|
|
906
879
|
const positioning = { position, align, ...el ? { target: el } : {} };
|
|
907
880
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
908
|
-
|
|
881
|
+
import_react_components13.Popover,
|
|
909
882
|
{
|
|
910
883
|
open: true,
|
|
911
884
|
trapFocus: false,
|
|
@@ -914,13 +887,13 @@ var CalloutSurface = ({
|
|
|
914
887
|
onOpenChange: (_e, data) => {
|
|
915
888
|
if (!data.open) onDismiss?.();
|
|
916
889
|
},
|
|
917
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_components13.PopoverSurface, { className, style: { width: calloutWidthPx(width), padding: 16 }, children })
|
|
918
891
|
}
|
|
919
892
|
);
|
|
920
893
|
};
|
|
921
894
|
|
|
922
895
|
// src/v9/overlays/TooltipSurface.tsx
|
|
923
|
-
var
|
|
896
|
+
var import_react_components14 = require("@fluentui/react-components");
|
|
924
897
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
925
898
|
var DELAY_MS = {
|
|
926
899
|
zero: 0,
|
|
@@ -933,7 +906,7 @@ var TooltipSurface = ({
|
|
|
933
906
|
delay = "medium",
|
|
934
907
|
relationship = "label",
|
|
935
908
|
children
|
|
936
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
909
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_components14.Tooltip, { content, relationship, positioning: position, showDelay: DELAY_MS[delay], children });
|
|
937
910
|
// Annotate the CommonJS export names for ESM import in node:
|
|
938
911
|
0 && (module.exports = {
|
|
939
912
|
ActionBar,
|
|
@@ -969,6 +942,7 @@ var TooltipSurface = ({
|
|
|
969
942
|
dialogWidthCss,
|
|
970
943
|
dialogWidthPx,
|
|
971
944
|
dynamicsBrandRamp,
|
|
945
|
+
dynamicsV9DarkTheme,
|
|
972
946
|
dynamicsV9Theme,
|
|
973
947
|
fieldGridStyle,
|
|
974
948
|
fieldRowStyle,
|