@spfx-fast/sharepoint-ui 0.0.0-stage → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +211 -0
- package/LICENSE +21 -0
- package/README.md +897 -2
- package/components.json +5810 -0
- package/dist/appearance.d.ts +6 -0
- package/dist/appearance.js +217 -0
- package/dist/elements/accordion.d.ts +9 -0
- package/dist/elements/accordion.js +338 -0
- package/dist/elements/alert.d.ts +2 -0
- package/dist/elements/alert.js +62 -0
- package/dist/elements/avatar-group-primitives.d.ts +3 -0
- package/dist/elements/avatar-group-primitives.js +189 -0
- package/dist/elements/avatar-group.d.ts +2 -0
- package/dist/elements/avatar-group.js +110 -0
- package/dist/elements/avatar.d.ts +4 -0
- package/dist/elements/avatar.js +251 -0
- package/dist/elements/badge.d.ts +8 -0
- package/dist/elements/badge.js +182 -0
- package/dist/elements/breadcrumb.d.ts +4 -0
- package/dist/elements/breadcrumb.js +233 -0
- package/dist/elements/button-group.d.ts +1 -0
- package/dist/elements/button-group.js +20 -0
- package/dist/elements/button-variants.d.ts +6 -0
- package/dist/elements/button-variants.js +339 -0
- package/dist/elements/button.d.ts +5 -0
- package/dist/elements/button.js +233 -0
- package/dist/elements/card-primitives.d.ts +3 -0
- package/dist/elements/card-primitives.js +83 -0
- package/dist/elements/card.d.ts +5 -0
- package/dist/elements/card.js +213 -0
- package/dist/elements/carousel.d.ts +92 -0
- package/dist/elements/carousel.js +1112 -0
- package/dist/elements/color-picker.d.ts +24 -0
- package/dist/elements/color-picker.js +1004 -0
- package/dist/elements/combobox.d.ts +1 -0
- package/dist/elements/combobox.js +1012 -0
- package/dist/elements/data-grid-model.d.ts +117 -0
- package/dist/elements/data-grid-model.js +294 -0
- package/dist/elements/data-grid.d.ts +29 -0
- package/dist/elements/data-grid.js +1567 -0
- package/dist/elements/date-picker.d.ts +1 -0
- package/dist/elements/date-picker.js +486 -0
- package/dist/elements/dialog.d.ts +23 -0
- package/dist/elements/dialog.js +409 -0
- package/dist/elements/divider.d.ts +2 -0
- package/dist/elements/divider.js +66 -0
- package/dist/elements/drawer.d.ts +3 -0
- package/dist/elements/drawer.js +308 -0
- package/dist/elements/field-composition.d.ts +26 -0
- package/dist/elements/field-composition.js +133 -0
- package/dist/elements/field.d.ts +1 -0
- package/dist/elements/field.js +67 -0
- package/dist/elements/file-upload.d.ts +6 -0
- package/dist/elements/file-upload.js +211 -0
- package/dist/elements/floating-position.d.ts +26 -0
- package/dist/elements/floating-position.js +39 -0
- package/dist/elements/image.d.ts +28 -0
- package/dist/elements/image.js +38 -0
- package/dist/elements/info.d.ts +9 -0
- package/dist/elements/info.js +102 -0
- package/dist/elements/input.d.ts +5 -0
- package/dist/elements/input.js +255 -0
- package/dist/elements/label.d.ts +15 -0
- package/dist/elements/label.js +56 -0
- package/dist/elements/link.d.ts +1 -0
- package/dist/elements/link.js +92 -0
- package/dist/elements/list.d.ts +19 -0
- package/dist/elements/list.js +297 -0
- package/dist/elements/menu.d.ts +33 -0
- package/dist/elements/menu.js +1103 -0
- package/dist/elements/message-bar.d.ts +10 -0
- package/dist/elements/message-bar.js +299 -0
- package/dist/elements/nav.d.ts +32 -0
- package/dist/elements/nav.js +791 -0
- package/dist/elements/overflow.d.ts +9 -0
- package/dist/elements/overflow.js +218 -0
- package/dist/elements/persona.d.ts +3 -0
- package/dist/elements/persona.js +124 -0
- package/dist/elements/popover.d.ts +77 -0
- package/dist/elements/popover.js +840 -0
- package/dist/elements/progress-bar.d.ts +4 -0
- package/dist/elements/progress-bar.js +82 -0
- package/dist/elements/radio-group.d.ts +1 -0
- package/dist/elements/radio-group.js +303 -0
- package/dist/elements/rating-display.d.ts +2 -0
- package/dist/elements/rating-display.js +125 -0
- package/dist/elements/rating.d.ts +2 -0
- package/dist/elements/rating.js +206 -0
- package/dist/elements/rich-text-editor.d.ts +18 -0
- package/dist/elements/rich-text-editor.js +508 -0
- package/dist/elements/search.d.ts +3 -0
- package/dist/elements/search.js +207 -0
- package/dist/elements/select.d.ts +6 -0
- package/dist/elements/select.js +291 -0
- package/dist/elements/shared.d.ts +19 -0
- package/dist/elements/shared.js +396 -0
- package/dist/elements/skeleton.d.ts +6 -0
- package/dist/elements/skeleton.js +91 -0
- package/dist/elements/slider.d.ts +1 -0
- package/dist/elements/slider.js +248 -0
- package/dist/elements/spin-button.d.ts +7 -0
- package/dist/elements/spin-button.js +499 -0
- package/dist/elements/spinner.d.ts +4 -0
- package/dist/elements/spinner.js +124 -0
- package/dist/elements/swatch-picker.d.ts +5 -0
- package/dist/elements/swatch-picker.js +363 -0
- package/dist/elements/table.d.ts +21 -0
- package/dist/elements/table.js +261 -0
- package/dist/elements/tabs.d.ts +1 -0
- package/dist/elements/tabs.js +276 -0
- package/dist/elements/tag-picker.d.ts +29 -0
- package/dist/elements/tag-picker.js +697 -0
- package/dist/elements/tags.d.ts +21 -0
- package/dist/elements/tags.js +421 -0
- package/dist/elements/teaching-popover.d.ts +32 -0
- package/dist/elements/teaching-popover.js +412 -0
- package/dist/elements/text.d.ts +5 -0
- package/dist/elements/text.js +69 -0
- package/dist/elements/textarea.d.ts +1 -0
- package/dist/elements/textarea.js +182 -0
- package/dist/elements/toast.d.ts +25 -0
- package/dist/elements/toast.js +337 -0
- package/dist/elements/toaster.d.ts +6 -0
- package/dist/elements/toaster.js +356 -0
- package/dist/elements/toggle.d.ts +2 -0
- package/dist/elements/toggle.js +246 -0
- package/dist/elements/toolbar.d.ts +12 -0
- package/dist/elements/toolbar.js +381 -0
- package/dist/elements/tooltip.d.ts +76 -0
- package/dist/elements/tooltip.js +510 -0
- package/dist/elements/tree-model.d.ts +19 -0
- package/dist/elements/tree-model.js +34 -0
- package/dist/elements/tree.d.ts +5 -0
- package/dist/elements/tree.js +273 -0
- package/dist/elements/view-card.d.ts +2 -0
- package/dist/elements/view-card.js +78 -0
- package/dist/elements/virtual-list.d.ts +41 -0
- package/dist/elements/virtual-list.js +369 -0
- package/dist/elements.d.ts +72 -0
- package/dist/elements.js +207 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.js +66 -0
- package/dist/react-theme-styles.d.ts +2 -0
- package/dist/react-theme-styles.js +75 -0
- package/dist/react.d.ts +4540 -0
- package/dist/react.js +6799 -0
- package/dist/theme.d.ts +169 -0
- package/dist/theme.js +167 -0
- package/dist/virtualizer-hooks.d.ts +80 -0
- package/dist/virtualizer-hooks.js +253 -0
- package/package.json +87 -4
- package/scripts/generate-token-index.mjs +43 -0
- package/scripts/sync-component-catalog-signatures.mjs +55 -0
- package/scripts/validate-component-catalog.mjs +44 -0
- package/skills/sharepoint-ui/SKILL.md +12 -0
- package/skills/sharepoint-ui/references/choosing-components.md +20 -0
- package/skills/sharepoint-ui/references/sharepoint-patterns.md +17 -0
- package/tokens.json +3777 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { base, syncHostAccessibleName } from "./shared.js";
|
|
2
|
+
/** Selectable, form-associated star rating with optional half steps. */
|
|
3
|
+
export function defineRating() {
|
|
4
|
+
if (customElements.get("spui-rating"))
|
|
5
|
+
return;
|
|
6
|
+
class SpuiRating extends HTMLElement {
|
|
7
|
+
static formAssociated = true;
|
|
8
|
+
static observedAttributes = ["value", "default-value", "max", "step", "size", "color", "label", "item-label", "name", "disabled", "readonly", "required", "aria-label", "aria-labelledby", "aria-description", "aria-describedby"];
|
|
9
|
+
internals;
|
|
10
|
+
instanceName = `spui-rating-${crypto.randomUUID()}`;
|
|
11
|
+
rating = 0;
|
|
12
|
+
maxValue = 5;
|
|
13
|
+
stepValue = 1;
|
|
14
|
+
initialValue = 0;
|
|
15
|
+
itemLabelFormatter;
|
|
16
|
+
formDisabled = false;
|
|
17
|
+
inputTemplateObserver;
|
|
18
|
+
get form() { return this.internals?.form ?? null; }
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
try {
|
|
22
|
+
this.internals = this.attachInternals();
|
|
23
|
+
}
|
|
24
|
+
catch { /* Radio interaction still works without custom form association. */ }
|
|
25
|
+
}
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
this.maxValue = this.readMax();
|
|
28
|
+
this.stepValue = this.readStep();
|
|
29
|
+
this.rating = this.hasAttribute("value") ? this.readValue(this.getAttribute("value")) : this.readValue(this.getAttribute("default-value"));
|
|
30
|
+
this.initialValue = this.rating;
|
|
31
|
+
this.render();
|
|
32
|
+
this.syncForm();
|
|
33
|
+
this.watchInputTemplates();
|
|
34
|
+
}
|
|
35
|
+
disconnectedCallback() { this.inputTemplateObserver?.disconnect(); }
|
|
36
|
+
attributeChangedCallback(name) {
|
|
37
|
+
if (!this.isConnected)
|
|
38
|
+
return;
|
|
39
|
+
if (name === "value")
|
|
40
|
+
this.rating = this.readValue(this.getAttribute("value"));
|
|
41
|
+
if (name === "max") {
|
|
42
|
+
this.maxValue = this.readMax();
|
|
43
|
+
this.rating = this.readValue(String(this.rating));
|
|
44
|
+
}
|
|
45
|
+
if (name === "step") {
|
|
46
|
+
this.stepValue = this.readStep();
|
|
47
|
+
this.rating = this.clampValue(this.rating);
|
|
48
|
+
}
|
|
49
|
+
if (name === "default-value")
|
|
50
|
+
this.initialValue = this.readValue(this.getAttribute("default-value"));
|
|
51
|
+
this.render();
|
|
52
|
+
this.syncForm();
|
|
53
|
+
}
|
|
54
|
+
get value() { return this.rating; }
|
|
55
|
+
set value(value) {
|
|
56
|
+
this.rating = this.clampValue(Number(value));
|
|
57
|
+
this.render();
|
|
58
|
+
this.syncForm();
|
|
59
|
+
}
|
|
60
|
+
get max() { return this.maxValue; }
|
|
61
|
+
set max(value) { this.setAttribute("max", String(value)); }
|
|
62
|
+
set itemLabel(value) { this.itemLabelFormatter = value; if (this.isConnected)
|
|
63
|
+
this.render(); }
|
|
64
|
+
formDisabledCallback(disabled) { this.formDisabled = disabled; this.queryInputs().forEach(input => { input.disabled = disabled || this.hasAttribute("disabled") || this.hasAttribute("readonly"); }); }
|
|
65
|
+
formResetCallback() { this.rating = this.initialValue; this.render(); this.syncForm(); }
|
|
66
|
+
formStateRestoreCallback(state) { if (typeof state === "string")
|
|
67
|
+
this.value = Number(state); }
|
|
68
|
+
readMax() { const max = Number(this.getAttribute("max") ?? 5); return Number.isInteger(max) && max > 1 ? Math.min(max, 20) : 5; }
|
|
69
|
+
readStep() { return this.getAttribute("step") === "0.5" ? 0.5 : 1; }
|
|
70
|
+
readValue(value) { return this.clampValue(Number(value ?? 0)); }
|
|
71
|
+
clampValue(value) {
|
|
72
|
+
const safe = Number.isFinite(value) ? Math.max(0, Math.min(this.maxValue, value)) : 0;
|
|
73
|
+
return Math.round(safe / this.stepValue) * this.stepValue;
|
|
74
|
+
}
|
|
75
|
+
queryInputs() { return [...(this.shadowRoot?.querySelectorAll("input[type=radio]") ?? [])]; }
|
|
76
|
+
watchInputTemplates() {
|
|
77
|
+
this.inputTemplateObserver ??= new MutationObserver(() => { this.watchInputTemplates(); this.render(); });
|
|
78
|
+
this.inputTemplateObserver.observe(this, { childList: true });
|
|
79
|
+
for (const input of this.querySelectorAll('input[slot="full-value-input"],input[slot="half-value-input"]'))
|
|
80
|
+
this.inputTemplateObserver.observe(input, { attributes: true });
|
|
81
|
+
}
|
|
82
|
+
updateValue(value, event) {
|
|
83
|
+
const next = this.clampValue(value);
|
|
84
|
+
if (this.hasAttribute("value")) {
|
|
85
|
+
this.render();
|
|
86
|
+
this.syncForm();
|
|
87
|
+
this.dispatchEvent(new CustomEvent("spui-change", { detail: { event, type: "change", value: next }, bubbles: true, composed: true }));
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.rating = next;
|
|
91
|
+
this.render();
|
|
92
|
+
this.syncForm();
|
|
93
|
+
this.dispatchEvent(new CustomEvent("spui-change", { detail: { event, type: "change", value: next }, bubbles: true, composed: true }));
|
|
94
|
+
}
|
|
95
|
+
syncForm() {
|
|
96
|
+
this.internals?.setFormValue(this.rating > 0 ? String(this.rating) : null, String(this.rating));
|
|
97
|
+
const missing = this.hasAttribute("required") && this.rating === 0;
|
|
98
|
+
try {
|
|
99
|
+
this.internals?.setValidity(missing ? { valueMissing: true } : {}, missing ? "Choose a rating." : "", this.queryInputs()[0]);
|
|
100
|
+
}
|
|
101
|
+
catch { /* Keep the radio group functional if a browser rejects the validity anchor. */ }
|
|
102
|
+
}
|
|
103
|
+
labelFor(value) {
|
|
104
|
+
if (this.itemLabelFormatter)
|
|
105
|
+
return this.itemLabelFormatter(value);
|
|
106
|
+
const template = this.getAttribute("item-label") || "{value} of {max}";
|
|
107
|
+
return template.replaceAll("{value}", String(value)).replaceAll("{max}", String(this.maxValue));
|
|
108
|
+
}
|
|
109
|
+
render() {
|
|
110
|
+
const shadow = this.shadowRoot ?? this.attachShadow({ mode: "open" });
|
|
111
|
+
shadow.replaceChildren();
|
|
112
|
+
const labelText = this.getAttribute("label") ?? this.getAttribute("aria-label") ?? "Rating";
|
|
113
|
+
const label = document.createElement("span");
|
|
114
|
+
label.className = "label";
|
|
115
|
+
label.part.add("label");
|
|
116
|
+
label.textContent = this.getAttribute("label") ?? "";
|
|
117
|
+
label.hidden = !this.getAttribute("label");
|
|
118
|
+
const group = document.createElement("div");
|
|
119
|
+
group.className = "items";
|
|
120
|
+
group.setAttribute("role", "radiogroup");
|
|
121
|
+
group.setAttribute("aria-label", labelText);
|
|
122
|
+
group.part.add("items");
|
|
123
|
+
if (this.hasAttribute("readonly"))
|
|
124
|
+
group.setAttribute("aria-readonly", "true");
|
|
125
|
+
if (this.hasAttribute("disabled"))
|
|
126
|
+
group.setAttribute("aria-disabled", "true");
|
|
127
|
+
const half = this.stepValue === 0.5;
|
|
128
|
+
for (let star = 1; star <= this.maxValue; star++) {
|
|
129
|
+
const starItem = document.createElement("span");
|
|
130
|
+
starItem.className = "star";
|
|
131
|
+
const icon = document.createElement("span");
|
|
132
|
+
icon.className = "icon";
|
|
133
|
+
icon.part.add("icon");
|
|
134
|
+
icon.setAttribute("aria-hidden", "true");
|
|
135
|
+
icon.textContent = "☆";
|
|
136
|
+
const fill = document.createElement("span");
|
|
137
|
+
fill.className = "fill";
|
|
138
|
+
fill.textContent = "★";
|
|
139
|
+
fill.style.width = `${Math.max(0, Math.min(1, this.rating - (star - 1))) * 100}%`;
|
|
140
|
+
icon.append(fill);
|
|
141
|
+
starItem.append(icon);
|
|
142
|
+
for (const value of (half ? [star - 0.5, star] : [star])) {
|
|
143
|
+
const inputSlot = value % 1 ? "half-value-input" : "full-value-input";
|
|
144
|
+
const template = this.querySelector(`input[slot="${inputSlot}"]`);
|
|
145
|
+
const input = template ? template.cloneNode(false) : document.createElement("input");
|
|
146
|
+
for (const attribute of ["slot", "hidden", "aria-hidden", "tabindex", "type", "name", "value", "checked", "disabled", "required"])
|
|
147
|
+
input.removeAttribute(attribute);
|
|
148
|
+
input.type = "radio";
|
|
149
|
+
input.name = this.instanceName;
|
|
150
|
+
input.value = String(value);
|
|
151
|
+
input.checked = this.rating === value;
|
|
152
|
+
input.disabled = this.formDisabled || this.hasAttribute("disabled") || this.hasAttribute("readonly");
|
|
153
|
+
input.required = this.hasAttribute("required");
|
|
154
|
+
if (!input.hasAttribute("aria-label"))
|
|
155
|
+
input.setAttribute("aria-label", this.labelFor(value));
|
|
156
|
+
input.part.add("option");
|
|
157
|
+
input.addEventListener("change", event => { if (input.checked)
|
|
158
|
+
this.updateValue(value, event); });
|
|
159
|
+
const hit = document.createElement("label");
|
|
160
|
+
hit.className = half ? (value % 1 ? "hit half" : "hit full") : "hit whole";
|
|
161
|
+
hit.append(input);
|
|
162
|
+
starItem.append(hit);
|
|
163
|
+
}
|
|
164
|
+
group.append(starItem);
|
|
165
|
+
}
|
|
166
|
+
const style = document.createElement("style");
|
|
167
|
+
style.textContent = `${base}:host{display:inline-grid;gap:4px;min-width:0;color:var(--spui-ui-text,var(--spui-semantic-body-text,inherit));font-family:var(--spui-font-family,inherit)}.label{font-size:14px;font-weight:600;color:var(--spui-ui-muted,var(--spui-semantic-body-text,inherit))}.label[hidden]{display:none}.items{display:inline-flex;align-items:center;gap:2px;width:max-content}.star{position:relative;display:inline-block;flex:none;width:var(--spui-rating-size,28px);height:var(--spui-rating-size,28px)}.icon{position:relative;display:inline-block;font-size:var(--spui-rating-size,28px);line-height:1;color:var(--spui-rating-empty,color-mix(in srgb,var(--spui-ui-text,var(--spui-semantic-body-text,#242424)) 65%,var(--spui-ui-surface,var(--spui-semantic-body-background,#ffffff)) 35%));user-select:none}.fill{position:absolute;inset-block:0;inset-inline-start:0;overflow:hidden;width:0;color:var(--spui-rating-color,var(--spui-ui-accent,#0078d4));white-space:nowrap}:host([color=brand]){--spui-rating-color:color-mix(in srgb,var(--spui-ui-accent,#0078d4) 65%,var(--spui-ui-text,var(--spui-semantic-body-text,#242424)) 35%)}:host([color=marigold]){--spui-rating-color:color-mix(in srgb,var(--spui-rating-marigold,#c58b00) 65%,var(--spui-ui-text,var(--spui-semantic-body-text,#242424)) 35%)}:host(:not([color])),:host([color=neutral]){--spui-rating-color:var(--spui-ui-text,var(--spui-semantic-body-text,currentColor))}:host([size=small]){--spui-rating-size:18px}:host([size=medium]){--spui-rating-size:24px}:host([size=large]){--spui-rating-size:30px}:host([size=extra-large]),:host(:not([size])){--spui-rating-size:36px}.hit{position:absolute;z-index:1;inset-block:0;display:block;cursor:pointer}.hit.whole{inset-inline:0}.hit.half{inset-inline-start:0;width:50%}.hit.full{inset-inline-end:0;width:50%}.hit input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.hit:focus-within{outline:2px solid var(--spui-focus-ring,var(--spui-ui-accent,#0078d4));outline-offset:2px;border-radius:3px}:host([disabled]) .hit,:host([readonly]) .hit{cursor:default}@media(forced-colors:active){.icon{color:CanvasText}.fill{color:Highlight}.hit:focus-within{outline-color:Highlight}}`;
|
|
168
|
+
const templates = document.createElement("div");
|
|
169
|
+
templates.hidden = true;
|
|
170
|
+
for (const slotName of ["icon-filled", "icon-outline", "full-value-input", "half-value-input"]) {
|
|
171
|
+
const slot = document.createElement("slot");
|
|
172
|
+
slot.name = slotName;
|
|
173
|
+
slot.addEventListener("slotchange", () => this.syncIcons());
|
|
174
|
+
templates.append(slot);
|
|
175
|
+
}
|
|
176
|
+
shadow.append(style, templates, label, group);
|
|
177
|
+
syncHostAccessibleName(this, group);
|
|
178
|
+
this.syncIcons();
|
|
179
|
+
}
|
|
180
|
+
syncIcons() {
|
|
181
|
+
const source = (name) => {
|
|
182
|
+
const template = this.shadowRoot?.querySelector(`slot[name=${name}]`)?.assignedElements()[0];
|
|
183
|
+
if (!template)
|
|
184
|
+
return undefined;
|
|
185
|
+
const content = template.localName === "span" && template.hidden ? template.firstElementChild : template;
|
|
186
|
+
if (!content)
|
|
187
|
+
return undefined;
|
|
188
|
+
const clone = content.cloneNode(true);
|
|
189
|
+
clone.removeAttribute("slot");
|
|
190
|
+
clone.removeAttribute("hidden");
|
|
191
|
+
clone.setAttribute("aria-hidden", "true");
|
|
192
|
+
return clone;
|
|
193
|
+
};
|
|
194
|
+
const filledIcon = source("icon-filled");
|
|
195
|
+
const outlineIcon = source("icon-outline");
|
|
196
|
+
for (const icon of this.shadowRoot?.querySelectorAll(".items .icon") ?? []) {
|
|
197
|
+
const fill = icon.querySelector(".fill");
|
|
198
|
+
if (!fill)
|
|
199
|
+
continue;
|
|
200
|
+
icon.replaceChildren(outlineIcon?.cloneNode(true) ?? document.createTextNode("☆"), fill);
|
|
201
|
+
fill.replaceChildren(filledIcon?.cloneNode(true) ?? document.createTextNode("★"));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
customElements.define("spui-rating", SpuiRating);
|
|
206
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface SharePointRichTextEditorElement extends HTMLElement {
|
|
2
|
+
value: string;
|
|
3
|
+
uploadImage?: (file: File) => Promise<string>;
|
|
4
|
+
readonly form: HTMLFormElement | null;
|
|
5
|
+
readonly validity: ValidityState | undefined;
|
|
6
|
+
readonly validationMessage: string;
|
|
7
|
+
readonly willValidate: boolean;
|
|
8
|
+
checkValidity(): boolean;
|
|
9
|
+
reportValidity(): boolean;
|
|
10
|
+
setCustomValidity(message: string): void;
|
|
11
|
+
formStateRestoreCallback(state: string | File | FormData | null): void;
|
|
12
|
+
}
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
"spui-rich-text-editor": SharePointRichTextEditorElement;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export declare function defineRichTextEditor(): void;
|