@keepkit/ui 0.12.0 → 0.14.0
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 +72 -4
- package/dist/index.d.ts +69 -10
- package/dist/index.js +430 -115
- package/dist/index.js.map +1 -1
- package/dist/styles/base.css +240 -0
- package/dist/styles/button.css +64 -0
- package/dist/styles/collection.css +160 -0
- package/dist/styles/sync.css +146 -0
- package/dist/tailwind.css +22 -0
- package/dist/tailwind.d.ts +33 -0
- package/dist/tailwind.js +31 -0
- package/dist/tailwind.js.map +1 -0
- package/dist/theme.css +4 -134
- package/package.json +24 -3
package/README.md
CHANGED
|
@@ -56,9 +56,43 @@ function SavedArticles() {
|
|
|
56
56
|
|
|
57
57
|
`keep.Collection`は検索、ソート、ページング、loading / empty / error、ARIA live通知を標準で提供します。検索は既定で300msデバウンスされます。`features={{ tagFilter: true, bulkActions: true }}`でタグフィルターと一括操作も有効にできます。個別の`KeepList`、`KeepSearchInput`、`KeepSortSelect`、`KeepPagination`、`KeepItemCheckbox`、`KeepTagEditor`などは高度なレイアウト用に利用できます。`KeepBulkActions`はrender propsで操作UIを差し替えられ、`isAllSelected` / `toggleSelectAll`で表示中アイテムを一括操作できます。`KeepNoteEditor`は既定300msのデバウンス保存に対応し、`debounceMs={0}`でフォーム送信のみへ戻せます。通知領域だけを明示的に置く場合は`KeepAnnouncer`(`KeepAnnouncements`のalias)を使えます。
|
|
58
58
|
`KeepItemCard`は`href`、`onOpen`、`linkTarget`、`linkComponent`に対応し、保存アイテムから詳細ページへ遷移できます。非公開・期限切れ等の`status`を持つアイテムは自動的にリンクを無効化します。`KeepBackup`はJSONのエクスポート、merge / replaceインポート、結果件数、容量エラー表示を提供します。
|
|
59
|
+
外部URLの詳細リンクには`target="_blank"`と`rel="noreferrer"`が既定で補完され、利用できないカードには`aria-disabled="true"`と`data-item-status`が付与されます。同期競合ダイアログではローカルとリモートの更新日時・メモを並べて確認できます。
|
|
59
60
|
|
|
60
|
-
v0.
|
|
61
|
-
Phase 4の状態UIとして`KeepItemStatusBadge`、`KeepStaleNotice`、`KeepPruneStaleButton`、`KeepSyncStatusBanner`、`KeepSyncRecoveryDialog
|
|
61
|
+
v0.14.0では`KeepCollection urlSync layout="list" | "grid" | "compact"`、`KeepBulkActions selectionScope="page" | "query" | "all"`、`KeepUndo`を利用できます。`createNextPagesRouterAdapter`はNext.js Pages Router用の注入adapterです。`locale`は英語、日本語、韓国語、中国語簡体字・繁体字、タイ語、フランス語、スペイン語、ポルトガル語、イタリア語、ドイツ語、ロシア語、フィリピン語、ベトナム語、インドネシア語、マレー語の16言語に対応し、`labels`で上書きできます。認証付き同期は`createAuthenticatedSyncKit`から利用できます。
|
|
62
|
+
Phase 4の状態UIとして`KeepItemStatusBadge`、`KeepStaleNotice`、`KeepPruneStaleButton`、`KeepSyncStatusBanner`、`KeepSyncRecoveryDialog`を利用できます。`import "@keepkit/ui/theme.css"`でテーマCSSを有効にできます。
|
|
63
|
+
|
|
64
|
+
### Tailwind/shadcnテーマ
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
import "@keepkit/ui/tailwind.css";
|
|
68
|
+
import { KeepThemeProvider, KeepCollection } from "@keepkit/ui";
|
|
69
|
+
|
|
70
|
+
<KeepThemeProvider theme="compact" mode="system" density="comfortable" radius="medium">
|
|
71
|
+
<KeepCollection layout="grid" />
|
|
72
|
+
</KeepThemeProvider>;
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`default`、`compact`、`minimal`、`rounded`、`high-contrast`、`dark`のプリセット、`.dark`/`prefers-color-scheme`、モバイル対応、`prefers-reduced-motion`を提供します。shadcn/uiの`--background`、`--foreground`、`--card`、`--muted`、`--border`、`--primary`、`--destructive`、`--ring`を継承し、KeepKit固有の値は`--keep-*`に分離されます。`KeepKitProvider theme="compact"`、`variables`、`highContrast`、`reducedMotion`も利用できます。`keepKitTheme`は`@keepkit/ui/tailwind`から、分割CSSは`@keepkit/ui/styles/base.css`、`button.css`、`collection.css`、`sync.css`から読み込めます。`KeepButton icons={{ save, saved, remove }}`と`iconOnly`でLucide等へ差し替えられます。
|
|
76
|
+
|
|
77
|
+
Viewer向け保存カードとカスタムテーマは次のように構成できます。`savedAt`、タイトル、タグ、詳細リンク、保存解除ボタン、期限切れ表示は`KeepItemCard`の標準markupに含まれます。
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
import "@keepkit/ui/theme.css";
|
|
81
|
+
import { KeepItemCard, KeepThemeProvider } from "@keepkit/ui";
|
|
82
|
+
|
|
83
|
+
<KeepThemeProvider
|
|
84
|
+
theme="rounded"
|
|
85
|
+
variables={{ "--keep-primary": "oklch(0.55 0.2 250)", "--keep-card-gap": "0.75rem" }}
|
|
86
|
+
>
|
|
87
|
+
<KeepItemCard
|
|
88
|
+
item={item}
|
|
89
|
+
href={`/guide/${item.id}`}
|
|
90
|
+
getImageProps={(entry) => ({ src: entry.meta.image, alt: entry.meta.title })}
|
|
91
|
+
/>
|
|
92
|
+
</KeepThemeProvider>;
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
状態は色だけに依存せず、ラベルと属性でも利用できます。`[data-state="saved"]`、`[data-state="unsaved"]`、`[data-loading="true"]`、`[data-state="error"]`、`[data-state="empty"]`、`[data-state="stale"]`、`[data-status="expired"]`、`[data-status="removed"]`、`[data-state="selected"]`をホストCSSやTailwindのdata variantから参照できます。既存テーマから移行する場合は、`@keepkit/ui/theme.css`を残したまま`--keepkit-*`参照を`--keep-*`へ置き換えてください。Pages Routerでは`createNextPagesRouterAdapter(router)`を`urlAdapter`へ注入します。
|
|
62
96
|
|
|
63
97
|
一覧のqueryは次の形式に統一されています。
|
|
64
98
|
|
|
@@ -109,9 +143,43 @@ function SavedArticles() {
|
|
|
109
143
|
|
|
110
144
|
`keep.Collection` includes search, sorting, pagination, loading/empty/error states, and polite live announcements. Search is debounced by 300ms by default. Enable `features={{ tagFilter: true, bulkActions: true }}` for tag filtering and bulk operations. Use the individual `KeepList`, `KeepSearchInput`, `KeepSortSelect`, `KeepPagination`, `KeepItemCheckbox`, and `KeepTagEditor` primitives when you need a custom layout. `KeepBulkActions` supports render props and exposes `isAllSelected` / `toggleSelectAll` for visible-item selection. `KeepNoteEditor` auto-saves dirty notes after 300ms by default; set `debounceMs={0}` to use form submission only. Mount `KeepAnnouncer` (`KeepAnnouncements` alias) when you need the live region explicitly.
|
|
111
145
|
`KeepItemCard` accepts `href`, `onOpen`, `linkTarget`, and `linkComponent` for detail-page navigation. Links are disabled for unavailable `status` values such as private or expired. `KeepBackup` provides JSON export, merge/replace import, result counts, and quota-error messaging.
|
|
146
|
+
External detail URLs receive `target="_blank"` and `rel="noreferrer"` defaults. Unavailable cards expose `aria-disabled="true"` and normalized `data-item-status` values, and the sync recovery dialog compares local and remote updated dates and notes side by side.
|
|
147
|
+
|
|
148
|
+
In v0.14.0, use `KeepCollection urlSync` with `layout="list" | "grid" | "compact"`, `KeepBulkActions selectionScope="page" | "query" | "all"`, and `KeepUndo`. `createNextPagesRouterAdapter` is the injected adapter for Next.js Pages Router. `locale` includes complete dictionaries for 16 built-in locales; `labels` overrides individual entries. Authenticated sync is available through `createAuthenticatedSyncKit`.
|
|
149
|
+
Phase 4 adds `KeepItemStatusBadge`, `KeepStaleNotice`, `KeepPruneStaleButton`, `KeepSyncStatusBanner`, and `KeepSyncRecoveryDialog` for unavailable items, sync failures, conflict resolution, and backup recovery. Import `@keepkit/ui/theme.css` or `@keepkit/ui/tailwind.css` for the opt-in theme layer.
|
|
150
|
+
|
|
151
|
+
### Tailwind and shadcn theme
|
|
152
|
+
|
|
153
|
+
```tsx
|
|
154
|
+
import "@keepkit/ui/tailwind.css";
|
|
155
|
+
import { KeepThemeProvider, KeepCollection } from "@keepkit/ui";
|
|
156
|
+
|
|
157
|
+
<KeepThemeProvider theme="compact" mode="system" density="comfortable" radius="medium">
|
|
158
|
+
<KeepCollection layout="grid" />
|
|
159
|
+
</KeepThemeProvider>;
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Presets include `default`, `compact`, `minimal`, `rounded`, `high-contrast`, and `dark`. The scoped `--keep-*` tokens inherit shadcn/ui variables, and the provider supports `.dark`, system preference, `variables`, `highContrast`, and `reducedMotion`. Use `keepKitTheme` from `@keepkit/ui/tailwind`, feature CSS from `@keepkit/ui/styles/*`, and `icons={{ save, saved, remove }}` / `iconOnly` on `KeepButton` for Lucide or shadcn replacements. The existing Next.js Pages Router recipe remains unchanged: inject `createNextPagesRouterAdapter(router)` into `urlAdapter`.
|
|
163
|
+
|
|
164
|
+
For a Viewer card, the default `KeepItemCard` markup includes the title, tags, saved date, detail link, remove action, thumbnail, and expired-item notice. Override tokens without replacing the markup, or use render props for a complete replacement:
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
import "@keepkit/ui/theme.css";
|
|
168
|
+
import { KeepItemCard, KeepThemeProvider } from "@keepkit/ui";
|
|
169
|
+
|
|
170
|
+
<KeepThemeProvider
|
|
171
|
+
theme="rounded"
|
|
172
|
+
variables={{ "--keep-primary": "oklch(0.55 0.2 250)", "--keep-card-gap": "0.75rem" }}
|
|
173
|
+
>
|
|
174
|
+
<KeepItemCard
|
|
175
|
+
item={item}
|
|
176
|
+
href={`/guide/${item.id}`}
|
|
177
|
+
getImageProps={(entry) => ({ src: entry.meta.image, alt: entry.meta.title })}
|
|
178
|
+
/>
|
|
179
|
+
</KeepThemeProvider>;
|
|
180
|
+
```
|
|
112
181
|
|
|
113
|
-
|
|
114
|
-
Phase 4 adds `KeepItemStatusBadge`, `KeepStaleNotice`, `KeepPruneStaleButton`, `KeepSyncStatusBanner`, and `KeepSyncRecoveryDialog` for unavailable items, sync failures, conflict resolution, and backup recovery. Optionally import `@keepkit/ui/theme.css` for a lightweight CSS-variable theme with dark-mode and mobile typography support.
|
|
182
|
+
Use `[data-state="saved"]`, `[data-state="unsaved"]`, `[data-loading="true"]`, `[data-state="error"]`, `[data-state="empty"]`, `[data-state="stale"]`, `[data-status="expired"]`, `[data-status="removed"]`, and `[data-state="selected"]` from host CSS or Tailwind data variants. For migration, keep importing `@keepkit/ui/theme.css` while replacing direct `--keepkit-*` references with `--keep-*`. In the Pages Router, inject `createNextPagesRouterAdapter(router)` into `urlAdapter`.
|
|
115
183
|
|
|
116
184
|
Collection queries use one canonical shape: `targetType`, `tags`, `search`, `sort`, `pagination`, `filter`, and `savedBetween`. Saved item inputs contain only `id`, `meta`, `targetType`, `note`, and `tags`; KeepKit owns persistence timestamps.
|
|
117
185
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes, ReactNode,
|
|
2
|
+
import { HTMLAttributes, ReactNode, ComponentType, ImgHTMLAttributes, MouseEvent, HTMLAttributeAnchorTarget, InputHTMLAttributes, FormHTMLAttributes, ButtonHTMLAttributes, SelectHTMLAttributes, CSSProperties } from 'react';
|
|
3
3
|
import { ImportItemsResult, KeepListQuery, KeepItem, KeepUrlSyncOptions, KeepItemStatus, KeepSyncConflict, KeepItemInput } from '@keepkit/core/core';
|
|
4
4
|
export { AuthenticatedSyncAuthContext, AuthenticatedSyncKit, AuthenticatedSyncKitOptions, AuthenticatedSyncRequestContext, AuthenticatedSyncTransport, KeepItem, KeepItemInput, KeepListQuery, KeepScope, KeepSyncConflict, KeepSyncResolution, KeepSyncState, KeepSyncStatus, KeepUndoState, KeepUrlSyncOptions, createAuthenticatedSyncKit } from '@keepkit/core/core';
|
|
5
5
|
import { KeepButtonProps as KeepButtonProps$1, UseKeepListResult, KeepErrorBoundaryProps, CreateKeepKitOptions as CreateKeepKitOptions$1, KeepProviderProps, useKeepContext, useKeepItem, useKeepList, KeepShortcutOptions } from '@keepkit/core/react';
|
|
@@ -23,6 +23,18 @@ type KeepButtonLabels = {
|
|
|
23
23
|
savedAriaLabel?: string;
|
|
24
24
|
unsavedAriaLabel?: string;
|
|
25
25
|
};
|
|
26
|
+
type KeepButtonIconProps = {
|
|
27
|
+
"aria-hidden"?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
};
|
|
30
|
+
type KeepButtonIcon = ReactNode | ComponentType<KeepButtonIconProps>;
|
|
31
|
+
type KeepButtonIcons = {
|
|
32
|
+
save?: KeepButtonIcon;
|
|
33
|
+
saved?: KeepButtonIcon;
|
|
34
|
+
remove?: KeepButtonIcon;
|
|
35
|
+
loading?: KeepButtonIcon;
|
|
36
|
+
error?: KeepButtonIcon;
|
|
37
|
+
};
|
|
26
38
|
|
|
27
39
|
type KeepBulkActionsState<TMeta = Record<string, unknown>> = {
|
|
28
40
|
items: KeepItem<TMeta>[];
|
|
@@ -63,9 +75,13 @@ declare function KeepBulkActions<TMeta = Record<string, unknown>>({ query, selec
|
|
|
63
75
|
|
|
64
76
|
type KeepButtonProps<TMeta = Record<string, unknown>> = KeepButtonProps$1<TMeta> & {
|
|
65
77
|
labels?: KeepButtonLabels;
|
|
78
|
+
icons?: KeepButtonIcons;
|
|
79
|
+
iconOnly?: boolean;
|
|
80
|
+
showLabel?: boolean;
|
|
81
|
+
iconClassName?: string;
|
|
66
82
|
};
|
|
67
83
|
/** A style-free save toggle with localized labels and the core button's ARIA/asChild behavior. */
|
|
68
|
-
declare function KeepButton<TMeta = Record<string, unknown>>({ labels, ...props }: KeepButtonProps<TMeta>): react.JSX.Element;
|
|
84
|
+
declare function KeepButton<TMeta = Record<string, unknown>>({ labels, icons, iconOnly, showLabel, iconClassName, ...props }: KeepButtonProps<TMeta>): react.JSX.Element;
|
|
69
85
|
|
|
70
86
|
type KeepItemCardState<TMeta = Record<string, unknown>> = {
|
|
71
87
|
item: KeepItem<TMeta>;
|
|
@@ -95,6 +111,7 @@ type KeepItemCardProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HT
|
|
|
95
111
|
renderImage?: (props: KeepImageProps, item: KeepItem<TMeta>) => ReactNode;
|
|
96
112
|
renderTags?: (tags: string[], item: KeepItem<TMeta>) => ReactNode;
|
|
97
113
|
showTags?: boolean;
|
|
114
|
+
showSavedAt?: boolean;
|
|
98
115
|
imageAlt?: string;
|
|
99
116
|
render?: RenderProp<KeepItemCardState<TMeta>>;
|
|
100
117
|
children?: ReactNode | RenderProp<KeepItemCardState<TMeta>>;
|
|
@@ -113,7 +130,7 @@ type KeepItemCardProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HT
|
|
|
113
130
|
linkRel?: string;
|
|
114
131
|
};
|
|
115
132
|
/** A low-dependency item presentation primitive. The default markup can be replaced with render props. */
|
|
116
|
-
declare function KeepItemCard<TMeta = Record<string, unknown>>({ item, title, getTitle, getImageProps, imageComponent: ImageComponent, renderImage, renderTags, showTags, imageAlt, render, children, removeLabel, onRemoveError, onRemoved, onRetry, showSaveButton, saveButtonLabels, asChild, href: hrefOption, onOpen, linkTarget, linkComponent: LinkComponent, linkTargetAttribute, linkRel, className, ...rootProps }: KeepItemCardProps<TMeta>): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
133
|
+
declare function KeepItemCard<TMeta = Record<string, unknown>>({ item, title, getTitle, getImageProps, imageComponent: ImageComponent, renderImage, renderTags, showTags, showSavedAt, imageAlt, render, children, removeLabel, onRemoveError, onRemoved, onRetry, showSaveButton, saveButtonLabels, asChild, href: hrefOption, onOpen, linkTarget, linkComponent: LinkComponent, linkTargetAttribute, linkRel, className, ...rootProps }: KeepItemCardProps<TMeta>): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
117
134
|
|
|
118
135
|
type KeepListState<TMeta = Record<string, unknown>> = UseKeepListResult<TMeta>;
|
|
119
136
|
type KeepListProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
@@ -194,9 +211,10 @@ type KeepItemCheckboxProps<TMeta = Record<string, unknown>> = Omit<InputHTMLAttr
|
|
|
194
211
|
declare function KeepItemCheckbox<TMeta = Record<string, unknown>>({ item, checked, label, onCheckedChange, "aria-label": ariaLabel, ...props }: KeepItemCheckboxProps<TMeta>): react.JSX.Element;
|
|
195
212
|
|
|
196
213
|
type KeepItemStatusBadgeProps = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
197
|
-
status?: KeepItemStatus;
|
|
214
|
+
status?: KeepItemStatus | "restricted";
|
|
198
215
|
label?: ReactNode;
|
|
199
216
|
};
|
|
217
|
+
type KeepDisplayStatus = "available" | "expired" | "removed" | "restricted";
|
|
200
218
|
/** Displays the normalized availability state of a saved item. */
|
|
201
219
|
declare function KeepItemStatusBadge({ status, label, className, ...props }: KeepItemStatusBadgeProps): react.JSX.Element;
|
|
202
220
|
|
|
@@ -204,8 +222,8 @@ type KeepLayoutProps = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
|
204
222
|
layout?: KeepLayoutPreset;
|
|
205
223
|
children?: ReactNode;
|
|
206
224
|
};
|
|
207
|
-
/** A
|
|
208
|
-
declare function KeepLayout({ layout, children,
|
|
225
|
+
/** A style-free layout wrapper with a stable preset attribute for host or theme CSS. */
|
|
226
|
+
declare function KeepLayout({ layout, children, ...props }: KeepLayoutProps): react.JSX.Element;
|
|
209
227
|
|
|
210
228
|
type KeepNoteEditorState<TMeta = Record<string, unknown>> = {
|
|
211
229
|
item: KeepItem<TMeta>;
|
|
@@ -384,7 +402,38 @@ declare function KeepAnnouncements<TMeta = Record<string, unknown>>({ messages,
|
|
|
384
402
|
/** Singular alias for applications that mount one announcer explicitly. */
|
|
385
403
|
declare const KeepAnnouncer: typeof KeepAnnouncements;
|
|
386
404
|
|
|
387
|
-
type
|
|
405
|
+
type KeepThemeName = "default" | "compact" | "minimal" | "rounded" | "high-contrast" | "dark";
|
|
406
|
+
type KeepThemeMode = "light" | "dark" | "system";
|
|
407
|
+
type KeepThemeDensity = "compact" | "comfortable" | "spacious";
|
|
408
|
+
type KeepThemeRadius = "none" | "small" | "medium" | "large" | "full";
|
|
409
|
+
type KeepThemeVariables = Record<`--keep-${string}`, string | number>;
|
|
410
|
+
type KeepThemeProviderProps = {
|
|
411
|
+
children?: ReactNode;
|
|
412
|
+
className?: string;
|
|
413
|
+
id?: string;
|
|
414
|
+
title?: string;
|
|
415
|
+
role?: string;
|
|
416
|
+
tabIndex?: number;
|
|
417
|
+
"aria-label"?: string;
|
|
418
|
+
"aria-labelledby"?: string;
|
|
419
|
+
"aria-describedby"?: string;
|
|
420
|
+
"data-testid"?: string;
|
|
421
|
+
[key: `data-${string}`]: string | undefined;
|
|
422
|
+
theme?: KeepThemeName;
|
|
423
|
+
mode?: KeepThemeMode;
|
|
424
|
+
density?: KeepThemeDensity;
|
|
425
|
+
radius?: KeepThemeRadius;
|
|
426
|
+
accentColor?: "blue" | "green" | "violet" | "orange" | "rose" | (string & {});
|
|
427
|
+
highContrast?: boolean;
|
|
428
|
+
reducedMotion?: boolean;
|
|
429
|
+
variables?: KeepThemeVariables;
|
|
430
|
+
style?: CSSProperties & KeepThemeVariables;
|
|
431
|
+
asChild?: boolean;
|
|
432
|
+
};
|
|
433
|
+
/** Scopes KeepKit tokens and opt-in component styles to one subtree. */
|
|
434
|
+
declare function KeepThemeProvider({ children, theme, mode, density, radius, accentColor, highContrast, reducedMotion, variables, style, className, asChild, ...props }: KeepThemeProviderProps): react.JSX.Element;
|
|
435
|
+
|
|
436
|
+
type KeepUiLabelKey = "save" | "saved" | "remove" | "loading" | "saving" | "syncing" | "error" | "allTags" | "tags" | "filterTags" | "note" | "saveNote" | "noItems" | "loadingItems" | "errorItems" | "search" | "sort" | "newest" | "oldest" | "savedNewest" | "savedOldest" | "updatedNewest" | "updatedOldest" | "previousPage" | "nextPage" | "pagination" | "page" | "selectItems" | "selectedCount" | "deleteSelected" | "tagsToApply" | "applyTags" | "savedMessage" | "removedMessage" | "undo" | "undoAvailable" | "selectionScope" | "currentPage" | "searchResults" | "allItems" | "localVersion" | "remoteVersion" | "updatedAt" | "statusAvailable" | "noteSavedMessage" | "exportData" | "importData" | "importMode" | "merge" | "replace" | "importedCount" | "failedCount" | "storageQuotaError" | "statusExpired" | "statusRemoved" | "statusDeleted" | "statusPrivate" | "statusUnknown" | "retry" | "removeFromList" | "pruneStale" | "retrySync" | "resolveSync" | "keepLocal" | "useServer" | "manualMerge" | "close" | "backupRecovery" | "backupRecoveryDescription" | "syncPending" | "syncSynced" | "syncConflict";
|
|
388
437
|
type KeepUiLabels = Partial<Record<KeepUiLabelKey, string>>;
|
|
389
438
|
type KeepUiLocaleLabels = Record<KeepUiLabelKey, string>;
|
|
390
439
|
|
|
@@ -410,13 +459,23 @@ type KeepUiProviderProps = {
|
|
|
410
459
|
declare function KeepUiProvider({ labels, locale, labelResolver, children }: KeepUiProviderProps): react.JSX.Element;
|
|
411
460
|
declare function useKeepUiLabels(): KeepUiLabelContext;
|
|
412
461
|
|
|
413
|
-
type KeepKitProviderProps<TMeta = Record<string, unknown>> = Omit<KeepProviderProps<TMeta>, "children"> & Omit<KeepUiProviderProps, "children"> & {
|
|
462
|
+
type KeepKitProviderProps<TMeta = Record<string, unknown>> = Omit<KeepProviderProps<TMeta>, "children"> & Omit<KeepUiProviderProps, "children"> & Omit<KeepThemeProviderProps, "children"> & {
|
|
414
463
|
children?: ReactNode;
|
|
415
464
|
};
|
|
416
465
|
/** Combines the core store, UI labels, and the global live announcer. */
|
|
417
|
-
declare function KeepKitProvider<TMeta = Record<string, unknown>>({ labels, locale, labelResolver, children, ...providerProps }: KeepKitProviderProps<TMeta>): react.JSX.Element;
|
|
466
|
+
declare function KeepKitProvider<TMeta = Record<string, unknown>>({ labels, locale, labelResolver, theme, mode, density, radius, accentColor, highContrast, reducedMotion, variables, className: themeClassName, style: themeStyle, asChild: themeAsChild, children, ...providerProps }: KeepKitProviderProps<TMeta>): react.JSX.Element;
|
|
418
467
|
|
|
419
468
|
type CreateKeepKitOptions<TMeta = Record<string, unknown>> = CreateKeepKitOptions$1<TMeta> & Omit<KeepUiProviderProps, "children"> & {
|
|
469
|
+
theme?: KeepThemeName;
|
|
470
|
+
mode?: KeepThemeMode;
|
|
471
|
+
density?: KeepThemeDensity;
|
|
472
|
+
radius?: KeepThemeRadius;
|
|
473
|
+
accentColor?: KeepThemeProviderProps["accentColor"];
|
|
474
|
+
highContrast?: boolean;
|
|
475
|
+
reducedMotion?: boolean;
|
|
476
|
+
variables?: KeepThemeVariables;
|
|
477
|
+
themeClassName?: string;
|
|
478
|
+
themeStyle?: KeepThemeProviderProps["style"];
|
|
420
479
|
getTitle?: (item: KeepItem<TMeta>) => ReactNode;
|
|
421
480
|
getImageProps?: (item: KeepItem<TMeta>, title: ReactNode) => KeepImageProps | undefined;
|
|
422
481
|
};
|
|
@@ -433,4 +492,4 @@ type KeepKit<TMeta = Record<string, unknown>> = {
|
|
|
433
492
|
/** Create one typed application API for the core and standard UI layer. */
|
|
434
493
|
declare function createKeepKit<TMeta = Record<string, unknown>>(options?: CreateKeepKitOptions<TMeta>): KeepKit<TMeta>;
|
|
435
494
|
|
|
436
|
-
export { type CreateKeepKitOptions, KeepAnnouncements, type KeepAnnouncementsProps, KeepAnnouncer, KeepBackup, type KeepBackupProps, KeepBulkActions, type KeepBulkActionsProps, type KeepBulkActionsState, KeepButton, type KeepButtonLabels, type KeepButtonProps, KeepCollection, type KeepCollectionFeature, type KeepCollectionProps, KeepEmptyState, type KeepEmptyStateProps, type KeepImageProps, KeepItemCard, type KeepItemCardLinkProps, type KeepItemCardProps, type KeepItemCardState, KeepItemCheckbox, type KeepItemCheckboxProps, KeepItemStatusBadge, type KeepItemStatusBadgeProps, type KeepKit, KeepKitProvider, type KeepKitProviderProps, KeepLayout, type KeepLayoutPreset, type KeepLayoutProps, KeepList, type KeepListProps, type KeepListState, KeepNoteEditor, type KeepNoteEditorProps, type KeepNoteEditorState, type KeepPagesRouterLike, KeepPagination, type KeepPaginationProps, type KeepPaginationState, KeepPruneStaleButton, type KeepPruneStaleButtonProps, KeepSearchInput, type KeepSearchInputProps, type KeepSelectionScope, KeepSortSelect, type KeepSortSelectProps, type KeepSortValue, KeepStaleNotice, type KeepStaleNoticeProps, KeepStatus, type KeepStatusLabels, type KeepStatusProps, type KeepStatusState, type KeepStatusValue, KeepSyncRecoveryDialog, type KeepSyncRecoveryDialogProps, KeepSyncStatusBanner, type KeepSyncStatusBannerProps, KeepTagEditor, type KeepTagEditorProps, type KeepTagEditorState, KeepTagFilter, type KeepTagFilterProps, type KeepTagFilterState, type KeepUiLabelContext, type KeepUiLabelKey, type KeepUiLabels, type KeepUiLocale, type KeepUiLocaleLabels, KeepUiProvider, type KeepUiProviderProps, KeepUndo, type KeepUndoProps, type KeepUrlAdapter, type RenderProp, createKeepKit, createNextPagesRouterAdapter, getKeepLocaleLabels, isAllSelected, toggleSelectAll, useKeepUiLabels, useKeepUrlSync };
|
|
495
|
+
export { type CreateKeepKitOptions, KeepAnnouncements, type KeepAnnouncementsProps, KeepAnnouncer, KeepBackup, type KeepBackupProps, KeepBulkActions, type KeepBulkActionsProps, type KeepBulkActionsState, KeepButton, type KeepButtonIcon, type KeepButtonIconProps, type KeepButtonIcons, type KeepButtonLabels, type KeepButtonProps, KeepCollection, type KeepCollectionFeature, type KeepCollectionProps, type KeepDisplayStatus, KeepEmptyState, type KeepEmptyStateProps, type KeepImageProps, KeepItemCard, type KeepItemCardLinkProps, type KeepItemCardProps, type KeepItemCardState, KeepItemCheckbox, type KeepItemCheckboxProps, KeepItemStatusBadge, type KeepItemStatusBadgeProps, type KeepKit, KeepKitProvider, type KeepKitProviderProps, KeepLayout, type KeepLayoutPreset, type KeepLayoutProps, KeepList, type KeepListProps, type KeepListState, KeepNoteEditor, type KeepNoteEditorProps, type KeepNoteEditorState, type KeepPagesRouterLike, KeepPagination, type KeepPaginationProps, type KeepPaginationState, KeepPruneStaleButton, type KeepPruneStaleButtonProps, KeepSearchInput, type KeepSearchInputProps, type KeepSelectionScope, KeepSortSelect, type KeepSortSelectProps, type KeepSortValue, KeepStaleNotice, type KeepStaleNoticeProps, KeepStatus, type KeepStatusLabels, type KeepStatusProps, type KeepStatusState, type KeepStatusValue, KeepSyncRecoveryDialog, type KeepSyncRecoveryDialogProps, KeepSyncStatusBanner, type KeepSyncStatusBannerProps, KeepTagEditor, type KeepTagEditorProps, type KeepTagEditorState, KeepTagFilter, type KeepTagFilterProps, type KeepTagFilterState, type KeepThemeDensity, type KeepThemeMode, type KeepThemeName, KeepThemeProvider, type KeepThemeProviderProps, type KeepThemeRadius, type KeepThemeVariables, type KeepUiLabelContext, type KeepUiLabelKey, type KeepUiLabels, type KeepUiLocale, type KeepUiLocaleLabels, KeepUiProvider, type KeepUiProviderProps, KeepUndo, type KeepUndoProps, type KeepUrlAdapter, type RenderProp, createKeepKit, createNextPagesRouterAdapter, getKeepLocaleLabels, isAllSelected, toggleSelectAll, useKeepUiLabels, useKeepUrlSync };
|