@gv-tech/ui-core 2.15.2 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.d.ts +71 -0
- package/package.json +1 -1
- package/src/contracts/scroll-to-top.ts +25 -0
- package/src/contracts/table-of-contents.ts +50 -0
- package/src/index.ts +12 -0
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -555,6 +555,12 @@ export declare interface FormMessageBaseProps {
|
|
|
555
555
|
children?: React_2.ReactNode;
|
|
556
556
|
}
|
|
557
557
|
|
|
558
|
+
export declare interface HeadingItem {
|
|
559
|
+
id: string;
|
|
560
|
+
text: string;
|
|
561
|
+
level: number;
|
|
562
|
+
}
|
|
563
|
+
|
|
558
564
|
export declare interface HoverCardBaseProps {
|
|
559
565
|
children?: React_2.ReactNode;
|
|
560
566
|
open?: boolean;
|
|
@@ -859,6 +865,32 @@ export declare interface ScrollBarBaseProps {
|
|
|
859
865
|
forceMount?: true;
|
|
860
866
|
}
|
|
861
867
|
|
|
868
|
+
export declare interface ScrollToTopBaseProps {
|
|
869
|
+
/**
|
|
870
|
+
* Number of pixels that must be scrolled before the control appears.
|
|
871
|
+
*
|
|
872
|
+
* @default 240
|
|
873
|
+
*/
|
|
874
|
+
threshold?: number;
|
|
875
|
+
/**
|
|
876
|
+
* Delay in milliseconds before the page scroll-to-top is triggered,
|
|
877
|
+
* allowing the exit animation to complete first.
|
|
878
|
+
*
|
|
879
|
+
* @default 450
|
|
880
|
+
*/
|
|
881
|
+
exitDuration?: number;
|
|
882
|
+
/**
|
|
883
|
+
* Scroll behavior used when returning to the top.
|
|
884
|
+
*
|
|
885
|
+
* @default 'smooth'
|
|
886
|
+
*/
|
|
887
|
+
behavior?: ScrollBehavior;
|
|
888
|
+
/** Optional className for custom positioning and styling. */
|
|
889
|
+
className?: string;
|
|
890
|
+
/** Accessible label for the control. */
|
|
891
|
+
label?: string;
|
|
892
|
+
}
|
|
893
|
+
|
|
862
894
|
export declare interface SearchBaseProps {
|
|
863
895
|
children?: React_2.ReactNode;
|
|
864
896
|
open?: boolean;
|
|
@@ -1082,6 +1114,45 @@ export declare interface TableHeaderBaseProps {
|
|
|
1082
1114
|
children?: React_2.ReactNode;
|
|
1083
1115
|
}
|
|
1084
1116
|
|
|
1117
|
+
export declare interface TableOfContentsBaseProps {
|
|
1118
|
+
/**
|
|
1119
|
+
* Optional custom class name.
|
|
1120
|
+
*/
|
|
1121
|
+
className?: string;
|
|
1122
|
+
/**
|
|
1123
|
+
* Optional currently active heading ID to override the intersection observer.
|
|
1124
|
+
*/
|
|
1125
|
+
activeId?: string;
|
|
1126
|
+
/**
|
|
1127
|
+
* Optional minimum heading level to include.
|
|
1128
|
+
* Default: 1 (h1)
|
|
1129
|
+
*/
|
|
1130
|
+
minLevel?: number;
|
|
1131
|
+
/**
|
|
1132
|
+
* Optional maximum heading level to include.
|
|
1133
|
+
* Default: 3 (h3)
|
|
1134
|
+
*/
|
|
1135
|
+
maxLevel?: number;
|
|
1136
|
+
/**
|
|
1137
|
+
* The selector used to query the DOM for headings.
|
|
1138
|
+
* Default: "h1, h2, h3, h4, h5, h6"
|
|
1139
|
+
*/
|
|
1140
|
+
selector?: string;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
export declare interface TableOfContentsContentBaseProps {
|
|
1144
|
+
children: React_2.ReactNode;
|
|
1145
|
+
className?: string;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
export declare interface TableOfContentsListBaseProps {
|
|
1149
|
+
className?: string;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
export declare interface TableOfContentsRootBaseProps extends TableOfContentsBaseProps {
|
|
1153
|
+
children: React_2.ReactNode;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1085
1156
|
export declare interface TableRowBaseProps {
|
|
1086
1157
|
className?: string;
|
|
1087
1158
|
children?: React_2.ReactNode;
|
package/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface ScrollToTopBaseProps {
|
|
2
|
+
/**
|
|
3
|
+
* Number of pixels that must be scrolled before the control appears.
|
|
4
|
+
*
|
|
5
|
+
* @default 240
|
|
6
|
+
*/
|
|
7
|
+
threshold?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Delay in milliseconds before the page scroll-to-top is triggered,
|
|
10
|
+
* allowing the exit animation to complete first.
|
|
11
|
+
*
|
|
12
|
+
* @default 450
|
|
13
|
+
*/
|
|
14
|
+
exitDuration?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Scroll behavior used when returning to the top.
|
|
17
|
+
*
|
|
18
|
+
* @default 'smooth'
|
|
19
|
+
*/
|
|
20
|
+
behavior?: ScrollBehavior;
|
|
21
|
+
/** Optional className for custom positioning and styling. */
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Accessible label for the control. */
|
|
24
|
+
label?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TableOfContentsBaseProps {
|
|
4
|
+
/**
|
|
5
|
+
* Optional custom class name.
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Optional currently active heading ID to override the intersection observer.
|
|
11
|
+
*/
|
|
12
|
+
activeId?: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Optional minimum heading level to include.
|
|
16
|
+
* Default: 1 (h1)
|
|
17
|
+
*/
|
|
18
|
+
minLevel?: number;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Optional maximum heading level to include.
|
|
22
|
+
* Default: 3 (h3)
|
|
23
|
+
*/
|
|
24
|
+
maxLevel?: number;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The selector used to query the DOM for headings.
|
|
28
|
+
* Default: "h1, h2, h3, h4, h5, h6"
|
|
29
|
+
*/
|
|
30
|
+
selector?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface TableOfContentsRootBaseProps extends TableOfContentsBaseProps {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface TableOfContentsListBaseProps {
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface TableOfContentsContentBaseProps {
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface HeadingItem {
|
|
47
|
+
id: string;
|
|
48
|
+
text: string;
|
|
49
|
+
level: number;
|
|
50
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -230,6 +230,9 @@ export type {
|
|
|
230
230
|
// Scroll Area
|
|
231
231
|
export type { ScrollAreaBaseProps, ScrollBarBaseProps } from './contracts/scroll-area';
|
|
232
232
|
|
|
233
|
+
// Scroll To Top
|
|
234
|
+
export type { ScrollToTopBaseProps } from './contracts/scroll-to-top';
|
|
235
|
+
|
|
233
236
|
// Search
|
|
234
237
|
export type { SearchBaseProps, SearchTriggerBaseProps } from './contracts/search';
|
|
235
238
|
|
|
@@ -325,3 +328,12 @@ export type { ThemeToggleBaseProps } from './contracts/theme-toggle';
|
|
|
325
328
|
|
|
326
329
|
// Toaster
|
|
327
330
|
export type { ToasterBaseProps } from './contracts/toaster';
|
|
331
|
+
|
|
332
|
+
// TableOfContents
|
|
333
|
+
export type {
|
|
334
|
+
HeadingItem,
|
|
335
|
+
TableOfContentsBaseProps,
|
|
336
|
+
TableOfContentsContentBaseProps,
|
|
337
|
+
TableOfContentsListBaseProps,
|
|
338
|
+
TableOfContentsRootBaseProps,
|
|
339
|
+
} from './contracts/table-of-contents';
|