@multicomma/arkcn 0.1.2 → 0.1.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/package.json +1 -1
- package/registry/index.json +1 -1
- package/registry/items/accordion.json +302 -0
- package/registry/items/activity-feed.json +408 -0
- package/registry/items/alert-dialog.json +676 -0
- package/registry/items/alert.json +113 -0
- package/registry/items/angle-slider.json +378 -0
- package/registry/items/app-shell.json +2654 -1
- package/registry/items/aspect-ratio.json +36 -0
- package/registry/items/attachment.json +299 -1
- package/registry/items/avatar.json +213 -0
- package/registry/items/badge.json +44 -0
- package/registry/items/breadcrumb.json +191 -0
- package/registry/items/bubble.json +146 -0
- package/registry/items/button-group.json +110 -0
- package/registry/items/button.json +52 -0
- package/registry/items/calendar.json +499 -1
- package/registry/items/canvas.json +446 -1
- package/registry/items/card.json +192 -0
- package/registry/items/carousel.json +208 -1
- package/registry/items/cascader.json +797 -1
- package/registry/items/chart.json +1764 -1
- package/registry/items/chat.json +993 -0
- package/registry/items/checkbox.json +503 -0
- package/registry/items/clipboard.json +308 -0
- package/registry/items/collapsible.json +226 -0
- package/registry/items/color-picker.json +1261 -0
- package/registry/items/combobox.json +1123 -1
- package/registry/items/command.json +837 -1
- package/registry/items/comment-thread.json +952 -1
- package/registry/items/context-menu.json +1344 -1
- package/registry/items/data-grid.json +449 -1
- package/registry/items/data-table.json +1310 -1
- package/registry/items/date-input.json +476 -0
- package/registry/items/dialog.json +592 -0
- package/registry/items/direction.json +29 -1
- package/registry/items/drawer.json +797 -0
- package/registry/items/dropdown-menu.json +1311 -1
- package/registry/items/editable.json +503 -0
- package/registry/items/empty.json +166 -0
- package/registry/items/field.json +286 -1
- package/registry/items/file-upload.json +638 -0
- package/registry/items/floating-panel.json +720 -0
- package/registry/items/floating-toolbar.json +43 -0
- package/registry/items/format.json +109 -0
- package/registry/items/gantt.json +773 -1
- package/registry/items/hooks/use-mobile.json +1 -0
- package/registry/items/hotkeys.json +99 -1
- package/registry/items/hover-card.json +357 -0
- package/registry/items/image-cropper.json +431 -0
- package/registry/items/input-group.json +189 -0
- package/registry/items/input-otp.json +181 -0
- package/registry/items/input.json +28 -0
- package/registry/items/item.json +308 -0
- package/registry/items/json-tree-view.json +336 -0
- package/registry/items/kanban.json +624 -1
- package/registry/items/kbd.json +54 -0
- package/registry/items/label.json +28 -0
- package/registry/items/lib/controllable.json +1 -0
- package/registry/items/lib/data-table-adapter.json +1 -0
- package/registry/items/lib/drag-preview.json +1 -0
- package/registry/items/lib/form.json +1 -0
- package/registry/items/lib/history.json +1 -0
- package/registry/items/lib/row-layout.json +1 -0
- package/registry/items/lib/table.json +1 -0
- package/registry/items/lib/time.json +1 -0
- package/registry/items/lib/utils.json +1 -0
- package/registry/items/live-region.json +43 -0
- package/registry/items/marker.json +96 -0
- package/registry/items/marquee.json +300 -0
- package/registry/items/menubar.json +1282 -1
- package/registry/items/message.json +166 -0
- package/registry/items/navigation-menu.json +561 -1
- package/registry/items/node-graph.json +1037 -1
- package/registry/items/number-input.json +519 -0
- package/registry/items/pagination.json +244 -1
- package/registry/items/password-input.json +311 -0
- package/registry/items/popconfirm.json +566 -0
- package/registry/items/popover.json +615 -0
- package/registry/items/progress.json +516 -0
- package/registry/items/qr-code.json +249 -0
- package/registry/items/query-builder.json +1368 -1
- package/registry/items/radio-group.json +362 -0
- package/registry/items/rating-group.json +304 -0
- package/registry/items/resizable.json +242 -1
- package/registry/items/rich-text-editor.json +934 -1
- package/registry/items/scheduler.json +1013 -1
- package/registry/items/scroll-area.json +227 -0
- package/registry/items/segment-group.json +363 -0
- package/registry/items/select.json +956 -0
- package/registry/items/separator.json +45 -1
- package/registry/items/sheet.json +592 -0
- package/registry/items/sidebar.json +785 -1
- package/registry/items/signature-pad.json +330 -0
- package/registry/items/skeleton.json +28 -0
- package/registry/items/slider.json +799 -0
- package/registry/items/sonner.json +135 -0
- package/registry/items/spinner.json +28 -0
- package/registry/items/steps.json +483 -0
- package/registry/items/swap.json +107 -0
- package/registry/items/switch.json +362 -0
- package/registry/items/table.json +210 -0
- package/registry/items/tabs.json +326 -0
- package/registry/items/tags-input.json +640 -0
- package/registry/items/textarea.json +28 -0
- package/registry/items/timer.json +289 -0
- package/registry/items/toc.json +372 -0
- package/registry/items/toggle-group.json +214 -1
- package/registry/items/toggle.json +124 -0
- package/registry/items/tooltip.json +417 -0
- package/registry/items/tour.json +498 -0
- package/registry/items/transfer-list.json +609 -1
- package/registry/items/tree-select.json +742 -1
- package/registry/items/tree-view.json +794 -0
- package/registry/items/virtual-list.json +214 -1
- package/src/components/ui/app-shell.tsx +11 -0
- package/src/components/ui/attachment.tsx +1 -0
- package/src/components/ui/calendar.tsx +1 -0
- package/src/components/ui/canvas.tsx +8 -0
- package/src/components/ui/carousel.tsx +3 -0
- package/src/components/ui/cascader.tsx +1 -0
- package/src/components/ui/chart.tsx +10 -0
- package/src/components/ui/combobox.tsx +3 -0
- package/src/components/ui/command.tsx +1 -0
- package/src/components/ui/comment-thread.tsx +11 -0
- package/src/components/ui/context-menu.tsx +6 -0
- package/src/components/ui/data-grid.tsx +8 -0
- package/src/components/ui/data-table.tsx +6 -0
- package/src/components/ui/direction.tsx +2 -0
- package/src/components/ui/dropdown-menu.tsx +6 -0
- package/src/components/ui/field.tsx +1 -0
- package/src/components/ui/gantt.tsx +15 -0
- package/src/components/ui/hotkeys.tsx +3 -0
- package/src/components/ui/kanban.tsx +3 -0
- package/src/components/ui/menubar.tsx +6 -0
- package/src/components/ui/navigation-menu.tsx +1 -0
- package/src/components/ui/node-graph.tsx +23 -0
- package/src/components/ui/pagination.tsx +1 -0
- package/src/components/ui/query-builder.tsx +7 -0
- package/src/components/ui/resizable.tsx +1 -0
- package/src/components/ui/rich-text-editor.tsx +54 -0
- package/src/components/ui/scheduler.tsx +26 -0
- package/src/components/ui/separator.tsx +1 -0
- package/src/components/ui/sidebar.tsx +5 -0
- package/src/components/ui/toggle-group.tsx +3 -0
- package/src/components/ui/transfer-list.tsx +11 -0
- package/src/components/ui/tree-select.tsx +5 -0
- package/src/components/ui/virtual-list.tsx +7 -0
|
@@ -6,6 +6,504 @@
|
|
|
6
6
|
"Calendar",
|
|
7
7
|
"CalendarDayButton"
|
|
8
8
|
],
|
|
9
|
+
"parts": [
|
|
10
|
+
{
|
|
11
|
+
"name": "Calendar",
|
|
12
|
+
"props": [
|
|
13
|
+
{
|
|
14
|
+
"name": "buttonVariant",
|
|
15
|
+
"type": "\"link\" | \"default\" | \"outline\" | \"secondary\" | \"ghost\" | \"destructive\" | null",
|
|
16
|
+
"required": false,
|
|
17
|
+
"default": "\"ghost\"",
|
|
18
|
+
"description": "Button variant used for the navigation buttons.",
|
|
19
|
+
"from": "arkcn"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "animate",
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"required": false,
|
|
25
|
+
"description": "Animate navigating between months.",
|
|
26
|
+
"from": "react-day-picker"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "aria-label",
|
|
30
|
+
"type": "string",
|
|
31
|
+
"required": false,
|
|
32
|
+
"description": "The aria-label attribute to add to the container element.",
|
|
33
|
+
"from": "react-day-picker"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "aria-labelledby",
|
|
37
|
+
"type": "string",
|
|
38
|
+
"required": false,
|
|
39
|
+
"description": "The aria-labelledby attribute to add to the container element.",
|
|
40
|
+
"from": "react-day-picker"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "autoFocus",
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"required": false,
|
|
46
|
+
"description": "When a selection mode is set, DayPicker will focus the first selected day\n(if set) or today's date (if not disabled).\n\nUse this prop when you need to focus DayPicker after a user action, for\nimproved accessibility.",
|
|
47
|
+
"from": "react-day-picker"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "broadcastCalendar",
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"required": false,
|
|
53
|
+
"description": "Display the weeks in the month following the broadcast calendar. Setting\nthis prop will ignore {@link weekStartsOn} (always Monday) and\n{@link showOutsideDays} will default to true.",
|
|
54
|
+
"from": "react-day-picker"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "captionLayout",
|
|
58
|
+
"type": "\"label\" | \"dropdown\" | \"dropdown-months\" | \"dropdown-years\"",
|
|
59
|
+
"required": false,
|
|
60
|
+
"default": "\"label\"",
|
|
61
|
+
"description": "Show dropdowns to navigate between months or years.\n\n- `label`: Displays the month and year as a label. Default value.\n- `dropdown`: Displays dropdowns for both month and year navigation.\n- `dropdown-months`: Displays a dropdown only for the month navigation.\n- `dropdown-years`: Displays a dropdown only for the year navigation.\n\n**Note:** By default, showing the dropdown will set the {@link startMonth}\nto 100 years ago and {@link endMonth} to the end of the current year. You\ncan override this behavior by explicitly setting `startMonth` and\n`endMonth`.",
|
|
62
|
+
"from": "react-day-picker"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "className",
|
|
66
|
+
"type": "string",
|
|
67
|
+
"required": false,
|
|
68
|
+
"description": "Class name to add to the root element.",
|
|
69
|
+
"from": "react-day-picker"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "classNames",
|
|
73
|
+
"type": "Partial<ClassNames>",
|
|
74
|
+
"required": false,
|
|
75
|
+
"description": "Change the class names used by DayPicker.\n\nUse this prop when you need to change the default class names — for\nexample, when importing the style via CSS modules or when using a CSS\nframework.",
|
|
76
|
+
"from": "react-day-picker"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "components",
|
|
80
|
+
"type": "Partial<CustomComponents>",
|
|
81
|
+
"required": false,
|
|
82
|
+
"description": "Change the components used for rendering the calendar elements.",
|
|
83
|
+
"from": "react-day-picker"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "dateLib",
|
|
87
|
+
"type": "Partial<DateLib>",
|
|
88
|
+
"required": false,
|
|
89
|
+
"description": "Replace the default date library with a custom one. Experimental: not\nguaranteed to be stable (may not respect semver).",
|
|
90
|
+
"from": "react-day-picker"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "defaultMonth",
|
|
94
|
+
"type": "Date",
|
|
95
|
+
"required": false,
|
|
96
|
+
"description": "The initial month to show in the calendar.\n\nUse this prop to let DayPicker control the current month. If you need to\nset the month programmatically, use {@link month} and {@link onMonthChange}.",
|
|
97
|
+
"from": "react-day-picker"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "dir",
|
|
101
|
+
"type": "string",
|
|
102
|
+
"required": false,
|
|
103
|
+
"description": "The text direction of the calendar. Use `ltr` for left-to-right (default)\nor `rtl` for right-to-left.",
|
|
104
|
+
"from": "react-day-picker"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "disabled",
|
|
108
|
+
"type": "Matcher | Matcher[]",
|
|
109
|
+
"required": false,
|
|
110
|
+
"description": "Apply the `disabled` modifier to the matching days. Disabled days cannot be\nselected when in a selection mode is set.",
|
|
111
|
+
"from": "react-day-picker"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "disableNavigation",
|
|
115
|
+
"type": "boolean",
|
|
116
|
+
"required": false,
|
|
117
|
+
"description": "Disable the navigation between months. This prop won't hide the navigation:\nto hide the navigation, use {@link hideNavigation}.",
|
|
118
|
+
"from": "react-day-picker"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "endMonth",
|
|
122
|
+
"type": "Date",
|
|
123
|
+
"required": false,
|
|
124
|
+
"description": "The latest month to end the month navigation.",
|
|
125
|
+
"from": "react-day-picker"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "firstWeekContainsDate",
|
|
129
|
+
"type": "1 | 4",
|
|
130
|
+
"required": false,
|
|
131
|
+
"description": "The day of January that is always in the first week of the year.",
|
|
132
|
+
"from": "react-day-picker"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "fixedWeeks",
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"required": false,
|
|
138
|
+
"description": "Display always 6 weeks per each month, regardless of the month’s number of\nweeks. Weeks will be filled with the days from the next month.",
|
|
139
|
+
"from": "react-day-picker"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "footer",
|
|
143
|
+
"type": "ReactNode",
|
|
144
|
+
"required": false,
|
|
145
|
+
"description": "Add a footer to the calendar, acting as a live region.\n\nUse this prop to communicate the calendar's status to screen readers.\nPrefer strings over complex UI elements.",
|
|
146
|
+
"from": "react-day-picker"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "formatters",
|
|
150
|
+
"type": "Partial<Formatters>",
|
|
151
|
+
"required": false,
|
|
152
|
+
"description": "Formatters used to format dates to strings. Use this prop to override the\ndefault functions.",
|
|
153
|
+
"from": "react-day-picker"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "hidden",
|
|
157
|
+
"type": "Matcher | Matcher[]",
|
|
158
|
+
"required": false,
|
|
159
|
+
"description": "Apply the `hidden` modifier to the matching days. Will hide them from the\ncalendar.",
|
|
160
|
+
"from": "react-day-picker"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "hideNavigation",
|
|
164
|
+
"type": "boolean",
|
|
165
|
+
"required": false,
|
|
166
|
+
"description": "Hide the navigation buttons. This prop won't disable the navigation: to\ndisable the navigation, use {@link disableNavigation}.",
|
|
167
|
+
"from": "react-day-picker"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "hideWeekdays",
|
|
171
|
+
"type": "boolean",
|
|
172
|
+
"required": false,
|
|
173
|
+
"description": "Hide the row displaying the weekday row header.",
|
|
174
|
+
"from": "react-day-picker"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "id",
|
|
178
|
+
"type": "string",
|
|
179
|
+
"required": false,
|
|
180
|
+
"description": "A unique id to add to the root element.",
|
|
181
|
+
"from": "react-day-picker"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "ISOWeek",
|
|
185
|
+
"type": "boolean",
|
|
186
|
+
"required": false,
|
|
187
|
+
"description": "Use ISO week dates instead of the locale setting. Setting this prop will\nignore `weekStartsOn` and `firstWeekContainsDate`.",
|
|
188
|
+
"from": "react-day-picker"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "labels",
|
|
192
|
+
"type": "Partial<Labels>",
|
|
193
|
+
"required": false,
|
|
194
|
+
"description": "Labels creators to override the defaults. Use this prop to customize the\naria-label attributes in DayPicker.",
|
|
195
|
+
"from": "react-day-picker"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "lang",
|
|
199
|
+
"type": "string",
|
|
200
|
+
"required": false,
|
|
201
|
+
"description": "Add the language tag to the container element.\n\nWhen omitted, DayPicker uses the active locale code (`locale.code`). Set\nthis prop to override the language tag.",
|
|
202
|
+
"from": "react-day-picker"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "locale",
|
|
206
|
+
"type": "Partial<DayPickerLocale>",
|
|
207
|
+
"required": false,
|
|
208
|
+
"description": "The locale object used to localize dates. Pass a locale from\n`react-day-picker/locale` to localize the calendar.",
|
|
209
|
+
"from": "react-day-picker"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "mode",
|
|
213
|
+
"type": "\"multiple\" | \"single\" | \"range\"",
|
|
214
|
+
"required": false,
|
|
215
|
+
"description": "Enable the selection of a single day, multiple days, or a range of days.",
|
|
216
|
+
"from": "react-day-picker"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "modifiers",
|
|
220
|
+
"type": "Record<string, Matcher | Matcher[] | undefined>",
|
|
221
|
+
"required": false,
|
|
222
|
+
"description": "Add modifiers to the matching days.",
|
|
223
|
+
"from": "react-day-picker"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "modifiersClassNames",
|
|
227
|
+
"type": "ModifiersClassNames",
|
|
228
|
+
"required": false,
|
|
229
|
+
"description": "Change the class name for the day matching the `modifiers`.",
|
|
230
|
+
"from": "react-day-picker"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "modifiersStyles",
|
|
234
|
+
"type": "ModifiersStyles",
|
|
235
|
+
"required": false,
|
|
236
|
+
"description": "Change the class name for the day matching the {@link modifiers}.",
|
|
237
|
+
"from": "react-day-picker"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "month",
|
|
241
|
+
"type": "Date",
|
|
242
|
+
"required": false,
|
|
243
|
+
"description": "The month displayed in the calendar.\n\nAs opposed to `defaultMonth`, use this prop with `onMonthChange` to change\nthe month programmatically.",
|
|
244
|
+
"from": "react-day-picker"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "navLayout",
|
|
248
|
+
"type": "\"around\" | \"after\"",
|
|
249
|
+
"required": false,
|
|
250
|
+
"description": "Adjust the positioning of the navigation buttons.\n\n- `around`: Displays the buttons on either side of the caption.\n- `after`: Displays the buttons after the caption. This ensures the tab order\n matches the visual order.\n\nIf not set, DayPicker preserves its legacy layout, but the tab order may\nnot align with the visual order when using `captionLayout=\"dropdown\"`.",
|
|
251
|
+
"from": "react-day-picker"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "nonce",
|
|
255
|
+
"type": "string",
|
|
256
|
+
"required": false,
|
|
257
|
+
"description": "A cryptographic nonce (\"number used once\") which can be used by Content\nSecurity Policy for the inline `style` attributes.",
|
|
258
|
+
"from": "react-day-picker"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "noonSafe",
|
|
262
|
+
"type": "boolean",
|
|
263
|
+
"required": false,
|
|
264
|
+
"description": "Keep calendar math at noon in the configured {@link timeZone} to avoid\nhistorical second-level offsets drifting dates across midnight.\n\nThis prop sets the time of the dates to noon (12:00).",
|
|
265
|
+
"from": "react-day-picker"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "numberOfMonths",
|
|
269
|
+
"type": "number",
|
|
270
|
+
"required": false,
|
|
271
|
+
"description": "The number of displayed months.",
|
|
272
|
+
"from": "react-day-picker"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "numerals",
|
|
276
|
+
"type": "Numerals",
|
|
277
|
+
"required": false,
|
|
278
|
+
"description": "The numeral system to use when formatting dates.\n\n- `latn`: Latin (Western Arabic)\n- `arab`: Arabic-Indic\n- `arabext`: Eastern Arabic-Indic (Persian)\n- `deva`: Devanagari\n- `beng`: Bengali\n- `guru`: Gurmukhi\n- `gujr`: Gujarati\n- `orya`: Oriya\n- `tamldec`: Tamil\n- `telu`: Telugu\n- `knda`: Kannada\n- `mlym`: Malayalam",
|
|
279
|
+
"from": "react-day-picker"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "onDayBlur",
|
|
283
|
+
"type": "DayEventHandler<FocusEvent<Element, Element>>",
|
|
284
|
+
"required": false,
|
|
285
|
+
"description": "Event handler when a day is blurred.",
|
|
286
|
+
"from": "react-day-picker"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "onDayClick",
|
|
290
|
+
"type": "DayEventHandler<MouseEvent<Element, MouseEvent>>",
|
|
291
|
+
"required": false,
|
|
292
|
+
"description": "Event handler when a day is clicked.",
|
|
293
|
+
"from": "react-day-picker"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "onDayFocus",
|
|
297
|
+
"type": "DayEventHandler<FocusEvent<Element, Element>>",
|
|
298
|
+
"required": false,
|
|
299
|
+
"description": "Event handler when a day is focused.",
|
|
300
|
+
"from": "react-day-picker"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "onDayKeyDown",
|
|
304
|
+
"type": "DayEventHandler<KeyboardEvent<Element>>",
|
|
305
|
+
"required": false,
|
|
306
|
+
"description": "Event handler when a key is pressed on a day.",
|
|
307
|
+
"from": "react-day-picker"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "onDayMouseEnter",
|
|
311
|
+
"type": "DayEventHandler<MouseEvent<Element, MouseEvent>>",
|
|
312
|
+
"required": false,
|
|
313
|
+
"description": "Event handler when the mouse enters a day.",
|
|
314
|
+
"from": "react-day-picker"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "onDayMouseLeave",
|
|
318
|
+
"type": "DayEventHandler<MouseEvent<Element, MouseEvent>>",
|
|
319
|
+
"required": false,
|
|
320
|
+
"description": "Event handler when the mouse leaves a day.",
|
|
321
|
+
"from": "react-day-picker"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "onMonthChange",
|
|
325
|
+
"type": "MonthChangeEventHandler",
|
|
326
|
+
"required": false,
|
|
327
|
+
"description": "Event fired when the user navigates between months.",
|
|
328
|
+
"from": "react-day-picker"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"name": "onNextClick",
|
|
332
|
+
"type": "MonthChangeEventHandler",
|
|
333
|
+
"required": false,
|
|
334
|
+
"description": "Event handler when the next month button is clicked.",
|
|
335
|
+
"from": "react-day-picker"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "onPrevClick",
|
|
339
|
+
"type": "MonthChangeEventHandler",
|
|
340
|
+
"required": false,
|
|
341
|
+
"description": "Event handler when the previous month button is clicked.",
|
|
342
|
+
"from": "react-day-picker"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"name": "pagedNavigation",
|
|
346
|
+
"type": "boolean",
|
|
347
|
+
"required": false,
|
|
348
|
+
"description": "Paginate the month navigation displaying the `numberOfMonths` at a time.",
|
|
349
|
+
"from": "react-day-picker"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "required",
|
|
353
|
+
"type": "boolean",
|
|
354
|
+
"required": false,
|
|
355
|
+
"description": "Whether the selection is required.",
|
|
356
|
+
"from": "react-day-picker"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "reverseMonths",
|
|
360
|
+
"type": "boolean",
|
|
361
|
+
"required": false,
|
|
362
|
+
"description": "Render the months in reversed order (when {@link numberOfMonths} is set) to\ndisplay the most recent month first.",
|
|
363
|
+
"from": "react-day-picker"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"name": "reverseYears",
|
|
367
|
+
"type": "boolean",
|
|
368
|
+
"required": false,
|
|
369
|
+
"description": "Reverse the order of years in the dropdown when using\n`captionLayout=\"dropdown\"` or `captionLayout=\"dropdown-years\"`.",
|
|
370
|
+
"from": "react-day-picker"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "role",
|
|
374
|
+
"type": "\"dialog\" | \"application\"",
|
|
375
|
+
"required": false,
|
|
376
|
+
"description": "The role attribute to add to the container element.",
|
|
377
|
+
"from": "react-day-picker"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"name": "showOutsideDays",
|
|
381
|
+
"type": "boolean",
|
|
382
|
+
"required": false,
|
|
383
|
+
"default": "true",
|
|
384
|
+
"description": "Show the outside days (days falling in the next or the previous month).\n\n**Note:** when a {@link broadcastCalendar} is set, this prop defaults to\ntrue.",
|
|
385
|
+
"from": "react-day-picker"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"name": "showWeekNumber",
|
|
389
|
+
"type": "boolean",
|
|
390
|
+
"required": false,
|
|
391
|
+
"description": "Show the week numbers column. Weeks are numbered according to the local\nweek index.",
|
|
392
|
+
"from": "react-day-picker"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"name": "startMonth",
|
|
396
|
+
"type": "Date",
|
|
397
|
+
"required": false,
|
|
398
|
+
"description": "The earliest month to start the month navigation.",
|
|
399
|
+
"from": "react-day-picker"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "style",
|
|
403
|
+
"type": "CSSProperties",
|
|
404
|
+
"required": false,
|
|
405
|
+
"description": "Style to apply to the root element.",
|
|
406
|
+
"from": "react-day-picker"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"name": "styles",
|
|
410
|
+
"type": "Partial<Styles>",
|
|
411
|
+
"required": false,
|
|
412
|
+
"description": "Change the inline styles of the HTML elements.",
|
|
413
|
+
"from": "react-day-picker"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"name": "timeZone",
|
|
417
|
+
"type": "string",
|
|
418
|
+
"required": false,
|
|
419
|
+
"description": "The time zone (IANA or UTC offset) to use in the calendar (experimental).\n\nSee\n[Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)\nfor the possible values.",
|
|
420
|
+
"from": "react-day-picker"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"name": "title",
|
|
424
|
+
"type": "string",
|
|
425
|
+
"required": false,
|
|
426
|
+
"description": "Add a `title` attribute to the container element.",
|
|
427
|
+
"from": "react-day-picker"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"name": "today",
|
|
431
|
+
"type": "Date",
|
|
432
|
+
"required": false,
|
|
433
|
+
"description": "The today’s date. Default is the current date. This date will get the\n`today` modifier to style the day.",
|
|
434
|
+
"from": "react-day-picker"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "useAdditionalDayOfYearTokens",
|
|
438
|
+
"type": "boolean",
|
|
439
|
+
"required": false,
|
|
440
|
+
"description": "Enable `YY` and `YYYY` for day of year tokens when formatting or parsing\ndates.",
|
|
441
|
+
"from": "react-day-picker"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "useAdditionalWeekYearTokens",
|
|
445
|
+
"type": "boolean",
|
|
446
|
+
"required": false,
|
|
447
|
+
"description": "Enable `DD` and `DDDD` for week year tokens when formatting or parsing\ndates.",
|
|
448
|
+
"from": "react-day-picker"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"name": "weekStartsOn",
|
|
452
|
+
"type": "0 | 1 | 2 | 3 | 4 | 5 | 6",
|
|
453
|
+
"required": false,
|
|
454
|
+
"description": "The index of the first day of the week (0 - Sunday). Overrides the locale's\ndefault.",
|
|
455
|
+
"from": "react-day-picker"
|
|
456
|
+
}
|
|
457
|
+
]
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"name": "CalendarDayButton",
|
|
461
|
+
"props": [
|
|
462
|
+
{
|
|
463
|
+
"name": "locale",
|
|
464
|
+
"type": "Partial<DayPickerLocale>",
|
|
465
|
+
"required": false,
|
|
466
|
+
"description": "date-fns locale for month and weekday names.",
|
|
467
|
+
"from": "arkcn"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"name": "day",
|
|
471
|
+
"type": "CalendarDay",
|
|
472
|
+
"required": true,
|
|
473
|
+
"description": "The day to render.",
|
|
474
|
+
"from": "react-day-picker"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"name": "modifiers",
|
|
478
|
+
"type": "Modifiers",
|
|
479
|
+
"required": true,
|
|
480
|
+
"description": "The modifiers to apply to the day.",
|
|
481
|
+
"from": "react-day-picker"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"name": "children",
|
|
485
|
+
"type": "ReactNode",
|
|
486
|
+
"required": false,
|
|
487
|
+
"description": "Content rendered inside the part.",
|
|
488
|
+
"from": "@types/react"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"name": "className",
|
|
492
|
+
"type": "string",
|
|
493
|
+
"required": false,
|
|
494
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
495
|
+
"from": "@types/react"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"name": "style",
|
|
499
|
+
"type": "CSSProperties",
|
|
500
|
+
"required": false,
|
|
501
|
+
"description": "Inline styles applied to the rendered element.",
|
|
502
|
+
"from": "@types/react"
|
|
503
|
+
}
|
|
504
|
+
]
|
|
505
|
+
}
|
|
506
|
+
],
|
|
9
507
|
"dependencies": {
|
|
10
508
|
"lucide-react": "^1.41.0",
|
|
11
509
|
"react-day-picker": "^10.0.1"
|
|
@@ -17,7 +515,7 @@
|
|
|
17
515
|
"files": [
|
|
18
516
|
{
|
|
19
517
|
"path": "components/ui/calendar.tsx",
|
|
20
|
-
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { DayPicker, getDefaultClassNames, type DayButton, type Locale } from \"react-day-picker\"\n\nimport { Button, buttonVariants } from \"@/components/ui/button\"\nimport { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from \"lucide-react\"\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n locale,\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"]\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n locale={locale}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\"relative flex flex-col gap-4 md:flex-row\", defaultClassNames.months),\n month: cn(\"flex w-full flex-col gap-4\", defaultClassNames.month),\n nav: cn(\"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1\", defaultClassNames.nav),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_next\n ),\n month_caption: cn(\n \"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)\",\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n \"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium\",\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\"relative rounded-(--cell-radius)\", defaultClassNames.dropdown_root),\n dropdown: cn(\"absolute inset-0 bg-popover opacity-0\", defaultClassNames.dropdown),\n caption_label: cn(\n \"font-medium select-none\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground\",\n defaultClassNames.caption_label\n ),\n month_grid: cn(\"w-full border-collapse\", defaultClassNames.month_grid),\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none\",\n defaultClassNames.weekday\n ),\n week: cn(\"mt-2 flex w-full\", defaultClassNames.week),\n week_number_header: cn(\"w-(--cell-size) select-none\", defaultClassNames.week_number_header),\n week_number: cn(\"text-[0.8rem] text-muted-foreground select-none\", defaultClassNames.week_number),\n day: cn(\n \"group/day relative aspect-square size-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)\",\n props.showWeekNumber\n ? \"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)\"\n : \"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)\",\n defaultClassNames.day\n ),\n range_start: cn(\n \"relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted\",\n defaultClassNames.range_start\n ),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\n \"relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted\",\n defaultClassNames.range_end\n ),\n today: cn(\n \"rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none\",\n defaultClassNames.today\n ),\n outside: cn(\"text-muted-foreground aria-selected:text-muted-foreground\", defaultClassNames.outside),\n disabled: cn(\"text-muted-foreground opacity-50\", defaultClassNames.disabled),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />\n }\n\n if (orientation === \"right\") {\n return <ChevronRightIcon className={cn(\"size-4\", className)} {...props} />\n }\n\n return <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />\n },\n DayButton: ({ ...props }) => <CalendarDayButton locale={locale} {...props} />,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">{children}</div>\n </td>\n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n locale,\n ...props\n}: React.ComponentProps<typeof DayButton> & { locale?: Partial<Locale> }) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString(locale?.code)}\n data-selected-single={\n modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n"
|
|
518
|
+
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { DayPicker, getDefaultClassNames, type DayButton, type Locale } from \"react-day-picker\"\n\nimport { Button, buttonVariants } from \"@/components/ui/button\"\nimport { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from \"lucide-react\"\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n locale,\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n /** Button variant used for the navigation buttons. */\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"]\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n locale={locale}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\"relative flex flex-col gap-4 md:flex-row\", defaultClassNames.months),\n month: cn(\"flex w-full flex-col gap-4\", defaultClassNames.month),\n nav: cn(\"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1\", defaultClassNames.nav),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_next\n ),\n month_caption: cn(\n \"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)\",\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n \"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium\",\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\"relative rounded-(--cell-radius)\", defaultClassNames.dropdown_root),\n dropdown: cn(\"absolute inset-0 bg-popover opacity-0\", defaultClassNames.dropdown),\n caption_label: cn(\n \"font-medium select-none\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground\",\n defaultClassNames.caption_label\n ),\n month_grid: cn(\"w-full border-collapse\", defaultClassNames.month_grid),\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none\",\n defaultClassNames.weekday\n ),\n week: cn(\"mt-2 flex w-full\", defaultClassNames.week),\n week_number_header: cn(\"w-(--cell-size) select-none\", defaultClassNames.week_number_header),\n week_number: cn(\"text-[0.8rem] text-muted-foreground select-none\", defaultClassNames.week_number),\n day: cn(\n \"group/day relative aspect-square size-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)\",\n props.showWeekNumber\n ? \"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)\"\n : \"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)\",\n defaultClassNames.day\n ),\n range_start: cn(\n \"relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted\",\n defaultClassNames.range_start\n ),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\n \"relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted\",\n defaultClassNames.range_end\n ),\n today: cn(\n \"rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none\",\n defaultClassNames.today\n ),\n outside: cn(\"text-muted-foreground aria-selected:text-muted-foreground\", defaultClassNames.outside),\n disabled: cn(\"text-muted-foreground opacity-50\", defaultClassNames.disabled),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />\n }\n\n if (orientation === \"right\") {\n return <ChevronRightIcon className={cn(\"size-4\", className)} {...props} />\n }\n\n return <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />\n },\n DayButton: ({ ...props }) => <CalendarDayButton locale={locale} {...props} />,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">{children}</div>\n </td>\n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n locale,\n ...props\n}: React.ComponentProps<typeof DayButton> & { locale?: Partial<Locale> }) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString(locale?.code)}\n data-selected-single={\n modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n"
|
|
21
519
|
}
|
|
22
520
|
]
|
|
23
521
|
}
|