igniteui-astro-components 1.5.0 → 1.6.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.
@@ -0,0 +1,247 @@
1
+ @use 'igniteui-theming/sass/typography' as *;
2
+
3
+ // Unlayered on purpose: the markdown layer styles every `img` and `figure`,
4
+ // and these rules must win over it (same as Anatomy.scss).
5
+
6
+ .igd-dodont {
7
+ // The public --igd-dodont-* tokens are only read, never set, so a value from
8
+ // an ancestor or a class on the block reaches every rule; --_* hold defaults.
9
+ --_gap: var(--igd-dodont-gap, #{rem(26px)});
10
+ --_radius: var(--igd-dodont-radius, #{rem(4px)});
11
+ --_padding-block: var(--igd-dodont-padding-block, #{rem(86px)});
12
+ --_padding-inline: var(--igd-dodont-padding-inline, #{rem(20px)});
13
+ --_image-width: var(--igd-dodont-image-width, #{rem(360px)});
14
+ // Not --_badge-size: igc-badge declares that name on its own host.
15
+ --_badge-diameter: var(--igd-dodont-badge-size, #{rem(26px)});
16
+ --_badge-inset: var(--igd-dodont-badge-inset, #{rem(20px)});
17
+ --_border-width: var(--igd-dodont-border-width, #{rem(1px)});
18
+ --_accent-width: var(--igd-dodont-accent-width, #{rem(2px)});
19
+ --_stack-extra: var(--igd-dodont-stack-extra, #{rem(20px)});
20
+ --_caption-gap: var(--igd-dodont-caption-gap, #{rem(16px)});
21
+ --_min-panel-width: var(
22
+ --igd-dodont-min-panel-width,
23
+ calc(var(--_image-width) + 2 * var(--_padding-inline))
24
+ );
25
+
26
+ display: grid;
27
+ grid-template-columns: repeat(auto-fit, minmax(min(var(--_min-panel-width), 100%), 1fr));
28
+ grid-template-rows: auto auto;
29
+ // Each panel's subgrid keeps its own gap between frame and caption, so the
30
+ // extra row gap only shows between panels once they stack.
31
+ row-gap: calc(var(--_gap) + var(--_stack-extra));
32
+ column-gap: var(--_gap);
33
+ align-items: stretch;
34
+ padding: 0;
35
+ margin: 0 0 var(--_gap);
36
+ inline-size: 100%;
37
+ isolation: isolate;
38
+ }
39
+
40
+ .igd-dodont__panel {
41
+ display: grid;
42
+ grid-row: span 2;
43
+ grid-template-rows: subgrid;
44
+ gap: var(--_gap);
45
+ margin: 0;
46
+ min-inline-size: 0;
47
+ }
48
+
49
+ .igd-dodont__frame {
50
+ position: relative;
51
+ isolation: isolate;
52
+ overflow: hidden;
53
+ border-radius: var(--_radius);
54
+ display: grid;
55
+ place-items: center;
56
+ // Borders are subtracted so the spec distances hold from the outer edge.
57
+ padding: calc(var(--_padding-block) - var(--_accent-width))
58
+ calc(var(--_padding-inline) - var(--_border-width))
59
+ calc(var(--_padding-block) - var(--_border-width));
60
+ min-block-size: 0;
61
+ }
62
+
63
+ .igd-dodont__image {
64
+ display: block;
65
+ inline-size: min(var(--_image-width), 100%);
66
+ block-size: auto;
67
+ max-block-size: 100%;
68
+ object-fit: contain;
69
+ object-position: center;
70
+ border-radius: 0;
71
+ margin: 0;
72
+ }
73
+
74
+ .igd-dodont__badge {
75
+ position: absolute;
76
+ inset-block-start: calc(var(--_badge-inset) - var(--_accent-width));
77
+ inset-inline-start: calc(var(--_badge-inset) - var(--_border-width));
78
+ z-index: 1;
79
+ }
80
+
81
+ .igd-dodont__caption {
82
+ display: flex;
83
+ flex-direction: column;
84
+ gap: var(--_caption-gap);
85
+ margin: 0;
86
+ padding: 0;
87
+ text-align: start;
88
+ }
89
+
90
+ // THEME
91
+ .igd-dodont__frame {
92
+ --_bg: var(--igd-dodont-bg, light-dark(var(--ig-gray-100), var(--ig-surface-500)));
93
+ --_border-color: var(
94
+ --igd-dodont-border-color,
95
+ light-dark(var(--ig-gray-300), var(--ig-surface-700))
96
+ );
97
+
98
+ border: var(--_border-width) solid var(--_border-color);
99
+ border-block-start: var(--_accent-width) solid var(--_frame-accent);
100
+
101
+ // Canvas at 0.7 opacity behind the content; the borders sit outside it.
102
+ &::after {
103
+ content: '';
104
+ position: absolute;
105
+ inset: 0;
106
+ z-index: -1;
107
+ background: var(--_bg);
108
+ opacity: 0.7;
109
+ pointer-events: none;
110
+ }
111
+ }
112
+
113
+ .igd-dodont__frame[data-loading] {
114
+ --_shimmer: light-dark(rgb(0 0 0 / 0.05), rgb(255 255 255 / 0.07));
115
+
116
+ &::before {
117
+ content: '';
118
+ position: absolute;
119
+ inset: 0;
120
+ pointer-events: none;
121
+ background: linear-gradient(90deg, transparent 20%, var(--_shimmer) 50%, transparent 80%);
122
+ background-size: 200% 100%;
123
+ animation: igd-dodont-shimmer 1.6s ease-in-out infinite;
124
+
125
+ @media (prefers-reduced-motion: reduce) {
126
+ animation: none;
127
+ }
128
+ }
129
+ }
130
+
131
+ @keyframes igd-dodont-shimmer {
132
+ from {
133
+ background-position: 200% 0;
134
+ }
135
+
136
+ to {
137
+ background-position: -200% 0;
138
+ }
139
+ }
140
+
141
+ .igd-dodont__frame[data-error] {
142
+ .igd-dodont__image,
143
+ .igd-dodont__fallback {
144
+ grid-area: 1 / 1;
145
+ min-block-size: #{rem(120px)};
146
+ }
147
+
148
+ .igd-dodont__image {
149
+ opacity: 0;
150
+ }
151
+
152
+ .igd-dodont__fallback {
153
+ inline-size: min(var(--_image-width), 100%);
154
+ display: grid;
155
+ place-content: center;
156
+ justify-items: center;
157
+ gap: #{rem(8px)};
158
+ box-sizing: border-box;
159
+ padding: #{rem(16px)};
160
+ text-align: center;
161
+ text-wrap: balance;
162
+ pointer-events: none;
163
+ }
164
+
165
+ .igd-dodont__fallback-icon {
166
+ display: block;
167
+ inline-size: #{rem(32px)};
168
+ block-size: #{rem(32px)};
169
+ color: var(--ig-gray-600);
170
+
171
+ svg {
172
+ display: block;
173
+ inline-size: 100%;
174
+ block-size: 100%;
175
+ }
176
+ }
177
+
178
+ .igd-dodont__fallback-text {
179
+ @include type-style('subtitle-2') {
180
+ margin: 0;
181
+ }
182
+
183
+ color: var(--ig-gray-700);
184
+ }
185
+ }
186
+
187
+ .igd-dodont__badge {
188
+ --ig-badge-size: var(--_badge-diameter);
189
+ --ig-badge-border-color: light-dark(var(--ig-gray-50), var(--ig-surface-600));
190
+
191
+ &::part(base) {
192
+ inline-size: var(--_badge-diameter);
193
+ block-size: var(--_badge-diameter);
194
+ padding-inline: 0;
195
+ border-radius: 50%;
196
+ }
197
+
198
+ igc-icon {
199
+ --size: #{rem(18px)};
200
+ }
201
+ }
202
+
203
+ .igd-dodont__panel--do {
204
+ --_accent: var(--igd-dodont-accent, light-dark(var(--ig-success-900), var(--ig-success-100)));
205
+ // Same token the success badge is filled with.
206
+ --_frame-accent: var(--igd-dodont-frame-accent, var(--ig-success-900));
207
+ }
208
+
209
+ .igd-dodont__panel--dont {
210
+ // error-800: error-700 is 4.1:1 on white and fails AA for 14px text.
211
+ --_accent: var(--igd-dodont-accent, light-dark(var(--ig-error-700), var(--ig-error-300)));
212
+ // Same token the danger badge is filled with.
213
+ --_frame-accent: var(--igd-dodont-frame-accent, var(--ig-error-700));
214
+ }
215
+
216
+ // TYPOGRAPHY
217
+
218
+ .igd-dodont__label {
219
+ @include type-style('subtitle-2') {
220
+ margin: 0;
221
+ }
222
+
223
+ color: var(--_accent);
224
+ }
225
+
226
+ // Visually hidden, still read by screen readers.
227
+ .igd-dodont__sr-only {
228
+ position: absolute;
229
+ inline-size: 1px;
230
+ block-size: 1px;
231
+ padding: 0;
232
+ margin: -1px;
233
+ overflow: hidden;
234
+ clip-path: inset(50%);
235
+ white-space: nowrap;
236
+ border: 0;
237
+ }
238
+
239
+ // MDX wraps slot content in <p>; style it directly to beat the markdown layer.
240
+ .igd-dodont__description,
241
+ .igd-dodont__description :is(p, ul, ol) {
242
+ @include type-style('body-2') {
243
+ margin: 0;
244
+ }
245
+
246
+ color: var(--ig-gray-700);
247
+ }
@@ -0,0 +1,134 @@
1
+ # DoDont
2
+
3
+ Renders a side-by-side "Do" / "Don't" pair of component screenshots. Each panel is a framed image with a status badge pinned to its top-inline corner — a green check for the recommended usage, a red clear for the one to avoid — and a required description below it that says why.
4
+
5
+ The frame supplies the padding around each screenshot, so the source images stay bare crops with no baked-in margin, and it centers anything smaller than its content box rather than blowing it up to fill. Panels share a subgrid, so every frame is as tall as the tallest screenshot in the row and the captions start on a common baseline.
6
+
7
+ The block is always 100% of its container and stacks into one column as soon as a panel would fall below `--igd-dodont-min-panel-width`, so it responds to the space it is given rather than to the viewport.
8
+
9
+ ## Import
10
+
11
+ ```astro
12
+ import DoDont from 'igniteui-astro-components/components/mdx/DoDont.astro';
13
+ ```
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Default | Description |
18
+ | ----------- | ------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
19
+ | `doSrc` | `ImageMetadata \| string` | _(required)_ | The recommended-usage image. An `astro:assets` import or a URL. |
20
+ | `doAlt` | `string` | _(required)_ | The recommended-usage image's accessible description. Becomes the inner `<img>` `alt`. |
21
+ | `dontSrc` | `ImageMetadata \| string` | _(required)_ | The usage-to-avoid image. An `astro:assets` import or a URL. |
22
+ | `dontAlt` | `string` | _(required)_ | The usage-to-avoid image's accessible description. Becomes the inner `<img>` `alt`. |
23
+ | `doLabel` | `string` | `'Do'` | Label for the recommended panel. Localized by default — see [Localization](#localization). |
24
+ | `dontLabel` | `string` | `"Don't"` | Label for the panel to avoid. Localized by default. |
25
+ | `loading` | `'lazy' \| 'eager'` | `'lazy'` | Image loading strategy. Use `'eager'` when the block is the first content on the page. |
26
+ | `errorText` | `string` | _(localized)_ | Notice shown with a broken-image icon inside a frame whose image failed to load. Hidden from assistive tech, which still gets the image's `alt`. |
27
+ | `class` | `string` | — | Extra CSS classes forwarded to the container. |
28
+
29
+ ### Imports vs. URLs
30
+
31
+ Pass an `astro:assets` import whenever you can. An import is rendered through Astro's `<Image>`, which converts the format (WebP by default), emits a `srcset` with 1x/2x/3x candidates clamped to the source size, and writes the intrinsic `width`/`height` so the frame holds its final size before the file arrives.
32
+
33
+ A plain URL string is rendered as a bare `<img>`. Astro cannot inspect a URL at build time, so it gets no `srcset` and **no dimensions**, and the frame grows when the image loads — a layout shift. Reserve URLs for assets that genuinely live outside the build.
34
+
35
+ ### Loading
36
+
37
+ The default `loading="lazy"` is right for a block somewhere down a topic. If the block is the first thing on the page, pass `loading="eager"`: a lazy image above the fold delays the largest contentful paint. Eager images are also fetched with `fetchpriority="high"`.
38
+
39
+ While an image is pending, a soft shimmer sweeps the frame's canvas. A small client script marks a frame whose image has not loaded and clears the mark on load or error; without JavaScript nothing is marked and the frame is simply static. The animation is disabled under `prefers-reduced-motion`.
40
+
41
+ If an image fails to load, the frame gets `data-error` and shows a broken-image icon with a short notice ("Sorry, this image could not be loaded.", localized like the labels, or your own `errorText`). The notice is `aria-hidden` — it only explains the empty box to a sighted reader, and the `<img>` keeps exposing its `alt` to assistive tech. The label and description are unaffected. A URL cannot be checked at build time, which is one more reason to prefer an `astro:assets` import: a missing imported file fails the build instead of the page.
42
+
43
+ The image props are `doSrc` / `dontSrc` rather than `do` / `dont` because Astro merges named slots into props ([`jsx-runtime`](https://github.com/withastro/astro) does `Object.assign(vnode.props, slots)`), so a prop sharing a slot's name is silently overwritten by that slot.
44
+
45
+ ## Slots
46
+
47
+ | Slot | Description |
48
+ | ------ | ------------------------------------------------------------- |
49
+ | `do` | **Required.** Why the recommended panel is the one to follow. |
50
+ | `dont` | **Required.** Why the other panel is the one to avoid. |
51
+
52
+ Both slots are validated at build time — a missing, empty or whitespace-only slot throws, exactly like a missing `alt`. A screenshot is never self-explanatory: the slot text is what search engines index, translators translate and screen readers read, and it is the only place the _reason_ for the guidance lives.
53
+
54
+ ## Examples
55
+
56
+ ```mdx
57
+ {/* Blank lines inside each Fragment so the content parses as markdown */}
58
+
59
+ <DoDont
60
+ doSrc={virtualScrollDo}
61
+ doAlt="Virtual Scroll showing a list of 100,000 employees"
62
+ dontSrc={virtualScrollDoNot}
63
+ dontAlt="Virtual Scroll used for a list of only five employees"
64
+ >
65
+ <Fragment slot="do">
66
+
67
+ Use the Virtual Scroll for a long list that is too large to render at once.
68
+
69
+ </Fragment>
70
+ <Fragment slot="dont">
71
+
72
+ Render a short list directly with the [List](../list.mdx).
73
+
74
+ </Fragment>
75
+ </DoDont>
76
+
77
+ {/* Custom labels */}
78
+
79
+ <DoDont doSrc={good} doAlt="…" dontSrc={bad} dontAlt="…" doLabel="Recommended" dontLabel="Avoid">
80
+ <Fragment slot="do">…</Fragment>
81
+ <Fragment slot="dont">…</Fragment>
82
+ </DoDont>
83
+ ```
84
+
85
+ ## Localization
86
+
87
+ The default labels follow the site language, so a Japanese topic does not ship with English "Do" / "Don't" baked in:
88
+
89
+ | Language | `doLabel` | `dontLabel` |
90
+ | -------------- | --------- | ----------- |
91
+ | `en` (default) | Do | Don't |
92
+ | `jp` / `ja` | 推奨 | 非推奨 |
93
+ | `kr` / `ko` | 권장 | 비권장 |
94
+
95
+ The broken-image notice (`errorText`) is localized the same way.
96
+
97
+ The language is the docs integration's `navLang`, read from `virtual:docs-template/site-meta` — the same value `DocsLayout` passes to the nav bar and footer — then `Astro.currentLocale`, then English. Pass `doLabel` / `dontLabel` to override on any page.
98
+
99
+ ## Accessibility
100
+
101
+ `doAlt` and `dontAlt` are required and are validated at build time — an absent, empty or whitespace-only value throws. Describe what each screenshot shows rather than merely naming the component. The `do` / `dont` slots are required for the same reason: the alt says what the picture shows, the slot says why it is right or wrong, and a reader who cannot see the image needs both.
102
+
103
+ Each panel is a `<figure>` whose `<figcaption>` holds the label and description, so assistive tech announces the panel as, e.g., "figure, Do: Use the Virtual Scroll for a long list…" and then the image's `alt`. The colon is a visually hidden separator; without it the label and description read as one run-on phrase.
104
+
105
+ The badges are decorative: the labels already name each panel, so the badges are `aria-hidden` and add no duplicate announcement. That also means the block does not rely on color alone.
106
+
107
+ The label colors meet WCAG AA for normal-size text in both themes. The "Don't" accent is `--ig-error-800` in the light theme rather than the design's `--ig-error-700`, which measures 4.1:1 on white and fails the 4.5:1 minimum. In forced-colors mode the frame keeps an outline, since box-shadow is dropped there.
108
+
109
+ ## Styling
110
+
111
+ The component reads these tokens but never sets them — its defaults are fallbacks — so a value set on any ancestor, or on the block itself through `class`, reaches every element that uses it. `--igd-dodont-accent` and `--igd-dodont-frame-accent` default per panel: set on the block they recolor both panels, set on `.igd-dodont__panel--do` or `.igd-dodont__panel--dont` just one.
112
+
113
+ | Property | Purpose |
114
+ | ------------------------------ | ------------------------------------------------------------------------ |
115
+ | `--igd-dodont-gap` | Gap between the panels and between a frame and its caption |
116
+ | `--igd-dodont-min-panel-width` | Width below which the panels stack into one column |
117
+ | `--igd-dodont-padding-block` | Space above and below a screenshot (the design leaves 86px) |
118
+ | `--igd-dodont-padding-inline` | Minimum space either side of a screenshot (20px) |
119
+ | `--igd-dodont-image-width` | Width the screenshots are laid out at (the design default is 360px) |
120
+ | `--igd-dodont-radius` | Corner radius of the image frame |
121
+ | `--igd-dodont-badge-size` | Size of the pinned badge |
122
+ | `--igd-dodont-badge-inset` | Distance of the badge from the frame's top and inline-start edges (30px) |
123
+ | `--igd-dodont-caption-gap` | Space between a label and its description (16px) |
124
+ | `--igd-dodont-stack-extra` | Added between panels when they stack, so the 26px gap becomes 46px |
125
+ | `--igd-dodont-bg` | Frame canvas, drawn by an `::after` at 0.7 opacity behind the content |
126
+ | `--igd-dodont-border-width` | Frame border (1px) |
127
+ | `--igd-dodont-accent-width` | Top accent border (2px), colored like the panel's badge |
128
+ | `--igd-dodont-frame-accent` | Top accent color — `success-500` on Do, `error-500` on Don't |
129
+ | `--igd-dodont-border-color` | Frame border color |
130
+ | `--igd-dodont-accent` | Label color — success tokens on the Do panel, error tokens on Don't |
131
+
132
+ The stylesheet is deliberately **unlayered**. `.igd-main-content__markdown img` and `figure` live in `@layer components` and set a block margin and a corner radius on every image; unlayered rules beat all layers, so the panel's own `margin: 0` and the frame-owned radius win.
133
+
134
+ Images are drawn at full opacity. The frame canvas is an `::after` pseudo-element (`gray-100` in the light theme, `surface-500` in the dark) at 0.7 opacity behind the content, inside a `gray-300` border whose top edge is a 2px accent in the panel's badge color. The borders are subtracted from the padding and badge inset, so the spec distances are measured from the frame's outer edge.
@@ -10,10 +10,13 @@ import LicenseIndicator from '../../components/LicenseIndicator/LicenseIndicator
10
10
  import igLogoRaw from '../../assets/ig-logo.svg?raw';
11
11
  import CopyCode from '../../components/CopyCode/CopyCode.astro';
12
12
  import { platform as virtualPlatform } from 'virtual:docs-template/nav-html';
13
+ import { ULTIMATE_UI_PLATFORMS } from '../../platform';
13
14
  import { title as siteTitle, headEntries, navLang } from 'virtual:docs-template/site-meta';
14
15
  import '../../styles/theme.scss';
15
16
  import './DocsLayout.scss';
16
17
 
18
+ const showIgniteUiPageLogo = !ULTIMATE_UI_PLATFORMS.has(virtualPlatform ?? '');
19
+
17
20
  export interface Props {
18
21
  title?: string;
19
22
  description?: string | null;
@@ -111,19 +114,12 @@ type HeadEntry = {
111
114
  {keywords && <meta name="keywords" content={keywords} />}
112
115
  <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
113
116
  <link rel="stylesheet" href="https://use.typekit.net/bng2zgw.css" />
114
- {
115
- (headEntries as HeadEntry[]).map(({ tag: Tag, attrs = {}, content }) =>
116
- content ? <Tag {...attrs} set:html={content} /> : <Tag {...attrs} />,
117
- )
118
- }
119
- {
120
- chromeSnapshot && (
121
- <meta
122
- name="ig-chrome"
123
- content={`${chromeSnapshot.contract} build=${chromeSnapshot.build}`}
124
- />
125
- )
126
- }
117
+ {(headEntries as HeadEntry[]).map(({ tag: Tag, attrs = {}, content }) =>
118
+ content ? <Tag {...attrs} set:html={content} /> : <Tag {...attrs} />,
119
+ )}
120
+ {chromeSnapshot && (
121
+ <meta name="ig-chrome" content={`${chromeSnapshot.contract} build=${chromeSnapshot.build}`} />
122
+ )}
127
123
  {chromeSnapshot && <Fragment set:html={chromeSnapshot.head} />}
128
124
  <slot name="head" />
129
125
  <ClientRouter />
@@ -289,18 +285,16 @@ type HeadEntry = {
289
285
  </head>
290
286
  <body>
291
287
  <!-- INFRAGISTICS HEADER/NAVIGATION -->
292
- {
293
- showGlobalNav &&
294
- (chromeSnapshot ? (
295
- /* `.nv` is `position: sticky`, so the wrapper has to be sticky too, or the
288
+ {showGlobalNav &&
289
+ (chromeSnapshot ? (
290
+ /* `.nv` is `position: sticky`, so the wrapper has to be sticky too, or the
296
291
  nav would stop at the bottom of a wrapper exactly its own height. */
297
- <div transition:persist="global-nav-bar" style="position: sticky; top: 0; z-index: 50">
298
- <Fragment set:html={chromeSnapshot.header} />
299
- </div>
300
- ) : (
301
- <GlobalNavBar lang={navLang} />
302
- ))
303
- }
292
+ <div transition:persist="global-nav-bar" style="position: sticky; top: 0; z-index: 50">
293
+ <Fragment set:html={chromeSnapshot.header} />
294
+ </div>
295
+ ) : (
296
+ <GlobalNavBar lang={navLang} />
297
+ ))}
304
298
 
305
299
  <!-- MAIN PAGE GRID LAYOUT -->
306
300
  <!-- We don't set the CSS grid directly to the body -->
@@ -339,7 +333,7 @@ type HeadEntry = {
339
333
  <div class="igd-main-content__inner">
340
334
  <div class="igd-main-content__page">
341
335
  <main class="igd-main-content__markdown" data-pagefind-body>
342
- <Fragment set:html={igLogoRaw} />
336
+ {showIgniteUiPageLogo && <Fragment set:html={igLogoRaw} />}
343
337
  <LicenseIndicator license={licenseType} />
344
338
  <DocsBreadcrumb
345
339
  pageTitle={title}
@@ -358,18 +352,16 @@ type HeadEntry = {
358
352
 
359
353
  <!-- Footer is inside the grid so the sidebar's sticky containing block extends through it.
360
354
  The JS initSidebarHeights() clamps sidebar max-height to prevent visual overlap. -->
361
- {
362
- chromeSnapshot ? (
363
- /* Full width of the grid, found by initSidebarHeights() through
355
+ {chromeSnapshot ? (
356
+ /* Full width of the grid, found by initSidebarHeights() through
364
357
  data-igd-footer, and persisted across navigations: the exported
365
358
  script wires the footer's accordion once, on first load. */
366
- <div style="grid-column: 1 / -1" data-igd-footer transition:persist="global-footer">
367
- <Fragment set:html={chromeSnapshot.footer} />
368
- </div>
369
- ) : (
370
- <GlobalFooter lang={navLang} />
371
- )
372
- }
359
+ <div style="grid-column: 1 / -1" data-igd-footer transition:persist="global-footer">
360
+ <Fragment set:html={chromeSnapshot.footer} />
361
+ </div>
362
+ ) : (
363
+ <GlobalFooter lang={navLang} />
364
+ )}
373
365
  </div>
374
366
  </body>
375
367
  </html>
package/src/lib/types.ts CHANGED
@@ -1,4 +1,11 @@
1
- export type PlatformName = 'Angular' | 'React' | 'WebComponents' | 'Blazor';
1
+ export type PlatformName =
2
+ | 'Angular'
3
+ | 'React'
4
+ | 'WebComponents'
5
+ | 'Blazor'
6
+ /** XAML platforms. Share the WinUI control surface; see the docs host's NonWeb platform group. */
7
+ | 'WinUI'
8
+ | 'Uno';
2
9
 
3
10
  export interface ApiPackageConfig {
4
11
  /** TypeDoc documentation root URL (no trailing slash). */
@@ -0,0 +1,10 @@
1
+ import type { PlatformKey } from '../platform';
2
+
3
+ /**
4
+ * The XAML platforms, which ship under the Ultimate UI brand rather than Ignite UI and show
5
+ * their named source files (Sample.xaml, Sample.xaml.cs, ...) as code tabs.
6
+ *
7
+ * Kept apart from platform.ts so the client sample widget can import it without bundling the
8
+ * platform registry's head entries.
9
+ */
10
+ export const ULTIMATE_UI_PLATFORMS: ReadonlySet<string> = new Set<PlatformKey>(['winui', 'uno']);
package/src/llms.ts CHANGED
@@ -12,6 +12,7 @@
12
12
  import fs from 'node:fs';
13
13
  import path from 'node:path';
14
14
  import matter from 'gray-matter';
15
+ import { IGDOCS_PLATFORMS } from './platform';
15
16
 
16
17
  // ---------------------------------------------------------------------------
17
18
  // Public types
@@ -155,15 +156,15 @@ export const IGDOCS_BROAD_SECTIONS = [
155
156
  'Deprecated Components',
156
157
  ] as const;
157
158
 
158
- /** Platforms that use the Ignite UI doc broad sections. */
159
- const IGDOCS_PLATFORMS = new Set<string>(['angular', 'react', 'blazor', 'web-components']);
159
+ /** Platforms that use the Ignite UI doc broad sections: every platform IGDOCS_PLATFORMS lists. */
160
+ const IGDOCS_PLATFORM_KEYS = new Set<string>(Object.values(IGDOCS_PLATFORMS).map((p) => p.key));
160
161
 
161
162
  /**
162
163
  * Returns the set of broad-section labels for the given platform.
163
164
  * Returns an empty set for platforms with no defined broad sections (appbuilder, slingshot).
164
165
  */
165
166
  export function getBroadSectionsForPlatform(platform: string | null): ReadonlySet<string> {
166
- if (platform !== null && IGDOCS_PLATFORMS.has(platform)) {
167
+ if (platform !== null && IGDOCS_PLATFORM_KEYS.has(platform)) {
167
168
  return new Set(IGDOCS_BROAD_SECTIONS);
168
169
  }
169
170
  return new Set();
package/src/platform.ts CHANGED
@@ -25,7 +25,9 @@ export type HeadEntry = {
25
25
  };
26
26
 
27
27
  export type PlatformKey =
28
- 'angular' | 'react' | 'blazor' | 'web-components' | 'slingshot' | 'appbuilder';
28
+ 'angular' | 'react' | 'blazor' | 'web-components' | 'winui' | 'uno' | 'slingshot' | 'appbuilder';
29
+
30
+ export { ULTIMATE_UI_PLATFORMS } from './lib/ultimate-ui-platforms';
29
31
 
30
32
  /** Locale code for nav/API requests and UI string lookups. */
31
33
  export type NavLang = 'en' | 'jp' | 'kr';
@@ -73,7 +75,7 @@ const IG_LEGACY_CHROME_STYLES: HeadEntry[] = [
73
75
  ];
74
76
 
75
77
  // ---------------------------------------------------------------------------
76
- // Shared IG styles — used by: angular, react, blazor, web-components, slingshot
78
+ // Shared IG styles — used by: angular, react, blazor, web-components, winui, uno, slingshot
77
79
  // ---------------------------------------------------------------------------
78
80
  const IG_STYLES: HeadEntry[] = [
79
81
  // Bootstrap is wrapped in a CSS cascade layer so its global resets do not
@@ -111,7 +113,7 @@ const IG_STYLES: HeadEntry[] = [
111
113
  ];
112
114
 
113
115
  // ---------------------------------------------------------------------------
114
- // Shared IG scripts — used by: angular, react, blazor, web-components, slingshot
116
+ // Shared IG scripts — used by: angular, react, blazor, web-components, winui, uno, slingshot
115
117
  // All three belong to the legacy fetched chrome.
116
118
  // ---------------------------------------------------------------------------
117
119
  const IG_SCRIPTS: HeadEntry[] = [
@@ -297,6 +299,8 @@ export const PLATFORM_DEFS: Record<PlatformKey, PlatformDef> = {
297
299
  react: { navType: 'infragistics', styles: IG_STYLES, scripts: IG_SCRIPTS },
298
300
  blazor: { navType: 'infragistics', styles: IG_STYLES, scripts: IG_SCRIPTS },
299
301
  'web-components': { navType: 'infragistics', styles: IG_STYLES, scripts: IG_SCRIPTS },
302
+ winui: { navType: 'infragistics', styles: IG_STYLES, scripts: IG_SCRIPTS },
303
+ uno: { navType: 'infragistics', styles: IG_STYLES, scripts: IG_SCRIPTS },
300
304
  slingshot: { navType: 'infragistics', styles: IG_STYLES, scripts: IG_SCRIPTS },
301
305
  appbuilder: { navType: 'appbuilder', styles: APPBUILDER_STYLES, scripts: APPBUILDER_SCRIPTS },
302
306
  };
@@ -347,6 +351,25 @@ export const IGDOCS_PLATFORMS: Record<string, PlatformMeta> = {
347
351
  title: 'Ignite UI for Blazor',
348
352
  description: 'Component documentation for Ignite UI for Blazor.',
349
353
  },
354
+ // XAML platforms ship under the Ultimate UI brand, hence `ultimate-ui-*` URL slugs.
355
+ WinUI: {
356
+ lang: 'en',
357
+ label: 'WinUI',
358
+ key: 'winui',
359
+ devPort: 4335,
360
+ base: '/products/ultimate-ui-winui/winui/components',
361
+ title: 'Infragistics Ultimate UI for WinUI',
362
+ description: 'Component documentation for Infragistics Ultimate UI for WinUI.',
363
+ },
364
+ Uno: {
365
+ lang: 'en',
366
+ label: 'Uno Platform',
367
+ key: 'uno',
368
+ devPort: 4336,
369
+ base: '/products/ultimate-ui-uno-platform/uno-platform/components',
370
+ title: 'Infragistics Ultimate UI for Uno Platform',
371
+ description: 'Component documentation for Infragistics Ultimate UI for Uno Platform.',
372
+ },
350
373
  // Japanese
351
374
  AngularJP: {
352
375
  lang: 'jp',
@@ -384,6 +407,25 @@ export const IGDOCS_PLATFORMS: Record<string, PlatformMeta> = {
384
407
  title: 'Ignite UI for Blazor',
385
408
  description: 'Component documentation for Ignite UI for Blazor.',
386
409
  },
410
+ // XAML platforms ship under the Ultimate UI brand, hence `ultimate-ui-*` URL slugs.
411
+ WinUIJP: {
412
+ lang: 'jp',
413
+ label: 'WinUI',
414
+ key: 'winui',
415
+ devPort: 4345,
416
+ base: '/products/ultimate-ui-winui/winui/components',
417
+ title: 'Infragistics Ultimate UI for WinUI',
418
+ description: 'Component documentation for Infragistics Ultimate UI for WinUI.',
419
+ },
420
+ UnoJP: {
421
+ lang: 'jp',
422
+ label: 'Uno Platform',
423
+ key: 'uno',
424
+ devPort: 4346,
425
+ base: '/products/ultimate-ui-uno-platform/uno-platform/components',
426
+ title: 'Infragistics Ultimate UI for Uno Platform',
427
+ description: 'Component documentation for Infragistics Ultimate UI for Uno Platform.',
428
+ },
387
429
  };
388
430
 
389
431
  /**
@@ -402,6 +444,14 @@ export interface PlatformHeadOptions {
402
444
  legacyChrome?: boolean;
403
445
  }
404
446
 
447
+ /**
448
+ * The display label for a platform key ('winui' → 'WinUI'), from IGDOCS_PLATFORMS, or `null` for
449
+ * a platform it does not list.
450
+ */
451
+ export function platformLabelFor(platform: string | null | undefined): string | null {
452
+ return Object.values(IGDOCS_PLATFORMS).find((p) => p.key === platform)?.label ?? null;
453
+ }
454
+
405
455
  /**
406
456
  * Returns an array of head entries for the given platform.
407
457
  * Pass the result to `createDocsSite({ head: getPlatformHead(...) })`.
@@ -444,6 +494,8 @@ export function getNavConfig(platform: string | null, lang = 'en'): NavConfig {
444
494
  case 'react':
445
495
  case 'blazor':
446
496
  case 'web-components':
497
+ case 'uno':
498
+ case 'winui':
447
499
  case 'slingshot':
448
500
  return { navType: 'infragistics', navUrl: `${igBase}/navigation` };
449
501
  default:
@@ -25,6 +25,8 @@ const DOCCONFIG_PLATFORM_MAP: Record<string, string> = {
25
25
  react: 'React',
26
26
  'web-components': 'WebComponents',
27
27
  blazor: 'Blazor',
28
+ winui: 'WinUI',
29
+ uno: 'Uno',
28
30
  };
29
31
 
30
32
  // Lazy-loaded, cached per DOCS_SOURCE_PATH value.