@flipdish/ui-library 0.64.0 → 0.65.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/__internal__/overlay/PageScrollbarGutterRelease.cjs +18 -0
- package/dist/components/__internal__/overlay/PageScrollbarGutterRelease.cjs.map +1 -0
- package/dist/components/__internal__/overlay/PageScrollbarGutterRelease.d.ts +6 -0
- package/dist/components/__internal__/overlay/PageScrollbarGutterRelease.d.ts.map +1 -0
- package/dist/components/__internal__/overlay/PageScrollbarGutterRelease.js +16 -0
- package/dist/components/__internal__/overlay/PageScrollbarGutterRelease.js.map +1 -0
- package/dist/components/__internal__/popover/ScrollClosingPopover.cjs +5 -3
- package/dist/components/__internal__/popover/ScrollClosingPopover.cjs.map +1 -1
- package/dist/components/__internal__/popover/ScrollClosingPopover.d.ts.map +1 -1
- package/dist/components/__internal__/popover/ScrollClosingPopover.js +6 -4
- package/dist/components/__internal__/popover/ScrollClosingPopover.js.map +1 -1
- package/dist/components/__internal__/popover/hooks/useCloseOnTriggerScroll.cjs +7 -2
- package/dist/components/__internal__/popover/hooks/useCloseOnTriggerScroll.cjs.map +1 -1
- package/dist/components/__internal__/popover/hooks/useCloseOnTriggerScroll.d.ts +6 -0
- package/dist/components/__internal__/popover/hooks/useCloseOnTriggerScroll.d.ts.map +1 -1
- package/dist/components/__internal__/popover/hooks/useCloseOnTriggerScroll.js +7 -2
- package/dist/components/__internal__/popover/hooks/useCloseOnTriggerScroll.js.map +1 -1
- package/dist/components/forms/FormUnsavedChangesModal/index.cjs +2 -2
- package/dist/components/forms/FormUnsavedChangesModal/index.cjs.map +1 -1
- package/dist/components/forms/FormUnsavedChangesModal/index.d.ts +4 -2
- package/dist/components/forms/FormUnsavedChangesModal/index.d.ts.map +1 -1
- package/dist/components/forms/FormUnsavedChangesModal/index.js +2 -2
- package/dist/components/forms/FormUnsavedChangesModal/index.js.map +1 -1
- package/dist/components/molecules/EmptyState/index.cjs +11 -19
- package/dist/components/molecules/EmptyState/index.cjs.map +1 -1
- package/dist/components/molecules/EmptyState/index.d.ts.map +1 -1
- package/dist/components/molecules/EmptyState/index.js +11 -19
- package/dist/components/molecules/EmptyState/index.js.map +1 -1
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.cjs +90 -0
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.cjs.map +1 -0
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.d.ts +79 -0
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.d.ts.map +1 -0
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.js +83 -0
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.js.map +1 -0
- package/dist/components/molecules/Modal/index.d.ts +1 -1
- package/dist/components/molecules/Modal/index.d.ts.map +1 -1
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.cjs +8 -5
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.cjs.map +1 -1
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.d.ts +12 -5
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.d.ts.map +1 -1
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.js +9 -6
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.js.map +1 -1
- package/dist/components/molecules/Modals/Modal/Modal.cjs +76 -9
- package/dist/components/molecules/Modals/Modal/Modal.cjs.map +1 -1
- package/dist/components/molecules/Modals/Modal/Modal.d.ts +35 -1
- package/dist/components/molecules/Modals/Modal/Modal.d.ts.map +1 -1
- package/dist/components/molecules/Modals/Modal/Modal.js +77 -13
- package/dist/components/molecules/Modals/Modal/Modal.js.map +1 -1
- package/dist/components/molecules/Modals/Modal/utilities/modalBody.utils.cjs +15 -0
- package/dist/components/molecules/Modals/Modal/utilities/modalBody.utils.cjs.map +1 -0
- package/dist/components/molecules/Modals/Modal/utilities/modalBody.utils.d.ts +9 -0
- package/dist/components/molecules/Modals/Modal/utilities/modalBody.utils.d.ts.map +1 -0
- package/dist/components/molecules/Modals/Modal/utilities/modalBody.utils.js +13 -0
- package/dist/components/molecules/Modals/Modal/utilities/modalBody.utils.js.map +1 -0
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.cjs +4 -4
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.cjs.map +1 -1
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.d.ts +4 -2
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.d.ts.map +1 -1
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.js +5 -5
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.js.map +1 -1
- package/dist/components/molecules/Modals/index.cjs +3 -0
- package/dist/components/molecules/Modals/index.cjs.map +1 -1
- package/dist/components/molecules/Modals/index.d.ts +2 -2
- package/dist/components/molecules/Modals/index.d.ts.map +1 -1
- package/dist/components/molecules/Modals/index.js +1 -1
- package/dist/components/organisms/CommandMenu/components/CommandInput.cjs +3 -1
- package/dist/components/organisms/CommandMenu/components/CommandInput.cjs.map +1 -1
- package/dist/components/organisms/CommandMenu/components/CommandInput.d.ts.map +1 -1
- package/dist/components/organisms/CommandMenu/components/CommandInput.js +5 -3
- package/dist/components/organisms/CommandMenu/components/CommandInput.js.map +1 -1
- package/dist/components/organisms/CommandMenu/index.cjs +15 -2
- package/dist/components/organisms/CommandMenu/index.cjs.map +1 -1
- package/dist/components/organisms/CommandMenu/index.d.ts.map +1 -1
- package/dist/components/organisms/CommandMenu/index.js +15 -2
- package/dist/components/organisms/CommandMenu/index.js.map +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.js +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.cjs +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.js +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.js.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs +4 -2
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js +4 -2
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.cjs +11 -2
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.js +12 -3
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.js.map +1 -1
- package/dist/components/organisms/DatePickers/components/CalendarOverlay.cjs +6 -4
- package/dist/components/organisms/DatePickers/components/CalendarOverlay.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/components/CalendarOverlay.d.ts +4 -2
- package/dist/components/organisms/DatePickers/components/CalendarOverlay.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/components/CalendarOverlay.js +8 -6
- package/dist/components/organisms/DatePickers/components/CalendarOverlay.js.map +1 -1
- package/dist/components/organisms/DatePickers/providers/CalendarSheet.context.d.ts +7 -0
- package/dist/components/organisms/DatePickers/providers/CalendarSheet.context.d.ts.map +1 -0
- package/dist/components/organisms/DatePickers/providers/CalendarSurface.context.cjs +14 -0
- package/dist/components/organisms/DatePickers/providers/CalendarSurface.context.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/providers/CalendarSurface.context.d.ts +8 -0
- package/dist/components/organisms/DatePickers/providers/CalendarSurface.context.d.ts.map +1 -0
- package/dist/components/organisms/DatePickers/providers/CalendarSurface.context.js +12 -0
- package/dist/components/organisms/DatePickers/providers/CalendarSurface.context.js.map +1 -0
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.cjs +10 -7
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.cjs.map +1 -1
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.d.ts +14 -5
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.d.ts.map +1 -1
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.js +11 -8
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.js.map +1 -1
- package/dist/components/organisms/FilterBar/index.cjs +3 -1
- package/dist/components/organisms/FilterBar/index.cjs.map +1 -1
- package/dist/components/organisms/FilterBar/index.d.ts.map +1 -1
- package/dist/components/organisms/FilterBar/index.js +3 -1
- package/dist/components/organisms/FilterBar/index.js.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/MobileHeader.cjs +2 -1
- package/dist/components/organisms/HeaderNavigation/components/MobileHeader.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/MobileHeader.d.ts.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/MobileHeader.js +2 -1
- package/dist/components/organisms/HeaderNavigation/components/MobileHeader.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/MobileHeader.cjs +2 -1
- package/dist/components/organisms/SidebarNavigation/components/MobileHeader.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/MobileHeader.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/MobileHeader.js +2 -1
- package/dist/components/organisms/SidebarNavigation/components/MobileHeader.js.map +1 -1
- package/dist/components/organisms/SlideoutMenu/components/SlideoutShell.cjs +33 -11
- package/dist/components/organisms/SlideoutMenu/components/SlideoutShell.cjs.map +1 -1
- package/dist/components/organisms/SlideoutMenu/components/SlideoutShell.d.ts +4 -3
- package/dist/components/organisms/SlideoutMenu/components/SlideoutShell.d.ts.map +1 -1
- package/dist/components/organisms/SlideoutMenu/components/SlideoutShell.js +35 -13
- package/dist/components/organisms/SlideoutMenu/components/SlideoutShell.js.map +1 -1
- package/dist/components/organisms/SlideoutMenu/hooks/useFocusOnBecomingSheet.cjs +28 -0
- package/dist/components/organisms/SlideoutMenu/hooks/useFocusOnBecomingSheet.cjs.map +1 -0
- package/dist/components/organisms/SlideoutMenu/hooks/useFocusOnBecomingSheet.d.ts +20 -0
- package/dist/components/organisms/SlideoutMenu/hooks/useFocusOnBecomingSheet.d.ts.map +1 -0
- package/dist/components/organisms/SlideoutMenu/hooks/useFocusOnBecomingSheet.js +26 -0
- package/dist/components/organisms/SlideoutMenu/hooks/useFocusOnBecomingSheet.js.map +1 -0
- package/dist/components/organisms/SlideoutMenu/index.cjs +14 -8
- package/dist/components/organisms/SlideoutMenu/index.cjs.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.d.ts +8 -7
- package/dist/components/organisms/SlideoutMenu/index.d.ts.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.js +14 -8
- package/dist/components/organisms/SlideoutMenu/index.js.map +1 -1
- package/dist/hooks/__internal__/useReleasePageScrollbarGutter/useReleasePageScrollbarGutter.cjs +24 -0
- package/dist/hooks/__internal__/useReleasePageScrollbarGutter/useReleasePageScrollbarGutter.cjs.map +1 -0
- package/dist/hooks/__internal__/useReleasePageScrollbarGutter/useReleasePageScrollbarGutter.d.ts +10 -0
- package/dist/hooks/__internal__/useReleasePageScrollbarGutter/useReleasePageScrollbarGutter.d.ts.map +1 -0
- package/dist/hooks/__internal__/useReleasePageScrollbarGutter/useReleasePageScrollbarGutter.js +22 -0
- package/dist/hooks/__internal__/useReleasePageScrollbarGutter/useReleasePageScrollbarGutter.js.map +1 -0
- package/dist/hooks/useBreakpoints/index.cjs +6 -5
- package/dist/hooks/useBreakpoints/index.cjs.map +1 -1
- package/dist/hooks/useBreakpoints/index.d.ts +5 -5
- package/dist/hooks/useBreakpoints/index.d.ts.map +1 -1
- package/dist/hooks/useBreakpoints/index.js +6 -5
- package/dist/hooks/useBreakpoints/index.js.map +1 -1
- package/dist/styles.css +5 -0
- package/dist/utilities/__internal__/scrollUtils/scroll.utils.cjs +58 -0
- package/dist/utilities/__internal__/scrollUtils/scroll.utils.cjs.map +1 -1
- package/dist/utilities/__internal__/scrollUtils/scroll.utils.d.ts +8 -0
- package/dist/utilities/__internal__/scrollUtils/scroll.utils.d.ts.map +1 -1
- package/dist/utilities/__internal__/scrollUtils/scroll.utils.js +58 -1
- package/dist/utilities/__internal__/scrollUtils/scroll.utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ var React = require('react');
|
|
|
11
11
|
var reactAriaComponents = require('react-aria-components');
|
|
12
12
|
var SegmentedInputBase = require('../../../__internal__/segmentedInput/SegmentedInputBase.cjs');
|
|
13
13
|
var Cell = require('../components/Cell.cjs');
|
|
14
|
+
var CalendarSurface_context = require('../providers/CalendarSurface.context.cjs');
|
|
14
15
|
|
|
15
16
|
const RangeCalendarTitle = ({ part }) => {
|
|
16
17
|
const context = React.useContext(reactAriaComponents.RangeCalendarStateContext);
|
|
@@ -53,14 +54,22 @@ const MobilePresetButton = ({ value, children, ...props }) => {
|
|
|
53
54
|
*/
|
|
54
55
|
const RangeCalendar = ({ presets, visibleDuration, showOutOfRangeDates = false, showPresetsOnDesktop = false, 'data-testid': dataTestId, ...props }) => {
|
|
55
56
|
const isDesktop = useBreakpoints.useBreakpoints('md');
|
|
57
|
+
const surface = React.useContext(CalendarSurface_context.CalendarSurfaceContext);
|
|
58
|
+
const isInSheet = surface === 'sheet';
|
|
59
|
+
// The two date inputs below `md` belong to a `DateRangePicker`, which holds the dates they edit; on its own the calendar has none to give them.
|
|
60
|
+
const isInPicker = React.useContext(reactAriaComponents.DateRangePickerStateContext) !== null;
|
|
56
61
|
const visibleDurationMonths = visibleDuration?.months || (isDesktop ? 2 : 1);
|
|
57
62
|
// Adopt the ambient prefix from an ancestor (e.g. `DateRangePicker`) unchanged so ids stay
|
|
58
63
|
// flat (`<root>--cell-…`); only fall back to the standalone default when there is none.
|
|
59
64
|
const ambientPrefix = testIdUtils.useTestIdPrefix();
|
|
60
65
|
const calendarTestId = dataTestId ?? ambientPrefix ?? testIdUtils.rootTestId('range-calendar');
|
|
61
|
-
return (jsxRuntime.jsx(testIdUtils.TestIdProvider, { value: calendarTestId, children: jsxRuntime.jsxs(reactAriaComponents.RangeCalendar, { ...props, "data-testid": calendarTestId, className: (state) =>
|
|
66
|
+
return (jsxRuntime.jsx(testIdUtils.TestIdProvider, { value: calendarTestId, children: jsxRuntime.jsxs(reactAriaComponents.RangeCalendar, { ...props, "data-testid": calendarTestId, className: (state) =>
|
|
67
|
+
// In a picker the calendar is what scrolls, above the picker's actions and, in the sheet, under its header.
|
|
68
|
+
cx.cx('flex items-start',
|
|
69
|
+
// No sideways scroll: beside a scrollbar that takes width the 280px grid runs a little into the gutter instead.
|
|
70
|
+
surface && 'min-h-0 overflow-x-hidden overflow-y-auto', isInSheet && 'scrollbar-thin w-full', typeof props.className === 'function' ? props.className(state) : props.className), visibleDuration: {
|
|
62
71
|
months: visibleDurationMonths,
|
|
63
|
-
}, children: [jsxRuntime.jsxs("div", { className:
|
|
72
|
+
}, children: [jsxRuntime.jsxs("div", { className: cx.cx('flex min-w-0 flex-col gap-3 px-4 py-5 sm:px-6 md:gap-2', isInSheet && 'w-full px-6 pt-0'), children: [jsxRuntime.jsxs("div", { className: cx.cx('relative flex items-center', visibleDurationMonths > 1 ? 'justify-start' : 'justify-between'), children: [jsxRuntime.jsx(Buttons.Button, { slot: "previous", iconLeading: uiIcons.ChevronLeft, size: "sm", color: "tertiary", className: "size-8", "data-testid": testIdUtils.joinTestId(calendarTestId, 'prev') }), jsxRuntime.jsx("h2", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-sm font-semibold text-fg-secondary", children: jsxRuntime.jsx(RangeCalendarTitle, { part: "start" }) }), visibleDurationMonths === 1 && (jsxRuntime.jsx(Buttons.Button, { slot: "next", iconLeading: uiIcons.ChevronRight, size: "sm", color: "tertiary", className: "size-8", "data-testid": testIdUtils.joinTestId(calendarTestId, 'next') }))] }), !isDesktop && isInPicker && (jsxRuntime.jsxs("div", { className: "flex items-center gap-2 max-sm:gap-1 md:hidden", children: [jsxRuntime.jsx(SegmentedInputBase.SegmentedInputBase, { slot: "start", size: "sm", wrapperClassName: "min-w-0 flex-1", className: "max-sm:px-2" }), jsxRuntime.jsx("div", { className: "text-md text-quaternary", children: "\u2013" }), jsxRuntime.jsx(SegmentedInputBase.SegmentedInputBase, { slot: "end", size: "sm", wrapperClassName: "min-w-0 flex-1", className: "max-sm:px-2" })] })), (showPresetsOnDesktop || !isDesktop) && presets && (jsxRuntime.jsx("div", { className: "mt-1 flex flex-wrap gap-x-3 gap-y-1 px-2", children: Object.values(presets).map((preset) => (jsxRuntime.jsx(MobilePresetButton, { value: preset.value, children: preset.label }, preset.label))) })), jsxRuntime.jsxs(reactAriaComponents.CalendarGrid, { weekdayStyle: "short", className: cx.cx('w-max', isInSheet && 'self-center'), children: [jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader, { children: (day) => (jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell, { className: "border-b-4 border-transparent p-0", children: jsxRuntime.jsx("div", { className: "flex size-10 items-center justify-center text-sm font-medium text-secondary", children: day.slice(0, 2) }) })) }), jsxRuntime.jsx(reactAriaComponents.CalendarGridBody, { className: "[&_td]:p-0 [&_tr]:border-b-4 [&_tr]:border-transparent [&_tr:last-of-type]:border-none", children: (date) => jsxRuntime.jsx(Cell.CalendarCell, { date: date, showOutOfRangeDates: showOutOfRangeDates }) })] })] }), visibleDurationMonths > 1 && (jsxRuntime.jsxs("div", { className: "flex flex-col gap-3 border-l border-secondary px-6 py-5", children: [jsxRuntime.jsxs("div", { className: "relative flex items-center justify-end", children: [jsxRuntime.jsx("h2", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-sm font-semibold text-fg-secondary", children: jsxRuntime.jsx(RangeCalendarTitle, { part: "end" }) }), jsxRuntime.jsx(Buttons.Button, { slot: "next", iconLeading: uiIcons.ChevronRight, size: "sm", color: "tertiary", className: "size-8", "data-testid": testIdUtils.joinTestId(calendarTestId, 'next') })] }), jsxRuntime.jsxs(reactAriaComponents.CalendarGrid, { weekdayStyle: "short", offset: { months: 1 }, className: "w-max", children: [jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader, { children: (day) => (jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell, { className: "border-b-4 border-transparent p-0", children: jsxRuntime.jsx("div", { className: "flex size-10 items-center justify-center text-sm font-medium text-secondary", children: day.slice(0, 2) }) })) }), jsxRuntime.jsx(reactAriaComponents.CalendarGridBody, { className: "[&_td]:p-0 [&_tr]:border-b-4 [&_tr]:border-transparent [&_tr:last-of-type]:border-none", children: (date) => jsxRuntime.jsx(Cell.CalendarCell, { date: date, showOutOfRangeDates: showOutOfRangeDates }) })] })] }))] }) }));
|
|
64
73
|
};
|
|
65
74
|
|
|
66
75
|
exports.RangeCalendar = RangeCalendar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeCalendar.cjs","sources":["../../../../../src/components/organisms/DatePickers/RangeCalendar/RangeCalendar.tsx"],"sourcesContent":[null],"names":["useContext","RangeCalendarStateContext","useDateFormatter","useSlottedContext","RangeCalendarContext","useTestIdPrefix","joinTestId","slugifyTestId","_jsx","cx","Button","useBreakpoints","rootTestId","TestIdProvider","_jsxs","AriaRangeCalendar","ChevronLeft","ChevronRight","SegmentedInputBase","AriaCalendarGrid","AriaCalendarGridHeader","AriaCalendarHeaderCell","AriaCalendarGridBody","CalendarCell"],"mappings":"
|
|
1
|
+
{"version":3,"file":"RangeCalendar.cjs","sources":["../../../../../src/components/organisms/DatePickers/RangeCalendar/RangeCalendar.tsx"],"sourcesContent":[null],"names":["useContext","RangeCalendarStateContext","useDateFormatter","useSlottedContext","RangeCalendarContext","useTestIdPrefix","joinTestId","slugifyTestId","_jsx","cx","Button","useBreakpoints","CalendarSurfaceContext","DateRangePickerStateContext","rootTestId","TestIdProvider","_jsxs","AriaRangeCalendar","ChevronLeft","ChevronRight","SegmentedInputBase","AriaCalendarGrid","AriaCalendarGridHeader","AriaCalendarHeaderCell","AriaCalendarGridBody","CalendarCell"],"mappings":";;;;;;;;;;;;;;;AA8CA,MAAM,kBAAkB,GAAG,CAAC,EAAE,IAAI,EAA6B,KAAI;AACjE,IAAA,MAAM,OAAO,GAAGA,gBAAU,CAACC,6CAAyB,CAAC;IAErD,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC;IAC9F;IAEA,MAAM,SAAS,GAAGC,qBAAgB,CAAC;AACjC,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU;QACxD,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAC3B,KAAA,CAAC;IAEF,OAAO,IAAI,KAAK;AACd,UAAE,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;AACtE,UAAE,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACzE,CAAC;MAQY,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAA0B,KAAI;AAC/H,IAAA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Calendar/RangeCalendar.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"RangeCalendar.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/RangeCalendar/RangeCalendar.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAgBrG;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,GAAI,cAAc,iBAAiB,gCAQ3E,CAAC;AAqBF,UAAU,sBAAuB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IACxE,KAAK,EAAE;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,GAAG,EAAE,SAAS,CAAA;KAAE,CAAC;IAC5C,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,iBAAiB,GAAI,qEAAqE,sBAAsB,gCAuB5H,CAAC;AA6BF,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB,CAAC,SAAS,CAAC;IAC3E,8BAA8B;IAC9B,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;IAC/B,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE;YAAE,KAAK,EAAE,SAAS,CAAC;YAAC,GAAG,EAAE,SAAS,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IACzF,0CAA0C;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,0CAA0C;IAC1C,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,8GAO3B,kBAAkB,gCAkIpB,CAAC"}
|
|
@@ -6,9 +6,10 @@ import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
|
6
6
|
import { useTestIdPrefix, joinTestId, slugifyTestId, rootTestId, TestIdProvider } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
7
7
|
import { useDateFormatter } from '@react-aria/i18n';
|
|
8
8
|
import { useContext } from 'react';
|
|
9
|
-
import { useSlottedContext, RangeCalendarContext, RangeCalendar as RangeCalendar$1, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, RangeCalendarStateContext } from 'react-aria-components';
|
|
9
|
+
import { useSlottedContext, RangeCalendarContext, DateRangePickerStateContext, RangeCalendar as RangeCalendar$1, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, RangeCalendarStateContext } from 'react-aria-components';
|
|
10
10
|
import { SegmentedInputBase } from '../../../__internal__/segmentedInput/SegmentedInputBase.js';
|
|
11
11
|
import { CalendarCell } from '../components/Cell.js';
|
|
12
|
+
import { CalendarSurfaceContext } from '../providers/CalendarSurface.context.js';
|
|
12
13
|
|
|
13
14
|
const RangeCalendarTitle = ({ part }) => {
|
|
14
15
|
const context = useContext(RangeCalendarStateContext);
|
|
@@ -51,14 +52,22 @@ const MobilePresetButton = ({ value, children, ...props }) => {
|
|
|
51
52
|
*/
|
|
52
53
|
const RangeCalendar = ({ presets, visibleDuration, showOutOfRangeDates = false, showPresetsOnDesktop = false, 'data-testid': dataTestId, ...props }) => {
|
|
53
54
|
const isDesktop = useBreakpoints('md');
|
|
55
|
+
const surface = useContext(CalendarSurfaceContext);
|
|
56
|
+
const isInSheet = surface === 'sheet';
|
|
57
|
+
// The two date inputs below `md` belong to a `DateRangePicker`, which holds the dates they edit; on its own the calendar has none to give them.
|
|
58
|
+
const isInPicker = useContext(DateRangePickerStateContext) !== null;
|
|
54
59
|
const visibleDurationMonths = visibleDuration?.months || (isDesktop ? 2 : 1);
|
|
55
60
|
// Adopt the ambient prefix from an ancestor (e.g. `DateRangePicker`) unchanged so ids stay
|
|
56
61
|
// flat (`<root>--cell-…`); only fall back to the standalone default when there is none.
|
|
57
62
|
const ambientPrefix = useTestIdPrefix();
|
|
58
63
|
const calendarTestId = dataTestId ?? ambientPrefix ?? rootTestId('range-calendar');
|
|
59
|
-
return (jsx(TestIdProvider, { value: calendarTestId, children: jsxs(RangeCalendar$1, { ...props, "data-testid": calendarTestId, className: (state) =>
|
|
64
|
+
return (jsx(TestIdProvider, { value: calendarTestId, children: jsxs(RangeCalendar$1, { ...props, "data-testid": calendarTestId, className: (state) =>
|
|
65
|
+
// In a picker the calendar is what scrolls, above the picker's actions and, in the sheet, under its header.
|
|
66
|
+
cx('flex items-start',
|
|
67
|
+
// No sideways scroll: beside a scrollbar that takes width the 280px grid runs a little into the gutter instead.
|
|
68
|
+
surface && 'min-h-0 overflow-x-hidden overflow-y-auto', isInSheet && 'scrollbar-thin w-full', typeof props.className === 'function' ? props.className(state) : props.className), visibleDuration: {
|
|
60
69
|
months: visibleDurationMonths,
|
|
61
|
-
}, children: [jsxs("div", { className:
|
|
70
|
+
}, children: [jsxs("div", { className: cx('flex min-w-0 flex-col gap-3 px-4 py-5 sm:px-6 md:gap-2', isInSheet && 'w-full px-6 pt-0'), children: [jsxs("div", { className: cx('relative flex items-center', visibleDurationMonths > 1 ? 'justify-start' : 'justify-between'), children: [jsx(Button, { slot: "previous", iconLeading: ChevronLeft, size: "sm", color: "tertiary", className: "size-8", "data-testid": joinTestId(calendarTestId, 'prev') }), jsx("h2", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-sm font-semibold text-fg-secondary", children: jsx(RangeCalendarTitle, { part: "start" }) }), visibleDurationMonths === 1 && (jsx(Button, { slot: "next", iconLeading: ChevronRight, size: "sm", color: "tertiary", className: "size-8", "data-testid": joinTestId(calendarTestId, 'next') }))] }), !isDesktop && isInPicker && (jsxs("div", { className: "flex items-center gap-2 max-sm:gap-1 md:hidden", children: [jsx(SegmentedInputBase, { slot: "start", size: "sm", wrapperClassName: "min-w-0 flex-1", className: "max-sm:px-2" }), jsx("div", { className: "text-md text-quaternary", children: "\u2013" }), jsx(SegmentedInputBase, { slot: "end", size: "sm", wrapperClassName: "min-w-0 flex-1", className: "max-sm:px-2" })] })), (showPresetsOnDesktop || !isDesktop) && presets && (jsx("div", { className: "mt-1 flex flex-wrap gap-x-3 gap-y-1 px-2", children: Object.values(presets).map((preset) => (jsx(MobilePresetButton, { value: preset.value, children: preset.label }, preset.label))) })), jsxs(CalendarGrid, { weekdayStyle: "short", className: cx('w-max', isInSheet && 'self-center'), children: [jsx(CalendarGridHeader, { children: (day) => (jsx(CalendarHeaderCell, { className: "border-b-4 border-transparent p-0", children: jsx("div", { className: "flex size-10 items-center justify-center text-sm font-medium text-secondary", children: day.slice(0, 2) }) })) }), jsx(CalendarGridBody, { className: "[&_td]:p-0 [&_tr]:border-b-4 [&_tr]:border-transparent [&_tr:last-of-type]:border-none", children: (date) => jsx(CalendarCell, { date: date, showOutOfRangeDates: showOutOfRangeDates }) })] })] }), visibleDurationMonths > 1 && (jsxs("div", { className: "flex flex-col gap-3 border-l border-secondary px-6 py-5", children: [jsxs("div", { className: "relative flex items-center justify-end", children: [jsx("h2", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-sm font-semibold text-fg-secondary", children: jsx(RangeCalendarTitle, { part: "end" }) }), jsx(Button, { slot: "next", iconLeading: ChevronRight, size: "sm", color: "tertiary", className: "size-8", "data-testid": joinTestId(calendarTestId, 'next') })] }), jsxs(CalendarGrid, { weekdayStyle: "short", offset: { months: 1 }, className: "w-max", children: [jsx(CalendarGridHeader, { children: (day) => (jsx(CalendarHeaderCell, { className: "border-b-4 border-transparent p-0", children: jsx("div", { className: "flex size-10 items-center justify-center text-sm font-medium text-secondary", children: day.slice(0, 2) }) })) }), jsx(CalendarGridBody, { className: "[&_td]:p-0 [&_tr]:border-b-4 [&_tr]:border-transparent [&_tr:last-of-type]:border-none", children: (date) => jsx(CalendarCell, { date: date, showOutOfRangeDates: showOutOfRangeDates }) })] })] }))] }) }));
|
|
62
71
|
};
|
|
63
72
|
|
|
64
73
|
export { RangeCalendar, RangePresetButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeCalendar.js","sources":["../../../../../src/components/organisms/DatePickers/RangeCalendar/RangeCalendar.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","AriaRangeCalendar","AriaCalendarGrid","AriaCalendarGridHeader","AriaCalendarHeaderCell","AriaCalendarGridBody"],"mappings":"
|
|
1
|
+
{"version":3,"file":"RangeCalendar.js","sources":["../../../../../src/components/organisms/DatePickers/RangeCalendar/RangeCalendar.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","AriaRangeCalendar","AriaCalendarGrid","AriaCalendarGridHeader","AriaCalendarHeaderCell","AriaCalendarGridBody"],"mappings":";;;;;;;;;;;;;AA8CA,MAAM,kBAAkB,GAAG,CAAC,EAAE,IAAI,EAA6B,KAAI;AACjE,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,yBAAyB,CAAC;IAErD,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC;IAC9F;IAEA,MAAM,SAAS,GAAG,gBAAgB,CAAC;AACjC,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU;QACxD,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAC3B,KAAA,CAAC;IAEF,OAAO,IAAI,KAAK;AACd,UAAE,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,C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AAmB,EAAA,CAAI,EAAA,CAC5D,CAAA,EAAA,CACN,CAAA,EAAA,CACf,CACP,CAAA,EAAA,CACiB,EAAA,CACL;AAErB;;"}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var uiIcons = require('@flipdish/ui-icons');
|
|
4
5
|
var Modals = require('@flipdish/ui-library/components/molecules/Modals');
|
|
5
6
|
var useBreakpoints = require('@flipdish/ui-library/hooks/useBreakpoints');
|
|
6
7
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
7
8
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
8
9
|
var reactAriaComponents = require('react-aria-components');
|
|
9
10
|
var ScrollClosingPopover = require('../../../__internal__/popover/ScrollClosingPopover.cjs');
|
|
11
|
+
var CalendarSurface_context = require('../providers/CalendarSurface.context.cjs');
|
|
10
12
|
|
|
11
|
-
const CalendarOverlay = ({ 'aria-label': ariaLabel, 'data-testid': dataTestId, className, children }) => {
|
|
13
|
+
const CalendarOverlay = ({ 'aria-label': ariaLabel, 'data-testid': dataTestId, sheetTitle, className, children }) => {
|
|
12
14
|
const isDesktop = useBreakpoints.useBreakpoints('md');
|
|
13
15
|
const prefix = testIdUtils.useTestIdPrefix();
|
|
14
16
|
if (!isDesktop) {
|
|
15
17
|
// The picker's trigger state reaches ModalOverlay through react-aria's OverlayTriggerStateContext, so no open state is passed.
|
|
16
18
|
return (
|
|
17
|
-
//
|
|
18
|
-
jsxRuntime.jsx(Modals.ModalOverlay, { isDismissable: true,
|
|
19
|
+
// `Modal` is a bottom sheet below `md`, the same breakpoint this branch renders under.
|
|
20
|
+
jsxRuntime.jsx(Modals.ModalOverlay, { isDismissable: true, children: jsxRuntime.jsx(Modals.Modal, { children: jsxRuntime.jsx(testIdUtils.TestIdProvider, { value: prefix, children: jsxRuntime.jsx(Modals.Dialog, { "aria-label": ariaLabel, "data-testid": dataTestId, className: "flex flex-col overflow-hidden", children: (renderProps) => (jsxRuntime.jsxs(CalendarSurface_context.CalendarSurfaceContext.Provider, { value: "sheet", children: [jsxRuntime.jsx(Modals.ModalHeader, { icon: uiIcons.Calendar, title: sheetTitle }), jsxRuntime.jsx("div", { className: cx.cx('flex min-h-0 w-full flex-1 flex-col', className), children: children(renderProps) })] })) }) }) }) }));
|
|
19
21
|
}
|
|
20
22
|
return (jsxRuntime.jsx(ScrollClosingPopover.ScrollClosingPopover, { placement: "bottom right", offset: 8, className: ({ isEntering, isExiting }) => cx.cx('origin-(--trigger-anchor-point) will-change-transform', isEntering &&
|
|
21
23
|
'duration-150 ease-out animate-in fade-in placement-right:slide-in-from-left-0.5 placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5', isExiting &&
|
|
22
|
-
'duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5'), children: jsxRuntime.jsx(reactAriaComponents.Dialog, { "aria-label": ariaLabel, "data-testid": dataTestId, className: cx.cx('max-h-[inherit] overflow-
|
|
24
|
+
'duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5'), children: jsxRuntime.jsx(reactAriaComponents.Dialog, { "aria-label": ariaLabel, "data-testid": dataTestId, className: cx.cx('flex max-h-[inherit] flex-col overflow-hidden rounded-2xl bg-primary shadow-xl ring ring-secondary_alt', className), children: (renderProps) => jsxRuntime.jsx(CalendarSurface_context.CalendarSurfaceContext.Provider, { value: "popover", children: children(renderProps) }) }) }));
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
exports.CalendarOverlay = CalendarOverlay;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarOverlay.cjs","sources":["../../../../../src/components/organisms/DatePickers/components/CalendarOverlay.tsx"],"sourcesContent":[null],"names":["useBreakpoints","useTestIdPrefix","_jsx","ModalOverlay","Modal","TestIdProvider","Dialog","cx","ScrollClosingPopover","AriaDialog"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CalendarOverlay.cjs","sources":["../../../../../src/components/organisms/DatePickers/components/CalendarOverlay.tsx"],"sourcesContent":[null],"names":["useBreakpoints","useTestIdPrefix","_jsx","ModalOverlay","Modal","TestIdProvider","Dialog","_jsxs","CalendarSurfaceContext","ModalHeader","CalendarIcon","cx","ScrollClosingPopover","AriaDialog"],"mappings":";;;;;;;;;;;;MA0Ba,eAAe,GAAG,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAwB,KAAI;AAC/I,IAAA,MAAM,SAAS,GAAGA,6BAAc,CAAC,IAAI,CAAC;AACtC,IAAA,MAAM,MAAM,GAAGC,2BAAe,EAAE;IAEhC,IAAI,CAAC,SAAS,EAAE;;QAEd;;AAEE,QAAAC,cAAA,CAACC,mBAAY,EAAA,EAAC,aAAa,EAAA,IAAA,EAAA,QAAA,EACzBD,eAACE,YAAK,EAAA,EAAA,QAAA,EAEJF,cAAA,CAACG,0BAAc,IAAC,KAAK,EAAE,MAAM,EAAA,QAAA,EAC3BH,eAACI,aAAM,EAAA,EAAA,YAAA,EAAa,SAAS,EAAA,aAAA,EAAe,UAAU,EAAE,SAAS,EAAC,+BAA+B,YAC9F,CAAC,WAAW,MACXC,eAAA,CAACC,8CAAsB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAC,OAAO,EAAA,QAAA,EAAA,CAC5CN,cAAA,CAACO,kBAAW,EAAA,EAAC,IAAI,EAAEC,gBAAY,EAAE,KAAK,EAAE,UAAU,EAAA,CAAI,EAEtDR,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAES,KAAE,CAAC,qCAAqC,EAAE,SAAS,CAAC,EAAA,QAAA,EAAG,QAAQ,CAAC,WAAW,CAAC,EAAA,CAAO,CAAA,EAAA,CACnE,CACnC,EAAA,CACM,EAAA,CACM,EAAA,CACX,EAAA,CACK;IAEnB;IAEA,QACET,cAAA,CAACU,yCAAoB,EAAA,EACnB,SAAS,EAAC,cAAc,EACxB,MAAM,EAAE,CAAC,EACT,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,KACnCD,KAAE,CACA,uDAAuD,EACvD,UAAU;AACR,YAAA,+JAA+J,EACjK,SAAS;AACP,YAAA,6JAA6J,CAChK,EAAA,QAAA,EAIHT,cAAA,CAACW,0BAAU,EAAA,EAAA,YAAA,EACG,SAAS,iBACR,UAAU,EACvB,SAAS,EAAEF,KAAE,CAAC,wGAAwG,EAAE,SAAS,CAAC,YAEjI,CAAC,WAAW,KAAKT,cAAA,CAACM,8CAAsB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAC,SAAS,EAAA,QAAA,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAmC,EAAA,CACjH,EAAA,CACQ;AAE3B;;"}
|
|
@@ -5,11 +5,13 @@ interface CalendarOverlayProps {
|
|
|
5
5
|
'aria-label': string;
|
|
6
6
|
/** `data-testid` of the dialog, the same on both surfaces. */
|
|
7
7
|
'data-testid': string;
|
|
8
|
-
/**
|
|
8
|
+
/** Heading of the bottom sheet below `md`; the popover shows none. */
|
|
9
|
+
sheetTitle: string;
|
|
10
|
+
/** Extra classes for the popover's dialog, a column, or for the column under the header in the sheet. */
|
|
9
11
|
className?: string;
|
|
10
12
|
/** Dialog content; `close` dismisses whichever surface is showing. */
|
|
11
13
|
children: (renderProps: DialogRenderProps) => ReactNode;
|
|
12
14
|
}
|
|
13
|
-
export declare const CalendarOverlay: ({ "aria-label": ariaLabel, "data-testid": dataTestId, className, children }: CalendarOverlayProps) => import("react").JSX.Element;
|
|
15
|
+
export declare const CalendarOverlay: ({ "aria-label": ariaLabel, "data-testid": dataTestId, sheetTitle, className, children }: CalendarOverlayProps) => import("react").JSX.Element;
|
|
14
16
|
export {};
|
|
15
17
|
//# sourceMappingURL=CalendarOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarOverlay.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/components/CalendarOverlay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CalendarOverlay.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/components/CalendarOverlay.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAK/D,UAAU,oBAAoB;IAC5B,qCAAqC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,aAAa,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,yGAAyG;IACzG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,QAAQ,EAAE,CAAC,WAAW,EAAE,iBAAiB,KAAK,SAAS,CAAC;CACzD;AAED,eAAO,MAAM,eAAe,GAAI,yFAAyF,oBAAoB,gCAmD5I,CAAC"}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Calendar } from '@flipdish/ui-icons';
|
|
3
|
+
import { ModalOverlay, Modal, Dialog, ModalHeader } from '@flipdish/ui-library/components/molecules/Modals';
|
|
3
4
|
import { useBreakpoints } from '@flipdish/ui-library/hooks/useBreakpoints';
|
|
4
5
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
5
6
|
import { useTestIdPrefix, TestIdProvider } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
6
7
|
import { Dialog as Dialog$1 } from 'react-aria-components';
|
|
7
8
|
import { ScrollClosingPopover } from '../../../__internal__/popover/ScrollClosingPopover.js';
|
|
9
|
+
import { CalendarSurfaceContext } from '../providers/CalendarSurface.context.js';
|
|
8
10
|
|
|
9
|
-
const CalendarOverlay = ({ 'aria-label': ariaLabel, 'data-testid': dataTestId, className, children }) => {
|
|
11
|
+
const CalendarOverlay = ({ 'aria-label': ariaLabel, 'data-testid': dataTestId, sheetTitle, className, children }) => {
|
|
10
12
|
const isDesktop = useBreakpoints('md');
|
|
11
13
|
const prefix = useTestIdPrefix();
|
|
12
14
|
if (!isDesktop) {
|
|
13
15
|
// The picker's trigger state reaches ModalOverlay through react-aria's OverlayTriggerStateContext, so no open state is passed.
|
|
14
16
|
return (
|
|
15
|
-
//
|
|
16
|
-
jsx(ModalOverlay, { isDismissable: true,
|
|
17
|
+
// `Modal` is a bottom sheet below `md`, the same breakpoint this branch renders under.
|
|
18
|
+
jsx(ModalOverlay, { isDismissable: true, children: jsx(Modal, { children: jsx(TestIdProvider, { value: prefix, children: jsx(Dialog, { "aria-label": ariaLabel, "data-testid": dataTestId, className: "flex flex-col overflow-hidden", children: (renderProps) => (jsxs(CalendarSurfaceContext.Provider, { value: "sheet", children: [jsx(ModalHeader, { icon: Calendar, title: sheetTitle }), jsx("div", { className: cx('flex min-h-0 w-full flex-1 flex-col', className), children: children(renderProps) })] })) }) }) }) }));
|
|
17
19
|
}
|
|
18
20
|
return (jsx(ScrollClosingPopover, { placement: "bottom right", offset: 8, className: ({ isEntering, isExiting }) => cx('origin-(--trigger-anchor-point) will-change-transform', isEntering &&
|
|
19
21
|
'duration-150 ease-out animate-in fade-in placement-right:slide-in-from-left-0.5 placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5', isExiting &&
|
|
20
|
-
'duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5'), children: jsx(Dialog$1, { "aria-label": ariaLabel, "data-testid": dataTestId, className: cx('max-h-[inherit] overflow-
|
|
22
|
+
'duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5'), children: jsx(Dialog$1, { "aria-label": ariaLabel, "data-testid": dataTestId, className: cx('flex max-h-[inherit] flex-col overflow-hidden rounded-2xl bg-primary shadow-xl ring ring-secondary_alt', className), children: (renderProps) => jsx(CalendarSurfaceContext.Provider, { value: "popover", children: children(renderProps) }) }) }));
|
|
21
23
|
};
|
|
22
24
|
|
|
23
25
|
export { CalendarOverlay };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarOverlay.js","sources":["../../../../../src/components/organisms/DatePickers/components/CalendarOverlay.tsx"],"sourcesContent":[null],"names":["_jsx","AriaDialog"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CalendarOverlay.js","sources":["../../../../../src/components/organisms/DatePickers/components/CalendarOverlay.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","CalendarIcon","AriaDialog"],"mappings":";;;;;;;;;;MA0Ba,eAAe,GAAG,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAwB,KAAI;AAC/I,IAAA,MAAM,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC;AACtC,IAAA,MAAM,MAAM,GAAG,eAAe,EAAE;IAEhC,IAAI,CAAC,SAAS,EAAE;;QAEd;;AAEE,QAAAA,GAAA,CAAC,YAAY,EAAA,EAAC,aAAa,EAAA,IAAA,EAAA,QAAA,EACzBA,IAAC,KAAK,EAAA,EAAA,QAAA,EAEJA,GAAA,CAAC,cAAc,IAAC,KAAK,EAAE,MAAM,EAAA,QAAA,EAC3BA,IAAC,MAAM,EAAA,EAAA,YAAA,EAAa,SAAS,EAAA,aAAA,EAAe,UAAU,EAAE,SAAS,EAAC,+BAA+B,YAC9F,CAAC,WAAW,MACXC,IAAA,CAAC,sBAAsB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAC,OAAO,EAAA,QAAA,EAAA,CAC5CD,GAAA,CAAC,WAAW,EAAA,EAAC,IAAI,EAAEE,QAAY,EAAE,KAAK,EAAE,UAAU,EAAA,CAAI,EAEtDF,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,qCAAqC,EAAE,SAAS,CAAC,EAAA,QAAA,EAAG,QAAQ,CAAC,WAAW,CAAC,EAAA,CAAO,CAAA,EAAA,CACnE,CACnC,EAAA,CACM,EAAA,CACM,EAAA,CACX,EAAA,CACK;IAEnB;IAEA,QACEA,GAAA,CAAC,oBAAoB,EAAA,EACnB,SAAS,EAAC,cAAc,EACxB,MAAM,EAAE,CAAC,EACT,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,KACnC,EAAE,CACA,uDAAuD,EACvD,UAAU;AACR,YAAA,+JAA+J,EACjK,SAAS;AACP,YAAA,6JAA6J,CAChK,EAAA,QAAA,EAIHA,GAAA,CAACG,QAAU,EAAA,EAAA,YAAA,EACG,SAAS,iBACR,UAAU,EACvB,SAAS,EAAE,EAAE,CAAC,wGAAwG,EAAE,SAAS,CAAC,YAEjI,CAAC,WAAW,KAAKH,GAAA,CAAC,sBAAsB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAC,SAAS,EAAA,QAAA,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAmC,EAAA,CACjH,EAAA,CACQ;AAE3B;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `true` under the bottom sheet a picker opens below `md`. A calendar there spans the sheet inside the header's 24px
|
|
3
|
+
* gutters and drops its own top padding, which a calendar used on its own, or in the popover, must not do. Context,
|
|
4
|
+
* so `RangeCalendar` needs no public prop for it.
|
|
5
|
+
*/
|
|
6
|
+
export declare const CalendarSheetContext: import("react").Context<boolean>;
|
|
7
|
+
//# sourceMappingURL=CalendarSheet.context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarSheet.context.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/providers/CalendarSheet.context.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,kCAAuB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Which surface a picker has opened its calendar in: the popover from `md`, the bottom sheet below it, or `null` for
|
|
7
|
+
* a calendar used on its own. In either surface the calendar is what scrolls, between the header and the picker's
|
|
8
|
+
* actions; in the sheet it also spans the width inside the header's 24px gutters. Context, so `RangeCalendar` needs
|
|
9
|
+
* no public prop for it.
|
|
10
|
+
*/
|
|
11
|
+
const CalendarSurfaceContext = React.createContext(null);
|
|
12
|
+
|
|
13
|
+
exports.CalendarSurfaceContext = CalendarSurfaceContext;
|
|
14
|
+
//# sourceMappingURL=CalendarSurface.context.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarSurface.context.cjs","sources":["../../../../../src/components/organisms/DatePickers/providers/CalendarSurface.context.ts"],"sourcesContent":[null],"names":["createContext"],"mappings":";;;;AAIA;;;;;AAKG;MACU,sBAAsB,GAAGA,mBAAa,CAA6B,IAAI;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which surface a picker has opened its calendar in: the popover from `md`, the bottom sheet below it, or `null` for
|
|
3
|
+
* a calendar used on its own. In either surface the calendar is what scrolls, between the header and the picker's
|
|
4
|
+
* actions; in the sheet it also spans the width inside the header's 24px gutters. Context, so `RangeCalendar` needs
|
|
5
|
+
* no public prop for it.
|
|
6
|
+
*/
|
|
7
|
+
export declare const CalendarSurfaceContext: import("react").Context<"popover" | "sheet" | null>;
|
|
8
|
+
//# sourceMappingURL=CalendarSurface.context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarSurface.context.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/providers/CalendarSurface.context.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,qDAAkD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Which surface a picker has opened its calendar in: the popover from `md`, the bottom sheet below it, or `null` for
|
|
5
|
+
* a calendar used on its own. In either surface the calendar is what scrolls, between the header and the picker's
|
|
6
|
+
* actions; in the sheet it also spans the width inside the header's 24px gutters. Context, so `RangeCalendar` needs
|
|
7
|
+
* no public prop for it.
|
|
8
|
+
*/
|
|
9
|
+
const CalendarSurfaceContext = createContext(null);
|
|
10
|
+
|
|
11
|
+
export { CalendarSurfaceContext };
|
|
12
|
+
//# sourceMappingURL=CalendarSurface.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarSurface.context.js","sources":["../../../../../src/components/organisms/DatePickers/providers/CalendarSurface.context.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAIA;;;;;AAKG;MACU,sBAAsB,GAAG,aAAa,CAA6B,IAAI;;"}
|
|
@@ -3,31 +3,34 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var uiIcons = require('@flipdish/ui-icons');
|
|
5
5
|
var Buttons = require('@flipdish/ui-library/components/atoms/Buttons');
|
|
6
|
+
var Modals = require('@flipdish/ui-library/components/molecules/Modals');
|
|
7
|
+
var useBreakpoints = require('@flipdish/ui-library/hooks/useBreakpoints');
|
|
6
8
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
7
9
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
8
10
|
var reactAriaComponents = require('react-aria-components');
|
|
9
11
|
var ScrollClosingPopover = require('../../../__internal__/popover/ScrollClosingPopover.cjs');
|
|
10
12
|
|
|
11
|
-
const FilterDialog = ({ children, onApply, onClearAll, className }) => {
|
|
13
|
+
const FilterDialog = ({ children, onApply, onClearAll, className, isSheet = false, title = 'Filters' }) => {
|
|
12
14
|
const prefix = testIdUtils.useTestIdPrefix();
|
|
13
15
|
const dialogTestId = prefix ? testIdUtils.joinTestId(prefix, 'dialog') : undefined;
|
|
14
16
|
const clearTestId = prefix ? testIdUtils.joinTestId(prefix, 'clear') : undefined;
|
|
15
17
|
const applyTestId = prefix ? testIdUtils.joinTestId(prefix, 'apply') : undefined;
|
|
16
|
-
return (jsxRuntime.jsx(reactAriaComponents.Dialog, { "data-testid": dialogTestId, className: cx.cx('overflow-hidden rounded-lg
|
|
18
|
+
return (jsxRuntime.jsx(reactAriaComponents.Dialog, { "data-testid": dialogTestId, className: cx.cx('overflow-hidden bg-primary outline-hidden', isSheet ? 'flex max-h-[inherit] w-full flex-col' : 'rounded-lg shadow-lg ring-1 ring-secondary_alt', className), children: ({ close }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isSheet && jsxRuntime.jsx(Modals.ModalHeader, { icon: uiIcons.FilterLines, title: title }), jsxRuntime.jsx("div", { className: cx.cx('flex flex-wrap *:min-w-0 *:flex-1 *:basis-75', isSheet ? 'scrollbar-thin min-h-0 gap-6 overflow-y-auto px-6 py-4' : 'gap-x-4 gap-y-3 p-4'), children: children }), jsxRuntime.jsxs("div", { className: cx.cx('flex gap-3 border-t border-secondary', isSheet ? 'shrink-0 flex-col-reverse px-6 py-4' : 'items-center justify-end px-4 py-3'), children: [jsxRuntime.jsx(Buttons.Button, { size: isSheet ? 'sm' : 'xs', color: "secondary", onClick: () => onClearAll?.(), "data-testid": clearTestId, children: "Clear all" }), jsxRuntime.jsx(Buttons.Button, { size: isSheet ? 'sm' : 'xs', color: "primary", onClick: () => {
|
|
17
19
|
onApply?.();
|
|
18
20
|
close();
|
|
19
21
|
}, "data-testid": applyTestId, children: "Apply filter" })] })] })) }));
|
|
20
22
|
};
|
|
21
23
|
const CountBadge = ({ count, className }) => (jsxRuntime.jsx("span", { className: cx.cx('inline-flex items-center rounded-md border border-primary bg-primary px-1.5 py-0.5 text-xs leading-[18px] font-medium text-secondary shadow-xs', className), children: count }));
|
|
22
|
-
const FilterDropdown = ({ appliedCount, onApply, onClearAll, isDisabled, className, placement = 'bottom end', trigger, children, }) => {
|
|
24
|
+
const FilterDropdown = ({ appliedCount, onApply, onClearAll, isDisabled, className, placement = 'bottom end', title = 'Filters', trigger, children, }) => {
|
|
23
25
|
const hasApplied = appliedCount != null && appliedCount > 0;
|
|
26
|
+
const isDesktop = useBreakpoints.useBreakpoints('md');
|
|
24
27
|
const prefix = testIdUtils.useTestIdPrefix();
|
|
25
28
|
const triggerTestId = prefix ? testIdUtils.joinTestId(prefix, 'trigger') : undefined;
|
|
26
|
-
return (jsxRuntime.jsxs(reactAriaComponents.DialogTrigger, { children: [trigger ?? (jsxRuntime.jsx(Buttons.Button, { color: "secondary", size: "sm", iconLeading: uiIcons.FilterLines, iconTrailing: uiIcons.ChevronDown, isDisabled: isDisabled, "data-testid": triggerTestId, className: cx.cx('max-h-9', hasApplied && 'bg-primary_hover', className), children: jsxRuntime.jsxs("span", { className: "flex items-center gap-1.5", children: ["Filters", hasApplied && jsxRuntime.jsx(CountBadge, { count: appliedCount })] }) })), jsxRuntime.jsx(ScrollClosingPopover.ScrollClosingPopover, { placement: placement, offset: 4, containerPadding: 0, className: (state) => cx.cx(
|
|
27
|
-
// Below `md` the popover would shrink to its content; the viewport width minus 1rem each side keeps it a full-width panel.
|
|
28
|
-
'origin-(--trigger-anchor-point) w-[calc(100vw-2rem)] will-change-transform md:w-170', state.isEntering &&
|
|
29
|
+
return (jsxRuntime.jsxs(reactAriaComponents.DialogTrigger, { children: [trigger ?? (jsxRuntime.jsx(Buttons.Button, { color: "secondary", size: "sm", iconLeading: uiIcons.FilterLines, iconTrailing: uiIcons.ChevronDown, isDisabled: isDisabled, "data-testid": triggerTestId, className: cx.cx('max-h-9', hasApplied && 'bg-primary_hover', className), children: jsxRuntime.jsxs("span", { className: "flex items-center gap-1.5", children: ["Filters", hasApplied && jsxRuntime.jsx(CountBadge, { count: appliedCount })] }) })), isDesktop ? (jsxRuntime.jsx(ScrollClosingPopover.ScrollClosingPopover, { placement: placement, offset: 4, containerPadding: 0, className: (state) => cx.cx('w-170 origin-(--trigger-anchor-point) will-change-transform', state.isEntering &&
|
|
29
30
|
'duration-150 ease-out animate-in fade-in placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5', state.isExiting &&
|
|
30
|
-
'duration-100 ease-in animate-out fade-out placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5'), children: jsxRuntime.jsx(FilterDialog, { onApply: onApply, onClearAll: onClearAll, children: children }) })
|
|
31
|
+
'duration-100 ease-in animate-out fade-out placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5'), children: jsxRuntime.jsx(FilterDialog, { onApply: onApply, onClearAll: onClearAll, children: children }) })) : (
|
|
32
|
+
// A sheet below `md`: a popover there closes as the page scrolls and has no room for a column of fields.
|
|
33
|
+
jsxRuntime.jsx(Modals.ModalOverlay, { isDismissable: true, children: jsxRuntime.jsx(Modals.Modal, { children: jsxRuntime.jsx(testIdUtils.TestIdProvider, { value: prefix, children: jsxRuntime.jsx(FilterDialog, { isSheet: true, title: title, onApply: onApply, onClearAll: onClearAll, children: children }) }) }) }))] }));
|
|
31
34
|
};
|
|
32
35
|
|
|
33
36
|
exports.CountBadge = CountBadge;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterDropdownMenu.cjs","sources":["../../../../../src/components/organisms/FilterBar/components/FilterDropdownMenu.tsx"],"sourcesContent":[null],"names":["useTestIdPrefix","joinTestId","_jsx","AriaDialog","cx","_jsxs","_Fragment","Button","
|
|
1
|
+
{"version":3,"file":"FilterDropdownMenu.cjs","sources":["../../../../../src/components/organisms/FilterBar/components/FilterDropdownMenu.tsx"],"sourcesContent":[null],"names":["useTestIdPrefix","joinTestId","_jsx","AriaDialog","cx","_jsxs","_Fragment","ModalHeader","FilterLines","Button","useBreakpoints","AriaDialogTrigger","ChevronDown","ScrollClosingPopover","ModalOverlay","Modal","TestIdProvider"],"mappings":";;;;;;;;;;;;MA8Ba,YAAY,GAAG,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,GAAG,KAAK,EAAE,KAAK,GAAG,SAAS,EAA4B,KAAI;AACzI,IAAA,MAAM,MAAM,GAAGA,2BAAe,EAAE;AAChC,IAAA,MAAM,YAAY,GAAG,MAAM,GAAGC,sBAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS;AACtE,IAAA,MAAM,WAAW,GAAG,MAAM,GAAGA,sBAAU,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;AACpE,IAAA,MAAM,WAAW,GAAG,MAAM,GAAGA,sBAAU,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;AAEpE,IAAA,QACEC,cAAA,CAACC,0BAAU,EAAA,EAAA,aAAA,EACI,YAAY,EACzB,SAAS,EAAEC,KAAE,CACX,2CAA2C,EAC3C,OAAO,GAAG,sCAAsC,GAAG,gDAAgD,EACnG,SAAS,CACV,EAAA,QAAA,EAEA,CAAC,EAAE,KAAK,EAAE,MACTC,eAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,EAAA,CAEG,OAAO,IAAIJ,cAAA,CAACK,kBAAW,EAAA,EAAC,IAAI,EAAEC,mBAAW,EAAE,KAAK,EAAE,KAAK,EAAA,CAAI,EAC5DN,cAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAEE,KAAE,CACX,8CAA8C,EAC9C,OAAO,GAAG,wDAAwD,GAAG,qBAAqB,CAC3F,EAAA,QAAA,EAEA,QAAQ,GACL,EAGNC,eAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAED,KAAE,CACX,sCAAsC,EACtC,OAAO,GAAG,qC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ode } from 'react';
|
|
|
2
2
|
export interface FilterDialogProps {
|
|
3
3
|
/** The filter fields, one labelled `Select`, `MultiSelect` or `Input` each; they wrap into equal columns. */
|
|
4
4
|
children: ReactNode;
|
|
5
|
-
/** Called when "Apply filter" is pressed, just before the popover closes. */
|
|
5
|
+
/** Called when "Apply filter" is pressed, just before the popover or sheet closes. */
|
|
6
6
|
onApply?: () => void;
|
|
7
|
-
/** Called when "Clear all" is pressed; the popover stays open so the cleared fields are visible. */
|
|
7
|
+
/** Called when "Clear all" is pressed; the popover or sheet stays open so the cleared fields are visible. */
|
|
8
8
|
onClearAll?: () => void;
|
|
9
9
|
/** Additional class name */
|
|
10
10
|
className?: string;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
interface FilterDialogSurfaceProps extends FilterDialogProps {
|
|
13
|
+
/** Renders for the bottom sheet below `md`: the sheet supplies the surface, a header names it and closes it, the fields scroll and the buttons stack. */
|
|
14
|
+
isSheet?: boolean;
|
|
15
|
+
/** Heading of the sheet. */
|
|
16
|
+
title?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const FilterDialog: ({ children, onApply, onClearAll, className, isSheet, title }: FilterDialogSurfaceProps) => import("react").JSX.Element;
|
|
13
19
|
export interface FilterDropdownProps extends FilterDialogProps {
|
|
14
20
|
/** Number of applied (committed) filters to show in the badge. Only used by the default trigger. */
|
|
15
21
|
appliedCount?: number;
|
|
16
22
|
/** Whether the trigger is disabled. Only used by the default trigger. */
|
|
17
23
|
isDisabled?: boolean;
|
|
18
|
-
/** Popover placement relative to trigger */
|
|
24
|
+
/** Popover placement relative to the trigger; the bottom sheet below `md` ignores it. */
|
|
19
25
|
placement?: 'bottom' | 'bottom start' | 'bottom end';
|
|
26
|
+
/** Heading of the bottom sheet the filters open in below `md`, naming what is filtered, such as "Filter sales". The popover shows none. */
|
|
27
|
+
title?: string;
|
|
20
28
|
/** Custom trigger element. When provided, replaces the default "Filters" button. */
|
|
21
29
|
trigger?: ReactNode;
|
|
22
30
|
}
|
|
@@ -24,5 +32,6 @@ export declare const CountBadge: ({ count, className }: {
|
|
|
24
32
|
count: number;
|
|
25
33
|
className?: string;
|
|
26
34
|
}) => import("react").JSX.Element;
|
|
27
|
-
export declare const FilterDropdown: ({ appliedCount, onApply, onClearAll, isDisabled, className, placement, trigger, children, }: FilterDropdownProps) => import("react").JSX.Element;
|
|
35
|
+
export declare const FilterDropdown: ({ appliedCount, onApply, onClearAll, isDisabled, className, placement, title, trigger, children, }: FilterDropdownProps) => import("react").JSX.Element;
|
|
36
|
+
export {};
|
|
28
37
|
//# sourceMappingURL=FilterDropdownMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterDropdownMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/FilterBar/components/FilterDropdownMenu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterDropdownMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/FilterBar/components/FilterDropdownMenu.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,iBAAiB;IAChC,6GAA6G;IAC7G,QAAQ,EAAE,SAAS,CAAC;IACpB,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,6GAA6G;IAC7G,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,wBAAyB,SAAQ,iBAAiB;IAC1D,yJAAyJ;IACzJ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,YAAY,GAAI,8DAAkF,wBAAwB,gCAsDtI,CAAC;AAEF,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,oGAAoG;IACpG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yFAAyF;IACzF,SAAS,CAAC,EAAE,QAAQ,GAAG,cAAc,GAAG,YAAY,CAAC;IACrD,2IAA2I;IAC3I,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,GAAI,sBAAsB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,gCASrF,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,oGAU5B,mBAAmB,gCA2DrB,CAAC"}
|
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { ChevronDown, FilterLines } from '@flipdish/ui-icons';
|
|
3
3
|
import { Button } from '@flipdish/ui-library/components/atoms/Buttons';
|
|
4
|
+
import { ModalOverlay, Modal, ModalHeader } from '@flipdish/ui-library/components/molecules/Modals';
|
|
5
|
+
import { useBreakpoints } from '@flipdish/ui-library/hooks/useBreakpoints';
|
|
4
6
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
5
|
-
import { useTestIdPrefix, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
7
|
+
import { useTestIdPrefix, joinTestId, TestIdProvider } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
6
8
|
import { DialogTrigger, Dialog } from 'react-aria-components';
|
|
7
9
|
import { ScrollClosingPopover } from '../../../__internal__/popover/ScrollClosingPopover.js';
|
|
8
10
|
|
|
9
|
-
const FilterDialog = ({ children, onApply, onClearAll, className }) => {
|
|
11
|
+
const FilterDialog = ({ children, onApply, onClearAll, className, isSheet = false, title = 'Filters' }) => {
|
|
10
12
|
const prefix = useTestIdPrefix();
|
|
11
13
|
const dialogTestId = prefix ? joinTestId(prefix, 'dialog') : undefined;
|
|
12
14
|
const clearTestId = prefix ? joinTestId(prefix, 'clear') : undefined;
|
|
13
15
|
const applyTestId = prefix ? joinTestId(prefix, 'apply') : undefined;
|
|
14
|
-
return (jsx(Dialog, { "data-testid": dialogTestId, className: cx('overflow-hidden rounded-lg
|
|
16
|
+
return (jsx(Dialog, { "data-testid": dialogTestId, className: cx('overflow-hidden bg-primary outline-hidden', isSheet ? 'flex max-h-[inherit] w-full flex-col' : 'rounded-lg shadow-lg ring-1 ring-secondary_alt', className), children: ({ close }) => (jsxs(Fragment, { children: [isSheet && jsx(ModalHeader, { icon: FilterLines, title: title }), jsx("div", { className: cx('flex flex-wrap *:min-w-0 *:flex-1 *:basis-75', isSheet ? 'scrollbar-thin min-h-0 gap-6 overflow-y-auto px-6 py-4' : 'gap-x-4 gap-y-3 p-4'), children: children }), jsxs("div", { className: cx('flex gap-3 border-t border-secondary', isSheet ? 'shrink-0 flex-col-reverse px-6 py-4' : 'items-center justify-end px-4 py-3'), children: [jsx(Button, { size: isSheet ? 'sm' : 'xs', color: "secondary", onClick: () => onClearAll?.(), "data-testid": clearTestId, children: "Clear all" }), jsx(Button, { size: isSheet ? 'sm' : 'xs', color: "primary", onClick: () => {
|
|
15
17
|
onApply?.();
|
|
16
18
|
close();
|
|
17
19
|
}, "data-testid": applyTestId, children: "Apply filter" })] })] })) }));
|
|
18
20
|
};
|
|
19
21
|
const CountBadge = ({ count, className }) => (jsx("span", { className: cx('inline-flex items-center rounded-md border border-primary bg-primary px-1.5 py-0.5 text-xs leading-[18px] font-medium text-secondary shadow-xs', className), children: count }));
|
|
20
|
-
const FilterDropdown = ({ appliedCount, onApply, onClearAll, isDisabled, className, placement = 'bottom end', trigger, children, }) => {
|
|
22
|
+
const FilterDropdown = ({ appliedCount, onApply, onClearAll, isDisabled, className, placement = 'bottom end', title = 'Filters', trigger, children, }) => {
|
|
21
23
|
const hasApplied = appliedCount != null && appliedCount > 0;
|
|
24
|
+
const isDesktop = useBreakpoints('md');
|
|
22
25
|
const prefix = useTestIdPrefix();
|
|
23
26
|
const triggerTestId = prefix ? joinTestId(prefix, 'trigger') : undefined;
|
|
24
|
-
return (jsxs(DialogTrigger, { children: [trigger ?? (jsx(Button, { color: "secondary", size: "sm", iconLeading: FilterLines, iconTrailing: ChevronDown, isDisabled: isDisabled, "data-testid": triggerTestId, className: cx('max-h-9', hasApplied && 'bg-primary_hover', className), children: jsxs("span", { className: "flex items-center gap-1.5", children: ["Filters", hasApplied && jsx(CountBadge, { count: appliedCount })] }) })), jsx(ScrollClosingPopover, { placement: placement, offset: 4, containerPadding: 0, className: (state) => cx(
|
|
25
|
-
// Below `md` the popover would shrink to its content; the viewport width minus 1rem each side keeps it a full-width panel.
|
|
26
|
-
'origin-(--trigger-anchor-point) w-[calc(100vw-2rem)] will-change-transform md:w-170', state.isEntering &&
|
|
27
|
+
return (jsxs(DialogTrigger, { children: [trigger ?? (jsx(Button, { color: "secondary", size: "sm", iconLeading: FilterLines, iconTrailing: ChevronDown, isDisabled: isDisabled, "data-testid": triggerTestId, className: cx('max-h-9', hasApplied && 'bg-primary_hover', className), children: jsxs("span", { className: "flex items-center gap-1.5", children: ["Filters", hasApplied && jsx(CountBadge, { count: appliedCount })] }) })), isDesktop ? (jsx(ScrollClosingPopover, { placement: placement, offset: 4, containerPadding: 0, className: (state) => cx('w-170 origin-(--trigger-anchor-point) will-change-transform', state.isEntering &&
|
|
27
28
|
'duration-150 ease-out animate-in fade-in placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5', state.isExiting &&
|
|
28
|
-
'duration-100 ease-in animate-out fade-out placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5'), children: jsx(FilterDialog, { onApply: onApply, onClearAll: onClearAll, children: children }) })
|
|
29
|
+
'duration-100 ease-in animate-out fade-out placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5'), children: jsx(FilterDialog, { onApply: onApply, onClearAll: onClearAll, children: children }) })) : (
|
|
30
|
+
// A sheet below `md`: a popover there closes as the page scrolls and has no room for a column of fields.
|
|
31
|
+
jsx(ModalOverlay, { isDismissable: true, children: jsx(Modal, { children: jsx(TestIdProvider, { value: prefix, children: jsx(FilterDialog, { isSheet: true, title: title, onApply: onApply, onClearAll: onClearAll, children: children }) }) }) }))] }));
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
export { CountBadge, FilterDialog, FilterDropdown };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterDropdownMenu.js","sources":["../../../../../src/components/organisms/FilterBar/components/FilterDropdownMenu.tsx"],"sourcesContent":[null],"names":["_jsx","AriaDialog","_jsxs","_Fragment","AriaDialogTrigger"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterDropdownMenu.js","sources":["../../../../../src/components/organisms/FilterBar/components/FilterDropdownMenu.tsx"],"sourcesContent":[null],"names":["_jsx","AriaDialog","_jsxs","_Fragment","AriaDialogTrigger"],"mappings":";;;;;;;;;;MA8Ba,YAAY,GAAG,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,GAAG,KAAK,EAAE,KAAK,GAAG,SAAS,EAA4B,KAAI;AACzI,IAAA,MAAM,MAAM,GAAG,eAAe,EAAE;AAChC,IAAA,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS;AACtE,IAAA,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;AACpE,IAAA,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;AAEpE,IAAA,QACEA,GAAA,CAACC,MAAU,EAAA,EAAA,aAAA,EACI,YAAY,EACzB,SAAS,EAAE,EAAE,CACX,2CAA2C,EAC3C,OAAO,GAAG,sCAAsC,GAAG,gDAAgD,EACnG,SAAS,CACV,EAAA,QAAA,EAEA,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