@keepkit/ui 0.28.16 → 0.28.18
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/README.md +226 -5
- package/dist/chunk-4O5N26YS.js +218 -0
- package/dist/chunk-4O5N26YS.js.map +1 -0
- package/dist/chunk-5ETQGHPV.js +307 -0
- package/dist/chunk-5ETQGHPV.js.map +1 -0
- package/dist/chunk-5SFHCUDA.js +200 -0
- package/dist/chunk-5SFHCUDA.js.map +1 -0
- package/dist/chunk-6753KF4D.js +357 -0
- package/dist/chunk-6753KF4D.js.map +1 -0
- package/dist/chunk-6JKG6SKJ.js +234 -0
- package/dist/chunk-6JKG6SKJ.js.map +1 -0
- package/dist/chunk-7DCSOVGM.js +23 -0
- package/dist/chunk-7DCSOVGM.js.map +1 -0
- package/dist/chunk-7DOB3Z6F.js +565 -0
- package/dist/chunk-7DOB3Z6F.js.map +1 -0
- package/dist/chunk-AQOSZ6AW.js +287 -0
- package/dist/chunk-AQOSZ6AW.js.map +1 -0
- package/dist/chunk-BJCZ7MFN.js +322 -0
- package/dist/chunk-BJCZ7MFN.js.map +1 -0
- package/dist/chunk-BW4SUJIX.js +135 -0
- package/dist/chunk-BW4SUJIX.js.map +1 -0
- package/dist/chunk-BYYWJGSN.js +220 -0
- package/dist/chunk-BYYWJGSN.js.map +1 -0
- package/dist/chunk-CIVXLU4D.js +111 -0
- package/dist/chunk-CIVXLU4D.js.map +1 -0
- package/dist/chunk-DMDBZJPO.js +37 -0
- package/dist/chunk-DMDBZJPO.js.map +1 -0
- package/dist/chunk-DQ5RMIU5.js +112 -0
- package/dist/chunk-DQ5RMIU5.js.map +1 -0
- package/dist/chunk-G2JWJKST.js +95 -0
- package/dist/chunk-G2JWJKST.js.map +1 -0
- package/dist/chunk-G76JVCNJ.js +55 -0
- package/dist/chunk-G76JVCNJ.js.map +1 -0
- package/dist/chunk-GZEFBTVD.js +37 -0
- package/dist/chunk-GZEFBTVD.js.map +1 -0
- package/dist/chunk-HFXB4S72.js +160 -0
- package/dist/chunk-HFXB4S72.js.map +1 -0
- package/dist/chunk-JJ4L5AKR.js +389 -0
- package/dist/chunk-JJ4L5AKR.js.map +1 -0
- package/dist/chunk-K2L44I7D.js +152 -0
- package/dist/chunk-K2L44I7D.js.map +1 -0
- package/dist/chunk-LKNVVPTN.js +210 -0
- package/dist/chunk-LKNVVPTN.js.map +1 -0
- package/dist/chunk-M3UORQXZ.js +2983 -0
- package/dist/chunk-M3UORQXZ.js.map +1 -0
- package/dist/chunk-M46GROWD.js +116 -0
- package/dist/chunk-M46GROWD.js.map +1 -0
- package/dist/chunk-MMGM7JIE.js +141 -0
- package/dist/chunk-MMGM7JIE.js.map +1 -0
- package/dist/chunk-NOPTRHRR.js +26 -0
- package/dist/chunk-NOPTRHRR.js.map +1 -0
- package/dist/chunk-NSYL6RSY.js +20 -0
- package/dist/chunk-NSYL6RSY.js.map +1 -0
- package/dist/chunk-NVFKN4NU.js +94 -0
- package/dist/chunk-NVFKN4NU.js.map +1 -0
- package/dist/chunk-P2WLTFPG.js +46 -0
- package/dist/chunk-P2WLTFPG.js.map +1 -0
- package/dist/chunk-PE57SLZO.js +798 -0
- package/dist/chunk-PE57SLZO.js.map +1 -0
- package/dist/chunk-PHFY6LQT.js +167 -0
- package/dist/chunk-PHFY6LQT.js.map +1 -0
- package/dist/chunk-PZHARNLY.js +208 -0
- package/dist/chunk-PZHARNLY.js.map +1 -0
- package/dist/chunk-Q6AFJL4Y.js +318 -0
- package/dist/chunk-Q6AFJL4Y.js.map +1 -0
- package/dist/chunk-Q7IEJ2YF.js +49 -0
- package/dist/chunk-Q7IEJ2YF.js.map +1 -0
- package/dist/chunk-QOCX37A5.js +69 -0
- package/dist/chunk-QOCX37A5.js.map +1 -0
- package/dist/chunk-RIWL3IPZ.js +46 -0
- package/dist/chunk-RIWL3IPZ.js.map +1 -0
- package/dist/chunk-RKYQGWKB.js +229 -0
- package/dist/chunk-RKYQGWKB.js.map +1 -0
- package/dist/chunk-SYLOO5TX.js +504 -0
- package/dist/chunk-SYLOO5TX.js.map +1 -0
- package/dist/chunk-URE4EGL2.js +206 -0
- package/dist/chunk-URE4EGL2.js.map +1 -0
- package/dist/chunk-VM4ROXYF.js +114 -0
- package/dist/chunk-VM4ROXYF.js.map +1 -0
- package/dist/chunk-VTPSR3LD.js +16 -0
- package/dist/chunk-VTPSR3LD.js.map +1 -0
- package/dist/chunk-WB6NBGC2.js +112 -0
- package/dist/chunk-WB6NBGC2.js.map +1 -0
- package/dist/chunk-XJFMMRQR.js +110 -0
- package/dist/chunk-XJFMMRQR.js.map +1 -0
- package/dist/chunk-XKWDO5VL.js +156 -0
- package/dist/chunk-XKWDO5VL.js.map +1 -0
- package/dist/chunk-XVOLYEUK.js +65 -0
- package/dist/chunk-XVOLYEUK.js.map +1 -0
- package/dist/chunk-YCUQ2YTP.js +169 -0
- package/dist/chunk-YCUQ2YTP.js.map +1 -0
- package/dist/chunk-ZCDLWGQV.js +140 -0
- package/dist/chunk-ZCDLWGQV.js.map +1 -0
- package/dist/collection-select-X6WKM--x.d.ts +25 -0
- package/dist/entries/active-filters-summary.d.ts +58 -0
- package/dist/entries/active-filters-summary.js +10 -0
- package/dist/entries/active-filters-summary.js.map +1 -0
- package/dist/entries/announcements.d.ts +4 -0
- package/dist/entries/announcements.js +11 -0
- package/dist/entries/announcements.js.map +1 -0
- package/dist/entries/announcer.d.ts +4 -0
- package/dist/entries/announcer.js +11 -0
- package/dist/entries/announcer.js.map +1 -0
- package/dist/entries/archive-button.d.ts +4 -0
- package/dist/entries/archive-button.js +9 -0
- package/dist/entries/archive-button.js.map +1 -0
- package/dist/entries/archive-scope-select.d.ts +13 -0
- package/dist/entries/archive-scope-select.js +9 -0
- package/dist/entries/archive-scope-select.js.map +1 -0
- package/dist/entries/archive-undo.d.ts +6 -0
- package/dist/entries/archive-undo.js +10 -0
- package/dist/entries/archive-undo.js.map +1 -0
- package/dist/entries/backup.d.ts +19 -0
- package/dist/entries/backup.js +10 -0
- package/dist/entries/backup.js.map +1 -0
- package/dist/entries/bulk-actions.d.ts +60 -0
- package/dist/entries/bulk-actions.js +12 -0
- package/dist/entries/bulk-actions.js.map +1 -0
- package/dist/entries/button.d.ts +21 -0
- package/dist/entries/button.js +10 -0
- package/dist/entries/button.js.map +1 -0
- package/dist/entries/collection-create.d.ts +19 -0
- package/dist/entries/collection-create.js +10 -0
- package/dist/entries/collection-create.js.map +1 -0
- package/dist/entries/collection-filter.d.ts +3 -0
- package/dist/entries/collection-filter.js +10 -0
- package/dist/entries/collection-filter.js.map +1 -0
- package/dist/entries/collection-manager.d.ts +29 -0
- package/dist/entries/collection-manager.js +12 -0
- package/dist/entries/collection-manager.js.map +1 -0
- package/dist/entries/collection-select.d.ts +3 -0
- package/dist/entries/collection-select.js +10 -0
- package/dist/entries/collection-select.js.map +1 -0
- package/dist/entries/collection.d.ts +11 -0
- package/dist/entries/collection.js +32 -0
- package/dist/entries/collection.js.map +1 -0
- package/dist/entries/empty-state.d.ts +17 -0
- package/dist/entries/empty-state.js +10 -0
- package/dist/entries/empty-state.js.map +1 -0
- package/dist/entries/error-boundary.d.ts +1 -0
- package/dist/entries/error-boundary.js +8 -0
- package/dist/entries/error-boundary.js.map +1 -0
- package/dist/entries/fallback-recovery.d.ts +12 -0
- package/dist/entries/fallback-recovery.js +9 -0
- package/dist/entries/fallback-recovery.js.map +1 -0
- package/dist/entries/floating-tour.d.ts +23 -0
- package/dist/entries/floating-tour.js +14 -0
- package/dist/entries/floating-tour.js.map +1 -0
- package/dist/entries/highlight.d.ts +2 -0
- package/dist/entries/highlight.js +8 -0
- package/dist/entries/highlight.js.map +1 -0
- package/dist/entries/inbox.d.ts +19 -0
- package/dist/entries/inbox.js +33 -0
- package/dist/entries/inbox.js.map +1 -0
- package/dist/entries/item-card-skeleton.d.ts +20 -0
- package/dist/entries/item-card-skeleton.js +8 -0
- package/dist/entries/item-card-skeleton.js.map +1 -0
- package/dist/entries/item-card.d.ts +412 -0
- package/dist/entries/item-card.js +17 -0
- package/dist/entries/item-card.js.map +1 -0
- package/dist/entries/item-checkbox.d.ts +14 -0
- package/dist/entries/item-checkbox.js +8 -0
- package/dist/entries/item-checkbox.js.map +1 -0
- package/dist/entries/item-status-badge.d.ts +13 -0
- package/dist/entries/item-status-badge.js +10 -0
- package/dist/entries/item-status-badge.js.map +1 -0
- package/dist/entries/kit-provider.d.ts +18 -0
- package/dist/entries/kit-provider.js +14 -0
- package/dist/entries/kit-provider.js.map +1 -0
- package/dist/entries/last-activity.d.ts +12 -0
- package/dist/entries/last-activity.js +9 -0
- package/dist/entries/last-activity.js.map +1 -0
- package/dist/entries/layout.d.ts +21 -0
- package/dist/entries/layout.js +9 -0
- package/dist/entries/layout.js.map +1 -0
- package/dist/entries/list.d.ts +11 -0
- package/dist/entries/list.js +23 -0
- package/dist/entries/list.js.map +1 -0
- package/dist/entries/navigator.d.ts +4 -0
- package/dist/entries/navigator.js +11 -0
- package/dist/entries/navigator.js.map +1 -0
- package/dist/entries/note-editor.d.ts +32 -0
- package/dist/entries/note-editor.js +11 -0
- package/dist/entries/note-editor.js.map +1 -0
- package/dist/entries/pagination.d.ts +3 -0
- package/dist/entries/pagination.js +9 -0
- package/dist/entries/pagination.js.map +1 -0
- package/dist/entries/pin-button.d.ts +4 -0
- package/dist/entries/pin-button.js +9 -0
- package/dist/entries/pin-button.js.map +1 -0
- package/dist/entries/provider.d.ts +1 -0
- package/dist/entries/provider.js +8 -0
- package/dist/entries/provider.js.map +1 -0
- package/dist/entries/prune-stale-button.d.ts +3 -0
- package/dist/entries/prune-stale-button.js +12 -0
- package/dist/entries/prune-stale-button.js.map +1 -0
- package/dist/entries/quick-editor.d.ts +3 -0
- package/dist/entries/quick-editor.js +11 -0
- package/dist/entries/quick-editor.js.map +1 -0
- package/dist/entries/rediscovery-panel.d.ts +12 -0
- package/dist/entries/rediscovery-panel.js +24 -0
- package/dist/entries/rediscovery-panel.js.map +1 -0
- package/dist/entries/rediscovery.d.ts +12 -0
- package/dist/entries/rediscovery.js +24 -0
- package/dist/entries/rediscovery.js.map +1 -0
- package/dist/entries/reorderable-list.d.ts +35 -0
- package/dist/entries/reorderable-list.js +10 -0
- package/dist/entries/reorderable-list.js.map +1 -0
- package/dist/entries/save-popover.d.ts +39 -0
- package/dist/entries/save-popover.js +15 -0
- package/dist/entries/save-popover.js.map +1 -0
- package/dist/entries/save-view-button.d.ts +3 -0
- package/dist/entries/save-view-button.js +9 -0
- package/dist/entries/save-view-button.js.map +1 -0
- package/dist/entries/saved-views.d.ts +3 -0
- package/dist/entries/saved-views.js +9 -0
- package/dist/entries/saved-views.js.map +1 -0
- package/dist/entries/search-input.d.ts +3 -0
- package/dist/entries/search-input.js +9 -0
- package/dist/entries/search-input.js.map +1 -0
- package/dist/entries/shortcut-hint.d.ts +11 -0
- package/dist/entries/shortcut-hint.js +8 -0
- package/dist/entries/shortcut-hint.js.map +1 -0
- package/dist/entries/sort-select.d.ts +3 -0
- package/dist/entries/sort-select.js +9 -0
- package/dist/entries/sort-select.js.map +1 -0
- package/dist/entries/stale-notice.d.ts +3 -0
- package/dist/entries/stale-notice.js +12 -0
- package/dist/entries/stale-notice.js.map +1 -0
- package/dist/entries/status.d.ts +4 -0
- package/dist/entries/status.js +11 -0
- package/dist/entries/status.js.map +1 -0
- package/dist/entries/sync-recovery-dialog.d.ts +18 -0
- package/dist/entries/sync-recovery-dialog.js +11 -0
- package/dist/entries/sync-recovery-dialog.js.map +1 -0
- package/dist/entries/sync-status-banner.d.ts +12 -0
- package/dist/entries/sync-status-banner.js +10 -0
- package/dist/entries/sync-status-banner.js.map +1 -0
- package/dist/entries/tag-editor.d.ts +22 -0
- package/dist/entries/tag-editor.js +10 -0
- package/dist/entries/tag-editor.js.map +1 -0
- package/dist/entries/tag-filter.d.ts +33 -0
- package/dist/entries/tag-filter.js +10 -0
- package/dist/entries/tag-filter.js.map +1 -0
- package/dist/entries/theme-provider.d.ts +2 -0
- package/dist/entries/theme-provider.js +9 -0
- package/dist/entries/theme-provider.js.map +1 -0
- package/dist/entries/tour-bar.d.ts +4 -0
- package/dist/entries/tour-bar.js +11 -0
- package/dist/entries/tour-bar.js.map +1 -0
- package/dist/entries/tour-provider.d.ts +3 -0
- package/dist/entries/tour-provider.js +8 -0
- package/dist/entries/tour-provider.js.map +1 -0
- package/dist/entries/ui-provider.d.ts +5 -0
- package/dist/entries/ui-provider.js +8 -0
- package/dist/entries/ui-provider.js.map +1 -0
- package/dist/entries/undo.d.ts +11 -0
- package/dist/entries/undo.js +10 -0
- package/dist/entries/undo.js.map +1 -0
- package/dist/entries/workspace.d.ts +59 -0
- package/dist/entries/workspace.js +37 -0
- package/dist/entries/workspace.js.map +1 -0
- package/dist/highlight-BFeqa6kU.d.ts +40 -0
- package/dist/index.d.ts +63 -1404
- package/dist/index.js +214 -10128
- package/dist/index.js.map +1 -1
- package/dist/list-C350Dche.d.ts +141 -0
- package/dist/pin-button-DK3j0atw.d.ts +27 -0
- package/dist/quick-editor-BpsvwjQS.d.ts +61 -0
- package/dist/rediscovery-F5gTtPUz.d.ts +20 -0
- package/dist/saved-views-BXIyAVBn.d.ts +14 -0
- package/dist/sort-select-DBlR6ubA.d.ts +40 -0
- package/dist/stale-notice-DczSweyn.d.ts +24 -0
- package/dist/status-xiIQ206y.d.ts +31 -0
- package/dist/styles/base.css +100 -55
- package/dist/styles/collection.css +2 -4
- package/dist/tailwind.css +0 -30
- package/dist/theme-provider-DFMkjkmm.d.ts +37 -0
- package/dist/tour-bar-iiXvVYE8.d.ts +51 -0
- package/dist/tour-provider-BqhPK2vS.d.ts +40 -0
- package/dist/ui-context-BE201rLI.d.ts +70 -0
- package/dist/ui-provider-Bqziw03k.d.ts +7 -0
- package/package.json +226 -2
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { HTMLAttributes, Ref, ReactNode } from 'react';
|
|
3
|
+
import { KeepListQuery, KeepUrlSyncOptions, KeepItem } from '@keepkit/core/core';
|
|
4
|
+
import { UseKeepListResult, KeepErrorBoundaryProps } from '@keepkit/core/react';
|
|
5
|
+
import { R as RenderProp } from './highlight-BFeqa6kU.js';
|
|
6
|
+
import { KeepItemCardProps } from './entries/item-card.js';
|
|
7
|
+
import { KeepArchiveScope } from './entries/archive-scope-select.js';
|
|
8
|
+
|
|
9
|
+
type KeepUrlAdapter = {
|
|
10
|
+
getUrl: () => string;
|
|
11
|
+
subscribe?: (listener: () => void) => () => void;
|
|
12
|
+
navigate: (url: string, mode: "replace" | "push") => void;
|
|
13
|
+
};
|
|
14
|
+
type KeepPagesRouterLike = {
|
|
15
|
+
asPath?: string;
|
|
16
|
+
push: (url: string, as?: string, options?: {
|
|
17
|
+
shallow?: boolean;
|
|
18
|
+
}) => Promise<boolean> | boolean;
|
|
19
|
+
replace: (url: string, as?: string, options?: {
|
|
20
|
+
shallow?: boolean;
|
|
21
|
+
}) => Promise<boolean> | boolean;
|
|
22
|
+
events?: {
|
|
23
|
+
on: (event: string, listener: () => void) => void;
|
|
24
|
+
off: (event: string, listener: () => void) => void;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
type KeepUrlSyncProps<TMeta = Record<string, unknown>> = {
|
|
28
|
+
enabled?: boolean;
|
|
29
|
+
query: KeepListQuery<TMeta>;
|
|
30
|
+
onQueryChange: (query: KeepListQuery<TMeta> | ((previous: KeepListQuery<TMeta>) => KeepListQuery<TMeta>)) => void;
|
|
31
|
+
options?: KeepUrlSyncOptions;
|
|
32
|
+
adapter?: KeepUrlAdapter;
|
|
33
|
+
};
|
|
34
|
+
/** Adapter for Next.js Pages Router. It intentionally uses structural typing and has no Next dependency. */
|
|
35
|
+
declare function createNextPagesRouterAdapter(router: KeepPagesRouterLike): KeepUrlAdapter;
|
|
36
|
+
/** Synchronizes collection filters with browser history and supports back/forward restoration. */
|
|
37
|
+
declare function useKeepUrlSync<TMeta = Record<string, unknown>>({ enabled, query, onQueryChange, options, adapter: providedAdapter, }: KeepUrlSyncProps<TMeta>): void;
|
|
38
|
+
|
|
39
|
+
type KeepListSelection = {
|
|
40
|
+
selectedIds: readonly string[];
|
|
41
|
+
onSelectedIdsChange: (ids: string[]) => void;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
};
|
|
44
|
+
type KeepItemSelection = {
|
|
45
|
+
checked: boolean;
|
|
46
|
+
onCheckedChange: (checked: boolean) => void;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
};
|
|
49
|
+
type KeepListState<TMeta = Record<string, unknown>> = UseKeepListResult<TMeta>;
|
|
50
|
+
type KeepListProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
51
|
+
ref?: Ref<HTMLElement> | {
|
|
52
|
+
readonly current: unknown;
|
|
53
|
+
};
|
|
54
|
+
query?: KeepListQuery<TMeta>;
|
|
55
|
+
children?: ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
56
|
+
renderItem?: (item: KeepItem<TMeta>, state: KeepListState<TMeta>, selection?: KeepItemSelection) => ReactNode;
|
|
57
|
+
loading?: ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
58
|
+
/** Alias for `loading`. When neither is provided, layout-matched skeletons are rendered. */
|
|
59
|
+
renderLoading?: ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
60
|
+
loadingCount?: number;
|
|
61
|
+
empty?: ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
62
|
+
error?: ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
63
|
+
onClearFilters?: () => void;
|
|
64
|
+
itemCardProps?: Omit<KeepItemCardProps<TMeta>, "item" | "children" | "render">;
|
|
65
|
+
layout?: KeepLayoutPreset;
|
|
66
|
+
selection?: KeepListSelection;
|
|
67
|
+
reorderable?: boolean;
|
|
68
|
+
onReorder?: (orderedIds: string[]) => void | Promise<void>;
|
|
69
|
+
asChild?: boolean;
|
|
70
|
+
fallback?: KeepErrorBoundaryProps["fallback"];
|
|
71
|
+
onBoundaryError?: KeepErrorBoundaryProps["onError"];
|
|
72
|
+
boundaryResetKey?: unknown;
|
|
73
|
+
};
|
|
74
|
+
/** A list primitive with built-in loading, empty, error, and removal states. */
|
|
75
|
+
declare function KeepList<TMeta = Record<string, unknown>>(props: KeepListProps<TMeta>): react.JSX.Element;
|
|
76
|
+
|
|
77
|
+
type KeepCollectionFeature = "search" | "sort" | "pagination" | "tagFilter" | "collectionFilter" | "bulkActions" | "tags" | "pin" | "archive" | "note" | "savedViews";
|
|
78
|
+
type KeepLayoutPreset = "list" | "grid" | "compact" | "auto";
|
|
79
|
+
type KeepCollectionToolbarVariant = "plain" | "panel";
|
|
80
|
+
type KeepCollectionToolbarLayout = "flat" | "grouped";
|
|
81
|
+
type KeepCollectionToolbarGroup = "toolbarStart" | "query" | "filters" | "toolbarEnd";
|
|
82
|
+
type KeepCollectionToolbarContent<TMeta = Record<string, unknown>> = ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
83
|
+
type KeepCollectionSlots<TMeta = Record<string, unknown>> = {
|
|
84
|
+
toolbarStart?: KeepCollectionToolbarContent<TMeta>;
|
|
85
|
+
toolbarEnd?: KeepCollectionToolbarContent<TMeta>;
|
|
86
|
+
};
|
|
87
|
+
type KeepCollectionRevealRequest = {
|
|
88
|
+
requestId: number;
|
|
89
|
+
itemId: string;
|
|
90
|
+
};
|
|
91
|
+
type KeepCollectionRevealResult = {
|
|
92
|
+
requestId: number;
|
|
93
|
+
itemId: string;
|
|
94
|
+
status: "visible" | "not-found" | "excluded";
|
|
95
|
+
};
|
|
96
|
+
type KeepCollectionProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
97
|
+
query?: KeepListQuery<TMeta>;
|
|
98
|
+
pageSize?: number;
|
|
99
|
+
layout?: KeepLayoutPreset;
|
|
100
|
+
/** Opts into the theme-backed toolbar surface. */
|
|
101
|
+
toolbarVariant?: KeepCollectionToolbarVariant;
|
|
102
|
+
/** Groups host actions, query controls, and filters into labelled regions. */
|
|
103
|
+
toolbarLayout?: KeepCollectionToolbarLayout;
|
|
104
|
+
/** Makes the filter controls collapsible while keeping their active values. */
|
|
105
|
+
collapsibleFilters?: boolean;
|
|
106
|
+
slots?: KeepCollectionSlots<TMeta>;
|
|
107
|
+
urlSync?: boolean | KeepUrlSyncOptions;
|
|
108
|
+
urlAdapter?: KeepUrlAdapter;
|
|
109
|
+
/** Enables the built-in active/archived/all scope selector and query state. */
|
|
110
|
+
archiveScope?: KeepArchiveScope;
|
|
111
|
+
onArchiveScopeChange?: (scope: KeepArchiveScope) => void;
|
|
112
|
+
/** Enables the built-in drag and keyboard reorder list. */
|
|
113
|
+
reorderable?: boolean;
|
|
114
|
+
onReorder?: (items: KeepItem<TMeta>[]) => void | Promise<void>;
|
|
115
|
+
features?: Partial<Record<KeepCollectionFeature, boolean>>;
|
|
116
|
+
bulkActionsVariant?: "separate" | "inline";
|
|
117
|
+
/** Requires confirmation before a bulk removal. */
|
|
118
|
+
confirmRemoval?: boolean;
|
|
119
|
+
collectionLabels?: Record<string, string>;
|
|
120
|
+
/** Shows a collection creation form in the toolbar. */
|
|
121
|
+
creatable?: boolean;
|
|
122
|
+
renderItem?: KeepListProps<TMeta>["renderItem"];
|
|
123
|
+
itemCardProps?: Omit<KeepItemCardProps<TMeta>, "item" | "children" | "render">;
|
|
124
|
+
loading?: ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
125
|
+
/** Alias for `loading`. When neither is provided, KeepList renders skeleton cards. */
|
|
126
|
+
renderLoading?: ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
127
|
+
loadingCount?: number;
|
|
128
|
+
activeFilters?: ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
129
|
+
empty?: ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
130
|
+
error?: ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
131
|
+
fallback?: KeepErrorBoundaryProps["fallback"];
|
|
132
|
+
onBoundaryError?: KeepErrorBoundaryProps["onError"];
|
|
133
|
+
boundaryResetKey?: unknown;
|
|
134
|
+
/** Requests the collection to clear local filters and reveal an item. */
|
|
135
|
+
revealRequest?: KeepCollectionRevealRequest;
|
|
136
|
+
onRevealResult?: (result: KeepCollectionRevealResult) => void;
|
|
137
|
+
};
|
|
138
|
+
/** A batteries-included collection with query controls and accessible status feedback. */
|
|
139
|
+
declare function KeepCollection<TMeta = Record<string, unknown>>(props: KeepCollectionProps<TMeta>): react.JSX.Element;
|
|
140
|
+
|
|
141
|
+
export { type KeepCollectionProps as K, KeepCollection as a, type KeepCollectionFeature as b, type KeepCollectionRevealRequest as c, type KeepCollectionRevealResult as d, type KeepCollectionSlots as e, type KeepCollectionToolbarContent as f, type KeepCollectionToolbarGroup as g, type KeepCollectionToolbarLayout as h, type KeepCollectionToolbarVariant as i, type KeepItemSelection as j, type KeepLayoutPreset as k, KeepList as l, type KeepListProps as m, type KeepListSelection as n, type KeepListState as o, type KeepPagesRouterLike as p, type KeepUrlAdapter as q, createNextPagesRouterAdapter as r, useKeepUrlSync as u };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
import { KeepItemInput } from '@keepkit/core/core';
|
|
4
|
+
import { useKeepItem } from '@keepkit/core/react';
|
|
5
|
+
|
|
6
|
+
type KeepArchiveButtonState<TMeta = Record<string, unknown>> = ReturnType<typeof useKeepItem<TMeta>>;
|
|
7
|
+
type KeepArchiveButtonProps<TMeta = Record<string, unknown>> = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "onClick" | "aria-pressed"> & {
|
|
8
|
+
item: KeepItemInput<TMeta>;
|
|
9
|
+
children?: ReactNode | ((state: KeepArchiveButtonState<TMeta>) => ReactNode);
|
|
10
|
+
archiveLabel?: ReactNode;
|
|
11
|
+
unarchiveLabel?: ReactNode;
|
|
12
|
+
onToggleError?: (error: unknown) => void;
|
|
13
|
+
};
|
|
14
|
+
/** A style-free accessible archive toggle. */
|
|
15
|
+
declare function KeepArchiveButton<TMeta = Record<string, unknown>>({ item, children, archiveLabel, unarchiveLabel, onToggleError, disabled, ...props }: KeepArchiveButtonProps<TMeta>): react.JSX.Element;
|
|
16
|
+
type KeepPinButtonState<TMeta = Record<string, unknown>> = ReturnType<typeof useKeepItem<TMeta>>;
|
|
17
|
+
type KeepPinButtonProps<TMeta = Record<string, unknown>> = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "onClick" | "aria-pressed"> & {
|
|
18
|
+
item: KeepItemInput<TMeta>;
|
|
19
|
+
children?: ReactNode | ((state: KeepPinButtonState<TMeta>) => ReactNode);
|
|
20
|
+
pinLabel?: ReactNode;
|
|
21
|
+
unpinLabel?: ReactNode;
|
|
22
|
+
onToggleError?: (error: unknown) => void;
|
|
23
|
+
};
|
|
24
|
+
/** A style-free accessible pin toggle. */
|
|
25
|
+
declare function KeepPinButton<TMeta = Record<string, unknown>>({ item, children, pinLabel, unpinLabel, onToggleError, disabled, ...props }: KeepPinButtonProps<TMeta>): react.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { KeepArchiveButton as K, type KeepArchiveButtonProps as a, type KeepArchiveButtonState as b, KeepPinButton as c, type KeepPinButtonProps as d, type KeepPinButtonState as e };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { FormHTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
import { KeepItem } from '@keepkit/core/core';
|
|
4
|
+
|
|
5
|
+
type KeepQuickEditorState<TMeta = Record<string, unknown>> = {
|
|
6
|
+
item: KeepItem<TMeta>;
|
|
7
|
+
title: string;
|
|
8
|
+
note: string;
|
|
9
|
+
tags: string[];
|
|
10
|
+
collectionId?: string;
|
|
11
|
+
setTitle: (value: string) => void;
|
|
12
|
+
setNote: (value: string) => void;
|
|
13
|
+
setTags: (value: string[]) => void;
|
|
14
|
+
setCollectionId: (value?: string) => void;
|
|
15
|
+
isDirty: boolean;
|
|
16
|
+
isSaving: boolean;
|
|
17
|
+
saveStatus: "idle" | "dirty" | "saving" | "saved" | "error";
|
|
18
|
+
error: unknown | null;
|
|
19
|
+
flush: () => Promise<void>;
|
|
20
|
+
};
|
|
21
|
+
declare function useKeepQuickEditor<TMeta = Record<string, unknown>>(item: KeepItem<TMeta>, options?: {
|
|
22
|
+
debounceMs?: number;
|
|
23
|
+
onSaved?: (item: KeepItem<TMeta>) => void;
|
|
24
|
+
onSaveError?: (error: unknown) => void;
|
|
25
|
+
}): {
|
|
26
|
+
state: {
|
|
27
|
+
item: KeepItem<TMeta>;
|
|
28
|
+
title: string;
|
|
29
|
+
note: string;
|
|
30
|
+
tags: string[];
|
|
31
|
+
collectionId: string | undefined;
|
|
32
|
+
setTitle: (title: string) => void;
|
|
33
|
+
setNote: (note: string) => void;
|
|
34
|
+
setTags: (tags: string[]) => void;
|
|
35
|
+
setCollectionId: (collectionId: string | undefined) => void;
|
|
36
|
+
isDirty: boolean;
|
|
37
|
+
isSaving: boolean;
|
|
38
|
+
saveStatus: "error" | "saved" | "saving" | "idle" | "dirty";
|
|
39
|
+
error: unknown;
|
|
40
|
+
flush: () => Promise<void>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
type KeepQuickEditorFeature = "title" | "note" | "tags" | "collection";
|
|
44
|
+
type KeepQuickEditorProps<TMeta = Record<string, unknown>> = Omit<FormHTMLAttributes<HTMLFormElement>, "children" | "onSubmit"> & {
|
|
45
|
+
item: KeepItem<TMeta>;
|
|
46
|
+
debounceMs?: number;
|
|
47
|
+
collectionIds?: string[];
|
|
48
|
+
collectionLabels?: Record<string, string>;
|
|
49
|
+
showSaveButton?: boolean;
|
|
50
|
+
closeLabel?: string;
|
|
51
|
+
/** Controls which fields are visible. Defaults to all fields shown. */
|
|
52
|
+
features?: Partial<Record<KeepQuickEditorFeature, boolean>>;
|
|
53
|
+
children?: ReactNode | ((state: KeepQuickEditorState<TMeta>) => ReactNode);
|
|
54
|
+
onClose?: () => void;
|
|
55
|
+
onSaved?: (item: KeepItem<TMeta>) => void;
|
|
56
|
+
onSaveError?: (error: unknown) => void;
|
|
57
|
+
};
|
|
58
|
+
/** A compact, temporary-state editor for note, tags, and collection metadata. */
|
|
59
|
+
declare function KeepQuickEditor<TMeta = Record<string, unknown>>({ item, debounceMs, onSaved, onSaveError, features, ...props }: KeepQuickEditorProps<TMeta>): react.JSX.Element;
|
|
60
|
+
|
|
61
|
+
export { KeepQuickEditor as K, type KeepQuickEditorFeature as a, type KeepQuickEditorProps as b, type KeepQuickEditorState as c, useKeepQuickEditor as u };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
import { KeepRediscoveryStrategy } from '@keepkit/core/core';
|
|
4
|
+
import { m as KeepListProps } from './list-C350Dche.js';
|
|
5
|
+
|
|
6
|
+
type KeepRediscoveryProps<TMeta = Record<string, unknown>> = Omit<KeepListProps<TMeta>, "query"> & {
|
|
7
|
+
strategy: KeepRediscoveryStrategy;
|
|
8
|
+
inactiveForMs?: number;
|
|
9
|
+
limit?: number;
|
|
10
|
+
};
|
|
11
|
+
/** A small composition for the standard rediscovery queries. */
|
|
12
|
+
declare function KeepRediscovery<TMeta = Record<string, unknown>>({ strategy, inactiveForMs, limit, itemCardProps, ...props }: KeepRediscoveryProps<TMeta>): react.JSX.Element;
|
|
13
|
+
type KeepRediscoveryPanelProps<TMeta = Record<string, unknown>> = Omit<KeepRediscoveryProps<TMeta>, "children"> & Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
14
|
+
title?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
};
|
|
17
|
+
/** A labelled Rediscovery section that explains why its items are shown. */
|
|
18
|
+
declare function KeepRediscoveryPanel<TMeta = Record<string, unknown>>({ title, description, strategy, ...props }: KeepRediscoveryPanelProps<TMeta>): react.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { KeepRediscovery as K, KeepRediscoveryPanel as a, type KeepRediscoveryPanelProps as b, type KeepRediscoveryProps as c };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { KeepListQuery, KeepSavedViewStorage } from '@keepkit/core/core';
|
|
3
|
+
|
|
4
|
+
type KeepSavedViewsProps<TMeta = Record<string, unknown>> = {
|
|
5
|
+
storage?: KeepSavedViewStorage<TMeta>;
|
|
6
|
+
onApply?: (query: KeepListQuery<TMeta>) => void;
|
|
7
|
+
};
|
|
8
|
+
declare function KeepSavedViews<TMeta = Record<string, unknown>>({ storage, onApply }: KeepSavedViewsProps<TMeta>): react.JSX.Element;
|
|
9
|
+
declare function KeepSaveViewButton<TMeta = Record<string, unknown>>({ query, storage, }: {
|
|
10
|
+
query: KeepListQuery<TMeta>;
|
|
11
|
+
storage?: KeepSavedViewStorage<TMeta>;
|
|
12
|
+
}): react.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { type KeepSavedViewsProps as K, KeepSaveViewButton as a, KeepSavedViews as b };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, InputHTMLAttributes, SelectHTMLAttributes } from 'react';
|
|
3
|
+
import { KeepListQuery } from '@keepkit/core/core';
|
|
4
|
+
|
|
5
|
+
type KeepSearchInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange"> & {
|
|
6
|
+
value?: string;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
/** Delay before notifying consumers; set to 0 to disable debouncing. */
|
|
9
|
+
debounceMs?: number;
|
|
10
|
+
onValueChange?: (value: string) => void;
|
|
11
|
+
};
|
|
12
|
+
/** A controlled/uncontrolled search field with a small built-in debounce. */
|
|
13
|
+
declare function KeepSearchInput({ value: controlledValue, defaultValue, debounceMs, onValueChange, "aria-label": ariaLabel, placeholder, ...props }: KeepSearchInputProps): react.JSX.Element;
|
|
14
|
+
type KeepSortValue = "savedAt:desc" | "savedAt:asc" | "updatedAt:desc" | "updatedAt:asc" | "lastOpenedAt:desc" | "lastOpenedAt:asc";
|
|
15
|
+
type KeepSortSelectProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, "value" | "defaultValue" | "onChange"> & {
|
|
16
|
+
value?: KeepSortValue | "manual";
|
|
17
|
+
defaultValue?: KeepSortValue | "manual";
|
|
18
|
+
onValueChange?: (value: KeepSortValue, sort: NonNullable<KeepListQuery["sort"]>) => void;
|
|
19
|
+
/** Adds a manual-order option without changing the dated-sort callback. */
|
|
20
|
+
onManualSort?: () => void;
|
|
21
|
+
};
|
|
22
|
+
/** Emits a normalized sort descriptor that can be passed directly to useKeepList. */
|
|
23
|
+
declare function KeepSortSelect({ value: controlledValue, defaultValue, onValueChange, onManualSort, "aria-label": ariaLabel, children, ...props }: KeepSortSelectProps): react.JSX.Element;
|
|
24
|
+
type KeepPaginationState = {
|
|
25
|
+
page: number;
|
|
26
|
+
pageCount: number;
|
|
27
|
+
goToPage: (page: number) => void;
|
|
28
|
+
};
|
|
29
|
+
type KeepPaginationProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
|
|
30
|
+
totalCount: number;
|
|
31
|
+
pageSize: number;
|
|
32
|
+
page?: number;
|
|
33
|
+
maxPageButtons?: number;
|
|
34
|
+
onPageChange?: (page: number, offset: number) => void;
|
|
35
|
+
render?: (state: KeepPaginationState) => ReactNode;
|
|
36
|
+
};
|
|
37
|
+
/** Accessible pagination with previous/next controls and numbered page buttons. */
|
|
38
|
+
declare function KeepPagination({ totalCount, pageSize, page, maxPageButtons, onPageChange, render, ...props }: KeepPaginationProps): react.JSX.Element;
|
|
39
|
+
|
|
40
|
+
export { KeepPagination as K, type KeepPaginationProps as a, type KeepPaginationState as b, KeepSearchInput as c, type KeepSearchInputProps as d, KeepSortSelect as e, type KeepSortSelectProps as f, type KeepSortValue as g };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes } from 'react';
|
|
3
|
+
import { KeepItemStatus, KeepItem } from '@keepkit/core/core';
|
|
4
|
+
|
|
5
|
+
type KeepStaleNoticeProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
6
|
+
item: KeepItem<TMeta>;
|
|
7
|
+
onRetry?: (item: KeepItem<TMeta>) => void | Promise<void>;
|
|
8
|
+
onRemoved?: (item: KeepItem<TMeta>) => void;
|
|
9
|
+
retryLabel?: ReactNode;
|
|
10
|
+
removeLabel?: ReactNode;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
/** Provides retry and remove actions for an item whose source is no longer available. */
|
|
14
|
+
declare function KeepStaleNotice<TMeta = Record<string, unknown>>({ item, onRetry, onRemoved, retryLabel, removeLabel, children, className, ...props }: KeepStaleNoticeProps<TMeta>): react.JSX.Element;
|
|
15
|
+
type KeepPruneStaleButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
|
|
16
|
+
statuses?: KeepItemStatus[];
|
|
17
|
+
label?: ReactNode;
|
|
18
|
+
onPruned?: (ids: string[]) => void;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
/** Removes all unavailable items through the provider's undo-capable batch action. */
|
|
22
|
+
declare function KeepPruneStaleButton<TMeta = Record<string, unknown>>({ statuses, label, onPruned, children, disabled, ...props }: KeepPruneStaleButtonProps): react.JSX.Element;
|
|
23
|
+
|
|
24
|
+
export { KeepPruneStaleButton as K, type KeepPruneStaleButtonProps as a, KeepStaleNotice as b, type KeepStaleNoticeProps as c };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
import { KeepItem } from '@keepkit/core/core';
|
|
4
|
+
import { R as RenderProp } from './highlight-BFeqa6kU.js';
|
|
5
|
+
|
|
6
|
+
type KeepStatusValue = "idle" | "empty" | "loading" | "saving" | "syncing" | "error";
|
|
7
|
+
type KeepStatusLabels = Partial<Record<KeepStatusValue, ReactNode>>;
|
|
8
|
+
type KeepStatusState<TMeta = Record<string, unknown>> = {
|
|
9
|
+
status: KeepStatusValue;
|
|
10
|
+
error: unknown | null;
|
|
11
|
+
pendingCount: number;
|
|
12
|
+
items: KeepItem<TMeta>[];
|
|
13
|
+
};
|
|
14
|
+
type KeepStatusProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
15
|
+
status?: KeepStatusValue;
|
|
16
|
+
labels?: KeepStatusLabels;
|
|
17
|
+
children?: ReactNode | RenderProp<KeepStatusState<TMeta>>;
|
|
18
|
+
render?: RenderProp<KeepStatusState<TMeta>>;
|
|
19
|
+
asChild?: boolean;
|
|
20
|
+
};
|
|
21
|
+
/** Presents provider loading, mutation, synchronization, empty, and error states accessibly. */
|
|
22
|
+
declare function KeepStatus<TMeta = Record<string, unknown>>({ status, labels, children, render, asChild, className, ...rootProps }: KeepStatusProps<TMeta>): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
23
|
+
type KeepAnnouncementsProps = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
24
|
+
messages?: Partial<Record<"save" | "remove" | "note", string>>;
|
|
25
|
+
};
|
|
26
|
+
/** Announces successful save, remove, and note operations in a polite live region. */
|
|
27
|
+
declare function KeepAnnouncements<TMeta = Record<string, unknown>>({ messages, ...props }: KeepAnnouncementsProps): react.JSX.Element;
|
|
28
|
+
/** Singular alias for applications that mount one announcer explicitly. */
|
|
29
|
+
declare const KeepAnnouncer: typeof KeepAnnouncements;
|
|
30
|
+
|
|
31
|
+
export { KeepAnnouncements as K, type KeepAnnouncementsProps as a, KeepAnnouncer as b, KeepStatus as c, type KeepStatusLabels as d, type KeepStatusProps as e, type KeepStatusState as f, type KeepStatusValue as g };
|
package/dist/styles/base.css
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
:root
|
|
2
|
-
|
|
3
|
-
--keep-
|
|
4
|
-
--keep-
|
|
5
|
-
--keep-card
|
|
1
|
+
:root,
|
|
2
|
+
:where(.keep-theme, [data-keep-theme]) {
|
|
3
|
+
--keep-host-background: var(--color-background);
|
|
4
|
+
--keep-host-foreground: var(--color-foreground);
|
|
5
|
+
--keep-host-card: var(--color-card);
|
|
6
|
+
--keep-host-card-foreground: var(--color-card-foreground);
|
|
7
|
+
--keep-host-muted: var(--color-muted);
|
|
8
|
+
--keep-host-muted-foreground: var(--color-muted-foreground);
|
|
9
|
+
--keep-host-border: var(--color-border);
|
|
10
|
+
--keep-host-input: var(--color-input);
|
|
11
|
+
--keep-host-primary: var(--color-primary);
|
|
12
|
+
--keep-host-primary-foreground: var(--color-primary-foreground);
|
|
13
|
+
--keep-host-destructive: var(--color-destructive);
|
|
14
|
+
--keep-host-destructive-foreground: var(--color-destructive-foreground);
|
|
15
|
+
--keep-host-ring: var(--color-ring);
|
|
16
|
+
--keep-background: var(--keep-host-background, #ffffff);
|
|
17
|
+
--keep-foreground: var(--keep-host-foreground, #0f172a);
|
|
18
|
+
--keep-card: var(--keep-host-card, var(--keep-background));
|
|
19
|
+
--keep-card-foreground: var(--keep-host-card-foreground, var(--keep-foreground));
|
|
6
20
|
--keep-card-border: var(--keep-border);
|
|
7
21
|
--keep-card-shadow: var(--keep-shadow);
|
|
8
22
|
--keep-card-shadow-elevated:
|
|
@@ -11,20 +25,42 @@
|
|
|
11
25
|
--keep-surface-border: var(--keep-border);
|
|
12
26
|
--keep-surface-background: var(--keep-card);
|
|
13
27
|
--keep-surface-shadow: var(--keep-shadow);
|
|
14
|
-
--keep-muted: var(--muted, #f1f5f9);
|
|
15
|
-
--keep-muted-foreground: var(--muted-foreground, #64748b);
|
|
16
|
-
--keep-border: var(--border, #d7dee8);
|
|
17
|
-
--keep-input: var(--input, var(--keep-border));
|
|
18
|
-
--keep-primary: var(--keep-
|
|
19
|
-
--keep-primary-foreground: var(--primary-foreground, #ffffff);
|
|
20
|
-
--keep-destructive: var(--destructive, #b91c1c);
|
|
21
|
-
--keep-destructive-foreground: var(--destructive-foreground, #ffffff);
|
|
22
|
-
--keep-ring: var(--ring, var(--keep-primary));
|
|
28
|
+
--keep-muted: var(--keep-host-muted, #f1f5f9);
|
|
29
|
+
--keep-muted-foreground: var(--keep-host-muted-foreground, #64748b);
|
|
30
|
+
--keep-border: var(--keep-host-border, #d7dee8);
|
|
31
|
+
--keep-input: var(--keep-host-input, var(--keep-border));
|
|
32
|
+
--keep-primary: var(--keep-host-primary, #2563eb);
|
|
33
|
+
--keep-primary-foreground: var(--keep-host-primary-foreground, #ffffff);
|
|
34
|
+
--keep-destructive: var(--keep-host-destructive, #b91c1c);
|
|
35
|
+
--keep-destructive-foreground: var(--keep-host-destructive-foreground, #ffffff);
|
|
36
|
+
--keep-ring: var(--keep-host-ring, var(--keep-primary));
|
|
23
37
|
--keep-success: #15803d;
|
|
24
38
|
--keep-warning: #b45309;
|
|
25
39
|
--keep-highlight-bg: #fef08a;
|
|
26
40
|
--keep-highlight-fg: #422006;
|
|
27
|
-
--keep-accent: var(--primary
|
|
41
|
+
--keep-accent: var(--keep-primary);
|
|
42
|
+
--keep-shadow:
|
|
43
|
+
0 1px 2px color-mix(in srgb, var(--keep-foreground) 7%, transparent),
|
|
44
|
+
0 8px 24px color-mix(in srgb, var(--keep-foreground) 5%, transparent);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:where(.keep-theme, [data-keep-theme])[data-host-color-format="hsl-channels"] {
|
|
48
|
+
--keep-host-background: hsl(var(--background));
|
|
49
|
+
--keep-host-foreground: hsl(var(--foreground));
|
|
50
|
+
--keep-host-card: hsl(var(--card));
|
|
51
|
+
--keep-host-card-foreground: hsl(var(--card-foreground));
|
|
52
|
+
--keep-host-muted: hsl(var(--muted));
|
|
53
|
+
--keep-host-muted-foreground: hsl(var(--muted-foreground));
|
|
54
|
+
--keep-host-border: hsl(var(--border));
|
|
55
|
+
--keep-host-input: hsl(var(--input));
|
|
56
|
+
--keep-host-primary: hsl(var(--primary));
|
|
57
|
+
--keep-host-primary-foreground: hsl(var(--primary-foreground));
|
|
58
|
+
--keep-host-destructive: hsl(var(--destructive));
|
|
59
|
+
--keep-host-destructive-foreground: hsl(var(--destructive-foreground));
|
|
60
|
+
--keep-host-ring: hsl(var(--ring));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:root {
|
|
28
64
|
--keep-radius: var(--radius, 0.5rem);
|
|
29
65
|
--keep-card-padding: 1rem;
|
|
30
66
|
--keep-card-gap: 0.75rem;
|
|
@@ -33,9 +69,6 @@
|
|
|
33
69
|
--keep-button-size: 2.75rem;
|
|
34
70
|
--keep-icon-size: 1rem;
|
|
35
71
|
--keep-control-gap: 0.5rem;
|
|
36
|
-
--keep-shadow:
|
|
37
|
-
0 1px 2px color-mix(in srgb, var(--keep-foreground) 7%, transparent),
|
|
38
|
-
0 8px 24px color-mix(in srgb, var(--keep-foreground) 5%, transparent);
|
|
39
72
|
--keep-tag-size: 0.8125rem;
|
|
40
73
|
--keep-list-columns: 1;
|
|
41
74
|
--keep-grid-columns: 3;
|
|
@@ -152,6 +185,19 @@
|
|
|
152
185
|
font: inherit;
|
|
153
186
|
}
|
|
154
187
|
|
|
188
|
+
@media (max-width: 32rem) {
|
|
189
|
+
:where(.keep-theme, [data-keep-theme])
|
|
190
|
+
[data-keepkit]
|
|
191
|
+
:is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
|
|
192
|
+
:where(.keep-theme, [data-keep-theme]) :is(input[data-keepkit], select[data-keepkit], textarea[data-keepkit]) {
|
|
193
|
+
font-size: max(1rem, 16px);
|
|
194
|
+
}
|
|
195
|
+
:where(.keep-theme, [data-keep-theme]) [data-keepkit] button {
|
|
196
|
+
min-height: 44px;
|
|
197
|
+
min-width: 44px;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
155
201
|
:where(.keep-theme, [data-keep-theme]).keep-theme--ocean {
|
|
156
202
|
--keep-background: #f5fbff;
|
|
157
203
|
--keep-foreground: #082f49;
|
|
@@ -161,8 +207,7 @@
|
|
|
161
207
|
--keep-muted-foreground: #0c4a6e;
|
|
162
208
|
--keep-border: #bae6fd;
|
|
163
209
|
--keep-input: #7dd3fc;
|
|
164
|
-
--keep-
|
|
165
|
-
--keep-primary: var(--keep-accent);
|
|
210
|
+
--keep-primary: #0369a1;
|
|
166
211
|
--keep-primary-foreground: #ffffff;
|
|
167
212
|
--keep-destructive: #be123c;
|
|
168
213
|
--keep-success: #047857;
|
|
@@ -180,8 +225,7 @@
|
|
|
180
225
|
--keep-muted-foreground: #466557;
|
|
181
226
|
--keep-border: #bfd7c7;
|
|
182
227
|
--keep-input: #91b9a0;
|
|
183
|
-
--keep-
|
|
184
|
-
--keep-primary: var(--keep-accent);
|
|
228
|
+
--keep-primary: #2f6f4e;
|
|
185
229
|
--keep-primary-foreground: #ffffff;
|
|
186
230
|
--keep-destructive: #b42318;
|
|
187
231
|
--keep-success: #18794e;
|
|
@@ -199,8 +243,7 @@
|
|
|
199
243
|
--keep-muted-foreground: #9a3412;
|
|
200
244
|
--keep-border: #fed7aa;
|
|
201
245
|
--keep-input: #fdba74;
|
|
202
|
-
--keep-
|
|
203
|
-
--keep-primary: var(--keep-accent);
|
|
246
|
+
--keep-primary: #c2410c;
|
|
204
247
|
--keep-primary-foreground: #ffffff;
|
|
205
248
|
--keep-destructive: #be123c;
|
|
206
249
|
--keep-success: #15803d;
|
|
@@ -218,8 +261,7 @@
|
|
|
218
261
|
--keep-muted-foreground: #6d28d9;
|
|
219
262
|
--keep-border: #ddd6fe;
|
|
220
263
|
--keep-input: #c4b5fd;
|
|
221
|
-
--keep-
|
|
222
|
-
--keep-primary: var(--keep-accent);
|
|
264
|
+
--keep-primary: #7c3aed;
|
|
223
265
|
--keep-primary-foreground: #ffffff;
|
|
224
266
|
--keep-destructive: #be123c;
|
|
225
267
|
--keep-success: #15803d;
|
|
@@ -230,48 +272,45 @@
|
|
|
230
272
|
|
|
231
273
|
:where(.keep-theme, [data-keep-theme])[data-mode="dark"],
|
|
232
274
|
:where(.keep-theme, [data-keep-theme]).keep-theme--dark,
|
|
233
|
-
:where(.keep-theme, [data-keep-theme]).dark,
|
|
234
|
-
|
|
235
|
-
--keep-
|
|
236
|
-
--keep-
|
|
237
|
-
--keep-card: var(--card
|
|
238
|
-
--keep-
|
|
239
|
-
--keep-muted: var(--muted
|
|
240
|
-
--keep-
|
|
241
|
-
--keep-
|
|
242
|
-
--keep-
|
|
243
|
-
--keep-
|
|
244
|
-
--keep-
|
|
245
|
-
--keep-destructive: var(--destructive, #
|
|
246
|
-
--keep-destructive-foreground: var(--destructive-foreground, #450a0a);
|
|
275
|
+
:where(.keep-theme, [data-keep-theme]):where(.dark, .dark *):is([data-mode="inherit"], :not([data-mode])) {
|
|
276
|
+
--keep-background: var(--keep-host-background, color-mix(in srgb, var(--keep-accent) 4%, #0f172a));
|
|
277
|
+
--keep-foreground: var(--keep-host-foreground, #e2e8f0);
|
|
278
|
+
--keep-card: var(--keep-host-card, color-mix(in srgb, var(--keep-accent) 8%, #172033));
|
|
279
|
+
--keep-card-foreground: var(--keep-host-card-foreground, var(--keep-foreground));
|
|
280
|
+
--keep-muted: var(--keep-host-muted, color-mix(in srgb, var(--keep-accent) 12%, #172033));
|
|
281
|
+
--keep-muted-foreground: var(--keep-host-muted-foreground, #94a3b8);
|
|
282
|
+
--keep-border: var(--keep-host-border, color-mix(in srgb, var(--keep-accent) 18%, #475569));
|
|
283
|
+
--keep-input: var(--keep-host-input, var(--keep-border));
|
|
284
|
+
--keep-primary-foreground: var(--keep-host-primary-foreground, #ffffff);
|
|
285
|
+
--keep-ring: var(--keep-host-ring, var(--keep-primary));
|
|
286
|
+
--keep-destructive: var(--keep-host-destructive, #fca5a5);
|
|
287
|
+
--keep-destructive-foreground: var(--keep-host-destructive-foreground, #450a0a);
|
|
247
288
|
--keep-success: #86efac;
|
|
248
289
|
--keep-warning: #fdba74;
|
|
249
290
|
--keep-highlight-bg: #facc15;
|
|
250
291
|
--keep-highlight-fg: #422006;
|
|
251
|
-
--keep-ring: var(--ring, var(--keep-primary));
|
|
252
292
|
--keep-icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
|
|
253
293
|
--keep-icon-sort: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 6 4-4 4 4M12 2v14M16 18l-4 4-4-4'/%3E%3C/svg%3E");
|
|
254
294
|
}
|
|
255
295
|
|
|
256
296
|
@media (prefers-color-scheme: dark) {
|
|
257
297
|
:where(.keep-theme, [data-keep-theme])[data-mode="system"] {
|
|
258
|
-
--keep-background: var(--background, color-mix(in srgb, var(--keep-accent) 4%, #0f172a));
|
|
259
|
-
--keep-foreground: var(--foreground, #e2e8f0);
|
|
260
|
-
--keep-card: var(--card, color-mix(in srgb, var(--keep-accent) 8%, #172033));
|
|
261
|
-
--keep-card-foreground: var(--card-foreground, var(--keep-foreground));
|
|
262
|
-
--keep-muted: var(--muted, color-mix(in srgb, var(--keep-accent) 12%, #172033));
|
|
263
|
-
--keep-muted-foreground: var(--muted-foreground, #94a3b8);
|
|
264
|
-
--keep-border: var(--border, color-mix(in srgb, var(--keep-accent) 18%, #475569));
|
|
265
|
-
--keep-input: var(--input, var(--keep-border));
|
|
266
|
-
--keep-primary: var(--keep-
|
|
267
|
-
--keep-
|
|
268
|
-
--keep-destructive: var(--destructive, #fca5a5);
|
|
269
|
-
--keep-destructive-foreground: var(--destructive-foreground, #450a0a);
|
|
298
|
+
--keep-background: var(--keep-host-background, color-mix(in srgb, var(--keep-accent) 4%, #0f172a));
|
|
299
|
+
--keep-foreground: var(--keep-host-foreground, #e2e8f0);
|
|
300
|
+
--keep-card: var(--keep-host-card, color-mix(in srgb, var(--keep-accent) 8%, #172033));
|
|
301
|
+
--keep-card-foreground: var(--keep-host-card-foreground, var(--keep-foreground));
|
|
302
|
+
--keep-muted: var(--keep-host-muted, color-mix(in srgb, var(--keep-accent) 12%, #172033));
|
|
303
|
+
--keep-muted-foreground: var(--keep-host-muted-foreground, #94a3b8);
|
|
304
|
+
--keep-border: var(--keep-host-border, color-mix(in srgb, var(--keep-accent) 18%, #475569));
|
|
305
|
+
--keep-input: var(--keep-host-input, var(--keep-border));
|
|
306
|
+
--keep-primary-foreground: var(--keep-host-primary-foreground, #ffffff);
|
|
307
|
+
--keep-ring: var(--keep-host-ring, var(--keep-primary));
|
|
308
|
+
--keep-destructive: var(--keep-host-destructive, #fca5a5);
|
|
309
|
+
--keep-destructive-foreground: var(--keep-host-destructive-foreground, #450a0a);
|
|
270
310
|
--keep-success: #86efac;
|
|
271
311
|
--keep-warning: #fdba74;
|
|
272
312
|
--keep-highlight-bg: #facc15;
|
|
273
313
|
--keep-highlight-fg: #422006;
|
|
274
|
-
--keep-ring: var(--ring, var(--keep-primary));
|
|
275
314
|
--keep-icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
|
|
276
315
|
--keep-icon-sort: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 6 4-4 4 4M12 2v14M16 18l-4 4-4-4'/%3E%3C/svg%3E");
|
|
277
316
|
}
|
|
@@ -529,7 +568,7 @@
|
|
|
529
568
|
|
|
530
569
|
:where(.keep-theme, [data-keep-theme])
|
|
531
570
|
:is([data-keep-field="note"], [data-keep-field="tags"], [data-keep-field="collection"])
|
|
532
|
-
> [data-keep-field-icon]::before {
|
|
571
|
+
> [data-keep-field-icon]:not([data-has-custom-icon="true"])::before {
|
|
533
572
|
content: "";
|
|
534
573
|
display: inline-block;
|
|
535
574
|
flex: 0 0 auto;
|
|
@@ -561,6 +600,12 @@
|
|
|
561
600
|
content: none;
|
|
562
601
|
}
|
|
563
602
|
|
|
603
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-icon] {
|
|
604
|
+
display: inline-flex;
|
|
605
|
+
flex: 0 0 auto;
|
|
606
|
+
align-items: center;
|
|
607
|
+
}
|
|
608
|
+
|
|
564
609
|
@keyframes keepkit-save-pop {
|
|
565
610
|
50% {
|
|
566
611
|
transform: scale(1.025);
|
|
@@ -396,6 +396,7 @@
|
|
|
396
396
|
display: inline-flex;
|
|
397
397
|
width: fit-content;
|
|
398
398
|
align-items: center;
|
|
399
|
+
gap: 0.375rem;
|
|
399
400
|
min-height: 1.75rem;
|
|
400
401
|
border: 1px solid color-mix(in srgb, var(--keep-primary) 24%, var(--keep-border));
|
|
401
402
|
border-radius: 999px;
|
|
@@ -1122,13 +1123,10 @@
|
|
|
1122
1123
|
}
|
|
1123
1124
|
:where(.keep-theme, [data-keep-theme]) [data-keep-popover-panel="true"] {
|
|
1124
1125
|
position: fixed;
|
|
1125
|
-
inset-block: auto 0;
|
|
1126
|
-
inset-inline: 0;
|
|
1127
|
-
width: 100%;
|
|
1128
|
-
max-height: min(85vh, 40rem);
|
|
1129
1126
|
overflow-y: auto;
|
|
1130
1127
|
border-radius: calc(var(--keep-radius) + 0.5rem) calc(var(--keep-radius) + 0.5rem) 0 0;
|
|
1131
1128
|
padding: calc(var(--keep-card-padding) * 1.25);
|
|
1129
|
+
padding-bottom: max(calc(var(--keep-card-padding) * 1.25), env(safe-area-inset-bottom));
|
|
1132
1130
|
}
|
|
1133
1131
|
:where(.keep-theme, [data-keep-theme]) [data-keep-card-part="actions"] {
|
|
1134
1132
|
grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
|