@wonderflow/react-components 3.0.0-beta.13 → 3.0.0-beta.14

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,7 +1,7 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  export declare type DatetimeProps = HTMLAttributes<HTMLTimeElement> & {
3
3
  date: string;
4
- locale?: string;
4
+ locale?: string | string[];
5
5
  options?: Intl.DateTimeFormatOptions;
6
6
  };
7
- export declare const Datetime: ({ date, locale, options }: DatetimeProps) => JSX.Element;
7
+ export declare const Datetime: ({ date, locale, options, ...otherProps }: DatetimeProps) => JSX.Element;
@@ -1,13 +1,16 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
- export const Datetime = ({ date, locale = 'en-US', options }) => {
3
+ export const Datetime = ({ date, locale = 'en-US', options, ...otherProps }) => {
4
4
  const [datetime, setDateTime] = useState('');
5
5
  useEffect(() => {
6
6
  const timeDate = new Date(date);
7
7
  const humanDate = new Intl.DateTimeFormat(locale, {
8
+ year: 'numeric',
9
+ month: 'long',
10
+ day: 'numeric',
8
11
  ...options
9
12
  }).format(timeDate);
10
13
  setDateTime(humanDate);
11
14
  }, [date, locale, options]);
12
- return (_jsx("time", { dateTime: date, children: datetime }, void 0));
15
+ return (_jsx("time", { dateTime: date, ...otherProps, children: datetime }, void 0));
13
16
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wonderflow/react-components",
3
3
  "description": "UI components from Wonderflow's Wanda design system",
4
- "version": "3.0.0-beta.13",
4
+ "version": "3.0.0-beta.14",
5
5
  "author": "Wonderflow",
6
6
  "license": "MIT",
7
7
  "main": "index.js",
package/themes/dark.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 29 Dec 2021 11:05:58 GMT
3
+ * Generated on Wed, 29 Dec 2021 11:18:04 GMT
4
4
  */
5
5
 
6
6
  :root {
package/themes/light.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 29 Dec 2021 11:05:58 GMT
3
+ * Generated on Wed, 29 Dec 2021 11:18:04 GMT
4
4
  */
5
5
 
6
6
  :root {