Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a43b99e

Browse files
epr3zernonia
andauthored
fix(Calendar): update typings for CalendarRootProps (#1909)
* fix(Calendar): update typings of CalendarRootProps * chore: generate docs * chore: update docs --------- Co-authored-by: zernonia <[email protected]>
1 parent 4bb5aea commit a43b99e

17 files changed

+302
-68
lines changed

docs/content/meta/CalendarRoot.md

Lines changed: 195 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,189 @@
11
<!-- This file was automatic generated. Do not edit it manually -->
22

3+
<PropsTable :data="[
4+
{
5+
'name': 'as',
6+
'description': '<p>The element or component this component should render as. Can be overwritten by <code>asChild</code>.</p>\n',
7+
'type': 'AsTag | Component',
8+
'required': false,
9+
'default': '\'div\''
10+
},
11+
{
12+
'name': 'asChild',
13+
'description': '<p>Change the default rendered element for the one passed as a child, merging their props and behavior.</p>\n<p>Read our <a href=\'https://www.reka-ui.com/docs/guides/composition\'>Composition</a> guide for more details.</p>\n',
14+
'type': 'boolean',
15+
'required': false
16+
},
17+
{
18+
'name': 'calendarLabel',
19+
'description': '<p>The accessible label for the calendar</p>\n',
20+
'type': 'string',
21+
'required': false
22+
},
23+
{
24+
'name': 'defaultPlaceholder',
25+
'description': '<p>The default placeholder date</p>\n',
26+
'type': 'DateValue',
27+
'required': false
28+
},
29+
{
30+
'name': 'defaultValue',
31+
'description': '<p>The default value for the calendar</p>\n',
32+
'type': 'DateValue',
33+
'required': false
34+
},
35+
{
36+
'name': 'dir',
37+
'description': '<p>The reading direction of the calendar when applicable. &lt;br&gt; If omitted, inherits globally from <code>ConfigProvider</code> or assumes LTR (left-to-right) reading mode.</p>\n',
38+
'type': '\'ltr\' | \'rtl\'',
39+
'required': false
40+
},
41+
{
42+
'name': 'disabled',
43+
'description': '<p>Whether the calendar is disabled</p>\n',
44+
'type': 'boolean',
45+
'required': false,
46+
'default': 'false'
47+
},
48+
{
49+
'name': 'disableDaysOutsideCurrentView',
50+
'description': '<p>Whether or not to disable days outside the current view.</p>\n',
51+
'type': 'boolean',
52+
'required': false,
53+
'default': 'false'
54+
},
55+
{
56+
'name': 'fixedWeeks',
57+
'description': '<p>Whether or not to always display 6 weeks in the calendar</p>\n',
58+
'type': 'boolean',
59+
'required': false,
60+
'default': 'false'
61+
},
62+
{
63+
'name': 'initialFocus',
64+
'description': '<p>If true, the calendar will focus the selected day, today, or the first day of the month depending on what is visible when the calendar is mounted</p>\n',
65+
'type': 'boolean',
66+
'required': false,
67+
'default': 'false'
68+
},
69+
{
70+
'name': 'isDateDisabled',
71+
'description': '<p>A function that returns whether or not a date is disabled</p>\n',
72+
'type': 'Matcher',
73+
'required': false
74+
},
75+
{
76+
'name': 'isDateUnavailable',
77+
'description': '<p>A function that returns whether or not a date is unavailable</p>\n',
78+
'type': 'Matcher',
79+
'required': false
80+
},
81+
{
82+
'name': 'locale',
83+
'description': '<p>The locale to use for formatting dates</p>\n',
84+
'type': 'string',
85+
'required': false
86+
},
87+
{
88+
'name': 'maxValue',
89+
'description': '<p>The maximum date that can be selected</p>\n',
90+
'type': 'DateValue',
91+
'required': false
92+
},
93+
{
94+
'name': 'minValue',
95+
'description': '<p>The minimum date that can be selected</p>\n',
96+
'type': 'DateValue',
97+
'required': false
98+
},
99+
{
100+
'name': 'modelValue',
101+
'description': '<p>The controlled checked state of the calendar</p>\n',
102+
'type': 'DateValue | DateValue[]',
103+
'required': false
104+
},
105+
{
106+
'name': 'multiple',
107+
'description': '<p>Whether multiple dates can be selected</p>\n',
108+
'type': 'boolean',
109+
'required': false,
110+
'default': 'false'
111+
},
112+
{
113+
'name': 'nextPage',
114+
'description': '<p>A function that returns the next page of the calendar. It receives the current placeholder as an argument inside the component.</p>\n',
115+
'type': '((placeholder: DateValue) => DateValue)',
116+
'required': false
117+
},
118+
{
119+
'name': 'numberOfMonths',
120+
'description': '<p>The number of months to display at once</p>\n',
121+
'type': 'number',
122+
'required': false,
123+
'default': '1'
124+
},
125+
{
126+
'name': 'pagedNavigation',
127+
'description': '<p>This property causes the previous and next buttons to navigate by the number of months displayed at once, rather than one month</p>\n',
128+
'type': 'boolean',
129+
'required': false,
130+
'default': 'false'
131+
},
132+
{
133+
'name': 'placeholder',
134+
'description': '<p>The placeholder date, which is used to determine what month to display when no date is selected</p>\n',
135+
'type': 'DateValue',
136+
'required': false
137+
},
138+
{
139+
'name': 'preventDeselect',
140+
'description': '<p>Whether or not to prevent the user from deselecting a date without selecting another date first</p>\n',
141+
'type': 'boolean',
142+
'required': false,
143+
'default': 'false'
144+
},
145+
{
146+
'name': 'prevPage',
147+
'description': '<p>A function that returns the previous page of the calendar. It receives the current placeholder as an argument inside the component.</p>\n',
148+
'type': '((placeholder: DateValue) => DateValue)',
149+
'required': false
150+
},
151+
{
152+
'name': 'readonly',
153+
'description': '<p>Whether the calendar is readonly</p>\n',
154+
'type': 'boolean',
155+
'required': false,
156+
'default': 'false'
157+
},
158+
{
159+
'name': 'weekdayFormat',
160+
'description': '<p>The format to use for the weekday strings provided via the weekdays slot prop</p>\n',
161+
'type': '\'narrow\' | \'short\' | \'long\'',
162+
'required': false,
163+
'default': '\'narrow\''
164+
},
165+
{
166+
'name': 'weekStartsOn',
167+
'description': '<p>The day of the week to start the calendar on</p>\n',
168+
'type': '0 | 1 | 2 | 3 | 4 | 5 | 6',
169+
'required': false,
170+
'default': '0'
171+
}
172+
]" />
173+
174+
<EmitsTable :data="[
175+
{
176+
'name': 'update:modelValue',
177+
'description': '<p>Event handler called whenever the model value changes</p>\n',
178+
'type': '[date: DateValue]'
179+
},
180+
{
181+
'name': 'update:placeholder',
182+
'description': '<p>Event handler called whenever the placeholder value changes</p>\n',
183+
'type': '[date: DateValue]'
184+
}
185+
]" />
186+
3187
<SlotsTable :data="[
4188
{
5189
'name': 'date',
@@ -34,16 +218,19 @@
34218
{
35219
'name': 'modelValue',
36220
'description': '<p>The current date of the calendar</p>\n',
37-
'type': 'CalendarDate | CalendarDateTime | ZonedDateTime'
38-
},
221+
'type': 'DateValue | DateValue[] | undefined'
222+
}
223+
]" />
224+
225+
<MethodsTable :data="[
39226
{
40-
'name': 'maxDate',
41-
'description': '<p>The maximum selected date of the calendar</p>\n',
42-
'type': 'CalendarDate | CalendarDateTime | ZonedDateTime | undefined'
227+
'name': 'isDateDisabled',
228+
'description': '<p>A function that returns whether or not a date is disabled</p>\n',
229+
'type': 'Matcher'
43230
},
44231
{
45-
'name': 'minDate',
46-
'description': '<p>The minimum selected date of the calendar</p>\n',
47-
'type': 'CalendarDate | CalendarDateTime | ZonedDateTime | undefined'
232+
'name': 'isDateUnavailable',
233+
'description': '<p>A function that returns whether or not a date is unavailable</p>\n',
234+
'type': 'Matcher'
48235
}
49236
]" />

docs/content/meta/DatePickerCalendar.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@
44
{
55
'name': 'date',
66
'description': '',
7-
'type': 'any'
7+
'type': 'DateValue'
88
},
99
{
1010
'name': 'grid',
1111
'description': '',
12-
'type': 'any'
12+
'type': 'Grid<DateValue>[]'
1313
},
1414
{
1515
'name': 'weekDays',
1616
'description': '',
17-
'type': 'any'
17+
'type': 'string[]'
1818
},
1919
{
2020
'name': 'weekStartsOn',
2121
'description': '',
22-
'type': 'any'
22+
'type': '0 | 1 | 2 | 3 | 4 | 5 | 6'
2323
},
2424
{
2525
'name': 'locale',
2626
'description': '',
27-
'type': 'any'
27+
'type': 'string'
2828
},
2929
{
3030
'name': 'fixedWeeks',
3131
'description': '',
32-
'type': 'any'
32+
'type': 'boolean'
3333
}
3434
]" />

docs/content/meta/PinInputRoot.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{
1818
'name': 'defaultValue',
1919
'description': '<p>The default value of the pin inputs when it is initially rendered. Use when you do not need to control its checked state.</p>\n',
20-
'type': 'string[]',
20+
'type': '(string[] | number[])[]',
2121
'required': false
2222
},
2323
{
@@ -47,7 +47,7 @@
4747
{
4848
'name': 'modelValue',
4949
'description': '<p>The controlled checked state of the pin input. Can be binded as <code>v-model</code>.</p>\n',
50-
'type': 'string[] | null',
50+
'type': 'string[] | number[] | null',
5151
'required': false
5252
},
5353
{
@@ -80,27 +80,27 @@
8080
'description': '<p>Input type for the inputs.</p>\n',
8181
'type': '\'number\' | \'text\'',
8282
'required': false,
83-
'default': '\'text\''
83+
'default': '\'text\' as any'
8484
}
8585
]" />
8686

8787
<EmitsTable :data="[
8888
{
8989
'name': 'complete',
9090
'description': '',
91-
'type': '[value: string[]]'
91+
'type': '[value: string[] | number[]]'
9292
},
9393
{
9494
'name': 'update:modelValue',
9595
'description': '<p>Event handler called when the value changes.</p>\n',
96-
'type': '[value: string[]]'
96+
'type': '[value: string[] | number[]]'
9797
}
9898
]" />
9999

100100
<SlotsTable :data="[
101101
{
102102
'name': 'modelValue',
103103
'description': '<p>Current input values</p>\n',
104-
'type': 'string[]'
104+
'type': 'string[] | number[]'
105105
}
106106
]" />

docs/content/meta/ProgressRoot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
{
1818
'name': 'getValueLabel',
1919
'description': '<p>A function to get the accessible label text representing the current value in a human-readable format.</p>\n<p>If not provided, the value label will be read as the numeric value as a percentage of the max value.</p>\n',
20-
'type': '((value: number | null | undefined, max: number) => string | undefined)',
20+
'type': '((value: number | null, max: number) => string)',
2121
'required': false,
22-
'default': '`${Math.round((value / max) * DEFAULT_MAX)}%`'
22+
'default': 'isNumber(value) ? `${Math.round((value / max) * DEFAULT_MAX)}%` : undefined'
2323
},
2424
{
2525
'name': 'max',

docs/content/meta/RangeCalendarRoot.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
'type': 'boolean',
6060
'required': false,
6161
'default': 'false'
62+
},
63+
{
6264
'name': 'fixedDate',
6365
'description': '<p>Which part of the range should be fixed</p>\n',
6466
'type': '\'start\' | \'end\'',

docs/content/meta/SplitterPanel.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,21 @@
8686
'name': 'isExpanded',
8787
'description': '<p>Is the panel expanded</p>\n',
8888
'type': 'boolean'
89+
},
90+
{
91+
'name': 'collapse',
92+
'description': '<p>If panel is <code>collapsible</code>, collapse it fully.</p>\n',
93+
'type': '(): void'
94+
},
95+
{
96+
'name': 'expand',
97+
'description': '<p>If panel is currently collapsed, expand it to its most recent size.</p>\n',
98+
'type': '(): void'
99+
},
100+
{
101+
'name': 'resize',
102+
'description': '<p>Resize panel to the specified percentage (1 - 100).</p>\n',
103+
'type': '(size: number): void'
89104
}
90105
]" />
91106

docs/content/meta/StepperRoot.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,43 @@
102102
'name': 'prevStep',
103103
'description': '<p>Go to the previous step</p>\n',
104104
'type': '(): void'
105+
},
106+
{
107+
'name': 'hasNext',
108+
'description': '<p>Whether or not there is a next step</p>\n',
109+
'type': '(): boolean'
110+
},
111+
{
112+
'name': 'hasPrev',
113+
'description': '<p>Whether or not there is a previous step</p>\n',
114+
'type': '(): boolean'
115+
}
116+
]" />
117+
118+
<MethodsTable :data="[
119+
{
120+
'name': 'goToStep',
121+
'description': '',
122+
'type': '(step: number) => void'
123+
},
124+
{
125+
'name': 'nextStep',
126+
'description': '',
127+
'type': '() => void'
128+
},
129+
{
130+
'name': 'prevStep',
131+
'description': '',
132+
'type': '() => void'
133+
},
134+
{
135+
'name': 'hasNext',
136+
'description': '',
137+
'type': '() => boolean'
138+
},
139+
{
140+
'name': 'hasPrev',
141+
'description': '',
142+
'type': '() => boolean'
105143
}
106144
]" />

0 commit comments

Comments
 (0)