@instructure/ui-byline 11.7.2-snapshot-21 → 11.7.2-snapshot-23
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 +5 -2
- package/es/Byline/v2/index.js +86 -0
- package/es/Byline/v2/props.js +26 -0
- package/es/Byline/v2/styles.js +105 -0
- package/es/exports/b.js +24 -0
- package/lib/Byline/v2/index.js +91 -0
- package/lib/Byline/v2/props.js +31 -0
- package/lib/Byline/v2/styles.js +111 -0
- package/lib/exports/b.js +12 -0
- package/package.json +19 -19
- package/src/Byline/v2/README.md +59 -0
- package/src/Byline/v2/index.tsx +103 -0
- package/src/Byline/v2/props.ts +93 -0
- package/src/Byline/v2/styles.ts +116 -0
- package/src/exports/b.ts +25 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Byline/v2/index.d.ts +30 -0
- package/types/Byline/v2/index.d.ts.map +1 -0
- package/types/Byline/v2/props.d.ts +42 -0
- package/types/Byline/v2/props.d.ts.map +1 -0
- package/types/Byline/v2/styles.d.ts +15 -0
- package/types/Byline/v2/styles.d.ts.map +1 -0
- package/types/exports/b.d.ts +3 -0
- package/types/exports/b.d.ts.map +1 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import type { BylineProps } from './props';
|
|
3
|
+
/**
|
|
4
|
+
---
|
|
5
|
+
category: components
|
|
6
|
+
---
|
|
7
|
+
**/
|
|
8
|
+
declare class Byline extends Component<BylineProps> {
|
|
9
|
+
static readonly componentId = "Byline";
|
|
10
|
+
static allowedProps: readonly (keyof {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
title?: React.ReactNode;
|
|
13
|
+
description?: string | React.ReactNode;
|
|
14
|
+
alignContent?: "top" | "center";
|
|
15
|
+
margin?: import("@instructure/emotion").Spacing;
|
|
16
|
+
size?: "small" | "medium" | "large";
|
|
17
|
+
elementRef?: (element: Element | null) => void;
|
|
18
|
+
})[];
|
|
19
|
+
static defaultProps: {
|
|
20
|
+
alignContent: string;
|
|
21
|
+
};
|
|
22
|
+
ref: Element | null;
|
|
23
|
+
handleRef: (el: Element | null) => void;
|
|
24
|
+
componentDidMount(): void;
|
|
25
|
+
componentDidUpdate(): void;
|
|
26
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
27
|
+
}
|
|
28
|
+
export default Byline;
|
|
29
|
+
export { Byline };
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Byline/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;GAIG;AAEH,cACM,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,WAAW,YAAW;IAEtC,MAAM,CAAC,YAAY;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;MAElB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM;CA4BP;AAED,eAAe,MAAM,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
+
import type { BylineTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
4
|
+
type BylineOwnProps = {
|
|
5
|
+
/**
|
|
6
|
+
* the Byline visual/object
|
|
7
|
+
*/
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* the Byline title
|
|
11
|
+
*/
|
|
12
|
+
title?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* the Byline description
|
|
15
|
+
*/
|
|
16
|
+
description?: string | React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* how should the title and description align
|
|
19
|
+
*/
|
|
20
|
+
alignContent?: 'top' | 'center';
|
|
21
|
+
/**
|
|
22
|
+
* Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
|
|
23
|
+
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
24
|
+
* familiar CSS-like shorthand. For example: `margin="small auto large"`.
|
|
25
|
+
*/
|
|
26
|
+
margin?: Spacing;
|
|
27
|
+
size?: 'small' | 'medium' | 'large';
|
|
28
|
+
/**
|
|
29
|
+
* Provides a reference to the underlying html root element
|
|
30
|
+
*/
|
|
31
|
+
elementRef?: (element: Element | null) => void;
|
|
32
|
+
};
|
|
33
|
+
type PropKeys = keyof BylineOwnProps;
|
|
34
|
+
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
35
|
+
type BylineProps = BylineOwnProps & WithStyleProps<BylineTheme, BylineStyle> & OtherHTMLAttributes<BylineOwnProps>;
|
|
36
|
+
type BylineStyle = ComponentStyle<'byline' | 'figure' | 'caption' | 'title' | 'description' | 'maxWidth'> & {
|
|
37
|
+
maxWidth?: string;
|
|
38
|
+
};
|
|
39
|
+
declare const allowedProps: AllowedPropKeys;
|
|
40
|
+
export type { BylineProps, BylineStyle };
|
|
41
|
+
export { allowedProps };
|
|
42
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Byline/v2/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,WAAW,EACX,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAElC,KAAK,cAAc,GAAG;IACpB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;IACtC;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAIhB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;CAC/C,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,cAAc,CAAA;AAEpC,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,WAAW,GAAG,cAAc,GAC/B,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,GACxC,mBAAmB,CAAC,cAAc,CAAC,CAAA;AAErC,KAAK,WAAW,GAAG,cAAc,CAC/B,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,UAAU,CACvE,GAAG;IACF,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AACD,QAAA,MAAM,YAAY,EAAE,eAQnB,CAAA;AAED,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NewComponentTypes, SharedTokens } from '@instructure/ui-themes';
|
|
2
|
+
import type { BylineProps, BylineStyle } from './props';
|
|
3
|
+
/**
|
|
4
|
+
* ---
|
|
5
|
+
* private: true
|
|
6
|
+
* ---
|
|
7
|
+
* Generates the style object from the theme and provided additional information
|
|
8
|
+
* @param componentTheme The theme variable object.
|
|
9
|
+
* @param params Additional parameters to customize the style.
|
|
10
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
11
|
+
* @return The final style object, which will be used in the component
|
|
12
|
+
*/
|
|
13
|
+
declare const generateStyle: (componentTheme: NewComponentTypes["Byline"], params: BylineProps, _sharedTokens: SharedTokens) => BylineStyle;
|
|
14
|
+
export default generateStyle;
|
|
15
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Byline/v2/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEvD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,GACjB,gBAAgB,iBAAiB,CAAC,QAAQ,CAAC,EAC3C,QAAQ,WAAW,EACnB,eAAe,YAAY,KAC1B,WAwEF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../../src/exports/b.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA"}
|