igniteui-astro-components 0.0.8 → 0.0.10

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 (30) hide show
  1. package/package.json +1 -1
  2. package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +3 -3
  3. package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +12 -3
  4. package/src/components/DocsSidebar/DocsSidebar.astro +5 -1
  5. package/src/components/DocsSidebar/DocsSidebar.scss +27 -40
  6. package/src/components/DocsSidebar/SidebarFilterInput.astro +3 -4
  7. package/src/components/DocsSidebar/SidebarFilterInput.scss +2 -3
  8. package/src/components/DocsSubHeader/DocsSubHeader.astro +16 -7
  9. package/src/components/DocsSubHeader/DocsSubHeader.scss +32 -35
  10. package/src/components/DocsToc/DocsToc.astro +10 -5
  11. package/src/components/DocsToc/DocsToc.scss +10 -11
  12. package/src/components/DocsTree/docs-tree.scss +16 -9
  13. package/src/components/MobileTocToggle/MobileTocToggle.astro +96 -0
  14. package/src/components/MobileTocToggle/MobileTocToggle.scss +74 -0
  15. package/src/components/Search/Search.astro +13 -9
  16. package/src/components/Search/Search.scss +13 -0
  17. package/src/components/SearchAdvanced/SearchAdvanced.astro +17 -3
  18. package/src/components/SearchAdvanced/SearchAdvanced.scss +170 -139
  19. package/src/components/mdx/DocsAside/DocsAside.scss +11 -28
  20. package/src/components/mdx/Sample/Sample.scss +3 -3
  21. package/src/layouts/DocsLayout/DocsLayout.astro +24 -6
  22. package/src/layouts/DocsLayout/DocsLayout.scss +241 -81
  23. package/src/styles/global/_breakpoints.scss +15 -37
  24. package/src/styles/global/_component-themes.scss +8 -27
  25. package/src/styles/global/_markdown.scss +514 -452
  26. package/src/styles/global/_palette.scss +8 -7
  27. package/src/styles/global/_search-shared.scss +63 -64
  28. package/src/styles/global/_type-scale.scss +2 -2
  29. package/src/styles/global/_variables.scss +8 -21
  30. package/src/styles/theme.scss +26 -8
@@ -123,16 +123,17 @@ $dark-palette: (
123
123
  );
124
124
 
125
125
  [data-theme='light'] {
126
- color-scheme: light;
127
- --igd-scrollbar-thumb: var(--ig-gray-300);
128
- --igd-scrollbar-track: transparent;
129
126
  @include palette($light-palette);
127
+ --igd-scrollbar-thumb: var(--ig-gray-300);
128
+ --igd-scrollbar-track:transparent;
129
+
130
+ color-scheme: light;
130
131
  }
131
132
 
132
133
  [data-theme='dark'] {
133
- color-scheme: dark;
134
- --igd-scrollbar-thumb: rgba(255, 255, 255, 0.25);
135
- --igd-scrollbar-track: rgba(255, 255, 255, 0.05);
136
-
137
134
  @include palette($dark-palette);
135
+ --igd-scrollbar-thumb: var(--ig-gray-300);
136
+ --igd-scrollbar-track: transparent;
137
+
138
+ color-scheme: dark;
138
139
  }
@@ -1,11 +1,10 @@
1
- @use '../../styles/global/breakpoints' as *;
2
1
  @use 'igniteui-theming/sass/typography' as *;
3
2
 
4
- // ── Trigger button ─────────────────────────────────────────────────────────
3
+ @layer components {
5
4
 
6
5
  .search-trigger {
7
6
  --ig-size: 1;
8
-
7
+
9
8
  width: 100%;
10
9
  max-width: rem(330px);
11
10
  display: flex;
@@ -16,104 +15,95 @@
16
15
  padding-inline: var(--igd-padding-sm);
17
16
  gap: rem(8px);
18
17
  white-space: nowrap;
19
-
18
+
20
19
  // Override native button styles
21
20
  background-color: transparent;
22
21
  box-shadow: none;
23
-
22
+
24
23
  &:focus-visible {
25
24
  outline: none;
26
25
  box-shadow: inset 0 0 0 1px var(--igd-accent);
27
26
  }
28
-
29
- @media (max-width: #{$bp-tablet-max}) {
30
- max-width: none;
31
- width: auto;
32
- border-inline-end: none;
33
- }
34
27
  }
35
28
 
36
29
  .search-trigger__hint {
30
+ @include type-style('subtitle-1') {
31
+ margin: 0;
32
+ };
33
+
34
+ display: flex;
35
+ align-items: center;
36
+ margin-inline-start: auto;
37
+ gap: rem(4px);
37
38
  background: transparent;
38
39
  box-shadow: none;
39
40
  border: none;
40
-
41
+
41
42
  kbd {
42
43
  @include type-style('subtitle-1') {
43
44
  margin: 0;
44
45
  };
45
-
46
+
46
47
  background: transparent;
47
48
  box-shadow: none;
48
49
  border: none;
49
- color: var(--ig-gray-500);
50
+ color: light-dark(var(--ig-gray-600), var(--ig-gray-400));
50
51
  }
51
52
  }
52
53
 
53
- .search-trigger__label,
54
- .search-trigger__hint {
55
- @media (max-width: #{$bp-tablet-max}) {
56
- display: none;
57
- }
58
- }
59
-
60
- .search-trigger__hint {
61
- @include type-style('subtitle-1') {
62
- margin: 0;
63
- };
64
-
65
- display: flex;
66
- align-items: center;
67
- margin-inline-start: auto;
68
- gap: rem(4px);
69
- }
70
-
71
54
  .search-trigger__label {
72
55
  @include type-style('body-2') {
73
56
  margin: 0;
74
57
  };
75
-
58
+
76
59
  color: var(--ig-gray-600);
77
60
  }
78
61
 
79
- // ── Shared dialog mixins ───────────────────────────────────────────────────
62
+ // Close button — hidden by default; DocsLayout.scss reveals it on mobile.
63
+ .search-trigger.search-close {
64
+ display: none;
65
+ color: light-dark(var(--ig-gray-600), var(--ig-gray-400));
66
+
67
+ border-inline-start: rem(1px) solid light-dark(var(--ig-gray-400), var(--ig-gray-300));
68
+ border-inline-end: 0;
69
+
70
+ igc-icon {
71
+ --size: #{rem(32px)};
72
+ }
73
+ }
80
74
 
81
- /// Sizing/position for both igc-dialog::part(base) and native <dialog>.
75
+ } // close first @layer components block (mixin definitions stay un-nested below)
76
+
77
+ // Centered-card sizing for both igc-dialog::part(base) and native <dialog>.
78
+ // DocsLayout.scss flips this to fullscreen on mobile.
82
79
  @mixin search-dialog-base-styles {
83
- margin: 0;
80
+ margin: auto;
84
81
  padding: 0;
85
- width: 100%;
86
- max-width: 100%;
87
- height: 100dvh;
88
- max-height: 100dvh;
82
+ width: 90%;
83
+ max-width: rem(672px);
84
+ height: calc(100vh - #{rem(128px)});
85
+ max-height: rem(768px);
89
86
  box-shadow: none;
90
87
  border: none;
91
-
92
- @media (min-width: 50rem) {
93
- margin: auto;
94
- width: 90%;
95
- max-width: 42rem;
96
- height: calc(100vh - 8rem);
97
- max-height: 48rem;
98
- border-radius: 0;
99
- }
88
+ border-radius: 0;
100
89
  }
101
90
 
102
91
  /// Backdrop base state (before open animation).
103
92
  @mixin search-dialog-backdrop {
104
- background-color: light-dark(var(--ig-gray-800), var(--ig-gray-800));
93
+ background-color: light-dark(var(--ig-gray-800), var(--ig-gray-50));
105
94
  will-change: backdrop-filter, opacity;
106
95
  }
107
96
 
108
- /// Backdrop visible/open state.
97
+ // Backdrop visible/open state.
109
98
  @mixin search-dialog-backdrop-open {
110
99
  opacity: .6;
111
100
  -webkit-backdrop-filter: blur(10px);
112
101
  backdrop-filter: blur(10px);
113
102
  }
114
103
 
115
- // ── Shared dialog chrome ───────────────────────────────────────────────────
104
+ @layer components {
116
105
 
106
+ // Shared dialog chrome
117
107
  [data-search-modal-open] { overflow: hidden; }
118
108
 
119
109
  .igd-search-shell {
@@ -125,7 +115,7 @@
125
115
  border-radius: 0;
126
116
  }
127
117
 
128
- /* ── Status ─────────────────────────────────────────────────────────────── */
118
+ // Status
129
119
  .igd-search-status {
130
120
  @include type-style('overline') {
131
121
  margin: 0;
@@ -143,11 +133,13 @@
143
133
  color: var(--igd-accent);
144
134
  }
145
135
 
146
- /* ── Results ─────────────────────────────────────────────────────────────── */
136
+ // Results
147
137
  .igd-search-results {
148
138
  --background: transparent;
149
139
 
150
- gap: rem(16px);
140
+ position: relative;
141
+
142
+ gap: rem(8px);
151
143
 
152
144
  igc-list-item {
153
145
  --item-border-radius: 0;
@@ -166,12 +158,10 @@
166
158
  }
167
159
 
168
160
  &:last-of-type {
169
- margin-block-end: 0;
161
+ padding-block-end: 0;
170
162
  }
171
- }
172
-
173
- .igd-search-results {
174
- margin-block-end: rem(26px);
163
+
164
+ padding-inline: rem(26px);
175
165
  }
176
166
 
177
167
  .igd-search-results,
@@ -206,7 +196,7 @@
206
196
  margin: 0;
207
197
  }
208
198
 
209
- color: light-dark(var(--ig-gray-900), var(--ig-gray-300));
199
+ color: light-dark(var(--ig-gray-900), var(--ig-gray-600));
210
200
 
211
201
  mark {
212
202
  background: transparent;
@@ -228,7 +218,7 @@
228
218
  background: light-dark(var(--ig-gray-200), #112031);
229
219
  }
230
220
 
231
- /* ── Category header (above each result list in the All tab) ─────────────── */
221
+ // Category header (above each result list in the All tab)
232
222
  .igd-search-category-header {
233
223
  @include type-style('detail-2', false) {
234
224
  margin: 0;
@@ -237,6 +227,7 @@
237
227
  display: inline-block;
238
228
  color: light-dark(var(--ig-gray-900), var(--ig-gray-300));
239
229
  margin-block-end: rem(16px);
230
+ padding-inline: rem(26px);
240
231
  }
241
232
 
242
233
  .igd-search-more-btn {
@@ -249,7 +240,8 @@
249
240
  --hover-foreground: var(--igd-accent);
250
241
  --focus-background: transparent;
251
242
  --focus-foreground: var(--igd-accent);
252
- --active-foreground: transparent;
243
+ --active-foreground: var(--igd-accent);
244
+ --active-background: transparent;
253
245
  --focus-hover-background: var(--igd-accent);
254
246
  --focus-hover-foreground: transparent;
255
247
  --focus-visible-foreground: var(--igd-accent);
@@ -268,6 +260,13 @@
268
260
 
269
261
  display: flex;
270
262
  justify-self: center;
271
- margin-block-end: rem(36px);
263
+
264
+ margin-block-start: rem(26px);
272
265
  }
273
266
 
267
+ .igd-search-meta {
268
+ color: light-dark(var(--ig-gray-900), var(--ig-gray-300));
269
+ }
270
+
271
+ } // close second @layer components block
272
+
@@ -34,7 +34,7 @@ $h3: type-style(
34
34
 
35
35
  $h4: type-style(
36
36
  $font-size: rem(20px),
37
- $font-weight: 400,
37
+ $font-weight: 500,
38
38
  $letter-spacing: normal,
39
39
  $line-height: rem(20px),
40
40
  $text-transform: none,
@@ -104,7 +104,7 @@ $detail-2: type-style(
104
104
 
105
105
  $subtitle-1: type-style(
106
106
  $font-size: rem(16px),
107
- $font-weight: 400,
107
+ $font-weight: 500,
108
108
  $letter-spacing: 0.15px,
109
109
  $line-height: rem(24px),
110
110
  $text-transform: none,
@@ -1,6 +1,5 @@
1
1
  @use 'igniteui-theming/sass/typography' as *;
2
2
  @use 'palette' as *;
3
- @use 'breakpoints' as *;
4
3
 
5
4
  /* ============================================================
6
5
  CSS Custom Properties
@@ -31,26 +30,15 @@
31
30
 
32
31
  --igd-sidebar-spacing: #{rem(46px)} #{rem(24px)};
33
32
 
34
- --igd-header-height: #{rem(50px)};
35
-
36
- @media (min-width: #{$bp-tablet-max}) {
37
- --igd-header-height: #{rem(75px)};
38
- }
39
-
33
+ // Desktop default. DocsLayout.scss overrides to 50px on mobile + tablet.
34
+ --igd-header-height: #{rem(75px)};
35
+
40
36
  --sticky-sidebar-top: 0;
41
-
37
+
42
38
  --igd-members-spacing: var(--igd-border-radius) #{rem(16px)};
43
-
44
- --igd-page-layout-grid: #{minmax(rem(300px), rem(400px)) 1fr};
45
-
46
- @media (max-width: #{$bp-sidebar-max}) {
47
- --igd-page-layout-grid: #{minmax(rem(180px), rem(260px)) 1fr};
48
- }
49
39
 
50
- @media (max-width: #{$bp-desktop-min}) {
51
- --igd-page-padding: #{rem(36px)};
52
- }
53
-
40
+ --igd-page-layout-grid: #{minmax(rem(200px), rem(340px)) 1fr};
41
+
54
42
  --igd-page-padding: #{rem(50px)};
55
43
 
56
44
  // Padding
@@ -97,7 +85,6 @@
97
85
  --igd-aside-info-border: light-dark(var(--ig-primary-700), var(--ig-primary-400));
98
86
  --igd-aside-info-code-background: light-dark(var(--ig-primary-100), var(--ig-primary-900));
99
87
 
100
-
101
88
  --igd-aside-warning-title: light-dark(var(--ig-secondary-700), var(--ig-secondary-400));
102
89
  --igd-aside-warning-content: light-dark(var(--ig-secondary-700), var(--ig-secondary-300));
103
90
  --igd-aside-warning-icon: light-dark(var(--ig-secondary-700), var(--ig-secondary-400));
@@ -116,11 +103,11 @@
116
103
  // TABLES
117
104
  --igd-table-max-height: #{rem(350px)};
118
105
  --igd-table-pinned-border-size: #{rem(1px)};
119
- --igd-table-fg: light-dark(var(--ig-gray-900), var(--ig-gray-900));
106
+ --igd-table-fg: light-dark(var(--ig-gray-700), var(--ig-gray-500));
120
107
  --igd-table-bg: var(--igd-layout-sections-bg);
121
108
  --igd-tabe-even-row-bg: var(--igd-table-bg);
122
109
  --igd-table-border-color: light-dark(var(--ig-gray-200), var(--ig-gray-200));
123
110
 
124
111
  --igd-table-header-bg: var(--igd-layout-sections-bg);
125
- --igd-table-header-fg: light-dark(var(--ig-gray-900), var(--ig-gray-400));
112
+ --igd-table-header-fg: light-dark(var(--ig-gray-900), var(--ig-gray-700));
126
113
  }
@@ -10,18 +10,23 @@
10
10
  // still create the layer on first encounter, but the ORDER would be undefined
11
11
  // relative to our own unlayered rules — meaning Bootstrap could win.
12
12
  //
13
- // By declaring the layer order here (before any Bootstrap stylesheet loads)
14
- // we guarantee that ANY unlayered rule — all of our ig-theme.scss /
15
- // DocsLayout.scss styles — wins over everything inside the bootstrap layer,
16
- // regardless of selector specificity.
13
+ // `components` holds every component-level stylesheet (DocsSubHeader, Search,
14
+ // DocsSidebar, …). The layout-level overrides in DocsLayout.scss stay
15
+ // UNLAYERED so they always beat component base styles regardless of import
16
+ // order and even when component selectors have higher specificity.
17
17
  //
18
18
  // Rule: lower layers lose to higher layers, and unlayered rules beat all layers.
19
- @layer bootstrap;
19
+ @layer bootstrap, components;
20
20
 
21
21
  // Restore browser default (16px). Bootstrap 3 sets html { font-size: 10px }
22
22
  // inside @layer(bootstrap) which would break all rem-based sizing without this.
23
23
  html {
24
24
  font-size: 16px;
25
+ background: var(--igd-app-bg);
26
+ }
27
+
28
+ body {
29
+ scrollbar-gutter: stable;
25
30
  }
26
31
 
27
32
  // Define font CSS custom properties so components can reference or override them.
@@ -112,10 +117,23 @@ igc-icon {
112
117
  border-radius: rem(5px);
113
118
  }
114
119
 
115
- // Explicit dark-mode overrides — bypass CSS variable resolution issues in
120
+ // Explicit theme overrides — bypass CSS variable resolution issues in
116
121
  // ::-webkit-scrollbar pseudo-elements.
117
- // html[data-theme='dark'] targets the document scrollbar (html is the scroller).
118
- // [data-theme='dark'] ::-webkit-scrollbar-* targets inner scrollable elements.
122
+ // html[data-theme='...'] targets the document scrollbar (html is the scroller).
123
+ // [data-theme='...'] ::-webkit-scrollbar-* targets inner scrollable elements.
124
+
125
+ // Light
126
+ html[data-theme='light']::-webkit-scrollbar-track,
127
+ [data-theme='light'] ::-webkit-scrollbar-track {
128
+ background-color: rgba(0, 0, 0, 0.05);
129
+ }
130
+
131
+ html[data-theme='light']::-webkit-scrollbar-thumb,
132
+ [data-theme='light'] ::-webkit-scrollbar-thumb {
133
+ background-color: rgba(0, 0, 0, 0.25);
134
+ }
135
+
136
+ // Dark
119
137
  html[data-theme='dark']::-webkit-scrollbar-track,
120
138
  [data-theme='dark'] ::-webkit-scrollbar-track {
121
139
  background-color: rgba(255, 255, 255, 0.05);