@keepkit/ui 0.28.17 → 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 +196 -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 -1409
- package/dist/index.js +198 -10271
- 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 +87 -55
- package/dist/styles/collection.css +1 -0
- 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;
|
|
@@ -174,8 +207,7 @@
|
|
|
174
207
|
--keep-muted-foreground: #0c4a6e;
|
|
175
208
|
--keep-border: #bae6fd;
|
|
176
209
|
--keep-input: #7dd3fc;
|
|
177
|
-
--keep-
|
|
178
|
-
--keep-primary: var(--keep-accent);
|
|
210
|
+
--keep-primary: #0369a1;
|
|
179
211
|
--keep-primary-foreground: #ffffff;
|
|
180
212
|
--keep-destructive: #be123c;
|
|
181
213
|
--keep-success: #047857;
|
|
@@ -193,8 +225,7 @@
|
|
|
193
225
|
--keep-muted-foreground: #466557;
|
|
194
226
|
--keep-border: #bfd7c7;
|
|
195
227
|
--keep-input: #91b9a0;
|
|
196
|
-
--keep-
|
|
197
|
-
--keep-primary: var(--keep-accent);
|
|
228
|
+
--keep-primary: #2f6f4e;
|
|
198
229
|
--keep-primary-foreground: #ffffff;
|
|
199
230
|
--keep-destructive: #b42318;
|
|
200
231
|
--keep-success: #18794e;
|
|
@@ -212,8 +243,7 @@
|
|
|
212
243
|
--keep-muted-foreground: #9a3412;
|
|
213
244
|
--keep-border: #fed7aa;
|
|
214
245
|
--keep-input: #fdba74;
|
|
215
|
-
--keep-
|
|
216
|
-
--keep-primary: var(--keep-accent);
|
|
246
|
+
--keep-primary: #c2410c;
|
|
217
247
|
--keep-primary-foreground: #ffffff;
|
|
218
248
|
--keep-destructive: #be123c;
|
|
219
249
|
--keep-success: #15803d;
|
|
@@ -231,8 +261,7 @@
|
|
|
231
261
|
--keep-muted-foreground: #6d28d9;
|
|
232
262
|
--keep-border: #ddd6fe;
|
|
233
263
|
--keep-input: #c4b5fd;
|
|
234
|
-
--keep-
|
|
235
|
-
--keep-primary: var(--keep-accent);
|
|
264
|
+
--keep-primary: #7c3aed;
|
|
236
265
|
--keep-primary-foreground: #ffffff;
|
|
237
266
|
--keep-destructive: #be123c;
|
|
238
267
|
--keep-success: #15803d;
|
|
@@ -243,48 +272,45 @@
|
|
|
243
272
|
|
|
244
273
|
:where(.keep-theme, [data-keep-theme])[data-mode="dark"],
|
|
245
274
|
:where(.keep-theme, [data-keep-theme]).keep-theme--dark,
|
|
246
|
-
:where(.keep-theme, [data-keep-theme]).dark,
|
|
247
|
-
|
|
248
|
-
--keep-
|
|
249
|
-
--keep-
|
|
250
|
-
--keep-card: var(--card
|
|
251
|
-
--keep-
|
|
252
|
-
--keep-muted: var(--muted
|
|
253
|
-
--keep-
|
|
254
|
-
--keep-
|
|
255
|
-
--keep-
|
|
256
|
-
--keep-
|
|
257
|
-
--keep-
|
|
258
|
-
--keep-destructive: var(--destructive, #
|
|
259
|
-
--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);
|
|
260
288
|
--keep-success: #86efac;
|
|
261
289
|
--keep-warning: #fdba74;
|
|
262
290
|
--keep-highlight-bg: #facc15;
|
|
263
291
|
--keep-highlight-fg: #422006;
|
|
264
|
-
--keep-ring: var(--ring, var(--keep-primary));
|
|
265
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");
|
|
266
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");
|
|
267
294
|
}
|
|
268
295
|
|
|
269
296
|
@media (prefers-color-scheme: dark) {
|
|
270
297
|
:where(.keep-theme, [data-keep-theme])[data-mode="system"] {
|
|
271
|
-
--keep-background: var(--background, color-mix(in srgb, var(--keep-accent) 4%, #0f172a));
|
|
272
|
-
--keep-foreground: var(--foreground, #e2e8f0);
|
|
273
|
-
--keep-card: var(--card, color-mix(in srgb, var(--keep-accent) 8%, #172033));
|
|
274
|
-
--keep-card-foreground: var(--card-foreground, var(--keep-foreground));
|
|
275
|
-
--keep-muted: var(--muted, color-mix(in srgb, var(--keep-accent) 12%, #172033));
|
|
276
|
-
--keep-muted-foreground: var(--muted-foreground, #94a3b8);
|
|
277
|
-
--keep-border: var(--border, color-mix(in srgb, var(--keep-accent) 18%, #475569));
|
|
278
|
-
--keep-input: var(--input, var(--keep-border));
|
|
279
|
-
--keep-primary: var(--keep-
|
|
280
|
-
--keep-
|
|
281
|
-
--keep-destructive: var(--destructive, #fca5a5);
|
|
282
|
-
--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);
|
|
283
310
|
--keep-success: #86efac;
|
|
284
311
|
--keep-warning: #fdba74;
|
|
285
312
|
--keep-highlight-bg: #facc15;
|
|
286
313
|
--keep-highlight-fg: #422006;
|
|
287
|
-
--keep-ring: var(--ring, var(--keep-primary));
|
|
288
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");
|
|
289
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");
|
|
290
316
|
}
|
|
@@ -542,7 +568,7 @@
|
|
|
542
568
|
|
|
543
569
|
:where(.keep-theme, [data-keep-theme])
|
|
544
570
|
:is([data-keep-field="note"], [data-keep-field="tags"], [data-keep-field="collection"])
|
|
545
|
-
> [data-keep-field-icon]::before {
|
|
571
|
+
> [data-keep-field-icon]:not([data-has-custom-icon="true"])::before {
|
|
546
572
|
content: "";
|
|
547
573
|
display: inline-block;
|
|
548
574
|
flex: 0 0 auto;
|
|
@@ -574,6 +600,12 @@
|
|
|
574
600
|
content: none;
|
|
575
601
|
}
|
|
576
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
|
+
|
|
577
609
|
@keyframes keepkit-save-pop {
|
|
578
610
|
50% {
|
|
579
611
|
transform: scale(1.025);
|
package/dist/tailwind.css
CHANGED
|
@@ -1,37 +1,7 @@
|
|
|
1
1
|
@import "./theme.css" layer(components);
|
|
2
2
|
|
|
3
|
-
/*
|
|
4
|
-
* Tailwind v4 exposes semantic colors as complete values through --color-*.
|
|
5
|
-
* Bridge those values into the scoped KeepKit tokens without replacing the
|
|
6
|
-
* host application's generic --color-background / --color-primary aliases.
|
|
7
|
-
* The explicit fallbacks also keep a plain Tailwind installation usable when
|
|
8
|
-
* no shadcn semantic colors are configured.
|
|
9
|
-
*/
|
|
10
3
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
11
4
|
|
|
12
|
-
@layer components {
|
|
13
|
-
:where(.keep-theme, [data-keep-theme]) {
|
|
14
|
-
--keep-background: var(--color-background, #ffffff);
|
|
15
|
-
--keep-foreground: var(--color-foreground, #0f172a);
|
|
16
|
-
--keep-card: var(--color-card, var(--color-background, #ffffff));
|
|
17
|
-
--keep-card-foreground: var(--color-card-foreground, var(--color-foreground, #0f172a));
|
|
18
|
-
--keep-card-border: var(--keep-border);
|
|
19
|
-
--keep-card-shadow: var(--keep-shadow);
|
|
20
|
-
--keep-surface-border: var(--keep-border);
|
|
21
|
-
--keep-surface-background: var(--keep-card);
|
|
22
|
-
--keep-surface-shadow: var(--keep-shadow);
|
|
23
|
-
--keep-muted: var(--color-muted, #f1f5f9);
|
|
24
|
-
--keep-muted-foreground: var(--color-muted-foreground, #64748b);
|
|
25
|
-
--keep-border: var(--color-border, #d7dee8);
|
|
26
|
-
--keep-input: var(--color-input, var(--color-border, #d7dee8));
|
|
27
|
-
--keep-primary: var(--color-primary, #2563eb);
|
|
28
|
-
--keep-primary-foreground: var(--color-primary-foreground, #ffffff);
|
|
29
|
-
--keep-destructive: var(--color-destructive, #b91c1c);
|
|
30
|
-
--keep-destructive-foreground: var(--color-destructive-foreground, #ffffff);
|
|
31
|
-
--keep-ring: var(--color-ring, var(--color-primary, #2563eb));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
5
|
@theme inline {
|
|
36
6
|
--color-keep-background: var(--keep-background);
|
|
37
7
|
--color-keep-foreground: var(--keep-foreground);
|