UNPKG

3.78 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.SelectionState = exports.DayFlag = exports.UI = void 0;
4/**
5 * The UI elements composing DayPicker. These elements are mapped to
6 * {@link CustomComponents}, the {@link ClassNames} and the {@link Styles} used by
7 * DayPicker.
8 *
9 * Some of these elements are extended by flags and modifiers.
10 */
11var UI;
12(function (UI) {
13 /** The previous button in the navigation. */
14 UI["ButtonPrevious"] = "button_previous";
15 /** The next button the navigation. */
16 UI["ButtonNext"] = "button_next";
17 /** The root component displaying the months and the navigation bar. */
18 UI["Root"] = "root";
19 /** The Chevron SVG element used by navigation buttons and dropdowns. */
20 UI["Chevron"] = "chevron";
21 /**
22 * The grid cell with the day's date. Extended by {@link DayFlag} and
23 * {@link SelectionFlag}.
24 */
25 UI["Day"] = "day";
26 /** The button containing the formatted day's date, inside the grid cell. */
27 UI["DayButton"] = "day_button";
28 /** The caption label of the month (when not showing the dropdown navigation). */
29 UI["CaptionLabel"] = "caption_label";
30 /** The container of the dropdown navigation (when enabled). */
31 UI["Dropdowns"] = "dropdowns";
32 /** The dropdown element to select for years and months. */
33 UI["Dropdown"] = "dropdown";
34 /** The container element of the dropdown. */
35 UI["DropdownRoot"] = "dropdown_root";
36 /** The root element of the footer. */
37 UI["Footer"] = "footer";
38 /** The month grid. */
39 UI["MonthGrid"] = "month_grid";
40 /** Contains the dropdown navigation or the caption label. */
41 UI["MonthCaption"] = "month_caption";
42 /** The dropdown with the months. */
43 UI["MonthsDropdown"] = "months_dropdown";
44 /** Wrapper of the month grid. */
45 UI["Month"] = "month";
46 /** The container of the displayed months. */
47 UI["Months"] = "months";
48 /** The navigation bar with the previous and next buttons. */
49 UI["Nav"] = "nav";
50 /** The row containing the week. */
51 UI["Week"] = "week";
52 /** The group of row weeks in a month (`tbody`). */
53 UI["Weeks"] = "weeks";
54 /** The column header with the weekday. */
55 UI["Weekday"] = "weekday";
56 /** The row grouping the weekdays in the column headers. */
57 UI["Weekdays"] = "weekdays";
58 /** The cell containing the week number. */
59 UI["WeekNumber"] = "week_number";
60 /** The cell header of the week numbers column. */
61 UI["WeekNumberHeader"] = "week_number_header";
62 /** The dropdown with the years. */
63 UI["YearsDropdown"] = "years_dropdown";
64})(UI || (exports.UI = UI = {}));
65/** The flags for the {@link UI.Day}. */
66var DayFlag;
67(function (DayFlag) {
68 /** The day is disabled. */
69 DayFlag["disabled"] = "disabled";
70 /** The day is hidden. */
71 DayFlag["hidden"] = "hidden";
72 /** The day is outside the current month. */
73 DayFlag["outside"] = "outside";
74 /** The day is focused. */
75 DayFlag["focused"] = "focused";
76 /** The day is today. */
77 DayFlag["today"] = "today";
78})(DayFlag || (exports.DayFlag = DayFlag = {}));
79/**
80 * The state that can be applied to the {@link UI.Day} element when in selection
81 * mode.
82 */
83var SelectionState;
84(function (SelectionState) {
85 /** The day is at the end of a selected range. */
86 SelectionState["range_end"] = "range_end";
87 /** The day is at the middle of a selected range. */
88 SelectionState["range_middle"] = "range_middle";
89 /** The day is at the start of a selected range. */
90 SelectionState["range_start"] = "range_start";
91 /** The day is selected. */
92 SelectionState["selected"] = "selected";
93})(SelectionState || (exports.SelectionState = SelectionState = {}));
94//# sourceMappingURL=UI.js.map
\No newline at end of file