@youversion/design-system-components 0.2.5 → 0.2.7
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 +12 -0
- package/dist/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/dist/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/Button/Button.d.ts +17 -17
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/IconButton/IconButton.d.ts +2 -0
- package/dist/IconButton/IconButton.d.ts.map +1 -1
- package/dist/IconLinkButton/IconLinkButton.d.ts +3 -0
- package/dist/IconLinkButton/IconLinkButton.d.ts.map +1 -1
- package/dist/index.es.js +1750 -1754
- package/dist/index.umd.js +26 -26
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @youversion/design-system-components
|
|
2
2
|
|
|
3
|
+
## 0.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cf5701a: Add variants to Icon\*Button
|
|
8
|
+
|
|
9
|
+
## 0.2.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- bfc8a4e: Added a `disabled` prop to the `Breadcrumb` component.
|
|
14
|
+
|
|
3
15
|
## 0.2.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypographyProps } from '../Typography/Typography';
|
|
3
3
|
type NativeAnchorProps = React.AllHTMLAttributes<HTMLAnchorElement>;
|
|
4
|
-
interface BreadcrumbProps extends NativeAnchorProps {
|
|
4
|
+
export interface BreadcrumbProps extends NativeAnchorProps {
|
|
5
5
|
active?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare const Breadcrumb: {
|
|
8
|
-
({ children, component, className, active, ...rest }: BreadcrumbProps & TypographyProps): JSX.Element;
|
|
8
|
+
({ children, component, className, disabled, active, ...rest }: BreadcrumbProps & TypographyProps): JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,KAAK,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAEpE,
|
|
1
|
+
{"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,KAAK,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAEpE,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,UAAU;oEAOpB,eAAe,GAAG,eAAe;;CAgBnC,CAAC"}
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { ElementType } from 'react';
|
|
|
2
2
|
import { AllHTMLAttributes, ForwardedRef } from 'react';
|
|
3
3
|
export type IconPosition = 'start' | 'end' | undefined;
|
|
4
4
|
export declare const buttonSizeOptions: {
|
|
5
|
-
lg:
|
|
6
|
-
md:
|
|
7
|
-
sm:
|
|
8
|
-
xl:
|
|
9
|
-
xs:
|
|
5
|
+
readonly lg: "lg";
|
|
6
|
+
readonly md: "md";
|
|
7
|
+
readonly sm: "sm";
|
|
8
|
+
readonly xl: "xl";
|
|
9
|
+
readonly xs: "xs";
|
|
10
10
|
};
|
|
11
11
|
export declare const determineSizeClasses: (iconPosition: IconPosition) => {
|
|
12
12
|
lg: string;
|
|
@@ -16,21 +16,21 @@ export declare const determineSizeClasses: (iconPosition: IconPosition) => {
|
|
|
16
16
|
xs: string;
|
|
17
17
|
};
|
|
18
18
|
export declare const iconSizes: {
|
|
19
|
-
lg:
|
|
20
|
-
md:
|
|
21
|
-
sm:
|
|
22
|
-
xl:
|
|
23
|
-
xs:
|
|
19
|
+
readonly lg: 30;
|
|
20
|
+
readonly md: 24;
|
|
21
|
+
readonly sm: 18;
|
|
22
|
+
readonly xl: 36;
|
|
23
|
+
readonly xs: 12;
|
|
24
24
|
};
|
|
25
25
|
export declare const defaultButtonClasses = "items-center leading-default font-bold ease-in-out duration-100 focus:outline-2 focus:outline-info-light dark:focus:outline-info-dark flex w-full max-w-fit";
|
|
26
26
|
export declare const variantClasses: {
|
|
27
|
-
all_caps:
|
|
28
|
-
borderless:
|
|
29
|
-
brand:
|
|
30
|
-
primary:
|
|
31
|
-
risk:
|
|
32
|
-
secondary:
|
|
33
|
-
stroked:
|
|
27
|
+
readonly all_caps: "bg-transparent text-gray-50 dark:text-white hover:text-info-light dark:hover:text-info-dark active:text-blue-40 dark:active:text-blue-20 disabled:opacity-50 disabled:text-gray-50 dark:disabled:text-white uppercase";
|
|
28
|
+
readonly borderless: "bg-transparent text-gray-50 dark:text-white hover:bg-gray-10 dark:hover:bg-gray-40 disabled:opacity-50 dark:disabled:bg-transparent";
|
|
29
|
+
readonly brand: "bg-yv-red dark:bg-yv-red-dark text-white disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white";
|
|
30
|
+
readonly primary: "bg-gray-50 dark:bg-gray-10 text-white dark:text-gray-50 hover:bg-gray-40 active:bg-gray-50 disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white";
|
|
31
|
+
readonly risk: "bg-orange-30 dark:bg-alert-dark text-white disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white";
|
|
32
|
+
readonly secondary: "bg-gray-10 dark:bg-gray-40 text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-gray-10 disabled:text-gray-50";
|
|
33
|
+
readonly stroked: "bg-transparent outline outline-2 outline-gray-50 dark:outline-white text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-transparent dark:disabled:bg-transparent disabled:text-gray-50 dark:disabled:text-white";
|
|
34
34
|
};
|
|
35
35
|
export interface BaseButtonProps extends Omit<AllHTMLAttributes<HTMLButtonElement>, 'size'> {
|
|
36
36
|
children: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,WAAW,EAAc,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAExD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;AAEvD,eAAO,MAAM,iBAAiB;;;;;;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,WAAW,EAAc,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAExD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;AAEvD,eAAO,MAAM,iBAAiB;;;;;;CAMpB,CAAC;AAEX,eAAO,MAAM,oBAAoB,iBAAkB,YAAY;;;;;;CA2B9D,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;CAMZ,CAAC;AAEX,eAAO,MAAM,oBAAoB,gKAC8H,CAAC;AAEhK,eAAO,MAAM,cAAc;;;;;;;;CAejB,CAAC;AAEX,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACzF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;CACjF;AAED,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,cAAc,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,eAAe,wFAWvB,WAAW,OACT,aAAa,iBAAiB,CAAC,gBAsBrC,CAAC;AAEF,eAAO,MAAM,MAAM,2GAA8B,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { variantClasses } from '../Button';
|
|
2
3
|
export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
disabled?: boolean;
|
|
6
|
+
variant?: keyof typeof variantClasses;
|
|
5
7
|
}
|
|
6
8
|
/**
|
|
7
9
|
* The **IconButton** is use to to display an Icon as a button.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/IconButton/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAA4B,MAAM,OAAO,CAAC;AAEvE,MAAM,WAAW,eAAgB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC9E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/IconButton/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAA4B,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,WAAW,eAAgB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC9E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;CACvC;AAmBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,+GAAkC,CAAC"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes, ElementType } from 'react';
|
|
2
|
+
import { variantClasses } from '../Button';
|
|
2
3
|
export interface IconLinkButtonWithComponentProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
component: ElementType;
|
|
5
6
|
href?: string;
|
|
7
|
+
variant?: keyof typeof variantClasses;
|
|
6
8
|
}
|
|
7
9
|
export interface IconLinkButtonWithoutComponentProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
8
10
|
children: React.ReactNode;
|
|
9
11
|
component?: never;
|
|
10
12
|
href: string;
|
|
13
|
+
variant?: keyof typeof variantClasses;
|
|
11
14
|
}
|
|
12
15
|
export type IconLinkButtonsProps = IconLinkButtonWithComponentProps | IconLinkButtonWithoutComponentProps;
|
|
13
16
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconLinkButton.d.ts","sourceRoot":"","sources":["../../../src/IconLinkButton/IconLinkButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAiB,WAAW,EAA4B,MAAM,OAAO,CAAC;AAEnG,MAAM,WAAW,gCAAiC,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC/F,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"IconLinkButton.d.ts","sourceRoot":"","sources":["../../../src/IconLinkButton/IconLinkButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAiB,WAAW,EAA4B,MAAM,OAAO,CAAC;AAEnG,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,WAAW,gCAAiC,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC/F,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;CACvC;AAED,MAAM,WAAW,mCAAoC,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAClG,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;CACvC;AAED,MAAM,MAAM,oBAAoB,GAAG,gCAAgC,GAAG,mCAAmC,CAAC;AAiB1G;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc,oHAAsC,CAAC"}
|