igniteui-astro-components 0.0.18 → 0.0.19

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 (44) hide show
  1. package/package.json +1 -1
  2. package/src/assets/icons/{chatGPT,.svg → chatgpt.svg} +0 -1
  3. package/src/assets/ig-logo.svg +1 -1
  4. package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +1 -3
  5. package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +12 -3
  6. package/src/components/DocsSidebar/DocsSidebar.astro +26 -7
  7. package/src/components/DocsSidebar/DocsSidebar.scss +35 -28
  8. package/src/components/DocsSidebar/SidebarFilterInput.astro +2 -2
  9. package/src/components/DocsSidebar/SidebarFilterInput.scss +76 -51
  10. package/src/components/DocsSidebar/sidebar-filter.ts +3 -18
  11. package/src/components/DocsSubHeader/DocsSubHeader.astro +93 -114
  12. package/src/components/DocsSubHeader/DocsSubHeader.scss +69 -121
  13. package/src/components/DocsToc/DocsToc.astro +14 -10
  14. package/src/components/DocsToc/DocsToc.scss +7 -5
  15. package/src/components/DocsTree/docs-tree.scss +125 -54
  16. package/src/components/GlobalFooter/GlobalFooter.module.scss +1 -1
  17. package/src/components/GlobalNavBar/GlobalNavBar.module.scss +1 -3
  18. package/src/components/Search/Search.astro +57 -23
  19. package/src/components/Search/Search.scss +15 -21
  20. package/src/components/SearchAdvanced/SearchAdvanced.astro +64 -49
  21. package/src/components/SearchAdvanced/SearchAdvanced.scss +22 -30
  22. package/src/components/mdx/DocsAside/DocsAside.scss +10 -14
  23. package/src/layouts/DocsLayout/DocsLayout.astro +5 -5
  24. package/src/layouts/DocsLayout/DocsLayout.scss +58 -97
  25. package/src/scripts/icon-manifest.ts +73 -0
  26. package/src/scripts/icon-registry.ts +4 -35
  27. package/src/styles/global/_breakpoints.scss +0 -1
  28. package/src/styles/global/_code-blocks.scss +1 -0
  29. package/src/styles/global/_component-themes.scss +133 -125
  30. package/src/styles/global/_icon-gallery.scss +108 -0
  31. package/src/styles/global/_index.scss +1 -0
  32. package/src/styles/global/_markdown.scss +127 -16
  33. package/src/styles/global/_palette.scss +101 -101
  34. package/src/styles/global/_search-shared.scss +302 -315
  35. package/src/styles/global/_type-scale.scss +17 -17
  36. package/src/styles/global/_variables.scss +15 -6
  37. package/src/styles/theme.scss +7 -61
  38. package/src/assets/icons/classes.svg +0 -3
  39. package/src/assets/icons/enumerations.svg +0 -3
  40. package/src/assets/icons/functions.svg +0 -5
  41. package/src/assets/icons/interfaces.svg +0 -3
  42. package/src/assets/icons/type-alias.svg +0 -3
  43. package/src/assets/icons/variables.svg +0 -3
  44. /package/src/assets/icons/{palette,.svg → palette.svg} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "igniteui-astro-components",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "Reusable Astro components, layouts, and integrations for Infragistics / Ignite UI documentation sites. Replaces the Starlight defaults with project-specific implementations.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -1,4 +1,3 @@
1
1
  <svg width="18" height="18" viewBox="-3 -3 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="18" height="18" fill="currentColor"/>
3
2
  <path d="M15.0771 7.72975C15.1969 7.37446 15.258 7.00247 15.2581 6.62802C15.2581 6.00842 15.0908 5.40001 14.7735 4.86533C14.1359 3.77029 12.9532 3.09423 11.6732 3.09423C11.4214 3.09423 11.1691 3.12048 10.9229 3.17263C10.5913 2.80393 10.1842 2.50878 9.72847 2.30666C9.27277 2.10453 8.77883 2.00002 8.2792 2H8.25677C8.25447 2.00008 8.25096 2.00008 8.24835 2.00008C6.69802 2.00008 5.32317 2.98713 4.84655 4.44232C3.84851 4.64364 2.98694 5.26122 2.48321 6.1343C2.16689 6.67222 2.0002 7.28304 2 7.90494C2.00013 8.77894 2.32895 9.62179 2.92279 10.2703C2.80292 10.6256 2.74178 10.9976 2.74173 11.372C2.74179 11.9916 2.90904 12.6 3.2263 13.1347C3.86382 14.2301 5.04665 14.9057 6.32682 14.9057C6.57887 14.9057 6.83021 14.8795 7.07665 14.8273C7.40836 15.196 7.8155 15.4912 8.27123 15.6933C8.72696 15.8954 9.22094 16 9.7206 16H9.74304L9.75215 16C11.3033 16 12.6778 15.0129 13.1544 13.5564C14.1524 13.355 15.014 12.7374 15.5177 11.8643C15.8337 11.3269 16.0001 10.7166 16 10.0953C15.9999 9.2213 15.6711 8.37844 15.0772 7.72994L15.0771 7.72975ZM9.74397 15.0847H9.74031C9.11961 15.0845 8.51861 14.8697 8.04182 14.4776C8.07014 14.4625 8.09812 14.4469 8.12575 14.4306L10.9509 12.8205C11.0214 12.7809 11.08 12.7236 11.1208 12.6544C11.1616 12.5852 11.1831 12.5066 11.1831 12.4266V8.49396L12.3773 9.17429C12.3899 9.18055 12.3987 9.1927 12.4005 9.20657V12.4611C12.3988 13.9081 11.2105 15.0818 9.74397 15.0847ZM4.03097 12.6773C3.79762 12.2791 3.67468 11.8274 3.67454 11.3674C3.67454 11.2174 3.68782 11.0671 3.71368 10.9193C3.73467 10.9317 3.77132 10.9537 3.79761 10.9686L6.62277 12.5788C6.69323 12.6193 6.77332 12.6407 6.85487 12.6406C6.93641 12.6406 7.01649 12.6193 7.08694 12.5787L10.5361 10.6136V11.9743C10.5365 11.9812 10.5352 11.9882 10.5322 11.9945C10.5292 12.0008 10.5247 12.0062 10.5191 12.0104L7.66315 13.6374C7.25902 13.8669 6.80095 13.9877 6.33469 13.9879C5.86795 13.9878 5.40943 13.8667 5.00511 13.6366C4.60078 13.4066 4.26486 13.0757 4.03101 12.6771L4.03097 12.6773ZM3.28776 6.59182C3.59803 6.06003 4.08798 5.65284 4.67183 5.44152C4.67183 5.46554 4.67043 5.50804 4.67043 5.53759V8.75788L4.67039 8.76057C4.67041 8.84053 4.69187 8.91906 4.7326 8.98819C4.77333 9.05731 4.83187 9.11457 4.90228 9.15415L8.35152 11.119L7.15739 11.7993C7.1515 11.8031 7.14474 11.8055 7.13771 11.8061C7.13068 11.8067 7.12361 11.8056 7.11712 11.8029L4.26091 10.1745C3.85713 9.94371 3.52192 9.61226 3.28886 9.21338C3.05581 8.81449 2.9331 8.36217 2.93304 7.90175C2.93323 7.44204 3.05559 6.99042 3.28792 6.59194L3.28776 6.59182ZM13.0986 8.8445L9.64941 6.87942L10.8435 6.19936C10.8494 6.19552 10.8562 6.19318 10.8632 6.19255C10.8702 6.19192 10.8773 6.19302 10.8838 6.19575L13.74 7.82274C14.5621 8.29137 15.0693 9.15796 15.0693 10.0951C15.0693 11.1943 14.3742 12.1778 13.329 12.5574V9.24081C13.3291 9.23958 13.3291 9.23831 13.3291 9.23712C13.3291 9.07499 13.2411 8.92512 13.0986 8.8445ZM14.2872 7.07951C14.2662 7.06679 14.2295 7.045 14.2032 7.03009L11.3781 5.41993C11.3076 5.37942 11.2276 5.35805 11.146 5.35802C11.0646 5.35802 10.9844 5.37946 10.914 5.41993L7.46479 7.38501V6.02436L7.46475 6.02201C7.46475 6.01545 7.4663 6.00898 7.46928 6.00311C7.47225 5.99724 7.47657 5.99213 7.48189 5.9882L10.3378 4.36258C10.7418 4.13279 11.1999 4.01181 11.6662 4.01178C13.1346 4.01178 14.3255 5.18678 14.3255 6.63567C14.3254 6.78435 14.3126 6.93276 14.2872 7.07932V7.07951ZM6.8156 9.50465L5.62119 8.82433C5.61493 8.82125 5.60953 8.81669 5.60548 8.81106C5.60143 8.80543 5.59885 8.7989 5.59798 8.79205V5.53751C5.5986 4.08936 6.78946 2.91535 8.25727 2.91535C8.87893 2.91549 9.48092 3.13035 9.9588 3.52267C9.93051 3.53777 9.90253 3.55343 9.87487 3.56962L7.0497 5.17975C6.97922 5.21933 6.92061 5.27661 6.87983 5.34578C6.83905 5.41495 6.81756 5.49354 6.81754 5.57356V5.57617L6.8156 9.50465ZM7.46425 8.12471L9.00049 7.24925L10.5367 8.12413V9.87452L9.00049 10.7494L7.46425 9.87452V8.12471Z" fill="currentColor"/>
4
3
  </svg>
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" x="0" y="0" version="1.1" viewBox="0 0 349.6 103.4">
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" class="igniteui-page-logo" x="0" y="0" version="1.1" viewBox="0 0 349.6 103.4">
2
2
  <style>
3
3
  .st0{fill:#fff}.st1{fill:#27265f}.st2{fill:#09f}.st3{fill:#f49021}
4
4
  </style>
@@ -45,9 +45,7 @@ const crumbs = sidebarCrumbs.length > 0 ? sidebarCrumbs : (pageTitle
45
45
  ) }
46
46
  { crumbs.map((label, i) => (
47
47
  <li class="docs-breadcrumb-item">
48
- <span class="docs-breadcrumb-sep" aria-hidden="true">
49
- /
50
- </span>
48
+ <igc-icon name="chevron" collection="docs" class="docs-breadcrumb-sep" aria-hidden="true"></igc-icon>
51
49
  <span class="docs-breadcrumb-crumb" title={ label }>{ label }</span>
52
50
  </li>
53
51
  )) }
@@ -3,20 +3,24 @@
3
3
  .docs-breadcrumb {
4
4
  width: 100%;
5
5
  padding: 0;
6
- margin-block-end: rem(26px);
6
+ margin-block-end: rem(16px);
7
+
8
+ ul, ol {
9
+ margin-block-end: 0 !important;
10
+ }
7
11
  }
8
12
 
9
13
  .docs-breadcrumb-list {
10
- @include type-style('overline') {
14
+ @include type-style('body-2') {
11
15
  margin: 0;
12
16
  };
13
17
 
14
18
  display: flex;
15
19
  flex-wrap: wrap;
16
20
  align-items: center;
17
- gap: rem(4px);
18
21
  list-style: none;
19
22
  padding: 0;
23
+ gap: 6px;
20
24
  color: light-dark(var(--ig-gray-700), var(--ig-gray-400));
21
25
  }
22
26
 
@@ -36,6 +40,7 @@
36
40
  gap: rem(4px);
37
41
  white-space: nowrap;
38
42
  overflow: hidden;
43
+ padding: 0;
39
44
  }
40
45
 
41
46
  .docs-breadcrumb-home {
@@ -44,8 +49,12 @@
44
49
  }
45
50
 
46
51
  .docs-breadcrumb-sep {
52
+ --size: #{rem(16px)};
53
+
47
54
  flex-shrink: 0;
48
55
  user-select: none;
56
+ rotate: -90deg;
57
+ color: light-dark(var(--ig-gray-500), var(--ig-gray-600));
49
58
  }
50
59
 
51
60
  .docs-breadcrumb-crumb {
@@ -9,7 +9,7 @@
9
9
  * in the <script> block below to use @infragistics/igniteui-webcomponents.
10
10
  */
11
11
  import { sidebar as sidebarData, trailingSlash as configuredTrailingSlash } from 'virtual:docs-template/site-meta';
12
- import logoRaw from '../../assets/ig-logo.svg?raw';
12
+ import { platform as virtualPlatform } from 'virtual:docs-template/nav-html';
13
13
  import SidebarFilterInput from './SidebarFilterInput.astro';
14
14
  import './DocsSidebar.scss';
15
15
  import SidebarLabel from './SidebarLabel.astro';
@@ -33,21 +33,40 @@ interface Props {
33
33
  * (exposed via the virtual module). Falls back to `true` if not configured.
34
34
  */
35
35
  trailingSlash?: boolean;
36
+ /** Logo text shown in the slide-in sidebar on mobile/tablet. Defaults to 'Ignite UI'. */
37
+ logoText?: string;
38
+ /** Platform label shown below logoText (e.g. 'Angular'). Auto-detected from virtual module when omitted. */
39
+ platformLabel?: string | null;
36
40
  }
37
41
 
42
+ const PLATFORM_LABELS: Record<string, string> = {
43
+ angular: 'Angular',
44
+ react: 'React',
45
+ blazor: 'Blazor',
46
+ 'web-components': 'Web Components',
47
+ };
48
+
38
49
  const useTrailingSlash = configuredTrailingSlash !== 'never';
39
- const { currentSlug = '', items: itemsProp, showFilter = true, trailingSlash = useTrailingSlash } = Astro.props;
50
+ const {
51
+ currentSlug = '',
52
+ items: itemsProp,
53
+ showFilter = true,
54
+ trailingSlash = useTrailingSlash,
55
+ logoText = 'Ignite UI',
56
+ platformLabel = virtualPlatform ? (PLATFORM_LABELS[virtualPlatform] ?? null) : null,
57
+ } = Astro.props;
40
58
  const items = (itemsProp ?? sidebarData) as SidebarEntry[];
41
59
  const nodes = toTreeNodes(items, currentSlug, { trailingSlash });
42
60
  const activeId = normalizeSlug(currentSlug);
43
- ---
61
+ ---w
44
62
 
45
63
  <sidebar-filter class="docs-sidebar" id="docs-sidebar" data-no-results="No topics match">
64
+ <div class="igd-sidebar-logo">
65
+ <h1>{logoText}</h1>
66
+ {platformLabel && <span class="igd-logo__platform">for {platformLabel}</span>}
67
+ </div>
46
68
  <div class="sidebar-gutter">
47
- <div class="sidebar-logo" aria-hidden="true">
48
- <Fragment set:html={logoRaw} />
49
- </div>
50
- { showFilter && <SidebarFilterInput/> }
69
+ { showFilter && <SidebarFilterInput/> }
51
70
  </div>
52
71
  <div class="sidebar-scroll" data-sidebar-scroll>
53
72
  <DocsTree
@@ -8,30 +8,22 @@
8
8
  flex-direction: column;
9
9
  z-index: var(--igd-sidebar-z-index);
10
10
  border-inline-end: var(--igd-app-outline);
11
- padding-inline: rem(16px);
12
- padding-block: rem(24px);
11
+ padding: 0;
13
12
  background-color: var(--igd-layout-sections-bg);
14
13
  position: sticky;
15
14
  top: var(--igd-header-height);
16
15
  height: calc(100dvh - var(--igd-header-height));
17
16
  max-height: 100dvh;
18
17
  align-self: start;
19
- gap: rem(8px);
20
18
  view-transition-name: docs-sidebar;
21
19
 
22
20
  .sidebar-gutter {
23
21
  display: grid;
24
- gap: rem(8px);
22
+ gap: rem(16px);
25
23
  overflow-y: hidden;
26
-
27
- // This Makes sure the input border is visible
28
- // This is the height of the input in fluent theme + 8px padding
29
- // TODO this can be made smart using a css variable to override the original height of the input and used here
30
- min-height: rem(40px);
31
-
32
- igc-icon {
33
- color: light-dark(var(--ig-gray-800), var(--ig-gray-300));
34
- }
24
+ padding: rem(16px);
25
+ border-bottom: var(--igd-app-outline);
26
+ min-height: rem(73px);
35
27
 
36
28
  &:empty {
37
29
  display: none;
@@ -44,27 +36,39 @@
44
36
  display: none;
45
37
  }
46
38
 
47
- .sidebar-logo {
39
+ // Hidden by default; shown on mobile/tablet where the sidebar is a slide-in overlay.
40
+ .igd-sidebar-logo {
48
41
  display: none;
49
- margin-block-end: rem(8px);
50
- padding-inline-start: rem(20px);
51
-
52
- > svg {
53
- width: rem(79px);
54
-
55
- .logo-type {
56
- fill: var(--igd-logo-type);
57
- }
42
+ flex-direction: column;
43
+ justify-content: center;
44
+ padding: rem(16px) rem(20px) rem(8px);
45
+
46
+ h1 {
47
+ @include type-style('h3') {
48
+ margin-block-end: rem(4px);
49
+ line-height: 1;
50
+ };
51
+ color: var(--ig-gray-800);
52
+ }
53
+
54
+ .igd-logo__platform {
55
+ @include type-style('subtitle', false) {
56
+ line-height: 1;
57
+ margin: 0;
58
+ };
59
+ color: var(--ig-gray-500);
58
60
  }
59
61
  }
60
62
 
61
63
  .sidebar-scroll {
62
64
  overflow-y: auto;
63
- scrollbar-gutter: stable;
65
+ padding-block: rem(12px);
66
+ scroll-behavior: smooth;
67
+ overscroll-behavior: contain;
64
68
  }
65
69
 
66
70
  .sidebar-premium-icon {
67
- --size: #{rem(24px)};
71
+ --size: #{rem(20px)};
68
72
 
69
73
  justify-self: end;
70
74
  color: var(--igd-premium-color);
@@ -75,7 +79,6 @@
75
79
  display: flex;
76
80
  align-items: center;
77
81
  gap: rem(8px);
78
- padding: rem(4px);
79
82
 
80
83
  igc-badge {
81
84
  justify-self: end;
@@ -85,12 +88,12 @@
85
88
 
86
89
  .docs-tree-group {
87
90
  gap: rem(8px);
88
- padding-inline-end: rem(4px);
91
+ padding: rem(12px) rem(8px);
89
92
  }
90
93
 
91
94
  .group-label-text {
92
95
  @include type-style('body-2') {
93
- //font-weight: 600;
96
+ font-weight: 700;
94
97
  margin-block: 0;
95
98
  };
96
99
 
@@ -113,6 +116,10 @@
113
116
  align-items: center;
114
117
  gap: rem(4px);
115
118
  margin-left: auto;
119
+
120
+ igc-badge::part(base) {
121
+ max-height: 20px;
122
+ }
116
123
  }
117
124
  }
118
125
 
@@ -18,7 +18,7 @@ import './SidebarFilterInput.scss';
18
18
  aria-controls="docs-sidebar"
19
19
  data-sidebar-filter-input
20
20
  >
21
- <igc-button
21
+ <igc-icon-button
22
22
  slot="suffix"
23
23
  variant="flat"
24
24
  aria-label="Clear filter"
@@ -26,7 +26,7 @@ import './SidebarFilterInput.scss';
26
26
  hidden>
27
27
 
28
28
  <igc-icon name="close" collection="docs" aria-hidden="true"></igc-icon>
29
- </igc-button>
29
+ </igc-icon-button>
30
30
  <igc-icon slot="suffix" name="filter" collection="docs" aria-hidden="true"></igc-icon>
31
31
  </igc-input>
32
32
 
@@ -1,69 +1,94 @@
1
1
  @use 'igniteui-theming/sass/typography' as *;
2
2
 
3
- igc-input {
4
- --ig-input-group-input-suffix-color: light-dark(var(--ig-gray-900), var(--ig-gray-800));
5
- --ig-input-group-input-suffix-color--filled: light-dark(var(--ig-gray-900), var(--ig-gray-800));
6
- --ig-input-group-input-suffix-color--focused: light-dark(var(--ig-gray-900), var(--ig-gray-800));
7
- --ig-input-group-idle-text-color: light-dark(var(--ig-gray-900), var(--ig-gray-800));
8
- --ig-input-group-filled-text-color: light-dark(var(--ig-gray-900), var(--ig-gray-900));
9
- --ig-input-group-placeholder-color: var(--ig-gray-500);
10
- --ig-input-group-hover-placeholder-color: var(--ig-gray-500);
11
- --ig-flat-button-hover-background: transparent;
12
- --ig-flat-button-focus-background: transparent;
13
- --ig-flat-button-icon-color-hover: var(--igd-accent);
14
- --ig-flat-button-icon-color-focus: var(--igd-accent);
15
-
16
- igc-icon {
17
- width: rem(24px);
18
- aspect-ratio: 1;
3
+ .docs-sidebar {
4
+ igc-input {
5
+ --ig-input-group-input-suffix-color: light-dark(var(--ig-gray-900), var(--ig-gray-800));
6
+ --ig-input-group-input-suffix-color--filled: light-dark(var(--ig-gray-900), var(--ig-gray-800));
7
+ --ig-input-group-input-suffix-color--focused: light-dark(var(--ig-gray-900), var(--ig-gray-800));
8
+ --ig-input-group-idle-text-color: light-dark(var(--ig-gray-900), var(--ig-gray-800));
9
+ --ig-input-group-filled-text-color: light-dark(var(--ig-gray-900), var(--ig-gray-900));
10
+ --ig-input-group-placeholder-color: var(--ig-gray-500);
11
+ --ig-input-group-hover-placeholder-color: var(--ig-gray-500);
12
+
13
+ --ig-flat-button-hover-background: transparent;
14
+ --ig-flat-button-focus-background: transparent;
15
+ --ig-flat-button-icon-color-hover: var(--igd-accent);
16
+ --ig-flat-button-icon-color-focus: var(--igd-accent);
17
+ --border-border-radius: var(--igd-border-radius-xl);
18
+ --border-background: light-dark(var(--ig-gray-50), var(--ig-gray-50));
19
+ --border-color: light-dark(var(--ig-gray-300), var(--ig-gray-100));
20
+ --hover-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-100));
21
+
22
+
23
+ igc-icon-button[variant='flat'] {
24
+ --background: transparent;
25
+ --hover-background: transparent;
26
+ --focus-background: transparent;
27
+ --active-background: transparent;
28
+ --foreground: var(--ig-gray-800);
29
+ --foreground-hover: var(--ig-primary-800);
30
+ --foreground-focus: var(--ig-primary-800);
31
+ --foreground-active: var(--ig-primary-800);
32
+
33
+ padding: 0;
34
+
35
+ &::part(base) {
36
+ &::after {
37
+ display: none;
38
+ }
39
+ }
40
+ }
41
+
42
+ igc-icon {
43
+ --size: #{rem(24px)};
44
+ padding: 0;
45
+ }
46
+
47
+ > igc-icon {
48
+ --size: #{rem(24px)};
49
+
50
+ aspect-ratio: 1;
51
+ margin-inline-end: rem(4px);
52
+ }
19
53
  }
20
- }
21
-
22
- igc-input::part(input) {
23
- @include type-style('body-2') {
24
- margin: 0;
25
- }
26
- }
27
-
28
- igc-input::part(container) {
29
- border-inline: 0;
30
- border-block-start: 0;
31
- border-block-end: rem(1px) solid light-dark(var(--ig-gray-200), var(--ig-gray-300));
32
- border-radius: 0;
33
54
 
34
- // TODO make this more stable using css vars
35
- // padding-inline-end is 8px(padding) - 5px(scrollbar width)
36
- padding-inline-end: rem(12px);
37
-
38
- padding-block-end: rem(8px);
39
-
40
- &::before {
41
- display: none;
55
+ igc-input::part(prefix) {
56
+ padding-inline: 0;
42
57
  }
43
- }
44
-
45
- igc-button {
46
- padding: 0;
47
58
 
48
- &::part(base) {
49
- padding-inline: rem(6px);
50
- min-width: fit-content;
59
+ igc-input::part(input) {
60
+ @include type-style('body-2') {
61
+ margin: 0;
62
+ }
63
+
64
+ padding-inline: rem(16px);
51
65
  }
52
66
 
53
- // TODO I am unable to styles the input, can't reach the part, log an issue in to the library.
54
- //&::part(input) {
55
- // padding-inline-start: 0;
56
- // padding-inline-end: rem(32px);
57
- //}
67
+ igc-button {
68
+ padding: 0;
69
+
70
+ &::part(base) {
71
+ padding-inline: rem(6px);
72
+ min-width: fit-content;
73
+ }
74
+
75
+ // TODO I am unable to styles the input, can't reach the part, log an issue in to the library.
76
+ //&::part(input) {
77
+ // padding-inline-start: 0;
78
+ // padding-inline-end: rem(32px);
79
+ //}
80
+ }
58
81
  }
59
82
 
60
83
  .sidebar-filter-status {
61
84
  @include type-style('body-2') {
62
85
  margin: 0 !important;
86
+ line-height: 1;
63
87
  }
64
88
 
65
- color: light-dark(var(--ig-gray-600), var(--ig-gray-700));
66
- padding-inline: 0;
89
+
90
+ color: light-dark(var(--ig-gray-500), var(--ig-gray-700));
91
+ padding-inline: rem(16px) 0;
67
92
 
68
93
  &:empty {
69
94
  display: none;
@@ -265,36 +265,21 @@ class SidebarFilter extends HTMLElement {
265
265
  const sc = this.scrollEl;
266
266
  if (!sc) return;
267
267
  if (isClientNav) {
268
- // igc-tree-item is already defined; one rAF is enough for layout.
269
268
  requestAnimationFrame(() => {
270
- // Snap to the pre-navigation position first so the sidebar appears
271
- // where the user last saw it, then smooth-scroll the short remaining
272
- // distance to center the active item.
273
- sc.scrollTop = parseInt(safeGet(SCROLL_KEY) || '0', 10) || 0;
269
+ sc.scrollTo({ top: parseInt(safeGet(SCROLL_KEY) || '0', 10) || 0, behavior: 'instant' });
274
270
  sc.style.visibility = '';
275
- sc.scrollTo({ top: this.activeScrollOffset(sc), behavior: 'smooth' });
276
271
  });
277
272
  } else {
278
- // Hard page load: wait for igc-tree-item so Lit microtasks drain first.
279
273
  customElements.whenDefined('igc-tree-item').then(() =>
280
274
  requestAnimationFrame(() => {
281
- sc.scrollTop = this.activeScrollOffset(sc);
282
275
  sc.style.visibility = '';
276
+ const active = this.querySelector<HTMLAnchorElement>('a[aria-current="page"]');
277
+ active?.scrollIntoView({ block: 'nearest' });
283
278
  })
284
279
  );
285
280
  }
286
281
  }
287
282
 
288
- private activeScrollOffset(sc: HTMLElement): number {
289
- const active = this.querySelector<HTMLAnchorElement>('a[aria-current="page"]');
290
- if (!active) return 0;
291
- const linkRect = active.getBoundingClientRect();
292
- const cRect = sc.getBoundingClientRect();
293
- // Center the active item in the scroll container.
294
- const itemTop = sc.scrollTop + (linkRect.top - cRect.top);
295
- return itemTop - (sc.clientHeight / 2) + (linkRect.height / 2);
296
- }
297
-
298
283
  // ── Filter ───────────────────────────────────────────────────────────────
299
284
 
300
285
  private applyFilter(rawQuery: string, source: 'user' | 'restore'): void {