@memobit/libs 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.css +1 -0
- package/dist/components/Accordion/Accordion2.js +79 -0
- package/dist/components/AlertDialog/AlertDialog.css +1 -0
- package/dist/components/AlertDialog/AlertDialog2.js +26 -0
- package/dist/components/AnalogClock/AnalogClock.css +1 -0
- package/dist/components/AnalogClock/AnalogClock2.js +293 -0
- package/dist/components/AngleSlider/AngleSlider.css +1 -0
- package/dist/components/AngleSlider/AngleSlider2.js +135 -0
- package/dist/components/AppHeader/AppHeader.css +1 -0
- package/dist/components/AppHeader/AppHeader2.js +44 -0
- package/dist/components/Auth/ChangePasswordModal/ChangePasswordModal.css +1 -0
- package/dist/components/Auth/ChangePasswordModal/ChangePasswordModal2.js +138 -0
- package/dist/components/Auth/Login/Login.css +1 -0
- package/dist/components/Auth/Login/Login2.js +155 -0
- package/dist/components/Auth/MfaSetupModal/MfaSetupModal.css +1 -0
- package/dist/components/Auth/MfaSetupModal/MfaSetupModal2.js +327 -0
- package/dist/components/AvatarInitials/AvatarInitials.css +1 -0
- package/dist/components/AvatarInitials/AvatarInitials2.js +73 -0
- package/dist/components/BMI/BMI.css +1 -0
- package/dist/components/BMI/BMI2.js +53 -0
- package/dist/components/BMI/bmiUtils.js +265 -0
- package/dist/components/Badge/Badge.css +1 -0
- package/dist/components/Badge/Badge2.js +30 -0
- package/dist/components/Banner/Banner.css +1 -0
- package/dist/components/Banner/Banner2.js +57 -0
- package/dist/components/Blockquote/Blockquote.css +1 -0
- package/dist/components/Blockquote/Blockquote2.js +55 -0
- package/dist/components/Breadcrumb/Breadcrumb.css +1 -0
- package/dist/components/Breadcrumb/Breadcrumb2.js +36 -0
- package/dist/components/BulkActionBar/BulkActionBar.css +1 -0
- package/dist/components/BulkActionBar/BulkActionBar2.js +39 -0
- package/dist/components/Button/Button.css +1 -0
- package/dist/components/Button/Button2.js +32 -0
- package/dist/components/Calendar/Calendar.css +1 -0
- package/dist/components/Calendar/Calendar2.js +279 -0
- package/dist/components/CalendarHeatmap/CalendarHeatmap.css +1 -0
- package/dist/components/CalendarHeatmap/CalendarHeatmap2.js +91 -0
- package/dist/components/Card/Card.css +1 -0
- package/dist/components/Card/Card2.js +47 -0
- package/dist/components/Checkbox/Checkbox.css +1 -0
- package/dist/components/Checkbox/Checkbox2.js +35 -0
- package/dist/components/Chip/Chip.css +1 -0
- package/dist/components/Chip/Chip2.js +31 -0
- package/dist/components/CollapsibleSection/CollapsibleSection.css +1 -0
- package/dist/components/CollapsibleSection/CollapsibleSection2.js +68 -0
- package/dist/components/ColorPicker/ColorPicker.css +1 -0
- package/dist/components/ColorPicker/ColorPicker2.js +257 -0
- package/dist/components/CommandPalette/CommandPalette.css +1 -0
- package/dist/components/CommandPalette/CommandPalette2.js +97 -0
- package/dist/components/Confetti/Confetti.css +1 -0
- package/dist/components/Confetti/Confetti2.js +175 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.css +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog2.js +37 -0
- package/dist/components/ConfirmPopover/ConfirmPopover.css +1 -0
- package/dist/components/ConfirmPopover/ConfirmPopover2.js +55 -0
- package/dist/components/ContextMenu/ContextMenu.css +1 -0
- package/dist/components/ContextMenu/ContextMenu2.js +53 -0
- package/dist/components/ContextToast/ContextToast.css +1 -0
- package/dist/components/ContextToast/ContextToast2.js +96 -0
- package/dist/components/ControlPanel/ControlPanel.css +1 -0
- package/dist/components/ControlPanel/ControlPanel.types.js +21 -0
- package/dist/components/ControlPanel/ControlPanel2.js +137 -0
- package/dist/components/ControlPanel/ControlPanelContext.js +31 -0
- package/dist/components/ControlPanel/ControlPanelFilter.js +386 -0
- package/dist/components/ControlPanel/ControlPanelNav.js +74 -0
- package/dist/components/ControlPanel/ControlPanelOptions.js +197 -0
- package/dist/components/CopyButton/CopyButton.css +1 -0
- package/dist/components/CopyButton/CopyButton2.js +48 -0
- package/dist/components/CountryWithFlag/CountryWithFlag.css +1 -0
- package/dist/components/CountryWithFlag/CountryWithFlag2.js +21 -0
- package/dist/components/DataView/DataView.CardView.js +189 -0
- package/dist/components/DataView/DataView.ColumnSelector.js +51 -0
- package/dist/components/DataView/DataView.MiniSort.js +25 -0
- package/dist/components/DataView/DataView.css +1 -0
- package/dist/components/DataView/DataView2.js +433 -0
- package/dist/components/DatePicker/DatePicker.css +1 -0
- package/dist/components/DatePicker/DatePicker2.js +151 -0
- package/dist/components/DateRangePicker/DateRangePicker.css +1 -0
- package/dist/components/DateRangePicker/DateRangePicker2.js +223 -0
- package/dist/components/DayAgenda/DayAgenda.css +1 -0
- package/dist/components/DayAgenda/DayAgenda2.js +120 -0
- package/dist/components/DiffViewer/DiffViewer.css +1 -0
- package/dist/components/DiffViewer/DiffViewer2.js +270 -0
- package/dist/components/Drawer/Drawer.css +1 -0
- package/dist/components/Drawer/Drawer2.js +119 -0
- package/dist/components/Dropdown/Dropdown.css +1 -0
- package/dist/components/Dropdown/Dropdown2.js +413 -0
- package/dist/components/EmojiPicker/EmojiPicker.css +1 -0
- package/dist/components/EmojiPicker/EmojiPicker2.js +789 -0
- package/dist/components/EmojiPicker/emojiKeywords/activities.js +508 -0
- package/dist/components/EmojiPicker/emojiKeywords/animals.js +501 -0
- package/dist/components/EmojiPicker/emojiKeywords/food.js +540 -0
- package/dist/components/EmojiPicker/emojiKeywords/index.js +21 -0
- package/dist/components/EmojiPicker/emojiKeywords/objects.js +652 -0
- package/dist/components/EmojiPicker/emojiKeywords/people.js +488 -0
- package/dist/components/EmojiPicker/emojiKeywords/smileys.js +538 -0
- package/dist/components/EmojiPicker/emojiKeywords/symbols.js +597 -0
- package/dist/components/EmojiPicker/emojiKeywords/travel.js +507 -0
- package/dist/components/EmptyState/EmptyState.css +1 -0
- package/dist/components/EmptyState/EmptyState2.js +47 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.css +1 -0
- package/dist/components/ErrorBoundary/ErrorBoundary2.js +37 -0
- package/dist/components/EventCalendar/EventCalendar.Chip.js +45 -0
- package/dist/components/EventCalendar/EventCalendar.Month.js +118 -0
- package/dist/components/EventCalendar/EventCalendar.Week.js +131 -0
- package/dist/components/EventCalendar/EventCalendar.css +1 -0
- package/dist/components/EventCalendar/EventCalendar.helpers.js +72 -0
- package/dist/components/EventCalendar/EventCalendar2.js +157 -0
- package/dist/components/FileDropzone/FileDropzone.css +1 -0
- package/dist/components/FileDropzone/FileDropzone2.js +71 -0
- package/dist/components/Flag/Flag.css +1 -0
- package/dist/components/Flag/Flag2.js +36 -0
- package/dist/components/FloatButton/FloatButton.css +1 -0
- package/dist/components/FloatButton/FloatButton2.js +68 -0
- package/dist/components/FloatingWindow/FloatingWindow.css +1 -0
- package/dist/components/FloatingWindow/FloatingWindow2.js +203 -0
- package/dist/components/FolderBrowserModal/FolderBrowserModal.css +1 -0
- package/dist/components/FolderBrowserModal/FolderBrowserModal2.js +144 -0
- package/dist/components/Grid/Col.js +17 -0
- package/dist/components/Grid/Grid.css +1 -0
- package/dist/components/Grid/Grid2.js +28 -0
- package/dist/components/Icon/Icon.css +1 -0
- package/dist/components/Icon/Icon2.js +23 -0
- package/dist/components/IconPicker/IconPicker.css +1 -0
- package/dist/components/IconPicker/IconPicker2.js +51 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.css +1 -0
- package/dist/components/InfiniteScroll/InfiniteScroll2.js +66 -0
- package/dist/components/InputDate/InputDate.css +1 -0
- package/dist/components/InputDate/InputDate2.js +87 -0
- package/dist/components/InputEmail/InputEmail.css +1 -0
- package/dist/components/InputEmail/InputEmail2.js +73 -0
- package/dist/components/InputFile/InputFile.css +1 -0
- package/dist/components/InputFile/InputFile2.js +41 -0
- package/dist/components/InputMask/InputMask.css +1 -0
- package/dist/components/InputMask/InputMask2.js +163 -0
- package/dist/components/InputNumber/InputNumber.css +1 -0
- package/dist/components/InputNumber/InputNumber2.js +60 -0
- package/dist/components/InputPIN/InputPIN.css +1 -0
- package/dist/components/InputPIN/InputPIN2.js +121 -0
- package/dist/components/InputPassword/InputPassword.css +1 -0
- package/dist/components/InputPassword/InputPassword2.js +47 -0
- package/dist/components/InputPhone/InputPhone.css +1 -0
- package/dist/components/InputPhone/InputPhone2.js +82 -0
- package/dist/components/InputSearch/InputSearch.css +1 -0
- package/dist/components/InputSearch/InputSearch2.js +53 -0
- package/dist/components/InputText/InputText.css +1 -0
- package/dist/components/InputText/InputText2.js +47 -0
- package/dist/components/InputTextarea/InputTextarea.css +1 -0
- package/dist/components/InputTextarea/InputTextarea2.js +46 -0
- package/dist/components/InputTime/InputTime.css +1 -0
- package/dist/components/InputTime/InputTime2.js +85 -0
- package/dist/components/InputUrl/InputUrl.css +1 -0
- package/dist/components/InputUrl/InputUrl2.js +65 -0
- package/dist/components/JourneyWizard/JourneyWizard.css +1 -0
- package/dist/components/JourneyWizard/JourneyWizard2.js +147 -0
- package/dist/components/List/List.css +1 -0
- package/dist/components/List/List2.js +28 -0
- package/dist/components/Loading/Loading.css +1 -0
- package/dist/components/Loading/Loading2.js +11 -0
- package/dist/components/MenuHamburger/MenuHamburger.css +1 -0
- package/dist/components/MenuHamburger/MenuHamburger2.js +65 -0
- package/dist/components/MiniSort/MiniSort.css +1 -0
- package/dist/components/MiniSort/MiniSort2.js +52 -0
- package/dist/components/MiniStatsCard/MiniStatsCard.css +1 -0
- package/dist/components/MiniStatsCard/MiniStatsCard2.js +67 -0
- package/dist/components/Minimap/Minimap.css +1 -0
- package/dist/components/Minimap/Minimap2.js +62 -0
- package/dist/components/Modal/Modal.css +1 -0
- package/dist/components/Modal/Modal2.js +87 -0
- package/dist/components/NavBar/NavBar.css +1 -0
- package/dist/components/NavBar/NavBar2.js +64 -0
- package/dist/components/NotificationPanel/NotificationPanel.css +1 -0
- package/dist/components/NotificationPanel/NotificationPanel2.js +66 -0
- package/dist/components/Pagination/Pagination.css +1 -0
- package/dist/components/Pagination/Pagination2.js +92 -0
- package/dist/components/PieChart/PieChart.css +1 -0
- package/dist/components/PieChart/PieChart2.js +142 -0
- package/dist/components/Popover/Popover.css +1 -0
- package/dist/components/Popover/Popover2.js +109 -0
- package/dist/components/Popover/hooks/Popover.hook.js +33 -0
- package/dist/components/ProgressBar/ProgressBar.css +1 -0
- package/dist/components/ProgressBar/ProgressBar2.js +48 -0
- package/dist/components/ProgressRing/ProgressRing.css +1 -0
- package/dist/components/ProgressRing/ProgressRing2.js +54 -0
- package/dist/components/QuantitySelector/QuantitySelector.css +1 -0
- package/dist/components/QuantitySelector/QuantitySelector2.js +94 -0
- package/dist/components/QuickAdd/QuickAdd.css +1 -0
- package/dist/components/QuickAdd/QuickAdd2.js +56 -0
- package/dist/components/QuickNumberUpdate/QuickNumberUpdate.css +1 -0
- package/dist/components/QuickNumberUpdate/QuickNumberUpdate2.js +52 -0
- package/dist/components/QuickOptionUpdate/QuickOptionUpdate.css +1 -0
- package/dist/components/QuickOptionUpdate/QuickOptionUpdate2.js +67 -0
- package/dist/components/Radio/Radio.css +1 -0
- package/dist/components/Radio/Radio2.js +36 -0
- package/dist/components/RangeSlider/RangeSlider.css +1 -0
- package/dist/components/RangeSlider/RangeSlider2.js +157 -0
- package/dist/components/Rating/Rating.css +1 -0
- package/dist/components/Rating/Rating2.js +148 -0
- package/dist/components/Rating/RatingIcon.js +102 -0
- package/dist/components/RichTextEditor/RichTextEditor.css +1 -0
- package/dist/components/RichTextEditor/RichTextEditor2.js +212 -0
- package/dist/components/RichTextEditor/RteLinkPrompt.js +42 -0
- package/dist/components/RichTextEditor/RteTableToolbar.js +95 -0
- package/dist/components/RichTextEditor/RteToolbar.js +106 -0
- package/dist/components/RichTextEditor/helpers.js +73 -0
- package/dist/components/RichTextEditor/hooks/useEditorHistory.js +39 -0
- package/dist/components/RichTextEditor/hooks/useLinkPrompt.js +61 -0
- package/dist/components/RichTextEditor/hooks/useTableOps.js +134 -0
- package/dist/components/RollingNumber/RollingNumber.css +1 -0
- package/dist/components/RollingNumber/RollingNumber2.js +71 -0
- package/dist/components/ScrollToTop/ScrollToTop.css +1 -0
- package/dist/components/ScrollToTop/ScrollToTop2.js +40 -0
- package/dist/components/Separator/Separator.css +1 -0
- package/dist/components/Separator/Separator2.js +39 -0
- package/dist/components/Sidebar/Sidebar.css +1 -0
- package/dist/components/Sidebar/Sidebar2.js +115 -0
- package/dist/components/Sidebar/SidebarContext.js +31 -0
- package/dist/components/SignalStrength/SignalStrength.css +1 -0
- package/dist/components/SignalStrength/SignalStrength2.js +56 -0
- package/dist/components/Skeleton/Skeleton.css +1 -0
- package/dist/components/Skeleton/Skeleton2.js +50 -0
- package/dist/components/Slider/Slider.css +1 -0
- package/dist/components/Slider/Slider2.js +39 -0
- package/dist/components/SplitPanel/SplitPanel.css +1 -0
- package/dist/components/SplitPanel/SplitPanel2.js +69 -0
- package/dist/components/Splitter/Splitter.css +1 -0
- package/dist/components/Splitter/Splitter2.js +89 -0
- package/dist/components/StackedBar/StackedBar.css +1 -0
- package/dist/components/StackedBar/StackedBar2.js +50 -0
- package/dist/components/Stats/Stats.css +1 -0
- package/dist/components/Stats/Stats2.js +26 -0
- package/dist/components/StickyBar/StickyBar.css +1 -0
- package/dist/components/StickyBar/StickyBar2.js +29 -0
- package/dist/components/SuggestionsList/SuggestionsList.css +1 -0
- package/dist/components/SuggestionsList/SuggestionsList2.js +121 -0
- package/dist/components/ThemeSettings/ThemeContext.js +138 -0
- package/dist/components/ThemeSettings/ThemeContextValue.js +5 -0
- package/dist/components/ThemeSettings/ThemeSettings.css +1 -0
- package/dist/components/ThemeSettings/ThemeSettings2.js +245 -0
- package/dist/components/ThemeSettings/themeConfig.js +7 -0
- package/dist/components/ThemeSettings/useTheme.js +10 -0
- package/dist/components/TimePicker/TimePicker.css +1 -0
- package/dist/components/TimePicker/TimePicker2.js +118 -0
- package/dist/components/TimePicker/TimeSpinner.js +59 -0
- package/dist/components/Timeline/Timeline.css +1 -0
- package/dist/components/Timeline/Timeline2.js +57 -0
- package/dist/components/TimelineMarkers/TimelineMarkers.css +1 -0
- package/dist/components/TimelineMarkers/TimelineMarkers2.js +73 -0
- package/dist/components/TipsOfTheDay/TipsOfTheDay.css +1 -0
- package/dist/components/TipsOfTheDay/TipsOfTheDay2.js +24 -0
- package/dist/components/Toast/Toast.css +1 -0
- package/dist/components/Toast/Toast2.js +39 -0
- package/dist/components/ToggleButtons/ToggleButtons.css +1 -0
- package/dist/components/ToggleButtons/ToggleButtons2.js +47 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.css +1 -0
- package/dist/components/ToggleSwitch/ToggleSwitch2.js +27 -0
- package/dist/components/Toolbar/Toolbar.css +1 -0
- package/dist/components/Toolbar/Toolbar2.js +129 -0
- package/dist/components/Tooltip/Tooltip.css +1 -0
- package/dist/components/Tooltip/Tooltip2.js +93 -0
- package/dist/components/TourHud/TourHud.css +1 -0
- package/dist/components/TourHud/TourHud2.js +70 -0
- package/dist/components/Transition/Transition.css +1 -0
- package/dist/components/Transition/Transition2.js +68 -0
- package/dist/components/Tree/Tree.css +1 -0
- package/dist/components/Tree/Tree2.js +95 -0
- package/dist/components/VirtualList/VirtualList.css +1 -0
- package/dist/components/VirtualList/VirtualList2.js +64 -0
- package/dist/components/WHtR/WHtR.css +1 -0
- package/dist/components/WHtR/WHtR2.js +115 -0
- package/dist/contexts/AuthContext/AuthContext.js +113 -0
- package/dist/helpers/AppPersistenceStorage.js +50 -0
- package/dist/helpers/Datetime.js +114 -0
- package/dist/helpers/Format.js +21 -0
- package/dist/helpers/Highlight.js +36 -0
- package/dist/helpers/HtmlContent.js +118 -0
- package/dist/helpers/LogicalOperators.js +15 -0
- package/dist/helpers/Numbers.js +15 -0
- package/dist/helpers/Pagination.js +7 -0
- package/dist/helpers/Search.js +15 -0
- package/dist/helpers/Strings.js +10 -0
- package/dist/helpers/Urls.js +68 -0
- package/dist/helpers/VersionInfo.js +36 -0
- package/dist/hooks/useAppPersistence.js +51 -0
- package/dist/hooks/useAuth/useAuth.js +10 -0
- package/dist/hooks/useBodyScrollLock.js +31 -0
- package/dist/hooks/useBreakpoint.js +65 -0
- package/dist/hooks/useComponentEffect.js +8 -0
- package/dist/hooks/useSwipe.js +45 -0
- package/dist/index.css +1 -2
- package/dist/index.esm.js +1 -17211
- package/dist/index.js +348 -0
- package/dist/mfa.js +4 -0
- package/dist/node_modules/qrcode.react/lib/esm/index.js +979 -0
- package/dist/validators/Vin.js +69 -0
- package/dist/version.js +8 -0
- package/dist/version.json +4 -4
- package/package.json +8 -7
- package/dist/mfa.esm.js +0 -1293
- package/dist/useAuth-BBqdDG2z.js +0 -467
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { getIsoWeek as J, getMonthMatrix as Q, isSameDay as R, isToday as U, isWeekend as V } from "../../helpers/Datetime.js";
|
|
2
|
+
import { bucketEventsByDay as W } from "./EventCalendar.helpers.js";
|
|
3
|
+
import { EventCalendarChip as X } from "./EventCalendar.Chip.js";
|
|
4
|
+
import { useMemo as c, useState as T } from "react";
|
|
5
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
var p = [
|
|
7
|
+
"Sun",
|
|
8
|
+
"Mon",
|
|
9
|
+
"Tue",
|
|
10
|
+
"Wed",
|
|
11
|
+
"Thu",
|
|
12
|
+
"Fri",
|
|
13
|
+
"Sat"
|
|
14
|
+
];
|
|
15
|
+
function ae({ date: s, dragEnabled: g, draggingId: b, emptyLabel: k, events: m, firstDayOfWeek: d, maxEventsPerDay: D, onDayClick: N, onDragEnd: j, onDragStart: B, onDrop: $, onEventClick: A, onOpenDay: i, renderEvent: F, showWeekNumbers: y }) {
|
|
16
|
+
const [L, w] = T(null), [P, v] = T(null), u = c(() => Q(s.getFullYear(), s.getMonth(), d), [s, d]), M = c(() => u.flat(), [u]), f = c(() => W(m, M), [m, M]), Y = c(() => new Map(f.map((n) => [n.date.toDateString(), n])), [f]), K = c(() => d === 1 ? [...p.slice(1), p[0]] : p, [d]), q = s.getMonth(), z = m.length > 0, G = /* @__PURE__ */ new Date(), H = (n, o) => {
|
|
17
|
+
n.preventDefault(), v(null), $(o, !0);
|
|
18
|
+
}, I = (n, o) => {
|
|
19
|
+
!g || b === null || (n.preventDefault(), n.dataTransfer.dropEffect = "move", v(o));
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ l("div", {
|
|
22
|
+
className: "event-calendar__month",
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ l("div", {
|
|
25
|
+
className: "event-calendar__weekdays",
|
|
26
|
+
children: [y && /* @__PURE__ */ a("div", {
|
|
27
|
+
className: "event-calendar__week-number event-calendar__week-number--head",
|
|
28
|
+
children: "Wk"
|
|
29
|
+
}), K.map((n) => /* @__PURE__ */ a("div", {
|
|
30
|
+
className: "event-calendar__weekday",
|
|
31
|
+
children: n
|
|
32
|
+
}, n))]
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ a("div", {
|
|
35
|
+
className: "event-calendar__weeks",
|
|
36
|
+
children: u.map((n, o) => /* @__PURE__ */ l("div", {
|
|
37
|
+
className: ["event-calendar__week", n.some((t) => R(t, G)) ? "event-calendar__week--current" : ""].filter(Boolean).join(" "),
|
|
38
|
+
children: [y && /* @__PURE__ */ a("div", {
|
|
39
|
+
className: "event-calendar__week-number",
|
|
40
|
+
children: J(n[0])
|
|
41
|
+
}), n.map((t) => {
|
|
42
|
+
const r = t.toDateString(), h = Y.get(r), _ = h ? [...h.allDay, ...h.timed] : [], S = L === r, C = t.getDate() === 1 ? `${t.toLocaleDateString(void 0, { month: "short" })} ${t.getDate()}` : String(t.getDate()), x = S ? _ : _.slice(0, D), E = _.length - x.length;
|
|
43
|
+
return /* @__PURE__ */ l("div", {
|
|
44
|
+
className: [
|
|
45
|
+
"event-calendar__day",
|
|
46
|
+
t.getMonth() === q ? "" : "event-calendar__day--outside",
|
|
47
|
+
U(t) ? "event-calendar__day--today" : "",
|
|
48
|
+
V(t) ? "event-calendar__day--weekend" : "",
|
|
49
|
+
P === r ? "event-calendar__day--drop-target" : "",
|
|
50
|
+
N ? "event-calendar__day--clickable" : ""
|
|
51
|
+
].filter(Boolean).join(" "),
|
|
52
|
+
onClick: () => N?.(t),
|
|
53
|
+
onDragLeave: () => v((e) => e === r ? null : e),
|
|
54
|
+
onDragOver: (e) => I(e, r),
|
|
55
|
+
onDrop: (e) => H(e, t),
|
|
56
|
+
children: [i ? /* @__PURE__ */ a("button", {
|
|
57
|
+
className: "event-calendar__day-number event-calendar__day-number--button",
|
|
58
|
+
onClick: (e) => {
|
|
59
|
+
e.stopPropagation(), i(t);
|
|
60
|
+
},
|
|
61
|
+
type: "button",
|
|
62
|
+
children: C
|
|
63
|
+
}) : /* @__PURE__ */ a("div", {
|
|
64
|
+
className: "event-calendar__day-number",
|
|
65
|
+
children: C
|
|
66
|
+
}), /* @__PURE__ */ l("div", {
|
|
67
|
+
className: "event-calendar__day-events",
|
|
68
|
+
children: [
|
|
69
|
+
x.map((e) => /* @__PURE__ */ a(X, {
|
|
70
|
+
dragEnabled: g,
|
|
71
|
+
event: e,
|
|
72
|
+
isDragging: b === e.id,
|
|
73
|
+
onClick: A,
|
|
74
|
+
onDragEnd: j,
|
|
75
|
+
onDragStart: B,
|
|
76
|
+
renderEvent: F,
|
|
77
|
+
showTime: !0
|
|
78
|
+
}, `${e.id}-${r}`)),
|
|
79
|
+
E > 0 && /* @__PURE__ */ l("button", {
|
|
80
|
+
className: "event-calendar__more",
|
|
81
|
+
onClick: (e) => {
|
|
82
|
+
if (e.stopPropagation(), i) {
|
|
83
|
+
i(t);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
w(r);
|
|
87
|
+
},
|
|
88
|
+
type: "button",
|
|
89
|
+
children: [
|
|
90
|
+
"+",
|
|
91
|
+
E,
|
|
92
|
+
" more"
|
|
93
|
+
]
|
|
94
|
+
}),
|
|
95
|
+
S && _.length > D && /* @__PURE__ */ a("button", {
|
|
96
|
+
className: "event-calendar__more",
|
|
97
|
+
onClick: (e) => {
|
|
98
|
+
e.stopPropagation(), w(null);
|
|
99
|
+
},
|
|
100
|
+
type: "button",
|
|
101
|
+
children: "Show less"
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
})]
|
|
105
|
+
}, r);
|
|
106
|
+
})]
|
|
107
|
+
}, o))
|
|
108
|
+
}),
|
|
109
|
+
!z && k && /* @__PURE__ */ a("div", {
|
|
110
|
+
className: "event-calendar__empty",
|
|
111
|
+
children: k
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
export {
|
|
117
|
+
ae as EventCalendarMonth
|
|
118
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { isToday as S, isWeekend as F } from "../../helpers/Datetime.js";
|
|
2
|
+
import { bucketEventsByDay as b, formatHourLabel as q, getWeekDays as z, isActiveHour as T, layoutDayEvents as E, startOfDay as G } from "./EventCalendar.helpers.js";
|
|
3
|
+
import { EventCalendarChip as R } from "./EventCalendar.Chip.js";
|
|
4
|
+
import { useEffect as J, useMemo as _, useRef as K, useState as P } from "react";
|
|
5
|
+
import { jsx as l, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
var Q = 8;
|
|
7
|
+
function H({ activeHours: d, date: y, dayEndHour: m, dayStartHour: n, defaultDurationMinutes: U, dragEnabled: h, draggingId: p, events: u, firstDayOfWeek: w, hourHeight: c, onDayClick: N, onDragEnd: k, onDragStart: $, onDrop: j, onEventClick: L, renderEvent: O }) {
|
|
8
|
+
const [B, o] = P(null), f = K(null), g = _(() => z(y, w), [y, w]), i = _(() => b(u, g), [u, g]), D = _(() => Array.from({ length: Math.max(m - n, 1) }, (e, t) => n + t), [n, m]), W = i.some((e) => e.allDay.length > 0), x = D.length * c, A = _(() => {
|
|
9
|
+
const e = i.flatMap((t) => t.timed.map((a) => a.start.getHours()));
|
|
10
|
+
return e.length > 0 ? Math.min(...e) : d?.start ?? Q;
|
|
11
|
+
}, [d, i]);
|
|
12
|
+
J(() => {
|
|
13
|
+
if (!f.current) return;
|
|
14
|
+
const e = Math.max(A - n - 1, 0);
|
|
15
|
+
f.current.scrollTop = e * c;
|
|
16
|
+
}, [
|
|
17
|
+
n,
|
|
18
|
+
A,
|
|
19
|
+
c
|
|
20
|
+
]);
|
|
21
|
+
const C = (e, t) => {
|
|
22
|
+
const a = G(e);
|
|
23
|
+
return a.setHours(t, 0, 0, 0), a;
|
|
24
|
+
}, M = (e, t) => {
|
|
25
|
+
!h || p === null || (e.preventDefault(), e.dataTransfer.dropEffect = "move", o(t));
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ s("div", {
|
|
28
|
+
className: "event-calendar__week-view",
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ s("div", {
|
|
31
|
+
className: "event-calendar__week-head",
|
|
32
|
+
children: [/* @__PURE__ */ l("div", { className: "event-calendar__gutter-spacer" }), g.map((e) => /* @__PURE__ */ s("div", {
|
|
33
|
+
className: [
|
|
34
|
+
"event-calendar__week-day-head",
|
|
35
|
+
S(e) ? "event-calendar__week-day-head--today" : "",
|
|
36
|
+
F(e) ? "event-calendar__week-day-head--weekend" : ""
|
|
37
|
+
].filter(Boolean).join(" "),
|
|
38
|
+
children: [/* @__PURE__ */ l("span", {
|
|
39
|
+
className: "event-calendar__week-day-name",
|
|
40
|
+
children: e.toLocaleDateString(void 0, { weekday: "short" })
|
|
41
|
+
}), /* @__PURE__ */ l("span", {
|
|
42
|
+
className: "event-calendar__week-day-number",
|
|
43
|
+
children: e.getDate()
|
|
44
|
+
})]
|
|
45
|
+
}, e.toDateString()))]
|
|
46
|
+
}),
|
|
47
|
+
W && /* @__PURE__ */ s("div", {
|
|
48
|
+
className: "event-calendar__all-day",
|
|
49
|
+
children: [/* @__PURE__ */ l("div", {
|
|
50
|
+
className: "event-calendar__gutter-label",
|
|
51
|
+
children: "All day"
|
|
52
|
+
}), i.map((e) => {
|
|
53
|
+
const t = `allday-${e.date.toDateString()}`;
|
|
54
|
+
return /* @__PURE__ */ l("div", {
|
|
55
|
+
className: ["event-calendar__all-day-cell", B === t ? "event-calendar__all-day-cell--drop-target" : ""].filter(Boolean).join(" "),
|
|
56
|
+
onDragLeave: () => o((a) => a === t ? null : a),
|
|
57
|
+
onDragOver: (a) => M(a, t),
|
|
58
|
+
onDrop: (a) => {
|
|
59
|
+
a.preventDefault(), o(null), j(e.date, !0);
|
|
60
|
+
},
|
|
61
|
+
children: e.allDay.map((a) => /* @__PURE__ */ l(R, {
|
|
62
|
+
dragEnabled: h,
|
|
63
|
+
event: a,
|
|
64
|
+
isDragging: p === a.id,
|
|
65
|
+
onClick: L,
|
|
66
|
+
onDragEnd: k,
|
|
67
|
+
onDragStart: $,
|
|
68
|
+
renderEvent: O
|
|
69
|
+
}, `${a.id}-${t}`))
|
|
70
|
+
}, t);
|
|
71
|
+
})]
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ s("div", {
|
|
74
|
+
className: "event-calendar__week-body",
|
|
75
|
+
ref: f,
|
|
76
|
+
children: [/* @__PURE__ */ l("div", {
|
|
77
|
+
className: "event-calendar__gutter",
|
|
78
|
+
style: { height: x },
|
|
79
|
+
children: D.map((e) => /* @__PURE__ */ l("div", {
|
|
80
|
+
className: ["event-calendar__gutter-hour", T(e, d) ? "" : "event-calendar__gutter-hour--inactive"].filter(Boolean).join(" "),
|
|
81
|
+
style: { height: c },
|
|
82
|
+
children: /* @__PURE__ */ l("span", { children: q(e) })
|
|
83
|
+
}, e))
|
|
84
|
+
}), i.map((e) => {
|
|
85
|
+
const t = E(e.timed, n, m, U);
|
|
86
|
+
return /* @__PURE__ */ s("div", {
|
|
87
|
+
className: ["event-calendar__week-column", S(e.date) ? "event-calendar__week-column--today" : ""].filter(Boolean).join(" "),
|
|
88
|
+
style: { height: x },
|
|
89
|
+
children: [D.map((a) => {
|
|
90
|
+
const v = `${e.date.toDateString()}-${a}`;
|
|
91
|
+
return /* @__PURE__ */ l("div", {
|
|
92
|
+
className: [
|
|
93
|
+
"event-calendar__slot",
|
|
94
|
+
T(a, d) ? "" : "event-calendar__slot--inactive",
|
|
95
|
+
B === v ? "event-calendar__slot--drop-target" : "",
|
|
96
|
+
N ? "event-calendar__slot--clickable" : ""
|
|
97
|
+
].filter(Boolean).join(" "),
|
|
98
|
+
onClick: () => N?.(C(e.date, a)),
|
|
99
|
+
onDragLeave: () => o((r) => r === v ? null : r),
|
|
100
|
+
onDragOver: (r) => M(r, v),
|
|
101
|
+
onDrop: (r) => {
|
|
102
|
+
r.preventDefault(), o(null), j(C(e.date, a), !1);
|
|
103
|
+
},
|
|
104
|
+
style: { height: c }
|
|
105
|
+
}, v);
|
|
106
|
+
}), t.map((a) => /* @__PURE__ */ l(R, {
|
|
107
|
+
className: "event-calendar__chip--positioned",
|
|
108
|
+
dragEnabled: h,
|
|
109
|
+
event: a.event,
|
|
110
|
+
isDragging: p === a.event.id,
|
|
111
|
+
onClick: L,
|
|
112
|
+
onDragEnd: k,
|
|
113
|
+
onDragStart: $,
|
|
114
|
+
renderEvent: O,
|
|
115
|
+
showTime: !0,
|
|
116
|
+
style: {
|
|
117
|
+
top: `${a.top}%`,
|
|
118
|
+
height: `${a.height}%`,
|
|
119
|
+
left: `calc(${a.left}% + var(--spacing-2))`,
|
|
120
|
+
width: `calc(${a.width}% - var(--spacing-4))`
|
|
121
|
+
}
|
|
122
|
+
}, a.event.id))]
|
|
123
|
+
}, e.date.toDateString());
|
|
124
|
+
})]
|
|
125
|
+
})
|
|
126
|
+
]
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
export {
|
|
130
|
+
H as EventCalendarWeek
|
|
131
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.event-calendar{gap:var(--spacing-12);width:100%;color:var(--body-color);--event-calendar-chip-color:var(--body-accent-color);flex-direction:column;display:flex}.event-calendar__header{align-items:center;gap:var(--spacing-12);flex-wrap:wrap;display:flex}.event-calendar__header .toggle-buttons{align-self:center;height:auto}.event-calendar__nav{align-items:center;gap:var(--spacing-4);display:flex}.event-calendar__title{font-size:var(--font-size-lg);font-weight:var(--font-weight-semibold);color:var(--body-title-color);flex:auto;margin:0}.event-calendar__header-extra{align-items:center;gap:var(--spacing-8);display:flex}.event-calendar__viewport{touch-action:pan-y}.event-calendar__month{border:1px solid var(--card-border-color);border-radius:var(--radius);background-color:var(--card-background-color);flex-direction:column;display:flex;overflow:hidden}.event-calendar__weekdays,.event-calendar__week{display:flex}.event-calendar__weekdays{background-color:var(--card-background-accent-color);border-bottom:1px solid var(--card-border-color)}.event-calendar__week-number{width:var(--spacing-32);border-right:1px solid var(--card-border-color);background-color:var(--card-background-accent-color);font-size:var(--font-size-xxs);font-variant-numeric:tabular-nums;font-weight:var(--font-weight-semibold);color:var(--body-sub-title-color);opacity:.7;flex:none;justify-content:center;align-items:center;display:flex}.event-calendar__week-number--head{text-transform:uppercase;letter-spacing:.04em}.event-calendar__week--current .event-calendar__week-number{background-color:color-mix(in srgb, var(--body-accent-color) 22%, var(--card-background-accent-color));color:var(--body-color-accent);opacity:1}.event-calendar__weekday{min-width:0;padding:var(--spacing-8);text-align:center;font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);text-transform:uppercase;letter-spacing:.04em;color:var(--body-color-muted);flex:1 1 0}.event-calendar__weeks{flex-direction:column;display:flex}.event-calendar__week{border-bottom:1px solid var(--card-border-color);flex:auto}.event-calendar__week:last-child{border-bottom:none}.event-calendar__week--current{box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--body-accent-color) 45%, transparent)}.event-calendar__day{gap:var(--spacing-4);min-width:0;min-height:var(--spacing-100);padding:var(--spacing-6);border-right:1px solid var(--card-border-color);transition:background-color var(--transition-fast);flex-direction:column;flex:1 1 0;display:flex}.event-calendar__day:last-child{border-right:none}.event-calendar__day--weekend{background-color:var(--card-background-accent-color)}.event-calendar__day--outside{background-color:color-mix(in srgb, var(--card-border-color) 22%, var(--card-background-color))}.event-calendar__day--outside .event-calendar__day-number{opacity:.5}.event-calendar__day--outside.event-calendar__day--weekend{background-color:color-mix(in srgb, var(--card-border-color) 30%, var(--card-background-accent-color))}.event-calendar__day--clickable:hover{cursor:pointer;background-color:color-mix(in srgb, var(--body-accent-color) 8%, transparent)}.event-calendar__day--drop-target{background-color:color-mix(in srgb, var(--body-accent-color) 18%, transparent);box-shadow:inset 0 0 0 2px var(--body-accent-color)}.event-calendar__day-number{font-size:var(--font-size-xs);font-weight:var(--font-weight-medium);color:var(--body-color-muted);background:0 0;border:none;align-self:flex-start;padding:0}.event-calendar__day-number--button{min-width:var(--spacing-20);height:var(--spacing-20);border-radius:var(--radius-full);cursor:pointer}.event-calendar__day-number--button:hover{background-color:color-mix(in srgb, var(--body-accent-color) 20%, transparent);color:var(--body-color-accent)}.event-calendar__day--today .event-calendar__day-number{min-width:var(--spacing-20);height:var(--spacing-20);padding:0 var(--spacing-4);border-radius:var(--radius-full);background-color:var(--body-accent-color);color:var(--card-background-color);font-weight:var(--font-weight-bold);justify-content:center;align-self:flex-start;align-items:center;display:inline-flex}.event-calendar__day-events{gap:var(--spacing-2);flex-direction:column;min-width:0;display:flex}.event-calendar__more{padding:var(--spacing-1) var(--spacing-4);border-radius:var(--radius-sm);color:var(--body-color-muted);font-size:var(--font-size-xxs);font-weight:var(--font-weight-medium);cursor:pointer;background:0 0;border:none;align-self:flex-start}.event-calendar__more:hover{color:var(--body-accent-color);background-color:color-mix(in srgb, var(--body-accent-color) 12%, transparent)}.event-calendar__empty{padding:var(--spacing-16);text-align:center;color:var(--body-color-muted);font-size:var(--font-size-sm);border-top:1px solid var(--card-border-color)}.event-calendar__week-view{border:1px solid var(--card-border-color);border-radius:var(--radius);background-color:var(--card-background-color);flex-direction:column;display:flex;overflow:hidden}.event-calendar__week-head{background-color:var(--card-background-accent-color);border-bottom:1px solid var(--card-border-color);display:flex}.event-calendar__gutter-spacer,.event-calendar__gutter-label,.event-calendar__gutter{flex:0 0 var(--spacing-60);width:var(--spacing-60);border-right:1px solid var(--card-border-color)}.event-calendar__gutter-label{padding:var(--spacing-4) var(--spacing-6);font-size:var(--font-size-xxs);color:var(--body-color-muted);justify-content:flex-end;align-items:center;display:flex}.event-calendar__week-day-head{align-items:center;gap:var(--spacing-2);min-width:0;padding:var(--spacing-8) var(--spacing-4);border-right:1px solid var(--card-border-color);flex-direction:column;flex:1 1 0;display:flex}.event-calendar__week-day-head:last-child{border-right:none}.event-calendar__week-day-head--weekend{background-color:color-mix(in srgb, var(--body-color-muted) 8%, transparent)}.event-calendar__week-day-name{font-size:var(--font-size-xxs);text-transform:uppercase;letter-spacing:.04em;color:var(--body-color-muted)}.event-calendar__week-day-number{font-size:var(--font-size-md);font-weight:var(--font-weight-semibold);color:var(--body-color)}.event-calendar__week-day-head--today .event-calendar__week-day-number{min-width:var(--spacing-24);height:var(--spacing-24);border-radius:var(--radius-full);background-color:var(--body-accent-color);color:var(--card-background-color);justify-content:center;align-items:center;display:inline-flex}.event-calendar__all-day{border-bottom:1px solid var(--card-border-color);display:flex}.event-calendar__all-day-cell{gap:var(--spacing-2);min-width:0;padding:var(--spacing-4);border-right:1px solid var(--card-border-color);flex-direction:column;flex:1 1 0;display:flex}.event-calendar__all-day-cell:last-child{border-right:none}.event-calendar__all-day-cell--drop-target{background-color:color-mix(in srgb, var(--body-accent-color) 18%, transparent)}.event-calendar__week-body{max-height:var(--spacing-400);display:flex;overflow-y:auto}.event-calendar__gutter{flex-direction:column;display:flex}.event-calendar__gutter-hour{padding-right:var(--spacing-6);font-size:var(--font-size-xxs);color:var(--body-color-muted);justify-content:flex-end;display:flex}.event-calendar__gutter-hour span{transform:translateY(-50%)}.event-calendar__gutter-hour:first-child span{transform:none}.event-calendar__gutter-hour--inactive{opacity:.5}.event-calendar__week-column{border-right:1px solid var(--card-border-color);flex:1 1 0;min-width:0;position:relative}.event-calendar__week-column:last-child{border-right:none}.event-calendar__week-column--today{background-color:color-mix(in srgb, var(--body-accent-color) 6%, transparent)}.event-calendar__slot{border-bottom:1px solid color-mix(in srgb, var(--card-border-color) 60%, transparent);transition:background-color var(--transition-fast)}.event-calendar__slot--inactive{background-color:color-mix(in srgb, var(--body-background) 60%, transparent)}.event-calendar__slot--clickable:hover{cursor:pointer;background-color:color-mix(in srgb, var(--body-accent-color) 10%, transparent)}.event-calendar__slot--drop-target{background-color:color-mix(in srgb, var(--body-accent-color) 22%, transparent)}.event-calendar__chip{align-items:baseline;gap:var(--spacing-4);min-width:0;padding:var(--spacing-1) var(--spacing-6);border-radius:var(--radius-sm);border-left:3px solid var(--event-calendar-chip-color);background-color:color-mix(in srgb, var(--event-calendar-chip-color) 18%, var(--card-background-color));color:var(--body-color);font-size:var(--font-size-xs);transition:background-color var(--transition-fast), opacity var(--transition-fast);line-height:1.5;display:flex;overflow:hidden}.event-calendar__chip--positioned{flex-direction:column;align-items:flex-start;gap:0;position:absolute}.event-calendar__chip--clickable:hover{cursor:pointer;background-color:color-mix(in srgb, var(--event-calendar-chip-color) 30%, var(--card-background-color))}.event-calendar__chip--draggable{cursor:grab}.event-calendar__chip--dragging{opacity:.4}.event-calendar__chip--accent{--event-calendar-chip-color:var(--body-accent-color)}.event-calendar__chip--success{--event-calendar-chip-color:var(--button-success-background-color)}.event-calendar__chip--warning{--event-calendar-chip-color:var(--button-warning-background-color)}.event-calendar__chip--danger{--event-calendar-chip-color:var(--button-danger-background-color)}.event-calendar__chip--muted{--event-calendar-chip-color:var(--body-color-muted)}.event-calendar__chip--ghost{--event-calendar-chip-color:var(--body-color-muted);border:1px dashed var(--event-calendar-chip-color);color:var(--body-color-muted);background-color:#0000;border-left-style:solid;border-left-width:3px}.event-calendar__chip--done{--event-calendar-chip-color:var(--body-color-muted);opacity:.6}.event-calendar__chip--done .event-calendar__chip-title{text-decoration:line-through}.event-calendar__chip-leading{flex:none;align-self:center;align-items:center;line-height:1;display:inline-flex}.event-calendar__chip-leading .icon{width:var(--spacing-12);height:var(--spacing-12)}.event-calendar__chip-time{font-variant-numeric:tabular-nums;font-size:var(--font-size-xxs);color:var(--body-color-muted);flex:none}.event-calendar__chip-title{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}@media (width<=767px){.event-calendar__header{gap:var(--spacing-8)}.event-calendar__nav{flex:auto}.event-calendar__header .toggle-buttons{flex:none;margin-left:auto}.event-calendar__title{font-size:var(--font-size-md);flex:100%;order:-1}.event-calendar__header-extra{flex:100%;order:1}.event-calendar__week-number{width:var(--spacing-20)}.event-calendar__day{min-height:var(--spacing-64);padding:var(--spacing-4)}.event-calendar__weekday{padding:var(--spacing-4);font-size:var(--font-size-xxs)}.event-calendar__chip{padding:0 var(--spacing-4)}.event-calendar__chip-time{display:none}.event-calendar__month .event-calendar__chip:has(.event-calendar__chip-leading){padding:var(--spacing-2);justify-content:center;align-items:center;gap:0}.event-calendar__month .event-calendar__chip:has(.event-calendar__chip-leading) .event-calendar__chip-title{display:none}.event-calendar__gutter-spacer,.event-calendar__gutter-label,.event-calendar__gutter{flex-basis:var(--spacing-40);width:var(--spacing-40)}}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { addDays as y, isSameDay as S } from "../../helpers/Datetime.js";
|
|
2
|
+
var d = (t) => new Date(t.getFullYear(), t.getMonth(), t.getDate()), x = (t, r) => {
|
|
3
|
+
const n = (t.getDay() - r + 7) % 7;
|
|
4
|
+
return y(d(t), -n);
|
|
5
|
+
}, T = (t, r) => {
|
|
6
|
+
const n = x(t, r);
|
|
7
|
+
return Array.from({ length: 7 }, (o, i) => y(n, i));
|
|
8
|
+
}, w = (t) => t.getHours() * 60 + t.getMinutes(), v = (t, r) => t.end ?? new Date(t.start.getTime() + r * 6e4), k = (t, r) => r.map((n) => {
|
|
9
|
+
const o = [], i = [];
|
|
10
|
+
return t.forEach((e) => {
|
|
11
|
+
if (e.allDay) {
|
|
12
|
+
const h = d(e.start), m = d(e.end ?? e.start);
|
|
13
|
+
n >= h && n <= m && o.push(e);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
S(e.start, n) && i.push(e);
|
|
17
|
+
}), i.sort((e, h) => e.start.getTime() - h.start.getTime()), {
|
|
18
|
+
date: n,
|
|
19
|
+
allDay: o,
|
|
20
|
+
timed: i
|
|
21
|
+
};
|
|
22
|
+
}), O = (t, r, n, o) => {
|
|
23
|
+
if (t.length === 0) return [];
|
|
24
|
+
const i = r * 60, e = n * 60, h = Math.max(e - i, 1), m = t.map((a) => {
|
|
25
|
+
const u = w(a.start);
|
|
26
|
+
return {
|
|
27
|
+
event: a,
|
|
28
|
+
start: u,
|
|
29
|
+
end: Math.max(w(v(a, o)), u + 15)
|
|
30
|
+
};
|
|
31
|
+
}), D = [];
|
|
32
|
+
let l = [], c = -1;
|
|
33
|
+
const p = () => {
|
|
34
|
+
if (l.length === 0) return;
|
|
35
|
+
const a = [], u = /* @__PURE__ */ new Map();
|
|
36
|
+
l.forEach((s) => {
|
|
37
|
+
let g = a.findIndex((f) => f <= s.start);
|
|
38
|
+
g === -1 && (g = a.length), a[g] = s.end, u.set(s.event, g);
|
|
39
|
+
});
|
|
40
|
+
const M = a.length;
|
|
41
|
+
l.forEach((s) => {
|
|
42
|
+
const g = u.get(s.event) ?? 0, f = (s.start - i) / h * 100, E = (s.end - s.start) / h * 100;
|
|
43
|
+
D.push({
|
|
44
|
+
event: s.event,
|
|
45
|
+
top: Math.max(f, 0),
|
|
46
|
+
height: Math.min(Math.max(E, 1.5), 100 - Math.max(f, 0)),
|
|
47
|
+
left: g / M * 100,
|
|
48
|
+
width: 1 / M * 100
|
|
49
|
+
});
|
|
50
|
+
}), l = [], c = -1;
|
|
51
|
+
};
|
|
52
|
+
return [...m].sort((a, u) => a.start - u.start || a.end - u.end).forEach((a) => {
|
|
53
|
+
l.length > 0 && a.start >= c && p(), l.push(a), c = Math.max(c, a.end);
|
|
54
|
+
}), p(), D;
|
|
55
|
+
}, $ = (t, r, n) => {
|
|
56
|
+
if (!n) return new Date(r);
|
|
57
|
+
const o = d(r);
|
|
58
|
+
return o.setHours(t.start.getHours(), t.start.getMinutes(), 0, 0), o;
|
|
59
|
+
}, b = (t, r) => !r || t >= r.start && t < r.end, A = (t) => `${t.toString().padStart(2, "0")}:00`, C = (t) => `${t.getHours().toString().padStart(2, "0")}:${t.getMinutes().toString().padStart(2, "0")}`;
|
|
60
|
+
export {
|
|
61
|
+
k as bucketEventsByDay,
|
|
62
|
+
$ as buildDroppedStart,
|
|
63
|
+
C as formatEventTime,
|
|
64
|
+
A as formatHourLabel,
|
|
65
|
+
v as getEventEnd,
|
|
66
|
+
T as getWeekDays,
|
|
67
|
+
b as isActiveHour,
|
|
68
|
+
O as layoutDayEvents,
|
|
69
|
+
w as minutesFromMidnight,
|
|
70
|
+
d as startOfDay,
|
|
71
|
+
x as startOfWeek
|
|
72
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import './EventCalendar.css';
|
|
2
|
+
import { Button as N } from "../Button/Button2.js";
|
|
3
|
+
import { addDays as Z, addMonths as H } from "../../helpers/Datetime.js";
|
|
4
|
+
import { useSwipe as ee } from "../../hooks/useSwipe.js";
|
|
5
|
+
import { buildDroppedStart as te, getWeekDays as ae, startOfDay as T } from "./EventCalendar.helpers.js";
|
|
6
|
+
import { DayAgenda as ne } from "../DayAgenda/DayAgenda2.js";
|
|
7
|
+
import { ToggleButtons as le } from "../ToggleButtons/ToggleButtons2.js";
|
|
8
|
+
import { EventCalendarMonth as re } from "./EventCalendar.Month.js";
|
|
9
|
+
import { EventCalendarWeek as oe } from "./EventCalendar.Week.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
import { useCallback as s, useMemo as ie, useState as f } from "react";
|
|
12
|
+
import { jsx as n, jsxs as F } from "react/jsx-runtime";
|
|
13
|
+
var se = [{
|
|
14
|
+
key: "month",
|
|
15
|
+
label: "Month",
|
|
16
|
+
icon: "calendar-month"
|
|
17
|
+
}, {
|
|
18
|
+
key: "week",
|
|
19
|
+
label: "Week",
|
|
20
|
+
icon: "calendar-week"
|
|
21
|
+
}], ce = (l) => l.toLocaleDateString(void 0, {
|
|
22
|
+
month: "long",
|
|
23
|
+
year: "numeric"
|
|
24
|
+
}), g = (l) => l.toLocaleDateString(void 0, { month: "short" }), de = (l, v) => {
|
|
25
|
+
const r = ae(l, v), t = r[0], a = r[r.length - 1];
|
|
26
|
+
return t.getFullYear() !== a.getFullYear() ? `${t.getDate()} ${g(t)} ${t.getFullYear()} – ${a.getDate()} ${g(a)} ${a.getFullYear()}` : t.getMonth() !== a.getMonth() ? `${t.getDate()} ${g(t)} – ${a.getDate()} ${g(a)} ${a.getFullYear()}` : `${t.getDate()} – ${a.getDate()} ${g(a)} ${a.getFullYear()}`;
|
|
27
|
+
};
|
|
28
|
+
function Se({ activeHours: l, className: v, date: r, dayAgenda: t = !1, dayEndHour: a = 24, dayStartHour: y = 0, defaultDurationMinutes: C = 30, emptyLabel: Y, events: b, firstDayOfWeek: D = 0, headerExtra: z, hourHeight: V = 44, maxEventsPerDay: W = 3, onDateChange: $, onDayClick: _, onEventClick: c, onEventDrop: h, onViewChange: w, renderEvent: B, showHeader: x = !0, showWeekNumbers: L = !1, swipeNavigation: P = !0, view: u }) {
|
|
29
|
+
const [A, E] = f(() => T(r ?? /* @__PURE__ */ new Date())), [O, R] = f(u ?? "month"), [d, S] = f(null), [I, m] = f(null), o = r ?? A, i = u ?? O, q = !!h, M = s((e) => {
|
|
30
|
+
$ && $(e), r || E(e);
|
|
31
|
+
}, [r, $]), G = s((e) => {
|
|
32
|
+
w && w(e), u || R(e);
|
|
33
|
+
}, [w, u]), p = s((e) => {
|
|
34
|
+
M(i === "month" ? H(o, e) : Z(o, e * 7));
|
|
35
|
+
}, [
|
|
36
|
+
o,
|
|
37
|
+
i,
|
|
38
|
+
M
|
|
39
|
+
]), J = s((e, X) => {
|
|
40
|
+
!d || !h || (h(d, te(d, e, X)), S(null));
|
|
41
|
+
}, [d, h]), k = s((e) => m(T(e)), []), K = s((e) => {
|
|
42
|
+
if (t) {
|
|
43
|
+
k(e.start);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
c?.(e);
|
|
47
|
+
}, [
|
|
48
|
+
t,
|
|
49
|
+
c,
|
|
50
|
+
k
|
|
51
|
+
]), Q = ee({
|
|
52
|
+
enabled: P,
|
|
53
|
+
onSwipeLeft: () => p(1),
|
|
54
|
+
onSwipeRight: () => p(-1)
|
|
55
|
+
}), U = ie(() => i === "month" ? ce(o) : de(o, D), [
|
|
56
|
+
o,
|
|
57
|
+
i,
|
|
58
|
+
D
|
|
59
|
+
]), j = {
|
|
60
|
+
activeHours: l,
|
|
61
|
+
date: o,
|
|
62
|
+
dragEnabled: q,
|
|
63
|
+
draggingId: d?.id ?? null,
|
|
64
|
+
events: b,
|
|
65
|
+
firstDayOfWeek: D,
|
|
66
|
+
onDayClick: _,
|
|
67
|
+
onDragEnd: () => S(null),
|
|
68
|
+
onDragStart: (e) => S(e),
|
|
69
|
+
onDrop: J,
|
|
70
|
+
onEventClick: t || c ? K : void 0,
|
|
71
|
+
renderEvent: B,
|
|
72
|
+
showWeekNumbers: L
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ F("div", {
|
|
75
|
+
className: ["event-calendar", v ?? ""].filter(Boolean).join(" "),
|
|
76
|
+
children: [
|
|
77
|
+
x && /* @__PURE__ */ F("div", {
|
|
78
|
+
className: "event-calendar__header",
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ F("div", {
|
|
81
|
+
className: "event-calendar__nav",
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ n(N, {
|
|
84
|
+
icon: "arrow-left",
|
|
85
|
+
onClick: () => p(-1),
|
|
86
|
+
size: "small",
|
|
87
|
+
title: "Previous",
|
|
88
|
+
variant: "plain"
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ n(N, {
|
|
91
|
+
onClick: () => M(T(/* @__PURE__ */ new Date())),
|
|
92
|
+
size: "small",
|
|
93
|
+
children: "Today"
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ n(N, {
|
|
96
|
+
icon: "arrow-right",
|
|
97
|
+
onClick: () => p(1),
|
|
98
|
+
size: "small",
|
|
99
|
+
title: "Next",
|
|
100
|
+
variant: "plain"
|
|
101
|
+
})
|
|
102
|
+
]
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ n("h2", {
|
|
105
|
+
className: "event-calendar__title",
|
|
106
|
+
children: U
|
|
107
|
+
}),
|
|
108
|
+
z && /* @__PURE__ */ n("div", {
|
|
109
|
+
className: "event-calendar__header-extra",
|
|
110
|
+
children: z
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ n(le, {
|
|
113
|
+
onToggleChange: (e) => G(e),
|
|
114
|
+
size: "small",
|
|
115
|
+
state: i,
|
|
116
|
+
states: se
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ n("div", {
|
|
121
|
+
className: "event-calendar__viewport",
|
|
122
|
+
...Q,
|
|
123
|
+
children: i === "month" ? /* @__PURE__ */ n(re, {
|
|
124
|
+
...j,
|
|
125
|
+
emptyLabel: Y,
|
|
126
|
+
maxEventsPerDay: W,
|
|
127
|
+
onOpenDay: t ? k : void 0
|
|
128
|
+
}) : /* @__PURE__ */ n(oe, {
|
|
129
|
+
...j,
|
|
130
|
+
dayEndHour: a,
|
|
131
|
+
dayStartHour: y,
|
|
132
|
+
defaultDurationMinutes: C,
|
|
133
|
+
hourHeight: V
|
|
134
|
+
})
|
|
135
|
+
}),
|
|
136
|
+
I && /* @__PURE__ */ n(ne, {
|
|
137
|
+
activeHours: l,
|
|
138
|
+
date: I,
|
|
139
|
+
onDateChange: m,
|
|
140
|
+
emptyLabel: Y,
|
|
141
|
+
events: b,
|
|
142
|
+
isOpen: !0,
|
|
143
|
+
onAdd: _ ? (e) => {
|
|
144
|
+
m(null), _(e);
|
|
145
|
+
} : void 0,
|
|
146
|
+
onClose: () => m(null),
|
|
147
|
+
onEventClick: c ? (e) => {
|
|
148
|
+
m(null), c(e);
|
|
149
|
+
} : void 0,
|
|
150
|
+
renderEvent: B
|
|
151
|
+
})
|
|
152
|
+
]
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
export {
|
|
156
|
+
Se as EventCalendar
|
|
157
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.file-dropzone{gap:var(--spacing-12);flex-direction:column;display:flex}.file-dropzone__label{color:var(--form-control-label-color,inherit);font-size:var(--form-control-label-font-size,inherit);font-weight:var(--form-control-label-font-weight,600);letter-spacing:var(--form-control-label-letter-spacing,normal);text-transform:var(--form-control-label-text-transform,none)}.file-dropzone__area{border:2px dashed var(--delimiter-color);border-radius:var(--radius);padding:var(--spacing-24);text-align:center;background:var(--card-background-color);-webkit-backdrop-filter:var(--card-backdrop-filter,none);cursor:pointer;transition:border-color .2s;position:relative}.file-dropzone__area input{display:none}.file-dropzone__area.is-dragging{border-color:var(--card-hover-border-color);background:var(--card-background-accent-color)}.file-dropzone__content{color:var(--body-color);flex-direction:column;gap:6px;display:flex}.file-dropzone__files{background:var(--card-background-accent-color);border-radius:var(--radius);padding:var(--spacing-12);border:1px solid var(--delimiter-color)}.file-dropzone__files ul{margin:0;padding-left:16px}.file-dropzone__previews{gap:var(--spacing-12);flex-wrap:wrap;display:flex}.file-dropzone__previews img{object-fit:cover;border-radius:var(--radius);border:1px solid var(--delimiter-color);width:96px;height:96px}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import './FileDropzone.css';
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { useCallback as D, useEffect as _, useRef as z, useState as o } from "react";
|
|
4
|
+
import { jsx as n, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
var j = ({ label: c, accept: h, multiple: l = !1, showPreview: s = !0, onFiles: f }) => {
|
|
6
|
+
const [u, i] = o(!1), [t, m] = o([]), d = z(null), [p, v] = o([]);
|
|
7
|
+
_(() => {
|
|
8
|
+
if (!s) return;
|
|
9
|
+
const e = t.filter((r) => r.type.startsWith("image/")).map((r) => URL.createObjectURL(r));
|
|
10
|
+
return v(e), () => {
|
|
11
|
+
e.forEach((r) => URL.revokeObjectURL(r));
|
|
12
|
+
};
|
|
13
|
+
}, [t, s]);
|
|
14
|
+
const g = D((e) => {
|
|
15
|
+
if (!e) return;
|
|
16
|
+
const r = l ? Array.from(e) : [e[0]].filter(Boolean);
|
|
17
|
+
m(r), f?.(r);
|
|
18
|
+
}, [l, f]);
|
|
19
|
+
return /* @__PURE__ */ a("div", {
|
|
20
|
+
className: "file-dropzone",
|
|
21
|
+
children: [
|
|
22
|
+
c && /* @__PURE__ */ n("label", {
|
|
23
|
+
className: "file-dropzone__label",
|
|
24
|
+
children: c
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ a("div", {
|
|
27
|
+
className: `file-dropzone__area ${u ? "is-dragging" : ""}`,
|
|
28
|
+
onDragEnter: (e) => {
|
|
29
|
+
e.preventDefault(), i(!0);
|
|
30
|
+
},
|
|
31
|
+
onDragOver: (e) => e.preventDefault(),
|
|
32
|
+
onDragLeave: (e) => {
|
|
33
|
+
e.preventDefault(), i(!1);
|
|
34
|
+
},
|
|
35
|
+
onDrop: (e) => {
|
|
36
|
+
e.preventDefault(), i(!1), g(e.dataTransfer.files);
|
|
37
|
+
},
|
|
38
|
+
onClick: () => d.current?.click(),
|
|
39
|
+
children: [/* @__PURE__ */ n("input", {
|
|
40
|
+
ref: d,
|
|
41
|
+
type: "file",
|
|
42
|
+
accept: h,
|
|
43
|
+
multiple: l,
|
|
44
|
+
onChange: (e) => g(e.target.files)
|
|
45
|
+
}), /* @__PURE__ */ a("div", {
|
|
46
|
+
className: "file-dropzone__content",
|
|
47
|
+
children: [/* @__PURE__ */ n("strong", { children: "Drop files here" }), /* @__PURE__ */ n("span", { children: "or click to browse" })]
|
|
48
|
+
})]
|
|
49
|
+
}),
|
|
50
|
+
t.length > 0 && /* @__PURE__ */ a("div", {
|
|
51
|
+
className: "file-dropzone__files",
|
|
52
|
+
children: [/* @__PURE__ */ n("h4", { children: "Selected files" }), /* @__PURE__ */ n("ul", { children: t.map((e) => /* @__PURE__ */ a("li", { children: [
|
|
53
|
+
e.name,
|
|
54
|
+
" (",
|
|
55
|
+
Math.round(e.size / 1024),
|
|
56
|
+
" KB)"
|
|
57
|
+
] }, e.name)) })]
|
|
58
|
+
}),
|
|
59
|
+
s && p.length > 0 && /* @__PURE__ */ n("div", {
|
|
60
|
+
className: "file-dropzone__previews",
|
|
61
|
+
children: p.map((e, r) => /* @__PURE__ */ n("img", {
|
|
62
|
+
src: e,
|
|
63
|
+
alt: `Preview ${r + 1}`
|
|
64
|
+
}, e))
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
j as FileDropzone
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.flag{-webkit-user-select:none;user-select:none;line-height:1;display:inline-block}.flag img{border-radius:var(--spacing-2);object-fit:cover;transition:transform .2s ease-in-out;display:block}@media (prefers-color-scheme:dark){.flag img{border:var(--spacing-1) solid #ffffff1a}}@media (prefers-color-scheme:light){.flag img{border:var(--spacing-1) solid #0000001a}}@media (width<=768px){.flag img{transform:scale(1.05)}}.flag:hover img{box-shadow:0 var(--spacing-2) var(--spacing-8) #0003;transform:scale(1.1)}.flag--fallback{color:#fff;border-radius:var(--spacing-2);opacity:.7;background:#666;justify-content:center;align-items:center;font-weight:700;display:inline-flex}@media (prefers-color-scheme:dark){.flag--fallback{color:#ccc;background:#444}}.flag--fallback:hover{opacity:.9;transform:scale(1.1)}.flag--fallback.flags--xxs{width:var(--spacing-12);height:9px;font-size:6px}.flag--fallback.flags--xs{width:var(--spacing-16);height:var(--spacing-12);font-size:8px}.flag--fallback.flags--sm{width:20px;height:15px;font-size:var(--font-size-xxs)}.flag--fallback.flags--md{width:var(--spacing-24);height:18px;font-size:var(--font-size-xs)}.flag--fallback.flags--lg{width:var(--spacing-32);height:var(--spacing-24);font-size:var(--font-size-md)}.flag--fallback.flags--xl{width:var(--spacing-48);height:36px;font-size:var(--font-size-xl)}.flag--fallback.flags--xxl{width:var(--spacing-64);height:var(--spacing-48);font-size:var(--font-size-xxl)}.flag--xxs img{width:var(--spacing-12);height:9px}.flag--xs img{width:var(--spacing-16);height:var(--spacing-12)}.flag--sm img{width:20px;height:15px}.flag--md img{width:var(--spacing-24);height:18px}.flag--lg img{width:var(--spacing-32);height:var(--spacing-24)}.flag--xl img{width:var(--spacing-48);height:36px}.flag--xxl img{width:var(--spacing-64);height:var(--spacing-48)}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import './Flag.css';
|
|
2
|
+
import { Tooltip as p } from "../Tooltip/Tooltip2.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
6
|
+
var u = ({ code: r, size: a = "md", className: e = "" }) => {
|
|
7
|
+
if (!r) return /* @__PURE__ */ t(p, {
|
|
8
|
+
title: `Unsupported country code: ${r}`,
|
|
9
|
+
children: /* @__PURE__ */ t("div", {
|
|
10
|
+
className: `flags flags--fallback flags--${a} ${e}`,
|
|
11
|
+
children: "?"
|
|
12
|
+
})
|
|
13
|
+
});
|
|
14
|
+
const l = `https://flagcdn.com/w80/${r}.png`, s = `https://flagcdn.com/w80/${r}.webp`;
|
|
15
|
+
return /* @__PURE__ */ g("picture", {
|
|
16
|
+
className: `flag flag--${a} ${e}`,
|
|
17
|
+
children: [/* @__PURE__ */ t("source", {
|
|
18
|
+
srcSet: s,
|
|
19
|
+
type: "image/webp"
|
|
20
|
+
}), /* @__PURE__ */ t(p, {
|
|
21
|
+
title: `Country: ${r.toUpperCase()}`,
|
|
22
|
+
children: /* @__PURE__ */ t("img", {
|
|
23
|
+
src: l,
|
|
24
|
+
alt: `${r.toUpperCase()} flag`,
|
|
25
|
+
loading: "lazy",
|
|
26
|
+
onError: (c) => {
|
|
27
|
+
const o = c.target;
|
|
28
|
+
o.src !== l && (o.src = l);
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
u as Flag
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.float-button-container{bottom:var(--spacing-24);right:var(--spacing-24);z-index:1000;position:fixed}.float-button{width:56px;height:56px;color:var(--button-default-color);border-radius:var(--spacing-16);background-color:var(--button-default-background-color);border:var(--spacing-1) solid var(--button-default-border-color);cursor:pointer;box-shadow:0 var(--spacing-4) var(--spacing-12) var(--box-shadow);z-index:1001;justify-content:center;align-items:center;transition:all .3s;display:flex;position:relative}.float-button:hover{background-color:var(--button-default-hover-background-color);box-shadow:0 6px var(--spacing-16) var(--box-shadow);transform:scale(1.1)}.float-button:active{transform:scale(.95)}.float-button--active{background-color:var(--button-info-background-color)}.float-button--active:hover{background-color:var(--button-info-hover-background-color)}.float-button__icon{line-height:1}.float-button-overlay{background-color:var(--backdrop-color);z-index:999;animation:.2s fadeIn;position:fixed;inset:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.float-button-menu{background-color:var(--card-background-color);border-radius:var(--radius);box-shadow:0 var(--spacing-4) var(--spacing-12) var(--box-shadow);min-width:var(--spacing-200);z-index:1000;flex-direction:column;animation:.2s slideUp;display:flex;position:absolute;bottom:70px;right:0;overflow:hidden}.float-button-menu__item{padding:var(--spacing-12) var(--spacing-16);align-self:stretch;align-items:center;gap:var(--spacing-12);cursor:pointer;color:var(--card-color);text-align:left;background-color:#0000;border:none;transition:background-color .15s ease-out;display:flex}.float-button-menu__item:hover,.float-button-menu__item:active{background-color:var(--list-hover-background-color)}.float-button-menu__item:not(:last-child){border-bottom:var(--spacing-1) solid var(--delimiter-color)}.float-button-menu__icon{line-height:1}.float-button-menu__label{font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);white-space:nowrap}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@media (width<=768px){.float-button-container{bottom:var(--spacing-16);right:var(--spacing-16)}.float-button{width:var(--spacing-48);height:var(--spacing-48)}}
|