@dhis2-ui/calendar 8.15.0-alpha.3 → 8.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +10 -13
  2. package/types/index.d.ts +0 -61
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/calendar",
3
- "version": "8.15.0-alpha.3",
3
+ "version": "8.15.0",
4
4
  "description": "UI Calendar",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,6 @@
13
13
  "main": "./build/cjs/index.js",
14
14
  "module": "./build/es/index.js",
15
15
  "exports": {
16
- "types": "./types/index.d.ts",
17
16
  "import": "./build/es/index.js",
18
17
  "require": "./build/cjs/index.js"
19
18
  },
@@ -33,27 +32,25 @@
33
32
  "styled-jsx": "^4"
34
33
  },
35
34
  "dependencies": {
36
- "@dhis2-ui/button": "8.15.0-alpha.3",
37
- "@dhis2-ui/card": "8.15.0-alpha.3",
38
- "@dhis2-ui/input": "8.15.0-alpha.3",
39
- "@dhis2-ui/layer": "8.15.0-alpha.3",
40
- "@dhis2-ui/popper": "8.15.0-alpha.3",
35
+ "@dhis2-ui/button": "8.15.0",
36
+ "@dhis2-ui/card": "8.15.0",
37
+ "@dhis2-ui/input": "8.15.0",
38
+ "@dhis2-ui/layer": "8.15.0",
39
+ "@dhis2-ui/popper": "8.15.0",
41
40
  "@dhis2/multi-calendar-dates": "1.0.2",
42
41
  "@dhis2/prop-types": "^3.1.2",
43
- "@dhis2/ui-constants": "8.15.0-alpha.3",
44
- "@dhis2/ui-icons": "8.15.0-alpha.3",
42
+ "@dhis2/ui-constants": "8.15.0",
43
+ "@dhis2/ui-icons": "8.15.0",
45
44
  "classnames": "^2.3.1",
46
45
  "prop-types": "^15.7.2"
47
46
  },
48
47
  "files": [
49
- "build",
50
- "types"
48
+ "build"
51
49
  ],
52
50
  "devDependencies": {
53
51
  "@dhis2/d2-i18n": "^1.1.0",
54
52
  "react": "16.13",
55
53
  "react-dom": "16.13",
56
54
  "styled-jsx": "^4.0.1"
57
- },
58
- "types": "types"
55
+ }
59
56
  }
package/types/index.d.ts DELETED
@@ -1,61 +0,0 @@
1
- import * as React from 'react'
2
- import { useDatePicker } from '@dhis2/multi-calendar-dates'
3
- import { InputFieldProps } from '@dhis2-ui/input'
4
-
5
- export type CalendarDir = 'ltr' | 'rtl'
6
-
7
- type CalendarPickerParam = Parameters<typeof useDatePicker>[0]
8
- type CalendarPickerOptions = CalendarPickerParam['options']
9
-
10
- export interface CalendarProps {
11
- /**
12
- * the calendar to use such gregory, ethiopic, nepali - full supported list here: https://github.com/dhis2/multi-calendar-dates/blob/main/src/constants/calendars.ts
13
- */
14
- calendar: CalendarPickerOptions['calendar']
15
- /**
16
- * Called with signature `(null)` \|\| `({ dateCalendarString: string, dateCalendar: Temporal.ZonedDateTime })` with `dateCalendarString` being the stringified date in the specified calendar in the format `yyyy-MM-dd`
17
- */
18
- onDateSelect: CalendarPickerParam['onDateSelect']
19
- /**
20
- * the size of a single cell in the table forming the calendar
21
- */
22
- cellSize?: string
23
- /**
24
- * the currently selected date using an iso-like format YYYY-MM-DD, in the calendar system provided (not iso8601)
25
- */
26
- date?: string
27
- /**
28
- * the direction of the library - internally the library will use rtl for rtl-languages but this can be overridden here for more control
29
- */
30
- dir?: CalendarDir
31
- /**
32
- * any valid locale - if none provided, the internal library will fallback to the user locale (more info here: https://github.com/dhis2/multi-calendar-dates/blob/main/src/hooks/internal/useResolvedLocaleOptions.ts#L15)
33
- */
34
- locale?: string
35
- /**
36
- * numbering system to use - full list here https://github.com/dhis2/multi-calendar-dates/blob/main/src/constants/numberingSystems.ts
37
- */
38
- numberingSystem?: CalendarPickerOptions['numberingSystem']
39
- /**
40
- * the timeZone to use
41
- */
42
- timeZone?: CalendarPickerOptions['timeZone']
43
- /**
44
- * the format to display for the week day, i.e. Monday (long), Mon (short), M (narrow)
45
- */
46
- weekDayFormat?: CalendarPickerOptions['weekDayFormat']
47
- /**
48
- * the width of the calendar component
49
- */
50
- width?: string
51
- }
52
-
53
- export const Calendar: React.FC<CalendarProps>
54
-
55
- export type CalendarInputProps = Omit<
56
- InputFieldProps,
57
- 'label' | 'type' | 'value'
58
- > &
59
- CalendarProps
60
-
61
- export const CalendarInput: React.FC<CalendarInputProps>