@instructure/ui-navigation 8.56.0 → 9.0.0
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 +11 -0
- package/README.md +2 -23
- package/es/index.js +1 -2
- package/lib/index.js +1 -14
- package/package.json +24 -24
- package/src/index.ts +0 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/index.d.ts +0 -3
- package/types/index.d.ts.map +1 -1
- package/es/Navigation/NavigationItem/NavigationItemLocator.js +0 -33
- package/es/Navigation/NavigationItem/index.js +0 -106
- package/es/Navigation/NavigationItem/locator.js +0 -26
- package/es/Navigation/NavigationItem/props.js +0 -36
- package/es/Navigation/NavigationItem/styles.js +0 -93
- package/es/Navigation/NavigationItem/theme.js +0 -73
- package/es/Navigation/NavigationLocator.js +0 -37
- package/es/Navigation/index.js +0 -129
- package/es/Navigation/locator.js +0 -27
- package/es/Navigation/props.js +0 -42
- package/es/Navigation/styles.js +0 -77
- package/es/Navigation/theme.js +0 -61
- package/lib/Navigation/NavigationItem/NavigationItemLocator.js +0 -40
- package/lib/Navigation/NavigationItem/index.js +0 -112
- package/lib/Navigation/NavigationItem/locator.js +0 -37
- package/lib/Navigation/NavigationItem/props.js +0 -43
- package/lib/Navigation/NavigationItem/styles.js +0 -99
- package/lib/Navigation/NavigationItem/theme.js +0 -79
- package/lib/Navigation/NavigationLocator.js +0 -48
- package/lib/Navigation/index.js +0 -145
- package/lib/Navigation/locator.js +0 -43
- package/lib/Navigation/props.js +0 -49
- package/lib/Navigation/styles.js +0 -83
- package/lib/Navigation/theme.js +0 -67
- package/src/Navigation/NavigationItem/NavigationItemLocator.ts +0 -34
- package/src/Navigation/NavigationItem/index.tsx +0 -117
- package/src/Navigation/NavigationItem/locator.ts +0 -27
- package/src/Navigation/NavigationItem/props.ts +0 -102
- package/src/Navigation/NavigationItem/styles.ts +0 -103
- package/src/Navigation/NavigationItem/theme.ts +0 -82
- package/src/Navigation/NavigationLocator.ts +0 -40
- package/src/Navigation/README.md +0 -85
- package/src/Navigation/index.tsx +0 -168
- package/src/Navigation/locator.ts +0 -29
- package/src/Navigation/props.ts +0 -118
- package/src/Navigation/styles.ts +0 -83
- package/src/Navigation/theme.ts +0 -66
- package/types/Navigation/NavigationItem/NavigationItemLocator.d.ts +0 -576
- package/types/Navigation/NavigationItem/NavigationItemLocator.d.ts.map +0 -1
- package/types/Navigation/NavigationItem/index.d.ts +0 -47
- package/types/Navigation/NavigationItem/index.d.ts.map +0 -1
- package/types/Navigation/NavigationItem/locator.d.ts +0 -4
- package/types/Navigation/NavigationItem/locator.d.ts.map +0 -1
- package/types/Navigation/NavigationItem/props.d.ts +0 -46
- package/types/Navigation/NavigationItem/props.d.ts.map +0 -1
- package/types/Navigation/NavigationItem/styles.d.ts +0 -15
- package/types/Navigation/NavigationItem/styles.d.ts.map +0 -1
- package/types/Navigation/NavigationItem/theme.d.ts +0 -10
- package/types/Navigation/NavigationItem/theme.d.ts.map +0 -1
- package/types/Navigation/NavigationLocator.d.ts +0 -1983
- package/types/Navigation/NavigationLocator.d.ts.map +0 -1
- package/types/Navigation/index.d.ts +0 -58
- package/types/Navigation/index.d.ts.map +0 -1
- package/types/Navigation/locator.d.ts +0 -5
- package/types/Navigation/locator.d.ts.map +0 -1
- package/types/Navigation/props.d.ts +0 -49
- package/types/Navigation/props.d.ts.map +0 -1
- package/types/Navigation/styles.d.ts +0 -15
- package/types/Navigation/styles.d.ts.map +0 -1
- package/types/Navigation/theme.d.ts +0 -10
- package/types/Navigation/theme.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationItemLocator.d.ts","sourceRoot":"","sources":["../../../src/Navigation/NavigationItem/NavigationItemLocator.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,qBAAqB;;sCACF,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAAL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAAL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAAL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAAL,GAAG,EAAE;;oJACnC,CAAA"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { Component } from 'react';
|
|
3
|
-
import { jsx } from '@instructure/emotion';
|
|
4
|
-
import type { NavigationItemProps } from './props';
|
|
5
|
-
/**
|
|
6
|
-
---
|
|
7
|
-
parent: Navigation
|
|
8
|
-
id: Navigation.Item
|
|
9
|
-
---
|
|
10
|
-
**/
|
|
11
|
-
declare class NavigationItem extends Component<NavigationItemProps> {
|
|
12
|
-
static readonly componentId = "Navigation.Item";
|
|
13
|
-
static allowedProps: readonly (keyof {
|
|
14
|
-
elementRef?: ((el: Element | null) => void) | undefined;
|
|
15
|
-
icon: import("react").ReactNode;
|
|
16
|
-
label: import("react").ReactNode;
|
|
17
|
-
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
18
|
-
href?: string | undefined;
|
|
19
|
-
onClick?: ((event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
20
|
-
selected?: boolean | undefined;
|
|
21
|
-
minimized?: boolean | undefined;
|
|
22
|
-
})[];
|
|
23
|
-
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
24
|
-
elementRef?: ((el: Element | null) => void) | undefined;
|
|
25
|
-
icon: import("react").ReactNode;
|
|
26
|
-
label: import("react").ReactNode;
|
|
27
|
-
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
28
|
-
href?: string | undefined;
|
|
29
|
-
onClick?: ((event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
30
|
-
selected?: boolean | undefined;
|
|
31
|
-
minimized?: boolean | undefined;
|
|
32
|
-
}>;
|
|
33
|
-
static defaultProps: {
|
|
34
|
-
readonly as: "a";
|
|
35
|
-
readonly selected: false;
|
|
36
|
-
readonly minimized: false;
|
|
37
|
-
};
|
|
38
|
-
ref: Element | null;
|
|
39
|
-
handleRef: (el: Element | null) => void;
|
|
40
|
-
componentDidMount(): void;
|
|
41
|
-
componentDidUpdate(): void;
|
|
42
|
-
renderLink(addRef: boolean): jsx.JSX.Element;
|
|
43
|
-
render(): jsx.JSX.Element;
|
|
44
|
-
}
|
|
45
|
-
export default NavigationItem;
|
|
46
|
-
export { NavigationItem };
|
|
47
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;MAIT;IAEV,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAM9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,UAAU,CAAC,MAAM,EAAE,OAAO;IA0B1B,MAAM;CAYP;AAED,eAAe,cAAc,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locator.d.ts","sourceRoot":"","sources":["../../../src/Navigation/NavigationItem/locator.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAE/D,OAAO,EAAE,qBAAqB,EAAE,CAAA;AAChC,eAAe,qBAAqB,CAAA"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { AsElementType, PropValidators, NavigationItemTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
3
|
-
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
|
-
type NavigationItemOwnProps = {
|
|
5
|
-
/**
|
|
6
|
-
* The reference to the underlying HTML element
|
|
7
|
-
*/
|
|
8
|
-
elementRef?: (el: Element | null) => void;
|
|
9
|
-
/**
|
|
10
|
-
* The visual to display (ex. an Image, Logo, Avatar, or Icon)
|
|
11
|
-
*/
|
|
12
|
-
icon: React.ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* The text to display for the Navigation Link
|
|
15
|
-
*/
|
|
16
|
-
label: React.ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* The element type to render as (will default to `<a>` if href is provided)
|
|
19
|
-
*/
|
|
20
|
-
as?: AsElementType;
|
|
21
|
-
/**
|
|
22
|
-
* If the NavigationItem goes to a new page, pass an href
|
|
23
|
-
*/
|
|
24
|
-
href?: string;
|
|
25
|
-
/**
|
|
26
|
-
* If the NavigationItem does not go to a new page pass an onClick
|
|
27
|
-
*/
|
|
28
|
-
onClick?: (event: React.MouseEvent) => void;
|
|
29
|
-
/**
|
|
30
|
-
* Denotes which NavigationItem is currently selected
|
|
31
|
-
*/
|
|
32
|
-
selected?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* 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
|
|
35
|
-
*/
|
|
36
|
-
minimized?: boolean;
|
|
37
|
-
};
|
|
38
|
-
type PropKeys = keyof NavigationItemOwnProps;
|
|
39
|
-
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
40
|
-
type NavigationItemProps = NavigationItemOwnProps & WithStyleProps<NavigationItemTheme, NavigationItemStyle> & OtherHTMLAttributes<NavigationItemOwnProps>;
|
|
41
|
-
type NavigationItemStyle = ComponentStyle<'navigationItem' | 'icon' | 'label'>;
|
|
42
|
-
declare const propTypes: PropValidators<PropKeys>;
|
|
43
|
-
declare const allowedProps: AllowedPropKeys;
|
|
44
|
-
export type { NavigationItemProps, NavigationItemStyle };
|
|
45
|
-
export { propTypes, allowedProps };
|
|
46
|
-
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Navigation/NavigationItem/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,KAAK,sBAAsB,GAAG;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IACzC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;OAEG;IACH,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAA;IAC3C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,sBAAsB,CAAA;AAE5C,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,mBAAmB,GAAG,sBAAsB,GAC/C,cAAc,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,GACxD,mBAAmB,CAAC,sBAAsB,CAAC,CAAA;AAE7C,KAAK,mBAAmB,GAAG,cAAc,CAAC,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;AAE9E,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CASvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eASnB,CAAA;AAED,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { NavigationItemTheme } from '@instructure/shared-types';
|
|
2
|
-
import type { NavigationItemProps, NavigationItemStyle } 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} state the state of the component, the style is applied to
|
|
11
|
-
* @return {Object} The final style object, which will be used in the component
|
|
12
|
-
*/
|
|
13
|
-
declare const generateStyle: (componentTheme: NavigationItemTheme, props: NavigationItemProps) => NavigationItemStyle;
|
|
14
|
-
export default generateStyle;
|
|
15
|
-
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Navigation/NavigationItem/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAEvE;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,mBAAmB,SAC5B,mBAAmB,KACzB,mBA4DF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@instructure/ui-themes';
|
|
2
|
-
import { NavigationItemTheme } from '@instructure/shared-types';
|
|
3
|
-
/**
|
|
4
|
-
* Generates the theme object for the component from the theme and provided additional information
|
|
5
|
-
* @param {Object} theme The actual theme object.
|
|
6
|
-
* @return {Object} The final theme object with the overrides and component variables
|
|
7
|
-
*/
|
|
8
|
-
declare const generateComponentTheme: (theme: Theme) => NavigationItemTheme;
|
|
9
|
-
export default generateComponentTheme;
|
|
10
|
-
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/Navigation/NavigationItem/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAsB,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAE/D;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,UAAW,KAAK,KAAG,mBA+C9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|