igniteui-astro-components 1.7.0 → 1.8.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 (60) hide show
  1. package/README.md +322 -158
  2. package/llms-full.txt +3207 -0
  3. package/llms.txt +103 -0
  4. package/package.json +17 -5
  5. package/src/assets/icons/figma-logo.svg +10 -0
  6. package/src/code-theme/README.md +72 -0
  7. package/src/code-theme/index.ts +57 -0
  8. package/src/components/CopyCode/CopyCode.astro +6 -1
  9. package/src/components/CopyCode/README.md +38 -0
  10. package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +28 -30
  11. package/src/components/DocsSidebar/README.md +58 -30
  12. package/src/components/DocsSidebar/SidebarLabel.astro +34 -36
  13. package/src/components/DocsSubHeader/README.md +24 -31
  14. package/src/components/DocsToc/DocsToc.astro +12 -14
  15. package/src/components/DocsToc/README.md +7 -7
  16. package/src/components/DocsTree/DocsTree.astro +9 -11
  17. package/src/components/DocsTree/DocsTreeItem.astro +36 -40
  18. package/src/components/DocsTree/README.md +12 -9
  19. package/src/components/GlobalFooter/GlobalFooter.astro +6 -8
  20. package/src/components/GlobalNavBar/GlobalNavBar.astro +2 -4
  21. package/src/components/LicenseIndicator/LicenseIndicator.astro +6 -8
  22. package/src/components/MobileTocToggle/MobileTocToggle.astro +31 -33
  23. package/src/components/MobileTocToggle/README.md +45 -0
  24. package/src/components/Search/README.md +10 -10
  25. package/src/components/Search/Search.astro +12 -6
  26. package/src/components/SearchAdvanced/README.md +15 -8
  27. package/src/components/SearchAdvanced/SearchAdvanced.astro +17 -15
  28. package/src/components/ThemingWidget/ThemingWidget.astro +62 -60
  29. package/src/components/mdx/Anatomy/Anatomy.scss +1 -1
  30. package/src/components/mdx/Anatomy/README.md +40 -0
  31. package/src/components/mdx/ApiLink/ApiLink.astro +7 -9
  32. package/src/components/mdx/ApiLink/README.md +1 -0
  33. package/src/components/mdx/ApiRef/ApiRef.astro +7 -9
  34. package/src/components/mdx/ApiRef/README.md +1 -1
  35. package/src/components/mdx/Badge/Badge.astro +3 -1
  36. package/src/components/mdx/Badge/README.md +1 -3
  37. package/src/components/mdx/DocsAside/DocsAside.astro +3 -5
  38. package/src/components/mdx/DocsAside/README.md +47 -29
  39. package/src/components/mdx/Faq/Faq.astro +11 -13
  40. package/src/components/mdx/Faq/FaqItem.astro +20 -26
  41. package/src/components/mdx/FigmaUiKits/FigmaUiKits.astro +126 -0
  42. package/src/components/mdx/FigmaUiKits/FigmaUiKits.scss +165 -0
  43. package/src/components/mdx/FigmaUiKits/README.md +115 -0
  44. package/src/components/mdx/FigmaUiKits/kits.ts +26 -0
  45. package/src/components/mdx/PlatformBlock/README.md +5 -18
  46. package/src/components/mdx/Sample/README.md +67 -50
  47. package/src/components/mdx/Sample/Sample.astro +108 -33
  48. package/src/components/mdx/Sample/Sample.scss +38 -17
  49. package/src/integration.ts +6 -21
  50. package/src/layouts/DocsLayout/README.md +63 -28
  51. package/src/lib/warn-once.ts +8 -0
  52. package/src/scripts/copy-status.ts +35 -0
  53. package/src/scripts/icon-manifest.ts +1 -0
  54. package/src/scripts/sample-widget.ts +109 -42
  55. package/src/styles/global/_code-blocks.scss +58 -36
  56. package/src/styles/global/_copy-button.scss +18 -25
  57. package/src/styles/global/_markdown.scss +15 -8
  58. package/src/styles/global/_variables.scss +57 -0
  59. package/src/styles/theme.scss +4 -1
  60. package/src/virtual-modules.d.ts +1 -1
@@ -1,32 +1,25 @@
1
- /// Explicit palette for copy-code icon buttons (igc-icon-button).
2
- ///
3
- /// Code panes always render the dark Shiki theme, while the icon-button's
4
- /// default colors follow the site theme — in light mode that leaves the icon
5
- /// near-invisible on the dark background until a hover state recolors it.
6
- /// Pinning the full state palette keeps the button legible in both themes.
7
- /// The success palette kicks in while the icon shows the post-copy check.
1
+ /// Palette for the copy-code icon buttons (igc-icon-button) on top of a code
2
+ /// snippet; the page-level CopyCode button and the Sample code-tab button share it.
3
+ /// The success palette applies while the icon shows the post-copy check.
8
4
  @mixin copy-button-colors {
9
- --foreground: var(--ig-primary-600-contrast);
10
- --hover-foreground: var(--ig-primary-600-contrast);
11
- --focus-foreground: var(--ig-primary-600-contrast);
12
- --active-foreground: var(--ig-primary-600-contrast);
13
- --background: var(--ig-primary-500);
14
- --hover-background: var(--ig-primary-500);
15
- --focus-background: var(--ig-primary-500);
16
- --active-background: var(--ig-primary-500);
5
+ --foreground: var(--igd-code-copy-color);
6
+ --hover-foreground: var(--igd-code-copy-hover-color);
7
+ --focus-foreground: var(--igd-code-copy-hover-color);
8
+ --active-foreground: var(--igd-code-copy-hover-color);
9
+ --background: transparent;
10
+ --hover-background: var(--igd-code-copy-hover-bg);
11
+ --focus-background: var(--igd-code-copy-hover-bg);
12
+ --active-background: var(--igd-code-copy-hover-bg);
17
13
  --border-color: transparent;
18
14
  --border-color-hover: transparent;
19
- --border-color-focus: transparent;
15
+ // Keyboard focus ring.
16
+ --focus-border-color: var(--igd-code-copy-hover-color);
17
+ --focus-visible-border-color: var(--igd-code-copy-hover-color);
20
18
 
21
19
  &:has([name='check']) {
22
- --foreground: var(--ig-success-300-contrast);
23
- --hover-foreground: var(--ig-success-300-contrast);
24
- --focus-foreground: var(--ig-success-300-contrast);
25
- --active-foreground: var(--ig-success-300-contrast);
26
-
27
- --background: var(--ig-success-300);
28
- --hover-background: var(--ig-success-300);
29
- --focus-background: var(--ig-success-300);
30
- --active-background: var(--ig-success-300);
20
+ --foreground: var(--igd-code-copy-success-color);
21
+ --hover-foreground: var(--igd-code-copy-success-color);
22
+ --focus-foreground: var(--igd-code-copy-success-color);
23
+ --active-foreground: var(--igd-code-copy-success-color);
31
24
  }
32
25
  }
@@ -89,7 +89,7 @@
89
89
  padding: var(--igd-page-padding);
90
90
  min-width: 0;
91
91
 
92
- pre:not(.astro-code) {
92
+ pre:not(.astro-code, .shiki) {
93
93
  @include type-style('code', false) {
94
94
  margin-block: 0;
95
95
  }
@@ -97,15 +97,20 @@
97
97
  margin-block-end: rem(26px);
98
98
  }
99
99
 
100
- pre,
101
100
  code {
102
101
  font-family: var(--font-mono) !important;
103
102
  margin-block-end: rem(26px);
104
103
  }
105
104
 
106
- pre.astro-code {
107
- padding: rem(24px);
108
- border-radius: rem(8px);
105
+ // Snippets read the `--igd-code-font-family` token so a consumer can retune
106
+ // them; `!important` is still needed to beat the theming typography.
107
+ pre {
108
+ font-family: var(--igd-code-font-family, var(--font-mono)) !important;
109
+ margin-block-end: rem(26px);
110
+ }
111
+
112
+ pre code {
113
+ font-family: inherit !important;
109
114
  }
110
115
 
111
116
  kbd {
@@ -163,7 +168,9 @@
163
168
  color: var(--ig-primary-500);
164
169
  }
165
170
 
166
- > .shiki {
171
+ > .astro-code,
172
+ > .shiki,
173
+ > .copy-code-wrapper {
167
174
  margin-top: rem(8px);
168
175
  }
169
176
 
@@ -236,12 +243,12 @@
236
243
 
237
244
  a {
238
245
  font-size: inherit;
239
- color: light-dark(var(--ig-primary-500), var(--ig-primary-200));
246
+ color: var(--igd-link-color);
240
247
  text-decoration: underline;
241
248
 
242
249
  &:hover,
243
250
  &:focus {
244
- color: light-dark(var(--ig-primary-600), var(--ig-primary-100));
251
+ color: var(--igd-link-hover-color);
245
252
  }
246
253
 
247
254
  &:focus,
@@ -1,5 +1,6 @@
1
1
  @use 'igniteui-theming/sass/typography' as *;
2
2
  @use 'palette' as *;
3
+ @use 'breakpoints' as *;
3
4
 
4
5
  /* ============================================================
5
6
  CSS Custom Properties
@@ -56,6 +57,10 @@
56
57
  --igd-padding-md: #{rem(24px)};
57
58
  --igd-padding-lg: #{rem(32px)};
58
59
 
60
+ // Links
61
+ --igd-link-color: light-dark(var(--ig-primary-600), var(--ig-primary-200));
62
+ --igd-link-hover-color: light-dark(var(--ig-primary-700), var(--ig-primary-100));
63
+
59
64
  --igd-updated-bg: light-dark(#eaf6fe, #0d1e38);
60
65
  --igd-updated-color: light-dark(#1151c1, #6b9fe8);
61
66
  --igd-updated-border: light-dark(#bae2f5, #1e3d6a);
@@ -146,4 +151,56 @@
146
151
 
147
152
  --igd-table-header-bg: var(--igd-layout-sections-bg);
148
153
  --igd-table-header-fg: light-dark(var(--ig-gray-900), var(--ig-gray-700));
154
+
155
+ // FIGMA UI KITS MDX
156
+ --igd-figma-kits-padding-block: #{rem(8px)};
157
+ --igd-figma-kits-padding-inline: var(--igd-padding-sm);
158
+ --igd-figma-kits-compact-padding-block: #{rem(12px)};
159
+ --igd-figma-kits-compact-padding-inline: #{rem(12px)};
160
+ --igd-figma-kits-gap: var(--igd-padding-md);
161
+ --igd-figma-kits-row-gap: #{rem(12px)};
162
+ --igd-figma-kits-item-gap: #{rem(8px)};
163
+ --igd-figma-kits-margin-bottom: #{rem(26px)};
164
+ --igd-figma-kits-radius: var(--igd-border-radius);
165
+ --igd-figma-kits-border-width: var(--igd-app-outline-size);
166
+ --igd-figma-kits-border-style: var(--igd-app-outline-style);
167
+ --igd-figma-kits-logo-size: #{rem(31px)};
168
+ --igd-figma-kits-target-size: #{rem(24px)};
169
+ --igd-figma-kits-underline-offset: #{rem(3px)};
170
+ --igd-figma-kits-focus-width: #{rem(2px)};
171
+ --igd-figma-kits-focus-offset: #{rem(2px)};
172
+ --igd-figma-kits-link-weight: 700;
173
+
174
+ --igd-figma-kits-bg: light-dark(var(--ig-gray-100), var(--ig-gray-50));
175
+ --igd-figma-kits-border-color: light-dark(var(--ig-gray-300), var(--ig-gray-200));
176
+ --igd-figma-kits-title-color: var(--ig-gray-600);
177
+ --igd-figma-kits-link-color: var(--igd-link-color);
178
+ --igd-figma-kits-link-hover-color: var(--igd-link-hover-color);
179
+ }
180
+
181
+ /* ============================================================
182
+ CODE SNIPPETS (fenced blocks, <Code>, Sample code tabs)
183
+ Background and text colours come from the Shiki theme (src/code-theme).
184
+ ============================================================ */
185
+ :root {
186
+ --igd-code-border: #{rem(1px)} solid #002b5c;
187
+ --igd-code-radius: var(--igd-border-radius);
188
+ --igd-code-padding: #{rem(36px)};
189
+ --igd-code-font-family: var(--font-mono, var(--igd-font-mono));
190
+ --igd-code-font-size: #{rem(14px)};
191
+ --igd-code-line-height: #{rem(24px)};
192
+ --igd-code-margin-bottom: #{rem(26px)};
193
+
194
+ // Copy button (igc-icon-button), revealed on hover / focus-within.
195
+ --igd-code-copy-color: #d2dbe8;
196
+ --igd-code-copy-hover-color: #0176ff;
197
+ --igd-code-copy-hover-bg: #002b5c;
198
+ --igd-code-copy-success-color: var(--ig-success-500);
199
+ --igd-code-copy-inset: #{rem(12px)};
200
+ }
201
+
202
+ @media (max-width: #{$bp-mobile-max}) {
203
+ :root {
204
+ --igd-code-padding: #{rem(20px)};
205
+ }
149
206
  }
@@ -84,7 +84,10 @@ body {
84
84
  ):not(:defined) {
85
85
  opacity: 0;
86
86
  }
87
- igc-dialog:not(:defined) {
87
+ // Dialogs and tooltips sit outside the layout flow once defined, so hide them
88
+ // entirely; otherwise a tooltip's text shows inline until it upgrades.
89
+ igc-dialog:not(:defined),
90
+ igc-tooltip:not(:defined) {
88
91
  display: none;
89
92
  }
90
93
 
@@ -26,7 +26,7 @@ declare module 'virtual:docs-template/site-meta' {
26
26
  href: string;
27
27
  platform?: string;
28
28
  }>;
29
- /** Extra <head> entries injected by siteMetaIntegration (platform CDN, highlight.js, etc.). */
29
+ /** Extra <head> entries injected by siteMetaIntegration (platform CDN, site-specific entries, etc.). */
30
30
  export const headEntries: Array<{
31
31
  tag: string;
32
32
  attrs?: Record<string, string | boolean | undefined>;