@instructure/ui-drawer-layout 8.14.1-snapshot.7 → 8.15.1-snapshot.2
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 +4 -0
- package/es/DrawerLayout/DrawerContent/DrawerContentLocator.js +2 -1
- package/es/DrawerLayout/DrawerContent/index.js +42 -43
- package/es/DrawerLayout/DrawerContent/props.js +0 -4
- package/es/DrawerLayout/DrawerContent/styles.js +1 -1
- package/es/DrawerLayout/DrawerLayoutLocator.js +2 -1
- package/es/DrawerLayout/DrawerTray/DrawerTrayLocator.js +2 -1
- package/es/DrawerLayout/DrawerTray/index.js +61 -66
- package/es/DrawerLayout/DrawerTray/props.js +0 -70
- package/es/DrawerLayout/index.js +19 -13
- package/es/DrawerLayout/props.js +0 -13
- package/lib/DrawerLayout/DrawerContent/DrawerContentLocator.js +1 -0
- package/lib/DrawerLayout/DrawerContent/index.js +42 -43
- package/lib/DrawerLayout/DrawerContent/props.js +0 -4
- package/lib/DrawerLayout/DrawerContent/styles.js +1 -1
- package/lib/DrawerLayout/DrawerLayoutLocator.js +1 -0
- package/lib/DrawerLayout/DrawerTray/DrawerTrayLocator.js +1 -0
- package/lib/DrawerLayout/DrawerTray/index.js +61 -66
- package/lib/DrawerLayout/DrawerTray/props.js +0 -70
- package/lib/DrawerLayout/index.js +21 -13
- package/lib/DrawerLayout/props.js +0 -13
- package/package.json +22 -22
- package/src/DrawerLayout/DrawerContent/index.tsx +38 -57
- package/src/DrawerLayout/DrawerContent/props.ts +13 -10
- package/src/DrawerLayout/DrawerContent/styles.ts +3 -4
- package/src/DrawerLayout/DrawerTray/index.tsx +31 -33
- package/src/DrawerLayout/DrawerTray/props.ts +110 -69
- package/src/DrawerLayout/__fixtures__/DrawerLayout.fixture.tsx +14 -13
- package/src/DrawerLayout/index.tsx +74 -86
- package/src/DrawerLayout/props.ts +22 -13
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/DrawerLayout/DrawerContent/DrawerContentLocator.d.ts +4 -4
- package/types/DrawerLayout/DrawerContent/index.d.ts +28 -19
- package/types/DrawerLayout/DrawerContent/index.d.ts.map +1 -1
- package/types/DrawerLayout/DrawerContent/props.d.ts +13 -6
- package/types/DrawerLayout/DrawerContent/props.d.ts.map +1 -1
- package/types/DrawerLayout/DrawerContent/styles.d.ts +2 -2
- package/types/DrawerLayout/DrawerContent/styles.d.ts.map +1 -1
- package/types/DrawerLayout/DrawerLayoutLocator.d.ts +14 -14
- package/types/DrawerLayout/DrawerTray/DrawerTrayLocator.d.ts +4 -4
- package/types/DrawerLayout/DrawerTray/index.d.ts +46 -22
- package/types/DrawerLayout/DrawerTray/index.d.ts.map +1 -1
- package/types/DrawerLayout/DrawerTray/props.d.ts +74 -16
- package/types/DrawerLayout/DrawerTray/props.d.ts.map +1 -1
- package/types/DrawerLayout/__fixtures__/DrawerLayout.fixture.d.ts +11 -1
- package/types/DrawerLayout/__fixtures__/DrawerLayout.fixture.d.ts.map +1 -1
- package/types/DrawerLayout/index.d.ts +116 -23
- package/types/DrawerLayout/index.d.ts.map +1 -1
- package/types/DrawerLayout/props.d.ts +19 -3
- package/types/DrawerLayout/props.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/DrawerContent/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/DrawerContent/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EACV,cAAc,EACd,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,aAAK,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAE1D,aAAK,2BAA2B,GAAG;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAA;IACrD;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACvD,IAAI,CAAC,EAAE,QAAQ,CAAA;CAChB,CAAA;AAED,aAAK,6BAA6B,GAAG;IACnC,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,2BAA2B,CAAA;AAEjD,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,wBAAwB,GAAG,2BAA2B,GACzD,cAAc,CAAC,wBAAwB,EAAE,wBAAwB,CAAC,GAClE,mBAAmB,CAAC,2BAA2B,CAAC,CAAA;AAElD,aAAK,wBAAwB,GAAG,cAAc,CAAC,eAAe,CAAC,CAAA;AAE/D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAMvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAMnB,CAAA;AAED,YAAY,EACV,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,iBAAiB,EAClB,CAAA;AACD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DrawerLayoutContentTheme } from '@instructure/shared-types';
|
|
2
|
-
import type { DrawerLayoutContentProps,
|
|
2
|
+
import type { DrawerLayoutContentProps, DrawerLayoutContentStyleProps, DrawerLayoutContentStyle } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* ---
|
|
5
5
|
* private: true
|
|
@@ -10,6 +10,6 @@ import type { DrawerLayoutContentProps, DrawerLayoutContentState, DrawerLayoutCo
|
|
|
10
10
|
* @param {Object} state the state of the component, the style is applied to
|
|
11
11
|
* @return {Object} The final style object, which will be used in the component
|
|
12
12
|
*/
|
|
13
|
-
declare const generateStyle: (componentTheme: DrawerLayoutContentTheme,
|
|
13
|
+
declare const generateStyle: (componentTheme: DrawerLayoutContentTheme, _props: DrawerLayoutContentProps, state: DrawerLayoutContentStyleProps) => DrawerLayoutContentStyle;
|
|
14
14
|
export default generateStyle;
|
|
15
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/DrawerContent/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,KAAK,EACV,wBAAwB,EACxB,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/DrawerContent/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,KAAK,EACV,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAEhB;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,wBAAwB,UAChC,wBAAwB,SACzB,6BAA6B,KACnC,wBAkBF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -33,7 +33,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
33
33
|
debug: (maxLength?: number | undefined, options?: {
|
|
34
34
|
highlight: boolean;
|
|
35
35
|
} | undefined) => void;
|
|
36
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
36
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
37
37
|
getTextContent: () => string | null;
|
|
38
38
|
getParentNode: () => ParentNode | null;
|
|
39
39
|
parent: () => ParentNode | null;
|
|
@@ -172,7 +172,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
172
172
|
debug: (maxLength?: number | undefined, options?: {
|
|
173
173
|
highlight: boolean;
|
|
174
174
|
} | undefined) => void;
|
|
175
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
175
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
176
176
|
getTextContent: () => string | null;
|
|
177
177
|
getParentNode: () => ParentNode | null;
|
|
178
178
|
parent: () => ParentNode | null;
|
|
@@ -318,7 +318,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
318
318
|
debug: (maxLength?: number | undefined, options?: {
|
|
319
319
|
highlight: boolean;
|
|
320
320
|
} | undefined) => void;
|
|
321
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
321
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
322
322
|
getTextContent: () => string | null;
|
|
323
323
|
getParentNode: () => ParentNode | null;
|
|
324
324
|
parent: () => ParentNode | null;
|
|
@@ -457,7 +457,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
457
457
|
debug: (maxLength?: number | undefined, options?: {
|
|
458
458
|
highlight: boolean;
|
|
459
459
|
} | undefined) => void;
|
|
460
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
460
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
461
461
|
getTextContent: () => string | null;
|
|
462
462
|
getParentNode: () => ParentNode | null;
|
|
463
463
|
parent: () => ParentNode | null;
|
|
@@ -596,7 +596,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
596
596
|
debug: (maxLength?: number | undefined, options?: {
|
|
597
597
|
highlight: boolean;
|
|
598
598
|
} | undefined) => void;
|
|
599
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
599
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
600
600
|
getTextContent: () => string | null;
|
|
601
601
|
getParentNode: () => ParentNode | null;
|
|
602
602
|
parent: () => ParentNode | null;
|
|
@@ -736,7 +736,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
736
736
|
debug: (maxLength?: number | undefined, options?: {
|
|
737
737
|
highlight: boolean;
|
|
738
738
|
} | undefined) => void;
|
|
739
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
739
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
740
740
|
getTextContent: () => string | null;
|
|
741
741
|
getParentNode: () => ParentNode | null;
|
|
742
742
|
parent: () => ParentNode | null;
|
|
@@ -875,7 +875,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
875
875
|
debug: (maxLength?: number | undefined, options?: {
|
|
876
876
|
highlight: boolean;
|
|
877
877
|
} | undefined) => void;
|
|
878
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
878
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
879
879
|
getTextContent: () => string | null;
|
|
880
880
|
getParentNode: () => ParentNode | null;
|
|
881
881
|
parent: () => ParentNode | null;
|
|
@@ -1014,7 +1014,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
1014
1014
|
debug: (maxLength?: number | undefined, options?: {
|
|
1015
1015
|
highlight: boolean;
|
|
1016
1016
|
} | undefined) => void;
|
|
1017
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1017
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1018
1018
|
getTextContent: () => string | null;
|
|
1019
1019
|
getParentNode: () => ParentNode | null;
|
|
1020
1020
|
parent: () => ParentNode | null;
|
|
@@ -1154,7 +1154,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
1154
1154
|
debug: (maxLength?: number | undefined, options?: {
|
|
1155
1155
|
highlight: boolean;
|
|
1156
1156
|
} | undefined) => void;
|
|
1157
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1157
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1158
1158
|
getTextContent: () => string | null;
|
|
1159
1159
|
getParentNode: () => ParentNode | null;
|
|
1160
1160
|
parent: () => ParentNode | null;
|
|
@@ -1293,7 +1293,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
1293
1293
|
debug: (maxLength?: number | undefined, options?: {
|
|
1294
1294
|
highlight: boolean;
|
|
1295
1295
|
} | undefined) => void;
|
|
1296
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1296
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1297
1297
|
getTextContent: () => string | null;
|
|
1298
1298
|
getParentNode: () => ParentNode | null;
|
|
1299
1299
|
parent: () => ParentNode | null;
|
|
@@ -1432,7 +1432,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
1432
1432
|
debug: (maxLength?: number | undefined, options?: {
|
|
1433
1433
|
highlight: boolean;
|
|
1434
1434
|
} | undefined) => void;
|
|
1435
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1435
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1436
1436
|
getTextContent: () => string | null;
|
|
1437
1437
|
getParentNode: () => ParentNode | null;
|
|
1438
1438
|
parent: () => ParentNode | null;
|
|
@@ -1572,7 +1572,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
1572
1572
|
debug: (maxLength?: number | undefined, options?: {
|
|
1573
1573
|
highlight: boolean;
|
|
1574
1574
|
} | undefined) => void;
|
|
1575
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1575
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1576
1576
|
getTextContent: () => string | null;
|
|
1577
1577
|
getParentNode: () => ParentNode | null;
|
|
1578
1578
|
parent: () => ParentNode | null;
|
|
@@ -1711,7 +1711,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
1711
1711
|
debug: (maxLength?: number | undefined, options?: {
|
|
1712
1712
|
highlight: boolean;
|
|
1713
1713
|
} | undefined) => void;
|
|
1714
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1714
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1715
1715
|
getTextContent: () => string | null;
|
|
1716
1716
|
getParentNode: () => ParentNode | null;
|
|
1717
1717
|
parent: () => ParentNode | null;
|
|
@@ -1850,7 +1850,7 @@ export declare const DrawerLayoutLocator: {
|
|
|
1850
1850
|
debug: (maxLength?: number | undefined, options?: {
|
|
1851
1851
|
highlight: boolean;
|
|
1852
1852
|
} | undefined) => void;
|
|
1853
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1853
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1854
1854
|
getTextContent: () => string | null;
|
|
1855
1855
|
getParentNode: () => ParentNode | null;
|
|
1856
1856
|
parent: () => ParentNode | null;
|
|
@@ -36,7 +36,7 @@ export declare const DrawerTrayLocator: {
|
|
|
36
36
|
debug: (maxLength?: number | undefined, options?: {
|
|
37
37
|
highlight: boolean;
|
|
38
38
|
} | undefined) => void;
|
|
39
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
39
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
40
40
|
getTextContent: () => string | null;
|
|
41
41
|
getParentNode: () => ParentNode | null;
|
|
42
42
|
parent: () => ParentNode | null;
|
|
@@ -175,7 +175,7 @@ export declare const DrawerTrayLocator: {
|
|
|
175
175
|
debug: (maxLength?: number | undefined, options?: {
|
|
176
176
|
highlight: boolean;
|
|
177
177
|
} | undefined) => void;
|
|
178
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
178
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
179
179
|
getTextContent: () => string | null;
|
|
180
180
|
getParentNode: () => ParentNode | null;
|
|
181
181
|
parent: () => ParentNode | null;
|
|
@@ -314,7 +314,7 @@ export declare const DrawerTrayLocator: {
|
|
|
314
314
|
debug: (maxLength?: number | undefined, options?: {
|
|
315
315
|
highlight: boolean;
|
|
316
316
|
} | undefined) => void;
|
|
317
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
317
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
318
318
|
getTextContent: () => string | null;
|
|
319
319
|
getParentNode: () => ParentNode | null;
|
|
320
320
|
parent: () => ParentNode | null;
|
|
@@ -453,7 +453,7 @@ export declare const DrawerTrayLocator: {
|
|
|
453
453
|
debug: (maxLength?: number | undefined, options?: {
|
|
454
454
|
highlight: boolean;
|
|
455
455
|
} | undefined) => void;
|
|
456
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
456
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
457
457
|
getTextContent: () => string | null;
|
|
458
458
|
getParentNode: () => ParentNode | null;
|
|
459
459
|
parent: () => ParentNode | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { jsx } from '@instructure/emotion';
|
|
4
|
+
import type { TransitionType } from '@instructure/ui-motion';
|
|
4
5
|
import type { PortalNode } from '@instructure/ui-portal';
|
|
5
6
|
import type { DrawerLayoutTrayProps, DrawerLayoutTrayState, DrawerLayoutTrayStyleProps, DrawerTrayPlacement } from './props';
|
|
6
7
|
/**
|
|
@@ -8,45 +9,68 @@ import type { DrawerLayoutTrayProps, DrawerLayoutTrayState, DrawerLayoutTrayStyl
|
|
|
8
9
|
parent: DrawerLayout
|
|
9
10
|
id: DrawerLayout.Tray
|
|
10
11
|
---
|
|
12
|
+
@tsProps
|
|
11
13
|
**/
|
|
12
14
|
declare class DrawerTray extends Component<DrawerLayoutTrayProps, DrawerLayoutTrayState> {
|
|
13
15
|
static readonly componentId: "DrawerLayout.Tray";
|
|
14
16
|
static locatorAttribute: string;
|
|
15
|
-
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<"label" | "children" | "contentRef" | "open" | "dir" | "border" | "render" | "placement" | "onOpen" | "onClose" | "shadow" | "
|
|
16
|
-
|
|
17
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<"label" | "children" | "contentRef" | "open" | "dir" | "border" | "render" | "placement" | "onOpen" | "onClose" | "shadow" | "mountNode" | keyof {
|
|
18
|
+
defaultFocusElement?: import("@instructure/shared-types").UIElement | undefined;
|
|
19
|
+
liveRegion?: import("@instructure/shared-types").LiveRegion | undefined;
|
|
20
|
+
onDismiss?: ((event: import("react").UIEvent<Element, UIEvent> | import("react").FocusEvent<Element, Element>, documentClick?: boolean | undefined) => void) | undefined;
|
|
21
|
+
shouldContainFocus?: boolean | undefined;
|
|
22
|
+
shouldReturnFocus?: boolean | undefined;
|
|
23
|
+
shouldCloseOnDocumentClick?: boolean | undefined;
|
|
24
|
+
shouldCloseOnEscape?: boolean | undefined;
|
|
25
|
+
} | keyof {
|
|
26
|
+
onTransition?: ((toState: import("@instructure/ui-motion/src/Transition/BaseTransition/props").BaseTransitionStatesType, fromState: import("@instructure/ui-motion/src/Transition/BaseTransition/props").BaseTransitionStatesType) => void) | undefined;
|
|
27
|
+
onEnter?: (() => void) | undefined;
|
|
28
|
+
onEntering?: (() => void) | undefined;
|
|
29
|
+
onEntered?: ((type?: TransitionType | undefined) => void) | undefined;
|
|
30
|
+
onExit?: (() => void) | undefined;
|
|
31
|
+
onExiting?: (() => void) | undefined;
|
|
32
|
+
onExited?: ((type?: TransitionType | undefined) => void) | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
static allowedProps: readonly ("label" | "children" | "contentRef" | "open" | "dir" | "border" | "render" | "placement" | "onOpen" | "onClose" | "shadow" | "mountNode" | keyof {
|
|
35
|
+
defaultFocusElement?: import("@instructure/shared-types").UIElement | undefined;
|
|
36
|
+
liveRegion?: import("@instructure/shared-types").LiveRegion | undefined;
|
|
37
|
+
onDismiss?: ((event: import("react").UIEvent<Element, UIEvent> | import("react").FocusEvent<Element, Element>, documentClick?: boolean | undefined) => void) | undefined;
|
|
38
|
+
shouldContainFocus?: boolean | undefined;
|
|
39
|
+
shouldReturnFocus?: boolean | undefined;
|
|
40
|
+
shouldCloseOnDocumentClick?: boolean | undefined;
|
|
41
|
+
shouldCloseOnEscape?: boolean | undefined;
|
|
42
|
+
} | keyof {
|
|
43
|
+
onTransition?: ((toState: import("@instructure/ui-motion/src/Transition/BaseTransition/props").BaseTransitionStatesType, fromState: import("@instructure/ui-motion/src/Transition/BaseTransition/props").BaseTransitionStatesType) => void) | undefined;
|
|
44
|
+
onEnter?: (() => void) | undefined;
|
|
45
|
+
onEntering?: (() => void) | undefined;
|
|
46
|
+
onEntered?: ((type?: TransitionType | undefined) => void) | undefined;
|
|
47
|
+
onExit?: (() => void) | undefined;
|
|
48
|
+
onExiting?: (() => void) | undefined;
|
|
49
|
+
onExited?: ((type?: TransitionType | undefined) => void) | undefined;
|
|
50
|
+
})[];
|
|
17
51
|
static defaultProps: {
|
|
18
|
-
children: null;
|
|
19
52
|
shouldContainFocus: boolean;
|
|
20
53
|
shouldCloseOnEscape: boolean;
|
|
21
54
|
shouldCloseOnDocumentClick: boolean;
|
|
22
55
|
shouldReturnFocus: boolean;
|
|
23
56
|
open: boolean;
|
|
24
|
-
onOpen: () => void;
|
|
25
57
|
shadow: boolean;
|
|
26
58
|
border: boolean;
|
|
27
59
|
placement: string;
|
|
28
|
-
mountNode: null;
|
|
29
|
-
onEnter: () => void;
|
|
30
|
-
onEntering: () => void;
|
|
31
|
-
onEntered: () => void;
|
|
32
|
-
onExit: () => void;
|
|
33
|
-
onExiting: () => void;
|
|
34
|
-
onExited: () => void;
|
|
35
|
-
contentRef: (node: any) => void;
|
|
36
60
|
};
|
|
37
|
-
|
|
38
|
-
_DOMNode
|
|
39
|
-
|
|
40
|
-
|
|
61
|
+
ref: HTMLDivElement | null;
|
|
62
|
+
private _DOMNode;
|
|
63
|
+
get _content(): HTMLDivElement | null;
|
|
64
|
+
constructor(props: DrawerLayoutTrayProps);
|
|
41
65
|
componentDidMount(): void;
|
|
42
|
-
componentDidUpdate(prevProps:
|
|
66
|
+
componentDidUpdate(prevProps: DrawerLayoutTrayProps): void;
|
|
43
67
|
makeStyleProps: () => DrawerLayoutTrayStyleProps;
|
|
44
68
|
get placement(): DrawerTrayPlacement;
|
|
45
|
-
get direction(): "
|
|
46
|
-
get transition():
|
|
47
|
-
handleContentRef: (node:
|
|
48
|
-
handleTransitionEntered: () => void;
|
|
49
|
-
handleTransitionExited: () => void;
|
|
69
|
+
get direction(): "right" | "left";
|
|
70
|
+
get transition(): TransitionType;
|
|
71
|
+
handleContentRef: (node: HTMLDivElement | null) => void;
|
|
72
|
+
handleTransitionEntered: (_transitionType?: TransitionType | undefined) => void;
|
|
73
|
+
handleTransitionExited: (_transitionType?: TransitionType | undefined) => void;
|
|
50
74
|
handlePortalOpen: (DOMNode: PortalNode) => void;
|
|
51
75
|
get DOMNode(): PortalNode;
|
|
52
76
|
set DOMNode(el: PortalNode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/DrawerTray/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/DrawerTray/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAM5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQxD,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAEhB;;;;;;GAMG;AACH,cAGM,UAAW,SAAQ,SAAS,CAChC,qBAAqB,EACrB,qBAAqB,CACtB;IACC,MAAM,CAAC,QAAQ,CAAC,WAAW,sBAA+B;IAE1D,MAAM,CAAC,gBAAgB,SAAqB;IAE5C,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;MASlB;IAED,GAAG,EAAE,cAAc,GAAG,IAAI,CAAO;IAEjC,OAAO,CAAC,QAAQ,CAAmB;IAEnC,IAAI,QAAQ,0BAMX;gBAEW,KAAK,EAAE,qBAAqB;IASxC,iBAAiB;IAIjB,kBAAkB,CAAC,SAAS,EAAE,qBAAqB;IASnD,cAAc,QAAO,0BAA0B,CAI9C;IAED,IAAI,SAAS,wBAMZ;IAED,IAAI,SAAS,qBAEZ;IAED,IAAI,UAAU,IAAI,cAAc,CAE/B;IAED,gBAAgB,SAAU,cAAc,GAAG,IAAI,UAM9C;IAED,uBAAuB,yDAEtB;IAED,sBAAsB,yDAIrB;IAED,gBAAgB,YAAa,UAAU,UAKtC;IAED,IAAI,OAAO,IAIK,UAAU,CAFzB;IAED,IAAI,OAAO,CAAC,EAAE,EAAE,UAAU,EAEzB;IAED,aAAa;IAWb,MAAM;CAiHP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -2,35 +2,93 @@ import React from 'react';
|
|
|
2
2
|
import type { PositionMountNode } from '@instructure/ui-position';
|
|
3
3
|
import type { BidirectionalProps } from '@instructure/ui-i18n';
|
|
4
4
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
5
|
-
import type { PropValidators, DrawerLayoutTrayTheme, OtherHTMLAttributes, LiveRegion } from '@instructure/shared-types';
|
|
5
|
+
import type { PropValidators, DrawerLayoutTrayTheme, OtherHTMLAttributes, LiveRegion, UIElement } from '@instructure/shared-types';
|
|
6
|
+
import { BaseTransitionStatesType, TransitionType } from '@instructure/ui-motion/src/Transition/BaseTransition/props';
|
|
6
7
|
declare type DrawerTrayPlacement = 'start' | 'end';
|
|
7
8
|
declare type DrawerLayoutTrayOwnProps = {
|
|
8
9
|
label: string;
|
|
9
|
-
children?: React.ReactNode | ((
|
|
10
|
-
render?: (
|
|
10
|
+
children?: React.ReactNode | (() => React.ReactNode);
|
|
11
|
+
render?: () => React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Placement of the `<DrawerLayout.Tray />`
|
|
14
|
+
*/
|
|
11
15
|
placement?: DrawerTrayPlacement;
|
|
16
|
+
/**
|
|
17
|
+
* If the tray is open or closed.
|
|
18
|
+
*/
|
|
12
19
|
open?: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Called when the `<DrawerLayout.Tray />` is opened
|
|
22
|
+
*/
|
|
23
|
+
onOpen?: (transitionType?: TransitionType) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Called when the `<DrawerLayout.Tray />` is closed
|
|
26
|
+
*/
|
|
27
|
+
onClose?: (transitionType?: TransitionType) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Should the `<DrawerLayout.Tray />` have a border
|
|
30
|
+
*/
|
|
15
31
|
border?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Should the `<DrawerLayout.Tray />` have a shadow
|
|
34
|
+
*/
|
|
16
35
|
shadow?: boolean;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Ref function for the `<DrawerLayout.Tray />` content
|
|
38
|
+
*/
|
|
39
|
+
contentRef?: (element: HTMLDivElement | null) => void;
|
|
40
|
+
/**
|
|
41
|
+
* An element or a function returning an element to use as the mount node
|
|
42
|
+
* for the `<DrawerLayout.Tray />` when tray is overlaying content
|
|
43
|
+
*/
|
|
25
44
|
mountNode?: PositionMountNode;
|
|
26
|
-
|
|
45
|
+
} & PropsPassedToDialog & PropsPassedToTransition & BidirectionalProps;
|
|
46
|
+
declare type PropsPassedToDialog = {
|
|
47
|
+
/**
|
|
48
|
+
* An element or a function returning an element to focus by default
|
|
49
|
+
*/
|
|
50
|
+
defaultFocusElement?: UIElement;
|
|
51
|
+
/**
|
|
52
|
+
* An element, function returning an element, or array of elements that will not be hidden from
|
|
53
|
+
* the screen reader when the `<DrawerLayout.Tray />` is open
|
|
54
|
+
*/
|
|
27
55
|
liveRegion?: LiveRegion;
|
|
28
|
-
onDismiss?: (
|
|
56
|
+
onDismiss?: (event: React.UIEvent | React.FocusEvent, documentClick?: boolean) => void;
|
|
29
57
|
shouldContainFocus?: boolean;
|
|
30
58
|
shouldReturnFocus?: boolean;
|
|
31
59
|
shouldCloseOnDocumentClick?: boolean;
|
|
32
60
|
shouldCloseOnEscape?: boolean;
|
|
33
|
-
}
|
|
61
|
+
};
|
|
62
|
+
declare type PropsPassedToTransition = {
|
|
63
|
+
/**
|
|
64
|
+
* Callback fired when the `<DrawerLayout.Tray />` transitions in/out
|
|
65
|
+
*/
|
|
66
|
+
onTransition?: (toState: BaseTransitionStatesType, fromState: BaseTransitionStatesType) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Callback fired before the `<DrawerLayout.Tray />` transitions in
|
|
69
|
+
*/
|
|
70
|
+
onEnter?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* Callback fired as the `<DrawerLayout.Tray />` begins to transition in
|
|
73
|
+
*/
|
|
74
|
+
onEntering?: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Callback fired after the `<DrawerLayout.Tray />` finishes transitioning in
|
|
77
|
+
*/
|
|
78
|
+
onEntered?: (type?: TransitionType) => void;
|
|
79
|
+
/**
|
|
80
|
+
* Callback fired right before the `<DrawerLayout.Tray />` transitions out
|
|
81
|
+
*/
|
|
82
|
+
onExit?: () => void;
|
|
83
|
+
/**
|
|
84
|
+
* Callback fired as the `<DrawerLayout.Tray />` begins to transition out
|
|
85
|
+
*/
|
|
86
|
+
onExiting?: () => void;
|
|
87
|
+
/**
|
|
88
|
+
* Callback fired after the `<DrawerLayout.Tray />` finishes transitioning out
|
|
89
|
+
*/
|
|
90
|
+
onExited?: (type?: TransitionType) => void;
|
|
91
|
+
};
|
|
34
92
|
declare type DrawerLayoutTrayState = {
|
|
35
93
|
transitioning: boolean;
|
|
36
94
|
portalOpen: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/DrawerTray/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,UAAU,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/DrawerTray/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EACV,cAAc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cAAc,CAAC,QAAQ,CA+BvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eA2BnB,CAAA;AAED,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,qBAAqB,EACtB,CAAA;AACD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
3
|
+
import type { DrawerLayoutProps } from '../props';
|
|
4
|
+
import type { DrawerLayoutTrayProps } from '../DrawerTray/props';
|
|
5
|
+
declare type DrawerLayoutFixtureProps = {
|
|
6
|
+
layoutWidth?: string | number;
|
|
7
|
+
trayWidth?: string | number;
|
|
8
|
+
placement?: DrawerLayoutTrayProps['placement'];
|
|
9
|
+
open?: DrawerLayoutTrayProps['open'];
|
|
10
|
+
onOverlayTrayChange?: DrawerLayoutProps['onOverlayTrayChange'];
|
|
11
|
+
};
|
|
12
|
+
export default class DrawerLayoutFixture extends Component<DrawerLayoutFixtureProps> {
|
|
4
13
|
static propTypes: {
|
|
5
14
|
layoutWidth: PropTypes.Requireable<string>;
|
|
6
15
|
trayWidth: PropTypes.Requireable<string>;
|
|
@@ -17,4 +26,5 @@ export default class DrawerLayoutFixture extends Component {
|
|
|
17
26
|
};
|
|
18
27
|
render(): JSX.Element;
|
|
19
28
|
}
|
|
29
|
+
export {};
|
|
20
30
|
//# sourceMappingURL=DrawerLayout.fixture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerLayout.fixture.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/__fixtures__/DrawerLayout.fixture.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerLayout.fixture.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/__fixtures__/DrawerLayout.fixture.tsx"],"names":[],"mappings":"AAwBA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,SAAS,MAAM,YAAY,CAAA;AAGlC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAEhE,aAAK,wBAAwB,GAAG;IAC9B,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,SAAS,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAA;IAC9C,IAAI,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;IACpC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC,qBAAqB,CAAC,CAAA;CAC/D,CAAA;AAED,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,SAAS,CAAC,wBAAwB,CAAC;IAClF,MAAM,CAAC,SAAS;;;;;;MAMf;IAED,MAAM,CAAC,YAAY;;;;;;MAMlB;IAED,MAAM;CA2BP"}
|