@youversion/design-system-components 1.13.0 → 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.
@@ -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,GAAG;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAExF,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,eAc5F"}
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;
@@ -52,4 +52,5 @@ export * from './Tooltip';
52
52
  export * from './Typography';
53
53
  export * from './UserProfileButton';
54
54
  export { cn } from './utils/cn';
55
+ export { palettize } from './utils/palettize';
55
56
  //# sourceMappingURL=index.d.ts.map
@@ -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,U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,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.13.0",
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",