@mrpelz/uikit-ish 7.8.0 → 7.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.
- package/dist/components/accordion/main.d.ts +12 -0
- package/dist/components/accordion/main.d.ts.map +1 -0
- package/dist/components/accordion/main.js +20 -0
- package/dist/components/accordion/main.js.map +1 -0
- package/dist/components/accordion/style.css +23 -0
- package/dist/components/action-sheet/main.d.ts +22 -15
- package/dist/components/action-sheet/main.d.ts.map +1 -1
- package/dist/components/action-sheet/main.js +86 -16
- package/dist/components/action-sheet/main.js.map +1 -1
- package/dist/components/action-sheet/props.d.ts +17 -5
- package/dist/components/action-sheet/props.d.ts.map +1 -1
- package/dist/components/action-sheet/style.css +15 -0
- package/dist/components/activity-view/main.d.ts +14 -3
- package/dist/components/activity-view/main.d.ts.map +1 -1
- package/dist/components/activity-view/main.js +19 -4
- package/dist/components/activity-view/main.js.map +1 -1
- package/dist/components/activity-view/props.d.ts +2 -10
- package/dist/components/activity-view/props.d.ts.map +1 -1
- package/dist/components/activity-view/style.css +8 -46
- package/dist/components/alert/main.d.ts +6 -4
- package/dist/components/alert/main.d.ts.map +1 -1
- package/dist/components/alert/main.js +20 -4
- package/dist/components/alert/main.js.map +1 -1
- package/dist/components/alert/props.d.ts +12 -1
- package/dist/components/alert/props.d.ts.map +1 -1
- package/dist/components/alert/style.css +13 -27
- package/dist/components/avatar/main.d.ts +5 -3
- package/dist/components/avatar/main.d.ts.map +1 -1
- package/dist/components/avatar/main.js +3 -0
- package/dist/components/avatar/main.js.map +1 -1
- package/dist/components/avatar/props.d.ts +4 -0
- package/dist/components/avatar/props.d.ts.map +1 -1
- package/dist/components/avatar/style.css +0 -6
- package/dist/components/badge/main.d.ts +2 -2
- package/dist/components/badge/main.d.ts.map +1 -1
- package/dist/components/badge/main.js +5 -5
- package/dist/components/badge/main.js.map +1 -1
- package/dist/components/badge/props.d.ts +4 -3
- package/dist/components/badge/props.d.ts.map +1 -1
- package/dist/components/badge/style.css +3 -2
- package/dist/components/button/main.d.ts.map +1 -1
- package/dist/components/button/main.js +6 -6
- package/dist/components/button/main.js.map +1 -1
- package/dist/components/button/style.css +11 -27
- package/dist/components/checkbox/style.css +2 -5
- package/dist/components/collapsible/main.d.ts +9 -0
- package/dist/components/collapsible/main.d.ts.map +1 -0
- package/dist/components/collapsible/main.js +19 -0
- package/dist/components/collapsible/main.js.map +1 -0
- package/dist/components/collapsible/style.css +23 -0
- package/dist/components/color-picker/main.d.ts +1 -1
- package/dist/components/color-picker/main.d.ts.map +1 -1
- package/dist/components/color-picker/main.js +40 -33
- package/dist/components/color-picker/main.js.map +1 -1
- package/dist/components/color-picker/props.d.ts +21 -7
- package/dist/components/color-picker/props.d.ts.map +1 -1
- package/dist/components/color-picker/style.css +9 -27
- package/dist/components/contextual-menu/main.d.ts +11 -7
- package/dist/components/contextual-menu/main.d.ts.map +1 -1
- package/dist/components/contextual-menu/main.js +99 -47
- package/dist/components/contextual-menu/main.js.map +1 -1
- package/dist/components/contextual-menu/props.d.ts +17 -7
- package/dist/components/contextual-menu/props.d.ts.map +1 -1
- package/dist/components/contextual-menu/style.css +11 -8
- package/dist/components/date-picker/handle.d.ts +41 -0
- package/dist/components/date-picker/handle.d.ts.map +1 -0
- package/dist/components/date-picker/handle.js +47 -0
- package/dist/components/date-picker/handle.js.map +1 -0
- package/dist/components/date-picker/main.d.ts +31 -49
- package/dist/components/date-picker/main.d.ts.map +1 -1
- package/dist/components/date-picker/main.js +300 -139
- package/dist/components/date-picker/main.js.map +1 -1
- package/dist/components/date-picker/pager.d.ts +24 -0
- package/dist/components/date-picker/pager.d.ts.map +1 -0
- package/dist/components/date-picker/pager.js +307 -0
- package/dist/components/date-picker/pager.js.map +1 -0
- package/dist/components/date-picker/props.d.ts +93 -22
- package/dist/components/date-picker/props.d.ts.map +1 -1
- package/dist/components/date-picker/style.css +59 -71
- package/dist/components/drawer/main.d.ts +31 -0
- package/dist/components/drawer/main.d.ts.map +1 -0
- package/dist/components/drawer/main.js +74 -0
- package/dist/components/drawer/main.js.map +1 -0
- package/dist/components/drawer/props.d.ts +39 -0
- package/dist/components/drawer/props.d.ts.map +1 -0
- package/dist/components/drawer/props.js +2 -0
- package/dist/components/drawer/props.js.map +1 -0
- package/dist/components/drawer/style.css +135 -0
- package/dist/components/edit-menu/main.d.ts +7 -7
- package/dist/components/edit-menu/main.d.ts.map +1 -1
- package/dist/components/edit-menu/main.js +31 -23
- package/dist/components/edit-menu/main.js.map +1 -1
- package/dist/components/edit-menu/props.d.ts +13 -0
- package/dist/components/edit-menu/props.d.ts.map +1 -1
- package/dist/components/edit-menu/style.css +5 -7
- package/dist/components/form/main.d.ts +8 -0
- package/dist/components/form/main.d.ts.map +1 -1
- package/dist/components/form/main.js +15 -2
- package/dist/components/form/main.js.map +1 -1
- package/dist/components/form/props.d.ts +1 -2
- package/dist/components/form/props.d.ts.map +1 -1
- package/dist/components/glass/style.css +19 -4
- package/dist/components/header/main.d.ts +5 -4
- package/dist/components/header/main.d.ts.map +1 -1
- package/dist/components/header/main.js +56 -27
- package/dist/components/header/main.js.map +1 -1
- package/dist/components/header/props.d.ts +2 -3
- package/dist/components/header/props.d.ts.map +1 -1
- package/dist/components/header/style.css +62 -42
- package/dist/components/index.d.ts +26 -22
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +17 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/main.d.ts +2 -2
- package/dist/components/layout/main.d.ts.map +1 -1
- package/dist/components/layout/main.js +59 -163
- package/dist/components/layout/main.js.map +1 -1
- package/dist/components/layout/props.d.ts +2 -20
- package/dist/components/layout/props.d.ts.map +1 -1
- package/dist/components/layout/style.css +18 -89
- package/dist/components/list/main.d.ts +49 -9
- package/dist/components/list/main.d.ts.map +1 -1
- package/dist/components/list/main.js +769 -208
- package/dist/components/list/main.js.map +1 -1
- package/dist/components/list/props.d.ts +165 -8
- package/dist/components/list/props.d.ts.map +1 -1
- package/dist/components/list/style.css +308 -371
- package/dist/components/list/swipe-actions-handle.d.ts +40 -0
- package/dist/components/list/swipe-actions-handle.d.ts.map +1 -0
- package/dist/components/list/swipe-actions-handle.js +51 -0
- package/dist/components/list/swipe-actions-handle.js.map +1 -0
- package/dist/components/menu/main.d.ts +31 -8
- package/dist/components/menu/main.d.ts.map +1 -1
- package/dist/components/menu/main.js +175 -39
- package/dist/components/menu/main.js.map +1 -1
- package/dist/components/menu/props.d.ts +2 -1
- package/dist/components/menu/props.d.ts.map +1 -1
- package/dist/components/menu/style.css +10 -32
- package/dist/components/navigation/main.d.ts +11 -2
- package/dist/components/navigation/main.d.ts.map +1 -1
- package/dist/components/navigation/main.js +186 -98
- package/dist/components/navigation/main.js.map +1 -1
- package/dist/components/navigation/props.d.ts +20 -3
- package/dist/components/navigation/props.d.ts.map +1 -1
- package/dist/components/navigation/style.css +24 -7
- package/dist/components/page/main.d.ts.map +1 -1
- package/dist/components/page/main.js +2 -2
- package/dist/components/page/main.js.map +1 -1
- package/dist/components/page/props.d.ts +8 -0
- package/dist/components/page/props.d.ts.map +1 -1
- package/dist/components/page/style.css +39 -1
- package/dist/components/page-control/main.d.ts +1 -1
- package/dist/components/page-control/main.d.ts.map +1 -1
- package/dist/components/page-control/main.js +59 -25
- package/dist/components/page-control/main.js.map +1 -1
- package/dist/components/page-control/props.d.ts +10 -2
- package/dist/components/page-control/props.d.ts.map +1 -1
- package/dist/components/page-control/style.css +5 -0
- package/dist/components/popover/main.d.ts +11 -6
- package/dist/components/popover/main.d.ts.map +1 -1
- package/dist/components/popover/main.js +53 -31
- package/dist/components/popover/main.js.map +1 -1
- package/dist/components/popover/props.d.ts +7 -6
- package/dist/components/popover/props.d.ts.map +1 -1
- package/dist/components/popover/style.css +45 -4
- package/dist/components/progress/main.d.ts +1 -1
- package/dist/components/progress/main.d.ts.map +1 -1
- package/dist/components/progress/main.js +108 -15
- package/dist/components/progress/main.js.map +1 -1
- package/dist/components/progress/props.d.ts +25 -5
- package/dist/components/progress/props.d.ts.map +1 -1
- package/dist/components/progress/style.css +67 -35
- package/dist/components/roll/main.d.ts +1 -1
- package/dist/components/roll/main.d.ts.map +1 -1
- package/dist/components/roll/main.js +81 -25
- package/dist/components/roll/main.js.map +1 -1
- package/dist/components/roll/props.d.ts +24 -7
- package/dist/components/roll/props.d.ts.map +1 -1
- package/dist/components/roll/style.css +1 -13
- package/dist/components/segmented/main.js +3 -3
- package/dist/components/segmented/main.js.map +1 -1
- package/dist/components/segmented/style.css +2 -14
- package/dist/components/sheet/main.d.ts +25 -15
- package/dist/components/sheet/main.d.ts.map +1 -1
- package/dist/components/sheet/main.js +57 -73
- package/dist/components/sheet/main.js.map +1 -1
- package/dist/components/sheet/props.d.ts +36 -2
- package/dist/components/sheet/props.d.ts.map +1 -1
- package/dist/components/sheet/style.css +176 -44
- package/dist/components/sidebar/style.css +13 -7
- package/dist/components/slider/main.d.ts.map +1 -1
- package/dist/components/slider/main.js +6 -5
- package/dist/components/slider/main.js.map +1 -1
- package/dist/components/slider/style.css +2 -28
- package/dist/components/stepper/main.d.ts +4 -6
- package/dist/components/stepper/main.d.ts.map +1 -1
- package/dist/components/stepper/main.js +17 -11
- package/dist/components/stepper/main.js.map +1 -1
- package/dist/components/stepper/style.css +4 -8
- package/dist/components/switch/main.d.ts.map +1 -1
- package/dist/components/switch/main.js +16 -11
- package/dist/components/switch/main.js.map +1 -1
- package/dist/components/switch/props.d.ts +2 -2
- package/dist/components/switch/props.d.ts.map +1 -1
- package/dist/components/switch/style.css +28 -1
- package/dist/components/symbol/main.d.ts +2 -2
- package/dist/components/symbol/main.d.ts.map +1 -1
- package/dist/components/symbol/main.js +34 -27
- package/dist/components/symbol/main.js.map +1 -1
- package/dist/components/symbol/props.d.ts +39 -4
- package/dist/components/symbol/props.d.ts.map +1 -1
- package/dist/components/symbol/style.css +25 -4
- package/dist/components/tab-bar/main.d.ts.map +1 -1
- package/dist/components/tab-bar/main.js +59 -46
- package/dist/components/tab-bar/main.js.map +1 -1
- package/dist/components/tab-bar/props.d.ts +3 -3
- package/dist/components/tab-bar/props.d.ts.map +1 -1
- package/dist/components/tab-bar/style.css +24 -46
- package/dist/components/text-field/main.d.ts.map +1 -1
- package/dist/components/text-field/main.js +9 -8
- package/dist/components/text-field/main.js.map +1 -1
- package/dist/components/text-field/props.d.ts +8 -1
- package/dist/components/text-field/props.d.ts.map +1 -1
- package/dist/components/text-field/style.css +21 -55
- package/dist/components/toolbar/main.d.ts.map +1 -1
- package/dist/components/toolbar/main.js +11 -9
- package/dist/components/toolbar/main.js.map +1 -1
- package/dist/components/toolbar/style.css +28 -22
- package/dist/components/tooltip/main.d.ts +10 -9
- package/dist/components/tooltip/main.d.ts.map +1 -1
- package/dist/components/tooltip/main.js +35 -6
- package/dist/components/tooltip/main.js.map +1 -1
- package/dist/components/tooltip/props.d.ts +2 -0
- package/dist/components/tooltip/props.d.ts.map +1 -1
- package/dist/components/tooltip/style.css +11 -11
- package/dist/components/typography/main.d.ts.map +1 -1
- package/dist/components/typography/main.js +16 -6
- package/dist/components/typography/main.js.map +1 -1
- package/dist/components/typography/props.d.ts +2 -9
- package/dist/components/typography/props.d.ts.map +1 -1
- package/dist/components/typography/style.css +0 -120
- package/dist/components/utils/main.d.ts +34 -5
- package/dist/components/utils/main.d.ts.map +1 -1
- package/dist/components/utils/main.js +81 -12
- package/dist/components/utils/main.js.map +1 -1
- package/dist/components/utils/props.d.ts +4 -2
- package/dist/components/utils/props.d.ts.map +1 -1
- package/dist/components/utils/style.css +29 -16
- package/dist/components/viewport/input.d.ts +23 -0
- package/dist/components/viewport/input.d.ts.map +1 -0
- package/dist/components/viewport/input.js +95 -0
- package/dist/components/viewport/input.js.map +1 -0
- package/dist/components/viewport/main.d.ts +42 -9
- package/dist/components/viewport/main.d.ts.map +1 -1
- package/dist/components/viewport/main.js +488 -66
- package/dist/components/viewport/main.js.map +1 -1
- package/dist/components/viewport/padding.d.ts +50 -0
- package/dist/components/viewport/padding.d.ts.map +1 -0
- package/dist/components/viewport/padding.js +226 -0
- package/dist/components/viewport/padding.js.map +1 -0
- package/dist/components/viewport/props.d.ts +155 -7
- package/dist/components/viewport/props.d.ts.map +1 -1
- package/dist/components/viewport/style.css +172 -6
- package/dist/main.d.ts +0 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js.map +1 -1
- package/dist/styles.css +35 -2
- package/dist/styles.d.ts +2 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +2 -1
- package/dist/styles.js.map +1 -1
- package/package.json +6 -13
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { Popover as BasePopover } from '@base-ui/react/popover';
|
|
1
2
|
import type { ComponentProps, ReactNode } from 'react';
|
|
2
3
|
import type { PopoverAlign } from '../popover/main.js';
|
|
4
|
+
import type { DatePickerHandle } from './handle.js';
|
|
3
5
|
export type DatePickerMode = 'date' | 'dateAndTime' | 'time';
|
|
4
6
|
export type DatePickerStyle = 'compact' | 'inline';
|
|
5
7
|
/** How a day is highlighted. */
|
|
@@ -18,6 +20,23 @@ export type DayHighlight = {
|
|
|
18
20
|
};
|
|
19
21
|
/** A day's highlights (see `CalendarProps` `highlighted`). */
|
|
20
22
|
export type DayHighlights = boolean | DayHighlight | null | readonly DayHighlight[] | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Why the value changed, and the event that changed it: a day pressed (or
|
|
25
|
+
* chosen by keyboard), a range dragged, the time's roll, or the footer's
|
|
26
|
+
* `select`.
|
|
27
|
+
*/
|
|
28
|
+
export type DatePickerChangeEventDetails = {
|
|
29
|
+
event: Event;
|
|
30
|
+
reason: 'day-press' | 'drag' | 'footer' | 'time';
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Why a picker opened or closed (Base UI's popover's reasons; without
|
|
34
|
+
* popovers, `trigger-press`), and the event.
|
|
35
|
+
*/
|
|
36
|
+
export type DatePickerOpenChangeEventDetails = {
|
|
37
|
+
event: Event;
|
|
38
|
+
reason: BasePopover.Root.ChangeEventReason;
|
|
39
|
+
};
|
|
21
40
|
/** A range of days: its start, and its end (`null` while picking it). */
|
|
22
41
|
export type DateRange = {
|
|
23
42
|
end: Date | null;
|
|
@@ -26,8 +45,8 @@ export type DateRange = {
|
|
|
26
45
|
export type SingleValue = {
|
|
27
46
|
/** The initially selected date (uncontrolled). */
|
|
28
47
|
defaultValue?: Date | null;
|
|
29
|
-
/** Called with the newly selected date. */
|
|
30
|
-
onValueChange?: (date: Date) => void;
|
|
48
|
+
/** Called with the newly selected date, and why. */
|
|
49
|
+
onValueChange?: (date: Date, eventDetails: DatePickerChangeEventDetails) => void;
|
|
31
50
|
/** Picks a single date (default). */
|
|
32
51
|
range?: false;
|
|
33
52
|
/** The selected date (controlled). */
|
|
@@ -46,15 +65,15 @@ export type RangeValue = {
|
|
|
46
65
|
isRangeDisabled?: (start: Date, end: Date) => boolean;
|
|
47
66
|
/**
|
|
48
67
|
* Called with the newly selected range: a start (its end `null`), then
|
|
49
|
-
* the range.
|
|
68
|
+
* the range; and why.
|
|
50
69
|
*/
|
|
51
|
-
onValueChange?: (range: DateRange) => void;
|
|
70
|
+
onValueChange?: (range: DateRange, eventDetails: DatePickerChangeEventDetails) => void;
|
|
52
71
|
/** Picks a range of days: a start, then an end (dates only). */
|
|
53
72
|
range: true;
|
|
54
73
|
/** The selected range (controlled). */
|
|
55
74
|
value?: DateRange | null;
|
|
56
75
|
};
|
|
57
|
-
/** Props of the calendar (also of `DatePicker`'s). */
|
|
76
|
+
/** Props of the calendar (also of `DatePicker.Root`'s). */
|
|
58
77
|
export type CalendarProps = {
|
|
59
78
|
/**
|
|
60
79
|
* The week's first day (0: Sunday … 6: Saturday).
|
|
@@ -62,12 +81,17 @@ export type CalendarProps = {
|
|
|
62
81
|
*/
|
|
63
82
|
firstDayOfWeek?: number;
|
|
64
83
|
/**
|
|
65
|
-
* Rows below the calendar, after a separator (e.g. `CalendarTimeRow`, or
|
|
66
|
-
* `CalendarRow`s of `CalendarButton`s jumping to dates), composed from the
|
|
84
|
+
* Rows below the calendar, after a separator (e.g. `DatePicker.CalendarTimeRow`, or
|
|
85
|
+
* `DatePicker.CalendarRow`s of `DatePicker.CalendarButton`s jumping to dates), composed from the
|
|
67
86
|
* calendar's state and actions (see `CalendarFooter`); with a time, by
|
|
68
|
-
* default `CalendarTimeRow` (none: `() => null`).
|
|
87
|
+
* default `DatePicker.CalendarTimeRow` (none: `() => null`).
|
|
69
88
|
*/
|
|
70
89
|
footer?: (calendar: CalendarFooter) => ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* Identifies the form that owns its hidden control (see `name`), when
|
|
92
|
+
* it's outside the form.
|
|
93
|
+
*/
|
|
94
|
+
form?: string;
|
|
71
95
|
/**
|
|
72
96
|
* Days highlighted (e.g. with events; Framework7 `events`): `true` (a dot
|
|
73
97
|
* below), how (see `DayHighlight`), or several highlights (dots side by
|
|
@@ -87,20 +111,40 @@ export type CalendarProps = {
|
|
|
87
111
|
isDateDisabled?: (date: Date) => boolean;
|
|
88
112
|
/** Locale of names, numerals, the hour cycle and the week's first day. */
|
|
89
113
|
locale?: string;
|
|
90
|
-
/** The latest selectable day. */
|
|
114
|
+
/** The latest selectable day (and, with a time, time). */
|
|
91
115
|
max?: Date;
|
|
92
|
-
/** The earliest selectable day. */
|
|
116
|
+
/** The earliest selectable day (and, with a time, time). */
|
|
93
117
|
min?: Date;
|
|
118
|
+
/**
|
|
119
|
+
* Its value's name in a form: submitted by a hidden control (as an
|
|
120
|
+
* input's: a date `YYYY-MM-DD`, a time `HH:MM`, both `YYYY-MM-DDTHH:MM`,
|
|
121
|
+
* a range `start/end`, empty until its end is picked). In a Base UI
|
|
122
|
+
* `Field`, the field's name applies. `DatePicker.Root` and
|
|
123
|
+
* `DatePicker.Calendar` are alternatives, never nested (the picker renders
|
|
124
|
+
* its own calendar): name the one holding the value.
|
|
125
|
+
*/
|
|
126
|
+
name?: string;
|
|
94
127
|
/**
|
|
95
128
|
* Shows the adjacent months' days filling the first and last weeks, grayed
|
|
96
129
|
* out (Framework7 `calendarDayPrev`/`Next`; UIKit: none); pressed, they
|
|
97
130
|
* show their month.
|
|
98
131
|
*/
|
|
99
132
|
showAdjacentMonths?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* What swiping the days sideways does: `'month'` turns the month (as
|
|
135
|
+
* iOS's), following the finger; `'date-range'` drags a range (picking a
|
|
136
|
+
* range; otherwise as `'ignore'`); `'ignore'`: neither (left to what's
|
|
137
|
+
* around it, e.g. a swipeable page). Scrolling sideways (e.g. a
|
|
138
|
+
* trackpad's) turns the month, but with `'ignore'`.
|
|
139
|
+
* @default `'date-range'` picking a range, otherwise `'month'`
|
|
140
|
+
*/
|
|
141
|
+
swipe?: CalendarSwipe;
|
|
100
142
|
} & (RangeValue | SingleValue);
|
|
143
|
+
/** What swiping a calendar's days does (see `swipe`). */
|
|
144
|
+
export type CalendarSwipe = 'date-range' | 'ignore' | 'month';
|
|
101
145
|
/** The calendar's state and actions, for its `footer`. */
|
|
102
146
|
export type CalendarFooter = {
|
|
103
|
-
/** The shape of the picker's collapsed buttons (see `DatePicker`). */
|
|
147
|
+
/** The shape of the picker's collapsed buttons (see `DatePicker.Root`). */
|
|
104
148
|
buttonShape?: 'capsule' | 'roundedRectangle';
|
|
105
149
|
/** Whether the picker is disabled. */
|
|
106
150
|
disabled: boolean;
|
|
@@ -136,6 +180,12 @@ export type DatePickerProps = CalendarProps & {
|
|
|
136
180
|
defaultOpen?: DatePickerOpen | null;
|
|
137
181
|
/** Disables all of it. */
|
|
138
182
|
disabled?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Its pickers' handle (see `DatePicker.createHandle`): the compact
|
|
185
|
+
* style's buttons toggle them (no popovers), shown in place by a
|
|
186
|
+
* `DatePicker.Expandable` given it (e.g. after the picker's list row).
|
|
187
|
+
*/
|
|
188
|
+
handle?: DatePickerHandle;
|
|
139
189
|
/**
|
|
140
190
|
* 12 or 24 hours.
|
|
141
191
|
* @default the locale's
|
|
@@ -147,8 +197,11 @@ export type DatePickerProps = CalendarProps & {
|
|
|
147
197
|
* @default 'date'
|
|
148
198
|
*/
|
|
149
199
|
mode?: DatePickerMode;
|
|
150
|
-
/**
|
|
151
|
-
|
|
200
|
+
/**
|
|
201
|
+
* Called when the compact style's picker opens or closes (its buttons,
|
|
202
|
+
* or, in a popover, pressing outside it, Escape, …), and why.
|
|
203
|
+
*/
|
|
204
|
+
onOpenChange?: (open: DatePickerOpen | null, eventDetails: DatePickerOpenChangeEventDetails) => void;
|
|
152
205
|
/** The open picker of the compact style (controlled). */
|
|
153
206
|
open?: DatePickerOpen | null;
|
|
154
207
|
/**
|
|
@@ -159,12 +212,13 @@ export type DatePickerProps = CalendarProps & {
|
|
|
159
212
|
/**
|
|
160
213
|
* The compact style's buttons open their pickers in popovers (default);
|
|
161
214
|
* without, they only toggle `open`, for the app to show them (e.g. in an
|
|
162
|
-
* expandable list row: `Calendar`, `TimeRoll`).
|
|
215
|
+
* expandable list row: `DatePicker.Calendar`, `DatePicker.TimeRoll`).
|
|
163
216
|
*/
|
|
164
217
|
popover?: boolean;
|
|
165
218
|
/**
|
|
166
|
-
* How the compact style's popover aligns to its buttons
|
|
167
|
-
*
|
|
219
|
+
* How the compact style's popover aligns to its buttons (in a list row,
|
|
220
|
+
* which they end, iOS aligns it with their end: `end`).
|
|
221
|
+
* @default 'center'
|
|
168
222
|
*/
|
|
169
223
|
popoverAlign?: PopoverAlign;
|
|
170
224
|
};
|
|
@@ -176,8 +230,15 @@ export type TimeRollProps = {
|
|
|
176
230
|
hourCycle?: HourCycle;
|
|
177
231
|
/** Locale of numerals, the hour cycle and the day period. */
|
|
178
232
|
locale?: string;
|
|
179
|
-
/**
|
|
180
|
-
|
|
233
|
+
/**
|
|
234
|
+
* The latest selectable time (UIKit `maximumDate`): later hours, minutes
|
|
235
|
+
* and day periods disabled, a later selection moved back to it.
|
|
236
|
+
*/
|
|
237
|
+
max?: Date;
|
|
238
|
+
/** The earliest selectable time (UIKit `minimumDate`), as `max`. */
|
|
239
|
+
min?: Date;
|
|
240
|
+
/** Called with the date at the newly selected time (`reason`: `time`). */
|
|
241
|
+
onValueChange: (date: Date, eventDetails: DatePickerChangeEventDetails) => void;
|
|
181
242
|
/**
|
|
182
243
|
* The date whose time is shown.
|
|
183
244
|
* @default now
|
|
@@ -185,13 +246,19 @@ export type TimeRollProps = {
|
|
|
185
246
|
value: Date | null;
|
|
186
247
|
};
|
|
187
248
|
export type CalendarInternalProps = CalendarProps & {
|
|
249
|
+
/**
|
|
250
|
+
* Renders its value's hidden control (internal: not the picker's
|
|
251
|
+
* calendar, the picker renders its own).
|
|
252
|
+
* @default true
|
|
253
|
+
*/
|
|
254
|
+
formControl?: boolean;
|
|
188
255
|
hourCycle?: HourCycle;
|
|
189
|
-
/** The roll shown at first (internal, see `DatePicker`). */
|
|
256
|
+
/** The roll shown at first (internal, see `DatePicker.Root`). */
|
|
190
257
|
initialRoll?: 'monthYear' | 'time';
|
|
191
258
|
label?: string;
|
|
192
|
-
/** Called as the time's roll shows or hides (internal, see `DatePicker`). */
|
|
259
|
+
/** Called as the time's roll shows or hides (internal, see `DatePicker.Root`). */
|
|
193
260
|
onTimeShownChange?: (shown: boolean) => void;
|
|
194
|
-
/** The picker's time (internal, see `DatePicker`): for the footer. */
|
|
261
|
+
/** The picker's time (internal, see `DatePicker.Root`): for the footer. */
|
|
195
262
|
time?: {
|
|
196
263
|
disabled: boolean;
|
|
197
264
|
shape?: DatePickerProps['buttonShape'];
|
|
@@ -202,7 +269,7 @@ export type RangeDrag = {
|
|
|
202
269
|
/** Moving on to other months, while held beyond the days. */
|
|
203
270
|
edge: number;
|
|
204
271
|
from: Date;
|
|
205
|
-
|
|
272
|
+
isMoved: boolean;
|
|
206
273
|
/** The days the range can reach (see `rangeReach`). */
|
|
207
274
|
reachable: (day: Date) => boolean;
|
|
208
275
|
timer?: ReturnType<typeof setTimeout>;
|
|
@@ -217,4 +284,8 @@ export type CalendarMessageProps = ComponentProps<'p'> & {
|
|
|
217
284
|
*/
|
|
218
285
|
variant?: 'error' | 'info';
|
|
219
286
|
};
|
|
287
|
+
export type DatePickerExpandableProps = {
|
|
288
|
+
/** The pickers' handle, given to their `DatePicker.Root` too. */
|
|
289
|
+
handle: DatePickerHandle;
|
|
290
|
+
};
|
|
220
291
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,aAAa,GAAG,MAAM,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEnD,gCAAgC;AAChC,MAAM,MAAM,YAAY,GAAG;IACzB;;;;OAIG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAClC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM,aAAa,GACvB,OAAO,GAAG,YAAY,GAAG,IAAI,GAAG,SAAS,YAAY,EAAE,GAAG,SAAS,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,G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,CAAC;CAC1B,CAAC"}
|
|
@@ -10,15 +10,7 @@
|
|
|
10
10
|
font-weight: round(down, var(--font-ios-body-weight), 100);
|
|
11
11
|
letter-spacing: var(--font-ios-body-tracking);
|
|
12
12
|
line-height: var(--font-ios-body-line-height);
|
|
13
|
-
stroke: currentcolor;
|
|
14
|
-
stroke-linejoin: round;
|
|
15
|
-
stroke-width: max(0px, (var(--font-ios-body-weight) - 400) / 326 * 1px);
|
|
16
13
|
-webkit-tap-highlight-color: transparent;
|
|
17
|
-
|
|
18
|
-
--uikit-symbol-thinning: max(
|
|
19
|
-
0px,
|
|
20
|
-
(400 - var(--font-ios-body-weight)) / 326 * 1px
|
|
21
|
-
);
|
|
22
14
|
}
|
|
23
15
|
|
|
24
16
|
&&[data-popup-open],
|
|
@@ -27,6 +19,8 @@
|
|
|
27
19
|
}
|
|
28
20
|
}
|
|
29
21
|
|
|
22
|
+
/* Its days 44px wide at least (e.g. a popover's, sized by it); with
|
|
23
|
+
less room given (e.g. a list row's, see list/style.css), narrower. */
|
|
30
24
|
.uikit-date-picker-panel {
|
|
31
25
|
display: flex;
|
|
32
26
|
min-width: calc(7 * 44px + 2 * 16px);
|
|
@@ -52,11 +46,6 @@
|
|
|
52
46
|
font-weight: round(down, 590, 100);
|
|
53
47
|
letter-spacing: var(--font-ios-body-tracking);
|
|
54
48
|
line-height: var(--font-ios-body-line-height);
|
|
55
|
-
stroke: currentcolor;
|
|
56
|
-
stroke-linejoin: round;
|
|
57
|
-
stroke-width: max(0px, (590 - 400) / 326 * 1px);
|
|
58
|
-
|
|
59
|
-
--uikit-symbol-thinning: max(0px, (400 - 590) / 326 * 1px);
|
|
60
49
|
}
|
|
61
50
|
|
|
62
51
|
.uikit-date-picker-title-button {
|
|
@@ -99,10 +88,15 @@
|
|
|
99
88
|
}
|
|
100
89
|
}
|
|
101
90
|
|
|
91
|
+
/* Its glyphs' ends on the header's inset, as the title's start (a 40px
|
|
92
|
+
button's glyph 14px in). */
|
|
102
93
|
.uikit-date-picker-arrows {
|
|
103
94
|
display: flex;
|
|
104
95
|
align-items: center;
|
|
105
|
-
margin-inline-end: -
|
|
96
|
+
margin-inline-end: -14px;
|
|
97
|
+
|
|
98
|
+
/* (Not a row's trailing button's end margin, e.g. in a List.) */
|
|
99
|
+
--uikit-button-plain-margin-end: 0;
|
|
106
100
|
|
|
107
101
|
&[hidden] {
|
|
108
102
|
display: flex;
|
|
@@ -147,17 +141,12 @@
|
|
|
147
141
|
font-size: 13px;
|
|
148
142
|
font-variation-settings: 'wght' 590;
|
|
149
143
|
font-weight: round(down, 590, 100);
|
|
150
|
-
grid-template-columns: repeat(7, minmax(
|
|
144
|
+
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
151
145
|
line-height: 18px;
|
|
152
146
|
padding-inline: 16px;
|
|
153
147
|
place-items: center;
|
|
154
|
-
stroke: currentcolor;
|
|
155
|
-
stroke-linejoin: round;
|
|
156
|
-
stroke-width: max(0px, (590 - 400) / 326 * 1px);
|
|
157
148
|
text-transform: uppercase;
|
|
158
149
|
|
|
159
|
-
--uikit-symbol-thinning: max(0px, (400 - 590) / 326 * 1px);
|
|
160
|
-
|
|
161
150
|
& > abbr {
|
|
162
151
|
text-decoration: none;
|
|
163
152
|
}
|
|
@@ -167,30 +156,55 @@
|
|
|
167
156
|
}
|
|
168
157
|
}
|
|
169
158
|
|
|
170
|
-
.uikit-date-picker-pages {
|
|
171
|
-
position: relative;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.uikit-date-picker-leaving-page {
|
|
175
|
-
position: absolute;
|
|
176
|
-
top: 0;
|
|
177
|
-
inset-inline: 0;
|
|
178
|
-
pointer-events: none;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
159
|
.uikit-date-picker-weeks {
|
|
182
160
|
display: grid;
|
|
183
|
-
grid-template-columns: repeat(7, minmax(
|
|
161
|
+
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
184
162
|
padding-block-start: 3px;
|
|
185
163
|
padding-inline: 16px;
|
|
186
164
|
row-gap: 7px;
|
|
187
165
|
|
|
188
|
-
/* Ranges
|
|
189
|
-
&[data-range
|
|
166
|
+
/* Ranges dragged (`data-swipe`, see CalendarPanel), not scrolled. */
|
|
167
|
+
&[data-swipe='date-range'] {
|
|
190
168
|
touch-action: none;
|
|
191
169
|
}
|
|
192
170
|
}
|
|
193
171
|
|
|
172
|
+
/* The months side by side (see pager.ts), the shown one's between its
|
|
173
|
+
neighbours', snapping to one each; as high as it is (set inline), the
|
|
174
|
+
neighbours' further weeks clipped, room for its days' focus rings
|
|
175
|
+
around. Not swiped (`ignore`), scrolled programmatically only (e.g. the
|
|
176
|
+
arrows). */
|
|
177
|
+
.uikit-date-picker-pages {
|
|
178
|
+
display: flex;
|
|
179
|
+
overflow: auto hidden;
|
|
180
|
+
box-sizing: content-box;
|
|
181
|
+
align-items: start;
|
|
182
|
+
|
|
183
|
+
/* (Not as wide as its months: as wide as the calendar, e.g. a
|
|
184
|
+
popover's, sized by the rest.) */
|
|
185
|
+
contain: inline-size;
|
|
186
|
+
margin-block: -4px;
|
|
187
|
+
overscroll-behavior-x: contain;
|
|
188
|
+
padding-block: 4px;
|
|
189
|
+
scroll-snap-type: x mandatory;
|
|
190
|
+
scrollbar-width: none;
|
|
191
|
+
|
|
192
|
+
&::-webkit-scrollbar {
|
|
193
|
+
display: none;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&[data-swipe='ignore'] {
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
& > .uikit-date-picker-weeks {
|
|
201
|
+
box-sizing: border-box;
|
|
202
|
+
flex: 0 0 100%;
|
|
203
|
+
scroll-snap-align: start;
|
|
204
|
+
scroll-snap-stop: always;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
194
208
|
.uikit-date-picker-separator {
|
|
195
209
|
height: 11px;
|
|
196
210
|
box-sizing: border-box;
|
|
@@ -211,14 +225,6 @@
|
|
|
211
225
|
letter-spacing: var(--font-ios-body-tracking);
|
|
212
226
|
line-height: var(--font-ios-body-line-height);
|
|
213
227
|
padding-inline: 16px;
|
|
214
|
-
stroke: currentcolor;
|
|
215
|
-
stroke-linejoin: round;
|
|
216
|
-
stroke-width: max(0px, (var(--font-ios-body-weight) - 400) / 326 * 1px);
|
|
217
|
-
|
|
218
|
-
--uikit-symbol-thinning: max(
|
|
219
|
-
0px,
|
|
220
|
-
(400 - var(--font-ios-body-weight)) / 326 * 1px
|
|
221
|
-
);
|
|
222
228
|
}
|
|
223
229
|
|
|
224
230
|
.uikit-date-picker-collapsed {
|
|
@@ -229,10 +235,15 @@
|
|
|
229
235
|
vertical-align: middle;
|
|
230
236
|
}
|
|
231
237
|
|
|
238
|
+
/* Its content clipped to its corners; with less room than its height
|
|
239
|
+
(its positioner keeping it clear of the safe areas), scrolling. */
|
|
232
240
|
.uikit-date-picker-popup {
|
|
233
241
|
& > div {
|
|
234
|
-
overflow:
|
|
242
|
+
overflow: hidden auto;
|
|
243
|
+
min-height: 0;
|
|
244
|
+
flex: 0 1 auto;
|
|
235
245
|
border-radius: inherit;
|
|
246
|
+
overscroll-behavior: contain;
|
|
236
247
|
}
|
|
237
248
|
}
|
|
238
249
|
|
|
@@ -251,6 +262,9 @@
|
|
|
251
262
|
appearance: none;
|
|
252
263
|
background: none;
|
|
253
264
|
color: var(--color-ios-label);
|
|
265
|
+
|
|
266
|
+
/* (Its circle, as wide as it is, up to 44px.) */
|
|
267
|
+
container-type: inline-size;
|
|
254
268
|
font-family: inherit;
|
|
255
269
|
font-size: var(--font-ios-title3-size);
|
|
256
270
|
font-style: normal;
|
|
@@ -262,16 +276,8 @@
|
|
|
262
276
|
line-height: var(--font-ios-title3-line-height);
|
|
263
277
|
outline: none;
|
|
264
278
|
place-items: center;
|
|
265
|
-
stroke: currentcolor;
|
|
266
|
-
stroke-linejoin: round;
|
|
267
|
-
stroke-width: max(0px, (var(--font-ios-title3-weight) - 400) / 326 * 1px);
|
|
268
279
|
-webkit-tap-highlight-color: transparent;
|
|
269
280
|
|
|
270
|
-
--uikit-symbol-thinning: max(
|
|
271
|
-
0px,
|
|
272
|
-
(400 - var(--font-ios-title3-weight)) / 326 * 1px
|
|
273
|
-
);
|
|
274
|
-
|
|
275
281
|
@media (hover: hover) {
|
|
276
282
|
cursor: pointer;
|
|
277
283
|
}
|
|
@@ -279,8 +285,8 @@
|
|
|
279
285
|
&::before {
|
|
280
286
|
position: absolute;
|
|
281
287
|
z-index: -1;
|
|
282
|
-
width: 44px;
|
|
283
|
-
height: 44px;
|
|
288
|
+
width: min(44px, 100cqi);
|
|
289
|
+
height: min(44px, 100cqi);
|
|
284
290
|
border-radius: 50%;
|
|
285
291
|
margin: auto;
|
|
286
292
|
content: '';
|
|
@@ -301,11 +307,6 @@
|
|
|
301
307
|
font-size: 24px;
|
|
302
308
|
font-variation-settings: 'wght' 510;
|
|
303
309
|
font-weight: round(down, 510, 100);
|
|
304
|
-
stroke: currentcolor;
|
|
305
|
-
stroke-linejoin: round;
|
|
306
|
-
stroke-width: max(0px, (510 - 400) / 326 * 1px);
|
|
307
|
-
|
|
308
|
-
--uikit-symbol-thinning: max(0px, (400 - 510) / 326 * 1px);
|
|
309
310
|
|
|
310
311
|
&::before {
|
|
311
312
|
background-color: color-mix(
|
|
@@ -325,11 +326,6 @@
|
|
|
325
326
|
font-size: var(--font-ios-title3-size);
|
|
326
327
|
font-variation-settings: 'wght' 400;
|
|
327
328
|
font-weight: round(down, 400, 100);
|
|
328
|
-
stroke: currentcolor;
|
|
329
|
-
stroke-linejoin: round;
|
|
330
|
-
stroke-width: max(0px, (400 - 400) / 326 * 1px);
|
|
331
|
-
|
|
332
|
-
--uikit-symbol-thinning: max(0px, (400 - 400) / 326 * 1px);
|
|
333
329
|
|
|
334
330
|
&::before {
|
|
335
331
|
background: none;
|
|
@@ -430,14 +426,6 @@
|
|
|
430
426
|
font-weight: round(down, var(--font-ios-footnote-weight), 100);
|
|
431
427
|
letter-spacing: var(--font-ios-footnote-tracking);
|
|
432
428
|
line-height: var(--font-ios-footnote-line-height);
|
|
433
|
-
stroke: currentcolor;
|
|
434
|
-
stroke-linejoin: round;
|
|
435
|
-
stroke-width: max(0px, (var(--font-ios-footnote-weight) - 400) / 326 * 1px);
|
|
436
|
-
|
|
437
|
-
--uikit-symbol-thinning: max(
|
|
438
|
-
0px,
|
|
439
|
-
(400 - var(--font-ios-footnote-weight)) / 326 * 1px
|
|
440
|
-
);
|
|
441
429
|
|
|
442
430
|
&[data-variant='error'] {
|
|
443
431
|
color: var(--color-ios-system-red);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import './style.css';
|
|
2
|
+
import { Drawer as BaseDrawer } from '@base-ui/react/drawer';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
4
|
+
import type { DrawerHandle, DrawerPopupProps, DrawerRootProps, DrawerSwipeAreaProps } from './props.js';
|
|
5
|
+
export type { DrawerHandle, DrawerPopupProps, DrawerRootProps, DrawerSide, DrawerSwipeAreaProps, } from './props.js';
|
|
6
|
+
/** `Drawer.createHandle`, in a component: made once, for its lifetime. */
|
|
7
|
+
export declare const useCreateDrawerHandle: <Payload = unknown>() => DrawerHandle<Payload>;
|
|
8
|
+
export declare const Drawer: {
|
|
9
|
+
Root: <Payload>({ side, ...props }: DrawerRootProps<Payload>) => ReactElement;
|
|
10
|
+
Popup: import("preact").FunctionalComponent<import("react").PropsWithoutRef<DrawerPopupProps> & {
|
|
11
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
SwipeArea: import("preact").FunctionalComponent<import("react").PropsWithoutRef<DrawerSwipeAreaProps> & {
|
|
14
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
createHandle: <Payload = unknown>() => DrawerHandle<Payload>;
|
|
17
|
+
Backdrop: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
Close: BaseDrawer.Close;
|
|
19
|
+
Content: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
+
Description: BaseDrawer.Description;
|
|
21
|
+
Indent: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerIndentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
IndentBackground: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerIndentBackgroundProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
+
Portal: BaseDrawer.Portal;
|
|
24
|
+
Provider: typeof BaseDrawer.Provider;
|
|
25
|
+
Title: BaseDrawer.Title;
|
|
26
|
+
Trigger: BaseDrawer.Trigger;
|
|
27
|
+
Viewport: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
VirtualKeyboardProvider: typeof BaseDrawer.VirtualKeyboardProvider;
|
|
29
|
+
Handle: typeof BaseDrawer.Handle;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAGL,YAAY,EAGb,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,eAAe,EAEf,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAmIpB,0EAA0E;AAC1E,eAAO,MAAM,qBAAqB,GAChC,OAAO,GAAG,OAAO,OACd,YAAY,CAAC,OAAO,CAIxB,CAAC;AAEF,eAAO,MAAM,MAAM;WAhHL,OAAO,sBAGlB,eAAe,CAAC,OAAO,CAAC,KAAG,YAAY;;;;;;;mBAiGpB,OAAO,iBAAgB,YAAY,CAAC,OAAO,CAAC;;;;;;;;;;;;;;CAkBjE,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './style.css';
|
|
3
|
+
import { Drawer as BaseDrawer } from '@base-ui/react/drawer';
|
|
4
|
+
import { createContext, forwardRef, useContext, useState, } from 'react';
|
|
5
|
+
import { cn, usePortalContainer, withStyle } from '../utils/main.js';
|
|
6
|
+
import { ViewportScopeContext } from '../viewport/main.js';
|
|
7
|
+
// A drawer (Base UI's `Drawer`, from a side; Framework7's panels): a column
|
|
8
|
+
// over the content from the inline start or end (e.g. a compact layout's
|
|
9
|
+
// sidebar or inspector, see `Layout`), the content dimmed behind it, hidden
|
|
10
|
+
// until opened: swiped in from its edge (its `SwipeArea`) or by a
|
|
11
|
+
// `Trigger` (in it, or linked by a handle, `Drawer.createHandle` or, in a
|
|
12
|
+
// component, `useCreateDrawerHandle`), swiped back (or the dimmed content
|
|
13
|
+
// pressed, or a `Close`) to close. Its state is the app's, or its own;
|
|
14
|
+
// which of its content shows as a drawer, and which side by side (e.g. by
|
|
15
|
+
// the size class, `useSizeClass`), is the app's choice.
|
|
16
|
+
//
|
|
17
|
+
// Deviations:
|
|
18
|
+
// - Drawers (iOS: a compact split view shows one column at a time, pushed as
|
|
19
|
+
// a navigation stack; Framework7's panels swipe in).
|
|
20
|
+
/** A drawer's side, for its parts. */
|
|
21
|
+
const SideContext = createContext('inline-start');
|
|
22
|
+
/** The physical direction a drawer at a side is swiped towards to close. */
|
|
23
|
+
const closingDirection = (side, isRightToLeft) => (side === 'inline-start') === isRightToLeft ? 'right' : 'left';
|
|
24
|
+
/**
|
|
25
|
+
* A drawer (Base UI's `Drawer.Root`) at its side: opened by its
|
|
26
|
+
* `SwipeArea` or a `Trigger`, closed by swiping it back, a press on the
|
|
27
|
+
* dimmed content (unless `disablePointerDismissal`) or a `Close`.
|
|
28
|
+
*/
|
|
29
|
+
const Root = ({ side = 'inline-start', ...props }) => {
|
|
30
|
+
// The document's direction, for its side's swipes (as it mounts).
|
|
31
|
+
const [isRightToLeft] = useState(() => typeof document !== 'undefined' &&
|
|
32
|
+
getComputedStyle(document.documentElement).direction === 'rtl');
|
|
33
|
+
return (_jsx(SideContext.Provider, { value: side, children: _jsx(BaseDrawer.Root, { swipeDirection: closingDirection(side, isRightToLeft), ...props }) }));
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Its column (Base UI's `Drawer.Popup`, in its portal, over a backdrop and
|
|
37
|
+
* in a viewport): over the content at its side, the content dimmed behind
|
|
38
|
+
* it; kept mounted while closed (its pages keep their state).
|
|
39
|
+
*/
|
|
40
|
+
const Popup = forwardRef(({ className, container, floating = false, size = 320, style, ...props }, ref) => {
|
|
41
|
+
const side = useContext(SideContext);
|
|
42
|
+
// Its anchors' scope: fixed to it (see Viewport.Padding).
|
|
43
|
+
const [scope] = useState(() => ({}));
|
|
44
|
+
return (_jsx(ViewportScopeContext.Provider, { value: scope, children: _jsxs(BaseDrawer.Portal, { keepMounted: true, className: "uikit-drawer-portal", container: usePortalContainer(container), children: [_jsx(BaseDrawer.Backdrop, { className: "uikit-drawer-backdrop", "data-drawer-part": "backdrop" }), _jsx(BaseDrawer.Viewport, { className: "uikit-drawer-viewport", "data-drawer-part": "viewport", children: _jsx(BaseDrawer.Popup, { ref: ref, "data-drawer-part": "popup", "data-floating": floating ? '' : undefined, "data-side": side, style: withStyle({ '--uikit-drawer-size': `${String(size)}px` }, style), ...props, className: cn('uikit-drawer-popup', className) }) })] }) }));
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* A strip at its drawer's edge (`width`, 20px) it's swiped in from (where
|
|
48
|
+
* it's rendered: e.g. the app's root, or a layout's); without one, a drawer
|
|
49
|
+
* isn't swiped in.
|
|
50
|
+
*/
|
|
51
|
+
const SwipeArea = forwardRef(({ className, style, width = 20, ...props }, ref) => {
|
|
52
|
+
const side = useContext(SideContext);
|
|
53
|
+
return (_jsx(BaseDrawer.SwipeArea, { ref: ref, "data-drawer-part": "swipe-area", "data-side": side, style: withStyle({ '--uikit-drawer-swipe-area-width': `${String(width)}px` }, style), ...props, className: cn('uikit-drawer-swipe-area', className) }));
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* A handle linking a drawer (its `handle`) to its triggers outside it (e.g.
|
|
57
|
+
* in a column's bar, their `handle`), and opening or closing it
|
|
58
|
+
* imperatively (Base UI's `Drawer.createHandle`): made once, e.g. at a
|
|
59
|
+
* module's top level (in a component: `useCreateDrawerHandle`).
|
|
60
|
+
*/
|
|
61
|
+
const createHandle = () => BaseDrawer.createHandle();
|
|
62
|
+
/** `Drawer.createHandle`, in a component: made once, for its lifetime. */
|
|
63
|
+
export const useCreateDrawerHandle = () => {
|
|
64
|
+
const [handle] = useState(() => createHandle());
|
|
65
|
+
return handle;
|
|
66
|
+
};
|
|
67
|
+
export const Drawer = {
|
|
68
|
+
...BaseDrawer,
|
|
69
|
+
Root,
|
|
70
|
+
Popup,
|
|
71
|
+
SwipeArea,
|
|
72
|
+
createHandle,
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/drawer/main.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EACL,aAAa,EACb,UAAU,EAEV,UAAU,EACV,QAAQ,GACT,MAAM,OAAO,CAA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AAE,iCAAiC,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,EAC3D,KAAK,CACN,KACG,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,GACnD,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,YAAY,GAAG,GAA8C,EAAE,CACnE,UAAU,CAAC,YAAY,EAAW,CAAC;AAErC,0EAA0E;AAC1E,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAEV,EAAE;IAC3B,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,EAAW,CAAC,CAAC;IAEzD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,UAAU;IACb,IAAI;IACJ,KAAK;IACL,SAAS;IACT,YAAY;CACb,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Drawer as BaseDrawer } from '@base-ui/react/drawer';
|
|
2
|
+
/** The side a drawer is at (and hides towards). */
|
|
3
|
+
export type DrawerSide = 'inline-end' | 'inline-start';
|
|
4
|
+
export type DrawerRootProps<Payload = unknown> = Omit<BaseDrawer.Root.Props<Payload>, 'defaultSnapPoint' | 'onSnapPointChange' | 'snapPoint' | 'snapPoints' | 'snapToSequentialPoints' | 'swipeDirection'> & {
|
|
5
|
+
/**
|
|
6
|
+
* Its side: its popup floats over the content from there, hidden until
|
|
7
|
+
* opened (swiped in from its `SwipeArea`, or by a `Trigger`), swiped back
|
|
8
|
+
* towards it to close.
|
|
9
|
+
* @default 'inline-start'
|
|
10
|
+
*/
|
|
11
|
+
side?: DrawerSide;
|
|
12
|
+
};
|
|
13
|
+
export type DrawerPopupProps = Omit<BaseDrawer.Popup.Props, 'ref'> & {
|
|
14
|
+
/**
|
|
15
|
+
* A parent element to render the portal element into (else the provided
|
|
16
|
+
* one, see `PortalContainerContext`, or the body).
|
|
17
|
+
*/
|
|
18
|
+
container?: BaseDrawer.Portal.Props['container'];
|
|
19
|
+
/**
|
|
20
|
+
* Without a background or shadow of its own: its content floats itself
|
|
21
|
+
* (e.g. a floating `Sidebar`).
|
|
22
|
+
*/
|
|
23
|
+
floating?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Its size (px), at most the container's less 44px.
|
|
26
|
+
* @default 320
|
|
27
|
+
*/
|
|
28
|
+
size?: number;
|
|
29
|
+
};
|
|
30
|
+
export type DrawerSwipeAreaProps = Omit<BaseDrawer.SwipeArea.Props, 'ref' | 'swipeDirection'> & {
|
|
31
|
+
/**
|
|
32
|
+
* Its width (px): how far from the drawer's edge a swipe starts.
|
|
33
|
+
* @default 20
|
|
34
|
+
*/
|
|
35
|
+
width?: number;
|
|
36
|
+
};
|
|
37
|
+
/** A handle linking a drawer to its triggers outside it. */
|
|
38
|
+
export type DrawerHandle<Payload = unknown> = BaseDrawer.Handle<Payload>;
|
|
39
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAElE,mDAAmD;AACnD,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,cAAc,CAAC;AAGvD,MAAM,MAAM,eAAe,CAAC,OAAO,GAAG,OAAO,IAAI,IAAI,CACnD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAC5B,kBAAkB,GAClB,mBAAmB,GACnB,WAAW,GACX,YAAY,GACZ,wBAAwB,GACxB,gBAAgB,CACnB,GAAG;IACF;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACnE;;;OAGG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACjD;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,UAAU,CAAC,SAAS,CAAC,KAAK,EAC1B,KAAK,GAAG,gBAAgB,CACzB,GAAG;IACF;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,4DAA4D;AAC5D,MAAM,MAAM,YAAY,CAAC,OAAO,GAAG,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC"}
|