igniteui-astro-components 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,11 +82,15 @@
82
82
 
83
83
  .igd-main-content__page {
84
84
  display: grid;
85
- gap: var(--ig-padding);
86
85
  background-color: var(--igd-layout-sections-bg);
87
- border-inline: var(--igd-app-outline);
88
- width: clamp(rem(1000px), 100%, rem(1200px));
89
- margin-inline: auto;
86
+ border-inline-end: var(--igd-app-outline);
87
+ width: 100%;
88
+ }
89
+
90
+ .igd-main-content__inner:not(:has(aside)) {
91
+ .igd-main-content__page {
92
+ border-inline: var(--igd-app-outline);
93
+ }
90
94
  }
91
95
 
92
96
  .igd-main-content__page + aside {
@@ -95,8 +99,6 @@
95
99
 
96
100
  .igd-main-content__inner {
97
101
  display: flex;
98
- gap: rem(70px);
99
- padding-inline: rem(70px) rem(32px);
100
102
  position: relative;
101
103
 
102
104
  &:has(aside) {
@@ -117,21 +119,32 @@
117
119
  //
118
120
  // mobile: < 768px (max-width: $bp-mobile-max)
119
121
  // tablet: 768–1279px (max-width: $bp-tablet-max / min-width: $bp-tablet-min)
120
- // desktop: ≥ 1280px (default — no media query)
122
+ // desktop: ≥ 1700px (default — no media query)
121
123
  //
122
124
  // This is the single source of truth for every responsive rule that affects
123
125
  // the docs layout and the components rendered inside `.igd-page-layout`.
124
126
  // ════════════════════════════════════════════════════════════════════════════
125
127
 
126
128
 
127
- @media (max-width: #{$bp-reduce-sidebar}) {
129
+ @media (min-width: #{$bp-desktop-wide}) {
128
130
  .igd-page-layout {
129
- --igd-page-layout-grid: #{minmax(rem(200px), rem(290px)) 1fr};
131
+ --igd-page-layout-grid: #{rem(400px)} 1fr;
132
+ }
133
+
134
+ .igd-main-content__page {
135
+ gap: var(--ig-padding);
136
+ margin-inline: auto;
137
+ border-inline: var(--igd-app-outline);
138
+ width: clamp(rem(1200px), 100%, rem(1200px));
130
139
  }
131
140
 
132
141
  .igd-main-content__inner {
133
- padding-inline: rem(26px) 0;
134
- gap: rem(26px);
142
+ gap: rem(70px);
143
+ padding-inline: rem(70px) rem(32px);
144
+ }
145
+
146
+ .toc-sidebar {
147
+ border-inline: var(--igd-app-outline);
135
148
  }
136
149
  }
137
150
 
@@ -315,6 +328,12 @@
315
328
 
316
329
  // ── Tablet + Desktop (≥ 768px) ─────────────────────────────────────────────
317
330
  @media (min-width: #{$bp-tablet-min}) {
331
+ .sidebar-gutter {
332
+ &:has(.sidebar-logo:only-child) {
333
+ display: none;
334
+ }
335
+ }
336
+
318
337
  .igd-page-layout {
319
338
  justify-content: center;
320
339
  }
package/src/lib/types.ts CHANGED
@@ -63,4 +63,11 @@ export interface PlatformContext {
63
63
  forums: string;
64
64
  repoSamples: string;
65
65
  };
66
+ /**
67
+ * Sass API documentation base URL.
68
+ * Used as a base for link path concatenation - must have **no trailing slash**
69
+ * to avoid accidental `//` in generated URLs.
70
+ * @example `https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/sass`
71
+ */
72
+ sassApiUrl?: string;
66
73
  }
@@ -174,22 +174,6 @@ function addFooter(
174
174
  const footer = document.createElement('div');
175
175
  footer.className = 'igd-code-view__footer-actions';
176
176
 
177
- const label = document.createElement('span');
178
- label.className = 'editing-label';
179
- footer.appendChild(label);
180
-
181
- const fsBtn = document.createElement('igc-button') as HTMLElement;
182
- fsBtn.setAttribute('variant', 'outlined');
183
- fsBtn.setAttribute('aria-label', 'Open in full screen');
184
- fsBtn.className = 'igd-full-screen-btn igd-edit-in-btn';
185
- fsBtn.innerHTML = `<igc-icon name="open-link-blank" collection="docs" slot="prefix"></igc-icon>Full screen`;
186
- if (iframeSrc) {
187
- const fullscreenSrc = iframeSrc + (iframeSrc.includes('?') ? '&' : '?') + 'nav=0';
188
- fsBtn.setAttribute('href', fullscreenSrc);
189
- fsBtn.setAttribute('target', '_blank');
190
- }
191
- footer.appendChild(fsBtn);
192
-
193
177
  if ((!explicitEditor || explicitEditor === 'stackblitz') && onStackblitz) {
194
178
  const btn = document.createElement('igc-button') as HTMLElement;
195
179
  btn.setAttribute('variant', 'outlined');
@@ -210,6 +194,19 @@ function addFooter(
210
194
  footer.appendChild(btn);
211
195
  }
212
196
 
197
+ const fsBtn = document.createElement('igc-icon-button') as HTMLElement;
198
+ fsBtn.setAttribute('name', 'open-link-blank');
199
+ fsBtn.setAttribute('collection', 'docs');
200
+ fsBtn.setAttribute('variant', 'outlined');
201
+ fsBtn.setAttribute('aria-label', 'Open in full screen');
202
+ fsBtn.className = 'igd-full-screen-btn igd-edit-in-btn';
203
+ if (iframeSrc) {
204
+ const fullscreenSrc = iframeSrc + (iframeSrc.includes('?') ? '&' : '?') + 'nav=0';
205
+ fsBtn.setAttribute('href', fullscreenSrc);
206
+ fsBtn.setAttribute('target', '_blank');
207
+ }
208
+ footer.appendChild(fsBtn);
209
+
213
210
  widget.appendChild(footer);
214
211
  }
215
212
 
@@ -4,7 +4,7 @@
4
4
  //
5
5
  // mobile: < 768px (max-width: $bp-mobile-max)
6
6
  // tablet: 768px – 1279px (max-width: $bp-tablet-max / min-width: $bp-tablet-min)
7
- // desktop: ≥ 1280px (min-width: $bp-desktop-min)
7
+ // desktop: ≥ 1999px (min-width: $bp-desktop-wide)
8
8
  //
9
9
  // Usage: @media (max-width: #{$bp-mobile-max}) { … }
10
10
  // Never use var() inside @media — CSS custom properties don't work there.
@@ -18,9 +18,11 @@ $bp-tablet-min: #{rem(768px)};
18
18
  /// Top of tablet range (< 1280px)
19
19
  $bp-tablet-max: #{rem(1279px)};
20
20
 
21
- $bp-reduce-sidebar: #{rem(1500px)};
22
-
23
21
  $bp-hide-toc: #{rem(1100px)};
24
22
 
25
- /// Start of desktop range (≥ 1280px)
26
- $bp-desktop-min: #{rem(1280px)};
23
+ /// Start of desktop range (≥ 1900px)
24
+ $bp-desktop-wide: #{rem(1999px)};
25
+
26
+
27
+ /// $bp-desktop-wide
28
+ $bp-desktop-wide: #{rem(1999px)};
@@ -2,7 +2,6 @@
2
2
  @use 'palette';
3
3
  @use 'variables';
4
4
  @use 'code-blocks';
5
- @use 'members';
6
5
  @use 'markdown';
7
6
  @use 'component-themes';
8
7
  @forward 'type-scale' show $igd-type-scale;
@@ -5,6 +5,15 @@
5
5
  // generated by typography() but type-style() only accepts standard names.
6
6
  // Read the generated --ig-* vars directly to avoid the warning.
7
7
  .igd-main-content__markdown {
8
+ .sidebar-badge {
9
+ margin-block-end: rem(26px);
10
+
11
+ // TODO, This has to be fixed inside the component
12
+ span {
13
+ top:1px
14
+ }
15
+ }
16
+
8
17
  p {
9
18
  @include type-style('body-1');
10
19
  }
@@ -39,7 +48,7 @@
39
48
  }
40
49
  }
41
50
 
42
- color: light-dark(var(--ig-gray-700), var(--ig-gray-500));
51
+ color: light-dark(var(--ig-gray-800), var(--ig-gray-500));
43
52
 
44
53
  padding: var(--igd-page-padding);
45
54
  min-width: 0;
@@ -82,7 +91,7 @@
82
91
  };
83
92
 
84
93
  background: light-dark(var(--ig-primary-50), #112031);
85
- color: light-dark(var(--ig-primary-600), var(--ig-gray-400));
94
+ color: light-dark(var(--ig-gray-600), var(--ig-gray-400));
86
95
  border: rem(1px) solid light-dark(var(--ig-gray-300), #1A314A);
87
96
 
88
97
  padding: rem(4px) rem(8px);
@@ -174,13 +183,17 @@
174
183
  margin-block-end: rem(26px);
175
184
  }
176
185
 
177
- a {
186
+ > a {
187
+ font-size: inherit;
178
188
  color: inherit;
179
189
  text-decoration: underline;
180
190
 
181
191
  &:hover,
182
192
  &:focus {
183
193
  color: light-dark(var(--ig-primary-600), var(--ig-primary-100));
194
+ outline-offset: rem(2px);
195
+ outline: solid rem(1px);
196
+ outline-color: inherit;
184
197
  }
185
198
  }
186
199
 
@@ -1,10 +1,39 @@
1
1
  @use 'igniteui-theming/sass/typography' as *;
2
2
 
3
- @layer components {
4
3
 
4
+
5
+ // Centered-card sizing for both igc-dialog::part(base) and native <dialog>.
6
+ // DocsLayout.scss flips this to fullscreen on mobile.
7
+ @mixin search-dialog-base-styles {
8
+ margin: auto;
9
+ padding: 0;
10
+ width: 90%;
11
+ max-width: rem(672px);
12
+ height: calc(100vh - #{rem(128px)});
13
+ max-height: rem(768px);
14
+ box-shadow: none;
15
+ border: none;
16
+ border-radius: 0;
17
+ }
18
+
19
+ /// Backdrop base state (before open animation).
20
+ @mixin search-dialog-backdrop {
21
+ background-color: light-dark(var(--ig-gray-800), var(--ig-gray-50));
22
+ will-change: backdrop-filter, opacity;
23
+ }
24
+
25
+ // Backdrop visible/open state.
26
+ @mixin search-dialog-backdrop-open {
27
+ opacity: .6;
28
+ -webkit-backdrop-filter: blur(10px);
29
+ backdrop-filter: blur(10px);
30
+ }
31
+
32
+ // @layer components block (mixin definitions stay un-nested)
33
+ @layer components {
5
34
  .search-trigger {
6
35
  --ig-size: 1;
7
-
36
+
8
37
  width: 100%;
9
38
  max-width: rem(330px);
10
39
  display: flex;
@@ -15,11 +44,11 @@
15
44
  padding-inline: var(--igd-padding-sm);
16
45
  gap: rem(8px);
17
46
  white-space: nowrap;
18
-
47
+
19
48
  // Override native button styles
20
49
  background-color: transparent;
21
50
  box-shadow: none;
22
-
51
+
23
52
  &:focus-visible {
24
53
  outline: none;
25
54
  box-shadow: inset 0 0 0 1px var(--igd-accent);
@@ -38,12 +67,12 @@
38
67
  background: transparent;
39
68
  box-shadow: none;
40
69
  border: none;
41
-
70
+
42
71
  kbd {
43
72
  @include type-style('subtitle-1') {
44
73
  margin: 0;
45
74
  };
46
-
75
+
47
76
  background: transparent;
48
77
  box-shadow: none;
49
78
  border: none;
@@ -55,7 +84,7 @@
55
84
  @include type-style('body-2') {
56
85
  margin: 0;
57
86
  };
58
-
87
+
59
88
  color: var(--ig-gray-600);
60
89
  }
61
90
 
@@ -66,43 +95,12 @@
66
95
 
67
96
  border-inline-start: rem(1px) solid light-dark(var(--ig-gray-400), var(--ig-gray-300));
68
97
  border-inline-end: 0;
69
-
98
+
70
99
  igc-icon {
71
100
  --size: #{rem(32px)};
72
101
  }
73
102
  }
74
103
 
75
- } // close first @layer components block (mixin definitions stay un-nested below)
76
-
77
- // Centered-card sizing for both igc-dialog::part(base) and native <dialog>.
78
- // DocsLayout.scss flips this to fullscreen on mobile.
79
- @mixin search-dialog-base-styles {
80
- margin: auto;
81
- padding: 0;
82
- width: 90%;
83
- max-width: rem(672px);
84
- height: calc(100vh - #{rem(128px)});
85
- max-height: rem(768px);
86
- box-shadow: none;
87
- border: none;
88
- border-radius: 0;
89
- }
90
-
91
- /// Backdrop base state (before open animation).
92
- @mixin search-dialog-backdrop {
93
- background-color: light-dark(var(--ig-gray-800), var(--ig-gray-50));
94
- will-change: backdrop-filter, opacity;
95
- }
96
-
97
- // Backdrop visible/open state.
98
- @mixin search-dialog-backdrop-open {
99
- opacity: .6;
100
- -webkit-backdrop-filter: blur(10px);
101
- backdrop-filter: blur(10px);
102
- }
103
-
104
- @layer components {
105
-
106
104
  // Shared dialog chrome
107
105
  [data-search-modal-open] { overflow: hidden; }
108
106
 
@@ -268,5 +266,112 @@
268
266
  color: light-dark(var(--ig-gray-900), var(--ig-gray-300));
269
267
  }
270
268
 
271
- } // close second @layer components block
269
+ // Dialog chrome — shared by both Search and SearchAdvanced
270
+ .igd-search-dialog {
271
+ --border-radius: 0;
272
+ --background: var(--igd-layout-sections-bg);
273
+ --transition-duration: 150ms;
274
+ border: none;
275
+
276
+ &::part(base) {
277
+ @include search-dialog-base-styles;
278
+
279
+ &:focus-visible {
280
+ outline: none;
281
+ }
282
+ }
283
+
284
+ &::part(content) {
285
+ padding: 0;
286
+ display: flex;
287
+ flex-direction: column;
288
+ height: 100%;
289
+ }
290
+
291
+ &::part(backdrop) {
292
+ @include search-dialog-backdrop;
293
+ }
294
+
295
+ &[open]::part(backdrop) {
296
+ @include search-dialog-backdrop-open;
297
+ }
298
+
299
+ igc-input {
300
+ height: 100%;
301
+ }
302
+
303
+ igc-input::part(container) {
304
+ border: 0;
305
+ height: 100%;
306
+ padding: 0 rem(16px) !important;
307
+ border-block-end: none !important;
308
+
309
+ &:focus-within {
310
+ box-shadow:
311
+ 0 0 0 1px var(--igd-accent),
312
+ inset 0 1px 0 var(--igd-accent),
313
+ inset 0 -1px 0 var(--igd-accent),
314
+ inset -1px 0 0 var(--igd-accent);
315
+ }
316
+ }
317
+ }
318
+
319
+ // Search dialog header bar (input + optional scope + close)
320
+ .igd-search-header {
321
+ display: flex;
322
+ min-height: rem(75px);
323
+ }
324
+
325
+ .igd-search-scope {
326
+ flex-shrink: 0;
327
+ align-self: center;
328
+ }
329
+
330
+ .igd-search-input {
331
+ --input-prefix-background: transparent;
332
+ --input-prefix-background--focused: transparent;
333
+ --input-prefix-background--filled: transparent;
334
+
335
+ --input-suffix-background: transparent;
336
+ --input-suffix-background--focused: transparent;
337
+ --input-suffix-background--filled: transparent;
338
+
339
+ width: 100%;
340
+ min-width: 0;
341
+ flex: 1 1 auto;
342
+
343
+ &::part(input) {
344
+ @include type-style('body-2') {
345
+ margin: 0;
346
+ }
347
+ }
348
+ }
349
+
350
+ .igd-search-clear {
351
+ --foreground: light-dark(var(--ig-gray-900), var(--ig-gray-900));
352
+ --hover-foreground: var(--igd-accent);
353
+ --focus-hover-foreground: var(--igd-accent);
354
+ --focus-foreground: var(--igd-accent);
355
+ --active-foreground: var(--igd-accent);
356
+ --shadow-color: transparent;
357
+ --background: transparent;
358
+ --hover-background: transparent;
359
+ --focus-background: transparent;
360
+ --focus-hover-background: transparent;
361
+ --active-background: transparent;
362
+ --border-color: transparent;
363
+ --border-radius: 0;
364
+
365
+ &::part(base) {
366
+ &::after {
367
+ display: none;
368
+ }
369
+ }
370
+ }
371
+
372
+ .igd-search-icon {
373
+ color: light-dark(var(--ig-gray-900), var(--ig-gray-500));
374
+ }
375
+
376
+ }
272
377
 
@@ -34,7 +34,7 @@ $h3: type-style(
34
34
 
35
35
  $h4: type-style(
36
36
  $font-size: rem(20px),
37
- $font-weight: 500,
37
+ $font-weight: 400,
38
38
  $letter-spacing: normal,
39
39
  $line-height: rem(20px),
40
40
  $text-transform: none,
@@ -37,7 +37,7 @@
37
37
 
38
38
  --igd-members-spacing: var(--igd-border-radius) #{rem(16px)};
39
39
 
40
- --igd-page-layout-grid: #{minmax(rem(200px), rem(340px)) 1fr};
40
+ --igd-page-layout-grid: #{rem(300px)} 1fr;
41
41
 
42
42
  --igd-page-padding: #{rem(50px)};
43
43
 
@@ -1,85 +0,0 @@
1
- @use 'igniteui-theming' as *;
2
-
3
- /* ============================================================
4
- API Members
5
- Styles for member articles (properties, methods, accessors,
6
- events), headings, badges, inheritance tree, and metadata.
7
-
8
- WHY GLOBAL: These styles target `section > article`,
9
- `.member-badge`, `.inheritance-tree`, and `.inherited-from`
10
- which are rendered across all 5 detail page templates
11
- (classes, interfaces, functions, types, variables). While
12
- AnchoredName.astro renders `.member-badge`, the surrounding
13
- article/section structure lives directly in each page
14
- template, so no single component fully owns these styles.
15
- Once a shared detail page layout component exists, this file
16
- should be moved there.
17
- ============================================================ */
18
-
19
- /* Inheritance tree */
20
- .inheritance-tree {
21
- margin-top: 0.5em;
22
- }
23
-
24
- .inheritance-tree-item {
25
- display: flex;
26
- align-items: center;
27
- font-family: var(--sl-font-mono, monospace), sans-serif;
28
- font-size: 1em;
29
- line-height: 1.7;
30
- white-space: pre;
31
- margin-top: 0.1em;
32
- }
33
-
34
- .inheritance-tree-item .inheritance-arrow {
35
- margin-right: 0.5em;
36
- margin-top: 0.1em;
37
- color: #888;
38
- font-size: 1.1em;
39
- }
40
-
41
- .inheritance-tree-item.last strong {
42
- font-weight: bold;
43
- }
44
-
45
- /* "Inherited from" metadata line shown under member headings */
46
- .inherited-from {
47
- display: flex;
48
- align-items: center;
49
- gap: rem(8px);
50
- padding: rem(8px) rem(16px);
51
- color: var(--igd-accent);
52
- border: rem(1px) solid light-dark(var(--ig-primary-500), var(--ig-primary-800));
53
- border-radius: rem(4px);
54
-
55
- strong {
56
- font-weight: 400;
57
- }
58
-
59
- a {
60
-
61
- text-decoration: underline;
62
- }
63
- }
64
-
65
- /* Visual separation between member articles */
66
- section > article {
67
- margin-block: var(--igd-page-padding);
68
-
69
- > * {
70
- margin-block-end: rem(26px);
71
- }
72
- }
73
-
74
- .member-badge {
75
- @include type-style('body-1') {
76
- margin: 0;
77
- };
78
-
79
- display: inline-block;
80
- color: light-dark(var(--ig-secondary-800), var(--ig-secondary-200));
81
- background: light-dark(var(--ig-secondary-100), var(--ig-secondary-900));
82
- border: rem(1px) solid light-dark(var(--ig-secondary-300),var(--ig-secondary-700));
83
- padding: var(--igd-members-spacing);
84
- border-radius: rem(4px);
85
- }