@youversion/design-system-components 1.12.5 → 1.14.0
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 +23 -0
- package/dist/index.es.js +2059 -1969
- package/dist/index.umd.js +2 -2
- package/dist/src/DataTable/DataTable.d.ts +14 -4
- package/dist/src/DataTable/DataTable.d.ts.map +1 -1
- package/dist/src/DataTable/DataTable.stories.d.ts +219 -19
- package/dist/src/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/src/DataTable/DataTableCell.d.ts +3 -1
- package/dist/src/DataTable/DataTableCell.d.ts.map +1 -1
- package/dist/src/DataTable/DataTableCellContent.d.ts.map +1 -1
- package/dist/src/DataTable/DataTableRow.d.ts +2 -4
- package/dist/src/DataTable/DataTableRow.d.ts.map +1 -1
- package/dist/src/DataTableContainer/DataTableContainer.d.ts +1 -1
- package/dist/src/DataTableContainer/DataTableContainer.stories.d.ts +5 -5
- package/dist/src/Dialog/Dialog.d.ts +6 -0
- package/dist/src/Dialog/Dialog.d.ts.map +1 -1
- package/dist/src/LoadingSpinner/LoadingSpinner.d.ts +4 -3
- package/dist/src/LoadingSpinner/LoadingSpinner.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/utils/palettize.d.ts +34 -0
- package/dist/src/utils/palettize.d.ts.map +1 -0
- package/package.json +6 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableRow.d.ts","sourceRoot":"","sources":["../../../src/DataTable/DataTableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAIvC,KAAK,iBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"DataTableRow.d.ts","sourceRoot":"","sources":["../../../src/DataTable/DataTableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAIvC,KAAK,iBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;AAE7D,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,eAMhF"}
|
|
@@ -8,7 +8,7 @@ export declare const DataTableContainer: import("react").ForwardRefExoticCompone
|
|
|
8
8
|
/** ClassNames which can be used for styling container. */
|
|
9
9
|
containerClassNames?: string | undefined;
|
|
10
10
|
/** Element which will be rendered below the table. */
|
|
11
|
-
customFooter?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
11
|
+
customFooter?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | null | undefined;
|
|
12
12
|
/** Element which will be rendered above the table. */
|
|
13
13
|
customHeader?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
14
14
|
/** ClassNames which can be used for styling footer container. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("react").HTMLAttributes<HTMLTableElement> & {
|
|
3
3
|
containerClassNames?: string | undefined;
|
|
4
|
-
customFooter?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
4
|
+
customFooter?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null | undefined;
|
|
5
5
|
customHeader?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
6
6
|
footerClassNames?: string | undefined;
|
|
7
7
|
headerClassNames?: string | undefined;
|
|
@@ -10,7 +10,7 @@ declare const _default: import("@storybook/types").ComponentAnnotations<import("
|
|
|
10
10
|
export default _default;
|
|
11
11
|
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("react").HTMLAttributes<HTMLTableElement> & {
|
|
12
12
|
containerClassNames?: string | undefined;
|
|
13
|
-
customFooter?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
13
|
+
customFooter?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null | undefined;
|
|
14
14
|
customHeader?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
15
15
|
footerClassNames?: string | undefined;
|
|
16
16
|
headerClassNames?: string | undefined;
|
|
@@ -18,7 +18,7 @@ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import
|
|
|
18
18
|
} & import("react").RefAttributes<HTMLTableElement>>;
|
|
19
19
|
export declare const WithStandardHeader: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("react").HTMLAttributes<HTMLTableElement> & {
|
|
20
20
|
containerClassNames?: string | undefined;
|
|
21
|
-
customFooter?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
21
|
+
customFooter?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null | undefined;
|
|
22
22
|
customHeader?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
23
23
|
footerClassNames?: string | undefined;
|
|
24
24
|
headerClassNames?: string | undefined;
|
|
@@ -26,7 +26,7 @@ export declare const WithStandardHeader: import("@storybook/types").AnnotatedSto
|
|
|
26
26
|
} & import("react").RefAttributes<HTMLTableElement>>;
|
|
27
27
|
export declare const WithCustomHeader: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("react").HTMLAttributes<HTMLTableElement> & {
|
|
28
28
|
containerClassNames?: string | undefined;
|
|
29
|
-
customFooter?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
29
|
+
customFooter?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null | undefined;
|
|
30
30
|
customHeader?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
31
31
|
footerClassNames?: string | undefined;
|
|
32
32
|
headerClassNames?: string | undefined;
|
|
@@ -34,7 +34,7 @@ export declare const WithCustomHeader: import("@storybook/types").AnnotatedStory
|
|
|
34
34
|
} & import("react").RefAttributes<HTMLTableElement>>;
|
|
35
35
|
export declare const WithCustomFooter: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("react").HTMLAttributes<HTMLTableElement> & {
|
|
36
36
|
containerClassNames?: string | undefined;
|
|
37
|
-
customFooter?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
37
|
+
customFooter?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null | undefined;
|
|
38
38
|
customHeader?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
39
39
|
footerClassNames?: string | undefined;
|
|
40
40
|
headerClassNames?: string | undefined;
|
|
@@ -7,14 +7,20 @@ type ConfirmationOptions = Omit<AllCapsVariant, 'children'> & {
|
|
|
7
7
|
export interface DialogProps extends HtmlHTMLAttributes<HTMLDialogElement> {
|
|
8
8
|
/** Focus on first focusable element in scope. Defaults to `true`. */
|
|
9
9
|
autoFocus?: boolean;
|
|
10
|
+
/** Add aria-label for close button. */
|
|
11
|
+
closeButtonLabel?: string;
|
|
10
12
|
/** Add classNames to close icon. */
|
|
11
13
|
closeIconClassName?: string;
|
|
12
14
|
/** Array of buttons that may be added to confirmation type dialog. */
|
|
13
15
|
confirmationButtons?: Array<ConfirmationOptions>;
|
|
16
|
+
/** Add classNames to confirmation buttons container. */
|
|
17
|
+
confirmationContainerClassName?: string;
|
|
14
18
|
/** Either `'confirmation'` or `'modal'`. Defaults to `'modal'`. */
|
|
15
19
|
dialogType?: 'confirmation' | 'modal';
|
|
16
20
|
/** The heading of the dialog. */
|
|
17
21
|
heading?: string;
|
|
22
|
+
/** Add classNames to the heading. */
|
|
23
|
+
headingClassName?: string;
|
|
18
24
|
/** Boolean that allows the modal to be closed by clicking outside of it. Defaults to `true`. */
|
|
19
25
|
isDismissableOnOutsideClick?: boolean;
|
|
20
26
|
/** Called when close button is pressed. Needs to set the isOpen state to false. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAA4B,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,cAAc,EAAU,MAAM,WAAW,CAAC;AAOnD,KAAK,mBAAmB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,kBAAkB,CAAC,iBAAiB,CAAC;IACxE,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oCAAoC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACjD,mEAAmE;IACnE,UAAU,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;IACtC,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gGAAgG;IAChG,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,mFAAmF;IACnF,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAA4B,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,cAAc,EAAU,MAAM,WAAW,CAAC;AAOnD,KAAK,mBAAmB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,kBAAkB,CAAC,iBAAiB,CAAC;IACxE,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oCAAoC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACjD,wDAAwD;IACxD,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,mEAAmE;IACnE,UAAU,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;IACtC,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gGAAgG;IAChG,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,mFAAmF;IACnF,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAyED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,MAAM,2GAA8B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import SpinnerIcon from '@youversion/design-system-icons/lib/Spinner';
|
|
2
|
-
|
|
3
|
+
interface LoadingSpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
4
|
/** Accessibility label. Default `Loading…`. */
|
|
4
5
|
'aria-label'?: string;
|
|
5
6
|
/** Optional className. Should not conflict with `width, height, color` props. */
|
|
@@ -16,7 +17,7 @@ type LoadingSpinnerProps = {
|
|
|
16
17
|
iconSize?: string | number;
|
|
17
18
|
/** Width of the container (tailwind classes). Default `w-full`. */
|
|
18
19
|
width?: string;
|
|
19
|
-
}
|
|
20
|
+
}
|
|
20
21
|
/**
|
|
21
22
|
* Reusable animated version of the Loading icon.
|
|
22
23
|
*
|
|
@@ -50,6 +51,6 @@ type LoadingSpinnerProps = {
|
|
|
50
51
|
* }
|
|
51
52
|
* ```
|
|
52
53
|
*/
|
|
53
|
-
export declare function LoadingSpinner({ 'aria-label': ariaLabel, duration, iconSize, className, color, height, width, iconProps, }: LoadingSpinnerProps): JSX.Element;
|
|
54
|
+
export declare function LoadingSpinner({ 'aria-label': ariaLabel, duration, iconSize, className, color, height, width, iconProps, ...props }: LoadingSpinnerProps): JSX.Element;
|
|
54
55
|
export {};
|
|
55
56
|
//# sourceMappingURL=LoadingSpinner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../src/LoadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../src/LoadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,MAAM,6CAA6C,CAAC;AAItE,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACxE,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,OAAO,CAAC,CAAC;IACzG,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EAAE,SAAsB,EACpC,QAAc,EACd,QAAiB,EACjB,SAAS,EACT,KAAsB,EACtB,MAAiB,EACjB,KAAgB,EAChB,SAAc,EACd,GAAG,KAAK,EACT,EAAE,mBAAmB,eAWrB"}
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface PaletteItem {
|
|
2
|
+
color: string;
|
|
3
|
+
count: number;
|
|
4
|
+
}
|
|
5
|
+
interface Opts {
|
|
6
|
+
scale?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Analyzes an image and returns an array of colors in the image sorted by usage count.
|
|
10
|
+
*
|
|
11
|
+
* @param imageURL - The URL of the image to analyze.
|
|
12
|
+
* @param [options] - An object containing options. The only option currently supported is `scale`. It defaults to 1.
|
|
13
|
+
*
|
|
14
|
+
* @returns An array of colors sorted by usage count.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* import { palettize } from '@/utils/palletize';
|
|
18
|
+
*
|
|
19
|
+
* palletize('https://example.com/some.jpg', {})
|
|
20
|
+
* .then(colors => {
|
|
21
|
+
* setMostUsedColor(colors[0].color);
|
|
22
|
+
* )
|
|
23
|
+
*
|
|
24
|
+
* palletize('https://example.com/some.jpg', { scale: 2 })
|
|
25
|
+
* .then(colors => {
|
|
26
|
+
* setMostUsedColor(colors[0].color);
|
|
27
|
+
* )
|
|
28
|
+
*/
|
|
29
|
+
export declare const palettize: (imageURL: string, opts: Opts) => Promise<{
|
|
30
|
+
color: string;
|
|
31
|
+
count: number;
|
|
32
|
+
}[]>;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=palettize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"palettize.d.ts","sourceRoot":"","sources":["../../../src/utils/palettize.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,IAAI;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA+DD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,eAAO,MAAM,SAAS,aAAoB,MAAM,QAAQ,IAAI;;;IAK3D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youversion/design-system-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"main": "./dist/index.umd.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@radix-ui/react-slot": "1.1.0",
|
|
25
|
-
"@youversion/design-system-core": "
|
|
25
|
+
"@youversion/design-system-core": "2.0.0",
|
|
26
26
|
"@youversion/design-system-icons": "1.3.0",
|
|
27
|
-
"@youversion/design-system-tokens": "1.
|
|
27
|
+
"@youversion/design-system-tokens": "1.4.0",
|
|
28
28
|
"clsx": "1.2.1",
|
|
29
29
|
"tailwind-merge": "1.13.2"
|
|
30
30
|
},
|
|
@@ -73,5 +73,8 @@
|
|
|
73
73
|
"./reset.css": "./dist/styles/global.css",
|
|
74
74
|
"./styles": "./src/styles/index.css",
|
|
75
75
|
"./dist/style.css": "./dist/style.css"
|
|
76
|
+
},
|
|
77
|
+
"resolutions": {
|
|
78
|
+
"cross-spawn": "7.0.6"
|
|
76
79
|
}
|
|
77
80
|
}
|