@common-origin/design-system 2.22.0 → 3.0.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/README.md +2 -2
- package/dist/client.js +218 -476
- package/dist/client.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.d.mts +5 -12
- package/dist/components/atoms/Badge/Badge.d.ts +5 -12
- package/dist/components/atoms/Badge/Badge.mjs +0 -7
- package/dist/components/atoms/Badge/index.d.mts +1 -1
- package/dist/components/atoms/Badge/index.d.ts +1 -1
- package/dist/components/atoms/Box/Box.d.mts +29 -17
- package/dist/components/atoms/Box/Box.d.ts +29 -17
- package/dist/components/atoms/Box/Box.mjs +8 -8
- package/dist/components/atoms/Button/Button.d.mts +1 -4
- package/dist/components/atoms/Button/Button.d.ts +1 -4
- package/dist/components/atoms/Button/Button.mjs +3 -10
- package/dist/components/atoms/CategoryLabel/CategoryLabel.d.mts +4 -12
- package/dist/components/atoms/CategoryLabel/CategoryLabel.d.ts +4 -12
- package/dist/components/atoms/CategoryLabel/CategoryLabel.mjs +5 -16
- package/dist/components/atoms/Chip/Chip.d.mts +8 -20
- package/dist/components/atoms/Chip/Chip.d.ts +8 -20
- package/dist/components/atoms/Chip/Chip.mjs +20 -46
- package/dist/components/atoms/Chip/Chip.mjs.map +1 -1
- package/dist/components/atoms/Chip/FilterChip.d.mts +22 -10
- package/dist/components/atoms/Chip/FilterChip.d.ts +22 -10
- package/dist/components/atoms/Chip/FilterChip.mjs +66 -6
- package/dist/components/atoms/Chip/FilterChip.mjs.map +1 -1
- package/dist/components/atoms/Chip/InputChip.mjs +4 -6
- package/dist/components/atoms/Chip/InputChip.mjs.map +1 -1
- package/dist/components/atoms/Chip/index.d.mts +0 -1
- package/dist/components/atoms/Chip/index.d.ts +0 -1
- package/dist/components/atoms/Chip/shared/types.d.mts +9 -19
- package/dist/components/atoms/Chip/shared/types.d.ts +9 -19
- package/dist/components/atoms/Chip/shared/utils.d.mts +3 -3
- package/dist/components/atoms/Chip/shared/utils.d.ts +3 -3
- package/dist/components/atoms/Chip/shared/utils.mjs +4 -8
- package/dist/components/atoms/Chip/shared/utils.mjs.map +1 -1
- package/dist/components/atoms/DateFormatter/DateFormatter.d.mts +2 -5
- package/dist/components/atoms/DateFormatter/DateFormatter.d.ts +2 -5
- package/dist/components/atoms/DateFormatter/DateFormatter.mjs +0 -1
- package/dist/components/atoms/StatusLabel/StatusLabel.mjs +1 -4
- package/dist/components/atoms/StatusLabel/StatusLabel.mjs.map +1 -1
- package/dist/components/atoms/StatusLabel/StatusLabelBase.d.mts +5 -7
- package/dist/components/atoms/StatusLabel/StatusLabelBase.d.ts +5 -7
- package/dist/components/atoms/StatusLabel/StatusLabelBase.mjs +10 -12
- package/dist/components/atoms/Tag/Tag.d.mts +2 -4
- package/dist/components/atoms/Tag/Tag.d.ts +2 -4
- package/dist/components/atoms/Tag/Tag.mjs +0 -24
- package/dist/components/atoms/index.d.mts +0 -2
- package/dist/components/atoms/index.d.ts +0 -2
- package/dist/components/layout/GridSystem/GridSystem.d.mts +23 -18
- package/dist/components/layout/GridSystem/GridSystem.d.ts +23 -18
- package/dist/components/layout/GridSystem/GridSystem.mjs +7 -5
- package/dist/components/molecules/AccountCard/AccountCard.mjs +1 -1
- package/dist/components/molecules/AgentInput/AgentInput.d.mts +5 -0
- package/dist/components/molecules/AgentInput/AgentInput.d.ts +5 -0
- package/dist/components/molecules/AgentInput/AgentInput.mjs +1 -1
- package/dist/components/molecules/Alert/Alert.d.mts +1 -9
- package/dist/components/molecules/Alert/Alert.d.ts +1 -9
- package/dist/components/molecules/Alert/Alert.mjs +13 -26
- package/dist/components/molecules/ChipGroup/ChipGroup.d.mts +0 -1
- package/dist/components/molecules/ChipGroup/ChipGroup.d.ts +0 -1
- package/dist/components/molecules/ChipGroup/ChipGroup.mjs +1 -6
- package/dist/components/molecules/DateGroup/DateGroup.d.mts +1 -2
- package/dist/components/molecules/DateGroup/DateGroup.d.ts +1 -2
- package/dist/components/molecules/Modal/Modal.d.mts +0 -1
- package/dist/components/molecules/Modal/Modal.d.ts +0 -1
- package/dist/components/molecules/TabBar/TabBar.d.mts +0 -13
- package/dist/components/molecules/TabBar/TabBar.d.ts +0 -13
- package/dist/components/molecules/TabBar/TabBar.mjs +2 -4
- package/dist/components/molecules/TabBar/index.d.mts +1 -1
- package/dist/components/molecules/TabBar/index.d.ts +1 -1
- package/dist/components/molecules/index.d.mts +0 -1
- package/dist/components/molecules/index.d.ts +0 -1
- package/dist/data.js +29 -571
- package/dist/data.js.map +1 -1
- package/dist/index.js +0 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -5
- package/dist/index.mjs.map +1 -1
- package/dist/lib/tokenAliases.d.mts +17 -8
- package/dist/lib/tokenAliases.d.ts +17 -8
- package/dist/lib/tokenAliases.mjs +46 -87
- package/dist/lib/tokenAliases.mjs.map +1 -1
- package/dist/styles/tokens.d.mts +7 -2043
- package/dist/styles/tokens.d.ts +7 -2043
- package/dist/styles/tokens.json +29 -571
- package/dist/styles/tokens.json.mjs +29 -571
- package/dist/styles/tokens.json.mjs.map +1 -1
- package/dist/tokens/index.js +29 -571
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/index.mjs +29 -571
- package/dist/tokens/index.mjs.map +1 -1
- package/dist/tokens/styles/tokens.d.mts +7 -2043
- package/dist/tokens/styles/tokens.d.ts +7 -2043
- package/dist/tokens.css +10 -481
- package/package.json +2 -2
- package/dist/components/atoms/CategoryBadge/CategoryBadge.d.mts +0 -29
- package/dist/components/atoms/CategoryBadge/CategoryBadge.d.ts +0 -29
- package/dist/components/atoms/CategoryBadge/CategoryBadge.mjs +0 -29
- package/dist/components/atoms/CategoryBadge/CategoryBadge.mjs.map +0 -1
- package/dist/components/atoms/CategoryBadge/index.d.mts +0 -2
- package/dist/components/atoms/CategoryBadge/index.d.ts +0 -2
- package/dist/components/atoms/Chip/BooleanChip.d.mts +0 -28
- package/dist/components/atoms/Chip/BooleanChip.d.ts +0 -28
- package/dist/components/atoms/Chip/BooleanChip.mjs +0 -76
- package/dist/components/atoms/Chip/BooleanChip.mjs.map +0 -1
- package/dist/components/atoms/StatusBadge/StatusBadge.d.mts +0 -24
- package/dist/components/atoms/StatusBadge/StatusBadge.d.ts +0 -24
- package/dist/components/atoms/StatusBadge/StatusBadge.mjs +0 -18
- package/dist/components/atoms/StatusBadge/StatusBadge.mjs.map +0 -1
- package/dist/components/atoms/StatusBadge/index.d.mts +0 -2
- package/dist/components/atoms/StatusBadge/index.d.ts +0 -2
- package/dist/components/molecules/PageTitle/PageTitle.d.mts +0 -21
- package/dist/components/molecules/PageTitle/PageTitle.d.ts +0 -21
- package/dist/components/molecules/PageTitle/PageTitle.mjs +0 -77
- package/dist/components/molecules/PageTitle/PageTitle.mjs.map +0 -1
- package/dist/components/molecules/PageTitle/index.d.mts +0 -1
- package/dist/components/molecules/PageTitle/index.d.ts +0 -1
|
@@ -8,7 +8,7 @@ export type StatusType = 'pending' | 'completed' | 'failed' | 'cancelled' | 'pro
|
|
|
8
8
|
*/
|
|
9
9
|
export type StatusSize = 'small' | 'medium';
|
|
10
10
|
/**
|
|
11
|
-
* Props
|
|
11
|
+
* Props for StatusLabel
|
|
12
12
|
*/
|
|
13
13
|
export interface StatusLabelProps {
|
|
14
14
|
/**
|
|
@@ -40,10 +40,8 @@ export interface StatusLabelProps {
|
|
|
40
40
|
'aria-label'?: string;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
43
|
+
* StatusLabel's implementation. Internal: not exported from the package. It always shows the status
|
|
44
|
+
* icon at the medium size, and at the small size the shape for coloured statuses (decisions 0018,
|
|
45
|
+
* 0045).
|
|
46
46
|
*/
|
|
47
|
-
export declare const StatusLabelBase: React.FC<StatusLabelProps
|
|
48
|
-
showIcon?: boolean;
|
|
49
|
-
}>;
|
|
47
|
+
export declare const StatusLabelBase: React.FC<StatusLabelProps>;
|
|
@@ -112,24 +112,22 @@ var VisibleContent = /*#__PURE__*/styled.span.withConfig({
|
|
|
112
112
|
componentId: "sc-1ye9xz5-2"
|
|
113
113
|
})(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
115
|
+
* StatusLabel's implementation. Internal: not exported from the package. It always shows the status
|
|
116
|
+
* icon at the medium size, and at the small size the shape for coloured statuses (decisions 0018,
|
|
117
|
+
* 0045).
|
|
118
118
|
*/])));
|
|
119
119
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
120
|
+
* StatusLabel's implementation. Internal: not exported from the package. It always shows the status
|
|
121
|
+
* icon at the medium size, and at the small size the shape for coloured statuses (decisions 0018,
|
|
122
|
+
* 0045).
|
|
123
123
|
*/
|
|
124
124
|
var StatusLabelBase = function StatusLabelBase(_a) {
|
|
125
125
|
var status = _a.status,
|
|
126
126
|
label = _a.label,
|
|
127
127
|
_b = _a.size,
|
|
128
128
|
size = _b === void 0 ? 'medium' : _b,
|
|
129
|
-
_c = _a.
|
|
130
|
-
|
|
131
|
-
_d = _a.liveRegion,
|
|
132
|
-
liveRegion = _d === void 0 ? true : _d,
|
|
129
|
+
_c = _a.liveRegion,
|
|
130
|
+
liveRegion = _c === void 0 ? true : _c,
|
|
133
131
|
dataTestId = _a["data-testid"],
|
|
134
132
|
ariaLabel = _a["aria-label"];
|
|
135
133
|
var statusConfig = getStatusConfig(status);
|
|
@@ -147,11 +145,11 @@ var StatusLabelBase = function StatusLabelBase(_a) {
|
|
|
147
145
|
"data-testid": dataTestId,
|
|
148
146
|
children: [jsxs(VisibleContent, {
|
|
149
147
|
"aria-hidden": accessibleLabel ? 'true' : undefined,
|
|
150
|
-
children: [
|
|
148
|
+
children: [size === 'medium' && jsx(Icon, {
|
|
151
149
|
name: statusConfig.icon,
|
|
152
150
|
size: sizeStyles.iconSize,
|
|
153
151
|
iconColor: "inherit"
|
|
154
|
-
}),
|
|
152
|
+
}), size === 'small' && statusConfig.shape && jsx(StatusShape, {
|
|
155
153
|
shape: statusConfig.shape
|
|
156
154
|
}), displayLabel, jsxs(ScreenReaderOnly, {
|
|
157
155
|
children: [status, " status"]
|
|
@@ -6,12 +6,10 @@ export interface TagProps {
|
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
/**
|
|
8
8
|
* Visual variant. Tag is neutral metadata: use `default`, or `emphasis` (near-black) to make a
|
|
9
|
-
* tag stand out.
|
|
10
|
-
* `StatusLabel`), and so is `interactive` (a blue fill on a static label is decoration).
|
|
11
|
-
* They keep working until they are removed in 3.0 (decision 0029).
|
|
9
|
+
* tag stand out. For a status, use `StatusLabel` (decision 0029).
|
|
12
10
|
* @default 'default'
|
|
13
11
|
*/
|
|
14
|
-
variant?: 'default' | '
|
|
12
|
+
variant?: 'default' | 'emphasis';
|
|
15
13
|
/**
|
|
16
14
|
* Whether to show a border
|
|
17
15
|
* @default true
|
|
@@ -6,12 +6,10 @@ export interface TagProps {
|
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
/**
|
|
8
8
|
* Visual variant. Tag is neutral metadata: use `default`, or `emphasis` (near-black) to make a
|
|
9
|
-
* tag stand out.
|
|
10
|
-
* `StatusLabel`), and so is `interactive` (a blue fill on a static label is decoration).
|
|
11
|
-
* They keep working until they are removed in 3.0 (decision 0029).
|
|
9
|
+
* tag stand out. For a status, use `StatusLabel` (decision 0029).
|
|
12
10
|
* @default 'default'
|
|
13
11
|
*/
|
|
14
|
-
variant?: 'default' | '
|
|
12
|
+
variant?: 'default' | 'emphasis';
|
|
15
13
|
/**
|
|
16
14
|
* Whether to show a border
|
|
17
15
|
* @default true
|
|
@@ -32,14 +32,6 @@ var StyledTag = /*#__PURE__*/styled.span.withConfig({
|
|
|
32
32
|
}, label.typography.small, label.fontWeight, function (_a) {
|
|
33
33
|
var $variant = _a.$variant;
|
|
34
34
|
switch ($variant) {
|
|
35
|
-
case 'interactive':
|
|
36
|
-
return color.fill['accent-muted'];
|
|
37
|
-
case 'success':
|
|
38
|
-
return color.fill['success-muted'];
|
|
39
|
-
case 'warning':
|
|
40
|
-
return color.fill['warning-muted'];
|
|
41
|
-
case 'error':
|
|
42
|
-
return color.fill['danger-muted'];
|
|
43
35
|
case 'emphasis':
|
|
44
36
|
return color.fill.emphasis;
|
|
45
37
|
default:
|
|
@@ -48,14 +40,6 @@ var StyledTag = /*#__PURE__*/styled.span.withConfig({
|
|
|
48
40
|
}, function (_a) {
|
|
49
41
|
var $variant = _a.$variant;
|
|
50
42
|
switch ($variant) {
|
|
51
|
-
case 'interactive':
|
|
52
|
-
return color.text.accent;
|
|
53
|
-
case 'success':
|
|
54
|
-
return color.text.success;
|
|
55
|
-
case 'warning':
|
|
56
|
-
return color.text.warning;
|
|
57
|
-
case 'error':
|
|
58
|
-
return color.text.danger;
|
|
59
43
|
case 'emphasis':
|
|
60
44
|
return color.text.inverse;
|
|
61
45
|
default:
|
|
@@ -66,14 +50,6 @@ var StyledTag = /*#__PURE__*/styled.span.withConfig({
|
|
|
66
50
|
$border = _a.$border;
|
|
67
51
|
if (!$border) return 'none';
|
|
68
52
|
switch ($variant) {
|
|
69
|
-
case 'interactive':
|
|
70
|
-
return "".concat(semantic.border.width.thin, " solid ").concat(color.border.accent);
|
|
71
|
-
case 'success':
|
|
72
|
-
return "".concat(semantic.border.width.thin, " solid ").concat(color.border.success);
|
|
73
|
-
case 'warning':
|
|
74
|
-
return "".concat(semantic.border.width.thin, " solid ").concat(color.border.warning);
|
|
75
|
-
case 'error':
|
|
76
|
-
return "".concat(semantic.border.width.thin, " solid ").concat(color.border.danger);
|
|
77
53
|
case 'emphasis':
|
|
78
54
|
return "".concat(semantic.border.width.thin, " solid ").concat(color.fill.emphasis);
|
|
79
55
|
default:
|
|
@@ -2,7 +2,6 @@ export * from './Avatar/index.mjs';
|
|
|
2
2
|
export * from './Badge/index.mjs';
|
|
3
3
|
export * from './Box/index.mjs';
|
|
4
4
|
export * from './Button/index.mjs';
|
|
5
|
-
export * from './CategoryBadge/index.mjs';
|
|
6
5
|
export * from './CategoryLabel/index.mjs';
|
|
7
6
|
export * from './Chip/index.mjs';
|
|
8
7
|
export * from './Container/index.mjs';
|
|
@@ -14,7 +13,6 @@ export * from './MoneyDisplay/index.mjs';
|
|
|
14
13
|
export * from './ProgressBar/index.mjs';
|
|
15
14
|
export * from './Divider/index.mjs';
|
|
16
15
|
export * from './Stack/index.mjs';
|
|
17
|
-
export * from './StatusBadge/index.mjs';
|
|
18
16
|
export * from './StatusLabel/index.mjs';
|
|
19
17
|
export * from './Tag/index.mjs';
|
|
20
18
|
export * from './Typography/index.mjs';
|
|
@@ -2,7 +2,6 @@ export * from './Avatar';
|
|
|
2
2
|
export * from './Badge';
|
|
3
3
|
export * from './Box';
|
|
4
4
|
export * from './Button';
|
|
5
|
-
export * from './CategoryBadge';
|
|
6
5
|
export * from './CategoryLabel';
|
|
7
6
|
export * from './Chip';
|
|
8
7
|
export * from './Container';
|
|
@@ -14,7 +13,6 @@ export * from './MoneyDisplay';
|
|
|
14
13
|
export * from './ProgressBar';
|
|
15
14
|
export * from './Divider';
|
|
16
15
|
export * from './Stack';
|
|
17
|
-
export * from './StatusBadge';
|
|
18
16
|
export * from './StatusLabel';
|
|
19
17
|
export * from './Tag';
|
|
20
18
|
export * from './Typography';
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Tokens } from '../../../types/tokens.mjs';
|
|
3
|
+
/**
|
|
4
|
+
* A grid gap: a `base.dimension` step (the 4px scale, so `4` is 16px), or `auto`. Before 3.0 the
|
|
5
|
+
* gap props took `base.spacing` keys, which had the same values (#188).
|
|
6
|
+
*/
|
|
7
|
+
type GridGap = keyof Tokens['base']['dimension'] | 'auto';
|
|
3
8
|
interface GridProps {
|
|
4
9
|
cols?: number;
|
|
5
|
-
gap?:
|
|
6
|
-
gapX?:
|
|
7
|
-
gapY?:
|
|
10
|
+
gap?: GridGap;
|
|
11
|
+
gapX?: GridGap;
|
|
12
|
+
gapY?: GridGap;
|
|
8
13
|
className?: string;
|
|
9
14
|
/** Test identifier for automated testing */
|
|
10
15
|
'data-testid'?: string;
|
|
@@ -34,21 +39,21 @@ interface ResponsiveGridProps {
|
|
|
34
39
|
colsMd?: number;
|
|
35
40
|
colsLg?: number;
|
|
36
41
|
colsXl?: number;
|
|
37
|
-
gap?:
|
|
38
|
-
gapSm?:
|
|
39
|
-
gapMd?:
|
|
40
|
-
gapLg?:
|
|
41
|
-
gapXl?:
|
|
42
|
-
gapX?:
|
|
43
|
-
gapXSm?:
|
|
44
|
-
gapXMd?:
|
|
45
|
-
gapXLg?:
|
|
46
|
-
gapXXl?:
|
|
47
|
-
gapY?:
|
|
48
|
-
gapYSm?:
|
|
49
|
-
gapYMd?:
|
|
50
|
-
gapYLg?:
|
|
51
|
-
gapYXl?:
|
|
42
|
+
gap?: GridGap;
|
|
43
|
+
gapSm?: GridGap;
|
|
44
|
+
gapMd?: GridGap;
|
|
45
|
+
gapLg?: GridGap;
|
|
46
|
+
gapXl?: GridGap;
|
|
47
|
+
gapX?: GridGap;
|
|
48
|
+
gapXSm?: GridGap;
|
|
49
|
+
gapXMd?: GridGap;
|
|
50
|
+
gapXLg?: GridGap;
|
|
51
|
+
gapXXl?: GridGap;
|
|
52
|
+
gapY?: GridGap;
|
|
53
|
+
gapYSm?: GridGap;
|
|
54
|
+
gapYMd?: GridGap;
|
|
55
|
+
gapYLg?: GridGap;
|
|
56
|
+
gapYXl?: GridGap;
|
|
52
57
|
className?: string;
|
|
53
58
|
/** Test identifier for automated testing */
|
|
54
59
|
'data-testid'?: string;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Tokens } from '../../../types/tokens';
|
|
3
|
+
/**
|
|
4
|
+
* A grid gap: a `base.dimension` step (the 4px scale, so `4` is 16px), or `auto`. Before 3.0 the
|
|
5
|
+
* gap props took `base.spacing` keys, which had the same values (#188).
|
|
6
|
+
*/
|
|
7
|
+
type GridGap = keyof Tokens['base']['dimension'] | 'auto';
|
|
3
8
|
interface GridProps {
|
|
4
9
|
cols?: number;
|
|
5
|
-
gap?:
|
|
6
|
-
gapX?:
|
|
7
|
-
gapY?:
|
|
10
|
+
gap?: GridGap;
|
|
11
|
+
gapX?: GridGap;
|
|
12
|
+
gapY?: GridGap;
|
|
8
13
|
className?: string;
|
|
9
14
|
/** Test identifier for automated testing */
|
|
10
15
|
'data-testid'?: string;
|
|
@@ -34,21 +39,21 @@ interface ResponsiveGridProps {
|
|
|
34
39
|
colsMd?: number;
|
|
35
40
|
colsLg?: number;
|
|
36
41
|
colsXl?: number;
|
|
37
|
-
gap?:
|
|
38
|
-
gapSm?:
|
|
39
|
-
gapMd?:
|
|
40
|
-
gapLg?:
|
|
41
|
-
gapXl?:
|
|
42
|
-
gapX?:
|
|
43
|
-
gapXSm?:
|
|
44
|
-
gapXMd?:
|
|
45
|
-
gapXLg?:
|
|
46
|
-
gapXXl?:
|
|
47
|
-
gapY?:
|
|
48
|
-
gapYSm?:
|
|
49
|
-
gapYMd?:
|
|
50
|
-
gapYLg?:
|
|
51
|
-
gapYXl?:
|
|
42
|
+
gap?: GridGap;
|
|
43
|
+
gapSm?: GridGap;
|
|
44
|
+
gapMd?: GridGap;
|
|
45
|
+
gapLg?: GridGap;
|
|
46
|
+
gapXl?: GridGap;
|
|
47
|
+
gapX?: GridGap;
|
|
48
|
+
gapXSm?: GridGap;
|
|
49
|
+
gapXMd?: GridGap;
|
|
50
|
+
gapXLg?: GridGap;
|
|
51
|
+
gapXXl?: GridGap;
|
|
52
|
+
gapY?: GridGap;
|
|
53
|
+
gapYSm?: GridGap;
|
|
54
|
+
gapYMd?: GridGap;
|
|
55
|
+
gapYLg?: GridGap;
|
|
56
|
+
gapYXl?: GridGap;
|
|
52
57
|
className?: string;
|
|
53
58
|
/** Test identifier for automated testing */
|
|
54
59
|
'data-testid'?: string;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __makeTemplateObject } from '../../../vendor/tslib/tslib.es6.mjs';
|
|
2
|
+
import { __assign, __makeTemplateObject } from '../../../vendor/tslib/tslib.es6.mjs';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import styled$module, { css } from 'styled-components';
|
|
5
5
|
const styled = styled$module.default || styled$module;
|
|
6
6
|
import tokens from '../../../lib/cssTokens.mjs';
|
|
7
7
|
|
|
8
|
-
// Exception to decision 0014: the gap props are typed as base
|
|
9
|
-
// so they are looked up in base
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
// Exception to decision 0014: the gap props are typed as base dimension keys (public API),
|
|
9
|
+
// so they are looked up in the base tier until they accept semantic keys.
|
|
10
|
+
var gapSpacing = __assign(__assign({}, tokens.base.dimension), {
|
|
11
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
12
|
+
auto: tokens.base.spacing.auto
|
|
13
|
+
});
|
|
12
14
|
// Breakpoints using base tokens
|
|
13
15
|
var breakpoints = {
|
|
14
16
|
xs: tokens.semantic.breakpoint.xs,
|
|
@@ -92,7 +92,7 @@ var AccountCard = function AccountCard(_a) {
|
|
|
92
92
|
return jsx(Box, {
|
|
93
93
|
minWidth: tokens.component.accountCard.minWidth,
|
|
94
94
|
p: "lg",
|
|
95
|
-
bg: "
|
|
95
|
+
bg: "surface.raised",
|
|
96
96
|
border: "default",
|
|
97
97
|
borderRadius: "xl",
|
|
98
98
|
transition: "box-shadow ".concat(semantic.motion.duration.moderate, " ").concat(semantic.motion.easing.decelerate),
|
|
@@ -35,6 +35,11 @@ export interface AgentInputProps {
|
|
|
35
35
|
maxLength?: number;
|
|
36
36
|
disabled?: boolean;
|
|
37
37
|
isSubmitting?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Web Speech API voice capture, with a mic control in the field, where the browser supports it.
|
|
40
|
+
* Off by default from 3.0 (#266): a product turns it on when it handles voice.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
38
43
|
enableVoice?: boolean;
|
|
39
44
|
autoSubmitOnVoiceFinal?: boolean;
|
|
40
45
|
voiceLanguage?: string;
|
|
@@ -35,6 +35,11 @@ export interface AgentInputProps {
|
|
|
35
35
|
maxLength?: number;
|
|
36
36
|
disabled?: boolean;
|
|
37
37
|
isSubmitting?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Web Speech API voice capture, with a mic control in the field, where the browser supports it.
|
|
40
|
+
* Off by default from 3.0 (#266): a product turns it on when it handles voice.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
38
43
|
enableVoice?: boolean;
|
|
39
44
|
autoSubmitOnVoiceFinal?: boolean;
|
|
40
45
|
voiceLanguage?: string;
|
|
@@ -236,7 +236,7 @@ function AgentInputWithRef(_a, ref) {
|
|
|
236
236
|
disabled = _e === void 0 ? false : _e,
|
|
237
237
|
isSubmitting = _a.isSubmitting,
|
|
238
238
|
_f = _a.enableVoice,
|
|
239
|
-
enableVoice = _f === void 0 ?
|
|
239
|
+
enableVoice = _f === void 0 ? false : _f,
|
|
240
240
|
_g = _a.autoSubmitOnVoiceFinal,
|
|
241
241
|
autoSubmitOnVoiceFinal = _g === void 0 ? true : _g,
|
|
242
242
|
_h = _a.voiceLanguage,
|
|
@@ -41,14 +41,6 @@ export interface AlertProps {
|
|
|
41
41
|
* Optional action button or component, placed below the message and left-aligned with it
|
|
42
42
|
*/
|
|
43
43
|
action?: React.ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* Compact inline variant with reduced padding
|
|
46
|
-
* @default false
|
|
47
|
-
* @deprecated Use `InlineAlert` for a short, local message (decision 0019). `inline` keeps
|
|
48
|
-
* working until it is removed in 3.0. An inline alert that needs a title, action or dismiss
|
|
49
|
-
* button stays an Alert.
|
|
50
|
-
*/
|
|
51
|
-
inline?: boolean;
|
|
52
44
|
/**
|
|
53
45
|
* ARIA live region behavior
|
|
54
46
|
* - polite: Non-urgent announcements
|
|
@@ -63,6 +55,6 @@ export interface AlertProps {
|
|
|
63
55
|
'data-testid'?: string;
|
|
64
56
|
}
|
|
65
57
|
export declare const Alert: {
|
|
66
|
-
({ variant, appearance, children, title, dismissible, onDismiss, action,
|
|
58
|
+
({ variant, appearance, children, title, dismissible, onDismiss, action, ariaLive, "data-testid": dataTestId, ...restProps }: AlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
67
59
|
displayName: string;
|
|
68
60
|
};
|
|
@@ -41,14 +41,6 @@ export interface AlertProps {
|
|
|
41
41
|
* Optional action button or component, placed below the message and left-aligned with it
|
|
42
42
|
*/
|
|
43
43
|
action?: React.ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* Compact inline variant with reduced padding
|
|
46
|
-
* @default false
|
|
47
|
-
* @deprecated Use `InlineAlert` for a short, local message (decision 0019). `inline` keeps
|
|
48
|
-
* working until it is removed in 3.0. An inline alert that needs a title, action or dismiss
|
|
49
|
-
* button stays an Alert.
|
|
50
|
-
*/
|
|
51
|
-
inline?: boolean;
|
|
52
44
|
/**
|
|
53
45
|
* ARIA live region behavior
|
|
54
46
|
* - polite: Non-urgent announcements
|
|
@@ -63,6 +55,6 @@ export interface AlertProps {
|
|
|
63
55
|
'data-testid'?: string;
|
|
64
56
|
}
|
|
65
57
|
export declare const Alert: {
|
|
66
|
-
({ variant, appearance, children, title, dismissible, onDismiss, action,
|
|
58
|
+
({ variant, appearance, children, title, dismissible, onDismiss, action, ariaLive, "data-testid": dataTestId, ...restProps }: AlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
67
59
|
displayName: string;
|
|
68
60
|
};
|
|
@@ -62,13 +62,7 @@ var StyledAlert = /*#__PURE__*/styled.div.withConfig({
|
|
|
62
62
|
},
|
|
63
63
|
displayName: "Alert__StyledAlert",
|
|
64
64
|
componentId: "sc-18tq5d-0"
|
|
65
|
-
})(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"], ["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"])), function (_a) {
|
|
66
|
-
var $inline = _a.$inline;
|
|
67
|
-
return $inline ? semantic.space[200] : semantic.space[300];
|
|
68
|
-
}, function (_a) {
|
|
69
|
-
var $inline = _a.$inline;
|
|
70
|
-
return $inline ? semantic.space[200] : semantic.space[300];
|
|
71
|
-
}, semantic.radius.sm, semantic.border.width.thin, function (_a) {
|
|
65
|
+
})(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"], ["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"])), semantic.space[300], semantic.space[300], semantic.radius.sm, semantic.border.width.thin, function (_a) {
|
|
72
66
|
var _b = _a.$variant,
|
|
73
67
|
$variant = _b === void 0 ? 'info' : _b;
|
|
74
68
|
return alert.severity[$variant].background;
|
|
@@ -81,10 +75,7 @@ var StyledAlert = /*#__PURE__*/styled.div.withConfig({
|
|
|
81
75
|
$variant = _b === void 0 ? 'info' : _b,
|
|
82
76
|
$appearance = _a.$appearance;
|
|
83
77
|
return alert.appearance[$appearance].borderColor[$variant];
|
|
84
|
-
}, semantic.breakpoint.md, function (_a) {
|
|
85
|
-
var $inline = _a.$inline;
|
|
86
|
-
return $inline ? semantic.space[200] : semantic.space[400];
|
|
87
|
-
}, function (_a) {
|
|
78
|
+
}, semantic.breakpoint.md, semantic.space[400], function (_a) {
|
|
88
79
|
var $isExiting = _a.$isExiting,
|
|
89
80
|
$reducedExit = _a.$reducedExit;
|
|
90
81
|
return $isExiting && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n overflow: hidden;\n pointer-events: none;\n animation: ", ";\n "], ["\n overflow: hidden;\n pointer-events: none;\n animation: ", ";\n "])), $reducedExit ? css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["", " ", " ", " forwards"], ["", " ", " ", " forwards"])), fadeOut, duration.fast, easing.accelerate) : css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["", " ", "ms ", " forwards"], ["", " ", "ms ", " forwards"])), fadeThenCollapse, EXIT_MS, easing.accelerate));
|
|
@@ -130,21 +121,16 @@ var StyledDismissSlot = /*#__PURE__*/styled.div.withConfig({
|
|
|
130
121
|
displayName: "Alert__StyledDismissSlot",
|
|
131
122
|
componentId: "sc-18tq5d-6"
|
|
132
123
|
})(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n height: ", ";\n"], ["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n height: ", ";\n"
|
|
133
|
-
// The glyph sits on the padding edge, mirroring the severity icon on the left
|
|
134
|
-
// alert's padding is too small for that, so its button stays inside the padding.
|
|
124
|
+
// The glyph sits on the padding edge, mirroring the severity icon on the left
|
|
135
125
|
])), function (_a) {
|
|
136
126
|
var $lineHeight = _a.$lineHeight;
|
|
137
127
|
return $lineHeight;
|
|
138
128
|
});
|
|
139
|
-
// The glyph sits on the padding edge, mirroring the severity icon on the left
|
|
140
|
-
// alert's padding is too small for that, so its button stays inside the padding.
|
|
129
|
+
// The glyph sits on the padding edge, mirroring the severity icon on the left
|
|
141
130
|
var StyledDismissButton = /*#__PURE__*/styled(IconButton).withConfig({
|
|
142
131
|
displayName: "Alert__StyledDismissButton",
|
|
143
132
|
componentId: "sc-18tq5d-7"
|
|
144
|
-
})(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n margin-right: ", ";\n"], ["\n margin-right: ", ";\n"])),
|
|
145
|
-
var $inline = _a.$inline;
|
|
146
|
-
return $inline ? 0 : "calc((".concat(semantic.size.control.sm, " - ").concat(semantic.size.icon.sm, ") / -2)");
|
|
147
|
-
});
|
|
133
|
+
})(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n margin-right: calc((", " - ", ") / -2);\n"], ["\n margin-right: calc((", " - ", ") / -2);\n"])), semantic.size.control.sm, semantic.size.icon.sm);
|
|
148
134
|
var Alert = function Alert(_a) {
|
|
149
135
|
var _b = _a.variant,
|
|
150
136
|
variant = _b === void 0 ? 'info' : _b,
|
|
@@ -156,12 +142,15 @@ var Alert = function Alert(_a) {
|
|
|
156
142
|
dismissible = _d === void 0 ? false : _d,
|
|
157
143
|
onDismiss = _a.onDismiss,
|
|
158
144
|
action = _a.action,
|
|
159
|
-
_e = _a.
|
|
160
|
-
|
|
161
|
-
_f = _a.ariaLive,
|
|
162
|
-
ariaLive = _f === void 0 ? 'polite' : _f,
|
|
145
|
+
_e = _a.ariaLive,
|
|
146
|
+
ariaLive = _e === void 0 ? 'polite' : _e,
|
|
163
147
|
dataTestId = _a["data-testid"],
|
|
164
|
-
|
|
148
|
+
restProps = __rest(_a, ["variant", "appearance", "children", "title", "dismissible", "onDismiss", "action", "ariaLive", 'data-testid']);
|
|
149
|
+
// `inline` was removed in 3.0 (use InlineAlert, decision 0019); plain JavaScript that still
|
|
150
|
+
// passes it gets a block alert, with the prop kept off the DOM
|
|
151
|
+
var _f = restProps;
|
|
152
|
+
_f.inline;
|
|
153
|
+
var props = __rest(_f, ["inline"]);
|
|
165
154
|
var _g = React.useState('visible'),
|
|
166
155
|
phase = _g[0],
|
|
167
156
|
setPhase = _g[1];
|
|
@@ -237,7 +226,6 @@ var Alert = function Alert(_a) {
|
|
|
237
226
|
"aria-live": ariaLive,
|
|
238
227
|
"$variant": variant,
|
|
239
228
|
"$appearance": appearance,
|
|
240
|
-
"$inline": inline,
|
|
241
229
|
"$isExiting": isExiting,
|
|
242
230
|
"$reducedExit": reducedExit,
|
|
243
231
|
"data-testid": dataTestId
|
|
@@ -270,7 +258,6 @@ var Alert = function Alert(_a) {
|
|
|
270
258
|
iconName: "close",
|
|
271
259
|
size: "small",
|
|
272
260
|
variant: "naked",
|
|
273
|
-
"$inline": inline,
|
|
274
261
|
onClick: handleDismiss,
|
|
275
262
|
"aria-label": "Dismiss alert",
|
|
276
263
|
"data-testid": dataTestId ? "".concat(dataTestId, "-dismiss") : undefined
|
|
@@ -7,7 +7,6 @@ import '../../atoms/Avatar/Avatar.mjs';
|
|
|
7
7
|
import '../../atoms/Badge/Badge.mjs';
|
|
8
8
|
import '../../atoms/Box/Box.mjs';
|
|
9
9
|
import '../../atoms/Button/Button.mjs';
|
|
10
|
-
import '../../atoms/CategoryBadge/CategoryBadge.mjs';
|
|
11
10
|
import '../../atoms/CategoryLabel/CategoryLabel.mjs';
|
|
12
11
|
import { Chip } from '../../atoms/Chip/Chip.mjs';
|
|
13
12
|
import '../../atoms/Icon/Icon.mjs';
|
|
@@ -21,7 +20,6 @@ import '../../atoms/MoneyDisplay/MoneyDisplay.mjs';
|
|
|
21
20
|
import '../../atoms/ProgressBar/ProgressBar.mjs';
|
|
22
21
|
import '../../atoms/Divider/Divider.mjs';
|
|
23
22
|
import { Stack } from '../../atoms/Stack/Stack.mjs';
|
|
24
|
-
import '../../atoms/StatusBadge/StatusBadge.mjs';
|
|
25
23
|
import '../../atoms/StatusLabel/StatusLabel.mjs';
|
|
26
24
|
import '../../atoms/Tag/Tag.mjs';
|
|
27
25
|
import '../../atoms/Typography/Typography.mjs';
|
|
@@ -33,8 +31,6 @@ var ChipGroupWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
33
31
|
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n > div {\n display: flex;\n flex-wrap: wrap;\n }\n"], ["\n > div {\n display: flex;\n flex-wrap: wrap;\n }\n"])));
|
|
34
32
|
var ChipGroup = function ChipGroup(_a) {
|
|
35
33
|
var labels = _a.labels,
|
|
36
|
-
_b = _a.variant,
|
|
37
|
-
variant = _b === void 0 ? 'default' : _b,
|
|
38
34
|
dataTestId = _a["data-testid"];
|
|
39
35
|
return jsx(ChipGroupWrapper, {
|
|
40
36
|
"data-testid": dataTestId,
|
|
@@ -43,8 +39,7 @@ var ChipGroup = function ChipGroup(_a) {
|
|
|
43
39
|
gap: "sm",
|
|
44
40
|
children: labels && labels.map(function (title, index) {
|
|
45
41
|
return jsx(Chip, {
|
|
46
|
-
title: title
|
|
47
|
-
variant: variant
|
|
42
|
+
title: title
|
|
48
43
|
}, index);
|
|
49
44
|
})
|
|
50
45
|
})
|
|
@@ -6,8 +6,7 @@ export interface DateGroupProps {
|
|
|
6
6
|
/** Children to render under the date header (typically transactions) */
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
/**
|
|
9
|
-
* Format mode for the date header, passed to DateFormatter's `mode`.
|
|
10
|
-
* deprecated: it behaves exactly like `'smart'`, so use `'smart'` (#82).
|
|
9
|
+
* Format mode for the date header, passed to DateFormatter's `mode`.
|
|
11
10
|
*/
|
|
12
11
|
format?: DateFormatMode;
|
|
13
12
|
/** Whether to show total amount for this date group */
|
|
@@ -6,8 +6,7 @@ export interface DateGroupProps {
|
|
|
6
6
|
/** Children to render under the date header (typically transactions) */
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
/**
|
|
9
|
-
* Format mode for the date header, passed to DateFormatter's `mode`.
|
|
10
|
-
* deprecated: it behaves exactly like `'smart'`, so use `'smart'` (#82).
|
|
9
|
+
* Format mode for the date header, passed to DateFormatter's `mode`.
|
|
11
10
|
*/
|
|
12
11
|
format?: DateFormatMode;
|
|
13
12
|
/** Whether to show total amount for this date group */
|
|
@@ -9,7 +9,6 @@ export interface ModalAction {
|
|
|
9
9
|
onClick: () => void;
|
|
10
10
|
/**
|
|
11
11
|
* Button variant. `accent` is the blue call to action (at most one per view).
|
|
12
|
-
* `emphasis` is a deprecated alias for `accent` and will be removed in 3.0.
|
|
13
12
|
*/
|
|
14
13
|
variant?: ButtonVariant;
|
|
15
14
|
/** Optional leading icon */
|
|
@@ -9,7 +9,6 @@ export interface ModalAction {
|
|
|
9
9
|
onClick: () => void;
|
|
10
10
|
/**
|
|
11
11
|
* Button variant. `accent` is the blue call to action (at most one per view).
|
|
12
|
-
* `emphasis` is a deprecated alias for `accent` and will be removed in 3.0.
|
|
13
12
|
*/
|
|
14
13
|
variant?: ButtonVariant;
|
|
15
14
|
/** Optional leading icon */
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tab variant options for TabBar.
|
|
3
|
-
* @deprecated TabBar has one look, `underline` (decision 0020). `'default'` and `'pills'` render
|
|
4
|
-
* as `underline`. The type is removed in 3.0.
|
|
5
|
-
*/
|
|
6
|
-
export type TabVariant = 'default' | 'pills' | 'underline';
|
|
7
1
|
/**
|
|
8
2
|
* Individual tab configuration
|
|
9
3
|
*/
|
|
@@ -42,13 +36,6 @@ export interface TabBarProps {
|
|
|
42
36
|
* Callback when tab changes
|
|
43
37
|
*/
|
|
44
38
|
onTabChange: (tabId: string) => void;
|
|
45
|
-
/**
|
|
46
|
-
* Visual variant of the tabs.
|
|
47
|
-
* @deprecated TabBar has one look, `underline` (decision 0020). `'default'` and `'pills'` render
|
|
48
|
-
* as `underline`. Remove the prop; it is removed in 3.0.
|
|
49
|
-
* @default 'underline'
|
|
50
|
-
*/
|
|
51
|
-
variant?: TabVariant;
|
|
52
39
|
/**
|
|
53
40
|
* Accessible label for the tab list
|
|
54
41
|
*/
|