@memobit/libs 3.0.0 → 3.1.1
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 +140 -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,32 @@
|
|
|
1
|
+
import './Button.css';
|
|
2
|
+
import { Icon as d } from "../Icon/Icon2.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import w from "react";
|
|
5
|
+
import { Fragment as o, jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
var z = w.forwardRef(({ borders: m = "rounded", children: r, className: u, disabled: p = !1, fullWidth: i = !1, icon: e, iconVariant: n = "default", loading: f = !1, onClick: b, emojiIcon: s, size: g = "medium", style: $, sufixIcon: a, title: v, type: h = "button", variant: y = "default" }, N) => /* @__PURE__ */ t("button", {
|
|
7
|
+
ref: N,
|
|
8
|
+
className: `button button-${g} button-${y} ${m === "rounded" ? "button-rounded" : ""} ${i ? "is-full-width" : ""} ${u || ""}`,
|
|
9
|
+
disabled: p,
|
|
10
|
+
onClick: b,
|
|
11
|
+
style: $,
|
|
12
|
+
title: v,
|
|
13
|
+
type: h,
|
|
14
|
+
children: f ? /* @__PURE__ */ l(o, { children: [/* @__PURE__ */ t("span", { className: "button__spinner" }), /* @__PURE__ */ t("span", { children: r || "Loading..." })] }) : /* @__PURE__ */ l(o, { children: [
|
|
15
|
+
e !== void 0 && (typeof e == "string" ? /* @__PURE__ */ t(d, {
|
|
16
|
+
size: "lg",
|
|
17
|
+
name: e,
|
|
18
|
+
variant: n
|
|
19
|
+
}) : e),
|
|
20
|
+
s && /* @__PURE__ */ t("span", { children: s }),
|
|
21
|
+
r && /* @__PURE__ */ t("span", { children: r }),
|
|
22
|
+
a !== void 0 && (typeof a == "string" ? /* @__PURE__ */ t(d, {
|
|
23
|
+
size: "lg",
|
|
24
|
+
name: a,
|
|
25
|
+
variant: n
|
|
26
|
+
}) : a)
|
|
27
|
+
] })
|
|
28
|
+
}));
|
|
29
|
+
z.displayName = "Button";
|
|
30
|
+
export {
|
|
31
|
+
z as Button
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--radius-sm:4px;--radius:8px;--radius-full:9999px;--checkbox-size:18px;--radio-size:18px;--body-background-glow:none;--spacing-1:1px;--spacing-2:2px;--spacing-4:4px;--spacing-6:6px;--spacing-8:8px;--spacing-12:12px;--spacing-16:16px;--spacing-20:20px;--spacing-24:24px;--spacing-32:32px;--spacing-40:40px;--spacing-48:48px;--spacing-60:60px;--spacing-64:64px;--spacing-80:80px;--spacing-100:100px;--spacing-200:200px;--spacing-300:300px;--spacing-400:400px;--font-size-xxs:.625rem;--font-size-xs:.75rem;--font-size-sm:.875rem;--font-size-md:1rem;--font-size-lg:1.25rem;--font-size-xl:1.5rem;--font-size-xxl:2rem;--font-size-xxxl:3rem;--font-family-display:var(--font-family,sans-serif);--font-family-mono:ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;--form-control-font-family:var(--font-family,sans-serif);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--line-height-none:1;--line-height-tight:1.2;--line-height-normal:1.5;--line-height-loose:1.8;--duration-hover:.2s;--duration-fade:.3s;--duration-slide:.4s;--transition-fast:.15s ease-in-out;--transition-moderate:.3s ease-in-out;--transition-slow:.5s ease-in-out}.calendar{background-color:var(--calendar-background-color);border:1px solid var(--calendar-border-color);border-radius:var(--radius);padding:var(--spacing-16);-webkit-user-select:none;user-select:none;width:280px}.calendar__header{justify-content:space-between;align-items:center;gap:var(--spacing-8);margin-bottom:var(--spacing-16);display:flex}.calendar__month-year{justify-content:center;align-items:center;gap:var(--spacing-4);font-weight:var(--font-weight-medium);color:var(--calendar-header-color);font-size:var(--font-size-md);flex:1;display:flex}.calendar__header-label{color:var(--calendar-header-color);font-weight:var(--font-weight-medium);font-size:var(--font-size-md);padding:var(--spacing-4) var(--spacing-8)}.calendar__header-button{color:var(--calendar-header-color);font-weight:var(--font-weight-medium);font-size:var(--font-size-md);cursor:pointer;padding:var(--spacing-4) var(--spacing-8);border-radius:var(--radius-sm);background:0 0;border:none;transition:background-color .2s}.calendar__header-button:hover{background-color:var(--calendar-day-hover-background-color)}.calendar__nav-button{border:1px solid var(--calendar-border-color);border-radius:var(--radius-sm);color:var(--calendar-header-color);cursor:pointer;background:0 0;justify-content:center;align-items:center;width:32px;height:32px;padding:0;font-size:20px;transition:background-color .2s,border-color .2s;display:flex}.calendar__nav-button:hover:not(:disabled){background-color:var(--calendar-day-hover-background-color);border-color:var(--calendar-day-selected-background-color)}.calendar__nav-button:disabled{opacity:.5;cursor:not-allowed}.calendar__today-section{margin-bottom:var(--spacing-12);justify-content:center;display:flex}.calendar__today-button{border:1px solid var(--calendar-border-color);border-radius:var(--radius-sm);color:var(--calendar-day-selected-background-color);cursor:pointer;padding:var(--spacing-4) var(--spacing-12);font-size:var(--font-size-sm);background:0 0;transition:background-color .2s,border-color .2s}.calendar__today-button:hover{background-color:var(--calendar-day-hover-background-color);border-color:var(--calendar-day-selected-background-color)}.calendar__weekdays{gap:var(--spacing-4);margin-bottom:var(--spacing-8);grid-template-columns:repeat(7,1fr);display:grid}.calendar__weekday{text-align:center;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--calendar-header-color);padding:var(--spacing-4) 0}.calendar__days{gap:var(--spacing-4);flex-direction:column;display:flex}.calendar__week{gap:var(--spacing-4);grid-template-columns:repeat(7,1fr);display:grid}.calendar__day{border-radius:var(--radius-sm);color:var(--calendar-day-color);cursor:pointer;font-size:var(--font-size-sm);padding:var(--spacing-8);text-align:center;aspect-ratio:1;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;transition:background-color .2s,border-color .2s,color .2s;display:flex}.calendar__day:hover:not(:disabled):not(.calendar__day--disabled){background-color:var(--calendar-day-hover-background-color)}.calendar__day--other-month{color:var(--calendar-day-disabled-color);opacity:.4}.calendar__day--selected{background-color:var(--calendar-day-selected-background-color);color:var(--calendar-day-selected-color);border-color:var(--calendar-day-selected-background-color)}.calendar__day--in-range{background-color:var(--calendar-day-hover-background-color);border-color:var(--calendar-day-selected-background-color)}.calendar__day--hover-range{background-color:var(--calendar-day-hover-background-color);opacity:.5}.calendar__day--today{border-color:var(--calendar-day-today-border-color);font-weight:var(--font-weight-medium)}.calendar__day--weekend{color:var(--calendar-day-weekend-color)}.calendar__day--disabled{color:var(--calendar-day-disabled-color);cursor:not-allowed;opacity:.4}.calendar__day--disabled:hover{background-color:#0000}.calendar__years-grid,.calendar__months-grid{gap:var(--spacing-8);padding:var(--spacing-8) 0;grid-template-columns:repeat(3,1fr);display:grid}.calendar__year-item,.calendar__month-item{border-radius:var(--radius-sm);color:var(--calendar-day-color);cursor:pointer;font-size:var(--font-size-sm);padding:var(--spacing-12) var(--spacing-8);text-align:center;background:0 0;border:1px solid #0000;transition:background-color .2s,border-color .2s,color .2s}.calendar__year-item:hover,.calendar__month-item:hover{background-color:var(--calendar-day-hover-background-color)}.calendar__year-item--selected,.calendar__month-item--selected{background-color:var(--calendar-day-selected-background-color);color:var(--calendar-day-selected-color);border-color:var(--calendar-day-selected-background-color)}.calendar__year-item--current,.calendar__month-item--current{border-color:var(--calendar-day-today-border-color);font-weight:var(--font-weight-medium)}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import './Calendar.css';
|
|
2
|
+
import { Tooltip as f } from "../Tooltip/Tooltip2.js";
|
|
3
|
+
import { addMonths as H, getMonthMatrix as ue, isAfter as _e, isBefore as x, isSameDay as _, isToday as he, isWeekend as me } from "../../helpers/Datetime.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { useMemo as fe, useState as M } from "react";
|
|
6
|
+
import { Fragment as V, jsx as n, jsxs as h } from "react/jsx-runtime";
|
|
7
|
+
var d = 12, T = [
|
|
8
|
+
"January",
|
|
9
|
+
"February",
|
|
10
|
+
"March",
|
|
11
|
+
"April",
|
|
12
|
+
"May",
|
|
13
|
+
"June",
|
|
14
|
+
"July",
|
|
15
|
+
"August",
|
|
16
|
+
"September",
|
|
17
|
+
"October",
|
|
18
|
+
"November",
|
|
19
|
+
"December"
|
|
20
|
+
], ye = [
|
|
21
|
+
"Sun",
|
|
22
|
+
"Mon",
|
|
23
|
+
"Tue",
|
|
24
|
+
"Wed",
|
|
25
|
+
"Thu",
|
|
26
|
+
"Fri",
|
|
27
|
+
"Sat"
|
|
28
|
+
], ge = [
|
|
29
|
+
"Mon",
|
|
30
|
+
"Tue",
|
|
31
|
+
"Wed",
|
|
32
|
+
"Thu",
|
|
33
|
+
"Fri",
|
|
34
|
+
"Sat",
|
|
35
|
+
"Sun"
|
|
36
|
+
], Fe = ({ value: r, onChange: m, mode: i = "single", minDate: A, maxDate: v, disabledDates: p, firstDayOfWeek: D = 0, showToday: j = !0, yearOnly: I = !1, className: G = "", currentMonth: R, onMonthChange: c, showHeader: F = !0, rangeStart: J, onRangeStartChange: Y }) => {
|
|
37
|
+
const [P, u] = M(() => {
|
|
38
|
+
if (r) {
|
|
39
|
+
if (r instanceof Date) return new Date(r.getFullYear(), r.getMonth(), 1);
|
|
40
|
+
if ("start" in r) return new Date(r.start.getFullYear(), r.start.getMonth(), 1);
|
|
41
|
+
if (Array.isArray(r) && r.length > 0) return new Date(r[0].getFullYear(), r[0].getMonth(), 1);
|
|
42
|
+
}
|
|
43
|
+
return new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1);
|
|
44
|
+
}), [y, g] = M("days"), [b, S] = M(() => {
|
|
45
|
+
const e = (R ?? P).getFullYear();
|
|
46
|
+
return Math.floor(e / d) * d;
|
|
47
|
+
}), [O, E] = M(null), a = R ?? P, o = J ?? O, B = fe(() => ue(a.getFullYear(), a.getMonth(), D), [a, D]), W = D === 1 ? ge : ye, k = (e) => A && x(e, A) || v && _e(e, v) ? !0 : p ? typeof p == "function" ? p(e) : p.some((t) => _(t, e)) : !1, q = (e) => {
|
|
48
|
+
if (!r) return !1;
|
|
49
|
+
if (i === "single" && r instanceof Date) return _(e, r);
|
|
50
|
+
if (i === "range") {
|
|
51
|
+
if (o) return _(e, o);
|
|
52
|
+
if (r && "start" in r) return _(e, r.start) || _(e, r.end);
|
|
53
|
+
}
|
|
54
|
+
return i === "multiple" && Array.isArray(r) ? r.some((t) => _(t, e)) : !1;
|
|
55
|
+
}, z = (e) => {
|
|
56
|
+
if (i === "range" && r && "start" in r) {
|
|
57
|
+
const { start: t, end: l } = r, s = e.getTime();
|
|
58
|
+
return s > t.getTime() && s < l.getTime();
|
|
59
|
+
}
|
|
60
|
+
return !1;
|
|
61
|
+
}, K = (e) => i === "range" && o ? e.getTime() > o.getTime() : !1, L = (e) => e.getMonth() === a.getMonth(), Q = (e) => {
|
|
62
|
+
if (!k(e)) {
|
|
63
|
+
if (i === "single") m?.(e);
|
|
64
|
+
else if (i === "range") if (!o) Y ? Y(e) : (E(e), m?.(void 0));
|
|
65
|
+
else {
|
|
66
|
+
const t = x(e, o) ? e : o, l = x(e, o) ? o : e;
|
|
67
|
+
m?.({
|
|
68
|
+
start: t,
|
|
69
|
+
end: l
|
|
70
|
+
}), Y ? Y(null) : E(null);
|
|
71
|
+
}
|
|
72
|
+
else if (i === "multiple") {
|
|
73
|
+
const t = Array.isArray(r) ? r : [], l = t.findIndex((s) => _(s, e));
|
|
74
|
+
if (l >= 0) {
|
|
75
|
+
const s = t.filter((w, N) => N !== l);
|
|
76
|
+
m?.(s.length > 0 ? s : void 0);
|
|
77
|
+
} else m?.([...t, e]);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}, U = () => {
|
|
81
|
+
const e = H(a, -1);
|
|
82
|
+
c ? c(e) : u(e);
|
|
83
|
+
}, X = () => {
|
|
84
|
+
const e = H(a, 1);
|
|
85
|
+
c ? c(e) : u(e);
|
|
86
|
+
}, Z = () => {
|
|
87
|
+
const e = /* @__PURE__ */ new Date(), t = new Date(e.getFullYear(), e.getMonth(), 1);
|
|
88
|
+
c ? c(t) : u(t), g("days"), i === "single" && m?.(e);
|
|
89
|
+
}, C = () => {
|
|
90
|
+
F && g("months");
|
|
91
|
+
}, $ = () => {
|
|
92
|
+
F && (S(Math.floor(a.getFullYear() / d) * d), g("years"));
|
|
93
|
+
}, ee = (e) => {
|
|
94
|
+
const t = new Date(a.getFullYear(), e, 1);
|
|
95
|
+
c ? c(t) : u(t), g("days");
|
|
96
|
+
}, te = (e) => {
|
|
97
|
+
const t = new Date(e, a.getMonth(), 1);
|
|
98
|
+
c ? c(t) : u(t), g("months");
|
|
99
|
+
}, ne = () => {
|
|
100
|
+
S(b - d);
|
|
101
|
+
}, re = () => {
|
|
102
|
+
S(b + d);
|
|
103
|
+
}, ae = () => {
|
|
104
|
+
const e = new Date(a.getFullYear() - 1, a.getMonth(), 1);
|
|
105
|
+
c ? c(e) : u(e);
|
|
106
|
+
}, se = () => {
|
|
107
|
+
const e = new Date(a.getFullYear() + 1, a.getMonth(), 1);
|
|
108
|
+
c ? c(e) : u(e);
|
|
109
|
+
}, le = () => {
|
|
110
|
+
const e = [];
|
|
111
|
+
for (let t = 0; t < d; t++) e.push(b + t);
|
|
112
|
+
return e;
|
|
113
|
+
}, ce = (e) => {
|
|
114
|
+
const t = ["calendar__day"];
|
|
115
|
+
return L(e) ? (q(e) && t.push("calendar__day--selected"), z(e) && t.push("calendar__day--in-range"), K(e) && t.push("calendar__day--hover-range")) : t.push("calendar__day--other-month"), he(e) && t.push("calendar__day--today"), me(e) && t.push("calendar__day--weekend"), k(e) && t.push("calendar__day--disabled"), t.join(" ");
|
|
116
|
+
}, ie = () => y === "years" ? /* @__PURE__ */ h("div", {
|
|
117
|
+
className: "calendar__header",
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ n(f, {
|
|
120
|
+
title: "Previous years",
|
|
121
|
+
children: /* @__PURE__ */ n("button", {
|
|
122
|
+
type: "button",
|
|
123
|
+
className: "calendar__nav-button",
|
|
124
|
+
onClick: ne,
|
|
125
|
+
children: "‹"
|
|
126
|
+
})
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ h("div", {
|
|
129
|
+
className: "calendar__month-year",
|
|
130
|
+
children: [
|
|
131
|
+
b,
|
|
132
|
+
" - ",
|
|
133
|
+
b + d - 1
|
|
134
|
+
]
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ n(f, {
|
|
137
|
+
title: "Next years",
|
|
138
|
+
children: /* @__PURE__ */ n("button", {
|
|
139
|
+
type: "button",
|
|
140
|
+
className: "calendar__nav-button",
|
|
141
|
+
onClick: re,
|
|
142
|
+
children: "›"
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
}) : y === "months" ? /* @__PURE__ */ h("div", {
|
|
147
|
+
className: "calendar__header",
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ n(f, {
|
|
150
|
+
title: "Previous year",
|
|
151
|
+
children: /* @__PURE__ */ n("button", {
|
|
152
|
+
type: "button",
|
|
153
|
+
className: "calendar__nav-button",
|
|
154
|
+
onClick: ae,
|
|
155
|
+
children: "‹"
|
|
156
|
+
})
|
|
157
|
+
}),
|
|
158
|
+
/* @__PURE__ */ n("button", {
|
|
159
|
+
type: "button",
|
|
160
|
+
className: "calendar__header-button",
|
|
161
|
+
onClick: $,
|
|
162
|
+
children: a.getFullYear()
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ n(f, {
|
|
165
|
+
title: "Next year",
|
|
166
|
+
children: /* @__PURE__ */ n("button", {
|
|
167
|
+
type: "button",
|
|
168
|
+
className: "calendar__nav-button",
|
|
169
|
+
onClick: se,
|
|
170
|
+
children: "›"
|
|
171
|
+
})
|
|
172
|
+
})
|
|
173
|
+
]
|
|
174
|
+
}) : /* @__PURE__ */ h("div", {
|
|
175
|
+
className: "calendar__header",
|
|
176
|
+
children: [
|
|
177
|
+
/* @__PURE__ */ n(f, {
|
|
178
|
+
title: "Previous month",
|
|
179
|
+
children: /* @__PURE__ */ n("button", {
|
|
180
|
+
type: "button",
|
|
181
|
+
className: "calendar__nav-button",
|
|
182
|
+
onClick: U,
|
|
183
|
+
children: "‹"
|
|
184
|
+
})
|
|
185
|
+
}),
|
|
186
|
+
/* @__PURE__ */ n("div", {
|
|
187
|
+
className: "calendar__month-year",
|
|
188
|
+
children: I ? /* @__PURE__ */ n("span", {
|
|
189
|
+
className: "calendar__header-label",
|
|
190
|
+
children: T[a.getMonth()]
|
|
191
|
+
}) : /* @__PURE__ */ h(V, { children: [/* @__PURE__ */ n("button", {
|
|
192
|
+
type: "button",
|
|
193
|
+
className: "calendar__header-button",
|
|
194
|
+
onClick: C,
|
|
195
|
+
children: T[a.getMonth()]
|
|
196
|
+
}), /* @__PURE__ */ n("button", {
|
|
197
|
+
type: "button",
|
|
198
|
+
className: "calendar__header-button",
|
|
199
|
+
onClick: $,
|
|
200
|
+
children: a.getFullYear()
|
|
201
|
+
})] })
|
|
202
|
+
}),
|
|
203
|
+
/* @__PURE__ */ n(f, {
|
|
204
|
+
title: "Next month",
|
|
205
|
+
children: /* @__PURE__ */ n("button", {
|
|
206
|
+
type: "button",
|
|
207
|
+
className: "calendar__nav-button",
|
|
208
|
+
onClick: X,
|
|
209
|
+
children: "›"
|
|
210
|
+
})
|
|
211
|
+
})
|
|
212
|
+
]
|
|
213
|
+
}), oe = () => {
|
|
214
|
+
const e = le(), t = (/* @__PURE__ */ new Date()).getFullYear(), l = a.getFullYear();
|
|
215
|
+
return /* @__PURE__ */ n("div", {
|
|
216
|
+
className: "calendar__years-grid",
|
|
217
|
+
children: e.map((s) => /* @__PURE__ */ n("button", {
|
|
218
|
+
type: "button",
|
|
219
|
+
className: `calendar__year-item ${s === l ? "calendar__year-item--selected" : ""} ${s === t ? "calendar__year-item--current" : ""}`,
|
|
220
|
+
onClick: () => te(s),
|
|
221
|
+
children: s
|
|
222
|
+
}, s))
|
|
223
|
+
});
|
|
224
|
+
}, de = () => {
|
|
225
|
+
const e = (/* @__PURE__ */ new Date()).getMonth(), t = (/* @__PURE__ */ new Date()).getFullYear(), l = a.getMonth(), s = a.getFullYear();
|
|
226
|
+
return /* @__PURE__ */ n("div", {
|
|
227
|
+
className: "calendar__months-grid",
|
|
228
|
+
children: T.map((w, N) => /* @__PURE__ */ n("button", {
|
|
229
|
+
type: "button",
|
|
230
|
+
className: `calendar__month-item ${N === l && s === a.getFullYear() ? "calendar__month-item--selected" : ""} ${N === e && t === a.getFullYear() ? "calendar__month-item--current" : ""}`,
|
|
231
|
+
onClick: () => ee(N),
|
|
232
|
+
children: w.substring(0, 3)
|
|
233
|
+
}, w))
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
return /* @__PURE__ */ h("div", {
|
|
237
|
+
className: `calendar ${G}`,
|
|
238
|
+
children: [
|
|
239
|
+
F && ie(),
|
|
240
|
+
y === "years" && oe(),
|
|
241
|
+
y === "months" && de(),
|
|
242
|
+
y === "days" && /* @__PURE__ */ h(V, { children: [
|
|
243
|
+
j && !I && /* @__PURE__ */ n("div", {
|
|
244
|
+
className: "calendar__today-section",
|
|
245
|
+
children: /* @__PURE__ */ n("button", {
|
|
246
|
+
type: "button",
|
|
247
|
+
className: "calendar__today-button",
|
|
248
|
+
onClick: Z,
|
|
249
|
+
children: "Today"
|
|
250
|
+
})
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ n("div", {
|
|
253
|
+
className: "calendar__weekdays",
|
|
254
|
+
children: W.map((e) => /* @__PURE__ */ n("div", {
|
|
255
|
+
className: "calendar__weekday",
|
|
256
|
+
children: e
|
|
257
|
+
}, e))
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ n("div", {
|
|
260
|
+
className: "calendar__days",
|
|
261
|
+
children: B.map((e, t) => /* @__PURE__ */ n("div", {
|
|
262
|
+
className: "calendar__week",
|
|
263
|
+
children: e.map((l, s) => /* @__PURE__ */ n("button", {
|
|
264
|
+
type: "button",
|
|
265
|
+
className: ce(l),
|
|
266
|
+
onClick: () => Q(l),
|
|
267
|
+
disabled: k(l),
|
|
268
|
+
title: l.toDateString(),
|
|
269
|
+
children: l.getDate()
|
|
270
|
+
}, s))
|
|
271
|
+
}, t))
|
|
272
|
+
})
|
|
273
|
+
] })
|
|
274
|
+
]
|
|
275
|
+
});
|
|
276
|
+
};
|
|
277
|
+
export {
|
|
278
|
+
Fe as Calendar
|
|
279
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.calendar-heatmap{overflow-x:auto}.calendar-heatmap__months,.calendar-heatmap__row{align-items:center;gap:2px;display:flex}.calendar-heatmap__months{margin-bottom:2px}.calendar-heatmap__spacer{flex-shrink:0;width:28px}.calendar-heatmap__month-label{width:12px;min-width:12px;font-size:var(--font-size-xs);color:var(--body-color-muted);white-space:nowrap;overflow:visible}.calendar-heatmap__day-label{width:28px;min-width:28px;font-size:var(--font-size-xs);color:var(--body-color-muted);flex-shrink:0}.calendar-heatmap__cell{border-radius:var(--radius-sm);cursor:default;width:12px;min-width:12px;height:12px;transition:opacity var(--transition-fast)}.calendar-heatmap__cell:hover{opacity:.75}.calendar-heatmap__legend{align-items:center;gap:var(--spacing-4);margin-top:var(--spacing-8);font-size:var(--font-size-xs);color:var(--body-color-muted);justify-content:flex-end;display:flex}.calendar-heatmap__legend-cell{border-radius:var(--radius-sm);width:12px;min-width:12px;height:12px}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import './CalendarHeatmap.css';
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { Fragment as S } from "react";
|
|
4
|
+
import { jsx as n, jsxs as d } from "react/jsx-runtime";
|
|
5
|
+
var f = [
|
|
6
|
+
"Mon",
|
|
7
|
+
"",
|
|
8
|
+
"Wed",
|
|
9
|
+
"",
|
|
10
|
+
"Fri",
|
|
11
|
+
"",
|
|
12
|
+
""
|
|
13
|
+
], w = (t) => t === 0 ? "var(--card-background-accent-color)" : t === 1 ? "rgba(136, 132, 216, 0.35)" : t <= 3 ? "rgba(136, 132, 216, 0.65)" : "#8884d8", N = (t) => `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`, $ = ({ data: t, startDate: h, endDate: u, colorFn: p = w, countLabel: g = "event" }) => {
|
|
14
|
+
const o = new Date(u ?? /* @__PURE__ */ new Date());
|
|
15
|
+
o.setHours(0, 0, 0, 0);
|
|
16
|
+
const c = new Date(h);
|
|
17
|
+
c.setHours(0, 0, 0, 0);
|
|
18
|
+
const D = (c.getDay() + 6) % 7;
|
|
19
|
+
c.setDate(c.getDate() - D);
|
|
20
|
+
const _ = new Map(t.map((e) => [e.date, e.count])), i = [], l = new Date(c);
|
|
21
|
+
for (; l <= o; ) {
|
|
22
|
+
const e = [];
|
|
23
|
+
for (let a = 0; a < 7; a++) {
|
|
24
|
+
if (l > o) e.push(null);
|
|
25
|
+
else {
|
|
26
|
+
const r = N(l);
|
|
27
|
+
e.push({
|
|
28
|
+
dateStr: r,
|
|
29
|
+
displayDate: l.toLocaleDateString("en-US", {
|
|
30
|
+
month: "short",
|
|
31
|
+
day: "numeric"
|
|
32
|
+
}),
|
|
33
|
+
count: _.get(r) ?? 0
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
l.setDate(l.getDate() + 1);
|
|
37
|
+
}
|
|
38
|
+
i.push(e);
|
|
39
|
+
}
|
|
40
|
+
const v = i.map((e) => {
|
|
41
|
+
const a = e.find((m) => m !== null);
|
|
42
|
+
if (!a) return null;
|
|
43
|
+
const r = /* @__PURE__ */ new Date(a.dateStr + "T00:00:00");
|
|
44
|
+
return r.getDate() <= 7 ? r.toLocaleDateString("en-US", { month: "short" }) : null;
|
|
45
|
+
});
|
|
46
|
+
return /* @__PURE__ */ d("div", {
|
|
47
|
+
className: "calendar-heatmap",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ d("div", {
|
|
50
|
+
className: "calendar-heatmap__months",
|
|
51
|
+
children: [/* @__PURE__ */ n("div", { className: "calendar-heatmap__spacer" }), v.map((e, a) => /* @__PURE__ */ n("div", {
|
|
52
|
+
className: "calendar-heatmap__month-label",
|
|
53
|
+
children: e ?? ""
|
|
54
|
+
}, a))]
|
|
55
|
+
}),
|
|
56
|
+
f.map((e, a) => /* @__PURE__ */ n(S, { children: /* @__PURE__ */ d("div", {
|
|
57
|
+
className: "calendar-heatmap__row",
|
|
58
|
+
children: [/* @__PURE__ */ n("div", {
|
|
59
|
+
className: "calendar-heatmap__day-label",
|
|
60
|
+
children: e
|
|
61
|
+
}), i.map((r, m) => {
|
|
62
|
+
const s = r[a];
|
|
63
|
+
return /* @__PURE__ */ n("div", {
|
|
64
|
+
className: "calendar-heatmap__cell",
|
|
65
|
+
style: { background: s ? p(s.count) : "transparent" },
|
|
66
|
+
title: s ? `${s.displayDate}: ${s.count} ${g}${s.count !== 1 ? "s" : ""}` : void 0
|
|
67
|
+
}, m);
|
|
68
|
+
})]
|
|
69
|
+
}) }, a)),
|
|
70
|
+
/* @__PURE__ */ d("div", {
|
|
71
|
+
className: "calendar-heatmap__legend",
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ n("span", { children: "Less" }),
|
|
74
|
+
[
|
|
75
|
+
0,
|
|
76
|
+
1,
|
|
77
|
+
2,
|
|
78
|
+
4
|
|
79
|
+
].map((e) => /* @__PURE__ */ n("div", {
|
|
80
|
+
className: "calendar-heatmap__legend-cell",
|
|
81
|
+
style: { background: p(e) }
|
|
82
|
+
}, e)),
|
|
83
|
+
/* @__PURE__ */ n("span", { children: "More" })
|
|
84
|
+
]
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
$ as CalendarHeatmap
|
|
91
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.card{background:var(--card-background-color);-webkit-backdrop-filter:var(--card-backdrop-filter,none);border:var(--spacing-1) solid;border-color:var(--card-border-color);column-gap:var(--spacing-16);padding:var(--spacing-16);border-radius:var(--radius);color:var(--card-color);box-shadow:var(--card-surface-box-shadow,var(--card-box-shadow));flex-direction:column;display:flex;position:relative}.card:hover{border-color:var(--card-hover-border-color)}.card.no-padding{padding:0}.card.is-highlighted{background-color:var(--card-background-accent-color);border-left:var(--spacing-4) solid var(--card-border-accent-color);color:var(--card-accent-color)}.card.card-variant-success{border-left:var(--spacing-4) solid var(--rating-color-success);background-image:var(--card-tint-success-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-success) 14%, transparent) 0%, transparent 70%))}.card.card-variant-warning{border-left:var(--spacing-4) solid var(--rating-color-warning);background-image:var(--card-tint-warning-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-warning) 14%, transparent) 0%, transparent 70%))}.card.card-variant-danger{border-left:var(--spacing-4) solid var(--rating-color-danger);background-image:var(--card-tint-danger-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-danger) 14%, transparent) 0%, transparent 70%))}.card.card-variant-info{border-left:var(--spacing-4) solid var(--rating-color-info);background-image:var(--card-tint-info-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-info) 14%, transparent) 0%, transparent 70%))}.card.is-clickable:hover{cursor:pointer}.card h3{margin:0 0 var(--spacing-16) 0;color:var(--card-title-color,inherit);font-family:var(--card-title-font-family,var(--font-family,sans-serif));font-size:var(--card-title-font-size,var(--font-size-md));font-style:var(--card-title-font-style,normal);font-weight:var(--card-title-font-weight,var(--font-weight-bold));letter-spacing:var(--card-title-letter-spacing,normal);text-transform:var(--card-title-text-transform,none);column-gap:var(--spacing-16);flex-direction:row;justify-content:space-between;align-items:center;display:flex}.card h3 .card-title-content{align-items:center;gap:var(--spacing-8);min-width:0;display:inline-flex}.card h3.card-content-hidden{margin:0}.card h3 .opener-button:hover{cursor:pointer}.card h3 .opener-button svg{transition:transform .2s ease-in-out}.card h3 .opener-button.opener-button-extended svg{transform:rotate(180deg)}.card .card-content{height:fit-content;transition:all .5s}.card .card-content.card-content-collapsed{height:0;overflow:hidden}.card .card-footer{background-color:var(--card-footer-background-color);border-radius:0 0 var(--radius) var(--radius)}.card .card-footer.card-footer-collapsed{display:none}@media (width<=768px){.card{padding:var(--spacing-8)}}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import './Card.css';
|
|
2
|
+
import { Icon as m } from "../Icon/Icon2.js";
|
|
3
|
+
import { useComponentEffect as v } from "../../hooks/useComponentEffect.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { useEffect as g, useState as x } from "react";
|
|
6
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
7
|
+
var z = ({ children: f, className: p, footerContent: r, icon: n, isCollapsed: c, isCollapsible: s, isFooterCollapsible: h = !0, isHighlighted: u, noPadding: $, onClick: d, title: o, variant: l = "default" }) => {
|
|
8
|
+
const [a, i] = x(c || !1), N = v("Card");
|
|
9
|
+
g(() => {
|
|
10
|
+
typeof c == "boolean" && i(c);
|
|
11
|
+
}, [c]);
|
|
12
|
+
const b = l !== "default" ? `card-variant-${l}` : "";
|
|
13
|
+
return /* @__PURE__ */ t("div", {
|
|
14
|
+
className: `card ${p || ""} ${$ ? "no-padding" : ""} ${u ? "is-highlighted" : ""} ${b} ${d ? "is-clickable" : ""} ${N}`,
|
|
15
|
+
onClick: d,
|
|
16
|
+
children: [
|
|
17
|
+
(o || s) && /* @__PURE__ */ t("h3", {
|
|
18
|
+
className: `${a ? "card-content-hidden" : ""}`,
|
|
19
|
+
children: [/* @__PURE__ */ t("span", {
|
|
20
|
+
className: "card-title-content",
|
|
21
|
+
children: [n && /* @__PURE__ */ e(m, { name: n }), o]
|
|
22
|
+
}), s && /* @__PURE__ */ e("span", {
|
|
23
|
+
className: "collapsible-button",
|
|
24
|
+
onClick: () => i(!a),
|
|
25
|
+
children: /* @__PURE__ */ e("span", {
|
|
26
|
+
className: `opener-button ${a ? "opener-button-extended" : ""}`,
|
|
27
|
+
children: /* @__PURE__ */ e(m, {
|
|
28
|
+
name: "caret-up",
|
|
29
|
+
size: "lg"
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
})]
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ e("div", {
|
|
35
|
+
className: `card-content ${a ? "card-content-collapsed" : ""}`,
|
|
36
|
+
children: f
|
|
37
|
+
}),
|
|
38
|
+
r && /* @__PURE__ */ e("div", {
|
|
39
|
+
className: `card-footer ${a && h ? "card-footer-collapsed" : ""}`,
|
|
40
|
+
children: r
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
z as Card
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.checkbox-wrapper{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:flex-start;display:inline-flex}.checkbox-wrapper--disabled{cursor:not-allowed;opacity:.6}.checkbox-input{opacity:0;pointer-events:none;z-index:-1;border:none;width:0;height:0;margin:0;padding:0;position:absolute}.checkbox-input:focus+.checkbox-label .checkbox-box{border-color:var(--form-control-selection-background-color);box-shadow:0 0 0 var(--spacing-2) var(--form-control-focus-ring);outline:none}.checkbox-input:checked+.checkbox-label .checkbox-box{background-color:var(--form-control-selection-background-color);border-color:var(--form-control-selection-background-color)}.checkbox-input:checked+.checkbox-label .checkbox-box:after{opacity:1;transform:translate(-50%,-50%)scale(1)}.checkbox-input:indeterminate+.checkbox-label .checkbox-box{background-color:var(--form-control-selection-background-color);border-color:var(--form-control-selection-background-color)}.checkbox-input:indeterminate+.checkbox-label .checkbox-box:after{content:"";background-color:var(--form-control-selection-color);opacity:1;border-radius:2px;width:10px;height:2px;transition:all .2s;transform:translate(-50%,-50%)scale(1)}.checkbox-input:disabled+.checkbox-label{cursor:not-allowed}.checkbox-label{align-items:flex-start;gap:var(--spacing-8);cursor:pointer;min-height:var(--checkbox-size);display:flex}.checkbox-box{width:var(--checkbox-size);height:var(--checkbox-size);min-width:var(--checkbox-size);border:var(--spacing-1) solid var(--form-control-selection-border-color);border-radius:var(--radius-sm);background-color:#0000;justify-content:center;align-items:center;transition:all .2s;display:flex;position:relative}.checkbox-box:hover{border-color:var(--form-control-selection-background-color)}.checkbox-box:after{content:"✓";color:var(--form-control-selection-color);font-size:var(--font-size-xs);opacity:0;font-weight:700;line-height:1;transition:all .2s;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)scale(0)}.checkbox-text{align-items:center;gap:var(--spacing-6);color:var(--form-control-selection-label-color);font-size:var(--font-size-sm);margin-top:var(--spacing-2);line-height:1.4;display:inline-flex}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import './Checkbox.css';
|
|
2
|
+
import { Icon as i } from "../Icon/Icon2.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { useEffect as f, useId as b, useRef as u } from "react";
|
|
5
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
6
|
+
var g = ({ checked: c = !1, onChange: p, label: r, icon: s, disabled: o = !1, id: m, indeterminate: n = !1 }) => {
|
|
7
|
+
const x = b(), l = m || x, a = u(null);
|
|
8
|
+
return f(() => {
|
|
9
|
+
a.current && (a.current.indeterminate = n && !c);
|
|
10
|
+
}, [n, c]), /* @__PURE__ */ t("div", {
|
|
11
|
+
className: `checkbox-wrapper ${o ? "checkbox-wrapper--disabled" : ""}`,
|
|
12
|
+
children: [/* @__PURE__ */ e("input", {
|
|
13
|
+
type: "checkbox",
|
|
14
|
+
id: l,
|
|
15
|
+
className: "checkbox-input",
|
|
16
|
+
ref: a,
|
|
17
|
+
checked: c,
|
|
18
|
+
onChange: (h) => p?.(h.target.checked),
|
|
19
|
+
disabled: o
|
|
20
|
+
}), /* @__PURE__ */ t("label", {
|
|
21
|
+
htmlFor: l,
|
|
22
|
+
className: "checkbox-label",
|
|
23
|
+
children: [/* @__PURE__ */ e("span", { className: "checkbox-box" }), (s || r) && /* @__PURE__ */ t("span", {
|
|
24
|
+
className: "checkbox-text",
|
|
25
|
+
children: [s && /* @__PURE__ */ e(i, { name: s }), r && /* @__PURE__ */ e("span", {
|
|
26
|
+
className: "checkbox-text-label",
|
|
27
|
+
children: r
|
|
28
|
+
})]
|
|
29
|
+
})]
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
g as Checkbox
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chip{--chip-color:var(--body-accent-color);justify-content:center;align-items:center;gap:var(--spacing-8);border:var(--spacing-1) solid var(--delimiter-color);max-width:100%;color:var(--body-color);cursor:pointer;font-family:inherit;font-size:var(--font-size-sm);background:0 0;border-radius:999px;transition:background .2s,border-color .2s,color .2s;display:inline-flex}.chip:hover:not(:disabled){border-color:var(--chip-hover-border-color,var(--chip-color));background:var(--chip-hover-background-color,var(--card-background-accent-color));color:var(--chip-hover-color,var(--body-color-accent))}.chip:disabled{cursor:not-allowed;opacity:.6}.chip--selected,.chip--selected:hover:not(:disabled){border-color:var(--chip-selected-border-color,var(--body-accent-color));background:var(--chip-selected-background-color,var(--card-background-accent-color));color:var(--chip-selected-color,var(--body-accent-color))}.chip--plain{background:0 0;border-color:#0000}.chip--default{--chip-color:var(--body-accent-color)}.chip--info{--chip-color:var(--button-info-background-color)}.chip--success{--chip-color:var(--button-success-background-color)}.chip--warning{--chip-color:var(--button-warning-background-color)}.chip--danger{--chip-color:var(--button-danger-background-color)}.chip--custom.chip--selected,.chip--info.chip--selected,.chip--success.chip--selected,.chip--warning.chip--selected,.chip--danger.chip--selected,.chip--custom.chip--selected:hover:not(:disabled),.chip--info.chip--selected:hover:not(:disabled),.chip--success.chip--selected:hover:not(:disabled),.chip--warning.chip--selected:hover:not(:disabled),.chip--danger.chip--selected:hover:not(:disabled){border-color:var(--chip-color);background:color-mix(in srgb, var(--chip-color) 18%, transparent);color:var(--chip-color)}.chip--custom{background:color-mix(in srgb, var(--chip-color) 22%, transparent);color:var(--body-color)}.chip--custom:hover:not(:disabled){background:color-mix(in srgb, var(--chip-color) 32%, transparent)}.chip--custom.chip--selected,.chip--custom.chip--selected:hover:not(:disabled){background:var(--chip-color);border-color:var(--chip-color);color:var(--button-default-color,white)}.chip--xsmall{min-height:var(--spacing-20);gap:var(--spacing-4);padding:var(--spacing-2) var(--spacing-8);font-size:var(--font-size-xxs)}.chip--small{min-height:var(--spacing-24);gap:var(--spacing-4);padding:var(--spacing-4) var(--spacing-12);font-size:var(--font-size-xs)}.chip--medium{min-height:var(--spacing-32);gap:var(--spacing-8);padding:var(--spacing-8) 14px;font-size:var(--font-size-sm)}.chip--large{min-height:var(--spacing-40);gap:var(--spacing-12);padding:var(--spacing-12) var(--spacing-20);font-size:var(--font-size-md)}.chip__swatch{background-color:var(--chip-color);border-radius:999px;flex-shrink:0;width:10px;height:10px}.chip__label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.chip__count{color:var(--body-color-muted);font-size:var(--font-size-xs);flex-shrink:0}.chip>.icon{flex-shrink:0}.chip--selected .chip__count{color:var(--chip-selected-count-color,var(--body-color-muted))}.chip--xsmall .chip__swatch{width:var(--spacing-4);height:var(--spacing-4)}.chip--small .chip__swatch{width:var(--spacing-8);height:var(--spacing-8)}.chip--large .chip__swatch{width:var(--spacing-12);height:var(--spacing-12)}.chip--xsmall .chip__count{font-size:var(--font-size-xxs)}.chip--large .chip__count{font-size:var(--font-size-sm)}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import './Chip.css';
|
|
2
|
+
import { Icon as d } from "../Icon/Icon2.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx as a, jsxs as f } from "react/jsx-runtime";
|
|
6
|
+
var v = ({ children: p, className: c = "", color: s, count: e, disabled: t = !1, icon: i, onClick: m, selected: h = !1, size: l = "medium", title: o, type: r = "button", variant: n = "default" }) => /* @__PURE__ */ f("button", {
|
|
7
|
+
className: `chip chip--${l} ${s ? "chip--custom" : `chip--${n}`} ${h ? "chip--selected" : ""} ${c}`,
|
|
8
|
+
disabled: t,
|
|
9
|
+
onClick: m,
|
|
10
|
+
style: s ? { "--chip-color": s } : void 0,
|
|
11
|
+
title: o,
|
|
12
|
+
type: r,
|
|
13
|
+
children: [
|
|
14
|
+
s && /* @__PURE__ */ a("span", {
|
|
15
|
+
className: "chip__swatch",
|
|
16
|
+
style: { backgroundColor: s }
|
|
17
|
+
}),
|
|
18
|
+
i && /* @__PURE__ */ a(d, { name: i }),
|
|
19
|
+
/* @__PURE__ */ a("span", {
|
|
20
|
+
className: "chip__label",
|
|
21
|
+
children: p
|
|
22
|
+
}),
|
|
23
|
+
e !== void 0 && /* @__PURE__ */ a("span", {
|
|
24
|
+
className: "chip__count",
|
|
25
|
+
children: e
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
v as Chip
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.collapsible-section{gap:var(--spacing-16);flex-direction:column;flex-shrink:0;width:100%;display:flex}.collapsible-section__collapsed{gap:0}.collapsible-section__header{align-items:center;column-gap:var(--spacing-12);cursor:pointer;-webkit-user-select:none;user-select:none;display:flex}.collapsible-section__header:hover{opacity:.8}.collapsible-section__header--inline{cursor:default}.collapsible-section__header--inline:hover{opacity:1}.collapsible-section__header--size-small .collapsible-section__label,.collapsible-section__header--size-small .collapsible-section__icon .icon{font-size:var(--font-size-xs)}.collapsible-section__inline-toggle{align-items:center;gap:var(--spacing-8);padding:var(--spacing-4) var(--spacing-8);color:inherit;font:inherit;cursor:pointer;border-radius:var(--radius-sm);transition:background-color var(--transition-fast);background:0 0;border:none;display:inline-flex}.collapsible-section__inline-toggle:hover{background-color:var(--list-hover-background-color)}.collapsible-section__label{font-weight:var(--font-weight-medium)}.collapsible-section__icon{justify-content:center;align-items:center;transition:transform .2s ease-in-out;display:flex}.collapsible-section__icon--collapsed{transform:scaleY(-1)}.collapsible-section__right-details{text-align:right;flex:1}.collapsible-section__header--space-between.collapsible-section__header{justify-content:space-between}.collapsible-section__header--space-between .collapsible-section__inline-toggle{flex:1;justify-content:space-between}.collapsible-section__header--swap.collapsible-section__header{flex-direction:row-reverse}.collapsible-section__header--swap.collapsible-section__header .collapsible-section__right-details{text-align:left}.collapsible-section__header--highlight{background-color:var(--card-background-accent-color);padding:var(--spacing-16);border-radius:var(--radius)}.collapsible-section__header--accent{color:var(--body-accent-color)}.collapsible-section__header--variant-success{color:var(--rating-color-success)}.collapsible-section__header--variant-warning{color:var(--rating-color-warning)}.collapsible-section__header--variant-info{color:var(--rating-color-info)}.collapsible-section__header--variant-danger{color:var(--rating-color-danger)}.collapsible-section__header--tint-default,.collapsible-section__header--tint-success,.collapsible-section__header--tint-warning,.collapsible-section__header--tint-info,.collapsible-section__header--tint-danger{padding:var(--spacing-8) var(--spacing-12);border-radius:var(--radius-sm)}.collapsible-section__header--tint-default{background-color:var(--card-background-accent-color)}.collapsible-section__header--tint-success{background-color:color-mix(in srgb, var(--rating-color-success) 12%, transparent)}.collapsible-section__header--tint-warning{background-color:color-mix(in srgb, var(--rating-color-warning) 12%, transparent)}.collapsible-section__header--tint-info{background-color:color-mix(in srgb, var(--rating-color-info) 12%, transparent)}.collapsible-section__header--tint-danger{background-color:color-mix(in srgb, var(--rating-color-danger) 12%, transparent)}.collapsible-section__content{opacity:1;gap:var(--spacing-12);flex-direction:column;height:fit-content;transition:height .3s ease-in-out,opacity .3s ease-in-out,padding .3s ease-in-out;display:flex;overflow:hidden}.collapsible-section__content--collapsed{opacity:0;height:0}.collapsible-section--with-card{background:var(--card-background-color);border:1px solid var(--card-border-color);border-radius:var(--radius);box-shadow:var(--card-box-shadow);gap:0;overflow:hidden}.collapsible-section--with-card>.collapsible-section__header{padding:var(--spacing-8) var(--spacing-12);background:var(--card-background-accent-color);border-bottom:1px solid var(--delimiter-color)}.collapsible-section--with-card>.collapsible-section__header.collapsible-section__header--tint-success{background-color:color-mix(in srgb, var(--rating-color-success) 12%, transparent)}.collapsible-section--with-card>.collapsible-section__header.collapsible-section__header--tint-warning{background-color:color-mix(in srgb, var(--rating-color-warning) 12%, transparent)}.collapsible-section--with-card>.collapsible-section__header.collapsible-section__header--tint-info{background-color:color-mix(in srgb, var(--rating-color-info) 12%, transparent)}.collapsible-section--with-card>.collapsible-section__header.collapsible-section__header--tint-danger{background-color:color-mix(in srgb, var(--rating-color-danger) 12%, transparent)}.collapsible-section--with-card>.collapsible-section__content{padding:var(--spacing-12)}.collapsible-section--with-card>.collapsible-section__content.collapsible-section__content--collapsed{padding-top:0;padding-bottom:0}@media (width<=768px){.collapsible-section{gap:var(--spacing-8)}}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import './CollapsibleSection.css';
|
|
2
|
+
import { Icon as l } from "../Icon/Icon2.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { useState as R } from "react";
|
|
5
|
+
import { Fragment as S, jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
var E = ({ children: $, className: v = "", defaultCollapsed: C = !1, icon: c, isCollapsed: p, onToggle: N, rightDetails: _, title: o, toggleAccent: u, toggleHighlight: f, toggleMiddleIcon: i, toggleSize: r, toggleSpaceBetween: w, toggleSwap: k, toggleTint: d = "plain", toggleVariant: n, withCard: x = !1 }) => {
|
|
7
|
+
const [F, j] = R(C), b = p !== void 0, s = b ? p : F, h = () => {
|
|
8
|
+
const m = !s;
|
|
9
|
+
b || j(m), N?.(m);
|
|
10
|
+
}, t = !!_;
|
|
11
|
+
return /* @__PURE__ */ a("div", {
|
|
12
|
+
className: `collapsible-section ${x ? "collapsible-section--with-card" : ""} ${v} ${s ? "collapsible-section__collapsed" : ""}`,
|
|
13
|
+
children: [o && /* @__PURE__ */ e("div", {
|
|
14
|
+
className: `collapsible-section__header ${t ? "" : "collapsible-section__header--inline"} ${w ? "collapsible-section__header--space-between" : ""} ${k ? "collapsible-section__header--swap" : ""} ${f ? "collapsible-section__header--highlight" : ""} ${u ? "collapsible-section__header--accent" : ""} ${r ? `collapsible-section__header--size-${r}` : ""} ${n ? `collapsible-section__header--variant-${n}` : ""} ${d !== "plain" ? `collapsible-section__header--tint-${d}` : ""}`,
|
|
15
|
+
onClick: t ? h : void 0,
|
|
16
|
+
children: t ? /* @__PURE__ */ a(S, { children: [
|
|
17
|
+
/* @__PURE__ */ a("div", {
|
|
18
|
+
className: "collapsible-section__label",
|
|
19
|
+
children: [
|
|
20
|
+
c && /* @__PURE__ */ e(l, {
|
|
21
|
+
name: c,
|
|
22
|
+
variant: n
|
|
23
|
+
}),
|
|
24
|
+
" ",
|
|
25
|
+
o
|
|
26
|
+
]
|
|
27
|
+
}),
|
|
28
|
+
i && /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(l, { name: i }) }),
|
|
29
|
+
/* @__PURE__ */ e("span", {
|
|
30
|
+
className: `collapsible-section__icon ${s ? "collapsible-section__icon--collapsed" : ""}`,
|
|
31
|
+
children: /* @__PURE__ */ e(l, { name: "caret-up" })
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ e("span", {
|
|
34
|
+
className: "collapsible-section__right-details",
|
|
35
|
+
children: _
|
|
36
|
+
})
|
|
37
|
+
] }) : /* @__PURE__ */ a("button", {
|
|
38
|
+
type: "button",
|
|
39
|
+
className: "collapsible-section__inline-toggle",
|
|
40
|
+
onClick: h,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ a("span", {
|
|
43
|
+
className: "collapsible-section__label",
|
|
44
|
+
children: [
|
|
45
|
+
c && /* @__PURE__ */ e(l, {
|
|
46
|
+
name: c,
|
|
47
|
+
variant: n
|
|
48
|
+
}),
|
|
49
|
+
" ",
|
|
50
|
+
o
|
|
51
|
+
]
|
|
52
|
+
}),
|
|
53
|
+
i && /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(l, { name: i }) }),
|
|
54
|
+
/* @__PURE__ */ e("span", {
|
|
55
|
+
className: `collapsible-section__icon ${s ? "collapsible-section__icon--collapsed" : ""}`,
|
|
56
|
+
children: /* @__PURE__ */ e(l, { name: "caret-up" })
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
})
|
|
60
|
+
}), /* @__PURE__ */ e("div", {
|
|
61
|
+
className: `collapsible-section__content ${s ? "collapsible-section__content--collapsed" : ""}`,
|
|
62
|
+
children: $
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
E as CollapsibleSection
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.color-picker{gap:var(--spacing-12);border:1px solid var(--delimiter-color);border-radius:var(--radius);padding:var(--spacing-16);background:var(--card-background-color);flex-direction:column;width:320px;display:flex}.color-picker__preview{border-radius:var(--radius);border:1px solid var(--delimiter-color);width:100%;height:40px}.color-picker__controls{gap:var(--spacing-12);flex-direction:column;display:flex}.color-picker__sv{border-radius:var(--radius);cursor:crosshair;touch-action:none;-webkit-user-select:none;user-select:none;width:100%;height:180px;position:relative;overflow:hidden}.color-picker__sv-white,.color-picker__sv-black{position:absolute;inset:0}.color-picker__sv-white{background:linear-gradient(90deg,#fff,#fff0)}.color-picker__sv-black{background:linear-gradient(#0000,#000)}.color-picker__sv-handle{border:2px solid #fff;border-radius:50%;width:12px;height:12px;position:absolute;transform:translate(-6px,-6px);box-shadow:0 0 0 1px #0000004d}.color-picker__slider input[type=range]{width:100%}.color-picker__mode-toggle{gap:var(--spacing-8);display:flex}.color-picker__mode-toggle .button{padding:6px 10px}.color-picker__mode-toggle .button.is-active{border:1px solid var(--body-accent-color);color:var(--body-accent-color)}.color-picker__fields{gap:var(--spacing-8);grid-template-columns:1fr;display:grid}.color-picker__fields .input-text-wrapper,.color-picker__fields .input-number-wrapper{width:100%}.color-picker__fields--rgb,.color-picker__fields--hsl,.color-picker__fields--hex{grid-template-columns:repeat(3,1fr)}.color-picker__fields--hex .input-text-wrapper{grid-column:span 3}
|