@fluentui/web-components 2.0.0 → 2.1.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/CHANGELOG.json +103 -1
- package/CHANGELOG.md +40 -2
- package/dist/dts/calendar/calendar.stories.d.ts +86 -0
- package/dist/dts/calendar/calendar.styles.d.ts +7 -0
- package/dist/dts/calendar/index.d.ts +18 -0
- package/dist/dts/custom-elements.d.ts +3 -1
- package/dist/dts/text-area/text-area.stories.d.ts +1 -1
- package/dist/esm/anchor/anchor.stories.js +2 -2
- package/dist/esm/breadcrumb-item/breadcrumb-item.styles.js +14 -0
- package/dist/esm/button/button.styles.js +31 -1
- package/dist/esm/calendar/calendar.stories.js +115 -0
- package/dist/esm/calendar/calendar.styles.js +133 -0
- package/dist/esm/calendar/index.js +31 -0
- package/dist/esm/card/card.styles.js +1 -2
- package/dist/esm/checkbox/checkbox.styles.js +17 -27
- package/dist/esm/custom-elements.js +3 -1
- package/dist/esm/divider/divider.styles.js +1 -2
- package/dist/esm/flipper/flipper.styles.js +5 -18
- package/dist/esm/listbox/listbox.styles.js +7 -28
- package/dist/esm/listbox-option/listbox-option.styles.js +10 -7
- package/dist/esm/menu/menu.styles.js +16 -3
- package/dist/esm/menu-item/menu-item.styles.js +17 -19
- package/dist/esm/number-field/number-field.styles.js +5 -0
- package/dist/esm/progress/progress/progress.styles.js +3 -10
- package/dist/esm/progress/progress-ring/progress-ring.styles.js +5 -8
- package/dist/esm/radio/radio.styles.js +14 -18
- package/dist/esm/radio-group/radio-group.styles.js +0 -2
- package/dist/esm/select/select.styles.js +52 -55
- package/dist/esm/skeleton/skeleton.styles.js +7 -2
- package/dist/esm/slider/slider.styles.js +6 -2
- package/dist/esm/styles/patterns/button.styles.js +61 -63
- package/dist/esm/styles/patterns/input.styles.js +13 -25
- package/dist/esm/switch/switch.stories.js +1 -2
- package/dist/esm/switch/switch.styles.js +21 -20
- package/dist/esm/tabs/tab/tab.styles.js +4 -3
- package/dist/esm/tabs/tabs.stories.js +56 -2
- package/dist/esm/tabs/tabs.styles.js +1 -1
- package/dist/esm/text-area/text-area.stories.js +2 -2
- package/dist/esm/tree-item/tree-item.styles.js +20 -11
- package/dist/esm/tree-view/tree-view.stories.js +39 -22
- package/dist/fluent-web-components.api.json +131 -2
- package/dist/web-components.d.ts +12 -0
- package/dist/web-components.js +973 -352
- package/dist/web-components.min.js +147 -135
- package/docs/api-report.md +12 -7
- package/package.json +2 -5
- package/public/switches.ts +14 -14
package/dist/web-components.js
CHANGED
|
@@ -1166,7 +1166,6 @@ class HTMLBindingDirective extends TargetedHTMLDirective {
|
|
|
1166
1166
|
|
|
1167
1167
|
if (this.cleanedTargetName === "innerHTML") {
|
|
1168
1168
|
const binding = this.binding;
|
|
1169
|
-
/* eslint-disable-next-line */
|
|
1170
1169
|
|
|
1171
1170
|
this.binding = (s, c) => DOM.createHTML(binding(s, c));
|
|
1172
1171
|
}
|
|
@@ -1683,6 +1682,8 @@ class HTMLView {
|
|
|
1683
1682
|
* @public
|
|
1684
1683
|
*/
|
|
1685
1684
|
|
|
1685
|
+
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
1686
|
+
|
|
1686
1687
|
class ViewTemplate {
|
|
1687
1688
|
/**
|
|
1688
1689
|
* Creates an instance of ViewTemplate.
|
|
@@ -1790,7 +1791,8 @@ class ViewTemplate {
|
|
|
1790
1791
|
|
|
1791
1792
|
} // Much thanks to LitHTML for working this out!
|
|
1792
1793
|
|
|
1793
|
-
const lastAttributeNameRegex =
|
|
1794
|
+
const lastAttributeNameRegex =
|
|
1795
|
+
/* eslint-disable-next-line no-control-regex */
|
|
1794
1796
|
/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;
|
|
1795
1797
|
/**
|
|
1796
1798
|
* Transforms a template literal string into a renderable ViewTemplate.
|
|
@@ -3628,7 +3630,7 @@ function when(binding, templateOrTemplateBinding) {
|
|
|
3628
3630
|
return (source, context) => binding(source, context) ? getTemplate(source, context) : null;
|
|
3629
3631
|
}
|
|
3630
3632
|
|
|
3631
|
-
Object.freeze({
|
|
3633
|
+
const defaultRepeatOptions = Object.freeze({
|
|
3632
3634
|
positioning: false
|
|
3633
3635
|
});
|
|
3634
3636
|
|
|
@@ -3890,6 +3892,19 @@ class RepeatDirective extends HTMLDirective {
|
|
|
3890
3892
|
}
|
|
3891
3893
|
|
|
3892
3894
|
}
|
|
3895
|
+
/**
|
|
3896
|
+
* A directive that enables list rendering.
|
|
3897
|
+
* @param itemsBinding - The array to render.
|
|
3898
|
+
* @param templateOrTemplateBinding - The template or a template binding used obtain a template
|
|
3899
|
+
* to render for each item in the array.
|
|
3900
|
+
* @param options - Options used to turn on special repeat features.
|
|
3901
|
+
* @public
|
|
3902
|
+
*/
|
|
3903
|
+
|
|
3904
|
+
function repeat(itemsBinding, templateOrTemplateBinding, options = defaultRepeatOptions) {
|
|
3905
|
+
const templateBinding = typeof templateOrTemplateBinding === "function" ? templateOrTemplateBinding : () => templateOrTemplateBinding;
|
|
3906
|
+
return new RepeatDirective(itemsBinding, templateBinding, options);
|
|
3907
|
+
}
|
|
3893
3908
|
|
|
3894
3909
|
/**
|
|
3895
3910
|
* Creates a function that can be used to filter a Node array, selecting only elements.
|
|
@@ -4142,7 +4157,7 @@ const startSlotTemplate = (context, definition) => html`<span part="start" ${ref
|
|
|
4142
4157
|
* @deprecated - use endSlotTemplate
|
|
4143
4158
|
*/
|
|
4144
4159
|
|
|
4145
|
-
html`<span part="end" ${ref("endContainer")}><slot name="end" ${ref("end")} @slotchange="${x => x.handleEndContentChange()}"></slot></span>`;
|
|
4160
|
+
const endTemplate = html`<span part="end" ${ref("endContainer")}><slot name="end" ${ref("end")} @slotchange="${x => x.handleEndContentChange()}"></slot></span>`;
|
|
4146
4161
|
/**
|
|
4147
4162
|
* The template for the start element.
|
|
4148
4163
|
* For use with {@link StartEnd}
|
|
@@ -4151,7 +4166,7 @@ html`<span part="end" ${ref("endContainer")}><slot name="end" ${ref("end")} @slo
|
|
|
4151
4166
|
* @deprecated - use startSlotTemplate
|
|
4152
4167
|
*/
|
|
4153
4168
|
|
|
4154
|
-
html`<span part="start" ${ref("startContainer")}><slot name="start" ${ref("start")} @slotchange="${x => x.handleStartContentChange()}"></slot></span>`;
|
|
4169
|
+
const startTemplate = html`<span part="start" ${ref("startContainer")}><slot name="start" ${ref("start")} @slotchange="${x => x.handleStartContentChange()}"></slot></span>`;
|
|
4155
4170
|
|
|
4156
4171
|
/**
|
|
4157
4172
|
* The template for the {@link @microsoft/fast-foundation#(AccordionItem:class)} component.
|
|
@@ -4314,6 +4329,8 @@ class ResolverBuilder {
|
|
|
4314
4329
|
container,
|
|
4315
4330
|
key
|
|
4316
4331
|
} = this;
|
|
4332
|
+
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
4333
|
+
|
|
4317
4334
|
this.container = this.key = void 0;
|
|
4318
4335
|
return container.registerResolver(key, new ResolverImpl(key, strategy, state));
|
|
4319
4336
|
}
|
|
@@ -5132,7 +5149,7 @@ class ContainerImpl {
|
|
|
5132
5149
|
if (key.resolve !== void 0) {
|
|
5133
5150
|
return key;
|
|
5134
5151
|
}
|
|
5135
|
-
/* eslint-disable-next-line */
|
|
5152
|
+
/* eslint-disable-next-line @typescript-eslint/no-this-alias */
|
|
5136
5153
|
|
|
5137
5154
|
|
|
5138
5155
|
let current = this;
|
|
@@ -5166,7 +5183,7 @@ class ContainerImpl {
|
|
|
5166
5183
|
if (key.$isResolver) {
|
|
5167
5184
|
return key.resolve(this, this);
|
|
5168
5185
|
}
|
|
5169
|
-
/* eslint-disable-next-line */
|
|
5186
|
+
/* eslint-disable-next-line @typescript-eslint/no-this-alias */
|
|
5170
5187
|
|
|
5171
5188
|
|
|
5172
5189
|
let current = this;
|
|
@@ -5193,7 +5210,7 @@ class ContainerImpl {
|
|
|
5193
5210
|
|
|
5194
5211
|
getAll(key, searchAncestors = false) {
|
|
5195
5212
|
validateKey(key);
|
|
5196
|
-
/* eslint-disable-next-line */
|
|
5213
|
+
/* eslint-disable-next-line @typescript-eslint/no-this-alias */
|
|
5197
5214
|
|
|
5198
5215
|
const requestor = this;
|
|
5199
5216
|
let current = requestor;
|
|
@@ -5206,7 +5223,9 @@ class ContainerImpl {
|
|
|
5206
5223
|
resolver = current.resolvers.get(key);
|
|
5207
5224
|
|
|
5208
5225
|
if (resolver != null) {
|
|
5209
|
-
resolutions = resolutions.concat(
|
|
5226
|
+
resolutions = resolutions.concat(
|
|
5227
|
+
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
5228
|
+
buildAllResponse(resolver, current, requestor));
|
|
5210
5229
|
}
|
|
5211
5230
|
|
|
5212
5231
|
current = current.parent;
|
|
@@ -5463,7 +5482,6 @@ function buildAllResponse(resolver, handler, requestor) {
|
|
|
5463
5482
|
}
|
|
5464
5483
|
|
|
5465
5484
|
const defaultFriendlyName = "(anonymous)";
|
|
5466
|
-
/* eslint-disable-next-line */
|
|
5467
5485
|
|
|
5468
5486
|
function isObject(value) {
|
|
5469
5487
|
return typeof value === "object" && value !== null || typeof value === "function";
|
|
@@ -5477,12 +5495,10 @@ function isObject(value) {
|
|
|
5477
5495
|
|
|
5478
5496
|
|
|
5479
5497
|
const isNativeFunction = function () {
|
|
5480
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
5481
5498
|
const lookup = new WeakMap();
|
|
5482
5499
|
let isNative = false;
|
|
5483
5500
|
let sourceText = "";
|
|
5484
|
-
let i = 0;
|
|
5485
|
-
|
|
5501
|
+
let i = 0;
|
|
5486
5502
|
return function (fn) {
|
|
5487
5503
|
isNative = lookup.get(fn);
|
|
5488
5504
|
|
|
@@ -5738,6 +5754,8 @@ function resolveOption(option, context, definition) {
|
|
|
5738
5754
|
* @internal
|
|
5739
5755
|
*/
|
|
5740
5756
|
|
|
5757
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5758
|
+
|
|
5741
5759
|
|
|
5742
5760
|
class FoundationElementRegistry {
|
|
5743
5761
|
constructor(type, elementDefinition, overrideDefinition) {
|
|
@@ -5794,6 +5812,7 @@ class FoundationElementRegistry {
|
|
|
5794
5812
|
}
|
|
5795
5813
|
|
|
5796
5814
|
}
|
|
5815
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
5797
5816
|
|
|
5798
5817
|
/**
|
|
5799
5818
|
* Apply mixins to a constructor.
|
|
@@ -5804,7 +5823,9 @@ function applyMixins(derivedCtor, ...baseCtors) {
|
|
|
5804
5823
|
baseCtors.forEach(baseCtor => {
|
|
5805
5824
|
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
|
|
5806
5825
|
if (name !== "constructor") {
|
|
5807
|
-
Object.defineProperty(derivedCtor.prototype, name,
|
|
5826
|
+
Object.defineProperty(derivedCtor.prototype, name,
|
|
5827
|
+
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
5828
|
+
Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
|
|
5808
5829
|
}
|
|
5809
5830
|
});
|
|
5810
5831
|
|
|
@@ -5906,7 +5927,7 @@ function isHTMLElement(...args) {
|
|
|
5906
5927
|
*/
|
|
5907
5928
|
|
|
5908
5929
|
function getDisplayedNodes(rootNode, selector) {
|
|
5909
|
-
if (!isHTMLElement(rootNode)) {
|
|
5930
|
+
if (!rootNode || !selector || !isHTMLElement(rootNode)) {
|
|
5910
5931
|
return;
|
|
5911
5932
|
}
|
|
5912
5933
|
|
|
@@ -6109,7 +6130,7 @@ function wrapInBounds(min, max, value) {
|
|
|
6109
6130
|
}
|
|
6110
6131
|
/**
|
|
6111
6132
|
* Ensures that a value is between a min and max value. If value is lower than min, min will be returned.
|
|
6112
|
-
* If value is greater than max, max will be
|
|
6133
|
+
* If value is greater than max, max will be returned.
|
|
6113
6134
|
*/
|
|
6114
6135
|
|
|
6115
6136
|
function limit(min, max, value) {
|
|
@@ -7914,24 +7935,16 @@ function FormAssociated(BaseCtor) {
|
|
|
7914
7935
|
*/
|
|
7915
7936
|
|
|
7916
7937
|
this.proxyEventsToBlock = ["change", "click"];
|
|
7917
|
-
/**
|
|
7918
|
-
* Invoked when a connected component's form or fieldset has its disabled
|
|
7919
|
-
* state changed.
|
|
7920
|
-
* @param disabled - the disabled value of the form / fieldset
|
|
7921
|
-
*/
|
|
7922
|
-
|
|
7923
|
-
this.formDisabledCallback = disabled => {
|
|
7924
|
-
this.disabled = disabled;
|
|
7925
|
-
};
|
|
7926
|
-
|
|
7927
|
-
this.formResetCallback = () => {
|
|
7928
|
-
this.value = this.initialValue;
|
|
7929
|
-
this.dirtyValue = false;
|
|
7930
|
-
};
|
|
7931
|
-
|
|
7932
7938
|
this.proxyInitialized = false;
|
|
7933
7939
|
this.required = false;
|
|
7934
7940
|
this.initialValue = this.initialValue || "";
|
|
7941
|
+
|
|
7942
|
+
if (!this.elementInternals) {
|
|
7943
|
+
// When elementInternals is not supported, formResetCallback is
|
|
7944
|
+
// bound to an event listener, so ensure the handler's `this`
|
|
7945
|
+
// context is correct.
|
|
7946
|
+
this.formResetCallback = this.formResetCallback.bind(this);
|
|
7947
|
+
}
|
|
7935
7948
|
}
|
|
7936
7949
|
/**
|
|
7937
7950
|
* Must evaluate to true to enable elementInternals.
|
|
@@ -8147,10 +8160,10 @@ function FormAssociated(BaseCtor) {
|
|
|
8147
8160
|
|
|
8148
8161
|
if (!this.elementInternals) {
|
|
8149
8162
|
this.attachProxy();
|
|
8150
|
-
}
|
|
8151
8163
|
|
|
8152
|
-
|
|
8153
|
-
|
|
8164
|
+
if (this.form) {
|
|
8165
|
+
this.form.addEventListener("reset", this.formResetCallback);
|
|
8166
|
+
}
|
|
8154
8167
|
}
|
|
8155
8168
|
}
|
|
8156
8169
|
/**
|
|
@@ -8161,7 +8174,7 @@ function FormAssociated(BaseCtor) {
|
|
|
8161
8174
|
disconnectedCallback() {
|
|
8162
8175
|
this.proxyEventsToBlock.forEach(name => this.proxy.removeEventListener(name, this.stopPropagation));
|
|
8163
8176
|
|
|
8164
|
-
if (this.form) {
|
|
8177
|
+
if (!this.elementInternals && this.form) {
|
|
8165
8178
|
this.form.removeEventListener("reset", this.formResetCallback);
|
|
8166
8179
|
}
|
|
8167
8180
|
}
|
|
@@ -8200,6 +8213,21 @@ function FormAssociated(BaseCtor) {
|
|
|
8200
8213
|
this.proxy.setCustomValidity(message);
|
|
8201
8214
|
}
|
|
8202
8215
|
}
|
|
8216
|
+
/**
|
|
8217
|
+
* Invoked when a connected component's form or fieldset has its disabled
|
|
8218
|
+
* state changed.
|
|
8219
|
+
* @param disabled - the disabled value of the form / fieldset
|
|
8220
|
+
*/
|
|
8221
|
+
|
|
8222
|
+
|
|
8223
|
+
formDisabledCallback(disabled) {
|
|
8224
|
+
this.disabled = disabled;
|
|
8225
|
+
}
|
|
8226
|
+
|
|
8227
|
+
formResetCallback() {
|
|
8228
|
+
this.value = this.initialValue;
|
|
8229
|
+
this.dirtyValue = false;
|
|
8230
|
+
}
|
|
8203
8231
|
/**
|
|
8204
8232
|
* Attach the proxy element to the DOM
|
|
8205
8233
|
*/
|
|
@@ -8310,6 +8338,116 @@ function FormAssociated(BaseCtor) {
|
|
|
8310
8338
|
observable(C.prototype, "value");
|
|
8311
8339
|
return C;
|
|
8312
8340
|
}
|
|
8341
|
+
/**
|
|
8342
|
+
* @alpha
|
|
8343
|
+
*/
|
|
8344
|
+
|
|
8345
|
+
function CheckableFormAssociated(BaseCtor) {
|
|
8346
|
+
class C extends FormAssociated(BaseCtor) {}
|
|
8347
|
+
|
|
8348
|
+
class D extends C {
|
|
8349
|
+
constructor(...args) {
|
|
8350
|
+
super(args);
|
|
8351
|
+
/**
|
|
8352
|
+
* Tracks whether the "checked" property has been changed.
|
|
8353
|
+
* This is necessary to provide consistent behavior with
|
|
8354
|
+
* normal input checkboxes
|
|
8355
|
+
*/
|
|
8356
|
+
|
|
8357
|
+
this.dirtyChecked = false;
|
|
8358
|
+
/**
|
|
8359
|
+
* Provides the default checkedness of the input element
|
|
8360
|
+
* Passed down to proxy
|
|
8361
|
+
*
|
|
8362
|
+
* @public
|
|
8363
|
+
* @remarks
|
|
8364
|
+
* HTML Attribute: checked
|
|
8365
|
+
*/
|
|
8366
|
+
|
|
8367
|
+
this.checkedAttribute = false;
|
|
8368
|
+
/**
|
|
8369
|
+
* The checked state of the control.
|
|
8370
|
+
*
|
|
8371
|
+
* @public
|
|
8372
|
+
*/
|
|
8373
|
+
|
|
8374
|
+
this.checked = false; // Re-initialize dirtyChecked because initialization of other values
|
|
8375
|
+
// causes it to become true
|
|
8376
|
+
|
|
8377
|
+
this.dirtyChecked = false;
|
|
8378
|
+
}
|
|
8379
|
+
|
|
8380
|
+
checkedAttributeChanged() {
|
|
8381
|
+
this.defaultChecked = this.checkedAttribute;
|
|
8382
|
+
}
|
|
8383
|
+
/**
|
|
8384
|
+
* @internal
|
|
8385
|
+
*/
|
|
8386
|
+
|
|
8387
|
+
|
|
8388
|
+
defaultCheckedChanged() {
|
|
8389
|
+
if (!this.dirtyChecked) {
|
|
8390
|
+
// Setting this.checked will cause us to enter a dirty state,
|
|
8391
|
+
// but if we are clean when defaultChecked is changed, we want to stay
|
|
8392
|
+
// in a clean state, so reset this.dirtyChecked
|
|
8393
|
+
this.checked = this.defaultChecked;
|
|
8394
|
+
this.dirtyChecked = false;
|
|
8395
|
+
}
|
|
8396
|
+
}
|
|
8397
|
+
|
|
8398
|
+
checkedChanged(prev, next) {
|
|
8399
|
+
if (!this.dirtyChecked) {
|
|
8400
|
+
this.dirtyChecked = true;
|
|
8401
|
+
}
|
|
8402
|
+
|
|
8403
|
+
this.currentChecked = this.checked;
|
|
8404
|
+
this.updateForm();
|
|
8405
|
+
|
|
8406
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
8407
|
+
this.proxy.checked = this.checked;
|
|
8408
|
+
}
|
|
8409
|
+
|
|
8410
|
+
if (prev !== undefined) {
|
|
8411
|
+
this.$emit("change");
|
|
8412
|
+
}
|
|
8413
|
+
|
|
8414
|
+
this.validate();
|
|
8415
|
+
}
|
|
8416
|
+
|
|
8417
|
+
currentCheckedChanged(prev, next) {
|
|
8418
|
+
this.checked = this.currentChecked;
|
|
8419
|
+
}
|
|
8420
|
+
|
|
8421
|
+
updateForm() {
|
|
8422
|
+
const value = this.checked ? this.value : null;
|
|
8423
|
+
this.setFormValue(value, value);
|
|
8424
|
+
}
|
|
8425
|
+
|
|
8426
|
+
connectedCallback() {
|
|
8427
|
+
super.connectedCallback();
|
|
8428
|
+
this.updateForm();
|
|
8429
|
+
}
|
|
8430
|
+
|
|
8431
|
+
formResetCallback() {
|
|
8432
|
+
super.formResetCallback();
|
|
8433
|
+
this.checked = !!this.checkedAttribute;
|
|
8434
|
+
this.dirtyChecked = false;
|
|
8435
|
+
}
|
|
8436
|
+
|
|
8437
|
+
}
|
|
8438
|
+
|
|
8439
|
+
attr({
|
|
8440
|
+
attribute: "checked",
|
|
8441
|
+
mode: "boolean"
|
|
8442
|
+
})(D.prototype, "checkedAttribute");
|
|
8443
|
+
attr({
|
|
8444
|
+
attribute: "current-checked",
|
|
8445
|
+
converter: booleanConverter
|
|
8446
|
+
})(D.prototype, "currentChecked");
|
|
8447
|
+
observable(D.prototype, "defaultChecked");
|
|
8448
|
+
observable(D.prototype, "checked");
|
|
8449
|
+
return D;
|
|
8450
|
+
}
|
|
8313
8451
|
|
|
8314
8452
|
class _Button extends FoundationElement {}
|
|
8315
8453
|
/**
|
|
@@ -8487,6 +8625,521 @@ __decorate$1([attr({
|
|
|
8487
8625
|
applyMixins(DelegatesARIAButton, ARIAGlobalStatesAndProperties);
|
|
8488
8626
|
applyMixins(Button$1, StartEnd, DelegatesARIAButton);
|
|
8489
8627
|
|
|
8628
|
+
/**
|
|
8629
|
+
* Date formatting utility
|
|
8630
|
+
* @public
|
|
8631
|
+
*/
|
|
8632
|
+
class DateFormatter {
|
|
8633
|
+
constructor(config) {
|
|
8634
|
+
/**
|
|
8635
|
+
* Formatting for the day
|
|
8636
|
+
* @public
|
|
8637
|
+
*/
|
|
8638
|
+
this.dayFormat = "numeric";
|
|
8639
|
+
/**
|
|
8640
|
+
* Formatting for the weekday labels
|
|
8641
|
+
* @public
|
|
8642
|
+
*/
|
|
8643
|
+
|
|
8644
|
+
this.weekdayFormat = "long";
|
|
8645
|
+
/**
|
|
8646
|
+
* Formatting for the month
|
|
8647
|
+
* @public
|
|
8648
|
+
*/
|
|
8649
|
+
|
|
8650
|
+
this.monthFormat = "long";
|
|
8651
|
+
/**
|
|
8652
|
+
* Formatting for the year
|
|
8653
|
+
* @public
|
|
8654
|
+
*/
|
|
8655
|
+
|
|
8656
|
+
this.yearFormat = "numeric";
|
|
8657
|
+
/**
|
|
8658
|
+
* Date used for formatting
|
|
8659
|
+
*/
|
|
8660
|
+
|
|
8661
|
+
this.date = new Date();
|
|
8662
|
+
/**
|
|
8663
|
+
* Add properties on construction
|
|
8664
|
+
*/
|
|
8665
|
+
|
|
8666
|
+
if (config) {
|
|
8667
|
+
for (const key in config) {
|
|
8668
|
+
const value = config[key];
|
|
8669
|
+
|
|
8670
|
+
if (key === "date") {
|
|
8671
|
+
this.date = this.getDateObject(value);
|
|
8672
|
+
} else {
|
|
8673
|
+
this[key] = value;
|
|
8674
|
+
}
|
|
8675
|
+
}
|
|
8676
|
+
}
|
|
8677
|
+
}
|
|
8678
|
+
/**
|
|
8679
|
+
* Helper function to make sure that the DateFormatter is working with an instance of Date
|
|
8680
|
+
* @param date - The date as an object, string or Date insance
|
|
8681
|
+
* @returns - A Date instance
|
|
8682
|
+
* @public
|
|
8683
|
+
*/
|
|
8684
|
+
|
|
8685
|
+
|
|
8686
|
+
getDateObject(date) {
|
|
8687
|
+
if (typeof date === "string") {
|
|
8688
|
+
const dates = date.split(/[/-]/);
|
|
8689
|
+
|
|
8690
|
+
if (dates.length < 3) {
|
|
8691
|
+
return new Date();
|
|
8692
|
+
}
|
|
8693
|
+
|
|
8694
|
+
return new Date(parseInt(dates[2], 10), parseInt(dates[0], 10) - 1, parseInt(dates[1], 10));
|
|
8695
|
+
} else if ("day" in date && "month" in date && "year" in date) {
|
|
8696
|
+
const {
|
|
8697
|
+
day,
|
|
8698
|
+
month,
|
|
8699
|
+
year
|
|
8700
|
+
} = date;
|
|
8701
|
+
return new Date(year, month - 1, day);
|
|
8702
|
+
}
|
|
8703
|
+
|
|
8704
|
+
return date;
|
|
8705
|
+
}
|
|
8706
|
+
/**
|
|
8707
|
+
*
|
|
8708
|
+
* @param date - a valide date as either a Date, string, objec or a DateFormatter
|
|
8709
|
+
* @param format - The formatting for the string
|
|
8710
|
+
* @param locale - locale data used for formatting
|
|
8711
|
+
* @returns A localized string of the date provided
|
|
8712
|
+
* @public
|
|
8713
|
+
*/
|
|
8714
|
+
|
|
8715
|
+
|
|
8716
|
+
getDate(date = this.date, format = {
|
|
8717
|
+
weekday: this.weekdayFormat,
|
|
8718
|
+
month: this.monthFormat,
|
|
8719
|
+
day: this.dayFormat,
|
|
8720
|
+
year: this.yearFormat
|
|
8721
|
+
}, locale = this.locale) {
|
|
8722
|
+
const dateObj = this.getDateObject(date);
|
|
8723
|
+
const optionsWithTimeZone = Object.assign({
|
|
8724
|
+
timeZone: "utc"
|
|
8725
|
+
}, format);
|
|
8726
|
+
return new Intl.DateTimeFormat(locale, optionsWithTimeZone).format(dateObj);
|
|
8727
|
+
}
|
|
8728
|
+
/**
|
|
8729
|
+
*
|
|
8730
|
+
* @param day - Day to localize
|
|
8731
|
+
* @param format - The formatting for the day
|
|
8732
|
+
* @param locale - The locale data used for formatting
|
|
8733
|
+
* @returns - A localized number for the day
|
|
8734
|
+
* @public
|
|
8735
|
+
*/
|
|
8736
|
+
|
|
8737
|
+
|
|
8738
|
+
getDay(day = this.date.getDate(), format = this.dayFormat, locale = this.locale) {
|
|
8739
|
+
return this.getDate({
|
|
8740
|
+
month: 1,
|
|
8741
|
+
day,
|
|
8742
|
+
year: 2020
|
|
8743
|
+
}, {
|
|
8744
|
+
day: format
|
|
8745
|
+
}, locale);
|
|
8746
|
+
}
|
|
8747
|
+
/**
|
|
8748
|
+
*
|
|
8749
|
+
* @param month - The month to localize
|
|
8750
|
+
* @param format - The formatting for the month
|
|
8751
|
+
* @param locale - The locale data used for formatting
|
|
8752
|
+
* @returns - A localized name of the month
|
|
8753
|
+
* @public
|
|
8754
|
+
*/
|
|
8755
|
+
|
|
8756
|
+
|
|
8757
|
+
getMonth(month = this.date.getMonth() + 1, format = this.monthFormat, locale = this.locale) {
|
|
8758
|
+
return this.getDate({
|
|
8759
|
+
month,
|
|
8760
|
+
day: 2,
|
|
8761
|
+
year: 2020
|
|
8762
|
+
}, {
|
|
8763
|
+
month: format
|
|
8764
|
+
}, locale);
|
|
8765
|
+
}
|
|
8766
|
+
/**
|
|
8767
|
+
*
|
|
8768
|
+
* @param year - The year to localize
|
|
8769
|
+
* @param format - The formatting for the year
|
|
8770
|
+
* @param locale - The locale data used for formatting
|
|
8771
|
+
* @returns - A localized string for the year
|
|
8772
|
+
* @public
|
|
8773
|
+
*/
|
|
8774
|
+
|
|
8775
|
+
|
|
8776
|
+
getYear(year = this.date.getFullYear(), format = this.yearFormat, locale = this.locale) {
|
|
8777
|
+
return this.getDate({
|
|
8778
|
+
month: 2,
|
|
8779
|
+
day: 2,
|
|
8780
|
+
year
|
|
8781
|
+
}, {
|
|
8782
|
+
year: format
|
|
8783
|
+
}, locale);
|
|
8784
|
+
}
|
|
8785
|
+
/**
|
|
8786
|
+
*
|
|
8787
|
+
* @param weekday - The number of the weekday, defaults to Sunday
|
|
8788
|
+
* @param format - The formatting for the weekday label
|
|
8789
|
+
* @param locale - The locale data used for formatting
|
|
8790
|
+
* @returns - A formatted weekday label
|
|
8791
|
+
* @public
|
|
8792
|
+
*/
|
|
8793
|
+
|
|
8794
|
+
|
|
8795
|
+
getWeekday(weekday = 0, format = this.weekdayFormat, locale = this.locale) {
|
|
8796
|
+
const date = `1-${weekday + 1}-2017`;
|
|
8797
|
+
return this.getDate(date, {
|
|
8798
|
+
weekday: format
|
|
8799
|
+
}, locale);
|
|
8800
|
+
}
|
|
8801
|
+
/**
|
|
8802
|
+
*
|
|
8803
|
+
* @param format - The formatting for the weekdays
|
|
8804
|
+
* @param locale - The locale data used for formatting
|
|
8805
|
+
* @returns - An array of the weekday labels
|
|
8806
|
+
* @public
|
|
8807
|
+
*/
|
|
8808
|
+
|
|
8809
|
+
|
|
8810
|
+
getWeekdays(format = this.weekdayFormat, locale = this.locale) {
|
|
8811
|
+
return Array(7).fill(null).map((_, day) => this.getWeekday(day, format, locale));
|
|
8812
|
+
}
|
|
8813
|
+
|
|
8814
|
+
}
|
|
8815
|
+
|
|
8816
|
+
/**
|
|
8817
|
+
* Calendar component
|
|
8818
|
+
* @public
|
|
8819
|
+
*/
|
|
8820
|
+
|
|
8821
|
+
class Calendar$1 extends FoundationElement {
|
|
8822
|
+
constructor() {
|
|
8823
|
+
super(...arguments);
|
|
8824
|
+
/**
|
|
8825
|
+
* date formatter utitlity for getting localized strings
|
|
8826
|
+
* @public
|
|
8827
|
+
*/
|
|
8828
|
+
|
|
8829
|
+
this.dateFormatter = new DateFormatter();
|
|
8830
|
+
/**
|
|
8831
|
+
* Readonly attribute for turning off data-grid
|
|
8832
|
+
* @public
|
|
8833
|
+
*/
|
|
8834
|
+
|
|
8835
|
+
this.readonly = false;
|
|
8836
|
+
/**
|
|
8837
|
+
* String repesentation of the full locale including market, calendar type and numbering system
|
|
8838
|
+
* @public
|
|
8839
|
+
*/
|
|
8840
|
+
|
|
8841
|
+
this.locale = "en-US";
|
|
8842
|
+
/**
|
|
8843
|
+
* Month to display
|
|
8844
|
+
* @public
|
|
8845
|
+
*/
|
|
8846
|
+
|
|
8847
|
+
this.month = new Date().getMonth() + 1;
|
|
8848
|
+
/**
|
|
8849
|
+
* Year of the month to display
|
|
8850
|
+
* @public
|
|
8851
|
+
*/
|
|
8852
|
+
|
|
8853
|
+
this.year = new Date().getFullYear();
|
|
8854
|
+
/**
|
|
8855
|
+
* Format style for the day
|
|
8856
|
+
* @public
|
|
8857
|
+
*/
|
|
8858
|
+
|
|
8859
|
+
this.dayFormat = "numeric";
|
|
8860
|
+
/**
|
|
8861
|
+
* Format style for the week day labels
|
|
8862
|
+
* @public
|
|
8863
|
+
*/
|
|
8864
|
+
|
|
8865
|
+
this.weekdayFormat = "short";
|
|
8866
|
+
/**
|
|
8867
|
+
* Format style for the month label
|
|
8868
|
+
* @public
|
|
8869
|
+
*/
|
|
8870
|
+
|
|
8871
|
+
this.monthFormat = "long";
|
|
8872
|
+
/**
|
|
8873
|
+
* Format style for the year used in the title
|
|
8874
|
+
* @public
|
|
8875
|
+
*/
|
|
8876
|
+
|
|
8877
|
+
this.yearFormat = "numeric";
|
|
8878
|
+
/**
|
|
8879
|
+
* Minimum number of weeks to show for the month
|
|
8880
|
+
* This can be used to normalize the calendar view
|
|
8881
|
+
* when changing or across multiple calendars
|
|
8882
|
+
* @public
|
|
8883
|
+
*/
|
|
8884
|
+
|
|
8885
|
+
this.minWeeks = 0;
|
|
8886
|
+
/**
|
|
8887
|
+
* A list of dates that should be shown as disabled
|
|
8888
|
+
* @public
|
|
8889
|
+
*/
|
|
8890
|
+
|
|
8891
|
+
this.disabledDates = "";
|
|
8892
|
+
/**
|
|
8893
|
+
* A list of dates that should be shown as highlighted
|
|
8894
|
+
* @public
|
|
8895
|
+
*/
|
|
8896
|
+
|
|
8897
|
+
this.selectedDates = "";
|
|
8898
|
+
/**
|
|
8899
|
+
* The number of miliseconds in a day
|
|
8900
|
+
* @internal
|
|
8901
|
+
*/
|
|
8902
|
+
|
|
8903
|
+
this.oneDayInMs = 86400000;
|
|
8904
|
+
}
|
|
8905
|
+
|
|
8906
|
+
localeChanged() {
|
|
8907
|
+
this.dateFormatter.locale = this.locale;
|
|
8908
|
+
}
|
|
8909
|
+
|
|
8910
|
+
dayFormatChanged() {
|
|
8911
|
+
this.dateFormatter.dayFormat = this.dayFormat;
|
|
8912
|
+
}
|
|
8913
|
+
|
|
8914
|
+
weekdayFormatChanged() {
|
|
8915
|
+
this.dateFormatter.weekdayFormat = this.weekdayFormat;
|
|
8916
|
+
}
|
|
8917
|
+
|
|
8918
|
+
monthFormatChanged() {
|
|
8919
|
+
this.dateFormatter.monthFormat = this.monthFormat;
|
|
8920
|
+
}
|
|
8921
|
+
|
|
8922
|
+
yearFormatChanged() {
|
|
8923
|
+
this.dateFormatter.yearFormat = this.yearFormat;
|
|
8924
|
+
}
|
|
8925
|
+
/**
|
|
8926
|
+
* Gets data needed to render about a calendar month as well as the previous and next months
|
|
8927
|
+
* @param year - year of the calendar
|
|
8928
|
+
* @param month - month of the calendar
|
|
8929
|
+
* @returns - an object with data about the current and 2 surrounding months
|
|
8930
|
+
* @public
|
|
8931
|
+
*/
|
|
8932
|
+
|
|
8933
|
+
|
|
8934
|
+
getMonthInfo(month = this.month, year = this.year) {
|
|
8935
|
+
const getFirstDay = date => new Date(date.getFullYear(), date.getMonth(), 1).getDay();
|
|
8936
|
+
|
|
8937
|
+
const getLength = date => {
|
|
8938
|
+
const nextMonth = new Date(date.getFullYear(), date.getMonth() + 1, 1);
|
|
8939
|
+
return new Date(nextMonth.getTime() - this.oneDayInMs).getDate();
|
|
8940
|
+
};
|
|
8941
|
+
|
|
8942
|
+
const thisMonth = new Date(year, month - 1);
|
|
8943
|
+
const nextMonth = new Date(year, month);
|
|
8944
|
+
const previousMonth = new Date(year, month - 2);
|
|
8945
|
+
return {
|
|
8946
|
+
length: getLength(thisMonth),
|
|
8947
|
+
month,
|
|
8948
|
+
start: getFirstDay(thisMonth),
|
|
8949
|
+
year,
|
|
8950
|
+
previous: {
|
|
8951
|
+
length: getLength(previousMonth),
|
|
8952
|
+
month: previousMonth.getMonth() + 1,
|
|
8953
|
+
start: getFirstDay(previousMonth),
|
|
8954
|
+
year: previousMonth.getFullYear()
|
|
8955
|
+
},
|
|
8956
|
+
next: {
|
|
8957
|
+
length: getLength(nextMonth),
|
|
8958
|
+
month: nextMonth.getMonth() + 1,
|
|
8959
|
+
start: getFirstDay(nextMonth),
|
|
8960
|
+
year: nextMonth.getFullYear()
|
|
8961
|
+
}
|
|
8962
|
+
};
|
|
8963
|
+
}
|
|
8964
|
+
/**
|
|
8965
|
+
* A list of calendar days
|
|
8966
|
+
* @param info - an object containing the information needed to render a calendar month
|
|
8967
|
+
* @param minWeeks - minimum number of weeks to show
|
|
8968
|
+
* @returns a list of days in a calendar month
|
|
8969
|
+
* @public
|
|
8970
|
+
*/
|
|
8971
|
+
|
|
8972
|
+
|
|
8973
|
+
getDays(info = this.getMonthInfo(), minWeeks = this.minWeeks) {
|
|
8974
|
+
minWeeks = minWeeks > 10 ? 10 : minWeeks;
|
|
8975
|
+
const {
|
|
8976
|
+
start,
|
|
8977
|
+
length,
|
|
8978
|
+
previous,
|
|
8979
|
+
next
|
|
8980
|
+
} = info;
|
|
8981
|
+
const days = [];
|
|
8982
|
+
let dayCount = 1 - start;
|
|
8983
|
+
|
|
8984
|
+
while (dayCount < length + 1 || days.length < minWeeks || days[days.length - 1].length % 7 !== 0) {
|
|
8985
|
+
const {
|
|
8986
|
+
month,
|
|
8987
|
+
year
|
|
8988
|
+
} = dayCount < 1 ? previous : dayCount > length ? next : info;
|
|
8989
|
+
const day = dayCount < 1 ? previous.length + dayCount : dayCount > length ? dayCount - length : dayCount;
|
|
8990
|
+
const dateString = `${month}-${day}-${year}`;
|
|
8991
|
+
const disabled = this.dateInString(dateString, this.disabledDates);
|
|
8992
|
+
const selected = this.dateInString(dateString, this.selectedDates);
|
|
8993
|
+
const date = {
|
|
8994
|
+
day,
|
|
8995
|
+
month,
|
|
8996
|
+
year,
|
|
8997
|
+
disabled,
|
|
8998
|
+
selected
|
|
8999
|
+
};
|
|
9000
|
+
const target = days[days.length - 1];
|
|
9001
|
+
|
|
9002
|
+
if (days.length === 0 || target.length % 7 === 0) {
|
|
9003
|
+
days.push([date]);
|
|
9004
|
+
} else {
|
|
9005
|
+
target.push(date);
|
|
9006
|
+
}
|
|
9007
|
+
|
|
9008
|
+
dayCount++;
|
|
9009
|
+
}
|
|
9010
|
+
|
|
9011
|
+
return days;
|
|
9012
|
+
}
|
|
9013
|
+
/**
|
|
9014
|
+
* A helper function that checks if a date exists in a list of dates
|
|
9015
|
+
* @param date - A date objec that includes the day, month and year
|
|
9016
|
+
* @param datesString - a comma separated list of dates
|
|
9017
|
+
* @returns - Returns true if it found the date in the list of dates
|
|
9018
|
+
* @public
|
|
9019
|
+
*/
|
|
9020
|
+
|
|
9021
|
+
|
|
9022
|
+
dateInString(date, datesString) {
|
|
9023
|
+
const dates = datesString.split(",").map(str => str.trim());
|
|
9024
|
+
date = typeof date === "string" ? date : `${date.getMonth() + 1}-${date.getDate()}-${date.getFullYear()}`;
|
|
9025
|
+
return dates.some(d => d === date);
|
|
9026
|
+
}
|
|
9027
|
+
/**
|
|
9028
|
+
* Creates a class string for the day container
|
|
9029
|
+
* @param date - date of the calendar cell
|
|
9030
|
+
* @returns - string of class names
|
|
9031
|
+
* @public
|
|
9032
|
+
*/
|
|
9033
|
+
|
|
9034
|
+
|
|
9035
|
+
getDayClassNames(date, todayString) {
|
|
9036
|
+
const {
|
|
9037
|
+
day,
|
|
9038
|
+
month,
|
|
9039
|
+
year,
|
|
9040
|
+
disabled,
|
|
9041
|
+
selected
|
|
9042
|
+
} = date;
|
|
9043
|
+
const today = todayString === `${month}-${day}-${year}`;
|
|
9044
|
+
const inactive = this.month !== month;
|
|
9045
|
+
return ["day", today && "today", inactive && "inactive", disabled && "disabled", selected && "selected"].filter(Boolean).join(" ");
|
|
9046
|
+
}
|
|
9047
|
+
/**
|
|
9048
|
+
* Returns a list of weekday labels
|
|
9049
|
+
* @returns An array of weekday text and full text if abbreviated
|
|
9050
|
+
* @public
|
|
9051
|
+
*/
|
|
9052
|
+
|
|
9053
|
+
|
|
9054
|
+
getWeekdayText() {
|
|
9055
|
+
const weekdayText = this.dateFormatter.getWeekdays().map(text => ({
|
|
9056
|
+
text
|
|
9057
|
+
}));
|
|
9058
|
+
|
|
9059
|
+
if (this.weekdayFormat !== "long") {
|
|
9060
|
+
const longText = this.dateFormatter.getWeekdays("long");
|
|
9061
|
+
weekdayText.forEach((weekday, index) => {
|
|
9062
|
+
weekday.abbr = longText[index];
|
|
9063
|
+
});
|
|
9064
|
+
}
|
|
9065
|
+
|
|
9066
|
+
return weekdayText;
|
|
9067
|
+
}
|
|
9068
|
+
/**
|
|
9069
|
+
* Emits the "date-select" event with the day, month and year.
|
|
9070
|
+
* @param date - Date cell
|
|
9071
|
+
* @public
|
|
9072
|
+
*/
|
|
9073
|
+
|
|
9074
|
+
|
|
9075
|
+
handleDateSelect(event, day) {
|
|
9076
|
+
event.preventDefault;
|
|
9077
|
+
this.$emit("dateselected", day);
|
|
9078
|
+
}
|
|
9079
|
+
/**
|
|
9080
|
+
* Handles keyboard events on a cell
|
|
9081
|
+
* @param event - Keyboard event
|
|
9082
|
+
* @param date - Date of the cell selected
|
|
9083
|
+
*/
|
|
9084
|
+
|
|
9085
|
+
|
|
9086
|
+
handleKeydown(event, date) {
|
|
9087
|
+
if (event.key === keyEnter) {
|
|
9088
|
+
this.handleDateSelect(event, date);
|
|
9089
|
+
}
|
|
9090
|
+
|
|
9091
|
+
return true;
|
|
9092
|
+
}
|
|
9093
|
+
|
|
9094
|
+
}
|
|
9095
|
+
|
|
9096
|
+
__decorate$1([attr({
|
|
9097
|
+
mode: "boolean"
|
|
9098
|
+
})], Calendar$1.prototype, "readonly", void 0);
|
|
9099
|
+
|
|
9100
|
+
__decorate$1([attr], Calendar$1.prototype, "locale", void 0);
|
|
9101
|
+
|
|
9102
|
+
__decorate$1([attr({
|
|
9103
|
+
converter: nullableNumberConverter
|
|
9104
|
+
})], Calendar$1.prototype, "month", void 0);
|
|
9105
|
+
|
|
9106
|
+
__decorate$1([attr({
|
|
9107
|
+
converter: nullableNumberConverter
|
|
9108
|
+
})], Calendar$1.prototype, "year", void 0);
|
|
9109
|
+
|
|
9110
|
+
__decorate$1([attr({
|
|
9111
|
+
attribute: "day-format",
|
|
9112
|
+
mode: "fromView"
|
|
9113
|
+
})], Calendar$1.prototype, "dayFormat", void 0);
|
|
9114
|
+
|
|
9115
|
+
__decorate$1([attr({
|
|
9116
|
+
attribute: "weekday-format",
|
|
9117
|
+
mode: "fromView"
|
|
9118
|
+
})], Calendar$1.prototype, "weekdayFormat", void 0);
|
|
9119
|
+
|
|
9120
|
+
__decorate$1([attr({
|
|
9121
|
+
attribute: "month-format",
|
|
9122
|
+
mode: "fromView"
|
|
9123
|
+
})], Calendar$1.prototype, "monthFormat", void 0);
|
|
9124
|
+
|
|
9125
|
+
__decorate$1([attr({
|
|
9126
|
+
attribute: "year-format",
|
|
9127
|
+
mode: "fromView"
|
|
9128
|
+
})], Calendar$1.prototype, "yearFormat", void 0);
|
|
9129
|
+
|
|
9130
|
+
__decorate$1([attr({
|
|
9131
|
+
attribute: "min-weeks",
|
|
9132
|
+
converter: nullableNumberConverter
|
|
9133
|
+
})], Calendar$1.prototype, "minWeeks", void 0);
|
|
9134
|
+
|
|
9135
|
+
__decorate$1([attr({
|
|
9136
|
+
attribute: "disabled-dates"
|
|
9137
|
+
})], Calendar$1.prototype, "disabledDates", void 0);
|
|
9138
|
+
|
|
9139
|
+
__decorate$1([attr({
|
|
9140
|
+
attribute: "selected-dates"
|
|
9141
|
+
})], Calendar$1.prototype, "selectedDates", void 0);
|
|
9142
|
+
|
|
8490
9143
|
/**
|
|
8491
9144
|
* Enumerates auto generated header options
|
|
8492
9145
|
* default option generates a non-sticky header row
|
|
@@ -8624,6 +9277,8 @@ class DataGridRow extends FoundationElement {
|
|
|
8624
9277
|
this.cellsRepeatBehavior = new RepeatDirective(x => x.columnDefinitions, x => x.activeCellItemTemplate, {
|
|
8625
9278
|
positioning: true
|
|
8626
9279
|
}).createBehavior(this.cellsPlaceholder);
|
|
9280
|
+
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
9281
|
+
|
|
8627
9282
|
this.$fastController.addBehaviors([this.cellsRepeatBehavior]);
|
|
8628
9283
|
}
|
|
8629
9284
|
|
|
@@ -8848,7 +9503,7 @@ class DataGrid extends FoundationElement {
|
|
|
8848
9503
|
this.onChildListChange = (mutations,
|
|
8849
9504
|
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
8850
9505
|
observer) => {
|
|
8851
|
-
if (mutations.length) {
|
|
9506
|
+
if (mutations && mutations.length) {
|
|
8852
9507
|
mutations.forEach(mutation => {
|
|
8853
9508
|
mutation.addedNodes.forEach(newNode => {
|
|
8854
9509
|
if (newNode.nodeType === 1 && newNode.getAttribute("role") === "row") {
|
|
@@ -8964,6 +9619,8 @@ class DataGrid extends FoundationElement {
|
|
|
8964
9619
|
this.rowsRepeatBehavior = new RepeatDirective(x => x.rowsData, x => x.rowItemTemplate, {
|
|
8965
9620
|
positioning: true
|
|
8966
9621
|
}).createBehavior(this.rowsPlaceholder);
|
|
9622
|
+
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
9623
|
+
|
|
8967
9624
|
this.$fastController.addBehaviors([this.rowsRepeatBehavior]);
|
|
8968
9625
|
this.addEventListener("row-focused", this.handleRowFocus);
|
|
8969
9626
|
this.addEventListener(eventFocus, this.handleFocus);
|
|
@@ -9445,39 +10102,135 @@ function createCellItemTemplate(context) {
|
|
|
9445
10102
|
return html`<${cellTag} cell-type="${x => x.isRowHeader ? "rowheader" : undefined}" grid-column="${(x, c) => c.index + 1}" :rowData="${(x, c) => c.parent.rowData}" :columnDefinition="${x => x}"></${cellTag}>`;
|
|
9446
10103
|
}
|
|
9447
10104
|
|
|
9448
|
-
function createHeaderCellItemTemplate(context) {
|
|
10105
|
+
function createHeaderCellItemTemplate(context) {
|
|
10106
|
+
const cellTag = context.tagFor(DataGridCell);
|
|
10107
|
+
return html`<${cellTag} cell-type="columnheader" grid-column="${(x, c) => c.index + 1}" :columnDefinition="${x => x}"></${cellTag}>`;
|
|
10108
|
+
}
|
|
10109
|
+
/**
|
|
10110
|
+
* Generates a template for the {@link @microsoft/fast-foundation#DataGridRow} component using
|
|
10111
|
+
* the provided prefix.
|
|
10112
|
+
*
|
|
10113
|
+
* @public
|
|
10114
|
+
*/
|
|
10115
|
+
|
|
10116
|
+
|
|
10117
|
+
const dataGridRowTemplate = (context, definition) => {
|
|
10118
|
+
const cellItemTemplate = createCellItemTemplate(context);
|
|
10119
|
+
const headerCellItemTemplate = createHeaderCellItemTemplate(context);
|
|
10120
|
+
return html`<template role="row" class="${x => x.rowType !== "default" ? x.rowType : ""}" :defaultCellItemTemplate="${cellItemTemplate}" :defaultHeaderCellItemTemplate="${headerCellItemTemplate}" ${children({
|
|
10121
|
+
property: "cellElements",
|
|
10122
|
+
filter: elements('[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"]')
|
|
10123
|
+
})}><slot ${slotted("slottedCellElements")}></slot></template>`;
|
|
10124
|
+
};
|
|
10125
|
+
|
|
10126
|
+
/**
|
|
10127
|
+
* Generates a template for the {@link @microsoft/fast-foundation#DataGridCell} component using
|
|
10128
|
+
* the provided prefix.
|
|
10129
|
+
* @public
|
|
10130
|
+
*/
|
|
10131
|
+
|
|
10132
|
+
const dataGridCellTemplate = (context, definition) => {
|
|
10133
|
+
return html`<template tabindex="-1" role="${x => {
|
|
10134
|
+
var _a;
|
|
10135
|
+
|
|
10136
|
+
return (_a = x.cellType) !== null && _a !== void 0 ? _a : "gridcell";
|
|
10137
|
+
}}" class=" ${x => x.cellType === "columnheader" ? "column-header" : x.cellType === "rowheader" ? "row-header" : ""} "><slot></slot></template>`;
|
|
10138
|
+
};
|
|
10139
|
+
|
|
10140
|
+
/**
|
|
10141
|
+
* A basic Calendar title template that includes the month and year
|
|
10142
|
+
* @returns - A calendar title template
|
|
10143
|
+
* @public
|
|
10144
|
+
*/
|
|
10145
|
+
|
|
10146
|
+
const CalendarTitleTemplate = html`<div class="title" part="title" aria-label="${x => x.dateFormatter.getDate(`${x.month}-2-${x.year}`, {
|
|
10147
|
+
month: "long",
|
|
10148
|
+
year: "numeric"
|
|
10149
|
+
})}"><span part="month">${x => x.dateFormatter.getMonth(x.month)}</span><span part="year">${x => x.dateFormatter.getYear(x.year)}</span></div>`;
|
|
10150
|
+
/**
|
|
10151
|
+
* Calendar weekday label template
|
|
10152
|
+
* @returns - The weekday labels template
|
|
10153
|
+
* @public
|
|
10154
|
+
*/
|
|
10155
|
+
|
|
10156
|
+
const calendarWeekdayTemplate = context => {
|
|
10157
|
+
const cellTag = context.tagFor(DataGridCell);
|
|
10158
|
+
return html`<${cellTag} class="week-day" part="week-day" tabindex="-1" grid-column="${(x, c) => c.index + 1}" abbr="${x => x.abbr}">${x => x.text}</${cellTag}>`;
|
|
10159
|
+
};
|
|
10160
|
+
/**
|
|
10161
|
+
* A calendar day template
|
|
10162
|
+
* @param context - Element definition context for getting the cell tag for calendar-cell
|
|
10163
|
+
* @param todayString - A string representation for todays date
|
|
10164
|
+
* @returns - A calendar cell template for a given date
|
|
10165
|
+
* @public
|
|
10166
|
+
*/
|
|
10167
|
+
|
|
10168
|
+
const calendarCellTemplate = (context, todayString) => {
|
|
9449
10169
|
const cellTag = context.tagFor(DataGridCell);
|
|
9450
|
-
return html`<${cellTag}
|
|
9451
|
-
|
|
10170
|
+
return html`<${cellTag} class="${(x, c) => c.parentContext.parent.getDayClassNames(x, todayString)}" part="day" tabindex="-1" role="gridcell" grid-column="${(x, c) => c.index + 1}" @click="${(x, c) => c.parentContext.parent.handleDateSelect(c.event, x)}" @keydown="${(x, c) => c.parentContext.parent.handleKeydown(c.event, x)}" aria-label="${(x, c) => c.parentContext.parent.dateFormatter.getDate(`${x.month}-${x.day}-${x.year}`, {
|
|
10171
|
+
month: "long",
|
|
10172
|
+
day: "numeric"
|
|
10173
|
+
})}"><div class="date" part="${x => todayString === `${x.month}-${x.day}-${x.year}` ? "today" : "date"}">${(x, c) => c.parentContext.parent.dateFormatter.getDay(x.day)}</div><slot name="${x => x.month}-${x => x.day}-${x => x.year}"></slot></${cellTag}>`;
|
|
10174
|
+
};
|
|
9452
10175
|
/**
|
|
9453
|
-
* Generates a template for the {@link @microsoft/fast-foundation#DataGridRow} component using
|
|
9454
|
-
* the provided prefix.
|
|
9455
10176
|
*
|
|
10177
|
+
* @param context - Element definition context for getting the cell tag for calendar-cell
|
|
10178
|
+
* @param todayString - A string representation for todays date
|
|
10179
|
+
* @returns - A template for a week of days
|
|
9456
10180
|
* @public
|
|
9457
10181
|
*/
|
|
9458
10182
|
|
|
10183
|
+
const calendarRowTemplate = (context, todayString) => {
|
|
10184
|
+
const rowTag = context.tagFor(DataGridRow);
|
|
10185
|
+
return html`<${rowTag} class="week" part="week" role="row" role-type="default" grid-template-columns="1fr 1fr 1fr 1fr 1fr 1fr 1fr">${repeat(x => x, calendarCellTemplate(context, todayString), {
|
|
10186
|
+
positioning: true
|
|
10187
|
+
})}</${rowTag}>`;
|
|
10188
|
+
};
|
|
10189
|
+
/**
|
|
10190
|
+
* Interactive template using DataGrid
|
|
10191
|
+
* @param context - The templates context
|
|
10192
|
+
* @param todayString - string representation of todays date
|
|
10193
|
+
* @returns - interactive calendar template
|
|
10194
|
+
*
|
|
10195
|
+
* @internal
|
|
10196
|
+
*/
|
|
9459
10197
|
|
|
9460
|
-
const
|
|
9461
|
-
const
|
|
9462
|
-
const
|
|
9463
|
-
return html
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
})}><slot ${slotted("slottedCellElements")}></slot></template>`;
|
|
10198
|
+
const interactiveCalendarGridTemplate = (context, todayString) => {
|
|
10199
|
+
const gridTag = context.tagFor(DataGrid);
|
|
10200
|
+
const rowTag = context.tagFor(DataGridRow);
|
|
10201
|
+
return html`<${gridTag} class="days interact" part="days" generate-header="none"><${rowTag} class="week-days" part="week-days" role="row" row-type="header" grid-template-columns="1fr 1fr 1fr 1fr 1fr 1fr 1fr">${repeat(x => x.getWeekdayText(), calendarWeekdayTemplate(context), {
|
|
10202
|
+
positioning: true
|
|
10203
|
+
})}</${rowTag}>${repeat(x => x.getDays(), calendarRowTemplate(context, todayString))}</${gridTag}>`;
|
|
9467
10204
|
};
|
|
10205
|
+
/**
|
|
10206
|
+
* Non-interactive calendar template used for a readonly calendar
|
|
10207
|
+
* @param todayString - string representation of todays date
|
|
10208
|
+
* @returns - non-interactive calendar template
|
|
10209
|
+
*
|
|
10210
|
+
* @internal
|
|
10211
|
+
*/
|
|
9468
10212
|
|
|
10213
|
+
const noninteractiveCalendarTemplate = todayString => {
|
|
10214
|
+
return html`<div class="days" part="days"><div class="week-days" part="week-days">${repeat(x => x.getWeekdayText(), html`<div class="week-day" part="week-day" abbr="${x => x.abbr}">${x => x.text}</div>`)}</div>${repeat(x => x.getDays(), html`<div class="week">${repeat(x => x, html`<div class="${(x, c) => c.parentContext.parent.getDayClassNames(x, todayString)}" part="day" aria-label="${(x, c) => c.parentContext.parent.dateFormatter.getDate(`${x.month}-${x.day}-${x.year}`, {
|
|
10215
|
+
month: "long",
|
|
10216
|
+
day: "numeric"
|
|
10217
|
+
})}"><div class="date" part="${x => todayString === `${x.month}-${x.day}-${x.year}` ? "today" : "date"}">${(x, c) => c.parentContext.parent.dateFormatter.getDay(x.day)}</div><slot name="${x => x.month}-${x => x.day}-${x => x.year}"></slot></div>`)}</div>`)}</div>`;
|
|
10218
|
+
};
|
|
9469
10219
|
/**
|
|
9470
|
-
*
|
|
9471
|
-
*
|
|
10220
|
+
* The template for the {@link @microsoft/fast-foundation#(Calendar:class)} component.
|
|
10221
|
+
*
|
|
10222
|
+
* @param context - Element definition context for getting the cell tag for calendar-cell
|
|
10223
|
+
* @param definition - Foundation element definition
|
|
10224
|
+
* @returns - a template for a calendar month
|
|
9472
10225
|
* @public
|
|
9473
10226
|
*/
|
|
9474
10227
|
|
|
9475
|
-
const
|
|
9476
|
-
|
|
9477
|
-
var _a;
|
|
10228
|
+
const calendarTemplate = (context, definition) => {
|
|
10229
|
+
var _a;
|
|
9478
10230
|
|
|
9479
|
-
|
|
9480
|
-
|
|
10231
|
+
const today = new Date();
|
|
10232
|
+
const todayString = `${today.getMonth() + 1}-${today.getDate()}-${today.getFullYear()}`;
|
|
10233
|
+
return html`<template>${startTemplate} ${definition.title instanceof Function ? definition.title(context, definition) : (_a = definition.title) !== null && _a !== void 0 ? _a : ""}<slot></slot>${when(x => x.readonly === false, interactiveCalendarGridTemplate(context, todayString))} ${when(x => x.readonly === true, noninteractiveCalendarTemplate(todayString))} ${endTemplate}</template>`;
|
|
9481
10234
|
};
|
|
9482
10235
|
|
|
9483
10236
|
/**
|
|
@@ -9510,7 +10263,7 @@ class _Checkbox extends FoundationElement {}
|
|
|
9510
10263
|
*/
|
|
9511
10264
|
|
|
9512
10265
|
|
|
9513
|
-
class FormAssociatedCheckbox extends
|
|
10266
|
+
class FormAssociatedCheckbox extends CheckableFormAssociated(_Checkbox) {
|
|
9514
10267
|
constructor() {
|
|
9515
10268
|
super(...arguments);
|
|
9516
10269
|
this.proxy = document.createElement("input");
|
|
@@ -9541,31 +10294,10 @@ class Checkbox extends FormAssociatedCheckbox {
|
|
|
9541
10294
|
*/
|
|
9542
10295
|
|
|
9543
10296
|
this.indeterminate = false;
|
|
9544
|
-
/**
|
|
9545
|
-
* Tracks whether the "checked" property has been changed.
|
|
9546
|
-
* This is necessary to provide consistent behavior with
|
|
9547
|
-
* normal input checkboxes
|
|
9548
|
-
*/
|
|
9549
|
-
|
|
9550
|
-
this.dirtyChecked = false;
|
|
9551
|
-
/**
|
|
9552
|
-
* Set to true when the component has constructed
|
|
9553
|
-
*/
|
|
9554
|
-
|
|
9555
|
-
this.constructed = false;
|
|
9556
|
-
/**
|
|
9557
|
-
* @internal
|
|
9558
|
-
*/
|
|
9559
|
-
|
|
9560
|
-
this.formResetCallback = () => {
|
|
9561
|
-
this.checked = this.checkedAttribute;
|
|
9562
|
-
this.dirtyChecked = false;
|
|
9563
|
-
};
|
|
9564
10297
|
/**
|
|
9565
10298
|
* @internal
|
|
9566
10299
|
*/
|
|
9567
10300
|
|
|
9568
|
-
|
|
9569
10301
|
this.keypressHandler = e => {
|
|
9570
10302
|
switch (e.key) {
|
|
9571
10303
|
case keySpace:
|
|
@@ -9584,9 +10316,7 @@ class Checkbox extends FormAssociatedCheckbox {
|
|
|
9584
10316
|
}
|
|
9585
10317
|
};
|
|
9586
10318
|
|
|
9587
|
-
this.
|
|
9588
|
-
this.checked = this.defaultChecked;
|
|
9589
|
-
this.constructed = true;
|
|
10319
|
+
this.proxy.setAttribute("type", "checkbox");
|
|
9590
10320
|
}
|
|
9591
10321
|
|
|
9592
10322
|
readOnlyChanged() {
|
|
@@ -9595,53 +10325,6 @@ class Checkbox extends FormAssociatedCheckbox {
|
|
|
9595
10325
|
}
|
|
9596
10326
|
}
|
|
9597
10327
|
|
|
9598
|
-
checkedAttributeChanged() {
|
|
9599
|
-
this.defaultChecked = this.checkedAttribute;
|
|
9600
|
-
}
|
|
9601
|
-
|
|
9602
|
-
defaultCheckedChanged() {
|
|
9603
|
-
if (!this.dirtyChecked) {
|
|
9604
|
-
// Setting this.checked will cause us to enter a dirty state,
|
|
9605
|
-
// but if we are clean when defaultChecked is changed, we want to stay
|
|
9606
|
-
// in a clean state, so reset this.dirtyChecked
|
|
9607
|
-
this.checked = this.defaultChecked;
|
|
9608
|
-
this.dirtyChecked = false;
|
|
9609
|
-
}
|
|
9610
|
-
}
|
|
9611
|
-
|
|
9612
|
-
checkedChanged() {
|
|
9613
|
-
if (!this.dirtyChecked) {
|
|
9614
|
-
this.dirtyChecked = true;
|
|
9615
|
-
}
|
|
9616
|
-
|
|
9617
|
-
this.updateForm();
|
|
9618
|
-
|
|
9619
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
9620
|
-
this.proxy.checked = this.checked;
|
|
9621
|
-
}
|
|
9622
|
-
|
|
9623
|
-
if (this.constructed) {
|
|
9624
|
-
this.$emit("change");
|
|
9625
|
-
}
|
|
9626
|
-
|
|
9627
|
-
this.validate();
|
|
9628
|
-
}
|
|
9629
|
-
/**
|
|
9630
|
-
* @internal
|
|
9631
|
-
*/
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
connectedCallback() {
|
|
9635
|
-
super.connectedCallback();
|
|
9636
|
-
this.proxy.setAttribute("type", "checkbox");
|
|
9637
|
-
this.updateForm();
|
|
9638
|
-
}
|
|
9639
|
-
|
|
9640
|
-
updateForm() {
|
|
9641
|
-
const value = this.checked ? this.value : null;
|
|
9642
|
-
this.setFormValue(value, value);
|
|
9643
|
-
}
|
|
9644
|
-
|
|
9645
10328
|
}
|
|
9646
10329
|
|
|
9647
10330
|
__decorate$1([attr({
|
|
@@ -9649,17 +10332,8 @@ __decorate$1([attr({
|
|
|
9649
10332
|
mode: "boolean"
|
|
9650
10333
|
})], Checkbox.prototype, "readOnly", void 0);
|
|
9651
10334
|
|
|
9652
|
-
__decorate$1([attr({
|
|
9653
|
-
attribute: "checked",
|
|
9654
|
-
mode: "boolean"
|
|
9655
|
-
})], Checkbox.prototype, "checkedAttribute", void 0);
|
|
9656
|
-
|
|
9657
10335
|
__decorate$1([observable], Checkbox.prototype, "defaultSlottedNodes", void 0);
|
|
9658
10336
|
|
|
9659
|
-
__decorate$1([observable], Checkbox.prototype, "defaultChecked", void 0);
|
|
9660
|
-
|
|
9661
|
-
__decorate$1([observable], Checkbox.prototype, "checked", void 0);
|
|
9662
|
-
|
|
9663
10337
|
__decorate$1([observable], Checkbox.prototype, "indeterminate", void 0);
|
|
9664
10338
|
|
|
9665
10339
|
/**
|
|
@@ -10372,25 +11046,12 @@ class Combobox$1 extends FormAssociatedCombobox {
|
|
|
10372
11046
|
*/
|
|
10373
11047
|
|
|
10374
11048
|
this.forcedPosition = false;
|
|
10375
|
-
/**
|
|
10376
|
-
* Reset the element to its first selectable option when its parent form is reset.
|
|
10377
|
-
*
|
|
10378
|
-
* @internal
|
|
10379
|
-
*/
|
|
10380
|
-
|
|
10381
|
-
this.formResetCallback = () => {
|
|
10382
|
-
this.value = this.initialValue;
|
|
10383
|
-
this.dirtyValue = false;
|
|
10384
|
-
this.setDefaultSelectedOption();
|
|
10385
|
-
this.updateValue();
|
|
10386
|
-
};
|
|
10387
11049
|
/**
|
|
10388
11050
|
* The unique id of the internal listbox.
|
|
10389
11051
|
*
|
|
10390
11052
|
* @internal
|
|
10391
11053
|
*/
|
|
10392
11054
|
|
|
10393
|
-
|
|
10394
11055
|
this.listboxId = uniqueId("listbox-");
|
|
10395
11056
|
/**
|
|
10396
11057
|
* The max height for the listbox when opened.
|
|
@@ -10425,6 +11086,18 @@ class Combobox$1 extends FormAssociatedCombobox {
|
|
|
10425
11086
|
|
|
10426
11087
|
this.role = SelectRole.combobox;
|
|
10427
11088
|
}
|
|
11089
|
+
/**
|
|
11090
|
+
* Reset the element to its first selectable option when its parent form is reset.
|
|
11091
|
+
*
|
|
11092
|
+
* @internal
|
|
11093
|
+
*/
|
|
11094
|
+
|
|
11095
|
+
|
|
11096
|
+
formResetCallback() {
|
|
11097
|
+
super.formResetCallback();
|
|
11098
|
+
this.setDefaultSelectedOption();
|
|
11099
|
+
this.updateValue();
|
|
11100
|
+
}
|
|
10428
11101
|
|
|
10429
11102
|
get isAutocompleteInline() {
|
|
10430
11103
|
return this.autocomplete === ComboboxAutocomplete.inline || this.isAutocompleteBoth;
|
|
@@ -11382,7 +12055,7 @@ class StyleElementStyleSheetTarget {
|
|
|
11382
12055
|
// to index the rule inline, so store as a const prior to indexing.
|
|
11383
12056
|
// https://github.com/jsdom/jsdom uses https://github.com/NV/CSSOM for it's CSSOM implementation,
|
|
11384
12057
|
// which implements the DOM Level 2 spec for CSSStyleSheet where insertRule() requires an index argument.
|
|
11385
|
-
const index = sheet.insertRule(":
|
|
12058
|
+
const index = sheet.insertRule(":host{}", sheet.cssRules.length);
|
|
11386
12059
|
this.target = sheet.cssRules[index].style;
|
|
11387
12060
|
} else {
|
|
11388
12061
|
this.target = null;
|
|
@@ -11494,6 +12167,7 @@ const propertyTargetCtor = DOM.supportsAdoptedStyleSheets ? ConstructableStyleSh
|
|
|
11494
12167
|
const PropertyTargetManager = Object.freeze({
|
|
11495
12168
|
getOrCreate(source) {
|
|
11496
12169
|
if (propertyTargetCache.has(source)) {
|
|
12170
|
+
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
11497
12171
|
return propertyTargetCache.get(source);
|
|
11498
12172
|
}
|
|
11499
12173
|
|
|
@@ -12209,6 +12883,8 @@ __decorate$1([observable], DesignTokenNode.prototype, "children", void 0);
|
|
|
12209
12883
|
function create$2(nameOrConfig) {
|
|
12210
12884
|
return DesignTokenImpl.from(nameOrConfig);
|
|
12211
12885
|
}
|
|
12886
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
12887
|
+
|
|
12212
12888
|
/**
|
|
12213
12889
|
* Factory object for creating {@link (DesignToken:interface)} instances.
|
|
12214
12890
|
* @public
|
|
@@ -12283,6 +12959,9 @@ const DesignToken = Object.freeze({
|
|
|
12283
12959
|
}
|
|
12284
12960
|
|
|
12285
12961
|
});
|
|
12962
|
+
/* eslint-enable @typescript-eslint/no-non-null-assertion */
|
|
12963
|
+
|
|
12964
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
12286
12965
|
|
|
12287
12966
|
/**
|
|
12288
12967
|
* Indicates what to do with an ambiguous (duplicate) element.
|
|
@@ -12534,6 +13213,7 @@ class ElementDefinitionEntry {
|
|
|
12534
13213
|
}
|
|
12535
13214
|
|
|
12536
13215
|
}
|
|
13216
|
+
/* eslint-enable @typescript-eslint/no-non-null-assertion */
|
|
12537
13217
|
|
|
12538
13218
|
/**
|
|
12539
13219
|
* The template for the {@link @microsoft/fast-foundation#Dialog} component.
|
|
@@ -14166,10 +14846,8 @@ class NumberField$1 extends FormAssociatedNumberField {
|
|
|
14166
14846
|
|
|
14167
14847
|
|
|
14168
14848
|
stepUp() {
|
|
14169
|
-
var _a;
|
|
14170
|
-
|
|
14171
14849
|
const value = parseFloat(this.value);
|
|
14172
|
-
const stepUpValue = isNaN(value) ?
|
|
14850
|
+
const stepUpValue = !isNaN(value) ? value + this.step : this.min > 0 ? this.min : this.max < 0 ? this.max : !this.min ? this.step : 0;
|
|
14173
14851
|
this.value = stepUpValue.toString();
|
|
14174
14852
|
this.control.value = this.value;
|
|
14175
14853
|
}
|
|
@@ -14181,10 +14859,8 @@ class NumberField$1 extends FormAssociatedNumberField {
|
|
|
14181
14859
|
|
|
14182
14860
|
|
|
14183
14861
|
stepDown() {
|
|
14184
|
-
var _a;
|
|
14185
|
-
|
|
14186
14862
|
const value = parseFloat(this.value);
|
|
14187
|
-
const stepDownValue = isNaN(value) ?
|
|
14863
|
+
const stepDownValue = !isNaN(value) ? value - this.step : this.min > 0 ? this.min : this.max < 0 ? this.max : !this.min ? 0 - this.step : 0;
|
|
14188
14864
|
this.value = stepDownValue.toString();
|
|
14189
14865
|
this.control.value = this.value;
|
|
14190
14866
|
}
|
|
@@ -14855,7 +15531,7 @@ class _Radio extends FoundationElement {}
|
|
|
14855
15531
|
*/
|
|
14856
15532
|
|
|
14857
15533
|
|
|
14858
|
-
class FormAssociatedRadio extends
|
|
15534
|
+
class FormAssociatedRadio extends CheckableFormAssociated(_Radio) {
|
|
14859
15535
|
constructor() {
|
|
14860
15536
|
super(...arguments);
|
|
14861
15537
|
this.proxy = document.createElement("input");
|
|
@@ -14872,8 +15548,6 @@ class FormAssociatedRadio extends FormAssociated(_Radio) {
|
|
|
14872
15548
|
|
|
14873
15549
|
class Radio extends FormAssociatedRadio {
|
|
14874
15550
|
constructor() {
|
|
14875
|
-
var _a;
|
|
14876
|
-
|
|
14877
15551
|
super();
|
|
14878
15552
|
/**
|
|
14879
15553
|
* The element's value to be included in form submission when checked.
|
|
@@ -14883,36 +15557,10 @@ class Radio extends FormAssociatedRadio {
|
|
|
14883
15557
|
*/
|
|
14884
15558
|
|
|
14885
15559
|
this.initialValue = "on";
|
|
14886
|
-
/**
|
|
14887
|
-
* Provides the default checkedness of the input element
|
|
14888
|
-
* Passed down to proxy
|
|
14889
|
-
*
|
|
14890
|
-
* @public
|
|
14891
|
-
* @remarks
|
|
14892
|
-
* HTML Attribute: checked
|
|
14893
|
-
*/
|
|
14894
|
-
|
|
14895
|
-
this.checkedAttribute = false;
|
|
14896
|
-
/**
|
|
14897
|
-
* Tracks whether the "checked" property has been changed.
|
|
14898
|
-
* This is necessary to provide consistent behavior with
|
|
14899
|
-
* normal input radios
|
|
14900
|
-
*/
|
|
14901
|
-
|
|
14902
|
-
this.dirtyChecked = false;
|
|
14903
|
-
/**
|
|
14904
|
-
* @internal
|
|
14905
|
-
*/
|
|
14906
|
-
|
|
14907
|
-
this.formResetCallback = () => {
|
|
14908
|
-
this.checked = !!this.defaultChecked;
|
|
14909
|
-
this.dirtyChecked = false;
|
|
14910
|
-
};
|
|
14911
15560
|
/**
|
|
14912
15561
|
* @internal
|
|
14913
15562
|
*/
|
|
14914
15563
|
|
|
14915
|
-
|
|
14916
15564
|
this.keypressHandler = e => {
|
|
14917
15565
|
switch (e.key) {
|
|
14918
15566
|
case keySpace:
|
|
@@ -14926,7 +15574,7 @@ class Radio extends FormAssociatedRadio {
|
|
|
14926
15574
|
return true;
|
|
14927
15575
|
};
|
|
14928
15576
|
|
|
14929
|
-
this.
|
|
15577
|
+
this.proxy.setAttribute("type", "radio");
|
|
14930
15578
|
}
|
|
14931
15579
|
|
|
14932
15580
|
readOnlyChanged() {
|
|
@@ -14934,10 +15582,10 @@ class Radio extends FormAssociatedRadio {
|
|
|
14934
15582
|
this.proxy.readOnly = this.readOnly;
|
|
14935
15583
|
}
|
|
14936
15584
|
}
|
|
15585
|
+
/**
|
|
15586
|
+
* @internal
|
|
15587
|
+
*/
|
|
14937
15588
|
|
|
14938
|
-
checkedAttributeChanged() {
|
|
14939
|
-
this.defaultChecked = this.checkedAttribute;
|
|
14940
|
-
}
|
|
14941
15589
|
|
|
14942
15590
|
defaultCheckedChanged() {
|
|
14943
15591
|
var _a;
|
|
@@ -14952,24 +15600,6 @@ class Radio extends FormAssociatedRadio {
|
|
|
14952
15600
|
}
|
|
14953
15601
|
}
|
|
14954
15602
|
}
|
|
14955
|
-
|
|
14956
|
-
checkedChanged() {
|
|
14957
|
-
if (this.$fastController.isConnected) {
|
|
14958
|
-
// changing the value via code and from radio-group
|
|
14959
|
-
if (!this.dirtyChecked) {
|
|
14960
|
-
this.dirtyChecked = true;
|
|
14961
|
-
}
|
|
14962
|
-
|
|
14963
|
-
this.updateForm();
|
|
14964
|
-
|
|
14965
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
14966
|
-
this.proxy.checked = this.checked;
|
|
14967
|
-
}
|
|
14968
|
-
|
|
14969
|
-
this.$emit("change");
|
|
14970
|
-
this.validate();
|
|
14971
|
-
}
|
|
14972
|
-
}
|
|
14973
15603
|
/**
|
|
14974
15604
|
* @internal
|
|
14975
15605
|
*/
|
|
@@ -14979,7 +15609,6 @@ class Radio extends FormAssociatedRadio {
|
|
|
14979
15609
|
var _a, _b;
|
|
14980
15610
|
|
|
14981
15611
|
super.connectedCallback();
|
|
14982
|
-
this.proxy.setAttribute("type", "radio");
|
|
14983
15612
|
this.validate();
|
|
14984
15613
|
|
|
14985
15614
|
if (((_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.getAttribute("role")) !== "radiogroup" && this.getAttribute("tabindex") === null) {
|
|
@@ -14988,8 +15617,6 @@ class Radio extends FormAssociatedRadio {
|
|
|
14988
15617
|
}
|
|
14989
15618
|
}
|
|
14990
15619
|
|
|
14991
|
-
this.updateForm();
|
|
14992
|
-
|
|
14993
15620
|
if (this.checkedAttribute) {
|
|
14994
15621
|
if (!this.dirtyChecked) {
|
|
14995
15622
|
// Setting this.checked will cause us to enter a dirty state,
|
|
@@ -15007,11 +15634,6 @@ class Radio extends FormAssociatedRadio {
|
|
|
15007
15634
|
const parent = this.closest("[role=radiogroup]");
|
|
15008
15635
|
return parent !== null;
|
|
15009
15636
|
}
|
|
15010
|
-
|
|
15011
|
-
updateForm() {
|
|
15012
|
-
const value = this.checked ? this.value : null;
|
|
15013
|
-
this.setFormValue(value, value);
|
|
15014
|
-
}
|
|
15015
15637
|
/**
|
|
15016
15638
|
* @internal
|
|
15017
15639
|
*/
|
|
@@ -15032,17 +15654,8 @@ __decorate$1([attr({
|
|
|
15032
15654
|
|
|
15033
15655
|
__decorate$1([observable], Radio.prototype, "name", void 0);
|
|
15034
15656
|
|
|
15035
|
-
__decorate$1([attr({
|
|
15036
|
-
attribute: "checked",
|
|
15037
|
-
mode: "boolean"
|
|
15038
|
-
})], Radio.prototype, "checkedAttribute", void 0);
|
|
15039
|
-
|
|
15040
15657
|
__decorate$1([observable], Radio.prototype, "defaultSlottedNodes", void 0);
|
|
15041
15658
|
|
|
15042
|
-
__decorate$1([observable], Radio.prototype, "defaultChecked", void 0);
|
|
15043
|
-
|
|
15044
|
-
__decorate$1([observable], Radio.prototype, "checked", void 0);
|
|
15045
|
-
|
|
15046
15659
|
/**
|
|
15047
15660
|
* A HorizontalScroll Custom HTML Element
|
|
15048
15661
|
* @public
|
|
@@ -15500,17 +16113,6 @@ class Select$1 extends FormAssociatedSelect {
|
|
|
15500
16113
|
*/
|
|
15501
16114
|
|
|
15502
16115
|
this.displayValue = "";
|
|
15503
|
-
/**
|
|
15504
|
-
* Reset the element to its first selectable option when its parent form is reset.
|
|
15505
|
-
*
|
|
15506
|
-
* @internal
|
|
15507
|
-
*/
|
|
15508
|
-
|
|
15509
|
-
this.formResetCallback = () => {
|
|
15510
|
-
this.setProxyOptions();
|
|
15511
|
-
this.setDefaultSelectedOption();
|
|
15512
|
-
this.value = this.firstSelectedOption.value;
|
|
15513
|
-
};
|
|
15514
16116
|
}
|
|
15515
16117
|
|
|
15516
16118
|
openChanged() {
|
|
@@ -15628,6 +16230,18 @@ class Select$1 extends FormAssociatedSelect {
|
|
|
15628
16230
|
|
|
15629
16231
|
this.ariaDisabled = this.disabled ? "true" : "false";
|
|
15630
16232
|
}
|
|
16233
|
+
/**
|
|
16234
|
+
* Reset the element to its first selectable option when its parent form is reset.
|
|
16235
|
+
*
|
|
16236
|
+
* @internal
|
|
16237
|
+
*/
|
|
16238
|
+
|
|
16239
|
+
|
|
16240
|
+
formResetCallback() {
|
|
16241
|
+
this.setProxyOptions();
|
|
16242
|
+
this.setDefaultSelectedOption();
|
|
16243
|
+
this.value = this.firstSelectedOption.value;
|
|
16244
|
+
}
|
|
15631
16245
|
/**
|
|
15632
16246
|
* Handle opening and closing the listbox when the select is clicked.
|
|
15633
16247
|
*
|
|
@@ -16560,7 +17174,7 @@ class _Switch extends FoundationElement {}
|
|
|
16560
17174
|
*/
|
|
16561
17175
|
|
|
16562
17176
|
|
|
16563
|
-
class FormAssociatedSwitch extends
|
|
17177
|
+
class FormAssociatedSwitch extends CheckableFormAssociated(_Switch) {
|
|
16564
17178
|
constructor() {
|
|
16565
17179
|
super(...arguments);
|
|
16566
17180
|
this.proxy = document.createElement("input");
|
|
@@ -16586,28 +17200,13 @@ class Switch extends FormAssociatedSwitch {
|
|
|
16586
17200
|
*/
|
|
16587
17201
|
|
|
16588
17202
|
this.initialValue = "on";
|
|
16589
|
-
/**
|
|
16590
|
-
* Tracks whether the "checked" property has been changed.
|
|
16591
|
-
* This is necessary to provide consistent behavior with
|
|
16592
|
-
* normal input checkboxes
|
|
16593
|
-
*/
|
|
16594
|
-
|
|
16595
|
-
this.dirtyChecked = false;
|
|
16596
|
-
/**
|
|
16597
|
-
* @internal
|
|
16598
|
-
*/
|
|
16599
|
-
|
|
16600
|
-
this.formResetCallback = () => {
|
|
16601
|
-
this.checked = this.checkedAttribute;
|
|
16602
|
-
this.dirtyChecked = false;
|
|
16603
|
-
};
|
|
16604
17203
|
/**
|
|
16605
17204
|
* @internal
|
|
16606
17205
|
*/
|
|
16607
17206
|
|
|
16608
|
-
|
|
16609
17207
|
this.keypressHandler = e => {
|
|
16610
17208
|
switch (e.key) {
|
|
17209
|
+
case keyEnter:
|
|
16611
17210
|
case keySpace:
|
|
16612
17211
|
this.checked = !this.checked;
|
|
16613
17212
|
break;
|
|
@@ -16624,8 +17223,7 @@ class Switch extends FormAssociatedSwitch {
|
|
|
16624
17223
|
}
|
|
16625
17224
|
};
|
|
16626
17225
|
|
|
16627
|
-
this.
|
|
16628
|
-
this.checked = this.defaultChecked;
|
|
17226
|
+
this.proxy.setAttribute("type", "checkbox");
|
|
16629
17227
|
}
|
|
16630
17228
|
|
|
16631
17229
|
readOnlyChanged() {
|
|
@@ -16635,50 +17233,18 @@ class Switch extends FormAssociatedSwitch {
|
|
|
16635
17233
|
|
|
16636
17234
|
this.readOnly ? this.classList.add("readonly") : this.classList.remove("readonly");
|
|
16637
17235
|
}
|
|
16638
|
-
|
|
16639
|
-
checkedAttributeChanged() {
|
|
16640
|
-
this.defaultChecked = this.checkedAttribute;
|
|
16641
|
-
}
|
|
16642
|
-
|
|
16643
|
-
defaultCheckedChanged() {
|
|
16644
|
-
if (!this.dirtyChecked) {
|
|
16645
|
-
// Setting this.checked will cause us to enter a dirty state,
|
|
16646
|
-
// but if we are clean when defaultChecked is changed, we want to stay
|
|
16647
|
-
// in a clean state, so reset this.dirtyChecked
|
|
16648
|
-
this.checked = this.defaultChecked;
|
|
16649
|
-
this.dirtyChecked = false;
|
|
16650
|
-
}
|
|
16651
|
-
}
|
|
16652
|
-
|
|
16653
|
-
checkedChanged() {
|
|
16654
|
-
if (!this.dirtyChecked) {
|
|
16655
|
-
this.dirtyChecked = true;
|
|
16656
|
-
}
|
|
16657
|
-
|
|
16658
|
-
this.updateForm();
|
|
16659
|
-
|
|
16660
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
16661
|
-
this.proxy.checked = this.checked;
|
|
16662
|
-
}
|
|
16663
|
-
|
|
16664
|
-
this.$emit("change");
|
|
16665
|
-
this.checked ? this.classList.add("checked") : this.classList.remove("checked");
|
|
16666
|
-
this.validate();
|
|
16667
|
-
}
|
|
16668
17236
|
/**
|
|
16669
17237
|
* @internal
|
|
16670
17238
|
*/
|
|
16671
17239
|
|
|
16672
17240
|
|
|
16673
|
-
|
|
16674
|
-
super.
|
|
16675
|
-
|
|
16676
|
-
|
|
16677
|
-
|
|
17241
|
+
checkedChanged(prev, next) {
|
|
17242
|
+
super.checkedChanged(prev, next);
|
|
17243
|
+
/**
|
|
17244
|
+
* @deprecated - this behavior already exists in the template and should not exist in the class.
|
|
17245
|
+
*/
|
|
16678
17246
|
|
|
16679
|
-
|
|
16680
|
-
const value = this.checked ? this.value : null;
|
|
16681
|
-
this.setFormValue(value, value);
|
|
17247
|
+
this.checked ? this.classList.add("checked") : this.classList.remove("checked");
|
|
16682
17248
|
}
|
|
16683
17249
|
|
|
16684
17250
|
}
|
|
@@ -16688,17 +17254,8 @@ __decorate$1([attr({
|
|
|
16688
17254
|
mode: "boolean"
|
|
16689
17255
|
})], Switch.prototype, "readOnly", void 0);
|
|
16690
17256
|
|
|
16691
|
-
__decorate$1([attr({
|
|
16692
|
-
attribute: "checked",
|
|
16693
|
-
mode: "boolean"
|
|
16694
|
-
})], Switch.prototype, "checkedAttribute", void 0);
|
|
16695
|
-
|
|
16696
17257
|
__decorate$1([observable], Switch.prototype, "defaultSlottedNodes", void 0);
|
|
16697
17258
|
|
|
16698
|
-
__decorate$1([observable], Switch.prototype, "defaultChecked", void 0);
|
|
16699
|
-
|
|
16700
|
-
__decorate$1([observable], Switch.prototype, "checked", void 0);
|
|
16701
|
-
|
|
16702
17259
|
/**
|
|
16703
17260
|
* The template for the {@link @microsoft/fast-foundation#TabPanel} component.
|
|
16704
17261
|
* @public
|
|
@@ -21256,42 +21813,42 @@ const elevationShadowDialog = DesignToken.create('elevation-shadow-dialog').with
|
|
|
21256
21813
|
|
|
21257
21814
|
const baseButtonStyles = (context, definition, interactivitySelector = '', nonInteractivitySelector = '') => css`
|
|
21258
21815
|
${display('inline-flex')} :host{position:relative;box-sizing:border-box;font-family:${bodyFont};outline:none;font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight};height:calc(${heightNumber} * 1px);min-width:calc(${heightNumber} * 1px);color:${neutralForegroundRest};border-radius:calc(${controlCornerRadius} * 1px);fill:currentcolor;cursor:pointer}:host .control{background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlRest};border:calc(${strokeWidth} * 1px) solid transparent;flex-grow:1;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;padding:0 calc((10 + (${designUnit} * 2 * ${density})) * 1px);white-space:nowrap;outline:none;text-decoration:none;color:inherit;border-radius:inherit;fill:inherit;cursor:inherit;font-family:inherit}.control,.end,.start{font:inherit}.control.icon-only{padding:0;line-height:0}:host .control${interactivitySelector}:hover{background:padding-box linear-gradient(${neutralFillHover},${neutralFillHover}),border-box ${neutralStrokeControlHover}}:host .control${interactivitySelector}:active{background:padding-box linear-gradient(${neutralFillActive},${neutralFillActive}),border-box ${neutralStrokeControlActive}}:host .control:${focusVisible}{border-color:${focusStrokeOuter} !important;box-shadow:0 0 0 calc((${focusStrokeWidth} - ${strokeWidth}) * 1px) ${focusStrokeOuter} inset !important}:host .control${nonInteractivitySelector}{background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeRest}}.control::-moz-focus-inner{border:0}.content{pointer-events:none}.start,.end{display:flex;pointer-events:none}.start{margin-inline-end:11px}.end{margin-inline-start:11px}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
21259
|
-
:host
|
|
21816
|
+
:host .control{background:${SystemColors.ButtonFace};border-color:${SystemColors.ButtonText};color:${SystemColors.ButtonText};fill:currentcolor}:host(:not([disabled])) .control:hover,:host .control${interactivitySelector}:hover,.control${interactivitySelector}:hover{forced-color-adjust:none;background:${SystemColors.Highlight};color:${SystemColors.HighlightText}}.control:${focusVisible},:host .control:${focusVisible},:host(:${focusVisible}) .control{forced-color-adjust:none;background:${SystemColors.ButtonFace};border-color:${SystemColors.Highlight} !important;box-shadow:0 0 0 calc((${focusStrokeWidth} - ${strokeWidth}) * 1px) ${SystemColors.Highlight} !important}:host([href]) .control{background:${SystemColors.ButtonFace};border-color:${SystemColors.LinkText};color:${SystemColors.LinkText};fill:currentcolor}:host([href]) .control:hover,:host(.neutral[href]) .control:hover{background:${SystemColors.LinkText};border-color:${SystemColors.LinkText} !important;color:${SystemColors.HighlightText};fill:currentcolor}:host([href]) .control:${focusVisible}{forced-color-adjust:none;border-color:${SystemColors.LinkText} !important;box-shadow:0 0 0 calc((${focusStrokeWidth} - ${strokeWidth}) * 1px) ${SystemColors.LinkText} !important}`));
|
|
21260
21817
|
/**
|
|
21261
21818
|
* @internal
|
|
21262
21819
|
*/
|
|
21263
21820
|
|
|
21264
21821
|
const AccentButtonStyles = (context, definition, interactivitySelector = '', nonInteractivitySelector = '') => css`
|
|
21265
21822
|
:host .control{background:padding-box linear-gradient(${accentFillRest},${accentFillRest}),border-box ${accentStrokeControlRest};color:${foregroundOnAccentRest}}:host .control${interactivitySelector}:hover{background:padding-box linear-gradient(${accentFillHover},${accentFillHover}),border-box ${accentStrokeControlHover};color:${foregroundOnAccentHover}}:host .control${interactivitySelector}:active{background:padding-box linear-gradient(${accentFillActive},${accentFillActive}),border-box ${accentStrokeControlActive};color:${foregroundOnAccentActive}}:host .control:${focusVisible}{box-shadow:0 0 0 calc((${focusStrokeWidth} - ${strokeWidth}) * 1px) ${focusStrokeOuter} inset,0 0 0 calc(((${focusStrokeWidth} + ${strokeWidth}) - ${strokeWidth}) * 1px) ${focusStrokeInner} inset !important}:host .control${nonInteractivitySelector}{background:${accentFillRest}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
21266
|
-
:host .control{forced-color-adjust:none;background:${SystemColors.Highlight};color:${SystemColors.HighlightText}}:host .control${interactivitySelector}:hover,:host .control${interactivitySelector}:active{background:${SystemColors.HighlightText};border-color:${SystemColors.Highlight};color:${SystemColors.Highlight}}:host .control:${focusVisible}{
|
|
21823
|
+
:host .control{forced-color-adjust:none;background:${SystemColors.Highlight};color:${SystemColors.HighlightText}}:host .control${interactivitySelector}:hover,:host .control${interactivitySelector}:active{background:${SystemColors.HighlightText};border-color:${SystemColors.Highlight};color:${SystemColors.Highlight}}:host .control:${focusVisible}{background:${SystemColors.Highlight};box-shadow:0 0 0 calc((${focusStrokeWidth} - ${strokeWidth}) * 1px) ${SystemColors.Highlight} inset,0 0 0 calc(((${focusStrokeWidth} + ${strokeWidth}) - ${strokeWidth}) * 1px) ${SystemColors.HighlightText} inset !important}:host([href]) .control{background:${SystemColors.LinkText};color:${SystemColors.HighlightText}}:host([href]) .control:hover{background:${SystemColors.ButtonFace};border-color:${SystemColors.LinkText};box-shadow:none;color:${SystemColors.LinkText};fill:currentcolor}:host([href]) .control:${focusVisible}{background:${SystemColors.LinkText};box-shadow:0 0 0 calc((${focusStrokeWidth} - ${strokeWidth}) * 1px) ${SystemColors.LinkText} inset,0 0 0 calc(((${focusStrokeWidth} + ${strokeWidth}) - ${strokeWidth}) * 1px) ${SystemColors.HighlightText} inset !important;color:${SystemColors.HighlightText};fill:currentcolor}`));
|
|
21267
21824
|
/**
|
|
21268
21825
|
* @internal
|
|
21269
21826
|
*/
|
|
21270
21827
|
|
|
21271
21828
|
const HypertextStyles = (context, definition, interactivitySelector = '', nonInteractivitySelector = '') => css`
|
|
21272
|
-
:host{height:auto;font-family:inherit;font-size:inherit;line-height:inherit;min-width:0}:host .control{display:inline;padding:0;background:transparent;border:none;box-shadow:none;line-height:1;text-decoration:underline 1px}:host .control:not([href]){background
|
|
21273
|
-
|
|
21829
|
+
:host{height:auto;font-family:inherit;font-size:inherit;line-height:inherit;min-width:0}:host .control{display:inline;padding:0;background:transparent;border:none;box-shadow:none;line-height:1;text-decoration:underline 1px}:host .control:not([href]){background:transparent}:host .control${interactivitySelector}{background:transparent;color:${accentForegroundRest}}:host .control${interactivitySelector}:hover{background:transparent;color:${accentForegroundHover};text-decoration:none}:host .control${interactivitySelector}:active{background:transparent;color:${accentForegroundActive};text-decoration:none}:host .control:${focusVisible}{box-shadow:0 0 0 calc(${focusStrokeWidth} * 1px) ${focusStrokeOuter} !important}:host .control${nonInteractivitySelector}{background:transparent}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
21830
|
+
:host .control${interactivitySelector}:hover{color:${SystemColors.Highlight};fill:currentcolor}:host .control:${focusVisible}{color:${SystemColors.LinkText}}`));
|
|
21274
21831
|
/**
|
|
21275
21832
|
* @internal
|
|
21276
21833
|
*/
|
|
21277
21834
|
|
|
21278
21835
|
const LightweightButtonStyles = (context, definition, interactivitySelector = '', nonInteractivitySelector = '') => css`
|
|
21279
21836
|
:host{color:${accentForegroundRest}}:host .control{background:${neutralFillStealthRest}}:host .control${interactivitySelector}:hover{background:${neutralFillStealthHover};color:${accentForegroundHover}}:host .control${interactivitySelector}:active{background:${neutralFillStealthActive};color:${accentForegroundActive}}:host .control${nonInteractivitySelector}{background:${neutralFillStealthRest}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
21280
|
-
:host{color:${SystemColors.ButtonText}}:host .control${interactivitySelector}:hover,:host .control${interactivitySelector}:active,:host .control:${focusVisible}{
|
|
21837
|
+
:host .control{border-color:${SystemColors.ButtonFace};color:${SystemColors.ButtonText}}:host .control${interactivitySelector}:hover,:host .control${interactivitySelector}:active,:host .control:${focusVisible}{border-color:${SystemColors.Highlight};background:${SystemColors.Highlight};box-shadow:none;color:${SystemColors.HighlightText}}:host([href]) .control{border-color:${SystemColors.ButtonFace};color:${SystemColors.LinkText}}:host([href]) .control:hover,:host([href]) .control:${focusVisible}{background:${SystemColors.ButtonFace};box-shadow:none;color:${SystemColors.LinkText}}`));
|
|
21281
21838
|
/**
|
|
21282
21839
|
* @internal
|
|
21283
21840
|
*/
|
|
21284
21841
|
|
|
21285
21842
|
const OutlineButtonStyles = (context, definition, interactivitySelector = '', nonInteractivitySelector = '') => css`
|
|
21286
21843
|
:host .control{background:transparent !important;border-color:${neutralStrokeRest}}:host .control${interactivitySelector}:hover{border-color:${neutralStrokeHover}}:host .control${interactivitySelector}:active{border-color:${neutralStrokeActive}}:host .control${nonInteractivitySelector}{background:transparent !important;border-color:${neutralStrokeRest}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
21287
|
-
:host{border-color:${SystemColors.ButtonText}}:host([href]){border-color:${SystemColors.LinkText}}`));
|
|
21844
|
+
:host .control${nonInteractivitySelector}{border-color:${SystemColors.ButtonText}}:host .control${interactivitySelector}:hover{border-color:${SystemColors.Highlight};color:${SystemColors.ButtonText}}:host([href]){border-color:${SystemColors.LinkText}}:host([href]) .control:hover{box-shadow:0 0 0 calc((${focusStrokeWidth} - ${strokeWidth}) * 1px) ${SystemColors.LinkText};color:${SystemColors.LinkText}}`));
|
|
21288
21845
|
/**
|
|
21289
21846
|
* @internal
|
|
21290
21847
|
*/
|
|
21291
21848
|
|
|
21292
21849
|
const StealthButtonStyles = (context, definition, interactivitySelector = '', nonInteractivitySelector = '') => css`
|
|
21293
21850
|
:host .control{background:${neutralFillStealthRest}}:host .control${interactivitySelector}:hover{background:${neutralFillStealthHover}}:host .control${interactivitySelector}:active{background:${neutralFillStealthActive}}:host .control${nonInteractivitySelector}{background:${neutralFillStealthRest}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
21294
|
-
:host
|
|
21851
|
+
:host .control{background:${SystemColors.ButtonFace};border-color:${SystemColors.ButtonFace};color:${SystemColors.ButtonText};fill:currentcolor}:host .control${interactivitySelector}:hover,:host .control${interactivitySelector}:active,:host .control:${focusVisible}{background:${SystemColors.Highlight};border-color:${SystemColors.Highlight};box-shadow:none !important;color:${SystemColors.HighlightText};fill:currentcolor}:host([href]) .control{border-color:${SystemColors.ButtonFace};color:${SystemColors.LinkText}}:host([href]) .control:hover,:host([href]) .control:${focusVisible}{background:${SystemColors.LinkText};border-color:${SystemColors.LinkText};box-shadow:none !important;color:${SystemColors.HighlightText};fill:currentcolor}`));
|
|
21295
21852
|
|
|
21296
21853
|
const placeholderRest = DesignToken.create('input-placeholder-rest').withDefault(target => {
|
|
21297
21854
|
const baseRecipe = neutralFillInputRecipe.getValueFor(target);
|
|
@@ -21324,7 +21881,7 @@ const inputStyles = (context, definition, rootSelector) => css`
|
|
|
21324
21881
|
*/
|
|
21325
21882
|
|
|
21326
21883
|
const inputStateStyles = (context, definition, rootSelector) => css`
|
|
21327
|
-
:host(:not([disabled]):active)::after{left:50%;width:40%;transform:translateX(-50%);border-bottom-left-radius:0;border-bottom-right-radius:0}:host(:not([disabled]):focus-within)::after{left:0;width:100%;transform:none}:host(:not([disabled]):active)::after,:host(:not([disabled]):focus-within:not(:active))::after{content:'';position:absolute;height:
|
|
21884
|
+
:host(:not([disabled]):active)::after{left:50%;width:40%;transform:translateX(-50%);border-bottom-left-radius:0;border-bottom-right-radius:0}:host(:not([disabled]):focus-within)::after{left:0;width:100%;transform:none}:host(:not([disabled]):active)::after,:host(:not([disabled]):focus-within:not(:active))::after{content:'';position:absolute;height:calc(${focusStrokeWidth} * 1px);bottom:0;border-bottom:calc(${focusStrokeWidth} * 1px) solid ${accentFillRest};border-bottom-left-radius:calc(${controlCornerRadius} * 1px);border-bottom-right-radius:calc(${controlCornerRadius} * 1px);z-index:2;transition:all 300ms cubic-bezier(0.1,0.9,0.2,1)}`;
|
|
21328
21885
|
/**
|
|
21329
21886
|
* @internal
|
|
21330
21887
|
*/
|
|
@@ -21336,17 +21893,13 @@ const inputFilledStyles = (context, definition, rootSelector) => css`
|
|
|
21336
21893
|
*/
|
|
21337
21894
|
|
|
21338
21895
|
const inputForcedColorStyles = (context, definition, rootSelector) => css`
|
|
21339
|
-
${rootSelector}{
|
|
21896
|
+
:host ${rootSelector}{background:${SystemColors.Field};border-color:${SystemColors.FieldText}}:host(:hover:not([disabled]):not(:focus-within)) ${rootSelector}{border-color:${SystemColors.Highlight}}:host(:not([disabled]):active)::after,:host(:not([disabled]):focus-within:not(:active))::after{border-bottom-color:${SystemColors.Highlight}}:host([disabled]){opacity:1}:host([disabled]) ${rootSelector}{border-color:${SystemColors.GrayText}}:host([disabled]) ::placeholder,:host([disabled]) ::-webkit-input-placeholder,:host([disabled]) .label{color:${SystemColors.GrayText};fill:currentcolor}`;
|
|
21340
21897
|
/**
|
|
21341
21898
|
* @internal
|
|
21342
21899
|
*/
|
|
21343
21900
|
|
|
21344
21901
|
const inputFilledForcedColorStyles = (context, definition, rootSelector) => css`
|
|
21345
|
-
:host
|
|
21346
|
-
${rootSelector},:host(:hover:not([disabled]))
|
|
21347
|
-
${rootSelector},:host(:active:not([disabled]))
|
|
21348
|
-
${rootSelector},:host(:focus-within:not([disabled]))
|
|
21349
|
-
${rootSelector}{background:${SystemColors.Field};border-color:${SystemColors.FieldText}}:host(:not([disabled]):active)::after,:host(:not([disabled]):focus-within:not(:active))::after{border-bottom-color:${SystemColors.Highlight}}:host([disabled]) ${rootSelector}{border-color:${SystemColors.GrayText};background:${SystemColors.Field}}`;
|
|
21902
|
+
:host ${rootSelector},:host(:hover:not([disabled])) ${rootSelector},:host(:active:not([disabled])) ${rootSelector},:host(:focus-within:not([disabled])) ${rootSelector}{background:${SystemColors.Field};border-color:${SystemColors.FieldText}}:host(:not([disabled]):active)::after,:host(:not([disabled]):focus-within:not(:active))::after{border-bottom-color:${SystemColors.Highlight}}:host([disabled]) ${rootSelector}{border-color:${SystemColors.GrayText}}`;
|
|
21350
21903
|
|
|
21351
21904
|
/**
|
|
21352
21905
|
* Behavior that will conditionally apply a stylesheet based on the elements
|
|
@@ -21545,7 +22098,7 @@ const breadcrumbStyles = breadcrumbStyles$1;
|
|
|
21545
22098
|
|
|
21546
22099
|
const breadcrumbItemStyles$1 = (context, definition) => css`
|
|
21547
22100
|
${display('inline-flex')} :host{background:transparent;color:${neutralForegroundRest};fill:currentcolor;box-sizing:border-box;font-family:${bodyFont};font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight};min-width:calc(${heightNumber} * 1px);border-radius:calc(${controlCornerRadius} * 1px);outline:none}.listitem{display:flex;align-items:center;border-radius:inherit}.control{position:relative;align-items:center;box-sizing:border-box;color:inherit;fill:inherit;cursor:pointer;display:flex;outline:none;text-decoration:none;white-space:nowrap;border-radius:inherit}.control:hover{color:${neutralForegroundHover}}.control:active{color:${neutralForegroundActive}}.control:${focusVisible}::after{content:'';position:absolute;inset:calc(${strokeWidth} * -1px);box-shadow:0 0 0 calc(${focusStrokeWidth} * 1px) ${focusStrokeOuter} inset;border-radius:inherit}:host(:not([href])),:host([aria-current]) .control{color:${neutralForegroundRest};fill:currentcolor;cursor:default}.start{display:flex;margin-inline-end:6px}.end{display:flex;margin-inline-start:6px}.separator{display:flex}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
21548
|
-
:host(:not([href])),.start,.end,.separator{color:${SystemColors.ButtonText};fill:currentcolor}.separator{fill:${SystemColors.ButtonText}}`));
|
|
22101
|
+
:host(:not([href])),.start,.end,.separator{background:${SystemColors.ButtonFace};color:${SystemColors.ButtonText};fill:currentcolor}.separator{fill:${SystemColors.ButtonText}}:host([href]){forced-color-adjust:none;background:${SystemColors.ButtonFace};color:${SystemColors.LinkText}}:host([href]) .control:hover{background:${SystemColors.LinkText};color:${SystemColors.HighlightText};fill:currentcolor}:host([href]) .control:${focusVisible}::after{box-shadow:0 0 0 calc(${focusStrokeWidth} * 1px) ${SystemColors.LinkText} inset}`));
|
|
21549
22102
|
|
|
21550
22103
|
/**
|
|
21551
22104
|
* The Fluent BreadcrumbItem Element. Implements {@link @microsoft/fast-foundation#BreadcrumbItem},
|
|
@@ -21582,7 +22135,17 @@ const nonInteractivitySelector = '[disabled]';
|
|
|
21582
22135
|
const buttonStyles$1 = (context, definition) => css`
|
|
21583
22136
|
:host([disabled]){opacity:${disabledOpacity};cursor:${disabledCursor}}${baseButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)}
|
|
21584
22137
|
`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
21585
|
-
:host([disabled]){opacity:1}
|
|
22138
|
+
:host([disabled]){opacity:1}:host([disabled]) .control{border-color:${SystemColors.GrayText};color:${SystemColors.GrayText};fill:currentcolor}`), appearanceBehavior('accent', css`
|
|
22139
|
+
${AccentButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)},`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
22140
|
+
:host([disabled]) .control{background:${SystemColors.ButtonFace}}`))), appearanceBehavior('lightweight', css`
|
|
22141
|
+
${LightweightButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)},`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
22142
|
+
:host([disabled]) .control{border-color:${SystemColors.ButtonFace}}`))), appearanceBehavior('outline', css`
|
|
22143
|
+
${OutlineButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)}
|
|
22144
|
+
`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
22145
|
+
:host([disabled]) .control{border-color:${SystemColors.GrayText}}`))), appearanceBehavior('stealth', css`
|
|
22146
|
+
${StealthButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)}
|
|
22147
|
+
`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
22148
|
+
:host([disabled]) .control{border-color:${SystemColors.ButtonFace}}`))));
|
|
21586
22149
|
|
|
21587
22150
|
/**
|
|
21588
22151
|
* The Fluent button class
|
|
@@ -21657,9 +22220,64 @@ const fluentButton = Button.compose({
|
|
|
21657
22220
|
|
|
21658
22221
|
const buttonStyles = buttonStyles$1;
|
|
21659
22222
|
|
|
22223
|
+
/**
|
|
22224
|
+
* LTR styles for calendar
|
|
22225
|
+
* @internal
|
|
22226
|
+
*/
|
|
22227
|
+
|
|
22228
|
+
const ltrStyles = css`
|
|
22229
|
+
.day.disabled::before{transform:translate(-50%,0) rotate(45deg)}`;
|
|
22230
|
+
/**
|
|
22231
|
+
* RTL styles for calendar
|
|
22232
|
+
* @internal
|
|
22233
|
+
*/
|
|
22234
|
+
|
|
22235
|
+
const rtlStyles = css`
|
|
22236
|
+
.day.disabled::before{transform:translate(50%,0) rotate(-45deg)}`;
|
|
22237
|
+
/**
|
|
22238
|
+
* Styles for calendar
|
|
22239
|
+
* @public
|
|
22240
|
+
*/
|
|
22241
|
+
|
|
22242
|
+
const calendarStyles = (context, definition) => css`
|
|
22243
|
+
${display("inline-block")} :host{--calendar-cell-size:calc((${baseHeightMultiplier} + 2 + ${density}) * ${designUnit} * 1px);--calendar-gap:2px;font-family:${bodyFont};font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight};color:${neutralForegroundRest}}.title{padding:calc(${designUnit} * 2px);font-weight:600}.days{text-align:center}.week-days,.week{display:grid;grid-template-columns:repeat(7,1fr);grid-gap:var(--calendar-gap);border:0;padding:0}.day,.week-day{border:0;width:var(--calendar-cell-size);height:var(--calendar-cell-size);line-height:var(--calendar-cell-size);padding:0;box-sizing:initial}.week-day{font-weight:600}.day{border:calc(${strokeWidth} * 1px) solid transparent;border-radius:calc(${controlCornerRadius} * 1px)}.interact .day{cursor:pointer}.date{height:100%}.inactive .date,.inactive.disabled::before{color:${neutralForegroundHint}}.disabled::before{content:'';display:inline-block;width:calc(var(--calendar-cell-size) * .8);height:calc(${strokeWidth} * 1px);background:currentColor;position:absolute;margin-top:calc(var(--calendar-cell-size) / 2);transform-origin:center;z-index:1}.selected{color:${accentFillRest};border:1px solid ${accentFillRest};background:${fillColor}}.selected + .selected{border-start-start-radius:0;border-end-start-radius:0;border-inline-start-width:0;padding-inline-start:calc(var(--calendar-gap) + (${strokeWidth} + ${controlCornerRadius}) * 1px);margin-inline-start:calc((${controlCornerRadius} * -1px) - var(--calendar-gap))}.today.disabled::before{color:${foregroundOnAccentRest}}.today .date{color:${foregroundOnAccentRest};background:${accentFillRest};border-radius:50%;position:relative}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
22244
|
+
.day.selected{color:${SystemColors.Highlight}}.today .date{background:${SystemColors.Highlight};color:${SystemColors.HighlightText}}`), new DirectionalStyleSheetBehavior(ltrStyles, rtlStyles));
|
|
22245
|
+
|
|
22246
|
+
/**
|
|
22247
|
+
* Updated Calendar class that is readonly by default
|
|
22248
|
+
*/
|
|
22249
|
+
|
|
22250
|
+
class Calendar extends Calendar$1 {
|
|
22251
|
+
constructor() {
|
|
22252
|
+
super(...arguments);
|
|
22253
|
+
this.readonly = true;
|
|
22254
|
+
}
|
|
22255
|
+
|
|
22256
|
+
}
|
|
22257
|
+
|
|
22258
|
+
__decorate([attr({
|
|
22259
|
+
converter: booleanConverter
|
|
22260
|
+
})], Calendar.prototype, "readonly", void 0);
|
|
22261
|
+
/**
|
|
22262
|
+
* The Fluent Calendar Element. Implements {@link @microsoft/fast-foundation#Calendar},
|
|
22263
|
+
* {@link @microsoft/fast-foundation#calendarTemplate}
|
|
22264
|
+
*
|
|
22265
|
+
* @public
|
|
22266
|
+
* @remarks
|
|
22267
|
+
* HTML Element \<fluent-calendar\>
|
|
22268
|
+
*/
|
|
22269
|
+
|
|
22270
|
+
|
|
22271
|
+
const fluentCalendar = Calendar.compose({
|
|
22272
|
+
baseName: 'calendar',
|
|
22273
|
+
template: calendarTemplate,
|
|
22274
|
+
styles: calendarStyles,
|
|
22275
|
+
title: CalendarTitleTemplate
|
|
22276
|
+
});
|
|
22277
|
+
|
|
21660
22278
|
const cardStyles$1 = (context, definition) => css`
|
|
21661
22279
|
${display('block')} :host{display:block;contain:content;height:var(--card-height,100%);width:var(--card-width,100%);box-sizing:border-box;background:${fillColor};color:${neutralForegroundRest};border:calc(${strokeWidth} * 1px) solid ${neutralStrokeLayerRest};border-radius:calc(${layerCornerRadius} * 1px);box-shadow:${elevationShadowCardRest}}:host{content-visibility:auto}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
21662
|
-
:host{
|
|
22280
|
+
:host{background:${SystemColors.Canvas};color:${SystemColors.CanvasText}}`));
|
|
21663
22281
|
|
|
21664
22282
|
/**
|
|
21665
22283
|
* @public
|
|
@@ -21743,7 +22361,7 @@ const fluentCard = Card.compose({
|
|
|
21743
22361
|
const cardStyles = cardStyles$1;
|
|
21744
22362
|
|
|
21745
22363
|
const checkboxStyles$1 = (context, definition) => css`
|
|
21746
|
-
${display('inline-flex')} :host{align-items:center;outline:none
|
|
22364
|
+
${display('inline-flex')} :host{align-items:center;outline:none;${
|
|
21747
22365
|
/*
|
|
21748
22366
|
* Chromium likes to select label text or the default slot when
|
|
21749
22367
|
* the checkbox is clicked. Maybe there is a better solution here?
|
|
@@ -21751,7 +22369,7 @@ const checkboxStyles$1 = (context, definition) => css`
|
|
|
21751
22369
|
''} user-select:none}.control{position:relative;width:calc((${heightNumber} / 2 + ${designUnit}) * 1px);height:calc((${heightNumber} / 2 + ${designUnit}) * 1px);box-sizing:border-box;border-radius:calc(${controlCornerRadius} * 1px);border:calc(${strokeWidth} * 1px) solid ${neutralStrokeStrongRest};background:${neutralFillInputAltRest};outline:none;cursor:pointer}.label__hidden{display:none;visibility:hidden}.label{font-family:${bodyFont};color:${neutralForegroundRest};${
|
|
21752
22370
|
/* Need to discuss with Brian how HorizontalSpacingNumber can work. https://github.com/microsoft/fast/issues/2766 */
|
|
21753
22371
|
''} padding-inline-start:calc(${designUnit} * 2px + 2px);margin-inline-end:calc(${designUnit} * 2px + 2px);cursor:pointer;font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight}}slot[name='checked-indicator'],slot[name='indeterminate-indicator']{display:flex;align-items:center;justify-content:center;width:100%;height:100%;fill:${neutralForegroundRest};opacity:0;pointer-events:none}slot[name='indeterminate-indicator']{position:absolute;top:0}:host(.checked) slot[name='checked-indicator'],:host(.checked) slot[name='indeterminate-indicator']{fill:${foregroundOnAccentRest}}:host(:not(.disabled):hover) .control{background:${neutralFillInputAltHover};border-color:${neutralStrokeStrongHover}}:host(:not(.disabled):active) .control{background:${neutralFillInputAltActive};border-color:${neutralStrokeStrongActive}}:host(:${focusVisible}) .control{box-shadow:0 0 0 1px ${fillColor},0 0 0 3px ${focusStrokeOuter};background:${neutralFillInputAltFocus};border-color:${focusStrokeOuter}}:host(.checked) .control{background:${accentFillRest};border-color:transparent}:host(.checked:not(.disabled):hover) .control{background:${accentFillHover};border-color:transparent}:host(.checked:not(.disabled):active) .control{background:${accentFillActive};border-color:transparent}:host(.disabled) .label,:host(.readonly) .label,:host(.readonly) .control,:host(.disabled) .control{cursor:${disabledCursor}}:host(.checked:not(.indeterminate)) slot[name='checked-indicator'],:host(.indeterminate) slot[name='indeterminate-indicator']{opacity:1}:host(.disabled){opacity:${disabledOpacity}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
21754
|
-
.control{
|
|
22372
|
+
.control{border-color:${SystemColors.FieldText};background:${SystemColors.Field}}:host(:not(.disabled):hover) .control,:host(:not(.disabled):active) .control{border-color:${SystemColors.Highlight};background:${SystemColors.Field}}slot[name='checked-indicator'],slot[name='indeterminate-indicator']{fill:${SystemColors.FieldText}}:host(:${focusVisible}) .control{forced-color-adjust:none;box-shadow:0 0 0 1px ${SystemColors.Field},0 0 0 3px ${SystemColors.FieldText};background:${SystemColors.Field};border-color:${SystemColors.Highlight}}:host(.checked) .control{background:${SystemColors.Highlight};border-color:${SystemColors.Highlight}}:host(.checked:not(.disabled):hover) .control,:host(.checked:not(.disabled):active) .control{background:${SystemColors.HighlightText};border-color:${SystemColors.Highlight}}:host(.checked:${focusVisible}) .control{box-shadow:0 0 0 1px ${SystemColors.Field},0 0 0 3px ${SystemColors.FieldText}}:host(.checked) slot[name='checked-indicator'],:host(.checked) slot[name='indeterminate-indicator']{fill:${SystemColors.HighlightText}}:host(.checked:hover ) .control slot[name='checked-indicator'],:host(.checked:hover ) .control slot[name='indeterminate-indicator']{fill:${SystemColors.Highlight}}:host(.disabled){opacity:1}:host(.disabled) .control{border-color:${SystemColors.GrayText};background:${SystemColors.Field}}:host(.disabled) slot[name='checked-indicator'],:host(.checked.disabled:hover) .control slot[name='checked-indicator'],:host(.disabled) slot[name='indeterminate-indicator'],:host(.checked.disabled:hover) .control slot[name='indeterminate-indicator']{fill:${SystemColors.GrayText}}`));
|
|
21755
22373
|
|
|
21756
22374
|
/**
|
|
21757
22375
|
* The Fluent Checkbox Element. Implements {@link @microsoft/fast-foundation#Checkbox},
|
|
@@ -21786,12 +22404,13 @@ const fluentCheckbox = Checkbox.compose({
|
|
|
21786
22404
|
const checkboxStyles = checkboxStyles$1;
|
|
21787
22405
|
|
|
21788
22406
|
const selectFilledStyles = (context, definition) => css`
|
|
21789
|
-
:host{background:${neutralFillSecondaryRest};border-color:transparent}:host(:not([disabled]):not([open]):hover){background:${neutralFillSecondaryHover};border-color:transparent}:host(:not([disabled]):not([open]):active){background:${neutralFillSecondaryActive};border-color:transparent}
|
|
22407
|
+
:host{background:${neutralFillSecondaryRest};border-color:transparent}:host(:not([disabled]):not([open]):hover){background:${neutralFillSecondaryHover};border-color:transparent}:host(:not([disabled]):not([open]):active){background:${neutralFillSecondaryActive};border-color:transparent}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
22408
|
+
:host(:not([disabled]):not([open]):hover){background:transparent}:host(:not([disabled]):not([open]):hover),:host(:not([disabled]):not([open]):active){border-color:${SystemColors.Highlight}}:host(:${focusVisible}){forced-color-adjust:none;background:transparent;border-color:${SystemColors.Highlight};box-shadow:0 0 0 1px inset ${SystemColors.Highlight}}`));
|
|
21790
22409
|
const selectStealthStyles = (context, definition) => css`
|
|
21791
22410
|
:host{background:${neutralFillStealthRest};border-color:transparent}:host(:not([disabled]):not([open]):hover){background:${neutralFillStealthHover};border-color:transparent}:host(:not([disabled]):not([open]):active){background:${neutralFillStealthActive};border-color:transparent}`;
|
|
21792
22411
|
const selectStyles$1 = (context, definition) => css`
|
|
21793
|
-
${display('inline-flex')} :host{background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlRest};border:calc(${strokeWidth} * 1px) solid transparent;border-radius:calc(${controlCornerRadius} * 1px);box-sizing:border-box;color:${neutralForegroundRest};fill:currentcolor;font-family:${bodyFont};height:calc(${heightNumber} * 1px);position:relative;user-select:none;min-width:250px;vertical-align:top}:host .listbox{box-shadow:${elevationShadowFlyout};background:${fillColor};border-radius:calc(${layerCornerRadius} * 1px);box-sizing:border-box;display:inline-flex;flex-direction:column;left:0;max-height:calc(var(--max-height) - (${heightNumber} * 1px));padding:calc(${designUnit} * 1px) 0;overflow-y:auto;position:absolute;width:100%;z-index:1;margin:1px 0}:host .listbox[hidden]{display:none}:host .control{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;font-size:${typeRampBaseFontSize};font-family:inherit;min-height:100%;line-height:${typeRampBaseLineHeight};padding:0 calc(${designUnit} * 2.25px);width:100%}:host(:not([disabled]):not([open]):hover){background:padding-box linear-gradient(${neutralFillHover},${neutralFillHover}),border-box ${neutralStrokeControlHover}}:host(:not([disabled]):not([open]):active){background:padding-box linear-gradient(${neutralFillActive},${neutralFillActive}),border-box ${neutralStrokeControlActive}}:host(:${focusVisible}){border-color:${focusStrokeOuter};outline:none;box-shadow:0 0 0 1px inset ${focusStrokeOuter}}:host([disabled]){cursor:${disabledCursor};opacity:${disabledOpacity}}:host([disabled]) .control{cursor:${disabledCursor};user-select:none}:host([open][position='above']) .listbox{bottom:calc((${heightNumber} + ${designUnit} * 2) * 1px)}:host([open][position='below']) .listbox{top:calc((${heightNumber} + ${designUnit} * 2) * 1px)}.selected-value{font-family:inherit;flex:1 1 auto;text-align:start}.indicator{flex:0 0 auto;margin-inline-start:1em}slot[name='listbox']{display:none;width:100%}:host([open]) slot[name='listbox']{display:flex;position:absolute}.start{margin-inline-end:11px}.end{margin-inline-start:11px}.start,.end,.indicator,::slotted(svg){display:flex}::slotted([role='option']){flex:0 0 auto}`.withBehaviors(appearanceBehavior('filled', selectFilledStyles()), appearanceBehavior('stealth', selectStealthStyles()), forcedColorsStylesheetBehavior(css`
|
|
21794
|
-
|
|
22412
|
+
${display('inline-flex')} :host{background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlRest};border:calc(${strokeWidth} * 1px) solid transparent;border-radius:calc(${controlCornerRadius} * 1px);box-sizing:border-box;color:${neutralForegroundRest};fill:currentcolor;font-family:${bodyFont};height:calc(${heightNumber} * 1px);position:relative;user-select:none;min-width:250px;vertical-align:top}:host .listbox{box-shadow:${elevationShadowFlyout};background:${fillColor};border-radius:calc(${layerCornerRadius} * 1px);box-sizing:border-box;display:inline-flex;flex-direction:column;left:0;max-height:calc(var(--max-height) - (${heightNumber} * 1px));padding:calc((${designUnit} - ${strokeWidth} ) * 1px) 0;overflow-y:auto;position:absolute;width:100%;z-index:1;margin:1px 0;border:calc(${strokeWidth} * 1px) solid transparent}:host .listbox[hidden]{display:none}:host .control{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;font-size:${typeRampBaseFontSize};font-family:inherit;min-height:100%;line-height:${typeRampBaseLineHeight};padding:0 calc(${designUnit} * 2.25px);width:100%}:host(:not([disabled]):not([open]):hover){background:padding-box linear-gradient(${neutralFillHover},${neutralFillHover}),border-box ${neutralStrokeControlHover}}:host(:not([disabled]):not([open]):active){background:padding-box linear-gradient(${neutralFillActive},${neutralFillActive}),border-box ${neutralStrokeControlActive}}:host(:${focusVisible}){border-color:${focusStrokeOuter};outline:none;box-shadow:0 0 0 1px inset ${focusStrokeOuter}}:host([disabled]){cursor:${disabledCursor};opacity:${disabledOpacity}}:host([disabled]) .control{cursor:${disabledCursor};user-select:none}:host([open][position='above']) .listbox{bottom:calc((${heightNumber} + ${designUnit} * 2) * 1px)}:host([open][position='below']) .listbox{top:calc((${heightNumber} + ${designUnit} * 2) * 1px)}.selected-value{font-family:inherit;flex:1 1 auto;text-align:start}.indicator{flex:0 0 auto;margin-inline-start:1em}slot[name='listbox']{display:none;width:100%}:host([open]) slot[name='listbox']{display:flex;position:absolute}.start{margin-inline-end:11px}.end{margin-inline-start:11px}.start,.end,.indicator,::slotted(svg){display:flex}::slotted([role='option']){flex:0 0 auto}`.withBehaviors(appearanceBehavior('filled', selectFilledStyles()), appearanceBehavior('stealth', selectStealthStyles()), forcedColorsStylesheetBehavior(css`
|
|
22413
|
+
:host{background:${SystemColors.ButtonFace};color:${SystemColors.ButtonText}}:host(:not([disabled]):not([open]):hover){background:transparent}:host(:not([disabled]):hover){border-color:${SystemColors.Highlight}}:host(:${focusVisible}){forced-color-adjust:none;border-color:${SystemColors.Highlight};box-shadow:0 0 0 1px inset ${SystemColors.Highlight}}:host([open]) .listbox{background:${SystemColors.ButtonFace};border-color:${SystemColors.CanvasText}}.start,.end,.indicator,::slotted(svg){fill:${SystemColors.FieldText}}:host([disabled]){border-color:${SystemColors.GrayText};color:${SystemColors.GrayText};opacity:1}:host([disabled]) .start,:host([disabled]) .end,:host([disabled]) .indicator,:host([disabled]) ::slotted(svg){fill:${SystemColors.GrayText}}`));
|
|
21795
22414
|
|
|
21796
22415
|
const comboboxStyles$1 = (context, definition) => css`
|
|
21797
22416
|
${selectStyles$1()}
|
|
@@ -22355,7 +22974,7 @@ const fluentDialog = Dialog.compose({
|
|
|
22355
22974
|
const dialogStyles = dialogStyles$1;
|
|
22356
22975
|
|
|
22357
22976
|
const dividerStyles$1 = (context, definition) => css`
|
|
22358
|
-
${display('block')} :host{box-sizing:content-box;height:0;
|
|
22977
|
+
${display('block')} :host{box-sizing:content-box;height:0;border:none;border-top:calc(${strokeWidth} * 1px) solid ${neutralStrokeDividerRest}}`;
|
|
22359
22978
|
|
|
22360
22979
|
/**
|
|
22361
22980
|
* The Fluent Divider Element. Implements {@link @microsoft/fast-foundation#Divider},
|
|
@@ -22380,8 +22999,8 @@ const fluentDivider = Divider.compose({
|
|
|
22380
22999
|
const dividerStyles = dividerStyles$1;
|
|
22381
23000
|
|
|
22382
23001
|
const flipperStyles$1 = (context, definition) => css`
|
|
22383
|
-
${display('inline-flex')} :host{height:calc((${heightNumber} + ${designUnit}) * 1px);justify-content:center;align-items:center;
|
|
22384
|
-
:host{background:${SystemColors.
|
|
23002
|
+
${display('inline-flex')} :host{height:calc((${heightNumber} + ${designUnit}) * 1px);justify-content:center;align-items:center;fill:currentcolor;color:${neutralFillStrongRest};background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlRest};box-sizing:border-box;border:calc(${focusStrokeWidth} * 1px) solid transparent;border-radius:calc(${controlCornerRadius} * 1px);outline:none;padding:0}:host(.disabled){opacity:${disabledOpacity};cursor:${disabledCursor}}.next,.previous{display:flex}:host(:not(.disabled):hover){cursor:pointer}:host(:not(.disabled):hover){color:${neutralFillStrongHover}}:host(:not(.disabled):active){color:${neutralFillStrongActive}}:host(:${focusVisible}){border-color:${focusStrokeOuter}}:host::-moz-focus-inner{border:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
23003
|
+
:host{background:${SystemColors.ButtonFace};border-color:${SystemColors.ButtonText}}:host .next,:host .previous{color:${SystemColors.ButtonText};fill:currentcolor}:host(:not(.disabled):hover){background:${SystemColors.Highlight}}:host(:not(.disabled):hover) .next,:host(:not(.disabled):hover) .previous{color:${SystemColors.HighlightText};fill:currentcolor}:host(.disabled){opacity:1}:host(.disabled),:host(.disabled) .next,:host(.disabled) .previous{border-color:${SystemColors.GrayText};color:${SystemColors.GrayText};fill:currentcolor}:host(:${focusVisible}){forced-color-adjust:none;border-color:${SystemColors.Highlight};box-shadow:0 0 0 2px ${SystemColors.ButtonFace},0 0 0 4px ${SystemColors.ButtonText}}`));
|
|
22385
23004
|
|
|
22386
23005
|
/**
|
|
22387
23006
|
* The Fluent Flipper Element. Implements {@link @microsoft/fast-foundation#Flipper},
|
|
@@ -22477,8 +23096,7 @@ const fluentHorizontalScroll = HorizontalScroll.compose({
|
|
|
22477
23096
|
const horizontalScrollStyles = horizontalScrollStyles$1;
|
|
22478
23097
|
|
|
22479
23098
|
const listboxStyles$1 = (context, definition) => css`
|
|
22480
|
-
${display('inline-flex')} :host{border:calc(${strokeWidth} * 1px) solid ${neutralStrokeRest};border-radius:calc(${controlCornerRadius} * 1px);box-sizing:border-box;flex-direction:column;padding:calc(${designUnit} * 1px) 0;outline:none}:host(:focus-within:not([disabled])){border-color:${focusStrokeOuter};box-shadow:0 0 0 1px ${focusStrokeOuter} inset}
|
|
22481
|
-
:host(:${focusVisible}) ::slotted([aria-selected="true"][role="option"]){background:${SystemColors.Highlight};border-color:${SystemColors.ButtonText};box-shadow:0 0 0 calc(${focusStrokeWidth} * 1px) inset ${SystemColors.HighlightText};color:${SystemColors.HighlightText};fill:currentcolor}:host(:${focusVisible}) ::slotted([aria-selected="true"][role="option"]){background:${SystemColors.Highlight};border-color:${SystemColors.ButtonText};box-shadow:0 0 0 calc(${focusStrokeWidth} * 1px) inset ${SystemColors.HighlightText};color:${SystemColors.HighlightText};fill:currentcolor}::slotted([role='option']:not([aria-selected='true']):not([disabled]):hover){forced-color-adjust:none;color:${SystemColors.ButtonText};background:${SystemColors.ButtonFace};border-color:${SystemColors.Highlight};box-shadow:none}`));
|
|
23099
|
+
${display('inline-flex')} :host{border:calc(${strokeWidth} * 1px) solid ${neutralStrokeRest};border-radius:calc(${controlCornerRadius} * 1px);box-sizing:border-box;flex-direction:column;padding:calc(${designUnit} * 1px) 0;outline:none}::slotted(${context.tagFor(ListboxOption)}){margin:0 calc(${designUnit} * 1px)}:host(:focus-within:not([disabled])){border-color:${focusStrokeOuter};box-shadow:0 0 0 1px ${focusStrokeOuter} inset}`;
|
|
22482
23100
|
|
|
22483
23101
|
/**
|
|
22484
23102
|
* The Fluent listbox Custom Element. Implements, {@link @microsoft/fast-foundation#Listbox}
|
|
@@ -22504,8 +23122,8 @@ const fluentListbox = Listbox.compose({
|
|
|
22504
23122
|
const listboxStyles = listboxStyles$1;
|
|
22505
23123
|
|
|
22506
23124
|
const optionStyles = (context, definition) => css`
|
|
22507
|
-
${display('inline-flex')} :host{position:relative;font-family:${bodyFont};background:${neutralFillStealthRest};border-radius:calc(${controlCornerRadius} * 1px);border:calc(${focusStrokeWidth} * 1px) solid transparent;box-sizing:border-box;color:${neutralForegroundRest};cursor:pointer;fill:currentcolor;font-size:${typeRampBaseFontSize};height:calc(${heightNumber} * 1px);line-height:${typeRampBaseLineHeight};
|
|
22508
|
-
:host{border-color
|
|
23125
|
+
${display('inline-flex')} :host{position:relative;font-family:${bodyFont};background:${neutralFillStealthRest};border-radius:calc(${controlCornerRadius} * 1px);border:calc(${focusStrokeWidth} * 1px) solid transparent;box-sizing:border-box;color:${neutralForegroundRest};cursor:pointer;fill:currentcolor;font-size:${typeRampBaseFontSize};height:calc(${heightNumber} * 1px);line-height:${typeRampBaseLineHeight};outline:none;overflow:hidden;align-items:center;padding:0 calc(${designUnit} * 2.25px);user-select:none;white-space:nowrap}:host::before{content:'';display:block;position:absolute;left:0;top:calc((${heightNumber} / 4) - ${focusStrokeWidth} * 1px);width:3px;height:calc((${heightNumber} / 2) * 1px);background:transparent;border-radius:calc(${controlCornerRadius} * 1px)}:host(:not([disabled]):hover){background:${neutralFillStealthHover}}:host(:not([disabled]):active){background:${neutralFillStealthActive}}:host(:not([disabled]):active)::before{background:${accentFillRest};height:calc(((${heightNumber} / 2) - 6) * 1px)}:host([aria-selected='true'])::before{background:${accentFillRest}}:host(:${focusVisible}){border-color:${focusStrokeOuter};background:${neutralFillStealthFocus}}:host([aria-selected='true']){background:${neutralFillSecondaryRest}}:host(:not([disabled])[aria-selected='true']:hover){background:${neutralFillSecondaryHover}}:host(:not([disabled])[aria-selected='true']:active){background:${neutralFillSecondaryActive}}:host(:not([disabled]):not([aria-selected='true']):hover){background:${neutralFillStealthHover}}:host(:not([disabled]):not([aria-selected='true']):active){background:${neutralFillStealthActive}}:host([disabled]){cursor:${disabledCursor};opacity:${disabledOpacity}}.content{grid-column-start:2;justify-self:start;overflow:hidden;text-overflow:ellipsis}.start,.end,::slotted(svg){display:flex}::slotted([slot='end']){margin-inline-start:1ch}::slotted([slot='start']){margin-inline-end:1ch}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
23126
|
+
:host{background:${SystemColors.ButtonFace};border-color:${SystemColors.ButtonFace};color:${SystemColors.ButtonText}}:host(:not([disabled]):not([aria-selected="true"]):hover),:host(:not([disabled])[aria-selected="true"]:hover),:host([aria-selected="true"]){forced-color-adjust:none;background:${SystemColors.Highlight};color:${SystemColors.HighlightText}}:host(:not([disabled]):active)::before,:host([aria-selected='true'])::before{background:${SystemColors.HighlightText}}:host([disabled]),:host([disabled]:not([aria-selected='true']):hover){background:${SystemColors.Canvas};color:${SystemColors.GrayText};fill:currentcolor;opacity:1}`));
|
|
22509
23127
|
|
|
22510
23128
|
/**
|
|
22511
23129
|
* The Fluent option Custom Element. Implements {@link @microsoft/fast-foundation#ListboxOption}
|
|
@@ -22531,7 +23149,8 @@ const fluentOption = ListboxOption.compose({
|
|
|
22531
23149
|
const OptionStyles = optionStyles;
|
|
22532
23150
|
|
|
22533
23151
|
const menuStyles$1 = (context, definition) => css`
|
|
22534
|
-
${display('block')} :host{background:${neutralLayerFloating};border:calc(${strokeWidth} * 1px) solid transparent;border-radius:calc(${layerCornerRadius} * 1px);box-shadow:${elevationShadowFlyout};
|
|
23152
|
+
${display('block')} :host{background:${neutralLayerFloating};border:calc(${strokeWidth} * 1px) solid transparent;border-radius:calc(${layerCornerRadius} * 1px);box-shadow:${elevationShadowFlyout};padding:calc(${designUnit} * 1px) 0;max-width:368px;min-width:64px}:host([slot='submenu']){width:max-content;margin:0 calc(${designUnit} * 2px)}::slotted(${context.tagFor(MenuItem)}){margin:0 calc(${designUnit} * 1px)}::slotted(${context.tagFor(Divider)}){margin:calc(${designUnit} * 1px) 0}::slotted(hr){box-sizing:content-box;height:0;margin:calc(${designUnit} * 1px) 0;border:none;border-top:calc(${strokeWidth} * 1px) solid ${neutralStrokeDividerRest}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
23153
|
+
:host([slot='submenu']){background:${SystemColors.Canvas};border-color:${SystemColors.CanvasText}}`));
|
|
22535
23154
|
|
|
22536
23155
|
/**
|
|
22537
23156
|
* The Fluent menu class
|
|
@@ -22572,8 +23191,8 @@ const fluentMenu = Menu.compose({
|
|
|
22572
23191
|
const menuStyles = menuStyles$1;
|
|
22573
23192
|
|
|
22574
23193
|
const menuItemStyles$1 = (context, definition) => css`
|
|
22575
|
-
${display('grid')} :host{contain:layout;overflow:visible;font-family:${bodyFont};outline:none;box-sizing:border-box;height:calc(${heightNumber} * 1px);grid-template-columns:minmax(32px,auto) 1fr minmax(32px,auto);grid-template-rows:auto;justify-items:center;align-items:center;padding:0;
|
|
22576
|
-
:host{forced-color-adjust:none;
|
|
23194
|
+
${display('grid')} :host{contain:layout;overflow:visible;font-family:${bodyFont};outline:none;box-sizing:border-box;height:calc(${heightNumber} * 1px);grid-template-columns:minmax(32px,auto) 1fr minmax(32px,auto);grid-template-rows:auto;justify-items:center;align-items:center;padding:0;white-space:nowrap;color:${neutralForegroundRest};fill:currentcolor;cursor:pointer;font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight};border-radius:calc(${controlCornerRadius} * 1px);border:calc(${strokeWidth} * 1px) solid transparent}:host(.indent-0){grid-template-columns:auto 1fr minmax(32px,auto)}:host(.indent-0) .content{grid-column:1;grid-row:1;margin-inline-start:10px}:host(.indent-0) .expand-collapse-glyph-container{grid-column:5;grid-row:1}:host(.indent-2){grid-template-columns:minmax(32px,auto) minmax(32px,auto) 1fr minmax(32px,auto) minmax(32px,auto)}:host(.indent-2) .content{grid-column:3;grid-row:1;margin-inline-start:10px}:host(.indent-2) .expand-collapse-glyph-container{grid-column:5;grid-row:1}:host(.indent-2) .start{grid-column:2}:host(.indent-2) .end{grid-column:4}:host(:${focusVisible}){border:calc(${strokeWidth} * 1px) solid ${focusStrokeOuter};box-shadow:0 0 0 calc((${focusStrokeWidth} - ${strokeWidth}) * 1px) ${focusStrokeOuter}}:host(:not([disabled]):hover){background:${neutralFillStealthHover}}:host(:not([disabled]):active),:host(.expanded){background:${neutralFillStealthActive};color:${neutralForegroundRest}}:host([disabled]){cursor:${disabledCursor};opacity:${disabledOpacity}}.content{grid-column-start:2;justify-self:start;overflow:hidden;text-overflow:ellipsis}.start,.end{display:flex;justify-content:center}:host(.indent-0[aria-haspopup='menu']){display:grid;grid-template-columns:minmax(32px,auto) auto 1fr minmax(32px,auto) minmax(32px,auto);align-items:center;min-height:32px}:host(.indent-1[aria-haspopup='menu']),:host(.indent-1[role='menuitemcheckbox']),:host(.indent-1[role='menuitemradio']){display:grid;grid-template-columns:minmax(32px,auto) auto 1fr minmax(32px,auto) minmax(32px,auto);align-items:center;min-height:32px}:host(.indent-2:not([aria-haspopup='menu'])) .end{grid-column:5}:host .input-container,:host .expand-collapse-glyph-container{display:none}:host([aria-haspopup='menu']) .expand-collapse-glyph-container,:host([role='menuitemcheckbox']) .input-container,:host([role='menuitemradio']) .input-container{display:grid}:host([aria-haspopup='menu']) .content,:host([role='menuitemcheckbox']) .content,:host([role='menuitemradio']) .content{grid-column-start:3}:host([aria-haspopup='menu'].indent-0) .content{grid-column-start:1}:host([aria-haspopup='menu']) .end,:host([role='menuitemcheckbox']) .end,:host([role='menuitemradio']) .end{grid-column-start:4}:host .expand-collapse,:host .checkbox,:host .radio{display:flex;align-items:center;justify-content:center;position:relative;box-sizing:border-box;outline:none}:host .checkbox-indicator,:host .radio-indicator,slot[name='checkbox-indicator'],slot[name='radio-indicator']{display:none}::slotted([slot='end']:not(svg)){margin-inline-end:10px;color:${neutralForegroundHint}}:host([aria-checked='true']) .checkbox-indicator,:host([aria-checked='true']) slot[name='checkbox-indicator'],:host([aria-checked='true']) .radio-indicator,:host([aria-checked='true']) slot[name='radio-indicator']{display:flex}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
23195
|
+
:host,::slotted([slot='end']:not(svg)){forced-color-adjust:none;color:${SystemColors.ButtonText};fill:currentcolor}:host(:not([disabled]):hover){background:${SystemColors.Highlight};color:${SystemColors.HighlightText};fill:currentcolor}:host(:hover) .start,:host(:hover) .end,:host(:hover)::slotted(svg),:host(:active) .start,:host(:active) .end,:host(:active)::slotted(svg),:host(:hover) ::slotted([slot='end']:not(svg)),:host(:${focusVisible}) ::slotted([slot='end']:not(svg)){color:${SystemColors.HighlightText};fill:currentcolor}:host(.expanded){background:${SystemColors.Highlight};border-color:${SystemColors.Highlight};color:${SystemColors.HighlightText}}:host(:${focusVisible}){background:${SystemColors.Highlight};border-color:${SystemColors.ButtonText};box-shadow:0 0 0 calc(${strokeWidth} * 1px) inset ${SystemColors.HighlightText};color:${SystemColors.HighlightText};fill:currentcolor}:host([disabled]),:host([disabled]:hover),:host([disabled]:hover) .start,:host([disabled]:hover) .end,:host([disabled]:hover)::slotted(svg),:host([disabled]:${focusVisible}){background:${SystemColors.ButtonFace};color:${SystemColors.GrayText};fill:currentcolor;opacity:1}:host([disabled]:${focusVisible}){border-color:${SystemColors.GrayText}}:host .expanded-toggle,:host .checkbox,:host .radio{border-color:${SystemColors.ButtonText};background:${SystemColors.HighlightText}}:host([checked]) .checkbox,:host([checked]) .radio{background:${SystemColors.HighlightText};border-color:${SystemColors.HighlightText}}:host(:hover) .expanded-toggle,:host(:hover) .checkbox,:host(:hover) .radio,:host(:${focusVisible}) .expanded-toggle,:host(:${focusVisible}) .checkbox,:host(:${focusVisible}) .radio,:host([checked]:hover) .checkbox,:host([checked]:hover) .radio,:host([checked]:${focusVisible}) .checkbox,:host([checked]:${focusVisible}) .radio{border-color:${SystemColors.HighlightText}}:host([aria-checked='true']){background:${SystemColors.Highlight};color:${SystemColors.HighlightText}}:host([aria-checked='true']) .checkbox-indicator,:host([aria-checked='true']) ::slotted([slot='checkbox-indicator']),:host([aria-checked='true']) ::slotted([slot='radio-indicator']){fill:${SystemColors.Highlight}}:host([aria-checked='true']) .radio-indicator{background:${SystemColors.Highlight}}`), new DirectionalStyleSheetBehavior(css`
|
|
22577
23196
|
.expand-collapse-glyph-container{transform:rotate(0deg)}`, css`
|
|
22578
23197
|
.expand-collapse-glyph-container{transform:rotate(180deg)}`));
|
|
22579
23198
|
|
|
@@ -22628,7 +23247,7 @@ const numberFieldStyles$1 = (context, definition) => css`
|
|
|
22628
23247
|
|
|
22629
23248
|
.root{display:flex;flex-direction:row}.control{-webkit-appearance:none;color:inherit;background:transparent;border:0;height:calc(100% - 4px);margin-top:auto;margin-bottom:auto;padding:0 calc(${designUnit} * 2px + 1px);font-family:inherit;font-size:inherit;line-height:inherit}.start,.end{margin:auto;fill:currentcolor}.start{display:flex;margin-inline-start:11px}.end{display:flex;margin-inline-end:11px}.controls{opacity:0;position:relative;top:-1px;z-index:3}:host(:hover:not([disabled])) .controls,:host(:focus-within:not([disabled])) .controls{opacity:1}.step-up,.step-down{display:flex;padding:0 8px;cursor:pointer}.step-up{padding-top:3px}`.withBehaviors(appearanceBehavior('filled', numberFieldFilledStyles(context, definition)), forcedColorsStylesheetBehavior(css`
|
|
22630
23249
|
${inputForcedColorStyles(context, definition, '.root')}
|
|
22631
|
-
|
|
23250
|
+
.step-up,.step-down{fill:${SystemColors.FieldText}}`));
|
|
22632
23251
|
|
|
22633
23252
|
/**
|
|
22634
23253
|
* The Fluent number field class
|
|
@@ -22690,8 +23309,8 @@ const fluentNumberField = NumberField.compose({
|
|
|
22690
23309
|
});
|
|
22691
23310
|
|
|
22692
23311
|
const progressStyles$1 = (context, definition) => css`
|
|
22693
|
-
${display('flex')} :host{align-items:center;outline:none;height:calc((${strokeWidth} * 3) * 1px)
|
|
22694
|
-
.indeterminate-indicator-1,.indeterminate-indicator-2,.determinate
|
|
23312
|
+
${display('flex')} :host{align-items:center;outline:none;height:calc((${strokeWidth} * 3) * 1px)}.progress{background-color:${neutralStrokeStrongRest};border-radius:calc(${designUnit} * 1px);width:100%;height:calc(${strokeWidth} * 1px);display:flex;align-items:center;position:relative}.determinate{background-color:${accentFillRest};border-radius:calc(${designUnit} * 1px);height:calc((${strokeWidth} * 3) * 1px);transition:all 0.2s ease-in-out;display:flex}.indeterminate{height:calc((${strokeWidth} * 3) * 1px);border-radius:calc(${designUnit} * 1px);display:flex;width:100%;position:relative;overflow:hidden}.indeterminate-indicator-1{position:absolute;opacity:0;height:100%;background-color:${accentFillRest};border-radius:calc(${designUnit} * 1px);animation-timing-function:cubic-bezier(0.4,0,0.6,1);width:40%;animation:indeterminate-1 2s infinite}.indeterminate-indicator-2{position:absolute;opacity:0;height:100%;background-color:${accentFillRest};border-radius:calc(${designUnit} * 1px);animation-timing-function:cubic-bezier(0.4,0,0.6,1);width:60%;animation:indeterminate-2 2s infinite}:host(.paused) .indeterminate-indicator-1,:host(.paused) .indeterminate-indicator-2{animation:none;background-color:${neutralForegroundHint};width:100%;opacity:1}:host(.paused) .determinate{background-color:${neutralForegroundHint}}@keyframes indeterminate-1{0%{opacity:1;transform:translateX(-100%)}70%{opacity:1;transform:translateX(300%)}70.01%{opacity:0}100%{opacity:0;transform:translateX(300%)}}@keyframes indeterminate-2{0%{opacity:0;transform:translateX(-150%)}29.99%{opacity:0}30%{opacity:1;transform:translateX(-150%)}100%{transform:translateX(166.66%);opacity:1}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
23313
|
+
.indeterminate-indicator-1,.indeterminate-indicator-2,.determinate,.progress{background-color:${SystemColors.ButtonText}}:host(.paused) .indeterminate-indicator-1,:host(.paused) .indeterminate-indicator-2,:host(.paused) .determinate{background-color:${SystemColors.GrayText}}`));
|
|
22695
23314
|
|
|
22696
23315
|
/**
|
|
22697
23316
|
* Progress base class
|
|
@@ -22728,8 +23347,8 @@ const fluentProgress = Progress.compose({
|
|
|
22728
23347
|
const progressStyles = progressStyles$1;
|
|
22729
23348
|
|
|
22730
23349
|
const progressRingStyles$1 = (context, definition) => css`
|
|
22731
|
-
${display('flex')} :host{align-items:center;outline:none;height:calc(${heightNumber} * 1px);width:calc(${heightNumber} * 1px)
|
|
22732
|
-
.
|
|
23350
|
+
${display('flex')} :host{align-items:center;outline:none;height:calc(${heightNumber} * 1px);width:calc(${heightNumber} * 1px)}.progress{height:100%;width:100%}.background{fill:none;stroke-width:2px}.determinate{stroke:${accentFillRest};fill:none;stroke-width:2px;stroke-linecap:round;transform-origin:50% 50%;transform:rotate(-90deg);transition:all 0.2s ease-in-out}.indeterminate-indicator-1{stroke:${accentFillRest};fill:none;stroke-width:2px;stroke-linecap:round;transform-origin:50% 50%;transform:rotate(-90deg);transition:all 0.2s ease-in-out;animation:spin-infinite 2s linear infinite}:host(.paused) .indeterminate-indicator-1{animation:none;stroke:${neutralForegroundHint}}:host(.paused) .determinate{stroke:${neutralForegroundHint}}@keyframes spin-infinite{0%{stroke-dasharray:0.01px 43.97px;transform:rotate(0deg)}50%{stroke-dasharray:21.99px 21.99px;transform:rotate(450deg)}100%{stroke-dasharray:0.01px 43.97px;transform:rotate(1080deg)}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
23351
|
+
.background{stroke:${SystemColors.Field}}.determinate,.indeterminate-indicator-1{stroke:${SystemColors.ButtonText}}:host(.paused) .determinate,:host(.paused) .indeterminate-indicator-1{stroke:${SystemColors.GrayText}}`));
|
|
22733
23352
|
|
|
22734
23353
|
/**
|
|
22735
23354
|
* Progress Ring base class
|
|
@@ -22778,7 +23397,7 @@ const fluentProgressRing = ProgressRing.compose({
|
|
|
22778
23397
|
const progressRingStyles = progressRingStyles$1;
|
|
22779
23398
|
|
|
22780
23399
|
const radioStyles = (context, definition) => css`
|
|
22781
|
-
${display('inline-flex')} :host{--input-size:calc((${heightNumber} / 2) + ${designUnit});align-items:center;outline:none
|
|
23400
|
+
${display('inline-flex')} :host{--input-size:calc((${heightNumber} / 2) + ${designUnit});align-items:center;outline:none;${
|
|
22782
23401
|
/*
|
|
22783
23402
|
* Chromium likes to select label text or the default slot when
|
|
22784
23403
|
* the radio button is clicked. Maybe there is a better solution here?
|
|
@@ -22786,7 +23405,7 @@ const radioStyles = (context, definition) => css`
|
|
|
22786
23405
|
''} user-select:none;position:relative;flex-direction:row;transition:all 0.2s ease-in-out}.control{position:relative;width:calc(var(--input-size) * 1px);height:calc(var(--input-size) * 1px);box-sizing:border-box;border-radius:50%;border:calc(${strokeWidth} * 1px) solid ${neutralStrokeStrongRest};background:${neutralFillInputAltRest};outline:none;cursor:pointer}.label__hidden{display:none;visibility:hidden}.label{font-family:${bodyFont};color:${neutralForegroundRest};${
|
|
22787
23406
|
/* Need to discuss with Brian how HorizontalSpacingNumber can work. https://github.com/microsoft/fast/issues/2766 */
|
|
22788
23407
|
''} padding-inline-start:calc(${designUnit} * 2px + 2px);margin-inline-end:calc(${designUnit} * 2px + 2px);cursor:pointer;font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight}}.control,slot[name='checked-indicator']{flex-shrink:0}slot[name='checked-indicator']{display:flex;align-items:center;justify-content:center;width:100%;height:100%;fill:${foregroundOnAccentRest};opacity:0;pointer-events:none}:host(:not(.disabled):hover) .control{background:${neutralFillInputAltHover};border-color:${neutralStrokeStrongHover}}:host(:not(.disabled):active) .control{background:${neutralFillInputAltActive};border-color:${neutralStrokeStrongActive}}:host(:not(.disabled):active) slot[name='checked-indicator']{opacity:1}:host(:${focusVisible}) .control{box-shadow:0 0 0 1px ${fillColor},0 0 0 3px ${focusStrokeOuter};background:${neutralFillInputAltFocus};border-color:${focusStrokeOuter}}:host(.checked) .control{background:${accentFillRest};border-color:transparent}:host(.checked:not(.disabled):hover) .control{background:${accentFillHover};border-color:transparent}:host(.checked:not(.disabled):active) .control{background:${accentFillActive};border-color:transparent}:host(.disabled) .label,:host(.readonly) .label,:host(.readonly) .control,:host(.disabled) .control{cursor:${disabledCursor}}:host(.checked) slot[name='checked-indicator']{opacity:1}:host(.disabled){opacity:${disabledOpacity}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
22789
|
-
.control{
|
|
23408
|
+
.control{background:${SystemColors.Field};border-color:${SystemColors.FieldText}}:host(:not(.disabled):hover) .control,:host(:not(.disabled):active) .control{border-color:${SystemColors.Highlight}}:host(:${focusVisible}) .control{forced-color-adjust:none;box-shadow:0 0 0 1px ${SystemColors.Field},0 0 0 3px ${SystemColors.FieldText};background:${SystemColors.Field};border-color:${SystemColors.Highlight}}:host(.checked:not(.disabled):hover) .control,:host(.checked:not(.disabled):active) .control{border-color:${SystemColors.Highlight};background:${SystemColors.Highlight}}:host(.checked:${focusVisible}) .control{box-shadow:0 0 0 1px ${SystemColors.Field},0 0 0 3px ${SystemColors.FieldText}}:host(.checked) slot[name='checked-indicator']{fill:${SystemColors.Highlight}}:host(.checked:hover) .control slot[name='checked-indicator']{fill:${SystemColors.HighlightText}}:host(.disabled){opacity:1}:host(.disabled) .label{color:${SystemColors.GrayText}}:host(.disabled) .control,:host(.checked.disabled) .control{background:${SystemColors.Field};border-color:${SystemColors.GrayText}}:host(.disabled) slot[name='checked-indicator'],:host(.checked.disabled) slot[name='checked-indicator']{fill:${SystemColors.GrayText}}`));
|
|
22790
23409
|
|
|
22791
23410
|
/**
|
|
22792
23411
|
* The Fluent Radio Element. Implements {@link @microsoft/fast-foundation#Radio},
|
|
@@ -22816,7 +23435,7 @@ const fluentRadio = Radio.compose({
|
|
|
22816
23435
|
const RadioStyles = radioStyles;
|
|
22817
23436
|
|
|
22818
23437
|
const radioGroupStyles$1 = (context, definition) => css`
|
|
22819
|
-
${display('flex')} :host{align-items:flex-start;
|
|
23438
|
+
${display('flex')} :host{align-items:flex-start;flex-direction:column}.positioning-region{display:flex;flex-wrap:wrap}:host([orientation='vertical']) .positioning-region{flex-direction:column}:host([orientation='horizontal']) .positioning-region{flex-direction:row}`;
|
|
22820
23439
|
|
|
22821
23440
|
/**
|
|
22822
23441
|
* The Fluent Radio Group Element. Implements {@link @microsoft/fast-foundation#RadioGroup},
|
|
@@ -22910,7 +23529,8 @@ const selectStyles = selectStyles$1;
|
|
|
22910
23529
|
const skeletonStyles$1 = (context, definition) => css`
|
|
22911
23530
|
${display('block')} :host{--skeleton-fill-default:${neutralFillSecondaryRest};overflow:hidden;width:100%;position:relative;background-color:var(--skeleton-fill,var(--skeleton-fill-default));--skeleton-animation-gradient-default:linear-gradient(
|
|
22912
23531
|
270deg,var(--skeleton-fill,var(--skeleton-fill-default)) 0%,${neutralFillSecondaryHover} 51%,var(--skeleton-fill,var(--skeleton-fill-default)) 100%
|
|
22913
|
-
);--skeleton-animation-timing-default:ease-in-out}:host(.rect){border-radius:calc(${controlCornerRadius} * 1px)}:host(.circle){border-radius:100%;overflow:hidden}object{position:absolute;width:100%;height:auto;z-index:2}object img{width:100%;height:auto}${display('block')} span.shimmer{position:absolute;width:100%;height:100%;background-image:var(--skeleton-animation-gradient,var(--skeleton-animation-gradient-default));background-size:0px 0px / 90% 100%;background-repeat:no-repeat;background-color:var(--skeleton-animation-fill,${neutralFillSecondaryRest});animation:shimmer 2s infinite;animation-timing-function:var(--skeleton-animation-timing,var(--skeleton-timing-default));animation-direction:normal;z-index:1}::slotted(svg){z-index:2}::slotted(.pattern){width:100%;height:100%}@keyframes shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}
|
|
23532
|
+
);--skeleton-animation-timing-default:ease-in-out}:host(.rect){border-radius:calc(${controlCornerRadius} * 1px)}:host(.circle){border-radius:100%;overflow:hidden}object{position:absolute;width:100%;height:auto;z-index:2}object img{width:100%;height:auto}${display('block')} span.shimmer{position:absolute;width:100%;height:100%;background-image:var(--skeleton-animation-gradient,var(--skeleton-animation-gradient-default));background-size:0px 0px / 90% 100%;background-repeat:no-repeat;background-color:var(--skeleton-animation-fill,${neutralFillSecondaryRest});animation:shimmer 2s infinite;animation-timing-function:var(--skeleton-animation-timing,var(--skeleton-timing-default));animation-direction:normal;z-index:1}::slotted(svg){z-index:2}::slotted(.pattern){width:100%;height:100%}@keyframes shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
23533
|
+
:host{background-color:${SystemColors.CanvasText}}`));
|
|
22914
23534
|
|
|
22915
23535
|
/**
|
|
22916
23536
|
* The Fluent Skeleton Element. Implements {@link @microsoft/fast-foundation#Skeleton},
|
|
@@ -22935,8 +23555,8 @@ const fluentSkeleton = Skeleton.compose({
|
|
|
22935
23555
|
const skeletonStyles = skeletonStyles$1;
|
|
22936
23556
|
|
|
22937
23557
|
const sliderStyles$1 = (context, definition) => css`
|
|
22938
|
-
${display('inline-grid')} :host{--thumb-size:calc((${heightNumber} / 2) + ${designUnit} + (${strokeWidth} * 2));--thumb-translate:calc(var(--thumb-size) * -0.5 + var(--track-width) / 2);--track-overhang:calc((${designUnit} / 2) * -1);--track-width:${designUnit};align-items:center;width:100%;
|
|
22939
|
-
.thumb-cursor{forced-color-adjust:none;border-color:${SystemColors.FieldText};background:${SystemColors.FieldText}}:host(:not(.disabled)) .thumb-cursor:hover,:host(:not(.disabled)) .thumb-cursor:active{background:${SystemColors.Highlight}}.track{forced-color-adjust:none;background:${SystemColors.FieldText}}:host(:${focusVisible}) .thumb-cursor{background:${SystemColors.Highlight};border-color:${SystemColors.Highlight};box-shadow:0 0 0
|
|
23558
|
+
${display('inline-grid')} :host{--thumb-size:calc((${heightNumber} / 2) + ${designUnit} + (${strokeWidth} * 2));--thumb-translate:calc(var(--thumb-size) * -0.5 + var(--track-width) / 2);--track-overhang:calc((${designUnit} / 2) * -1);--track-width:${designUnit};align-items:center;width:100%;user-select:none;box-sizing:border-box;border-radius:calc(${controlCornerRadius} * 1px);outline:none;cursor:pointer}:host(.horizontal) .positioning-region{position:relative;margin:0 8px;display:grid;grid-template-rows:calc(var(--thumb-size) * 1px) 1fr}:host(.vertical) .positioning-region{position:relative;margin:0 8px;display:grid;height:100%;grid-template-columns:calc(var(--thumb-size) * 1px) 1fr}:host(:${focusVisible}) .thumb-cursor{box-shadow:0 0 0 2px ${fillColor},0 0 0 4px ${focusStrokeOuter}}.thumb-container{position:absolute;height:calc(var(--thumb-size) * 1px);width:calc(var(--thumb-size) * 1px);transition:all 0.2s ease}.thumb-cursor{display:flex;position:relative;border:none;width:calc(var(--thumb-size) * 1px);height:calc(var(--thumb-size) * 1px);background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlRest};border:calc(${strokeWidth} * 1px) solid transparent;border-radius:50%;box-sizing:border-box}.thumb-cursor::after{content:'';display:block;border-radius:50%;width:100%;margin:4px;background:${accentFillRest}}:host(:not(.disabled)) .thumb-cursor:hover::after{background:${accentFillHover};margin:3px}:host(:not(.disabled)) .thumb-cursor:active::after{background:${accentFillActive};margin:5px}:host(:not(.disabled)) .thumb-cursor:hover{background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlHover}}:host(:not(.disabled)) .thumb-cursor:active{background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlActive}}.track-start{background:${accentFillRest};position:absolute;height:100%;left:0;border-radius:calc(${controlCornerRadius} * 1px)}:host(.horizontal) .thumb-container{transform:translateX(calc(var(--thumb-size) * 0.5px)) translateY(calc(var(--thumb-translate) * 1px))}:host(.vertical) .thumb-container{transform:translateX(calc(var(--thumb-translate) * 1px)) translateY(calc(var(--thumb-size) * 0.5px))}:host(.horizontal){min-width:calc(var(--thumb-size) * 1px)}:host(.horizontal) .track{right:calc(var(--track-overhang) * 1px);left:calc(var(--track-overhang) * 1px);align-self:start;height:calc(var(--track-width) * 1px)}:host(.vertical) .track{top:calc(var(--track-overhang) * 1px);bottom:calc(var(--track-overhang) * 1px);width:calc(var(--track-width) * 1px);height:100%}.track{background:${neutralFillStrongRest};border:1px solid ${neutralStrokeStrongRest};border-radius:2px;box-sizing:border-box;position:absolute}:host(.vertical){height:100%;min-height:calc(${designUnit} * 60px);min-width:calc(${designUnit} * 20px)}:host(.vertical) .track-start{height:auto;width:100%;top:0}:host(.disabled),:host(.readonly){cursor:${disabledCursor}}:host(.disabled){opacity:${disabledOpacity}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
23559
|
+
.thumb-cursor{forced-color-adjust:none;border-color:${SystemColors.FieldText};background:${SystemColors.FieldText}}:host(:not(.disabled)) .thumb-cursor:hover,:host(:not(.disabled)) .thumb-cursor:active{background:${SystemColors.Highlight}}.track{forced-color-adjust:none;background:${SystemColors.FieldText}}.thumb-cursor::after,:host(:not(.disabled)) .thumb-cursor:hover::after,:host(:not(.disabled)) .thumb-cursor:active::after{background:${SystemColors.Field}}:host(:${focusVisible}) .thumb-cursor{background:${SystemColors.Highlight};border-color:${SystemColors.Highlight};box-shadow:0 0 0 1px ${SystemColors.Field},0 0 0 3px ${SystemColors.FieldText}}:host(.disabled){opacity:1}:host(.disabled) .track,:host(.disabled) .thumb-cursor{forced-color-adjust:none;background:${SystemColors.GrayText}}`));
|
|
22940
23560
|
|
|
22941
23561
|
/**
|
|
22942
23562
|
* The Fluent Slider Custom Element. Implements {@link @microsoft/fast-foundation#(Slider:class)},
|
|
@@ -22990,15 +23610,15 @@ const fluentSliderLabel = SliderLabel.compose({
|
|
|
22990
23610
|
const sliderLabelStyles = sliderLabelStyles$1;
|
|
22991
23611
|
|
|
22992
23612
|
const switchStyles$1 = (context, definition) => css`
|
|
22993
|
-
:host([hidden]){display:none}${display('inline-flex')} :host{align-items:center;outline:none;font-family:${bodyFont}
|
|
23613
|
+
:host([hidden]){display:none}${display('inline-flex')} :host{align-items:center;outline:none;font-family:${bodyFont};${
|
|
22994
23614
|
/*
|
|
22995
23615
|
* Chromium likes to select label text or the default slot when
|
|
22996
23616
|
* the checkbox is clicked. Maybe there is a better solution here?
|
|
22997
23617
|
*/
|
|
22998
|
-
''} user-select:none}:host(.disabled){opacity:${disabledOpacity}}:host(.disabled) .label,:host(.readonly) .label,:host(.disabled) .switch,:host(.readonly) .switch,:host(.disabled) .status-message,:host(.readonly) .status-message{cursor:${disabledCursor}}.switch{position:relative;outline:none;box-sizing:border-box;width:calc(((${heightNumber} / 2) + ${designUnit}) * 2px);height:calc(((${heightNumber} / 2) + ${designUnit}) * 1px);background:${neutralFillInputAltRest};border-radius:calc(${heightNumber} * 1px);border:calc(${strokeWidth} * 1px) solid ${neutralStrokeStrongRest};cursor:pointer}:host(:not(.disabled):hover) .switch{background:${neutralFillInputAltHover};border-color:${neutralStrokeStrongHover}}:host(:not(.disabled):active) .switch{background:${neutralFillInputAltActive};border-color:${neutralStrokeStrongActive}}:host(:${focusVisible}) .switch{box-shadow:0 0 0 1px ${fillColor},0 0 0 3px ${focusStrokeOuter};background:${neutralFillInputAltFocus};border-color:${focusStrokeOuter}}:host(.checked) .switch{background:${accentFillRest};border-color:transparent}:host(.checked:not(.disabled):hover) .switch{background:${accentFillHover};border-color:transparent}:host(.checked:not(.disabled):active) .switch{background:${accentFillActive};border-color:transparent}slot[name='switch']{position:absolute;display:flex;border:1px solid transparent;fill:${neutralForegroundRest};transition:all 0.2s ease-in-out}.status-message{color:${neutralForegroundRest};cursor:pointer;font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight}}.label__hidden{display:none;visibility:hidden}.label{color:${neutralForegroundRest};font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight};margin-inline-end:calc(${designUnit} * 2px + 2px);cursor:pointer}
|
|
23618
|
+
''} user-select:none}:host(.disabled){opacity:${disabledOpacity}}:host(.disabled) .label,:host(.readonly) .label,:host(.disabled) .switch,:host(.readonly) .switch,:host(.disabled) .status-message,:host(.readonly) .status-message{cursor:${disabledCursor}}.switch{position:relative;outline:none;box-sizing:border-box;width:calc(((${heightNumber} / 2) + ${designUnit}) * 2px);height:calc(((${heightNumber} / 2) + ${designUnit}) * 1px);background:${neutralFillInputAltRest};border-radius:calc(${heightNumber} * 1px);border:calc(${strokeWidth} * 1px) solid ${neutralStrokeStrongRest};cursor:pointer}:host(:not(.disabled):hover) .switch{background:${neutralFillInputAltHover};border-color:${neutralStrokeStrongHover}}:host(:not(.disabled):active) .switch{background:${neutralFillInputAltActive};border-color:${neutralStrokeStrongActive}}:host(:${focusVisible}) .switch{box-shadow:0 0 0 1px ${fillColor},0 0 0 3px ${focusStrokeOuter};background:${neutralFillInputAltFocus};border-color:${focusStrokeOuter}}:host(.checked) .switch{background:${accentFillRest};border-color:transparent}:host(.checked:not(.disabled):hover) .switch{background:${accentFillHover};border-color:transparent}:host(.checked:not(.disabled):active) .switch{background:${accentFillActive};border-color:transparent}slot[name='switch']{position:absolute;display:flex;border:1px solid transparent;fill:${neutralForegroundRest};transition:all 0.2s ease-in-out}.status-message{color:${neutralForegroundRest};cursor:pointer;font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight}}.label__hidden{display:none;visibility:hidden}.label{color:${neutralForegroundRest};font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight};margin-inline-end:calc(${designUnit} * 2px + 2px);cursor:pointer}::slotted([slot="checked-message"]),::slotted([slot="unchecked-message"]){margin-inline-start:calc(${designUnit} * 2px + 2px)}:host(.checked) .switch{background:${accentFillRest}}:host(.checked) .switch slot[name='switch']{fill:${foregroundOnAccentRest};filter:drop-shadow(0px 1px 1px rgba(0,0,0,0.15))}:host(.checked:not(.disabled)) .switch:hover{background:${accentFillHover}}:host(.checked:not(.disabled)) .switch:hover slot[name='switch']{fill:${foregroundOnAccentHover}}:host(.checked:not(.disabled)) .switch:active{background:${accentFillActive}}:host(.checked:not(.disabled)) .switch:active slot[name='switch']{fill:${foregroundOnAccentActive}}:host(.checked:${focusVisible}:not(.disabled)) .switch{box-shadow:0 0 0 1px ${fillColor},0 0 0 3px ${focusStrokeOuter};border-color:transparent}.unchecked-message{display:block}.checked-message{display:none}:host(.checked) .unchecked-message{display:none}:host(.checked) .checked-message{display:block}`.withBehaviors(new DirectionalStyleSheetBehavior(css`
|
|
22999
23619
|
slot[name='switch']{left:0}:host(.checked) slot[name='switch']{left:100%;transform:translateX(-100%)}`, css`
|
|
23000
23620
|
slot[name='switch']{right:0}:host(.checked) slot[name='switch']{right:100%;transform:translateX(100%)}`), forcedColorsStylesheetBehavior(css`
|
|
23001
|
-
|
|
23621
|
+
:host(:not(.disabled)) .switch slot[name='switch']{forced-color-adjust:none;fill:${SystemColors.FieldText}}.switch{background:${SystemColors.Field};border-color:${SystemColors.FieldText}}:host(.checked) .switch{background:${SystemColors.Highlight};border-color:${SystemColors.Highlight}}:host(:not(.disabled):hover) .switch,:host(:not(.disabled):active) .switch,:host(.checked:not(.disabled):hover) .switch{background:${SystemColors.HighlightText};border-color:${SystemColors.Highlight}}:host(.checked:not(.disabled)) .switch slot[name="switch"]{fill:${SystemColors.HighlightText}}:host(.checked:not(.disabled):hover) .switch slot[name='switch']{fill:${SystemColors.Highlight}}:host(:${focusVisible}) .switch{forced-color-adjust:none;background:${SystemColors.Field};border-color:${SystemColors.Highlight};box-shadow:0 0 0 1px ${SystemColors.Highlight},0 0 0 3px ${SystemColors.FieldText}}:host(.checked:${focusVisible}:not(.disabled)) .switch{forced-color-adjust:none;background:${SystemColors.Highlight};box-shadow:0 0 0 1px ${SystemColors.Field},0 0 0 3px ${SystemColors.FieldText};border-color:${SystemColors.Field}}:host(.disabled){opacity:1}:host(.disabled) slot[name='switch']{forced-color-adjust:none;fill:${SystemColors.GrayText}}:host(.disabled) .switch{background:${SystemColors.Field};border-color:${SystemColors.GrayText}}.status-message,.label{color:${SystemColors.FieldText}}`));
|
|
23002
23622
|
|
|
23003
23623
|
/**
|
|
23004
23624
|
* The Fluent Switch Custom Element. Implements {@link @microsoft/fast-foundation#Switch},
|
|
@@ -23028,12 +23648,12 @@ const fluentSwitch = Switch.compose({
|
|
|
23028
23648
|
const switchStyles = switchStyles$1;
|
|
23029
23649
|
|
|
23030
23650
|
const tabsStyles$1 = (context, definition) => css`
|
|
23031
|
-
${display('grid')} :host{box-sizing:border-box;font-family:${bodyFont};font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight};color:${neutralForegroundRest};grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr}.tablist{display:grid;grid-template-rows:calc(${heightNumber} * 1px);auto;grid-template-columns:auto;position:relative;width:max-content;align-self:end}.start,.end{align-self:center}.activeIndicator{grid-row:2;grid-column:1;width:20px;height:3px;border-radius:calc(${controlCornerRadius} * 1px);justify-self:center;background:${accentFillRest}}.activeIndicatorTransition{transition:transform 0.2s ease-in-out}.tabpanel{grid-row:2;grid-column-start:1;grid-column-end:4;position:relative}:host(.vertical){grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}:host(.vertical) .tablist{grid-row-start:2;grid-row-end:2;display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr;position:relative;width:max-content;justify-self:end;width:100%}:host(.vertical) .tabpanel{grid-column:2;grid-row-start:1;grid-row-end:4}:host(.vertical) .end{grid-row:3}:host(.vertical) .activeIndicator{grid-column:1;grid-row:1;width:3px;height:20px;margin-inline-start:calc(${focusStrokeWidth} * 1px);border-radius:calc(${controlCornerRadius} * 1px);align-self:center;background:${accentFillRest}}:host(.vertical) .activeIndicatorTransition{transition:transform 0.2s linear}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
23032
|
-
.activeIndicator,:host(.vertical) .activeIndicator{
|
|
23651
|
+
${display('grid')} :host{box-sizing:border-box;font-family:${bodyFont};font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight};color:${neutralForegroundRest};grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr}.tablist{display:grid;grid-template-rows:calc(${heightNumber} * 1px);auto;grid-template-columns:auto;position:relative;width:max-content;align-self:end}.start,.end{align-self:center}.activeIndicator{grid-row:2;grid-column:1;width:20px;height:3px;border-radius:calc(${controlCornerRadius} * 1px);justify-self:center;background:${accentFillRest}}.activeIndicatorTransition{transition:transform 0.2s ease-in-out}.tabpanel{grid-row:2;grid-column-start:1;grid-column-end:4;position:relative}:host(.vertical){grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}:host(.vertical) .tablist{grid-row-start:2;grid-row-end:2;display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr;position:relative;width:max-content;justify-self:end;align-self:flex-start;width:100%}:host(.vertical) .tabpanel{grid-column:2;grid-row-start:1;grid-row-end:4}:host(.vertical) .end{grid-row:3}:host(.vertical) .activeIndicator{grid-column:1;grid-row:1;width:3px;height:20px;margin-inline-start:calc(${focusStrokeWidth} * 1px);border-radius:calc(${controlCornerRadius} * 1px);align-self:center;background:${accentFillRest}}:host(.vertical) .activeIndicatorTransition{transition:transform 0.2s linear}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
23652
|
+
.activeIndicator,:host(.vertical) .activeIndicator{background:${SystemColors.Highlight}}`));
|
|
23033
23653
|
|
|
23034
23654
|
const tabStyles$1 = (context, definition) => css`
|
|
23035
23655
|
${display('inline-flex')} :host{box-sizing:border-box;font-family:${bodyFont};font-size:${typeRampBaseFontSize};font-weight:400;line-height:${typeRampBaseLineHeight};height:calc((${heightNumber} + (${designUnit} * 2)) * 1px);padding:0 calc((6 + (${designUnit} * 2 * ${density})) * 1px);color:${neutralForegroundRest};border-radius:calc(${controlCornerRadius} * 1px);border:calc(${strokeWidth} * 1px) solid transparent;align-items:center;justify-content:center;grid-row:1 / 3;cursor:pointer;outline:none}:host([aria-selected='true']){z-index:2}:host(:hover),:host(:active){color:${neutralForegroundRest}}:host(:${focusVisible}){border-color:${focusStrokeOuter};box-shadow:0 0 0 calc((${focusStrokeWidth} - ${strokeWidth}) * 1px) ${focusStrokeOuter} inset}:host(.vertical){justify-content:start;grid-column:1 / 3}:host(.vertical[aria-selected='true']){z-index:2}:host(.vertical:hover),:host(.vertical:active){color:${neutralForegroundRest}}:host(.vertical:hover[aria-selected='true']){}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
23036
|
-
:host{forced-color-adjust:none;border-color:transparent;color:${SystemColors.ButtonText};fill:currentcolor}:host(:hover),:host(.vertical:hover),:host([aria-selected='true']:hover){background
|
|
23656
|
+
:host{forced-color-adjust:none;border-color:transparent;color:${SystemColors.ButtonText};fill:currentcolor}:host(:hover),:host(.vertical:hover),:host([aria-selected='true']:hover){background:transparent;color:${SystemColors.Highlight};fill:currentcolor}:host([aria-selected='true']){background:transparent;color:${SystemColors.Highlight};fill:currentcolor}:host(:${focusVisible}){background:transparent;border-color:${SystemColors.ButtonText};box-shadow:none}`));
|
|
23037
23657
|
|
|
23038
23658
|
/**
|
|
23039
23659
|
* The Fluent Tab Custom Element. Implements {@link @microsoft/fast-foundation#Tab},
|
|
@@ -23377,7 +23997,7 @@ const treeItemStyles$1 = (context, definition) => css`
|
|
|
23377
23997
|
/* The french fry background needs to be calculated based on the selected background state for this control.
|
|
23378
23998
|
We currently have no way of changing that, so setting to accent-foreground-rest for the time being */
|
|
23379
23999
|
''} background:${accentFillRest};border-radius:calc(${controlCornerRadius} * 1px)}::slotted(fluent-tree-item){--tree-item-nested-width:1em;--expand-collapse-button-nested-width:calc(${heightNumber} * -1px)}`.withBehaviors(new DirectionalStyleSheetBehavior(ltr, rtl), forcedColorsStylesheetBehavior(css`
|
|
23380
|
-
:host{
|
|
24000
|
+
:host{color:${SystemColors.ButtonText}}.positioning-region{border-color:${SystemColors.ButtonFace};background:${SystemColors.ButtonFace}}:host(:not([disabled])) .positioning-region:hover,:host(:not([disabled])) .positioning-region:active,:host(:not([disabled])[selected]) .positioning-region{background:${SystemColors.Highlight}}:host .positioning-region:hover .content-region,:host([selected]) .positioning-region .content-region{forced-color-adjust:none;color:${SystemColors.HighlightText}}:host([disabled][selected]) .positioning-region .content-region{color:${SystemColors.GrayText}}:host([selected])::after{background:${SystemColors.HighlightText}}:host(:${focusVisible}) .positioning-region{forced-color-adjust:none;border-color:${SystemColors.ButtonText};box-shadow:0 0 0 2px inset ${SystemColors.ButtonFace}}:host([disabled]),:host([disabled]) .content-region,:host([disabled]) .positioning-region:hover .content-region{opacity:1;color:${SystemColors.GrayText}}:host(.nested) .expand-collapse-button:hover,:host(:not([disabled])[selected]) .expand-collapse-button:hover{background:${SystemColors.ButtonFace};fill:${SystemColors.ButtonText}}`));
|
|
23381
24001
|
|
|
23382
24002
|
/**
|
|
23383
24003
|
* The Fluent tree item Custom Element. Implements, {@link @microsoft/fast-foundation#TreeItem}
|
|
@@ -23421,6 +24041,7 @@ const allComponents = {
|
|
|
23421
24041
|
fluentBreadcrumb,
|
|
23422
24042
|
fluentBreadcrumbItem,
|
|
23423
24043
|
fluentButton,
|
|
24044
|
+
fluentCalendar,
|
|
23424
24045
|
fluentCard,
|
|
23425
24046
|
fluentCheckbox,
|
|
23426
24047
|
fluentCombobox,
|
|
@@ -23496,4 +24117,4 @@ function provideFluentDesignSystem(element) {
|
|
|
23496
24117
|
|
|
23497
24118
|
const FluentDesignSystem = provideFluentDesignSystem().register(allComponents);
|
|
23498
24119
|
|
|
23499
|
-
export { AccentButtonStyles, Accordion, AccordionItem, Anchor, AnchoredRegion, Badge, Breadcrumb, BreadcrumbItem, Button, Card, Combobox, DataGrid, DataGridCell, DataGridRow, DesignSystemProvider, Dialog, DirectionalStyleSheetBehavior, Divider, Flipper, FluentDesignSystem, HorizontalScroll, HypertextStyles, LightweightButtonStyles, Listbox, Menu, MenuItem, NumberField, OptionStyles, OutlineButtonStyles, PaletteRGB, Progress, ProgressRing, Radio, RadioGroup, RadioStyles, Select, Skeleton, Slider, SliderLabel, StandardLuminance, StealthButtonStyles, SwatchRGB, Switch, Tab, TabPanel, Tabs, TextArea, TextField, Toolbar, Tooltip, TreeItem, TreeView, accentBaseColor, accentFillActive, accentFillActiveDelta, accentFillFocus, accentFillFocusDelta, accentFillHover, accentFillHoverDelta, accentFillRecipe, accentFillRest, accentFillRestDelta, accentForegroundActive, accentForegroundActiveDelta, accentForegroundCut, accentForegroundCutLarge, accentForegroundFocus, accentForegroundFocusDelta, accentForegroundHover, accentForegroundHoverDelta, accentForegroundRecipe, accentForegroundRest, accentForegroundRestDelta, accentPalette, accentStrokeControlActive, accentStrokeControlFocus, accentStrokeControlHover, accentStrokeControlRecipe, accentStrokeControlRest, accordionItemStyles, accordionStyles, allComponents, ambientShadow, anchorStyles, anchoredRegionStyles, badgeStyles, baseButtonStyles, baseHeightMultiplier, baseHorizontalSpacingMultiplier, baseLayerLuminance, bodyFont, breadcrumbItemStyles, breadcrumbStyles, buttonStyles, cardStyles, checkboxStyles, comboboxStyles, controlCornerRadius, cornerRadius, dataGridCellStyles, dataGridRowStyles, dataGridStyles, density, designUnit, dialogStyles, direction, directionalShadow, disabledOpacity, dividerStyles, elevatedCornerRadius, elevation, elevationShadowCardActive, elevationShadowCardActiveSize, elevationShadowCardFocus, elevationShadowCardFocusSize, elevationShadowCardHover, elevationShadowCardHoverSize, elevationShadowCardRest, elevationShadowCardRestSize, elevationShadowDialog, elevationShadowDialogSize, elevationShadowFlyout, elevationShadowFlyoutSize, elevationShadowRecipe, elevationShadowTooltip, elevationShadowTooltipSize, fillColor, flipperStyles, fluentAccordion, fluentAccordionItem, fluentAnchor, fluentAnchoredRegion, fluentBadge, fluentBreadcrumb, fluentBreadcrumbItem, fluentButton, fluentCard, fluentCheckbox, fluentCombobox, fluentDataGrid, fluentDataGridCell, fluentDataGridRow, fluentDesignSystemProvider, fluentDialog, fluentDivider, fluentFlipper, fluentHorizontalScroll, fluentListbox, fluentMenu, fluentMenuItem, fluentNumberField, fluentOption, fluentProgress, fluentProgressRing, fluentRadio, fluentRadioGroup, fluentSelect, fluentSkeleton, fluentSlider, fluentSliderLabel, fluentSwitch, fluentTab, fluentTabPanel, fluentTabs, fluentTextArea, fluentTextField, fluentToolbar, fluentTooltip, fluentTreeItem, fluentTreeView, focusOutlineWidth, focusStrokeInner, focusStrokeInnerRecipe, focusStrokeOuter, focusStrokeOuterRecipe, focusStrokeWidth, foregroundOnAccentActive, foregroundOnAccentActiveLarge, foregroundOnAccentFocus, foregroundOnAccentFocusLarge, foregroundOnAccentHover, foregroundOnAccentHoverLarge, foregroundOnAccentLargeRecipe, foregroundOnAccentRecipe, foregroundOnAccentRest, foregroundOnAccentRestLarge, heightNumber, horizontalScrollStyles, inputFilledForcedColorStyles, inputFilledStyles, inputForcedColorStyles, inputStateStyles, inputStyles, isDark, layerCornerRadius, listboxStyles, menuItemStyles, menuStyles, neutralBaseColor, neutralContrastFillActive, neutralContrastFillActiveDelta, neutralContrastFillFocus, neutralContrastFillFocusDelta, neutralContrastFillHover, neutralContrastFillHoverDelta, neutralContrastFillRest, neutralContrastFillRestDelta, neutralDivider, neutralDividerRestDelta, neutralFillActive, neutralFillActiveDelta, neutralFillCard, neutralFillCardDelta, neutralFillFocus, neutralFillFocusDelta, neutralFillHover, neutralFillHoverDelta, neutralFillInputActive, neutralFillInputActiveDelta, neutralFillInputAltActive, neutralFillInputAltActiveDelta, neutralFillInputAltFocus, neutralFillInputAltFocusDelta, neutralFillInputAltHover, neutralFillInputAltHoverDelta, neutralFillInputAltRecipe, neutralFillInputAltRest, neutralFillInputAltRestDelta, neutralFillInputFocus, neutralFillInputFocusDelta, neutralFillInputHover, neutralFillInputHoverDelta, neutralFillInputRecipe, neutralFillInputRest, neutralFillInputRestDelta, neutralFillInverseActive, neutralFillInverseActiveDelta, neutralFillInverseFocus, neutralFillInverseFocusDelta, neutralFillInverseHover, neutralFillInverseHoverDelta, neutralFillInverseRecipe, neutralFillInverseRest, neutralFillInverseRestDelta, neutralFillLayerActive, neutralFillLayerActiveDelta, neutralFillLayerAltRecipe, neutralFillLayerAltRest, neutralFillLayerAltRestDelta, neutralFillLayerHover, neutralFillLayerHoverDelta, neutralFillLayerRecipe, neutralFillLayerRest, neutralFillLayerRestDelta, neutralFillRecipe, neutralFillRest, neutralFillRestDelta, neutralFillSecondaryActive, neutralFillSecondaryActiveDelta, neutralFillSecondaryFocus, neutralFillSecondaryFocusDelta, neutralFillSecondaryHover, neutralFillSecondaryHoverDelta, neutralFillSecondaryRecipe, neutralFillSecondaryRest, neutralFillSecondaryRestDelta, neutralFillStealthActive, neutralFillStealthActiveDelta, neutralFillStealthFocus, neutralFillStealthFocusDelta, neutralFillStealthHover, neutralFillStealthHoverDelta, neutralFillStealthRecipe, neutralFillStealthRest, neutralFillStealthRestDelta, neutralFillStrongActive, neutralFillStrongActiveDelta, neutralFillStrongFocus, neutralFillStrongFocusDelta, neutralFillStrongHover, neutralFillStrongHoverDelta, neutralFillStrongRecipe, neutralFillStrongRest, neutralFillStrongRestDelta, neutralFillToggleActive, neutralFillToggleActiveDelta, neutralFillToggleFocus, neutralFillToggleFocusDelta, neutralFillToggleHover, neutralFillToggleHoverDelta, neutralFillToggleRest, neutralFillToggleRestDelta, neutralFocus, neutralFocusInnerAccent, neutralForegroundActive, neutralForegroundFocus, neutralForegroundHint, neutralForegroundHintRecipe, neutralForegroundHover, neutralForegroundRecipe, neutralForegroundRest, neutralLayer1, neutralLayer1Recipe, neutralLayer2, neutralLayer2Recipe, neutralLayer3, neutralLayer3Recipe, neutralLayer4, neutralLayer4Recipe, neutralLayerCardContainer, neutralLayerCardContainerRecipe, neutralLayerFloating, neutralLayerFloatingRecipe, neutralLayerL1, neutralLayerL2, neutralLayerL3, neutralLayerL4, neutralOutlineActive, neutralOutlineFocus, neutralOutlineHover, neutralOutlineRest, neutralPalette, neutralStrokeActive, neutralStrokeActiveDelta, neutralStrokeControlActive, neutralStrokeControlActiveDelta, neutralStrokeControlFocus, neutralStrokeControlFocusDelta, neutralStrokeControlHover, neutralStrokeControlHoverDelta, neutralStrokeControlRecipe, neutralStrokeControlRest, neutralStrokeControlRestDelta, neutralStrokeDividerRecipe, neutralStrokeDividerRest, neutralStrokeDividerRestDelta, neutralStrokeFocus, neutralStrokeFocusDelta, neutralStrokeHover, neutralStrokeHoverDelta, neutralStrokeInputActive, neutralStrokeInputFocus, neutralStrokeInputHover, neutralStrokeInputRecipe, neutralStrokeInputRest, neutralStrokeLayerActive, neutralStrokeLayerActiveDelta, neutralStrokeLayerHover, neutralStrokeLayerHoverDelta, neutralStrokeLayerRecipe, neutralStrokeLayerRest, neutralStrokeLayerRestDelta, neutralStrokeRecipe, neutralStrokeRest, neutralStrokeRestDelta, neutralStrokeStrongActive, neutralStrokeStrongActiveDelta, neutralStrokeStrongFocus, neutralStrokeStrongFocusDelta, neutralStrokeStrongHover, neutralStrokeStrongHoverDelta, neutralStrokeStrongRecipe, neutralStrokeStrongRest, numberFieldStyles, outlineWidth, progressRingStyles, progressStyles, provideFluentDesignSystem, radioGroupStyles, selectStyles, skeletonStyles, sliderLabelStyles, sliderStyles, strokeWidth, switchStyles, tabPanelStyles, tabStyles, tabsStyles, textAreaStyles, textFieldStyles, treeItemStyles, treeViewStyles, typeRampBaseFontSize, typeRampBaseLineHeight, typeRampMinus1FontSize, typeRampMinus1LineHeight, typeRampMinus2FontSize, typeRampMinus2LineHeight, typeRampPlus1FontSize, typeRampPlus1LineHeight, typeRampPlus2FontSize, typeRampPlus2LineHeight, typeRampPlus3FontSize, typeRampPlus3LineHeight, typeRampPlus4FontSize, typeRampPlus4LineHeight, typeRampPlus5FontSize, typeRampPlus5LineHeight, typeRampPlus6FontSize, typeRampPlus6LineHeight };
|
|
24120
|
+
export { AccentButtonStyles, Accordion, AccordionItem, Anchor, AnchoredRegion, Badge, Breadcrumb, BreadcrumbItem, Button, Card, Combobox, DataGrid, DataGridCell, DataGridRow, DesignSystemProvider, Dialog, DirectionalStyleSheetBehavior, Divider, Flipper, FluentDesignSystem, HorizontalScroll, HypertextStyles, LightweightButtonStyles, Listbox, Menu, MenuItem, NumberField, OptionStyles, OutlineButtonStyles, PaletteRGB, Progress, ProgressRing, Radio, RadioGroup, RadioStyles, Select, Skeleton, Slider, SliderLabel, StandardLuminance, StealthButtonStyles, SwatchRGB, Switch, Tab, TabPanel, Tabs, TextArea, TextField, Toolbar, Tooltip, TreeItem, TreeView, accentBaseColor, accentFillActive, accentFillActiveDelta, accentFillFocus, accentFillFocusDelta, accentFillHover, accentFillHoverDelta, accentFillRecipe, accentFillRest, accentFillRestDelta, accentForegroundActive, accentForegroundActiveDelta, accentForegroundCut, accentForegroundCutLarge, accentForegroundFocus, accentForegroundFocusDelta, accentForegroundHover, accentForegroundHoverDelta, accentForegroundRecipe, accentForegroundRest, accentForegroundRestDelta, accentPalette, accentStrokeControlActive, accentStrokeControlFocus, accentStrokeControlHover, accentStrokeControlRecipe, accentStrokeControlRest, accordionItemStyles, accordionStyles, allComponents, ambientShadow, anchorStyles, anchoredRegionStyles, badgeStyles, baseButtonStyles, baseHeightMultiplier, baseHorizontalSpacingMultiplier, baseLayerLuminance, bodyFont, breadcrumbItemStyles, breadcrumbStyles, buttonStyles, cardStyles, checkboxStyles, comboboxStyles, controlCornerRadius, cornerRadius, dataGridCellStyles, dataGridRowStyles, dataGridStyles, density, designUnit, dialogStyles, direction, directionalShadow, disabledOpacity, dividerStyles, elevatedCornerRadius, elevation, elevationShadowCardActive, elevationShadowCardActiveSize, elevationShadowCardFocus, elevationShadowCardFocusSize, elevationShadowCardHover, elevationShadowCardHoverSize, elevationShadowCardRest, elevationShadowCardRestSize, elevationShadowDialog, elevationShadowDialogSize, elevationShadowFlyout, elevationShadowFlyoutSize, elevationShadowRecipe, elevationShadowTooltip, elevationShadowTooltipSize, fillColor, flipperStyles, fluentAccordion, fluentAccordionItem, fluentAnchor, fluentAnchoredRegion, fluentBadge, fluentBreadcrumb, fluentBreadcrumbItem, fluentButton, fluentCalendar, fluentCard, fluentCheckbox, fluentCombobox, fluentDataGrid, fluentDataGridCell, fluentDataGridRow, fluentDesignSystemProvider, fluentDialog, fluentDivider, fluentFlipper, fluentHorizontalScroll, fluentListbox, fluentMenu, fluentMenuItem, fluentNumberField, fluentOption, fluentProgress, fluentProgressRing, fluentRadio, fluentRadioGroup, fluentSelect, fluentSkeleton, fluentSlider, fluentSliderLabel, fluentSwitch, fluentTab, fluentTabPanel, fluentTabs, fluentTextArea, fluentTextField, fluentToolbar, fluentTooltip, fluentTreeItem, fluentTreeView, focusOutlineWidth, focusStrokeInner, focusStrokeInnerRecipe, focusStrokeOuter, focusStrokeOuterRecipe, focusStrokeWidth, foregroundOnAccentActive, foregroundOnAccentActiveLarge, foregroundOnAccentFocus, foregroundOnAccentFocusLarge, foregroundOnAccentHover, foregroundOnAccentHoverLarge, foregroundOnAccentLargeRecipe, foregroundOnAccentRecipe, foregroundOnAccentRest, foregroundOnAccentRestLarge, heightNumber, horizontalScrollStyles, inputFilledForcedColorStyles, inputFilledStyles, inputForcedColorStyles, inputStateStyles, inputStyles, isDark, layerCornerRadius, listboxStyles, menuItemStyles, menuStyles, neutralBaseColor, neutralContrastFillActive, neutralContrastFillActiveDelta, neutralContrastFillFocus, neutralContrastFillFocusDelta, neutralContrastFillHover, neutralContrastFillHoverDelta, neutralContrastFillRest, neutralContrastFillRestDelta, neutralDivider, neutralDividerRestDelta, neutralFillActive, neutralFillActiveDelta, neutralFillCard, neutralFillCardDelta, neutralFillFocus, neutralFillFocusDelta, neutralFillHover, neutralFillHoverDelta, neutralFillInputActive, neutralFillInputActiveDelta, neutralFillInputAltActive, neutralFillInputAltActiveDelta, neutralFillInputAltFocus, neutralFillInputAltFocusDelta, neutralFillInputAltHover, neutralFillInputAltHoverDelta, neutralFillInputAltRecipe, neutralFillInputAltRest, neutralFillInputAltRestDelta, neutralFillInputFocus, neutralFillInputFocusDelta, neutralFillInputHover, neutralFillInputHoverDelta, neutralFillInputRecipe, neutralFillInputRest, neutralFillInputRestDelta, neutralFillInverseActive, neutralFillInverseActiveDelta, neutralFillInverseFocus, neutralFillInverseFocusDelta, neutralFillInverseHover, neutralFillInverseHoverDelta, neutralFillInverseRecipe, neutralFillInverseRest, neutralFillInverseRestDelta, neutralFillLayerActive, neutralFillLayerActiveDelta, neutralFillLayerAltRecipe, neutralFillLayerAltRest, neutralFillLayerAltRestDelta, neutralFillLayerHover, neutralFillLayerHoverDelta, neutralFillLayerRecipe, neutralFillLayerRest, neutralFillLayerRestDelta, neutralFillRecipe, neutralFillRest, neutralFillRestDelta, neutralFillSecondaryActive, neutralFillSecondaryActiveDelta, neutralFillSecondaryFocus, neutralFillSecondaryFocusDelta, neutralFillSecondaryHover, neutralFillSecondaryHoverDelta, neutralFillSecondaryRecipe, neutralFillSecondaryRest, neutralFillSecondaryRestDelta, neutralFillStealthActive, neutralFillStealthActiveDelta, neutralFillStealthFocus, neutralFillStealthFocusDelta, neutralFillStealthHover, neutralFillStealthHoverDelta, neutralFillStealthRecipe, neutralFillStealthRest, neutralFillStealthRestDelta, neutralFillStrongActive, neutralFillStrongActiveDelta, neutralFillStrongFocus, neutralFillStrongFocusDelta, neutralFillStrongHover, neutralFillStrongHoverDelta, neutralFillStrongRecipe, neutralFillStrongRest, neutralFillStrongRestDelta, neutralFillToggleActive, neutralFillToggleActiveDelta, neutralFillToggleFocus, neutralFillToggleFocusDelta, neutralFillToggleHover, neutralFillToggleHoverDelta, neutralFillToggleRest, neutralFillToggleRestDelta, neutralFocus, neutralFocusInnerAccent, neutralForegroundActive, neutralForegroundFocus, neutralForegroundHint, neutralForegroundHintRecipe, neutralForegroundHover, neutralForegroundRecipe, neutralForegroundRest, neutralLayer1, neutralLayer1Recipe, neutralLayer2, neutralLayer2Recipe, neutralLayer3, neutralLayer3Recipe, neutralLayer4, neutralLayer4Recipe, neutralLayerCardContainer, neutralLayerCardContainerRecipe, neutralLayerFloating, neutralLayerFloatingRecipe, neutralLayerL1, neutralLayerL2, neutralLayerL3, neutralLayerL4, neutralOutlineActive, neutralOutlineFocus, neutralOutlineHover, neutralOutlineRest, neutralPalette, neutralStrokeActive, neutralStrokeActiveDelta, neutralStrokeControlActive, neutralStrokeControlActiveDelta, neutralStrokeControlFocus, neutralStrokeControlFocusDelta, neutralStrokeControlHover, neutralStrokeControlHoverDelta, neutralStrokeControlRecipe, neutralStrokeControlRest, neutralStrokeControlRestDelta, neutralStrokeDividerRecipe, neutralStrokeDividerRest, neutralStrokeDividerRestDelta, neutralStrokeFocus, neutralStrokeFocusDelta, neutralStrokeHover, neutralStrokeHoverDelta, neutralStrokeInputActive, neutralStrokeInputFocus, neutralStrokeInputHover, neutralStrokeInputRecipe, neutralStrokeInputRest, neutralStrokeLayerActive, neutralStrokeLayerActiveDelta, neutralStrokeLayerHover, neutralStrokeLayerHoverDelta, neutralStrokeLayerRecipe, neutralStrokeLayerRest, neutralStrokeLayerRestDelta, neutralStrokeRecipe, neutralStrokeRest, neutralStrokeRestDelta, neutralStrokeStrongActive, neutralStrokeStrongActiveDelta, neutralStrokeStrongFocus, neutralStrokeStrongFocusDelta, neutralStrokeStrongHover, neutralStrokeStrongHoverDelta, neutralStrokeStrongRecipe, neutralStrokeStrongRest, numberFieldStyles, outlineWidth, progressRingStyles, progressStyles, provideFluentDesignSystem, radioGroupStyles, selectStyles, skeletonStyles, sliderLabelStyles, sliderStyles, strokeWidth, switchStyles, tabPanelStyles, tabStyles, tabsStyles, textAreaStyles, textFieldStyles, treeItemStyles, treeViewStyles, typeRampBaseFontSize, typeRampBaseLineHeight, typeRampMinus1FontSize, typeRampMinus1LineHeight, typeRampMinus2FontSize, typeRampMinus2LineHeight, typeRampPlus1FontSize, typeRampPlus1LineHeight, typeRampPlus2FontSize, typeRampPlus2LineHeight, typeRampPlus3FontSize, typeRampPlus3LineHeight, typeRampPlus4FontSize, typeRampPlus4LineHeight, typeRampPlus5FontSize, typeRampPlus5LineHeight, typeRampPlus6FontSize, typeRampPlus6LineHeight };
|