@fluentui/web-components 3.0.0-beta.45 → 3.0.0-beta.46

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.
@@ -5151,7 +5151,7 @@ var __decorateClass$o = (decorators, target, key, kind) => {
5151
5151
  if (kind && result) __defProp$o(target, key, result);
5152
5152
  return result;
5153
5153
  };
5154
- class Button extends FASTElement {
5154
+ class BaseButton extends FASTElement {
5155
5155
  constructor() {
5156
5156
  super();
5157
5157
  this.disabledFocusable = false;
@@ -5162,22 +5162,8 @@ class Button extends FASTElement {
5162
5162
  * @internal
5163
5163
  */
5164
5164
  this.elementInternals = this.attachInternals();
5165
- this.iconOnly = false;
5166
5165
  this.elementInternals.role = "button";
5167
5166
  }
5168
- /**
5169
- * Handles changes to appearance attribute custom states
5170
- * @param prev - the previous state
5171
- * @param next - the next state
5172
- */
5173
- appearanceChanged(prev, next) {
5174
- if (prev) {
5175
- toggleState(this.elementInternals, `${prev}`, false);
5176
- }
5177
- if (next) {
5178
- toggleState(this.elementInternals, `${next}`, true);
5179
- }
5180
- }
5181
5167
  /**
5182
5168
  * Sets the element's internal disabled state when the element is focusable while disabled.
5183
5169
  *
@@ -5198,14 +5184,6 @@ class Button extends FASTElement {
5198
5184
  get form() {
5199
5185
  return this.elementInternals.form;
5200
5186
  }
5201
- /**
5202
- * Handles changes to icon only custom states
5203
- * @param prev - the previous state
5204
- * @param next - the next state
5205
- */
5206
- iconOnlyChanged(prev, next) {
5207
- toggleState(this.elementInternals, "icon", next);
5208
- }
5209
5187
  /**
5210
5188
  * A reference to all associated label elements.
5211
5189
  *
@@ -5214,32 +5192,6 @@ class Button extends FASTElement {
5214
5192
  get labels() {
5215
5193
  return Object.freeze(Array.from(this.elementInternals.labels));
5216
5194
  }
5217
- /**
5218
- * Handles changes to shape attribute custom states
5219
- * @param prev - the previous state
5220
- * @param next - the next state
5221
- */
5222
- shapeChanged(prev, next) {
5223
- if (prev) {
5224
- toggleState(this.elementInternals, `${prev}`, false);
5225
- }
5226
- if (next) {
5227
- toggleState(this.elementInternals, `${next}`, true);
5228
- }
5229
- }
5230
- /**
5231
- * Handles changes to size attribute custom states
5232
- * @param prev - the previous state
5233
- * @param next - the next state
5234
- */
5235
- sizeChanged(prev, next) {
5236
- if (prev) {
5237
- toggleState(this.elementInternals, `${prev}`, false);
5238
- }
5239
- if (next) {
5240
- toggleState(this.elementInternals, `${next}`, true);
5241
- }
5242
- }
5243
5195
  /**
5244
5196
  * Removes the form submission fallback control when the type changes.
5245
5197
  *
@@ -5399,52 +5351,105 @@ class Button extends FASTElement {
5399
5351
  *
5400
5352
  * @public
5401
5353
  */
5402
- Button.formAssociated = true;
5403
- __decorateClass$o([attr], Button.prototype, "appearance", 2);
5354
+ BaseButton.formAssociated = true;
5404
5355
  __decorateClass$o([attr({
5405
5356
  mode: "boolean"
5406
- })], Button.prototype, "autofocus", 2);
5407
- __decorateClass$o([observable], Button.prototype, "defaultSlottedContent", 2);
5357
+ })], BaseButton.prototype, "autofocus", 2);
5358
+ __decorateClass$o([observable], BaseButton.prototype, "defaultSlottedContent", 2);
5408
5359
  __decorateClass$o([attr({
5409
5360
  mode: "boolean"
5410
- })], Button.prototype, "disabled", 2);
5361
+ })], BaseButton.prototype, "disabled", 2);
5411
5362
  __decorateClass$o([attr({
5412
5363
  attribute: "disabled-focusable",
5413
5364
  mode: "boolean"
5414
- })], Button.prototype, "disabledFocusable", 2);
5365
+ })], BaseButton.prototype, "disabledFocusable", 2);
5415
5366
  __decorateClass$o([attr({
5416
5367
  attribute: "tabindex",
5417
5368
  mode: "fromView",
5418
5369
  converter: nullableNumberConverter
5419
- })], Button.prototype, "tabIndex", 2);
5370
+ })], BaseButton.prototype, "tabIndex", 2);
5420
5371
  __decorateClass$o([attr({
5421
5372
  attribute: "formaction"
5422
- })], Button.prototype, "formAction", 2);
5373
+ })], BaseButton.prototype, "formAction", 2);
5423
5374
  __decorateClass$o([attr({
5424
5375
  attribute: "form"
5425
- })], Button.prototype, "formAttribute", 2);
5376
+ })], BaseButton.prototype, "formAttribute", 2);
5426
5377
  __decorateClass$o([attr({
5427
5378
  attribute: "formenctype"
5428
- })], Button.prototype, "formEnctype", 2);
5379
+ })], BaseButton.prototype, "formEnctype", 2);
5429
5380
  __decorateClass$o([attr({
5430
5381
  attribute: "formmethod"
5431
- })], Button.prototype, "formMethod", 2);
5382
+ })], BaseButton.prototype, "formMethod", 2);
5432
5383
  __decorateClass$o([attr({
5433
5384
  attribute: "formnovalidate",
5434
5385
  mode: "boolean"
5435
- })], Button.prototype, "formNoValidate", 2);
5386
+ })], BaseButton.prototype, "formNoValidate", 2);
5436
5387
  __decorateClass$o([attr({
5437
5388
  attribute: "formtarget"
5438
- })], Button.prototype, "formTarget", 2);
5389
+ })], BaseButton.prototype, "formTarget", 2);
5390
+ __decorateClass$o([attr], BaseButton.prototype, "name", 2);
5391
+ __decorateClass$o([attr], BaseButton.prototype, "type", 2);
5392
+ __decorateClass$o([attr], BaseButton.prototype, "value", 2);
5393
+ class Button extends BaseButton {
5394
+ constructor() {
5395
+ super(...arguments);
5396
+ this.iconOnly = false;
5397
+ }
5398
+ /**
5399
+ * Handles changes to appearance attribute custom states
5400
+ * @param prev - the previous state
5401
+ * @param next - the next state
5402
+ */
5403
+ appearanceChanged(prev, next) {
5404
+ if (prev) {
5405
+ toggleState(this.elementInternals, `${prev}`, false);
5406
+ }
5407
+ if (next) {
5408
+ toggleState(this.elementInternals, `${next}`, true);
5409
+ }
5410
+ }
5411
+ /**
5412
+ * Handles changes to shape attribute custom states
5413
+ * @param prev - the previous state
5414
+ * @param next - the next state
5415
+ */
5416
+ shapeChanged(prev, next) {
5417
+ if (prev) {
5418
+ toggleState(this.elementInternals, `${prev}`, false);
5419
+ }
5420
+ if (next) {
5421
+ toggleState(this.elementInternals, `${next}`, true);
5422
+ }
5423
+ }
5424
+ /**
5425
+ * Handles changes to size attribute custom states
5426
+ * @param prev - the previous state
5427
+ * @param next - the next state
5428
+ */
5429
+ sizeChanged(prev, next) {
5430
+ if (prev) {
5431
+ toggleState(this.elementInternals, `${prev}`, false);
5432
+ }
5433
+ if (next) {
5434
+ toggleState(this.elementInternals, `${next}`, true);
5435
+ }
5436
+ }
5437
+ /**
5438
+ * Handles changes to icon only custom states
5439
+ * @param prev - the previous state
5440
+ * @param next - the next state
5441
+ */
5442
+ iconOnlyChanged(prev, next) {
5443
+ toggleState(this.elementInternals, "icon", next);
5444
+ }
5445
+ }
5446
+ __decorateClass$o([attr], Button.prototype, "appearance", 2);
5447
+ __decorateClass$o([attr], Button.prototype, "shape", 2);
5448
+ __decorateClass$o([attr], Button.prototype, "size", 2);
5439
5449
  __decorateClass$o([attr({
5440
5450
  attribute: "icon-only",
5441
5451
  mode: "boolean"
5442
5452
  })], Button.prototype, "iconOnly", 2);
5443
- __decorateClass$o([attr], Button.prototype, "name", 2);
5444
- __decorateClass$o([attr], Button.prototype, "shape", 2);
5445
- __decorateClass$o([attr], Button.prototype, "size", 2);
5446
- __decorateClass$o([attr], Button.prototype, "type", 2);
5447
- __decorateClass$o([attr], Button.prototype, "value", 2);
5448
5453
  applyMixins(Button, StartEnd);
5449
5454
 
5450
5455
  function buttonTemplate$1(options = {}) {