@instructure/ui-navigation 8.8.1-snapshot.8 → 8.9.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 +10 -0
- package/es/AppNav/Item/index.js +21 -77
- package/es/AppNav/Item/props.js +79 -0
- package/es/AppNav/index.js +26 -80
- package/es/AppNav/props.js +87 -0
- package/es/Navigation/NavigationItem/index.js +25 -60
- package/{src/AppNav/types.ts → es/Navigation/NavigationItem/props.js} +37 -14
- package/es/Navigation/index.js +18 -57
- package/es/Navigation/props.js +68 -0
- package/lib/AppNav/Item/index.js +21 -77
- package/lib/AppNav/Item/props.js +90 -0
- package/lib/AppNav/index.js +25 -80
- package/lib/AppNav/props.js +101 -0
- package/lib/Navigation/NavigationItem/index.js +25 -60
- package/lib/Navigation/NavigationItem/props.js +73 -0
- package/lib/Navigation/index.js +19 -61
- package/lib/Navigation/props.js +83 -0
- package/package.json +24 -25
- package/src/AppNav/Item/index.tsx +8 -62
- package/src/AppNav/Item/props.ts +107 -0
- package/src/AppNav/Item/styles.ts +1 -1
- package/src/AppNav/index.tsx +13 -69
- package/src/AppNav/props.ts +118 -0
- package/src/Navigation/NavigationItem/index.tsx +10 -45
- package/src/Navigation/NavigationItem/props.ts +87 -0
- package/src/Navigation/NavigationItem/styles.ts +1 -1
- package/src/Navigation/index.tsx +13 -56
- package/src/Navigation/props.ts +108 -0
- package/src/Navigation/styles.ts +1 -1
- package/src/index.ts +4 -4
- package/types/AppNav/Item/index.d.ts +25 -53
- package/types/AppNav/Item/index.d.ts.map +1 -1
- package/types/AppNav/Item/props.d.ts +23 -0
- package/types/AppNav/Item/props.d.ts.map +1 -0
- package/types/AppNav/Item/styles.d.ts +1 -1
- package/types/AppNav/index.d.ts +25 -58
- package/types/AppNav/index.d.ts.map +1 -1
- package/types/AppNav/props.d.ts +23 -0
- package/types/AppNav/props.d.ts.map +1 -0
- package/types/Navigation/NavigationItem/index.d.ts +19 -35
- package/types/Navigation/NavigationItem/index.d.ts.map +1 -1
- package/types/Navigation/NavigationItem/props.d.ts +20 -0
- package/types/Navigation/NavigationItem/props.d.ts.map +1 -0
- package/types/Navigation/NavigationItem/styles.d.ts +1 -1
- package/types/Navigation/index.d.ts +26 -42
- package/types/Navigation/index.d.ts.map +1 -1
- package/types/Navigation/props.d.ts +27 -0
- package/types/Navigation/props.d.ts.map +1 -0
- package/types/Navigation/styles.d.ts +1 -1
- package/types/index.d.ts +4 -4
- package/LICENSE.md +0 -27
- package/es/AppNav/Item/types.js +0 -1
- package/es/AppNav/types.js +0 -1
- package/es/Navigation/NavigationItem/types.js +0 -1
- package/es/Navigation/types.js +0 -1
- package/lib/AppNav/Item/types.js +0 -1
- package/lib/AppNav/types.js +0 -1
- package/lib/Navigation/NavigationItem/types.js +0 -1
- package/lib/Navigation/types.js +0 -1
- package/src/AppNav/Item/types.ts +0 -40
- package/src/Navigation/NavigationItem/types.ts +0 -37
- package/src/Navigation/types.ts +0 -42
- package/types/AppNav/Item/types.d.ts +0 -17
- package/types/AppNav/Item/types.d.ts.map +0 -1
- package/types/AppNav/types.d.ts +0 -16
- package/types/AppNav/types.d.ts.map +0 -1
- package/types/Navigation/NavigationItem/types.d.ts +0 -14
- package/types/Navigation/NavigationItem/types.d.ts.map +0 -1
- package/types/Navigation/types.d.ts +0 -18
- package/types/Navigation/types.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/AppNav/Item/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/AppNav/Item/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAajC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAG9C;;;;;;GAMG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC3C,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAgB;IAE3C,MAAM,CAAC,YAAY;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;MAOlB;IAED,iBAAiB;IAIjB,kBAAkB;IAKlB,WAAW,mBASV;IAED,MAAM;CAuDP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
3
|
+
import type { WithStyleProps } from '@instructure/emotion';
|
|
4
|
+
declare type AppNavItemOwnProps = {
|
|
5
|
+
renderLabel: React.ReactNode | ((...args: any[]) => any);
|
|
6
|
+
renderAfter?: React.ReactNode | ((...args: any[]) => any);
|
|
7
|
+
renderIcon?: React.ReactNode | ((...args: any[]) => any);
|
|
8
|
+
href?: string;
|
|
9
|
+
onClick?: (...args: any[]) => any;
|
|
10
|
+
isSelected?: boolean;
|
|
11
|
+
elementRef?: (...args: any[]) => any;
|
|
12
|
+
as?: AsElementType;
|
|
13
|
+
cursor?: string;
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare type PropKeys = keyof AppNavItemOwnProps;
|
|
17
|
+
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
18
|
+
declare type AppNavItemProps = AppNavItemOwnProps & WithStyleProps;
|
|
19
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
20
|
+
declare const allowedProps: AllowedPropKeys;
|
|
21
|
+
export type { AppNavItemProps };
|
|
22
|
+
export { propTypes, allowedProps };
|
|
23
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@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E,eAAe,EAAE,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
package/types/AppNav/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import { jsx } from '@instructure/emotion';
|
|
5
4
|
import { Item } from './Item';
|
|
6
|
-
import { AppNavProps } from './
|
|
5
|
+
import type { AppNavProps } from './props';
|
|
7
6
|
/**
|
|
8
7
|
---
|
|
9
8
|
category: components
|
|
@@ -11,66 +10,34 @@ category: components
|
|
|
11
10
|
**/
|
|
12
11
|
declare class AppNav extends Component<AppNavProps> {
|
|
13
12
|
static readonly componentId = "AppNav";
|
|
14
|
-
static
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*/
|
|
39
|
-
renderAfterItems: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
40
|
-
/**
|
|
41
|
-
* Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
|
|
42
|
-
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
43
|
-
* familiar CSS-like shorthand. For example: `margin="small auto large"`.
|
|
44
|
-
*/
|
|
45
|
-
margin: (props: any, propName: any, componentName: any, location: any) => any;
|
|
46
|
-
/**
|
|
47
|
-
* Provides a reference to the underlying nav element
|
|
48
|
-
*/
|
|
49
|
-
elementRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
50
|
-
/**
|
|
51
|
-
* Customize the text displayed in the menu trigger when links overflow
|
|
52
|
-
* the overall nav width.
|
|
53
|
-
*/
|
|
54
|
-
renderTruncateLabel: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
55
|
-
/**
|
|
56
|
-
* Called whenever the navigation items are updated or the size of
|
|
57
|
-
* the navigation changes. Passes in the `visibleItemsCount` as
|
|
58
|
-
* a parameter.
|
|
59
|
-
*/
|
|
60
|
-
onUpdate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
61
|
-
/**
|
|
62
|
-
* Sets the number of navigation items that are visible.
|
|
63
|
-
*/
|
|
64
|
-
visibleItemsCount: PropTypes.Requireable<number>;
|
|
65
|
-
makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
|
|
66
|
-
styles: PropTypes.Requireable<object>;
|
|
67
|
-
};
|
|
13
|
+
static allowedProps: readonly (keyof {
|
|
14
|
+
screenReaderLabel: string;
|
|
15
|
+
debounce?: number | undefined;
|
|
16
|
+
renderBeforeItems?: import("react").ReactNode | ((...args: any[]) => any);
|
|
17
|
+
renderAfterItems?: import("react").ReactNode | ((...args: any[]) => any);
|
|
18
|
+
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
19
|
+
elementRef?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
renderTruncateLabel?: import("react").ReactNode | ((...args: any[]) => any);
|
|
21
|
+
onUpdate?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
visibleItemsCount?: number | undefined;
|
|
23
|
+
children?: import("react").ReactNode;
|
|
24
|
+
})[];
|
|
25
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
26
|
+
screenReaderLabel: string;
|
|
27
|
+
debounce?: number | undefined;
|
|
28
|
+
renderBeforeItems?: import("react").ReactNode | ((...args: any[]) => any);
|
|
29
|
+
renderAfterItems?: import("react").ReactNode | ((...args: any[]) => any);
|
|
30
|
+
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
31
|
+
elementRef?: ((...args: any[]) => any) | undefined;
|
|
32
|
+
renderTruncateLabel?: import("react").ReactNode | ((...args: any[]) => any);
|
|
33
|
+
onUpdate?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
visibleItemsCount?: number | undefined;
|
|
35
|
+
children?: import("react").ReactNode;
|
|
36
|
+
}>;
|
|
68
37
|
static defaultProps: {
|
|
69
38
|
children: null;
|
|
70
39
|
debounce: number;
|
|
71
40
|
margin: string;
|
|
72
|
-
renderBeforeItems: undefined;
|
|
73
|
-
renderAfterItems: undefined;
|
|
74
41
|
elementRef: (el: any) => void;
|
|
75
42
|
renderTruncateLabel: () => string;
|
|
76
43
|
onUpdate: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/AppNav/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/AppNav/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAUrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAI7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAG1C;;;;GAIG;AACH,cAEM,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,WAAW,YAAW;IAEtC,MAAM,CAAC,YAAY;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;;;MASlB;IAED,MAAM,CAAC,IAAI,cAAO;IAElB,KAAK;;MAEJ;IAED,KAAK,OAAO;IAEZ,iBAAiB;IA2BjB,kBAAkB;IAIlB,oBAAoB;IAcpB,YAAY;;MA8BX;IAED,YAAY,aAQX;IAGD,cAAc,CAAC,IAAI,KAAA,EAAE,aAAa,KAAA,EAAE,GAAG,KAAA;IAgBvC,UAAU,CAAC,KAAK,KAAA;IAiChB,MAAM;CAoDP;AAED,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
+
import type { PropValidators } from '@instructure/shared-types';
|
|
4
|
+
declare type AppNavOwnProps = {
|
|
5
|
+
screenReaderLabel: string;
|
|
6
|
+
debounce?: number;
|
|
7
|
+
renderBeforeItems?: React.ReactNode | ((...args: any[]) => any);
|
|
8
|
+
renderAfterItems?: React.ReactNode | ((...args: any[]) => any);
|
|
9
|
+
margin?: Spacing;
|
|
10
|
+
elementRef?: (...args: any[]) => any;
|
|
11
|
+
renderTruncateLabel?: React.ReactNode | ((...args: any[]) => any);
|
|
12
|
+
onUpdate?: (...args: any[]) => any;
|
|
13
|
+
visibleItemsCount?: number;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
declare type PropKeys = keyof AppNavOwnProps;
|
|
17
|
+
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
18
|
+
declare type AppNavProps = AppNavOwnProps & WithStyleProps;
|
|
19
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
20
|
+
declare const allowedProps: AllowedPropKeys;
|
|
21
|
+
export type { AppNavProps };
|
|
22
|
+
export { propTypes, allowedProps };
|
|
23
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/AppNav/props.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,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,EAAE,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import { jsx } from '@instructure/emotion';
|
|
5
|
-
import { NavigationItemProps } from './
|
|
4
|
+
import type { NavigationItemProps } from './props';
|
|
6
5
|
/**
|
|
7
6
|
---
|
|
8
7
|
parent: Navigation
|
|
@@ -11,44 +10,29 @@ id: Navigation.Item
|
|
|
11
10
|
**/
|
|
12
11
|
declare class NavigationItem extends Component<NavigationItemProps> {
|
|
13
12
|
static readonly componentId = "Navigation.Item";
|
|
14
|
-
static
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
readonly href: PropTypes.Requireable<string>;
|
|
33
|
-
/**
|
|
34
|
-
* If the NavigationItem does not go to a new page pass an onClick
|
|
35
|
-
*/
|
|
36
|
-
readonly onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
|
-
/**
|
|
38
|
-
* Denotes which NavigationItem is currently selected
|
|
39
|
-
*/
|
|
40
|
-
readonly selected: PropTypes.Requireable<boolean>;
|
|
41
|
-
/**
|
|
42
|
-
* When minimized is set to true, the `<Navigation />` shows icons only while the text becomes a tooltip. When it is set to false, the `<Navigation />` shows text in addition to the icons
|
|
43
|
-
*/
|
|
44
|
-
readonly minimized: PropTypes.Requireable<boolean>;
|
|
45
|
-
};
|
|
13
|
+
static allowedProps: readonly (keyof {
|
|
14
|
+
icon: import("react").ReactNode;
|
|
15
|
+
label: import("react").ReactNode;
|
|
16
|
+
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
17
|
+
href?: string | undefined;
|
|
18
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
selected?: boolean | undefined;
|
|
20
|
+
minimized?: boolean | undefined;
|
|
21
|
+
})[];
|
|
22
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
23
|
+
icon: import("react").ReactNode;
|
|
24
|
+
label: import("react").ReactNode;
|
|
25
|
+
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
26
|
+
href?: string | undefined;
|
|
27
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
28
|
+
selected?: boolean | undefined;
|
|
29
|
+
minimized?: boolean | undefined;
|
|
30
|
+
}>;
|
|
46
31
|
static defaultProps: {
|
|
47
32
|
readonly as: "a";
|
|
48
33
|
readonly onClick: (e: any, selected: any) => void;
|
|
49
34
|
readonly selected: false;
|
|
50
35
|
readonly minimized: false;
|
|
51
|
-
readonly href: undefined;
|
|
52
36
|
};
|
|
53
37
|
componentDidMount(): void;
|
|
54
38
|
componentDidUpdate(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Navigation/NavigationItem/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Navigation/NavigationItem/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlD;;;;;GAKG;AACH,cAEM,cAAe,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACzD,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,YAAY;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;MAMT;IAEV,iBAAiB;IAIjB,kBAAkB;IAIlB,UAAU;IA0BV,MAAM;CAaP;AAED,eAAe,cAAc,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
3
|
+
import type { WithStyleProps } from '@instructure/emotion';
|
|
4
|
+
declare type NavigationItemOwnProps = {
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
as?: AsElementType;
|
|
8
|
+
href?: string;
|
|
9
|
+
onClick?: (...args: any[]) => any;
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
minimized?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare type PropKeys = keyof NavigationItemOwnProps;
|
|
14
|
+
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
15
|
+
declare type NavigationItemProps = NavigationItemOwnProps & WithStyleProps;
|
|
16
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
17
|
+
declare const allowedProps: AllowedPropKeys;
|
|
18
|
+
export type { NavigationItemProps };
|
|
19
|
+
export { propTypes, allowedProps };
|
|
20
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Navigation/NavigationItem/props.ts"],"names":[],"mappings":";AAyBA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,aAAK,sBAAsB,GAAG;IAC5B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,sBAAsB,CAAA;AAE5C,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,mBAAmB,GAAG,sBAAsB,GAAG,cAAc,CAAA;AAElE,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA6BvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAQnB,CAAA;AAED,YAAY,EAAE,mBAAmB,EAAE,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import { jsx } from '@instructure/emotion';
|
|
5
4
|
import { NavigationItem } from './NavigationItem';
|
|
6
|
-
import { NavigationProps, NavigationState } from './
|
|
5
|
+
import type { NavigationProps, NavigationState } from './props';
|
|
7
6
|
/**
|
|
8
7
|
---
|
|
9
8
|
category: components
|
|
@@ -11,52 +10,37 @@ category: components
|
|
|
11
10
|
**/
|
|
12
11
|
declare class Navigation extends Component<NavigationProps, NavigationState> {
|
|
13
12
|
static readonly componentId = "Navigation";
|
|
14
|
-
static
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
isRequired: (props: Record<string, any>, propName: string, componentName: string, location?: string | undefined, propFullName?: string | undefined) => Error | null;
|
|
13
|
+
static allowedProps: readonly (keyof {
|
|
14
|
+
minimized?: any;
|
|
15
|
+
defaultMinimized?: boolean | undefined;
|
|
16
|
+
onMinimized?: ((...args: any[]) => any) | undefined;
|
|
17
|
+
label: string;
|
|
18
|
+
toggleLabel: {
|
|
19
|
+
expandedLabel?: string | undefined;
|
|
20
|
+
minimizedLabel?: string | undefined;
|
|
23
21
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
expandedLabel: PropTypes.Requireable<string>;
|
|
42
|
-
minimizedLabel: PropTypes.Requireable<string>;
|
|
43
|
-
}>>;
|
|
44
|
-
/**
|
|
45
|
-
* If the `<Navigation.Item>` goes to a new page, pass an href
|
|
46
|
-
*/
|
|
47
|
-
href: PropTypes.Requireable<string>;
|
|
48
|
-
/**
|
|
49
|
-
* If the `<Navigation.Item>` does not go to a new page pass an onClick
|
|
50
|
-
*/
|
|
51
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
52
|
-
};
|
|
22
|
+
href?: string | undefined;
|
|
23
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
children?: import("react").ReactNode;
|
|
25
|
+
})[];
|
|
26
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
27
|
+
minimized?: any;
|
|
28
|
+
defaultMinimized?: boolean | undefined;
|
|
29
|
+
onMinimized?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
label: string;
|
|
31
|
+
toggleLabel: {
|
|
32
|
+
expandedLabel?: string | undefined;
|
|
33
|
+
minimizedLabel?: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
href?: string | undefined;
|
|
36
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
children?: import("react").ReactNode;
|
|
38
|
+
}>;
|
|
53
39
|
static defaultProps: {
|
|
54
40
|
children: null;
|
|
55
41
|
defaultMinimized: boolean;
|
|
56
42
|
onMinimized: (event: any, minimized: any) => void;
|
|
57
43
|
onClick: (e: any) => void;
|
|
58
|
-
href: undefined;
|
|
59
|
-
minimized: undefined;
|
|
60
44
|
};
|
|
61
45
|
static Item: typeof NavigationItem;
|
|
62
46
|
constructor(props: any);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Navigation/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAA0B,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Navigation/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAA0B,MAAM,OAAO,CAAA;AAOzD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAIjD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM/D;;;;GAIG;AACH,cAEM,UAAW,SAAQ,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAClE,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,YAAY;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;MAOlB;IAED,MAAM,CAAC,IAAI,wBAAiB;gBAGhB,KAAK,KAAA;IAWjB,iBAAiB;IAIjB,kBAAkB;IAIlB,IAAI,SAAS,YAKZ;IAED,YAAY,CAAC,KAAK;;MAAa;IAK/B,eAAe,uBAOd;IAED,cAAc;IASd,aAAa;IAMb,MAAM;CA0BP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PropValidators } from '@instructure/shared-types';
|
|
3
|
+
import type { WithStyleProps } from '@instructure/emotion';
|
|
4
|
+
declare type NavigationOwnProps = {
|
|
5
|
+
minimized?: any;
|
|
6
|
+
defaultMinimized?: boolean;
|
|
7
|
+
onMinimized?: (...args: any[]) => any;
|
|
8
|
+
label: string;
|
|
9
|
+
toggleLabel: {
|
|
10
|
+
expandedLabel?: string;
|
|
11
|
+
minimizedLabel?: string;
|
|
12
|
+
};
|
|
13
|
+
href?: string;
|
|
14
|
+
onClick?: (...args: any[]) => any;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
};
|
|
17
|
+
declare type NavigationState = {
|
|
18
|
+
minimized: boolean;
|
|
19
|
+
};
|
|
20
|
+
declare type PropKeys = keyof NavigationOwnProps;
|
|
21
|
+
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
22
|
+
declare type NavigationProps = NavigationOwnProps & WithStyleProps;
|
|
23
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
24
|
+
declare const allowedProps: AllowedPropKeys;
|
|
25
|
+
export type { NavigationProps, NavigationState };
|
|
26
|
+
export { propTypes, allowedProps };
|
|
27
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Navigation/props.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,aAAK,kBAAkB,GAAG;IACxB,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,WAAW,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE;QACX,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,cAAc,CAAC,EAAE,MAAM,CAAA;KACxB,CAAA;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,aAAK,eAAe,GAAG;IACrB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,kBAAkB,CAAA;AAExC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,eAAe,GAAG,kBAAkB,GAAG,cAAc,CAAA;AAE1D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAiCvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eASnB,CAAA;AAED,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { AppNav } from './AppNav';
|
|
2
2
|
export { Navigation, NavigationItem } from './Navigation';
|
|
3
|
-
export type { AppNavProps } from './AppNav/
|
|
4
|
-
export type { AppNavItemProps } from './AppNav/Item/
|
|
5
|
-
export type { NavigationProps } from './Navigation/
|
|
6
|
-
export type { NavigationItemProps } from './Navigation/NavigationItem/
|
|
3
|
+
export type { AppNavProps } from './AppNav/props';
|
|
4
|
+
export type { AppNavItemProps } from './AppNav/Item/props';
|
|
5
|
+
export type { NavigationProps } from './Navigation/props';
|
|
6
|
+
export type { NavigationItemProps } from './Navigation/NavigationItem/props';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/LICENSE.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: The MIT License (MIT)
|
|
3
|
-
category: Getting Started
|
|
4
|
-
order: 9
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# The MIT License (MIT)
|
|
8
|
-
|
|
9
|
-
Copyright (c) 2015 Instructure, Inc.
|
|
10
|
-
|
|
11
|
-
**Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
-
in the Software without restriction, including without limitation the rights
|
|
14
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
-
furnished to do so, subject to the following conditions.**
|
|
17
|
-
|
|
18
|
-
The above copyright notice and this permission notice shall be included in all
|
|
19
|
-
copies or substantial portions of the Software.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
-
SOFTWARE.
|