@k2b/ui 0.6.2 → 0.8.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/actions/Dropdown.js +2 -0
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/chat/ChatPrimitives.js +4 -1
- package/dist/browser/chat/ChatPrimitives.js.map +1 -1
- package/dist/browser/content/DataTable.js +25 -10
- package/dist/browser/content/DataTable.js.map +1 -1
- package/dist/browser/content/FileView.js +49 -10
- package/dist/browser/content/FileView.js.map +1 -1
- package/dist/browser/inputs/AutocompleteSelect.js +1 -1
- package/dist/browser/inputs/AutocompleteSelect.js.map +1 -1
- package/dist/browser/inputs/FileInputs.js.map +1 -1
- package/dist/browser/inputs/MultiSelectInput.js +258 -174
- package/dist/browser/inputs/MultiSelectInput.js.map +1 -1
- package/dist/browser/inputs/Select.js +1 -1
- package/dist/browser/inputs/Select.js.map +1 -1
- package/dist/browser/inputs/choice.js +27 -0
- package/dist/browser/inputs/choice.js.map +1 -1
- package/dist/browser/intl/messages.js +6 -0
- package/dist/browser/intl/messages.js.map +1 -1
- package/dist/browser/layout/DetailPanel.js +168 -133
- package/dist/browser/layout/DetailPanel.js.map +1 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/surfaces/Placeholder.js +3 -0
- package/dist/browser/surfaces/Placeholder.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +2 -0
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/chat/ChatPrimitives.js +3 -1
- package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
- package/dist/ssr/content/DataTable.js +25 -10
- package/dist/ssr/content/DataTable.js.map +1 -1
- package/dist/ssr/content/FileView.js +49 -10
- package/dist/ssr/content/FileView.js.map +1 -1
- package/dist/ssr/inputs/AutocompleteSelect.js +1 -1
- package/dist/ssr/inputs/AutocompleteSelect.js.map +1 -1
- package/dist/ssr/inputs/FileInputs.js.map +1 -1
- package/dist/ssr/inputs/MultiSelectInput.js +88 -43
- package/dist/ssr/inputs/MultiSelectInput.js.map +1 -1
- package/dist/ssr/inputs/Select.js +1 -1
- package/dist/ssr/inputs/Select.js.map +1 -1
- package/dist/ssr/inputs/choice.js +27 -0
- package/dist/ssr/inputs/choice.js.map +1 -1
- package/dist/ssr/intl/messages.js +6 -0
- package/dist/ssr/intl/messages.js.map +1 -1
- package/dist/ssr/layout/DetailPanel.js +68 -38
- package/dist/ssr/layout/DetailPanel.js.map +1 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/surfaces/Placeholder.js +3 -0
- package/dist/ssr/surfaces/Placeholder.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/content/FileView.d.ts +1 -0
- package/dist/types/inputs/FileInputs.d.ts +1 -0
- package/dist/types/inputs/choice.d.ts +12 -0
- package/dist/types/intl/messages.d.ts +3 -0
- package/dist/types/layout/DetailPanel.d.ts +10 -0
- package/dist/types/layout/index.d.ts +1 -1
- package/dist/types/surfaces/Placeholder.d.ts +2 -1
- package/package.json +1 -1
|
@@ -39,6 +39,7 @@ export type FileViewProps = {
|
|
|
39
39
|
crossOrigin?: "anonymous" | "use-credentials";
|
|
40
40
|
/** Native media failed to load; the host can renew a signed URL and offer retry. */
|
|
41
41
|
onPreviewError?: () => void;
|
|
42
|
+
/** Download actions only; never a preview source, because an attachment response does not render inline. */
|
|
42
43
|
downloadHref?: string | null;
|
|
43
44
|
/** App-specific renderers matched before the built-ins for this instance. */
|
|
44
45
|
renderers?: readonly FileViewRenderer[];
|
|
@@ -5,6 +5,7 @@ export type FileDropzoneProps = FieldProps & {
|
|
|
5
5
|
accept?: string;
|
|
6
6
|
multiple?: boolean;
|
|
7
7
|
busy?: boolean;
|
|
8
|
+
/** Full icon class list, for example `"ti ti-photo-plus"`. Defaults to `"ti ti-cloud-upload"`. */
|
|
8
9
|
icon?: string;
|
|
9
10
|
title?: JSX.Element;
|
|
10
11
|
subtitle?: JSX.Element;
|
|
@@ -12,6 +12,18 @@ export type ChoiceOption<T extends string = string> = {
|
|
|
12
12
|
export type ChoiceOptionsLoader<T extends string = string> = (query: string, signal: AbortSignal) => Promise<readonly ChoiceOption<T>[]>;
|
|
13
13
|
export declare const filterChoiceOptions: <T extends string>(options: readonly ChoiceOption<T>[], query: string) => readonly ChoiceOption<T>[];
|
|
14
14
|
export declare const nextEnabledChoiceIndex: <T extends string>(options: readonly ChoiceOption<T>[], current: number, direction: 1 | -1) => number;
|
|
15
|
+
/**
|
|
16
|
+
* Counts the leading pills that fit into `available` pixels and measures the
|
|
17
|
+
* whole row. When not all of them fit, the rest collapse into a summary pill
|
|
18
|
+
* of width `more`; the first pill always stays and truncates when even it does
|
|
19
|
+
* not fit. Without a measured width (no layout yet) every pill stays. Half a
|
|
20
|
+
* pixel of slack absorbs layout rounding, so a row given exactly its own
|
|
21
|
+
* `rowWidth` always fits.
|
|
22
|
+
*/
|
|
23
|
+
export declare const fitChoicePills: (available: number, widths: readonly number[], gap: number, more: number) => {
|
|
24
|
+
visible: number;
|
|
25
|
+
rowWidth: number;
|
|
26
|
+
};
|
|
15
27
|
export declare function createChoiceLoader<T extends string>(loader: () => ChoiceOptionsLoader<T> | undefined, debounceMs: () => number): {
|
|
16
28
|
options: () => readonly ChoiceOption<T>[];
|
|
17
29
|
loading: () => boolean;
|
|
@@ -46,11 +46,21 @@ type DetailPanelSectionBaseProps = {
|
|
|
46
46
|
meta?: JSX.Element;
|
|
47
47
|
class?: string;
|
|
48
48
|
};
|
|
49
|
+
/** One direct secondary command, rendered as a sibling icon button at the end of the row. */
|
|
50
|
+
export type DetailPanelActionSecondary = {
|
|
51
|
+
/** Icon class, for example `ti ti-trash`. */
|
|
52
|
+
icon: string;
|
|
53
|
+
/** Accessible name and tooltip of the icon button. */
|
|
54
|
+
label: string;
|
|
55
|
+
onClick: () => void;
|
|
56
|
+
variant?: "danger";
|
|
57
|
+
};
|
|
49
58
|
type DetailPanelActionBaseProps = {
|
|
50
59
|
title: JSX.Element;
|
|
51
60
|
description?: JSX.Element;
|
|
52
61
|
leading?: JSX.Element;
|
|
53
62
|
trailing?: JSX.Element;
|
|
63
|
+
secondaryAction?: DetailPanelActionSecondary;
|
|
54
64
|
class?: string;
|
|
55
65
|
};
|
|
56
66
|
type DetailPanelActionMenuProps = {
|
|
@@ -9,7 +9,7 @@ export { APP_WORKSPACE_DETAIL_DEFAULT, APP_WORKSPACE_DETAIL_MAX, APP_WORKSPACE_D
|
|
|
9
9
|
export { type BottomSheetProps, bottomSheetOptions, default as BottomSheet } from "./BottomSheet";
|
|
10
10
|
export type { DataPanelProps } from "./DataPanel";
|
|
11
11
|
export { DataPanel } from "./DataPanel";
|
|
12
|
-
export type { DetailPanelActionButtonProps, DetailPanelActionLinkProps, DetailPanelActionProps, DetailPanelBodyProps, DetailPanelGroupProps, DetailPanelHeaderProps, DetailPanelProps, DetailPanelSectionProps, DetailPanelSummaryProps, DetailPanelTone, } from "./DetailPanel";
|
|
12
|
+
export type { DetailPanelActionButtonProps, DetailPanelActionLinkProps, DetailPanelActionProps, DetailPanelActionSecondary, DetailPanelBodyProps, DetailPanelGroupProps, DetailPanelHeaderProps, DetailPanelProps, DetailPanelSectionProps, DetailPanelSummaryProps, DetailPanelTone, } from "./DetailPanel";
|
|
13
13
|
export { default as DetailPanel } from "./DetailPanel";
|
|
14
14
|
export type { DiscussionComposerProps, DiscussionItemProps, DiscussionListProps, DiscussionProps } from "./Discussion";
|
|
15
15
|
export { default as Discussion } from "./Discussion";
|
|
@@ -2,7 +2,8 @@ import { type JSX } from "solid-js";
|
|
|
2
2
|
export type PlaceholderAlign = "center" | "left";
|
|
3
3
|
export type PlaceholderSurface = "none" | "paper";
|
|
4
4
|
export type PlaceholderState = "empty" | "loading" | "error";
|
|
5
|
-
|
|
5
|
+
/** `compact` stacks inside a section, `inline` is one row in a list or sidebar, `panel` fills a work area. */
|
|
6
|
+
export type PlaceholderVariant = "compact" | "inline" | "panel";
|
|
6
7
|
export type PlaceholderProps = {
|
|
7
8
|
title?: JSX.Element;
|
|
8
9
|
description?: JSX.Element;
|