@ssa-ui-kit/core 3.0.0 → 3.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/components/Button/Button.d.ts +8 -8
- package/dist/components/Button/types.d.ts +12 -8
- package/dist/components/Chip/constants.d.ts +7 -0
- package/dist/components/Chip/helpers.d.ts +1 -1
- package/dist/components/Chip/styles.d.ts +4 -0
- package/dist/components/CollapsibleNavBar/CollapsibleNavBar.d.ts +1 -1
- package/dist/components/CollapsibleNavBar/types.d.ts +13 -0
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/types.d.ts +33 -1
- package/dist/components/DropdownOption/DropdownOption.d.ts +2 -0
- package/dist/components/DropdownToggle/DropdownToggle.d.ts +2 -1
- package/dist/components/DropdownToggle/types.d.ts +5 -3
- package/dist/components/Icon/icons/Assessment.d.ts +1 -1
- package/dist/components/Icon/icons/Award.d.ts +3 -0
- package/dist/components/Icon/icons/Bench.d.ts +3 -0
- package/dist/components/Icon/icons/Briefcase.d.ts +3 -0
- package/dist/components/Icon/icons/Building.d.ts +3 -0
- package/dist/components/Icon/icons/CalendarSchedule.d.ts +3 -0
- package/dist/components/Icon/icons/Camera.d.ts +3 -0
- package/dist/components/Icon/icons/CardText.d.ts +3 -0
- package/dist/components/Icon/icons/Case.d.ts +3 -0
- package/dist/components/Icon/icons/Comments.d.ts +3 -0
- package/dist/components/Icon/icons/Compensation.d.ts +3 -0
- package/dist/components/Icon/icons/Contacts.d.ts +3 -0
- package/dist/components/Icon/icons/CopyLink.d.ts +3 -0
- package/dist/components/Icon/icons/Delete.d.ts +3 -0
- package/dist/components/Icon/icons/DiamondRing.d.ts +3 -0
- package/dist/components/Icon/icons/Document.d.ts +3 -0
- package/dist/components/Icon/icons/Documents.d.ts +3 -0
- package/dist/components/Icon/icons/Education.d.ts +3 -0
- package/dist/components/Icon/icons/EmployeeBlackboard.d.ts +3 -0
- package/dist/components/Icon/icons/EmployeeProfile.d.ts +3 -0
- package/dist/components/Icon/icons/Export.d.ts +3 -0
- package/dist/components/Icon/icons/FileMark.d.ts +3 -0
- package/dist/components/Icon/icons/FilePdf.d.ts +3 -0
- package/dist/components/Icon/icons/FileWord.d.ts +3 -0
- package/dist/components/Icon/icons/FollowLink.d.ts +3 -0
- package/dist/components/Icon/icons/Form.d.ts +3 -0
- package/dist/components/Icon/icons/Gender.d.ts +3 -0
- package/dist/components/Icon/icons/Gift.d.ts +3 -0
- package/dist/components/Icon/icons/Inventory.d.ts +3 -0
- package/dist/components/Icon/icons/Link.d.ts +3 -0
- package/dist/components/Icon/icons/OfficeChair.d.ts +3 -0
- package/dist/components/Icon/icons/OpenBook.d.ts +3 -0
- package/dist/components/Icon/icons/Report.d.ts +1 -1
- package/dist/components/Icon/icons/Results.d.ts +3 -0
- package/dist/components/Icon/icons/Signature.d.ts +3 -0
- package/dist/components/Icon/icons/Summery.d.ts +3 -0
- package/dist/components/Icon/icons/Team.d.ts +3 -0
- package/dist/components/Icon/icons/TechnicalReview.d.ts +3 -0
- package/dist/components/Icon/icons/TennisBall.d.ts +3 -0
- package/dist/components/Icon/icons/Timeline.d.ts +3 -0
- package/dist/components/Icon/icons/UnionCircle.d.ts +3 -0
- package/dist/components/Icon/icons/Url.d.ts +3 -0
- package/dist/components/Icon/icons/all.d.ts +40 -1
- package/dist/components/Icon/icons/iconsList.d.ts +1 -1
- package/dist/components/MultipleDropdown/index.d.ts +1 -0
- package/dist/components/MultipleDropdown/types.d.ts +83 -0
- package/dist/components/PersonInfo/PersonInfo.d.ts +78 -0
- package/dist/components/PersonInfo/PersonInfoAvatar.d.ts +6 -0
- package/dist/components/PersonInfo/PersonInfoBadges.d.ts +6 -0
- package/dist/components/PersonInfo/PersonInfoCounter.d.ts +6 -0
- package/dist/components/PersonInfo/PersonInfoIcon.d.ts +5 -0
- package/dist/components/PersonInfo/PersonInfoValue.d.ts +5 -0
- package/dist/components/PersonInfo/constants.d.ts +5 -0
- package/dist/components/PersonInfo/helpers.d.ts +5 -0
- package/dist/components/PersonInfo/index.d.ts +4 -0
- package/dist/components/PersonInfo/types.d.ts +54 -0
- package/dist/components/Textarea/TextareaBase.d.ts +6 -1
- package/dist/components/Textarea/types.d.ts +14 -0
- package/dist/components/Typeahead/styles.d.ts +1 -1
- package/dist/index.js +2109 -287
- package/dist/index.js.map +1 -1
- package/dist/types/emotion.d.ts +3 -1
- package/package.json +3 -3
- package/dist/components/Icon/icons/Company.d.ts +0 -3
|
@@ -1,18 +1,101 @@
|
|
|
1
1
|
import { DropdownOptionProps } from '../DropdownOptions/types';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the MultipleDropdown component
|
|
4
|
+
*
|
|
5
|
+
* A dropdown that supports selecting one or more options from a list.
|
|
6
|
+
* In multi-select mode (`isMultiple=true`) options toggle independently and
|
|
7
|
+
* a `+N` badge is shown for overflow. In single-select mode the menu closes
|
|
8
|
+
* after a pick. Forwards its ref to the root container div.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <MultipleDropdown
|
|
13
|
+
* label="Fruits"
|
|
14
|
+
* selectedItems={[{ value: 'apple' }]}
|
|
15
|
+
* onChange={(value, isSelected) => handleChange(value, isSelected)}
|
|
16
|
+
* >
|
|
17
|
+
* <DropdownOption value="apple">Apple</DropdownOption>
|
|
18
|
+
* <DropdownOption value="banana">Banana</DropdownOption>
|
|
19
|
+
* </MultipleDropdown>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
2
22
|
export type DropdownProps<P extends DropdownOptionProps> = {
|
|
23
|
+
/**
|
|
24
|
+
* List of currently selected items
|
|
25
|
+
* Each entry must match one of the DropdownOption values
|
|
26
|
+
* @default []
|
|
27
|
+
*/
|
|
3
28
|
selectedItems?: P[];
|
|
29
|
+
/**
|
|
30
|
+
* Enables multi-select mode — each option toggles independently.
|
|
31
|
+
* When `false` the dropdown behaves like a single-select and closes on pick.
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
4
34
|
isMultiple?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Disables the dropdown, preventing any user interaction
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
5
39
|
isDisabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Placeholder shown in the toggle button when no item is selected
|
|
42
|
+
* @default 'Select something'
|
|
43
|
+
*/
|
|
6
44
|
placeholder?: string;
|
|
45
|
+
/**
|
|
46
|
+
* When `true` the placeholder value is included in the displayed list.
|
|
47
|
+
* Set to `false` to hide it and show only the badge count.
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
7
50
|
showPlaceholder?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* DropdownOption components to render as selectable items
|
|
53
|
+
*/
|
|
8
54
|
children?: React.ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* Custom CSS class name forwarded to the toggle button.
|
|
57
|
+
* Useful for styling via `styled(MultipleDropdown)`.
|
|
58
|
+
*/
|
|
9
59
|
className?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Controlled open state — when provided, overrides internal open/close logic
|
|
62
|
+
*/
|
|
10
63
|
isOpen?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Label prefix shown in the toggle button before the selected value(s)
|
|
66
|
+
* e.g. `label="Strategy"` renders "Strategy: Value"
|
|
67
|
+
*/
|
|
11
68
|
label?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Callback fired when an option is toggled
|
|
71
|
+
* @param selectedItem - The value of the toggled option
|
|
72
|
+
* @param isSelected - `true` if the option was just selected, `false` if deselected
|
|
73
|
+
*/
|
|
12
74
|
onChange?: (selectedItem: string | number, isSelected: boolean) => void;
|
|
75
|
+
/**
|
|
76
|
+
* Max height (px) of the options list; overflow scrolls.
|
|
77
|
+
* @default 200
|
|
78
|
+
*/
|
|
79
|
+
maxHeight?: number;
|
|
13
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* Context value shared with child DropdownOption components via MultipleDropdownContext
|
|
83
|
+
*/
|
|
14
84
|
export interface DropdownContextType<T extends DropdownOptionProps> {
|
|
85
|
+
/**
|
|
86
|
+
* Function called when an option is clicked
|
|
87
|
+
*/
|
|
15
88
|
onChange: (item: T) => void;
|
|
89
|
+
/**
|
|
90
|
+
* Whether multi-select mode is active
|
|
91
|
+
*/
|
|
16
92
|
isMultiple?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Map of all option values to their current state (including `isSelected`)
|
|
95
|
+
*/
|
|
17
96
|
allItems: Record<string | number, T>;
|
|
97
|
+
/**
|
|
98
|
+
* Max height (px) of the options list
|
|
99
|
+
*/
|
|
100
|
+
maxHeight?: number;
|
|
18
101
|
}
|
|
@@ -1,3 +1,81 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PersonInfoProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* PersonInfo - Compact row for displaying a person or entity with title, value, and optional metadata.
|
|
5
|
+
*
|
|
6
|
+
* Uses `theme.colors` only (e.g. greyDropdownFocused, greyDarker, blue for link hover). Does not use
|
|
7
|
+
* `theme.palette`. Link and value hover use theme.colors.blue. Badge colors come from BADGE_COLORS(theme).
|
|
8
|
+
*
|
|
9
|
+
* ### Structure
|
|
10
|
+
* - Optional leading icon (name or custom ReactNode)
|
|
11
|
+
* - Title (required) and a row with: optional avatar + value (optionally a link), optional counter with tooltip
|
|
12
|
+
* - Optional badges (Badge components or strings)
|
|
13
|
+
* - Optional attributes list (strings or ReactNodes)
|
|
14
|
+
* - Optional description text
|
|
15
|
+
*
|
|
16
|
+
* ### Key props
|
|
17
|
+
* - `title` (required) — main label
|
|
18
|
+
* - `value` — primary value; use with `link` / `openLinkInNewTab` for a clickable value
|
|
19
|
+
* - `icon` — Icon name or custom node before the title
|
|
20
|
+
* - `avatar` — image URL; shown next to value
|
|
21
|
+
* - `badges` — ReactNode or array of ReactNode/string; rendered as badges below the row
|
|
22
|
+
* - `counterTooltip` — { users: [{ id, name, avatar, link?, openLinkInNewTab? }] } for a count + tooltip
|
|
23
|
+
* - `attributes` — array of strings or ReactNodes below the row
|
|
24
|
+
* - `description` — extra text block
|
|
25
|
+
* - `styles` — optional overrides for title, avatarName, counter, attributes, badge, badgeItem, value, description
|
|
26
|
+
*
|
|
27
|
+
* @category Components
|
|
28
|
+
* @subcategory Display
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <PersonInfo title="Assignee" value="John Doe" />
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <PersonInfo
|
|
38
|
+
* title="Owner"
|
|
39
|
+
* value="Jane Smith"
|
|
40
|
+
* icon="user"
|
|
41
|
+
* avatar="/avatar.jpg"
|
|
42
|
+
* link="/users/jane"
|
|
43
|
+
* openLinkInNewTab={false}
|
|
44
|
+
* />
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <PersonInfo
|
|
50
|
+
* title="Status"
|
|
51
|
+
* value="In progress"
|
|
52
|
+
* badges={[<Badge key="1">Active</Badge>]}
|
|
53
|
+
* attributes={['Due: Jan 15', 'Priority: High']}
|
|
54
|
+
* description="Additional context text."
|
|
55
|
+
* />
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <PersonInfo
|
|
61
|
+
* title="Participants"
|
|
62
|
+
* value="3"
|
|
63
|
+
* counterTooltip={{
|
|
64
|
+
* users: [
|
|
65
|
+
* { id: 1, name: 'Alice', avatar: '/a.jpg', link: '/users/1' },
|
|
66
|
+
* { id: 2, name: 'Bob', avatar: '/b.jpg' },
|
|
67
|
+
* ],
|
|
68
|
+
* }}
|
|
69
|
+
* />
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @see {@link Avatar} - Often used for avatar prop or inside counter tooltip
|
|
73
|
+
* @see {@link Icon} - Common choice for icon prop
|
|
74
|
+
* @see {@link Badge} - Used when badges prop contains Badge components
|
|
75
|
+
*
|
|
76
|
+
* @accessibility
|
|
77
|
+
* - Semantic structure (heading-like title, list of attributes)
|
|
78
|
+
* - Links support openLinkInNewTab and get appropriate attributes
|
|
79
|
+
* - Counter tooltip is focusable and keyboard-accessible via Tooltip
|
|
80
|
+
*/
|
|
3
81
|
export declare const PersonInfo: React.ForwardRefExoticComponent<PersonInfoProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PersonInfoAvatar - Avatar + value row for PersonInfo.
|
|
3
|
+
* Renders optional Avatar (image URL) and PersonInfoValue. When link is set, wraps in anchor
|
|
4
|
+
* using helpers.getLinkAttributes; link hover uses theme.colors.blue (avatarWrapperLinkStyles).
|
|
5
|
+
* Uses styles.avatarName when avatar present, styles.value when only value. Used only by PersonInfo.
|
|
6
|
+
*/
|
|
1
7
|
import React from 'react';
|
|
2
8
|
import { PersonInfoAvatarProps } from './types';
|
|
3
9
|
export declare const PersonInfoAvatar: React.FC<PersonInfoAvatarProps>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PersonInfoBadges - Badge row for PersonInfo.
|
|
3
|
+
* badges can be a single ReactNode or array of string | ReactNode. Strings are rendered with
|
|
4
|
+
* CustomBadge using DEFAULT_BADGE_COLORS (cycled by index) and BADGE_COLORS(theme) for text/bg.
|
|
5
|
+
* Other items rendered as-is (e.g. <Badge>). Uses styles.badge and styles.badgeItem.
|
|
6
|
+
*/
|
|
1
7
|
import React from 'react';
|
|
2
8
|
import { PersonInfoStyles } from './types';
|
|
3
9
|
interface PersonInfoBadgesProps {
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PersonInfoCounter - “+N” counter with tooltip for PersonInfo.
|
|
3
|
+
* Renders counter value from counterTooltip.users.length; tooltip lists users via ImageItem
|
|
4
|
+
* (image, name, optional link). Uses Tooltip (hover, no click). Counter text uses
|
|
5
|
+
* theme.colors.greyDropdownFocused (S.Counter). Used only by PersonInfo when counterTooltip is set.
|
|
6
|
+
*/
|
|
1
7
|
import React from 'react';
|
|
2
8
|
import { PersonInfoCounterProps } from './types';
|
|
3
9
|
export declare const PersonInfoCounter: React.FC<PersonInfoCounterProps>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PersonInfoIcon - Leading icon for PersonInfo row.
|
|
3
|
+
* Renders Icon with theme.colors.greyDarker when icon is a string; otherwise renders custom ReactNode.
|
|
4
|
+
* Used only by PersonInfo when icon prop is set.
|
|
5
|
+
*/
|
|
1
6
|
import React from 'react';
|
|
2
7
|
import type { IconProps } from '../Icon/types';
|
|
3
8
|
interface PersonInfoIconProps {
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PersonInfoValue - Primary value cell for PersonInfo, optionally a link.
|
|
3
|
+
* When linkAttributes (from getLinkAttributes) are provided, renders as <a> with
|
|
4
|
+
* personInfoValueLinkStyles: theme.colors.greyDarker, hover theme.colors.blue. Used by PersonInfoAvatar.
|
|
5
|
+
*/
|
|
1
6
|
import React from 'react';
|
|
2
7
|
import { PersonInfoValueProps } from './types';
|
|
3
8
|
export declare const PersonInfoValue: React.FC<PersonInfoValueProps>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PersonInfo badge color config. Uses theme.colors only (no palette).
|
|
3
|
+
* DEFAULT_BADGE_COLORS: order of MainColors keys used when badges are strings (cycled by index).
|
|
4
|
+
* BADGE_COLORS(theme): map of MainColors key → { text, bg } using theme.colors.* and theme.colors.*20.
|
|
5
|
+
*/
|
|
1
6
|
import type { Theme } from '@emotion/react';
|
|
2
7
|
type BadgeColorName = keyof MainColors;
|
|
3
8
|
export declare const DEFAULT_BADGE_COLORS: Array<keyof MainColors>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns link props for PersonInfo value/avatar when link is set.
|
|
3
|
+
* For AI: used by PersonInfoAvatar and PersonInfoValue. Returns { as: 'a', href, target?, rel? }
|
|
4
|
+
* when link is truthy; otherwise {}. openLinkInNewTab sets target="_blank" and rel="noreferrer".
|
|
5
|
+
*/
|
|
1
6
|
export declare const getLinkAttributes: (link?: string, openLinkInNewTab?: boolean) => {
|
|
2
7
|
as: "a";
|
|
3
8
|
href: string | undefined;
|
|
@@ -3,8 +3,16 @@ import { Interpolation, Theme } from '@emotion/react';
|
|
|
3
3
|
import { CommonProps } from '../../types/emotion';
|
|
4
4
|
import { IconProps } from '../Icon/types';
|
|
5
5
|
import { getLinkAttributes } from './helpers';
|
|
6
|
+
/**
|
|
7
|
+
* Style keys that can be overridden via PersonInfoProps.styles.
|
|
8
|
+
* All PersonInfo sub-components accept optional css from this map.
|
|
9
|
+
*/
|
|
6
10
|
type PersonInfoStyleKeys = 'title' | 'avatarName' | 'counter' | 'attributes' | 'badge' | 'badgeItem' | 'value' | 'description';
|
|
7
11
|
export type PersonInfoStyles = Partial<Record<PersonInfoStyleKeys, Interpolation<Theme>>>;
|
|
12
|
+
/**
|
|
13
|
+
* Single user entry for the counter tooltip list.
|
|
14
|
+
* Used by PersonInfoCounter; avatar is image URL, link opens in same/new tab per openLinkInNewTab.
|
|
15
|
+
*/
|
|
8
16
|
export interface PersonInfoCounterTooltipUser {
|
|
9
17
|
id: string | number;
|
|
10
18
|
name: string;
|
|
@@ -12,28 +20,70 @@ export interface PersonInfoCounterTooltipUser {
|
|
|
12
20
|
link?: string;
|
|
13
21
|
openLinkInNewTab?: boolean;
|
|
14
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Tooltip payload for the “+N” counter next to the value.
|
|
25
|
+
* users array is rendered as a list inside the tooltip (e.g. via ImageItem).
|
|
26
|
+
*/
|
|
15
27
|
export interface PersonInfoCounterTooltip {
|
|
16
28
|
users: PersonInfoCounterTooltipUser[];
|
|
17
29
|
}
|
|
18
30
|
export type PersonInfoLinkAttributes = ReturnType<typeof getLinkAttributes>;
|
|
31
|
+
/**
|
|
32
|
+
* Props for the value sub-component (avatar row value, optionally a link).
|
|
33
|
+
* linkAttributes come from helpers.getLinkAttributes(link, openLinkInNewTab).
|
|
34
|
+
*/
|
|
19
35
|
export interface PersonInfoValueProps {
|
|
20
36
|
value: string;
|
|
21
37
|
css?: Interpolation<Theme>;
|
|
22
38
|
linkAttributes?: PersonInfoLinkAttributes;
|
|
23
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Props for the PersonInfo component.
|
|
42
|
+
* Uses theme.colors only (no theme.palette). See PersonInfo.tsx JSDoc for structure and examples.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* <PersonInfo title="Assignee" value="John Doe" />
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <PersonInfo title="Owner" value="Jane" avatar="/j.jpg" link="/users/jane" />
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* <PersonInfo title="Status" value="3" counterTooltip={{ users: [...] }} />
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
24
59
|
export interface PersonInfoProps extends CommonProps {
|
|
60
|
+
/** Main label (required). */
|
|
25
61
|
title: string;
|
|
62
|
+
/** Icon name or custom ReactNode before the title. */
|
|
26
63
|
icon?: IconProps['name'] | ReactNode;
|
|
64
|
+
/** Primary value; with link becomes a link. */
|
|
27
65
|
value?: string;
|
|
66
|
+
/** Badge(s): single node or array of string | ReactNode. Strings use DEFAULT_BADGE_COLORS. */
|
|
28
67
|
badges?: ReactNode | (string | ReactNode)[];
|
|
68
|
+
/** Avatar image URL, shown next to value. */
|
|
29
69
|
avatar?: string;
|
|
70
|
+
/** “+N” counter with tooltip listing users. */
|
|
30
71
|
counterTooltip?: PersonInfoCounterTooltip;
|
|
72
|
+
/** List of strings or ReactNodes below the row. */
|
|
31
73
|
attributes?: (string | ReactNode)[];
|
|
74
|
+
/** Extra description text. */
|
|
32
75
|
description?: string;
|
|
76
|
+
/** Optional style overrides per PersonInfoStyleKeys. */
|
|
33
77
|
styles?: PersonInfoStyles;
|
|
78
|
+
/** If set, value (or avatar+value) renders as a link. */
|
|
34
79
|
link?: string;
|
|
80
|
+
/** When link is set, open in new tab and use rel="noreferrer". */
|
|
35
81
|
openLinkInNewTab?: boolean;
|
|
36
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Props for PersonInfoAvatar (value + optional avatar, optional link).
|
|
85
|
+
* Used internally by PersonInfo.
|
|
86
|
+
*/
|
|
37
87
|
export interface PersonInfoAvatarProps {
|
|
38
88
|
avatar?: string;
|
|
39
89
|
value?: string;
|
|
@@ -41,6 +91,10 @@ export interface PersonInfoAvatarProps {
|
|
|
41
91
|
link?: string;
|
|
42
92
|
openLinkInNewTab?: boolean;
|
|
43
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Props for PersonInfoCounter (“+N” with tooltip).
|
|
96
|
+
* css overrides styles.counter.
|
|
97
|
+
*/
|
|
44
98
|
export interface PersonInfoCounterProps {
|
|
45
99
|
counterTooltip?: PersonInfoCounterTooltip;
|
|
46
100
|
css?: PersonInfoStyles['counter'];
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import type { Theme } from '@emotion/react';
|
|
2
|
+
type TextareaStatus = 'basic' | 'error' | 'success' | 'custom';
|
|
1
3
|
export declare const TextareaBase: import("@emotion/styled").StyledComponent<{
|
|
2
|
-
theme?:
|
|
4
|
+
theme?: Theme;
|
|
3
5
|
as?: React.ElementType;
|
|
6
|
+
} & {
|
|
7
|
+
status?: TextareaStatus;
|
|
4
8
|
}, import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, {}>;
|
|
9
|
+
export {};
|
|
@@ -84,6 +84,15 @@ export interface TextareaProps extends Partial<Pick<UseFormReturn, 'register'>>
|
|
|
84
84
|
* Use with setCountChar callback to track character count
|
|
85
85
|
*/
|
|
86
86
|
maxLength?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Visual validation status (aligns with Input/TextField palette behavior).
|
|
89
|
+
* - `basic`: default border/outline (theme.colors grey)
|
|
90
|
+
* - `error`: error state (theme.palette.error)
|
|
91
|
+
* - `success`: success state (theme.palette.success)
|
|
92
|
+
* - `custom`: same as basic (no palette styling)
|
|
93
|
+
* @default 'basic'
|
|
94
|
+
*/
|
|
95
|
+
status?: 'basic' | 'error' | 'success' | 'custom';
|
|
87
96
|
/**
|
|
88
97
|
* Custom element type to render as (for composition)
|
|
89
98
|
*/
|
|
@@ -97,6 +106,11 @@ export interface TextareaProps extends Partial<Pick<UseFormReturn, 'register'>>
|
|
|
97
106
|
* Provides tooltip text on hover
|
|
98
107
|
*/
|
|
99
108
|
title?: string;
|
|
109
|
+
/**
|
|
110
|
+
* HTML id attribute for the textarea (e.g. for label htmlFor).
|
|
111
|
+
* Defaults to `formElement-${name}` when not provided.
|
|
112
|
+
*/
|
|
113
|
+
id?: string;
|
|
100
114
|
/**
|
|
101
115
|
* Paste event handler
|
|
102
116
|
* Fired when content is pasted into the textarea
|
|
@@ -10,7 +10,7 @@ export declare const TypeaheadOption: import("@emotion/styled").StyledComponent<
|
|
|
10
10
|
as?: React.ElementType;
|
|
11
11
|
} & TypeaheadItemProps, import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
|
|
12
12
|
export declare const TypeaheadInput: (theme: Theme) => string;
|
|
13
|
-
export declare const TypeaheadInputPlaceholder: string;
|
|
13
|
+
export declare const TypeaheadInputPlaceholder: (theme: Theme) => string;
|
|
14
14
|
export declare const TypeaheadInputWrapper: string;
|
|
15
15
|
export declare const TypeaheadItem: import("@emotion/styled").StyledComponent<{
|
|
16
16
|
theme?: Theme;
|