Skip to content

Commit 586e7d0

Browse files
committed
Merge branch 'main' into feat/add-testids-for-textbox
2 parents 42ad723 + dea7bde commit 586e7d0

File tree

54 files changed

+768
-310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+768
-310
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ concurrency:
1616
jobs:
1717
verify:
1818
name: Verify
19-
runs-on: ubuntu-20.04
19+
runs-on: ubuntu-22.04
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v4

.github/workflows/git-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
block-fixup:
99
if: github.event.pull_request.draft == false
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111

1212
steps:
1313
- uses: actions/checkout@v4

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
publish:
1414
name: Publish
1515
if: github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'chore(release):')
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-22.04
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v4

.releaserc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
"main"
44
],
55
"plugins": [
6-
"@semantic-release/commit-analyzer",
6+
[
7+
"@semantic-release/commit-analyzer",
8+
{
9+
"preset": "conventionalcommits",
10+
}
11+
],
712
"@semantic-release/release-notes-generator",
813
"@semantic-release/changelog",
914
"@semantic-release/npm",

CHANGELOG.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,149 @@
1+
# [3.3.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v3.2.7...v3.3.0) (2025-03-24)
2+
3+
4+
### Features
5+
6+
* allow passing elements to asset table props ([ee6609d](https://github.com/input-output-hk/lace-ui-toolkit/commit/ee6609d15604c1b1d210a3f264430fc5c60a35c3))
7+
8+
## [3.2.7](https://github.com/input-output-hk/lace-ui-toolkit/compare/v3.2.6...v3.2.7) (2025-03-05)
9+
10+
11+
### Bug Fixes
12+
13+
* optional Tooltip props [LW-12407] ([6731b2f](https://github.com/input-output-hk/lace-ui-toolkit/commit/6731b2f5b5e90b08a8bb3b04c73a64969f9f953e))
14+
15+
## [3.2.6](https://github.com/input-output-hk/lace-ui-toolkit/compare/v3.2.5...v3.2.6) (2025-02-14)
16+
17+
18+
### Bug Fixes
19+
20+
* simple asset input text terminating in the middle of container ([7015872](https://github.com/input-output-hk/lace-ui-toolkit/commit/701587267adfa2df7e6881666d2ef89b835c328b))
21+
22+
## [3.2.5](https://github.com/input-output-hk/lace-ui-toolkit/compare/v3.2.4...v3.2.5) (2025-02-14)
23+
24+
25+
### Bug Fixes
26+
27+
* apply popup styles on smaller screens [LW-12311] ([a045b32](https://github.com/input-output-hk/lace-ui-toolkit/commit/a045b32fdcf74d76b6a9afd7bca62e691692f816))
28+
29+
## [3.2.4](https://github.com/input-output-hk/lace-ui-toolkit/compare/v3.2.3...v3.2.4) (2025-02-13)
30+
31+
32+
### Bug Fixes
33+
34+
* expand simple asset input to occupy 100% width ([c8bd477](https://github.com/input-output-hk/lace-ui-toolkit/commit/c8bd477406c9c7dcd2cfb9fa0dbe47ee02b9066a))
35+
36+
## [3.2.3](https://github.com/input-output-hk/lace-ui-toolkit/compare/v3.2.2...v3.2.3) (2025-02-13)
37+
38+
39+
### Bug Fixes
40+
41+
* truncate profile dropdown trigger title [LW-12306] ([0b1f07f](https://github.com/input-output-hk/lace-ui-toolkit/commit/0b1f07f0f53e5f79070c7a3100f8239f5ad7a5f5))
42+
43+
## [3.2.2](https://github.com/input-output-hk/lace-ui-toolkit/compare/v3.2.1...v3.2.2) (2025-02-13)
44+
45+
46+
### Bug Fixes
47+
48+
* truncate wallet option title [LW-12306] ([8b789cb](https://github.com/input-output-hk/lace-ui-toolkit/commit/8b789cb09120bfaa80483201cf36f25030cee635))
49+
50+
## [3.2.1](https://github.com/input-output-hk/lace-ui-toolkit/compare/v3.2.0...v3.2.1) (2025-02-03)
51+
52+
53+
### Bug Fixes
54+
55+
* improve theme adaptation for edit icon ([9606ee4](https://github.com/input-output-hk/lace-ui-toolkit/commit/9606ee4f45562b8ad07d8f00df2a27d632764722))
56+
57+
# [3.2.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v3.1.0...v3.2.0) (2025-02-03)
58+
59+
60+
### Features
61+
62+
* add edit to wallet option ([2e4be3d](https://github.com/input-output-hk/lace-ui-toolkit/commit/2e4be3d41f994601aaaf14780f38261b6d772cfb))
63+
64+
# [3.1.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v3.0.0...v3.1.0) (2024-12-13)
65+
66+
67+
### Features
68+
69+
* support TokenAmount details tooltip [LW-11733] ([4836445](https://github.com/input-output-hk/lace-ui-toolkit/commit/4836445eda672f3bff63f98b7474b93af58932dd))
70+
71+
# [3.0.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v2.0.0...v3.0.0) (2024-12-11)
72+
73+
74+
* feat!: make token amount details configurable [LW-11733] ([bfab9e7](https://github.com/input-output-hk/lace-ui-toolkit/commit/bfab9e7440ecbe022706e75b093fcfce4d066172))
75+
76+
77+
### BREAKING CHANGES
78+
79+
* TokenAmount props changed from a simple fiatPrice prop
80+
to a more flexible "details" prop which can further be customized by
81+
passing "detailsColor" and "detailsWeight" to cover more scenarios
82+
83+
# [2.0.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.24.0...v2.0.0) (2024-11-21)
84+
85+
# [1.24.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.23.0...v1.24.0) (2024-10-18)
86+
87+
88+
### Features
89+
90+
* add clock and exclamation mark icons [LW-9231] ([a66cff7](https://github.com/input-output-hk/lace-ui-toolkit/commit/a66cff7853b88a53c7e7b8bcb6d2c30b1f73a02f))
91+
92+
# [1.23.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.22.0...v1.23.0) (2024-10-11)
93+
94+
95+
### Features
96+
97+
* improve simple asset input [LW-9231] ([e424a0f](https://github.com/input-output-hk/lace-ui-toolkit/commit/e424a0fb88a9fa1075bcf595a12b180ad03fca8a))
98+
99+
# [1.22.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.21.0...v1.22.0) (2024-10-10)
100+
101+
102+
### Features
103+
104+
* add simple version of asset input [LW-9231] ([f3ca7f1](https://github.com/input-output-hk/lace-ui-toolkit/commit/f3ca7f18803bcf5f6985d031829cf224a1541b5b))
105+
106+
# [1.21.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.20.0...v1.21.0) (2024-09-24)
107+
108+
109+
### Features
110+
111+
* add data-testid to toggle-switch component [LW-11556] ([6726320](https://github.com/input-output-hk/lace-ui-toolkit/commit/672632027a461a9f8b3f22b0ba0356fb89beb755))
112+
113+
# [1.20.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.19.0...v1.20.0) (2024-09-13)
114+
115+
116+
### Features
117+
118+
* add data-testid to sideDrawer [LW-11491] ([a38aaa8](https://github.com/input-output-hk/lace-ui-toolkit/commit/a38aaa82fdc6488bbc68d7f29af3007b166be293))
119+
120+
# [1.19.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.18.2...v1.19.0) (2024-09-11)
121+
122+
123+
### Bug Fixes
124+
125+
* replace data-testid attributes with props ([bea9c01](https://github.com/input-output-hk/lace-ui-toolkit/commit/bea9c019048a80b94e90db998be7ad3bb03985b9))
126+
127+
128+
### Features
129+
130+
* add testId prop to TextLink ([5af6152](https://github.com/input-output-hk/lace-ui-toolkit/commit/5af61524073bb54a740c630592ee2ad1d1da838b))
131+
132+
## [1.18.2](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.18.1...v1.18.2) (2024-09-11)
133+
134+
135+
### Bug Fixes
136+
137+
* fix profile dropdown wallet icon test id ([54aaf0c](https://github.com/input-output-hk/lace-ui-toolkit/commit/54aaf0cb10b22f3700fc98e944319c04cb54b1fb))
138+
* fix table body test id ([3d7d47e](https://github.com/input-output-hk/lace-ui-toolkit/commit/3d7d47ec7a1dc2e8e25a126e7d215dd8bbc28623))
139+
140+
## [1.18.1](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.18.0...v1.18.1) (2024-09-11)
141+
142+
143+
### Bug Fixes
144+
145+
* box component now has a new property testId what will be rendered in the data-testid prop ([e0a9e71](https://github.com/input-output-hk/lace-ui-toolkit/commit/e0a9e7112d2bfc709bf3696fb039f73f695cc1ad))
146+
1147
# [1.18.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.17.0...v1.18.0) (2024-08-27)
2148

3149

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@input-output-hk/lace-ui-toolkit",
3-
"version": "1.18.0",
3+
"version": "3.3.0",
44
"description": "Lace UI Toolkit",
55
"homepage": "https://github.com/input-output-hk/lace-ui-toolkit/blob/main/README.md",
66
"bugs": {

src/design-system/asset-input/amount-input.component.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,40 @@
11
import React from 'react';
22

3+
import cn from 'classnames';
4+
35
import { Box } from '../box';
46

57
import * as cx from './amount-input.css';
8+
import { AmountInputAlignments } from './types';
69

710
interface Props {
11+
alignment?: AmountInputAlignments;
812
onChange?: (value: string) => void;
913
value?: string;
1014
id: string;
15+
testId?: string;
16+
className?: string;
17+
inputClassName?: string;
1118
}
1219

1320
export const AmountInput = ({
21+
alignment = 'right',
1422
onChange,
1523
value,
1624
id,
25+
testId,
26+
className,
27+
inputClassName,
1728
}: Readonly<Props>): JSX.Element => {
1829
return (
19-
<Box className={cx.amountInputSizer} data-value={value}>
30+
<Box className={cn(cx.amountInputSizer, className)} data-value={value}>
2031
<input
21-
className={cx.amountInput}
32+
className={cn(cx.amountInput[alignment], inputClassName)}
2233
value={value}
2334
size={1}
2435
onChange={({ target }): void => onChange?.(target.value)}
2536
placeholder="0.0"
26-
data-testid={`asset-input-amount-input-${id}`}
37+
data-testid={testId ?? `asset-input-amount-input-${id}`}
2738
/>
2839
</Box>
2940
);

src/design-system/asset-input/amount-input.css.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { styleVariants } from '@vanilla-extract/css';
2+
13
import { style, vars } from '../../design-tokens';
24
import { bold } from '../text/text.css';
35

@@ -20,12 +22,11 @@ export const amountInputSizer = style([
2022
},
2123
]);
2224

23-
export const amountInput = style([
25+
const amountInputBase = style([
2426
inputTypography,
2527
bold,
2628
{
2729
gridArea: '1 / 2',
28-
textAlign: 'right',
2930
border: 'none',
3031
width: 'auto',
3132
background: 'none',
@@ -39,3 +40,18 @@ export const amountInput = style([
3940
},
4041
},
4142
]);
43+
44+
export const amountInput = styleVariants({
45+
left: [
46+
amountInputBase,
47+
{
48+
textAlign: 'left',
49+
},
50+
],
51+
right: [
52+
amountInputBase,
53+
{
54+
textAlign: 'right',
55+
},
56+
],
57+
});

src/design-system/asset-input/asset-input.component.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import * as cx from './asset-input.css';
99
import { MaxButton } from './max-button.component';
1010
import { TickerButton } from './ticker-button.component';
1111

12-
import type { Asset, AssetState } from './asset-input.data';
12+
import type { AssetWithFiat, AssetState } from './asset-input.data';
1313

1414
interface Props {
1515
state: AssetState;
16-
onTickerClick?: (asset: Readonly<Asset>) => void;
17-
onAmountChange?: (asset: Readonly<Asset>, amount: string) => void;
18-
onMaxClick?: (asset: Readonly<Asset>) => void;
16+
onTickerClick?: (asset: Readonly<AssetWithFiat>) => void;
17+
onAmountChange?: (asset: Readonly<AssetWithFiat>, amount: string) => void;
18+
onMaxClick?: (asset: Readonly<AssetWithFiat>) => void;
1919
}
2020

2121
export const AssetInput = ({

src/design-system/asset-input/asset-input.data.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ export interface Asset {
33
ticker: string;
44
balance: string;
55
amount: string;
6+
}
7+
8+
export interface AssetWithFiat extends Asset {
69
fiat: {
710
value: string;
811
ticker: string;
912
};
1013
}
1114

12-
export type AssetState =
15+
export type AssetState<A extends Asset = AssetWithFiat> =
1316
| {
1417
type: 'valid';
15-
asset: Asset;
18+
asset: A;
1619
}
17-
| { type: 'invalid'; asset: Asset; error: string };
20+
| { type: 'invalid'; asset: A; error: string };

0 commit comments

Comments
 (0)