@octane-xplat/date-picker 0.0.1 → 0.9.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.
@@ -0,0 +1,80 @@
1
+ export type MaterialDatePickerVariant = 'picker' | 'input'
2
+
3
+ export type MaterialDatePickerComponents = 'date' | 'hourAndMinute' | 'dateAndTime'
4
+
5
+ /**
6
+ * Color overrides for the Material 3 picker elements. Every field is a CSS
7
+ * hex string (`#rgb`, `#rrggbb`, or `#aarrggbb`); unset fields use the
8
+ * Material 3 theme defaults.
9
+ */
10
+ export interface MaterialDatePickerElementColors {
11
+ containerColor?: string
12
+ titleContentColor?: string
13
+ headlineContentColor?: string
14
+ weekdayContentColor?: string
15
+ subheadContentColor?: string
16
+ navigationContentColor?: string
17
+ yearContentColor?: string
18
+ disabledYearContentColor?: string
19
+ currentYearContentColor?: string
20
+ selectedYearContentColor?: string
21
+ disabledSelectedYearContentColor?: string
22
+ selectedYearContainerColor?: string
23
+ disabledSelectedYearContainerColor?: string
24
+ dayContentColor?: string
25
+ disabledDayContentColor?: string
26
+ selectedDayContentColor?: string
27
+ disabledSelectedDayContentColor?: string
28
+ selectedDayContainerColor?: string
29
+ disabledSelectedDayContainerColor?: string
30
+ todayContentColor?: string
31
+ todayDateBorderColor?: string
32
+ dayInSelectionRangeContentColor?: string
33
+ dayInSelectionRangeContainerColor?: string
34
+ dividerColor?: string
35
+ clockDialColor?: string
36
+ clockDialSelectedContentColor?: string
37
+ clockDialUnselectedContentColor?: string
38
+ selectorColor?: string
39
+ periodSelectorBorderColor?: string
40
+ periodSelectorSelectedContainerColor?: string
41
+ periodSelectorUnselectedContainerColor?: string
42
+ periodSelectorSelectedContentColor?: string
43
+ periodSelectorUnselectedContentColor?: string
44
+ timeSelectorSelectedContainerColor?: string
45
+ timeSelectorUnselectedContainerColor?: string
46
+ timeSelectorSelectedContentColor?: string
47
+ timeSelectorUnselectedContentColor?: string
48
+ }
49
+
50
+ export interface MaterialDatePickerProps {
51
+ id?: string
52
+ className?: any
53
+ style?: any
54
+ /** Date the picker starts on. The picker keeps its own selection after mount. */
55
+ initialDate?: Date
56
+ /** Calendar grid or text-field input. @default 'picker' */
57
+ variant?: MaterialDatePickerVariant
58
+ /**
59
+ * `'date'` renders the M3 DatePicker, `'hourAndMinute'` the M3 TimePicker.
60
+ * `'dateAndTime'` renders the date picker (combined input is not supported).
61
+ * @default 'date'
62
+ */
63
+ displayedComponents?: MaterialDatePickerComponents
64
+ /** Show the picker/input mode toggle. @default true */
65
+ showVariantToggle?: boolean
66
+ /** 24-hour dial for the time picker. @default true */
67
+ is24Hour?: boolean
68
+ /** Accent applied to a subset of elements when `elementColors` is unset. */
69
+ color?: string
70
+ elementColors?: MaterialDatePickerElementColors
71
+ /** Bounds the selectable date range; also derives the calendar year range. */
72
+ selectableDates?: { start?: Date; end?: Date }
73
+ accessibilityLabel?: string
74
+ /**
75
+ * Called with the selected timestamp (null when the selection clears). The
76
+ * DatePicker emits the chosen UTC day; the TimePicker emits the chosen
77
+ * hour/minute on the initial date's day.
78
+ */
79
+ onDateSelected?: (date: Date | null) => void
80
+ }
@@ -0,0 +1,6 @@
1
+ export { SwiftUIDatePicker } from '../SwiftUIDatePicker.ios.tsrx'
2
+ export type {
3
+ SwiftUIDatePickerComponent,
4
+ SwiftUIDatePickerProps,
5
+ SwiftUIDatePickerStyle,
6
+ } from './types'
@@ -0,0 +1,26 @@
1
+ export type SwiftUIDatePickerStyle = 'automatic' | 'compact' | 'graphical' | 'wheel'
2
+
3
+ export type SwiftUIDatePickerComponent = 'date' | 'hourAndMinute'
4
+
5
+ export interface SwiftUIDatePickerProps {
6
+ id?: string
7
+ className?: any
8
+ style?: any
9
+ /** Label shown next to the picker. When omitted, the label is hidden. */
10
+ title?: string
11
+ /** Controlled selection. Pair with `onSelectionChange`. */
12
+ selection?: Date
13
+ /** Initial selection when `selection` is not provided. */
14
+ defaultSelection?: Date
15
+ /** Earliest selectable date. */
16
+ minimumDate?: Date
17
+ /** Latest selectable date. */
18
+ maximumDate?: Date
19
+ /** Which components the picker displays. @default ['date'] */
20
+ displayedComponents?: readonly SwiftUIDatePickerComponent[]
21
+ /** SwiftUI presentation style. `graphical` renders an inline calendar. @default 'automatic' */
22
+ pickerStyle?: SwiftUIDatePickerStyle
23
+ disabled?: boolean
24
+ accessibilityLabel?: string
25
+ onSelectionChange?: (date: Date) => void
26
+ }
@@ -0,0 +1,6 @@
1
+ export { AppKitDatePicker } from '../AppKitDatePicker.macos.tsrx'
2
+ export type {
3
+ AppKitDatePickerComponents,
4
+ AppKitDatePickerProps,
5
+ AppKitDatePickerStyle,
6
+ } from './types'
@@ -0,0 +1,24 @@
1
+ export type AppKitDatePickerComponents = 'date' | 'time' | 'dateAndTime'
2
+
3
+ export type AppKitDatePickerStyle = 'textField' | 'graphical'
4
+
5
+ export interface AppKitDatePickerProps {
6
+ id?: string
7
+ className?: any
8
+ style?: any
9
+ /** Which element groups the NSDatePicker shows. @default 'date' */
10
+ components?: AppKitDatePickerComponents
11
+ /** 'graphical' embeds the inline calendar (date mode only). @default 'textField' */
12
+ pickerStyle?: AppKitDatePickerStyle
13
+ /** Controlled selection. Pair with `onSelectionChange`. */
14
+ selection?: Date
15
+ /** Initial selection when `selection` is not provided. */
16
+ defaultSelection?: Date
17
+ /** Earliest selectable date. */
18
+ minimumDate?: Date
19
+ /** Latest selectable date. */
20
+ maximumDate?: Date
21
+ disabled?: boolean
22
+ accessibilityLabel?: string
23
+ onSelectionChange?: (date: Date) => void
24
+ }
@@ -0,0 +1,2 @@
1
+ export { DateInput } from '../DateInput.web.tsrx'
2
+ export type { DateInputProps, DateInputType } from './types'
@@ -0,0 +1,20 @@
1
+ export type DateInputType = 'date' | 'time' | 'datetime-local'
2
+
3
+ export interface DateInputProps {
4
+ id?: string
5
+ className?: any
6
+ style?: any
7
+ label?: string
8
+ /** The `<input>` type. @default 'date' */
9
+ type?: DateInputType
10
+ /** Controlled value: `YYYY-MM-DD`, `HH:MM`, or `YYYY-MM-DDTHH:MM`. */
11
+ value?: string
12
+ defaultValue?: string
13
+ /** Earliest allowed value, in the same format as `value`. */
14
+ min?: string
15
+ /** Latest allowed value, in the same format as `value`. */
16
+ max?: string
17
+ disabled?: boolean
18
+ accessibilityLabel?: string
19
+ onChange?: (value: string) => void
20
+ }
@@ -0,0 +1,61 @@
1
+ export type MaterialDatePickerVariant = 'picker' | 'input'
2
+
3
+ export type MaterialDatePickerComponents = 'date' | 'hourAndMinute' | 'dateAndTime'
4
+
5
+ export interface MaterialDatePickerElementColors {
6
+ containerColor?: string
7
+ titleContentColor?: string
8
+ headlineContentColor?: string
9
+ weekdayContentColor?: string
10
+ subheadContentColor?: string
11
+ navigationContentColor?: string
12
+ yearContentColor?: string
13
+ disabledYearContentColor?: string
14
+ currentYearContentColor?: string
15
+ selectedYearContentColor?: string
16
+ disabledSelectedYearContentColor?: string
17
+ selectedYearContainerColor?: string
18
+ disabledSelectedYearContainerColor?: string
19
+ dayContentColor?: string
20
+ disabledDayContentColor?: string
21
+ selectedDayContentColor?: string
22
+ disabledSelectedDayContentColor?: string
23
+ selectedDayContainerColor?: string
24
+ disabledSelectedDayContainerColor?: string
25
+ todayContentColor?: string
26
+ todayDateBorderColor?: string
27
+ dayInSelectionRangeContentColor?: string
28
+ dayInSelectionRangeContainerColor?: string
29
+ dividerColor?: string
30
+ clockDialColor?: string
31
+ clockDialSelectedContentColor?: string
32
+ clockDialUnselectedContentColor?: string
33
+ selectorColor?: string
34
+ periodSelectorBorderColor?: string
35
+ periodSelectorSelectedContainerColor?: string
36
+ periodSelectorUnselectedContainerColor?: string
37
+ periodSelectorSelectedContentColor?: string
38
+ periodSelectorUnselectedContentColor?: string
39
+ timeSelectorSelectedContainerColor?: string
40
+ timeSelectorUnselectedContainerColor?: string
41
+ timeSelectorSelectedContentColor?: string
42
+ timeSelectorUnselectedContentColor?: string
43
+ }
44
+
45
+ export interface MaterialDatePickerProps {
46
+ id?: string
47
+ className?: any
48
+ style?: any
49
+ initialDate?: Date
50
+ variant?: MaterialDatePickerVariant
51
+ displayedComponents?: MaterialDatePickerComponents
52
+ showVariantToggle?: boolean
53
+ is24Hour?: boolean
54
+ color?: string
55
+ elementColors?: MaterialDatePickerElementColors
56
+ selectableDates?: { start?: Date; end?: Date }
57
+ accessibilityLabel?: string
58
+ onDateSelected?: (date: Date | null) => void
59
+ }
60
+
61
+ export declare function MaterialDatePicker(props: MaterialDatePickerProps): unknown
@@ -0,0 +1,21 @@
1
+ export type SwiftUIDatePickerStyle = 'automatic' | 'compact' | 'graphical' | 'wheel'
2
+
3
+ export type SwiftUIDatePickerComponent = 'date' | 'hourAndMinute'
4
+
5
+ export interface SwiftUIDatePickerProps {
6
+ id?: string
7
+ className?: any
8
+ style?: any
9
+ title?: string
10
+ selection?: Date
11
+ defaultSelection?: Date
12
+ minimumDate?: Date
13
+ maximumDate?: Date
14
+ displayedComponents?: readonly SwiftUIDatePickerComponent[]
15
+ pickerStyle?: SwiftUIDatePickerStyle
16
+ disabled?: boolean
17
+ accessibilityLabel?: string
18
+ onSelectionChange?: (date: Date) => void
19
+ }
20
+
21
+ export declare function SwiftUIDatePicker(props: SwiftUIDatePickerProps): unknown
@@ -0,0 +1,20 @@
1
+ export type AppKitDatePickerComponents = 'date' | 'time' | 'dateAndTime'
2
+
3
+ export type AppKitDatePickerStyle = 'textField' | 'graphical'
4
+
5
+ export interface AppKitDatePickerProps {
6
+ id?: string
7
+ className?: any
8
+ style?: any
9
+ components?: AppKitDatePickerComponents
10
+ pickerStyle?: AppKitDatePickerStyle
11
+ selection?: Date
12
+ defaultSelection?: Date
13
+ minimumDate?: Date
14
+ maximumDate?: Date
15
+ disabled?: boolean
16
+ accessibilityLabel?: string
17
+ onSelectionChange?: (date: Date) => void
18
+ }
19
+
20
+ export declare function AppKitDatePicker(props: AppKitDatePickerProps): unknown
@@ -0,0 +1,18 @@
1
+ export type DateInputType = 'date' | 'time' | 'datetime-local'
2
+
3
+ export interface DateInputProps {
4
+ id?: string
5
+ className?: any
6
+ style?: any
7
+ label?: string
8
+ type?: DateInputType
9
+ value?: string
10
+ defaultValue?: string
11
+ min?: string
12
+ max?: string
13
+ disabled?: boolean
14
+ accessibilityLabel?: string
15
+ onChange?: (value: string) => void
16
+ }
17
+
18
+ export declare function DateInput(props: DateInputProps): unknown
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export {}
package/index.js DELETED
@@ -1,2 +0,0 @@
1
- // Reservation stub; implementation will arrive in a later release.
2
- module.exports = {}