prime-ui-kit 0.21.3 → 0.21.5
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/chunks/{chunk-R5LI5BO3.js → chunk-CM2KZEDV.js} +388 -293
- package/dist/chunks/{chunk-HMLQCKRL.js → chunk-FWL3NJYA.js} +578 -552
- package/dist/chunks/{chunk-BAJRN3QN.js → chunk-KQLHVPF5.js} +5 -2
- package/dist/chunks/{chunk-JO7E6SZQ.js → chunk-XH64AMXF.js} +370 -338
- package/dist/chunks/chunk-ZGEHB27U.js +5643 -0
- package/dist/color-picker.js +3 -3
- package/dist/components/chat/Chat.d.ts +4 -2
- package/dist/components/chat/ChatRows.d.ts +57 -2
- package/dist/components/chat/messageFlow.d.ts +11 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/input/Input.d.ts +1 -1
- package/dist/components/login-form/LoginForm.d.ts +5 -1
- package/dist/components/textarea/Textarea.d.ts +1 -1
- package/dist/icon-set.js +4 -4
- package/dist/icons/registry.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.js +3 -3
- package/dist/internal/autofill.d.ts +30 -0
- package/dist/internal/messageList.d.ts +3 -1
- package/dist/skill/api-contract.md +2 -2
- package/dist/skill/checklist.md +2 -0
- package/dist/skill/composition.md +1 -1
- package/dist/skill/reference/components/button/examples/in-form.tsx +0 -1
- package/dist/skill/reference/components/chat/COMPONENT.md +41 -5
- package/dist/skill/reference/components/chat/examples/events.tsx +129 -0
- package/dist/skill/reference/components/chat/examples/screen.tsx +56 -2
- package/dist/skill/reference/components/drawer/examples/screen.tsx +1 -5
- package/dist/skill/reference/components/input/COMPONENT.md +3 -0
- package/dist/skill/reference/components/input/examples/in-form.tsx +0 -1
- package/dist/skill/reference/components/input/examples/validation.tsx +1 -1
- package/dist/skill/reference/components/login-form/COMPONENT.md +2 -2
- package/dist/skill/reference/components/login-form/examples/sizes.tsx +6 -2
- package/dist/skill/reference/components/tabs/examples/orientation.tsx +1 -1
- package/dist/skill/reference/components/textarea/COMPONENT.md +2 -0
- package/dist/skill/ux.md +19 -2
- package/package.json +1 -1
- package/src/components/button/examples/in-form.tsx +0 -1
- package/src/components/chat/COMPONENT.md +41 -5
- package/src/components/chat/examples/events.tsx +129 -0
- package/src/components/chat/examples/screen.tsx +56 -2
- package/src/components/drawer/examples/screen.tsx +1 -5
- package/src/components/input/COMPONENT.md +3 -0
- package/src/components/input/examples/in-form.tsx +0 -1
- package/src/components/input/examples/validation.tsx +1 -1
- package/src/components/login-form/COMPONENT.md +2 -2
- package/src/components/login-form/examples/sizes.tsx +6 -2
- package/src/components/tabs/examples/orientation.tsx +1 -1
- package/src/components/textarea/COMPONENT.md +2 -0
- package/dist/chunks/chunk-SUGCIPD7.js +0 -5669
package/dist/color-picker.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
ColorField,
|
|
5
5
|
ColorPicker,
|
|
6
6
|
parseColor
|
|
7
|
-
} from "./chunks/chunk-
|
|
8
|
-
import "./chunks/chunk-
|
|
9
|
-
import "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-KQLHVPF5.js";
|
|
8
|
+
import "./chunks/chunk-XH64AMXF.js";
|
|
9
|
+
import "./chunks/chunk-FWL3NJYA.js";
|
|
10
10
|
export {
|
|
11
11
|
ColorField,
|
|
12
12
|
ColorPicker,
|
|
@@ -2,11 +2,11 @@ import * as React from "react";
|
|
|
2
2
|
import type { MessagePosition } from "../message/types";
|
|
3
3
|
import type { Selection } from "../../internal/messageList";
|
|
4
4
|
import { ChatPinned } from "./ChatPinned";
|
|
5
|
-
import { ChatSeparator, ChatService, ChatUnread } from "./ChatRows";
|
|
5
|
+
import { ChatSeparator, ChatService, ChatServiceChange, ChatServiceIcon, ChatUnread } from "./ChatRows";
|
|
6
6
|
import { type ChatLabels } from "./chatContext";
|
|
7
7
|
import { ChatSelectionBar, type MessageListProps } from "./MessageList";
|
|
8
8
|
export type { ChatPinnedItem, ChatPinnedLabels, ChatPinnedProps } from "./ChatPinned";
|
|
9
|
-
export type { ChatSeparatorProps, ChatServiceProps, ChatUnreadLabels, ChatUnreadProps, } from "./ChatRows";
|
|
9
|
+
export type { ChatSeparatorProps, ChatServiceChangeLabels, ChatServiceChangeProps, ChatServiceIconProps, ChatServiceProps, ChatUnreadLabels, ChatUnreadProps, } from "./ChatRows";
|
|
10
10
|
export type { ChatLabels } from "./chatContext";
|
|
11
11
|
export type { ChatSelectionBarProps } from "./MessageList";
|
|
12
12
|
export declare const CHAT_LABELS: ChatLabels;
|
|
@@ -223,6 +223,8 @@ export declare const Chat: {
|
|
|
223
223
|
SelectionBar: typeof ChatSelectionBar;
|
|
224
224
|
Separator: typeof ChatSeparator;
|
|
225
225
|
Service: typeof ChatService;
|
|
226
|
+
ServiceIcon: typeof ChatServiceIcon;
|
|
227
|
+
ServiceChange: typeof ChatServiceChange;
|
|
226
228
|
Unread: typeof ChatUnread;
|
|
227
229
|
Footer: typeof ChatFooter;
|
|
228
230
|
};
|
|
@@ -12,13 +12,68 @@ export declare namespace ChatSeparator {
|
|
|
12
12
|
var displayName: string;
|
|
13
13
|
}
|
|
14
14
|
export type ChatServiceProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
15
|
+
/**
|
|
16
|
+
* When it happened: a `Date` shown with `formatTime` (and put in `<time dateTime>`), or the text to show; muted, at the end of the pill.
|
|
17
|
+
*/
|
|
18
|
+
time?: Date | string;
|
|
19
|
+
/**
|
|
20
|
+
* The zone `time` is read in.
|
|
21
|
+
*/
|
|
22
|
+
timeZone?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Display of a `Date` time; gets the `timeZone` in force.
|
|
25
|
+
*/
|
|
26
|
+
formatTime?: (date: Date, timeZone?: string) => string;
|
|
15
27
|
ref?: React.Ref<HTMLDivElement>;
|
|
16
28
|
};
|
|
17
|
-
/**
|
|
18
|
-
|
|
29
|
+
/**
|
|
30
|
+
* An event in the chat, not a message: «Анна добавила Олега», «ИИ-агент перевёл клиента: Лид →
|
|
31
|
+
* Арендатор». A centered pill of inline content that wraps: an optional `Chat.ServiceIcon` before
|
|
32
|
+
* the text, a `Chat.ServiceChange` inside it, the time at its end. Its content stands one compact
|
|
33
|
+
* tier down (the badges of a change, a link), so the pill keeps the height of a caption line.
|
|
34
|
+
* Consecutive events stand as one group, at the spacing of a run of messages (`Chat.module.css`).
|
|
35
|
+
*/
|
|
36
|
+
export declare function ChatService({ time: timeProp, timeZone, formatTime, className, children, ...rest }: ChatServiceProps): import("react/jsx-runtime").JSX.Element;
|
|
19
37
|
export declare namespace ChatService {
|
|
20
38
|
var displayName: string;
|
|
21
39
|
}
|
|
40
|
+
export type ChatServiceIconProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
41
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
42
|
+
};
|
|
43
|
+
/** The glyph of an event before its text (who or what acted): decorative, the text names it. */
|
|
44
|
+
export declare function ChatServiceIcon({ className, ...rest }: ChatServiceIconProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare namespace ChatServiceIcon {
|
|
46
|
+
var displayName: string;
|
|
47
|
+
}
|
|
48
|
+
export type ChatServiceChangeLabels = {
|
|
49
|
+
/** What a screen reader hears for the change: `{from}`, `{to}` — the text of each value. */
|
|
50
|
+
change: string;
|
|
51
|
+
};
|
|
52
|
+
export declare const CHAT_SERVICE_CHANGE_LABELS: ChatServiceChangeLabels;
|
|
53
|
+
export type ChatServiceChangeProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
54
|
+
/**
|
|
55
|
+
* The value before (a `Badge.Root`); its text fills `{from}`.
|
|
56
|
+
*/
|
|
57
|
+
from: React.ReactNode;
|
|
58
|
+
/**
|
|
59
|
+
* The value after; its text fills `{to}`.
|
|
60
|
+
*/
|
|
61
|
+
to: React.ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* `change` — the phrase assistive tech hears.
|
|
64
|
+
*/
|
|
65
|
+
labels?: Partial<ChatServiceChangeLabels>;
|
|
66
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* A value that changed inside an event: `from` → `to` (a status, a stage, an owner), usually two
|
|
70
|
+
* `Badge.Root` with the consumer's colours. It reads as one phrase («с „Лид“ на „Арендатор“»): the
|
|
71
|
+
* drawing is hidden from assistive tech, a hidden line says it.
|
|
72
|
+
*/
|
|
73
|
+
export declare function ChatServiceChange({ from, to, labels: labelsProp, className, ...rest }: ChatServiceChangeProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
export declare namespace ChatServiceChange {
|
|
75
|
+
var displayName: string;
|
|
76
|
+
}
|
|
22
77
|
export type ChatUnreadLabels = {
|
|
23
78
|
/** The text of the band. */
|
|
24
79
|
unread: string;
|
|
@@ -39,4 +39,15 @@ type FlowOptions = {
|
|
|
39
39
|
onNew: (value: string, direction: MessageDirection) => void;
|
|
40
40
|
};
|
|
41
41
|
export declare function createMessageFlow({ region, onNew }: FlowOptions): MessageFlow;
|
|
42
|
+
/**
|
|
43
|
+
* The rows that are not messages (a service event, the unread band) new at the end, by row key, on
|
|
44
|
+
* the same terms as the messages' flow: planned in render against the last commit, so a row that
|
|
45
|
+
* mounts because it scrolled into view never enters, and neither does anything of the first commit.
|
|
46
|
+
*/
|
|
47
|
+
export type RowArrivals = {
|
|
48
|
+
plan: (keys: readonly string[]) => void;
|
|
49
|
+
isFresh: (key: string) => boolean;
|
|
50
|
+
commit: (keys: readonly string[]) => void;
|
|
51
|
+
};
|
|
52
|
+
export declare function createRowArrivals(): RowArrivals;
|
|
42
53
|
export {};
|
|
@@ -20,7 +20,7 @@ export type { CardBodyProps, CardDeltaProps, CardDescriptionProps, CardFooterPro
|
|
|
20
20
|
export { Card } from "./card/Card";
|
|
21
21
|
export type { ChartFrameActionsProps, ChartFrameDeltaProps, ChartFrameDescriptionProps, ChartFrameHeaderProps, ChartFrameLabels, ChartFrameLegendProps, ChartFramePlotArea, ChartFramePlotProps, ChartFramePlotSeries, ChartFrameRootProps, ChartFrameRow, ChartFrameSeries, ChartFrameState, ChartFrameTitleProps, ChartFrameTooltipItem, ChartFrameTooltipProps, ChartFrameValueProps, } from "./chart-frame/ChartFrame";
|
|
22
22
|
export { ChartFrame } from "./chart-frame/ChartFrame";
|
|
23
|
-
export type { ChatActionsProps, ChatDescriptionProps, ChatFooterProps, ChatHeaderProps, ChatLabels, ChatMessageEntry, ChatMessagesProps, ChatPinnedItem, ChatPinnedLabels, ChatPinnedProps, ChatRootProps, ChatSearchButtonProps, ChatSearchProps, ChatSelectionBarProps, ChatSeparatorProps, ChatServiceProps, ChatTitleProps, ChatUnreadLabels, ChatUnreadProps, GroupMessagesOptions, MessageListEntry, } from "./chat/Chat";
|
|
23
|
+
export type { ChatActionsProps, ChatDescriptionProps, ChatFooterProps, ChatHeaderProps, ChatLabels, ChatMessageEntry, ChatMessagesProps, ChatPinnedItem, ChatPinnedLabels, ChatPinnedProps, ChatRootProps, ChatSearchButtonProps, ChatSearchProps, ChatSelectionBarProps, ChatSeparatorProps, ChatServiceChangeLabels, ChatServiceChangeProps, ChatServiceIconProps, ChatServiceProps, ChatTitleProps, ChatUnreadLabels, ChatUnreadProps, GroupMessagesOptions, MessageListEntry, } from "./chat/Chat";
|
|
24
24
|
export { Chat, formatMessageDate, groupMessages } from "./chat/Chat";
|
|
25
25
|
export type { ChatListItemDescriptionProps, ChatListItemIconProps, ChatListItemMenuProps, ChatListItemProps, ChatListItemTextProps, ChatListLabels, ChatListMediaKind, ChatListRootProps, } from "./chat-list/ChatList";
|
|
26
26
|
export { ChatList, formatChatTime } from "./chat-list/ChatList";
|
|
@@ -151,7 +151,7 @@ export type InputFieldProps = Omit<React.InputHTMLAttributes<HTMLInputElement>,
|
|
|
151
151
|
ref?: React.Ref<HTMLInputElement>;
|
|
152
152
|
};
|
|
153
153
|
/** The `<input>`; its id comes from `Input.Root` so the label, hint and error stay linked. */
|
|
154
|
-
declare function InputField({ className, "aria-describedby": ariaDescribedBy, required, disabled: disabledProp, type, onChange, onValueChange, onFocus, onBlur, onKeyDown, onClick, onInvalid, ref, ...rest }: InputFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
154
|
+
declare function InputField({ className, "aria-describedby": ariaDescribedBy, required, disabled: disabledProp, type, autoComplete, onChange, onValueChange, onFocus, onBlur, onKeyDown, onClick, onInvalid, ref, ...rest }: InputFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
155
155
|
declare namespace InputField {
|
|
156
156
|
var displayName: string;
|
|
157
157
|
}
|
|
@@ -124,7 +124,11 @@ export type LoginFormFormProps = {
|
|
|
124
124
|
children?: React.ReactNode;
|
|
125
125
|
ref?: React.Ref<HTMLFormElement>;
|
|
126
126
|
} & React.FormHTMLAttributes<HTMLFormElement>;
|
|
127
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* The `<form>`: fields, then the submit button, one column with field → field spacing. Native
|
|
129
|
+
* submit and `onSubmit` work as usual. Autofill is the point of a sign-in form: a kit field inside
|
|
130
|
+
* it without an `autoComplete` token is left to the browser and the password managers.
|
|
131
|
+
*/
|
|
128
132
|
declare function LoginFormForm({ className, children, ref, ...rest }: LoginFormFormProps): import("react/jsx-runtime").JSX.Element;
|
|
129
133
|
declare namespace LoginFormForm {
|
|
130
134
|
var displayName: string;
|
|
@@ -100,7 +100,7 @@ export type TextareaRootProps = Omit<React.TextareaHTMLAttributes<HTMLTextAreaEl
|
|
|
100
100
|
* A multi-line field. `className` goes to the field frame, `id`, `ref` and the native attributes
|
|
101
101
|
* to the `<textarea>` (it has no `Field` part).
|
|
102
102
|
*/
|
|
103
|
-
declare function TextareaRoot({ id, className, size: sizeProp, invalid, focusRing, label, required, optional, hint, hintTone, error, counter, reserveSupportRow, autoResize, rows, maxRows, disabled: disabledProp, readOnly, value, onInput, onChange, onValueChange, onFocus, onBlur, onKeyDown, onSelect, onCommit, formatting, labels: labelsProp, "aria-describedby": ariaDescribedBy, children, ref, ...rest }: TextareaRootProps): import("react/jsx-runtime").JSX.Element;
|
|
103
|
+
declare function TextareaRoot({ id, className, size: sizeProp, invalid, focusRing, label, required, optional, hint, hintTone, error, counter, reserveSupportRow, autoResize, rows, maxRows, disabled: disabledProp, readOnly, value, autoComplete, onInput, onChange, onValueChange, onFocus, onBlur, onKeyDown, onSelect, onCommit, formatting, labels: labelsProp, "aria-describedby": ariaDescribedBy, children, ref, ...rest }: TextareaRootProps): import("react/jsx-runtime").JSX.Element;
|
|
104
104
|
declare namespace TextareaRoot {
|
|
105
105
|
var displayName: string;
|
|
106
106
|
}
|
package/dist/icon-set.js
CHANGED
|
@@ -32,7 +32,6 @@ import {
|
|
|
32
32
|
ArrowDownRight,
|
|
33
33
|
ArrowDownZA,
|
|
34
34
|
ArrowLeft,
|
|
35
|
-
ArrowRight,
|
|
36
35
|
ArrowUpLeft,
|
|
37
36
|
ArrowUpRight,
|
|
38
37
|
AtSign,
|
|
@@ -65,7 +64,6 @@ import {
|
|
|
65
64
|
BookmarkMinus,
|
|
66
65
|
BookmarkPlus,
|
|
67
66
|
BookmarkX,
|
|
68
|
-
Bot,
|
|
69
67
|
BotMessageSquare,
|
|
70
68
|
Box,
|
|
71
69
|
Boxes,
|
|
@@ -410,17 +408,19 @@ import {
|
|
|
410
408
|
Youtube,
|
|
411
409
|
Zap,
|
|
412
410
|
ZapOff
|
|
413
|
-
} from "./chunks/chunk-
|
|
411
|
+
} from "./chunks/chunk-ZGEHB27U.js";
|
|
414
412
|
import {
|
|
415
413
|
Activity,
|
|
416
414
|
AppWindow,
|
|
417
415
|
ArrowDown,
|
|
416
|
+
ArrowRight,
|
|
418
417
|
ArrowUp,
|
|
419
418
|
ArrowUpDown,
|
|
420
419
|
Bell,
|
|
421
420
|
Bike,
|
|
422
421
|
Bold,
|
|
423
422
|
BookOpen,
|
|
423
|
+
Bot,
|
|
424
424
|
Calendar,
|
|
425
425
|
Captions,
|
|
426
426
|
ChartColumn,
|
|
@@ -531,7 +531,7 @@ import {
|
|
|
531
531
|
X,
|
|
532
532
|
ZoomIn,
|
|
533
533
|
ZoomOut
|
|
534
|
-
} from "./chunks/chunk-
|
|
534
|
+
} from "./chunks/chunk-FWL3NJYA.js";
|
|
535
535
|
export {
|
|
536
536
|
AArrowDown as AArrowDownIcon,
|
|
537
537
|
AArrowUp as AArrowUpIcon,
|
package/dist/icons/registry.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export declare const iconRegistry: {
|
|
9
9
|
readonly "nav.chevronDown": import("./glyph").Glyph;
|
|
10
10
|
readonly "nav.chevronLeft": import("./glyph").Glyph;
|
|
11
|
+
readonly "nav.arrowRight": import("./glyph").Glyph;
|
|
11
12
|
readonly "nav.chevronRight": import("./glyph").Glyph;
|
|
12
13
|
readonly "nav.chevronUp": import("./glyph").Glyph;
|
|
13
14
|
readonly "nav.chevronsLeft": import("./glyph").Glyph;
|
|
@@ -94,6 +95,7 @@ export declare const iconRegistry: {
|
|
|
94
95
|
readonly "object.fuel": import("./glyph").Glyph;
|
|
95
96
|
readonly "object.funnel": import("./glyph").Glyph;
|
|
96
97
|
readonly "object.globe": import("./glyph").Glyph;
|
|
98
|
+
readonly "object.bot": import("./glyph").Glyph;
|
|
97
99
|
readonly "object.headset": import("./glyph").Glyph;
|
|
98
100
|
readonly "object.image": import("./glyph").Glyph;
|
|
99
101
|
readonly "object.inbox": import("./glyph").Glyph;
|