@equinor/fusion-react-date 0.2.0 → 0.3.3
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/README.md +6 -24
- package/dist/DateRange.d.ts +0 -1
- package/dist/DateRange.d.ts.map +1 -1
- package/dist/DateRange.js +2 -2
- package/dist/DateRange.js.map +1 -1
- package/dist/DateTime.d.ts +0 -2
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +2 -3
- package/dist/DateTime.js.map +1 -1
- package/package.json +4 -6
package/README.md
CHANGED
|
@@ -1,35 +1,17 @@
|
|
|
1
1
|
<!--prettier-ignore-start-->
|
|
2
|
-
|
|
2
|
+
# @equinor/fusion-react-date
|
|
3
|
+
[](https://www.npmjs.com/package/@equinor/fusion-react-date)
|
|
3
4
|
|
|
4
|
-
[Storybook](https://equinor.github.io/fusion-react-components/?path=/docs/
|
|
5
|
+
[Storybook](https://equinor.github.io/fusion-react-components/?path=/docs/data-date)
|
|
5
6
|
|
|
6
|
-
[Fusion Web Component](https://github.com/equinor/fusion-web-components/tree/main/packages/
|
|
7
|
+
[Fusion Web Component](https://github.com/equinor/fusion-web-components/tree/main/packages/date)
|
|
7
8
|
|
|
8
9
|
### Installation
|
|
9
10
|
|
|
10
11
|
```sh
|
|
11
|
-
npm install @equinor/fusion-react-
|
|
12
|
+
npm install @equinor/fusion-react-date
|
|
12
13
|
```
|
|
13
14
|
|
|
14
15
|
## Example Usage
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
<Checkbox value='value' checked/>
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### Properties/Attributes
|
|
21
|
-
|
|
22
|
-
Name | Type | Default | Description
|
|
23
|
-
-------------------- | --------- | ------- | -----------
|
|
24
|
-
`checked` | `boolean` | `false` | Whether the checkbox is checked.
|
|
25
|
-
`indeterminate` | `boolean` | `false` | When a checkbox is the parent of a set of child checkboxes, the *indeterminate* state is used on the parent to indicate that some but not all of its children are checked.
|
|
26
|
-
`disabled` | `boolean` | `false` | When `true`, the checkbox cannot be interacted with, and renders in muted colors.
|
|
27
|
-
`value` | `string` | `''` | The value that will be included if the checkbox is submitted in a form.
|
|
28
|
-
`reducedTouchTarget` | `boolean` | `false` | When `true`, the checkbox remove padding for touchscreens and increase density. Note, the checkbox will no longer meet accessibility guidelines for touch.
|
|
29
|
-
|
|
30
|
-
### Events
|
|
31
|
-
|
|
32
|
-
| Event Name | Target | Detail | Description
|
|
33
|
-
| ---------- | -------------- | ------ | -----------
|
|
34
|
-
| `change` | `fwc-checkbox` | `{}` | Fired when the user modifies the checkbox `checked` or `indeterminate` states from an input device interaction. Note that, like [native `<input>`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event), the `change` event is *not* fired when the `checked` or `indeterminate` properties are set from JavaScript.
|
|
35
|
-
<!--prettier-ignore-end-->
|
|
17
|
+
TODO
|
package/dist/DateRange.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FC, HTMLAttributes } from 'react';
|
|
2
2
|
import { DateRangeElement, DateRangeElementProps } from '@equinor/fusion-wc-date';
|
|
3
|
-
export { DateTimeFormat } from '@equinor/fusion-wc-date';
|
|
4
3
|
export declare type DateRangeProps = DateRangeElementProps & HTMLAttributes<DateRangeElement> & {
|
|
5
4
|
date: Date | string;
|
|
6
5
|
};
|
package/dist/DateRange.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRange.d.ts","sourceRoot":"","sources":["../src/DateRange.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"DateRange.d.ts","sourceRoot":"","sources":["../src/DateRange.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAKlF,oBAAY,cAAc,GAAG,qBAAqB,GAChD,cAAc,CAAC,gBAAgB,CAAC,GAAG;IACjC,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC;CACrB,CAAC;AAEJ,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAGxC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/DateRange.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DateRangeElement } from '@equinor/fusion-wc-date';
|
|
2
3
|
import { elementAttributes } from '@equinor/fusion-react-utils';
|
|
3
|
-
|
|
4
|
+
DateRangeElement;
|
|
4
5
|
export const DateRange = (props) => {
|
|
5
6
|
const attributes = elementAttributes(props);
|
|
6
|
-
console.log(attributes);
|
|
7
7
|
return _jsx("fwc-daterange", Object.assign({}, attributes), void 0);
|
|
8
8
|
};
|
|
9
9
|
export default DateRange;
|
package/dist/DateRange.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRange.js","sourceRoot":"","sources":["../src/DateRange.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DateRange.js","sourceRoot":"","sources":["../src/DateRange.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAyB,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,gBAAgB,CAAC;AAOjB,MAAM,CAAC,MAAM,SAAS,GAAuB,CAAC,KAAK,EAAE,EAAE;IACrD,MAAM,UAAU,GAAG,iBAAiB,CAAiB,KAAK,CAAC,CAAC;IAC5D,OAAO,wCAAmB,UAAU,UAAkB,CAAC;AACzD,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/DateTime.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { FC, HTMLAttributes } from 'react';
|
|
2
2
|
import { DateTimeElement, DateTimeElementProps } from '@equinor/fusion-wc-date';
|
|
3
|
-
export { DateTimeFormat } from '@equinor/fusion-wc-date';
|
|
4
|
-
import '@equinor/fusion-wc-date';
|
|
5
3
|
export declare type DateTimeProps = DateTimeElementProps & HTMLAttributes<DateTimeElement> & {
|
|
6
4
|
date: Date | string;
|
|
7
5
|
};
|
package/dist/DateTime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../src/DateTime.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../src/DateTime.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAKhF,oBAAY,aAAa,GAAG,oBAAoB,GAC9C,cAAc,CAAC,eAAe,CAAC,GAAG;IAChC,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC;CACrB,CAAC;AAEJ,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAGtC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/dist/DateTime.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DateTimeElement } from '@equinor/fusion-wc-date';
|
|
2
3
|
import { elementAttributes } from '@equinor/fusion-react-utils';
|
|
3
|
-
|
|
4
|
-
import '@equinor/fusion-wc-date';
|
|
4
|
+
DateTimeElement;
|
|
5
5
|
export const DateTime = (props) => {
|
|
6
6
|
const attributes = elementAttributes(props);
|
|
7
|
-
console.log(attributes);
|
|
8
7
|
return _jsx("fwc-datetime", Object.assign({}, attributes), void 0);
|
|
9
8
|
};
|
|
10
9
|
export default DateTime;
|
package/dist/DateTime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTime.js","sourceRoot":"","sources":["../src/DateTime.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DateTime.js","sourceRoot":"","sources":["../src/DateTime.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAwB,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,eAAe,CAAC;AAOhB,MAAM,CAAC,MAAM,QAAQ,GAAsB,CAAC,KAAK,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,iBAAiB,CAAgB,KAAK,CAAC,CAAC;IAC3D,OAAO,uCAAkB,UAAU,UAAiB,CAAC;AACvD,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-react-date",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "component for formatting and displaying dates",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"date",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "tsc -b",
|
|
29
|
+
"watch": "tsc -w",
|
|
29
30
|
"lint": "eslint --ext .ts,.tsx,.js src/",
|
|
30
31
|
"lint:fix": "eslint --ext .ts,.tsx,.js src/ --fix",
|
|
31
32
|
"prepack": "npm run build"
|
|
@@ -34,11 +35,8 @@
|
|
|
34
35
|
"url": "https://github.com/equinor/fusion-react-components/issues"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@equinor/fusion-react-utils": "^1.1.
|
|
38
|
+
"@equinor/fusion-react-utils": "^1.1.5",
|
|
38
39
|
"@equinor/fusion-wc-date": "^0.2.6"
|
|
39
40
|
},
|
|
40
|
-
"
|
|
41
|
-
"typescript": "^4.3.5"
|
|
42
|
-
},
|
|
43
|
-
"gitHead": "136ec4a471b816948541354591ab1f6bfc5322f8"
|
|
41
|
+
"gitHead": "df46a854e36b48679f389d82af24850a4ab391c8"
|
|
44
42
|
}
|