@krosoft/react 0.0.380 → 0.0.382
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/_virtual/_rolldown/runtime.js +13 -0
- package/dist/components/core/cards/DashboardCard.js +18 -0
- package/dist/components/core/cards/KpiCard.js +36 -0
- package/dist/components/core/cards/KpiCards.js +29 -0
- package/dist/components/core/cards/MetricCard.js +63 -0
- package/dist/components/core/cards/SkeletonCard.js +13 -0
- package/dist/components/core/cards/SkeletonCards.js +11 -0
- package/dist/components/core/cards/index.js +7 -1
- package/dist/components/core/changelog/AppChangelog.js +123 -0
- package/dist/components/core/changelog/AppChangelogEntry.js +85 -0
- package/dist/components/core/changelog/AppChangelogNav.js +39 -0
- package/dist/components/core/changelog/AppChangelogTagFilter.js +39 -0
- package/dist/components/core/changelog/index.js +1 -1
- package/dist/components/core/charts/BarChartHorizontal.js +80 -0
- package/dist/components/core/charts/BarChartVertical.js +68 -0
- package/dist/components/core/charts/ChartCard.js +44 -0
- package/dist/components/core/charts/CircularGauge.js +58 -0
- package/dist/components/core/charts/LineChart.js +69 -0
- package/dist/components/core/charts/PieChart.js +55 -0
- package/dist/components/core/charts/chartColors.js +10 -0
- package/dist/components/core/charts/chartTooltip.helper.js +15 -0
- package/dist/components/core/charts/index.js +8 -1
- package/dist/components/core/dialogs/AboutDialog.js +59 -0
- package/dist/components/core/dialogs/AppDialog.js +81 -0
- package/dist/components/core/dialogs/ConfirmationDialog.js +42 -0
- package/dist/components/core/dialogs/FormDialog.js +105 -0
- package/dist/components/core/dialogs/index.js +7 -4
- package/dist/components/core/filters/ActiveFilters.js +69 -0
- package/dist/components/core/filters/AdvancedFilters.js +103 -0
- package/dist/components/core/filters/ConditionFilter.js +162 -0
- package/dist/components/core/filters/ConditionFilterGroup.js +44 -0
- package/dist/components/core/filters/FilterField.js +64 -0
- package/dist/components/core/filters/FilterPills.js +13 -0
- package/dist/components/core/filters/FilterPillsGroup.js +39 -0
- package/dist/components/core/filters/FiltersContainer.js +54 -0
- package/dist/components/core/filters/FiltersMobileDrawer.js +57 -0
- package/dist/components/core/filters/TableFilter.js +101 -0
- package/dist/components/core/filters/index.js +11 -645
- package/dist/{GenericForm-Dxd6k7l-.js → components/core/forms/GenericForm.js} +45 -43
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/icons/FlagFrIcon.js +28 -0
- package/dist/{icons-n0m_1w7z.js → components/core/icons/FlagGbIcon.js} +3 -26
- package/dist/components/core/icons/index.js +3 -1
- package/dist/components/core/index.js +71 -27
- package/dist/components/core/inputs/DatePicker.js +46 -0
- package/dist/components/core/inputs/DateRangePicker.js +92 -0
- package/dist/{inputs-CBojnClc.js → components/core/inputs/FileDropzone.js} +8 -37
- package/dist/{ImageInput-BeIOm3GY.js → components/core/inputs/ImageInput.js} +5 -5
- package/dist/components/core/inputs/MultiSelect.js +191 -0
- package/dist/components/core/inputs/RatingInput.js +36 -0
- package/dist/{SearchInput-IT_Rvthr.js → components/core/inputs/SearchInput.js} +4 -4
- package/dist/components/core/inputs/SingleSelect.js +198 -0
- package/dist/components/core/inputs/index.js +9 -6
- package/dist/components/core/inputs/select.helper.js +46 -0
- package/dist/{language-DY0EYabh.js → components/core/language/LanguageSelector.js} +13 -12
- package/dist/components/core/language/index.js +1 -1
- package/dist/{AppActions-8HjAaTQK.js → components/core/layouts/AppActions.js} +19 -19
- package/dist/components/core/layouts/AppPageHeader.js +44 -0
- package/dist/{AppSubTitle-DI62BaaB.js → components/core/layouts/AppSubTitle.js} +3 -3
- package/dist/{AppTitle-BXoTrXQc.js → components/core/layouts/AppTitle.js} +3 -3
- package/dist/components/core/layouts/KpiCardsLayout.js +8 -0
- package/dist/components/core/layouts/index.js +6 -50
- package/dist/components/core/markdown/AppMarkdown.js +134 -0
- package/dist/components/core/markdown/AppMarkdownHeading.js +45 -0
- package/dist/components/core/markdown/index.js +1 -1
- package/dist/components/core/navbar/GlobalSearch.js +128 -0
- package/dist/components/core/navbar/NotificationsBell.js +133 -0
- package/dist/components/core/navbar/Sidebar.js +99 -0
- package/dist/components/core/navbar/SidebarHeader.js +26 -0
- package/dist/components/core/navbar/SidebarNavItem.js +72 -0
- package/dist/components/core/navbar/Topbar.js +25 -0
- package/dist/components/core/navbar/index.js +7 -1
- package/dist/{ErrorAlert-cJnfBL8H.js → components/core/states/ErrorAlert.js} +5 -5
- package/dist/{states-CJ8xE_Nm.js → components/core/states/ErrorState.js} +4 -11
- package/dist/components/core/states/LoadingState.js +12 -0
- package/dist/components/core/states/index.js +3 -2
- package/dist/components/core/table/DataTable.js +108 -0
- package/dist/components/core/table/JsonTableOutput.js +75 -0
- package/dist/components/core/table/TableActions.js +75 -0
- package/dist/components/core/table/TableBody.js +130 -0
- package/dist/components/core/table/TableBulkActions.js +47 -0
- package/dist/components/core/table/TableHeader.js +103 -0
- package/dist/components/core/table/TablePagination.js +102 -0
- package/dist/components/core/table/TableSettings.js +117 -0
- package/dist/components/core/table/index.js +9 -709
- package/dist/components/core/tabs/AppTabContainer.js +17 -0
- package/dist/components/core/tabs/AppTabHeader.js +19 -0
- package/dist/components/core/tabs/AppTabs.js +56 -0
- package/dist/components/core/tabs/AppVerticalTabs.js +105 -0
- package/dist/components/core/tabs/index.js +5 -188
- package/dist/{theme-DSumNHLX.js → components/core/theme/ThemeSelector.js} +13 -12
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +117 -34
- package/dist/components/ui/accordion.js +34 -0
- package/dist/components/ui/alert-dialog.js +54 -0
- package/dist/{alert-REQGK9bR.js → components/ui/alert.js} +2 -2
- package/dist/components/ui/aspect-ratio.js +5 -0
- package/dist/components/ui/avatar.js +25 -0
- package/dist/components/ui/badge.js +22 -0
- package/dist/components/ui/breadcrumb.js +60 -0
- package/dist/{tooltip-_geGvbS7.js → components/ui/button.js} +7 -17
- package/dist/components/ui/calendar.js +44 -0
- package/dist/components/ui/card.js +42 -0
- package/dist/components/ui/carousel.js +115 -0
- package/dist/{chart-wW-fwL3s.js → components/ui/chart.js} +51 -89
- package/dist/components/ui/checkbox.js +31 -0
- package/dist/components/ui/collapsible.js +5 -0
- package/dist/components/ui/command.js +84 -0
- package/dist/components/ui/context-menu.js +71 -0
- package/dist/components/ui/control.js +5 -0
- package/dist/components/ui/dialog.js +49 -0
- package/dist/components/ui/drawer.js +47 -0
- package/dist/components/ui/dropdown-menu.js +72 -0
- package/dist/components/ui/form.js +78 -0
- package/dist/components/ui/hover-card.js +15 -0
- package/dist/components/ui/index.js +49 -9
- package/dist/components/ui/input-otp.js +41 -0
- package/dist/components/ui/input.js +14 -0
- package/dist/components/ui/label.js +14 -0
- package/dist/components/ui/menubar.js +86 -0
- package/dist/components/ui/navigation-menu.js +58 -0
- package/dist/components/ui/pagination.js +62 -0
- package/dist/components/ui/popover.js +15 -0
- package/dist/components/ui/progress.js +17 -0
- package/dist/components/ui/radio-group.js +24 -0
- package/dist/components/ui/resizable.js +18 -0
- package/dist/components/ui/scroll-area.js +29 -0
- package/dist/{select-KWMg2_7Z.js → components/ui/select.js} +3 -3
- package/dist/components/ui/separator.js +15 -0
- package/dist/components/ui/sheet.js +58 -0
- package/dist/components/ui/simple-table.js +57 -0
- package/dist/{skeleton-D6Ga4BLw.js → components/ui/skeleton.js} +2 -2
- package/dist/components/ui/slider.js +17 -0
- package/dist/components/ui/sonner.js +23 -0
- package/dist/components/ui/switch.js +14 -0
- package/dist/components/ui/tabs.js +58 -0
- package/dist/components/ui/textarea.js +12 -0
- package/dist/components/ui/toast.js +53 -0
- package/dist/components/ui/toaster.js +22 -0
- package/dist/components/ui/toggle-group.js +37 -0
- package/dist/components/ui/toggle.js +34 -0
- package/dist/components/ui/tooltip.js +14 -0
- package/dist/{datatable-COQcYUrk.js → constants/datatable.js} +1 -1
- package/dist/constants/index.js +3 -5
- package/dist/constants/search.js +4 -0
- package/dist/contexts/index.js +3 -1
- package/dist/{sidebar.context-BahtU6hE.js → contexts/page.context.js} +2 -2
- package/dist/contexts/sidebar.context.js +5 -0
- package/dist/helpers/changelog.helper.js +69 -0
- package/dist/helpers/index.js +6 -166
- package/dist/{markdown.helper-YJE2H5KQ.js → helpers/markdown.helper.js} +1 -1
- package/dist/helpers/supabase.helper.js +41 -0
- package/dist/helpers/table.helper.js +56 -0
- package/dist/{tailwind.helper-CJaRYBmL.js → helpers/tailwind.helper.js} +1 -1
- package/dist/hooks/behavior/index.js +10 -1
- package/dist/hooks/behavior/useConfirmDeleteDialog.js +21 -0
- package/dist/hooks/behavior/useConfirmationDialog.js +23 -0
- package/dist/hooks/behavior/useDebounce.js +14 -0
- package/dist/hooks/behavior/useDebouncedValue.js +15 -0
- package/dist/hooks/behavior/useDialog.js +21 -0
- package/dist/hooks/behavior/usePage.js +10 -0
- package/dist/hooks/behavior/useSidebar.js +10 -0
- package/dist/hooks/behavior/useTable.js +83 -0
- package/dist/hooks/behavior/useUrlState.js +46 -0
- package/dist/hooks/index.js +20 -11
- package/dist/hooks/ui/index.js +11 -10
- package/dist/{useFixedColumns-Bo-Az3Hp.js → hooks/ui/useDataTable.js} +16 -52
- package/dist/{useDocumentTitle-VoQkict_.js → hooks/ui/useDocumentTitle.js} +2 -2
- package/dist/hooks/ui/useFixedColumns.js +38 -0
- package/dist/{useLanguage-DRnSb5H1.js → hooks/ui/useLanguage.js} +3 -3
- package/dist/{useMobile-pTQ8lWvt.js → hooks/ui/useMobile.js} +1 -1
- package/dist/{useNotifications-CyhTruIG.js → hooks/ui/useNotifications.js} +2 -2
- package/dist/{useScrollFade-D9kqJBDh.js → hooks/ui/useScrollFade.js} +1 -1
- package/dist/{ui-nQGnCss1.js → hooks/ui/useServerTable.js} +2 -2
- package/dist/{useTheme-DIZjiF5F.js → hooks/ui/useTheme.js} +3 -3
- package/dist/{useToast-UeDRLovh.js → hooks/ui/useToast.js} +1 -1
- package/dist/i18n/index.js +4 -1
- package/dist/i18n/krosoftLocales.js +13 -0
- package/dist/i18n/useDateFnsLocale.js +13 -0
- package/dist/i18n/useKrosoftTranslation.js +13 -0
- package/dist/locales/en.json.js +174 -0
- package/dist/locales/fr.json.js +174 -0
- package/dist/providers/SidebarProvider.js +42 -0
- package/dist/providers/index.js +1 -42
- package/dist/pwa/PwaUpdater.js +30 -0
- package/dist/pwa/index.js +3 -50
- package/dist/pwa/pwaUpdateToast.js +25 -0
- package/dist/seasonal/EffectSwitch.js +24 -0
- package/dist/seasonal/EmojiSnowfall.js +24 -0
- package/dist/seasonal/HalloweenEffect.js +17 -0
- package/dist/seasonal/SeasonalEffects.js +8 -0
- package/dist/seasonal/SeasonalEffectsSettings.js +35 -0
- package/dist/seasonal/SnowEffect.js +12 -0
- package/dist/seasonal/index.js +7 -120
- package/dist/seasonal/overlayStyle.js +12 -0
- package/dist/seasonal/seasons.js +7 -0
- package/dist/seasonal/useSeasonalEffects.js +20 -0
- package/dist/seasonal/useStoredToggle.js +21 -0
- package/dist/tailwind/index.js +7 -53
- package/dist/tokens/apply.js +16 -0
- package/dist/tokens/index.js +3 -38
- package/dist/tokens/radius.js +26 -0
- package/dist/types/index.js +0 -1
- package/dist/vendor/tailwindcss/lib/public/create-plugin.js +19 -0
- package/dist/vendor/tailwindcss/lib/util/createPlugin.js +30 -0
- package/dist/vendor/tailwindcss/plugin.js +10 -0
- package/package.json +4 -4
- package/dist/AppMarkdown-CAxm82x0.js +0 -171
- package/dist/MultiSelect-DPN046kI.js +0 -228
- package/dist/SingleSelect-DLY5WylQ.js +0 -313
- package/dist/behavior-B0BYivtN.js +0 -201
- package/dist/cards-DPzVebUM.js +0 -132
- package/dist/changelog-DyPFIscf.js +0 -257
- package/dist/charts-C7rKxkli.js +0 -342
- package/dist/dialogs-CG9Q7pqY.js +0 -269
- package/dist/i18n-BhLphJa3.js +0 -364
- package/dist/navbar-DD0V0pNE.js +0 -432
- package/dist/sheet-cWJO_wkT.js +0 -225
- package/dist/switch-DspImmo_.js +0 -24
- package/dist/ui-Fxy95kSJ.js +0 -1163
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useMobile as e } from "../hooks/ui/useMobile.js";
|
|
2
|
+
import { SidebarContext as t } from "../contexts/sidebar.context.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/providers/SidebarProvider.tsx
|
|
6
|
+
var i = "sidebar:collapsed", a = 604800, o = "b", s = (e) => {
|
|
7
|
+
if (typeof document > "u") return e;
|
|
8
|
+
let t = document.cookie.split("; ").find((e) => e.startsWith(`${i}=`));
|
|
9
|
+
return t === void 0 ? e : t.split("=")[1] === "true";
|
|
10
|
+
}, c = ({ children: c, defaultCollapsed: l = !1, collapsed: u, onCollapsedChange: d }) => {
|
|
11
|
+
let f = e(), [p, m] = n.useState(() => s(l)), h = u ?? p, g = n.useCallback((e) => {
|
|
12
|
+
let t = typeof e == "function" ? e(h) : e;
|
|
13
|
+
d ? d(t) : m(t), typeof document < "u" && (document.cookie = `${i}=${String(t)}; path=/; max-age=${String(a)}`);
|
|
14
|
+
}, [d, h]), _ = n.useCallback(() => {
|
|
15
|
+
g((e) => !e);
|
|
16
|
+
}, [g]);
|
|
17
|
+
n.useEffect(() => {
|
|
18
|
+
let e = (e) => {
|
|
19
|
+
e.key === o && (e.metaKey || e.ctrlKey) && (e.preventDefault(), _());
|
|
20
|
+
};
|
|
21
|
+
return window.addEventListener("keydown", e), () => {
|
|
22
|
+
window.removeEventListener("keydown", e);
|
|
23
|
+
};
|
|
24
|
+
}, [_]);
|
|
25
|
+
let v = n.useMemo(() => ({
|
|
26
|
+
collapsed: h,
|
|
27
|
+
setCollapsed: g,
|
|
28
|
+
isMobile: f,
|
|
29
|
+
toggleSidebar: _
|
|
30
|
+
}), [
|
|
31
|
+
h,
|
|
32
|
+
g,
|
|
33
|
+
f,
|
|
34
|
+
_
|
|
35
|
+
]);
|
|
36
|
+
return /* @__PURE__ */ r(t.Provider, {
|
|
37
|
+
value: v,
|
|
38
|
+
children: c
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { c as SidebarProvider };
|
package/dist/providers/index.js
CHANGED
|
@@ -1,42 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { t } from "../sidebar.context-BahtU6hE.js";
|
|
3
|
-
import * as n from "react";
|
|
4
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
-
//#region src/providers/SidebarProvider.tsx
|
|
6
|
-
var i = "sidebar:collapsed", a = 604800, o = "b", s = (e) => {
|
|
7
|
-
if (typeof document > "u") return e;
|
|
8
|
-
let t = document.cookie.split("; ").find((e) => e.startsWith(`${i}=`));
|
|
9
|
-
return t === void 0 ? e : t.split("=")[1] === "true";
|
|
10
|
-
}, c = ({ children: c, defaultCollapsed: l = !1, collapsed: u, onCollapsedChange: d }) => {
|
|
11
|
-
let f = e(), [p, m] = n.useState(() => s(l)), h = u ?? p, g = n.useCallback((e) => {
|
|
12
|
-
let t = typeof e == "function" ? e(h) : e;
|
|
13
|
-
d ? d(t) : m(t), typeof document < "u" && (document.cookie = `${i}=${String(t)}; path=/; max-age=${String(a)}`);
|
|
14
|
-
}, [d, h]), _ = n.useCallback(() => {
|
|
15
|
-
g((e) => !e);
|
|
16
|
-
}, [g]);
|
|
17
|
-
n.useEffect(() => {
|
|
18
|
-
let e = (e) => {
|
|
19
|
-
e.key === o && (e.metaKey || e.ctrlKey) && (e.preventDefault(), _());
|
|
20
|
-
};
|
|
21
|
-
return window.addEventListener("keydown", e), () => {
|
|
22
|
-
window.removeEventListener("keydown", e);
|
|
23
|
-
};
|
|
24
|
-
}, [_]);
|
|
25
|
-
let v = n.useMemo(() => ({
|
|
26
|
-
collapsed: h,
|
|
27
|
-
setCollapsed: g,
|
|
28
|
-
isMobile: f,
|
|
29
|
-
toggleSidebar: _
|
|
30
|
-
}), [
|
|
31
|
-
h,
|
|
32
|
-
g,
|
|
33
|
-
f,
|
|
34
|
-
_
|
|
35
|
-
]);
|
|
36
|
-
return /* @__PURE__ */ r(t.Provider, {
|
|
37
|
-
value: v,
|
|
38
|
-
children: c
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
//#endregion
|
|
42
|
-
export { c as SidebarProvider };
|
|
1
|
+
export { SidebarProvider } from "./SidebarProvider.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useKrosoftTranslation as e } from "../i18n/useKrosoftTranslation.js";
|
|
2
|
+
import { showPwaUpdateToast as t } from "./pwaUpdateToast.js";
|
|
3
|
+
import { useEffect as n } from "react";
|
|
4
|
+
import { useRegisterSW as r } from "virtual:pwa-register/react";
|
|
5
|
+
//#region src/pwa/PwaUpdater.tsx
|
|
6
|
+
var i = 36e5, a = ({ checkIntervalMs: a = i } = {}) => {
|
|
7
|
+
let { t: o } = e(), { needRefresh: [s, c], updateServiceWorker: l } = r({ onRegisteredSW(e, t) {
|
|
8
|
+
t && setInterval(() => void t.update(), a);
|
|
9
|
+
} });
|
|
10
|
+
return n(() => {
|
|
11
|
+
s && t({
|
|
12
|
+
message: o("pwa.updateAvailable"),
|
|
13
|
+
actionLabel: o("pwa.updateAction"),
|
|
14
|
+
dismissLabel: o("pwa.updateDismiss"),
|
|
15
|
+
onUpdate: () => {
|
|
16
|
+
l(!0);
|
|
17
|
+
},
|
|
18
|
+
onDismiss: () => {
|
|
19
|
+
c(!1);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}, [
|
|
23
|
+
s,
|
|
24
|
+
c,
|
|
25
|
+
o,
|
|
26
|
+
l
|
|
27
|
+
]), null;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { a as PwaUpdater };
|
package/dist/pwa/index.js
CHANGED
|
@@ -1,50 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { useRegisterSW as r } from "virtual:pwa-register/react";
|
|
5
|
-
//#region src/pwa/pwaUpdateToast.ts
|
|
6
|
-
var i = ({ message: e, actionLabel: t, dismissLabel: r, onUpdate: i, onDismiss: a }) => {
|
|
7
|
-
n(e, {
|
|
8
|
-
duration: Infinity,
|
|
9
|
-
dismissible: !0,
|
|
10
|
-
classNames: {
|
|
11
|
-
toast: "!flex-wrap !justify-end",
|
|
12
|
-
content: "!basis-full",
|
|
13
|
-
actionButton: "!ml-0",
|
|
14
|
-
cancelButton: "!ml-0 !bg-transparent !text-muted-foreground hover:!bg-accent hover:!text-accent-foreground"
|
|
15
|
-
},
|
|
16
|
-
action: {
|
|
17
|
-
label: t,
|
|
18
|
-
onClick: i
|
|
19
|
-
},
|
|
20
|
-
cancel: {
|
|
21
|
-
label: r,
|
|
22
|
-
onClick: a
|
|
23
|
-
},
|
|
24
|
-
onDismiss: a
|
|
25
|
-
});
|
|
26
|
-
}, a = 36e5, o = ({ checkIntervalMs: n = a } = {}) => {
|
|
27
|
-
let { t: o } = e(), { needRefresh: [s, c], updateServiceWorker: l } = r({ onRegisteredSW(e, t) {
|
|
28
|
-
t && setInterval(() => void t.update(), n);
|
|
29
|
-
} });
|
|
30
|
-
return t(() => {
|
|
31
|
-
s && i({
|
|
32
|
-
message: o("pwa.updateAvailable"),
|
|
33
|
-
actionLabel: o("pwa.updateAction"),
|
|
34
|
-
dismissLabel: o("pwa.updateDismiss"),
|
|
35
|
-
onUpdate: () => {
|
|
36
|
-
l(!0);
|
|
37
|
-
},
|
|
38
|
-
onDismiss: () => {
|
|
39
|
-
c(!1);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}, [
|
|
43
|
-
s,
|
|
44
|
-
c,
|
|
45
|
-
o,
|
|
46
|
-
l
|
|
47
|
-
]), null;
|
|
48
|
-
};
|
|
49
|
-
//#endregion
|
|
50
|
-
export { o as PwaUpdater, i as showPwaUpdateToast };
|
|
1
|
+
import { showPwaUpdateToast as e } from "./pwaUpdateToast.js";
|
|
2
|
+
import { PwaUpdater as t } from "./PwaUpdater.js";
|
|
3
|
+
export { t as PwaUpdater, e as showPwaUpdateToast };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { toast as e } from "sonner";
|
|
2
|
+
//#region src/pwa/pwaUpdateToast.ts
|
|
3
|
+
var t = ({ message: t, actionLabel: n, dismissLabel: r, onUpdate: i, onDismiss: a }) => {
|
|
4
|
+
e(t, {
|
|
5
|
+
duration: Infinity,
|
|
6
|
+
dismissible: !0,
|
|
7
|
+
classNames: {
|
|
8
|
+
toast: "!flex-wrap !justify-end",
|
|
9
|
+
content: "!basis-full",
|
|
10
|
+
actionButton: "!ml-0",
|
|
11
|
+
cancelButton: "!ml-0 !bg-transparent !text-muted-foreground hover:!bg-accent hover:!text-accent-foreground"
|
|
12
|
+
},
|
|
13
|
+
action: {
|
|
14
|
+
label: n,
|
|
15
|
+
onClick: i
|
|
16
|
+
},
|
|
17
|
+
cancel: {
|
|
18
|
+
label: r,
|
|
19
|
+
onClick: a
|
|
20
|
+
},
|
|
21
|
+
onDismiss: a
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { t as showPwaUpdateToast };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Label as e } from "../components/ui/label.js";
|
|
2
|
+
import { Switch as t } from "../components/ui/switch.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/seasonal/EffectSwitch.tsx
|
|
6
|
+
var i = ({ id: i, label: a, description: o, icon: s, checked: c, onCheckedChange: l }) => /* @__PURE__ */ r("div", {
|
|
7
|
+
className: "space-y-2",
|
|
8
|
+
children: [/* @__PURE__ */ n(e, {
|
|
9
|
+
htmlFor: i,
|
|
10
|
+
children: a
|
|
11
|
+
}), /* @__PURE__ */ r("div", {
|
|
12
|
+
className: "flex items-center justify-between gap-4",
|
|
13
|
+
children: [/* @__PURE__ */ r("div", {
|
|
14
|
+
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
15
|
+
children: [/* @__PURE__ */ n(s, { className: "size-4" }), /* @__PURE__ */ n("span", { children: o })]
|
|
16
|
+
}), /* @__PURE__ */ n(t, {
|
|
17
|
+
id: i,
|
|
18
|
+
checked: c,
|
|
19
|
+
onCheckedChange: l
|
|
20
|
+
})]
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { i as EffectSwitch };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OVERLAY_STYLE as e } from "./overlayStyle.js";
|
|
2
|
+
import { useMemo as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import r from "react-snowfall";
|
|
5
|
+
//#region src/seasonal/EmojiSnowfall.tsx
|
|
6
|
+
var i = 64, a = (e) => {
|
|
7
|
+
let t = document.createElement("canvas");
|
|
8
|
+
t.width = i, t.height = i;
|
|
9
|
+
let n = t.getContext("2d");
|
|
10
|
+
return n && (n.font = `${String(i * .8)}px serif`, n.textAlign = "center", n.textBaseline = "middle", n.fillText(e, i / 2, i / 2)), t;
|
|
11
|
+
}, o = ({ emojis: i }) => {
|
|
12
|
+
let o = t(() => i.map(a), [i]);
|
|
13
|
+
return /* @__PURE__ */ n(r, {
|
|
14
|
+
images: o,
|
|
15
|
+
snowflakeCount: 25,
|
|
16
|
+
radius: [10, 18],
|
|
17
|
+
speed: [.5, 1.5],
|
|
18
|
+
wind: [-.5, 1],
|
|
19
|
+
rotationSpeed: [-1, 1],
|
|
20
|
+
style: e
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { o as EmojiSnowfall };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useHalloweenEffect as e } from "./useSeasonalEffects.js";
|
|
2
|
+
import { EmojiSnowfall as t } from "./EmojiSnowfall.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/seasonal/HalloweenEffect.tsx
|
|
6
|
+
var r = [
|
|
7
|
+
"🎃",
|
|
8
|
+
"🦇",
|
|
9
|
+
"👻",
|
|
10
|
+
"🕷️",
|
|
11
|
+
"🍬"
|
|
12
|
+
], i = ({ storagePrefix: i }) => {
|
|
13
|
+
let { isHalloweenSeason: a, isHalloweenEnabled: o } = e(i);
|
|
14
|
+
return !a || !o ? null : /* @__PURE__ */ n(t, { emojis: r });
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { i as HalloweenEffect };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SnowEffect as e } from "./SnowEffect.js";
|
|
2
|
+
import { HalloweenEffect as t } from "./HalloweenEffect.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/seasonal/SeasonalEffects.tsx
|
|
6
|
+
var a = ({ storagePrefix: a }) => /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(e, { storagePrefix: a }), /* @__PURE__ */ r(t, { storagePrefix: a })] });
|
|
7
|
+
//#endregion
|
|
8
|
+
export { a as SeasonalEffects };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useKrosoftTranslation as e } from "../i18n/useKrosoftTranslation.js";
|
|
2
|
+
import { useNotifications as t } from "../hooks/ui/useNotifications.js";
|
|
3
|
+
import { useHalloweenEffect as n, useSnowEffect as r } from "./useSeasonalEffects.js";
|
|
4
|
+
import { EffectSwitch as i } from "./EffectSwitch.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
import { GhostIcon as s, SnowflakeIcon as c } from "lucide-react";
|
|
8
|
+
//#region src/seasonal/SeasonalEffectsSettings.tsx
|
|
9
|
+
var l = ({ storagePrefix: l, className: u = "space-y-6" }) => {
|
|
10
|
+
let { t: d } = e(), { showSuccess: f } = t(), { isSnowEnabled: p, setSnowEnabled: m } = r(l), { isHalloweenSeason: h, isHalloweenEnabled: g, setHalloweenEnabled: _ } = n(l);
|
|
11
|
+
return /* @__PURE__ */ o("div", {
|
|
12
|
+
className: u,
|
|
13
|
+
children: [/* @__PURE__ */ a(i, {
|
|
14
|
+
id: "seasonal-snow",
|
|
15
|
+
label: d("seasonal.snow.label"),
|
|
16
|
+
description: d("seasonal.snow.description"),
|
|
17
|
+
icon: c,
|
|
18
|
+
checked: p,
|
|
19
|
+
onCheckedChange: (e) => {
|
|
20
|
+
m(e), f(d(e ? "seasonal.snow.toastEnabled" : "seasonal.snow.toastDisabled"), d(e ? "seasonal.snow.messageEnabled" : "seasonal.snow.messageDisabled"));
|
|
21
|
+
}
|
|
22
|
+
}), h && /* @__PURE__ */ a(i, {
|
|
23
|
+
id: "seasonal-halloween",
|
|
24
|
+
label: d("seasonal.halloween.label"),
|
|
25
|
+
description: d("seasonal.halloween.description"),
|
|
26
|
+
icon: s,
|
|
27
|
+
checked: g,
|
|
28
|
+
onCheckedChange: (e) => {
|
|
29
|
+
_(e), f(d(e ? "seasonal.halloween.toastEnabled" : "seasonal.halloween.toastDisabled"), d(e ? "seasonal.halloween.messageEnabled" : "seasonal.halloween.messageDisabled"));
|
|
30
|
+
}
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { l as SeasonalEffectsSettings };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useSnowEffect as e } from "./useSeasonalEffects.js";
|
|
2
|
+
import { OVERLAY_STYLE as t } from "./overlayStyle.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import r from "react-snowfall";
|
|
6
|
+
//#region src/seasonal/SnowEffect.tsx
|
|
7
|
+
var i = ({ storagePrefix: i }) => {
|
|
8
|
+
let { isSnowSeason: a, isSnowEnabled: o } = e(i);
|
|
9
|
+
return !a || !o ? null : /* @__PURE__ */ n(r, { style: t });
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { i as SnowEffect };
|
package/dist/seasonal/index.js
CHANGED
|
@@ -1,120 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
//#region src/seasonal/seasons.ts
|
|
9
|
-
var p = (e = /* @__PURE__ */ new Date()) => e.getMonth() === 11, m = (e = /* @__PURE__ */ new Date()) => {
|
|
10
|
-
let t = e.getMonth(), n = e.getDate();
|
|
11
|
-
return t === 9 && n >= 25 || t === 10 && n <= 2;
|
|
12
|
-
}, h = "krosoft-seasonal-change", g = (e) => {
|
|
13
|
-
try {
|
|
14
|
-
return localStorage.getItem(e) !== "false";
|
|
15
|
-
} catch {
|
|
16
|
-
return !0;
|
|
17
|
-
}
|
|
18
|
-
}, _ = (e) => (window.addEventListener("storage", e), window.addEventListener(h, e), () => {
|
|
19
|
-
window.removeEventListener("storage", e), window.removeEventListener(h, e);
|
|
20
|
-
}), v = (e) => {
|
|
21
|
-
let t = i(() => g(e), [e]);
|
|
22
|
-
return [o(_, t, () => !0), i((t) => {
|
|
23
|
-
try {
|
|
24
|
-
localStorage.setItem(e, String(t));
|
|
25
|
-
} catch {}
|
|
26
|
-
window.dispatchEvent(new Event(h));
|
|
27
|
-
}, [e])];
|
|
28
|
-
}, y = (e = "") => {
|
|
29
|
-
let [t, n] = v(`${e}snow-effect-enabled`);
|
|
30
|
-
return {
|
|
31
|
-
isSnowSeason: p(),
|
|
32
|
-
isSnowEnabled: t,
|
|
33
|
-
setSnowEnabled: n
|
|
34
|
-
};
|
|
35
|
-
}, b = (e = "") => {
|
|
36
|
-
let [t, n] = v(`${e}halloween-effect-enabled`);
|
|
37
|
-
return {
|
|
38
|
-
isHalloweenSeason: m(),
|
|
39
|
-
isHalloweenEnabled: t,
|
|
40
|
-
setHalloweenEnabled: n
|
|
41
|
-
};
|
|
42
|
-
}, x = {
|
|
43
|
-
position: "fixed",
|
|
44
|
-
width: "100vw",
|
|
45
|
-
height: "100vh",
|
|
46
|
-
top: 0,
|
|
47
|
-
left: 0,
|
|
48
|
-
zIndex: 9999,
|
|
49
|
-
pointerEvents: "none"
|
|
50
|
-
}, S = ({ storagePrefix: e }) => {
|
|
51
|
-
let { isSnowSeason: t, isSnowEnabled: n } = y(e);
|
|
52
|
-
return !t || !n ? null : /* @__PURE__ */ c(f, { style: x });
|
|
53
|
-
}, C = 64, w = (e) => {
|
|
54
|
-
let t = document.createElement("canvas");
|
|
55
|
-
t.width = C, t.height = C;
|
|
56
|
-
let n = t.getContext("2d");
|
|
57
|
-
return n && (n.font = `${String(C * .8)}px serif`, n.textAlign = "center", n.textBaseline = "middle", n.fillText(e, C / 2, C / 2)), t;
|
|
58
|
-
}, T = ({ emojis: e }) => {
|
|
59
|
-
let t = a(() => e.map(w), [e]);
|
|
60
|
-
return /* @__PURE__ */ c(f, {
|
|
61
|
-
images: t,
|
|
62
|
-
snowflakeCount: 25,
|
|
63
|
-
radius: [10, 18],
|
|
64
|
-
speed: [.5, 1.5],
|
|
65
|
-
wind: [-.5, 1],
|
|
66
|
-
rotationSpeed: [-1, 1],
|
|
67
|
-
style: x
|
|
68
|
-
});
|
|
69
|
-
}, E = [
|
|
70
|
-
"🎃",
|
|
71
|
-
"🦇",
|
|
72
|
-
"👻",
|
|
73
|
-
"🕷️",
|
|
74
|
-
"🍬"
|
|
75
|
-
], D = ({ storagePrefix: e }) => {
|
|
76
|
-
let { isHalloweenSeason: t, isHalloweenEnabled: n } = b(e);
|
|
77
|
-
return !t || !n ? null : /* @__PURE__ */ c(T, { emojis: E });
|
|
78
|
-
}, O = ({ storagePrefix: e }) => /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(S, { storagePrefix: e }), /* @__PURE__ */ c(D, { storagePrefix: e })] }), k = ({ id: e, label: r, description: i, icon: a, checked: o, onCheckedChange: s }) => /* @__PURE__ */ l("div", {
|
|
79
|
-
className: "space-y-2",
|
|
80
|
-
children: [/* @__PURE__ */ c(t, {
|
|
81
|
-
htmlFor: e,
|
|
82
|
-
children: r
|
|
83
|
-
}), /* @__PURE__ */ l("div", {
|
|
84
|
-
className: "flex items-center justify-between gap-4",
|
|
85
|
-
children: [/* @__PURE__ */ l("div", {
|
|
86
|
-
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
87
|
-
children: [/* @__PURE__ */ c(a, { className: "size-4" }), /* @__PURE__ */ c("span", { children: i })]
|
|
88
|
-
}), /* @__PURE__ */ c(n, {
|
|
89
|
-
id: e,
|
|
90
|
-
checked: o,
|
|
91
|
-
onCheckedChange: s
|
|
92
|
-
})]
|
|
93
|
-
})]
|
|
94
|
-
}), A = ({ storagePrefix: t, className: n = "space-y-6" }) => {
|
|
95
|
-
let { t: i } = e(), { showSuccess: a } = r(), { isSnowEnabled: o, setSnowEnabled: s } = y(t), { isHalloweenSeason: f, isHalloweenEnabled: p, setHalloweenEnabled: m } = b(t);
|
|
96
|
-
return /* @__PURE__ */ l("div", {
|
|
97
|
-
className: n,
|
|
98
|
-
children: [/* @__PURE__ */ c(k, {
|
|
99
|
-
id: "seasonal-snow",
|
|
100
|
-
label: i("seasonal.snow.label"),
|
|
101
|
-
description: i("seasonal.snow.description"),
|
|
102
|
-
icon: d,
|
|
103
|
-
checked: o,
|
|
104
|
-
onCheckedChange: (e) => {
|
|
105
|
-
s(e), a(i(e ? "seasonal.snow.toastEnabled" : "seasonal.snow.toastDisabled"), i(e ? "seasonal.snow.messageEnabled" : "seasonal.snow.messageDisabled"));
|
|
106
|
-
}
|
|
107
|
-
}), f && /* @__PURE__ */ c(k, {
|
|
108
|
-
id: "seasonal-halloween",
|
|
109
|
-
label: i("seasonal.halloween.label"),
|
|
110
|
-
description: i("seasonal.halloween.description"),
|
|
111
|
-
icon: u,
|
|
112
|
-
checked: p,
|
|
113
|
-
onCheckedChange: (e) => {
|
|
114
|
-
m(e), a(i(e ? "seasonal.halloween.toastEnabled" : "seasonal.halloween.toastDisabled"), i(e ? "seasonal.halloween.messageEnabled" : "seasonal.halloween.messageDisabled"));
|
|
115
|
-
}
|
|
116
|
-
})]
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
//#endregion
|
|
120
|
-
export { D as HalloweenEffect, O as SeasonalEffects, A as SeasonalEffectsSettings, S as SnowEffect, m as isHalloweenSeason, p as isSnowSeason, b as useHalloweenEffect, y as useSnowEffect };
|
|
1
|
+
import { isHalloweenSeason as e, isSnowSeason as t } from "./seasons.js";
|
|
2
|
+
import { useHalloweenEffect as n, useSnowEffect as r } from "./useSeasonalEffects.js";
|
|
3
|
+
import { SnowEffect as i } from "./SnowEffect.js";
|
|
4
|
+
import { HalloweenEffect as a } from "./HalloweenEffect.js";
|
|
5
|
+
import { SeasonalEffects as o } from "./SeasonalEffects.js";
|
|
6
|
+
import { SeasonalEffectsSettings as s } from "./SeasonalEffectsSettings.js";
|
|
7
|
+
export { a as HalloweenEffect, o as SeasonalEffects, s as SeasonalEffectsSettings, i as SnowEffect, e as isHalloweenSeason, t as isSnowSeason, n as useHalloweenEffect, r as useSnowEffect };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/seasonal/seasons.ts
|
|
2
|
+
var e = (e = /* @__PURE__ */ new Date()) => e.getMonth() === 11, t = (e = /* @__PURE__ */ new Date()) => {
|
|
3
|
+
let t = e.getMonth(), n = e.getDate();
|
|
4
|
+
return t === 9 && n >= 25 || t === 10 && n <= 2;
|
|
5
|
+
};
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as isHalloweenSeason, e as isSnowSeason };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isHalloweenSeason as e, isSnowSeason as t } from "./seasons.js";
|
|
2
|
+
import { useStoredToggle as n } from "./useStoredToggle.js";
|
|
3
|
+
//#region src/seasonal/useSeasonalEffects.ts
|
|
4
|
+
var r = (e = "") => {
|
|
5
|
+
let [r, i] = n(`${e}snow-effect-enabled`);
|
|
6
|
+
return {
|
|
7
|
+
isSnowSeason: t(),
|
|
8
|
+
isSnowEnabled: r,
|
|
9
|
+
setSnowEnabled: i
|
|
10
|
+
};
|
|
11
|
+
}, i = (t = "") => {
|
|
12
|
+
let [r, i] = n(`${t}halloween-effect-enabled`);
|
|
13
|
+
return {
|
|
14
|
+
isHalloweenSeason: e(),
|
|
15
|
+
isHalloweenEnabled: r,
|
|
16
|
+
setHalloweenEnabled: i
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { i as useHalloweenEffect, r as useSnowEffect };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useCallback as e, useSyncExternalStore as t } from "react";
|
|
2
|
+
//#region src/seasonal/useStoredToggle.ts
|
|
3
|
+
var n = "krosoft-seasonal-change", r = (e) => {
|
|
4
|
+
try {
|
|
5
|
+
return localStorage.getItem(e) !== "false";
|
|
6
|
+
} catch {
|
|
7
|
+
return !0;
|
|
8
|
+
}
|
|
9
|
+
}, i = (e) => (window.addEventListener("storage", e), window.addEventListener(n, e), () => {
|
|
10
|
+
window.removeEventListener("storage", e), window.removeEventListener(n, e);
|
|
11
|
+
}), a = (a) => {
|
|
12
|
+
let o = e(() => r(a), [a]);
|
|
13
|
+
return [t(i, o, () => !0), e((e) => {
|
|
14
|
+
try {
|
|
15
|
+
localStorage.setItem(a, String(e));
|
|
16
|
+
} catch {}
|
|
17
|
+
window.dispatchEvent(new Event(n));
|
|
18
|
+
}, [a])];
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { a as useStoredToggle };
|
package/dist/tailwind/index.js
CHANGED
|
@@ -1,54 +1,8 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
enumerable: !(s = r(t, d)) || s.enumerable
|
|
7
|
-
});
|
|
8
|
-
return e;
|
|
9
|
-
}, l = (e, r, i) => (i = e == null ? {} : t(a(e)), c(r || !e || !e.__esModule || !o.call(e, "default") ? n(i, "default", {
|
|
10
|
-
value: e,
|
|
11
|
-
enumerable: !0
|
|
12
|
-
}) : i, e)), u = /* @__PURE__ */ s(((e) => {
|
|
13
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "default", {
|
|
14
|
-
enumerable: !0,
|
|
15
|
-
get: function() {
|
|
16
|
-
return n;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
function t(e, t) {
|
|
20
|
-
return {
|
|
21
|
-
handler: e,
|
|
22
|
-
config: t
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
t.withOptions = function(e, t = () => ({})) {
|
|
26
|
-
let n = function(n) {
|
|
27
|
-
return {
|
|
28
|
-
__options: n,
|
|
29
|
-
handler: e(n),
|
|
30
|
-
config: t(n)
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
return n.__isOptionsFunction = !0, n.__pluginFunction = e, n.__configFunction = t, n;
|
|
34
|
-
};
|
|
35
|
-
var n = t;
|
|
36
|
-
})), d = /* @__PURE__ */ s(((e) => {
|
|
37
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "default", {
|
|
38
|
-
enumerable: !0,
|
|
39
|
-
get: function() {
|
|
40
|
-
return r;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
var t = /*#__PURE__*/ n(u());
|
|
44
|
-
function n(e) {
|
|
45
|
-
return e && e.__esModule ? e : { default: e };
|
|
46
|
-
}
|
|
47
|
-
var r = t.default;
|
|
48
|
-
})), f = /* @__PURE__ */ l((/* @__PURE__ */ s(((e, t) => {
|
|
49
|
-
var n = d();
|
|
50
|
-
t.exports = (n.__esModule ? n : { default: n }).default;
|
|
51
|
-
})))(), 1), p = ["./node_modules/@krosoft/react/dist/**/*.js"], m = {
|
|
1
|
+
import { __toESM as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_plugin as t } from "../vendor/tailwindcss/plugin.js";
|
|
3
|
+
import n from "tailwindcss-animate";
|
|
4
|
+
//#region src/tailwind/index.ts
|
|
5
|
+
var r = /* @__PURE__ */ e(t(), 1), i = ["./node_modules/@krosoft/react/dist/**/*.js"], a = {
|
|
52
6
|
darkMode: ["class", ":is([class~=\"dark\"],[class*=\"dark-\"])"],
|
|
53
7
|
theme: {
|
|
54
8
|
container: {
|
|
@@ -190,7 +144,7 @@ var t = Object.create, n = Object.defineProperty, r = Object.getOwnPropertyDescr
|
|
|
190
144
|
}
|
|
191
145
|
}
|
|
192
146
|
},
|
|
193
|
-
plugins: [
|
|
147
|
+
plugins: [n, (0, r.default)(({ addUtilities: e }) => {
|
|
194
148
|
e({ ".scrollbar-modern": {
|
|
195
149
|
transition: "scrollbar-color 0.3s ease",
|
|
196
150
|
"&::-webkit-scrollbar": {
|
|
@@ -216,4 +170,4 @@ var t = Object.create, n = Object.defineProperty, r = Object.getOwnPropertyDescr
|
|
|
216
170
|
})]
|
|
217
171
|
};
|
|
218
172
|
//#endregion
|
|
219
|
-
export {
|
|
173
|
+
export { a as default, i as krosoftContent };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/tokens/apply.ts
|
|
2
|
+
var e = (e) => e || (typeof document > "u" ? null : document.documentElement), t = (t, n) => {
|
|
3
|
+
let r = e(n);
|
|
4
|
+
if (r) for (let [e, n] of Object.entries(t)) r.style.setProperty(e, n);
|
|
5
|
+
}, n = (t, n) => {
|
|
6
|
+
let r = e(n);
|
|
7
|
+
if (r) for (let e of Object.keys(t)) r.style.removeProperty(e);
|
|
8
|
+
}, r = (r, i, a) => {
|
|
9
|
+
let o = e(a);
|
|
10
|
+
if (o) {
|
|
11
|
+
for (let e of Object.values(r)) n(e, o);
|
|
12
|
+
t(r[i], o);
|
|
13
|
+
}
|
|
14
|
+
}, i = (e) => e;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { r as applyTokenPreset, t as applyTokens, n as clearTokens, i as tokensToStyle };
|
package/dist/tokens/index.js
CHANGED
|
@@ -1,38 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (r) for (let [e, n] of Object.entries(t)) r.style.setProperty(e, n);
|
|
5
|
-
}, n = (t, n) => {
|
|
6
|
-
let r = e(n);
|
|
7
|
-
if (r) for (let e of Object.keys(t)) r.style.removeProperty(e);
|
|
8
|
-
}, r = (r, i, a) => {
|
|
9
|
-
let o = e(a);
|
|
10
|
-
if (o) {
|
|
11
|
-
for (let e of Object.values(r)) n(e, o);
|
|
12
|
-
t(r[i], o);
|
|
13
|
-
}
|
|
14
|
-
}, i = (e) => e, a = {
|
|
15
|
-
square: {
|
|
16
|
-
"--radius": "0rem",
|
|
17
|
-
"--k-radius-control": "0rem",
|
|
18
|
-
"--k-radius-surface": "0rem",
|
|
19
|
-
"--k-radius-control-dense": "0rem",
|
|
20
|
-
"--k-radius-surface-dense": "0rem"
|
|
21
|
-
},
|
|
22
|
-
soft: {
|
|
23
|
-
"--radius": "0.5rem",
|
|
24
|
-
"--k-radius-control": "0.5rem",
|
|
25
|
-
"--k-radius-surface": "0.75rem",
|
|
26
|
-
"--k-radius-control-dense": "0.5rem",
|
|
27
|
-
"--k-radius-surface-dense": "0.75rem"
|
|
28
|
-
},
|
|
29
|
-
round: {
|
|
30
|
-
"--radius": "0.75rem",
|
|
31
|
-
"--k-radius-control": "9999px",
|
|
32
|
-
"--k-radius-surface": "1.25rem",
|
|
33
|
-
"--k-radius-control-dense": "0.5rem",
|
|
34
|
-
"--k-radius-surface-dense": "0.75rem"
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
//#endregion
|
|
38
|
-
export { r as applyTokenPreset, t as applyTokens, n as clearTokens, a as radiusPresets, i as tokensToStyle };
|
|
1
|
+
import { applyTokenPreset as e, applyTokens as t, clearTokens as n, tokensToStyle as r } from "./apply.js";
|
|
2
|
+
import { radiusPresets as i } from "./radius.js";
|
|
3
|
+
export { e as applyTokenPreset, t as applyTokens, n as clearTokens, i as radiusPresets, r as tokensToStyle };
|