@igne-agency/react-web-ui 0.5.0 → 0.6.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/accordion.css +21 -21
- package/dist/components/accordion/accordion.d.ts +17 -4
- package/dist/components/accordion/accordion.js +83 -36
- package/dist/components/accordion/accordion.module.js +6 -6
- package/dist/components/attachment-tile/attachment-preview.d.ts +56 -13
- package/dist/components/attachment-tile/attachment-preview.js +388 -119
- package/dist/components/attachment-tile/attachment-tile.css +31 -25
- package/dist/components/attachment-tile/attachment-tile.d.ts +32 -10
- package/dist/components/attachment-tile/attachment-tile.js +160 -43
- package/dist/components/attachment-tile/attachment-tile.module.js +8 -8
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/avatar/avatar.css +9 -9
- package/dist/components/avatar/avatar.d.ts +50 -5
- package/dist/components/avatar/avatar.js +178 -64
- package/dist/components/avatar/avatar.module.js +3 -3
- package/dist/components/avatar-group/avatar-group-context.d.ts +2 -4
- package/dist/components/avatar-group/avatar-group-context.js +2 -2
- package/dist/components/avatar-group/avatar-group.css +26 -20
- package/dist/components/avatar-group/avatar-group.d.ts +85 -27
- package/dist/components/avatar-group/avatar-group.js +400 -246
- package/dist/components/avatar-group/avatar-group.module.js +8 -8
- package/dist/components/breadcrumbs/breadcrumbs.css +12 -12
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +69 -23
- package/dist/components/breadcrumbs/breadcrumbs.js +299 -248
- package/dist/components/breadcrumbs/breadcrumbs.module.js +8 -8
- package/dist/components/button/button.css +29 -31
- package/dist/components/button/button.d.ts +20 -16
- package/dist/components/button/button.js +140 -145
- package/dist/components/button/button.module.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/checkbox-field/checkbox-field.js +63 -49
- package/dist/components/checkbox-field/checkbox.css +105 -56
- package/dist/components/checkbox-field/checkbox.d.ts +3 -2
- package/dist/components/checkbox-field/checkbox.js +12 -9
- package/dist/components/checkbox-field/checkbox.module.js +4 -4
- package/dist/components/checkbox-group-field/checkbox-group-field.js +78 -72
- package/dist/components/checkbox-group-field/checkbox-group.css +14 -10
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.module.js +2 -2
- package/dist/components/collapsible/collapsible.css +20 -20
- package/dist/components/collapsible/collapsible.d.ts +17 -4
- package/dist/components/collapsible/collapsible.js +83 -36
- package/dist/components/collapsible/collapsible.module.js +5 -5
- package/dist/components/combobox-field/combobox-field.js +206 -158
- package/dist/components/combobox-field/combobox.css +492 -277
- package/dist/components/combobox-field/combobox.d.ts +148 -39
- package/dist/components/combobox-field/combobox.js +506 -206
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/value-state-view.css +5 -5
- package/dist/components/combobox-field/value-state-view.module.js +4 -4
- package/dist/components/composer/composer-attachments.d.ts +30 -11
- package/dist/components/composer/composer-attachments.js +45 -40
- package/dist/components/composer/composer-editor.css +40 -35
- package/dist/components/composer/composer-editor.d.ts +14 -4
- package/dist/components/composer/composer-editor.js +134 -44
- package/dist/components/composer/composer-editor.module.js +5 -5
- package/dist/components/composer/composer.css +22 -22
- package/dist/components/composer/composer.d.ts +13 -2
- package/dist/components/composer/composer.js +78 -63
- package/dist/components/composer/composer.module.js +5 -5
- package/dist/components/composer/index.d.ts +2 -2
- package/dist/components/composer/mention-text.css +5 -5
- package/dist/components/composer/mention-text.module.js +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.css +29 -29
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +57 -3
- package/dist/components/confirm-dialog/confirm-dialog.js +266 -108
- package/dist/components/confirm-dialog/confirm-dialog.module.js +5 -5
- package/dist/components/conversation/conversation.css +52 -52
- package/dist/components/conversation/conversation.d.ts +43 -18
- package/dist/components/conversation/conversation.js +120 -78
- package/dist/components/conversation/conversation.module.js +15 -15
- package/dist/components/date-field/date-field.d.ts +1 -1
- package/dist/components/date-field/date-field.js +202 -100
- package/dist/components/date-field/date-input.d.ts +73 -37
- package/dist/components/date-field/date-input.js +72 -45
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.js +219 -107
- package/dist/components/date-range-field/date-range-input.d.ts +84 -40
- package/dist/components/date-range-field/date-range-input.js +83 -48
- package/dist/components/dialog/dialog.css +32 -32
- package/dist/components/dialog/dialog.d.ts +8 -7
- package/dist/components/dialog/dialog.js +8 -26
- package/dist/components/dialog/dialog.module.js +6 -6
- package/dist/components/divider/divider.css +6 -6
- package/dist/components/divider/divider.d.ts +36 -2
- package/dist/components/divider/divider.js +195 -29
- package/dist/components/divider/divider.module.js +3 -3
- package/dist/components/drawer/drawer.css +55 -56
- package/dist/components/drawer/drawer.d.ts +8 -7
- package/dist/components/drawer/drawer.js +8 -26
- package/dist/components/drawer/drawer.module.js +6 -6
- package/dist/components/field/field.css +34 -24
- package/dist/components/field/field.d.ts +60 -37
- package/dist/components/field/field.js +242 -157
- package/dist/components/field/field.module.js +12 -10
- package/dist/components/field/input-parts.d.ts +11 -13
- package/dist/components/field/input-parts.js +23 -42
- package/dist/components/field-placeholder/field-placeholder.css +6 -6
- package/dist/components/field-placeholder/field-placeholder.module.js +4 -4
- package/dist/components/fieldset/field-group.d.ts +1 -1
- package/dist/components/fieldset/field-group.js +48 -42
- package/dist/components/fieldset/fieldset-root.d.ts +1 -1
- package/dist/components/fieldset/fieldset-root.js +19 -17
- package/dist/components/fieldset/fieldset.d.ts +2 -2
- package/dist/components/fieldset/fieldset.js +2 -2
- package/dist/components/file-field/file-field.css +126 -60
- package/dist/components/file-field/file-field.js +201 -109
- package/dist/components/file-field/file-field.module.js +4 -4
- package/dist/components/file-field/file-input.d.ts +66 -40
- package/dist/components/file-field/file-input.js +188 -132
- package/dist/components/filter-bar/filter-bar.css +8 -8
- package/dist/components/filter-bar/filter-bar.d.ts +12 -3
- package/dist/components/filter-bar/filter-bar.js +23 -25
- package/dist/components/filter-bar/filter-bar.module.js +5 -5
- package/dist/components/form/form.d.ts +19 -7
- package/dist/components/form/form.js +80 -29
- package/dist/components/icon/icon.css +2 -2
- package/dist/components/icon/icon.module.js +1 -1
- package/dist/components/link/link.css +6 -5
- package/dist/components/link/link.module.js +1 -1
- package/dist/components/menu/menu.css +52 -47
- package/dist/components/menu/menu.d.ts +32 -25
- package/dist/components/menu/menu.js +75 -124
- package/dist/components/menu/menu.module.js +8 -8
- package/dist/components/nav/nav-context.d.ts +1 -1
- package/dist/components/nav/nav-item-view.d.ts +10 -13
- package/dist/components/nav/nav-item-view.js +42 -54
- package/dist/components/nav/nav.css +150 -119
- package/dist/components/nav/nav.d.ts +61 -17
- package/dist/components/nav/nav.js +271 -176
- package/dist/components/nav/nav.module.js +17 -15
- package/dist/components/number-field/number-field.css +153 -64
- package/dist/components/number-field/number-field.d.ts +2 -2
- package/dist/components/number-field/number-field.js +112 -91
- package/dist/components/number-field/number-field.module.js +6 -6
- package/dist/components/number-field/number-input.d.ts +43 -23
- package/dist/components/number-field/number-input.js +179 -125
- package/dist/components/otp-field/otp-field.css +153 -60
- package/dist/components/otp-field/otp-field.d.ts +2 -2
- package/dist/components/otp-field/otp-field.js +62 -46
- package/dist/components/otp-field/otp-field.module.js +4 -4
- package/dist/components/otp-field/otp-input.d.ts +8 -6
- package/dist/components/otp-field/otp-input.js +92 -92
- package/dist/components/pagination/pagination.d.ts +46 -15
- package/dist/components/pagination/pagination.js +217 -224
- package/dist/components/password-field/password-field.css +23 -23
- package/dist/components/password-field/password-field.js +107 -85
- package/dist/components/password-field/password-field.module.js +8 -8
- package/dist/components/password-field/password-strength.d.ts +107 -3
- package/dist/components/password-field/password-strength.js +569 -92
- package/dist/components/photo-field/photo-field.js +137 -112
- package/dist/components/photo-field/photo-input.css +67 -44
- package/dist/components/photo-field/photo-input.d.ts +59 -15
- package/dist/components/photo-field/photo-input.js +173 -86
- package/dist/components/photo-field/photo-input.module.js +10 -8
- package/dist/components/popover/popover.css +41 -41
- package/dist/components/popover/popover.d.ts +66 -25
- package/dist/components/popover/popover.js +332 -217
- package/dist/components/popover/popover.module.js +15 -19
- package/dist/components/radio-group-field/radio-group-field.js +80 -71
- package/dist/components/radio-group-field/radio-group.css +112 -60
- package/dist/components/radio-group-field/radio-group.d.ts +19 -3
- package/dist/components/radio-group-field/radio-group.js +66 -23
- package/dist/components/radio-group-field/radio-group.module.js +4 -4
- package/dist/components/segmented-control-field/segmented-control-field.d.ts +1 -1
- package/dist/components/segmented-control-field/segmented-control-field.js +111 -96
- package/dist/components/segmented-control-field/segmented-control.css +132 -79
- package/dist/components/segmented-control-field/segmented-control.d.ts +39 -15
- package/dist/components/segmented-control-field/segmented-control.js +124 -41
- package/dist/components/segmented-control-field/segmented-control.module.js +4 -4
- package/dist/components/select-field/select.css +214 -101
- package/dist/components/select-field/select.d.ts +43 -11
- package/dist/components/select-field/select.js +194 -109
- package/dist/components/select-field/select.module.js +14 -14
- package/dist/components/skeleton/skeleton.css +4 -4
- package/dist/components/skeleton/skeleton.module.js +3 -3
- package/dist/components/stale/stale.css +15 -15
- package/dist/components/stale/stale.d.ts +27 -3
- package/dist/components/stale/stale.js +147 -66
- package/dist/components/stale/stale.module.js +6 -6
- package/dist/components/status-message/status-message.css +22 -22
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/switch-field/switch-field.js +77 -57
- package/dist/components/switch-field/switch.css +112 -63
- package/dist/components/switch-field/switch.d.ts +20 -3
- package/dist/components/switch-field/switch.js +70 -27
- package/dist/components/switch-field/switch.module.js +4 -4
- package/dist/components/tabs/tabs.css +32 -32
- package/dist/components/tabs/tabs.d.ts +21 -7
- package/dist/components/tabs/tabs.js +73 -14
- package/dist/components/tabs/tabs.module.js +7 -7
- package/dist/components/tag/tag.css +84 -84
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +94 -94
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.css +159 -82
- package/dist/components/text-field/text-field.d.ts +1 -1
- package/dist/components/text-field/text-field.js +139 -110
- package/dist/components/text-field/text-field.module.js +9 -9
- package/dist/components/text-field/text-input.d.ts +81 -45
- package/dist/components/text-field/text-input.js +366 -217
- package/dist/components/textarea-field/textarea-field.css +7 -2
- package/dist/components/textarea-field/textarea-field.js +72 -56
- package/dist/components/textarea-field/textarea-field.module.js +2 -2
- package/dist/components/time-field/time-field.js +153 -60
- package/dist/components/time-field/time-input.d.ts +21 -10
- package/dist/components/time-field/time-input.js +22 -11
- package/dist/components/toast/toast-provider.css +34 -31
- package/dist/components/toast/toast-provider.d.ts +63 -14
- package/dist/components/toast/toast-provider.js +174 -111
- package/dist/components/toast/toast-provider.module.js +7 -7
- package/dist/components/toggle-group-field/toggle-group-field.d.ts +1 -1
- package/dist/components/toggle-group-field/toggle-group-field.js +95 -89
- package/dist/components/toggle-group-field/toggle-group.css +117 -67
- package/dist/components/toggle-group-field/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group-field/toggle-group.js +2 -2
- package/dist/components/toggle-group-field/toggle-group.module.js +2 -2
- package/dist/components/tooltip/tooltip.css +4 -4
- package/dist/components/tooltip/tooltip.module.js +1 -1
- package/dist/data-table/data-table-content.js +6 -5
- package/dist/data-table/data-table-parts.d.ts +41 -13
- package/dist/data-table/data-table-parts.js +213 -172
- package/dist/data-table/data-table-selection.d.ts +105 -3
- package/dist/data-table/data-table-selection.js +654 -145
- package/dist/data-table/data-table.css +125 -128
- package/dist/data-table/data-table.d.ts +21 -26
- package/dist/data-table/data-table.js +20 -23
- package/dist/data-table/data-table.module.js +32 -34
- package/dist/data-table/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/lib/calendar/calendar-navigation.d.ts +39 -5
- package/dist/lib/calendar/calendar-navigation.js +185 -118
- package/dist/lib/calendar/calendar-parts.d.ts +143 -0
- package/dist/lib/calendar/calendar-parts.js +540 -0
- package/dist/lib/calendar/calendar-prefab.d.ts +52 -0
- package/dist/lib/calendar/calendar-prefab.js +311 -0
- package/dist/lib/calendar/calendar-year.d.ts +3 -1
- package/dist/lib/calendar/calendar-year.js +139 -131
- package/dist/lib/calendar/temporal.css +325 -232
- package/dist/lib/calendar/temporal.d.ts +67 -82
- package/dist/lib/calendar/temporal.js +258 -569
- package/dist/lib/calendar/temporal.module.js +38 -38
- package/dist/lib/forms/use-connected-field.d.ts +1 -1
- package/dist/lib/forms/use-connected-field.js +1 -1
- package/dist/lib/render-as.d.ts +13 -0
- package/dist/lib/render-as.js +46 -0
- package/dist/tokens.css +6 -3
- package/package.json +1 -1
- package/tokens/dark.tokens.json +6 -0
- package/tokens/sys.tokens.json +7 -0
- package/dist/components/button/close-button.d.ts +0 -16
- package/dist/components/button/close-button.js +0 -30
|
@@ -1,24 +1,45 @@
|
|
|
1
|
-
import { Button as Button$1 } from "../../components/button/button.js";
|
|
2
1
|
import { Field } from "../../components/field/field.js";
|
|
3
2
|
import { fieldStateAttributes } from "../../components/field/field-state.js";
|
|
4
3
|
import { useFieldFocus, withFieldFocus } from "../../components/field/use-field-focus.js";
|
|
5
4
|
import { focusControlOnRim } from "../../components/field/rim-focus.js";
|
|
6
|
-
import { useTimeZone } from "../../components/time-zone-provider/time-zone-provider.js";
|
|
7
|
-
import { normalizeFieldErrors } from "../forms/errors.js";
|
|
8
|
-
import { CalendarNavigation } from "./calendar-navigation.js";
|
|
9
|
-
import { todayIn } from "./temporal-value.js";
|
|
10
5
|
import temporal_module_default from "./temporal.module.js";
|
|
11
6
|
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
12
8
|
import { clsx } from "clsx";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { Button, Calendar, CalendarCell, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell, DateInput, DatePickerStateContext, DateRangePickerStateContext, DateSegment, Dialog, Group, Popover, RangeCalendar } from "react-aria-components";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import { Button, DateInput, DateSegment, Dialog, Group, Popover } from "react-aria-components";
|
|
16
11
|
// src/lib/calendar/temporal.tsx
|
|
17
12
|
/**
|
|
13
|
+
* The visible label of a date or time control: a `span` its `Root` names
|
|
14
|
+
* itself by through `aria-labelledby`. Renders nothing without children.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <DateInput.Label id={labelId}>Service date <Field.Requiredness optionalLabel="optional" /></DateInput.Label>
|
|
18
|
+
*/
|
|
19
|
+
var TemporalLabel = (props) => {
|
|
20
|
+
const $ = c(3);
|
|
21
|
+
let t0;
|
|
22
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
23
|
+
t0 = /* @__PURE__ */ jsx("span", {});
|
|
24
|
+
$[0] = t0;
|
|
25
|
+
} else t0 = $[0];
|
|
26
|
+
let t1;
|
|
27
|
+
if ($[1] !== props) {
|
|
28
|
+
t1 = /* @__PURE__ */ jsx(Field.Label, {
|
|
29
|
+
nativeLabel: false,
|
|
30
|
+
render: t0,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
$[1] = props;
|
|
34
|
+
$[2] = t1;
|
|
35
|
+
} else t1 = $[2];
|
|
36
|
+
return t1;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
18
39
|
* The shell carrying the border, the ring and the inlay row.
|
|
19
40
|
*
|
|
20
41
|
* @example
|
|
21
|
-
* <
|
|
42
|
+
* <DateInput.Group state={state}><DateInput.Input>…</DateInput.Input></DateInput.Group>
|
|
22
43
|
*/
|
|
23
44
|
var TemporalGroup = (t0) => {
|
|
24
45
|
const $ = c(19);
|
|
@@ -82,10 +103,10 @@ var TemporalGroup = (t0) => {
|
|
|
82
103
|
return t4;
|
|
83
104
|
};
|
|
84
105
|
/**
|
|
85
|
-
* One editable unit of a date or time.
|
|
106
|
+
* One editable unit of a date or time, which an `Input` renders per segment.
|
|
86
107
|
*
|
|
87
108
|
* @example
|
|
88
|
-
* {segment => <
|
|
109
|
+
* <DateInput.Input>{segment => <DateInput.Segment segment={segment} />}</DateInput.Input>
|
|
89
110
|
*/
|
|
90
111
|
var TemporalSegment = (t0) => {
|
|
91
112
|
const $ = c(8);
|
|
@@ -119,10 +140,11 @@ var TemporalSegment = (t0) => {
|
|
|
119
140
|
return t2;
|
|
120
141
|
};
|
|
121
142
|
/**
|
|
122
|
-
* The segments of one date or time, bare inside a `
|
|
143
|
+
* The segments of one date or time, bare inside a `Group`. Its children render
|
|
144
|
+
* each segment.
|
|
123
145
|
*
|
|
124
146
|
* @example
|
|
125
|
-
* <
|
|
147
|
+
* <DateInput.Input>{segment => <DateInput.Segment segment={segment} />}</DateInput.Input>
|
|
126
148
|
*/
|
|
127
149
|
var TemporalInput = (t0) => {
|
|
128
150
|
const $ = c(8);
|
|
@@ -147,8 +169,7 @@ var TemporalInput = (t0) => {
|
|
|
147
169
|
if ($[5] !== props || $[6] !== t1) {
|
|
148
170
|
t2 = /* @__PURE__ */ jsx(DateInput, {
|
|
149
171
|
className: t1,
|
|
150
|
-
...props
|
|
151
|
-
children: _temp
|
|
172
|
+
...props
|
|
152
173
|
});
|
|
153
174
|
$[5] = props;
|
|
154
175
|
$[6] = t1;
|
|
@@ -160,7 +181,7 @@ var TemporalInput = (t0) => {
|
|
|
160
181
|
* The segments of one end of a date range, sized to its content.
|
|
161
182
|
*
|
|
162
183
|
* @example
|
|
163
|
-
* <
|
|
184
|
+
* <DateRangeInput.Input slot="start">{segment => <DateRangeInput.Segment segment={segment} />}</DateRangeInput.Input>
|
|
164
185
|
*/
|
|
165
186
|
var TemporalRangeInput = (t0) => {
|
|
166
187
|
const $ = c(8);
|
|
@@ -185,8 +206,7 @@ var TemporalRangeInput = (t0) => {
|
|
|
185
206
|
if ($[5] !== props || $[6] !== t1) {
|
|
186
207
|
t2 = /* @__PURE__ */ jsx(DateInput, {
|
|
187
208
|
className: t1,
|
|
188
|
-
...props
|
|
189
|
-
children: _temp2
|
|
209
|
+
...props
|
|
190
210
|
});
|
|
191
211
|
$[5] = props;
|
|
192
212
|
$[6] = t1;
|
|
@@ -195,112 +215,222 @@ var TemporalRangeInput = (t0) => {
|
|
|
195
215
|
return t2;
|
|
196
216
|
};
|
|
197
217
|
/**
|
|
198
|
-
* The
|
|
218
|
+
* The mark between a range's start and end, such as a dash. Decoration only.
|
|
199
219
|
*
|
|
200
220
|
* @example
|
|
201
|
-
* <
|
|
221
|
+
* <DateRangeInput.Separator>–</DateRangeInput.Separator>
|
|
202
222
|
*/
|
|
203
|
-
var TemporalRangeSeparator = () => {
|
|
204
|
-
const $ = c(
|
|
205
|
-
let
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
});
|
|
223
|
+
var TemporalRangeSeparator = (t0) => {
|
|
224
|
+
const $ = c(14);
|
|
225
|
+
let className;
|
|
226
|
+
let props;
|
|
227
|
+
let ref;
|
|
228
|
+
let render;
|
|
229
|
+
if ($[0] !== t0) {
|
|
230
|
+
({render, className, ref, ...props} = t0);
|
|
212
231
|
$[0] = t0;
|
|
213
|
-
|
|
214
|
-
|
|
232
|
+
$[1] = className;
|
|
233
|
+
$[2] = props;
|
|
234
|
+
$[3] = ref;
|
|
235
|
+
$[4] = render;
|
|
236
|
+
} else {
|
|
237
|
+
className = $[1];
|
|
238
|
+
props = $[2];
|
|
239
|
+
ref = $[3];
|
|
240
|
+
render = $[4];
|
|
241
|
+
}
|
|
242
|
+
let t1;
|
|
243
|
+
if ($[5] !== className) {
|
|
244
|
+
t1 = clsx(temporal_module_default.rangeSeparator, className);
|
|
245
|
+
$[5] = className;
|
|
246
|
+
$[6] = t1;
|
|
247
|
+
} else t1 = $[6];
|
|
248
|
+
let t2;
|
|
249
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
250
|
+
t2 = {
|
|
251
|
+
"aria-hidden": true,
|
|
252
|
+
...props,
|
|
253
|
+
className: t1
|
|
254
|
+
};
|
|
255
|
+
$[7] = props;
|
|
256
|
+
$[8] = t1;
|
|
257
|
+
$[9] = t2;
|
|
258
|
+
} else t2 = $[9];
|
|
259
|
+
let t3;
|
|
260
|
+
if ($[10] !== ref || $[11] !== render || $[12] !== t2) {
|
|
261
|
+
t3 = {
|
|
262
|
+
defaultTagName: "span",
|
|
263
|
+
render,
|
|
264
|
+
ref,
|
|
265
|
+
props: t2
|
|
266
|
+
};
|
|
267
|
+
$[10] = ref;
|
|
268
|
+
$[11] = render;
|
|
269
|
+
$[12] = t2;
|
|
270
|
+
$[13] = t3;
|
|
271
|
+
} else t3 = $[13];
|
|
272
|
+
return useRender(t3);
|
|
215
273
|
};
|
|
216
274
|
/**
|
|
217
275
|
* The space that pushes a range's inlays to the end of its group.
|
|
218
276
|
*
|
|
219
277
|
* @example
|
|
220
|
-
* <
|
|
278
|
+
* <DateRangeInput.Spacer />
|
|
221
279
|
*/
|
|
222
|
-
var TemporalRangeSpacer = () => {
|
|
223
|
-
const $ = c(
|
|
224
|
-
let
|
|
225
|
-
|
|
226
|
-
|
|
280
|
+
var TemporalRangeSpacer = (t0) => {
|
|
281
|
+
const $ = c(14);
|
|
282
|
+
let className;
|
|
283
|
+
let props;
|
|
284
|
+
let ref;
|
|
285
|
+
let render;
|
|
286
|
+
if ($[0] !== t0) {
|
|
287
|
+
({render, className, ref, ...props} = t0);
|
|
227
288
|
$[0] = t0;
|
|
228
|
-
|
|
229
|
-
|
|
289
|
+
$[1] = className;
|
|
290
|
+
$[2] = props;
|
|
291
|
+
$[3] = ref;
|
|
292
|
+
$[4] = render;
|
|
293
|
+
} else {
|
|
294
|
+
className = $[1];
|
|
295
|
+
props = $[2];
|
|
296
|
+
ref = $[3];
|
|
297
|
+
render = $[4];
|
|
298
|
+
}
|
|
299
|
+
let t1;
|
|
300
|
+
if ($[5] !== className) {
|
|
301
|
+
t1 = clsx(temporal_module_default.rangeSpacer, className);
|
|
302
|
+
$[5] = className;
|
|
303
|
+
$[6] = t1;
|
|
304
|
+
} else t1 = $[6];
|
|
305
|
+
let t2;
|
|
306
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
307
|
+
t2 = {
|
|
308
|
+
...props,
|
|
309
|
+
className: t1
|
|
310
|
+
};
|
|
311
|
+
$[7] = props;
|
|
312
|
+
$[8] = t1;
|
|
313
|
+
$[9] = t2;
|
|
314
|
+
} else t2 = $[9];
|
|
315
|
+
let t3;
|
|
316
|
+
if ($[10] !== ref || $[11] !== render || $[12] !== t2) {
|
|
317
|
+
t3 = {
|
|
318
|
+
defaultTagName: "span",
|
|
319
|
+
render,
|
|
320
|
+
ref,
|
|
321
|
+
props: t2
|
|
322
|
+
};
|
|
323
|
+
$[10] = ref;
|
|
324
|
+
$[11] = render;
|
|
325
|
+
$[12] = t2;
|
|
326
|
+
$[13] = t3;
|
|
327
|
+
} else t3 = $[13];
|
|
328
|
+
return useRender(t3);
|
|
230
329
|
};
|
|
231
330
|
/**
|
|
232
|
-
* The
|
|
331
|
+
* The button that opens the calendar. It renders whichever button it is given.
|
|
233
332
|
*
|
|
234
333
|
* @example
|
|
235
|
-
* <
|
|
334
|
+
* <DateInput.Trigger
|
|
335
|
+
* ref={triggerRef}
|
|
336
|
+
* render={
|
|
337
|
+
* <IconButton label="Open calendar" variant="tertiary" size="sm">
|
|
338
|
+
* <CalendarTodayIcon />
|
|
339
|
+
* </IconButton>
|
|
340
|
+
* }
|
|
341
|
+
* />
|
|
236
342
|
*/
|
|
237
343
|
var TemporalTrigger = (t0) => {
|
|
238
|
-
const $ = c(
|
|
239
|
-
|
|
344
|
+
const $ = c(15);
|
|
345
|
+
let className;
|
|
346
|
+
let props;
|
|
347
|
+
let ref;
|
|
348
|
+
let render;
|
|
349
|
+
if ($[0] !== t0) {
|
|
350
|
+
({render, className, ref, ...props} = t0);
|
|
351
|
+
$[0] = t0;
|
|
352
|
+
$[1] = className;
|
|
353
|
+
$[2] = props;
|
|
354
|
+
$[3] = ref;
|
|
355
|
+
$[4] = render;
|
|
356
|
+
} else {
|
|
357
|
+
className = $[1];
|
|
358
|
+
props = $[2];
|
|
359
|
+
ref = $[3];
|
|
360
|
+
render = $[4];
|
|
361
|
+
}
|
|
240
362
|
let t1;
|
|
241
|
-
if ($[
|
|
242
|
-
t1 =
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
} else t1 = $[
|
|
363
|
+
if ($[5] !== className) {
|
|
364
|
+
t1 = clsx(temporal_module_default.trigger, className);
|
|
365
|
+
$[5] = className;
|
|
366
|
+
$[6] = t1;
|
|
367
|
+
} else t1 = $[6];
|
|
246
368
|
let t2;
|
|
247
|
-
if ($[
|
|
248
|
-
t2 = /* @__PURE__ */ jsx(Button
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
} else
|
|
262
|
-
|
|
369
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
370
|
+
t2 = /* @__PURE__ */ jsx(Button, {});
|
|
371
|
+
$[7] = t2;
|
|
372
|
+
} else t2 = $[7];
|
|
373
|
+
let t3;
|
|
374
|
+
if ($[8] !== props || $[9] !== t1) {
|
|
375
|
+
t3 = {
|
|
376
|
+
...props,
|
|
377
|
+
className: t1,
|
|
378
|
+
render: t2
|
|
379
|
+
};
|
|
380
|
+
$[8] = props;
|
|
381
|
+
$[9] = t1;
|
|
382
|
+
$[10] = t3;
|
|
383
|
+
} else t3 = $[10];
|
|
384
|
+
let t4;
|
|
385
|
+
if ($[11] !== ref || $[12] !== render || $[13] !== t3) {
|
|
386
|
+
t4 = {
|
|
387
|
+
render,
|
|
388
|
+
ref,
|
|
389
|
+
props: t3
|
|
390
|
+
};
|
|
391
|
+
$[11] = ref;
|
|
392
|
+
$[12] = render;
|
|
393
|
+
$[13] = t3;
|
|
394
|
+
$[14] = t4;
|
|
395
|
+
} else t4 = $[14];
|
|
396
|
+
return useRender(t4);
|
|
263
397
|
};
|
|
264
398
|
/**
|
|
265
399
|
* The floating surface the calendar lands on, aligned to whatever `triggerRef`
|
|
266
400
|
* names: the calendar button, rather than the whole field.
|
|
267
401
|
*
|
|
268
402
|
* @example
|
|
269
|
-
* <
|
|
403
|
+
* <DateInput.Popover triggerRef={triggerRef}><DateInput.Dialog>…</DateInput.Dialog></DateInput.Popover>
|
|
270
404
|
*/
|
|
271
|
-
var
|
|
405
|
+
var TemporalPopover = (t0) => {
|
|
272
406
|
const $ = c(10);
|
|
273
|
-
let
|
|
407
|
+
let className;
|
|
274
408
|
let props;
|
|
275
409
|
let t1;
|
|
276
410
|
if ($[0] !== t0) {
|
|
277
|
-
({
|
|
411
|
+
({className, placement: t1, ...props} = t0);
|
|
278
412
|
$[0] = t0;
|
|
279
|
-
$[1] =
|
|
413
|
+
$[1] = className;
|
|
280
414
|
$[2] = props;
|
|
281
415
|
$[3] = t1;
|
|
282
416
|
} else {
|
|
283
|
-
|
|
417
|
+
className = $[1];
|
|
284
418
|
props = $[2];
|
|
285
419
|
t1 = $[3];
|
|
286
420
|
}
|
|
287
421
|
const placement = t1 === void 0 ? "bottom end" : t1;
|
|
288
422
|
let t2;
|
|
289
|
-
if ($[4] !==
|
|
290
|
-
t2 =
|
|
291
|
-
|
|
292
|
-
children
|
|
293
|
-
});
|
|
294
|
-
$[4] = children;
|
|
423
|
+
if ($[4] !== className) {
|
|
424
|
+
t2 = clsx(temporal_module_default.popover, className);
|
|
425
|
+
$[4] = className;
|
|
295
426
|
$[5] = t2;
|
|
296
427
|
} else t2 = $[5];
|
|
297
428
|
let t3;
|
|
298
429
|
if ($[6] !== placement || $[7] !== props || $[8] !== t2) {
|
|
299
430
|
t3 = /* @__PURE__ */ jsx(Popover, {
|
|
300
|
-
className:
|
|
431
|
+
className: t2,
|
|
301
432
|
placement,
|
|
302
|
-
...props
|
|
303
|
-
children: t2
|
|
433
|
+
...props
|
|
304
434
|
});
|
|
305
435
|
$[6] = placement;
|
|
306
436
|
$[7] = props;
|
|
@@ -309,519 +439,78 @@ var TemporalPopup = (t0) => {
|
|
|
309
439
|
} else t3 = $[9];
|
|
310
440
|
return t3;
|
|
311
441
|
};
|
|
312
|
-
var CalendarChrome = (t0) => {
|
|
313
|
-
const $ = c(21);
|
|
314
|
-
const { previousMonthLabel, nextMonthLabel, monthLabel, yearLabel, noMatchingYearLabel, previousIcon, nextIcon, checkIcon, expandIcon, children } = t0;
|
|
315
|
-
let t1;
|
|
316
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
317
|
-
t1 = /* @__PURE__ */ jsx(Button, { slot: "previous" });
|
|
318
|
-
$[0] = t1;
|
|
319
|
-
} else t1 = $[0];
|
|
320
|
-
let t2;
|
|
321
|
-
if ($[1] !== previousIcon || $[2] !== previousMonthLabel) {
|
|
322
|
-
t2 = /* @__PURE__ */ jsx(Button$1, {
|
|
323
|
-
iconOnly: true,
|
|
324
|
-
icon: previousIcon,
|
|
325
|
-
label: previousMonthLabel,
|
|
326
|
-
variant: "tertiary",
|
|
327
|
-
size: "md",
|
|
328
|
-
render: t1
|
|
329
|
-
});
|
|
330
|
-
$[1] = previousIcon;
|
|
331
|
-
$[2] = previousMonthLabel;
|
|
332
|
-
$[3] = t2;
|
|
333
|
-
} else t2 = $[3];
|
|
334
|
-
let t3;
|
|
335
|
-
if ($[4] !== checkIcon || $[5] !== expandIcon || $[6] !== monthLabel || $[7] !== noMatchingYearLabel || $[8] !== yearLabel) {
|
|
336
|
-
t3 = /* @__PURE__ */ jsx(CalendarNavigation, {
|
|
337
|
-
monthLabel,
|
|
338
|
-
yearLabel,
|
|
339
|
-
noMatchingYearLabel,
|
|
340
|
-
checkIcon,
|
|
341
|
-
expandIcon
|
|
342
|
-
});
|
|
343
|
-
$[4] = checkIcon;
|
|
344
|
-
$[5] = expandIcon;
|
|
345
|
-
$[6] = monthLabel;
|
|
346
|
-
$[7] = noMatchingYearLabel;
|
|
347
|
-
$[8] = yearLabel;
|
|
348
|
-
$[9] = t3;
|
|
349
|
-
} else t3 = $[9];
|
|
350
|
-
let t4;
|
|
351
|
-
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
352
|
-
t4 = /* @__PURE__ */ jsx(Button, { slot: "next" });
|
|
353
|
-
$[10] = t4;
|
|
354
|
-
} else t4 = $[10];
|
|
355
|
-
let t5;
|
|
356
|
-
if ($[11] !== nextIcon || $[12] !== nextMonthLabel) {
|
|
357
|
-
t5 = /* @__PURE__ */ jsx(Button$1, {
|
|
358
|
-
iconOnly: true,
|
|
359
|
-
icon: nextIcon,
|
|
360
|
-
label: nextMonthLabel,
|
|
361
|
-
variant: "tertiary",
|
|
362
|
-
size: "md",
|
|
363
|
-
render: t4
|
|
364
|
-
});
|
|
365
|
-
$[11] = nextIcon;
|
|
366
|
-
$[12] = nextMonthLabel;
|
|
367
|
-
$[13] = t5;
|
|
368
|
-
} else t5 = $[13];
|
|
369
|
-
let t6;
|
|
370
|
-
if ($[14] !== t2 || $[15] !== t3 || $[16] !== t5) {
|
|
371
|
-
t6 = /* @__PURE__ */ jsxs("header", {
|
|
372
|
-
className: temporal_module_default.header,
|
|
373
|
-
children: [
|
|
374
|
-
t2,
|
|
375
|
-
t3,
|
|
376
|
-
t5
|
|
377
|
-
]
|
|
378
|
-
});
|
|
379
|
-
$[14] = t2;
|
|
380
|
-
$[15] = t3;
|
|
381
|
-
$[16] = t5;
|
|
382
|
-
$[17] = t6;
|
|
383
|
-
} else t6 = $[17];
|
|
384
|
-
let t7;
|
|
385
|
-
if ($[18] !== children || $[19] !== t6) {
|
|
386
|
-
t7 = /* @__PURE__ */ jsxs(Fragment, { children: [t6, children] });
|
|
387
|
-
$[18] = children;
|
|
388
|
-
$[19] = t6;
|
|
389
|
-
$[20] = t7;
|
|
390
|
-
} else t7 = $[20];
|
|
391
|
-
return t7;
|
|
392
|
-
};
|
|
393
|
-
var MonthGrid = (t0) => {
|
|
394
|
-
const $ = c(8);
|
|
395
|
-
const { today, monthOffset: t1 } = t0;
|
|
396
|
-
const monthOffset = t1 === void 0 ? 0 : t1;
|
|
397
|
-
let t2;
|
|
398
|
-
if ($[0] !== monthOffset) {
|
|
399
|
-
t2 = { months: monthOffset };
|
|
400
|
-
$[0] = monthOffset;
|
|
401
|
-
$[1] = t2;
|
|
402
|
-
} else t2 = $[1];
|
|
403
|
-
let t3;
|
|
404
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
405
|
-
t3 = /* @__PURE__ */ jsx(CalendarGridHeader, { children: _temp3 });
|
|
406
|
-
$[2] = t3;
|
|
407
|
-
} else t3 = $[2];
|
|
408
|
-
let t4;
|
|
409
|
-
if ($[3] !== today) {
|
|
410
|
-
t4 = /* @__PURE__ */ jsx(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx(CalendarCell, {
|
|
411
|
-
date,
|
|
412
|
-
className: () => clsx(temporal_module_default.day, date.compare(today) === 0 && temporal_module_default.today)
|
|
413
|
-
}) });
|
|
414
|
-
$[3] = today;
|
|
415
|
-
$[4] = t4;
|
|
416
|
-
} else t4 = $[4];
|
|
417
|
-
let t5;
|
|
418
|
-
if ($[5] !== t2 || $[6] !== t4) {
|
|
419
|
-
t5 = /* @__PURE__ */ jsxs(CalendarGrid, {
|
|
420
|
-
offset: t2,
|
|
421
|
-
className: temporal_module_default.grid,
|
|
422
|
-
children: [t3, t4]
|
|
423
|
-
});
|
|
424
|
-
$[5] = t2;
|
|
425
|
-
$[6] = t4;
|
|
426
|
-
$[7] = t5;
|
|
427
|
-
} else t5 = $[7];
|
|
428
|
-
return t5;
|
|
429
|
-
};
|
|
430
442
|
/**
|
|
431
|
-
*
|
|
432
|
-
* value, are read in the `TimeZoneProvider`'s zone.
|
|
443
|
+
* The dialog inside the popover, which holds the calendar and its focus.
|
|
433
444
|
*
|
|
434
445
|
* @example
|
|
435
|
-
* <
|
|
446
|
+
* <DateInput.Dialog><DateInput.Calendar>…</DateInput.Calendar></DateInput.Dialog>
|
|
436
447
|
*/
|
|
437
|
-
var
|
|
438
|
-
const $ = c(
|
|
439
|
-
let checkIcon;
|
|
448
|
+
var TemporalDialog = (t0) => {
|
|
449
|
+
const $ = c(8);
|
|
440
450
|
let className;
|
|
441
|
-
let expandIcon;
|
|
442
|
-
let monthLabel;
|
|
443
|
-
let nextIcon;
|
|
444
|
-
let nextMonthLabel;
|
|
445
|
-
let noMatchingYearLabel;
|
|
446
|
-
let previousIcon;
|
|
447
|
-
let previousMonthLabel;
|
|
448
451
|
let props;
|
|
449
|
-
let yearLabel;
|
|
450
452
|
if ($[0] !== t0) {
|
|
451
|
-
({className,
|
|
453
|
+
({className, ...props} = t0);
|
|
452
454
|
$[0] = t0;
|
|
453
|
-
$[1] =
|
|
454
|
-
$[2] =
|
|
455
|
-
$[3] = expandIcon;
|
|
456
|
-
$[4] = monthLabel;
|
|
457
|
-
$[5] = nextIcon;
|
|
458
|
-
$[6] = nextMonthLabel;
|
|
459
|
-
$[7] = noMatchingYearLabel;
|
|
460
|
-
$[8] = previousIcon;
|
|
461
|
-
$[9] = previousMonthLabel;
|
|
462
|
-
$[10] = props;
|
|
463
|
-
$[11] = yearLabel;
|
|
455
|
+
$[1] = className;
|
|
456
|
+
$[2] = props;
|
|
464
457
|
} else {
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
expandIcon = $[3];
|
|
468
|
-
monthLabel = $[4];
|
|
469
|
-
nextIcon = $[5];
|
|
470
|
-
nextMonthLabel = $[6];
|
|
471
|
-
noMatchingYearLabel = $[7];
|
|
472
|
-
previousIcon = $[8];
|
|
473
|
-
previousMonthLabel = $[9];
|
|
474
|
-
props = $[10];
|
|
475
|
-
yearLabel = $[11];
|
|
458
|
+
className = $[1];
|
|
459
|
+
props = $[2];
|
|
476
460
|
}
|
|
477
|
-
|
|
461
|
+
let t1;
|
|
462
|
+
if ($[3] !== className) {
|
|
463
|
+
t1 = clsx(temporal_module_default.dialog, className);
|
|
464
|
+
$[3] = className;
|
|
465
|
+
$[4] = t1;
|
|
466
|
+
} else t1 = $[4];
|
|
478
467
|
let t2;
|
|
479
|
-
if ($[
|
|
480
|
-
t2 =
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
} else t2 = $[13];
|
|
484
|
-
const today = t2;
|
|
485
|
-
const picked = useContext(DatePickerStateContext)?.value ?? null;
|
|
486
|
-
let t3;
|
|
487
|
-
if ($[14] !== className) {
|
|
488
|
-
t3 = clsx(temporal_module_default.calendar, className);
|
|
489
|
-
$[14] = className;
|
|
490
|
-
$[15] = t3;
|
|
491
|
-
} else t3 = $[15];
|
|
492
|
-
const t4 = picked === null ? today : void 0;
|
|
493
|
-
let t5;
|
|
494
|
-
if ($[16] !== today) {
|
|
495
|
-
t5 = /* @__PURE__ */ jsx(MonthGrid, { today });
|
|
496
|
-
$[16] = today;
|
|
497
|
-
$[17] = t5;
|
|
498
|
-
} else t5 = $[17];
|
|
499
|
-
let t6;
|
|
500
|
-
if ($[18] !== checkIcon || $[19] !== expandIcon || $[20] !== monthLabel || $[21] !== nextIcon || $[22] !== nextMonthLabel || $[23] !== noMatchingYearLabel || $[24] !== previousIcon || $[25] !== previousMonthLabel || $[26] !== t5 || $[27] !== yearLabel) {
|
|
501
|
-
t6 = /* @__PURE__ */ jsx(CalendarChrome, {
|
|
502
|
-
previousMonthLabel,
|
|
503
|
-
nextMonthLabel,
|
|
504
|
-
monthLabel,
|
|
505
|
-
yearLabel,
|
|
506
|
-
noMatchingYearLabel,
|
|
507
|
-
previousIcon,
|
|
508
|
-
nextIcon,
|
|
509
|
-
checkIcon,
|
|
510
|
-
expandIcon,
|
|
511
|
-
children: t5
|
|
512
|
-
});
|
|
513
|
-
$[18] = checkIcon;
|
|
514
|
-
$[19] = expandIcon;
|
|
515
|
-
$[20] = monthLabel;
|
|
516
|
-
$[21] = nextIcon;
|
|
517
|
-
$[22] = nextMonthLabel;
|
|
518
|
-
$[23] = noMatchingYearLabel;
|
|
519
|
-
$[24] = previousIcon;
|
|
520
|
-
$[25] = previousMonthLabel;
|
|
521
|
-
$[26] = t5;
|
|
522
|
-
$[27] = yearLabel;
|
|
523
|
-
$[28] = t6;
|
|
524
|
-
} else t6 = $[28];
|
|
525
|
-
let t7;
|
|
526
|
-
if ($[29] !== props || $[30] !== t3 || $[31] !== t4 || $[32] !== t6) {
|
|
527
|
-
t7 = /* @__PURE__ */ jsx(Calendar, {
|
|
528
|
-
className: t3,
|
|
529
|
-
defaultFocusedValue: t4,
|
|
530
|
-
...props,
|
|
531
|
-
children: t6
|
|
468
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
469
|
+
t2 = /* @__PURE__ */ jsx(Dialog, {
|
|
470
|
+
className: t1,
|
|
471
|
+
...props
|
|
532
472
|
});
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
} else t7 = $[33];
|
|
539
|
-
return t7;
|
|
473
|
+
$[5] = props;
|
|
474
|
+
$[6] = t1;
|
|
475
|
+
$[7] = t2;
|
|
476
|
+
} else t2 = $[7];
|
|
477
|
+
return t2;
|
|
540
478
|
};
|
|
541
479
|
/**
|
|
542
|
-
*
|
|
543
|
-
* and the month it opens on without a value, are read in the
|
|
544
|
-
* `TimeZoneProvider`'s zone.
|
|
480
|
+
* The `Popover` with its `Dialog`, in one part.
|
|
545
481
|
*
|
|
546
482
|
* @example
|
|
547
|
-
* <
|
|
483
|
+
* <DateInput.Popup triggerRef={triggerRef}><DateInput.Calendar>…</DateInput.Calendar></DateInput.Popup>
|
|
548
484
|
*/
|
|
549
|
-
var
|
|
550
|
-
const $ = c(
|
|
551
|
-
let
|
|
552
|
-
let className;
|
|
553
|
-
let expandIcon;
|
|
554
|
-
let monthLabel;
|
|
555
|
-
let nextIcon;
|
|
556
|
-
let nextMonthLabel;
|
|
557
|
-
let noMatchingYearLabel;
|
|
558
|
-
let previousIcon;
|
|
559
|
-
let previousMonthLabel;
|
|
485
|
+
var TemporalPopup = (t0) => {
|
|
486
|
+
const $ = c(8);
|
|
487
|
+
let children;
|
|
560
488
|
let props;
|
|
561
|
-
let t1;
|
|
562
|
-
let yearLabel;
|
|
563
489
|
if ($[0] !== t0) {
|
|
564
|
-
({
|
|
490
|
+
({children, ...props} = t0);
|
|
565
491
|
$[0] = t0;
|
|
566
|
-
$[1] =
|
|
567
|
-
$[2] =
|
|
568
|
-
$[3] = expandIcon;
|
|
569
|
-
$[4] = monthLabel;
|
|
570
|
-
$[5] = nextIcon;
|
|
571
|
-
$[6] = nextMonthLabel;
|
|
572
|
-
$[7] = noMatchingYearLabel;
|
|
573
|
-
$[8] = previousIcon;
|
|
574
|
-
$[9] = previousMonthLabel;
|
|
575
|
-
$[10] = props;
|
|
576
|
-
$[11] = t1;
|
|
577
|
-
$[12] = yearLabel;
|
|
492
|
+
$[1] = children;
|
|
493
|
+
$[2] = props;
|
|
578
494
|
} else {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
expandIcon = $[3];
|
|
582
|
-
monthLabel = $[4];
|
|
583
|
-
nextIcon = $[5];
|
|
584
|
-
nextMonthLabel = $[6];
|
|
585
|
-
noMatchingYearLabel = $[7];
|
|
586
|
-
previousIcon = $[8];
|
|
587
|
-
previousMonthLabel = $[9];
|
|
588
|
-
props = $[10];
|
|
589
|
-
t1 = $[11];
|
|
590
|
-
yearLabel = $[12];
|
|
495
|
+
children = $[1];
|
|
496
|
+
props = $[2];
|
|
591
497
|
}
|
|
592
|
-
const visibleMonths = t1 === void 0 ? 1 : t1;
|
|
593
|
-
const t2 = useTimeZone();
|
|
594
|
-
let t3;
|
|
595
|
-
if ($[13] !== t2) {
|
|
596
|
-
t3 = todayIn(t2);
|
|
597
|
-
$[13] = t2;
|
|
598
|
-
$[14] = t3;
|
|
599
|
-
} else t3 = $[14];
|
|
600
|
-
const today = t3;
|
|
601
|
-
const picked = useContext(DateRangePickerStateContext)?.value.start ?? null;
|
|
602
|
-
const months = Math.max(1, visibleMonths);
|
|
603
|
-
let t4;
|
|
604
|
-
if ($[15] !== className) {
|
|
605
|
-
t4 = clsx(temporal_module_default.calendar, temporal_module_default.rangeCalendar, className);
|
|
606
|
-
$[15] = className;
|
|
607
|
-
$[16] = t4;
|
|
608
|
-
} else t4 = $[16];
|
|
609
|
-
let t5;
|
|
610
|
-
if ($[17] !== months) {
|
|
611
|
-
t5 = { months };
|
|
612
|
-
$[17] = months;
|
|
613
|
-
$[18] = t5;
|
|
614
|
-
} else t5 = $[18];
|
|
615
|
-
const t6 = picked === null ? today : void 0;
|
|
616
|
-
let t7;
|
|
617
|
-
if ($[19] !== months || $[20] !== today) {
|
|
618
|
-
let t8;
|
|
619
|
-
if ($[22] !== today) {
|
|
620
|
-
t8 = (_, month) => /* @__PURE__ */ jsx(MonthGrid, {
|
|
621
|
-
today,
|
|
622
|
-
monthOffset: month
|
|
623
|
-
}, month);
|
|
624
|
-
$[22] = today;
|
|
625
|
-
$[23] = t8;
|
|
626
|
-
} else t8 = $[23];
|
|
627
|
-
t7 = /* @__PURE__ */ jsx("div", {
|
|
628
|
-
className: temporal_module_default.months,
|
|
629
|
-
children: Array.from({ length: months }, t8)
|
|
630
|
-
});
|
|
631
|
-
$[19] = months;
|
|
632
|
-
$[20] = today;
|
|
633
|
-
$[21] = t7;
|
|
634
|
-
} else t7 = $[21];
|
|
635
|
-
let t8;
|
|
636
|
-
if ($[24] !== checkIcon || $[25] !== expandIcon || $[26] !== monthLabel || $[27] !== nextIcon || $[28] !== nextMonthLabel || $[29] !== noMatchingYearLabel || $[30] !== previousIcon || $[31] !== previousMonthLabel || $[32] !== t7 || $[33] !== yearLabel) {
|
|
637
|
-
t8 = /* @__PURE__ */ jsx(CalendarChrome, {
|
|
638
|
-
previousMonthLabel,
|
|
639
|
-
nextMonthLabel,
|
|
640
|
-
monthLabel,
|
|
641
|
-
yearLabel,
|
|
642
|
-
noMatchingYearLabel,
|
|
643
|
-
previousIcon,
|
|
644
|
-
nextIcon,
|
|
645
|
-
checkIcon,
|
|
646
|
-
expandIcon,
|
|
647
|
-
children: t7
|
|
648
|
-
});
|
|
649
|
-
$[24] = checkIcon;
|
|
650
|
-
$[25] = expandIcon;
|
|
651
|
-
$[26] = monthLabel;
|
|
652
|
-
$[27] = nextIcon;
|
|
653
|
-
$[28] = nextMonthLabel;
|
|
654
|
-
$[29] = noMatchingYearLabel;
|
|
655
|
-
$[30] = previousIcon;
|
|
656
|
-
$[31] = previousMonthLabel;
|
|
657
|
-
$[32] = t7;
|
|
658
|
-
$[33] = yearLabel;
|
|
659
|
-
$[34] = t8;
|
|
660
|
-
} else t8 = $[34];
|
|
661
|
-
let t9;
|
|
662
|
-
if ($[35] !== props || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t8) {
|
|
663
|
-
t9 = /* @__PURE__ */ jsx(RangeCalendar, {
|
|
664
|
-
className: t4,
|
|
665
|
-
visibleDuration: t5,
|
|
666
|
-
defaultFocusedValue: t6,
|
|
667
|
-
...props,
|
|
668
|
-
children: t8
|
|
669
|
-
});
|
|
670
|
-
$[35] = props;
|
|
671
|
-
$[36] = t4;
|
|
672
|
-
$[37] = t5;
|
|
673
|
-
$[38] = t6;
|
|
674
|
-
$[39] = t8;
|
|
675
|
-
$[40] = t9;
|
|
676
|
-
} else t9 = $[40];
|
|
677
|
-
return t9;
|
|
678
|
-
};
|
|
679
|
-
/**
|
|
680
|
-
* The label, description and error frame every temporal control shares,
|
|
681
|
-
* handing the control the ids it wires `aria-labelledby` and
|
|
682
|
-
* `aria-describedby` to.
|
|
683
|
-
*
|
|
684
|
-
* @example
|
|
685
|
-
* <TemporalFrame label="Period" optionalLabel="optional">
|
|
686
|
-
* {({ labelId }) => <DateInput.Root aria-labelledby={labelId} />}
|
|
687
|
-
* </TemporalFrame>
|
|
688
|
-
*/
|
|
689
|
-
var TemporalFrame = (t0) => {
|
|
690
|
-
const $ = c(43);
|
|
691
|
-
const { label, description, errors, requiredness, optionalLabel, dirty, touched, className, children } = t0;
|
|
692
|
-
const ids = Field.useIds();
|
|
693
|
-
const { labelId, descriptionId, errorId, controlId } = ids;
|
|
694
498
|
let t1;
|
|
695
|
-
if ($[
|
|
696
|
-
t1 =
|
|
697
|
-
$[
|
|
698
|
-
$[
|
|
699
|
-
} else t1 = $[
|
|
700
|
-
const messages = t1;
|
|
701
|
-
let T0;
|
|
499
|
+
if ($[3] !== children) {
|
|
500
|
+
t1 = /* @__PURE__ */ jsx(TemporalDialog, { children });
|
|
501
|
+
$[3] = children;
|
|
502
|
+
$[4] = t1;
|
|
503
|
+
} else t1 = $[4];
|
|
702
504
|
let t2;
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
let t7;
|
|
708
|
-
if ($[2] !== children || $[3] !== className || $[4] !== controlId || $[5] !== description || $[6] !== dirty || $[7] !== ids || $[8] !== label || $[9] !== labelId || $[10] !== messages.length || $[11] !== optionalLabel || $[12] !== requiredness || $[13] !== touched) {
|
|
709
|
-
const describedBy = ids.describedBy(description !== void 0, messages.length > 0);
|
|
710
|
-
T0 = Field.Root;
|
|
711
|
-
t2 = className;
|
|
712
|
-
t3 = messages.length > 0;
|
|
713
|
-
t4 = dirty;
|
|
714
|
-
t5 = touched;
|
|
715
|
-
let t8;
|
|
716
|
-
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
717
|
-
t8 = /* @__PURE__ */ jsx("span", {});
|
|
718
|
-
$[21] = t8;
|
|
719
|
-
} else t8 = $[21];
|
|
720
|
-
if ($[22] !== label || $[23] !== labelId || $[24] !== optionalLabel || $[25] !== requiredness) {
|
|
721
|
-
t6 = /* @__PURE__ */ jsx(Field.Label, {
|
|
722
|
-
id: labelId,
|
|
723
|
-
nativeLabel: false,
|
|
724
|
-
requiredness,
|
|
725
|
-
optionalLabel,
|
|
726
|
-
render: t8,
|
|
727
|
-
children: label
|
|
728
|
-
});
|
|
729
|
-
$[22] = label;
|
|
730
|
-
$[23] = labelId;
|
|
731
|
-
$[24] = optionalLabel;
|
|
732
|
-
$[25] = requiredness;
|
|
733
|
-
$[26] = t6;
|
|
734
|
-
} else t6 = $[26];
|
|
735
|
-
t7 = children({
|
|
736
|
-
labelId,
|
|
737
|
-
describedBy,
|
|
738
|
-
controlId
|
|
739
|
-
});
|
|
740
|
-
$[2] = children;
|
|
741
|
-
$[3] = className;
|
|
742
|
-
$[4] = controlId;
|
|
743
|
-
$[5] = description;
|
|
744
|
-
$[6] = dirty;
|
|
745
|
-
$[7] = ids;
|
|
746
|
-
$[8] = label;
|
|
747
|
-
$[9] = labelId;
|
|
748
|
-
$[10] = messages.length;
|
|
749
|
-
$[11] = optionalLabel;
|
|
750
|
-
$[12] = requiredness;
|
|
751
|
-
$[13] = touched;
|
|
752
|
-
$[14] = T0;
|
|
753
|
-
$[15] = t2;
|
|
754
|
-
$[16] = t3;
|
|
755
|
-
$[17] = t4;
|
|
756
|
-
$[18] = t5;
|
|
757
|
-
$[19] = t6;
|
|
758
|
-
$[20] = t7;
|
|
759
|
-
} else {
|
|
760
|
-
T0 = $[14];
|
|
761
|
-
t2 = $[15];
|
|
762
|
-
t3 = $[16];
|
|
763
|
-
t4 = $[17];
|
|
764
|
-
t5 = $[18];
|
|
765
|
-
t6 = $[19];
|
|
766
|
-
t7 = $[20];
|
|
767
|
-
}
|
|
768
|
-
let t8;
|
|
769
|
-
if ($[27] !== description || $[28] !== descriptionId) {
|
|
770
|
-
t8 = /* @__PURE__ */ jsx(Field.Description, {
|
|
771
|
-
id: descriptionId,
|
|
772
|
-
children: description
|
|
773
|
-
});
|
|
774
|
-
$[27] = description;
|
|
775
|
-
$[28] = descriptionId;
|
|
776
|
-
$[29] = t8;
|
|
777
|
-
} else t8 = $[29];
|
|
778
|
-
let t9;
|
|
779
|
-
if ($[30] !== errorId || $[31] !== messages) {
|
|
780
|
-
t9 = /* @__PURE__ */ jsx(Field.Error, {
|
|
781
|
-
id: errorId,
|
|
782
|
-
children: messages
|
|
783
|
-
});
|
|
784
|
-
$[30] = errorId;
|
|
785
|
-
$[31] = messages;
|
|
786
|
-
$[32] = t9;
|
|
787
|
-
} else t9 = $[32];
|
|
788
|
-
let t10;
|
|
789
|
-
if ($[33] !== T0 || $[34] !== t2 || $[35] !== t3 || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7 || $[40] !== t8 || $[41] !== t9) {
|
|
790
|
-
t10 = /* @__PURE__ */ jsxs(T0, {
|
|
791
|
-
className: t2,
|
|
792
|
-
invalid: t3,
|
|
793
|
-
dirty: t4,
|
|
794
|
-
touched: t5,
|
|
795
|
-
children: [
|
|
796
|
-
t6,
|
|
797
|
-
t7,
|
|
798
|
-
t8,
|
|
799
|
-
t9
|
|
800
|
-
]
|
|
505
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
506
|
+
t2 = /* @__PURE__ */ jsx(TemporalPopover, {
|
|
507
|
+
...props,
|
|
508
|
+
children: t1
|
|
801
509
|
});
|
|
802
|
-
$[
|
|
803
|
-
$[
|
|
804
|
-
$[
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
$[38] = t6;
|
|
808
|
-
$[39] = t7;
|
|
809
|
-
$[40] = t8;
|
|
810
|
-
$[41] = t9;
|
|
811
|
-
$[42] = t10;
|
|
812
|
-
} else t10 = $[42];
|
|
813
|
-
return t10;
|
|
510
|
+
$[5] = props;
|
|
511
|
+
$[6] = t1;
|
|
512
|
+
$[7] = t2;
|
|
513
|
+
} else t2 = $[7];
|
|
514
|
+
return t2;
|
|
814
515
|
};
|
|
815
|
-
|
|
816
|
-
return /* @__PURE__ */ jsx(TemporalSegment, { segment });
|
|
817
|
-
}
|
|
818
|
-
function _temp2(segment) {
|
|
819
|
-
return /* @__PURE__ */ jsx(TemporalSegment, { segment });
|
|
820
|
-
}
|
|
821
|
-
function _temp3(day) {
|
|
822
|
-
return /* @__PURE__ */ jsx(CalendarHeaderCell, {
|
|
823
|
-
className: temporal_module_default.weekday,
|
|
824
|
-
children: day
|
|
825
|
-
});
|
|
826
|
-
}
|
|
827
|
-
export { TemporalCalendar, TemporalFrame, TemporalGroup, TemporalInput, TemporalPopup, TemporalRangeCalendar, TemporalRangeInput, TemporalRangeSeparator, TemporalRangeSpacer, TemporalSegment, TemporalTrigger };
|
|
516
|
+
export { TemporalDialog, TemporalGroup, TemporalInput, TemporalLabel, TemporalPopover, TemporalPopup, TemporalRangeInput, TemporalRangeSeparator, TemporalRangeSpacer, TemporalSegment, TemporalTrigger };
|