@nimbus-ds/components 5.29.0-rc.1 → 5.29.1-rc.1
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/CHANGELOG.md +1 -1
- package/dist/Accordion/index.d.ts +136 -0
- package/dist/Alert/index.d.ts +60 -0
- package/dist/Badge/index.d.ts +55 -0
- package/dist/Box/index.d.ts +779 -0
- package/dist/Button/index.d.ts +83 -0
- package/dist/CHANGELOG.md +1 -1
- package/dist/Card/index.d.ts +153 -0
- package/dist/Checkbox/index.d.ts +62 -0
- package/dist/Chip/index.d.ts +59 -0
- package/dist/Collapsible/index.d.ts +45 -0
- package/dist/Divider/index.d.ts +30 -0
- package/dist/FileUploader/index.d.ts +98 -0
- package/dist/Icon/index.d.ts +120 -0
- package/dist/IconButton/index.d.ts +170 -0
- package/dist/Input/index.d.ts +76 -0
- package/dist/Label/index.d.ts +55 -0
- package/dist/Link/index.d.ts +115 -0
- package/dist/List/index.d.ts +75 -0
- package/dist/Modal/index.d.ts +232 -0
- package/dist/MultiSelect/index.d.ts +107 -0
- package/dist/Pagination/index.d.ts +41 -0
- package/dist/Popover/index.d.ts +165 -0
- package/dist/ProgressBar/index.d.ts +57 -0
- package/dist/Radio/index.d.ts +62 -0
- package/dist/ScrollPane/index.d.ts +893 -0
- package/dist/SegmentedControl/index.d.ts +879 -0
- package/dist/Select/index.d.ts +87 -0
- package/dist/Sidebar/index.d.ts +390 -0
- package/dist/Sidebar/index.js +1 -1
- package/dist/Skeleton/index.d.ts +31 -0
- package/dist/Spinner/index.d.ts +53 -0
- package/dist/Stepper/index.d.ts +873 -0
- package/dist/Table/index.d.ts +123 -0
- package/dist/Tabs/index.d.ts +92 -0
- package/dist/Tag/index.d.ts +51 -0
- package/dist/Text/index.d.ts +508 -0
- package/dist/Textarea/index.d.ts +71 -0
- package/dist/Thumbnail/index.d.ts +73 -0
- package/dist/Title/index.d.ts +164 -0
- package/dist/Toast/index.d.ts +56 -0
- package/dist/Toggle/index.d.ts +48 -0
- package/dist/Tooltip/index.d.ts +46 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v7.2.0
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
5
|
+
|
|
6
|
+
export interface Conditions<T> {
|
|
7
|
+
xs?: T;
|
|
8
|
+
md?: T;
|
|
9
|
+
lg?: T;
|
|
10
|
+
xl?: T;
|
|
11
|
+
}
|
|
12
|
+
declare const propertiesModal: {
|
|
13
|
+
padding: {
|
|
14
|
+
base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
15
|
+
small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
16
|
+
none: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type PaddingProperties = keyof typeof propertiesModal.padding;
|
|
20
|
+
export interface ModalSprinkle {
|
|
21
|
+
/**
|
|
22
|
+
* The maxWidth property specifies the maxWidth of a modal's content area. The width of the modal will be defined by the width of the content in this prop.
|
|
23
|
+
* @default { xs: "100%", md: "500px" }
|
|
24
|
+
*/
|
|
25
|
+
maxWidth?: string | Conditions<string>;
|
|
26
|
+
/**
|
|
27
|
+
* The padding properties are used to generate space around an modal's content area.
|
|
28
|
+
* @default base
|
|
29
|
+
*/
|
|
30
|
+
padding?: PaddingProperties | Conditions<PaddingProperties>;
|
|
31
|
+
}
|
|
32
|
+
declare const modal: {
|
|
33
|
+
classnames: {
|
|
34
|
+
overlay: string;
|
|
35
|
+
overlayScoped: string;
|
|
36
|
+
container: string;
|
|
37
|
+
container__close: string;
|
|
38
|
+
container__footer: string;
|
|
39
|
+
};
|
|
40
|
+
subComponents: {
|
|
41
|
+
header: {
|
|
42
|
+
sprinkle: ((props: {
|
|
43
|
+
padding?: "small" | "none" | "base" | undefined;
|
|
44
|
+
}) => string) & {
|
|
45
|
+
properties: Set<"padding">;
|
|
46
|
+
};
|
|
47
|
+
properties: {
|
|
48
|
+
padding: {
|
|
49
|
+
base: string;
|
|
50
|
+
small: string;
|
|
51
|
+
none: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
body: {
|
|
56
|
+
sprinkle: ((props: {
|
|
57
|
+
padding?: "small" | "none" | "base" | undefined;
|
|
58
|
+
}) => string) & {
|
|
59
|
+
properties: Set<"padding">;
|
|
60
|
+
};
|
|
61
|
+
properties: {
|
|
62
|
+
padding: {
|
|
63
|
+
base: string;
|
|
64
|
+
small: string;
|
|
65
|
+
none: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
footer: {
|
|
70
|
+
sprinkle: ((props: {
|
|
71
|
+
padding?: "small" | "none" | "base" | undefined;
|
|
72
|
+
}) => string) & {
|
|
73
|
+
properties: Set<"padding">;
|
|
74
|
+
};
|
|
75
|
+
properties: {
|
|
76
|
+
padding: {
|
|
77
|
+
base: string;
|
|
78
|
+
small: string;
|
|
79
|
+
none: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
sprinkle: import("rainbow-sprinkles/dist/declarations/src/createRuntimeFn").SprinklesFn<[
|
|
85
|
+
{
|
|
86
|
+
config: {
|
|
87
|
+
maxWidth: {
|
|
88
|
+
dynamic: {
|
|
89
|
+
default: string;
|
|
90
|
+
conditions: Record<"xs" | "md" | "lg" | "xl", string>;
|
|
91
|
+
};
|
|
92
|
+
dynamicScale: true;
|
|
93
|
+
name: "maxWidth";
|
|
94
|
+
vars: {
|
|
95
|
+
default: string;
|
|
96
|
+
conditions: Record<"xs" | "md" | "lg" | "xl", string>;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
padding: {
|
|
100
|
+
dynamic: {
|
|
101
|
+
default: string;
|
|
102
|
+
conditions: Record<"xs" | "md" | "lg" | "xl", string>;
|
|
103
|
+
};
|
|
104
|
+
dynamicScale: {
|
|
105
|
+
base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
106
|
+
small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
107
|
+
none: string;
|
|
108
|
+
};
|
|
109
|
+
name: "padding";
|
|
110
|
+
vars: {
|
|
111
|
+
default: string;
|
|
112
|
+
conditions: Record<"xs" | "md" | "lg" | "xl", string>;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
} & {
|
|
117
|
+
config: {
|
|
118
|
+
[x: string]: {
|
|
119
|
+
mappings: ("maxWidth" | "padding")[];
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
]>;
|
|
124
|
+
properties: {
|
|
125
|
+
padding: {
|
|
126
|
+
base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
127
|
+
small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
128
|
+
none: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
export type CloseOnOutsidePress = (event: PointerEvent | MouseEvent) => boolean;
|
|
133
|
+
export interface ModalBodyProperties {
|
|
134
|
+
/**
|
|
135
|
+
* The content of the modal body.
|
|
136
|
+
* @TJS-type React.ReactNode
|
|
137
|
+
*/
|
|
138
|
+
children: ReactNode;
|
|
139
|
+
/**
|
|
140
|
+
* The padding properties are used to generate space around an modal's body content area.
|
|
141
|
+
* @default none
|
|
142
|
+
*/
|
|
143
|
+
padding?: keyof typeof modal.subComponents.body.properties.padding;
|
|
144
|
+
}
|
|
145
|
+
export type ModalBodyProps = ModalBodyProperties & HTMLAttributes<HTMLElement>;
|
|
146
|
+
export declare const ModalBody: React.FC<ModalBodyProps>;
|
|
147
|
+
export interface ModalFooterProperties {
|
|
148
|
+
/**
|
|
149
|
+
* The content of the modal footer.
|
|
150
|
+
* @TJS-type React.ReactNode
|
|
151
|
+
*/
|
|
152
|
+
children: ReactNode;
|
|
153
|
+
/**
|
|
154
|
+
* The padding properties are used to generate space around an modal's footer content area.
|
|
155
|
+
* @default none
|
|
156
|
+
*/
|
|
157
|
+
padding?: keyof typeof modal.subComponents.footer.properties.padding;
|
|
158
|
+
}
|
|
159
|
+
export type ModalFooterProps = ModalFooterProperties & HTMLAttributes<HTMLElement>;
|
|
160
|
+
export declare const ModalFooter: React.FC<ModalFooterProps>;
|
|
161
|
+
export interface ModalHeaderProperties {
|
|
162
|
+
/**
|
|
163
|
+
* The content of the modal header.
|
|
164
|
+
* @TJS-type React.ReactNode
|
|
165
|
+
*/
|
|
166
|
+
children?: ReactNode;
|
|
167
|
+
/**
|
|
168
|
+
* The title to display in the modal header.
|
|
169
|
+
*/
|
|
170
|
+
title?: string;
|
|
171
|
+
/**
|
|
172
|
+
* The padding properties are used to generate space around an modal's header content area.
|
|
173
|
+
* @default none
|
|
174
|
+
*/
|
|
175
|
+
padding?: keyof typeof modal.subComponents.header.properties.padding;
|
|
176
|
+
}
|
|
177
|
+
export type ModalHeaderProps = ModalHeaderProperties & HTMLAttributes<HTMLElement>;
|
|
178
|
+
export declare const ModalHeader: React.FC<ModalHeaderProps>;
|
|
179
|
+
export interface ModalComponents {
|
|
180
|
+
Body: typeof ModalBody;
|
|
181
|
+
Footer: typeof ModalFooter;
|
|
182
|
+
Header: typeof ModalHeader;
|
|
183
|
+
}
|
|
184
|
+
export interface ModalProperties extends ModalSprinkle {
|
|
185
|
+
/**
|
|
186
|
+
* The content of the modal.
|
|
187
|
+
* @TJS-type React.ReactNode
|
|
188
|
+
*/
|
|
189
|
+
children: ReactNode;
|
|
190
|
+
/**
|
|
191
|
+
* Whether the modal is open or not.
|
|
192
|
+
*/
|
|
193
|
+
open: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Callback fired when the component requests to be closed.
|
|
196
|
+
* @TJS-type (open: boolean) => void;
|
|
197
|
+
*/
|
|
198
|
+
onDismiss?: (open: boolean) => void;
|
|
199
|
+
/**
|
|
200
|
+
* Id to be embedded in the portal element
|
|
201
|
+
*/
|
|
202
|
+
portalId?: string;
|
|
203
|
+
/**
|
|
204
|
+
* Controls whether clicking/pressing outside should close the modal.
|
|
205
|
+
* - boolean: enable/disable dismissal on outside press
|
|
206
|
+
* - function: receive the DOM event and return true to allow closing, false to ignore
|
|
207
|
+
*
|
|
208
|
+
* Defaults to true.
|
|
209
|
+
*/
|
|
210
|
+
closeOnOutsidePress?: boolean | CloseOnOutsidePress;
|
|
211
|
+
/**
|
|
212
|
+
* The attribute name to ignore when checking for outside clicks. Useful to
|
|
213
|
+
* mark regions (e.g., a chat) that should not close the modal when clicked.
|
|
214
|
+
* @default "data-nimbus-outside-press-ignore"
|
|
215
|
+
*/
|
|
216
|
+
ignoreAttributeName?: string;
|
|
217
|
+
/**
|
|
218
|
+
* The padding properties are used to generate space around an modal's content area.
|
|
219
|
+
* @default base
|
|
220
|
+
*/
|
|
221
|
+
padding?: keyof typeof modal.properties.padding;
|
|
222
|
+
}
|
|
223
|
+
export type ModalProps = ModalProperties & {
|
|
224
|
+
/**
|
|
225
|
+
* Root element where the portal should be mounted. When provided and not null,
|
|
226
|
+
* the portal renders inside this element; when null/undefined, the default root is used.
|
|
227
|
+
*/
|
|
228
|
+
root?: HTMLElement | null;
|
|
229
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
230
|
+
export declare const Modal: React.FC<ModalProps> & ModalComponents;
|
|
231
|
+
|
|
232
|
+
export {};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v7.2.0
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ComponentPropsWithRef, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
5
|
+
|
|
6
|
+
declare const multiSelect: {
|
|
7
|
+
sprinkle: ((props: {
|
|
8
|
+
zIndex?: "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | {
|
|
9
|
+
xs?: "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
|
|
10
|
+
md?: "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
|
|
11
|
+
lg?: "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
|
|
12
|
+
xl?: "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
|
|
13
|
+
} | undefined;
|
|
14
|
+
}) => string) & {
|
|
15
|
+
properties: Set<"zIndex">;
|
|
16
|
+
};
|
|
17
|
+
properties: {
|
|
18
|
+
zIndex: {
|
|
19
|
+
"100": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
20
|
+
"200": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
21
|
+
"300": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
22
|
+
"400": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
23
|
+
"500": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
24
|
+
"600": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
25
|
+
"700": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
26
|
+
"800": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
27
|
+
"900": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
classnames: {
|
|
31
|
+
appearance: Record<"success" | "warning" | "danger" | "neutral", string>;
|
|
32
|
+
container: string;
|
|
33
|
+
container__icon: string;
|
|
34
|
+
container__button: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export interface SkeletonProperties {
|
|
38
|
+
/**
|
|
39
|
+
* Width of the skeleton. Useful when the skeleton is inside an inline element with no width of its own.
|
|
40
|
+
*/
|
|
41
|
+
width: string;
|
|
42
|
+
/**
|
|
43
|
+
* Height of the skeleton. Useful when you don't want to adapt the skeleton to a text element but for instance a card.
|
|
44
|
+
*/
|
|
45
|
+
height: string;
|
|
46
|
+
/**
|
|
47
|
+
* The border radius of the skeleton.
|
|
48
|
+
*/
|
|
49
|
+
borderRadius?: string;
|
|
50
|
+
/**
|
|
51
|
+
* This is an attribute used to identify a DOM node for testing purposes.
|
|
52
|
+
*/
|
|
53
|
+
"data-testid"?: string;
|
|
54
|
+
}
|
|
55
|
+
export type SkeletonProps = SkeletonProperties & HTMLAttributes<HTMLDivElement>;
|
|
56
|
+
export type MultiSelectSkeletonProperties = Partial<Pick<SkeletonProps, "width" | "data-testid">>;
|
|
57
|
+
export type MultiSelectSkeletonProps = MultiSelectSkeletonProperties & HTMLAttributes<HTMLDivElement>;
|
|
58
|
+
export declare const MultiSelectSkeleton: React.FC<MultiSelectSkeletonProps>;
|
|
59
|
+
export interface MultiSelectComponents {
|
|
60
|
+
Skeleton: typeof MultiSelectSkeleton;
|
|
61
|
+
}
|
|
62
|
+
export interface MultiSelectOption {
|
|
63
|
+
/**
|
|
64
|
+
* Label for the option.
|
|
65
|
+
*/
|
|
66
|
+
label: string;
|
|
67
|
+
/**
|
|
68
|
+
* Value of the option
|
|
69
|
+
*/
|
|
70
|
+
value: string;
|
|
71
|
+
}
|
|
72
|
+
export interface MultiSelectProperties {
|
|
73
|
+
/**
|
|
74
|
+
* The name of the wrapper element or the select element when native.
|
|
75
|
+
*/
|
|
76
|
+
name: string;
|
|
77
|
+
/**
|
|
78
|
+
* The id of the wrapper element or the select element when native.
|
|
79
|
+
*/
|
|
80
|
+
id: string;
|
|
81
|
+
/**
|
|
82
|
+
* Change the visual style of the select.
|
|
83
|
+
* @default neutral
|
|
84
|
+
*/
|
|
85
|
+
appearance?: "success" | "warning" | "danger" | "neutral";
|
|
86
|
+
/**
|
|
87
|
+
* Options of the MultiSelect
|
|
88
|
+
*/
|
|
89
|
+
options: MultiSelectOption[];
|
|
90
|
+
/**
|
|
91
|
+
* Options of the MultiSelect
|
|
92
|
+
*/
|
|
93
|
+
onChange?: (values: MultiSelectOption[]) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Deafult of the MultiSelect
|
|
96
|
+
*/
|
|
97
|
+
value?: MultiSelectOption[];
|
|
98
|
+
/**
|
|
99
|
+
* ZIndex of the MultiSelect
|
|
100
|
+
*/
|
|
101
|
+
zIndex?: keyof typeof multiSelect.properties.zIndex;
|
|
102
|
+
}
|
|
103
|
+
export type MultiSelectBaseProps = MultiSelectProperties & Omit<InputHTMLAttributes<HTMLInputElement>, "children" | "value">;
|
|
104
|
+
export declare const MultiSelect: React.FC<MultiSelectBaseProps> & MultiSelectComponents;
|
|
105
|
+
export type MultiSelectProps = ComponentPropsWithRef<typeof MultiSelect>;
|
|
106
|
+
|
|
107
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v7.2.0
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { HTMLAttributes } from 'react';
|
|
5
|
+
|
|
6
|
+
export interface PaginationItemData {
|
|
7
|
+
pageNumber: number | string;
|
|
8
|
+
isCurrent: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface PaginationProperties {
|
|
11
|
+
/**
|
|
12
|
+
* The currently selected page.
|
|
13
|
+
*/
|
|
14
|
+
activePage: number;
|
|
15
|
+
/**
|
|
16
|
+
* The total number of pages.
|
|
17
|
+
*/
|
|
18
|
+
pageCount: number;
|
|
19
|
+
/**
|
|
20
|
+
* Called with event and page number when a page is clicked.
|
|
21
|
+
* @TJS-type (page: number) => void;
|
|
22
|
+
*/
|
|
23
|
+
onPageChange: (page: number) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Determines whether page numbers should be shown.
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
28
|
+
showNumbers?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Custom render function for pagination items.
|
|
31
|
+
*/
|
|
32
|
+
renderItem?: (item: PaginationItemData) => React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
export type PaginationProps = PaginationProperties & HTMLAttributes<HTMLElement>;
|
|
35
|
+
export declare const Pagination: React.FC<PaginationProps>;
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
Pagination as default,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v7.2.0
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
5
|
+
|
|
6
|
+
export interface Conditions<T> {
|
|
7
|
+
xs?: T;
|
|
8
|
+
md?: T;
|
|
9
|
+
lg?: T;
|
|
10
|
+
xl?: T;
|
|
11
|
+
}
|
|
12
|
+
export type Overflow = "visible" | "hidden" | "scroll" | "auto";
|
|
13
|
+
declare const propertiesPopover: {
|
|
14
|
+
backgroundColor: {
|
|
15
|
+
"primary-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
16
|
+
"primary-interactiveHover": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
17
|
+
"success-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
18
|
+
"danger-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
19
|
+
"neutral-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
20
|
+
"warning-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
21
|
+
"neutral-background": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
22
|
+
};
|
|
23
|
+
color: {
|
|
24
|
+
"primary-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
25
|
+
"primary-interactiveHover": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
26
|
+
"success-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
27
|
+
"danger-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
28
|
+
"neutral-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
29
|
+
"warning-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
30
|
+
"neutral-background": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
31
|
+
};
|
|
32
|
+
padding: {
|
|
33
|
+
base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
34
|
+
small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
35
|
+
none: string;
|
|
36
|
+
};
|
|
37
|
+
zIndex: {
|
|
38
|
+
"100": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
39
|
+
"200": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
40
|
+
"300": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
41
|
+
"400": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
42
|
+
"500": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
43
|
+
"600": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
44
|
+
"700": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
45
|
+
"800": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
46
|
+
"900": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
47
|
+
};
|
|
48
|
+
overflow: Overflow[];
|
|
49
|
+
};
|
|
50
|
+
export type PopoverColorProperties = keyof typeof propertiesPopover.color;
|
|
51
|
+
export type PopoverBackgroundColorProperties = keyof typeof propertiesPopover.backgroundColor;
|
|
52
|
+
export type PopoverPaddingProperties = keyof typeof propertiesPopover.padding;
|
|
53
|
+
export type PopoverZIndexProperties = keyof typeof propertiesPopover.zIndex;
|
|
54
|
+
export interface PopoverSprinkle {
|
|
55
|
+
/**
|
|
56
|
+
* The width property specifies the width of a popover's content area.
|
|
57
|
+
* @default fit-content
|
|
58
|
+
*/
|
|
59
|
+
width?: string | Conditions<string>;
|
|
60
|
+
/**
|
|
61
|
+
* The maxWidth property specifies the maximum width of a popover's content area.
|
|
62
|
+
*/
|
|
63
|
+
maxWidth?: string | Conditions<string>;
|
|
64
|
+
/**
|
|
65
|
+
* The height property specifies the height of a popover's content area.
|
|
66
|
+
*/
|
|
67
|
+
height?: string | Conditions<string>;
|
|
68
|
+
/**
|
|
69
|
+
* The zIndex property specifies the stack order of the popover.
|
|
70
|
+
*/
|
|
71
|
+
zIndex?: PopoverZIndexProperties | Conditions<PopoverZIndexProperties>;
|
|
72
|
+
/**
|
|
73
|
+
* The backgroundColor property sets the background color of the popover.
|
|
74
|
+
* @default neutral-background
|
|
75
|
+
* @examples ["neutral-interactive", { xs: "neutral-surface", md: "neutral-interactive" }]
|
|
76
|
+
*/
|
|
77
|
+
backgroundColor?: PopoverBackgroundColorProperties | Conditions<PopoverBackgroundColorProperties>;
|
|
78
|
+
/**
|
|
79
|
+
* The color property is used to set the color of the popover.
|
|
80
|
+
* @default neutral-background
|
|
81
|
+
*/
|
|
82
|
+
color?: PopoverColorProperties | Conditions<PopoverColorProperties>;
|
|
83
|
+
/**
|
|
84
|
+
* The padding properties are used to generate space around an popover's content area.
|
|
85
|
+
* @default base
|
|
86
|
+
*/
|
|
87
|
+
padding?: PopoverPaddingProperties | Conditions<PopoverPaddingProperties>;
|
|
88
|
+
/**
|
|
89
|
+
* The overflow shorthand property sets the desired behavior for an popover's content overflow.
|
|
90
|
+
*/
|
|
91
|
+
overflow?: Overflow | Conditions<Overflow>;
|
|
92
|
+
}
|
|
93
|
+
export type PopoverPlacement = "top" | "right" | "bottom" | "left" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end" | "top-start" | "top-end";
|
|
94
|
+
export interface PopoverProperties extends PopoverSprinkle {
|
|
95
|
+
/**
|
|
96
|
+
* An HTML element, or a function that returns one. It's used to set the position of the popover.
|
|
97
|
+
* @TJS-type React.ReactNode | ((data: { open: boolean, setVisibility: (visibility: boolean) => void }) => React.ReactNode);
|
|
98
|
+
*/
|
|
99
|
+
children: ReactNode | ((data: {
|
|
100
|
+
open: boolean;
|
|
101
|
+
setVisibility: (visibility: boolean) => void;
|
|
102
|
+
}) => ReactNode);
|
|
103
|
+
/**
|
|
104
|
+
* The content of the popover.
|
|
105
|
+
* @TJS-type React.ReactNode
|
|
106
|
+
*/
|
|
107
|
+
content: ReactNode;
|
|
108
|
+
/**
|
|
109
|
+
* If true, the component is shown.
|
|
110
|
+
*/
|
|
111
|
+
visible?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Function to control popover opening and closing.
|
|
114
|
+
* @TJS-type (visible: boolean) => void;
|
|
115
|
+
*/
|
|
116
|
+
onVisibility?: (visible: boolean) => void;
|
|
117
|
+
/**
|
|
118
|
+
* Conditional for displaying the popover arrow.
|
|
119
|
+
* @default true
|
|
120
|
+
*/
|
|
121
|
+
arrow?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* A common feature of select dropdowns is that the dropdown matches the width of the reference regardless of its contents.
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
126
|
+
matchReferenceWidth?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Position of the popover.
|
|
129
|
+
* @default bottom
|
|
130
|
+
*/
|
|
131
|
+
position?: PopoverPlacement;
|
|
132
|
+
/**
|
|
133
|
+
* Adds hover event listeners that change the open state, like CSS :hover.
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
enabledHover?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Adds click event listeners that change the open state.
|
|
139
|
+
* @default true
|
|
140
|
+
*/
|
|
141
|
+
enabledClick?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Adds listeners that dismiss (close) the floating element.
|
|
144
|
+
* @default true
|
|
145
|
+
*/
|
|
146
|
+
enabledDismiss?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Offest displaces the floating element from its core placement along the specified axes.
|
|
149
|
+
* @default 10
|
|
150
|
+
*/
|
|
151
|
+
offset?: number;
|
|
152
|
+
/**
|
|
153
|
+
* When enabled, renders an invisible overlay that prevents accidental clicks on elements behind the popover.
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
renderOverlay?: boolean;
|
|
157
|
+
}
|
|
158
|
+
export type PopoverProps = PopoverProperties & Omit<HTMLAttributes<HTMLDivElement>, "children" | "content">;
|
|
159
|
+
export declare const Popover: React.FC<PopoverProps>;
|
|
160
|
+
|
|
161
|
+
export {
|
|
162
|
+
Popover as default,
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v7.2.0
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ComponentPropsWithRef, HTMLAttributes } from 'react';
|
|
5
|
+
|
|
6
|
+
export interface SkeletonProperties {
|
|
7
|
+
/**
|
|
8
|
+
* Width of the skeleton. Useful when the skeleton is inside an inline element with no width of its own.
|
|
9
|
+
*/
|
|
10
|
+
width: string;
|
|
11
|
+
/**
|
|
12
|
+
* Height of the skeleton. Useful when you don't want to adapt the skeleton to a text element but for instance a card.
|
|
13
|
+
*/
|
|
14
|
+
height: string;
|
|
15
|
+
/**
|
|
16
|
+
* The border radius of the skeleton.
|
|
17
|
+
*/
|
|
18
|
+
borderRadius?: string;
|
|
19
|
+
/**
|
|
20
|
+
* This is an attribute used to identify a DOM node for testing purposes.
|
|
21
|
+
*/
|
|
22
|
+
"data-testid"?: string;
|
|
23
|
+
}
|
|
24
|
+
export type SkeletonProps = SkeletonProperties & HTMLAttributes<HTMLDivElement>;
|
|
25
|
+
export type ProgressBarSkeletonProperties = Partial<Pick<SkeletonProps, "width" | "height" | "data-testid">>;
|
|
26
|
+
export declare const ProgressBarSkeleton: React.FC<ProgressBarSkeletonProperties>;
|
|
27
|
+
export interface ProgressBarComponents {
|
|
28
|
+
Skeleton: typeof ProgressBarSkeleton;
|
|
29
|
+
}
|
|
30
|
+
export interface ProgressBarProperties {
|
|
31
|
+
/**
|
|
32
|
+
* Progress value from 0 to 100
|
|
33
|
+
* @note Always renders with a minimum 8px width for visual consistency
|
|
34
|
+
*/
|
|
35
|
+
value: number;
|
|
36
|
+
/**
|
|
37
|
+
* Change the visual style of the progress bar.
|
|
38
|
+
* @default neutral
|
|
39
|
+
*/
|
|
40
|
+
appearance?: "primary" | "success" | "warning" | "danger" | "neutral" | "ai-generative";
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* ProgressBar component displays the progress of an operation or task in a visual format.
|
|
44
|
+
* It provides a horizontal bar that fills based on the completion percentage.
|
|
45
|
+
*
|
|
46
|
+
* @component
|
|
47
|
+
* @example
|
|
48
|
+
* <ProgressBar value={50} appearance="primary" />
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* // With skeleton loading state
|
|
52
|
+
* <ProgressBar.Skeleton width="200px" />
|
|
53
|
+
*/
|
|
54
|
+
export declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProperties & Omit<React.HTMLAttributes<HTMLDivElement>, keyof ProgressBarProperties> & React.RefAttributes<HTMLDivElement>> & ProgressBarComponents;
|
|
55
|
+
export type ProgressBarProps = ComponentPropsWithRef<typeof ProgressBar>;
|
|
56
|
+
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v7.2.0
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
5
|
+
|
|
6
|
+
export interface SkeletonProperties {
|
|
7
|
+
/**
|
|
8
|
+
* Width of the skeleton. Useful when the skeleton is inside an inline element with no width of its own.
|
|
9
|
+
*/
|
|
10
|
+
width: string;
|
|
11
|
+
/**
|
|
12
|
+
* Height of the skeleton. Useful when you don't want to adapt the skeleton to a text element but for instance a card.
|
|
13
|
+
*/
|
|
14
|
+
height: string;
|
|
15
|
+
/**
|
|
16
|
+
* The border radius of the skeleton.
|
|
17
|
+
*/
|
|
18
|
+
borderRadius?: string;
|
|
19
|
+
/**
|
|
20
|
+
* This is an attribute used to identify a DOM node for testing purposes.
|
|
21
|
+
*/
|
|
22
|
+
"data-testid"?: string;
|
|
23
|
+
}
|
|
24
|
+
export type SkeletonProps = SkeletonProperties & HTMLAttributes<HTMLDivElement>;
|
|
25
|
+
export type RadioSkeletonProperties = Partial<Pick<SkeletonProps, "width">> & Partial<Pick<RadioProps, "as">> & {
|
|
26
|
+
/**
|
|
27
|
+
* This is an attribute used to identify a DOM node for testing purposes.
|
|
28
|
+
*/
|
|
29
|
+
"data-testid"?: string;
|
|
30
|
+
};
|
|
31
|
+
export type RadioSkeletonProps = RadioSkeletonProperties;
|
|
32
|
+
export declare const RadioSkeleton: React.FC<RadioSkeletonProps>;
|
|
33
|
+
export interface RadioComponents {
|
|
34
|
+
Skeleton: typeof RadioSkeleton;
|
|
35
|
+
}
|
|
36
|
+
export interface RadioProperties {
|
|
37
|
+
/**
|
|
38
|
+
* Name attribute of the input element.
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
41
|
+
/**
|
|
42
|
+
* Change the visual style of the radio.
|
|
43
|
+
* @default radio
|
|
44
|
+
*/
|
|
45
|
+
as?: "radio" | "button";
|
|
46
|
+
/**
|
|
47
|
+
* Modifies true/false value of the native radio.
|
|
48
|
+
*/
|
|
49
|
+
checked?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Modifies the native disabled state of the native radio.
|
|
52
|
+
*/
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Text to be rendered inside the component.
|
|
56
|
+
*/
|
|
57
|
+
label?: string;
|
|
58
|
+
}
|
|
59
|
+
export type RadioProps = RadioProperties & InputHTMLAttributes<HTMLInputElement>;
|
|
60
|
+
export declare const Radio: React.FC<RadioProps> & RadioComponents;
|
|
61
|
+
|
|
62
|
+
export {};
|