igniteui-theming 25.1.0 → 25.2.0

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 (128) hide show
  1. package/dist/index.d.ts +75 -0
  2. package/dist/index.js +12 -0
  3. package/dist/json/components/bootstrap.json +1 -0
  4. package/dist/json/components/fluent.json +1 -0
  5. package/dist/json/components/indigo.json +1 -0
  6. package/dist/json/components/material.json +1 -0
  7. package/{json → dist/json}/components/themes.json +31 -1
  8. package/dist/mcp/generators/css.d.ts +7 -4
  9. package/dist/mcp/generators/css.js +129 -104
  10. package/dist/mcp/generators/sass.js +227 -254
  11. package/dist/mcp/index.js +259 -323
  12. package/dist/mcp/knowledge/color-usage.js +524 -502
  13. package/dist/mcp/knowledge/colors.js +61 -50
  14. package/dist/mcp/knowledge/component-metadata.js +697 -598
  15. package/dist/mcp/knowledge/component-themes.js +70 -57
  16. package/dist/mcp/knowledge/custom-palettes.js +4 -9
  17. package/dist/mcp/knowledge/docs/colors/guidance.js +4 -0
  18. package/dist/mcp/knowledge/docs/colors/usage.js +4 -0
  19. package/dist/mcp/knowledge/docs/layout/functions/border-radius.js +4 -0
  20. package/dist/mcp/knowledge/docs/layout/functions/pad.js +4 -0
  21. package/dist/mcp/knowledge/docs/layout/functions/sizable.js +4 -0
  22. package/dist/mcp/knowledge/docs/layout/mixins/sizable.js +4 -0
  23. package/dist/mcp/knowledge/docs/layout/mixins/sizing.js +4 -0
  24. package/dist/mcp/knowledge/docs/layout/mixins/spacing.js +4 -0
  25. package/dist/mcp/knowledge/docs/layout/overview.js +4 -0
  26. package/dist/mcp/knowledge/docs/setup/platform.js +4 -0
  27. package/dist/mcp/knowledge/elevations.d.ts +1 -1
  28. package/dist/mcp/knowledge/elevations.js +26 -12
  29. package/dist/mcp/knowledge/index.js +23 -87
  30. package/dist/mcp/knowledge/layout-docs.d.ts +1 -1
  31. package/dist/mcp/knowledge/multipliers.js +5 -0
  32. package/dist/mcp/knowledge/palettes.js +29 -17
  33. package/dist/mcp/knowledge/platforms/angular.js +98 -120
  34. package/dist/mcp/knowledge/platforms/blazor.js +39 -34
  35. package/dist/mcp/knowledge/platforms/common.js +83 -68
  36. package/dist/mcp/knowledge/platforms/index.js +265 -242
  37. package/dist/mcp/knowledge/platforms/react.js +43 -35
  38. package/dist/mcp/knowledge/platforms/webcomponents.js +266 -292
  39. package/dist/mcp/knowledge/sass-api.js +1 -0
  40. package/dist/mcp/knowledge/typography.js +13 -5
  41. package/dist/mcp/resources/index.js +1 -0
  42. package/dist/mcp/resources/presets.js +409 -508
  43. package/dist/mcp/theming/dist/json/colors/meta/multipliers.js +50 -0
  44. package/dist/mcp/theming/dist/json/colors/presets/palettes.js +85 -0
  45. package/dist/mcp/theming/dist/json/components/themes.js +5792 -0
  46. package/dist/mcp/theming/dist/json/elevations/indigo.js +29 -0
  47. package/dist/mcp/theming/dist/json/elevations/material.js +3 -0
  48. package/dist/mcp/theming/dist/json/typography/presets/typescales.js +621 -0
  49. package/dist/mcp/tools/descriptions.js +98 -154
  50. package/dist/mcp/tools/handlers/color.js +58 -56
  51. package/dist/mcp/tools/handlers/component-theme.js +163 -225
  52. package/dist/mcp/tools/handlers/component-tokens.js +159 -219
  53. package/dist/mcp/tools/handlers/custom-palette.js +138 -179
  54. package/dist/mcp/tools/handlers/elevations.js +27 -28
  55. package/dist/mcp/tools/handlers/index.js +11 -0
  56. package/dist/mcp/tools/handlers/layout.js +125 -176
  57. package/dist/mcp/tools/handlers/palette.js +105 -120
  58. package/dist/mcp/tools/handlers/platform.js +289 -311
  59. package/dist/mcp/tools/handlers/resource.js +22 -31
  60. package/dist/mcp/tools/handlers/theme.js +86 -103
  61. package/dist/mcp/tools/handlers/typography.js +29 -30
  62. package/dist/mcp/tools/index.js +13 -0
  63. package/dist/mcp/tools/schemas.js +239 -218
  64. package/dist/mcp/utils/color.js +277 -239
  65. package/dist/mcp/utils/preprocessing.js +57 -30
  66. package/dist/mcp/utils/result.js +43 -45
  67. package/dist/mcp/utils/sass.js +271 -191
  68. package/dist/mcp/utils/theming-resolve.d.ts +19 -0
  69. package/dist/mcp/utils/theming-resolve.js +57 -0
  70. package/dist/mcp/utils/types.js +96 -53
  71. package/dist/mcp/validators/custom-palette.js +218 -243
  72. package/dist/mcp/validators/index.js +3 -0
  73. package/dist/mcp/validators/palette.js +231 -229
  74. package/dist/tailwind/utilities/bootstrap.css +1 -0
  75. package/dist/tailwind/utilities/fluent.css +1 -0
  76. package/dist/tailwind/utilities/indigo.css +1 -0
  77. package/dist/tailwind/utilities/material.css +1 -0
  78. package/package.json +45 -64
  79. package/sass/json/README.md +12 -7
  80. package/sass/themes/_mixins.scss +1 -0
  81. package/sass/themes/components/button-group/_button-group-theme.scss +42 -0
  82. package/sass/themes/components/grid/_grid-theme.scss +1 -1
  83. package/sass/themes/schemas/components/dark/_button-group.scss +173 -50
  84. package/sass/themes/schemas/components/dark/_grid.scss +0 -16
  85. package/sass/themes/schemas/components/light/_button-group.scss +221 -99
  86. package/sass/themes/schemas/components/light/_grid.scss +14 -20
  87. package/LICENSE +0 -21
  88. package/README.md +0 -391
  89. package/dist/mcp/json/colors/presets/palettes.json.js +0 -13
  90. package/dist/mcp/json/components/themes.json.js +0 -143
  91. package/dist/mcp/json/elevations/indigo.json.js +0 -8
  92. package/dist/mcp/json/elevations/material.json.js +0 -8
  93. package/dist/mcp/json/typography/presets/typescales.json.js +0 -17
  94. package/dist/mcp/knowledge/docs/colors/guidance.md.js +0 -4
  95. package/dist/mcp/knowledge/docs/colors/usage.md.js +0 -4
  96. package/dist/mcp/knowledge/docs/layout/functions/border-radius.md.js +0 -4
  97. package/dist/mcp/knowledge/docs/layout/functions/pad.md.js +0 -4
  98. package/dist/mcp/knowledge/docs/layout/functions/sizable.md.js +0 -4
  99. package/dist/mcp/knowledge/docs/layout/mixins/sizable.md.js +0 -4
  100. package/dist/mcp/knowledge/docs/layout/mixins/sizing.md.js +0 -4
  101. package/dist/mcp/knowledge/docs/layout/mixins/spacing.md.js +0 -4
  102. package/dist/mcp/knowledge/docs/layout/overview.md.js +0 -4
  103. package/dist/mcp/knowledge/docs/setup/platform.md.js +0 -4
  104. package/dist/mcp/vite-env.d.ts +0 -18
  105. package/index.js +0 -5
  106. package/json/components/bootstrap.json +0 -1
  107. package/json/components/fluent.json +0 -1
  108. package/json/components/indigo.json +0 -1
  109. package/json/components/material.json +0 -1
  110. package/tailwind/utilities/bootstrap.css +0 -1
  111. package/tailwind/utilities/fluent.css +0 -1
  112. package/tailwind/utilities/indigo.css +0 -1
  113. package/tailwind/utilities/material.css +0 -1
  114. /package/{json → dist/json}/colors/meta/multipliers.json +0 -0
  115. /package/{json → dist/json}/colors/meta/palette.json +0 -0
  116. /package/{json → dist/json}/colors/presets/palettes.json +0 -0
  117. /package/{json → dist/json}/elevations/indigo.json +0 -0
  118. /package/{json → dist/json}/elevations/material.json +0 -0
  119. /package/{json → dist/json}/typography/presets/typescales.json +0 -0
  120. /package/{tailwind → dist/tailwind}/themes/base.css +0 -0
  121. /package/{tailwind → dist/tailwind}/themes/dark/bootstrap.css +0 -0
  122. /package/{tailwind → dist/tailwind}/themes/dark/fluent.css +0 -0
  123. /package/{tailwind → dist/tailwind}/themes/dark/indigo.css +0 -0
  124. /package/{tailwind → dist/tailwind}/themes/dark/material.css +0 -0
  125. /package/{tailwind → dist/tailwind}/themes/light/bootstrap.css +0 -0
  126. /package/{tailwind → dist/tailwind}/themes/light/fluent.css +0 -0
  127. /package/{tailwind → dist/tailwind}/themes/light/indigo.css +0 -0
  128. /package/{tailwind → dist/tailwind}/themes/light/material.css +0 -0
@@ -1,616 +1,715 @@
1
- const GRID_COMPOUND_INFO = {
2
- description: "The grid is a complex compound component with many themeable parts including filtering, editing, pagination, toolbar and more.",
3
- relatedThemes: [
4
- "action-strip",
5
- "grid-summary",
6
- "grid-toolbar",
7
- "column-actions",
8
- "paginator",
9
- "checkbox",
10
- "chip",
11
- "list",
12
- "input-group",
13
- "flat-button",
14
- "outlined-button",
15
- "flat-icon-button",
16
- "outlined-icon-button"
17
- ],
18
- guidance: `The grid is a complex compound component with many related themes. For basic customization, focus on the grid theme itself and the most visible children: input-group (filtering), outlined-button/icon-button (toolbar actions), checkbox (row selection), and paginator. The grid-summary and grid-toolbar themes control their respective areas. Detailed token derivation rules are not yet available for the grid — use the token names and descriptions from get_component_design_tokens for each child to guide value selection.`
1
+ //#region src/knowledge/component-metadata.ts
2
+ var GRID_COMPOUND_INFO = {
3
+ description: "The grid is a complex compound component with many themeable parts including filtering, editing, pagination, toolbar and more.",
4
+ relatedThemes: [
5
+ "action-strip",
6
+ "grid-summary",
7
+ "grid-toolbar",
8
+ "column-actions",
9
+ "paginator",
10
+ "checkbox",
11
+ "chip",
12
+ "list",
13
+ "input-group",
14
+ "flat-button",
15
+ "outlined-button",
16
+ "flat-icon-button",
17
+ "outlined-icon-button"
18
+ ],
19
+ guidance: `The grid is a complex compound component with many related themes. \
20
+ For basic customization, focus on the grid theme itself and the most visible children: \
21
+ input-group (filtering), outlined-button/icon-button (toolbar actions), checkbox (row selection), \
22
+ and paginator. The grid-summary and grid-toolbar themes control their respective areas. \
23
+ Detailed token derivation rules are not yet available for the grid — use the token names \
24
+ and descriptions from get_component_design_tokens for each child to guide value selection.`
19
25
  };
20
- const COMPONENT_METADATA = {
21
- accordion: {
22
- selectors: { angular: "igx-accordion", webcomponents: "igc-accordion" }
23
- },
24
- "action-strip": {
25
- selectors: { angular: "igx-action-strip", webcomponents: null }
26
- },
27
- avatar: {
28
- selectors: { angular: "igx-avatar", webcomponents: "igc-avatar" }
29
- },
30
- badge: {
31
- selectors: { angular: "igx-badge", webcomponents: "igc-badge" }
32
- },
33
- banner: {
34
- selectors: { angular: "igx-banner", webcomponents: "igc-banner" },
35
- compound: {
36
- description: "The banner component uses flat-buttons for the actions",
37
- relatedThemes: ["flat-button"],
38
- guidance: `The banner action buttons should visually coordinate with the banner background. If customizing the banner background, ensure flat-button foreground contrasts against it.`
39
- }
40
- },
41
- "bottom-nav": {
42
- selectors: { angular: "igx-bottom-nav", webcomponents: null }
43
- },
44
- button: {
45
- selectors: { angular: ".igx-button", webcomponents: "igc-button" },
46
- variants: [
47
- "flat-button",
48
- "contained-button",
49
- "outlined-button",
50
- "fab-button"
51
- ]
52
- },
53
- "flat-button": {
54
- selectors: {
55
- angular: ".igx-button--flat",
56
- webcomponents: 'igc-button[variant="flat"]'
57
- }
58
- },
59
- "contained-button": {
60
- selectors: {
61
- angular: [".igx-button--contained"],
62
- webcomponents: 'igc-button[variant="contained"]'
63
- }
64
- },
65
- "outlined-button": {
66
- selectors: {
67
- angular: [".igx-button--outlined"],
68
- webcomponents: 'igc-button[variant="outlined"]'
69
- }
70
- },
71
- "fab-button": {
72
- selectors: {
73
- angular: [".igx-button--fab"],
74
- webcomponents: 'igc-button[variant="fab"]'
75
- }
76
- },
77
- "icon-button": {
78
- selectors: {
79
- angular: [".igx-icon-button"],
80
- webcomponents: "igc-icon-button"
81
- },
82
- variants: [
83
- "flat-icon-button",
84
- "contained-icon-button",
85
- "outlined-icon-button"
86
- ]
87
- },
88
- "flat-icon-button": {
89
- selectors: {
90
- angular: [".igx-icon-button--flat"],
91
- webcomponents: 'igc-icon-button[variant="flat"]'
92
- }
93
- },
94
- "contained-icon-button": {
95
- selectors: {
96
- angular: [".igx-icon-button--contained"],
97
- webcomponents: 'igc-icon-button[variant="contained"]'
98
- }
99
- },
100
- "outlined-icon-button": {
101
- selectors: {
102
- angular: [".igx-icon-button--outlined"],
103
- webcomponents: 'igc-icon-button[variant="outlined"]'
104
- }
105
- },
106
- "button-group": {
107
- selectors: {
108
- angular: "igx-buttongroup",
109
- webcomponents: "igc-button-group"
110
- }
111
- },
112
- calendar: {
113
- selectors: { angular: "igx-calendar", webcomponents: "igc-calendar" }
114
- },
115
- card: {
116
- selectors: { angular: "igx-card", webcomponents: "igc-card" },
117
- compound: {
118
- description: "The card component can contain various child components like avatars, buttons, chips, and icons.",
119
- relatedThemes: ["flat-button", "flat-icon-button", "chip", "icon"],
120
- guidance: `The card component can contain flat-button(s), flat-icon-button(s), and icon(s) that should harmonize visually well with the background of the card component. For the flat-button and flat-icon-button themes, ensure the foreground color contrasts well with the card background. For the icon theme, the color should also coordinate with the card background while maintaining sufficient contrast.`
121
- }
122
- },
123
- carousel: {
124
- selectors: { angular: "igx-carousel", webcomponents: "igc-carousel" }
125
- },
126
- chat: {
127
- selectors: { angular: "igc-chat", webcomponents: "igc-chat" },
128
- compound: {
129
- description: "The chat component uses a flat-icon-button, contained-icon-button, and a textarea internally.",
130
- relatedThemes: [
131
- "flat-icon-button",
132
- "contained-icon-button",
133
- "input-group"
134
- ],
135
- guidance: "Make sure the textarea, the flat-icon-button, and the contained-icon-button themes visually coordinate with each other and the overall chat background."
136
- }
137
- },
138
- checkbox: {
139
- selectors: { angular: "igx-checkbox", webcomponents: "igc-checkbox" }
140
- },
141
- chip: {
142
- selectors: { angular: "igx-chip", webcomponents: "igc-chip" }
143
- },
144
- "column-actions": {
145
- selectors: { angular: "igx-column-actions", webcomponents: null },
146
- compound: {
147
- description: "The column actions component uses checkboxes for selection and flat-buttons for the action items.",
148
- relatedThemes: ["checkbox", "flat-button"],
149
- tokenDerivations: {
150
- "flat-button.foreground": {
151
- from: "column-actions.background",
152
- transform: "adaptive-contrast"
153
- }
154
- },
155
- guidance: "Make sure to theme these child components to visually coordinate with each other and the overall column actions background."
156
- }
157
- },
158
- combo: {
159
- selectors: { angular: "igx-combo", webcomponents: "igc-combo" },
160
- compound: {
161
- description: "The combo component combines input, drop-down, and checkbox components.",
162
- relatedThemes: ["input-group", "drop-down", "checkbox"],
163
- tokenDerivations: {
164
- "input-group.focused-border-color": {
165
- from: "combo.toggle-button-background",
166
- transform: "identity"
167
- },
168
- "combo.empty-list-background": {
169
- from: "combo.toggle-button-background",
170
- transform: "identity"
171
- },
172
- "drop-down.background-color": {
173
- from: "combo.toggle-button-background",
174
- transform: "identity"
175
- },
176
- "checkbox.fill-color": {
177
- from: "combo.toggle-button-background",
178
- transform: "identity"
179
- }
180
- },
181
- additionalScopes: {
182
- overlay: { angular: ".igx-drop-down__list" },
183
- input: { angular: "igx-combo, .igx-drop-down__list" }
184
- },
185
- childScopes: {
186
- "drop-down": { angular: "overlay" },
187
- checkbox: { angular: "overlay" },
188
- "input-group": { angular: "input" }
189
- },
190
- guidance: "The combo's input-group, drop-down, and checkbox should share a consistent color scheme."
191
- }
192
- },
193
- "simple-combo": {
194
- selectors: {
195
- angular: "igx-simple-combo",
196
- webcomponents: "igc-combo[single-select]"
197
- },
198
- compound: {
199
- description: "The simple combo component combines input and drop-down components.",
200
- relatedThemes: ["input-group", "drop-down"],
201
- tokenDerivations: {
202
- "combo.empty-list-background": {
203
- from: "combo.toggle-button-background",
204
- transform: "identity"
205
- },
206
- "input-group.focused-border-color": {
207
- from: "combo.toggle-button-background",
208
- transform: "identity"
209
- }
210
- },
211
- additionalScopes: {
212
- overlay: { angular: ".igx-drop-down__list" }
213
- },
214
- childScopes: {
215
- "drop-down": { angular: "overlay" }
216
- },
217
- guidance: "The simple-combo's input-group and drop-down should share a consistent color scheme."
218
- }
219
- },
220
- "date-picker": {
221
- selectors: { angular: "igx-date-picker", webcomponents: "igc-date-picker" },
222
- compound: {
223
- description: "The date-picker combines input, calendar, and flat-button components.",
224
- relatedThemes: ["flat-button", "input-group", "calendar"],
225
- additionalScopes: {
226
- overlay: { angular: ".igx-date-picker" }
227
- },
228
- childScopes: {
229
- calendar: { angular: "overlay" },
230
- "flat-button": { angular: "overlay" },
231
- "input-group": { angular: "inline" }
232
- },
233
- tokenDerivations: {
234
- "flat-button.foreground": {
235
- from: "calendar.content-background",
236
- transform: "adaptive-contrast"
237
- }
238
- },
239
- guidance: "The flat-button foreground inside the calendar should contrast with the calendar content background."
240
- }
241
- },
242
- "date-range-picker": {
243
- selectors: {
244
- angular: "igx-date-range-picker",
245
- webcomponents: "igc-date-range-picker"
246
- },
247
- compound: {
248
- description: "The date-range-picker combines input, calendar, and flat-button components.",
249
- relatedThemes: ["flat-button", "input-group", "calendar"],
250
- additionalScopes: {
251
- overlay: { angular: ".igx-date-picker" }
252
- },
253
- childScopes: {
254
- calendar: { angular: "overlay" },
255
- "flat-button": { angular: "overlay" },
256
- "input-group": { angular: "inline" }
257
- },
258
- tokenDerivations: {
259
- "flat-button.foreground": {
260
- from: "calendar.content-background",
261
- transform: "adaptive-contrast"
262
- }
263
- },
264
- guidance: "The flat-button foreground inside the calendar should contrast with the calendar content background."
265
- }
266
- },
267
- "date-range-start": {
268
- selectors: { angular: "igx-date-range-start", webcomponents: null },
269
- theme: "input-group"
270
- },
271
- "date-range-end": {
272
- selectors: { angular: "igx-date-range-end", webcomponents: null },
273
- theme: "input-group"
274
- },
275
- "date-time-input": {
276
- selectors: { angular: null, webcomponents: "igc-date-time-input" }
277
- },
278
- dialog: {
279
- selectors: { angular: ".igx-dialog", webcomponents: "igc-dialog" },
280
- compound: {
281
- description: "The dialog component uses flat-buttons for the actions",
282
- relatedThemes: ["flat-button"],
283
- tokenDerivations: {
284
- "flat-button.foreground": {
285
- from: "dialog.background",
286
- transform: "adaptive-contrast"
287
- }
288
- },
289
- guidance: `The dialog action buttons should visually coordinate with the dialog background. If customizing the dialog background, ensure flat-button foreground contrasts against it.`
290
- }
291
- },
292
- divider: {
293
- selectors: { angular: "igx-divider", webcomponents: "igc-divider" }
294
- },
295
- "dock-manager": {
296
- selectors: { angular: "igc-dockmanager", webcomponents: "igc-dockmanager" }
297
- },
298
- "drop-down": {
299
- selectors: {
300
- angular: ".igx-drop-down__list",
301
- webcomponents: "igc-dropdown"
302
- }
303
- },
304
- "expansion-panel": {
305
- selectors: {
306
- angular: "igx-expansion-panel",
307
- webcomponents: "igc-expansion-panel"
308
- }
309
- },
310
- "file-input": {
311
- selectors: {
312
- angular: 'igx-input-group[class~="igx-input-group--file"]',
313
- webcomponents: "igc-file-input"
314
- },
315
- compound: {
316
- description: "The file-input uses an input-group for the input field.",
317
- relatedThemes: ["input-group", "file-input"],
318
- guidance: `The file input is composed of an input-group and a browse button. Both themes should share the same visual treatment as the file-input wrapper.`
319
- }
320
- },
321
- grid: {
322
- selectors: { angular: "igx-grid", webcomponents: "igc-grid" },
323
- compound: GRID_COMPOUND_INFO
324
- },
325
- "tree-grid": {
326
- selectors: { angular: "igx-tree-grid", webcomponents: "igc-tree-grid" },
327
- theme: "grid",
328
- compound: GRID_COMPOUND_INFO
329
- },
330
- "hierarchical-grid": {
331
- selectors: {
332
- angular: "igx-hierarchical-grid",
333
- webcomponents: "igc-hierarchical-grid"
334
- },
335
- theme: "grid",
336
- compound: GRID_COMPOUND_INFO
337
- },
338
- "pivot-grid": {
339
- selectors: { angular: "igx-pivot-grid", webcomponents: "igc-pivot-grid" },
340
- theme: "grid",
341
- compound: GRID_COMPOUND_INFO
342
- },
343
- "grid-lite": {
344
- selectors: { angular: "igx-grid-lite", webcomponents: "igc-grid-lite" },
345
- theme: "grid",
346
- compound: {
347
- description: "The grid lite component is a compound component some themeable parts including chips and checkboxes.",
348
- relatedThemes: ["checkbox", "chip"]
349
- }
350
- },
351
- "grid-excel-style-filtering": {
352
- selectors: {
353
- angular: "igx-grid-excel-style-filtering",
354
- webcomponents: "igc-grid-excel-style-filtering"
355
- },
356
- theme: "grid",
357
- compound: GRID_COMPOUND_INFO
358
- },
359
- "grid-summary": {
360
- selectors: {
361
- angular: ".igx-grid-summary",
362
- webcomponents: "igc-grid-summary"
363
- }
364
- },
365
- "grid-toolbar": {
366
- selectors: {
367
- angular: "igx-grid-toolbar",
368
- webcomponents: "igc-grid-toolbar"
369
- }
370
- },
371
- highlight: {
372
- selectors: { angular: "igx-highlight", webcomponents: "igc-highlight" }
373
- },
374
- icon: {
375
- selectors: { angular: "igx-icon", webcomponents: "igc-icon" }
376
- },
377
- "input-group": {
378
- selectors: { angular: "igx-input-group", webcomponents: "igc-input" }
379
- },
380
- label: {
381
- selectors: { angular: "[igxLabel]", webcomponents: "igc-label" }
382
- },
383
- list: {
384
- selectors: { angular: "igx-list", webcomponents: "igc-list" }
385
- },
386
- navbar: {
387
- selectors: { angular: "igx-navbar", webcomponents: "igc-navbar" },
388
- compound: {
389
- description: "The navbar contains buttons and icons-buttons for navigation.",
390
- relatedThemes: [
391
- "flat-button",
392
- "outlined-button",
393
- "contained-button",
394
- "flat-icon-button",
395
- "outlined-icon-button",
396
- "contained-icon-button"
397
- ],
398
- guidance: "Make sure to theme all button and icon-button variants in the navbar to visually coordinate with the navbar background."
399
- }
400
- },
401
- navdrawer: {
402
- selectors: { angular: "igx-nav-drawer", webcomponents: "igc-nav-drawer" }
403
- },
404
- overlay: {
405
- selectors: { angular: ".igx-overlay__content", webcomponents: null }
406
- },
407
- paginator: {
408
- selectors: { angular: "igx-paginator", webcomponents: "igc-paginator" },
409
- compound: {
410
- description: "The paginator uses combo and flat-icon-buttons for the page controls.",
411
- relatedThemes: ["combo", "flat-icon-button"],
412
- guidance: "The combo and flat-icon-button themes should visually coordinate with each other and the overall paginator background."
413
- }
414
- },
415
- "pivot-data-selector": {
416
- selectors: {
417
- angular: "igx-pivot-data-selector",
418
- webcomponents: "igc-pivot-data-selector"
419
- },
420
- compound: {
421
- description: "The pivot data selector uses checkboxes, expansion panels, lists, and chips.",
422
- relatedThemes: ["checkbox", "expansion-panel", "chip", "list"],
423
- guidance: `The pivot data selector uses checkboxes for field selection, expansion panels for grouping, chips for displaying selected fields, and lists for field ordering. Detailed token derivation rules are not yet available — use the token names and descriptions from get_component_design_tokens for each child to guide value selection.`
424
- }
425
- },
426
- "progress-circular": {
427
- selectors: {
428
- angular: "igx-circular-bar",
429
- webcomponents: "igc-circular-progress"
430
- }
431
- },
432
- "progress-linear": {
433
- selectors: {
434
- angular: "igx-linear-bar",
435
- webcomponents: "igc-linear-progress"
436
- }
437
- },
438
- "query-builder": {
439
- selectors: { angular: "igx-query-builder", webcomponents: null },
440
- compound: {
441
- description: "The query builder uses inputs, dropdowns, chips, buttons and button-groups for building query expressions.",
442
- relatedThemes: [
443
- "input-group",
444
- "select",
445
- "chip",
446
- "flat-button",
447
- "outlined-button",
448
- "button-group",
449
- "flat-icon-button",
450
- "outlined-icon-button"
451
- ],
452
- guidance: `The query builder uses input-groups and selects for expression values and operator/field selection, chips for displaying conditions, and buttons/button-groups for adding and grouping expressions.`
453
- }
454
- },
455
- radio: {
456
- selectors: { angular: "igx-radio", webcomponents: "igc-radio" }
457
- },
458
- rating: {
459
- selectors: { angular: "igc-rating", webcomponents: "igc-rating" }
460
- },
461
- ripple: {
462
- selectors: { angular: "igx-ripple", webcomponents: "igc-ripple" }
463
- },
464
- scrollbar: {
465
- selectors: { angular: ".ig-scrollbar", webcomponents: ".ig-scrollbar" }
466
- },
467
- select: {
468
- selectors: { angular: "igx-select", webcomponents: "igc-select" },
469
- compound: {
470
- description: "The select component combines input-group and drop-down components.",
471
- relatedThemes: ["input-group", "drop-down"],
472
- additionalScopes: {
473
- overlay: { angular: ".igx-drop-down__list" }
474
- },
475
- childScopes: {
476
- "drop-down": { angular: "overlay" }
477
- },
478
- tokenDerivations: {
479
- "input-group.focused-border-color": {
480
- from: "select.toggle-button-background",
481
- transform: "identity"
482
- },
483
- "drop-down.background-color": {
484
- from: "select.toggle-button-background",
485
- transform: "identity"
486
- }
487
- },
488
- guidance: `The select input-group and drop-down should share a consistent color scheme. The drop-down background should match the select surface intent.`
489
- }
490
- },
491
- slider: {
492
- selectors: { angular: "igx-slider", webcomponents: "igc-slider" }
493
- },
494
- snackbar: {
495
- selectors: { angular: "igx-snackbar", webcomponents: "igc-snackbar" }
496
- },
497
- splitter: {
498
- selectors: { angular: "igx-splitter", webcomponents: "igc-splitter" }
499
- },
500
- stepper: {
501
- selectors: { angular: "igx-stepper", webcomponents: "igc-stepper" }
502
- },
503
- switch: {
504
- selectors: { angular: "igx-switch", webcomponents: "igc-switch" }
505
- },
506
- tabs: {
507
- selectors: { angular: "igx-tabs", webcomponents: "igc-tabs" }
508
- },
509
- "time-picker": {
510
- selectors: { angular: "igx-time-picker", webcomponents: null },
511
- compound: {
512
- description: "The time picker uses an input-group for the input field.",
513
- relatedThemes: ["input-group", "time-picker", "flat-button"],
514
- additionalScopes: {
515
- overlay: { angular: ".igx-time-picker" }
516
- },
517
- childScopes: {
518
- "time-picker": { angular: "overlay" },
519
- "flat-button": { angular: "overlay" }
520
- },
521
- guidance: `The time-picker input-group and the time-picker dial should share a consistent color scheme. The input-group text color should coordinate with the time-picker header.`
522
- }
523
- },
524
- textarea: {
525
- selectors: {
526
- angular: ".igx-input-group--textarea-group",
527
- webcomponents: "igc-textarea"
528
- },
529
- theme: "input-group"
530
- },
531
- toast: {
532
- selectors: { angular: "igx-toast", webcomponents: "igc-toast" }
533
- },
534
- tooltip: {
535
- selectors: { angular: ".igx-tooltip", webcomponents: "igc-tooltip" }
536
- },
537
- tree: {
538
- selectors: { angular: "igx-tree-node", webcomponents: "igc-tree" }
539
- },
540
- watermark: {
541
- selectors: {
542
- angular: "igc-trial-watermark",
543
- webcomponents: "igc-trial-watermark"
544
- }
545
- }
26
+ var COMPONENT_METADATA = {
27
+ accordion: { selectors: {
28
+ angular: "igx-accordion",
29
+ webcomponents: "igc-accordion"
30
+ } },
31
+ "action-strip": { selectors: {
32
+ angular: "igx-action-strip",
33
+ webcomponents: null
34
+ } },
35
+ avatar: { selectors: {
36
+ angular: "igx-avatar",
37
+ webcomponents: "igc-avatar"
38
+ } },
39
+ badge: { selectors: {
40
+ angular: "igx-badge",
41
+ webcomponents: "igc-badge"
42
+ } },
43
+ banner: {
44
+ selectors: {
45
+ angular: "igx-banner",
46
+ webcomponents: "igc-banner"
47
+ },
48
+ compound: {
49
+ description: "The banner component uses flat-buttons for the actions",
50
+ relatedThemes: ["flat-button"],
51
+ guidance: `The banner action buttons should visually coordinate with the banner background. \
52
+ If customizing the banner background, ensure flat-button foreground contrasts against it.`
53
+ }
54
+ },
55
+ "bottom-nav": { selectors: {
56
+ angular: "igx-bottom-nav",
57
+ webcomponents: null
58
+ } },
59
+ button: {
60
+ selectors: {
61
+ angular: ".igx-button",
62
+ webcomponents: "igc-button"
63
+ },
64
+ variants: [
65
+ "flat-button",
66
+ "contained-button",
67
+ "outlined-button",
68
+ "fab-button"
69
+ ]
70
+ },
71
+ "flat-button": { selectors: {
72
+ angular: ".igx-button--flat",
73
+ webcomponents: "igc-button[variant=\"flat\"]"
74
+ } },
75
+ "contained-button": { selectors: {
76
+ angular: [".igx-button--contained"],
77
+ webcomponents: "igc-button[variant=\"contained\"]"
78
+ } },
79
+ "outlined-button": { selectors: {
80
+ angular: [".igx-button--outlined"],
81
+ webcomponents: "igc-button[variant=\"outlined\"]"
82
+ } },
83
+ "fab-button": { selectors: {
84
+ angular: [".igx-button--fab"],
85
+ webcomponents: "igc-button[variant=\"fab\"]"
86
+ } },
87
+ "icon-button": {
88
+ selectors: {
89
+ angular: [".igx-icon-button"],
90
+ webcomponents: "igc-icon-button"
91
+ },
92
+ variants: [
93
+ "flat-icon-button",
94
+ "contained-icon-button",
95
+ "outlined-icon-button"
96
+ ]
97
+ },
98
+ "flat-icon-button": { selectors: {
99
+ angular: [".igx-icon-button--flat"],
100
+ webcomponents: "igc-icon-button[variant=\"flat\"]"
101
+ } },
102
+ "contained-icon-button": { selectors: {
103
+ angular: [".igx-icon-button--contained"],
104
+ webcomponents: "igc-icon-button[variant=\"contained\"]"
105
+ } },
106
+ "outlined-icon-button": { selectors: {
107
+ angular: [".igx-icon-button--outlined"],
108
+ webcomponents: "igc-icon-button[variant=\"outlined\"]"
109
+ } },
110
+ "button-group": { selectors: {
111
+ angular: "igx-buttongroup",
112
+ webcomponents: "igc-button-group"
113
+ } },
114
+ calendar: { selectors: {
115
+ angular: "igx-calendar",
116
+ webcomponents: "igc-calendar"
117
+ } },
118
+ card: {
119
+ selectors: {
120
+ angular: "igx-card",
121
+ webcomponents: "igc-card"
122
+ },
123
+ compound: {
124
+ description: "The card component can contain various child components like avatars, buttons, chips, and icons.",
125
+ relatedThemes: [
126
+ "flat-button",
127
+ "flat-icon-button",
128
+ "chip",
129
+ "icon"
130
+ ],
131
+ guidance: `The card component can contain flat-button(s), flat-icon-button(s), and icon(s) that should harmonize visually well with the background of the card component. \
132
+ For the flat-button and flat-icon-button themes, ensure the foreground color contrasts well with the card background. \
133
+ For the icon theme, the color should also coordinate with the card background while maintaining sufficient contrast.`
134
+ }
135
+ },
136
+ carousel: { selectors: {
137
+ angular: "igx-carousel",
138
+ webcomponents: "igc-carousel"
139
+ } },
140
+ chat: {
141
+ selectors: {
142
+ angular: "igc-chat",
143
+ webcomponents: "igc-chat"
144
+ },
145
+ compound: {
146
+ description: "The chat component uses a flat-icon-button, contained-icon-button, and a textarea internally.",
147
+ relatedThemes: [
148
+ "flat-icon-button",
149
+ "contained-icon-button",
150
+ "input-group"
151
+ ],
152
+ guidance: "Make sure the textarea, the flat-icon-button, and the contained-icon-button themes visually coordinate with each other and the overall chat background."
153
+ }
154
+ },
155
+ checkbox: { selectors: {
156
+ angular: "igx-checkbox",
157
+ webcomponents: "igc-checkbox"
158
+ } },
159
+ chip: { selectors: {
160
+ angular: "igx-chip",
161
+ webcomponents: "igc-chip"
162
+ } },
163
+ "column-actions": {
164
+ selectors: {
165
+ angular: "igx-column-actions",
166
+ webcomponents: null
167
+ },
168
+ compound: {
169
+ description: "The column actions component uses checkboxes for selection and flat-buttons for the action items.",
170
+ relatedThemes: ["checkbox", "flat-button"],
171
+ tokenDerivations: { "flat-button.foreground": {
172
+ from: "column-actions.background",
173
+ transform: "adaptive-contrast"
174
+ } },
175
+ guidance: "Make sure to theme these child components to visually coordinate with each other and the overall column actions background."
176
+ }
177
+ },
178
+ combo: {
179
+ selectors: {
180
+ angular: "igx-combo",
181
+ webcomponents: "igc-combo"
182
+ },
183
+ compound: {
184
+ description: "The combo component combines input, drop-down, and checkbox components.",
185
+ relatedThemes: [
186
+ "input-group",
187
+ "drop-down",
188
+ "checkbox"
189
+ ],
190
+ tokenDerivations: {
191
+ "input-group.focused-border-color": {
192
+ from: "combo.toggle-button-background",
193
+ transform: "identity"
194
+ },
195
+ "combo.empty-list-background": {
196
+ from: "combo.toggle-button-background",
197
+ transform: "identity"
198
+ },
199
+ "drop-down.background-color": {
200
+ from: "combo.toggle-button-background",
201
+ transform: "identity"
202
+ },
203
+ "checkbox.fill-color": {
204
+ from: "combo.toggle-button-background",
205
+ transform: "identity"
206
+ }
207
+ },
208
+ additionalScopes: {
209
+ overlay: { angular: ".igx-drop-down__list" },
210
+ input: { angular: "igx-combo, .igx-drop-down__list" }
211
+ },
212
+ childScopes: {
213
+ "drop-down": { angular: "overlay" },
214
+ checkbox: { angular: "overlay" },
215
+ "input-group": { angular: "input" }
216
+ },
217
+ guidance: "The combo's input-group, drop-down, and checkbox should share a consistent color scheme."
218
+ }
219
+ },
220
+ "simple-combo": {
221
+ selectors: {
222
+ angular: "igx-simple-combo",
223
+ webcomponents: "igc-combo[single-select]"
224
+ },
225
+ compound: {
226
+ description: "The simple combo component combines input and drop-down components.",
227
+ relatedThemes: ["input-group", "drop-down"],
228
+ tokenDerivations: {
229
+ "combo.empty-list-background": {
230
+ from: "combo.toggle-button-background",
231
+ transform: "identity"
232
+ },
233
+ "input-group.focused-border-color": {
234
+ from: "combo.toggle-button-background",
235
+ transform: "identity"
236
+ }
237
+ },
238
+ additionalScopes: { overlay: { angular: ".igx-drop-down__list" } },
239
+ childScopes: { "drop-down": { angular: "overlay" } },
240
+ guidance: "The simple-combo's input-group and drop-down should share a consistent color scheme."
241
+ }
242
+ },
243
+ "date-picker": {
244
+ selectors: {
245
+ angular: "igx-date-picker",
246
+ webcomponents: "igc-date-picker"
247
+ },
248
+ compound: {
249
+ description: "The date-picker combines input, calendar, and flat-button components.",
250
+ relatedThemes: [
251
+ "flat-button",
252
+ "input-group",
253
+ "calendar"
254
+ ],
255
+ additionalScopes: { overlay: { angular: ".igx-date-picker" } },
256
+ childScopes: {
257
+ calendar: { angular: "overlay" },
258
+ "flat-button": { angular: "overlay" },
259
+ "input-group": { angular: "inline" }
260
+ },
261
+ tokenDerivations: { "flat-button.foreground": {
262
+ from: "calendar.content-background",
263
+ transform: "adaptive-contrast"
264
+ } },
265
+ guidance: "The flat-button foreground inside the calendar should contrast with the calendar content background."
266
+ }
267
+ },
268
+ "date-range-picker": {
269
+ selectors: {
270
+ angular: "igx-date-range-picker",
271
+ webcomponents: "igc-date-range-picker"
272
+ },
273
+ compound: {
274
+ description: "The date-range-picker combines input, calendar, and flat-button components.",
275
+ relatedThemes: [
276
+ "flat-button",
277
+ "input-group",
278
+ "calendar"
279
+ ],
280
+ additionalScopes: { overlay: { angular: ".igx-date-picker" } },
281
+ childScopes: {
282
+ calendar: { angular: "overlay" },
283
+ "flat-button": { angular: "overlay" },
284
+ "input-group": { angular: "inline" }
285
+ },
286
+ tokenDerivations: { "flat-button.foreground": {
287
+ from: "calendar.content-background",
288
+ transform: "adaptive-contrast"
289
+ } },
290
+ guidance: "The flat-button foreground inside the calendar should contrast with the calendar content background."
291
+ }
292
+ },
293
+ "date-range-start": {
294
+ selectors: {
295
+ angular: "igx-date-range-start",
296
+ webcomponents: null
297
+ },
298
+ theme: "input-group"
299
+ },
300
+ "date-range-end": {
301
+ selectors: {
302
+ angular: "igx-date-range-end",
303
+ webcomponents: null
304
+ },
305
+ theme: "input-group"
306
+ },
307
+ "date-time-input": { selectors: {
308
+ angular: null,
309
+ webcomponents: "igc-date-time-input"
310
+ } },
311
+ dialog: {
312
+ selectors: {
313
+ angular: ".igx-dialog",
314
+ webcomponents: "igc-dialog"
315
+ },
316
+ compound: {
317
+ description: "The dialog component uses flat-buttons for the actions",
318
+ relatedThemes: ["flat-button"],
319
+ tokenDerivations: { "flat-button.foreground": {
320
+ from: "dialog.background",
321
+ transform: "adaptive-contrast"
322
+ } },
323
+ guidance: `The dialog action buttons should visually coordinate with the dialog background. \
324
+ If customizing the dialog background, ensure flat-button foreground contrasts against it.`
325
+ }
326
+ },
327
+ divider: { selectors: {
328
+ angular: "igx-divider",
329
+ webcomponents: "igc-divider"
330
+ } },
331
+ "dock-manager": { selectors: {
332
+ angular: "igc-dockmanager",
333
+ webcomponents: "igc-dockmanager"
334
+ } },
335
+ "drop-down": { selectors: {
336
+ angular: ".igx-drop-down__list",
337
+ webcomponents: "igc-dropdown"
338
+ } },
339
+ "expansion-panel": { selectors: {
340
+ angular: "igx-expansion-panel",
341
+ webcomponents: "igc-expansion-panel"
342
+ } },
343
+ "file-input": {
344
+ selectors: {
345
+ angular: "igx-input-group[class~=\"igx-input-group--file\"]",
346
+ webcomponents: "igc-file-input"
347
+ },
348
+ compound: {
349
+ description: "The file-input uses an input-group for the input field.",
350
+ relatedThemes: ["input-group", "file-input"],
351
+ guidance: `The file input is composed of an input-group and a browse button. \
352
+ Both themes should share the same visual treatment as the file-input wrapper.`
353
+ }
354
+ },
355
+ grid: {
356
+ selectors: {
357
+ angular: "igx-grid",
358
+ webcomponents: "igc-grid"
359
+ },
360
+ compound: GRID_COMPOUND_INFO
361
+ },
362
+ "tree-grid": {
363
+ selectors: {
364
+ angular: "igx-tree-grid",
365
+ webcomponents: "igc-tree-grid"
366
+ },
367
+ theme: "grid",
368
+ compound: GRID_COMPOUND_INFO
369
+ },
370
+ "hierarchical-grid": {
371
+ selectors: {
372
+ angular: "igx-hierarchical-grid",
373
+ webcomponents: "igc-hierarchical-grid"
374
+ },
375
+ theme: "grid",
376
+ compound: GRID_COMPOUND_INFO
377
+ },
378
+ "pivot-grid": {
379
+ selectors: {
380
+ angular: "igx-pivot-grid",
381
+ webcomponents: "igc-pivot-grid"
382
+ },
383
+ theme: "grid",
384
+ compound: GRID_COMPOUND_INFO
385
+ },
386
+ "grid-lite": {
387
+ selectors: {
388
+ angular: "igx-grid-lite",
389
+ webcomponents: "igc-grid-lite"
390
+ },
391
+ theme: "grid",
392
+ compound: {
393
+ description: "The grid lite component is a compound component some themeable parts including chips and checkboxes.",
394
+ relatedThemes: ["checkbox", "chip"]
395
+ }
396
+ },
397
+ "grid-excel-style-filtering": {
398
+ selectors: {
399
+ angular: "igx-grid-excel-style-filtering",
400
+ webcomponents: "igc-grid-excel-style-filtering"
401
+ },
402
+ theme: "grid",
403
+ compound: GRID_COMPOUND_INFO
404
+ },
405
+ "grid-summary": { selectors: {
406
+ angular: ".igx-grid-summary",
407
+ webcomponents: "igc-grid-summary"
408
+ } },
409
+ "grid-toolbar": { selectors: {
410
+ angular: "igx-grid-toolbar",
411
+ webcomponents: "igc-grid-toolbar"
412
+ } },
413
+ highlight: { selectors: {
414
+ angular: "igx-highlight",
415
+ webcomponents: "igc-highlight"
416
+ } },
417
+ icon: { selectors: {
418
+ angular: "igx-icon",
419
+ webcomponents: "igc-icon"
420
+ } },
421
+ "input-group": { selectors: {
422
+ angular: "igx-input-group",
423
+ webcomponents: "igc-input"
424
+ } },
425
+ label: { selectors: {
426
+ angular: "[igxLabel]",
427
+ webcomponents: "igc-label"
428
+ } },
429
+ list: { selectors: {
430
+ angular: "igx-list",
431
+ webcomponents: "igc-list"
432
+ } },
433
+ navbar: {
434
+ selectors: {
435
+ angular: "igx-navbar",
436
+ webcomponents: "igc-navbar"
437
+ },
438
+ compound: {
439
+ description: "The navbar contains buttons and icons-buttons for navigation.",
440
+ relatedThemes: [
441
+ "flat-button",
442
+ "outlined-button",
443
+ "contained-button",
444
+ "flat-icon-button",
445
+ "outlined-icon-button",
446
+ "contained-icon-button"
447
+ ],
448
+ guidance: "Make sure to theme all button and icon-button variants in the navbar to visually coordinate with the navbar background."
449
+ }
450
+ },
451
+ navdrawer: { selectors: {
452
+ angular: "igx-nav-drawer",
453
+ webcomponents: "igc-nav-drawer"
454
+ } },
455
+ overlay: { selectors: {
456
+ angular: ".igx-overlay__content",
457
+ webcomponents: null
458
+ } },
459
+ paginator: {
460
+ selectors: {
461
+ angular: "igx-paginator",
462
+ webcomponents: "igc-paginator"
463
+ },
464
+ compound: {
465
+ description: "The paginator uses combo and flat-icon-buttons for the page controls.",
466
+ relatedThemes: ["combo", "flat-icon-button"],
467
+ guidance: "The combo and flat-icon-button themes should visually coordinate with each other and the overall paginator background."
468
+ }
469
+ },
470
+ "pivot-data-selector": {
471
+ selectors: {
472
+ angular: "igx-pivot-data-selector",
473
+ webcomponents: "igc-pivot-data-selector"
474
+ },
475
+ compound: {
476
+ description: "The pivot data selector uses checkboxes, expansion panels, lists, and chips.",
477
+ relatedThemes: [
478
+ "checkbox",
479
+ "expansion-panel",
480
+ "chip",
481
+ "list"
482
+ ],
483
+ guidance: `The pivot data selector uses checkboxes for field selection, expansion panels for grouping, \
484
+ chips for displaying selected fields, and lists for field ordering. \
485
+ Detailed token derivation rules are not yet available — use the token names \
486
+ and descriptions from get_component_design_tokens for each child to guide value selection.`
487
+ }
488
+ },
489
+ "progress-circular": { selectors: {
490
+ angular: "igx-circular-bar",
491
+ webcomponents: "igc-circular-progress"
492
+ } },
493
+ "progress-linear": { selectors: {
494
+ angular: "igx-linear-bar",
495
+ webcomponents: "igc-linear-progress"
496
+ } },
497
+ "query-builder": {
498
+ selectors: {
499
+ angular: "igx-query-builder",
500
+ webcomponents: null
501
+ },
502
+ compound: {
503
+ description: "The query builder uses inputs, dropdowns, chips, buttons and button-groups for building query expressions.",
504
+ relatedThemes: [
505
+ "input-group",
506
+ "select",
507
+ "chip",
508
+ "flat-button",
509
+ "outlined-button",
510
+ "button-group",
511
+ "flat-icon-button",
512
+ "outlined-icon-button"
513
+ ],
514
+ guidance: `The query builder uses input-groups and selects for expression values and operator/field selection, \
515
+ chips for displaying conditions, and buttons/button-groups for adding and grouping expressions.`
516
+ }
517
+ },
518
+ radio: { selectors: {
519
+ angular: "igx-radio",
520
+ webcomponents: "igc-radio"
521
+ } },
522
+ rating: { selectors: {
523
+ angular: "igc-rating",
524
+ webcomponents: "igc-rating"
525
+ } },
526
+ ripple: { selectors: {
527
+ angular: "igx-ripple",
528
+ webcomponents: "igc-ripple"
529
+ } },
530
+ scrollbar: { selectors: {
531
+ angular: ".ig-scrollbar",
532
+ webcomponents: ".ig-scrollbar"
533
+ } },
534
+ select: {
535
+ selectors: {
536
+ angular: "igx-select",
537
+ webcomponents: "igc-select"
538
+ },
539
+ compound: {
540
+ description: "The select component combines input-group and drop-down components.",
541
+ relatedThemes: ["input-group", "drop-down"],
542
+ additionalScopes: { overlay: { angular: ".igx-drop-down__list" } },
543
+ childScopes: { "drop-down": { angular: "overlay" } },
544
+ tokenDerivations: {
545
+ "input-group.focused-border-color": {
546
+ from: "select.toggle-button-background",
547
+ transform: "identity"
548
+ },
549
+ "drop-down.background-color": {
550
+ from: "select.toggle-button-background",
551
+ transform: "identity"
552
+ }
553
+ },
554
+ guidance: `The select input-group and drop-down should share a consistent color scheme. \
555
+ The drop-down background should match the select surface intent.`
556
+ }
557
+ },
558
+ slider: { selectors: {
559
+ angular: "igx-slider",
560
+ webcomponents: "igc-slider"
561
+ } },
562
+ snackbar: { selectors: {
563
+ angular: "igx-snackbar",
564
+ webcomponents: "igc-snackbar"
565
+ } },
566
+ splitter: { selectors: {
567
+ angular: "igx-splitter",
568
+ webcomponents: "igc-splitter"
569
+ } },
570
+ stepper: { selectors: {
571
+ angular: "igx-stepper",
572
+ webcomponents: "igc-stepper"
573
+ } },
574
+ switch: { selectors: {
575
+ angular: "igx-switch",
576
+ webcomponents: "igc-switch"
577
+ } },
578
+ tabs: { selectors: {
579
+ angular: "igx-tabs",
580
+ webcomponents: "igc-tabs"
581
+ } },
582
+ "time-picker": {
583
+ selectors: {
584
+ angular: "igx-time-picker",
585
+ webcomponents: null
586
+ },
587
+ compound: {
588
+ description: "The time picker uses an input-group for the input field.",
589
+ relatedThemes: [
590
+ "input-group",
591
+ "time-picker",
592
+ "flat-button"
593
+ ],
594
+ additionalScopes: { overlay: { angular: ".igx-time-picker" } },
595
+ childScopes: {
596
+ "time-picker": { angular: "overlay" },
597
+ "flat-button": { angular: "overlay" }
598
+ },
599
+ guidance: `The time-picker input-group and the time-picker dial should share a consistent color scheme. \
600
+ The input-group text color should coordinate with the time-picker header.`
601
+ }
602
+ },
603
+ textarea: {
604
+ selectors: {
605
+ angular: ".igx-input-group--textarea-group",
606
+ webcomponents: "igc-textarea"
607
+ },
608
+ theme: "input-group"
609
+ },
610
+ toast: { selectors: {
611
+ angular: "igx-toast",
612
+ webcomponents: "igc-toast"
613
+ } },
614
+ tooltip: { selectors: {
615
+ angular: ".igx-tooltip",
616
+ webcomponents: "igc-tooltip"
617
+ } },
618
+ tree: { selectors: {
619
+ angular: "igx-tree-node",
620
+ webcomponents: "igc-tree"
621
+ } },
622
+ watermark: { selectors: {
623
+ angular: "igc-trial-watermark",
624
+ webcomponents: "igc-trial-watermark"
625
+ } }
546
626
  };
547
- new Set(
548
- Object.values(COMPONENT_METADATA).filter((m) => m.variants).flatMap((m) => m.variants)
549
- );
627
+ new Set(Object.values(COMPONENT_METADATA).filter((m) => m.variants).flatMap((m) => m.variants));
628
+ /**
629
+ * Get the selector(s) for a component on a specific platform.
630
+ * @param componentName - The component name
631
+ * @param platform - The target platform
632
+ * @returns Array of selectors (normalized to always return array), empty array if component not found or not available on platform
633
+ */
550
634
  function getComponentSelector(componentName, platform) {
551
- const metadata = COMPONENT_METADATA[componentName];
552
- if (!metadata) {
553
- return [];
554
- }
555
- const platformSelectors = platform === "angular" ? metadata.selectors.angular : metadata.selectors.webcomponents;
556
- if (platformSelectors === null) {
557
- return [];
558
- }
559
- return Array.isArray(platformSelectors) ? platformSelectors : [platformSelectors];
635
+ const metadata = COMPONENT_METADATA[componentName];
636
+ if (!metadata) return [];
637
+ const platformSelectors = platform === "angular" ? metadata.selectors.angular : metadata.selectors.webcomponents;
638
+ if (platformSelectors === null) return [];
639
+ return Array.isArray(platformSelectors) ? platformSelectors : [platformSelectors];
560
640
  }
641
+ /**
642
+ * Check if a component is available on a specific platform.
643
+ * @param componentName - The component name
644
+ * @param platform - The target platform ('angular' or 'webcomponents')
645
+ * @returns True if the component is available on the platform, false otherwise
646
+ */
561
647
  function isComponentAvailable(componentName, platform) {
562
- const metadata = COMPONENT_METADATA[componentName];
563
- if (!metadata) {
564
- return false;
565
- }
566
- const platformSelector = platform === "angular" ? metadata.selectors.angular : metadata.selectors.webcomponents;
567
- return platformSelector !== null;
648
+ const metadata = COMPONENT_METADATA[componentName];
649
+ if (!metadata) return false;
650
+ return (platform === "angular" ? metadata.selectors.angular : metadata.selectors.webcomponents) !== null;
568
651
  }
652
+ /**
653
+ * Get platform availability for a component.
654
+ * @param componentName - The component name
655
+ * @returns Object indicating availability on each platform, or undefined if component not found
656
+ */
569
657
  function getComponentPlatformAvailability(componentName) {
570
- const metadata = COMPONENT_METADATA[componentName];
571
- if (!metadata) {
572
- return void 0;
573
- }
574
- return {
575
- angular: metadata.selectors.angular !== null,
576
- webcomponents: metadata.selectors.webcomponents !== null
577
- };
658
+ const metadata = COMPONENT_METADATA[componentName];
659
+ if (!metadata) return;
660
+ return {
661
+ angular: metadata.selectors.angular !== null,
662
+ webcomponents: metadata.selectors.webcomponents !== null
663
+ };
578
664
  }
665
+ /**
666
+ * Check if a component has variants.
667
+ * @param componentName - The component name (e.g., 'button')
668
+ * @returns True if the component has variant-specific themes
669
+ */
579
670
  function hasVariants(componentName) {
580
- return !!COMPONENT_METADATA[componentName]?.variants;
671
+ return !!COMPONENT_METADATA[componentName]?.variants;
581
672
  }
673
+ /**
674
+ * Get variants for a component.
675
+ * @param componentName - The component name (e.g., 'button')
676
+ * @returns Array of variant names or empty array
677
+ */
582
678
  function getVariants(componentName) {
583
- return COMPONENT_METADATA[componentName]?.variants ?? [];
679
+ return COMPONENT_METADATA[componentName]?.variants ?? [];
584
680
  }
681
+ /**
682
+ * Get compound component info if applicable.
683
+ * @param componentName - The component name
684
+ * @returns CompoundInfo or undefined
685
+ */
585
686
  function getCompoundComponentInfo(componentName) {
586
- return COMPONENT_METADATA[componentName]?.compound;
687
+ return COMPONENT_METADATA[componentName]?.compound;
587
688
  }
689
+ /**
690
+ * Check if a component is a compound component.
691
+ * @param componentName - The component name
692
+ * @returns True if this is a compound component
693
+ */
588
694
  function isCompoundComponent(componentName) {
589
- return !!COMPONENT_METADATA[componentName]?.compound;
695
+ return !!COMPONENT_METADATA[componentName]?.compound;
590
696
  }
697
+ /**
698
+ * Get token derivations for a specific child theme within a compound component.
699
+ * @param compoundName - The compound component name
700
+ * @param childThemeName - The child theme name (e.g., 'flat-button')
701
+ * @returns Record of 'childToken' -> TokenDerivation, or empty record if none exist
702
+ */
591
703
  function getTokenDerivationsForChild(compoundName, childThemeName) {
592
- const compound = COMPONENT_METADATA[compoundName]?.compound;
593
- if (!compound?.tokenDerivations) {
594
- return {};
595
- }
596
- const prefix = `${childThemeName}.`;
597
- const result = {};
598
- for (const [key, derivation] of Object.entries(compound.tokenDerivations)) {
599
- if (key.startsWith(prefix)) {
600
- const childToken = key.slice(prefix.length);
601
- result[childToken] = derivation;
602
- }
603
- }
604
- return result;
704
+ const compound = COMPONENT_METADATA[compoundName]?.compound;
705
+ if (!compound?.tokenDerivations) return {};
706
+ const prefix = `${childThemeName}.`;
707
+ const result = {};
708
+ for (const [key, derivation] of Object.entries(compound.tokenDerivations)) if (key.startsWith(prefix)) {
709
+ const childToken = key.slice(prefix.length);
710
+ result[childToken] = derivation;
711
+ }
712
+ return result;
605
713
  }
606
- export {
607
- COMPONENT_METADATA,
608
- getComponentPlatformAvailability,
609
- getComponentSelector,
610
- getCompoundComponentInfo,
611
- getTokenDerivationsForChild,
612
- getVariants,
613
- hasVariants,
614
- isComponentAvailable,
615
- isCompoundComponent
616
- };
714
+ //#endregion
715
+ export { COMPONENT_METADATA, getComponentPlatformAvailability, getComponentSelector, getCompoundComponentInfo, getTokenDerivationsForChild, getVariants, hasVariants, isComponentAvailable, isCompoundComponent };