@k2b/ui 0.8.0 → 0.9.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/dist/browser/content/Calendar.js +12 -5
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/PdfPreview.js +170 -72
- package/dist/browser/content/PdfPreview.js.map +1 -1
- package/dist/browser/feedback/dialog-core.js +2 -1
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/feedback/prompts.js +20 -6
- package/dist/browser/feedback/prompts.js.map +1 -1
- package/dist/browser/feedback/toast.js +4 -2
- package/dist/browser/feedback/toast.js.map +1 -1
- package/dist/browser/intl/messages.js +48 -2
- package/dist/browser/intl/messages.js.map +1 -1
- package/dist/browser/layout/Navigation.js +8 -5
- package/dist/browser/layout/Navigation.js.map +1 -1
- package/dist/browser/layout/SettingsModal.js +32 -10
- package/dist/browser/layout/SettingsModal.js.map +1 -1
- package/dist/browser/layout/navigation-model.js +1 -0
- package/dist/browser/layout/navigation-model.js.map +1 -1
- package/dist/ssr/content/Calendar.js +13 -6
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/PdfPreview.js +79 -22
- package/dist/ssr/content/PdfPreview.js.map +1 -1
- package/dist/ssr/feedback/dialog-core.js +2 -1
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/feedback/prompts.js +19 -5
- package/dist/ssr/feedback/prompts.js.map +1 -1
- package/dist/ssr/feedback/toast.js +4 -2
- package/dist/ssr/feedback/toast.js.map +1 -1
- package/dist/ssr/intl/messages.js +48 -2
- package/dist/ssr/intl/messages.js.map +1 -1
- package/dist/ssr/layout/Navigation.js +8 -5
- package/dist/ssr/layout/Navigation.js.map +1 -1
- package/dist/ssr/layout/SettingsModal.js +30 -5
- package/dist/ssr/layout/SettingsModal.js.map +1 -1
- package/dist/ssr/layout/navigation-model.js +1 -0
- package/dist/ssr/layout/navigation-model.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/content/PdfPreview.d.ts +8 -0
- package/dist/types/intl/messages.d.ts +23 -0
- package/dist/types/layout/navigation-model.d.ts +5 -0
- package/package.json +2 -1
|
@@ -7,6 +7,14 @@ export type PdfPreviewProps = {
|
|
|
7
7
|
title?: string;
|
|
8
8
|
buttonLabel?: string;
|
|
9
9
|
openButtonLabel?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Opens the document at this address in a new tab instead of a local copy. Pass a stable same-origin URL that
|
|
12
|
+
* serves the PDF inline, so reloading and the viewer's file name keep working. Without it, the open action shows
|
|
13
|
+
* a temporary copy of the requested document.
|
|
14
|
+
*/
|
|
15
|
+
openHref?: string;
|
|
16
|
+
/** Adds a Download action. The host owns the download, for example a fresh attachment URL. */
|
|
17
|
+
onDownload?: () => void;
|
|
10
18
|
emptyText?: string;
|
|
11
19
|
class?: string;
|
|
12
20
|
children?: (parts: {
|
|
@@ -86,6 +86,18 @@ declare const uiMessages: import("@k2b/stdlib").Catalog<{
|
|
|
86
86
|
refreshing: string;
|
|
87
87
|
reset: string;
|
|
88
88
|
required: string;
|
|
89
|
+
minCharacters: ({ count }: {
|
|
90
|
+
count: number;
|
|
91
|
+
}) => string;
|
|
92
|
+
maxCharacters: ({ count }: {
|
|
93
|
+
count: number;
|
|
94
|
+
}) => string;
|
|
95
|
+
minTags: ({ count }: {
|
|
96
|
+
count: number;
|
|
97
|
+
}) => string;
|
|
98
|
+
maxTags: ({ count }: {
|
|
99
|
+
count: number;
|
|
100
|
+
}) => string;
|
|
89
101
|
rename: string;
|
|
90
102
|
delete: string;
|
|
91
103
|
remove: string;
|
|
@@ -142,6 +154,11 @@ declare const uiMessages: import("@k2b/stdlib").Catalog<{
|
|
|
142
154
|
hiddenOverlappingEvents: ({ count }: {
|
|
143
155
|
count: number;
|
|
144
156
|
}) => string;
|
|
157
|
+
calendarEventTime: ({ title, start, end }: {
|
|
158
|
+
title: string;
|
|
159
|
+
start: string;
|
|
160
|
+
end: string;
|
|
161
|
+
}) => string;
|
|
145
162
|
today: string;
|
|
146
163
|
day: string;
|
|
147
164
|
week: string;
|
|
@@ -222,6 +239,9 @@ declare const uiMessages: import("@k2b/stdlib").Catalog<{
|
|
|
222
239
|
messageComposer: string;
|
|
223
240
|
messageInput: string;
|
|
224
241
|
confirmation: string;
|
|
242
|
+
typeToConfirm: ({ phrase }: {
|
|
243
|
+
phrase: string;
|
|
244
|
+
}) => string;
|
|
225
245
|
confirm: string;
|
|
226
246
|
dialog: string;
|
|
227
247
|
discard: string;
|
|
@@ -229,6 +249,7 @@ declare const uiMessages: import("@k2b/stdlib").Catalog<{
|
|
|
229
249
|
form: string;
|
|
230
250
|
filterActions: string;
|
|
231
251
|
info: string;
|
|
252
|
+
dismissNotification: string;
|
|
232
253
|
interactiveLineChart: string;
|
|
233
254
|
interactiveChart: string;
|
|
234
255
|
chartFields: ({ key }: {
|
|
@@ -311,6 +332,8 @@ declare const uiMessages: import("@k2b/stdlib").Catalog<{
|
|
|
311
332
|
pdfPreviewHttpError: ({ status }: {
|
|
312
333
|
status: number;
|
|
313
334
|
}) => string;
|
|
335
|
+
pdfPreviewTabBlocked: string;
|
|
336
|
+
pdfPreviewRendering: string;
|
|
314
337
|
pickIcon: string;
|
|
315
338
|
postMessage: string;
|
|
316
339
|
preview: string;
|
|
@@ -12,6 +12,8 @@ type NavigationEntry = {
|
|
|
12
12
|
children?: readonly NavigationItem[];
|
|
13
13
|
/** Initial disclosure state; subsequent toggles remain local to the renderer. */
|
|
14
14
|
defaultExpanded?: boolean;
|
|
15
|
+
/** Owner-held disclosure state. The renderer shows it and reports toggles through `onExpandedChange`. */
|
|
16
|
+
expanded?: boolean;
|
|
15
17
|
actions?: readonly NavigationItem[];
|
|
16
18
|
};
|
|
17
19
|
/** Serializable presentation. Functions stay with the controller's owning island. */
|
|
@@ -36,12 +38,15 @@ export type NavigationOptions = {
|
|
|
36
38
|
items: Accessor<readonly NavigationItem[]>;
|
|
37
39
|
onAction?: (action: string) => void | Promise<void>;
|
|
38
40
|
onNavigate?: (event: LinkNavigateEvent) => void | Promise<void>;
|
|
41
|
+
/** Receives disclosure toggles of items that carry `expanded`; the owner decides the next state. */
|
|
42
|
+
onExpandedChange?: (id: string, expanded: boolean) => void;
|
|
39
43
|
};
|
|
40
44
|
export declare function findNavigationItem(items: readonly NavigationItem[], id: string): NavigationItem | undefined;
|
|
41
45
|
/** One live source for renderers; no router, registry, fetching or persisted state. */
|
|
42
46
|
export declare function createNavigation(options: NavigationOptions): {
|
|
43
47
|
items: Accessor<readonly NavigationItem[]>;
|
|
44
48
|
onNavigate: ((event: LinkNavigateEvent) => void | Promise<void>) | undefined;
|
|
49
|
+
onExpandedChange: ((id: string, expanded: boolean) => void) | undefined;
|
|
45
50
|
activate(id: string): Promise<void>;
|
|
46
51
|
};
|
|
47
52
|
export type NavigationController = ReturnType<typeof createNavigation>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k2b/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Production-ready components for SolidJS applications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"bun-plugin-tailwind": "0.1.2",
|
|
63
63
|
"happy-dom": "20.11.2",
|
|
64
64
|
"hono": "4.13.8",
|
|
65
|
+
"playwright": "1.62.0",
|
|
65
66
|
"seroval": "1.6.7",
|
|
66
67
|
"solid-js": "1.9.15",
|
|
67
68
|
"tailwindcss": "4.3.3",
|