igniteui-astro-components 0.0.27 → 0.0.29

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 (96) hide show
  1. package/README.md +82 -74
  2. package/package.json +16 -2
  3. package/src/assets/images/anatomy-test.png +0 -0
  4. package/src/components/CopyCode/CopyCode.astro +21 -7
  5. package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +33 -21
  6. package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +44 -43
  7. package/src/components/DocsBreadcrumb/README.md +10 -14
  8. package/src/components/DocsSidebar/DocsSidebar.astro +47 -45
  9. package/src/components/DocsSidebar/DocsSidebar.scss +120 -122
  10. package/src/components/DocsSidebar/README.md +25 -21
  11. package/src/components/DocsSidebar/SidebarFilterInput.astro +24 -29
  12. package/src/components/DocsSidebar/SidebarFilterInput.scss +90 -89
  13. package/src/components/DocsSidebar/SidebarLabel.astro +35 -26
  14. package/src/components/DocsSidebar/sidebar-filter.ts +93 -56
  15. package/src/components/DocsSubHeader/DocsSubHeader.astro +256 -195
  16. package/src/components/DocsSubHeader/DocsSubHeader.scss +181 -178
  17. package/src/components/DocsSubHeader/README.md +18 -16
  18. package/src/components/DocsToc/DocsToc.astro +301 -280
  19. package/src/components/DocsToc/DocsToc.scss +20 -21
  20. package/src/components/DocsToc/README.md +11 -9
  21. package/src/components/DocsToc/toTreeNodes.ts +3 -8
  22. package/src/components/DocsTree/DocsTree.astro +32 -20
  23. package/src/components/DocsTree/DocsTreeItem.astro +35 -30
  24. package/src/components/DocsTree/README.md +16 -15
  25. package/src/components/DocsTree/docs-tree.scss +267 -268
  26. package/src/components/GlobalFooter/GlobalFooter.astro +10 -10
  27. package/src/components/GlobalFooter/README.md +3 -2
  28. package/src/components/GlobalNavBar/GlobalNavBar.astro +4 -2
  29. package/src/components/GlobalNavBar/GlobalNavBar.module.scss +222 -222
  30. package/src/components/GlobalNavBar/README.md +3 -2
  31. package/src/components/LicenseIndicator/LicenseIndicator.astro +7 -5
  32. package/src/components/LicenseIndicator/LicenseIndicator.scss +3 -3
  33. package/src/components/MobileSidebarToggle/MobileSidebarToggle.astro +16 -17
  34. package/src/components/MobileSidebarToggle/README.md +3 -2
  35. package/src/components/MobileTocToggle/MobileTocToggle.astro +75 -61
  36. package/src/components/MobileTocToggle/MobileTocToggle.scss +65 -59
  37. package/src/components/Search/README.md +1 -0
  38. package/src/components/Search/Search.astro +137 -109
  39. package/src/components/Search/Search.scss +20 -20
  40. package/src/components/SearchAdvanced/README.md +21 -15
  41. package/src/components/SearchAdvanced/SearchAdvanced.astro +205 -133
  42. package/src/components/SearchAdvanced/SearchAdvanced.scss +152 -153
  43. package/src/components/mdx/Anatomy/Anatomy.astro +51 -0
  44. package/src/components/mdx/Anatomy/Anatomy.scss +40 -0
  45. package/src/components/mdx/ApiLink/ApiLink.astro +133 -113
  46. package/src/components/mdx/ApiLink/ApiLink.scss +9 -9
  47. package/src/components/mdx/ApiLink/README.md +26 -22
  48. package/src/components/mdx/ApiLink/api-link-index.ts +196 -173
  49. package/src/components/mdx/ApiRef/ApiRef.astro +54 -51
  50. package/src/components/mdx/ApiRef/README.md +20 -15
  51. package/src/components/mdx/Badge/Badge.astro +14 -14
  52. package/src/components/mdx/Badge/Badge.scss +61 -56
  53. package/src/components/mdx/Badge/README.md +24 -19
  54. package/src/components/mdx/DocsAside/DocsAside.astro +30 -37
  55. package/src/components/mdx/DocsAside/DocsAside.scss +82 -82
  56. package/src/components/mdx/DocsAside/README.md +22 -22
  57. package/src/components/mdx/Faq/Faq.astro +86 -0
  58. package/src/components/mdx/Faq/Faq.scss +105 -0
  59. package/src/components/mdx/Faq/FaqItem.astro +117 -0
  60. package/src/components/mdx/Faq/README.md +223 -0
  61. package/src/components/mdx/Faq/types.ts +34 -0
  62. package/src/components/mdx/PlatformBlock/PlatformBlock.astro +3 -2
  63. package/src/components/mdx/PlatformBlock/README.md +6 -8
  64. package/src/components/mdx/Sample/README.md +21 -16
  65. package/src/components/mdx/Sample/Sample.astro +97 -74
  66. package/src/components/mdx/Sample/Sample.scss +132 -132
  67. package/src/content-helper.ts +71 -72
  68. package/src/content.config.ts +1 -6
  69. package/src/integration.ts +566 -512
  70. package/src/layouts/DocsLayout/DocsLayout.astro +228 -182
  71. package/src/layouts/DocsLayout/DocsLayout.scss +261 -261
  72. package/src/layouts/DocsLayout/README.md +24 -35
  73. package/src/lib/nav-helpers.ts +88 -82
  74. package/src/lib/types.ts +76 -76
  75. package/src/llms.ts +205 -166
  76. package/src/platform.ts +312 -162
  77. package/src/plugins/rehype-heading-anchors.ts +45 -45
  78. package/src/plugins/rehype-pagefind-ignore.ts +19 -19
  79. package/src/plugins/rehype-table-wrapper.ts +30 -30
  80. package/src/plugins/remark-docfx.ts +12 -0
  81. package/src/plugins/remark-env-vars.ts +12 -4
  82. package/src/plugins/remark-md-links.ts +10 -4
  83. package/src/scripts/icon-manifest.ts +13 -5
  84. package/src/scripts/sample-widget.ts +557 -501
  85. package/src/sidebar.ts +103 -97
  86. package/src/styles/global/_code-blocks.scss +43 -44
  87. package/src/styles/global/_component-themes.scss +151 -153
  88. package/src/styles/global/_icon-gallery.scss +81 -81
  89. package/src/styles/global/_index.scss +0 -1
  90. package/src/styles/global/_markdown.scss +816 -787
  91. package/src/styles/global/_palette.scss +456 -110
  92. package/src/styles/global/_search-shared.scss +402 -398
  93. package/src/styles/global/_type-scale.scss +127 -127
  94. package/src/styles/global/_variables.scss +138 -111
  95. package/src/styles/theme.scss +41 -41
  96. package/src/virtual-modules.d.ts +11 -2
package/src/sidebar.ts CHANGED
@@ -28,14 +28,14 @@ export type { SidebarEntry, SidebarGroup, SidebarLink } from './lib/sidebar/type
28
28
  // ---------------------------------------------------------------------------
29
29
 
30
30
  interface TocItem {
31
- name?: string;
32
- href?: string;
33
- header?: boolean;
34
- items?: TocItem[];
35
- new?: boolean;
36
- preview?: boolean;
37
- updated?: boolean;
38
- premium?: boolean;
31
+ name?: string;
32
+ href?: string;
33
+ header?: boolean;
34
+ items?: TocItem[];
35
+ new?: boolean;
36
+ preview?: boolean;
37
+ updated?: boolean;
38
+ premium?: boolean;
39
39
  }
40
40
 
41
41
  // ---------------------------------------------------------------------------
@@ -43,26 +43,28 @@ interface TocItem {
43
43
  // ---------------------------------------------------------------------------
44
44
 
45
45
  function docExists(docsDir: string, href: string, exclude: RegExp[]): boolean {
46
- if (!href) return false;
47
- if (exclude?.some((p) => p.test(href))) return false;
48
- // Check the href as-is, then also with .md ↔ .mdx swapped so that toc.json
49
- // entries like "charts/chart-features.md" resolve even when the file on disk
50
- // is "charts/chart-features.mdx" (and vice-versa).
51
- if (fs.existsSync(path.join(docsDir, href))) return true;
52
- const alt = href.endsWith('.mdx')
53
- ? href.slice(0, -4) + '.md'
54
- : href.endsWith('.md') ? href.slice(0, -3) + '.mdx' : null;
55
- return alt !== null && fs.existsSync(path.join(docsDir, alt));
46
+ if (!href) return false;
47
+ if (exclude?.some((p) => p.test(href))) return false;
48
+ // Check the href as-is, then also with .md ↔ .mdx swapped so that toc.json
49
+ // entries like "charts/chart-features.md" resolve even when the file on disk
50
+ // is "charts/chart-features.mdx" (and vice-versa).
51
+ if (fs.existsSync(path.join(docsDir, href))) return true;
52
+ const alt = href.endsWith('.mdx')
53
+ ? href.slice(0, -4) + '.md'
54
+ : href.endsWith('.md')
55
+ ? href.slice(0, -3) + '.mdx'
56
+ : null;
57
+ return alt !== null && fs.existsSync(path.join(docsDir, alt));
56
58
  }
57
59
 
58
60
  function hrefToSlug(href: string): string {
59
- if (!href) return '';
60
- let slug = href
61
- .replace(/\\/g, '/')
62
- .replace(/\.(md|mdx)$/i, '')
63
- .toLowerCase();
64
- slug = slug.replace(/\/index$/, '');
65
- return slug === 'index' ? '' : slug;
61
+ if (!href) return '';
62
+ let slug = href
63
+ .replace(/\\/g, '/')
64
+ .replace(/\.(md|mdx)$/i, '')
65
+ .toLowerCase();
66
+ slug = slug.replace(/\/index$/, '');
67
+ return slug === 'index' ? '' : slug;
66
68
  }
67
69
 
68
70
  /**
@@ -71,51 +73,51 @@ function hrefToSlug(href: string): string {
71
73
  * • depth ≥ 1 (nested groups) → `collapsed: true`
72
74
  */
73
75
  function collapsedForDepth(depth: number): boolean {
74
- return depth > 0;
76
+ return depth > 0;
75
77
  }
76
78
 
77
79
  function convertTocItem(
78
- docsDir: string,
79
- item: TocItem,
80
- exclude: RegExp[],
81
- depth: number,
80
+ docsDir: string,
81
+ item: TocItem,
82
+ exclude: RegExp[],
83
+ depth: number,
82
84
  ): SidebarEntry | null {
83
- if (!item.name) return null;
84
-
85
- if (item.items && item.items.length > 0) {
86
- const group: SidebarGroup = {
87
- label: item.name,
88
- items: [],
89
- collapsed: collapsedForDepth(depth),
90
- };
91
- if (item.href && docExists(docsDir, item.href, exclude)) {
92
- group.items.push({ label: 'Overview', slug: hrefToSlug(item.href) });
93
- }
94
- for (const child of item.items) {
95
- const entry = convertTocItem(docsDir, child, exclude, depth + 1);
96
- if (entry) group.items.push(entry);
97
- }
98
- return group.items.length > 0 ? group : null;
85
+ if (!item.name) return null;
86
+
87
+ if (item.items && item.items.length > 0) {
88
+ const group: SidebarGroup = {
89
+ label: item.name,
90
+ items: [],
91
+ collapsed: collapsedForDepth(depth),
92
+ };
93
+ if (item.href && docExists(docsDir, item.href, exclude)) {
94
+ group.items.push({ label: 'Overview', slug: hrefToSlug(item.href) });
99
95
  }
100
-
101
- if (item.href) {
102
- if (!docExists(docsDir, item.href, exclude)) return null;
103
- const entry: SidebarLink = { label: item.name, slug: hrefToSlug(item.href) };
104
- // Status badge — only one slot available, priority order:
105
- if (item.new) entry.badge = { text: 'New', variant: 'success' };
106
- else if (item.preview) entry.badge = { text: 'Preview', variant: 'caution' };
107
- else if (item.updated) entry.badge = { text: 'Updated', variant: 'note' };
108
- // Premium is rendered via data-premium attr so it can coexist with a
109
- // status badge (CSS ::after pseudo-element adds the star icon).
110
- if (item.premium) {
111
- entry.attrs = { 'data-premium': 'true' };
112
- // Only use the badge slot for premium when no status badge is shown.
113
- if (!entry.badge) entry.badge = { text: 'Premium', variant: 'tip' };
114
- }
115
- return entry;
96
+ for (const child of item.items) {
97
+ const entry = convertTocItem(docsDir, child, exclude, depth + 1);
98
+ if (entry) group.items.push(entry);
99
+ }
100
+ return group.items.length > 0 ? group : null;
101
+ }
102
+
103
+ if (item.href) {
104
+ if (!docExists(docsDir, item.href, exclude)) return null;
105
+ const entry: SidebarLink = { label: item.name, slug: hrefToSlug(item.href) };
106
+ // Status badge — only one slot available, priority order:
107
+ if (item.new) entry.badge = { text: 'New', variant: 'success' };
108
+ else if (item.preview) entry.badge = { text: 'Preview', variant: 'caution' };
109
+ else if (item.updated) entry.badge = { text: 'Updated', variant: 'note' };
110
+ // Premium is rendered via data-premium attr so it can coexist with a
111
+ // status badge (CSS ::after pseudo-element adds the star icon).
112
+ if (item.premium) {
113
+ entry.attrs = { 'data-premium': 'true' };
114
+ // Only use the badge slot for premium when no status badge is shown.
115
+ if (!entry.badge) entry.badge = { text: 'Premium', variant: 'tip' };
116
116
  }
117
+ return entry;
118
+ }
117
119
 
118
- return null;
120
+ return null;
119
121
  }
120
122
 
121
123
  // ---------------------------------------------------------------------------
@@ -123,44 +125,48 @@ function convertTocItem(
123
125
  // ---------------------------------------------------------------------------
124
126
 
125
127
  export interface BuildSidebarFromTocOptions {
126
- /** Absolute path to the TOC file (.json). */
127
- tocPath: string;
128
- /** Absolute path to the Markdown docs directory. */
129
- docsDir: string;
130
- /** Extra patterns to exclude (matched against the `href`). */
131
- exclude?: RegExp[];
128
+ /** Absolute path to the TOC file (.json). */
129
+ tocPath: string;
130
+ /** Absolute path to the Markdown docs directory. */
131
+ docsDir: string;
132
+ /** Extra patterns to exclude (matched against the `href`). */
133
+ exclude?: RegExp[];
132
134
  }
133
135
 
134
136
  /**
135
137
  * Reads a JSON TOC file and converts it to a sidebar array.
136
138
  */
137
- export function buildSidebarFromToc({ tocPath, docsDir, exclude = [] }: BuildSidebarFromTocOptions): SidebarEntry[] {
138
- if (!tocPath || !fs.existsSync(tocPath)) return [];
139
- const tocRaw = fs.readFileSync(tocPath, 'utf-8');
140
- const tocItems: TocItem[] = JSON.parse(tocRaw);
141
-
142
- const sidebar: SidebarEntry[] = [];
143
- let currentGroup: SidebarGroup | null = null;
144
-
145
- for (const item of tocItems) {
146
- if (item.header) {
147
- if (currentGroup) sidebar.push(currentGroup);
148
- // Root-level header section — open by default.
149
- currentGroup = { label: item.name!, items: [], collapsed: collapsedForDepth(0) };
150
- if (item.href && docExists(docsDir, item.href, exclude)) {
151
- currentGroup.items.push({ label: 'Overview', slug: hrefToSlug(item.href) });
152
- }
153
- continue;
154
- }
155
- // Items inside a header section are at depth 1 (nested);
156
- // items outside any header section are at depth 0 (root).
157
- const depth = currentGroup ? 1 : 0;
158
- const entry = convertTocItem(docsDir, item, exclude, depth);
159
- if (!entry) continue;
160
- if (currentGroup) currentGroup.items.push(entry);
161
- else sidebar.push(entry);
139
+ export function buildSidebarFromToc({
140
+ tocPath,
141
+ docsDir,
142
+ exclude = [],
143
+ }: BuildSidebarFromTocOptions): SidebarEntry[] {
144
+ if (!tocPath || !fs.existsSync(tocPath)) return [];
145
+ const tocRaw = fs.readFileSync(tocPath, 'utf-8');
146
+ const tocItems: TocItem[] = JSON.parse(tocRaw);
147
+
148
+ const sidebar: SidebarEntry[] = [];
149
+ let currentGroup: SidebarGroup | null = null;
150
+
151
+ for (const item of tocItems) {
152
+ if (item.header) {
153
+ if (currentGroup) sidebar.push(currentGroup);
154
+ // Root-level header section — open by default.
155
+ currentGroup = { label: item.name!, items: [], collapsed: collapsedForDepth(0) };
156
+ if (item.href && docExists(docsDir, item.href, exclude)) {
157
+ currentGroup.items.push({ label: 'Overview', slug: hrefToSlug(item.href) });
158
+ }
159
+ continue;
162
160
  }
163
-
164
- if (currentGroup) sidebar.push(currentGroup);
165
- return sidebar;
161
+ // Items inside a header section are at depth 1 (nested);
162
+ // items outside any header section are at depth 0 (root).
163
+ const depth = currentGroup ? 1 : 0;
164
+ const entry = convertTocItem(docsDir, item, exclude, depth);
165
+ if (!entry) continue;
166
+ if (currentGroup) currentGroup.items.push(entry);
167
+ else sidebar.push(entry);
168
+ }
169
+
170
+ if (currentGroup) sidebar.push(currentGroup);
171
+ return sidebar;
166
172
  }
@@ -8,70 +8,69 @@
8
8
  ============================================================ */
9
9
 
10
10
  .shiki {
11
- border: 1px solid var(--ig-gray-200);
12
- margin-bottom: rem(26px);
11
+ border: 1px solid var(--ig-gray-200);
12
+ margin-bottom: rem(26px);
13
13
  }
14
14
 
15
15
  pre.shiki {
16
- overflow-x: auto;
17
- max-width: 100%;
18
- word-wrap: break-word;
19
- white-space: pre-wrap;
20
- border-radius: var(--igd-border-radius);
21
- padding: rem(32px);
16
+ overflow-x: auto;
17
+ max-width: 100%;
18
+ word-wrap: break-word;
19
+ white-space: pre-wrap;
20
+ border-radius: var(--igd-border-radius);
21
+ padding: rem(32px);
22
22
  }
23
23
 
24
24
  pre.shiki code {
25
- white-space: pre-wrap;
26
- word-break: break-word;
25
+ white-space: pre-wrap;
26
+ word-break: break-word;
27
27
  }
28
28
 
29
29
  /* ── Always use the dark theme ──────────────────────────────
30
30
  Single dark theme — Shiki outputs colors directly, no CSS
31
31
  variable switching required. */
32
32
  pre.shiki {
33
- background-color: var(--shiki-color-background) !important;
33
+ background-color: var(--shiki-color-background) !important;
34
34
  }
35
35
 
36
36
  .copy-code-wrapper {
37
- position: relative;
38
- z-index: 0;
37
+ position: relative;
38
+ z-index: 0;
39
39
  }
40
40
 
41
41
  .copy-code-wrapper > .copy-btn {
42
- position: absolute;
43
- inset-block-start: rem(8px);
44
- inset-inline-end: rem(8px);
45
- opacity: 0;
46
- z-index: 1;
47
-
48
- --foreground: var(--ig-primary-600-contrast);
49
- --hover-foreground: var(--ig-primary-600-contrast);
50
- --focus-foreground: var(--ig-primary-600-contrast);
51
- --active-foreground: var(--ig-primary-600-contrast);
52
- --background: var(--ig-primary-500);
53
- --hover-background: var(--ig-primary-500);
54
- --focus-background: var(--ig-primary-500);
55
- --active-background: var(--ig-primary-500);
56
- --border-color: transparent;
57
- --border-color-hover: transparent;
58
- --border-color-focus: transparent;
59
-
60
- &:has([name="check"]) {
61
- --foreground: var(--ig-success-300-contrast);
62
- --hover-foreground: var(--ig-success-300-contrast);
63
- --focus-foreground: var(--ig-success-300-contrast);
64
- --active-foreground: var(--ig-success-300-contrast);
65
-
66
- --background: var(--ig-success-300);
67
- --hover-background: var(--ig-success-300);
68
- --focus-background: var(--ig-success-300);
69
- --active-background: var(--ig-success-300);
70
- }
42
+ position: absolute;
43
+ inset-block-start: rem(8px);
44
+ inset-inline-end: rem(8px);
45
+ opacity: 0;
46
+ z-index: 1;
47
+
48
+ --foreground: var(--ig-primary-600-contrast);
49
+ --hover-foreground: var(--ig-primary-600-contrast);
50
+ --focus-foreground: var(--ig-primary-600-contrast);
51
+ --active-foreground: var(--ig-primary-600-contrast);
52
+ --background: var(--ig-primary-500);
53
+ --hover-background: var(--ig-primary-500);
54
+ --focus-background: var(--ig-primary-500);
55
+ --active-background: var(--ig-primary-500);
56
+ --border-color: transparent;
57
+ --border-color-hover: transparent;
58
+ --border-color-focus: transparent;
59
+
60
+ &:has([name='check']) {
61
+ --foreground: var(--ig-success-300-contrast);
62
+ --hover-foreground: var(--ig-success-300-contrast);
63
+ --focus-foreground: var(--ig-success-300-contrast);
64
+ --active-foreground: var(--ig-success-300-contrast);
65
+
66
+ --background: var(--ig-success-300);
67
+ --hover-background: var(--ig-success-300);
68
+ --focus-background: var(--ig-success-300);
69
+ --active-background: var(--ig-success-300);
70
+ }
71
71
  }
72
72
 
73
73
  .copy-code-wrapper:hover > .copy-btn,
74
74
  .copy-code-wrapper:focus-within > .copy-btn {
75
- opacity: 1;
75
+ opacity: 1;
76
76
  }
77
-
@@ -1,157 +1,155 @@
1
1
  @use 'igniteui-theming' as *;
2
2
 
3
-
4
3
  @layer components {
5
- /* Custom drop-down theme for igc-select (Web Components) */
6
- igc-select {
7
- // TODO as а user i want to be able to add border on the entier dropdown
8
- // TODO the distance attr on the igc-select is highly unreliable caning it as a css variable will be far more flexible
9
-
10
- // TODO --ig-drop-down-border-width not working
11
- //--ig-drop-down-elevation: var(--ig-elevation-0);
12
-
13
- --ig-drop-down-background-color: var(--igd-app-bg);
14
- --ig-drop-down-item-text-color: var(--ig-gray-600);
15
- --ig-drop-down-hover-item-background: var(--ig-gray-50);
16
- --ig-drop-down-hover-item-text-color: var(--ig-gray-900);
17
-
18
- --ig-drop-down-focused-item-text-color: var(--ig-gray-600);
19
- --ig-drop-down-focused-item-background: var(--ig-gray-50);
20
- --ig-drop-down-focused-item-border-color: transparent;
21
-
22
- // TODO this affects items not the dropdown itself, log an issue in the library
23
- --ig-drop-down-border-color: transparent;
24
-
25
- // TODO --ig-drop-down-border-width not working
26
- //--ig-drop-down-border-width: 10px;
27
-
28
- --ig-drop-down-border-radius: #{rem(16px)};
29
- --ig-drop-down-item-border-radius: 0;
30
-
31
- --ig-drop-down-selected-item-text-color: var(--igd-accent);
32
- --ig-drop-down-selected-hover-item-text-color: var(--igd-accent);
33
- --ig-drop-down-selected-focus-item-text-color: var(--igd-accent);
34
-
35
- --ig-drop-down-selected-item-background: transparent;
36
- --ig-drop-down-selected-hover-item-background: var(--ig-gray-50);
37
- --ig-drop-down-selected-focus-item-background: transparent;
38
-
39
- // TODO this controls the item size which is very confusing
40
- --ig-drop-down-size: #{rem(40px)};
41
-
42
- --ig-input-group-input-prefix-background: transparent;
43
- --ig-input-group-input-prefix-background--filled: transparent;
44
- --ig-input-group-input-prefix-color--filled: var(--ig-gray-900);
45
- --ig-input-group-input-prefix-background--focused: transparent;
46
- --ig-input-group-input-prefix-color--focused: var(--ig-gray-900);
47
- --ig-input-group-input-suffix-background: transparent;
48
- --ig-input-group-input-suffix-background--filled: transparent;
49
- --ig-input-group-input-suffix-color--filled: var(--ig-gray-900);
50
- --ig-input-group-input-suffix-background--focused: transparent;
51
- --ig-input-group-input-suffix-color--focused: var(--ig-gray-900);
52
- --ig-input-group-idle-text-color: var(--ig-gray-900);
53
- --ig-input-group-disabled-border-color: transparent;
54
- --ig-input-group-border-color: var(--ig-gray-300);
55
- //--ig-input-group-focused-border-color: var(--ig-gray-400);
56
- --ig-input-group-hover-border-color: var(--ig-gray-400);
57
- --ig-input-group-border-disabled-background: transparent;
58
- --ig-select-toggle-button-background: transparent;
59
- --ig-select-toggle-button-background-focus: transparent;
60
- --ig-select-toggle-button-foreground: var(--ig-gray-900);
61
- --ig-select-toggle-button-foreground-focus: var(--igd-accent);
62
- --ig-select-toggle-button-foreground-filled: var(--ig-gray-900);
63
- --ig-select-toggle-button-background-disabled: transparent;
64
- --ig-select-toggle-button-foreground-disabled: var(--ig-gray-400);
65
- --ig-input-group-border-border-radius: var(--igd-border-radius-xl);
66
-
67
- &::part(base) {
68
- padding-block: rem(12px);
69
- }
70
-
71
- igc-icon {
72
- padding-inline-end: 0;
73
- }
74
- }
75
-
76
- igc-select-item {
77
- margin-block: 0;
78
- }
79
-
80
- igc-select::part(container) {
81
- @include type-style('body-2') {
82
- margin: 0;
83
- }
84
- ;
85
- }
86
-
87
- // THIS IS BASICALLY THE DROPDOWN
88
- igc-select::part(base) {
89
- border: var(--igd-app-outline);
90
- box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1),
91
- 0 4px 6px -4px rgb(0 0 0 / 0.1);
92
- }
93
-
94
- igc-icon-button[variant='outlined'] {
95
- --foreground: light-dark(var(--ig-gray-900), var(--ig-gray-700));
96
- --hover-foreground: var(--igd-accent);
97
- --focus-foreground: var(--igd-accent);
98
- --active-foreground: var(--igd-accent);
99
- --focus-hover-foreground: var(--igd-accent);
100
-
101
- --hover-background: transparent;
102
- --focus-background: transparent;
103
- --active-background: transparent;
104
- --focus-hover-background: transparent;
105
- --focus-visible-background: transparent;
106
-
107
- --border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
108
- --focus-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
109
- --hover-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
110
- --border-radius: var(--igd-border-radius-xl);
111
-
112
- &::part(base) {
113
- &::after {
114
- display: none;
115
- }
116
-
117
- // TODO the icon color is not changing on hover, focus, active states, log an issue in the library
118
- &:hover,
119
- &:focus {
120
- --foreground: var(--igd-accent);
121
- }
122
- }
123
- }
124
-
125
- igc-button[variant='outlined'] {
126
- &::part(base) {
127
- --border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
128
- --hover-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
129
- --focus-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
130
- --focus-visible-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-700));
131
- --active-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-700));
132
-
133
- --foreground: light-dark(var(--ig-gray-900), var(--ig-gray-700));
134
- --hover-foreground: var(--igd-accent);
135
- --focus-foreground: var(--igd-accent);
136
- --active-foreground: var(--igd-accent);
137
- --focus-hover-foreground: var(--igd-accent);
138
- --focus-visible-foreground: var(--igd-accent);
139
-
140
- --icon-color: light-dark(var(--ig-gray-900), var(--ig-gray-200));
141
- --icon-color-hover: var(--igd-accent);
142
-
143
- --hover-background: transparent;
144
- --focus-background: transparent;
145
- --active-background: transparent;
146
- --focus-hover-background: transparent;
147
- --focus-visible-background: transparent;
148
-
149
- --border-radius: var(--igd-border-radius-xl);
150
-
151
- &::after {
152
- display: none;
153
- }
154
- }
155
- }
156
- }
4
+ /* Custom drop-down theme for igc-select (Web Components) */
5
+ igc-select {
6
+ // TODO as а user i want to be able to add border on the entier dropdown
7
+ // TODO the distance attr on the igc-select is highly unreliable caning it as a css variable will be far more flexible
8
+
9
+ // TODO --ig-drop-down-border-width not working
10
+ //--ig-drop-down-elevation: var(--ig-elevation-0);
11
+
12
+ --ig-drop-down-background-color: var(--igd-app-bg);
13
+ --ig-drop-down-item-text-color: var(--ig-gray-600);
14
+ --ig-drop-down-hover-item-background: var(--ig-gray-50);
15
+ --ig-drop-down-hover-item-text-color: var(--ig-gray-900);
16
+
17
+ --ig-drop-down-focused-item-text-color: var(--ig-gray-600);
18
+ --ig-drop-down-focused-item-background: var(--ig-gray-50);
19
+ --ig-drop-down-focused-item-border-color: transparent;
20
+
21
+ // TODO this affects items not the dropdown itself, log an issue in the library
22
+ --ig-drop-down-border-color: transparent;
23
+
24
+ // TODO --ig-drop-down-border-width not working
25
+ //--ig-drop-down-border-width: 10px;
26
+
27
+ --ig-drop-down-border-radius: #{rem(16px)};
28
+ --ig-drop-down-item-border-radius: 0;
29
+
30
+ --ig-drop-down-selected-item-text-color: var(--igd-accent);
31
+ --ig-drop-down-selected-hover-item-text-color: var(--igd-accent);
32
+ --ig-drop-down-selected-focus-item-text-color: var(--igd-accent);
33
+
34
+ --ig-drop-down-selected-item-background: transparent;
35
+ --ig-drop-down-selected-hover-item-background: var(--ig-gray-50);
36
+ --ig-drop-down-selected-focus-item-background: transparent;
37
+
38
+ // TODO this controls the item size which is very confusing
39
+ --ig-drop-down-size: #{rem(40px)};
40
+
41
+ --ig-input-group-input-prefix-background: transparent;
42
+ --ig-input-group-input-prefix-background--filled: transparent;
43
+ --ig-input-group-input-prefix-color--filled: var(--ig-gray-900);
44
+ --ig-input-group-input-prefix-background--focused: transparent;
45
+ --ig-input-group-input-prefix-color--focused: var(--ig-gray-900);
46
+ --ig-input-group-input-suffix-background: transparent;
47
+ --ig-input-group-input-suffix-background--filled: transparent;
48
+ --ig-input-group-input-suffix-color--filled: var(--ig-gray-900);
49
+ --ig-input-group-input-suffix-background--focused: transparent;
50
+ --ig-input-group-input-suffix-color--focused: var(--ig-gray-900);
51
+ --ig-input-group-idle-text-color: var(--ig-gray-900);
52
+ --ig-input-group-disabled-border-color: transparent;
53
+ --ig-input-group-border-color: var(--ig-gray-300);
54
+ //--ig-input-group-focused-border-color: var(--ig-gray-400);
55
+ --ig-input-group-hover-border-color: var(--ig-gray-400);
56
+ --ig-input-group-border-disabled-background: transparent;
57
+ --ig-select-toggle-button-background: transparent;
58
+ --ig-select-toggle-button-background-focus: transparent;
59
+ --ig-select-toggle-button-foreground: var(--ig-gray-900);
60
+ --ig-select-toggle-button-foreground-focus: var(--igd-accent);
61
+ --ig-select-toggle-button-foreground-filled: var(--ig-gray-900);
62
+ --ig-select-toggle-button-background-disabled: transparent;
63
+ --ig-select-toggle-button-foreground-disabled: var(--ig-gray-400);
64
+ --ig-input-group-border-border-radius: var(--igd-border-radius-xl);
65
+
66
+ &::part(base) {
67
+ padding-block: rem(12px);
68
+ }
69
+
70
+ igc-icon {
71
+ padding-inline-end: 0;
72
+ }
73
+ }
157
74
 
75
+ igc-select-item {
76
+ margin-block: 0;
77
+ }
78
+
79
+ igc-select::part(container) {
80
+ @include type-style('body-2') {
81
+ margin: 0;
82
+ }
83
+ }
84
+
85
+ // THIS IS BASICALLY THE DROPDOWN
86
+ igc-select::part(base) {
87
+ border: var(--igd-app-outline);
88
+ box-shadow:
89
+ 0 10px 15px -3px rgb(0 0 0 / 0.1),
90
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
91
+ }
92
+
93
+ igc-icon-button[variant='outlined'] {
94
+ --foreground: light-dark(var(--ig-gray-900), var(--ig-gray-700));
95
+ --hover-foreground: var(--igd-accent);
96
+ --focus-foreground: var(--igd-accent);
97
+ --active-foreground: var(--igd-accent);
98
+ --focus-hover-foreground: var(--igd-accent);
99
+
100
+ --hover-background: transparent;
101
+ --focus-background: transparent;
102
+ --active-background: transparent;
103
+ --focus-hover-background: transparent;
104
+ --focus-visible-background: transparent;
105
+
106
+ --border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
107
+ --focus-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
108
+ --hover-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
109
+ --border-radius: var(--igd-border-radius-xl);
110
+
111
+ &::part(base) {
112
+ &::after {
113
+ display: none;
114
+ }
115
+
116
+ // TODO the icon color is not changing on hover, focus, active states, log an issue in the library
117
+ &:hover,
118
+ &:focus {
119
+ --foreground: var(--igd-accent);
120
+ }
121
+ }
122
+ }
123
+
124
+ igc-button[variant='outlined'] {
125
+ &::part(base) {
126
+ --border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
127
+ --hover-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
128
+ --focus-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-200));
129
+ --focus-visible-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-700));
130
+ --active-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-700));
131
+
132
+ --foreground: light-dark(var(--ig-gray-900), var(--ig-gray-700));
133
+ --hover-foreground: var(--igd-accent);
134
+ --focus-foreground: var(--igd-accent);
135
+ --active-foreground: var(--igd-accent);
136
+ --focus-hover-foreground: var(--igd-accent);
137
+ --focus-visible-foreground: var(--igd-accent);
138
+
139
+ --icon-color: light-dark(var(--ig-gray-900), var(--ig-gray-200));
140
+ --icon-color-hover: var(--igd-accent);
141
+
142
+ --hover-background: transparent;
143
+ --focus-background: transparent;
144
+ --active-background: transparent;
145
+ --focus-hover-background: transparent;
146
+ --focus-visible-background: transparent;
147
+
148
+ --border-radius: var(--igd-border-radius-xl);
149
+
150
+ &::after {
151
+ display: none;
152
+ }
153
+ }
154
+ }
155
+ }