@ssa-ui-kit/core 3.1.0 → 3.3.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/DatePicker/types.d.ts +218 -5
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +51 -0
- package/dist/components/DateRangePicker/DateRangePickerFormBridge.d.ts +29 -5
- package/dist/components/DateRangePicker/constants.d.ts +8 -0
- package/dist/components/DateRangePicker/types.d.ts +235 -11
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/types.d.ts +9 -0
- package/dist/components/History/History.d.ts +31 -0
- package/dist/components/History/index.d.ts +2 -0
- package/dist/components/History/styles.d.ts +9 -0
- package/dist/components/History/types.d.ts +56 -0
- package/dist/components/Icon/icons/EmployeeBlackboard.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/SettingClock.d.ts +3 -0
- package/dist/components/Icon/icons/all.d.ts +5 -0
- package/dist/components/Icon/icons/iconsList.d.ts +1 -1
- package/dist/components/MultipleDropdown/types.d.ts +9 -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/index.d.ts +2 -1
- package/dist/index.js +682 -65
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -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'];
|
|
@@ -37,7 +37,6 @@ export { default as MultipleDropdownOptions } from './MultipleDropdownOptions';
|
|
|
37
37
|
export * from './Typeahead';
|
|
38
38
|
export * from './DatePicker';
|
|
39
39
|
export * from './DateRangePicker';
|
|
40
|
-
export type { CalendarType } from './DatePicker/types';
|
|
41
40
|
export * from './ColorPicker';
|
|
42
41
|
export * from './SearchBox';
|
|
43
42
|
export type * from './SearchBox/types';
|
|
@@ -111,6 +110,8 @@ export type * from './Stepper/types';
|
|
|
111
110
|
export { default as Step } from './Step';
|
|
112
111
|
export { default as StepConnector } from './StepConnector';
|
|
113
112
|
export { default as StepLabel } from './StepLabel';
|
|
113
|
+
export * from './History';
|
|
114
|
+
export type * from './History/types';
|
|
114
115
|
export * from './Pagination';
|
|
115
116
|
export { default as Link } from './Link';
|
|
116
117
|
export * from './WithLink';
|