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.
- package/README.md +322 -158
- package/llms-full.txt +3207 -0
- package/llms.txt +103 -0
- package/package.json +17 -5
- package/src/assets/icons/figma-logo.svg +10 -0
- package/src/code-theme/README.md +72 -0
- package/src/code-theme/index.ts +57 -0
- package/src/components/CopyCode/CopyCode.astro +6 -1
- package/src/components/CopyCode/README.md +38 -0
- package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +28 -30
- package/src/components/DocsSidebar/README.md +58 -30
- package/src/components/DocsSidebar/SidebarLabel.astro +34 -36
- package/src/components/DocsSubHeader/README.md +24 -31
- package/src/components/DocsToc/DocsToc.astro +12 -14
- package/src/components/DocsToc/README.md +7 -7
- package/src/components/DocsTree/DocsTree.astro +9 -11
- package/src/components/DocsTree/DocsTreeItem.astro +36 -40
- package/src/components/DocsTree/README.md +12 -9
- package/src/components/GlobalFooter/GlobalFooter.astro +6 -8
- package/src/components/GlobalNavBar/GlobalNavBar.astro +2 -4
- package/src/components/LicenseIndicator/LicenseIndicator.astro +6 -8
- package/src/components/MobileTocToggle/MobileTocToggle.astro +31 -33
- package/src/components/MobileTocToggle/README.md +45 -0
- package/src/components/Search/README.md +10 -10
- package/src/components/Search/Search.astro +12 -6
- package/src/components/SearchAdvanced/README.md +15 -8
- package/src/components/SearchAdvanced/SearchAdvanced.astro +17 -15
- package/src/components/ThemingWidget/ThemingWidget.astro +62 -60
- package/src/components/mdx/Anatomy/Anatomy.scss +1 -1
- package/src/components/mdx/Anatomy/README.md +40 -0
- package/src/components/mdx/ApiLink/ApiLink.astro +7 -9
- package/src/components/mdx/ApiLink/README.md +1 -0
- package/src/components/mdx/ApiRef/ApiRef.astro +7 -9
- package/src/components/mdx/ApiRef/README.md +1 -1
- package/src/components/mdx/Badge/Badge.astro +3 -1
- package/src/components/mdx/Badge/README.md +1 -3
- package/src/components/mdx/DocsAside/DocsAside.astro +3 -5
- package/src/components/mdx/DocsAside/README.md +47 -29
- package/src/components/mdx/Faq/Faq.astro +11 -13
- package/src/components/mdx/Faq/FaqItem.astro +20 -26
- package/src/components/mdx/FigmaUiKits/FigmaUiKits.astro +126 -0
- package/src/components/mdx/FigmaUiKits/FigmaUiKits.scss +165 -0
- package/src/components/mdx/FigmaUiKits/README.md +115 -0
- package/src/components/mdx/FigmaUiKits/kits.ts +26 -0
- package/src/components/mdx/PlatformBlock/README.md +5 -18
- package/src/components/mdx/Sample/README.md +67 -50
- package/src/components/mdx/Sample/Sample.astro +108 -33
- package/src/components/mdx/Sample/Sample.scss +38 -17
- package/src/integration.ts +6 -21
- package/src/layouts/DocsLayout/README.md +63 -28
- package/src/lib/warn-once.ts +8 -0
- package/src/scripts/copy-status.ts +35 -0
- package/src/scripts/icon-manifest.ts +1 -0
- package/src/scripts/sample-widget.ts +109 -42
- package/src/styles/global/_code-blocks.scss +58 -36
- package/src/styles/global/_copy-button.scss +18 -25
- package/src/styles/global/_markdown.scss +15 -8
- package/src/styles/global/_variables.scss +57 -0
- package/src/styles/theme.scss +4 -1
- package/src/virtual-modules.d.ts +1 -1
|
@@ -1,32 +1,25 @@
|
|
|
1
|
-
///
|
|
2
|
-
///
|
|
3
|
-
///
|
|
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(--
|
|
10
|
-
--hover-foreground: var(--
|
|
11
|
-
--focus-foreground: var(--
|
|
12
|
-
--active-foreground: var(--
|
|
13
|
-
--background:
|
|
14
|
-
--hover-background: var(--
|
|
15
|
-
--focus-background: var(--
|
|
16
|
-
--active-background: var(--
|
|
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
|
-
|
|
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(--
|
|
23
|
-
--hover-foreground: var(--
|
|
24
|
-
--focus-foreground: var(--
|
|
25
|
-
--active-foreground: var(--
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
> .
|
|
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:
|
|
246
|
+
color: var(--igd-link-color);
|
|
240
247
|
text-decoration: underline;
|
|
241
248
|
|
|
242
249
|
&:hover,
|
|
243
250
|
&:focus {
|
|
244
|
-
color:
|
|
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
|
}
|
package/src/styles/theme.scss
CHANGED
|
@@ -84,7 +84,10 @@ body {
|
|
|
84
84
|
):not(:defined) {
|
|
85
85
|
opacity: 0;
|
|
86
86
|
}
|
|
87
|
-
|
|
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
|
|
package/src/virtual-modules.d.ts
CHANGED
|
@@ -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,
|
|
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>;
|