@nimbus-ds/components 5.23.0-rc.1 → 5.24.0-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 +14 -0
- package/dist/Accordion/index.js +1 -1
- package/dist/Alert/index.d.ts +60 -0
- package/dist/Alert/index.js +1 -1
- package/dist/Box/index.d.ts +6 -3
- package/dist/Button/index.d.ts +1 -1
- package/dist/CHANGELOG.md +14 -0
- package/dist/Chip/index.d.ts +59 -0
- package/dist/Chip/index.js +1 -1
- package/dist/FileUploader/index.d.ts +98 -0
- package/dist/FileUploader/index.js +1 -1
- package/dist/Icon/index.d.ts +120 -0
- package/dist/Icon/index.js +1 -1
- package/dist/IconButton/index.d.ts +7 -0
- package/dist/IconButton/index.js +1 -1
- package/dist/Input/index.d.ts +76 -0
- package/dist/Input/index.js +1 -1
- package/dist/Link/index.d.ts +115 -0
- package/dist/Modal/index.d.ts +232 -0
- package/dist/Modal/index.js +1 -1
- package/dist/MultiSelect/index.d.ts +107 -0
- package/dist/MultiSelect/index.js +1 -1
- package/dist/Pagination/index.d.ts +41 -0
- package/dist/Pagination/index.js +1 -1
- package/dist/Popover/index.d.ts +165 -0
- package/dist/Radio/index.d.ts +62 -0
- package/dist/ScrollPane/index.d.ts +889 -0
- package/dist/SegmentedControl/index.d.ts +6 -3
- package/dist/Select/index.d.ts +81 -0
- package/dist/Select/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 +869 -0
- package/dist/Stepper/index.js +1 -1
- package/dist/Thumbnail/index.d.ts +73 -0
- package/dist/Thumbnail/index.js +1 -1
- package/dist/Toast/index.d.ts +56 -0
- package/dist/Toast/index.js +1 -1
- package/dist/Tooltip/index.d.ts +46 -0
- package/dist/index.d.ts +14 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v7.2.0
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ComponentPropsWithRef, HTMLAttributes, ReactNode } from 'react';
|
|
5
|
+
|
|
6
|
+
export type Merge<P1 = {}, P2 = {}> = Omit<P1, keyof P2> & P2;
|
|
7
|
+
export type ForwardRefExoticComponent<E, OwnProps> = React.ForwardRefExoticComponent<Merge<E extends React.ElementType ? React.ComponentPropsWithRef<E> : never, OwnProps & {
|
|
8
|
+
as?: E;
|
|
9
|
+
}>>;
|
|
10
|
+
export interface PolymorphicForwardRefComponent<IntrinsicElementString, OwnProps = {}
|
|
11
|
+
/**
|
|
12
|
+
* Extends original type to ensure built in React types play nice
|
|
13
|
+
* with polymorphic components still e.g. `React.ElementRef` etc.
|
|
14
|
+
*/
|
|
15
|
+
> extends ForwardRefExoticComponent<IntrinsicElementString, OwnProps> {
|
|
16
|
+
/**
|
|
17
|
+
* When `as` prop is passed, use this overload.
|
|
18
|
+
* Merges original own props (without DOM props) and the inferred props
|
|
19
|
+
* from `as` element with the own props taking precendence.
|
|
20
|
+
*
|
|
21
|
+
* We explicitly avoid `React.ElementType` and manually narrow the prop types
|
|
22
|
+
* so that events are typed when using JSX.IntrinsicElements.
|
|
23
|
+
*/
|
|
24
|
+
<As = IntrinsicElementString>(props: As extends "" ? {
|
|
25
|
+
as: keyof JSX.IntrinsicElements;
|
|
26
|
+
} : As extends React.ComponentType<infer P> ? Merge<P, OwnProps & {
|
|
27
|
+
as: As;
|
|
28
|
+
}> : As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], OwnProps & {
|
|
29
|
+
as: As;
|
|
30
|
+
}> : never): React.ReactElement | null;
|
|
31
|
+
}
|
|
32
|
+
export type TextDecoration = "none" | "underline" | "line-through";
|
|
33
|
+
declare const link: {
|
|
34
|
+
sprinkle: ((props: {
|
|
35
|
+
textDecoration?: TextDecoration | undefined;
|
|
36
|
+
fontSize?: "base" | "caption" | "highlight" | undefined;
|
|
37
|
+
lineHeight?: "base" | "caption" | "highlight" | undefined;
|
|
38
|
+
}) => string) & {
|
|
39
|
+
properties: Set<"fontSize" | "textDecoration" | "lineHeight">;
|
|
40
|
+
};
|
|
41
|
+
properties: {
|
|
42
|
+
textDecoration: TextDecoration[];
|
|
43
|
+
fontSize: {
|
|
44
|
+
caption: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
45
|
+
base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
46
|
+
highlight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
47
|
+
};
|
|
48
|
+
lineHeight: {
|
|
49
|
+
readonly caption: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
50
|
+
readonly base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
51
|
+
readonly highlight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
classnames: {
|
|
55
|
+
base: string;
|
|
56
|
+
appearance: Record<"primary" | "danger" | "neutral" | "neutral-background", string>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export interface SkeletonProperties {
|
|
60
|
+
/**
|
|
61
|
+
* Width of the skeleton. Useful when the skeleton is inside an inline element with no width of its own.
|
|
62
|
+
*/
|
|
63
|
+
width: string;
|
|
64
|
+
/**
|
|
65
|
+
* Height of the skeleton. Useful when you don't want to adapt the skeleton to a text element but for instance a card.
|
|
66
|
+
*/
|
|
67
|
+
height: string;
|
|
68
|
+
/**
|
|
69
|
+
* The border radius of the skeleton.
|
|
70
|
+
*/
|
|
71
|
+
borderRadius?: string;
|
|
72
|
+
/**
|
|
73
|
+
* This is an attribute used to identify a DOM node for testing purposes.
|
|
74
|
+
*/
|
|
75
|
+
"data-testid"?: string;
|
|
76
|
+
}
|
|
77
|
+
export type SkeletonProps = SkeletonProperties & HTMLAttributes<HTMLDivElement>;
|
|
78
|
+
export type LinkSkeletonProperties = Partial<Pick<SkeletonProps, "width" | "data-testid">>;
|
|
79
|
+
export type LinkSkeletonProps = LinkSkeletonProperties;
|
|
80
|
+
export declare const LinkSkeleton: React.FC<LinkSkeletonProps>;
|
|
81
|
+
export interface LinkComponents {
|
|
82
|
+
Skeleton: typeof LinkSkeleton;
|
|
83
|
+
}
|
|
84
|
+
export interface LinkProperties {
|
|
85
|
+
/**
|
|
86
|
+
* The content of the link.
|
|
87
|
+
* @TJS-type React.ReactNode
|
|
88
|
+
*/
|
|
89
|
+
children: ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* Change the visual style of the link.
|
|
92
|
+
* @default neutral
|
|
93
|
+
*/
|
|
94
|
+
appearance?: "primary" | "danger" | "neutral" | "neutral-background";
|
|
95
|
+
/**
|
|
96
|
+
* The textDecoration property specifies the decoration added to link.
|
|
97
|
+
* @default neutral
|
|
98
|
+
*/
|
|
99
|
+
textDecoration?: typeof link.properties.textDecoration[number];
|
|
100
|
+
/**
|
|
101
|
+
* The fontSize property sets the size of the link.
|
|
102
|
+
* @default base
|
|
103
|
+
*/
|
|
104
|
+
fontSize?: keyof typeof link.properties.fontSize;
|
|
105
|
+
/**
|
|
106
|
+
* The lineHeight property specifies the line height of the link
|
|
107
|
+
* @default base
|
|
108
|
+
*/
|
|
109
|
+
lineHeight?: keyof typeof link.properties.lineHeight;
|
|
110
|
+
}
|
|
111
|
+
export type LinkBaseProps = LinkProperties & HTMLAttributes<HTMLElement>;
|
|
112
|
+
export declare const Link: PolymorphicForwardRefComponent<"a" | "button", LinkBaseProps> & LinkComponents;
|
|
113
|
+
export type LinkProps = ComponentPropsWithRef<typeof Link>;
|
|
114
|
+
|
|
115
|
+
export {};
|
|
@@ -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 {};
|