@momentum-design/components 0.133.19 → 0.133.21

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.
@@ -1,6 +1,6 @@
1
1
  import { CSSResult, PropertyValueMap } from 'lit';
2
2
  import Input from '../input/input.component';
3
- declare const Searchfield_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/KeyDownHandledMixin").KeyDownHandledMixinInterface> & typeof Input;
3
+ declare const Searchfield_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/ControlTypeMixin").ControlTypeMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/KeyDownHandledMixin").KeyDownHandledMixinInterface> & typeof Input;
4
4
  /**
5
5
  * `mdc-searchfield` component is used as an input field for search functionality.
6
6
  *
@@ -11,6 +11,10 @@ declare const Searchfield_base: import("../../utils/mixins/index.types").Constru
11
11
  *
12
12
  * This component is built by extending the `mdc-input` component.
13
13
  *
14
+ * Searchfield supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:
15
+ * - In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.
16
+ * - In **controlled** mode (`control-type="controlled"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the "removed" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).
17
+ *
14
18
  * **Accessibility:**
15
19
  *
16
20
  * NOTE: this component should not be used in combination with a Popover or Listbox component.
@@ -25,6 +29,7 @@ declare const Searchfield_base: import("../../utils/mixins/index.types").Constru
25
29
  * @event focus - (React: onFocus) This event is dispatched when the input receives focus.
26
30
  * @event blur - (React: onBlur) This event is dispatched when the input loses focus.
27
31
  * @event clear - (React: onClear) This event is dispatched when the input text is cleared.
32
+ * @event chipRemove - (React: onChipRemove) This event is dispatched when a chip filter is removed. The removed chip element is available in event.detail.chip. In `uncontrolled` mode (default) the chip is removed from the DOM automatically; in `controlled` mode only the event is fired and the consumer is responsible for removing the chip.
28
33
  *
29
34
  * @slot filters - Slot for chip filters rendered inline with the input text
30
35
  * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
@@ -105,6 +110,12 @@ declare class Searchfield extends Searchfield_base {
105
110
  * @param event - Keyboard event
106
111
  */
107
112
  handleKeyDown(event: KeyboardEvent): void;
113
+ /**
114
+ * Overrides the focus method to allow programmatically focusing the input field.
115
+ * Delegate focus didn't work as expect since we have a scrollable container that contains both chips and the input, and we want to focus the input when the component itself is focused. We need to override the focus method to achieve this behavior.
116
+ * @param options - Focus options
117
+ */
118
+ focus(options?: FocusOptions): void;
108
119
  disconnectedCallback(): void;
109
120
  connectedCallback(): void;
110
121
  /**
@@ -121,6 +132,12 @@ declare class Searchfield extends Searchfield_base {
121
132
  * @override
122
133
  */
123
134
  protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
135
+ /**
136
+ * Removes a chip element from the DOM and dispatches the 'chipRemove' event with the chip detail.
137
+ * In controlled mode, the chip is not removed from the DOM, only the event is dispatched.
138
+ * @param chip - The chip element to be removed
139
+ */
140
+ private removeChip;
124
141
  clearInputText(): void;
125
142
  /**
126
143
  * Removes keydown and focus event listeners from the focus target of a chip.
@@ -14,6 +14,7 @@ import { classMap } from 'lit-html/directives/class-map.js';
14
14
  import Input from '../input/input.component';
15
15
  import { ACTIONS } from '../../utils/mixins/KeyToActionMixin';
16
16
  import { KeyDownHandledMixin } from '../../utils/mixins/KeyDownHandledMixin';
17
+ import { ControlTypeMixin } from '../../utils/mixins/ControlTypeMixin';
17
18
  import { TAG_NAME as INPUT_CHIP_TAG } from '../inputchip/inputchip.constants';
18
19
  import styles from './searchfield.styles';
19
20
  import { CHIP_SELECTOR, DEFAULTS } from './searchfield.constants';
@@ -27,6 +28,10 @@ import { CHIP_SELECTOR, DEFAULTS } from './searchfield.constants';
27
28
  *
28
29
  * This component is built by extending the `mdc-input` component.
29
30
  *
31
+ * Searchfield supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:
32
+ * - In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.
33
+ * - In **controlled** mode (`control-type="controlled"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the "removed" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).
34
+ *
30
35
  * **Accessibility:**
31
36
  *
32
37
  * NOTE: this component should not be used in combination with a Popover or Listbox component.
@@ -41,6 +46,7 @@ import { CHIP_SELECTOR, DEFAULTS } from './searchfield.constants';
41
46
  * @event focus - (React: onFocus) This event is dispatched when the input receives focus.
42
47
  * @event blur - (React: onBlur) This event is dispatched when the input loses focus.
43
48
  * @event clear - (React: onClear) This event is dispatched when the input text is cleared.
49
+ * @event chipRemove - (React: onChipRemove) This event is dispatched when a chip filter is removed. The removed chip element is available in event.detail.chip. In `uncontrolled` mode (default) the chip is removed from the DOM automatically; in `controlled` mode only the event is fired and the consumer is responsible for removing the chip.
44
50
  *
45
51
  * @slot filters - Slot for chip filters rendered inline with the input text
46
52
  * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
@@ -84,7 +90,7 @@ import { CHIP_SELECTOR, DEFAULTS } from './searchfield.constants';
84
90
  * @csspart trailing-button - The trailing button element that is displayed to clear the input field when the `trailingButton` property is set to true.
85
91
  * @csspart searchfield-container - The inline flow container for chips and the input field.
86
92
  */
87
- class Searchfield extends KeyDownHandledMixin(Input) {
93
+ class Searchfield extends ControlTypeMixin(KeyDownHandledMixin(Input)) {
88
94
  constructor() {
89
95
  super(...arguments);
90
96
  /**
@@ -228,6 +234,15 @@ class Searchfield extends KeyDownHandledMixin(Input) {
228
234
  this.keyDownEventHandled();
229
235
  }
230
236
  }
237
+ /**
238
+ * Overrides the focus method to allow programmatically focusing the input field.
239
+ * Delegate focus didn't work as expect since we have a scrollable container that contains both chips and the input, and we want to focus the input when the component itself is focused. We need to override the focus method to achieve this behavior.
240
+ * @param options - Focus options
241
+ */
242
+ focus(options) {
243
+ var _a;
244
+ (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.focus(options);
245
+ }
231
246
  disconnectedCallback() {
232
247
  var _a;
233
248
  super.disconnectedCallback();
@@ -255,7 +270,7 @@ class Searchfield extends KeyDownHandledMixin(Input) {
255
270
  if (this.chips) {
256
271
  this.chips.forEach(element => {
257
272
  if (!element.matches(CHIP_SELECTOR)) {
258
- element.remove();
273
+ this.removeChip(element);
259
274
  return;
260
275
  }
261
276
  // Remove chips from tab order; they are navigated via arrow keys from the input
@@ -303,14 +318,26 @@ class Searchfield extends KeyDownHandledMixin(Input) {
303
318
  };
304
319
  super.firstUpdated(_changedProperties);
305
320
  }
321
+ /**
322
+ * Removes a chip element from the DOM and dispatches the 'chipRemove' event with the chip detail.
323
+ * In controlled mode, the chip is not removed from the DOM, only the event is dispatched.
324
+ * @param chip - The chip element to be removed
325
+ */
326
+ removeChip(chip) {
327
+ this.dispatchEvent(new CustomEvent('chipRemove', { detail: { chip }, bubbles: true, composed: true }));
328
+ if (this.controlType !== 'controlled') {
329
+ chip.remove();
330
+ }
331
+ }
306
332
  clearInputText() {
307
333
  var _a;
308
334
  super.clearInputText();
309
- // Directly remove all chips from DOM since not all chip types support the 'remove' event
335
+ // Directly remove all chips from DOM since not all chip types support the 'removed' event
336
+ // In uncontrolled mode, removeChip handles DOM removal.
337
+ // In controlled mode, only the 'chipRemove' event is fired per chip.
310
338
  const chipsToRemove = [...((_a = this.chips) !== null && _a !== void 0 ? _a : [])];
311
339
  chipsToRemove.forEach(element => {
312
- this.removeChipListeners(element);
313
- element.remove();
340
+ this.removeChip(element);
314
341
  });
315
342
  }
316
343
  /**
@@ -366,7 +393,7 @@ class Searchfield extends KeyDownHandledMixin(Input) {
366
393
  return;
367
394
  const chip = this.chips[index];
368
395
  this.removeChipListeners(chip);
369
- chip.remove();
396
+ this.removeChip(chip);
370
397
  // Wait for DOM/slot update after removal
371
398
  requestAnimationFrame(() => {
372
399
  if (this.chips && this.chips.length > 0) {
@@ -1,2 +1,12 @@
1
- import type { Events } from '../input/input.types';
1
+ import { TypedCustomEvent } from '../../utils/types';
2
+ import AlertChip from '../alertchip';
3
+ import Chip from '../chip';
4
+ import type { Events as InputEvents } from '../input/input.types';
5
+ import InputChip from '../inputchip';
6
+ import Searchfield from './searchfield.component';
7
+ type Events = InputEvents & {
8
+ onChipRemoveEvent: TypedCustomEvent<Searchfield, {
9
+ chip: Chip | InputChip | AlertChip;
10
+ }>;
11
+ };
2
12
  export type { Events };
@@ -14,6 +14,10 @@ import type { Placement } from './searchpopover.types';
14
14
  *
15
15
  * This component is built by extending the `mdc-searchfield` component & rendering the mdc-popover component inside.
16
16
  *
17
+ * Searchpopover supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:
18
+ * - In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.
19
+ * - In **controlled** mode (`control-type="controlled"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the "removed" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).
20
+ *
17
21
  * @tagname mdc-searchpopover
18
22
  *
19
23
  * @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
@@ -21,6 +25,9 @@ import type { Placement } from './searchpopover.types';
21
25
  * @event focus - (React: onFocus) This event is dispatched when the input receives focus.
22
26
  * @event blur - (React: onBlur) This event is dispatched when the input loses focus.
23
27
  * @event clear - (React: onClear) This event is dispatched when the input text is cleared.
28
+ * @event chipRemove - (React: onChipRemove) This event is dispatched when a chip filter is removed. The removed chip element is available in event.detail.chip.
29
+ * In **controlled** mode (`control-type="controlled"`), the chip is NOT removed from the DOM automatically — the consumer is responsible for removing it.
30
+ * In **uncontrolled** mode (default), the chip is removed from the DOM automatically.
24
31
  * @event shown - (React: onShown) This event is dispatched when the popover is shown
25
32
  * @event hidden - (React: onHidden) This event is dispatched when the popover is hidden
26
33
  *
@@ -31,6 +31,10 @@ import { DEFAULTS, TRIGGER_ID, POPOVER_ID } from './searchpopover.constants';
31
31
  *
32
32
  * This component is built by extending the `mdc-searchfield` component & rendering the mdc-popover component inside.
33
33
  *
34
+ * Searchpopover supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:
35
+ * - In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.
36
+ * - In **controlled** mode (`control-type="controlled"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the "removed" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).
37
+ *
34
38
  * @tagname mdc-searchpopover
35
39
  *
36
40
  * @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
@@ -38,6 +42,9 @@ import { DEFAULTS, TRIGGER_ID, POPOVER_ID } from './searchpopover.constants';
38
42
  * @event focus - (React: onFocus) This event is dispatched when the input receives focus.
39
43
  * @event blur - (React: onBlur) This event is dispatched when the input loses focus.
40
44
  * @event clear - (React: onClear) This event is dispatched when the input text is cleared.
45
+ * @event chipRemove - (React: onChipRemove) This event is dispatched when a chip filter is removed. The removed chip element is available in event.detail.chip.
46
+ * In **controlled** mode (`control-type="controlled"`), the chip is NOT removed from the DOM automatically — the consumer is responsible for removing it.
47
+ * In **uncontrolled** mode (default), the chip is removed from the DOM automatically.
41
48
  * @event shown - (React: onShown) This event is dispatched when the popover is shown
42
49
  * @event hidden - (React: onHidden) This event is dispatched when the popover is hidden
43
50
  *
@@ -1,7 +1,7 @@
1
- import type { Events as InputEvents } from '../input/input.types';
1
+ import type { Events as SearchFieldTypes } from '../searchfield/searchfield.types';
2
2
  import type { PopoverPlacement, PopoverShownEvent, PopoverHiddenEvent } from '../popover/popover.types';
3
3
  type Placement = Extract<PopoverPlacement, 'bottom-start' | 'top-start'>;
4
- type Events = InputEvents & {
4
+ type Events = SearchFieldTypes & {
5
5
  onShownEvent: PopoverShownEvent;
6
6
  onHiddenEvent: PopoverHiddenEvent;
7
7
  };
@@ -173,8 +173,8 @@
173
173
  "attribute": "disabled",
174
174
  "reflects": true,
175
175
  "inheritedFrom": {
176
- "name": "AccordionButton",
177
- "module": "components/accordionbutton/accordionbutton.component.js"
176
+ "name": "DisabledMixin",
177
+ "module": "utils/mixins/DisabledMixin.js"
178
178
  }
179
179
  },
180
180
  {
@@ -493,8 +493,8 @@
493
493
  "default": "undefined",
494
494
  "fieldName": "disabled",
495
495
  "inheritedFrom": {
496
- "name": "AccordionButton",
497
- "module": "src/components/accordionbutton/accordionbutton.component.ts"
496
+ "name": "DisabledMixin",
497
+ "module": "src/utils/mixins/DisabledMixin.ts"
498
498
  }
499
499
  },
500
500
  {
@@ -38255,7 +38255,7 @@
38255
38255
  "declarations": [
38256
38256
  {
38257
38257
  "kind": "class",
38258
- "description": "`mdc-searchfield` component is used as an input field for search functionality.\n\nIt supports any interactable Chip component as filters. (`mdc-inputchip`, `mdc-alertchip`, `mdc-chip`)\nChips are rendered inline with the search input text, behaving like single characters.\nUsers can traverse the cursor between chips and text using arrow keys,\nand remove a chip by pressing Backspace when the cursor is adjacent to it.\n\nThis component is built by extending the `mdc-input` component.\n\n**Accessibility:**\n\nNOTE: this component should not be used in combination with a Popover or Listbox component.\nSearch results should be shown permanently on the page if using this component.\n\nFor a search field that opens a Popover, use the `mdc-searchpopover` widget instead.",
38258
+ "description": "`mdc-searchfield` component is used as an input field for search functionality.\n\nIt supports any interactable Chip component as filters. (`mdc-inputchip`, `mdc-alertchip`, `mdc-chip`)\nChips are rendered inline with the search input text, behaving like single characters.\nUsers can traverse the cursor between chips and text using arrow keys,\nand remove a chip by pressing Backspace when the cursor is adjacent to it.\n\nThis component is built by extending the `mdc-input` component.\n\nSearchfield supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:\n- In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.\n- In **controlled** mode (`control-type=\"controlled\"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the \"removed\" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).\n\n**Accessibility:**\n\nNOTE: this component should not be used in combination with a Popover or Listbox component.\nSearch results should be shown permanently on the page if using this component.\n\nFor a search field that opens a Popover, use the `mdc-searchpopover` widget instead.",
38259
38259
  "name": "Searchfield",
38260
38260
  "cssProperties": [
38261
38261
  {
@@ -38663,6 +38663,32 @@
38663
38663
  "module": "components/input/input.component.js"
38664
38664
  }
38665
38665
  },
38666
+ {
38667
+ "kind": "field",
38668
+ "name": "controlType",
38669
+ "type": {
38670
+ "text": "ControlType | undefined"
38671
+ },
38672
+ "privacy": "public",
38673
+ "description": "Indicates whether the component is controlled or uncontrolled.\n- 'controlled' it will not handle any interaction itself, e.g. toggling a checkbox.\n- 'uncontrolled' it will handle interactions\n- undefined it will get the value from controltypeprovider, or default to 'uncontrolled'",
38674
+ "default": "undefined",
38675
+ "attribute": "control-type",
38676
+ "reflects": true,
38677
+ "inheritedFrom": {
38678
+ "name": "ControlTypeMixin",
38679
+ "module": "utils/mixins/ControlTypeMixin.js"
38680
+ }
38681
+ },
38682
+ {
38683
+ "kind": "field",
38684
+ "name": "controlTypeProviderContext",
38685
+ "privacy": "private",
38686
+ "readonly": true,
38687
+ "inheritedFrom": {
38688
+ "name": "ControlTypeMixin",
38689
+ "module": "utils/mixins/ControlTypeMixin.js"
38690
+ }
38691
+ },
38666
38692
  {
38667
38693
  "kind": "field",
38668
38694
  "name": "dataAriaDescribedby",
@@ -38721,6 +38747,26 @@
38721
38747
  "module": "components/formfieldwrapper/formfieldwrapper.component.js"
38722
38748
  }
38723
38749
  },
38750
+ {
38751
+ "kind": "method",
38752
+ "name": "focus",
38753
+ "return": {
38754
+ "type": {
38755
+ "text": "void"
38756
+ }
38757
+ },
38758
+ "parameters": [
38759
+ {
38760
+ "name": "options",
38761
+ "optional": true,
38762
+ "type": {
38763
+ "text": "FocusOptions"
38764
+ },
38765
+ "description": "Focus options"
38766
+ }
38767
+ ],
38768
+ "description": "Overrides the focus method to allow programmatically focusing the input field.\nDelegate focus didn't work as expect since we have a scrollable container that contains both chips and the input, and we want to focus the input when the component itself is focused. We need to override the focus method to achieve this behavior."
38769
+ },
38724
38770
  {
38725
38771
  "kind": "field",
38726
38772
  "name": "handleFilterContainerClick"
@@ -38923,6 +38969,21 @@
38923
38969
  "module": "components/formfieldwrapper/formfieldwrapper.component.js"
38924
38970
  }
38925
38971
  },
38972
+ {
38973
+ "kind": "method",
38974
+ "name": "removeChip",
38975
+ "privacy": "private",
38976
+ "parameters": [
38977
+ {
38978
+ "name": "chip",
38979
+ "type": {
38980
+ "text": "HTMLElement"
38981
+ },
38982
+ "description": "The chip element to be removed"
38983
+ }
38984
+ ],
38985
+ "description": "Removes a chip element from the DOM and dispatches the 'chipRemove' event with the chip detail.\nIn controlled mode, the chip is not removed from the DOM, only the event is dispatched."
38986
+ },
38926
38987
  {
38927
38988
  "kind": "method",
38928
38989
  "name": "renderHelperText",
@@ -39283,6 +39344,14 @@
39283
39344
  }
39284
39345
  ],
39285
39346
  "events": [
39347
+ {
39348
+ "name": "chipRemove",
39349
+ "type": {
39350
+ "text": "CustomEvent"
39351
+ },
39352
+ "description": "(React: onChipRemove) This event is dispatched when a chip filter is removed. The removed chip element is available in event.detail.chip. In `uncontrolled` mode (default) the chip is removed from the DOM automatically; in `controlled` mode only the event is fired and the consumer is responsible for removing the chip.",
39353
+ "reactName": "onChipRemove"
39354
+ },
39286
39355
  {
39287
39356
  "description": "(React: onInput) This event is dispatched when the value of the input field changes (every press).",
39288
39357
  "name": "input",
@@ -39342,6 +39411,10 @@
39342
39411
  }
39343
39412
  ],
39344
39413
  "mixins": [
39414
+ {
39415
+ "name": "ControlTypeMixin",
39416
+ "module": "/src/utils/mixins/ControlTypeMixin"
39417
+ },
39345
39418
  {
39346
39419
  "name": "KeyDownHandledMixin",
39347
39420
  "module": "/src/utils/mixins/KeyDownHandledMixin"
@@ -39352,9 +39425,22 @@
39352
39425
  "module": "/src/components/input/input.component"
39353
39426
  },
39354
39427
  "tagName": "mdc-searchfield",
39355
- "jsDoc": "/**\n * `mdc-searchfield` component is used as an input field for search functionality.\n *\n * It supports any interactable Chip component as filters. (`mdc-inputchip`, `mdc-alertchip`, `mdc-chip`)\n * Chips are rendered inline with the search input text, behaving like single characters.\n * Users can traverse the cursor between chips and text using arrow keys,\n * and remove a chip by pressing Backspace when the cursor is adjacent to it.\n *\n * This component is built by extending the `mdc-input` component.\n *\n * **Accessibility:**\n *\n * NOTE: this component should not be used in combination with a Popover or Listbox component.\n * Search results should be shown permanently on the page if using this component.\n *\n * For a search field that opens a Popover, use the `mdc-searchpopover` widget instead.\n *\n * @tagname mdc-searchfield\n *\n * @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).\n * @event change - (React: onChange) This event is dispatched when the value of the input field changes (on blur).\n * @event focus - (React: onFocus) This event is dispatched when the input receives focus.\n * @event blur - (React: onBlur) This event is dispatched when the input loses focus.\n * @event clear - (React: onClear) This event is dispatched when the input text is cleared.\n *\n * @slot filters - Slot for chip filters rendered inline with the input text\n * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.\n * @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.\n * @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.\n * @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.\n * @slot input - Slot for the input element. If not provided, the input field will be rendered.\n * @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.\n * @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.\n * @slot trailing-button - Slot for the trailing button to clear the input field. If not provided, the clear button will be rendered when `trailingButton` property is set to true.\n *\n * @cssproperty --mdc-label-font-size - Font size for the label text.\n * @cssproperty --mdc-label-font-weight - Font weight for the label text.\n * @cssproperty --mdc-label-line-height - Line height for the label text.\n * @cssproperty --mdc-label-color - Color for the label text.\n * @cssproperty --mdc-help-text-font-size - Font size for the help text.\n * @cssproperty --mdc-help-text-font-weight - Font weight for the help text.\n * @cssproperty --mdc-help-text-line-height - Line height for the help text.\n * @cssproperty --mdc-help-text-color - Color for the help text.\n * @cssproperty --mdc-required-indicator-color - Color for the required indicator text.\n * @cssproperty --mdc-input-text-color - Text color for the input field\n * @cssproperty --mdc-input-border-color - Border color for the input container\n * @cssproperty --mdc-input-background-color - Background color for the input field\n * @cssproperty --mdc-input-support-text-color - Text color for the help text\n * @cssproperty --mdc-input-selection-text-color - Text color for the selected text\n * @cssproperty --mdc-input-selection-background-color - Background color for the selected text\n *\n * @csspart label - The label element.\n * @csspart label-text - The container for the label and required indicator elements.\n * @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.\n * @csspart info-icon-btn - The info icon button element that is displayed next to the label when the `toggletip-text` property is set.\n * @csspart label-toggletip - The toggletip element that is displayed when the info icon button is clicked.\n * @csspart help-text - The helper/validation text element.\n * @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.\n * @csspart help-text-container - The container for the helper/validation icon and text elements.\n * @csspart leading-icon - The leading icon element that is displayed before the input field.\n * @csspart prefix-text - The prefix text element that is displayed before the input field.\n * @csspart input-container - The container for the input field, leading icon, prefix text, and trailing button elements.\n * @csspart input-section - The container for the input field, leading icon, and prefix text elements.\n * @csspart input-text - The input field element.\n * @csspart trailing-button - The trailing button element that is displayed to clear the input field when the `trailingButton` property is set to true.\n * @csspart searchfield-container - The inline flow container for chips and the input field.\n */",
39428
+ "jsDoc": "/**\n * `mdc-searchfield` component is used as an input field for search functionality.\n *\n * It supports any interactable Chip component as filters. (`mdc-inputchip`, `mdc-alertchip`, `mdc-chip`)\n * Chips are rendered inline with the search input text, behaving like single characters.\n * Users can traverse the cursor between chips and text using arrow keys,\n * and remove a chip by pressing Backspace when the cursor is adjacent to it.\n *\n * This component is built by extending the `mdc-input` component.\n *\n * Searchfield supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:\n * - In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.\n * - In **controlled** mode (`control-type=\"controlled\"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the \"removed\" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).\n *\n * **Accessibility:**\n *\n * NOTE: this component should not be used in combination with a Popover or Listbox component.\n * Search results should be shown permanently on the page if using this component.\n *\n * For a search field that opens a Popover, use the `mdc-searchpopover` widget instead.\n *\n * @tagname mdc-searchfield\n *\n * @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).\n * @event change - (React: onChange) This event is dispatched when the value of the input field changes (on blur).\n * @event focus - (React: onFocus) This event is dispatched when the input receives focus.\n * @event blur - (React: onBlur) This event is dispatched when the input loses focus.\n * @event clear - (React: onClear) This event is dispatched when the input text is cleared.\n * @event chipRemove - (React: onChipRemove) This event is dispatched when a chip filter is removed. The removed chip element is available in event.detail.chip. In `uncontrolled` mode (default) the chip is removed from the DOM automatically; in `controlled` mode only the event is fired and the consumer is responsible for removing the chip.\n *\n * @slot filters - Slot for chip filters rendered inline with the input text\n * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.\n * @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.\n * @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.\n * @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.\n * @slot input - Slot for the input element. If not provided, the input field will be rendered.\n * @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.\n * @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.\n * @slot trailing-button - Slot for the trailing button to clear the input field. If not provided, the clear button will be rendered when `trailingButton` property is set to true.\n *\n * @cssproperty --mdc-label-font-size - Font size for the label text.\n * @cssproperty --mdc-label-font-weight - Font weight for the label text.\n * @cssproperty --mdc-label-line-height - Line height for the label text.\n * @cssproperty --mdc-label-color - Color for the label text.\n * @cssproperty --mdc-help-text-font-size - Font size for the help text.\n * @cssproperty --mdc-help-text-font-weight - Font weight for the help text.\n * @cssproperty --mdc-help-text-line-height - Line height for the help text.\n * @cssproperty --mdc-help-text-color - Color for the help text.\n * @cssproperty --mdc-required-indicator-color - Color for the required indicator text.\n * @cssproperty --mdc-input-text-color - Text color for the input field\n * @cssproperty --mdc-input-border-color - Border color for the input container\n * @cssproperty --mdc-input-background-color - Background color for the input field\n * @cssproperty --mdc-input-support-text-color - Text color for the help text\n * @cssproperty --mdc-input-selection-text-color - Text color for the selected text\n * @cssproperty --mdc-input-selection-background-color - Background color for the selected text\n *\n * @csspart label - The label element.\n * @csspart label-text - The container for the label and required indicator elements.\n * @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.\n * @csspart info-icon-btn - The info icon button element that is displayed next to the label when the `toggletip-text` property is set.\n * @csspart label-toggletip - The toggletip element that is displayed when the info icon button is clicked.\n * @csspart help-text - The helper/validation text element.\n * @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.\n * @csspart help-text-container - The container for the helper/validation icon and text elements.\n * @csspart leading-icon - The leading icon element that is displayed before the input field.\n * @csspart prefix-text - The prefix text element that is displayed before the input field.\n * @csspart input-container - The container for the input field, leading icon, prefix text, and trailing button elements.\n * @csspart input-section - The container for the input field, leading icon, and prefix text elements.\n * @csspart input-text - The input field element.\n * @csspart trailing-button - The trailing button element that is displayed to clear the input field when the `trailingButton` property is set to true.\n * @csspart searchfield-container - The inline flow container for chips and the input field.\n */",
39356
39429
  "customElement": true,
39357
39430
  "attributes": [
39431
+ {
39432
+ "name": "control-type",
39433
+ "type": {
39434
+ "text": "ControlType | undefined"
39435
+ },
39436
+ "description": "Indicates whether the component is controlled or uncontrolled.\n- 'controlled' it will not handle any interaction itself, e.g. toggling a checkbox.\n- 'uncontrolled' it will handle interactions\n- undefined it will get the value from controltypeprovider, or default to 'uncontrolled'",
39437
+ "default": "undefined",
39438
+ "fieldName": "controlType",
39439
+ "inheritedFrom": {
39440
+ "name": "ControlTypeMixin",
39441
+ "module": "src/utils/mixins/ControlTypeMixin.ts"
39442
+ }
39443
+ },
39358
39444
  {
39359
39445
  "name": "auto-focus-on-mount",
39360
39446
  "type": {
@@ -39753,7 +39839,7 @@
39753
39839
  "declarations": [
39754
39840
  {
39755
39841
  "kind": "class",
39756
- "description": "`mdc-searchpopover` widget is a combination of the Searchfield and Popover components, connected to ensure\nproper accessibility. This component should be used when search results or suggestions need to be displayed\nin a popover below the search input field, where the search results hold individual actions like navigating to a\na different url etc.\n\n- Don't use this when search results are displayed inline on the page -\\> use Searchfield component instead.\n- Don't use this when a list of options is filtered based on the search input -\\> use Combobox component instead.\n\nIt supports any Chip component as filters. (`mdc-inputchip`, `mdc-alertchip`, `mdc-chip`)\n\nThis component is built by extending the `mdc-searchfield` component & rendering the mdc-popover component inside.",
39842
+ "description": "`mdc-searchpopover` widget is a combination of the Searchfield and Popover components, connected to ensure\nproper accessibility. This component should be used when search results or suggestions need to be displayed\nin a popover below the search input field, where the search results hold individual actions like navigating to a\na different url etc.\n\n- Don't use this when search results are displayed inline on the page -\\> use Searchfield component instead.\n- Don't use this when a list of options is filtered based on the search input -\\> use Combobox component instead.\n\nIt supports any Chip component as filters. (`mdc-inputchip`, `mdc-alertchip`, `mdc-chip`)\n\nThis component is built by extending the `mdc-searchfield` component & rendering the mdc-popover component inside.\n\nSearchpopover supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:\n- In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.\n- In **controlled** mode (`control-type=\"controlled\"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the \"removed\" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).",
39757
39843
  "name": "Searchpopover",
39758
39844
  "cssProperties": [
39759
39845
  {
@@ -40193,6 +40279,32 @@
40193
40279
  "module": "components/input/input.component.js"
40194
40280
  }
40195
40281
  },
40282
+ {
40283
+ "kind": "field",
40284
+ "name": "controlType",
40285
+ "type": {
40286
+ "text": "ControlType | undefined"
40287
+ },
40288
+ "privacy": "public",
40289
+ "description": "Indicates whether the component is controlled or uncontrolled.\n- 'controlled' it will not handle any interaction itself, e.g. toggling a checkbox.\n- 'uncontrolled' it will handle interactions\n- undefined it will get the value from controltypeprovider, or default to 'uncontrolled'",
40290
+ "default": "undefined",
40291
+ "attribute": "control-type",
40292
+ "reflects": true,
40293
+ "inheritedFrom": {
40294
+ "name": "ControlTypeMixin",
40295
+ "module": "utils/mixins/ControlTypeMixin.js"
40296
+ }
40297
+ },
40298
+ {
40299
+ "kind": "field",
40300
+ "name": "controlTypeProviderContext",
40301
+ "privacy": "private",
40302
+ "readonly": true,
40303
+ "inheritedFrom": {
40304
+ "name": "ControlTypeMixin",
40305
+ "module": "utils/mixins/ControlTypeMixin.js"
40306
+ }
40307
+ },
40196
40308
  {
40197
40309
  "kind": "field",
40198
40310
  "name": "dataAriaDescribedby",
@@ -40262,6 +40374,30 @@
40262
40374
  "attribute": "display-popover",
40263
40375
  "reflects": true
40264
40376
  },
40377
+ {
40378
+ "kind": "method",
40379
+ "name": "focus",
40380
+ "return": {
40381
+ "type": {
40382
+ "text": "void"
40383
+ }
40384
+ },
40385
+ "parameters": [
40386
+ {
40387
+ "name": "options",
40388
+ "optional": true,
40389
+ "type": {
40390
+ "text": "FocusOptions"
40391
+ },
40392
+ "description": "Focus options"
40393
+ }
40394
+ ],
40395
+ "description": "Overrides the focus method to allow programmatically focusing the input field.\nDelegate focus didn't work as expect since we have a scrollable container that contains both chips and the input, and we want to focus the input when the component itself is focused. We need to override the focus method to achieve this behavior.",
40396
+ "inheritedFrom": {
40397
+ "name": "Searchfield",
40398
+ "module": "components/searchfield/searchfield.component.js"
40399
+ }
40400
+ },
40265
40401
  {
40266
40402
  "kind": "field",
40267
40403
  "name": "handleFilterContainerClick",
@@ -40500,6 +40636,25 @@
40500
40636
  "module": "components/formfieldwrapper/formfieldwrapper.component.js"
40501
40637
  }
40502
40638
  },
40639
+ {
40640
+ "kind": "method",
40641
+ "name": "removeChip",
40642
+ "privacy": "private",
40643
+ "parameters": [
40644
+ {
40645
+ "name": "chip",
40646
+ "type": {
40647
+ "text": "HTMLElement"
40648
+ },
40649
+ "description": "The chip element to be removed"
40650
+ }
40651
+ ],
40652
+ "description": "Removes a chip element from the DOM and dispatches the 'chipRemove' event with the chip detail.\nIn controlled mode, the chip is not removed from the DOM, only the event is dispatched.",
40653
+ "inheritedFrom": {
40654
+ "name": "Searchfield",
40655
+ "module": "components/searchfield/searchfield.component.js"
40656
+ }
40657
+ },
40503
40658
  {
40504
40659
  "kind": "method",
40505
40660
  "name": "renderHelperText",
@@ -40908,6 +41063,18 @@
40908
41063
  "module": "src/components/input/input.component.ts"
40909
41064
  }
40910
41065
  },
41066
+ {
41067
+ "name": "chipRemove",
41068
+ "type": {
41069
+ "text": "CustomEvent"
41070
+ },
41071
+ "description": "(React: onChipRemove) This event is dispatched when a chip filter is removed. The removed chip element is available in event.detail.chip. In **controlled** mode (`control-type=\"controlled\"`), the chip is NOT removed from the DOM automatically — the consumer is responsible for removing it. In **uncontrolled** mode (default), the chip is removed from the DOM automatically.",
41072
+ "reactName": "onChipRemove",
41073
+ "inheritedFrom": {
41074
+ "name": "Searchfield",
41075
+ "module": "src/components/searchfield/searchfield.component.ts"
41076
+ }
41077
+ },
40911
41078
  {
40912
41079
  "description": "(React: onShown) This event is dispatched when the popover is shown",
40913
41080
  "name": "shown",
@@ -40964,6 +41131,19 @@
40964
41131
  "description": "The aria-label for the popover within Searchpopover.\nUse to provide an accessible name for the popover i.e. \"Search results\".",
40965
41132
  "fieldName": "popoverAriaLabel"
40966
41133
  },
41134
+ {
41135
+ "name": "control-type",
41136
+ "type": {
41137
+ "text": "ControlType | undefined"
41138
+ },
41139
+ "description": "Indicates whether the component is controlled or uncontrolled.\n- 'controlled' it will not handle any interaction itself, e.g. toggling a checkbox.\n- 'uncontrolled' it will handle interactions\n- undefined it will get the value from controltypeprovider, or default to 'uncontrolled'",
41140
+ "default": "undefined",
41141
+ "fieldName": "controlType",
41142
+ "inheritedFrom": {
41143
+ "name": "ControlTypeMixin",
41144
+ "module": "src/utils/mixins/ControlTypeMixin.ts"
41145
+ }
41146
+ },
40967
41147
  {
40968
41148
  "name": "auto-focus-on-mount",
40969
41149
  "type": {
@@ -41348,7 +41528,7 @@
41348
41528
  "module": "/src/components/searchfield/searchfield.component"
41349
41529
  },
41350
41530
  "tagName": "mdc-searchpopover",
41351
- "jsDoc": "/**\n * `mdc-searchpopover` widget is a combination of the Searchfield and Popover components, connected to ensure\n * proper accessibility. This component should be used when search results or suggestions need to be displayed\n * in a popover below the search input field, where the search results hold individual actions like navigating to a\n * a different url etc.\n *\n * - Don't use this when search results are displayed inline on the page -\\> use Searchfield component instead.\n * - Don't use this when a list of options is filtered based on the search input -\\> use Combobox component instead.\n *\n * It supports any Chip component as filters. (`mdc-inputchip`, `mdc-alertchip`, `mdc-chip`)\n *\n * This component is built by extending the `mdc-searchfield` component & rendering the mdc-popover component inside.\n *\n * @tagname mdc-searchpopover\n *\n * @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).\n * @event change - (React: onChange) This event is dispatched when the value of the input field changes (on blur).\n * @event focus - (React: onFocus) This event is dispatched when the input receives focus.\n * @event blur - (React: onBlur) This event is dispatched when the input loses focus.\n * @event clear - (React: onClear) This event is dispatched when the input text is cleared.\n * @event shown - (React: onShown) This event is dispatched when the popover is shown\n * @event hidden - (React: onHidden) This event is dispatched when the popover is hidden\n *\n * @slot default - Default slot (=children) for the popover content\n * @slot filters - Slot for input chips\n * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.\n * @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.\n * @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.\n * @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.\n * @slot input - Slot for the input element. If not provided, the input field will be rendered.\n * @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.\n * @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.\n * @slot trailing-button - Slot for the trailing button to clear the input field. If not provided, the clear button will be rendered when `trailingButton` property is set to true.\n *\n * @cssproperty --mdc-label-font-size - Font size for the label text.\n * @cssproperty --mdc-label-font-weight - Font weight for the label text.\n * @cssproperty --mdc-label-line-height - Line height for the label text.\n * @cssproperty --mdc-label-color - Color for the label text.\n * @cssproperty --mdc-help-text-font-size - Font size for the help text.\n * @cssproperty --mdc-help-text-font-weight - Font weight for the help text.\n * @cssproperty --mdc-help-text-line-height - Line height for the help text.\n * @cssproperty --mdc-help-text-color - Color for the help text.\n * @cssproperty --mdc-required-indicator-color - Color for the required indicator text.\n * @cssproperty --mdc-input-text-color - Text color for the input field\n * @cssproperty --mdc-input-border-color - Border color for the input container\n * @cssproperty --mdc-input-background-color - Background color for the input field\n * @cssproperty --mdc-input-support-text-color - Text color for the help text\n * @cssproperty --mdc-input-selection-text-color - Text color for the selected text\n * @cssproperty --mdc-input-selection-background-color - Background color for the selected text\n * @cssproperty --mdc-searchpopover-width - Width of the searchpopover component\n * @cssproperty --mdc-searchpopover-popover-width - Width of the popover within the searchpopover component\n * @cssproperty --mdc-searchpopover-popover-height - Height of the popover within the searchpopover component\n *\n * @csspart label - The label element.\n * @csspart label-text - The container for the label and required indicator elements.\n * @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.\n * @csspart info-icon-btn - The info icon button element that is displayed next to the label when the `toggletip-text` property is set.\n * @csspart label-toggletip - The toggletip element that is displayed when the info icon button is clicked.\n * @csspart help-text - The helper/validation text element.\n * @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.\n * @csspart help-text-container - The container for the helper/validation icon and text elements.\n * @csspart leading-icon - The leading icon element that is displayed before the input field.\n * @csspart prefix-text - The prefix text element that is displayed before the input field.\n * @csspart input-container - The container for the input field, leading icon, prefix text, and trailing button elements.\n * @csspart input-section - The container for the input field, leading icon, and prefix text elements.\n * @csspart input-text - The input field element.\n * @csspart trailing-button - The trailing button element that is displayed to clear the input field when the `trailingButton` property is set to true.\n * @csspart popover-content - The popover content element.\n */",
41531
+ "jsDoc": "/**\n * `mdc-searchpopover` widget is a combination of the Searchfield and Popover components, connected to ensure\n * proper accessibility. This component should be used when search results or suggestions need to be displayed\n * in a popover below the search input field, where the search results hold individual actions like navigating to a\n * a different url etc.\n *\n * - Don't use this when search results are displayed inline on the page -\\> use Searchfield component instead.\n * - Don't use this when a list of options is filtered based on the search input -\\> use Combobox component instead.\n *\n * It supports any Chip component as filters. (`mdc-inputchip`, `mdc-alertchip`, `mdc-chip`)\n *\n * This component is built by extending the `mdc-searchfield` component & rendering the mdc-popover component inside.\n *\n * Searchpopover supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:\n * - In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.\n * - In **controlled** mode (`control-type=\"controlled\"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the \"removed\" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).\n *\n * @tagname mdc-searchpopover\n *\n * @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).\n * @event change - (React: onChange) This event is dispatched when the value of the input field changes (on blur).\n * @event focus - (React: onFocus) This event is dispatched when the input receives focus.\n * @event blur - (React: onBlur) This event is dispatched when the input loses focus.\n * @event clear - (React: onClear) This event is dispatched when the input text is cleared.\n * @event chipRemove - (React: onChipRemove) This event is dispatched when a chip filter is removed. The removed chip element is available in event.detail.chip.\n * In **controlled** mode (`control-type=\"controlled\"`), the chip is NOT removed from the DOM automatically — the consumer is responsible for removing it.\n * In **uncontrolled** mode (default), the chip is removed from the DOM automatically.\n * @event shown - (React: onShown) This event is dispatched when the popover is shown\n * @event hidden - (React: onHidden) This event is dispatched when the popover is hidden\n *\n * @slot default - Default slot (=children) for the popover content\n * @slot filters - Slot for input chips\n * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.\n * @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.\n * @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.\n * @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.\n * @slot input - Slot for the input element. If not provided, the input field will be rendered.\n * @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.\n * @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.\n * @slot trailing-button - Slot for the trailing button to clear the input field. If not provided, the clear button will be rendered when `trailingButton` property is set to true.\n *\n * @cssproperty --mdc-label-font-size - Font size for the label text.\n * @cssproperty --mdc-label-font-weight - Font weight for the label text.\n * @cssproperty --mdc-label-line-height - Line height for the label text.\n * @cssproperty --mdc-label-color - Color for the label text.\n * @cssproperty --mdc-help-text-font-size - Font size for the help text.\n * @cssproperty --mdc-help-text-font-weight - Font weight for the help text.\n * @cssproperty --mdc-help-text-line-height - Line height for the help text.\n * @cssproperty --mdc-help-text-color - Color for the help text.\n * @cssproperty --mdc-required-indicator-color - Color for the required indicator text.\n * @cssproperty --mdc-input-text-color - Text color for the input field\n * @cssproperty --mdc-input-border-color - Border color for the input container\n * @cssproperty --mdc-input-background-color - Background color for the input field\n * @cssproperty --mdc-input-support-text-color - Text color for the help text\n * @cssproperty --mdc-input-selection-text-color - Text color for the selected text\n * @cssproperty --mdc-input-selection-background-color - Background color for the selected text\n * @cssproperty --mdc-searchpopover-width - Width of the searchpopover component\n * @cssproperty --mdc-searchpopover-popover-width - Width of the popover within the searchpopover component\n * @cssproperty --mdc-searchpopover-popover-height - Height of the popover within the searchpopover component\n *\n * @csspart label - The label element.\n * @csspart label-text - The container for the label and required indicator elements.\n * @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.\n * @csspart info-icon-btn - The info icon button element that is displayed next to the label when the `toggletip-text` property is set.\n * @csspart label-toggletip - The toggletip element that is displayed when the info icon button is clicked.\n * @csspart help-text - The helper/validation text element.\n * @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.\n * @csspart help-text-container - The container for the helper/validation icon and text elements.\n * @csspart leading-icon - The leading icon element that is displayed before the input field.\n * @csspart prefix-text - The prefix text element that is displayed before the input field.\n * @csspart input-container - The container for the input field, leading icon, prefix text, and trailing button elements.\n * @csspart input-section - The container for the input field, leading icon, and prefix text elements.\n * @csspart input-text - The input field element.\n * @csspart trailing-button - The trailing button element that is displayed to clear the input field when the `trailingButton` property is set to true.\n * @csspart popover-content - The popover content element.\n */",
41352
41532
  "customElement": true
41353
41533
  }
41354
41534
  ],
@@ -1,5 +1,6 @@
1
1
  import { type EventName } from '@lit/react';
2
2
  import Component from '../../components/searchfield';
3
+ import type { Events } from '../../components/searchfield/searchfield.types';
3
4
  import type { Events as EventsInherited } from '../../components/input/input.types';
4
5
  /**
5
6
  * `mdc-searchfield` component is used as an input field for search functionality.
@@ -11,6 +12,10 @@ import type { Events as EventsInherited } from '../../components/input/input.typ
11
12
  *
12
13
  * This component is built by extending the `mdc-input` component.
13
14
  *
15
+ * Searchfield supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:
16
+ * - In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.
17
+ * - In **controlled** mode (`control-type="controlled"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the "removed" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).
18
+ *
14
19
  * **Accessibility:**
15
20
  *
16
21
  * NOTE: this component should not be used in combination with a Popover or Listbox component.
@@ -25,6 +30,7 @@ import type { Events as EventsInherited } from '../../components/input/input.typ
25
30
  * @event focus - (React: onFocus) This event is dispatched when the input receives focus.
26
31
  * @event blur - (React: onBlur) This event is dispatched when the input loses focus.
27
32
  * @event clear - (React: onClear) This event is dispatched when the input text is cleared.
33
+ * @event chipRemove - (React: onChipRemove) This event is dispatched when a chip filter is removed. The removed chip element is available in event.detail.chip. In `uncontrolled` mode (default) the chip is removed from the DOM automatically; in `controlled` mode only the event is fired and the consumer is responsible for removing the chip.
28
34
  *
29
35
  * @slot filters - Slot for chip filters rendered inline with the input text
30
36
  * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
@@ -69,6 +75,7 @@ import type { Events as EventsInherited } from '../../components/input/input.typ
69
75
  * @csspart searchfield-container - The inline flow container for chips and the input field.
70
76
  */
71
77
  declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
78
+ onChipRemove: EventName<Events["onChipRemoveEvent"]>;
72
79
  onInput: EventName<EventsInherited["onInputEvent"]>;
73
80
  onChange: EventName<EventsInherited["onChangeEvent"]>;
74
81
  onFocus: EventName<EventsInherited["onFocusEvent"]>;