@material/web 1.0.0-pre.11 → 1.0.0-pre.13

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.
Files changed (166) hide show
  1. package/README.md +18 -1
  2. package/button/lib/_icon.scss +9 -9
  3. package/button/lib/_outlined-button.scss +4 -0
  4. package/button/lib/button.d.ts +0 -6
  5. package/button/lib/button.js +2 -14
  6. package/button/lib/button.js.map +1 -1
  7. package/button/lib/elevated-styles.css.js +1 -1
  8. package/button/lib/elevated-styles.css.js.map +1 -1
  9. package/button/lib/filled-styles.css.js +1 -1
  10. package/button/lib/filled-styles.css.js.map +1 -1
  11. package/button/lib/outlined-styles.css.js +1 -1
  12. package/button/lib/outlined-styles.css.js.map +1 -1
  13. package/button/lib/shared-styles.css.js +1 -1
  14. package/button/lib/shared-styles.css.js.map +1 -1
  15. package/button/lib/text-styles.css.js +1 -1
  16. package/button/lib/text-styles.css.js.map +1 -1
  17. package/button/lib/tonal-styles.css.js +1 -1
  18. package/button/lib/tonal-styles.css.js.map +1 -1
  19. package/chips/assist-chip.js +2 -1
  20. package/chips/assist-chip.js.map +1 -1
  21. package/chips/filter-chip.js +3 -1
  22. package/chips/filter-chip.js.map +1 -1
  23. package/chips/harness.d.ts +2 -5
  24. package/chips/harness.js +9 -6
  25. package/chips/harness.js.map +1 -1
  26. package/chips/input-chip.js +5 -1
  27. package/chips/input-chip.js.map +1 -1
  28. package/chips/lib/_elevated.scss +14 -0
  29. package/chips/lib/_selectable.scss +8 -0
  30. package/chips/lib/_shared.scss +1 -0
  31. package/chips/lib/_trailing-icon.scss +1 -1
  32. package/chips/lib/assist-chip.d.ts +1 -0
  33. package/chips/lib/assist-chip.js +1 -0
  34. package/chips/lib/assist-chip.js.map +1 -1
  35. package/chips/lib/assist-forced-colors-styles.css.d.ts +1 -0
  36. package/chips/lib/assist-forced-colors-styles.css.js +9 -0
  37. package/chips/lib/assist-forced-colors-styles.css.js.map +1 -0
  38. package/chips/lib/assist-forced-colors-styles.scss +27 -0
  39. package/chips/lib/chip-set.js +4 -4
  40. package/chips/lib/chip-set.js.map +1 -1
  41. package/chips/lib/elevated-styles.css.js +1 -1
  42. package/chips/lib/elevated-styles.css.js.map +1 -1
  43. package/chips/lib/filter-chip.d.ts +1 -0
  44. package/chips/lib/filter-chip.js +2 -1
  45. package/chips/lib/filter-chip.js.map +1 -1
  46. package/chips/lib/filter-forced-colors-styles.css.d.ts +1 -0
  47. package/chips/lib/filter-forced-colors-styles.css.js +9 -0
  48. package/chips/lib/filter-forced-colors-styles.css.js.map +1 -0
  49. package/chips/lib/filter-forced-colors-styles.scss +34 -0
  50. package/chips/lib/input-chip.d.ts +2 -0
  51. package/chips/lib/input-chip.js +4 -2
  52. package/chips/lib/input-chip.js.map +1 -1
  53. package/chips/lib/input-forced-colors-styles.css.d.ts +1 -0
  54. package/chips/lib/input-forced-colors-styles.css.js +9 -0
  55. package/chips/lib/input-forced-colors-styles.css.js.map +1 -0
  56. package/chips/lib/input-forced-colors-styles.scss +39 -0
  57. package/chips/lib/input-styles.css.js +1 -1
  58. package/chips/lib/input-styles.css.js.map +1 -1
  59. package/chips/lib/selectable-styles.css.js +1 -1
  60. package/chips/lib/selectable-styles.css.js.map +1 -1
  61. package/chips/lib/shared-styles.css.js +1 -1
  62. package/chips/lib/shared-styles.css.js.map +1 -1
  63. package/chips/lib/suggestion-forced-colors-styles.css.d.ts +1 -0
  64. package/chips/lib/suggestion-forced-colors-styles.css.js +9 -0
  65. package/chips/lib/suggestion-forced-colors-styles.css.js.map +1 -0
  66. package/chips/lib/suggestion-forced-colors-styles.scss +27 -0
  67. package/chips/lib/trailing-icon-styles.css.js +1 -1
  68. package/chips/lib/trailing-icon-styles.css.js.map +1 -1
  69. package/chips/suggestion-chip.js +2 -1
  70. package/chips/suggestion-chip.js.map +1 -1
  71. package/dialog/lib/_dialog.scss +2 -2
  72. package/dialog/lib/_tokens.scss +5 -22
  73. package/dialog/lib/dialog-styles.css.js +1 -1
  74. package/dialog/lib/dialog-styles.css.js.map +1 -1
  75. package/dialog/lib/dialog.d.ts +9 -3
  76. package/dialog/lib/dialog.js +24 -16
  77. package/dialog/lib/dialog.js.map +1 -1
  78. package/fab/branded-fab.d.ts +1 -0
  79. package/fab/lib/_fab.scss +12 -0
  80. package/fab/lib/fab-styles.css.js +1 -1
  81. package/fab/lib/fab-styles.css.js.map +1 -1
  82. package/fab/lib/fab.d.ts +1 -0
  83. package/fab/lib/shared.d.ts +9 -0
  84. package/fab/lib/shared.js +23 -2
  85. package/fab/lib/shared.js.map +1 -1
  86. package/field/lib/_supporting-text.scss +6 -16
  87. package/field/lib/field.d.ts +26 -2
  88. package/field/lib/field.js +100 -15
  89. package/field/lib/field.js.map +1 -1
  90. package/field/lib/outlined-field.d.ts +1 -2
  91. package/field/lib/outlined-field.js.map +1 -1
  92. package/field/lib/shared-styles.css.js +1 -1
  93. package/field/lib/shared-styles.css.js.map +1 -1
  94. package/iconbutton/lib/icon-button.js +1 -1
  95. package/iconbutton/lib/icon-button.js.map +1 -1
  96. package/labs/navigationbar/lib/navigation-bar.js +2 -2
  97. package/labs/navigationbar/lib/navigation-bar.js.map +1 -1
  98. package/labs/navigationtab/lib/navigation-tab.js +3 -3
  99. package/labs/navigationtab/lib/navigation-tab.js.map +1 -1
  100. package/labs/segmentedbutton/lib/_shared.scss +7 -7
  101. package/labs/segmentedbutton/lib/outlined-styles.css.js +1 -1
  102. package/labs/segmentedbutton/lib/outlined-styles.css.js.map +1 -1
  103. package/labs/segmentedbutton/lib/segmented-button.js +2 -2
  104. package/labs/segmentedbutton/lib/segmented-button.js.map +1 -1
  105. package/labs/segmentedbutton/lib/shared-styles.css.js +1 -1
  106. package/labs/segmentedbutton/lib/shared-styles.css.js.map +1 -1
  107. package/labs/segmentedbuttonset/lib/outlined-styles.css.js +1 -1
  108. package/labs/segmentedbuttonset/lib/outlined-styles.css.js.map +1 -1
  109. package/list/harness.d.ts +24 -0
  110. package/list/harness.js +25 -0
  111. package/list/harness.js.map +1 -1
  112. package/list/lib/list.d.ts +28 -10
  113. package/list/lib/list.js +57 -19
  114. package/list/lib/list.js.map +1 -1
  115. package/list/lib/listitem/harness.d.ts +21 -1
  116. package/list/lib/listitem/harness.js +16 -2
  117. package/list/lib/listitem/harness.js.map +1 -1
  118. package/list/lib/listitem/list-item.js +4 -4
  119. package/list/lib/listitem/list-item.js.map +1 -1
  120. package/list/lib/listitemlink/list-item-link-only.d.ts +1 -0
  121. package/list/lib/listitemlink/list-item-link-only.js +4 -1
  122. package/list/lib/listitemlink/list-item-link-only.js.map +1 -1
  123. package/menu/harness.js.map +1 -1
  124. package/menu/lib/menu.d.ts +15 -1
  125. package/menu/lib/menu.js +29 -6
  126. package/menu/lib/menu.js.map +1 -1
  127. package/package.json +5 -4
  128. package/radio/lib/single-selection-controller.js +2 -3
  129. package/radio/lib/single-selection-controller.js.map +1 -1
  130. package/select/harness.js +1 -1
  131. package/select/harness.js.map +1 -1
  132. package/select/lib/_shared.scss +2 -1
  133. package/select/lib/select.d.ts +1 -11
  134. package/select/lib/select.js +15 -51
  135. package/select/lib/select.js.map +1 -1
  136. package/select/lib/shared-styles.css.js +1 -1
  137. package/select/lib/shared-styles.css.js.map +1 -1
  138. package/slider/lib/slider.d.ts +3 -3
  139. package/slider/lib/slider.js +10 -10
  140. package/slider/lib/slider.js.map +1 -1
  141. package/switch/lib/switch.js +1 -1
  142. package/switch/lib/switch.js.map +1 -1
  143. package/tabs/lib/tab.js +4 -2
  144. package/tabs/lib/tab.js.map +1 -1
  145. package/tabs/lib/tabs.js +3 -1
  146. package/tabs/lib/tabs.js.map +1 -1
  147. package/textfield/lib/_shared.scss +0 -4
  148. package/textfield/lib/shared-styles.css.js +1 -1
  149. package/textfield/lib/shared-styles.css.js.map +1 -1
  150. package/textfield/lib/text-field.d.ts +2 -13
  151. package/textfield/lib/text-field.js +44 -98
  152. package/textfield/lib/text-field.js.map +1 -1
  153. package/tokens/_md-comp-dialog.scss +48 -6
  154. package/tokens/_md-comp-elevated-button.scss +17 -7
  155. package/tokens/_md-comp-elevation.scss +11 -2
  156. package/tokens/_md-comp-filled-button.scss +17 -7
  157. package/tokens/_md-comp-filled-tonal-button.scss +17 -7
  158. package/tokens/_md-comp-input-chip.scss +7 -0
  159. package/tokens/_md-comp-list-item.scss +5 -0
  160. package/tokens/_md-comp-menu-item.scss +1 -0
  161. package/tokens/_md-comp-outlined-button.scss +19 -9
  162. package/tokens/_md-comp-outlined-segmented-button.scss +19 -13
  163. package/tokens/_md-comp-slider.scss +48 -2
  164. package/tokens/_md-comp-suggestion-chip.scss +1 -0
  165. package/tokens/_md-comp-text-button.scss +17 -7
  166. package/tokens/_values.scss +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"harness.js","sourceRoot":"","sources":["harness.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,uBAAuB,CAAC;AAO9C;;GAEG;AACH,MAAM,OAAO,WAAY,SACrB,OAA+D;IADnE;;QAEE,WAAM,GAAyB,SAAS,CAAC;IA0B3C,CAAC;IAxBoB,KAAK,CAAC,qBAAqB;QAC5C,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;QAClC,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,EAAE;YAC9B,4CAA4C;YAC5C,MAAM,EAAC,cAAc,EAAC,GAClB,IAAI,CAAC,OAAgD,CAAC;YAC1D,IAAI,CAAC,cAAc,EAAE;gBACnB,MAAM,IAAI,KAAK,CACX,mFAAmF,CAAC,CAAC;aAC1F;YAED,OAAO,cAAc,CAAC;SACvB;QAED,MAAM,EAAC,SAAS,EAAC,GAAG,IAAI,CAAC,OAAyC,CAAC;QACnE,MAAM,aAAa,GAAG,SAAS;YAC3B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAc,IAAI,SAAS,EAAE,CAAC,CAAC;QACxE,IAAI,CAAC,aAAa,EAAE;YAClB,MAAM,IAAI,KAAK,CACX,iFAAiF,CAAC,CAAC;SACxF;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Harness} from '../testing/harness.js';\n\nimport {MdAssistChip} from './assist-chip.js';\nimport {MdFilterChip} from './filter-chip.js';\nimport {MdInputChip} from './input-chip.js';\nimport {MdSuggestionChip} from './suggestion-chip.js';\n\n/**\n * Test harness for chips.\n */\nexport class ChipHarness extends\n Harness<MdAssistChip|MdFilterChip|MdInputChip|MdSuggestionChip> {\n action: 'primary'|'trailing' = 'primary';\n\n protected override async getInteractiveElement() {\n await this.element.updateComplete;\n if (this.action === 'trailing') {\n // Retrieve MultiActionChip's trailingAction\n const {trailingAction} =\n this.element as {trailingAction?: HTMLElement | null};\n if (!trailingAction) {\n throw new Error(\n '`ChipHarness.action` is \"trailing\", but the chip does not have a trailing action.');\n }\n\n return trailingAction;\n }\n\n const {primaryId} = this.element as unknown as {primaryId: string};\n const primaryAction = primaryId &&\n this.element.renderRoot.querySelector<HTMLElement>(`#${primaryId}`);\n if (!primaryAction) {\n throw new Error(\n '`ChipHarness.action` is \"primary\", but the chip does not have a primary action.');\n }\n\n return primaryAction;\n }\n}\n"]}
1
+ {"version":3,"file":"harness.js","sourceRoot":"","sources":["harness.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,uBAAuB,CAAC;AAI9C;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAa;IAA9C;;QACE,WAAM,GAAyB,SAAS,CAAC;IA8B3C,CAAC;IA5BoB,KAAK,CAAC,qBAAqB;QAC5C,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;QAClC,MAAM,EAAC,SAAS,EAAC,GAAG,IAAI,CAAC,OAAyC,CAAC;QACnE,MAAM,aAAa,GAAG,SAAS;YAC3B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAc,IAAI,SAAS,EAAE,CAAC,CAAC;QACxE,4CAA4C;QAC5C,MAAM,EAAC,cAAc,EAAC,GAClB,IAAI,CAAC,OAAgD,CAAC;QAE1D,0EAA0E;QAC1E,yEAAyE;QACzE,UAAU;QACV,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,IAAI,CAAC,aAAa,EAAE;YAChD,IAAI,CAAC,cAAc,EAAE;gBACnB,MAAM,IAAI,KAAK,CACX,mFAAmF,CAAC,CAAC;aAC1F;YAED,OAAO,cAAc,CAAC;SACvB;QAED,IAAI,CAAC,aAAa,EAAE;YAClB,MAAM,IAAI,KAAK,CACX,iFAAiF,CAAC,CAAC;SACxF;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Harness} from '../testing/harness.js';\n\nimport {Chip} from './lib/chip.js';\n\n/**\n * Test harness for chips.\n */\nexport class ChipHarness extends Harness<Chip> {\n action: 'primary'|'trailing' = 'primary';\n\n protected override async getInteractiveElement() {\n await this.element.updateComplete;\n const {primaryId} = this.element as unknown as {primaryId: string};\n const primaryAction = primaryId &&\n this.element.renderRoot.querySelector<HTMLElement>(`#${primaryId}`);\n // Retrieve MultiActionChip's trailingAction\n const {trailingAction} =\n this.element as {trailingAction?: HTMLElement | null};\n\n // Default to trailing action if there isn't a primary action and the user\n // didn't explicitly set `harness.action = 'trailing'` (remove-only input\n // chips).\n if (this.action === 'trailing' || !primaryAction) {\n if (!trailingAction) {\n throw new Error(\n '`ChipHarness.action` is \"trailing\", but the chip does not have a trailing action.');\n }\n\n return trailingAction;\n }\n\n if (!primaryAction) {\n throw new Error(\n '`ChipHarness.action` is \"primary\", but the chip does not have a primary action.');\n }\n\n return primaryAction;\n }\n}\n"]}
@@ -6,6 +6,7 @@
6
6
  import { __decorate } from "tslib";
7
7
  import { customElement } from 'lit/decorators.js';
8
8
  import { InputChip } from './lib/input-chip.js';
9
+ import { styles as forcedColorsStyles } from './lib/input-forced-colors-styles.css.js';
9
10
  import { styles } from './lib/input-styles.css.js';
10
11
  import { styles as selectableStyles } from './lib/selectable-styles.css.js';
11
12
  import { styles as sharedStyles } from './lib/shared-styles.css.js';
@@ -18,7 +19,10 @@ import { styles as trailingIconStyles } from './lib/trailing-icon-styles.css.js'
18
19
  */
19
20
  let MdInputChip = class MdInputChip extends InputChip {
20
21
  };
21
- MdInputChip.styles = [sharedStyles, trailingIconStyles, selectableStyles, styles];
22
+ MdInputChip.styles = [
23
+ sharedStyles, trailingIconStyles, selectableStyles, styles,
24
+ forcedColorsStyles
25
+ ];
22
26
  MdInputChip = __decorate([
23
27
  customElement('md-input-chip')
24
28
  ], MdInputChip);
@@ -1 +1 @@
1
- {"version":3,"file":"input-chip.js","sourceRoot":"","sources":["input-chip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,MAAM,EAAC,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAC,MAAM,IAAI,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAC,MAAM,IAAI,YAAY,EAAC,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAC,MAAM,IAAI,kBAAkB,EAAC,MAAM,mCAAmC,CAAC;AAQ/E;;;;;GAKG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,SAAS;;AACxB,kBAAM,GAClB,CAAC,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAFtD,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CAGvB;SAHY,WAAW","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {customElement} from 'lit/decorators.js';\n\nimport {InputChip} from './lib/input-chip.js';\nimport {styles} from './lib/input-styles.css.js';\nimport {styles as selectableStyles} from './lib/selectable-styles.css.js';\nimport {styles as sharedStyles} from './lib/shared-styles.css.js';\nimport {styles as trailingIconStyles} from './lib/trailing-icon-styles.css.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'md-input-chip': MdInputChip;\n }\n}\n\n/**\n * TODO(b/243982145): add docs\n *\n * @final\n * @suppress {visibility}\n */\n@customElement('md-input-chip')\nexport class MdInputChip extends InputChip {\n static override styles =\n [sharedStyles, trailingIconStyles, selectableStyles, styles];\n}\n"]}
1
+ {"version":3,"file":"input-chip.js","sourceRoot":"","sources":["input-chip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,MAAM,IAAI,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAC,MAAM,EAAC,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAC,MAAM,IAAI,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAC,MAAM,IAAI,YAAY,EAAC,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAC,MAAM,IAAI,kBAAkB,EAAC,MAAM,mCAAmC,CAAC;AAQ/E;;;;;GAKG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,SAAS;;AACxB,kBAAM,GAAG;IACvB,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM;IAC1D,kBAAkB;CACnB,CAAC;AAJS,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CAKvB;SALY,WAAW","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {customElement} from 'lit/decorators.js';\n\nimport {InputChip} from './lib/input-chip.js';\nimport {styles as forcedColorsStyles} from './lib/input-forced-colors-styles.css.js';\nimport {styles} from './lib/input-styles.css.js';\nimport {styles as selectableStyles} from './lib/selectable-styles.css.js';\nimport {styles as sharedStyles} from './lib/shared-styles.css.js';\nimport {styles as trailingIconStyles} from './lib/trailing-icon-styles.css.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'md-input-chip': MdInputChip;\n }\n}\n\n/**\n * TODO(b/243982145): add docs\n *\n * @final\n * @suppress {visibility}\n */\n@customElement('md-input-chip')\nexport class MdInputChip extends InputChip {\n static override styles = [\n sharedStyles, trailingIconStyles, selectableStyles, styles,\n forcedColorsStyles\n ];\n}\n"]}
@@ -57,4 +57,18 @@
57
57
  background: var(--_elevated-disabled-container-color);
58
58
  opacity: var(--_elevated-disabled-container-opacity);
59
59
  }
60
+
61
+ @media (forced-colors: active) {
62
+ .elevated md-elevation {
63
+ border: 1px solid transparent;
64
+ }
65
+
66
+ .elevated.link md-elevation {
67
+ border-color: ActiveText;
68
+ }
69
+
70
+ .elevated.disabled md-elevation {
71
+ border-color: GrayText;
72
+ }
73
+ }
60
74
  }
@@ -63,4 +63,12 @@
63
63
  .selected:active .leading.icon {
64
64
  color: var(--_selected-pressed-leading-icon-color);
65
65
  }
66
+
67
+ @media (forced-colors: active) {
68
+ .selected:not(.elevated)::before {
69
+ // for forced-colors. Don't add it to elevated containers since elevation
70
+ // already have a border added.
71
+ border: 1px solid transparent;
72
+ }
73
+ }
66
74
  }
@@ -157,6 +157,7 @@
157
157
  .icon {
158
158
  align-self: center;
159
159
  display: flex;
160
+ fill: currentColor;
160
161
  position: relative;
161
162
  }
162
163
 
@@ -33,7 +33,7 @@
33
33
  width: calc(4 / 3 * var(--_icon-size)); // 24px default
34
34
  }
35
35
 
36
- :has(.trailing.action) .primary.action {
36
+ .has-trailing .primary.action {
37
37
  padding-inline-end: 0;
38
38
  }
39
39
 
@@ -17,6 +17,7 @@ export declare class AssistChip extends Chip {
17
17
  protected getContainerClasses(): {
18
18
  disabled: boolean;
19
19
  elevated: boolean;
20
+ link: boolean;
20
21
  };
21
22
  protected renderAction(): import("lit-html").TemplateResult<1>;
22
23
  protected renderOutline(): import("lit-html").TemplateResult<1>;
@@ -31,6 +31,7 @@ export class AssistChip extends Chip {
31
31
  // Link chips cannot be disabled
32
32
  disabled: !this.href && this.disabled,
33
33
  elevated: this.elevated,
34
+ link: !!this.href,
34
35
  };
35
36
  }
36
37
  renderAction() {
@@ -1 +1 @@
1
- {"version":3,"file":"assist-chip.js","sourceRoot":"","sources":["assist-chip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAI3C,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAE/B;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,IAAI;IAApC;;QAC6B,aAAQ,GAAG,KAAK,CAAC;QAChC,SAAI,GAAG,EAAE,CAAC;QACV,WAAM,GAAyC,EAAE,CAAC;IAkDhE,CAAC;IAhDC,IAAc,SAAS;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IACvC,CAAC;IAED,IAAuB,cAAc;QACnC,gCAAgC;QAChC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC;IACrC,CAAC;IAEkB,mBAAmB;QACpC,OAAO;YACL,GAAG,KAAK,CAAC,mBAAmB,EAAE;YAC9B,gCAAgC;YAChC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ;YACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;IACJ,CAAC;IAEkB,YAAY;QAC7B,MAAM,EAAC,SAAS,EAAC,GAAG,IAAuB,CAAC;QAC5C,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,OAAO,IAAI,CAAA;;;uBAGM,SAAS,IAAI,OAAO;iBAC1B,IAAI,CAAC,IAAI;mBACP,IAAI,CAAC,MAAM,IAAI,OAAO;WAC9B,IAAI,CAAC,aAAa,EAAE;OACxB,CAAC;SACH;QAED,OAAO,IAAI,CAAA;;;qBAGM,SAAS,IAAI,OAAO;oBACrB,IAAI,CAAC,QAAQ;;SAExB,IAAI,CAAC,aAAa,EAAE;KACxB,CAAC;IACJ,CAAC;IAEkB,aAAa;QAC9B,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,IAAI,CAAA,+BAA+B,CAAC;SAC5C;QAED,OAAO,KAAK,CAAC,aAAa,EAAE,CAAC;IAC/B,CAAC;CACF;AApD4B;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;4CAAkB;AAChC;IAAX,QAAQ,EAAE;wCAAW;AACV;IAAX,QAAQ,EAAE;0CAAmD","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../elevation/elevation.js';\n\nimport {html, nothing} from 'lit';\nimport {property} from 'lit/decorators.js';\n\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\n\nimport {Chip} from './chip.js';\n\n/**\n * An assist chip component.\n */\nexport class AssistChip extends Chip {\n @property({type: Boolean}) elevated = false;\n @property() href = '';\n @property() target: '_blank'|'_parent'|'_self'|'_top'|'' = '';\n\n protected get primaryId() {\n return this.href ? 'link' : 'button';\n }\n\n protected override get rippleDisabled() {\n // Link chips cannot be disabled\n return !this.href && this.disabled;\n }\n\n protected override getContainerClasses() {\n return {\n ...super.getContainerClasses(),\n // Link chips cannot be disabled\n disabled: !this.href && this.disabled,\n elevated: this.elevated,\n };\n }\n\n protected override renderAction() {\n const {ariaLabel} = this as ARIAMixinStrict;\n if (this.href) {\n return html`\n <a class=\"primary action\"\n id=\"link\"\n aria-label=${ariaLabel || nothing}\n href=${this.href}\n target=${this.target || nothing}\n >${this.renderContent()}</a>\n `;\n }\n\n return html`\n <button class=\"primary action\"\n id=\"button\"\n aria-label=${ariaLabel || nothing}\n ?disabled=${this.disabled}\n type=\"button\"\n >${this.renderContent()}</button>\n `;\n }\n\n protected override renderOutline() {\n if (this.elevated) {\n return html`<md-elevation></md-elevation>`;\n }\n\n return super.renderOutline();\n }\n}\n"]}
1
+ {"version":3,"file":"assist-chip.js","sourceRoot":"","sources":["assist-chip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAI3C,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAE/B;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,IAAI;IAApC;;QAC6B,aAAQ,GAAG,KAAK,CAAC;QAChC,SAAI,GAAG,EAAE,CAAC;QACV,WAAM,GAAyC,EAAE,CAAC;IAmDhE,CAAC;IAjDC,IAAc,SAAS;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IACvC,CAAC;IAED,IAAuB,cAAc;QACnC,gCAAgC;QAChC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC;IACrC,CAAC;IAEkB,mBAAmB;QACpC,OAAO;YACL,GAAG,KAAK,CAAC,mBAAmB,EAAE;YAC9B,gCAAgC;YAChC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ;YACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI;SAClB,CAAC;IACJ,CAAC;IAEkB,YAAY;QAC7B,MAAM,EAAC,SAAS,EAAC,GAAG,IAAuB,CAAC;QAC5C,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,OAAO,IAAI,CAAA;;;uBAGM,SAAS,IAAI,OAAO;iBAC1B,IAAI,CAAC,IAAI;mBACP,IAAI,CAAC,MAAM,IAAI,OAAO;WAC9B,IAAI,CAAC,aAAa,EAAE;OACxB,CAAC;SACH;QAED,OAAO,IAAI,CAAA;;;qBAGM,SAAS,IAAI,OAAO;oBACrB,IAAI,CAAC,QAAQ;;SAExB,IAAI,CAAC,aAAa,EAAE;KACxB,CAAC;IACJ,CAAC;IAEkB,aAAa;QAC9B,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,IAAI,CAAA,+BAA+B,CAAC;SAC5C;QAED,OAAO,KAAK,CAAC,aAAa,EAAE,CAAC;IAC/B,CAAC;CACF;AArD4B;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;4CAAkB;AAChC;IAAX,QAAQ,EAAE;wCAAW;AACV;IAAX,QAAQ,EAAE;0CAAmD","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../elevation/elevation.js';\n\nimport {html, nothing} from 'lit';\nimport {property} from 'lit/decorators.js';\n\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\n\nimport {Chip} from './chip.js';\n\n/**\n * An assist chip component.\n */\nexport class AssistChip extends Chip {\n @property({type: Boolean}) elevated = false;\n @property() href = '';\n @property() target: '_blank'|'_parent'|'_self'|'_top'|'' = '';\n\n protected get primaryId() {\n return this.href ? 'link' : 'button';\n }\n\n protected override get rippleDisabled() {\n // Link chips cannot be disabled\n return !this.href && this.disabled;\n }\n\n protected override getContainerClasses() {\n return {\n ...super.getContainerClasses(),\n // Link chips cannot be disabled\n disabled: !this.href && this.disabled,\n elevated: this.elevated,\n link: !!this.href,\n };\n }\n\n protected override renderAction() {\n const {ariaLabel} = this as ARIAMixinStrict;\n if (this.href) {\n return html`\n <a class=\"primary action\"\n id=\"link\"\n aria-label=${ariaLabel || nothing}\n href=${this.href}\n target=${this.target || nothing}\n >${this.renderContent()}</a>\n `;\n }\n\n return html`\n <button class=\"primary action\"\n id=\"button\"\n aria-label=${ariaLabel || nothing}\n ?disabled=${this.disabled}\n type=\"button\"\n >${this.renderContent()}</button>\n `;\n }\n\n protected override renderOutline() {\n if (this.elevated) {\n return html`<md-elevation></md-elevation>`;\n }\n\n return super.renderOutline();\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { css } from 'lit';
7
+ export const styles = css `@media(forced-colors: active){:host{--md-assist-chip-disabled-label-text-color: GrayText;--md-assist-chip-disabled-label-text-opacity: 1;--md-assist-chip-disabled-leading-icon-color: GrayText;--md-assist-chip-disabled-leading-icon-opacity: 1;--md-assist-chip-disabled-outline-color: GrayText;--md-assist-chip-disabled-outline-opacity: 1}.link .outline{border-color:ActiveText}}/*# sourceMappingURL=assist-forced-colors-styles.css.map */
8
+ `;
9
+ //# sourceMappingURL=assist-forced-colors-styles.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assist-forced-colors-styles.css.js","sourceRoot":"","sources":["assist-forced-colors-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`@media(forced-colors: active){:host{--md-assist-chip-disabled-label-text-color: GrayText;--md-assist-chip-disabled-label-text-opacity: 1;--md-assist-chip-disabled-leading-icon-color: GrayText;--md-assist-chip-disabled-leading-icon-opacity: 1;--md-assist-chip-disabled-outline-color: GrayText;--md-assist-chip-disabled-outline-opacity: 1}.link .outline{border-color:ActiveText}}/*# sourceMappingURL=assist-forced-colors-styles.css.map */\n`;\n "]}
@@ -0,0 +1,27 @@
1
+ //
2
+ // Copyright 2023 Google LLC
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ //
5
+
6
+ // go/keep-sorted start
7
+ @use './assist-chip';
8
+ // go/keep-sorted end
9
+
10
+ @media (forced-colors: active) {
11
+ :host {
12
+ @include assist-chip.theme(
13
+ (
14
+ 'disabled-label-text-color': GrayText,
15
+ 'disabled-label-text-opacity': 1,
16
+ 'disabled-leading-icon-color': GrayText,
17
+ 'disabled-leading-icon-opacity': 1,
18
+ 'disabled-outline-color': GrayText,
19
+ 'disabled-outline-opacity': 1,
20
+ )
21
+ );
22
+ }
23
+
24
+ .link .outline {
25
+ border-color: ActiveText;
26
+ }
27
+ }
@@ -65,13 +65,13 @@ export class ChipSet extends LitElement {
65
65
  if (!isLeft && !isRight && !isDown && !isUp && !isHome && !isEnd) {
66
66
  return;
67
67
  }
68
- // Prevent default interactions, such as scrolling.
69
- event.preventDefault();
70
68
  const { chips } = this;
71
69
  // Don't try to select another chip if there aren't any.
72
70
  if (chips.length < 2) {
73
71
  return;
74
72
  }
73
+ // Prevent default interactions, such as scrolling.
74
+ event.preventDefault();
75
75
  if (isHome || isEnd) {
76
76
  const index = isHome ? 0 : chips.length - 1;
77
77
  chips[index].focus({ trailing: isEnd });
@@ -80,7 +80,7 @@ export class ChipSet extends LitElement {
80
80
  }
81
81
  // Check if moving forwards or backwards
82
82
  const isRtl = getComputedStyle(this).direction === 'rtl';
83
- const forwards = isRtl ? isLeft || isDown : isRight || isDown;
83
+ const forwards = isRtl ? isLeft || isUp : isRight || isDown;
84
84
  const focusedChip = chips.find(chip => chip.matches(':focus-within'));
85
85
  if (!focusedChip) {
86
86
  // If there is not already a chip focused, select the first or last chip
@@ -160,6 +160,6 @@ __decorate([
160
160
  property({ type: Boolean, attribute: 'single-select' })
161
161
  ], ChipSet.prototype, "singleSelect", void 0);
162
162
  __decorate([
163
- queryAssignedElements({ flatten: true })
163
+ queryAssignedElements()
164
164
  ], ChipSet.prototype, "childElements", void 0);
165
165
  //# sourceMappingURL=chip-set.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chip-set.js","sourceRoot":"","sources":["chip-set.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;AAEH,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AACxE,OAAO,EAAC,QAAQ,EAAE,qBAAqB,EAAC,MAAM,mBAAmB,CAAC;AAGlE,OAAO,EAAC,yBAAyB,EAAC,MAAM,iCAAiC,CAAC;AAE1E,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAO/B;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,UAAU;IAKrC,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAC5B,CAAC,KAAK,EAAiB,EAAE,CAAC,KAAK,YAAY,IAAI,CAAC,CAAC;IACvD,CAAC;IAQD;QACE,KAAK,EAAE,CAAC;QAPE,SAAI,GAAgB,EAAE,CAAC;QACoB,iBAAY,GAAG,KAAK,CAAC;QAO1E,IAAI,CAAC,QAAQ,EAAE;YACb,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACnE,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAChE,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SACnE;IACH,CAAC;IAEkB,OAAO,CAAC,OAA6B;QACtD,IAAI,OAA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Ac,EAAE;YACnB,KAAK,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;SACvC;IACH,CAAC;IAEO,cAAc,CAAC,KAAY;QACjC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACtB,OAAO;SACR;QAED,IAAK,KAAK,CAAC,MAA8B,CAAC,QAAQ,KAAK,IAAI,EAAE;YAC3D,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAA8B,EAAE;gBACtD,IAAI,IAAI,KAAK,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE;oBAC1C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;iBACvB;aACF;SACF;IACH,CAAC;CACF;;AA9JC;IACE,yBAAyB,CAAC,EAAI,CAAC,CAAC;AAClC,CAAC,GAAA,CAAA;AAOW;IAAX,QAAQ,EAAE;qCAAwB;AACoB;IAAtD,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAC,CAAC;6CAAsB;AAG5E;IADC,qBAAqB,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;8CACQ","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, isServer, LitElement, nothing, PropertyValues} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\n\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../internal/aria/delegate.js';\n\nimport {Chip} from './chip.js';\n\n/**\n * The type of chip a chip set controls.\n */\nexport type ChipSetType = 'assist'|'suggestion'|'filter'|'input'|'';\n\n/**\n * A chip set component.\n */\nexport class ChipSet extends LitElement {\n static {\n requestUpdateOnAriaChange(this);\n }\n\n get chips() {\n return this.childElements.filter(\n (child): child is Chip => child instanceof Chip);\n }\n\n @property() type: ChipSetType = '';\n @property({type: Boolean, attribute: 'single-select'}) singleSelect = false;\n\n @queryAssignedElements({flatten: true})\n private readonly childElements!: HTMLElement[];\n\n constructor() {\n super();\n if (!isServer) {\n this.addEventListener('focusin', this.updateTabIndices.bind(this));\n this.addEventListener('keydown', this.handleKeyDown.bind(this));\n this.addEventListener('selected', this.handleSelected.bind(this));\n }\n }\n\n protected override updated(changed: PropertyValues<this>) {\n if (changed.has('singleSelect') && this.singleSelect) {\n let hasSelectedChip = false;\n for (const chip of this.chips as MaybeSelectableChip[]) {\n if (chip.selected === true) {\n if (!hasSelectedChip) {\n hasSelectedChip = true;\n continue;\n }\n\n chip.selected = false;\n }\n }\n }\n }\n\n protected override render() {\n const {ariaLabel} = this as ARIAMixinStrict;\n const isFilter = this.type === 'filter';\n const role = isFilter ? 'listbox' : 'grid';\n const multiselectable = isFilter ? !this.singleSelect : nothing;\n return html`\n <div class=\"content\"\n role=${role}\n aria-label=${ariaLabel || nothing}\n aria-multiselectable=${multiselectable}>\n <slot @slotchange=${this.updateTabIndices}></slot>\n </div>\n `;\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n const isDown = event.key === 'ArrowDown';\n const isUp = event.key === 'ArrowUp';\n const isLeft = event.key === 'ArrowLeft';\n const isRight = event.key === 'ArrowRight';\n const isHome = event.key === 'Home';\n const isEnd = event.key === 'End';\n // Ignore non-navigation keys\n if (!isLeft && !isRight && !isDown && !isUp && !isHome && !isEnd) {\n return;\n }\n\n // Prevent default interactions, such as scrolling.\n event.preventDefault();\n\n const {chips} = this as {chips: MaybeMultiActionChip[]};\n // Don't try to select another chip if there aren't any.\n if (chips.length < 2) {\n return;\n }\n\n if (isHome || isEnd) {\n const index = isHome ? 0 : chips.length - 1;\n chips[index].focus({trailing: isEnd});\n this.updateTabIndices();\n return;\n }\n\n // Check if moving forwards or backwards\n const isRtl = getComputedStyle(this).direction === 'rtl';\n const forwards = isRtl ? isLeft || isDown : isRight || isDown;\n const focusedChip = chips.find(chip => chip.matches(':focus-within'));\n if (!focusedChip) {\n // If there is not already a chip focused, select the first or last chip\n // based on the direction we're traveling.\n const nextChip = forwards ? chips[0] : chips[chips.length - 1];\n nextChip.focus({trailing: !forwards});\n this.updateTabIndices();\n return;\n }\n\n const currentIndex = chips.indexOf(focusedChip);\n let nextIndex = forwards ? currentIndex + 1 : currentIndex - 1;\n // Search for the next sibling that is not disabled to select.\n // If we return to the host index, there is nothing to select.\n while (nextIndex !== currentIndex) {\n if (nextIndex >= chips.length) {\n // Return to start if moving past the last item.\n nextIndex = 0;\n } else if (nextIndex < 0) {\n // Go to end if moving before the first item.\n nextIndex = chips.length - 1;\n }\n\n // Check if the next sibling is disabled. If so,\n // move the index and continue searching.\n const nextChip = chips[nextIndex];\n if (nextChip.disabled) {\n if (forwards) {\n nextIndex++;\n } else {\n nextIndex--;\n }\n\n continue;\n }\n\n nextChip.focus({trailing: !forwards});\n this.updateTabIndices();\n break;\n }\n }\n\n private updateTabIndices() {\n const {chips} = this;\n let hasFocusedChip = false;\n for (const chip of chips) {\n if (chip.matches(':focus-within')) {\n chip.removeAttribute('tabindex');\n hasFocusedChip = true;\n } else {\n chip.tabIndex = -1;\n }\n }\n\n if (!hasFocusedChip) {\n chips[0]?.removeAttribute('tabindex');\n }\n }\n\n private handleSelected(event: Event) {\n if (!this.singleSelect) {\n return;\n }\n\n if ((event.target as MaybeSelectableChip).selected === true) {\n for (const chip of this.chips as MaybeSelectableChip[]) {\n if (chip !== event.target && chip.selected) {\n chip.selected = false;\n }\n }\n }\n }\n}\n\ninterface MaybeMultiActionChip extends Chip {\n focus(options?: FocusOptions&{trailing?: boolean}): void;\n}\n\ninterface MaybeSelectableChip extends Chip {\n selected?: boolean;\n}\n"]}
1
+ {"version":3,"file":"chip-set.js","sourceRoot":"","sources":["chip-set.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;AAEH,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AACxE,OAAO,EAAC,QAAQ,EAAE,qBAAqB,EAAC,MAAM,mBAAm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IACH,CAAC;CACF;;AA7JC;IACE,yBAAyB,CAAC,EAAI,CAAC,CAAC;AAClC,CAAC,GAAA,CAAA;AAOW;IAAX,QAAQ,EAAE;qCAAwB;AACoB;IAAtD,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAC,CAAC;6CAAsB;AAEnD;IAAxB,qBAAqB,EAAE;8CAAgD","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, isServer, LitElement, nothing, PropertyValues} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\n\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../internal/aria/delegate.js';\n\nimport {Chip} from './chip.js';\n\n/**\n * The type of chip a chip set controls.\n */\nexport type ChipSetType = 'assist'|'suggestion'|'filter'|'input'|'';\n\n/**\n * A chip set component.\n */\nexport class ChipSet extends LitElement {\n static {\n requestUpdateOnAriaChange(this);\n }\n\n get chips() {\n return this.childElements.filter(\n (child): child is Chip => child instanceof Chip);\n }\n\n @property() type: ChipSetType = '';\n @property({type: Boolean, attribute: 'single-select'}) singleSelect = false;\n\n @queryAssignedElements() private readonly childElements!: HTMLElement[];\n\n constructor() {\n super();\n if (!isServer) {\n this.addEventListener('focusin', this.updateTabIndices.bind(this));\n this.addEventListener('keydown', this.handleKeyDown.bind(this));\n this.addEventListener('selected', this.handleSelected.bind(this));\n }\n }\n\n protected override updated(changed: PropertyValues<this>) {\n if (changed.has('singleSelect') && this.singleSelect) {\n let hasSelectedChip = false;\n for (const chip of this.chips as MaybeSelectableChip[]) {\n if (chip.selected === true) {\n if (!hasSelectedChip) {\n hasSelectedChip = true;\n continue;\n }\n\n chip.selected = false;\n }\n }\n }\n }\n\n protected override render() {\n const {ariaLabel} = this as ARIAMixinStrict;\n const isFilter = this.type === 'filter';\n const role = isFilter ? 'listbox' : 'grid';\n const multiselectable = isFilter ? !this.singleSelect : nothing;\n return html`\n <div class=\"content\"\n role=${role}\n aria-label=${ariaLabel || nothing}\n aria-multiselectable=${multiselectable}>\n <slot @slotchange=${this.updateTabIndices}></slot>\n </div>\n `;\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n const isDown = event.key === 'ArrowDown';\n const isUp = event.key === 'ArrowUp';\n const isLeft = event.key === 'ArrowLeft';\n const isRight = event.key === 'ArrowRight';\n const isHome = event.key === 'Home';\n const isEnd = event.key === 'End';\n // Ignore non-navigation keys\n if (!isLeft && !isRight && !isDown && !isUp && !isHome && !isEnd) {\n return;\n }\n\n const {chips} = this as {chips: MaybeMultiActionChip[]};\n // Don't try to select another chip if there aren't any.\n if (chips.length < 2) {\n return;\n }\n\n // Prevent default interactions, such as scrolling.\n event.preventDefault();\n\n if (isHome || isEnd) {\n const index = isHome ? 0 : chips.length - 1;\n chips[index].focus({trailing: isEnd});\n this.updateTabIndices();\n return;\n }\n\n // Check if moving forwards or backwards\n const isRtl = getComputedStyle(this).direction === 'rtl';\n const forwards = isRtl ? isLeft || isUp : isRight || isDown;\n const focusedChip = chips.find(chip => chip.matches(':focus-within'));\n if (!focusedChip) {\n // If there is not already a chip focused, select the first or last chip\n // based on the direction we're traveling.\n const nextChip = forwards ? chips[0] : chips[chips.length - 1];\n nextChip.focus({trailing: !forwards});\n this.updateTabIndices();\n return;\n }\n\n const currentIndex = chips.indexOf(focusedChip);\n let nextIndex = forwards ? currentIndex + 1 : currentIndex - 1;\n // Search for the next sibling that is not disabled to select.\n // If we return to the host index, there is nothing to select.\n while (nextIndex !== currentIndex) {\n if (nextIndex >= chips.length) {\n // Return to start if moving past the last item.\n nextIndex = 0;\n } else if (nextIndex < 0) {\n // Go to end if moving before the first item.\n nextIndex = chips.length - 1;\n }\n\n // Check if the next sibling is disabled. If so,\n // move the index and continue searching.\n const nextChip = chips[nextIndex];\n if (nextChip.disabled) {\n if (forwards) {\n nextIndex++;\n } else {\n nextIndex--;\n }\n\n continue;\n }\n\n nextChip.focus({trailing: !forwards});\n this.updateTabIndices();\n break;\n }\n }\n\n private updateTabIndices() {\n const {chips} = this;\n let hasFocusedChip = false;\n for (const chip of chips) {\n if (chip.matches(':focus-within')) {\n chip.removeAttribute('tabindex');\n hasFocusedChip = true;\n } else {\n chip.tabIndex = -1;\n }\n }\n\n if (!hasFocusedChip) {\n chips[0]?.removeAttribute('tabindex');\n }\n }\n\n private handleSelected(event: Event) {\n if (!this.singleSelect) {\n return;\n }\n\n if ((event.target as MaybeSelectableChip).selected === true) {\n for (const chip of this.chips as MaybeSelectableChip[]) {\n if (chip !== event.target && chip.selected) {\n chip.selected = false;\n }\n }\n }\n }\n}\n\ninterface MaybeMultiActionChip extends Chip {\n focus(options?: FocusOptions&{trailing?: boolean}): void;\n}\n\ninterface MaybeSelectableChip extends Chip {\n selected?: boolean;\n}\n"]}
@@ -4,6 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { css } from 'lit';
7
- export const styles = css `.elevated{--md-elevation-level:var(--_elevated-container-elevation);--md-elevation-shadow-color:var(--_elevated-container-shadow-color)}.elevated::before{background:var(--_elevated-container-color)}.elevated:hover{--md-elevation-level:var(--_elevated-hover-container-elevation)}.elevated:focus-within{--md-elevation-level:var(--_elevated-focus-container-elevation)}.elevated:active{--md-elevation-level:var(--_elevated-pressed-container-elevation)}.elevated.disabled{--md-elevation-level:var(--_elevated-disabled-container-elevation)}.elevated.disabled::before{background:var(--_elevated-disabled-container-color);opacity:var(--_elevated-disabled-container-opacity)}/*# sourceMappingURL=elevated-styles.css.map */
7
+ export const styles = css `.elevated{--md-elevation-level:var(--_elevated-container-elevation);--md-elevation-shadow-color:var(--_elevated-container-shadow-color)}.elevated::before{background:var(--_elevated-container-color)}.elevated:hover{--md-elevation-level:var(--_elevated-hover-container-elevation)}.elevated:focus-within{--md-elevation-level:var(--_elevated-focus-container-elevation)}.elevated:active{--md-elevation-level:var(--_elevated-pressed-container-elevation)}.elevated.disabled{--md-elevation-level:var(--_elevated-disabled-container-elevation)}.elevated.disabled::before{background:var(--_elevated-disabled-container-color);opacity:var(--_elevated-disabled-container-opacity)}@media(forced-colors: active){.elevated md-elevation{border:1px solid rgba(0,0,0,0)}.elevated.link md-elevation{border-color:ActiveText}.elevated.disabled md-elevation{border-color:GrayText}}/*# sourceMappingURL=elevated-styles.css.map */
8
8
  `;
9
9
  //# sourceMappingURL=elevated-styles.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"elevated-styles.css.js","sourceRoot":"","sources":["elevated-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`.elevated{--md-elevation-level:var(--_elevated-container-elevation);--md-elevation-shadow-color:var(--_elevated-container-shadow-color)}.elevated::before{background:var(--_elevated-container-color)}.elevated:hover{--md-elevation-level:var(--_elevated-hover-container-elevation)}.elevated:focus-within{--md-elevation-level:var(--_elevated-focus-container-elevation)}.elevated:active{--md-elevation-level:var(--_elevated-pressed-container-elevation)}.elevated.disabled{--md-elevation-level:var(--_elevated-disabled-container-elevation)}.elevated.disabled::before{background:var(--_elevated-disabled-container-color);opacity:var(--_elevated-disabled-container-opacity)}/*# sourceMappingURL=elevated-styles.css.map */\n`;\n "]}
1
+ {"version":3,"file":"elevated-styles.css.js","sourceRoot":"","sources":["elevated-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`.elevated{--md-elevation-level:var(--_elevated-container-elevation);--md-elevation-shadow-color:var(--_elevated-container-shadow-color)}.elevated::before{background:var(--_elevated-container-color)}.elevated:hover{--md-elevation-level:var(--_elevated-hover-container-elevation)}.elevated:focus-within{--md-elevation-level:var(--_elevated-focus-container-elevation)}.elevated:active{--md-elevation-level:var(--_elevated-pressed-container-elevation)}.elevated.disabled{--md-elevation-level:var(--_elevated-disabled-container-elevation)}.elevated.disabled::before{background:var(--_elevated-disabled-container-color);opacity:var(--_elevated-disabled-container-opacity)}@media(forced-colors: active){.elevated md-elevation{border:1px solid rgba(0,0,0,0)}.elevated.link md-elevation{border-color:ActiveText}.elevated.disabled md-elevation{border-color:GrayText}}/*# sourceMappingURL=elevated-styles.css.map */\n`;\n "]}
@@ -21,6 +21,7 @@ export declare class FilterChip extends MultiActionChip {
21
21
  protected getContainerClasses(): {
22
22
  elevated: boolean;
23
23
  selected: boolean;
24
+ 'has-trailing': boolean;
24
25
  disabled: boolean;
25
26
  };
26
27
  protected renderActionCell(content: TemplateResult | typeof nothing): typeof nothing | TemplateResult<2 | 1>;
@@ -42,6 +42,7 @@ export class FilterChip extends MultiActionChip {
42
42
  ...super.getContainerClasses(),
43
43
  elevated: this.elevated,
44
44
  selected: this.selected,
45
+ 'has-trailing': this.removable,
45
46
  };
46
47
  }
47
48
  renderActionCell(content) {
@@ -91,7 +92,7 @@ __decorate([
91
92
  property({ type: Boolean })
92
93
  ], FilterChip.prototype, "removable", void 0);
93
94
  __decorate([
94
- property({ type: Boolean })
95
+ property({ type: Boolean, reflect: true })
95
96
  ], FilterChip.prototype, "selected", void 0);
96
97
  __decorate([
97
98
  query('.primary.action')
@@ -1 +1 @@
1
- {"version":3,"file":"filter-chip.js","sourceRoot":"","sources":["filter-chip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAC,IAAI,EAAE,OAAO,EAAkB,GAAG,EAAiB,MAAM,KAAK,CA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AAY;QAC7B,MAAM,EAAC,SAAS,EAAC,GAAG,IAAuB,CAAC;QAC5C,OAAO,IAAI,CAAA;;;qBAGM,SAAS,IAAI,OAAO;wBACjB,IAAI,CAAC,QAAQ;oBACjB,IAAI,CAAC,QAAQ,IAAI,OAAO;;SAEnC,IAAI,CAAC,aAAa,EAAE;KACxB,CAAC;IACJ,CAAC;IAEkB,iBAAiB;QAClC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,OAAO,KAAK,CAAC,iBAAiB,EAAE,CAAC;SAClC;QAED,OAAO,GAAG,CAAA;;;;KAIT,CAAC;IACJ,CAAC;IAEkB,oBAAoB;QACrC,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,OAAO,kBAAkB,CACrB,EAAC,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAC,CAAC,CAAC;SACjE;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAEkB,aAAa;QAC9B,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,IAAI,CAAA,+BAA+B,CAAC;SAC5C;QAED,OAAO,KAAK,CAAC,aAAa,EAAE,CAAC;IAC/B,CAAC;CACF;AAxF4B;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;4CAAkB;AACjB;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;6CAAmB;AAClB;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;4CAAkB;AAMlB;IAAzB,KAAK,CAAC,iBAAiB,CAAC;iDAAqD;AAE9E;IADC,KAAK,CAAC,kBAAkB,CAAC;kDAC2B","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../elevation/elevation.js';\n\nimport {html, nothing, PropertyValues, svg, TemplateResult} from 'lit';\nimport {property, query} from 'lit/decorators.js';\n\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\n\nimport {MultiActionChip} from './multi-action-chip.js';\nimport {renderRemoveButton} from './trailing-icons.js';\n\n/**\n * A filter chip component.\n */\nexport class FilterChip extends MultiActionChip {\n @property({type: Boolean}) elevated = false;\n @property({type: Boolean}) removable = false;\n @property({type: Boolean}) selected = false;\n\n protected get primaryId() {\n return 'option';\n }\n\n @query('.primary.action') protected readonly primaryAction!: HTMLElement|null;\n @query('.trailing.action')\n protected readonly trailingAction!: HTMLElement|null;\n\n constructor() {\n super();\n // Remove the `row` role from the container, since filter chips do not use a\n // `grid` navigation model.\n this.containerRole = undefined;\n this.addEventListener('click', () => {\n if (this.disabled) {\n return;\n }\n\n this.selected = !this.selected;\n });\n }\n\n protected override updated(changed: PropertyValues<this>) {\n if (changed.has('selected') && changed.get('selected') !== undefined) {\n // Dispatch when `selected` changes, except for the first update.\n this.dispatchEvent(new Event('selected', {bubbles: true}));\n }\n }\n\n protected override getContainerClasses() {\n return {\n ...super.getContainerClasses(),\n elevated: this.elevated,\n selected: this.selected,\n };\n }\n\n protected override renderActionCell(content: TemplateResult|typeof nothing) {\n // Filter chips use a `listbox`/`option` model, and do not need `gridcell`\n // wrappers around their actions.\n return content;\n }\n\n protected override renderAction() {\n const {ariaLabel} = this as ARIAMixinStrict;\n return html`\n <button class=\"primary action\"\n id=\"option\"\n aria-label=${ariaLabel || nothing}\n aria-selected=${this.selected}\n ?disabled=${this.disabled || nothing}\n role=\"option\"\n >${this.renderContent()}</button>\n `;\n }\n\n protected override renderLeadingIcon() {\n if (!this.selected) {\n return super.renderLeadingIcon();\n }\n\n return svg`\n <svg class=\"checkmark\" viewBox=\"0 0 18 18\" aria-hidden=\"true\">\n <path d=\"M6.75012 12.1274L3.62262 8.99988L2.55762 10.0574L6.75012 14.2499L15.7501 5.24988L14.6926 4.19238L6.75012 12.1274Z\" />\n </svg>\n `;\n }\n\n protected override renderTrailingAction() {\n if (this.removable) {\n return renderRemoveButton(\n {ariaLabel: this.ariaLabelRemove, disabled: this.disabled});\n }\n\n return nothing;\n }\n\n protected override renderOutline() {\n if (this.elevated) {\n return html`<md-elevation></md-elevation>`;\n }\n\n return super.renderOutline();\n }\n}\n"]}
1
+ {"version":3,"file":"filter-chip.js","sourceRoot":"","sources":["filter-chip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAC,IAAI,EAAE,OAAO,EAAkB,GAAG,EAAiB,MAAM,KAAK,CAAC;AACvE,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAIlD,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAC,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,eAAe;IAK7C,IAAc,SAAS;QACrB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAMD;QACE,KAAK,EAAE,CAAC;QAbiB,aAAQ,GAAG,KAAK,CAAC;QACjB,cAAS,GAAG,KAAK,CAAC;QACH,aAAQ,GAAG,KAAK,CAAC;QAYzD,4EAA4E;QAC5E,2BAA2B;QAC3B,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;QAC/B,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;YAClC,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,OAAO;aACR;YAED,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;IAEkB,OAAO,CAAC,OAA6B;QACtD,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,SAAS,EAAE;YACpE,iEAAiE;YACjE,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,UAAU,EAAE,EAAC,OAAO,EAAE,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OAAO,EAAC,CAAC;6CAAmB;AACH;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;4CAAkB;AAMjC;IAAzB,KAAK,CAAC,iBAAiB,CAAC;iDAAqD;AAE9E;IADC,KAAK,CAAC,kBAAkB,CAAC;kDAC2B","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../elevation/elevation.js';\n\nimport {html, nothing, PropertyValues, svg, TemplateResult} from 'lit';\nimport {property, query} from 'lit/decorators.js';\n\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\n\nimport {MultiActionChip} from './multi-action-chip.js';\nimport {renderRemoveButton} from './trailing-icons.js';\n\n/**\n * A filter chip component.\n */\nexport class FilterChip extends MultiActionChip {\n @property({type: Boolean}) elevated = false;\n @property({type: Boolean}) removable = false;\n @property({type: Boolean, reflect: true}) selected = false;\n\n protected get primaryId() {\n return 'option';\n }\n\n @query('.primary.action') protected readonly primaryAction!: HTMLElement|null;\n @query('.trailing.action')\n protected readonly trailingAction!: HTMLElement|null;\n\n constructor() {\n super();\n // Remove the `row` role from the container, since filter chips do not use a\n // `grid` navigation model.\n this.containerRole = undefined;\n this.addEventListener('click', () => {\n if (this.disabled) {\n return;\n }\n\n this.selected = !this.selected;\n });\n }\n\n protected override updated(changed: PropertyValues<this>) {\n if (changed.has('selected') && changed.get('selected') !== undefined) {\n // Dispatch when `selected` changes, except for the first update.\n this.dispatchEvent(new Event('selected', {bubbles: true}));\n }\n }\n\n protected override getContainerClasses() {\n return {\n ...super.getContainerClasses(),\n elevated: this.elevated,\n selected: this.selected,\n 'has-trailing': this.removable,\n };\n }\n\n protected override renderActionCell(content: TemplateResult|typeof nothing) {\n // Filter chips use a `listbox`/`option` model, and do not need `gridcell`\n // wrappers around their actions.\n return content;\n }\n\n protected override renderAction() {\n const {ariaLabel} = this as ARIAMixinStrict;\n return html`\n <button class=\"primary action\"\n id=\"option\"\n aria-label=${ariaLabel || nothing}\n aria-selected=${this.selected}\n ?disabled=${this.disabled || nothing}\n role=\"option\"\n >${this.renderContent()}</button>\n `;\n }\n\n protected override renderLeadingIcon() {\n if (!this.selected) {\n return super.renderLeadingIcon();\n }\n\n return svg`\n <svg class=\"checkmark\" viewBox=\"0 0 18 18\" aria-hidden=\"true\">\n <path d=\"M6.75012 12.1274L3.62262 8.99988L2.55762 10.0574L6.75012 14.2499L15.7501 5.24988L14.6926 4.19238L6.75012 12.1274Z\" />\n </svg>\n `;\n }\n\n protected override renderTrailingAction() {\n if (this.removable) {\n return renderRemoveButton(\n {ariaLabel: this.ariaLabelRemove, disabled: this.disabled});\n }\n\n return nothing;\n }\n\n protected override renderOutline() {\n if (this.elevated) {\n return html`<md-elevation></md-elevation>`;\n }\n\n return super.renderOutline();\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { css } from 'lit';
7
+ export const styles = css `@media(forced-colors: active){:host{--md-filter-chip-disabled-label-text-color: GrayText;--md-filter-chip-disabled-label-text-opacity: 1;--md-filter-chip-disabled-leading-icon-color: GrayText;--md-filter-chip-disabled-leading-icon-opacity: 1;--md-filter-chip-disabled-trailing-icon-color: GrayText;--md-filter-chip-disabled-trailing-icon-opacity: 1;--md-filter-chip-disabled-outline-color: GrayText;--md-filter-chip-disabled-outline-opacity: 1;--md-filter-chip-trailing-icon-color: ButtonText;--md-filter-chip-hover-trailing-icon-color: ButtonText;--md-filter-chip-focus-trailing-icon-color: ButtonText;--md-filter-chip-pressed-trailing-icon-color: ButtonText;--md-filter-chip-selected-trailing-icon-color: ButtonText;--md-filter-chip-selected-hover-trailing-icon-color: ButtonText;--md-filter-chip-selected-focus-trailing-icon-color: ButtonText;--md-filter-chip-selected-pressed-trailing-icon-color: ButtonText;--md-filter-chip-selected-outline-width: 1px}}/*# sourceMappingURL=filter-forced-colors-styles.css.map */
8
+ `;
9
+ //# sourceMappingURL=filter-forced-colors-styles.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-forced-colors-styles.css.js","sourceRoot":"","sources":["filter-forced-colors-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`@media(forced-colors: active){:host{--md-filter-chip-disabled-label-text-color: GrayText;--md-filter-chip-disabled-label-text-opacity: 1;--md-filter-chip-disabled-leading-icon-color: GrayText;--md-filter-chip-disabled-leading-icon-opacity: 1;--md-filter-chip-disabled-trailing-icon-color: GrayText;--md-filter-chip-disabled-trailing-icon-opacity: 1;--md-filter-chip-disabled-outline-color: GrayText;--md-filter-chip-disabled-outline-opacity: 1;--md-filter-chip-trailing-icon-color: ButtonText;--md-filter-chip-hover-trailing-icon-color: ButtonText;--md-filter-chip-focus-trailing-icon-color: ButtonText;--md-filter-chip-pressed-trailing-icon-color: ButtonText;--md-filter-chip-selected-trailing-icon-color: ButtonText;--md-filter-chip-selected-hover-trailing-icon-color: ButtonText;--md-filter-chip-selected-focus-trailing-icon-color: ButtonText;--md-filter-chip-selected-pressed-trailing-icon-color: ButtonText;--md-filter-chip-selected-outline-width: 1px}}/*# sourceMappingURL=filter-forced-colors-styles.css.map */\n`;\n "]}
@@ -0,0 +1,34 @@
1
+ //
2
+ // Copyright 2023 Google LLC
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ //
5
+
6
+ // go/keep-sorted start
7
+ @use './filter-chip';
8
+ // go/keep-sorted end
9
+
10
+ @media (forced-colors: active) {
11
+ :host {
12
+ @include filter-chip.theme(
13
+ (
14
+ 'disabled-label-text-color': GrayText,
15
+ 'disabled-label-text-opacity': 1,
16
+ 'disabled-leading-icon-color': GrayText,
17
+ 'disabled-leading-icon-opacity': 1,
18
+ 'disabled-trailing-icon-color': GrayText,
19
+ 'disabled-trailing-icon-opacity': 1,
20
+ 'disabled-outline-color': GrayText,
21
+ 'disabled-outline-opacity': 1,
22
+ 'trailing-icon-color': ButtonText,
23
+ 'hover-trailing-icon-color': ButtonText,
24
+ 'focus-trailing-icon-color': ButtonText,
25
+ 'pressed-trailing-icon-color': ButtonText,
26
+ 'selected-trailing-icon-color': ButtonText,
27
+ 'selected-hover-trailing-icon-color': ButtonText,
28
+ 'selected-focus-trailing-icon-color': ButtonText,
29
+ 'selected-pressed-trailing-icon-color': ButtonText,
30
+ 'selected-outline-width': 1px,
31
+ )
32
+ );
33
+ }
34
+ }
@@ -20,7 +20,9 @@ export declare class InputChip extends MultiActionChip {
20
20
  protected getContainerClasses(): {
21
21
  avatar: boolean;
22
22
  disabled: boolean;
23
+ link: boolean;
23
24
  selected: boolean;
25
+ 'has-trailing': boolean;
24
26
  };
25
27
  protected renderAction(): import("lit-html").TemplateResult<1>;
26
28
  protected renderTrailingAction(): import("lit-html").TemplateResult<1>;
@@ -47,7 +47,9 @@ export class InputChip extends MultiActionChip {
47
47
  avatar: this.avatar,
48
48
  // Link chips cannot be disabled
49
49
  disabled: !this.href && this.disabled,
50
+ link: !!this.href,
50
51
  selected: this.selected,
52
+ 'has-trailing': true,
51
53
  };
52
54
  }
53
55
  renderAction() {
@@ -81,7 +83,7 @@ export class InputChip extends MultiActionChip {
81
83
  renderTrailingAction() {
82
84
  return renderRemoveButton({
83
85
  ariaLabel: this.ariaLabelRemove,
84
- disabled: this.disabled,
86
+ disabled: !this.href && this.disabled,
85
87
  tabbable: this.removeOnly,
86
88
  });
87
89
  }
@@ -99,7 +101,7 @@ __decorate([
99
101
  property({ type: Boolean, attribute: 'remove-only' })
100
102
  ], InputChip.prototype, "removeOnly", void 0);
101
103
  __decorate([
102
- property({ type: Boolean })
104
+ property({ type: Boolean, reflect: true })
103
105
  ], InputChip.prototype, "selected", void 0);
104
106
  __decorate([
105
107
  query('.trailing.action')
@@ -1 +1 @@
1
- {"version":3,"file":"input-chip.js","sourceRoot":"","sources":["input-chip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAIlD,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAC,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,eAAe;IAA9C;;QAC6B,WAAM,GAAG,KAAK,CAAC;QAC9B,SAAI,GAAG,EAAE,CAAC;QACV,WAAM,GAAyC,EAAE,CAAC;QACT,eAAU,GAAG,KAAK,CAAC;QAC7C,aAAQ,GAAG,KAAK,CAAC;IAgF9C,CAAC;IA9EC,IAAc,SAAS;QACrB,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,OAAO,MAAM,CAAC;SACf;QAED,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,OAAO,EAAE,CAAC;SACX;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAuB,cAAc;QACnC,gCAAgC;QAChC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC;IACrC,CAAC;IAED,IAAc,aAAa;QACzB,0EAA0E;QAC1E,gCAAgC;QAChC,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,OAAO,IAAI,CAAC;SACb;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAc,iBAAiB,CAAC,CAAC;IACvE,CAAC;IAKkB,mBAAmB;QACpC,OAAO;YACL,GAAG,KAAK,CAAC,mBAAmB,EAAE;YAC9B,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CAAC;iDAC2B","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, nothing} from 'lit';\nimport {property, query} from 'lit/decorators.js';\n\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\n\nimport {MultiActionChip} from './multi-action-chip.js';\nimport {renderRemoveButton} from './trailing-icons.js';\n\n/**\n * An input chip component.\n */\nexport class InputChip extends MultiActionChip {\n @property({type: Boolean}) avatar = false;\n @property() href = '';\n @property() target: '_blank'|'_parent'|'_self'|'_top'|'' = '';\n @property({type: Boolean, attribute: 'remove-only'}) removeOnly = false;\n @property({type: Boolean}) selected = false;\n\n protected get primaryId() {\n if (this.href) {\n return 'link';\n }\n\n if (this.removeOnly) {\n return '';\n }\n\n return 'button';\n }\n\n protected override get rippleDisabled() {\n // Link chips cannot be disabled\n return !this.href && this.disabled;\n }\n\n protected get primaryAction() {\n // Don't use @query() since a remove-only input chip still has a span that\n // has \"primary action\" classes.\n if (this.removeOnly) {\n return null;\n }\n\n return this.renderRoot.querySelector<HTMLElement>('.primary.action');\n }\n\n @query('.trailing.action')\n protected readonly trailingAction!: HTMLElement|null;\n\n protected override getContainerClasses() {\n return {\n ...super.getContainerClasses(),\n avatar: this.avatar,\n // Link chips cannot be disabled\n disabled: !this.href && this.disabled,\n selected: this.selected,\n };\n }\n\n protected override renderAction() {\n const {ariaLabel} = this as ARIAMixinStrict;\n if (this.href) {\n return html`\n <a class=\"primary action\"\n id=\"link\"\n aria-label=${ariaLabel || nothing}\n href=${this.href}\n target=${this.target || nothing}\n >${this.renderContent()}</a>\n `;\n }\n\n if (this.removeOnly) {\n return html`\n <span class=\"primary action\" aria-label=${ariaLabel || nothing}>\n ${this.renderContent()}\n </span>\n `;\n }\n\n return html`\n <button class=\"primary action\"\n id=\"button\"\n aria-label=${ariaLabel || nothing}\n ?disabled=${this.disabled}\n type=\"button\"\n >${this.renderContent()}</button>\n `;\n }\n\n protected override renderTrailingAction() {\n return renderRemoveButton({\n ariaLabel: this.ariaLabelRemove,\n disabled: this.disabled,\n tabbable: this.removeOnly,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"input-chip.js","sourceRoot":"","sources":["input-chip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAIlD,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAC,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,eAAe;IAA9C;;QAC6B,WAAM,GAAG,KAAK,CAAC;QAC9B,SAAI,GAAG,EAAE,CAAC;QACV,WAAM,GAAyC,EAAE,CAAC;QACT,eAAU,GAAG,KAAK,CAAC;QAC9B,aAAQ,GAAG,KAAK,CAAC;IAkF7D,CAAC;IAhFC,IAAc,SAAS;QACrB,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,OAAO,MAAM,CAAC;SACf;QAED,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,OAAO,EAAE,CAAC;SACX;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAuB,cAAc;QACnC,gCAAgC;QAChC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC;IACrC,CAAC;IAED,IAAc,aAAa;QACzB,0EAA0E;QAC1E,gCAAgC;QAChC,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,OAAO,IAAI,CAAC;SACb;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAc,iBAAiB,CAAC,CAAC;IACvE,CAAC;IAKkB,mBAAmB;QACpC,OAAO;YACL,GAAG,KAAK,CAAC,mBAAmB,EAAE;YAC9B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,gCAAgC;YAChC,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AAE,OAAO,EAAE,IAAI,EAAC,CAAC;2CAAkB;AA8B3D;IADC,KAAK,CAAC,kBAAkB,CAAC;iDAC2B","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, nothing} from 'lit';\nimport {property, query} from 'lit/decorators.js';\n\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\n\nimport {MultiActionChip} from './multi-action-chip.js';\nimport {renderRemoveButton} from './trailing-icons.js';\n\n/**\n * An input chip component.\n */\nexport class InputChip extends MultiActionChip {\n @property({type: Boolean}) avatar = false;\n @property() href = '';\n @property() target: '_blank'|'_parent'|'_self'|'_top'|'' = '';\n @property({type: Boolean, attribute: 'remove-only'}) removeOnly = false;\n @property({type: Boolean, reflect: true}) selected = false;\n\n protected get primaryId() {\n if (this.href) {\n return 'link';\n }\n\n if (this.removeOnly) {\n return '';\n }\n\n return 'button';\n }\n\n protected override get rippleDisabled() {\n // Link chips cannot be disabled\n return !this.href && this.disabled;\n }\n\n protected get primaryAction() {\n // Don't use @query() since a remove-only input chip still has a span that\n // has \"primary action\" classes.\n if (this.removeOnly) {\n return null;\n }\n\n return this.renderRoot.querySelector<HTMLElement>('.primary.action');\n }\n\n @query('.trailing.action')\n protected readonly trailingAction!: HTMLElement|null;\n\n protected override getContainerClasses() {\n return {\n ...super.getContainerClasses(),\n avatar: this.avatar,\n // Link chips cannot be disabled\n disabled: !this.href && this.disabled,\n link: !!this.href,\n selected: this.selected,\n 'has-trailing': true,\n };\n }\n\n protected override renderAction() {\n const {ariaLabel} = this as ARIAMixinStrict;\n if (this.href) {\n return html`\n <a class=\"primary action\"\n id=\"link\"\n aria-label=${ariaLabel || nothing}\n href=${this.href}\n target=${this.target || nothing}\n >${this.renderContent()}</a>\n `;\n }\n\n if (this.removeOnly) {\n return html`\n <span class=\"primary action\" aria-label=${ariaLabel || nothing}>\n ${this.renderContent()}\n </span>\n `;\n }\n\n return html`\n <button class=\"primary action\"\n id=\"button\"\n aria-label=${ariaLabel || nothing}\n ?disabled=${this.disabled}\n type=\"button\"\n >${this.renderContent()}</button>\n `;\n }\n\n protected override renderTrailingAction() {\n return renderRemoveButton({\n ariaLabel: this.ariaLabelRemove,\n disabled: !this.href && this.disabled,\n tabbable: this.removeOnly,\n });\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { css } from 'lit';
7
+ export const styles = css `@media(forced-colors: active){:host{--md-input-chip-disabled-avatar-opacity: 1;--md-input-chip-disabled-label-text-color: GrayText;--md-input-chip-disabled-label-text-opacity: 1;--md-input-chip-disabled-leading-icon-color: GrayText;--md-input-chip-disabled-leading-icon-opacity: 1;--md-input-chip-disabled-trailing-icon-color: GrayText;--md-input-chip-disabled-trailing-icon-opacity: 1;--md-input-chip-disabled-outline-color: GrayText;--md-input-chip-disabled-outline-opacity: 1;--md-input-chip-trailing-icon-color: ButtonText;--md-input-chip-hover-trailing-icon-color: ButtonText;--md-input-chip-focus-trailing-icon-color: ButtonText;--md-input-chip-pressed-trailing-icon-color: ButtonText;--md-input-chip-selected-trailing-icon-color: ButtonText;--md-input-chip-selected-hover-trailing-icon-color: ButtonText;--md-input-chip-selected-focus-trailing-icon-color: ButtonText;--md-input-chip-selected-pressed-trailing-icon-color: ButtonText;--md-input-chip-selected-outline-width: 1px}.link .outline{border-color:ActiveText}}/*# sourceMappingURL=input-forced-colors-styles.css.map */
8
+ `;
9
+ //# sourceMappingURL=input-forced-colors-styles.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-forced-colors-styles.css.js","sourceRoot":"","sources":["input-forced-colors-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`@media(forced-colors: active){:host{--md-input-chip-disabled-avatar-opacity: 1;--md-input-chip-disabled-label-text-color: GrayText;--md-input-chip-disabled-label-text-opacity: 1;--md-input-chip-disabled-leading-icon-color: GrayText;--md-input-chip-disabled-leading-icon-opacity: 1;--md-input-chip-disabled-trailing-icon-color: GrayText;--md-input-chip-disabled-trailing-icon-opacity: 1;--md-input-chip-disabled-outline-color: GrayText;--md-input-chip-disabled-outline-opacity: 1;--md-input-chip-trailing-icon-color: ButtonText;--md-input-chip-hover-trailing-icon-color: ButtonText;--md-input-chip-focus-trailing-icon-color: ButtonText;--md-input-chip-pressed-trailing-icon-color: ButtonText;--md-input-chip-selected-trailing-icon-color: ButtonText;--md-input-chip-selected-hover-trailing-icon-color: ButtonText;--md-input-chip-selected-focus-trailing-icon-color: ButtonText;--md-input-chip-selected-pressed-trailing-icon-color: ButtonText;--md-input-chip-selected-outline-width: 1px}.link .outline{border-color:ActiveText}}/*# sourceMappingURL=input-forced-colors-styles.css.map */\n`;\n "]}
@@ -0,0 +1,39 @@
1
+ //
2
+ // Copyright 2023 Google LLC
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ //
5
+
6
+ // go/keep-sorted start
7
+ @use './input-chip';
8
+ // go/keep-sorted end
9
+
10
+ @media (forced-colors: active) {
11
+ :host {
12
+ @include input-chip.theme(
13
+ (
14
+ 'disabled-avatar-opacity': 1,
15
+ 'disabled-label-text-color': GrayText,
16
+ 'disabled-label-text-opacity': 1,
17
+ 'disabled-leading-icon-color': GrayText,
18
+ 'disabled-leading-icon-opacity': 1,
19
+ 'disabled-trailing-icon-color': GrayText,
20
+ 'disabled-trailing-icon-opacity': 1,
21
+ 'disabled-outline-color': GrayText,
22
+ 'disabled-outline-opacity': 1,
23
+ 'trailing-icon-color': ButtonText,
24
+ 'hover-trailing-icon-color': ButtonText,
25
+ 'focus-trailing-icon-color': ButtonText,
26
+ 'pressed-trailing-icon-color': ButtonText,
27
+ 'selected-trailing-icon-color': ButtonText,
28
+ 'selected-hover-trailing-icon-color': ButtonText,
29
+ 'selected-focus-trailing-icon-color': ButtonText,
30
+ 'selected-pressed-trailing-icon-color': ButtonText,
31
+ 'selected-outline-width': 1px,
32
+ )
33
+ );
34
+ }
35
+
36
+ .link .outline {
37
+ border-color: ActiveText;
38
+ }
39
+ }
@@ -4,6 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { css } from 'lit';
7
- export const styles = css `:host{--_container-height: var(--md-input-chip-container-height, 32px);--_container-shape: var(--md-input-chip-container-shape, 8px);--_disabled-label-text-color: var(--md-input-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-input-chip-disabled-label-text-opacity, 0.38);--_disabled-selected-container-color: var(--md-input-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-input-chip-disabled-selected-container-opacity, 0.12);--_label-text-type: var(--md-input-chip-label-text-type, var(--md-sys-typescale-label-large, 500 0.875rem / 1.25rem var(--md-ref-typeface-plain, Roboto)));--_selected-container-color: var(--md-input-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-focus-label-text-color: var(--md-input-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-input-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-input-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-input-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-input-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-outline-width: var(--md-input-chip-selected-outline-width, 0px);--_selected-pressed-label-text-color: var(--md-input-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-input-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-opacity: var(--md-input-chip-selected-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-input-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-input-chip-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-input-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-input-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-input-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-input-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-input-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-input-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-input-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-input-chip-outline-width, 1px);--_pressed-label-text-color: var(--md-input-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-input-chip-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-input-chip-pressed-state-layer-opacity, 0.12);--_avatar-shape: var(--md-input-chip-avatar-shape, 9999px);--_avatar-size: var(--md-input-chip-avatar-size, 24px);--_disabled-avatar-opacity: var(--md-input-chip-disabled-avatar-opacity, 0.38);--_disabled-leading-icon-color: var(--md-input-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-input-chip-disabled-leading-icon-opacity, 0.38);--_icon-size: var(--md-input-chip-icon-size, 18px);--_selected-focus-leading-icon-color: var(--md-input-chip-selected-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-leading-icon-color: var(--md-input-chip-selected-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-leading-icon-color: var(--md-input-chip-selected-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-leading-icon-color: var(--md-input-chip-selected-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-input-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-input-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-input-chip-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-leading-icon-color: var(--md-input-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-input-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-input-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-input-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-input-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-input-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-input-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-input-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-input-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-input-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-input-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var( --md-input-chip-container-shape-start-start, var(--_container-shape) );--_container-shape-start-end: var( --md-input-chip-container-shape-start-end, var(--_container-shape) );--_container-shape-end-end: var( --md-input-chip-container-shape-end-end, var(--_container-shape) );--_container-shape-end-start: var( --md-input-chip-container-shape-end-start, var(--_container-shape) )}.avatar .primary.action{padding-inline-start:4px}.avatar .leading.icon ::slotted(:first-child){border-radius:var(--_avatar-shape);height:var(--_avatar-size);width:var(--_avatar-size)}.disabled.avatar .leading.icon{opacity:var(--_disabled-avatar-opacity)}/*# sourceMappingURL=input-styles.css.map */
7
+ export const styles = css `:host{--_container-height: var(--md-input-chip-container-height, 32px);--_container-shape: var(--md-input-chip-container-shape, 8px);--_disabled-label-text-color: var(--md-input-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-input-chip-disabled-label-text-opacity, 0.38);--_disabled-selected-container-color: var(--md-input-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-input-chip-disabled-selected-container-opacity, 0.12);--_label-text-type: var(--md-input-chip-label-text-type, var(--md-sys-typescale-label-large, 500 0.875rem / 1.25rem var(--md-ref-typeface-plain, Roboto)));--_selected-container-color: var(--md-input-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-focus-label-text-color: var(--md-input-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-input-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-input-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-input-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-input-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-outline-width: var(--md-input-chip-selected-outline-width, 0px);--_selected-pressed-label-text-color: var(--md-input-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-input-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-opacity: var(--md-input-chip-selected-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-input-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-input-chip-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-input-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-input-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-input-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-input-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-input-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-input-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-input-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-input-chip-outline-width, 1px);--_pressed-label-text-color: var(--md-input-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-input-chip-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-input-chip-pressed-state-layer-opacity, 0.12);--_avatar-shape: var(--md-input-chip-avatar-shape, 9999px);--_avatar-size: var(--md-input-chip-avatar-size, 24px);--_disabled-avatar-opacity: var(--md-input-chip-disabled-avatar-opacity, 0.38);--_disabled-leading-icon-color: var(--md-input-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-input-chip-disabled-leading-icon-opacity, 0.38);--_icon-size: var(--md-input-chip-icon-size, 18px);--_selected-focus-leading-icon-color: var(--md-input-chip-selected-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-leading-icon-color: var(--md-input-chip-selected-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-leading-icon-color: var(--md-input-chip-selected-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-leading-icon-color: var(--md-input-chip-selected-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-input-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-input-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-input-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-input-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-input-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-input-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-input-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-input-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-input-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-input-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-input-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-input-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-input-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-input-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var( --md-input-chip-container-shape-start-start, var(--_container-shape) );--_container-shape-start-end: var( --md-input-chip-container-shape-start-end, var(--_container-shape) );--_container-shape-end-end: var( --md-input-chip-container-shape-end-end, var(--_container-shape) );--_container-shape-end-start: var( --md-input-chip-container-shape-end-start, var(--_container-shape) )}.avatar .primary.action{padding-inline-start:4px}.avatar .leading.icon ::slotted(:first-child){border-radius:var(--_avatar-shape);height:var(--_avatar-size);width:var(--_avatar-size)}.disabled.avatar .leading.icon{opacity:var(--_disabled-avatar-opacity)}/*# sourceMappingURL=input-styles.css.map */
8
8
  `;
9
9
  //# sourceMappingURL=input-styles.css.js.map