udp-stencil-component-library 26.3.0-beta.11 → 26.3.0-beta.12

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.
@@ -3020,6 +3020,26 @@ const UdpAutocomplete = class {
3020
3020
  * @note Not supported in combination with `multiple`.
3021
3021
  */
3022
3022
  this.freeForm = false;
3023
+ /**
3024
+ * Controls the shape of the `valueChanged` payload (see that event's docs):
3025
+ * - `'option'` (default): emit the matched option **object** from the source
3026
+ * list (legacy behavior). Convenient when the consumer wants the full option
3027
+ * (label, metadata) on change.
3028
+ * - `'value'`: emit the scalar resolved via `optionValue` (a `string`, or
3029
+ * `string[]` in `multiple` mode). This is what form bindings want — the
3030
+ * stored value is the option's id, not the object. Set this when wiring the
3031
+ * autocomplete into a form (Final Form / react-hook-form / `udp-field`).
3032
+ * Feed the emitted scalar(s) back into `value`; label resolution still works
3033
+ * because every internal read goes through `optionValue`. With `freeForm`,
3034
+ * an unmatched typed entry emits its raw string in either mode.
3035
+ *
3036
+ * @remarks Default is `'option'` to preserve existing behavior. A future
3037
+ * major version is expected to flip the default to `'value'`, since emitting
3038
+ * the scalar matches the convention of most component libraries (MUI, Ant
3039
+ * Design, Vuetify, Element) and avoids the "[object Object]" / stale-option
3040
+ * class of bug in form contexts.
3041
+ */
3042
+ this.valueAs = 'option';
3023
3043
  // --- State ---
3024
3044
  this.internalLoading = false;
3025
3045
  this.filterText = '';
@@ -3143,7 +3163,7 @@ const UdpAutocomplete = class {
3143
3163
  ? currentVal.filter(i => this.getOptionValue(i) !== itemVal)
3144
3164
  : // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
3145
3165
  [...currentVal, item];
3146
- this.valueChanged.emit(newValue);
3166
+ this.valueChanged.emit(newValue.map(v => this.toEmitValue(v)));
3147
3167
  }
3148
3168
  }
3149
3169
  else {
@@ -3199,7 +3219,7 @@ const UdpAutocomplete = class {
3199
3219
  return;
3200
3220
  const itemVal = this.getOptionValue(item);
3201
3221
  const newValue = this.value.filter(i => this.getOptionValue(i) !== itemVal);
3202
- this.valueChanged.emit(newValue);
3222
+ this.valueChanged.emit(newValue.map(v => this.toEmitValue(v)));
3203
3223
  };
3204
3224
  this.handleChange = (ev) => {
3205
3225
  var _a;
@@ -3227,7 +3247,7 @@ const UdpAutocomplete = class {
3227
3247
  const originalOption = this.findOptionByValue(selectedValue);
3228
3248
  const emitValue = originalOption !== undefined ? originalOption : selectedValue;
3229
3249
  this.selectionForOverlay = emitValue;
3230
- this.valueChanged.emit(emitValue);
3250
+ this.valueChanged.emit(this.toEmitValue(emitValue));
3231
3251
  // Fluent sets input.value to the option's textContent (badge text included).
3232
3252
  // Overwrite with the resolved label so uncontrolled usage stays clean.
3233
3253
  if (originalOption && this.dropdownRef.control) {
@@ -3255,7 +3275,7 @@ const UdpAutocomplete = class {
3255
3275
  return !displayValues.has(itemValue) && !visibleSelectedIds.has(itemValue);
3256
3276
  })
3257
3277
  : [];
3258
- this.valueChanged.emit([...hiddenSelections, ...visibleSelectedValues]);
3278
+ this.valueChanged.emit([...hiddenSelections, ...visibleSelectedValues].map(v => this.toEmitValue(v)));
3259
3279
  // Fluent's selectOption overwrites control.value with displayValue — restore filter text.
3260
3280
  if (this.filterText && this.dropdownRef.control) {
3261
3281
  requestAnimationFrame(() => {
@@ -3386,6 +3406,17 @@ const UdpAutocomplete = class {
3386
3406
  const searchArray = this.datasource || this.searchFunction ? this.fetchedOptions : this.options;
3387
3407
  return searchArray.find(opt => this.getOptionValue(opt) === value);
3388
3408
  }
3409
+ /**
3410
+ * Maps a single internal selection entry (option object or primitive) to the
3411
+ * shape `valueChanged` should emit, per `valueAs`. In `'value'` mode this
3412
+ * resolves the scalar via `optionValue`; in `'option'` mode it passes the
3413
+ * entry through unchanged. Callers map this over the array in multi-select.
3414
+ * Internal `value` round-tripping keeps working in either mode because every
3415
+ * read goes through `getOptionValue` (primitives resolve to themselves).
3416
+ */
3417
+ toEmitValue(selection) {
3418
+ return this.valueAs === 'value' ? this.getOptionValue(selection) : selection;
3419
+ }
3389
3420
  getDisplayOptions() {
3390
3421
  if (this.datasource || this.searchFunction) {
3391
3422
  return this.fetchedOptions;
@@ -3488,20 +3519,27 @@ const UdpAutocomplete = class {
3488
3519
  ? this.resolveProp(overlayOption, this.optionLabel, true)
3489
3520
  : null;
3490
3521
  const overlayBadges = overlayOption ? this.getOptionBadges(overlayOption) : [];
3491
- return (index.h(index.Host, { key: '7a22b88ed5af1695124498bbecf3916f4a755c37', class: { 'has-error': hasError } }, index.h("fluent-field", { key: '5da97b2bd5d07296fc348b69f8dfeb967c9c2415', class: {
3522
+ return (index.h(index.Host, { key: '89b86c15abd8134b91fc35a7353aee0f2e74a7d5', class: { 'has-error': hasError } }, index.h("fluent-field", { key: '5f5094ebeaacb6731f9fcfd1567b047d6119e5c3', class: {
3492
3523
  'no-label': !this.label && !this.multiple,
3493
3524
  'no-message': !message && !this.includeErrorPadding,
3494
- } }, index.h("div", { key: '75af3a30be97a1360099334fd3d7016ae8665366', class: "label-content", onClick: () => this.handleTogglePopover(false), slot: "label" }, this.label && (index.h("fluent-label", { key: '8364d30d016490241b339a7893a819be85d840c7', disabled: this.disabled, style: { paddingTop: '2px', paddingBottom: '2px' } }, this.label, this.popupHint && (index.h("udp-tooltip", { key: '8046a9b22c55f88fb9489030752728c6853a7eba', content: this.popupHint, positioning: "above" }, index.h("udp-fluent-icon", { key: 'bec46f48d4bdf284ffee8c609820409ed817fff4', name: "info", size: "xs", class: "popup-hint-icon" }))))), this.multiple && (index.h("div", { key: '8154ee373fde6618cf4269834f01fab56a370e86', class: {
3525
+ } }, index.h("div", { key: 'bd965e08439f6189afe88746a9ec3dff662dc52d', class: "label-content", onClick: () => this.handleTogglePopover(false), slot: "label" }, this.label && (index.h("fluent-label", { key: '113b4736d2454475400846aeda6978d823fa05c0', disabled: this.disabled, style: { paddingTop: '2px', paddingBottom: '2px' } }, this.label, this.popupHint && (index.h("udp-tooltip", { key: '80777babf581444f7c8c38bf20873c95db15fc97', content: this.popupHint, positioning: "above" }, index.h("udp-fluent-icon", { key: 'ff00357dea7aba684a6237c0db60a8856328325c', name: "info", size: "xs", class: "popup-hint-icon" }))))), this.multiple && (index.h("div", { key: '5d5ae469fbc8ef62c6646d176306f267036e6812', class: {
3495
3526
  'selected-items': true,
3496
3527
  'has-items': selectedItems.length > 0,
3497
- } }, selectedItems.map(item => (index.h("udp-fluent-badge", { color: "brand", shape: "circular", dismissible: !this.disabled, onDismiss: () => this.handleChipDelete(item) }, this.resolveProp(item, this.optionLabel, true))))))), index.h("div", { key: '41f7a2d014fe06d8b8e60c490e3062ffbca05db0', slot: "input", class: {
3528
+ } }, selectedItems.map(item => {
3529
+ var _a;
3530
+ // Resolve to the source option so chips show the label even
3531
+ // when `value` holds scalars (valueAs="value"). In 'option'
3532
+ // mode `item` is already the object, so this is a no-op.
3533
+ const opt = (_a = this.findOptionByValue(this.getOptionValue(item))) !== null && _a !== void 0 ? _a : item;
3534
+ return (index.h("udp-fluent-badge", { color: "brand", shape: "circular", dismissible: !this.disabled, onDismiss: () => this.handleChipDelete(item) }, this.resolveProp(opt, this.optionLabel, true)));
3535
+ })))), index.h("div", { key: '1060be0738eeecfe900006dc1ecf0f99ea9c02d8', slot: "input", class: {
3498
3536
  'input-wrapper': true,
3499
3537
  'has-overlay': !!overlayOption,
3500
- } }, index.h("fluent-dropdown", { key: '0ce12ae9cf2234586578928240c3288c0d5046f7', type: "combobox", name: this.name, appearance: mappedAppearance, size: this.controlSize, disabled: this.disabled, required: this.required, placeholder: this.placeholder, multiple: this.multiple,
3538
+ } }, index.h("fluent-dropdown", { key: '5cd147fda5cf701f9f420aa413954e4bde3481e4', type: "combobox", name: this.name, appearance: mappedAppearance, size: this.controlSize, disabled: this.disabled, required: this.required, placeholder: this.placeholder, multiple: this.multiple,
3501
3539
  // Events
3502
3540
  onInput: this.handleInput, onChange: this.handleChange, onFocusout: this.handleBlur, onFocusin: () => this.inputFocus.emit(),
3503
3541
  // Suppress native invalid popup
3504
- onInvalid: (e) => e.preventDefault(), exportparts: "control, listbox", ref: el => (this.dropdownRef = el) }, index.h("fluent-listbox", { key: '4d90d5eba9aad4010d4eed09ef0ad92ea259fae5' }, (this.loading || this.internalLoading) && (index.h("fluent-option", { key: '856951a11b15fb0046e5a39c5e1430ce5419a098', disabled: true, ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, index.h("span", { key: '46c90311617e70dda52ff5a51665501361ad83c2' }, "Loading..."), index.h("span", { key: '83d0a55f97af99117b1caf339db52c7b2203bb2f', slot: "indicator" }))), !this.loading && !this.internalLoading && visibleCount === 0 && !this.freeForm && (index.h("fluent-option", { key: 'ff0c4352c530b58eb9ae799495e3d48fecd082f1', disabled: true, value: "empty", ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, "No options available")), !this.loading &&
3542
+ onInvalid: (e) => e.preventDefault(), exportparts: "control, listbox", ref: el => (this.dropdownRef = el) }, index.h("fluent-listbox", { key: '1712ef4796ed9118725f9749ecbb4f056a2c3828' }, (this.loading || this.internalLoading) && (index.h("fluent-option", { key: 'd05adea606a5ab51263c523071e0a500b84a26a3', disabled: true, ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, index.h("span", { key: '93f78e1d2018e9ecd68424283a6b606f7d5fcafd' }, "Loading..."), index.h("span", { key: '65c89d6f7e04f382487d2d38b970f510e1d9bc65', slot: "indicator" }))), !this.loading && !this.internalLoading && visibleCount === 0 && !this.freeForm && (index.h("fluent-option", { key: '691c2087c550379c915d6009a649e16aaf831b7a', disabled: true, value: "empty", ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, "No options available")), !this.loading &&
3505
3543
  !this.internalLoading &&
3506
3544
  (displayOptions === null || displayOptions === void 0 ? void 0 : displayOptions.length) > 0 &&
3507
3545
  (() => {
@@ -3532,7 +3570,7 @@ const UdpAutocomplete = class {
3532
3570
  } }, optIcon && this.iconPosition === 'start' && (index.h("span", { slot: "start", class: "option-icon-slot" }, index.h("udp-fluent-icon", { name: optIcon, size: "sm" }))), optLabel, optIcon && this.iconPosition === 'end' && (index.h("span", { class: "option-icon-end", style: { pointerEvents: 'none', marginLeft: '4px' } }, index.h("udp-fluent-icon", { name: optIcon, size: "sm" }))), this.renderBadges(optBadges)));
3533
3571
  });
3534
3572
  return nodes;
3535
- })(), this.freeForm && (index.h("fluent-option", { key: 'ab0cc89c228fb19b16de2fc3f7336a213ba85d18', freeform: true }, index.h("output", { key: '108cd94ff2e8315274543b1fb8cf273534a8df97' })))), index.h("div", { key: '5b40b8e17ff3c14b02e48eab4a67cc521a798a57', slot: "indicator", class: "indicator-wrapper" }, index.h("udp-fluent-icon-button", { key: '85846ee6d8e0b65e51b565b5fad027c0aebd8fec', class: {
3573
+ })(), this.freeForm && (index.h("fluent-option", { key: '0d8d62ae5341831f3d305ea7cb91c8286dfa0ca0', freeform: true }, index.h("output", { key: 'bba3b3fb94850b416a1ea4aafdd6eb75b60f9fbc' })))), index.h("div", { key: '58331076d6c4db30d1cd0d7e22819bda247f6de9', slot: "indicator", class: "indicator-wrapper" }, index.h("udp-fluent-icon-button", { key: '9347ee56ea89f8e1c9be5fcb6a13a5aa3bc6a3f2', class: {
3536
3574
  'clear-button': true,
3537
3575
  'is-visible': !this.disabled &&
3538
3576
  (this.filterText !== '' ||
@@ -3540,10 +3578,10 @@ const UdpAutocomplete = class {
3540
3578
  (this.multiple &&
3541
3579
  Array.isArray(this.value) &&
3542
3580
  this.value.length > 0)),
3543
- }, slot: "indicator", iconName: "dismiss", appearance: "transparent", size: "small", onClick: this.handleClear, onMouseDown: e => e.preventDefault(), ariaLabel: "Clear", tabIndex: -1 }), index.h("udp-fluent-icon", { key: '6374418cd8d3a58d31d1e09bae8ffef9b26b854f', name: "chevron-down", size: "sm", class: "chevron-down", onClick: () => this.handleTogglePopover(false) }))), overlayOption && (index.h("div", { key: 'a103edba26a752de8c6574c3815626a4f1967fb9', class: "selected-overlay", "aria-hidden": "true" }, index.h("span", { key: '5d40561e9dc3d0ff1e26d00ebeb4bfa90f9f214f', class: "selected-label" }, overlayLabel), this.renderBadges(overlayBadges)))), index.h("div", { key: '4a3a0a248413e0a9557ee35d893dbec509290421', class: {
3581
+ }, slot: "indicator", iconName: "dismiss", appearance: "transparent", size: "small", onClick: this.handleClear, onMouseDown: e => e.preventDefault(), ariaLabel: "Clear", tabIndex: -1 }), index.h("udp-fluent-icon", { key: '662df827d72ee3fd5b879db45c2115779f69a895', name: "chevron-down", size: "sm", class: "chevron-down", onClick: () => this.handleTogglePopover(false) }))), overlayOption && (index.h("div", { key: '04885cd3a7ca59c5efa9c3caf307d957deb96877', class: "selected-overlay", "aria-hidden": "true" }, index.h("span", { key: '1ba24d42ac8dfe6a1a8f6390d4a68bf5288558ac', class: "selected-label" }, overlayLabel), this.renderBadges(overlayBadges)))), index.h("div", { key: 'd956cc5bb911be2b84fcc8baaadc03f50cba20f1', class: {
3544
3582
  'message-wrapper': true,
3545
3583
  'includeErrorPadding': this.includeErrorPadding,
3546
- }, slot: "message", onClick: () => this.handleTogglePopover(true) }, index.h("udp-text", { key: '21935a8f93b678e920a46a03ae25ef62bdb8d9b2', variant: "caption1", class: {
3584
+ }, slot: "message", onClick: () => this.handleTogglePopover(true) }, index.h("udp-text", { key: '9d10de86797308fd9b9b7598a9f9aa3523b7ad17', variant: "caption1", class: {
3547
3585
  message: true,
3548
3586
  error: hasError,
3549
3587
  } }, message)))));
@@ -6309,6 +6347,23 @@ const UdpFluentDropdown = class {
6309
6347
  * Whether the dropdown shows a clear button when a value is selected.
6310
6348
  */
6311
6349
  this.clearable = false;
6350
+ /**
6351
+ * Controls the shape of the `valueChanged` payload (see that event's docs):
6352
+ * - `'option'` (default): emit the matched option **object** from `options`
6353
+ * (legacy behavior). Convenient when the consumer wants the full option
6354
+ * (label, metadata) on change.
6355
+ * - `'value'`: emit the scalar resolved via `optionValue` (a `string`, or
6356
+ * `string[]` in `multiple` mode). This is what form bindings want — the
6357
+ * stored value is the option's id, not the object. Set this when wiring the
6358
+ * dropdown into a form (Final Form / react-hook-form / `udp-field`).
6359
+ *
6360
+ * @remarks Default is `'option'` to preserve existing behavior. A future
6361
+ * major version is expected to flip the default to `'value'`, since emitting
6362
+ * the scalar matches the convention of most component libraries (MUI, Ant
6363
+ * Design, Vuetify, Element) and avoids the "[object Object]" / stale-option
6364
+ * class of bug in form contexts.
6365
+ */
6366
+ this.valueAs = 'option';
6312
6367
  this.showClearButton = false;
6313
6368
  /**
6314
6369
  * Tracks the current selection so the overlay works uncontrolled.
@@ -6383,7 +6438,7 @@ const UdpFluentDropdown = class {
6383
6438
  }
6384
6439
  this.selectionForOverlay = currentValues;
6385
6440
  this.showClearButton = currentValues.length > 0;
6386
- this.valueChanged.emit(currentValues);
6441
+ this.valueChanged.emit(currentValues.map(v => this.toEmitValue(v)));
6387
6442
  ev.preventDefault();
6388
6443
  ev.stopPropagation();
6389
6444
  }
@@ -6438,7 +6493,7 @@ const UdpFluentDropdown = class {
6438
6493
  const originalOption = this.findOptionByValue(option.value);
6439
6494
  return originalOption !== undefined ? originalOption : option.value;
6440
6495
  });
6441
- this.valueChanged.emit(values);
6496
+ this.valueChanged.emit(values.map(v => this.toEmitValue(v)));
6442
6497
  this.showClearButton = values.length > 0;
6443
6498
  this.selectionForOverlay = values;
6444
6499
  }
@@ -6446,7 +6501,7 @@ const UdpFluentDropdown = class {
6446
6501
  const val = this.dropdownRef.value;
6447
6502
  const originalOption = this.findOptionByValue(val);
6448
6503
  const emitValue = originalOption !== undefined ? originalOption : val;
6449
- this.valueChanged.emit(emitValue);
6504
+ this.valueChanged.emit(this.toEmitValue(emitValue));
6450
6505
  this.showClearButton = val != null;
6451
6506
  this.selectionForOverlay = emitValue;
6452
6507
  }
@@ -6547,6 +6602,17 @@ const UdpFluentDropdown = class {
6547
6602
  var _a;
6548
6603
  return (_a = this.options) === null || _a === void 0 ? void 0 : _a.find(opt => this.getOptionValue(opt) === value);
6549
6604
  }
6605
+ /**
6606
+ * Maps a single internal selection entry (option object or primitive) to the
6607
+ * shape `valueChanged` should emit, per `valueAs`. In `'value'` mode this
6608
+ * resolves the scalar via `optionValue`; in `'option'` mode it passes the
6609
+ * entry through unchanged. Callers map this over the array in multi-select.
6610
+ * Internal state (`selectionForOverlay`) keeps the option objects regardless,
6611
+ * so the selected-value overlay renders the same in both modes.
6612
+ */
6613
+ toEmitValue(selection) {
6614
+ return this.valueAs === 'value' ? this.getOptionValue(selection) : selection;
6615
+ }
6550
6616
  getValuesAsArray() {
6551
6617
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
6552
6618
  if (Array.isArray(this.value))
@@ -6604,15 +6670,15 @@ const UdpFluentDropdown = class {
6604
6670
  const overlayOptions = this.getSelectedOverlayOptions();
6605
6671
  const hasOverlay = overlayOptions.length > 0;
6606
6672
  const mappedAppearance = this.appearance === 'underline' ? 'transparent' : this.appearance;
6607
- return (index.h(index.Host, { key: '88dd5dce56829cff0ec9829279449ab33458dd21', class: { 'has-error': hasError } }, index.h("fluent-field", { key: 'aa7e6d595c2acb911c4cf0a5ac3494ae54a4211e', class: {
6673
+ return (index.h(index.Host, { key: '2739e491826ba8d094f3ecc454c888d4815f0bc9', class: { 'has-error': hasError } }, index.h("fluent-field", { key: '49d9f2af0b1b490ba19cb8ffd76f9e81d80d40e4', class: {
6608
6674
  'no-message': !message && !this.includeErrorPadding,
6609
6675
  'no-label': !this.label,
6610
- } }, this.label && (index.h("fluent-label", { key: 'c3778f06a8596e8ac6f2a7e0562aa31cbb8bcedc', slot: "label", disabled: this.disabled, onClick: () => this.handleTogglePopover(false), style: { paddingTop: '2px', paddingBottom: '2px' } }, this.label, this.popupHint && (index.h("udp-tooltip", { key: '231486109e38b2686eb7d8f04fe4f257f54e6c73', content: this.popupHint, positioning: "above" }, index.h("udp-fluent-icon", { key: 'ded6a62317ecadacaeae0aed981f5e2de329ced6', name: "info", size: "xs", class: "popup-hint-icon" }))))), index.h("div", { key: 'df9fcf91f0a5762f53023021f2b573e7f3766420', slot: "input", class: {
6676
+ } }, this.label && (index.h("fluent-label", { key: 'db3f23065b207e958f1885a93f3f9c3607c32c18', slot: "label", disabled: this.disabled, onClick: () => this.handleTogglePopover(false), style: { paddingTop: '2px', paddingBottom: '2px' } }, this.label, this.popupHint && (index.h("udp-tooltip", { key: 'cd9957075c3688082d4b21046b77265bbe8e77b3', content: this.popupHint, positioning: "above" }, index.h("udp-fluent-icon", { key: '0198aed441b9c9a1776f0fa3d6d8c4c56b08fe37', name: "info", size: "xs", class: "popup-hint-icon" }))))), index.h("div", { key: 'c2ada338eda46b6c44d3c8bd03e370e08d79df1c', slot: "input", class: {
6611
6677
  'input-wrapper': true,
6612
6678
  'has-overlay': hasOverlay,
6613
- } }, index.h("fluent-dropdown", { key: '6e2b2f125feed8f6ba616dcf7a717bbec25bd319', type: "dropdown", name: this.name, appearance: mappedAppearance, size: this.controlSize, required: this.required, disabled: this.disabled, placeholder: this.placeholder, multiple: this.multiple, onChange: this.handleChange, onKeyDown: this.handleKeyDown, onFocusout: () => this.inputBlur.emit(), onFocusin: () => this.inputFocus.emit(),
6679
+ } }, index.h("fluent-dropdown", { key: 'edbb729b64ca2d23160a9b094ae3e15aee5fad49', type: "dropdown", name: this.name, appearance: mappedAppearance, size: this.controlSize, required: this.required, disabled: this.disabled, placeholder: this.placeholder, multiple: this.multiple, onChange: this.handleChange, onKeyDown: this.handleKeyDown, onFocusout: () => this.inputBlur.emit(), onFocusin: () => this.inputFocus.emit(),
6614
6680
  // Suppress native invalid popup
6615
- onInvalid: (e) => e.preventDefault(), ref: el => (this.dropdownRef = el) }, index.h("fluent-listbox", { key: '8bb3ece75e6c3d305625caa6090c815dc917f8d0' }, this.loading && (index.h("fluent-option", { key: 'fb540948af221fa8fc8c1eae79bdd2acf1d92d5a', disabled: true, ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, index.h("span", { key: 'd1f1bf2a6faa45d17b892788bc808287265b7279' }, "Loading..."), index.h("span", { key: '8496485ad3547d5435ed7379adba210150e0b86a', slot: "indicator" }))), !this.loading && ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) === 0 && (index.h("fluent-option", { key: '07638b3fb7aab35047b1fd53f0578c2e2d82c301', disabled: true, value: "empty", ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, "No options available")), !this.loading &&
6681
+ onInvalid: (e) => e.preventDefault(), ref: el => (this.dropdownRef = el) }, index.h("fluent-listbox", { key: '648c741cf3f5676f0048e22afe355626cf8f0cb4' }, this.loading && (index.h("fluent-option", { key: '1dd8f2d7b137c0921bb6393489604fef65b88b63', disabled: true, ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, index.h("span", { key: '1cd40a943df80a3e4e32279939451f2a884fa611' }, "Loading..."), index.h("span", { key: 'b00ec9c25a83e8ca28c4a7c350750e07cc323d00', slot: "indicator" }))), !this.loading && ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) === 0 && (index.h("fluent-option", { key: '9e459a8416fe0e063196c47ddbca0b2c16859c9e', disabled: true, value: "empty", ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, "No options available")), !this.loading &&
6616
6682
  ((_b = this.options) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
6617
6683
  (() => {
6618
6684
  const nodes = [];
@@ -6632,17 +6698,17 @@ const UdpFluentDropdown = class {
6632
6698
  nodes.push(index.h("fluent-option", { key: index$1, disabled: !!optDisabled, value: safeValue, ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', !!optDisabled) }, optIcon && this.iconPosition === 'start' && (index.h("span", { slot: "start", class: "option-icon-slot" }, index.h("udp-fluent-icon", { name: optIcon, size: "sm" }))), optLabel, optIcon && this.iconPosition === 'end' && (index.h("span", { class: "option-icon-end", style: { pointerEvents: 'none', marginLeft: '4px' } }, index.h("udp-fluent-icon", { name: optIcon, size: "sm" }))), this.renderBadges(optBadges)));
6633
6699
  });
6634
6700
  return nodes;
6635
- })()), index.h("div", { key: 'ef538939ef7766f249d3c085949ffd1550eb2638', slot: "indicator", class: "indicator-wrapper" }, index.h("udp-fluent-icon-button", { key: 'ed99ba12781b37b555579a3490ab1cf0c292b051', class: {
6701
+ })()), index.h("div", { key: '759461d74da6528e4b33be11cc4a3b80c8f80789', slot: "indicator", class: "indicator-wrapper" }, index.h("udp-fluent-icon-button", { key: '7f43ab70441f994632c89fec4f42772a679fe423', class: {
6636
6702
  'clear-button': true,
6637
6703
  'is-visible': this.showClearButton && !this.disabled && this.clearable,
6638
- }, slot: "indicator", iconName: "dismiss", appearance: "transparent", size: "small", onClick: this.handleClear, onMouseDown: e => e.preventDefault(), ariaLabel: "Clear", tabIndex: -1 }), index.h("udp-fluent-icon", { key: 'baefa8cc5b5c26480059631884557e87f5e402fc', name: "chevron-down", size: "sm", class: "chevron-down", onClick: (ev) => {
6704
+ }, slot: "indicator", iconName: "dismiss", appearance: "transparent", size: "small", onClick: this.handleClear, onMouseDown: e => e.preventDefault(), ariaLabel: "Clear", tabIndex: -1 }), index.h("udp-fluent-icon", { key: '59f53079ac480470026413b158154e5e3e4ca505', name: "chevron-down", size: "sm", class: "chevron-down", onClick: (ev) => {
6639
6705
  // stopPropagation: fluent's clickHandler would re-open via its `!this.open → showPopover` branch.
6640
6706
  ev.stopPropagation();
6641
6707
  this.handleTogglePopover(false);
6642
- } }))), hasOverlay && (index.h("div", { key: 'db85503a8d98fc0cf9c000c9f62a40583f534173', class: { 'selected-overlay': true, 'multi': overlayOptions.length > 1 }, "aria-hidden": "true" }, overlayOptions.map((opt, i) => (index.h("span", { class: "selected-item", key: this.getOptionValue(opt) || i }, i > 0 && index.h("span", { class: "selected-separator" }, ", "), index.h("span", { class: "selected-label" }, this.resolveProp(opt, this.optionLabel, true)), this.renderBadges(this.getOptionBadges(opt)))))))), index.h("div", { key: '60390af60c28be076678d841609067f3ab7aaea4', class: {
6708
+ } }))), hasOverlay && (index.h("div", { key: '9f2c12555d194f036e0a81618cb2ae77a595eac0', class: { 'selected-overlay': true, 'multi': overlayOptions.length > 1 }, "aria-hidden": "true" }, overlayOptions.map((opt, i) => (index.h("span", { class: "selected-item", key: this.getOptionValue(opt) || i }, i > 0 && index.h("span", { class: "selected-separator" }, ", "), index.h("span", { class: "selected-label" }, this.resolveProp(opt, this.optionLabel, true)), this.renderBadges(this.getOptionBadges(opt)))))))), index.h("div", { key: 'f336e3cc721c256dae4de0da6e05f87ca3455c43', class: {
6643
6709
  'message-wrapper': true,
6644
6710
  'includeErrorPadding': this.includeErrorPadding,
6645
- }, slot: "message", onClick: () => this.handleTogglePopover(true) }, index.h("udp-text", { key: '6574bc6adfffeed48ec74125a7d5c1eff07c9e5e', variant: "caption1", class: {
6711
+ }, slot: "message", onClick: () => this.handleTogglePopover(true) }, index.h("udp-text", { key: 'bf2bc3358bee4302fc663d0a06edf61eb4a11f13', variant: "caption1", class: {
6646
6712
  message: true,
6647
6713
  error: hasError,
6648
6714
  } }, message)))));
@@ -7253,7 +7319,7 @@ const UdpFluentSwitch = class {
7253
7319
  };
7254
7320
  UdpFluentSwitch.style = udpFluentSwitchCss();
7255
7321
 
7256
- const udpFluentTablistCss = () => `.slot-wrapper{display:inline-flex;align-items:center}.tablist-scroll-wrapper{position:relative;display:flex;align-items:center;width:100%;overflow:hidden}.tablist-scroll-container{display:flex;overflow-x:auto;overflow-y:hidden;width:100%;scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none;}.tablist-scroll-container::-webkit-scrollbar{display:none}.tablist-inner{display:flex;flex:0 0 auto;padding:3px;border-radius:var(--borderRadiusLarge)}.tablist-scroll-container.collapse-mode{overflow-x:hidden}.scroll-shadow-start,.scroll-shadow-end{position:absolute;top:0;bottom:0;width:48px;pointer-events:none;opacity:0;transition:opacity 0.2s ease;z-index:2;display:flex;align-items:center;justify-content:center}.scroll-shadow-start{left:0;background:linear-gradient(to right, var(--colorNeutralBackground1) 40%, transparent);justify-content:flex-start;padding-left:4px;z-index:5}.scroll-shadow-end{right:0;background:linear-gradient(to left, var(--colorNeutralBackground1) 40%, transparent);justify-content:flex-end;padding-right:4px;z-index:5}.scroll-shadow-start.is-visible,.scroll-shadow-end.is-visible{opacity:1}.scroll-button-container{pointer-events:auto;display:flex;align-items:center;justify-content:center}.is-overflow{display:none !important}.is-hidden{visibility:hidden;pointer-events:none}fluent-tab[aria-selected="true"]{z-index:3;}.overflow-menu-container{display:flex;align-items:center;border-radius:0 var(--borderRadiusLarge) var(--borderRadiusLarge) 0;padding-right:var(--spacingHorizontalM);margin-left:-4px}.overflow-menu-container udp-fluent-menu{anchor-name:--menu-anchor;margin-left:var(--spacingHorizontalM)}.overflow-menu-container udp-fluent-counter-badge{position:absolute;position-anchor:--menu-anchor;top:anchor(top);right:anchor(right);margin-top:-6px;margin-right:-6px}.contained-variant .tablist-inner{background-color:var(--colorNeutralBackground3)}.contained-variant fluent-tab[aria-selected="true"]{color:var(--colorNeutralForeground1)}.contained-variant fluent-tab:hover{background-color:var(--colorNeutralBackground2)}.contained-variant .overflow-menu-container{background-color:var(--colorNeutralBackground3)}`;
7322
+ const udpFluentTablistCss = () => `.slot-wrapper{display:inline-flex;align-items:center}.tablist-scroll-wrapper{position:relative;display:flex;align-items:center;width:100%;overflow:hidden}.tablist-scroll-container{display:flex;overflow-x:auto;overflow-y:hidden;width:100%;scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none;}.tablist-scroll-container::-webkit-scrollbar{display:none}.tablist-inner{display:flex;flex:0 0 auto;padding:3px;border-radius:var(--borderRadiusLarge)}.tablist-scroll-container.collapse-mode{overflow-x:hidden}.scroll-shadow-start,.scroll-shadow-end{position:absolute;top:0;bottom:0;width:48px;pointer-events:none;opacity:0;transition:opacity 0.2s ease;z-index:2;display:flex;align-items:center;justify-content:center}.scroll-shadow-start{left:0;background:linear-gradient(to right, var(--colorNeutralBackground1) 40%, transparent);justify-content:flex-start;padding-left:4px;z-index:5}.scroll-shadow-end{right:0;background:linear-gradient(to left, var(--colorNeutralBackground1) 40%, transparent);justify-content:flex-end;padding-right:4px;z-index:5}.scroll-shadow-start.is-visible,.scroll-shadow-end.is-visible{opacity:1}.scroll-button-container{pointer-events:none;display:flex;align-items:center;justify-content:center}.scroll-shadow-start.is-visible .scroll-button-container,.scroll-shadow-end.is-visible .scroll-button-container{pointer-events:auto}.is-overflow{display:none !important}.is-hidden{visibility:hidden;pointer-events:none}fluent-tab[aria-selected="true"]{z-index:3;}.overflow-menu-container{display:flex;align-items:center;border-radius:0 var(--borderRadiusLarge) var(--borderRadiusLarge) 0;padding-right:var(--spacingHorizontalM);margin-left:-4px}.overflow-menu-container udp-fluent-menu{anchor-name:--menu-anchor;margin-left:var(--spacingHorizontalM)}.overflow-menu-container udp-fluent-counter-badge{position:absolute;position-anchor:--menu-anchor;top:anchor(top);right:anchor(right);margin-top:-6px;margin-right:-6px}.contained-variant .tablist-inner{background-color:transparent;border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);padding:0}.contained-variant fluent-tab{padding-top:5px;padding-bottom:5px}.contained-variant .tablist-inner[size='small'] fluent-tab{padding-top:1px;padding-bottom:1px}.contained-variant .tablist-inner[size='large'] fluent-tab{padding-top:8px;padding-bottom:8px}.contained-variant fluent-tab[aria-selected="true"]{color:var(--colorNeutralForeground1)}.contained-variant fluent-tab:hover{background-color:var(--colorSubtleBackgroundHover)}.contained-variant .overflow-menu-container{background-color:transparent}`;
7257
7323
 
7258
7324
  const UdpFluentTablist = class {
7259
7325
  constructor(hostRef) {