@spfx-fast/sharepoint-ui 0.4.1 → 0.4.3
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/AGENTS.md +23 -3
- package/QUICKSTART.md +133 -0
- package/README.md +21 -878
- package/components.json +178 -33
- package/dist/appearance.js +4 -4
- package/dist/elements/alert.js +26 -2
- package/dist/elements/avatar.js +1 -1
- package/dist/elements/button.js +1 -1
- package/dist/elements/carousel.js +5 -2
- package/dist/elements/color-picker.js +1 -1
- package/dist/elements/combobox.js +5 -5
- package/dist/elements/data-grid-model.d.ts +3 -0
- package/dist/elements/data-grid.d.ts +2 -1
- package/dist/elements/data-grid.js +19 -10
- package/dist/elements/date-picker.js +1 -1
- package/dist/elements/dialog.js +1 -1
- package/dist/elements/file-upload.js +1 -1
- package/dist/elements/floating-position.d.ts +10 -0
- package/dist/elements/floating-position.js +53 -0
- package/dist/elements/info.js +1 -1
- package/dist/elements/input.js +2 -2
- package/dist/elements/link.js +1 -1
- package/dist/elements/message-bar.js +33 -5
- package/dist/elements/nav.js +4 -1
- package/dist/elements/overflow.d.ts +1 -0
- package/dist/elements/overflow.js +2 -2
- package/dist/elements/popover.js +1 -1
- package/dist/elements/rating.js +3 -3
- package/dist/elements/rich-text-editor.d.ts +15 -1
- package/dist/elements/rich-text-editor.js +938 -79
- package/dist/elements/search.js +3 -10
- package/dist/elements/select.js +2 -2
- package/dist/elements/shared.d.ts +4 -1
- package/dist/elements/shared.js +14 -1
- package/dist/elements/sharepoint-field-basic-controls.d.ts +1 -0
- package/dist/elements/sharepoint-field-basic-controls.js +14 -0
- package/dist/elements/sharepoint-fields.d.ts +29 -0
- package/dist/elements/sharepoint-fields.js +460 -0
- package/dist/elements/spin-button.js +2 -2
- package/dist/elements/tag-picker.js +29 -11
- package/dist/elements/textarea.js +2 -2
- package/dist/elements/toaster.js +2 -1
- package/dist/elements/tooltip.js +18 -1
- package/dist/elements/tree.js +1 -1
- package/dist/elements.d.ts +3 -2
- package/dist/elements.js +4 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +4 -2
- package/dist/react.d.ts +188 -19
- package/dist/react.js +321 -61
- package/dist/sharepoint-fields.d.ts +135 -0
- package/dist/sharepoint-fields.js +402 -0
- package/dist/theme.d.ts +9 -1
- package/dist/theme.js +78 -1
- package/package.json +11 -2
- package/skills/sharepoint-ui/SKILL.md +1 -1
- package/skills/sharepoint-ui/references/sharepoint-patterns.md +1 -1
package/dist/react.d.ts
CHANGED
|
@@ -23,6 +23,9 @@ export type DialogOnOpenChangeData = {
|
|
|
23
23
|
import { type ProgressBarColor, type ProgressBarShape, type ProgressBarThickness } from "./elements/progress-bar.js";
|
|
24
24
|
export type { ProgressBarColor, ProgressBarShape, ProgressBarThickness } from "./elements/progress-bar.js";
|
|
25
25
|
export type { SpinButtonAppearance, SpinButtonSize, SpinButtonChangeData } from "./elements/spin-button.js";
|
|
26
|
+
import { type RichTextEditorImageUploader, type RichTextEditorLinkPicker, type SharePointMultiLineField } from "./elements/rich-text-editor.js";
|
|
27
|
+
export { getRichTextEditorFieldOptions, type SharePointMultiLineField, type RichTextEditorImageUploadResult, type RichTextEditorImageUploader, type RichTextEditorLink, type RichTextEditorLinkPicker } from "./elements/rich-text-editor.js";
|
|
28
|
+
import { type SharePointFieldMetadata, type SharePointFieldValue } from "./sharepoint-fields.js";
|
|
26
29
|
import { type SkeletonAnimation, type SkeletonAppearance, type SkeletonItemSize, type SkeletonShape } from "./elements/skeleton.js";
|
|
27
30
|
import { type DividerAppearance } from "./elements/divider.js";
|
|
28
31
|
export type { DividerAppearance } from "./elements/divider.js";
|
|
@@ -30,7 +33,8 @@ import { type AccordionItemValue, type AccordionNavigation } from "./elements/ac
|
|
|
30
33
|
import { type AvatarColor } from "./elements/avatar.js";
|
|
31
34
|
import { type PersonaPresence, type PersonaSize } from "./elements/persona.js";
|
|
32
35
|
import { type VirtualListDataSource } from "./elements/virtual-list.js";
|
|
33
|
-
import { type DataGridCellEdit, type DataGridColumn, type DataGridDataSource, type DataGridDataSourceRow, type DataGridColumnSizingOptions, type DataGridColumnWidths, type DataGridEditValue, type DataGridFocusMode, type DataGridSelectionAppearance, type DataGridSelectionModel, type DataGridSort } from "./elements/data-grid-model.js";
|
|
36
|
+
import { type DataGridCellEdit, type DataGridCellEditError, type DataGridColumn, type DataGridDataSource, type DataGridDataSourceRow, type DataGridColumnSizingOptions, type DataGridColumnWidths, type DataGridEditValue, type DataGridFocusMode, type DataGridSelectionAppearance, type DataGridSelectionModel, type DataGridSort } from "./elements/data-grid-model.js";
|
|
37
|
+
export type { DataGridCellEditError } from "./elements/data-grid-model.js";
|
|
34
38
|
import { type TreeNode } from "./elements/tree-model.js";
|
|
35
39
|
import { type InteractionTagSelectData, type TagAppearance, type TagGroupSelectData, type TagSize } from "./elements/tags.js";
|
|
36
40
|
import { type TagPickerOpenChangeType } from "./elements/tag-picker.js";
|
|
@@ -75,10 +79,11 @@ import { type InfoPlacement } from "./elements/info.js";
|
|
|
75
79
|
import { type CarouselAlign, type CarouselAppearance, type CarouselMotion } from "./elements/carousel.js";
|
|
76
80
|
export type { CarouselIndexChangeData } from "./elements/carousel.js";
|
|
77
81
|
export type { CarouselAlign, CarouselAppearance, CarouselMotion } from "./elements/carousel.js";
|
|
78
|
-
import { type OverflowAxis, type OverflowState } from "./elements/overflow.js";
|
|
79
|
-
export type { OverflowAxis, OverflowState } from "./elements/overflow.js";
|
|
82
|
+
import { type OverflowAxis, type OverflowDensity, type OverflowState } from "./elements/overflow.js";
|
|
83
|
+
export type { OverflowAxis, OverflowDensity, OverflowState } from "./elements/overflow.js";
|
|
80
84
|
import { type SharePointUIAppearance, type SharePointUIBaseAppearance, type SharePointUIDensity, type SharePointUIStyleTokens } from "./appearance.js";
|
|
81
85
|
import { type FluentThemeTokens, type SharePointUIDesignTheme } from "./theme.js";
|
|
86
|
+
export { getSharePointThemeColorPresets, type SharePointThemeColorPreset } from "./theme.js";
|
|
82
87
|
export { createResizeObserverFromDocument, getRTLRootMargin, scrollToItemDynamic, scrollToItemStatic, useDynamicVirtualizerMeasure, useIntersectionObserver, useMeasureList, useResizeObserverRef_unstable, useStaticVirtualizerMeasure } from "./virtualizer-hooks.js";
|
|
83
88
|
export type { IndexedResizeCallbackElement, ResizeCallbackWithRef, ScrollToItemDynamicParams, ScrollToItemStaticParams, VirtualizerContextMeasureProps, VirtualizerMeasureDynamicProps, VirtualizerMeasureProps } from "./virtualizer-hooks.js";
|
|
84
89
|
export { composeSharePointUIDesignThemes } from "./theme.js";
|
|
@@ -143,6 +148,12 @@ export type SharePointUIStrings = {
|
|
|
143
148
|
close: string;
|
|
144
149
|
dialogLabel?: string;
|
|
145
150
|
richTextEditorLabel?: string;
|
|
151
|
+
richTextTextColor?: string;
|
|
152
|
+
richTextHighlightColor?: string;
|
|
153
|
+
richTextCustomColor?: string;
|
|
154
|
+
richTextThemeAccent?: string;
|
|
155
|
+
richTextFontFamily?: string;
|
|
156
|
+
richTextFontSize?: string;
|
|
146
157
|
dismiss: string;
|
|
147
158
|
notifications?: string;
|
|
148
159
|
clear: string;
|
|
@@ -155,6 +166,15 @@ export type SharePointUIStrings = {
|
|
|
155
166
|
invalidValue: string;
|
|
156
167
|
moreInformation: string;
|
|
157
168
|
people?: string;
|
|
169
|
+
presenceAvailable?: string;
|
|
170
|
+
presenceBusy?: string;
|
|
171
|
+
presenceDoNotDisturb?: string;
|
|
172
|
+
presenceAway?: string;
|
|
173
|
+
presenceOffline?: string;
|
|
174
|
+
presenceUnknown?: string;
|
|
175
|
+
presenceOutOfOffice?: string;
|
|
176
|
+
presenceBlocked?: string;
|
|
177
|
+
presenceOutOfOfficeLabel?: string;
|
|
158
178
|
showMorePeople?: string;
|
|
159
179
|
showFewerPeople?: string;
|
|
160
180
|
navigationMenu?: string;
|
|
@@ -178,6 +198,9 @@ export type SharePointUIStrings = {
|
|
|
178
198
|
dataGridSortPriority?: string;
|
|
179
199
|
dataGridResizeLabel?: string;
|
|
180
200
|
dataGridReorderLabel?: string;
|
|
201
|
+
dataGridReorderHint?: string;
|
|
202
|
+
dataGridLoadError?: string;
|
|
203
|
+
dataGridEditError?: string;
|
|
181
204
|
dataGridEmptyGroupLabel?: string;
|
|
182
205
|
dataGridExpandGroupLabel?: string;
|
|
183
206
|
dataGridCollapseGroupLabel?: string;
|
|
@@ -219,6 +242,15 @@ export type SharePointUIStrings = {
|
|
|
219
242
|
richTextBold: string;
|
|
220
243
|
richTextItalic: string;
|
|
221
244
|
richTextUnderline: string;
|
|
245
|
+
richTextStrike?: string;
|
|
246
|
+
richTextClearFormatting?: string;
|
|
247
|
+
richTextFormatBlock?: string;
|
|
248
|
+
richTextParagraph?: string;
|
|
249
|
+
richTextHeading1?: string;
|
|
250
|
+
richTextHeading2?: string;
|
|
251
|
+
richTextHeading3?: string;
|
|
252
|
+
richTextBlockquote?: string;
|
|
253
|
+
richTextPreformatted?: string;
|
|
222
254
|
richTextBulletList: string;
|
|
223
255
|
richTextNumberList: string;
|
|
224
256
|
richTextLink: string;
|
|
@@ -269,6 +301,24 @@ export type SharePointUIStrings = {
|
|
|
269
301
|
teachingPopoverPageLabel?: string;
|
|
270
302
|
overflowDescription?: string;
|
|
271
303
|
overflowMenuLabel?: string;
|
|
304
|
+
} & {
|
|
305
|
+
richTextLinkDialog?: string;
|
|
306
|
+
richTextLinkNewTab?: string;
|
|
307
|
+
richTextLinkText?: string;
|
|
308
|
+
richTextLinkTitle?: string;
|
|
309
|
+
richTextLinkApply?: string;
|
|
310
|
+
richTextLinkRemove?: string;
|
|
311
|
+
richTextLinkCancel?: string;
|
|
312
|
+
richTextLinkInvalid?: string;
|
|
313
|
+
richTextLinkBrowse?: string;
|
|
314
|
+
richTextLinkBrowsing?: string;
|
|
315
|
+
richTextLinkPickerError?: string;
|
|
316
|
+
richTextSubscript?: string;
|
|
317
|
+
richTextSuperscript?: string;
|
|
318
|
+
richTextAlignLeft?: string;
|
|
319
|
+
richTextAlignCenter?: string;
|
|
320
|
+
richTextAlignRight?: string;
|
|
321
|
+
richTextAlignJustify?: string;
|
|
272
322
|
};
|
|
273
323
|
export type AvatarGroupContextValue = {
|
|
274
324
|
size: number;
|
|
@@ -743,12 +793,13 @@ export declare function useOverflowMenu<TElement extends HTMLElement = HTMLEleme
|
|
|
743
793
|
overflowCount: number;
|
|
744
794
|
isOverflowing: boolean;
|
|
745
795
|
};
|
|
746
|
-
export declare function Overflow({ children, label, minimumVisible, overflowDirection, overflowAxis, hasHiddenItems, overflowContent, padding, onOverflowChange, onOverflowItemSelect, ...props }: ElementProps & {
|
|
796
|
+
export declare function Overflow({ children, label, minimumVisible, overflowDirection, overflowAxis, density, hasHiddenItems, overflowContent, padding, onOverflowChange, onOverflowItemSelect, ...props }: ElementProps & {
|
|
747
797
|
children?: React.ReactNode;
|
|
748
798
|
label?: string;
|
|
749
799
|
minimumVisible?: number;
|
|
750
800
|
overflowDirection?: "start" | "end";
|
|
751
801
|
overflowAxis?: OverflowAxis;
|
|
802
|
+
density?: OverflowDensity;
|
|
752
803
|
hasHiddenItems?: boolean;
|
|
753
804
|
overflowContent?: React.ReactNode;
|
|
754
805
|
padding?: number;
|
|
@@ -997,22 +1048,38 @@ export declare const Drawer: React.ForwardRefExoticComponent<React.HTMLAttribute
|
|
|
997
1048
|
export declare function DrawerHeader({ children }: {
|
|
998
1049
|
children?: React.ReactNode;
|
|
999
1050
|
}): React.ReactElement;
|
|
1000
|
-
export
|
|
1051
|
+
export type DrawerHeaderNavigationProps = ElementProps & {
|
|
1001
1052
|
children?: React.ReactNode;
|
|
1002
1053
|
label?: string;
|
|
1003
|
-
}
|
|
1054
|
+
};
|
|
1055
|
+
export declare const DrawerHeaderNavigation: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
1056
|
+
[attribute: `data-${string}`]: string | number | boolean | undefined;
|
|
1057
|
+
} & {
|
|
1058
|
+
children?: React.ReactNode;
|
|
1059
|
+
label?: string;
|
|
1060
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
1004
1061
|
export type DrawerHeaderTitleHeadingSlot = React.ReactElement<any> | Omit<React.HTMLAttributes<HTMLElement>, "children">;
|
|
1005
1062
|
export declare function DrawerHeaderTitle({ children, action, heading, ...props }: ElementProps & {
|
|
1006
1063
|
children?: React.ReactNode;
|
|
1007
1064
|
action?: React.ReactNode;
|
|
1008
1065
|
heading?: DrawerHeaderTitleHeadingSlot;
|
|
1009
1066
|
}): React.ReactElement;
|
|
1010
|
-
export
|
|
1067
|
+
export type DrawerBodyProps = ElementProps & {
|
|
1011
1068
|
children?: React.ReactNode;
|
|
1012
|
-
}
|
|
1013
|
-
export declare
|
|
1069
|
+
};
|
|
1070
|
+
export declare const DrawerBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
1071
|
+
[attribute: `data-${string}`]: string | number | boolean | undefined;
|
|
1072
|
+
} & {
|
|
1014
1073
|
children?: React.ReactNode;
|
|
1015
|
-
}
|
|
1074
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
1075
|
+
export type DrawerFooterProps = ElementProps & {
|
|
1076
|
+
children?: React.ReactNode;
|
|
1077
|
+
};
|
|
1078
|
+
export declare const DrawerFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
1079
|
+
[attribute: `data-${string}`]: string | number | boolean | undefined;
|
|
1080
|
+
} & {
|
|
1081
|
+
children?: React.ReactNode;
|
|
1082
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
1016
1083
|
export type InlineDrawerProps = ElementProps & {
|
|
1017
1084
|
open?: boolean;
|
|
1018
1085
|
title?: string;
|
|
@@ -1317,6 +1384,7 @@ export type ComboboxActiveOptionChangeData = {
|
|
|
1317
1384
|
export type ComboBoxProps = NativeClickHostProps<HTMLInputElement> & {
|
|
1318
1385
|
label?: string;
|
|
1319
1386
|
selectedLabel?: string;
|
|
1387
|
+
requiredMessage?: string;
|
|
1320
1388
|
value?: string;
|
|
1321
1389
|
defaultValue?: string;
|
|
1322
1390
|
selectedValue?: string;
|
|
@@ -1359,6 +1427,7 @@ export declare const ComboBox: React.ForwardRefExoticComponent<Omit<ElementProps
|
|
|
1359
1427
|
} & {
|
|
1360
1428
|
label?: string;
|
|
1361
1429
|
selectedLabel?: string;
|
|
1430
|
+
requiredMessage?: string;
|
|
1362
1431
|
value?: string;
|
|
1363
1432
|
defaultValue?: string;
|
|
1364
1433
|
selectedValue?: string;
|
|
@@ -1548,19 +1617,30 @@ export declare const OptionGroup: React.ForwardRefExoticComponent<React.HTMLAttr
|
|
|
1548
1617
|
label?: string;
|
|
1549
1618
|
children?: React.ReactNode;
|
|
1550
1619
|
} & React.RefAttributes<HTMLElement>>;
|
|
1620
|
+
export type RichTextImageUploadErrorData = {
|
|
1621
|
+
fileName: string;
|
|
1622
|
+
error: unknown;
|
|
1623
|
+
};
|
|
1624
|
+
export type RichTextEditorContentMode = "plain" | "restricted" | "rich" | "html";
|
|
1551
1625
|
export type RichTextEditorProps = NativeClickHostProps<HTMLDivElement> & {
|
|
1552
1626
|
label?: string;
|
|
1553
1627
|
editorLabel?: string;
|
|
1554
1628
|
value?: string;
|
|
1555
1629
|
defaultValue?: string;
|
|
1556
1630
|
placeholder?: string;
|
|
1631
|
+
field?: SharePointMultiLineField;
|
|
1632
|
+
contentMode?: RichTextEditorContentMode;
|
|
1633
|
+
allowHyperlink?: boolean;
|
|
1557
1634
|
disabled?: boolean;
|
|
1558
1635
|
readOnly?: boolean;
|
|
1559
1636
|
required?: boolean;
|
|
1560
1637
|
name?: string;
|
|
1561
1638
|
form?: string;
|
|
1562
|
-
onValueChange?: (
|
|
1563
|
-
onImageUpload?:
|
|
1639
|
+
onValueChange?: (value: string) => void;
|
|
1640
|
+
onImageUpload?: RichTextEditorImageUploader;
|
|
1641
|
+
onImageUploadError?: (data: RichTextImageUploadErrorData) => void;
|
|
1642
|
+
linkPicker?: RichTextEditorLinkPicker;
|
|
1643
|
+
onLinkPickerError?: (error: unknown) => void;
|
|
1564
1644
|
};
|
|
1565
1645
|
export declare const RichTextEditor: React.ForwardRefExoticComponent<Omit<ElementProps, "onClick" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & Pick<React.DOMAttributes<HTMLDivElement>, "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture"> & NativeMousePointerEventProps<HTMLDivElement> & NativeAdditionalEventProps<HTMLDivElement> & {
|
|
1566
1646
|
onClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
@@ -1571,13 +1651,19 @@ export declare const RichTextEditor: React.ForwardRefExoticComponent<Omit<Elemen
|
|
|
1571
1651
|
value?: string;
|
|
1572
1652
|
defaultValue?: string;
|
|
1573
1653
|
placeholder?: string;
|
|
1654
|
+
field?: SharePointMultiLineField;
|
|
1655
|
+
contentMode?: RichTextEditorContentMode;
|
|
1656
|
+
allowHyperlink?: boolean;
|
|
1574
1657
|
disabled?: boolean;
|
|
1575
1658
|
readOnly?: boolean;
|
|
1576
1659
|
required?: boolean;
|
|
1577
1660
|
name?: string;
|
|
1578
1661
|
form?: string;
|
|
1579
|
-
onValueChange?: (
|
|
1580
|
-
onImageUpload?:
|
|
1662
|
+
onValueChange?: (value: string) => void;
|
|
1663
|
+
onImageUpload?: RichTextEditorImageUploader;
|
|
1664
|
+
onImageUploadError?: (data: RichTextImageUploadErrorData) => void;
|
|
1665
|
+
linkPicker?: RichTextEditorLinkPicker;
|
|
1666
|
+
onLinkPickerError?: (error: unknown) => void;
|
|
1581
1667
|
} & React.RefAttributes<HTMLElement>>;
|
|
1582
1668
|
export type BadgeProps = ElementProps & {
|
|
1583
1669
|
children?: React.ReactNode;
|
|
@@ -1754,6 +1840,7 @@ export type TagPickerProps = Omit<ElementProps, "onChange"> & {
|
|
|
1754
1840
|
children?: React.ReactNode;
|
|
1755
1841
|
label?: string;
|
|
1756
1842
|
selectedLabel?: string;
|
|
1843
|
+
requiredMessage?: string;
|
|
1757
1844
|
form?: string;
|
|
1758
1845
|
disabled?: boolean;
|
|
1759
1846
|
selectedOptions?: readonly string[];
|
|
@@ -1776,6 +1863,7 @@ export declare const TagPicker: React.ForwardRefExoticComponent<Omit<ElementProp
|
|
|
1776
1863
|
children?: React.ReactNode;
|
|
1777
1864
|
label?: string;
|
|
1778
1865
|
selectedLabel?: string;
|
|
1866
|
+
requiredMessage?: string;
|
|
1779
1867
|
form?: string;
|
|
1780
1868
|
disabled?: boolean;
|
|
1781
1869
|
selectedOptions?: readonly string[];
|
|
@@ -1817,12 +1905,20 @@ export declare function TagPickerList({ children }: ElementProps & {
|
|
|
1817
1905
|
children?: React.ReactNode;
|
|
1818
1906
|
disableAutoFocus?: boolean;
|
|
1819
1907
|
}): React.ReactElement;
|
|
1820
|
-
export
|
|
1908
|
+
export type TagPickerButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "type"> & {
|
|
1909
|
+
[attribute: `data-${string}`]: string | number | boolean | undefined;
|
|
1821
1910
|
children?: React.ReactNode;
|
|
1822
1911
|
appearance?: "filled-darker" | "filled-lighter" | "outline" | "underline";
|
|
1823
1912
|
size?: "small" | "medium" | "large";
|
|
1824
1913
|
disabled?: boolean;
|
|
1825
|
-
}
|
|
1914
|
+
};
|
|
1915
|
+
export declare const TagPickerButton: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "type"> & {
|
|
1916
|
+
[attribute: `data-${string}`]: string | number | boolean | undefined;
|
|
1917
|
+
children?: React.ReactNode;
|
|
1918
|
+
appearance?: "filled-darker" | "filled-lighter" | "outline" | "underline";
|
|
1919
|
+
size?: "small" | "medium" | "large";
|
|
1920
|
+
disabled?: boolean;
|
|
1921
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
1826
1922
|
export declare const TagPickerOption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
1827
1923
|
[attribute: `data-${string}`]: string | number | boolean | undefined;
|
|
1828
1924
|
} & {
|
|
@@ -1860,6 +1956,7 @@ export type RatingProps = Omit<ElementProps, "onChange"> & {
|
|
|
1860
1956
|
size?: "small" | "medium" | "large" | "extra-large";
|
|
1861
1957
|
color?: "brand" | "marigold" | "neutral";
|
|
1862
1958
|
label?: string;
|
|
1959
|
+
requiredMessage?: string;
|
|
1863
1960
|
itemLabel?: (rating: number) => string;
|
|
1864
1961
|
iconFilled?: React.ElementType;
|
|
1865
1962
|
iconOutline?: React.ElementType;
|
|
@@ -1880,6 +1977,7 @@ export declare const Rating: React.ForwardRefExoticComponent<Omit<ElementProps,
|
|
|
1880
1977
|
size?: "small" | "medium" | "large" | "extra-large";
|
|
1881
1978
|
color?: "brand" | "marigold" | "neutral";
|
|
1882
1979
|
label?: string;
|
|
1980
|
+
requiredMessage?: string;
|
|
1883
1981
|
itemLabel?: (rating: number) => string;
|
|
1884
1982
|
iconFilled?: React.ElementType;
|
|
1885
1983
|
iconOutline?: React.ElementType;
|
|
@@ -1965,7 +2063,7 @@ export declare const CarouselNav: React.ForwardRefExoticComponent<React.HTMLAttr
|
|
|
1965
2063
|
} & {
|
|
1966
2064
|
children?: React.ReactNode;
|
|
1967
2065
|
label?: string;
|
|
1968
|
-
appearance?: "brand";
|
|
2066
|
+
appearance?: "brand" | "thumbnails";
|
|
1969
2067
|
slot?: string;
|
|
1970
2068
|
} & React.RefAttributes<HTMLElement>>;
|
|
1971
2069
|
export declare const CarouselNavButton: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
@@ -2172,6 +2270,7 @@ export declare const Nav: React.ForwardRefExoticComponent<Omit<ElementProps, "on
|
|
|
2172
2270
|
defaultOpen?: boolean;
|
|
2173
2271
|
collapsed?: boolean;
|
|
2174
2272
|
defaultCollapsed?: boolean;
|
|
2273
|
+
fullWidth?: boolean;
|
|
2175
2274
|
collapsible?: boolean;
|
|
2176
2275
|
multiple?: boolean;
|
|
2177
2276
|
density?: "small" | "medium" | "large";
|
|
@@ -3048,7 +3147,7 @@ export type DataGridColumnResizeData = {
|
|
|
3048
3147
|
};
|
|
3049
3148
|
export type DataGridColumnResizeEvent = MouseEvent | KeyboardEvent | TouchEvent | undefined;
|
|
3050
3149
|
export type DataGridSelectionChangeEvent = React.MouseEvent | React.KeyboardEvent;
|
|
3051
|
-
declare function VirtualDataGrid<T>({ items, dataSource, onDataLoadError, onDataSourceGroupToggle, columns, getRowId, label: labelProp, height, rowHeight, getRowHeight, overscan, virtualize, virtualizeColumns, focusMode, subtleSelection, selectionAppearance, selectionMode, selectedKeys, defaultSelectedKeys, selectionModel, defaultSelectionModel, onDataSourceSelectionChange, onSelectionChange, sort, defaultSort, onSortChange, multiSort, defaultMultiSort, onMultiSortChange, sortPriorityLabel: sortPriorityLabelProp, filterable, filterValue, defaultFilterValue, onFilterValueChange, filterLabel: filterLabelProp, renderCell, onCellEdit, onCellsEdit, validateCellEdit, rowLabel: rowLabelProp, editHint: editHintProp, emptyMessage: emptyMessageProp, loadingLabel: loadingLabelProp, selectLabel: selectLabelProp, selectAllLabel: selectAllLabelProp, resizableColumns, columnWidths, defaultColumnWidths, columnSizingOptions, resizableColumnsOptions, containerWidthOffset, onColumnResize, resizeLabel: resizeLabelProp, reorderableColumns, columnOrder, defaultColumnOrder, onColumnOrderChange, reorderLabel: reorderLabelProp, groupBy, collapsedGroupKeys, defaultCollapsedGroupKeys, onCollapsedGroupKeysChange, emptyGroupLabel: emptyGroupLabelProp, expandGroupLabel: expandGroupLabelProp, collapseGroupLabel: collapseGroupLabelProp, onRenderedRange, ...props }: ElementProps & {
|
|
3150
|
+
declare function VirtualDataGrid<T>({ items, dataSource, onDataLoadError, onDataSourceGroupToggle, columns, getRowId, label: labelProp, height, rowHeight, getRowHeight, overscan, virtualize, virtualizeColumns, focusMode, subtleSelection, selectionAppearance, selectionMode, selectedKeys, defaultSelectedKeys, selectionModel, defaultSelectionModel, onDataSourceSelectionChange, onSelectionChange, sort, defaultSort, onSortChange, multiSort, defaultMultiSort, onMultiSortChange, sortPriorityLabel: sortPriorityLabelProp, filterable, filterValue, defaultFilterValue, onFilterValueChange, filterLabel: filterLabelProp, renderCell, onCellEdit, onCellEditError, onCellsEdit, validateCellEdit, rowLabel: rowLabelProp, editHint: editHintProp, emptyMessage: emptyMessageProp, loadingLabel: loadingLabelProp, selectLabel: selectLabelProp, selectAllLabel: selectAllLabelProp, resizableColumns, columnWidths, defaultColumnWidths, columnSizingOptions, resizableColumnsOptions, containerWidthOffset, onColumnResize, resizeLabel: resizeLabelProp, reorderableColumns, columnOrder, defaultColumnOrder, onColumnOrderChange, reorderLabel: reorderLabelProp, groupBy, collapsedGroupKeys, defaultCollapsedGroupKeys, onCollapsedGroupKeysChange, emptyGroupLabel: emptyGroupLabelProp, expandGroupLabel: expandGroupLabelProp, collapseGroupLabel: collapseGroupLabelProp, onRenderedRange, ...props }: ElementProps & {
|
|
3052
3151
|
items?: T[];
|
|
3053
3152
|
dataSource?: DataGridDataSource<T>;
|
|
3054
3153
|
onDataLoadError?: (error: unknown, range: {
|
|
@@ -3089,6 +3188,7 @@ declare function VirtualDataGrid<T>({ items, dataSource, onDataLoadError, onData
|
|
|
3089
3188
|
filterLabel?: string;
|
|
3090
3189
|
renderCell?: (item: T, column: DataGridColumn<T>, rowIndex: number) => React.ReactNode;
|
|
3091
3190
|
onCellEdit?: (edit: DataGridCellEdit<T>) => void | Promise<void>;
|
|
3191
|
+
onCellEditError?: (error: DataGridCellEditError<T>) => void;
|
|
3092
3192
|
onCellsEdit?: (edits: readonly DataGridCellEdit<T>[]) => void | Promise<void>;
|
|
3093
3193
|
validateCellEdit?: (edit: DataGridCellEdit<T>) => string | undefined;
|
|
3094
3194
|
rowLabel?: string;
|
|
@@ -3182,6 +3282,7 @@ export type DataGridCompositionContextValue<T> = {
|
|
|
3182
3282
|
rowLabel: string;
|
|
3183
3283
|
editedCells: Record<string, DataGridEditValue>;
|
|
3184
3284
|
onCellEdit?: (edit: DataGridCellEdit<T>) => void | Promise<void>;
|
|
3285
|
+
onCellEditError?: (error: DataGridCellEditError<T>) => void;
|
|
3185
3286
|
validateCellEdit?: (edit: DataGridCellEdit<T>) => string | undefined;
|
|
3186
3287
|
setEditedCell: (key: string, value: DataGridEditValue) => void;
|
|
3187
3288
|
};
|
|
@@ -3269,6 +3370,7 @@ export type DataGridCompositionProps<T> = Omit<ElementProps, "children"> & {
|
|
|
3269
3370
|
onColumnOrderChange?: (columnIds: string[]) => void;
|
|
3270
3371
|
reorderLabel?: string;
|
|
3271
3372
|
onCellEdit?: (edit: DataGridCellEdit<T>) => void | Promise<void>;
|
|
3373
|
+
onCellEditError?: (error: DataGridCellEditError<T>) => void;
|
|
3272
3374
|
validateCellEdit?: (edit: DataGridCellEdit<T>) => string | undefined;
|
|
3273
3375
|
rowLabel?: string;
|
|
3274
3376
|
editHint?: string;
|
|
@@ -3548,7 +3650,20 @@ export type FieldProps = ElementProps & {
|
|
|
3548
3650
|
size?: LabelSize;
|
|
3549
3651
|
};
|
|
3550
3652
|
/** Pair one form control with a theme-aware label, hint, and validation message. */
|
|
3551
|
-
export declare
|
|
3653
|
+
export declare const Field: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
3654
|
+
[attribute: `data-${string}`]: string | number | boolean | undefined;
|
|
3655
|
+
} & {
|
|
3656
|
+
children?: React.ReactNode | ((props: FieldControlProps) => React.ReactNode);
|
|
3657
|
+
label?: React.ReactNode;
|
|
3658
|
+
hint?: React.ReactNode;
|
|
3659
|
+
validationMessage?: React.ReactNode;
|
|
3660
|
+
validationMessageIcon?: React.ReactNode;
|
|
3661
|
+
validationState?: FieldValidationState;
|
|
3662
|
+
required?: boolean;
|
|
3663
|
+
disabled?: boolean;
|
|
3664
|
+
orientation?: FieldOrientation;
|
|
3665
|
+
size?: LabelSize;
|
|
3666
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
3552
3667
|
export type InputProps = Omit<NativeClickHostProps<HTMLInputElement>, "children" | "onChange" | "defaultValue" | "defaultChecked"> & {
|
|
3553
3668
|
children?: never;
|
|
3554
3669
|
type?: InputType;
|
|
@@ -3857,6 +3972,35 @@ export type SwatchPickerOnSelectionChangeData = (SwatchPickerSelection & {
|
|
|
3857
3972
|
type: "click";
|
|
3858
3973
|
selectedSwatch: string;
|
|
3859
3974
|
});
|
|
3975
|
+
export type SavedSwatchPalette = {
|
|
3976
|
+
id: string;
|
|
3977
|
+
name: string;
|
|
3978
|
+
colors: readonly {
|
|
3979
|
+
value: string;
|
|
3980
|
+
color: string;
|
|
3981
|
+
label?: string;
|
|
3982
|
+
}[];
|
|
3983
|
+
};
|
|
3984
|
+
export type SwatchPaletteStore = {
|
|
3985
|
+
list: () => Promise<readonly SavedSwatchPalette[]>;
|
|
3986
|
+
save: (palette: SavedSwatchPalette) => Promise<void>;
|
|
3987
|
+
remove: (id: string) => Promise<void>;
|
|
3988
|
+
};
|
|
3989
|
+
/** Load and persist a user's compact command-shelf choice in this browser. Use a site/app-scoped key. */
|
|
3990
|
+
export declare function useStoredOverflowCompactMode(storageKey: string, defaultCompact?: boolean): {
|
|
3991
|
+
compact: boolean;
|
|
3992
|
+
ready: boolean;
|
|
3993
|
+
setCompact: (compact: boolean) => void;
|
|
3994
|
+
toggleCompact: () => void;
|
|
3995
|
+
};
|
|
3996
|
+
export declare function useSavedSwatchPalettes(store: SwatchPaletteStore): {
|
|
3997
|
+
palettes: readonly SavedSwatchPalette[];
|
|
3998
|
+
loading: boolean;
|
|
3999
|
+
error: unknown;
|
|
4000
|
+
reload: () => Promise<readonly SavedSwatchPalette[]>;
|
|
4001
|
+
save: (palette: SavedSwatchPalette) => Promise<void>;
|
|
4002
|
+
remove: (id: string) => Promise<void>;
|
|
4003
|
+
};
|
|
3860
4004
|
export type SwatchPickerProps = ElementProps & {
|
|
3861
4005
|
selectedValue?: string;
|
|
3862
4006
|
defaultSelectedValue?: string;
|
|
@@ -3902,6 +4046,11 @@ export declare const ColorSwatch: React.ForwardRefExoticComponent<React.HTMLAttr
|
|
|
3902
4046
|
disabledIcon?: React.ReactNode;
|
|
3903
4047
|
children?: React.ReactNode;
|
|
3904
4048
|
} & React.RefAttributes<HTMLElement>>;
|
|
4049
|
+
export type SharePointThemeSwatchesProps = {
|
|
4050
|
+
palette?: Readonly<Record<string, string | undefined>>;
|
|
4051
|
+
labelForColor?: (paletteKey: string) => string;
|
|
4052
|
+
};
|
|
4053
|
+
export declare function SharePointThemeSwatches({ palette, labelForColor }: SharePointThemeSwatchesProps): React.ReactElement;
|
|
3905
4054
|
export declare const ImageSwatch: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
3906
4055
|
[attribute: `data-${string}`]: string | number | boolean | undefined;
|
|
3907
4056
|
} & {
|
|
@@ -4544,3 +4693,23 @@ export declare const AccordionPanel: React.ForwardRefExoticComponent<React.HTMLA
|
|
|
4544
4693
|
children?: React.ReactNode;
|
|
4545
4694
|
collapseMotion?: React.ComponentType<PresenceMotionSlotProps>;
|
|
4546
4695
|
} & React.RefAttributes<HTMLElement>>;
|
|
4696
|
+
export type SharePointFieldOption = {
|
|
4697
|
+
value: string | number;
|
|
4698
|
+
label: string;
|
|
4699
|
+
disabled?: boolean;
|
|
4700
|
+
};
|
|
4701
|
+
export type SharePointFieldProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> & {
|
|
4702
|
+
field: SharePointFieldMetadata;
|
|
4703
|
+
value?: SharePointFieldValue;
|
|
4704
|
+
defaultValue?: SharePointFieldValue;
|
|
4705
|
+
options?: readonly SharePointFieldOption[];
|
|
4706
|
+
onValueChange?: (value: SharePointFieldValue) => void;
|
|
4707
|
+
disabled?: boolean;
|
|
4708
|
+
hint?: React.ReactNode;
|
|
4709
|
+
validationMessage?: React.ReactNode;
|
|
4710
|
+
renderUnsupported?: (field: SharePointFieldMetadata, reason: string) => React.ReactNode;
|
|
4711
|
+
addChoiceLabel?: string;
|
|
4712
|
+
emptyOptionLabel?: string;
|
|
4713
|
+
};
|
|
4714
|
+
/** Render a SharePoint field recipe using the library's matching form control. */
|
|
4715
|
+
export declare function SharePointField({ field, value, defaultValue, options: providedOptions, onValueChange, disabled, hint, validationMessage, renderUnsupported, addChoiceLabel, emptyOptionLabel, className, style, ...hostProps }: SharePointFieldProps): React.ReactElement | null;
|