@instructure/ui-drawer-layout 11.6.0 → 11.6.1-snapshot-129
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 +36 -295
- package/es/DrawerLayout/{DrawerContent → v1/DrawerContent}/index.js +1 -1
- package/es/DrawerLayout/{DrawerTray → v1/DrawerTray}/index.js +1 -1
- package/es/DrawerLayout/{index.js → v1/index.js} +1 -1
- package/es/DrawerLayout/v2/DrawerContent/index.js +124 -0
- package/es/DrawerLayout/v2/DrawerContent/props.js +26 -0
- package/es/DrawerLayout/v2/DrawerContent/styles.js +51 -0
- package/es/DrawerLayout/v2/DrawerTray/index.js +227 -0
- package/es/DrawerLayout/v2/DrawerTray/props.js +26 -0
- package/es/DrawerLayout/v2/DrawerTray/styles.js +94 -0
- package/es/DrawerLayout/v2/__fixtures__/DrawerLayout.fixture.js +73 -0
- package/es/DrawerLayout/v2/index.js +224 -0
- package/es/DrawerLayout/v2/props.js +26 -0
- package/es/DrawerLayout/v2/styles.js +44 -0
- package/es/{index.js → exports/a.js} +1 -1
- package/es/exports/b.js +24 -0
- package/lib/DrawerLayout/{DrawerContent → v1/DrawerContent}/index.js +1 -1
- package/lib/DrawerLayout/{DrawerTray → v1/DrawerTray}/index.js +1 -1
- package/lib/DrawerLayout/v1/index.js +245 -0
- package/lib/DrawerLayout/v2/DrawerContent/index.js +129 -0
- package/lib/DrawerLayout/v2/DrawerContent/props.js +31 -0
- package/lib/DrawerLayout/v2/DrawerContent/styles.js +57 -0
- package/lib/DrawerLayout/v2/DrawerTray/index.js +232 -0
- package/lib/DrawerLayout/v2/DrawerTray/props.js +31 -0
- package/lib/DrawerLayout/v2/DrawerTray/styles.js +100 -0
- package/lib/DrawerLayout/v2/__fixtures__/DrawerLayout.fixture.js +79 -0
- package/lib/DrawerLayout/{index.js → v2/index.js} +1 -1
- package/lib/DrawerLayout/v2/props.js +31 -0
- package/lib/DrawerLayout/v2/styles.js +50 -0
- package/lib/{index.js → exports/a.js} +4 -4
- package/lib/exports/b.js +24 -0
- package/package.json +47 -25
- package/src/DrawerLayout/{DrawerContent → v1/DrawerContent}/index.tsx +1 -1
- package/src/DrawerLayout/{DrawerTray → v1/DrawerTray}/index.tsx +1 -1
- package/src/DrawerLayout/v1/index.tsx +334 -0
- package/src/DrawerLayout/v2/DrawerContent/index.tsx +147 -0
- package/src/DrawerLayout/v2/DrawerContent/props.ts +73 -0
- package/src/DrawerLayout/v2/DrawerContent/styles.ts +68 -0
- package/src/DrawerLayout/v2/DrawerTray/index.tsx +288 -0
- package/src/DrawerLayout/v2/DrawerTray/props.ts +228 -0
- package/src/DrawerLayout/v2/DrawerTray/styles.ts +106 -0
- package/src/DrawerLayout/v2/README.md +231 -0
- package/src/DrawerLayout/v2/__fixtures__/DrawerLayout.fixture.tsx +75 -0
- package/src/DrawerLayout/{index.tsx → v2/index.tsx} +1 -1
- package/src/DrawerLayout/v2/props.ts +72 -0
- package/src/DrawerLayout/v2/styles.ts +47 -0
- package/src/{index.ts → exports/a.ts} +4 -4
- package/src/exports/b.ts +29 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/DrawerLayout/v1/DrawerContent/index.d.ts.map +1 -0
- package/types/DrawerLayout/v1/DrawerContent/props.d.ts.map +1 -0
- package/types/DrawerLayout/v1/DrawerContent/styles.d.ts.map +1 -0
- package/types/DrawerLayout/v1/DrawerContent/theme.d.ts.map +1 -0
- package/types/DrawerLayout/v1/DrawerTray/index.d.ts.map +1 -0
- package/types/DrawerLayout/v1/DrawerTray/props.d.ts.map +1 -0
- package/types/DrawerLayout/v1/DrawerTray/styles.d.ts.map +1 -0
- package/types/DrawerLayout/v1/DrawerTray/theme.d.ts.map +1 -0
- package/types/DrawerLayout/v1/__fixtures__/DrawerLayout.fixture.d.ts.map +1 -0
- package/types/DrawerLayout/v1/index.d.ts.map +1 -0
- package/types/DrawerLayout/v1/props.d.ts.map +1 -0
- package/types/DrawerLayout/v1/styles.d.ts.map +1 -0
- package/types/DrawerLayout/v2/DrawerContent/index.d.ts +35 -0
- package/types/DrawerLayout/v2/DrawerContent/index.d.ts.map +1 -0
- package/types/DrawerLayout/v2/DrawerContent/props.d.ts +28 -0
- package/types/DrawerLayout/v2/DrawerContent/props.d.ts.map +1 -0
- package/types/DrawerLayout/v2/DrawerContent/styles.d.ts +16 -0
- package/types/DrawerLayout/v2/DrawerContent/styles.d.ts.map +1 -0
- package/types/DrawerLayout/v2/DrawerTray/index.d.ts +61 -0
- package/types/DrawerLayout/v2/DrawerTray/index.d.ts.map +1 -0
- package/types/DrawerLayout/v2/DrawerTray/props.d.ts +120 -0
- package/types/DrawerLayout/v2/DrawerTray/props.d.ts.map +1 -0
- package/types/DrawerLayout/v2/DrawerTray/styles.d.ts +16 -0
- package/types/DrawerLayout/v2/DrawerTray/styles.d.ts.map +1 -0
- package/types/DrawerLayout/v2/__fixtures__/DrawerLayout.fixture.d.ts +22 -0
- package/types/DrawerLayout/v2/__fixtures__/DrawerLayout.fixture.d.ts.map +1 -0
- package/types/DrawerLayout/v2/index.d.ts +146 -0
- package/types/DrawerLayout/v2/index.d.ts.map +1 -0
- package/types/DrawerLayout/v2/props.d.ts +33 -0
- package/types/DrawerLayout/v2/props.d.ts.map +1 -0
- package/types/DrawerLayout/v2/styles.d.ts +14 -0
- package/types/DrawerLayout/v2/styles.d.ts.map +1 -0
- package/types/exports/a.d.ts +5 -0
- package/types/exports/a.d.ts.map +1 -0
- package/types/exports/b.d.ts +5 -0
- package/types/exports/b.d.ts.map +1 -0
- package/types/DrawerLayout/DrawerContent/index.d.ts.map +0 -1
- package/types/DrawerLayout/DrawerContent/props.d.ts.map +0 -1
- package/types/DrawerLayout/DrawerContent/styles.d.ts.map +0 -1
- package/types/DrawerLayout/DrawerContent/theme.d.ts.map +0 -1
- package/types/DrawerLayout/DrawerTray/index.d.ts.map +0 -1
- package/types/DrawerLayout/DrawerTray/props.d.ts.map +0 -1
- package/types/DrawerLayout/DrawerTray/styles.d.ts.map +0 -1
- package/types/DrawerLayout/DrawerTray/theme.d.ts.map +0 -1
- package/types/DrawerLayout/__fixtures__/DrawerLayout.fixture.d.ts.map +0 -1
- package/types/DrawerLayout/index.d.ts.map +0 -1
- package/types/DrawerLayout/props.d.ts.map +0 -1
- package/types/DrawerLayout/styles.d.ts.map +0 -1
- package/types/index.d.ts +0 -5
- package/types/index.d.ts.map +0 -1
- /package/es/DrawerLayout/{DrawerContent → v1/DrawerContent}/props.js +0 -0
- /package/es/DrawerLayout/{DrawerContent → v1/DrawerContent}/styles.js +0 -0
- /package/es/DrawerLayout/{DrawerContent → v1/DrawerContent}/theme.js +0 -0
- /package/es/DrawerLayout/{DrawerTray → v1/DrawerTray}/props.js +0 -0
- /package/es/DrawerLayout/{DrawerTray → v1/DrawerTray}/styles.js +0 -0
- /package/es/DrawerLayout/{DrawerTray → v1/DrawerTray}/theme.js +0 -0
- /package/es/DrawerLayout/{__fixtures__ → v1/__fixtures__}/DrawerLayout.fixture.js +0 -0
- /package/es/DrawerLayout/{props.js → v1/props.js} +0 -0
- /package/es/DrawerLayout/{styles.js → v1/styles.js} +0 -0
- /package/lib/DrawerLayout/{DrawerContent → v1/DrawerContent}/props.js +0 -0
- /package/lib/DrawerLayout/{DrawerContent → v1/DrawerContent}/styles.js +0 -0
- /package/lib/DrawerLayout/{DrawerContent → v1/DrawerContent}/theme.js +0 -0
- /package/lib/DrawerLayout/{DrawerTray → v1/DrawerTray}/props.js +0 -0
- /package/lib/DrawerLayout/{DrawerTray → v1/DrawerTray}/styles.js +0 -0
- /package/lib/DrawerLayout/{DrawerTray → v1/DrawerTray}/theme.js +0 -0
- /package/lib/DrawerLayout/{__fixtures__ → v1/__fixtures__}/DrawerLayout.fixture.js +0 -0
- /package/lib/DrawerLayout/{props.js → v1/props.js} +0 -0
- /package/lib/DrawerLayout/{styles.js → v1/styles.js} +0 -0
- /package/src/DrawerLayout/{DrawerContent → v1/DrawerContent}/props.ts +0 -0
- /package/src/DrawerLayout/{DrawerContent → v1/DrawerContent}/styles.ts +0 -0
- /package/src/DrawerLayout/{DrawerContent → v1/DrawerContent}/theme.ts +0 -0
- /package/src/DrawerLayout/{DrawerTray → v1/DrawerTray}/props.ts +0 -0
- /package/src/DrawerLayout/{DrawerTray → v1/DrawerTray}/styles.ts +0 -0
- /package/src/DrawerLayout/{DrawerTray → v1/DrawerTray}/theme.ts +0 -0
- /package/src/DrawerLayout/{README.md → v1/README.md} +0 -0
- /package/src/DrawerLayout/{__fixtures__ → v1/__fixtures__}/DrawerLayout.fixture.tsx +0 -0
- /package/src/DrawerLayout/{props.ts → v1/props.ts} +0 -0
- /package/src/DrawerLayout/{styles.ts → v1/styles.ts} +0 -0
- /package/types/DrawerLayout/{DrawerContent → v1/DrawerContent}/index.d.ts +0 -0
- /package/types/DrawerLayout/{DrawerContent → v1/DrawerContent}/props.d.ts +0 -0
- /package/types/DrawerLayout/{DrawerContent → v1/DrawerContent}/styles.d.ts +0 -0
- /package/types/DrawerLayout/{DrawerContent → v1/DrawerContent}/theme.d.ts +0 -0
- /package/types/DrawerLayout/{DrawerTray → v1/DrawerTray}/index.d.ts +0 -0
- /package/types/DrawerLayout/{DrawerTray → v1/DrawerTray}/props.d.ts +0 -0
- /package/types/DrawerLayout/{DrawerTray → v1/DrawerTray}/styles.d.ts +0 -0
- /package/types/DrawerLayout/{DrawerTray → v1/DrawerTray}/theme.d.ts +0 -0
- /package/types/DrawerLayout/{__fixtures__ → v1/__fixtures__}/DrawerLayout.fixture.d.ts +0 -0
- /package/types/DrawerLayout/{index.d.ts → v1/index.d.ts} +0 -0
- /package/types/DrawerLayout/{props.d.ts → v1/props.d.ts} +0 -0
- /package/types/DrawerLayout/{styles.d.ts → v1/styles.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v1/DrawerContent/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,E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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,KAAK,6BAA6B,GAAG;IACnC,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,2BAA2B,CAAA;AAEjD,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,wBAAwB,GAAG,2BAA2B,GACzD,cAAc,CAAC,wBAAwB,EAAE,wBAAwB,CAAC,GAClE,mBAAmB,CAAC,2BAA2B,CAAC,CAAA;AAElD,KAAK,wBAAwB,GAAG,cAAc,CAAC,eAAe,CAAC,CAAA;AAC/D,QAAA,MAAM,YAAY,EAAE,eAMnB,CAAA;AAED,YAAY,EACV,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,iBAAiB,EAClB,CAAA;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v1/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,GACjB,gBAAgB,wBAAwB,EACxC,QAAQ,wBAAwB,EAChC,OAAO,6BAA6B,KACnC,wBAkBF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v1/DrawerContent/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEpE;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,GAAI,OAAO,KAAK,KAAG,wBAO9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v1/DrawerTray/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAK5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQxD,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAEhB;;;;;GAKG;AACH,cAEM,UAAW,SAAQ,SAAS,CAChC,qBAAqB,EACrB,qBAAqB,CACtB;IACC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAG,mBAAmB,CAAS;IAE1D,MAAM,CAAC,gBAAgB,SAAqB;IAE5C,MAAM,CAAC,YAAY;;;2EAsDc,CAAC;;;;;;;;;yBA4CxB,CAAA;;;wBAoBD,CAAC;SAtHwB;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,IAKN,mBAAmB,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H,QAAA,MAAM,aAAa,GACjB,gBAAgB,qBAAqB,EACrC,OAAO,qBAAqB,EAC5B,OAAO,0BAA0B,KAChC,qBAwDF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v1/DrawerTray/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAEjE;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,GAAI,OAAO,KAAK,KAAG,qBAkB9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerLayout.fixture.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v1/__fixtures__/DrawerLayout.fixture.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAEhE,KAAK,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,YAAY;;;;;;MAMlB;IAED,MAAM;CA2BP"}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AAO,iBAQzB,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import type { DrawerLayoutContentProps, DrawerLayoutContentStyleProps } from './props';
|
|
3
|
+
/**
|
|
4
|
+
---
|
|
5
|
+
parent: DrawerLayout
|
|
6
|
+
id: DrawerLayout.Content
|
|
7
|
+
---
|
|
8
|
+
**/
|
|
9
|
+
declare class DrawerContent extends Component<DrawerLayoutContentProps> {
|
|
10
|
+
static readonly componentId = "DrawerLayout.Content";
|
|
11
|
+
static locatorAttribute: string;
|
|
12
|
+
static allowedProps: readonly (keyof {
|
|
13
|
+
label: string;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
contentRef?: (element: HTMLDivElement | null) => void;
|
|
16
|
+
onSizeChange?: (contentSize: import("./props").DrawerContentSize) => void;
|
|
17
|
+
role?: import("react").AriaRole;
|
|
18
|
+
})[];
|
|
19
|
+
static defaultProps: {
|
|
20
|
+
role: string;
|
|
21
|
+
};
|
|
22
|
+
ref: HTMLDivElement | null;
|
|
23
|
+
get _content(): HTMLDivElement | null;
|
|
24
|
+
private _resizeListener?;
|
|
25
|
+
private _debounced?;
|
|
26
|
+
componentDidMount(): void;
|
|
27
|
+
componentDidUpdate(): void;
|
|
28
|
+
componentWillUnmount(): void;
|
|
29
|
+
makeStyleProps: (shouldTransition: DrawerLayoutContentStyleProps["shouldTransition"]) => DrawerLayoutContentStyleProps;
|
|
30
|
+
handleContentRef: (node: HTMLDivElement | null) => void;
|
|
31
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
32
|
+
}
|
|
33
|
+
export default DrawerContent;
|
|
34
|
+
export { DrawerContent };
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v2/DrawerContent/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWjC,OAAO,KAAK,EACV,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,SAAS,CAAA;AAEhB;;;;;GAKG;AACH,cACM,aAAc,SAAQ,SAAS,CAAC,wBAAwB,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,WAAW,0BAAyB;IAEpD,MAAM,CAAC,gBAAgB,SAAwB;IAC/C,MAAM,CAAC,YAAY;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;MAElB;IAED,GAAG,EAAE,cAAc,GAAG,IAAI,CAAO;IAEjC,IAAI,QAAQ,0BAMX;IAED,OAAO,CAAC,eAAe,CAAC,CAAgB;IAExC,OAAO,CAAC,UAAU,CAAC,CAAwD;IAE3E,iBAAiB;IAgCjB,kBAAkB;IAIlB,oBAAoB;IAMpB,cAAc,GACZ,kBAAkB,6BAA6B,CAAC,kBAAkB,CAAC,KAClE,6BAA6B,CAE/B;IAED,gBAAgB,GAAI,MAAM,cAAc,GAAG,IAAI,UAM9C;IAED,MAAM;CAiBP;AAED,eAAe,aAAa,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AriaRole } from 'react';
|
|
2
|
+
import type { DrawerLayoutContentTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
3
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
|
+
type DrawerContentSize = {
|
|
5
|
+
width: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
};
|
|
8
|
+
type DrawerLayoutContentOwnProps = {
|
|
9
|
+
label: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
contentRef?: (element: HTMLDivElement | null) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Callback fired whenever the `<DrawerLayout.Content />` changes size
|
|
14
|
+
*/
|
|
15
|
+
onSizeChange?: (contentSize: DrawerContentSize) => void;
|
|
16
|
+
role?: AriaRole;
|
|
17
|
+
};
|
|
18
|
+
type DrawerLayoutContentStyleProps = {
|
|
19
|
+
shouldTransition: boolean;
|
|
20
|
+
};
|
|
21
|
+
type PropKeys = keyof DrawerLayoutContentOwnProps;
|
|
22
|
+
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
23
|
+
type DrawerLayoutContentProps = DrawerLayoutContentOwnProps & WithStyleProps<DrawerLayoutContentTheme, DrawerLayoutContentStyle> & OtherHTMLAttributes<DrawerLayoutContentOwnProps>;
|
|
24
|
+
type DrawerLayoutContentStyle = ComponentStyle<'drawerContent'>;
|
|
25
|
+
declare const allowedProps: AllowedPropKeys;
|
|
26
|
+
export type { DrawerLayoutContentProps, DrawerLayoutContentStyleProps, DrawerLayoutContentStyle, DrawerContentSize };
|
|
27
|
+
export { allowedProps };
|
|
28
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v2/DrawerContent/props.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,KAAK,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D,KAAK,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,KAAK,6BAA6B,GAAG;IACnC,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,2BAA2B,CAAA;AAEjD,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,wBAAwB,GAAG,2BAA2B,GACzD,cAAc,CAAC,wBAAwB,EAAE,wBAAwB,CAAC,GAClE,mBAAmB,CAAC,2BAA2B,CAAC,CAAA;AAElD,KAAK,wBAAwB,GAAG,cAAc,CAAC,eAAe,CAAC,CAAA;AAC/D,QAAA,MAAM,YAAY,EAAE,eAMnB,CAAA;AAED,YAAY,EACV,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,iBAAiB,EAClB,CAAA;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { NewComponentTypes, SharedTokens } from '@instructure/ui-themes';
|
|
2
|
+
import type { DrawerLayoutContentProps, DrawerLayoutContentStyleProps, DrawerLayoutContentStyle } from './props';
|
|
3
|
+
/**
|
|
4
|
+
* ---
|
|
5
|
+
* private: true
|
|
6
|
+
* ---
|
|
7
|
+
* Generates the style object from the theme and provided additional information
|
|
8
|
+
* @param {Object} componentTheme The theme variable object.
|
|
9
|
+
* @param {Object} props the props of the component, the style is applied to
|
|
10
|
+
* @param {Object} sharedTokens Shared token object that stores common values for the theme.
|
|
11
|
+
* @param {Object} state the state of the component, the style is applied to
|
|
12
|
+
* @return {Object} The final style object, which will be used in the component
|
|
13
|
+
*/
|
|
14
|
+
declare const generateStyle: (componentTheme: NewComponentTypes["DrawerLayoutContent"], _props: DrawerLayoutContentProps, _sharedTokens: SharedTokens, state: DrawerLayoutContentStyleProps) => DrawerLayoutContentStyle;
|
|
15
|
+
export default generateStyle;
|
|
16
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v2/DrawerContent/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC7E,OAAO,KAAK,EACV,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAEhB;;;;;;;;;;GAUG;AACH,QAAA,MAAM,aAAa,GACjB,gBAAgB,iBAAiB,CAAC,qBAAqB,CAAC,EACxD,QAAQ,wBAAwB,EAChC,eAAe,YAAY,EAC3B,OAAO,6BAA6B,KACnC,wBAkBF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import type { TransitionType } from '@instructure/ui-motion';
|
|
3
|
+
import type { PortalNode } from '@instructure/ui-portal';
|
|
4
|
+
import type { DrawerLayoutTrayProps, DrawerLayoutTrayState, DrawerLayoutTrayStyleProps, DrawerTrayPlacement } from './props';
|
|
5
|
+
/**
|
|
6
|
+
---
|
|
7
|
+
parent: DrawerLayout
|
|
8
|
+
id: DrawerLayout.Tray
|
|
9
|
+
---
|
|
10
|
+
**/
|
|
11
|
+
declare class DrawerTray extends Component<DrawerLayoutTrayProps, DrawerLayoutTrayState> {
|
|
12
|
+
static readonly componentId: "DrawerLayout.Tray";
|
|
13
|
+
static locatorAttribute: string;
|
|
14
|
+
static allowedProps: readonly ("label" | "children" | "contentRef" | "dir" | "open" | "border" | "render" | "placement" | "onOpen" | "onClose" | "shadow" | "mountNode" | keyof {
|
|
15
|
+
defaultFocusElement?: import("@instructure/shared-types").UIElement;
|
|
16
|
+
liveRegion?: import("@instructure/shared-types").LiveRegion;
|
|
17
|
+
onDismiss?: (event: React.UIEvent | React.FocusEvent, documentClick?: boolean) => void;
|
|
18
|
+
shouldContainFocus?: boolean;
|
|
19
|
+
shouldReturnFocus?: boolean;
|
|
20
|
+
shouldCloseOnDocumentClick?: boolean;
|
|
21
|
+
shouldCloseOnEscape?: boolean;
|
|
22
|
+
} | keyof {
|
|
23
|
+
onTransition?: (toState: import("@instructure/ui-motion").BaseTransitionStatesType, fromState: import("@instructure/ui-motion").BaseTransitionStatesType) => void;
|
|
24
|
+
onEnter?: () => void;
|
|
25
|
+
onEntering?: () => void;
|
|
26
|
+
onEntered?: (type?: TransitionType) => void;
|
|
27
|
+
onExit?: () => void;
|
|
28
|
+
onExiting?: () => void;
|
|
29
|
+
onExited?: (type?: TransitionType) => void;
|
|
30
|
+
})[];
|
|
31
|
+
static defaultProps: {
|
|
32
|
+
shouldContainFocus: boolean;
|
|
33
|
+
shouldCloseOnEscape: boolean;
|
|
34
|
+
shouldCloseOnDocumentClick: boolean;
|
|
35
|
+
shouldReturnFocus: boolean;
|
|
36
|
+
open: boolean;
|
|
37
|
+
shadow: boolean;
|
|
38
|
+
border: boolean;
|
|
39
|
+
placement: string;
|
|
40
|
+
};
|
|
41
|
+
ref: HTMLDivElement | null;
|
|
42
|
+
private _DOMNode;
|
|
43
|
+
get _content(): HTMLDivElement | null;
|
|
44
|
+
constructor(props: DrawerLayoutTrayProps);
|
|
45
|
+
componentDidMount(): void;
|
|
46
|
+
componentDidUpdate(prevProps: DrawerLayoutTrayProps): void;
|
|
47
|
+
makeStyleProps: () => DrawerLayoutTrayStyleProps;
|
|
48
|
+
get placement(): DrawerTrayPlacement;
|
|
49
|
+
get transition(): TransitionType;
|
|
50
|
+
handleContentRef: (node: HTMLDivElement | null) => void;
|
|
51
|
+
handleTransitionEntered: (_transitionType?: TransitionType) => void;
|
|
52
|
+
handleTransitionExited: (_transitionType?: TransitionType) => void;
|
|
53
|
+
handlePortalOpen: (DOMNode: PortalNode) => void;
|
|
54
|
+
get DOMNode(): PortalNode;
|
|
55
|
+
set DOMNode(el: PortalNode);
|
|
56
|
+
renderContent(): import("react").ReactNode;
|
|
57
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
58
|
+
}
|
|
59
|
+
export default DrawerTray;
|
|
60
|
+
export { DrawerTray };
|
|
61
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v2/DrawerTray/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAK5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAOxD,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAEhB;;;;;GAKG;AACH,cAEM,UAAW,SAAQ,SAAS,CAChC,qBAAqB,EACrB,qBAAqB,CACtB;IACC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAG,mBAAmB,CAAS;IAE1D,MAAM,CAAC,gBAAgB,SAAqB;IAE5C,MAAM,CAAC,YAAY;;;2EAwDoB,CAAC;;;;;;;;;yBA4C3B,CAAC;;;wBAwBV,CAAD;SA5H+B;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,IAKN,mBAAmB,CACzB;IAED,IAAI,UAAU,IAAI,cAAc,CAE/B;IAED,gBAAgB,GAAI,MAAM,cAAc,GAAG,IAAI,UAM9C;IAED,uBAAuB,GAAI,kBAAkB,cAAc,UAE1D;IAED,sBAAsB,GAAI,kBAAkB,cAAc,UAIzD;IAED,gBAAgB,GAAI,SAAS,UAAU,UAKtC;IAED,IAAI,OAAO,IAIK,UAAU,CAFzB;IAED,IAAI,OAAO,CAAC,EAAE,EAAE,UAAU,EAEzB;IAED,aAAa;IAWb,MAAM;CAgHP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PositionMountNode } from '@instructure/ui-position';
|
|
3
|
+
import type { TextDirectionContextConsumerProps } from '@instructure/ui-i18n';
|
|
4
|
+
import type { ComponentStyle, WithStyleProps } from '@instructure/emotion';
|
|
5
|
+
import type { DrawerLayoutTrayTheme, LiveRegion, OtherHTMLAttributes, UIElement } from '@instructure/shared-types';
|
|
6
|
+
import type { BaseTransitionStatesType, TransitionType } from '@instructure/ui-motion';
|
|
7
|
+
type DrawerTrayPlacement = 'start' | 'end';
|
|
8
|
+
type DrawerLayoutTrayOwnProps = {
|
|
9
|
+
label: string;
|
|
10
|
+
children?: React.ReactNode | (() => React.ReactNode);
|
|
11
|
+
render?: () => React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Placement of the `<DrawerLayout.Tray />`
|
|
14
|
+
*/
|
|
15
|
+
placement?: DrawerTrayPlacement;
|
|
16
|
+
/**
|
|
17
|
+
* If the tray is open or closed.
|
|
18
|
+
*/
|
|
19
|
+
open?: boolean;
|
|
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
|
+
*/
|
|
31
|
+
border?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Should the `<DrawerLayout.Tray />` have a shadow
|
|
34
|
+
*/
|
|
35
|
+
shadow?: boolean;
|
|
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
|
+
*/
|
|
44
|
+
mountNode?: PositionMountNode;
|
|
45
|
+
} & PropsPassedToDialog & PropsPassedToTransition & TextDirectionContextConsumerProps;
|
|
46
|
+
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
|
+
*/
|
|
55
|
+
liveRegion?: LiveRegion;
|
|
56
|
+
/**
|
|
57
|
+
* Event fired when the underlying FocusRegion is dismissed in overlay mode.
|
|
58
|
+
* This can happen if:
|
|
59
|
+
* - `shouldCloseOnDocumentClick` is `true` and the user
|
|
60
|
+
* clicks outside the `<DrawerLayout.Tray />`
|
|
61
|
+
* - If `shouldCloseOnEscape` is `true` and the user presses the ESC key.
|
|
62
|
+
*
|
|
63
|
+
* This should be used to close the `<DrawerLayout.Tray />` in these cases
|
|
64
|
+
*/
|
|
65
|
+
onDismiss?: (event: React.UIEvent | React.FocusEvent, documentClick?: boolean) => void;
|
|
66
|
+
shouldContainFocus?: boolean;
|
|
67
|
+
shouldReturnFocus?: boolean;
|
|
68
|
+
shouldCloseOnDocumentClick?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Should the `<DrawerLayout.Tray />` close when ESC is pressed.
|
|
71
|
+
* Note that it will only close if it's in the overlay mode (if there is
|
|
72
|
+
* less space for the content than `DrawerLayout.props.minWidth`)
|
|
73
|
+
*/
|
|
74
|
+
shouldCloseOnEscape?: boolean;
|
|
75
|
+
};
|
|
76
|
+
type PropsPassedToTransition = {
|
|
77
|
+
/**
|
|
78
|
+
* Callback fired when the `<DrawerLayout.Tray />` transitions in/out
|
|
79
|
+
*/
|
|
80
|
+
onTransition?: (toState: BaseTransitionStatesType, fromState: BaseTransitionStatesType) => void;
|
|
81
|
+
/**
|
|
82
|
+
* Callback fired before the `<DrawerLayout.Tray />` transitions in
|
|
83
|
+
*/
|
|
84
|
+
onEnter?: () => void;
|
|
85
|
+
/**
|
|
86
|
+
* Callback fired as the `<DrawerLayout.Tray />` begins to transition in
|
|
87
|
+
*/
|
|
88
|
+
onEntering?: () => void;
|
|
89
|
+
/**
|
|
90
|
+
* Callback fired after the `<DrawerLayout.Tray />` finishes transitioning in
|
|
91
|
+
*/
|
|
92
|
+
onEntered?: (type?: TransitionType) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Callback fired right before the `<DrawerLayout.Tray />` transitions out
|
|
95
|
+
*/
|
|
96
|
+
onExit?: () => void;
|
|
97
|
+
/**
|
|
98
|
+
* Callback fired as the `<DrawerLayout.Tray />` begins to transition out
|
|
99
|
+
*/
|
|
100
|
+
onExiting?: () => void;
|
|
101
|
+
/**
|
|
102
|
+
* Callback fired after the `<DrawerLayout.Tray />` finishes transitioning out
|
|
103
|
+
*/
|
|
104
|
+
onExited?: (type?: TransitionType) => void;
|
|
105
|
+
};
|
|
106
|
+
type DrawerLayoutTrayState = {
|
|
107
|
+
transitioning: boolean;
|
|
108
|
+
portalOpen: boolean;
|
|
109
|
+
};
|
|
110
|
+
type DrawerLayoutTrayStyleProps = {
|
|
111
|
+
placement: DrawerTrayPlacement;
|
|
112
|
+
};
|
|
113
|
+
type PropKeys = keyof DrawerLayoutTrayOwnProps;
|
|
114
|
+
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
115
|
+
type DrawerLayoutTrayProps = DrawerLayoutTrayOwnProps & WithStyleProps<DrawerLayoutTrayTheme, DrawerLayoutTrayStyle> & OtherHTMLAttributes<DrawerLayoutTrayOwnProps>;
|
|
116
|
+
type DrawerLayoutTrayStyle = ComponentStyle<'drawerTray' | 'drawerTrayWithShadow' | 'drawerTrayContent'>;
|
|
117
|
+
declare const allowedProps: AllowedPropKeys;
|
|
118
|
+
export type { DrawerLayoutTrayProps, DrawerLayoutTrayState, DrawerLayoutTrayStyle, DrawerLayoutTrayStyleProps, DrawerTrayPlacement };
|
|
119
|
+
export { allowedProps };
|
|
120
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v2/DrawerTray/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAA;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EACV,qBAAqB,EACrB,UAAU,EACV,mBAAmB,EACnB,SAAS,EACV,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACf,MAAM,wBAAwB,CAAA;AAE/B,KAAK,mBAAmB,GAAG,OAAO,GAAG,KAAK,CAAA;AAE1C,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAA;IAEb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,CAAA;IAEpD,MAAM,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAA;IAE9B;;OAEG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAA;IAE/B;;OAEG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CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;IAE3C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;CAC3C,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,OAAO,CAAA;IACtB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,mBAAmB,CAAA;CAC/B,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,wBAAwB,CAAA;AAE9C,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,qBAAqB,GAAG,wBAAwB,GACnD,cAAc,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,GAC5D,mBAAmB,CAAC,wBAAwB,CAAC,CAAA;AAE/C,KAAK,qBAAqB,GAAG,cAAc,CACzC,YAAY,GAAG,sBAAsB,GAAG,mBAAmB,CAC5D,CAAA;AACD,QAAA,MAAM,YAAY,EAAE,eA2BnB,CAAA;AAED,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACpB,CAAA;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { NewComponentTypes, SharedTokens } from '@instructure/ui-themes';
|
|
2
|
+
import type { DrawerLayoutTrayProps, DrawerLayoutTrayStyleProps, DrawerLayoutTrayStyle } from './props';
|
|
3
|
+
/**
|
|
4
|
+
* ---
|
|
5
|
+
* private: true
|
|
6
|
+
* ---
|
|
7
|
+
* Generates the style object from the theme and provided additional information
|
|
8
|
+
* @param {Object} componentTheme The theme variable object.
|
|
9
|
+
* @param {Object} props the props of the component, the style is applied to
|
|
10
|
+
* @param {Object} sharedTokens Shared token object that stores common values for the theme.
|
|
11
|
+
* @param {Object} state the state of the component, the style is applied to
|
|
12
|
+
* @return {Object} The final style object, which will be used in the component
|
|
13
|
+
*/
|
|
14
|
+
declare const generateStyle: (componentTheme: NewComponentTypes["DrawerLayoutTray"], props: DrawerLayoutTrayProps, _sharedTokens: SharedTokens, state: DrawerLayoutTrayStyleProps) => DrawerLayoutTrayStyle;
|
|
15
|
+
export default generateStyle;
|
|
16
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v2/DrawerTray/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC7E,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAEhB;;;;;;;;;;GAUG;AACH,QAAA,MAAM,aAAa,GACjB,gBAAgB,iBAAiB,CAAC,kBAAkB,CAAC,EACrD,OAAO,qBAAqB,EAC5B,eAAe,YAAY,EAC3B,OAAO,0BAA0B,KAChC,qBAwDF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import type { DrawerLayoutProps } from '../props';
|
|
3
|
+
import type { DrawerLayoutTrayProps } from '../DrawerTray/props';
|
|
4
|
+
type DrawerLayoutFixtureProps = {
|
|
5
|
+
layoutWidth?: string | number;
|
|
6
|
+
trayWidth?: string | number;
|
|
7
|
+
placement?: DrawerLayoutTrayProps['placement'];
|
|
8
|
+
open?: DrawerLayoutTrayProps['open'];
|
|
9
|
+
onOverlayTrayChange?: DrawerLayoutProps['onOverlayTrayChange'];
|
|
10
|
+
};
|
|
11
|
+
export default class DrawerLayoutFixture extends Component<DrawerLayoutFixtureProps> {
|
|
12
|
+
static defaultProps: {
|
|
13
|
+
layoutWidth: string;
|
|
14
|
+
trayWidth: string;
|
|
15
|
+
open: boolean;
|
|
16
|
+
placement: string;
|
|
17
|
+
onOverlayTrayChange: () => void;
|
|
18
|
+
};
|
|
19
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=DrawerLayout.fixture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerLayout.fixture.d.ts","sourceRoot":"","sources":["../../../../src/DrawerLayout/v2/__fixtures__/DrawerLayout.fixture.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAEhE,KAAK,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,YAAY;;;;;;MAMlB;IAED,MAAM;CA2BP"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { ComponentElement, Component } from 'react';
|
|
2
|
+
import type { PlacementPropValues } from '@instructure/ui-position';
|
|
3
|
+
import { DrawerContent } from './DrawerContent';
|
|
4
|
+
import type { DrawerLayoutContentProps, DrawerContentSize } from './DrawerContent/props';
|
|
5
|
+
import { DrawerTray } from './DrawerTray';
|
|
6
|
+
import type { DrawerLayoutTrayProps } from './DrawerTray/props';
|
|
7
|
+
import type { DrawerLayoutProps, DrawerLayoutState } from './props';
|
|
8
|
+
type TrayChild = ComponentElement<DrawerLayoutTrayProps & React.Attributes, DrawerTray>;
|
|
9
|
+
type ContentChild = ComponentElement<DrawerLayoutContentProps & React.Attributes, DrawerContent>;
|
|
10
|
+
/**
|
|
11
|
+
---
|
|
12
|
+
category: components
|
|
13
|
+
---
|
|
14
|
+
**/
|
|
15
|
+
declare class DrawerLayout extends Component<DrawerLayoutProps, DrawerLayoutState> {
|
|
16
|
+
static readonly componentId = "DrawerLayout";
|
|
17
|
+
static locatorAttribute: string;
|
|
18
|
+
static allowedProps: readonly ("children" | "dir" | "minWidth" | "onOverlayTrayChange")[];
|
|
19
|
+
static defaultProps: {
|
|
20
|
+
minWidth: string;
|
|
21
|
+
};
|
|
22
|
+
static Content: typeof DrawerContent;
|
|
23
|
+
static Tray: typeof DrawerTray;
|
|
24
|
+
constructor(props: DrawerLayoutProps);
|
|
25
|
+
private readonly _id;
|
|
26
|
+
private _content;
|
|
27
|
+
private _tray;
|
|
28
|
+
ref: Element | null;
|
|
29
|
+
handleRef: (el: Element | null) => void;
|
|
30
|
+
componentDidMount(): void;
|
|
31
|
+
componentDidUpdate(): void;
|
|
32
|
+
get trayProps(): {
|
|
33
|
+
label: string;
|
|
34
|
+
children?: React.ReactNode | (() => React.ReactNode);
|
|
35
|
+
render?: () => React.ReactNode;
|
|
36
|
+
placement?: import("./DrawerTray/props").DrawerTrayPlacement;
|
|
37
|
+
open?: boolean;
|
|
38
|
+
onOpen?: (transitionType?: import("@instructure/ui-motion").TransitionType) => void;
|
|
39
|
+
onClose?: (transitionType?: import("@instructure/ui-motion").TransitionType) => void;
|
|
40
|
+
border?: boolean;
|
|
41
|
+
shadow?: boolean;
|
|
42
|
+
contentRef?: (element: HTMLDivElement | null) => void;
|
|
43
|
+
mountNode?: import("@instructure/ui-position").PositionMountNode;
|
|
44
|
+
} & {
|
|
45
|
+
defaultFocusElement?: import("@instructure/shared-types").UIElement;
|
|
46
|
+
liveRegion?: import("@instructure/shared-types").LiveRegion;
|
|
47
|
+
onDismiss?: (event: React.UIEvent | React.FocusEvent, documentClick?: boolean) => void;
|
|
48
|
+
shouldContainFocus?: boolean;
|
|
49
|
+
shouldReturnFocus?: boolean;
|
|
50
|
+
shouldCloseOnDocumentClick?: boolean;
|
|
51
|
+
shouldCloseOnEscape?: boolean;
|
|
52
|
+
} & {
|
|
53
|
+
onTransition?: (toState: import("@instructure/ui-motion").BaseTransitionStatesType, fromState: import("@instructure/ui-motion").BaseTransitionStatesType) => void;
|
|
54
|
+
onEnter?: () => void;
|
|
55
|
+
onEntering?: () => void;
|
|
56
|
+
onEntered?: (type?: import("@instructure/ui-motion").TransitionType) => void;
|
|
57
|
+
onExit?: () => void;
|
|
58
|
+
onExiting?: () => void;
|
|
59
|
+
onExited?: (type?: import("@instructure/ui-motion").TransitionType) => void;
|
|
60
|
+
} & {
|
|
61
|
+
dir?: "ltr" | "rtl";
|
|
62
|
+
} & {
|
|
63
|
+
children?: import("react").ReactNode | undefined;
|
|
64
|
+
} & {
|
|
65
|
+
styles?: import("./DrawerTray/props").DrawerLayoutTrayStyle | undefined;
|
|
66
|
+
makeStyles?: (extraArgs?: Record<string, unknown>) => void;
|
|
67
|
+
} & {
|
|
68
|
+
themeOverride?: Partial<import("@instructure/shared-types").DrawerLayoutTrayTheme> | ((componentTheme: import("@instructure/shared-types").DrawerLayoutTrayTheme, currentTheme: import("@instructure/shared-types").BaseTheme) => Partial<import("@instructure/shared-types").DrawerLayoutTrayTheme>) | undefined;
|
|
69
|
+
} & Omit<import("react").AllHTMLAttributes<{
|
|
70
|
+
label: string;
|
|
71
|
+
children?: React.ReactNode | (() => React.ReactNode);
|
|
72
|
+
render?: () => React.ReactNode;
|
|
73
|
+
placement?: import("./DrawerTray/props").DrawerTrayPlacement;
|
|
74
|
+
open?: boolean;
|
|
75
|
+
onOpen?: (transitionType?: import("@instructure/ui-motion").TransitionType) => void;
|
|
76
|
+
onClose?: (transitionType?: import("@instructure/ui-motion").TransitionType) => void;
|
|
77
|
+
border?: boolean;
|
|
78
|
+
shadow?: boolean;
|
|
79
|
+
contentRef?: (element: HTMLDivElement | null) => void;
|
|
80
|
+
mountNode?: import("@instructure/ui-position").PositionMountNode;
|
|
81
|
+
} & {
|
|
82
|
+
defaultFocusElement?: import("@instructure/shared-types").UIElement;
|
|
83
|
+
liveRegion?: import("@instructure/shared-types").LiveRegion;
|
|
84
|
+
onDismiss?: (event: React.UIEvent | React.FocusEvent, documentClick?: boolean) => void;
|
|
85
|
+
shouldContainFocus?: boolean;
|
|
86
|
+
shouldReturnFocus?: boolean;
|
|
87
|
+
shouldCloseOnDocumentClick?: boolean;
|
|
88
|
+
shouldCloseOnEscape?: boolean;
|
|
89
|
+
} & {
|
|
90
|
+
onTransition?: (toState: import("@instructure/ui-motion").BaseTransitionStatesType, fromState: import("@instructure/ui-motion").BaseTransitionStatesType) => void;
|
|
91
|
+
onEnter?: () => void;
|
|
92
|
+
onEntering?: () => void;
|
|
93
|
+
onEntered?: (type?: import("@instructure/ui-motion").TransitionType) => void;
|
|
94
|
+
onExit?: () => void;
|
|
95
|
+
onExiting?: () => void;
|
|
96
|
+
onExited?: (type?: import("@instructure/ui-motion").TransitionType) => void;
|
|
97
|
+
} & {
|
|
98
|
+
dir?: "ltr" | "rtl";
|
|
99
|
+
} & {
|
|
100
|
+
children?: import("react").ReactNode | undefined;
|
|
101
|
+
} & Element>, "label" | "children" | "contentRef" | "dir" | "open" | "border" | "render" | "placement" | "onOpen" | "onClose" | "shadow" | "mountNode" | keyof {
|
|
102
|
+
defaultFocusElement?: import("@instructure/shared-types").UIElement;
|
|
103
|
+
liveRegion?: import("@instructure/shared-types").LiveRegion;
|
|
104
|
+
onDismiss?: (event: React.UIEvent | React.FocusEvent, documentClick?: boolean) => void;
|
|
105
|
+
shouldContainFocus?: boolean;
|
|
106
|
+
shouldReturnFocus?: boolean;
|
|
107
|
+
shouldCloseOnDocumentClick?: boolean;
|
|
108
|
+
shouldCloseOnEscape?: boolean;
|
|
109
|
+
} | keyof {
|
|
110
|
+
onTransition?: (toState: import("@instructure/ui-motion").BaseTransitionStatesType, fromState: import("@instructure/ui-motion").BaseTransitionStatesType) => void;
|
|
111
|
+
onEnter?: () => void;
|
|
112
|
+
onEntering?: () => void;
|
|
113
|
+
onEntered?: (type?: import("@instructure/ui-motion").TransitionType) => void;
|
|
114
|
+
onExit?: () => void;
|
|
115
|
+
onExiting?: () => void;
|
|
116
|
+
onExited?: (type?: import("@instructure/ui-motion").TransitionType) => void;
|
|
117
|
+
}> & {
|
|
118
|
+
dir?: "ltr" | "rtl";
|
|
119
|
+
} & import("react").Attributes;
|
|
120
|
+
get trayPlacement(): PlacementPropValues;
|
|
121
|
+
get contentMargin(): number;
|
|
122
|
+
get contentStyle(): {
|
|
123
|
+
marginLeft: string;
|
|
124
|
+
marginRight: string;
|
|
125
|
+
};
|
|
126
|
+
handleTrayContentRef: (el: HTMLDivElement | null) => void;
|
|
127
|
+
shouldOverlayTray(minWidth: string, trayWidth: number, contentWidth: number, trayIsOverlayed: boolean): boolean;
|
|
128
|
+
getNextState(minWidth: string, trayWidth: number, contentWidth: number, trayIsOverlayed: boolean): {
|
|
129
|
+
trayWidth: number;
|
|
130
|
+
contentWidth: number;
|
|
131
|
+
shouldOverlayTray: boolean;
|
|
132
|
+
};
|
|
133
|
+
notifyOverlayTrayChange(shouldOverlayTray: boolean): void;
|
|
134
|
+
handleContentSizeChange: ({ width }: DrawerContentSize) => void;
|
|
135
|
+
handleTraySizeChange: ({ width }: {
|
|
136
|
+
width: number;
|
|
137
|
+
}) => void;
|
|
138
|
+
handleTrayTransitionEnter: () => void;
|
|
139
|
+
handleTrayTransitionExit: () => void;
|
|
140
|
+
renderChildren(): (TrayChild | ContentChild)[];
|
|
141
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
142
|
+
}
|
|
143
|
+
export default DrawerLayout;
|
|
144
|
+
export { DrawerLayout, DrawerContent, DrawerTray };
|
|
145
|
+
export declare const DrawerLayoutContext: import("react").Context<boolean>;
|
|
146
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,gBAAgB,EAAY,SAAS,EAAiB,MAAM,OAAO,CAAA;AAa5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAM/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEnE,KAAK,SAAS,GAAG,gBAAgB,CAC/B,qBAAqB,GAAG,KAAK,CAAC,UAAU,EACxC,UAAU,CACX,CAAA;AACD,KAAK,YAAY,GAAG,gBAAgB,CAClC,wBAAwB,GAAG,KAAK,CAAC,UAAU,EAC3C,aAAa,CACd,CAAA;AAGD;;;;GAIG;AACH,cAGM,YAAa,SAAQ,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IACxE,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAiB;IAE5C,MAAM,CAAC,gBAAgB,SAAuB;IAC9C,MAAM,CAAC,YAAY,uEAAe;IAClC,MAAM,CAAC,YAAY;;MAElB;IAED,MAAM,CAAC,OAAO,uBAAgB;IAC9B,MA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AAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,CAAA;AAClD,eAAO,MAAM,mBAAmB,kCAAuB,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TextDirectionContextConsumerProps } from '@instructure/ui-i18n';
|
|
3
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
|
+
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils';
|
|
5
|
+
type DrawerLayoutOwnProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Exactly one of each of the following child types: `DrawerLayout.Content`, `DrawerLayout.Tray`
|
|
8
|
+
*/
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Min width for the `<DrawerLayout.Content />`
|
|
12
|
+
*/
|
|
13
|
+
minWidth?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Function called when the `<DrawerLayout.Content />` is resized and hits the `minWidth` breakpoint
|
|
16
|
+
* Called with a boolean value, `true` if the tray is now overlaying the content or `false` if
|
|
17
|
+
* it is side by side
|
|
18
|
+
*/
|
|
19
|
+
onOverlayTrayChange?: (shouldOverlayTray: boolean) => void;
|
|
20
|
+
} & TextDirectionContextConsumerProps;
|
|
21
|
+
type PropKeys = keyof DrawerLayoutOwnProps;
|
|
22
|
+
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
23
|
+
type DrawerLayoutProps = DrawerLayoutOwnProps & WithStyleProps<null, DrawerLayoutStyle> & WithDeterministicIdProps;
|
|
24
|
+
type DrawerLayoutStyle = ComponentStyle<'drawerLayout'>;
|
|
25
|
+
type DrawerLayoutState = {
|
|
26
|
+
shouldOverlayTray: boolean;
|
|
27
|
+
trayWidth: number;
|
|
28
|
+
contentWidth: number;
|
|
29
|
+
};
|
|
30
|
+
declare const allowedProps: AllowedPropKeys;
|
|
31
|
+
export type { DrawerLayoutProps, DrawerLayoutState, DrawerLayoutStyle };
|
|
32
|
+
export { all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|
+
import type { DrawerLayoutStyle } from './props';
|
|
2
|
+
/**
|
|
3
|
+
* ---
|
|
4
|
+
* private: true
|
|
5
|
+
* ---
|
|
6
|
+
* Generates the style object from the theme and provided additional information
|
|
7
|
+
* @param {Object} componentTheme The theme variable object.
|
|
8
|
+
* @param {Object} props the props of the component, the style is applied to
|
|
9
|
+
* @param {Object} state the state of the component, the style is applied to
|
|
10
|
+
* @return {Object} The final style object, which will be used in the component
|
|
11
|
+
*/
|
|
12
|
+
declare const generateStyle: () => DrawerLayoutStyle;
|
|
13
|
+
export default generateStyle;
|
|
14
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/DrawerLayout/v2/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,QAAO,iBAQzB,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DrawerLayout, DrawerContent, DrawerTray } from '../DrawerLayout/v1';
|
|
2
|
+
export type { DrawerLayoutProps } from '../DrawerLayout/v1/props';
|
|
3
|
+
export type { DrawerLayoutContentProps } from '../DrawerLayout/v1/DrawerContent/props';
|
|
4
|
+
export type { DrawerLayoutTrayProps } from '../DrawerLayout/v1/DrawerTray/props';
|
|
5
|
+
//# sourceMappingURL=a.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../../src/exports/a.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE5E,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AACjE,YAAY,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAA;AACtF,YAAY,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA"}
|