@igne-agency/react-web-ui 0.3.0 → 0.4.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/README.md +32 -1
- package/dist/components/accordion/accordion.css +24 -19
- package/dist/components/accordion/accordion.d.ts +19 -3
- package/dist/components/accordion/accordion.js +86 -32
- package/dist/components/accordion/accordion.module.js +8 -8
- package/dist/components/active-filters/active-filter-describers.d.ts +1 -1
- package/dist/components/active-filters/active-filter-describers.js +1 -1
- package/dist/components/active-filters/active-filters.d.ts +35 -2
- package/dist/components/active-filters/active-filters.js +57 -52
- package/dist/components/active-filters/index.js +2 -2
- package/dist/components/attachment-tile/attachment-preview.d.ts +11 -9
- package/dist/components/attachment-tile/attachment-preview.js +102 -68
- package/dist/components/attachment-tile/attachment-tile.css +22 -13
- package/dist/components/attachment-tile/attachment-tile.d.ts +51 -6
- package/dist/components/attachment-tile/attachment-tile.js +209 -85
- package/dist/components/attachment-tile/attachment-tile.module.js +10 -10
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/attachment-tile/index.js +2 -2
- package/dist/components/avatar/avatar.d.ts +5 -5
- package/dist/components/avatar/avatar.js +64 -37
- package/dist/components/avatar-group/avatar-group.js +2 -2
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +22 -7
- package/dist/components/breadcrumbs/breadcrumbs.js +189 -170
- package/dist/components/button/button.d.ts +2 -3
- package/dist/components/button/button.js +58 -77
- package/dist/components/button/close-button.d.ts +4 -2
- package/dist/components/button/close-button.js +9 -9
- package/dist/components/checkbox-field/checkbox-field.d.ts +17 -3
- package/dist/components/checkbox-field/checkbox-field.js +108 -131
- package/dist/components/checkbox-field/checkbox.css +26 -34
- package/dist/components/checkbox-field/checkbox.d.ts +51 -8
- package/dist/components/checkbox-field/checkbox.js +221 -57
- package/dist/components/checkbox-field/checkbox.module.js +6 -8
- package/dist/components/checkbox-field/index.d.ts +0 -1
- package/dist/components/checkbox-field/index.js +1 -2
- package/dist/components/checkbox-field/tsf-checkbox-field.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group-field.d.ts +4 -1
- package/dist/components/checkbox-group-field/checkbox-group-field.js +54 -50
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +7 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +8 -3
- package/dist/components/collapsible/collapsible.css +23 -18
- package/dist/components/collapsible/collapsible.d.ts +18 -3
- package/dist/components/collapsible/collapsible.js +85 -32
- package/dist/components/collapsible/collapsible.module.js +7 -7
- package/dist/components/combobox-field/combobox-field.d.ts +9 -1
- package/dist/components/combobox-field/combobox-field.js +195 -175
- package/dist/components/combobox-field/combobox-items.d.ts +2 -2
- package/dist/components/combobox-field/combobox-items.js +4 -4
- package/dist/components/combobox-field/combobox.css +99 -96
- package/dist/components/combobox-field/combobox.d.ts +94 -15
- package/dist/components/combobox-field/combobox.js +484 -159
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/index.d.ts +0 -1
- package/dist/components/combobox-field/selection.d.ts +4 -1
- package/dist/components/combobox-field/value-state-view.css +7 -3
- package/dist/components/combobox-field/value-state-view.d.ts +4 -2
- package/dist/components/combobox-field/value-state-view.js +15 -15
- package/dist/components/combobox-field/value-state-view.module.js +6 -4
- package/dist/components/composer/composer-attachments.d.ts +11 -3
- package/dist/components/composer/composer-attachments.js +61 -47
- package/dist/components/composer/composer-editor.d.ts +2 -1
- package/dist/components/composer/composer-editor.js +79 -71
- package/dist/components/composer/composer-mentions.js +2 -2
- package/dist/components/composer/composer.d.ts +42 -21
- package/dist/components/composer/composer.js +201 -58
- package/dist/components/composer/mention-text.js +3 -3
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +8 -7
- package/dist/components/confirm-dialog/confirm-dialog.js +10 -9
- package/dist/components/conversation/conversation.context.d.ts +0 -5
- package/dist/components/conversation/conversation.d.ts +63 -29
- package/dist/components/conversation/conversation.js +193 -82
- package/dist/components/conversation/index.d.ts +1 -1
- package/dist/components/date-field/date-field.d.ts +10 -4
- package/dist/components/date-field/date-field.js +57 -43
- package/dist/components/date-field/date-input.d.ts +20 -3
- package/dist/components/date-field/date-input.js +28 -13
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-field/tsf-date-field.d.ts +1 -1
- package/dist/components/date-field/tsf-date-field.js +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +8 -4
- package/dist/components/date-range-field/date-range-field.js +57 -45
- package/dist/components/date-range-field/date-range-input.d.ts +20 -3
- package/dist/components/date-range-field/date-range-input.js +27 -12
- package/dist/components/date-range-field/tsf-date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/tsf-date-range-field.js +1 -1
- package/dist/components/detail-list/detail-list.d.ts +28 -27
- package/dist/components/detail-list/detail-list.js +177 -121
- package/dist/components/dialog/dialog.d.ts +47 -27
- package/dist/components/dialog/dialog.js +101 -38
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/drawer.d.ts +48 -30
- package/dist/components/drawer/drawer.js +113 -41
- package/dist/components/email-field/email-field.d.ts +5 -3
- package/dist/components/email-field/email-field.js +1 -3
- package/dist/components/email-field/tsf-email-field.d.ts +3 -2
- package/dist/components/empty-message/empty-message.d.ts +3 -3
- package/dist/components/empty-message/empty-message.js +3 -3
- package/dist/components/error-boundary/error-boundary.d.ts +5 -2
- package/dist/components/error-boundary/error-boundary.js +2 -3
- package/dist/components/error-message/error-message.d.ts +1 -1
- package/dist/components/error-message/error-message.js +1 -1
- package/dist/components/error-text/error-text.js +3 -3
- package/dist/components/field/field.d.ts +5 -5
- package/dist/components/field/field.js +9 -9
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/input-parts.js +1 -1
- package/dist/components/field-placeholder/field-placeholder.d.ts +4 -1
- package/dist/components/field-placeholder/field-placeholder.js +41 -26
- package/dist/components/fieldset/field-group.js +1 -1
- package/dist/components/fieldset/fieldset-root.js +1 -1
- package/dist/components/fieldset/fieldset.css +4 -3
- package/dist/components/fieldset/fieldset.js +1 -1
- package/dist/components/fieldset/fieldset.module.js +2 -2
- package/dist/components/file-field/file-field.css +19 -15
- package/dist/components/file-field/file-field.d.ts +10 -1
- package/dist/components/file-field/file-field.js +130 -109
- package/dist/components/file-field/file-field.module.js +6 -4
- package/dist/components/file-field/file-input.d.ts +32 -9
- package/dist/components/file-field/file-input.js +94 -74
- package/dist/components/filter-bar/filter-bar.d.ts +79 -51
- package/dist/components/filter-bar/filter-bar.js +552 -216
- package/dist/components/form/form.d.ts +4 -6
- package/dist/components/form/form.js +6 -8
- package/dist/components/icon/icon.d.ts +5 -10
- package/dist/components/icon/icon.js +4 -6
- package/dist/components/link/link.js +1 -1
- package/dist/components/link-button/link-button.d.ts +1 -2
- package/dist/components/link-button/link-button.js +12 -22
- package/dist/components/loading-message/loading-message.d.ts +2 -2
- package/dist/components/loading-message/loading-message.js +1 -1
- package/dist/components/locale-provider/locale-provider.js +1 -1
- package/dist/components/menu/menu.d.ts +40 -22
- package/dist/components/menu/menu.js +100 -40
- package/dist/components/nav/nav-context.d.ts +0 -1
- package/dist/components/nav/nav-context.js +1 -2
- package/dist/components/nav/nav-item-view.d.ts +7 -7
- package/dist/components/nav/nav-item-view.js +27 -51
- package/dist/components/nav/nav.css +72 -60
- package/dist/components/nav/nav.d.ts +15 -8
- package/dist/components/nav/nav.js +105 -52
- package/dist/components/nav/nav.module.js +14 -14
- package/dist/components/number-field/number-field.d.ts +7 -1
- package/dist/components/number-field/number-field.js +98 -82
- package/dist/components/number-field/number-input.d.ts +53 -4
- package/dist/components/number-field/number-input.js +68 -21
- package/dist/components/number-field/tsf-number-field.d.ts +1 -1
- package/dist/components/number-field/tsf-number-field.js +1 -1
- package/dist/components/otp-field/otp-input.d.ts +25 -0
- package/dist/components/otp-field/otp-input.js +26 -1
- package/dist/components/pagination/pagination.d.ts +82 -23
- package/dist/components/pagination/pagination.js +656 -229
- package/dist/components/password-field/password-field.d.ts +7 -1
- package/dist/components/password-field/password-field.js +117 -126
- package/dist/components/password-field/password-strength.js +1 -1
- package/dist/components/password-field/tsf-password-field.d.ts +1 -1
- package/dist/components/password-field/tsf-password-field.js +1 -1
- package/dist/components/photo-field/photo-field.d.ts +17 -3
- package/dist/components/photo-field/photo-field.js +168 -89
- package/dist/components/photo-field/photo-input-context.d.ts +25 -0
- package/dist/components/photo-field/photo-input-context.js +14 -0
- package/dist/components/photo-field/photo-input.d.ts +58 -23
- package/dist/components/photo-field/photo-input.js +459 -261
- package/dist/components/popover/popover.d.ts +55 -23
- package/dist/components/popover/popover.js +205 -61
- package/dist/components/radio-group-field/radio-group.js +1 -1
- package/dist/components/search-field/search-field.d.ts +7 -5
- package/dist/components/search-field/search-field.js +4 -6
- package/dist/components/search-field/tsf-search-field.d.ts +1 -1
- package/dist/components/search-field/tsf-search-field.js +1 -1
- package/dist/components/segmented-control-field/segmented-control.js +1 -1
- package/dist/components/select-field/select-field.d.ts +7 -1
- package/dist/components/select-field/select-field.js +151 -139
- package/dist/components/select-field/select.d.ts +28 -6
- package/dist/components/select-field/select.js +234 -149
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/spinner/spinner.css +47 -1
- package/dist/components/spinner/spinner.js +28 -11
- package/dist/components/spinner/spinner.module.js +18 -3
- package/dist/components/stale/stale.d.ts +17 -21
- package/dist/components/stale/stale.js +307 -129
- package/dist/components/status-message/status-message.css +22 -21
- package/dist/components/status-message/status-message.d.ts +10 -5
- package/dist/components/status-message/status-message.js +20 -24
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/status-message/status-preset.d.ts +4 -5
- package/dist/components/status-message/status-preset.js +3 -3
- package/dist/components/switch-field/switch.js +1 -1
- package/dist/components/tabs/tabs.d.ts +51 -28
- package/dist/components/tabs/tabs.js +219 -144
- package/dist/components/tag/tag.css +23 -21
- package/dist/components/tag/tag.d.ts +17 -15
- package/dist/components/tag/tag.js +140 -65
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +30 -27
- package/dist/components/tag-group/tag-group.d.ts +10 -4
- package/dist/components/tag-group/tag-group.js +47 -35
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.d.ts +14 -3
- package/dist/components/text-field/text-field.js +154 -133
- package/dist/components/text-field/text-input.d.ts +89 -3
- package/dist/components/text-field/text-input.js +184 -70
- package/dist/components/textarea-field/textarea.js +1 -1
- package/dist/components/time-field/time-input.d.ts +6 -0
- package/dist/components/time-field/time-input.js +6 -0
- package/dist/components/time-zone-provider/time-zone-provider.js +1 -1
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toast/toast-provider.css +38 -34
- package/dist/components/toast/toast-provider.d.ts +65 -3
- package/dist/components/toast/toast-provider.js +313 -148
- package/dist/components/toast/toast-provider.module.js +11 -17
- package/dist/components/toast/toast.d.ts +5 -1
- package/dist/components/toast/toast.js +2 -1
- package/dist/components/toggle-group-field/toggle-group.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +6 -6
- package/dist/components/tooltip/tooltip.js +7 -7
- package/dist/data-table/data-table-content.d.ts +18 -10
- package/dist/data-table/data-table-content.js +145 -290
- package/dist/data-table/data-table-context.d.ts +4 -2
- package/dist/data-table/data-table-context.js +1 -1
- package/dist/data-table/data-table-parts.d.ts +99 -0
- package/dist/data-table/data-table-parts.js +1182 -0
- package/dist/data-table/data-table-selection.d.ts +7 -3
- package/dist/data-table/data-table-selection.js +62 -37
- package/dist/data-table/data-table.css +100 -95
- package/dist/data-table/data-table.d.ts +49 -25
- package/dist/data-table/data-table.js +95 -83
- package/dist/data-table/data-table.module.js +34 -34
- package/dist/data-table/index.d.ts +2 -1
- package/dist/data-table/index.js +2 -1
- package/dist/data-view/use-data-view.d.ts +2 -2
- package/dist/data-view/use-data-view.js +2 -2
- package/dist/index.js +7 -8
- package/dist/lib/calendar/calendar-navigation.d.ts +9 -2
- package/dist/lib/calendar/calendar-navigation.js +72 -73
- package/dist/lib/calendar/calendar-year.d.ts +4 -3
- package/dist/lib/calendar/calendar-year.js +137 -156
- package/dist/lib/calendar/temporal.d.ts +18 -12
- package/dist/lib/calendar/temporal.js +191 -147
- package/dist/lib/table-storage.d.ts +2 -2
- package/dist/lib/table-storage.js +2 -2
- package/dist/lib/unsaved-changes/leave-guard.js +1 -1
- package/dist/terrazzo/index.d.ts +16 -0
- package/dist/terrazzo/index.js +94 -2
- package/dist/tokens.css +71 -69
- package/package.json +3 -2
- package/tokens/ref.tokens.json +0 -30
- package/tokens/sys.tokens.json +0 -7
- package/dist/assets/spinner.js +0 -28
- package/dist/components/checkbox-field/checkbox-glyph.d.ts +0 -12
- package/dist/components/checkbox-field/checkbox-glyph.js +0 -38
- package/dist/components/combobox-field/combobox-popup-body.d.ts +0 -34
- package/dist/components/combobox-field/combobox-popup-body.js +0 -142
- package/dist/components/conversation/conversation.context.js +0 -4
- package/dist/vendor/@material-design-icons/svg/outlined/add.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_downward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_forward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_upward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/attach_file.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/block.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/calendar_today.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/check.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/check_circle.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/chevron_left.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/chevron_right.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/close.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/content_copy.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/date_range.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/description.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/download.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/error.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/error_outline.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/expand_less.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/expand_more.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/filter_alt.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/filter_alt_off.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/first_page.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/info.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/keyboard_arrow_down.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/last_page.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/mail.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/more_horiz.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/photo_camera.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/remove.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/restart_alt.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/restore.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/search.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/unfold_more.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/upload_file.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/visibility.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/visibility_off.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/warning_amber.js +0 -12
|
@@ -2,8 +2,7 @@ import type { CalendarDate } from "@internationalized/date";
|
|
|
2
2
|
import { type ReactNode, type Ref } from "react";
|
|
3
3
|
import { type DateInputProps as AriaDateInputProps, type CalendarProps as AriaCalendarProps, type DateSegmentProps as AriaDateSegmentProps, type DialogProps as AriaDialogProps, type GroupProps as AriaGroupProps, type PopoverProps as AriaPopoverProps, type RangeCalendarProps as AriaRangeCalendarProps } from "react-aria-components";
|
|
4
4
|
import { type FieldProps, type FieldState } from "../../components/field/index.ts";
|
|
5
|
-
import type
|
|
6
|
-
import { type CalendarNavigationLabels } from "./calendar-navigation.tsx";
|
|
5
|
+
import { type CalendarNavigationIcons, type CalendarNavigationLabels } from "./calendar-navigation.tsx";
|
|
7
6
|
/** The copy a calendar popup announces: its month steppers and its month and year lists. */
|
|
8
7
|
export type CalendarLabels = CalendarNavigationLabels & Readonly<{
|
|
9
8
|
/** Accessible name of the button that shows the previous month. */
|
|
@@ -11,6 +10,13 @@ export type CalendarLabels = CalendarNavigationLabels & Readonly<{
|
|
|
11
10
|
/** Accessible name of the button that shows the next month. */
|
|
12
11
|
nextMonthLabel: string;
|
|
13
12
|
}>;
|
|
13
|
+
/** The icons a calendar popup shows: its month steppers and its month and year lists. */
|
|
14
|
+
export type CalendarIcons = CalendarNavigationIcons & Readonly<{
|
|
15
|
+
/** The icon of the button that shows the previous month. */
|
|
16
|
+
previousIcon: ReactNode;
|
|
17
|
+
/** The icon of the button that shows the next month. */
|
|
18
|
+
nextIcon: ReactNode;
|
|
19
|
+
}>;
|
|
14
20
|
export type TemporalStateProps = Readonly<{
|
|
15
21
|
/** Projected onto the element as presence-style `data-*` attributes. */
|
|
16
22
|
state?: FieldState;
|
|
@@ -66,18 +72,18 @@ export declare const TemporalRangeSpacer: () => ReactNode;
|
|
|
66
72
|
export type TemporalTriggerProps = Readonly<{
|
|
67
73
|
/** Accessible name, surfaced as the tooltip hint and the `aria-label`. */
|
|
68
74
|
label: string;
|
|
69
|
-
/** Glyph for the trigger. */
|
|
70
|
-
icon: SvgComponent;
|
|
71
75
|
/** The button itself, for the popup to align to. */
|
|
72
76
|
ref?: Ref<HTMLButtonElement>;
|
|
77
|
+
/** The icon the button shows. */
|
|
78
|
+
children: ReactNode;
|
|
73
79
|
}>;
|
|
74
80
|
/**
|
|
75
81
|
* The icon-only button that opens the calendar.
|
|
76
82
|
*
|
|
77
83
|
* @example
|
|
78
|
-
* <TemporalTrigger label="Open calendar"
|
|
84
|
+
* <TemporalTrigger label="Open calendar" ref={triggerRef}><CalendarIcon /></TemporalTrigger>
|
|
79
85
|
*/
|
|
80
|
-
export declare const TemporalTrigger: ({ label,
|
|
86
|
+
export declare const TemporalTrigger: ({ label, ref, children, }: TemporalTriggerProps) => ReactNode;
|
|
81
87
|
export type TemporalPopupProps = Omit<AriaPopoverProps, "children"> & Readonly<{
|
|
82
88
|
children: AriaDialogProps["children"];
|
|
83
89
|
}>;
|
|
@@ -89,16 +95,16 @@ export type TemporalPopupProps = Omit<AriaPopoverProps, "children"> & Readonly<{
|
|
|
89
95
|
* <TemporalPopup triggerRef={triggerRef}><TemporalCalendar {...labels} /></TemporalPopup>
|
|
90
96
|
*/
|
|
91
97
|
export declare const TemporalPopup: ({ children, placement, ...props }: TemporalPopupProps) => ReactNode;
|
|
92
|
-
export type TemporalCalendarProps = Omit<AriaCalendarProps<CalendarDate>, "children"> & CalendarLabels;
|
|
98
|
+
export type TemporalCalendarProps = Omit<AriaCalendarProps<CalendarDate>, "children"> & CalendarLabels & CalendarIcons;
|
|
93
99
|
/**
|
|
94
100
|
* A month of days, selecting one. Today, and the month it opens on without a
|
|
95
101
|
* value, are read in the `TimeZoneProvider`'s zone.
|
|
96
102
|
*
|
|
97
103
|
* @example
|
|
98
|
-
* <TemporalCalendar {...calendarLabels} />
|
|
104
|
+
* <TemporalCalendar {...calendarLabels} {...calendarIcons} />
|
|
99
105
|
*/
|
|
100
|
-
export declare const TemporalCalendar: ({ className, previousMonthLabel, nextMonthLabel, monthLabel, yearLabel, noMatchingYearLabel, ...props }: TemporalCalendarProps) => ReactNode;
|
|
101
|
-
export type TemporalRangeCalendarProps = Omit<AriaRangeCalendarProps<CalendarDate>, "children" | "visibleDuration"> & CalendarLabels & Readonly<{
|
|
106
|
+
export declare const TemporalCalendar: ({ className, previousMonthLabel, nextMonthLabel, monthLabel, yearLabel, noMatchingYearLabel, previousIcon, nextIcon, checkIcon, expandIcon, ...props }: TemporalCalendarProps) => ReactNode;
|
|
107
|
+
export type TemporalRangeCalendarProps = Omit<AriaRangeCalendarProps<CalendarDate>, "children" | "visibleDuration"> & CalendarLabels & CalendarIcons & Readonly<{
|
|
102
108
|
/** Months shown side by side. @default 1 */
|
|
103
109
|
visibleMonths?: number;
|
|
104
110
|
}>;
|
|
@@ -108,9 +114,9 @@ export type TemporalRangeCalendarProps = Omit<AriaRangeCalendarProps<CalendarDat
|
|
|
108
114
|
* `TimeZoneProvider`'s zone.
|
|
109
115
|
*
|
|
110
116
|
* @example
|
|
111
|
-
* <TemporalRangeCalendar visibleMonths={2} {...calendarLabels} />
|
|
117
|
+
* <TemporalRangeCalendar visibleMonths={2} {...calendarLabels} {...calendarIcons} />
|
|
112
118
|
*/
|
|
113
|
-
export declare const TemporalRangeCalendar: ({ visibleMonths, className, previousMonthLabel, nextMonthLabel, monthLabel, yearLabel, noMatchingYearLabel, ...props }: TemporalRangeCalendarProps) => ReactNode;
|
|
119
|
+
export declare const TemporalRangeCalendar: ({ visibleMonths, className, previousMonthLabel, nextMonthLabel, monthLabel, yearLabel, noMatchingYearLabel, previousIcon, nextIcon, checkIcon, expandIcon, ...props }: TemporalRangeCalendarProps) => ReactNode;
|
|
114
120
|
export type TemporalFrameIds = Readonly<{
|
|
115
121
|
labelId: string;
|
|
116
122
|
describedBy?: string;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import SvgChevronLeft from "../../vendor/@material-design-icons/svg/outlined/chevron_left.js";
|
|
2
|
-
import SvgChevronRight from "../../vendor/@material-design-icons/svg/outlined/chevron_right.js";
|
|
3
1
|
import { Button as Button$1 } from "../../components/button/button.js";
|
|
4
|
-
import { Field
|
|
2
|
+
import { Field } from "../../components/field/field.js";
|
|
5
3
|
import { fieldStateAttributes } from "../../components/field/field-state.js";
|
|
6
4
|
import { useFieldFocus, withFieldFocus } from "../../components/field/use-field-focus.js";
|
|
7
5
|
import { focusControlOnRim } from "../../components/field/rim-focus.js";
|
|
@@ -11,9 +9,9 @@ import { CalendarNavigation } from "./calendar-navigation.js";
|
|
|
11
9
|
import { todayIn } from "./temporal-value.js";
|
|
12
10
|
import temporal_module_default from "./temporal.module.js";
|
|
13
11
|
import { c } from "react/compiler-runtime";
|
|
14
|
-
import { useContext } from "react";
|
|
15
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
16
12
|
import { clsx } from "clsx";
|
|
13
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { useContext } from "react";
|
|
17
15
|
import { Button, Calendar, CalendarCell, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell, DateInput, DatePickerStateContext, DateRangePickerStateContext, DateSegment, Dialog, Group, Popover, RangeCalendar } from "react-aria-components";
|
|
18
16
|
// src/lib/calendar/temporal.tsx
|
|
19
17
|
/**
|
|
@@ -234,11 +232,11 @@ var TemporalRangeSpacer = () => {
|
|
|
234
232
|
* The icon-only button that opens the calendar.
|
|
235
233
|
*
|
|
236
234
|
* @example
|
|
237
|
-
* <TemporalTrigger label="Open calendar"
|
|
235
|
+
* <TemporalTrigger label="Open calendar" ref={triggerRef}><CalendarIcon /></TemporalTrigger>
|
|
238
236
|
*/
|
|
239
237
|
var TemporalTrigger = (t0) => {
|
|
240
238
|
const $ = c(6);
|
|
241
|
-
const { label,
|
|
239
|
+
const { label, ref, children } = t0;
|
|
242
240
|
let t1;
|
|
243
241
|
if ($[0] !== ref) {
|
|
244
242
|
t1 = /* @__PURE__ */ jsx(Button, { ref });
|
|
@@ -246,17 +244,17 @@ var TemporalTrigger = (t0) => {
|
|
|
246
244
|
$[1] = t1;
|
|
247
245
|
} else t1 = $[1];
|
|
248
246
|
let t2;
|
|
249
|
-
if ($[2] !==
|
|
247
|
+
if ($[2] !== children || $[3] !== label || $[4] !== t1) {
|
|
250
248
|
t2 = /* @__PURE__ */ jsx(Button$1, {
|
|
251
249
|
iconOnly: true,
|
|
252
|
-
icon,
|
|
250
|
+
icon: children,
|
|
253
251
|
label,
|
|
254
252
|
variant: "tertiary",
|
|
255
253
|
size: "sm",
|
|
256
254
|
className: temporal_module_default.trigger,
|
|
257
255
|
render: t1
|
|
258
256
|
});
|
|
259
|
-
$[2] =
|
|
257
|
+
$[2] = children;
|
|
260
258
|
$[3] = label;
|
|
261
259
|
$[4] = t1;
|
|
262
260
|
$[5] = t2;
|
|
@@ -312,58 +310,64 @@ var TemporalPopup = (t0) => {
|
|
|
312
310
|
return t3;
|
|
313
311
|
};
|
|
314
312
|
var CalendarChrome = (t0) => {
|
|
315
|
-
const $ = c(
|
|
316
|
-
const { previousMonthLabel, nextMonthLabel, monthLabel, yearLabel, noMatchingYearLabel, children } = t0;
|
|
313
|
+
const $ = c(21);
|
|
314
|
+
const { previousMonthLabel, nextMonthLabel, monthLabel, yearLabel, noMatchingYearLabel, previousIcon, nextIcon, checkIcon, expandIcon, children } = t0;
|
|
317
315
|
let t1;
|
|
318
316
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
319
317
|
t1 = /* @__PURE__ */ jsx(Button, { slot: "previous" });
|
|
320
318
|
$[0] = t1;
|
|
321
319
|
} else t1 = $[0];
|
|
322
320
|
let t2;
|
|
323
|
-
if ($[1] !== previousMonthLabel) {
|
|
321
|
+
if ($[1] !== previousIcon || $[2] !== previousMonthLabel) {
|
|
324
322
|
t2 = /* @__PURE__ */ jsx(Button$1, {
|
|
325
323
|
iconOnly: true,
|
|
326
|
-
icon:
|
|
324
|
+
icon: previousIcon,
|
|
327
325
|
label: previousMonthLabel,
|
|
328
326
|
variant: "tertiary",
|
|
329
327
|
size: "md",
|
|
330
328
|
render: t1
|
|
331
329
|
});
|
|
332
|
-
$[1] =
|
|
333
|
-
$[2] =
|
|
334
|
-
|
|
330
|
+
$[1] = previousIcon;
|
|
331
|
+
$[2] = previousMonthLabel;
|
|
332
|
+
$[3] = t2;
|
|
333
|
+
} else t2 = $[3];
|
|
335
334
|
let t3;
|
|
336
|
-
if ($[
|
|
335
|
+
if ($[4] !== checkIcon || $[5] !== expandIcon || $[6] !== monthLabel || $[7] !== noMatchingYearLabel || $[8] !== yearLabel) {
|
|
337
336
|
t3 = /* @__PURE__ */ jsx(CalendarNavigation, {
|
|
338
337
|
monthLabel,
|
|
339
338
|
yearLabel,
|
|
340
|
-
noMatchingYearLabel
|
|
339
|
+
noMatchingYearLabel,
|
|
340
|
+
checkIcon,
|
|
341
|
+
expandIcon
|
|
341
342
|
});
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
|
|
343
|
+
$[4] = checkIcon;
|
|
344
|
+
$[5] = expandIcon;
|
|
345
|
+
$[6] = monthLabel;
|
|
346
|
+
$[7] = noMatchingYearLabel;
|
|
347
|
+
$[8] = yearLabel;
|
|
348
|
+
$[9] = t3;
|
|
349
|
+
} else t3 = $[9];
|
|
347
350
|
let t4;
|
|
348
|
-
if ($[
|
|
351
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
349
352
|
t4 = /* @__PURE__ */ jsx(Button, { slot: "next" });
|
|
350
|
-
$[
|
|
351
|
-
} else t4 = $[
|
|
353
|
+
$[10] = t4;
|
|
354
|
+
} else t4 = $[10];
|
|
352
355
|
let t5;
|
|
353
|
-
if ($[
|
|
356
|
+
if ($[11] !== nextIcon || $[12] !== nextMonthLabel) {
|
|
354
357
|
t5 = /* @__PURE__ */ jsx(Button$1, {
|
|
355
358
|
iconOnly: true,
|
|
356
|
-
icon:
|
|
359
|
+
icon: nextIcon,
|
|
357
360
|
label: nextMonthLabel,
|
|
358
361
|
variant: "tertiary",
|
|
359
362
|
size: "md",
|
|
360
363
|
render: t4
|
|
361
364
|
});
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
|
|
365
|
+
$[11] = nextIcon;
|
|
366
|
+
$[12] = nextMonthLabel;
|
|
367
|
+
$[13] = t5;
|
|
368
|
+
} else t5 = $[13];
|
|
365
369
|
let t6;
|
|
366
|
-
if ($[
|
|
370
|
+
if ($[14] !== t2 || $[15] !== t3 || $[16] !== t5) {
|
|
367
371
|
t6 = /* @__PURE__ */ jsxs("header", {
|
|
368
372
|
className: temporal_module_default.header,
|
|
369
373
|
children: [
|
|
@@ -372,18 +376,18 @@ var CalendarChrome = (t0) => {
|
|
|
372
376
|
t5
|
|
373
377
|
]
|
|
374
378
|
});
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
} else t6 = $[
|
|
379
|
+
$[14] = t2;
|
|
380
|
+
$[15] = t3;
|
|
381
|
+
$[16] = t5;
|
|
382
|
+
$[17] = t6;
|
|
383
|
+
} else t6 = $[17];
|
|
380
384
|
let t7;
|
|
381
|
-
if ($[
|
|
382
|
-
t7 = /* @__PURE__ */ jsxs(Fragment
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
} else 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];
|
|
387
391
|
return t7;
|
|
388
392
|
};
|
|
389
393
|
var MonthGrid = (t0) => {
|
|
@@ -428,90 +432,110 @@ var MonthGrid = (t0) => {
|
|
|
428
432
|
* value, are read in the `TimeZoneProvider`'s zone.
|
|
429
433
|
*
|
|
430
434
|
* @example
|
|
431
|
-
* <TemporalCalendar {...calendarLabels} />
|
|
435
|
+
* <TemporalCalendar {...calendarLabels} {...calendarIcons} />
|
|
432
436
|
*/
|
|
433
437
|
var TemporalCalendar = (t0) => {
|
|
434
|
-
const $ = c(
|
|
438
|
+
const $ = c(34);
|
|
439
|
+
let checkIcon;
|
|
435
440
|
let className;
|
|
441
|
+
let expandIcon;
|
|
436
442
|
let monthLabel;
|
|
443
|
+
let nextIcon;
|
|
437
444
|
let nextMonthLabel;
|
|
438
445
|
let noMatchingYearLabel;
|
|
446
|
+
let previousIcon;
|
|
439
447
|
let previousMonthLabel;
|
|
440
448
|
let props;
|
|
441
449
|
let yearLabel;
|
|
442
450
|
if ($[0] !== t0) {
|
|
443
|
-
({className, previousMonthLabel, nextMonthLabel, monthLabel, yearLabel, noMatchingYearLabel, ...props} = t0);
|
|
451
|
+
({className, previousMonthLabel, nextMonthLabel, monthLabel, yearLabel, noMatchingYearLabel, previousIcon, nextIcon, checkIcon, expandIcon, ...props} = t0);
|
|
444
452
|
$[0] = t0;
|
|
445
|
-
$[1] =
|
|
446
|
-
$[2] =
|
|
447
|
-
$[3] =
|
|
448
|
-
$[4] =
|
|
449
|
-
$[5] =
|
|
450
|
-
$[6] =
|
|
451
|
-
$[7] =
|
|
453
|
+
$[1] = checkIcon;
|
|
454
|
+
$[2] = className;
|
|
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;
|
|
452
464
|
} else {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
465
|
+
checkIcon = $[1];
|
|
466
|
+
className = $[2];
|
|
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];
|
|
460
476
|
}
|
|
461
477
|
const t1 = useTimeZone();
|
|
462
478
|
let t2;
|
|
463
|
-
if ($[
|
|
479
|
+
if ($[12] !== t1) {
|
|
464
480
|
t2 = todayIn(t1);
|
|
465
|
-
$[
|
|
466
|
-
$[
|
|
467
|
-
} else t2 = $[
|
|
481
|
+
$[12] = t1;
|
|
482
|
+
$[13] = t2;
|
|
483
|
+
} else t2 = $[13];
|
|
468
484
|
const today = t2;
|
|
469
485
|
const picked = useContext(DatePickerStateContext)?.value ?? null;
|
|
470
486
|
let t3;
|
|
471
|
-
if ($[
|
|
487
|
+
if ($[14] !== className) {
|
|
472
488
|
t3 = clsx(temporal_module_default.calendar, className);
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
} else t3 = $[
|
|
489
|
+
$[14] = className;
|
|
490
|
+
$[15] = t3;
|
|
491
|
+
} else t3 = $[15];
|
|
476
492
|
const t4 = picked === null ? today : void 0;
|
|
477
493
|
let t5;
|
|
478
|
-
if ($[
|
|
494
|
+
if ($[16] !== today) {
|
|
479
495
|
t5 = /* @__PURE__ */ jsx(MonthGrid, { today });
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
482
|
-
} else t5 = $[
|
|
496
|
+
$[16] = today;
|
|
497
|
+
$[17] = t5;
|
|
498
|
+
} else t5 = $[17];
|
|
483
499
|
let t6;
|
|
484
|
-
if ($[
|
|
500
|
+
if ($[18] !== checkIcon || $[19] !== expandIcon || $[20] !== monthLabel || $[21] !== nextIcon || $[22] !== nextMonthLabel || $[23] !== noMatchingYearLabel || $[24] !== previousIcon || $[25] !== previousMonthLabel || $[26] !== t5 || $[27] !== yearLabel) {
|
|
485
501
|
t6 = /* @__PURE__ */ jsx(CalendarChrome, {
|
|
486
502
|
previousMonthLabel,
|
|
487
503
|
nextMonthLabel,
|
|
488
504
|
monthLabel,
|
|
489
505
|
yearLabel,
|
|
490
506
|
noMatchingYearLabel,
|
|
507
|
+
previousIcon,
|
|
508
|
+
nextIcon,
|
|
509
|
+
checkIcon,
|
|
510
|
+
expandIcon,
|
|
491
511
|
children: t5
|
|
492
512
|
});
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
495
|
-
$[
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
498
|
-
$[
|
|
499
|
-
$[
|
|
500
|
-
|
|
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];
|
|
501
525
|
let t7;
|
|
502
|
-
if ($[
|
|
526
|
+
if ($[29] !== props || $[30] !== t3 || $[31] !== t4 || $[32] !== t6) {
|
|
503
527
|
t7 = /* @__PURE__ */ jsx(Calendar, {
|
|
504
528
|
className: t3,
|
|
505
529
|
defaultFocusedValue: t4,
|
|
506
530
|
...props,
|
|
507
531
|
children: t6
|
|
508
532
|
});
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
} else t7 = $[
|
|
533
|
+
$[29] = props;
|
|
534
|
+
$[30] = t3;
|
|
535
|
+
$[31] = t4;
|
|
536
|
+
$[32] = t6;
|
|
537
|
+
$[33] = t7;
|
|
538
|
+
} else t7 = $[33];
|
|
515
539
|
return t7;
|
|
516
540
|
};
|
|
517
541
|
/**
|
|
@@ -520,102 +544,122 @@ var TemporalCalendar = (t0) => {
|
|
|
520
544
|
* `TimeZoneProvider`'s zone.
|
|
521
545
|
*
|
|
522
546
|
* @example
|
|
523
|
-
* <TemporalRangeCalendar visibleMonths={2} {...calendarLabels} />
|
|
547
|
+
* <TemporalRangeCalendar visibleMonths={2} {...calendarLabels} {...calendarIcons} />
|
|
524
548
|
*/
|
|
525
549
|
var TemporalRangeCalendar = (t0) => {
|
|
526
|
-
const $ = c(
|
|
550
|
+
const $ = c(41);
|
|
551
|
+
let checkIcon;
|
|
527
552
|
let className;
|
|
553
|
+
let expandIcon;
|
|
528
554
|
let monthLabel;
|
|
555
|
+
let nextIcon;
|
|
529
556
|
let nextMonthLabel;
|
|
530
557
|
let noMatchingYearLabel;
|
|
558
|
+
let previousIcon;
|
|
531
559
|
let previousMonthLabel;
|
|
532
560
|
let props;
|
|
533
561
|
let t1;
|
|
534
562
|
let yearLabel;
|
|
535
563
|
if ($[0] !== t0) {
|
|
536
|
-
({visibleMonths: t1, className, previousMonthLabel, nextMonthLabel, monthLabel, yearLabel, noMatchingYearLabel, ...props} = t0);
|
|
564
|
+
({visibleMonths: t1, className, previousMonthLabel, nextMonthLabel, monthLabel, yearLabel, noMatchingYearLabel, previousIcon, nextIcon, checkIcon, expandIcon, ...props} = t0);
|
|
537
565
|
$[0] = t0;
|
|
538
|
-
$[1] =
|
|
539
|
-
$[2] =
|
|
540
|
-
$[3] =
|
|
541
|
-
$[4] =
|
|
542
|
-
$[5] =
|
|
543
|
-
$[6] =
|
|
544
|
-
$[7] =
|
|
545
|
-
$[8] =
|
|
566
|
+
$[1] = checkIcon;
|
|
567
|
+
$[2] = className;
|
|
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;
|
|
546
578
|
} else {
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
579
|
+
checkIcon = $[1];
|
|
580
|
+
className = $[2];
|
|
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];
|
|
555
591
|
}
|
|
556
592
|
const visibleMonths = t1 === void 0 ? 1 : t1;
|
|
557
593
|
const t2 = useTimeZone();
|
|
558
594
|
let t3;
|
|
559
|
-
if ($[
|
|
595
|
+
if ($[13] !== t2) {
|
|
560
596
|
t3 = todayIn(t2);
|
|
561
|
-
$[
|
|
562
|
-
$[
|
|
563
|
-
} else t3 = $[
|
|
597
|
+
$[13] = t2;
|
|
598
|
+
$[14] = t3;
|
|
599
|
+
} else t3 = $[14];
|
|
564
600
|
const today = t3;
|
|
565
601
|
const picked = useContext(DateRangePickerStateContext)?.value.start ?? null;
|
|
566
602
|
const months = Math.max(1, visibleMonths);
|
|
567
603
|
let t4;
|
|
568
|
-
if ($[
|
|
604
|
+
if ($[15] !== className) {
|
|
569
605
|
t4 = clsx(temporal_module_default.calendar, temporal_module_default.rangeCalendar, className);
|
|
570
|
-
$[
|
|
571
|
-
$[
|
|
572
|
-
} else t4 = $[
|
|
606
|
+
$[15] = className;
|
|
607
|
+
$[16] = t4;
|
|
608
|
+
} else t4 = $[16];
|
|
573
609
|
let t5;
|
|
574
|
-
if ($[
|
|
610
|
+
if ($[17] !== months) {
|
|
575
611
|
t5 = { months };
|
|
576
|
-
$[
|
|
577
|
-
$[
|
|
578
|
-
} else t5 = $[
|
|
612
|
+
$[17] = months;
|
|
613
|
+
$[18] = t5;
|
|
614
|
+
} else t5 = $[18];
|
|
579
615
|
const t6 = picked === null ? today : void 0;
|
|
580
616
|
let t7;
|
|
581
|
-
if ($[
|
|
617
|
+
if ($[19] !== months || $[20] !== today) {
|
|
582
618
|
let t8;
|
|
583
|
-
if ($[
|
|
619
|
+
if ($[22] !== today) {
|
|
584
620
|
t8 = (_, month) => /* @__PURE__ */ jsx(MonthGrid, {
|
|
585
621
|
today,
|
|
586
622
|
monthOffset: month
|
|
587
623
|
}, month);
|
|
588
|
-
$[
|
|
589
|
-
$[
|
|
590
|
-
} else t8 = $[
|
|
624
|
+
$[22] = today;
|
|
625
|
+
$[23] = t8;
|
|
626
|
+
} else t8 = $[23];
|
|
591
627
|
t7 = /* @__PURE__ */ jsx("div", {
|
|
592
628
|
className: temporal_module_default.months,
|
|
593
629
|
children: Array.from({ length: months }, t8)
|
|
594
630
|
});
|
|
595
|
-
$[
|
|
596
|
-
$[
|
|
597
|
-
$[
|
|
598
|
-
} else t7 = $[
|
|
631
|
+
$[19] = months;
|
|
632
|
+
$[20] = today;
|
|
633
|
+
$[21] = t7;
|
|
634
|
+
} else t7 = $[21];
|
|
599
635
|
let t8;
|
|
600
|
-
if ($[
|
|
636
|
+
if ($[24] !== checkIcon || $[25] !== expandIcon || $[26] !== monthLabel || $[27] !== nextIcon || $[28] !== nextMonthLabel || $[29] !== noMatchingYearLabel || $[30] !== previousIcon || $[31] !== previousMonthLabel || $[32] !== t7 || $[33] !== yearLabel) {
|
|
601
637
|
t8 = /* @__PURE__ */ jsx(CalendarChrome, {
|
|
602
638
|
previousMonthLabel,
|
|
603
639
|
nextMonthLabel,
|
|
604
640
|
monthLabel,
|
|
605
641
|
yearLabel,
|
|
606
642
|
noMatchingYearLabel,
|
|
643
|
+
previousIcon,
|
|
644
|
+
nextIcon,
|
|
645
|
+
checkIcon,
|
|
646
|
+
expandIcon,
|
|
607
647
|
children: t7
|
|
608
648
|
});
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
611
|
-
$[
|
|
612
|
-
$[
|
|
613
|
-
$[
|
|
614
|
-
$[
|
|
615
|
-
$[
|
|
616
|
-
|
|
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];
|
|
617
661
|
let t9;
|
|
618
|
-
if ($[
|
|
662
|
+
if ($[35] !== props || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t8) {
|
|
619
663
|
t9 = /* @__PURE__ */ jsx(RangeCalendar, {
|
|
620
664
|
className: t4,
|
|
621
665
|
visibleDuration: t5,
|
|
@@ -623,13 +667,13 @@ var TemporalRangeCalendar = (t0) => {
|
|
|
623
667
|
...props,
|
|
624
668
|
children: t8
|
|
625
669
|
});
|
|
626
|
-
$[
|
|
627
|
-
$[
|
|
628
|
-
$[
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
$[
|
|
632
|
-
} else t9 = $[
|
|
670
|
+
$[35] = props;
|
|
671
|
+
$[36] = t4;
|
|
672
|
+
$[37] = t5;
|
|
673
|
+
$[38] = t6;
|
|
674
|
+
$[39] = t8;
|
|
675
|
+
$[40] = t9;
|
|
676
|
+
} else t9 = $[40];
|
|
633
677
|
return t9;
|
|
634
678
|
};
|
|
635
679
|
/**
|
|
@@ -645,7 +689,7 @@ var TemporalRangeCalendar = (t0) => {
|
|
|
645
689
|
var TemporalFrame = (t0) => {
|
|
646
690
|
const $ = c(43);
|
|
647
691
|
const { label, description, errors, requiredness, optionalLabel, dirty, touched, className, children } = t0;
|
|
648
|
-
const ids =
|
|
692
|
+
const ids = Field.useIds();
|
|
649
693
|
const { labelId, descriptionId, errorId, controlId } = ids;
|
|
650
694
|
let t1;
|
|
651
695
|
if ($[0] !== errors) {
|
|
@@ -26,7 +26,7 @@ export type StoredValueShape<T> = Readonly<{
|
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
28
|
* const filters = tableStoredValue(
|
|
29
|
-
* "
|
|
29
|
+
* "invoices",
|
|
30
30
|
* "filters",
|
|
31
31
|
* { schema: z.object({ status: z.array(z.string()) }), fallback: { status: [] } },
|
|
32
32
|
* localStorageAdapter,
|
|
@@ -38,6 +38,6 @@ export declare const tableStoredValue: <T>(tableId: string, name: string, { sche
|
|
|
38
38
|
* none is stored.
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
|
-
* storedPageSize("
|
|
41
|
+
* storedPageSize("hourly-rates", [10, 25, 50, 100], 10, localStorageAdapter).read(); // 50, or 10
|
|
42
42
|
*/
|
|
43
43
|
export declare const storedPageSize: (tableId: string, options: readonly number[], fallback: number, storage: StorageAdapter) => StoredValue<number>;
|
|
@@ -19,7 +19,7 @@ var check = (schema, value) => {
|
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* const filters = tableStoredValue(
|
|
22
|
-
* "
|
|
22
|
+
* "invoices",
|
|
23
23
|
* "filters",
|
|
24
24
|
* { schema: z.object({ status: z.array(z.string()) }), fallback: { status: [] } },
|
|
25
25
|
* localStorageAdapter,
|
|
@@ -53,7 +53,7 @@ var pageSizeSchema = (options) => ({ "~standard": {
|
|
|
53
53
|
* none is stored.
|
|
54
54
|
*
|
|
55
55
|
* @example
|
|
56
|
-
* storedPageSize("
|
|
56
|
+
* storedPageSize("hourly-rates", [10, 25, 50, 100], 10, localStorageAdapter).read(); // 50, or 10
|
|
57
57
|
*/
|
|
58
58
|
var storedPageSize = (tableId, options, fallback, storage) => tableStoredValue(tableId, "page-size", {
|
|
59
59
|
schema: pageSizeSchema(options),
|
|
@@ -2,8 +2,8 @@ import { ConfirmDialog } from "../../components/confirm-dialog/confirm-dialog.js
|
|
|
2
2
|
import { useBeforeUnload } from "./before-unload.js";
|
|
3
3
|
import { useUnsavedChanges } from "./registry.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import { useRef, useState } from "react";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { useRef, useState } from "react";
|
|
7
7
|
// src/lib/unsaved-changes/leave-guard.tsx
|
|
8
8
|
var STAY = () => void 0;
|
|
9
9
|
/**
|