baseui 0.0.0-next-e23ee12 → 0.0.0-next-430cab5
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/block/types.d.ts +14 -5
- package/modal/types.d.ts +7 -7
- package/package.json +1 -2
package/block/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ElementType, ReactNode } from 'react';
|
|
2
|
+
import type { StyleObject } from 'styletron-standard';
|
|
2
3
|
import type { Override } from '../helpers/overrides';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
export declare type BlockOverrides = {
|
|
@@ -199,12 +200,20 @@ export declare type StyledBlockProps = {
|
|
|
199
200
|
$textOverflow?: Responsive<string>;
|
|
200
201
|
$whiteSpace?: Responsive<WhiteSpace>;
|
|
201
202
|
};
|
|
203
|
+
declare type BaseProps<P extends {}> = P & {
|
|
204
|
+
$style?: StyleObject | ((props: P) => StyleObject);
|
|
205
|
+
className?: string;
|
|
206
|
+
};
|
|
207
|
+
declare type AddStyletronRef<P extends {
|
|
208
|
+
ref: any;
|
|
209
|
+
}> = P extends {
|
|
210
|
+
ref: infer R;
|
|
211
|
+
} ? P & {
|
|
212
|
+
$ref?: R;
|
|
213
|
+
} : P;
|
|
214
|
+
declare type OverrideProps<D extends React.ElementType, P extends {}> = BaseProps<P> & Omit<AddStyletronRef<React.ComponentProps<D>>, keyof BaseProps<P>>;
|
|
202
215
|
export interface BlockComponentType<D extends React.ElementType> {
|
|
203
|
-
<C extends React.ElementType = D>(props:
|
|
204
|
-
ref?: infer R;
|
|
205
|
-
} ? {
|
|
206
|
-
ref?: R;
|
|
207
|
-
} : {}) & Omit<StyledBlockProps & React.ComponentProps<C>, keyof BlockProps>): JSX.Element;
|
|
216
|
+
<C extends React.ElementType = D>(props: OverrideProps<C, BlockProps<C>>): JSX.Element;
|
|
208
217
|
displayName?: string;
|
|
209
218
|
}
|
|
210
219
|
export {};
|
package/modal/types.d.ts
CHANGED
|
@@ -14,12 +14,12 @@ export declare type ModalOverrides = {
|
|
|
14
14
|
};
|
|
15
15
|
export declare type ModalProps = {
|
|
16
16
|
/** Sets whether the Modal should be displayed by easing in and out */
|
|
17
|
-
animate
|
|
17
|
+
animate?: boolean;
|
|
18
18
|
/** If true, focus will shift to the first interactive element within the modal.
|
|
19
19
|
* If false, the modal container itself will receive focus.
|
|
20
20
|
* Moving focus into a newly opened modal is important for accessibility purposes, so please be careful!
|
|
21
21
|
*/
|
|
22
|
-
autoFocus
|
|
22
|
+
autoFocus?: boolean;
|
|
23
23
|
/** If true, focus will be locked to elements within the modal.
|
|
24
24
|
*/
|
|
25
25
|
focusLock?: boolean;
|
|
@@ -36,8 +36,8 @@ export declare type ModalProps = {
|
|
|
36
36
|
/** Whether the modal should be closeable by the user
|
|
37
37
|
* (either via escape, dialog container click, etc). You can set this to
|
|
38
38
|
* false if your modal has an action that the user must take before closing.*/
|
|
39
|
-
closeable
|
|
40
|
-
isOpen
|
|
39
|
+
closeable?: boolean;
|
|
40
|
+
isOpen?: boolean;
|
|
41
41
|
/** Where to mount the modal */
|
|
42
42
|
mountNode?: HTMLElement;
|
|
43
43
|
/** A callback that is invoked when the modal will close.
|
|
@@ -45,12 +45,12 @@ export declare type ModalProps = {
|
|
|
45
45
|
onClose?: (a: {
|
|
46
46
|
closeSource?: CloseSource;
|
|
47
47
|
}) => unknown;
|
|
48
|
-
overrides
|
|
48
|
+
overrides?: ModalOverrides;
|
|
49
49
|
/** Which accessibility role this modal should have. */
|
|
50
|
-
role
|
|
50
|
+
role?: RoleProp;
|
|
51
51
|
/** Controls the size of the modal (primarily width).
|
|
52
52
|
* Can be a SIZE constant or css width property value. */
|
|
53
|
-
size
|
|
53
|
+
size?: SizeProp;
|
|
54
54
|
};
|
|
55
55
|
export declare type ModalPropsWithoutChildren = Omit<ModalProps, 'children'>;
|
|
56
56
|
export declare type ModalState = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baseui",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-430cab5",
|
|
4
4
|
"description": "A React Component library implementing the Base design language",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -161,7 +161,6 @@
|
|
|
161
161
|
"moment": "^2.24.0",
|
|
162
162
|
"next": "^10.0.0",
|
|
163
163
|
"next-images": "^1.6.2",
|
|
164
|
-
"next-transpile-modules": "^6.0.0",
|
|
165
164
|
"node-fetch": "^2.6.1",
|
|
166
165
|
"now": "16.5.2",
|
|
167
166
|
"npm-run-all": "^4.1.5",
|