@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,134 @@
|
|
|
1
|
+
import { makeTableRow as m } from "../helpers.js";
|
|
2
|
+
import { useCallback as d, useState as T } from "react";
|
|
3
|
+
var B = ({ editorRef: a, snapshotForUndo: c, emitChange: o }) => {
|
|
4
|
+
const [e, A] = T(null), [E, S] = T(null), u = d(() => {
|
|
5
|
+
const t = window.getSelection();
|
|
6
|
+
if (!t || t.rangeCount === 0) return null;
|
|
7
|
+
let l = t.getRangeAt(0).commonAncestorContainer;
|
|
8
|
+
for (; l && l !== a.current; ) {
|
|
9
|
+
if (l.nodeType === Node.ELEMENT_NODE) {
|
|
10
|
+
const r = l.tagName.toLowerCase();
|
|
11
|
+
if (r === "td" || r === "th") return l;
|
|
12
|
+
}
|
|
13
|
+
l = l.parentNode;
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
}, [a]), n = d((t) => {
|
|
17
|
+
const l = a.current;
|
|
18
|
+
if (!l) return;
|
|
19
|
+
const r = l.getBoundingClientRect(), s = t.getBoundingClientRect();
|
|
20
|
+
A(t), S({
|
|
21
|
+
top: s.top - r.top - 36,
|
|
22
|
+
left: s.left - r.left
|
|
23
|
+
});
|
|
24
|
+
}, [a]), b = d(() => {
|
|
25
|
+
A(null), S(null);
|
|
26
|
+
}, []), w = d(() => {
|
|
27
|
+
if (!e) return;
|
|
28
|
+
c();
|
|
29
|
+
const t = u()?.closest("tr") ?? null, l = e.querySelector("tbody") ?? e, r = t ?? l.querySelector("tr:last-child");
|
|
30
|
+
if (!r) return;
|
|
31
|
+
const s = r.querySelectorAll("td,th").length;
|
|
32
|
+
l.insertBefore(m(s), r.nextSibling), o(), n(e);
|
|
33
|
+
}, [
|
|
34
|
+
e,
|
|
35
|
+
c,
|
|
36
|
+
u,
|
|
37
|
+
o,
|
|
38
|
+
n
|
|
39
|
+
]), x = d(() => {
|
|
40
|
+
if (!e) return;
|
|
41
|
+
c();
|
|
42
|
+
const t = u()?.closest("tr") ?? null, l = e.querySelector("tbody") ?? e, r = t ?? l.querySelector("tr:first-child");
|
|
43
|
+
if (!r) return;
|
|
44
|
+
const s = r.querySelectorAll("td,th").length;
|
|
45
|
+
l.insertBefore(m(s), r), o(), n(e);
|
|
46
|
+
}, [
|
|
47
|
+
e,
|
|
48
|
+
c,
|
|
49
|
+
u,
|
|
50
|
+
o,
|
|
51
|
+
n
|
|
52
|
+
]), R = d(() => {
|
|
53
|
+
if (!e) return;
|
|
54
|
+
const t = Array.from(e.querySelectorAll("tbody tr"));
|
|
55
|
+
t.length <= 1 || (c(), (u()?.closest("tr") ?? t[t.length - 1]).remove(), o(), n(e));
|
|
56
|
+
}, [
|
|
57
|
+
e,
|
|
58
|
+
c,
|
|
59
|
+
u,
|
|
60
|
+
o,
|
|
61
|
+
n
|
|
62
|
+
]), v = d(() => {
|
|
63
|
+
if (!e) return;
|
|
64
|
+
c();
|
|
65
|
+
const t = u(), l = t ? Array.from(t.parentElement.querySelectorAll("td,th")).indexOf(t) : -1;
|
|
66
|
+
e.querySelectorAll("tr").forEach((r, s) => {
|
|
67
|
+
const f = s === 0 && r.closest("thead") !== null, i = document.createElement(f ? "th" : "td");
|
|
68
|
+
i.setAttribute("contenteditable", "true"), i.textContent = f ? "Header" : "Cell";
|
|
69
|
+
const y = r.querySelectorAll("td,th"), q = y[l >= 0 ? l : y.length - 1];
|
|
70
|
+
r.insertBefore(i, q ? q.nextSibling : null);
|
|
71
|
+
}), o(), n(e);
|
|
72
|
+
}, [
|
|
73
|
+
e,
|
|
74
|
+
c,
|
|
75
|
+
u,
|
|
76
|
+
o,
|
|
77
|
+
n
|
|
78
|
+
]);
|
|
79
|
+
return {
|
|
80
|
+
activeTable: e,
|
|
81
|
+
tableToolbarPos: E,
|
|
82
|
+
showTableToolbar: n,
|
|
83
|
+
hideTableToolbar: b,
|
|
84
|
+
addRowAbove: x,
|
|
85
|
+
addRowBelow: w,
|
|
86
|
+
removeRow: R,
|
|
87
|
+
addColumnLeft: d(() => {
|
|
88
|
+
if (!e) return;
|
|
89
|
+
c();
|
|
90
|
+
const t = u(), l = t ? Array.from(t.parentElement.querySelectorAll("td,th")).indexOf(t) : 0;
|
|
91
|
+
e.querySelectorAll("tr").forEach((r, s) => {
|
|
92
|
+
const f = s === 0 && r.closest("thead") !== null, i = document.createElement(f ? "th" : "td");
|
|
93
|
+
i.setAttribute("contenteditable", "true"), i.textContent = f ? "Header" : "Cell";
|
|
94
|
+
const y = r.querySelectorAll("td,th")[l] ?? r.firstChild;
|
|
95
|
+
r.insertBefore(i, y);
|
|
96
|
+
}), o(), n(e);
|
|
97
|
+
}, [
|
|
98
|
+
e,
|
|
99
|
+
c,
|
|
100
|
+
u,
|
|
101
|
+
o,
|
|
102
|
+
n
|
|
103
|
+
]),
|
|
104
|
+
addColumnRight: v,
|
|
105
|
+
removeColumn: d(() => {
|
|
106
|
+
if (!e) return;
|
|
107
|
+
const t = Array.from(e.querySelectorAll("tr"));
|
|
108
|
+
if ((t[0]?.querySelectorAll("td,th").length ?? 0) <= 1) return;
|
|
109
|
+
c();
|
|
110
|
+
const l = u(), r = l ? Array.from(l.parentElement.querySelectorAll("td,th")).indexOf(l) : -1;
|
|
111
|
+
t.forEach((s) => {
|
|
112
|
+
const f = s.querySelectorAll("td,th");
|
|
113
|
+
(r >= 0 ? f[r] : f[f.length - 1])?.remove();
|
|
114
|
+
}), o(), n(e);
|
|
115
|
+
}, [
|
|
116
|
+
e,
|
|
117
|
+
c,
|
|
118
|
+
u,
|
|
119
|
+
o,
|
|
120
|
+
n
|
|
121
|
+
]),
|
|
122
|
+
deleteTable: d(() => {
|
|
123
|
+
e && (c(), e.remove(), b(), o());
|
|
124
|
+
}, [
|
|
125
|
+
e,
|
|
126
|
+
c,
|
|
127
|
+
b,
|
|
128
|
+
o
|
|
129
|
+
])
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
export {
|
|
133
|
+
B as useTableOps
|
|
134
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.rolling-number{font-variant-numeric:tabular-nums;font-weight:var(--font-weight-bold);line-height:var(--line-height-none);color:var(--body-color-accent);--_roll-duration:.6s;align-items:baseline;display:inline-flex}.rolling-number--sm{font-size:var(--font-size-sm)}.rolling-number--md{font-size:var(--font-size-md)}.rolling-number--lg{font-size:var(--font-size-lg)}.rolling-number--xl{font-size:var(--font-size-xl)}.rolling-number--xxl{font-size:var(--font-size-xxl)}.rolling-number--xxxl{font-size:var(--font-size-xxxl)}.rolling-number--accent{color:var(--body-accent-color)}.rolling-number--info{color:var(--rating-color-info)}.rolling-number--success,.rolling-number--direction-up{color:var(--rating-color-success)}.rolling-number--warning{color:var(--rating-color-warning)}.rolling-number--danger,.rolling-number--direction-down{color:var(--rating-color-danger)}.rolling-number__digit{vertical-align:baseline;height:1em;display:inline-block;overflow:hidden}.rolling-number__strip{transform:translateY(calc(var(--_roll-digit) * -1em));flex-direction:column;display:flex}.rolling-number__cell{justify-content:center;align-items:center;height:1em;display:flex}.rolling-number--animated .rolling-number__strip{transition:transform var(--_roll-duration) cubic-bezier(.22, 1, .36, 1);transition-delay:var(--_roll-delay)}.rolling-number__separator,.rolling-number__affix{display:inline-block}.rolling-number__affix{font-size:.7em;font-weight:var(--font-weight-medium);opacity:.75}@media (prefers-reduced-motion:reduce){.rolling-number--animated .rolling-number__strip{transition:none}}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import './RollingNumber.css';
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { useEffect as f, useRef as R, useState as $ } from "react";
|
|
4
|
+
import { jsx as e, jsxs as w } from "react/jsx-runtime";
|
|
5
|
+
var B = [
|
|
6
|
+
"0",
|
|
7
|
+
"1",
|
|
8
|
+
"2",
|
|
9
|
+
"3",
|
|
10
|
+
"4",
|
|
11
|
+
"5",
|
|
12
|
+
"6",
|
|
13
|
+
"7",
|
|
14
|
+
"8",
|
|
15
|
+
"9"
|
|
16
|
+
], F = (l, m, s, c) => {
|
|
17
|
+
const u = l < 0, [i, r] = Math.abs(l).toFixed(m).split("."), t = s ? i.replace(/\B(?=(\d{3})+(?!\d))/g, s) : i, o = r ? `${t}${c}${r}` : t;
|
|
18
|
+
return u ? `-${o}` : o;
|
|
19
|
+
}, G = ({ className: l = "", colorByDirection: m = !1, decimals: s = 0, decimalSeparator: c = ".", duration: u = 600, groupSeparator: i = ",", prefix: r, size: t = "xl", stagger: o = 40, suffix: b, value: n, variant: h = "default" }) => {
|
|
20
|
+
const d = R(n), [N, x] = $("none"), [j, y] = $(!1);
|
|
21
|
+
f(() => {
|
|
22
|
+
y(!0);
|
|
23
|
+
}, []), f(() => {
|
|
24
|
+
n !== d.current && (x(n > d.current ? "up" : "down"), d.current = n);
|
|
25
|
+
}, [n]);
|
|
26
|
+
const p = F(n, s, i, c).split("");
|
|
27
|
+
return /* @__PURE__ */ w("span", {
|
|
28
|
+
className: [
|
|
29
|
+
"rolling-number",
|
|
30
|
+
`rolling-number--${t}`,
|
|
31
|
+
m ? `rolling-number--direction-${N}` : `rolling-number--${h}`,
|
|
32
|
+
j ? "rolling-number--animated" : "",
|
|
33
|
+
l
|
|
34
|
+
].filter(Boolean).join(" "),
|
|
35
|
+
style: { "--_roll-duration": `${u}ms` },
|
|
36
|
+
title: p.join(""),
|
|
37
|
+
children: [
|
|
38
|
+
r && /* @__PURE__ */ e("span", {
|
|
39
|
+
className: "rolling-number__affix",
|
|
40
|
+
children: r
|
|
41
|
+
}),
|
|
42
|
+
p.map((a, D) => {
|
|
43
|
+
const M = a >= "0" && a <= "9", g = p.length - 1 - D;
|
|
44
|
+
return M ? /* @__PURE__ */ e("span", {
|
|
45
|
+
className: "rolling-number__digit",
|
|
46
|
+
children: /* @__PURE__ */ e("span", {
|
|
47
|
+
className: "rolling-number__strip",
|
|
48
|
+
style: {
|
|
49
|
+
"--_roll-delay": `${g * o}ms`,
|
|
50
|
+
"--_roll-digit": Number(a)
|
|
51
|
+
},
|
|
52
|
+
children: B.map((_) => /* @__PURE__ */ e("span", {
|
|
53
|
+
className: "rolling-number__cell",
|
|
54
|
+
children: _
|
|
55
|
+
}, _))
|
|
56
|
+
})
|
|
57
|
+
}, `digit-${g}`) : /* @__PURE__ */ e("span", {
|
|
58
|
+
className: "rolling-number__separator",
|
|
59
|
+
children: a
|
|
60
|
+
}, `sep-${g}`);
|
|
61
|
+
}),
|
|
62
|
+
b && /* @__PURE__ */ e("span", {
|
|
63
|
+
className: "rolling-number__affix",
|
|
64
|
+
children: b
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
G as RollingNumber
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.scroll-to-top{bottom:var(--spacing-24);right:var(--spacing-24);z-index:999;border-radius:var(--spacing-16);background-color:var(--button-default-background-color);width:56px;height:56px;color:var(--button-default-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);justify-content:center;align-items:center;transition:all .3s;animation:.3s scrollToTopFadeIn;display:flex;position:fixed}.scroll-to-top:hover{background-color:var(--button-default-hover-background-color);transform:scale(1.1)}.scroll-to-top:active{transform:scale(.95)}.scroll-to-top__icon{font-size:var(--font-size-sm);line-height:1}body:has(.float-button-container) .scroll-to-top{bottom:calc(var(--spacing-24) + 66px)}@keyframes scrollToTopFadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@media (width<=768px){.scroll-to-top{bottom:var(--spacing-16);right:var(--spacing-16);width:var(--spacing-48);height:var(--spacing-48)}body:has(.float-button-container) .scroll-to-top{bottom:calc(var(--spacing-16) + 58px)}}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import './ScrollToTop.css';
|
|
2
|
+
import { Tooltip as m } from "../Tooltip/Tooltip2.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { useCallback as u, useEffect as a, useState as d } from "react";
|
|
5
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
6
|
+
var h = ({ scrollContainer: o, scrollThreshold: e = 200, className: l }) => {
|
|
7
|
+
const [c, i] = d(!1);
|
|
8
|
+
a(() => {
|
|
9
|
+
const s = o ?? window, r = () => {
|
|
10
|
+
const n = o ? o.scrollTop : window.scrollY;
|
|
11
|
+
i(n > e);
|
|
12
|
+
};
|
|
13
|
+
return s.addEventListener("scroll", r, { passive: !0 }), () => {
|
|
14
|
+
s.removeEventListener("scroll", r);
|
|
15
|
+
};
|
|
16
|
+
}, [o, e]);
|
|
17
|
+
const p = u(() => {
|
|
18
|
+
o ? o.scrollTo({
|
|
19
|
+
top: 0,
|
|
20
|
+
behavior: "smooth"
|
|
21
|
+
}) : window.scrollTo({
|
|
22
|
+
top: 0,
|
|
23
|
+
behavior: "smooth"
|
|
24
|
+
});
|
|
25
|
+
}, [o]);
|
|
26
|
+
return c ? /* @__PURE__ */ t(m, {
|
|
27
|
+
title: "Scroll to top",
|
|
28
|
+
children: /* @__PURE__ */ t("button", {
|
|
29
|
+
className: `scroll-to-top${l ? ` ${l}` : ""}`,
|
|
30
|
+
onClick: p,
|
|
31
|
+
children: /* @__PURE__ */ t("span", {
|
|
32
|
+
className: "scroll-to-top__icon",
|
|
33
|
+
children: "▲"
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
}) : null;
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
h as ScrollToTop
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.separator{border:0;border-color:var(--delimiter-color)}.separator--horizontal{border-top-style:solid;width:100%;height:0}.separator--horizontal.separator--solid{border-top-style:solid}.separator--horizontal.separator--dashed{border-top-style:dashed}.separator--horizontal.separator--dotted{border-top-style:dotted}.separator--vertical{border-left-style:solid;width:0;height:100%;display:inline-block}.separator--vertical.separator--solid{border-left-style:solid}.separator--vertical.separator--dashed{border-left-style:dashed}.separator--vertical.separator--dotted{border-left-style:dotted}.separator--with-label{align-items:center;gap:var(--spacing-12);text-align:center;display:flex}.separator--with-label .separator__line{border:0;border-color:var(--delimiter-color);border-top-style:solid;flex:1}.separator--with-label .separator__label{color:var(--body-color-muted);font-size:var(--font-size-sm);white-space:nowrap;padding:0 var(--spacing-8)}.separator--with-label.separator--align-left .separator__line:first-child,.separator--with-label.separator--align-right .separator__line:last-child{flex:0;min-width:0}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import './Separator.css';
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
5
|
+
var x = ({ orientation: e = "horizontal", style: l = "solid", thickness: p = 1, spacing: r = 16, label: s, labelAlign: i = "center", className: m = "" }) => {
|
|
6
|
+
const o = `separator separator--${e} separator--${l} ${m}`, t = {
|
|
7
|
+
borderWidth: `${p}px`,
|
|
8
|
+
...e === "horizontal" ? {
|
|
9
|
+
marginTop: `${r}px`,
|
|
10
|
+
marginBottom: `${r}px`
|
|
11
|
+
} : {
|
|
12
|
+
marginLeft: `${r}px`,
|
|
13
|
+
marginRight: `${r}px`
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
return s && e === "horizontal" ? /* @__PURE__ */ n("div", {
|
|
17
|
+
className: `${o} separator--with-label ${`separator--align-${i}`}`,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ a("div", {
|
|
20
|
+
className: "separator__line",
|
|
21
|
+
style: t
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ a("span", {
|
|
24
|
+
className: "separator__label",
|
|
25
|
+
children: s
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ a("div", {
|
|
28
|
+
className: "separator__line",
|
|
29
|
+
style: t
|
|
30
|
+
})
|
|
31
|
+
]
|
|
32
|
+
}) : /* @__PURE__ */ a("div", {
|
|
33
|
+
className: o,
|
|
34
|
+
style: t
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
x as Separator
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sidebar{--sidebar-width:280px;--sidebar-shadow:none;width:var(--sidebar-width);margin:var(--spacing-16);background:var(--card-background-color);border:var(--spacing-1) solid var(--delimiter-color);border-radius:var(--radius);min-height:0;box-shadow:var(--sidebar-shadow);flex-direction:column;flex-shrink:0;transition:width .3s,transform .3s,border-color .3s;display:flex;overflow-x:hidden}.sidebar__app-header{flex-shrink:0}.sidebar__search{padding:var(--spacing-8) var(--spacing-16);border-bottom:var(--spacing-1) solid var(--delimiter-color);flex-shrink:0}.sidebar__nav{gap:var(--spacing-12);padding:var(--spacing-16);flex-direction:column;flex:1;min-height:0;display:flex;overflow-y:auto}.sidebar__section,.sidebar__section-header{gap:var(--spacing-4);flex-direction:column;display:flex}.sidebar__section-title-row{align-items:center;gap:var(--spacing-8);padding:0 var(--spacing-8);color:var(--body-color-muted);display:flex}.sidebar__section-icon{font-size:var(--font-size-md);flex-shrink:0;justify-content:center;align-items:center;line-height:1;display:flex}.sidebar__section-copy{flex-direction:column;min-width:0;display:flex}.sidebar__section-title{color:var(--body-color-muted);font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);text-transform:uppercase;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.sidebar__section-heading{color:var(--body-color-muted);font-size:var(--font-size-xs);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.sidebar__section-description{padding:0 var(--spacing-8);color:var(--body-color-muted);font-size:var(--font-size-xs);margin:0;line-height:1.4}.sidebar__link{align-items:center;gap:var(--spacing-12);width:100%;padding:var(--spacing-12) var(--spacing-16);color:var(--body-color);border:var(--spacing-1) solid transparent;border-radius:var(--radius);font-size:var(--font-size-md);font-weight:var(--font-weight-normal);text-align:left;cursor:pointer;background:0 0;text-decoration:none;transition:all .2s;display:flex}.sidebar__link:hover{background:var(--card-background-accent-color);color:var(--body-color-accent)}.sidebar__link--active{background:var(--card-background-accent-color);color:var(--body-accent-color);border-color:var(--body-accent-color)}.sidebar__link-icon,.sidebar__link-emoji{font-size:var(--font-size-lg);flex-shrink:0;line-height:1}.sidebar__link-bullet{width:var(--spacing-8);height:var(--spacing-8);border-radius:999px;flex-shrink:0}.sidebar__link-label{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.sidebar__link-count{color:var(--body-color-muted);font-size:var(--font-size-xs);text-align:right;margin-left:auto;line-height:1.4}.sidebar__divider{height:var(--spacing-1);background:var(--delimiter-color);margin:var(--spacing-8) 0}.sidebar--closed:not(.sidebar--mobile){border-right-width:0;width:0}.sidebar--closed:not(.sidebar--mobile) .sidebar__nav{visibility:hidden;pointer-events:none}.sidebar--mobile{border:0;border-right:var(--spacing-1) solid var(--delimiter-color);z-index:1000;min-height:0;box-shadow:var(--spacing-2) 0 var(--spacing-8) var(--box-shadow);border-radius:0;margin:0;position:fixed;top:0;bottom:0;left:0;transform:translate(-100%)}.sidebar--mobile.sidebar--open{transform:translate(0)}.sidebar--contained{position:absolute}.sidebar__overlay{z-index:999;background:#00000080;position:fixed;inset:0}.sidebar__overlay--contained{position:absolute}.sidebar::-webkit-scrollbar{width:var(--scrollbar-size)}.sidebar::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.sidebar::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb-color);border-radius:var(--scrollbar-radius)}.sidebar::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover-color)}@media (width>=769px){.sidebar{height:calc(100% - var(--spacing-32));max-height:calc(100% - var(--spacing-32))}}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import './Sidebar.css';
|
|
2
|
+
import { Icon as N } from "../Icon/Icon2.js";
|
|
3
|
+
import { Tooltip as M } from "../Tooltip/Tooltip2.js";
|
|
4
|
+
import { AppHeader as O } from "../AppHeader/AppHeader2.js";
|
|
5
|
+
import { InputSearch as A } from "../InputSearch/InputSearch2.js";
|
|
6
|
+
import { useSidebarContext as F } from "./SidebarContext.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import { useState as I } from "react";
|
|
9
|
+
import { Fragment as Q, jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
10
|
+
var K = ({ sections: t, width: u = "280px", className: v = "", appHeaderProps: r, renderItem: b, isOpen: f, onClose: C, isMobile: g, showOverlay: k = !0, contained: _ = !1, shadow: j = "none", searchPlaceholder: n }) => {
|
|
11
|
+
const [o, y] = I(""), d = F(), s = g ?? d?.isMobile ?? !1, m = f ?? (s ? d?.isOpen ?? !1 : !0), h = C ?? d?.close ?? (() => {
|
|
12
|
+
}), c = n && o ? t.map((e) => ({
|
|
13
|
+
...e,
|
|
14
|
+
items: e.items.filter((l) => l.label.toLowerCase().includes(o.toLowerCase()))
|
|
15
|
+
})).filter((e) => e.items.length > 0) : t, S = [
|
|
16
|
+
"sidebar",
|
|
17
|
+
m ? "sidebar--open" : "sidebar--closed",
|
|
18
|
+
s ? "sidebar--mobile" : "",
|
|
19
|
+
_ ? "sidebar--contained" : "",
|
|
20
|
+
v
|
|
21
|
+
].filter(Boolean).join(" "), w = ["sidebar__overlay", _ ? "sidebar__overlay--contained" : ""].filter(Boolean).join(" "), x = {
|
|
22
|
+
"--sidebar-width": u,
|
|
23
|
+
"--sidebar-shadow": j
|
|
24
|
+
}, B = (e) => {
|
|
25
|
+
e.onClick?.(), s && h();
|
|
26
|
+
}, L = (e) => /* @__PURE__ */ i("button", {
|
|
27
|
+
className: [
|
|
28
|
+
"sidebar__link",
|
|
29
|
+
e.isActive ? "sidebar__link--active" : "",
|
|
30
|
+
e.className
|
|
31
|
+
].filter(Boolean).join(" "),
|
|
32
|
+
onClick: () => B(e),
|
|
33
|
+
children: [
|
|
34
|
+
e.icon && /* @__PURE__ */ a("span", {
|
|
35
|
+
className: "sidebar__link-icon",
|
|
36
|
+
children: /* @__PURE__ */ a(N, { name: e.icon })
|
|
37
|
+
}),
|
|
38
|
+
e.emoji && /* @__PURE__ */ a("span", {
|
|
39
|
+
className: "sidebar__link-emoji",
|
|
40
|
+
children: e.emoji
|
|
41
|
+
}),
|
|
42
|
+
e.bulletColor && /* @__PURE__ */ a("span", {
|
|
43
|
+
className: "sidebar__link-bullet",
|
|
44
|
+
style: { backgroundColor: e.bulletColor }
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ a("span", {
|
|
47
|
+
className: "sidebar__link-label",
|
|
48
|
+
children: e.label
|
|
49
|
+
}),
|
|
50
|
+
e.count !== void 0 && /* @__PURE__ */ a(M, {
|
|
51
|
+
title: e.countLabel,
|
|
52
|
+
children: /* @__PURE__ */ a("span", {
|
|
53
|
+
className: "sidebar__link-count",
|
|
54
|
+
children: e.count
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
}, e.id);
|
|
59
|
+
return /* @__PURE__ */ i(Q, { children: [k && s && m && /* @__PURE__ */ a("div", {
|
|
60
|
+
className: w,
|
|
61
|
+
onClick: h
|
|
62
|
+
}), /* @__PURE__ */ i("aside", {
|
|
63
|
+
className: S,
|
|
64
|
+
style: x,
|
|
65
|
+
children: [
|
|
66
|
+
r && /* @__PURE__ */ a(O, {
|
|
67
|
+
...r,
|
|
68
|
+
className: ["sidebar__app-header", r.className].filter(Boolean).join(" ")
|
|
69
|
+
}),
|
|
70
|
+
n && /* @__PURE__ */ a("div", {
|
|
71
|
+
className: "sidebar__search",
|
|
72
|
+
children: /* @__PURE__ */ a(A, {
|
|
73
|
+
value: o,
|
|
74
|
+
onChange: y,
|
|
75
|
+
placeholder: n
|
|
76
|
+
})
|
|
77
|
+
}),
|
|
78
|
+
c.length > 0 && /* @__PURE__ */ a("nav", {
|
|
79
|
+
className: "sidebar__nav",
|
|
80
|
+
children: c.map((e, l) => /* @__PURE__ */ i("section", {
|
|
81
|
+
className: "sidebar__section",
|
|
82
|
+
children: [
|
|
83
|
+
(e.title || e.heading || e.icon || e.description) && /* @__PURE__ */ i("div", {
|
|
84
|
+
className: "sidebar__section-header",
|
|
85
|
+
children: [(e.icon || e.title || e.heading) && /* @__PURE__ */ i("div", {
|
|
86
|
+
className: "sidebar__section-title-row",
|
|
87
|
+
children: [e.icon && /* @__PURE__ */ a("span", {
|
|
88
|
+
className: "sidebar__section-icon",
|
|
89
|
+
children: /* @__PURE__ */ a(N, { name: e.icon })
|
|
90
|
+
}), /* @__PURE__ */ i("div", {
|
|
91
|
+
className: "sidebar__section-copy",
|
|
92
|
+
children: [e.title && /* @__PURE__ */ a("span", {
|
|
93
|
+
className: "sidebar__section-title",
|
|
94
|
+
children: e.title
|
|
95
|
+
}), e.heading && /* @__PURE__ */ a("span", {
|
|
96
|
+
className: "sidebar__section-heading",
|
|
97
|
+
children: e.heading
|
|
98
|
+
})]
|
|
99
|
+
})]
|
|
100
|
+
}), e.description && /* @__PURE__ */ a("p", {
|
|
101
|
+
className: "sidebar__section-description",
|
|
102
|
+
children: e.description
|
|
103
|
+
})]
|
|
104
|
+
}),
|
|
105
|
+
e.items.map((p) => b ? b(p) : L(p)),
|
|
106
|
+
e.showDivider && l < c.length - 1 && /* @__PURE__ */ a("div", { className: "sidebar__divider" })
|
|
107
|
+
]
|
|
108
|
+
}, e.id ?? e.title ?? l))
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
})] });
|
|
112
|
+
};
|
|
113
|
+
export {
|
|
114
|
+
K as Sidebar
|
|
115
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useBreakpoint as l } from "../../hooks/useBreakpoint.js";
|
|
2
|
+
import { createContext as b, useCallback as t, useContext as m, useMemo as p, useState as v } from "react";
|
|
3
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
4
|
+
var u = b(null), S = () => m(u), g = () => {
|
|
5
|
+
const e = S();
|
|
6
|
+
if (!e) throw new Error("useSidebar must be used within a SidebarProvider");
|
|
7
|
+
return e;
|
|
8
|
+
}, h = ({ children: e }) => {
|
|
9
|
+
const { isMobile: o } = l(), [s, r] = v(!1), n = t(() => r((d) => !d), []), a = t(() => r(!0), []), i = t(() => r(!1), []), c = p(() => ({
|
|
10
|
+
isMobile: o,
|
|
11
|
+
isOpen: s,
|
|
12
|
+
toggle: n,
|
|
13
|
+
open: a,
|
|
14
|
+
close: i
|
|
15
|
+
}), [
|
|
16
|
+
o,
|
|
17
|
+
s,
|
|
18
|
+
n,
|
|
19
|
+
a,
|
|
20
|
+
i
|
|
21
|
+
]);
|
|
22
|
+
return /* @__PURE__ */ x(u.Provider, {
|
|
23
|
+
value: c,
|
|
24
|
+
children: e
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
h as SidebarProvider,
|
|
29
|
+
g as useSidebar,
|
|
30
|
+
S as useSidebarContext
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.SignalStrength{display:inline-flex}.SignalStrength--excellent{--signal-color:var(--button-success-border-color)}.SignalStrength--good{--signal-color:var(--button-info-border-color)}.SignalStrength--fair{--signal-color:var(--button-warning-border-color)}.SignalStrength--weak{--signal-color:var(--button-danger-border-color)}.SignalStrength--unknown{--signal-color:var(--body-color-muted)}.SignalStrength__bar--inactive{opacity:.3}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import './SignalStrength.css';
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
var o = (r, n) => r || (n >= 75 ? "excellent" : n >= 50 ? "good" : n >= 25 ? "fair" : n > 0 ? "weak" : "unknown"), h = (r) => r >= 75 ? 4 : r >= 50 ? 3 : r >= 25 ? 2 : r > 0 ? 1 : 0;
|
|
5
|
+
function s({ value: r, state: n, size: a = 16, className: e = "" }) {
|
|
6
|
+
const g = o(n, r), t = h(r);
|
|
7
|
+
return /* @__PURE__ */ l("svg", {
|
|
8
|
+
width: a,
|
|
9
|
+
height: a,
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
className: `SignalStrength SignalStrength--${g} ${e}`,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ i("rect", {
|
|
16
|
+
x: "3",
|
|
17
|
+
y: "16",
|
|
18
|
+
width: "3",
|
|
19
|
+
height: "5",
|
|
20
|
+
rx: "1",
|
|
21
|
+
fill: t >= 1 ? "var(--signal-color)" : "var(--body-color-muted)",
|
|
22
|
+
className: `SignalStrength__bar ${t >= 1 ? "" : "SignalStrength__bar--inactive"}`
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ i("rect", {
|
|
25
|
+
x: "8",
|
|
26
|
+
y: "12",
|
|
27
|
+
width: "3",
|
|
28
|
+
height: "9",
|
|
29
|
+
rx: "1",
|
|
30
|
+
fill: t >= 2 ? "var(--signal-color)" : "var(--body-color-muted)",
|
|
31
|
+
className: `SignalStrength__bar ${t >= 2 ? "" : "SignalStrength__bar--inactive"}`
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ i("rect", {
|
|
34
|
+
x: "13",
|
|
35
|
+
y: "8",
|
|
36
|
+
width: "3",
|
|
37
|
+
height: "13",
|
|
38
|
+
rx: "1",
|
|
39
|
+
fill: t >= 3 ? "var(--signal-color)" : "var(--body-color-muted)",
|
|
40
|
+
className: `SignalStrength__bar ${t >= 3 ? "" : "SignalStrength__bar--inactive"}`
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ i("rect", {
|
|
43
|
+
x: "18",
|
|
44
|
+
y: "4",
|
|
45
|
+
width: "3",
|
|
46
|
+
height: "17",
|
|
47
|
+
rx: "1",
|
|
48
|
+
fill: t >= 4 ? "var(--signal-color)" : "var(--body-color-muted)",
|
|
49
|
+
className: `SignalStrength__bar ${t >= 4 ? "" : "SignalStrength__bar--inactive"}`
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
s as SignalStrength
|
|
56
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@keyframes skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes skeleton-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}.skeleton{background-color:var(--body-color-muted);opacity:.2;display:block}.skeleton--pulse{animation:1.5s ease-in-out infinite skeleton-pulse}.skeleton--wave{background-color:var(--body-color-muted);position:relative;overflow:hidden}.skeleton--wave:after{content:"";background:linear-gradient(90deg,#0000,#fff3,#0000);animation:1.5s linear infinite skeleton-wave;position:absolute;inset:0}.skeleton--none{animation:none}.skeleton--text{margin-bottom:var(--spacing-8);transform:scaleY(.6)}.skeleton--text:last-child{margin-bottom:0}.skeleton--circular{border-radius:50%}.skeleton--rectangular{border-radius:0}.skeleton--rounded{border-radius:var(--radius)}.skeleton-group{gap:var(--spacing-8);flex-direction:column;display:flex}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import './Skeleton.css';
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "react";
|
|
4
|
+
import { Fragment as b, jsx as o } from "react/jsx-runtime";
|
|
5
|
+
var y = ({ variant: a = "text", animation: n = "pulse", width: r, height: s, borderRadius: t, count: c = 1, className: p = "" }) => {
|
|
6
|
+
const i = () => {
|
|
7
|
+
const e = {};
|
|
8
|
+
if (r !== void 0 ? e.width = typeof r == "number" ? `${r}px` : r : e.width = "100%", s !== void 0) e.height = typeof s == "number" ? `${s}px` : s;
|
|
9
|
+
else switch (a) {
|
|
10
|
+
case "text":
|
|
11
|
+
e.height = "1em";
|
|
12
|
+
break;
|
|
13
|
+
case "circular":
|
|
14
|
+
e.height = r !== void 0 ? typeof r == "number" ? `${r}px` : r : "40px", e.width = e.height;
|
|
15
|
+
break;
|
|
16
|
+
case "rectangular":
|
|
17
|
+
e.height = "100px";
|
|
18
|
+
break;
|
|
19
|
+
case "rounded":
|
|
20
|
+
e.height = "40px";
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
if (t !== void 0) e.borderRadius = typeof t == "number" ? `${t}px` : t;
|
|
24
|
+
else switch (a) {
|
|
25
|
+
case "text":
|
|
26
|
+
e.borderRadius = "4px";
|
|
27
|
+
break;
|
|
28
|
+
case "circular":
|
|
29
|
+
e.borderRadius = "50%";
|
|
30
|
+
break;
|
|
31
|
+
case "rectangular":
|
|
32
|
+
e.borderRadius = "0";
|
|
33
|
+
break;
|
|
34
|
+
case "rounded":
|
|
35
|
+
e.borderRadius = "8px";
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
return e;
|
|
39
|
+
}, k = `skeleton skeleton--${a} skeleton--${n} ${p}`, m = i(), l = Array.from({ length: c }, (e, u) => /* @__PURE__ */ o("div", {
|
|
40
|
+
className: k,
|
|
41
|
+
style: m
|
|
42
|
+
}, u));
|
|
43
|
+
return c > 1 ? /* @__PURE__ */ o("div", {
|
|
44
|
+
className: "skeleton-group",
|
|
45
|
+
children: l
|
|
46
|
+
}) : /* @__PURE__ */ o(b, { children: l });
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
y as Skeleton
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.slider-component{--_track-thickness:var(--spacing-8);--_thumb-size:var(--spacing-24);--_value-size-inline:var(--font-size-xl);--_value-size-display:var(--font-size-xxl);--_input-width:100%;--_input-height:var(--_track-thickness);--_input-writing-mode:horizontal-tb;--_input-direction:ltr;--_input-margin-bottom:var(--spacing-16)}.slider-component--thin{--_track-thickness:var(--spacing-4);--_thumb-size:var(--spacing-16);--_value-size-inline:var(--font-size-md);--_value-size-display:var(--font-size-lg)}.slider-component--value-xs{--_value-size-inline:var(--font-size-xs);--_value-size-display:var(--font-size-xs)}.slider-component--value-sm{--_value-size-inline:var(--font-size-sm);--_value-size-display:var(--font-size-sm)}.slider-component--value-md{--_value-size-inline:var(--font-size-md);--_value-size-display:var(--font-size-md)}.slider-component--value-lg{--_value-size-inline:var(--font-size-lg);--_value-size-display:var(--font-size-lg)}.slider-component--value-xl{--_value-size-inline:var(--font-size-xl);--_value-size-display:var(--font-size-xl)}.slider-component--value-xxl{--_value-size-inline:var(--font-size-xxl);--_value-size-display:var(--font-size-xxl)}.slider-component--inline{align-items:center;gap:var(--spacing-12);--_input-margin-bottom:0;display:flex}.slider-component--inline .slider-input{flex:auto}.slider-component--inline .slider-value-inline{font-size:var(--_value-size-inline);font-weight:var(--font-weight-semibold);font-variant-numeric:tabular-nums;line-height:var(--line-height-none);min-width:var(--spacing-32);text-align:right;flex:none}.slider-component--inline .slider-value-inline.slider-state-info{color:var(--rating-color-info)}.slider-component--inline .slider-value-inline.slider-state-success{color:var(--rating-color-success)}.slider-component--inline .slider-value-inline.slider-state-warning{color:var(--rating-color-warning)}.slider-component--inline .slider-value-inline.slider-state-danger{color:var(--rating-color-danger)}.slider-component--vertical{--_input-width:var(--_track-thickness);--_input-height:var(--spacing-200);--_input-writing-mode:vertical-lr;--_input-direction:rtl;--_input-margin-bottom:var(--spacing-12);flex-direction:column;align-items:center;display:flex}.slider-component .slider-input{width:var(--_input-width);height:var(--_input-height);writing-mode:var(--_input-writing-mode);direction:var(--_input-direction);appearance:none;background-color:var(--slider-track-background-color);border:var(--spacing-1) solid var(--slider-track-border-color);border-radius:var(--radius-sm);margin-bottom:var(--_input-margin-bottom);cursor:pointer;outline:none;transition:all .2s}.slider-component .slider-input:hover{border-color:var(--slider-track-hover-border-color);background-color:var(--slider-track-hover-background-color)}.slider-component .slider-input::-webkit-slider-thumb{appearance:none;width:var(--_thumb-size);height:var(--_thumb-size);background-color:var(--slider-thumb-background-color);cursor:pointer;border:var(--spacing-2) solid var(--slider-thumb-border-color);border-radius:50%;transition:all .2s}.slider-component .slider-input::-webkit-slider-thumb:hover{background-color:var(--slider-thumb-hover-background-color);border-color:var(--slider-thumb-hover-border-color);transform:scale(1.1)}.slider-component .slider-input::-moz-range-thumb{width:var(--_thumb-size);height:var(--_thumb-size);background-color:var(--slider-thumb-background-color);cursor:pointer;border:var(--spacing-2) solid var(--slider-thumb-border-color);border-radius:50%;transition:all .2s}.slider-component .slider-input::-moz-range-thumb:hover{background-color:var(--slider-thumb-hover-background-color);border-color:var(--slider-thumb-hover-border-color);transform:scale(1.1)}.slider-component .slider-display{text-align:center}.slider-component .slider-display .slider-value{font-size:var(--_value-size-display);font-weight:var(--font-weight-bold)}.slider-component .slider-display .slider-state-info{color:var(--rating-color-info)}.slider-component .slider-display .slider-state-success{color:var(--rating-color-success)}.slider-component .slider-display .slider-state-warning{color:var(--rating-color-warning)}.slider-component .slider-display .slider-state-danger{color:var(--rating-color-danger)}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import './Slider.css';
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { jsx as n, jsxs as v } from "react/jsx-runtime";
|
|
4
|
+
var x = (e) => !Number.isFinite(e) || e >= 1 ? 0 : String(e).split(".")[1]?.length ?? 0, F = ({ disabled: e = !1, largeValueState: s = "info", min: c = 0, max: m = 100, step: l = 1, value: i, onChange: p, showValues: h = !0, showValueAtTheRight: f = !1, valueSize: r, thin: u = !1, vertical: a = !1 }) => {
|
|
5
|
+
const g = (N) => {
|
|
6
|
+
p(parseFloat(N.target.value));
|
|
7
|
+
}, t = x(l), o = t > 0 ? i.toFixed(t) : String(i), d = f && !a;
|
|
8
|
+
return /* @__PURE__ */ v("div", {
|
|
9
|
+
className: [
|
|
10
|
+
"slider-component",
|
|
11
|
+
d ? "slider-component--inline" : "",
|
|
12
|
+
u ? "slider-component--thin" : "",
|
|
13
|
+
a ? "slider-component--vertical" : "",
|
|
14
|
+
r ? `slider-component--value-${r}` : ""
|
|
15
|
+
].filter(Boolean).join(" "),
|
|
16
|
+
children: [/* @__PURE__ */ n("input", {
|
|
17
|
+
type: "range",
|
|
18
|
+
min: c,
|
|
19
|
+
max: m,
|
|
20
|
+
value: i,
|
|
21
|
+
step: l,
|
|
22
|
+
onChange: g,
|
|
23
|
+
className: "slider-input",
|
|
24
|
+
disabled: e
|
|
25
|
+
}), h && (d ? /* @__PURE__ */ n("span", {
|
|
26
|
+
className: `slider-value-inline slider-state-${s}`,
|
|
27
|
+
children: o
|
|
28
|
+
}) : /* @__PURE__ */ n("div", {
|
|
29
|
+
className: "slider-display",
|
|
30
|
+
children: /* @__PURE__ */ n("span", {
|
|
31
|
+
className: `slider-value slider-state-${s}`,
|
|
32
|
+
children: o
|
|
33
|
+
})
|
|
34
|
+
}))]
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
F as Slider
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
body.split-panel-active{overflow:hidden}body.split-panel-active .Layout{height:100vh;overflow:hidden}body.split-panel-active .Layout__content{padding:0;overflow:hidden}.split-panel--open{flex-direction:row;height:100%;display:flex;overflow:hidden}.split-panel__left{min-width:0;padding:var(--spacing-24);flex-shrink:0;overflow-y:auto}.split-panel__divider{background:var(--border-color);cursor:col-resize;width:6px;transition:background var(--transition-fast);flex-shrink:0;justify-content:center;align-items:center;display:flex;position:relative}.split-panel__divider:hover,.split-panel__divider:active{background:var(--body-accent-color)}.split-panel__divider:hover .split-panel__divider-handle,.split-panel__divider:active .split-panel__divider-handle{background:var(--body-color-accent)}.split-panel__divider-handle{border-radius:var(--radius-full);background:var(--body-sub-title-color);pointer-events:none;width:2px;height:40px}.split-panel__right{border-left:1px solid var(--border-color);background:var(--body-background);flex-direction:column;flex:1;min-width:0;display:flex;overflow:hidden}.split-panel__right-header{justify-content:space-between;align-items:center;gap:var(--spacing-16);padding:var(--spacing-16) var(--spacing-24);border-bottom:1px solid var(--border-color);background:var(--card-background-color);flex-shrink:0;display:flex}.split-panel__right-title{font-size:var(--font-size-lg);font-weight:var(--font-weight-semibold);color:var(--body-title-color);text-overflow:ellipsis;white-space:nowrap;margin:0;overflow:hidden}.split-panel__close{border-radius:var(--radius);cursor:pointer;width:32px;height:32px;color:var(--body-sub-title-color);font-size:var(--font-size-md);transition:background var(--transition-fast), color var(--transition-fast);background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;display:flex}.split-panel__close:hover{background:var(--border-color);color:var(--body-title-color)}.split-panel__right-content{padding:var(--spacing-24);flex:1;overflow-y:auto}
|