@instructure/ui-heading 10.21.0 → 10.21.1-snapshot-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 +11 -0
- package/es/Heading/index.js +70 -16
- package/es/Heading/props.js +2 -1
- package/es/Heading/styles.js +31 -6
- package/es/Heading/theme.js +3 -10
- package/lib/Heading/index.js +69 -15
- package/lib/Heading/props.js +2 -1
- package/lib/Heading/styles.js +31 -6
- package/lib/Heading/theme.js +3 -10
- package/package.json +12 -11
- package/src/Heading/README.md +11 -4
- package/src/Heading/index.tsx +46 -4
- package/src/Heading/props.ts +11 -3
- package/src/Heading/styles.ts +33 -8
- package/src/Heading/theme.ts +4 -10
- package/tsconfig.build.json +33 -10
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Heading/index.d.ts +5 -2
- package/types/Heading/index.d.ts.map +1 -1
- package/types/Heading/props.d.ts +7 -3
- package/types/Heading/props.d.ts.map +1 -1
- package/types/Heading/styles.d.ts.map +1 -1
- package/types/Heading/theme.d.ts.map +1 -1
package/types/Heading/index.d.ts
CHANGED
|
@@ -8,10 +8,11 @@ category: components
|
|
|
8
8
|
declare class Heading extends Component<HeadingProps> {
|
|
9
9
|
static readonly componentId = "Heading";
|
|
10
10
|
static propTypes: import("@instructure/shared-types").PropValidators<keyof {
|
|
11
|
+
aiVariant?: "stacked" | "horizontal" | "iconOnly";
|
|
11
12
|
children?: React.ReactNode;
|
|
12
13
|
border?: "none" | "top" | "bottom";
|
|
13
14
|
color?: "primary" | "secondary" | "primary-inverse" | "secondary-inverse" | "inherit" | "ai";
|
|
14
|
-
level?: ("h1" | "h2" | "h3" | "h4" | "h5") | "reset";
|
|
15
|
+
level?: ("h1" | "h2" | "h3" | "h4" | "h5" | "h6") | "reset";
|
|
15
16
|
as?: import("@instructure/shared-types").AsElementType;
|
|
16
17
|
margin?: import("@instructure/emotion").Spacing;
|
|
17
18
|
elementRef?: (element: Element | null) => void;
|
|
@@ -19,10 +20,11 @@ declare class Heading extends Component<HeadingProps> {
|
|
|
19
20
|
variant?: "titlePageDesktop" | "titlePageMobile" | "titleSection" | "titleCardSection" | "titleModule" | "titleCardLarge" | "titleCardRegular" | "titleCardMini" | "label" | "labelInline";
|
|
20
21
|
}>;
|
|
21
22
|
static allowedProps: readonly (keyof {
|
|
23
|
+
aiVariant?: "stacked" | "horizontal" | "iconOnly";
|
|
22
24
|
children?: React.ReactNode;
|
|
23
25
|
border?: "none" | "top" | "bottom";
|
|
24
26
|
color?: "primary" | "secondary" | "primary-inverse" | "secondary-inverse" | "inherit" | "ai";
|
|
25
|
-
level?: ("h1" | "h2" | "h3" | "h4" | "h5") | "reset";
|
|
27
|
+
level?: ("h1" | "h2" | "h3" | "h4" | "h5" | "h6") | "reset";
|
|
26
28
|
as?: import("@instructure/shared-types").AsElementType;
|
|
27
29
|
margin?: import("@instructure/emotion").Spacing;
|
|
28
30
|
elementRef?: (element: Element | null) => void;
|
|
@@ -41,6 +43,7 @@ declare class Heading extends Component<HeadingProps> {
|
|
|
41
43
|
componentDidMount(): void;
|
|
42
44
|
componentDidUpdate(): void;
|
|
43
45
|
renderContent(): string | number | boolean | Iterable<import("react").ReactNode> | import("@emotion/react/jsx-runtime").JSX.Element | null | undefined;
|
|
46
|
+
getAriaLabel(): string | undefined;
|
|
44
47
|
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
45
48
|
}
|
|
46
49
|
export default Heading;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Heading/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Heading/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAiBjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAkB3C;;;;GAIG;AACH,cAEM,OAAQ,SAAQ,SAAS,CAAC,YAAY,CAAC;IAC3C,MAAM,CAAC,QAAQ,CAAC,WAAW,aAAY;IAEvC,MAAM,CAAC,SAAS;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;MAKT;IAEV,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,UAAU;IASV,iBAAiB;IAKjB,kBAAkB;IAKlB,aAAa;IA0Cb,YAAY;IAWZ,MAAM;CA0CP;AAED,eAAe,OAAO,CAAA;AACtB,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
package/types/Heading/props.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import type { AsElementType, PropValidators, HeadingTheme, OtherHTMLAttributes,
|
|
|
2
2
|
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
3
|
type HeadingLevel<U extends keyof JSX.IntrinsicElements> = U;
|
|
4
4
|
type HeadingOwnProps = {
|
|
5
|
+
/**
|
|
6
|
+
* transforms heading into an ai variant
|
|
7
|
+
*/
|
|
8
|
+
aiVariant?: 'stacked' | 'horizontal' | 'iconOnly';
|
|
5
9
|
/**
|
|
6
10
|
* The text content of the Heading
|
|
7
11
|
*/
|
|
@@ -11,13 +15,13 @@ type HeadingOwnProps = {
|
|
|
11
15
|
*/
|
|
12
16
|
border?: 'none' | 'top' | 'bottom';
|
|
13
17
|
/**
|
|
14
|
-
* The font color to render
|
|
18
|
+
* The font color to render, NOTE: `ai` color is deprecated. Use the `aiVariant` prop instead
|
|
15
19
|
*/
|
|
16
20
|
color?: 'primary' | 'secondary' | 'primary-inverse' | 'secondary-inverse' | 'inherit' | 'ai';
|
|
17
21
|
/**
|
|
18
22
|
* The *visual* appearance of the Heading: h1 is largest; h5 is smallest.
|
|
19
23
|
*/
|
|
20
|
-
level?: HeadingLevel<'h1' | 'h2' | 'h3' | 'h4' | 'h5'> | 'reset';
|
|
24
|
+
level?: HeadingLevel<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'> | 'reset';
|
|
21
25
|
/**
|
|
22
26
|
* Choose the element Heading should render as. Will default to the `level` prop
|
|
23
27
|
* if not specified.
|
|
@@ -45,7 +49,7 @@ type HeadingOwnProps = {
|
|
|
45
49
|
type PropKeys = keyof HeadingOwnProps;
|
|
46
50
|
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
47
51
|
type HeadingProps = HeadingOwnProps & WithStyleProps<HeadingTheme, HeadingStyle> & OtherHTMLAttributes<HeadingOwnProps>;
|
|
48
|
-
type HeadingStyle = ComponentStyle<'heading'>;
|
|
52
|
+
type HeadingStyle = ComponentStyle<'heading' | 'igniteAI' | 'igniteAIStacked' | 'withIcon'>;
|
|
49
53
|
declare const propTypes: PropValidators<PropKeys>;
|
|
50
54
|
declare const allowedProps: AllowedPropKeys;
|
|
51
55
|
export type { HeadingProps, HeadingStyle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Heading/props.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACX,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,IAAI,CAAC,CAAA;AAE5D,KAAK,eAAe,GAAG;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAA;IAClC;;OAEG;IACH,KAAK,CAAC,EACF,SAAS,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,EAAE,UAAU,CAAA;IACvB;;OAEG;IACH,OAAO,CAAC,EACJ,kBAAkB,GAClB,iBAAiB,GACjB,cAAc,GACd,kBAAkB,GAClB,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,OAAO,GACP,aAAa,CAAA;CAClB,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,eAAe,CAAA;AAErC,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,YAAY,GAAG,eAAe,GACjC,cAAc,CAAC,YAAY,EAAE,YAAY,CAAC,GAC1C,mBAAmB,CAAC,eAAe,CAAC,CAAA;AAEtC,KAAK,YAAY,GAAG,cAAc,CAChC,SAAS,GAAG,UAAU,GAAG,iBAAiB,GAAG,UAAU,CACxD,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA6BvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAUnB,CAAA;AAED,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Heading/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEzD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,GACjB,gBAAgB,YAAY,EAC5B,OAAO,YAAY,KAClB,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Heading/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEzD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,GACjB,gBAAgB,YAAY,EAC5B,OAAO,YAAY,KAClB,YAgMF,CAAA;AACD,eAAe,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/Heading/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAsB,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,GAAI,OAAO,KAAK,KAAG,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/Heading/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAsB,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,GAAI,OAAO,KAAK,KAAG,YAyD9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|