igniteui-astro-components 0.0.27 → 0.0.28

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 (93) hide show
  1. package/README.md +82 -74
  2. package/package.json +15 -2
  3. package/src/components/CopyCode/CopyCode.astro +21 -7
  4. package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +33 -21
  5. package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +44 -43
  6. package/src/components/DocsBreadcrumb/README.md +10 -14
  7. package/src/components/DocsSidebar/DocsSidebar.astro +47 -45
  8. package/src/components/DocsSidebar/DocsSidebar.scss +120 -122
  9. package/src/components/DocsSidebar/README.md +25 -21
  10. package/src/components/DocsSidebar/SidebarFilterInput.astro +24 -29
  11. package/src/components/DocsSidebar/SidebarFilterInput.scss +90 -89
  12. package/src/components/DocsSidebar/SidebarLabel.astro +35 -26
  13. package/src/components/DocsSidebar/sidebar-filter.ts +93 -56
  14. package/src/components/DocsSubHeader/DocsSubHeader.astro +256 -195
  15. package/src/components/DocsSubHeader/DocsSubHeader.scss +181 -178
  16. package/src/components/DocsSubHeader/README.md +18 -16
  17. package/src/components/DocsToc/DocsToc.astro +301 -280
  18. package/src/components/DocsToc/DocsToc.scss +20 -21
  19. package/src/components/DocsToc/README.md +11 -9
  20. package/src/components/DocsToc/toTreeNodes.ts +3 -8
  21. package/src/components/DocsTree/DocsTree.astro +32 -20
  22. package/src/components/DocsTree/DocsTreeItem.astro +35 -30
  23. package/src/components/DocsTree/README.md +16 -15
  24. package/src/components/DocsTree/docs-tree.scss +267 -268
  25. package/src/components/GlobalFooter/GlobalFooter.astro +10 -10
  26. package/src/components/GlobalFooter/README.md +3 -2
  27. package/src/components/GlobalNavBar/GlobalNavBar.astro +4 -2
  28. package/src/components/GlobalNavBar/GlobalNavBar.module.scss +222 -222
  29. package/src/components/GlobalNavBar/README.md +3 -2
  30. package/src/components/LicenseIndicator/LicenseIndicator.astro +7 -5
  31. package/src/components/LicenseIndicator/LicenseIndicator.scss +3 -3
  32. package/src/components/MobileSidebarToggle/MobileSidebarToggle.astro +16 -17
  33. package/src/components/MobileSidebarToggle/README.md +3 -2
  34. package/src/components/MobileTocToggle/MobileTocToggle.astro +75 -61
  35. package/src/components/MobileTocToggle/MobileTocToggle.scss +65 -59
  36. package/src/components/Search/README.md +1 -0
  37. package/src/components/Search/Search.astro +137 -109
  38. package/src/components/Search/Search.scss +20 -20
  39. package/src/components/SearchAdvanced/README.md +21 -15
  40. package/src/components/SearchAdvanced/SearchAdvanced.astro +205 -133
  41. package/src/components/SearchAdvanced/SearchAdvanced.scss +152 -153
  42. package/src/components/mdx/ApiLink/ApiLink.astro +133 -113
  43. package/src/components/mdx/ApiLink/ApiLink.scss +9 -9
  44. package/src/components/mdx/ApiLink/README.md +26 -22
  45. package/src/components/mdx/ApiLink/api-link-index.ts +196 -173
  46. package/src/components/mdx/ApiRef/ApiRef.astro +54 -51
  47. package/src/components/mdx/ApiRef/README.md +20 -15
  48. package/src/components/mdx/Badge/Badge.astro +14 -14
  49. package/src/components/mdx/Badge/Badge.scss +61 -56
  50. package/src/components/mdx/Badge/README.md +24 -19
  51. package/src/components/mdx/DocsAside/DocsAside.astro +30 -37
  52. package/src/components/mdx/DocsAside/DocsAside.scss +82 -82
  53. package/src/components/mdx/DocsAside/README.md +22 -22
  54. package/src/components/mdx/Faq/Faq.astro +86 -0
  55. package/src/components/mdx/Faq/Faq.scss +105 -0
  56. package/src/components/mdx/Faq/FaqItem.astro +117 -0
  57. package/src/components/mdx/Faq/README.md +223 -0
  58. package/src/components/mdx/Faq/types.ts +34 -0
  59. package/src/components/mdx/PlatformBlock/PlatformBlock.astro +3 -2
  60. package/src/components/mdx/PlatformBlock/README.md +6 -8
  61. package/src/components/mdx/Sample/README.md +21 -16
  62. package/src/components/mdx/Sample/Sample.astro +97 -74
  63. package/src/components/mdx/Sample/Sample.scss +132 -132
  64. package/src/content-helper.ts +71 -72
  65. package/src/content.config.ts +1 -6
  66. package/src/integration.ts +566 -512
  67. package/src/layouts/DocsLayout/DocsLayout.astro +228 -182
  68. package/src/layouts/DocsLayout/DocsLayout.scss +261 -261
  69. package/src/layouts/DocsLayout/README.md +24 -35
  70. package/src/lib/nav-helpers.ts +88 -82
  71. package/src/lib/types.ts +76 -76
  72. package/src/llms.ts +205 -166
  73. package/src/platform.ts +312 -162
  74. package/src/plugins/rehype-heading-anchors.ts +45 -45
  75. package/src/plugins/rehype-pagefind-ignore.ts +19 -19
  76. package/src/plugins/rehype-table-wrapper.ts +30 -30
  77. package/src/plugins/remark-docfx.ts +12 -0
  78. package/src/plugins/remark-env-vars.ts +12 -4
  79. package/src/plugins/remark-md-links.ts +10 -4
  80. package/src/scripts/icon-manifest.ts +13 -5
  81. package/src/scripts/sample-widget.ts +557 -501
  82. package/src/sidebar.ts +103 -97
  83. package/src/styles/global/_code-blocks.scss +43 -44
  84. package/src/styles/global/_component-themes.scss +151 -153
  85. package/src/styles/global/_icon-gallery.scss +81 -81
  86. package/src/styles/global/_index.scss +0 -1
  87. package/src/styles/global/_markdown.scss +816 -787
  88. package/src/styles/global/_palette.scss +456 -110
  89. package/src/styles/global/_search-shared.scss +402 -398
  90. package/src/styles/global/_type-scale.scss +127 -127
  91. package/src/styles/global/_variables.scss +138 -111
  92. package/src/styles/theme.scss +41 -41
  93. package/src/virtual-modules.d.ts +11 -2
@@ -10,8 +10,8 @@ import PlatformBlock from 'igniteui-astro-components/components/mdx/PlatformBloc
10
10
 
11
11
  ## Props
12
12
 
13
- | Prop | Type | Description |
14
- |------|------|-------------|
13
+ | Prop | Type | Description |
14
+ | ----- | -------- | ----------------------------------------------------------- |
15
15
  | `for` | `string` | Comma-separated list of platform names to show content for. |
16
16
 
17
17
  Valid platform names: `Angular`, `React`, `WebComponents`, `Blazor`
@@ -20,14 +20,12 @@ Valid platform names: `Angular`, `React`, `WebComponents`, `Blazor`
20
20
 
21
21
  ```mdx
22
22
  {/* Single platform */}
23
- <PlatformBlock for="Angular">
24
- This paragraph only appears in Angular docs.
25
- </PlatformBlock>
23
+
24
+ <PlatformBlock for="Angular">This paragraph only appears in Angular docs.</PlatformBlock>
26
25
 
27
26
  {/* Multiple platforms */}
28
- <PlatformBlock for="Angular, React">
29
- Visible in Angular and React docs only.
30
- </PlatformBlock>
27
+
28
+ <PlatformBlock for="Angular, React">Visible in Angular and React docs only.</PlatformBlock>
31
29
 
32
30
  {/* All platforms (just write the content without PlatformBlock) */}
33
31
  ```
@@ -10,33 +10,38 @@ import Sample from 'igniteui-astro-components/components/mdx/Sample.astro';
10
10
 
11
11
  ## Props
12
12
 
13
- | Prop | Type | Default | Description |
14
- |------|------|---------|-------------|
15
- | `src` | `string` | *(required)* | Sample path relative to the demos base URL, e.g. `"/charts/data-chart/axis-crossing"`. |
16
- | `height` | `number` | `400` | iframe height in pixels. |
17
- | `alt` | `string` | `''` | `title` attribute for the iframe (accessibility). |
18
- | `lob` | `boolean` | `false` | Use `lobDemosBaseUrl` instead of `demosBaseUrl` (LOB/grid-dynamic demos). |
19
- | `dv` | `boolean` | `false` | Force use of `dvDemosBaseUrl` (data-viz demos). Auto-detected for paths starting with `charts/`, `gauges/`, `maps/`, `excel/`. |
20
- | `crm` | `boolean` | `false` | Use `crmDemoBaseUrl` (CRM demo samples). |
21
- | `iframeOnly` | `boolean` | `false` | Render only the iframe — no navbar, no code tabs, no live-edit footer. |
22
- | `fullscreenBtn` | `boolean` | `false` | When `iframeOnly={true}`, also renders a "View in full screen" button below the iframe. |
13
+ | Prop | Type | Default | Description |
14
+ | --------------- | --------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------ |
15
+ | `src` | `string` | _(required)_ | Sample path relative to the demos base URL, e.g. `"/charts/data-chart/axis-crossing"`. |
16
+ | `height` | `number` | `400` | iframe height in pixels. |
17
+ | `alt` | `string` | `''` | `title` attribute for the iframe (accessibility). |
18
+ | `lob` | `boolean` | `false` | Use `lobDemosBaseUrl` instead of `demosBaseUrl` (LOB/grid-dynamic demos). |
19
+ | `dv` | `boolean` | `false` | Force use of `dvDemosBaseUrl` (data-viz demos). Auto-detected for paths starting with `charts/`, `gauges/`, `maps/`, `excel/`. |
20
+ | `crm` | `boolean` | `false` | Use `crmDemoBaseUrl` (CRM demo samples). |
21
+ | `iframeOnly` | `boolean` | `false` | Render only the iframe — no navbar, no code tabs, no live-edit footer. |
22
+ | `fullscreenBtn` | `boolean` | `false` | When `iframeOnly={true}`, also renders a "View in full screen" button below the iframe. |
23
23
 
24
24
  ## Examples
25
25
 
26
26
  ```mdx
27
27
  {/* Standard widget */}
28
+
28
29
  <Sample src="/charts/data-chart/axis-crossing" height={500} alt="Angular Data Chart Example" />
29
30
 
30
31
  {/* DV sample (auto-detected) */}
32
+
31
33
  <Sample src="/gauges/radial-gauge/needle" height={350} />
32
34
 
33
35
  {/* LOB demo */}
36
+
34
37
  <Sample src="/grid/grid/filtering" lob />
35
38
 
36
39
  {/* Bare iframe for embedding */}
40
+
37
41
  <Sample src="/charts/bar-chart/overview" iframeOnly height={300} />
38
42
 
39
43
  {/* Bare iframe + fullscreen link */}
44
+
40
45
  <Sample src="/charts/bar-chart/overview" iframeOnly fullscreenBtn height={300} />
41
46
  ```
42
47
 
@@ -44,12 +49,12 @@ import Sample from 'igniteui-astro-components/components/mdx/Sample.astro';
44
49
 
45
50
  The base URLs are resolved from `environment.json` at build time via `siteMetaIntegration` and exposed through `getPlatformContext().getEnvVars()`:
46
51
 
47
- | Key | Used by |
48
- |-----|---------|
49
- | `demosBaseUrl` | Default demos |
50
- | `dvDemosBaseUrl` | Charts / gauges / maps / excel |
51
- | `lobDemosBaseUrl` | LOB / grids |
52
- | `crmDemoBaseUrl` | CRM demos |
52
+ | Key | Used by |
53
+ | ----------------- | ------------------------------ |
54
+ | `demosBaseUrl` | Default demos |
55
+ | `dvDemosBaseUrl` | Charts / gauges / maps / excel |
56
+ | `lobDemosBaseUrl` | LOB / grids |
57
+ | `crmDemoBaseUrl` | CRM demos |
53
58
 
54
59
  ## Code highlighting
55
60
 
@@ -18,96 +18,119 @@ import type { PlatformContext } from '../../../lib/types.ts';
18
18
  import './Sample.scss';
19
19
 
20
20
  interface Props {
21
- src: string;
22
- height?: number;
23
- alt?: string;
24
- /** Use lobDemosBaseUrl instead of demosBaseUrl (for LOB/grid-dynamic demos). */
25
- lob?: boolean;
26
- /** Use dvDemosBaseUrl (for DV samples whose path doesn't start with a DV prefix). */
27
- dv?: boolean;
28
- /** Use crmDemoBaseUrl (for CRM demo samples). */
29
- crm?: boolean;
30
- /** Render only the iframe — no navbar, no code tabs, no live-edit footer. */
31
- iframeOnly?: boolean;
32
- /** When used with iframeOnly, also render a "View in full screen" button below. */
33
- fullscreenBtn?: boolean;
21
+ src: string;
22
+ height?: number;
23
+ alt?: string;
24
+ /** Use lobDemosBaseUrl instead of demosBaseUrl (for LOB/grid-dynamic demos). */
25
+ lob?: boolean;
26
+ /** Use dvDemosBaseUrl (for DV samples whose path doesn't start with a DV prefix). */
27
+ dv?: boolean;
28
+ /** Use crmDemoBaseUrl (for CRM demo samples). */
29
+ crm?: boolean;
30
+ /** Render only the iframe — no navbar, no code tabs, no live-edit footer. */
31
+ iframeOnly?: boolean;
32
+ /** When used with iframeOnly, also render a "View in full screen" button below. */
33
+ fullscreenBtn?: boolean;
34
34
  }
35
35
 
36
- const { src, height = 400, alt = '', lob = false, dv = false, crm = false, iframeOnly = false, fullscreenBtn = false } = Astro.props;
36
+ const {
37
+ src,
38
+ height = 400,
39
+ alt = '',
40
+ lob = false,
41
+ dv = false,
42
+ crm = false,
43
+ iframeOnly = false,
44
+ fullscreenBtn = false,
45
+ } = Astro.props;
37
46
  const { name, lower } = Astro.locals.platformContext as PlatformContext;
38
47
  const env = Astro.locals.envVars ?? {};
39
48
 
40
49
  // DV samples (charts, gauges, maps, excel) use dvDemosBaseUrl when available.
41
50
  const DV_PREFIXES = ['gauges/', 'maps/', 'excel/', 'charts/'];
42
- const srcNoSlash = src.replace(/^\//, '');
43
- const isDv = dv || DV_PREFIXES.some(p => srcNoSlash.startsWith(p));
44
- const baseUrl = lob ? (env.lobDemosBaseUrl ?? env.demosBaseUrl ?? '').replace(/\/$/, '')
45
- : crm ? (env.crmDemoBaseUrl ?? env.demosBaseUrl ?? '').replace(/\/$/, '')
46
- : isDv ? (env.dvDemosBaseUrl ?? env.demosBaseUrl ?? '').replace(/\/$/, '')
47
- : (env.demosBaseUrl ?? '').replace(/\/$/, '');
51
+ const srcNoSlash = src.replace(/^\//, '');
52
+ const isDv = dv || DV_PREFIXES.some((p) => srcNoSlash.startsWith(p));
53
+ const baseUrl = lob
54
+ ? (env.lobDemosBaseUrl ?? env.demosBaseUrl ?? '').replace(/\/$/, '')
55
+ : crm
56
+ ? (env.crmDemoBaseUrl ?? env.demosBaseUrl ?? '').replace(/\/$/, '')
57
+ : isDv
58
+ ? (env.dvDemosBaseUrl ?? env.demosBaseUrl ?? '').replace(/\/$/, '')
59
+ : (env.demosBaseUrl ?? '').replace(/\/$/, '');
48
60
 
49
- const iframeSrc = `${baseUrl}${src}`;
50
- const githubSrc = srcNoSlash;
61
+ const iframeSrc = `${baseUrl}${src}`;
62
+ const githubSrc = srcNoSlash;
51
63
 
52
64
  // Stable, unique element ID derived from the sample path.
53
- const widgetId = 'cw' + src.replace(/[^a-z0-9]/gi, '-');
65
+ const widgetId = 'cw' + src.replace(/[^a-z0-9]/gi, '-');
54
66
  const exampleTabId = `${widgetId}-example`;
55
67
  ---
56
68
 
57
- {iframeOnly ? (
58
- <>
59
- <div class="igd-sample-container" style={ `height: ${ height }px` }>
69
+ {
70
+ iframeOnly ? (
71
+ <>
72
+ <div class="igd-sample-container" style={`height: ${height}px`}>
60
73
  <iframe
61
- src={ iframeSrc }
62
- title={ alt || `${ name } Example` }
63
- style="width: 100%; height: 100%;"
64
- frameborder="0"
65
- seamless
66
- ></iframe>
67
- { fullscreenBtn && (
68
- <div class="igd-code-view__header-actions">
69
- <igc-icon-button
70
- name="open-link-blank"
71
- collection="docs"
72
- variant="outlined"
73
- class="igd-full-screen-btn igd-edit-in-btn"
74
- href={ iframeSrc }
75
- target="_blank"
76
- aria-label="Open in full screen"
77
- ></igc-icon-button>
78
- </div>
79
- ) }
80
- </div>
81
- </>
82
- ) : (
83
- <>
84
- <div class="igd-code-view"
85
- id={ widgetId }
86
- data-iframe-src={ iframeSrc }
87
- data-demos-base-url={ baseUrl }
88
- data-github-src={ githubSrc }
89
- data-platform={ lower }>
90
- <div class="igd-code-view__inner">
91
- <igc-tabs id={ `${ widgetId }-tabs` } alignment="start">
92
- <igc-tab id={ exampleTabId } label="EXAMPLE" selected>
93
- <div class="igd-sample-container loading" aria-busy="true" style={ `height: ${ height }px` }>
94
- <igc-circular-progress indeterminate class="sample-loading-indicator" aria-label="Loading sample"></igc-circular-progress>
95
- <iframe
96
- data-src={ iframeSrc }
97
- title={ alt || `${ name } Example` }
98
- style="width: 100%; height: 100%;"
99
- frameborder="0"
100
- seamless
101
- aria-hidden="true"
102
- ></iframe>
103
- </div>
104
- </igc-tab>
105
- </igc-tabs>
106
-
74
+ src={iframeSrc}
75
+ title={alt || `${name} Example`}
76
+ style="width: 100%; height: 100%;"
77
+ frameborder="0"
78
+ seamless
79
+ />
80
+ {fullscreenBtn && (
81
+ <div class="igd-code-view__header-actions">
82
+ <igc-icon-button
83
+ name="open-link-blank"
84
+ collection="docs"
85
+ variant="outlined"
86
+ class="igd-full-screen-btn igd-edit-in-btn"
87
+ href={iframeSrc}
88
+ target="_blank"
89
+ aria-label="Open in full screen"
90
+ />
107
91
  </div>
92
+ )}
93
+ </div>
94
+ </>
95
+ ) : (
96
+ <>
97
+ <div
98
+ class="igd-code-view"
99
+ id={widgetId}
100
+ data-iframe-src={iframeSrc}
101
+ data-demos-base-url={baseUrl}
102
+ data-github-src={githubSrc}
103
+ data-platform={lower}
104
+ >
105
+ <div class="igd-code-view__inner">
106
+ <igc-tabs id={`${widgetId}-tabs`} alignment="start">
107
+ <igc-tab id={exampleTabId} label="EXAMPLE" selected>
108
+ <div
109
+ class="igd-sample-container loading"
110
+ aria-busy="true"
111
+ style={`height: ${height}px`}
112
+ >
113
+ <igc-circular-progress
114
+ indeterminate
115
+ class="sample-loading-indicator"
116
+ aria-label="Loading sample"
117
+ />
118
+ <iframe
119
+ data-src={iframeSrc}
120
+ title={alt || `${name} Example`}
121
+ style="width: 100%; height: 100%;"
122
+ frameborder="0"
123
+ seamless
124
+ aria-hidden="true"
125
+ />
126
+ </div>
127
+ </igc-tab>
128
+ </igc-tabs>
129
+ </div>
108
130
  </div>
109
- </>
110
- )}
131
+ </>
132
+ )
133
+ }
111
134
 
112
135
  <script>
113
136
  // Astro deduplicates module scripts — this runs exactly once per full page load.
@@ -1,177 +1,177 @@
1
1
  @use 'igniteui-theming/sass/typography' as *;
2
2
 
3
3
  igc-tabs {
4
- position: relative;
5
- z-index: 0;
6
- width: 100%;
7
-
8
- &::part(inner) {
9
- flex-grow: 1;
10
- }
11
-
12
- --item-text-color: light-dark(var(--ig-gray-900), var(--ig-gray-900));
13
- --item-hover-color: var(--igd-accent);
14
- --item-background: var(--igd-layout-sections-bg);
15
- --item-hover-background: var(--igd-layout-sections-bg);
16
-
17
- --item-active-color: var(--igd-accent);
18
- --item-active-hover-color: var(--igd-accent);
19
- --item-active-background: var(--igd-layout-sections-bg);
20
- --item-active-hover-background: var(--igd-layout-sections-bg);
21
- --indicator-color: var(--igd-accent);
22
-
23
- --button-color: light-dark(var(--ig-gray-900), var(--ig-gray-900));
24
- --button-hover-color: var(--igd-accent);
25
- --button-background: var(--igd-layout-sections-bg);
26
- --button-hover-background: var(--igd-layout-sections-bg);
27
-
28
- .igd-code-view__header-actions {
29
- border-block: rem(1px) solid light-dark(var(--ig-gray-300), var(--ig-gray-200));
30
- }
31
-
32
- .igd-sample-container {
33
- border-inline: none;
34
- border-block-end: none;
35
- }
4
+ position: relative;
5
+ z-index: 0;
6
+ width: 100%;
7
+
8
+ &::part(inner) {
9
+ flex-grow: 1;
10
+ }
11
+
12
+ --item-text-color: light-dark(var(--ig-gray-900), var(--ig-gray-900));
13
+ --item-hover-color: var(--igd-accent);
14
+ --item-background: var(--igd-layout-sections-bg);
15
+ --item-hover-background: var(--igd-layout-sections-bg);
16
+
17
+ --item-active-color: var(--igd-accent);
18
+ --item-active-hover-color: var(--igd-accent);
19
+ --item-active-background: var(--igd-layout-sections-bg);
20
+ --item-active-hover-background: var(--igd-layout-sections-bg);
21
+ --indicator-color: var(--igd-accent);
22
+
23
+ --button-color: light-dark(var(--ig-gray-900), var(--ig-gray-900));
24
+ --button-hover-color: var(--igd-accent);
25
+ --button-background: var(--igd-layout-sections-bg);
26
+ --button-hover-background: var(--igd-layout-sections-bg);
27
+
28
+ .igd-code-view__header-actions {
29
+ border-block: rem(1px) solid light-dark(var(--ig-gray-300), var(--ig-gray-200));
30
+ }
31
+
32
+ .igd-sample-container {
33
+ border-inline: none;
34
+ border-block-end: none;
35
+ }
36
36
  }
37
37
 
38
38
  // TODO THIS IS A COMPONENT BUG LOG IT
39
39
  igc-tab::part(start-scroll-button) {
40
- inset-inline-start: -1px;
40
+ inset-inline-start: -1px;
41
41
  }
42
42
  igc-tab::part(end-scroll-button) {
43
- inset-inline-end: -1px;
43
+ inset-inline-end: -1px;
44
44
  }
45
45
 
46
46
  igc-tab {
47
- .code-wrapper {
48
- position: relative;
49
- border-radius: 0;
50
- margin: 0;
51
- border: none;
52
- border-top: rem(1px) solid var(--ig-gray-300);
53
- max-height: rem(400px);
54
- overflow: auto;
55
- overscroll-behavior: contain;
56
-
57
- pre {
58
- margin: 0;
59
- border: none;
60
- padding: 0;
61
- border-radius: 0;
62
- }
63
-
64
- .cv-hljs-code-copy {
65
- position: absolute;
66
- top: rem(16px);
67
- right: rem(16px);
68
- opacity: 0;
69
- transition: opacity 0.2s ease;
70
- pointer-events: none;
71
- }
72
-
73
- &:hover .cv-hljs-code-copy,
74
- &:focus-within .cv-hljs-code-copy {
75
- opacity: 1;
76
- pointer-events: auto;
77
- }
78
- }
47
+ .code-wrapper {
48
+ position: relative;
49
+ border-radius: 0;
50
+ margin: 0;
51
+ border: none;
52
+ border-top: rem(1px) solid var(--ig-gray-300);
53
+ max-height: rem(400px);
54
+ overflow: auto;
55
+ overscroll-behavior: contain;
56
+
57
+ pre {
58
+ margin: 0;
59
+ border: none;
60
+ padding: 0;
61
+ border-radius: 0;
62
+ }
63
+
64
+ .cv-hljs-code-copy {
65
+ position: absolute;
66
+ top: rem(16px);
67
+ right: rem(16px);
68
+ opacity: 0;
69
+ transition: opacity 0.2s ease;
70
+ pointer-events: none;
71
+ }
72
+
73
+ &:hover .cv-hljs-code-copy,
74
+ &:focus-within .cv-hljs-code-copy {
75
+ opacity: 1;
76
+ pointer-events: auto;
77
+ }
78
+ }
79
79
  }
80
80
 
81
81
  // TODO Log issue in the component this is not suppose to be affected by the ig-typography
82
82
  igc-tab::part(content) {
83
- @include type-style('detail-1', false) {
84
- margin: 0;
85
- }
83
+ @include type-style('detail-1', false) {
84
+ margin: 0;
85
+ }
86
86
  }
87
87
 
88
88
  igc-tab::part(tab-header) {
89
- min-height: rem(30px);
90
- padding: rem(4px) rem(16px)
89
+ min-height: rem(30px);
90
+ padding: rem(4px) rem(16px);
91
91
  }
92
92
 
93
93
  .igd-code-view {
94
- width: 100%;
95
- border: rem(1px) solid var(--ig-gray-300);
96
- margin-block-end: rem(26px);
97
-
98
- .igd-sample-container {
99
- margin-block-end: 0;
100
- }
94
+ width: 100%;
95
+ border: rem(1px) solid var(--ig-gray-300);
96
+ margin-block-end: rem(26px);
97
+
98
+ .igd-sample-container {
99
+ margin-block-end: 0;
100
+ }
101
101
  }
102
102
 
103
103
  .igd-code-view__inner {
104
- position: relative;
105
- display: flex;
104
+ position: relative;
105
+ display: flex;
106
106
  }
107
107
 
108
108
  .igd-sample-container {
109
- --sample-container-header-height: #{rem(66px)};
110
-
111
- position: relative;
112
- border: rem(1px) solid var(--ig-gray-300);
113
- min-height: rem(320px);
114
- max-height: rem(800px);
115
- overflow: hidden auto;
116
- margin-block-end: rem(26px);
117
-
118
- iframe {
119
- display: block;
120
- border: none;
121
- margin: 0;
122
- }
123
-
124
- .sample-loading-indicator {
125
- position: absolute;
126
- inset: var(--sample-container-header-height, 0px) 0 0 0;
127
- margin: auto;
128
- width: 60px;
129
- height: 60px;
130
- z-index: 1;
131
- opacity: 0;
132
- pointer-events: none;
133
- transition: opacity 0.2s ease;
134
- }
135
-
136
- &.loading .sample-loading-indicator {
137
- opacity: 1;
138
- }
109
+ --sample-container-header-height: #{rem(66px)};
110
+
111
+ position: relative;
112
+ border: rem(1px) solid var(--ig-gray-300);
113
+ min-height: rem(320px);
114
+ max-height: rem(800px);
115
+ overflow: hidden auto;
116
+ margin-block-end: rem(26px);
117
+
118
+ iframe {
119
+ display: block;
120
+ border: none;
121
+ margin: 0;
122
+ }
123
+
124
+ .sample-loading-indicator {
125
+ position: absolute;
126
+ inset: var(--sample-container-header-height, 0px) 0 0 0;
127
+ margin: auto;
128
+ width: 60px;
129
+ height: 60px;
130
+ z-index: 1;
131
+ opacity: 0;
132
+ pointer-events: none;
133
+ transition: opacity 0.2s ease;
134
+ }
135
+
136
+ &.loading .sample-loading-indicator {
137
+ opacity: 1;
138
+ }
139
139
  }
140
140
 
141
141
  .full-screen-btn {
142
- display: flex;
143
- align-items: center;
142
+ display: flex;
143
+ align-items: center;
144
144
  }
145
145
 
146
146
  .igd-code-view__footer-actions {
147
- border-block-start: rem(1px) solid var(--ig-gray-300);
147
+ border-block-start: rem(1px) solid var(--ig-gray-300);
148
148
  }
149
149
 
150
150
  .igd-code-view__header-actions,
151
151
  .igd-code-view__footer-actions {
152
- display: flex;
153
- align-items: center;
154
- justify-content: flex-end;
155
- position: relative;
156
- padding: rem(16px);
157
- gap: rem(16px);
152
+ display: flex;
153
+ align-items: center;
154
+ justify-content: flex-end;
155
+ position: relative;
156
+ padding: rem(16px);
157
+ gap: rem(16px);
158
158
  }
159
159
 
160
160
  .igd-code-view__header-actions {
161
- position: sticky;
162
- inset-block-end: 0;
163
- height: var(--sample-container-header-height);
164
- border-block-start: rem(1px) solid var(--ig-gray-300);
165
- background-color: var(--igd-layout-sections-bg);
161
+ position: sticky;
162
+ inset-block-end: 0;
163
+ height: var(--sample-container-header-height);
164
+ border-block-start: rem(1px) solid var(--ig-gray-300);
165
+ background-color: var(--igd-layout-sections-bg);
166
166
  }
167
167
 
168
168
  igc-button {
169
- &::part(base) {
170
- padding-inline: rem(16px);
171
- gap: rem(4px);
172
-
173
- @include type-style('caption') {
174
- margin: 0;
175
- }
176
- }
169
+ &::part(base) {
170
+ padding-inline: rem(16px);
171
+ gap: rem(4px);
172
+
173
+ @include type-style('caption') {
174
+ margin: 0;
175
+ }
176
+ }
177
177
  }