@getsoren/design-system 4.79.1 → 4.80.1
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/main.cjs +57 -57
- package/dist/main.js +3196 -3183
- package/dist/src/components/DataDisplay/AiAssistant/AiAssistant.d.ts +1 -1
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantFab.d.ts +1 -1
- package/dist/src/components/DataDisplay/AiAssistant/types.d.ts +3 -1
- package/dist/src/components/DataDisplay/Chat/components/ChatConversationDetail.d.ts +1 -1
- package/dist/src/components/DataDisplay/Chat/components/ChatConversationDetailHeader.d.ts +3 -2
- package/dist/src/components/DataDisplay/Chat/components/ChatConversationList.d.ts +1 -1
- package/dist/src/components/DataDisplay/Chat/components/ChatMessageInput.d.ts +1 -1
- package/dist/src/components/DataDisplay/Chat/components/ChatParticipantDialog.d.ts +1 -1
- package/dist/src/components/DataDisplay/Chat/types.d.ts +24 -0
- package/dist/src/components/Navigation/NavigationMenu/NavLinkItem/NavLinkItem.d.ts +1 -1
- package/dist/src/components/Navigation/NavigationMenu/NavigationMenu.d.ts +12 -0
- package/dist/src/main.d.ts +8 -0
- package/dist/src/types/dataAttributes.d.ts +6 -0
- package/dist/src/utils/pickDataAttributes.d.ts +7 -0
- package/package.json +5 -13
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
declare const AiAssistant: {
|
|
8
8
|
ConfirmationCard: ({ heading, summary, details, status, onAccept, onDecline, labels, dataTestId, }: import('./types').AiAssistantConfirmationCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
9
|
EmptyState: ({ message, children }: import('./types').AiAssistantEmptyStateProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
-
Fab: ({ open, onClick, tooltip, dataTestId }: import('./types').AiAssistantFabProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
Fab: ({ open, onClick, tooltip, dataTestId, ...dataAttributes }: import('./types').AiAssistantFabProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
11
|
Header: ({ title, subtitle, onClose, icon }: import('./types').AiAssistantHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
12
|
Nudge: ({ open, title, onClose, content, children, activeStep, onStepChange, labels, dataTestId, }: import('./types').AiAssistantNudgeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
13
|
Panel: ({ open, isBusy, children, dataTestId }: import('./types').AiAssistantPanelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -6,5 +6,5 @@ import { AiAssistantFabProps } from '../types';
|
|
|
6
6
|
* the panel is open. The animations live on a ::before layer so the hit-box never
|
|
7
7
|
* moves (reliable clicks, stable e2e).
|
|
8
8
|
*/
|
|
9
|
-
declare const AiAssistantFab: ({ open, onClick, tooltip, dataTestId }: AiAssistantFabProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const AiAssistantFab: ({ open, onClick, tooltip, dataTestId, ...dataAttributes }: AiAssistantFabProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default AiAssistantFab;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { DataAttributes } from '../../../types/dataAttributes';
|
|
3
|
+
/** Extra `data-*` props (e.g. an analytics feature id) land on the FAB button itself */
|
|
4
|
+
export interface AiAssistantFabProps extends DataAttributes {
|
|
3
5
|
/** Panel visibility — the FAB shows a close glyph and calms down when open */
|
|
4
6
|
open: boolean;
|
|
5
7
|
/** Toggles the panel — the FAB never owns the open state, the host app does */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ChatConversationDetailProps } from '../types';
|
|
2
|
-
declare const ChatConversationDetail: ({ threadId, participants, isLoading, messages, currentUserId, onDeleteConversation, onNewConversation, onSendMessage, onAddParticipants, onSearchParticipants, searchResults, isSearchingParticipants, avatarSrcResolver, renderAfterBubble, labels, formatDayLabel, isSending, formatParticipantName, headerAction, defaultMessage, onAddParticipantDialogOpenChange, messageMaxLength, }: ChatConversationDetailProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const ChatConversationDetail: ({ threadId, participants, isLoading, messages, currentUserId, onDeleteConversation, onNewConversation, onSendMessage, onAddParticipants, onSearchParticipants, searchResults, isSearchingParticipants, avatarSrcResolver, renderAfterBubble, labels, formatDayLabel, isSending, formatParticipantName, headerAction, defaultMessage, onAddParticipantDialogOpenChange, messageMaxLength, slotProps, }: ChatConversationDetailProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ChatConversationDetail;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ChatConversationDetailLabels, ChatParticipant, ChatSearchUser } from '../types';
|
|
2
|
+
import { ChatConversationDetailLabels, ChatConversationDetailSlotProps, ChatParticipant, ChatSearchUser } from '../types';
|
|
3
3
|
interface ChatConversationDetailHeaderProps {
|
|
4
4
|
threadId: string;
|
|
5
5
|
participants?: ChatParticipant[] | null;
|
|
@@ -13,6 +13,7 @@ interface ChatConversationDetailHeaderProps {
|
|
|
13
13
|
formatParticipantName?: (participant: ChatParticipant) => string;
|
|
14
14
|
headerAction?: ReactNode;
|
|
15
15
|
onAddParticipantDialogOpenChange?: (open: boolean) => void;
|
|
16
|
+
slotProps?: Pick<ChatConversationDetailSlotProps, "addParticipantsButton">;
|
|
16
17
|
}
|
|
17
|
-
declare const ChatConversationDetailHeader: ({ threadId, participants, onDeleteConversation, onAddParticipants, onSearchParticipants, searchResults, isSearchingParticipants, avatarSrcResolver, labels, formatParticipantName, headerAction, onAddParticipantDialogOpenChange, }: ChatConversationDetailHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare const ChatConversationDetailHeader: ({ threadId, participants, onDeleteConversation, onAddParticipants, onSearchParticipants, searchResults, isSearchingParticipants, avatarSrcResolver, labels, formatParticipantName, headerAction, onAddParticipantDialogOpenChange, slotProps, }: ChatConversationDetailHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
19
|
export default ChatConversationDetailHeader;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ChatConversationListProps } from '../types';
|
|
2
|
-
declare const ChatConversationList: ({ threads, isLoading, selectedThreadId, onSelectThread, onNewConversation, avatarSrcResolver, labels, formatDate, formatParticipantName, onLoadMore, hasMore, }: ChatConversationListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const ChatConversationList: ({ threads, isLoading, selectedThreadId, onSelectThread, onNewConversation, avatarSrcResolver, labels, formatDate, formatParticipantName, onLoadMore, hasMore, slotProps, }: ChatConversationListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ChatConversationList;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ChatMessageInputProps } from '../types';
|
|
2
|
-
declare const ChatMessageInput: ({ onSend, labels, autoFocusKey, isSending, defaultMessage,
|
|
2
|
+
declare const ChatMessageInput: ({ onSend, labels, autoFocusKey, isSending, defaultMessage, startActions, slotProps, maxLength, }: ChatMessageInputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ChatMessageInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ChatParticipantDialogProps } from '../types';
|
|
2
|
-
declare const ChatParticipantDialog: ({ open, onClose, onConfirm, onSearch, searchResults, isSearchLoading, isConfirmLoading, avatarSrcResolver, labels, }: ChatParticipantDialogProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const ChatParticipantDialog: ({ open, onClose, onConfirm, onSearch, searchResults, isSearchLoading, isConfirmLoading, avatarSrcResolver, labels, slotProps, }: ChatParticipantDialogProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ChatParticipantDialog;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { DataAttributes } from '../../../types/dataAttributes';
|
|
2
3
|
export interface ChatMessage {
|
|
3
4
|
id: string | number;
|
|
4
5
|
authorId: string;
|
|
@@ -56,6 +57,10 @@ export interface ChatParticipantDialogLabels {
|
|
|
56
57
|
searchContacts?: string;
|
|
57
58
|
noOptionsText?: string;
|
|
58
59
|
}
|
|
60
|
+
/** `data-*` attributes forwarded to the conversation list's inner controls */
|
|
61
|
+
export interface ChatConversationListSlotProps {
|
|
62
|
+
newConversationButton?: DataAttributes;
|
|
63
|
+
}
|
|
59
64
|
export interface ChatConversationListProps {
|
|
60
65
|
threads?: ChatThread[];
|
|
61
66
|
isLoading?: boolean;
|
|
@@ -68,6 +73,14 @@ export interface ChatConversationListProps {
|
|
|
68
73
|
formatParticipantName?: (participant: ChatParticipant) => string;
|
|
69
74
|
onLoadMore?: () => void;
|
|
70
75
|
hasMore?: boolean;
|
|
76
|
+
slotProps?: ChatConversationListSlotProps;
|
|
77
|
+
}
|
|
78
|
+
/** `data-*` attributes forwarded to the conversation detail's inner controls */
|
|
79
|
+
export interface ChatConversationDetailSlotProps {
|
|
80
|
+
addParticipantsButton?: DataAttributes;
|
|
81
|
+
/** The empty-state CTA shown while no thread is selected */
|
|
82
|
+
newConversationButton?: DataAttributes;
|
|
83
|
+
sendButton?: DataAttributes;
|
|
71
84
|
}
|
|
72
85
|
export interface ChatConversationDetailProps {
|
|
73
86
|
threadId?: string;
|
|
@@ -92,6 +105,7 @@ export interface ChatConversationDetailProps {
|
|
|
92
105
|
defaultMessage?: string;
|
|
93
106
|
onAddParticipantDialogOpenChange?: (open: boolean) => void;
|
|
94
107
|
messageMaxLength?: number;
|
|
108
|
+
slotProps?: ChatConversationDetailSlotProps;
|
|
95
109
|
}
|
|
96
110
|
export interface ChatMessageBubbleProps {
|
|
97
111
|
isOwn: boolean;
|
|
@@ -102,6 +116,10 @@ export interface ChatMessageBubbleProps {
|
|
|
102
116
|
formatTime?: (date: string) => string;
|
|
103
117
|
hideAvatar?: boolean;
|
|
104
118
|
}
|
|
119
|
+
/** `data-*` attributes forwarded to the message input's inner controls */
|
|
120
|
+
export interface ChatMessageInputSlotProps {
|
|
121
|
+
sendButton?: DataAttributes;
|
|
122
|
+
}
|
|
105
123
|
export interface ChatMessageInputProps {
|
|
106
124
|
onSend: (message: string) => void;
|
|
107
125
|
labels?: ChatMessageInputLabels;
|
|
@@ -111,6 +129,7 @@ export interface ChatMessageInputProps {
|
|
|
111
129
|
maxLength?: number;
|
|
112
130
|
/** Rendered on the left of the bottom bar, facing the send button (e.g. ChatVoiceRecorder) */
|
|
113
131
|
startActions?: ReactNode;
|
|
132
|
+
slotProps?: ChatMessageInputSlotProps;
|
|
114
133
|
}
|
|
115
134
|
export interface ChatVoiceRecorderLabels {
|
|
116
135
|
record?: string;
|
|
@@ -153,6 +172,10 @@ export interface ChatVoiceRecorderProps {
|
|
|
153
172
|
*/
|
|
154
173
|
labels?: ChatVoiceRecorderLabels;
|
|
155
174
|
}
|
|
175
|
+
/** `data-*` attributes forwarded to the participant dialog's inner controls */
|
|
176
|
+
export interface ChatParticipantDialogSlotProps {
|
|
177
|
+
confirmButton?: DataAttributes;
|
|
178
|
+
}
|
|
156
179
|
export interface ChatParticipantDialogProps {
|
|
157
180
|
open: boolean;
|
|
158
181
|
onClose: () => void;
|
|
@@ -163,4 +186,5 @@ export interface ChatParticipantDialogProps {
|
|
|
163
186
|
isConfirmLoading?: boolean;
|
|
164
187
|
avatarSrcResolver?: (src?: string | null) => string | undefined;
|
|
165
188
|
labels?: ChatParticipantDialogLabels;
|
|
189
|
+
slotProps?: ChatParticipantDialogSlotProps;
|
|
166
190
|
}
|
|
@@ -6,5 +6,5 @@ interface NavLinkItemProps extends Omit<ObjectNavigationItem, "label"> {
|
|
|
6
6
|
onClick?: (event?: MouseEvent) => void;
|
|
7
7
|
target?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const NavLinkItem: ({ url, end, children, active, state, component, disabled, onClick, target }: NavLinkItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const NavLinkItem: ({ url, end, children, active, state, component, disabled, onClick, target, ...rest }: NavLinkItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default NavLinkItem;
|
|
@@ -61,6 +61,10 @@ export type ObjectNavigationItem = {
|
|
|
61
61
|
* Target attribute of the link (e.g. "_blank")
|
|
62
62
|
*/
|
|
63
63
|
target?: string;
|
|
64
|
+
/**
|
|
65
|
+
* `data-*` attributes set on the rendered link element (analytics tags, test hooks), e.g. `"data-amp-track-feature"`
|
|
66
|
+
*/
|
|
67
|
+
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
64
68
|
};
|
|
65
69
|
export type NavigationGroupItem = {
|
|
66
70
|
/**
|
|
@@ -128,6 +132,10 @@ export interface BottomLinkProps {
|
|
|
128
132
|
* Target attribute of the link (e.g. "_blank")
|
|
129
133
|
*/
|
|
130
134
|
target?: string;
|
|
135
|
+
/**
|
|
136
|
+
* `data-*` attributes set on the rendered link element (analytics tags, test hooks), e.g. `"data-amp-track-feature"`
|
|
137
|
+
*/
|
|
138
|
+
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
131
139
|
}
|
|
132
140
|
export interface NavLinkProps {
|
|
133
141
|
/**
|
|
@@ -164,6 +172,10 @@ export interface NavLinkProps {
|
|
|
164
172
|
* Target attribute of the link (e.g. "_blank")
|
|
165
173
|
*/
|
|
166
174
|
target?: string;
|
|
175
|
+
/**
|
|
176
|
+
* `data-*` attributes written on the navigation item; a router link spreads them on its `<a>`
|
|
177
|
+
*/
|
|
178
|
+
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
167
179
|
}
|
|
168
180
|
export type NavigationItem = ObjectNavigationItem | NavigationGroupItem | ReactNode;
|
|
169
181
|
export interface NavigationMenuProps {
|
package/dist/src/main.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public entry point of the design system.
|
|
3
|
+
*
|
|
4
|
+
* One block per category, alphabetical inside a block. A component ships as a pair: `export *` for its named
|
|
5
|
+
* exports (props types, helpers) and `export { default as X }` for the component itself.
|
|
6
|
+
*/
|
|
1
7
|
export * from '@mui/material';
|
|
2
8
|
export * from '@mui/material/transitions';
|
|
3
9
|
export { default as AiAssistant } from './components/DataDisplay/AiAssistant/AiAssistant';
|
|
@@ -127,8 +133,10 @@ export * from './hooks/useSnackbar';
|
|
|
127
133
|
export { default as useSnackbar } from './hooks/useSnackbar';
|
|
128
134
|
export * from './hooks/useTabs';
|
|
129
135
|
export { default as useTabs } from './hooks/useTabs';
|
|
136
|
+
export type { DataAttributes } from './types/dataAttributes';
|
|
130
137
|
export * from './utils/getBackgroundImageElevation';
|
|
131
138
|
export { default as getBackgroundImageElevation } from './utils/getBackgroundImageElevation';
|
|
132
139
|
export { default as isoToEmojiFlag } from './utils/isoToEmojiFlag';
|
|
140
|
+
export { default as pickDataAttributes } from './utils/pickDataAttributes';
|
|
133
141
|
export * from './utils/pxToRem';
|
|
134
142
|
export { default as pxToRem } from './utils/pxToRem';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `data-*` attributes forwarded verbatim to a DOM element: analytics tags (e.g. `data-amp-track-feature`),
|
|
3
|
+
* test hooks, onboarding anchors. Only `data-` keys are accepted, so a slot can carry tracking metadata
|
|
4
|
+
* without being able to override handlers, styles or accessibility attributes.
|
|
5
|
+
*/
|
|
6
|
+
export type DataAttributes = Record<`data-${string}`, string | number | boolean | undefined>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataAttributes } from '../types/dataAttributes';
|
|
2
|
+
/**
|
|
3
|
+
* Extracts the `data-*` entries of a props/config object, e.g. to forward analytics tags or test hooks
|
|
4
|
+
* from a navigation item to the DOM node it renders while the other keys stay on the component.
|
|
5
|
+
*/
|
|
6
|
+
declare const pickDataAttributes: (source: object) => DataAttributes;
|
|
7
|
+
export default pickDataAttributes;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@getsoren/design-system",
|
|
3
3
|
"description": "Design System React library",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.80.1",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"types": "./dist/src/main.d.ts",
|
|
@@ -50,38 +50,30 @@
|
|
|
50
50
|
"release": "commit-and-tag-version"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@
|
|
53
|
+
"@getsoren/biome-config-react": "^1.4.1",
|
|
54
54
|
"@storybook/addon-docs": "^10.2.15",
|
|
55
55
|
"@storybook/addon-links": "^10.2.15",
|
|
56
|
-
"@storybook/addon-onboarding": "^10.2.15",
|
|
57
56
|
"@storybook/builder-vite": "^10.2.15",
|
|
58
57
|
"@storybook/react-vite": "^10.2.15",
|
|
59
|
-
"@storybook/testing-library": "^0.2.2",
|
|
60
58
|
"@testing-library/jest-dom": "^5.17.0",
|
|
61
59
|
"@testing-library/react": "^14.0.0",
|
|
62
|
-
"@
|
|
63
|
-
"@testing-library/user-event": "^14.4.3",
|
|
64
|
-
"@getsoren/biome-config-react": "^1.4.1",
|
|
65
|
-
"@types/node": "^18.19.61",
|
|
60
|
+
"@types/node": "^22",
|
|
66
61
|
"@types/react": "^19.1.0",
|
|
67
62
|
"@types/react-dom": "^19.1.0",
|
|
68
63
|
"@types/react-window": "^1.8.8",
|
|
69
64
|
"@vitejs/plugin-react": "^6.0.1",
|
|
70
65
|
"@vitest/ui": "^0.34.4",
|
|
71
|
-
"babel-loader": "^9.1.3",
|
|
72
66
|
"chromatic": "^13.3.0",
|
|
67
|
+
"commit-and-tag-version": "^12.6.0",
|
|
73
68
|
"husky": "^8.0.3",
|
|
74
69
|
"jsdom": "^22.1.0",
|
|
75
70
|
"react": "^19.0.0",
|
|
76
71
|
"react-dom": "^19.0.0",
|
|
77
|
-
"react-test-renderer": "^19.0.0",
|
|
78
|
-
"sass": "^1.80.5",
|
|
79
72
|
"storybook": "^10.2.15",
|
|
80
73
|
"typescript": "^5.8.3",
|
|
81
74
|
"unplugin-dts": "^1.0.1",
|
|
82
75
|
"vite": "8.0.14",
|
|
83
|
-
"vitest": "^1.6.1"
|
|
84
|
-
"commit-and-tag-version": "^12.6.0"
|
|
76
|
+
"vitest": "^1.6.1"
|
|
85
77
|
},
|
|
86
78
|
"dependencies": {
|
|
87
79
|
"@emotion/react": "^11.0.0",
|