@youversion/design-system-components 1.3.0 → 1.3.2
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 +15 -0
- package/dist/index.es.js +997 -997
- package/dist/index.umd.js +2 -2
- package/dist/src/Banner/Banner.d.ts +33 -0
- package/dist/src/Banner/Banner.d.ts.map +1 -1
- package/dist/src/Banner/BannerStyles.d.ts +26 -0
- package/dist/src/Banner/BannerStyles.d.ts.map +1 -0
- package/dist/src/Box/Box.d.ts +2 -0
- package/dist/src/Box/Box.d.ts.map +1 -1
- package/dist/src/Toast/Toast.d.ts +1 -1
- package/dist/src/Toast/Toast.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/src/stories/Icons.stories.d.ts +0 -22
- package/dist/src/stories/Icons.stories.d.ts.map +0 -1
- package/dist/src/stories/IconsRenderer.d.ts +0 -34
- package/dist/src/stories/IconsRenderer.d.ts.map +0 -1
|
@@ -5,6 +5,39 @@ interface Props extends Omit<AllHTMLAttributes<HTMLDivElement>, 'width' | 'heigh
|
|
|
5
5
|
className?: ClassValue;
|
|
6
6
|
variant?: BannerVariant;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* The **Banner** component is used to display a message to the user. It can take a component or string.
|
|
10
|
+
* In cases where a component like Trans is passed, style must be manually applied.
|
|
11
|
+
*
|
|
12
|
+
* Accepts {@link Props}.
|
|
13
|
+
*
|
|
14
|
+
* @returns Renders a div component, with a nested div that displays the message.
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* function MyComponent() {
|
|
18
|
+
* return (
|
|
19
|
+
* <>
|
|
20
|
+
* <Banner variant='error' className='w-[400px] mlb-3 p-2'>
|
|
21
|
+
* <Text className={bannerTextColorVariants.error}>
|
|
22
|
+
* <Trans
|
|
23
|
+
* components={{
|
|
24
|
+
a: (
|
|
25
|
+
<a
|
|
26
|
+
className={`underline ${bannerTextColorVariants.error}`}
|
|
27
|
+
href='https://partner-support.youversion.com/'
|
|
28
|
+
/>
|
|
29
|
+
),
|
|
30
|
+
}}
|
|
31
|
+
i18nKey='common:generic_error_message'
|
|
32
|
+
t={t}
|
|
33
|
+
/>
|
|
34
|
+
</Text>
|
|
35
|
+
</Banner>
|
|
36
|
+
* </>
|
|
37
|
+
* )
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
8
41
|
export declare function Banner({ className, children, variant }: Props): JSX.Element;
|
|
9
42
|
export {};
|
|
10
43
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAKnD,KAAK,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAEnF,UAAU,KAAM,SAAQ,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC/F,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAmB,EAAE,EAAE,KAAK,eAqBzE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const iconWrapper: {
|
|
2
|
+
default: string;
|
|
3
|
+
error: string;
|
|
4
|
+
info: string;
|
|
5
|
+
mail: string;
|
|
6
|
+
success: string;
|
|
7
|
+
warning: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const bannerBaseStyles = "flex flex-start items-center justify-start plb-2 pis-2 pie-4 rounded-1 w-full text-base leading-normal box-border gap-sm";
|
|
10
|
+
export declare const bannerStyleVariants: {
|
|
11
|
+
default: string;
|
|
12
|
+
error: string;
|
|
13
|
+
info: string;
|
|
14
|
+
mail: string;
|
|
15
|
+
success: string;
|
|
16
|
+
warning: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const bannerTextColorVariants: {
|
|
19
|
+
default: string;
|
|
20
|
+
error: string;
|
|
21
|
+
info: string;
|
|
22
|
+
mail: string;
|
|
23
|
+
success: string;
|
|
24
|
+
warning: string;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=BannerStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerStyles.d.ts","sourceRoot":"","sources":["../../../src/Banner/BannerStyles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,6HAC+F,CAAC;AAE7H,eAAO,MAAM,mBAAmB;;;;;;;CAO/B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;CAOnC,CAAC"}
|
package/dist/src/Box/Box.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export interface BoxProps extends Omit<AllHTMLAttributes<HTMLElement>, 'height'
|
|
|
20
20
|
*
|
|
21
21
|
* Accepts {@link BoxProps}.
|
|
22
22
|
*
|
|
23
|
+
* @deprecated Use html tags instead. For elevation, use `elevation-*` classes.
|
|
24
|
+
*
|
|
23
25
|
* @returns Renders a div component, with the ability to pass YV tailwind tokens as props.
|
|
24
26
|
* @example
|
|
25
27
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../src/Box/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,WAAW,EAA4B,MAAM,OAAO,CAAC;AAKhG,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;IAClG,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAyDD
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../src/Box/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,WAAW,EAA4B,MAAM,OAAO,CAAC;AAKhG,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;IAClG,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAyDD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,GAAG,kGAA2B,CAAC"}
|
|
@@ -4,7 +4,7 @@ type ToastVariant = 'success' | 'error' | 'info' | 'caution' | 'default';
|
|
|
4
4
|
export interface ToastProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'width' | 'height' | 'className'> {
|
|
5
5
|
/** May add styles around the wrapper div of this component */
|
|
6
6
|
className?: string;
|
|
7
|
-
/** Callback that is is loaded when the
|
|
7
|
+
/** Callback that is is loaded when the notification times out of the dismiss button is clicked. */
|
|
8
8
|
dismiss?: () => void;
|
|
9
9
|
/** If set, the toast will timeout automatically in milliseconds */
|
|
10
10
|
duration?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/Toast/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,EAAE,EAAE,iBAAiB,EAAwC,MAAM,OAAO,CAAC;AAIvG,KAAK,aAAa,GAAG,WAAW,GAAG,aAAa,CAAC;AAEjD,KAAK,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAiBzE,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC3G,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/Toast/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,EAAE,EAAE,iBAAiB,EAAwC,MAAM,OAAO,CAAC;AAIvG,KAAK,aAAa,GAAG,WAAW,GAAG,aAAa,CAAC;AAEjD,KAAK,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAiBzE,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC3G,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mGAAmG;IACnG,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wHAAwH;IACxH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yGAAyG;IACzG,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,uEAAuE;IACvE,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,UAAU,CAAC,CA+EnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youversion/design-system-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"main": "./dist/index.umd.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"validate": "yarn lint && yarn typecheck && yarn test"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@youversion/design-system-core": "1.
|
|
24
|
+
"@youversion/design-system-core": "1.2.0",
|
|
25
25
|
"@youversion/design-system-icons": "1.1.0",
|
|
26
26
|
"@youversion/design-system-tokens": "1.3.0",
|
|
27
27
|
"clsx": "1.2.1",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
args: {
|
|
3
|
-
size: number;
|
|
4
|
-
};
|
|
5
|
-
argTypes: {
|
|
6
|
-
size: {
|
|
7
|
-
control: {
|
|
8
|
-
max: number;
|
|
9
|
-
min: number;
|
|
10
|
-
step: number;
|
|
11
|
-
type: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
component: ({ name, size, animationDuration, animated, ...props }: import("./IconsRenderer").IconProps) => JSX.Element;
|
|
16
|
-
title: string;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
19
|
-
export declare const All: ({ size }: {
|
|
20
|
-
size: number;
|
|
21
|
-
}) => JSX.Element;
|
|
22
|
-
//# sourceMappingURL=Icons.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Icons.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,wBAWE;AAEF,eAAO,MAAM,GAAG;UAAsB,MAAM;iBAgB3C,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as Icons from '@youversion/design-system-icons/lib/index';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
type IconNames = keyof typeof Icons;
|
|
4
|
-
type SVGRIconProps = ComponentProps<(typeof Icons)['ArrowDownStroked']>;
|
|
5
|
-
export interface IconProps extends SVGRIconProps {
|
|
6
|
-
/** True, if the icon should be animated. */
|
|
7
|
-
animated?: boolean;
|
|
8
|
-
/** The duration of the animation, if icon is animated. (e.g. "0.9s"). */
|
|
9
|
-
animationDuration?: string | number;
|
|
10
|
-
/**
|
|
11
|
-
* The name of the icon to render.
|
|
12
|
-
*/
|
|
13
|
-
name: IconNames;
|
|
14
|
-
/** The size of the icon to render. */
|
|
15
|
-
size?: string;
|
|
16
|
-
}
|
|
17
|
-
/** The **IconRenderer** is used to render an icon.
|
|
18
|
-
*
|
|
19
|
-
* @internal
|
|
20
|
-
*
|
|
21
|
-
* Accepts {@link IconProps}.
|
|
22
|
-
*
|
|
23
|
-
* @returns Renders an icon.
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```tsx
|
|
27
|
-
* function MyComponent() {
|
|
28
|
-
* <IconRenderer name={icon} />
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
declare const IconRenderer: ({ name, size, animationDuration, animated, ...props }: IconProps) => JSX.Element;
|
|
33
|
-
export { IconRenderer };
|
|
34
|
-
//# sourceMappingURL=IconsRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconsRenderer.d.ts","sourceRoot":"","sources":["../../../src/stories/IconsRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,KAAK,SAAS,GAAG,MAAM,OAAO,KAAK,CAAC;AACpC,KAAK,aAAa,GAAG,cAAc,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;AACxE,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,YAAY,0DAA2E,SAAS,gBAKrG,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|