@k2b/ui 0.1.1 → 0.2.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 +6 -3
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/chat/ChatPrimitives.js +44 -41
- package/dist/browser/chat/ChatPrimitives.js.map +1 -1
- package/dist/browser/chat/ChatTimeline.js +3 -1
- package/dist/browser/chat/ChatTimeline.js.map +1 -1
- package/dist/browser/chat/types.js.map +1 -1
- package/dist/browser/content/MarkdownView.js +14 -3
- package/dist/browser/content/MarkdownView.js.map +1 -1
- package/dist/browser/feedback/Tooltip.js +6 -2
- package/dist/browser/feedback/Tooltip.js.map +1 -1
- package/dist/browser/feedback/dialog-core.js +22 -3
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/feedback/tooltip-position.js +15 -0
- package/dist/browser/feedback/tooltip-position.js.map +1 -1
- package/dist/browser/inputs/ChoiceInputs.js +47 -38
- package/dist/browser/inputs/ChoiceInputs.js.map +1 -1
- package/dist/browser/internal/portal.js +1 -1
- package/dist/browser/internal/portal.js.map +1 -1
- package/dist/browser/layout/DetailPanel.js +194 -81
- package/dist/browser/layout/DetailPanel.js.map +1 -1
- package/dist/browser/layout/PanelDialog.js +14 -5
- package/dist/browser/layout/PanelDialog.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +1 -1
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/chat/ChatPrimitives.js +1 -1
- package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
- package/dist/ssr/chat/ChatTimeline.js +3 -1
- package/dist/ssr/chat/ChatTimeline.js.map +1 -1
- package/dist/ssr/chat/types.js.map +1 -1
- package/dist/ssr/content/MarkdownView.js +14 -3
- package/dist/ssr/content/MarkdownView.js.map +1 -1
- package/dist/ssr/feedback/Tooltip.js +6 -4
- package/dist/ssr/feedback/Tooltip.js.map +1 -1
- package/dist/ssr/feedback/dialog-core.js +22 -3
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/feedback/tooltip-position.js +15 -0
- package/dist/ssr/feedback/tooltip-position.js.map +1 -1
- package/dist/ssr/inputs/ChoiceInputs.js +9 -6
- package/dist/ssr/inputs/ChoiceInputs.js.map +1 -1
- package/dist/ssr/internal/portal.js +1 -1
- package/dist/ssr/internal/portal.js.map +1 -1
- package/dist/ssr/layout/DetailPanel.js +86 -15
- package/dist/ssr/layout/DetailPanel.js.map +1 -1
- package/dist/ssr/layout/PanelDialog.js +1 -1
- package/dist/ssr/layout/PanelDialog.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/Dropdown.d.ts +3 -1
- package/dist/types/chat/types.d.ts +2 -0
- package/dist/types/content/MarkdownView.d.ts +6 -1
- package/dist/types/feedback/dialog-core.d.ts +2 -0
- package/dist/types/feedback/tooltip-position.d.ts +1 -1
- package/dist/types/inputs/ChoiceInputs.d.ts +3 -0
- package/dist/types/layout/DetailPanel.d.ts +6 -0
- package/package.json +5 -5
|
@@ -42,7 +42,9 @@ export type DropdownProps = {
|
|
|
42
42
|
items: readonly DropdownItem[];
|
|
43
43
|
children: JSX.Element;
|
|
44
44
|
position?: DropdownPosition | (() => DropdownPosition);
|
|
45
|
-
/**
|
|
45
|
+
/** Larger menu rows and typography for touch. Defaults to `default`. */
|
|
46
|
+
variant?: "default" | "touch";
|
|
47
|
+
/** Menu width as a CSS length. Defaults to `12rem`, or `18rem` for touch. */
|
|
46
48
|
width?: string;
|
|
47
49
|
class?: string;
|
|
48
50
|
menuClass?: string;
|
|
@@ -9,6 +9,8 @@ type ChatActionBase = {
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
/** Toggle state for persistent message actions such as feedback. */
|
|
11
11
|
pressed?: boolean;
|
|
12
|
+
/** Semantic foreground for selected feedback actions, without a persistent background. */
|
|
13
|
+
pressedTone?: "success" | "danger";
|
|
12
14
|
};
|
|
13
15
|
/** Exactly one executable behavior for every chat action. */
|
|
14
16
|
export type ChatAction = ChatActionBase & ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type CommonProps = {
|
|
1
|
+
type CommonProps = MarkdownRenderOptions & {
|
|
2
2
|
/** Optional additional CSS classes */
|
|
3
3
|
class?: string;
|
|
4
4
|
/**
|
|
@@ -21,6 +21,11 @@ export type MarkdownViewProps = CommonProps & ({
|
|
|
21
21
|
});
|
|
22
22
|
export type MarkdownRenderOptions = {
|
|
23
23
|
inlineTokens?: readonly string[];
|
|
24
|
+
/** Whether to render images. False renders alt text without resource requests. Defaults to true. */
|
|
25
|
+
allowImages?: boolean;
|
|
26
|
+
/** Optional protocol allowlist, including trailing colons. Relative URLs resolve as HTTPS. */
|
|
27
|
+
linkProtocols?: readonly string[];
|
|
28
|
+
linkTarget?: "_blank";
|
|
24
29
|
};
|
|
25
30
|
export declare const renderSafeMarkdown: (markdown: string, options?: MarkdownRenderOptions) => string;
|
|
26
31
|
/**
|
|
@@ -9,6 +9,8 @@ export type OpenDialogOptions = {
|
|
|
9
9
|
};
|
|
10
10
|
export type DialogRender<T> = (close: DialogClose<T>, context: {
|
|
11
11
|
dialog: HTMLDialogElement;
|
|
12
|
+
/** Route Escape/backdrop through the same guarded handler as Cancel and X. */
|
|
13
|
+
setDismissHandler: (handler: () => void | Promise<void>) => void;
|
|
12
14
|
}) => JSX.Element;
|
|
13
15
|
export type DialogCore = {
|
|
14
16
|
open: <T>(view: DialogRender<T>, options?: OpenDialogOptions) => Promise<T | undefined>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type TooltipPlacement = "top" | "bottom";
|
|
1
|
+
export type TooltipPlacement = "top" | "bottom" | "left" | "right";
|
|
2
2
|
export declare const positionTooltipSurface: (tooltip: HTMLElement, target: HTMLElement, placement?: TooltipPlacement) => void;
|
|
@@ -4,6 +4,9 @@ export type PinInputProps = ValueFieldProps<string> & {
|
|
|
4
4
|
length?: number;
|
|
5
5
|
name?: string;
|
|
6
6
|
stretch?: boolean;
|
|
7
|
+
password?: boolean;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
onSubmit?: () => void;
|
|
7
10
|
};
|
|
8
11
|
export declare function PinInput(props: PinInputProps): JSX.Element;
|
|
9
12
|
export type SliderProps = FieldProps & Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "onInput" | "onChange" | keyof FieldProps> & ValueFieldProps<number> & {
|
|
@@ -71,11 +71,17 @@ export type DetailPanelSectionProps = DetailPanelSectionBaseProps & ({
|
|
|
71
71
|
actions?: JSX.Element;
|
|
72
72
|
collapsible?: false;
|
|
73
73
|
defaultOpen?: never;
|
|
74
|
+
open?: never;
|
|
75
|
+
onOpenChange?: never;
|
|
76
|
+
disabled?: never;
|
|
74
77
|
} | {
|
|
75
78
|
children: JSX.Element;
|
|
76
79
|
actions?: never;
|
|
77
80
|
collapsible: true;
|
|
78
81
|
defaultOpen?: boolean;
|
|
82
|
+
open?: boolean;
|
|
83
|
+
onOpenChange?: (open: boolean) => void;
|
|
84
|
+
disabled?: boolean;
|
|
79
85
|
});
|
|
80
86
|
type DetailPanelComponent = ((props: DetailPanelProps) => JSX.Element) & {
|
|
81
87
|
Header: (props: DetailPanelHeaderProps) => JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k2b/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Production-ready components for SolidJS applications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/k2b-dev/cloud.git",
|
|
8
8
|
"directory": "packages/ui"
|
|
9
9
|
},
|
|
10
|
-
"homepage": "https://github.com/
|
|
11
|
-
"bugs": "https://github.com/
|
|
10
|
+
"homepage": "https://github.com/k2b-dev/cloud",
|
|
11
|
+
"bugs": "https://github.com/k2b-dev/cloud/issues",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"types": "./dist/types/index.d.ts",
|
|
14
14
|
"sideEffects": [
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@fontsource/ibm-plex-mono": "5.3.0",
|
|
49
49
|
"@fontsource/ibm-plex-sans": "5.3.0",
|
|
50
|
-
"@k2b/stdlib": "0.
|
|
50
|
+
"@k2b/stdlib": "0.22.0",
|
|
51
51
|
"@tabler/icons-webfont": "3.46.0",
|
|
52
52
|
"marked": "17.0.6"
|
|
53
53
|
},
|