@youversion/design-system-components 1.13.0 → 1.15.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 +21 -0
- package/dist/index.es.js +1930 -1837
- package/dist/index.umd.js +2 -2
- package/dist/src/DataTable/DataTable.d.ts +16 -5
- package/dist/src/DataTable/DataTable.d.ts.map +1 -1
- package/dist/src/DataTable/DataTable.stories.d.ts +220 -20
- 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/DataTableHeader.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/RadioSet/RadioSet.d.ts.map +1 -1
- package/dist/src/RadioSet/RadioSetItem.d.ts +2 -2
- package/dist/src/RadioSet/RadioSetItem.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 +1 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
type DataTableRowProps = HTMLAttributes<HTMLTableRowElement
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare function DataTableRow({ children, className, isBordered, ...props }: DataTableRowProps): JSX.Element;
|
|
2
|
+
type DataTableRowProps = HTMLAttributes<HTMLTableRowElement>;
|
|
3
|
+
export declare function DataTableRow({ children, className, ...props }: DataTableRowProps): JSX.Element;
|
|
6
4
|
export {};
|
|
7
5
|
//# sourceMappingURL=DataTableRow.d.ts.map
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioSet.d.ts","sourceRoot":"","sources":["../../../src/RadioSet/RadioSet.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAW,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioSet.d.ts","sourceRoot":"","sources":["../../../src/RadioSet/RadioSet.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAW,YAAY,EAAE,MAAM,eAAe,CAAC;AAGtD,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B;AA4DD,eAAO,MAAM,QAAQ,4GAAgC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AllHTMLAttributes } from 'react';
|
|
2
2
|
export interface RadioItemProps extends AllHTMLAttributes<HTMLInputElement> {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
value: string;
|
|
6
6
|
verticalAlign?: 'start' | 'center';
|
|
7
7
|
}
|
|
8
|
-
export declare const RadioSetItem:
|
|
8
|
+
export declare const RadioSetItem: import("react").ForwardRefExoticComponent<RadioItemProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
9
|
//# sourceMappingURL=RadioSetItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioSetItem.d.ts","sourceRoot":"","sources":["../../../src/RadioSet/RadioSetItem.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"RadioSetItem.d.ts","sourceRoot":"","sources":["../../../src/RadioSet/RadioSetItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA4B,MAAM,OAAO,CAAC;AAIpE,MAAM,WAAW,cAAe,SAAQ,iBAAiB,CAAC,gBAAgB,CAAC;IACzE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CACpC;AA6DD,eAAO,MAAM,YAAY,6GAAoC,CAAC"}
|
package/dist/src/index.d.ts
CHANG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,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"}
|