@instructure/ui-breadcrumb 8.14.1-snapshot.0 → 8.14.1-snapshot.12

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.
@@ -5,23 +5,24 @@ import type { BreadcrumbLinkProps } from './props';
5
5
  parent: Breadcrumb
6
6
  id: Breadcrumb.Link
7
7
  ---
8
+ @tsProps
8
9
  **/
9
10
  declare class BreadcrumbLink extends Component<BreadcrumbLinkProps> {
10
11
  static readonly componentId = "Breadcrumb.Link";
11
12
  static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
12
13
  children: React.ReactNode;
13
14
  href?: string | undefined;
14
- onClick?: ((...args: any[]) => any) | undefined;
15
+ onClick?: ((event: React.MouseEvent<import("@instructure/ui-view/types/View/props").ViewOwnProps, MouseEvent>) => void) | undefined;
15
16
  size?: "small" | "medium" | "large" | undefined;
16
- renderIcon?: React.ReactNode | ((...args: any[]) => any);
17
+ renderIcon?: React.ReactNode | (() => React.ReactNode);
17
18
  iconPlacement?: "start" | "end" | undefined;
18
19
  }>;
19
20
  static allowedProps: readonly (keyof {
20
21
  children: React.ReactNode;
21
22
  href?: string | undefined;
22
- onClick?: ((...args: any[]) => any) | undefined;
23
+ onClick?: ((event: React.MouseEvent<import("@instructure/ui-view/types/View/props").ViewOwnProps, MouseEvent>) => void) | undefined;
23
24
  size?: "small" | "medium" | "large" | undefined;
24
- renderIcon?: React.ReactNode | ((...args: any[]) => any);
25
+ renderIcon?: React.ReactNode | (() => React.ReactNode);
25
26
  iconPlacement?: "start" | "end" | undefined;
26
27
  })[];
27
28
  static defaultProps: {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Breadcrumb/BreadcrumbLink/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;GAKG;AAEH,cACM,cAAe,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACzD,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,SAAS;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY,KAAK;IAExB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAE9B;IAED,MAAM;CAqBP;AAED,eAAe,cAAc,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Breadcrumb/BreadcrumbLink/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;;GAMG;AAEH,cACM,cAAe,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACzD,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,SAAS;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY,KAAK;IAExB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAE9B;IAED,MAAM;CAmBP;AAED,eAAe,cAAc,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -1,16 +1,37 @@
1
1
  import React from 'react';
2
2
  import type { OtherHTMLAttributes, PropValidators } from '@instructure/shared-types';
3
+ import type { ViewOwnProps } from '@instructure/ui-view';
3
4
  declare type BreadcrumbLinkOwnProps = {
5
+ /**
6
+ * Content to render as the crumb, generally should be text.
7
+ */
4
8
  children: React.ReactNode;
9
+ /**
10
+ * Link the crumb should direct to; if an href is provided, the crumb will render as a link
11
+ */
5
12
  href?: string;
6
- onClick?: (...args: any[]) => any;
13
+ /**
14
+ * If the Breadcrumb.Link has an onClick prop (and no href), it will render as a button
15
+ */
16
+ onClick?: (event: React.MouseEvent<ViewOwnProps, MouseEvent>) => void;
17
+ /**
18
+ * Sets the font-size of the breadcrumb text
19
+ */
7
20
  size?: 'small' | 'medium' | 'large';
8
- renderIcon?: React.ReactNode | ((...args: any[]) => any);
21
+ /**
22
+ * Add an icon to the Breadcrumb.Link
23
+ */
24
+ renderIcon?: React.ReactNode | (() => React.ReactNode);
25
+ /**
26
+ * Place the icon before or after the text in the Breadcrumb.Link
27
+ */
9
28
  iconPlacement?: 'start' | 'end';
10
29
  };
11
30
  declare type PropKeys = keyof BreadcrumbLinkOwnProps;
12
31
  declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
13
- declare type BreadcrumbLinkProps = BreadcrumbLinkOwnProps & OtherHTMLAttributes<BreadcrumbLinkOwnProps>;
32
+ declare type BreadcrumbLinkProps = BreadcrumbLinkOwnProps & OtherHTMLAttributes<BreadcrumbLinkOwnProps> & {
33
+ to?: string;
34
+ };
14
35
  declare const propTypes: PropValidators<PropKeys>;
15
36
  declare const allowedProps: AllowedPropKeys;
16
37
  export type { BreadcrumbLinkProps };
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Breadcrumb/BreadcrumbLink/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACf,MAAM,2BAA2B,CAAA;AAElC,aAAK,sBAAsB,GAAG;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ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AAM,KAAK,CAAC,SAAS,CAAC,CAAA;IACtD;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;CAChC,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,GAC/C,mBAAmB,CAAC,sBAAsB,CAAC,GAAG;IAE5C,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAEH,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAOvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAOnB,CAAA;AAED,YAAY,EAAE,mBAAmB,EAAE,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -7,6 +7,7 @@ import type { BreadcrumbProps } from './props';
7
7
  ---
8
8
  category: components
9
9
  ---
10
+ @tsProps
10
11
  **/
11
12
  declare class Breadcrumb extends Component<BreadcrumbProps> {
12
13
  static readonly componentId = "Breadcrumb";
@@ -29,7 +30,7 @@ declare class Breadcrumb extends Component<BreadcrumbProps> {
29
30
  ref: Element | null;
30
31
  handleRef: (el: Element | null) => void;
31
32
  componentDidMount(): void;
32
- componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
33
+ componentDidUpdate(): void;
33
34
  static Link: typeof BreadcrumbLink;
34
35
  renderChildren(): jsx.JSX.Element[] | null | undefined;
35
36
  render(): jsx.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Breadcrumb/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMxC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,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lB,MAAM,CAAC,IAAI,wBAAiB;IAE5B,cAAc;IAkBd,MAAM;CAeP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
@@ -2,9 +2,23 @@
2
2
  import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
3
3
  import type { BreadcrumbTheme, PropValidators } from '@instructure/shared-types';
4
4
  declare type BreadcrumbOwnProps = {
5
+ /**
6
+ * children of type Breadcrumb.Link
7
+ */
5
8
  children?: React.ReactNode;
9
+ /**
10
+ * An accessible label for the navigation
11
+ */
6
12
  label: string;
13
+ /**
14
+ * Sets the font-size of the breadcrumb text
15
+ */
7
16
  size?: 'small' | 'medium' | 'large';
17
+ /**
18
+ * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
19
+ * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
20
+ * familiar CSS-like shorthand. For example: `margin="small auto large"`.
21
+ */
8
22
  margin?: Spacing;
9
23
  };
10
24
  declare type PropKeys = keyof BreadcrumbOwnProps;
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Breadcrumb/props.ts"],"names":[],"mappings":";AA+BA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAEhF,aAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,kBAAkB,CAAA;AAExC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC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