Skip to content

Commit 433c105

Browse files
fix: dependency and tests
1 parent 1a4c3b1 commit 433c105

File tree

4 files changed

+98
-77
lines changed

4 files changed

+98
-77
lines changed

docs-site/src/pages/pattern-lab/_patterns/02-components/chip/10-chip-url-variations.twig

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,30 @@
33
<bolt-list display="inline">
44
<bolt-list-item>
55
{% include "@bolt-components-chip/chip.twig" with {
6-
text: "Regular chip",
6+
text: "No URL",
77
} only %}
88
</bolt-list-item>
99
<bolt-list-item>
1010
{% include "@bolt-components-chip/chip.twig" with {
11-
text: "Linked chip",
12-
url: "#!"
11+
text: "Has URL",
12+
url: "#!",
13+
} only %}
14+
</bolt-list-item>
15+
</bolt-list>
16+
17+
<bolt-text headline>Target</bolt-text>
18+
<bolt-list display="inline">
19+
<bolt-list-item>
20+
{% include "@bolt-components-chip/chip.twig" with {
21+
text: "Open link in current tab",
22+
url: "https://pega.com",
23+
} only %}
24+
</bolt-list-item>
25+
<bolt-list-item>
26+
{% include "@bolt-components-chip/chip.twig" with {
27+
text: "Open link in new tab",
28+
url: "https://pega.com",
29+
target: "_blank",
1330
} only %}
1431
</bolt-list-item>
1532
</bolt-list>

packages/components/bolt-chip-list/__tests__/__snapshots__/chip-list.js.snap

Lines changed: 66 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ exports[`<bolt-chip-list> Component basic usage with links 1`] = `
1313
<bolt-list-item>
1414
<replace-with-grandchildren>
1515
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start">
16-
<bolt-chip tag="a"
17-
url="#!"
18-
>
16+
<bolt-chip url="#!">
1917
<replace-with-grandchildren>
2018
<a href="#!"
21-
class="c-bolt-chip"
19+
class="c-bolt-chip c-bolt-chip--link c-bolt-chip--spacing-xsmall"
20+
is="shadow-root"
2221
>
23-
<span class="c-bolt-chip__item-text">
22+
<replace-with-children class="c-bolt-chip__text">
2423
Chip link 1
25-
</span>
24+
</replace-with-children>
2625
</a>
2726
</replace-with-grandchildren>
2827
</bolt-chip>
@@ -32,16 +31,15 @@ exports[`<bolt-chip-list> Component basic usage with links 1`] = `
3231
<bolt-list-item>
3332
<replace-with-grandchildren>
3433
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start">
35-
<bolt-chip tag="a"
36-
url="#!"
37-
>
34+
<bolt-chip url="#!">
3835
<replace-with-grandchildren>
3936
<a href="#!"
40-
class="c-bolt-chip"
37+
class="c-bolt-chip c-bolt-chip--link c-bolt-chip--spacing-xsmall"
38+
is="shadow-root"
4139
>
42-
<span class="c-bolt-chip__item-text">
40+
<replace-with-children class="c-bolt-chip__text">
4341
Chip link 2
44-
</span>
42+
</replace-with-children>
4543
</a>
4644
</replace-with-grandchildren>
4745
</bolt-chip>
@@ -51,16 +49,15 @@ exports[`<bolt-chip-list> Component basic usage with links 1`] = `
5149
<bolt-list-item>
5250
<replace-with-grandchildren>
5351
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start">
54-
<bolt-chip tag="a"
55-
url="#!"
56-
>
52+
<bolt-chip url="#!">
5753
<replace-with-grandchildren>
5854
<a href="#!"
59-
class="c-bolt-chip"
55+
class="c-bolt-chip c-bolt-chip--link c-bolt-chip--spacing-xsmall"
56+
is="shadow-root"
6057
>
61-
<span class="c-bolt-chip__item-text">
58+
<replace-with-children class="c-bolt-chip__text">
6259
Chip link 3
63-
</span>
60+
</replace-with-children>
6461
</a>
6562
</replace-with-grandchildren>
6663
</bolt-chip>
@@ -70,16 +67,15 @@ exports[`<bolt-chip-list> Component basic usage with links 1`] = `
7067
<bolt-list-item last>
7168
<replace-with-grandchildren>
7269
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start c-bolt-list-item--last-item">
73-
<bolt-chip tag="a"
74-
url="#!"
75-
>
70+
<bolt-chip url="#!">
7671
<replace-with-grandchildren>
7772
<a href="#!"
78-
class="c-bolt-chip"
73+
class="c-bolt-chip c-bolt-chip--link c-bolt-chip--spacing-xsmall"
74+
is="shadow-root"
7975
>
80-
<span class="c-bolt-chip__item-text">
76+
<replace-with-children class="c-bolt-chip__text">
8177
Chip link 4
82-
</span>
78+
</replace-with-children>
8379
</a>
8480
</replace-with-grandchildren>
8581
</bolt-chip>
@@ -104,16 +100,15 @@ exports[`<bolt-chip-list> Component basic usage with mixed behavior 1`] = `
104100
<bolt-list-item>
105101
<replace-with-grandchildren>
106102
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start">
107-
<bolt-chip tag="a"
108-
url="#!"
109-
>
103+
<bolt-chip url="#!">
110104
<replace-with-grandchildren>
111105
<a href="#!"
112-
class="c-bolt-chip"
106+
class="c-bolt-chip c-bolt-chip--link c-bolt-chip--spacing-xsmall"
107+
is="shadow-root"
113108
>
114-
<span class="c-bolt-chip__item-text">
109+
<replace-with-children class="c-bolt-chip__text">
115110
Chip link 1
116-
</span>
111+
</replace-with-children>
117112
</a>
118113
</replace-with-grandchildren>
119114
</bolt-chip>
@@ -123,12 +118,14 @@ exports[`<bolt-chip-list> Component basic usage with mixed behavior 1`] = `
123118
<bolt-list-item>
124119
<replace-with-grandchildren>
125120
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start">
126-
<bolt-chip tag="span">
121+
<bolt-chip>
127122
<replace-with-grandchildren>
128-
<span class="c-bolt-chip">
129-
<span class="c-bolt-chip__item-text">
123+
<span class="c-bolt-chip c-bolt-chip--spacing-xsmall"
124+
is="shadow-root"
125+
>
126+
<replace-with-children class="c-bolt-chip__text">
130127
Chip text 1
131-
</span>
128+
</replace-with-children>
132129
</span>
133130
</replace-with-grandchildren>
134131
</bolt-chip>
@@ -138,16 +135,15 @@ exports[`<bolt-chip-list> Component basic usage with mixed behavior 1`] = `
138135
<bolt-list-item>
139136
<replace-with-grandchildren>
140137
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start">
141-
<bolt-chip tag="a"
142-
url="#!"
143-
>
138+
<bolt-chip url="#!">
144139
<replace-with-grandchildren>
145140
<a href="#!"
146-
class="c-bolt-chip"
141+
class="c-bolt-chip c-bolt-chip--link c-bolt-chip--spacing-xsmall"
142+
is="shadow-root"
147143
>
148-
<span class="c-bolt-chip__item-text">
144+
<replace-with-children class="c-bolt-chip__text">
149145
Chip link 3
150-
</span>
146+
</replace-with-children>
151147
</a>
152148
</replace-with-grandchildren>
153149
</bolt-chip>
@@ -157,12 +153,14 @@ exports[`<bolt-chip-list> Component basic usage with mixed behavior 1`] = `
157153
<bolt-list-item last>
158154
<replace-with-grandchildren>
159155
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start c-bolt-list-item--last-item">
160-
<bolt-chip tag="span">
156+
<bolt-chip>
161157
<replace-with-grandchildren>
162-
<span class="c-bolt-chip">
163-
<span class="c-bolt-chip__item-text">
158+
<span class="c-bolt-chip c-bolt-chip--spacing-xsmall"
159+
is="shadow-root"
160+
>
161+
<replace-with-children class="c-bolt-chip__text">
164162
Chip text 2
165-
</span>
163+
</replace-with-children>
166164
</span>
167165
</replace-with-grandchildren>
168166
</bolt-chip>
@@ -187,12 +185,14 @@ exports[`<bolt-chip-list> Component basic usage without links 1`] = `
187185
<bolt-list-item>
188186
<replace-with-grandchildren>
189187
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start">
190-
<bolt-chip tag="span">
188+
<bolt-chip>
191189
<replace-with-grandchildren>
192-
<span class="c-bolt-chip">
193-
<span class="c-bolt-chip__item-text">
190+
<span class="c-bolt-chip c-bolt-chip--spacing-xsmall"
191+
is="shadow-root"
192+
>
193+
<replace-with-children class="c-bolt-chip__text">
194194
Chip text 1
195-
</span>
195+
</replace-with-children>
196196
</span>
197197
</replace-with-grandchildren>
198198
</bolt-chip>
@@ -202,12 +202,14 @@ exports[`<bolt-chip-list> Component basic usage without links 1`] = `
202202
<bolt-list-item>
203203
<replace-with-grandchildren>
204204
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start">
205-
<bolt-chip tag="span">
205+
<bolt-chip>
206206
<replace-with-grandchildren>
207-
<span class="c-bolt-chip">
208-
<span class="c-bolt-chip__item-text">
207+
<span class="c-bolt-chip c-bolt-chip--spacing-xsmall"
208+
is="shadow-root"
209+
>
210+
<replace-with-children class="c-bolt-chip__text">
209211
Chip text 2
210-
</span>
212+
</replace-with-children>
211213
</span>
212214
</replace-with-grandchildren>
213215
</bolt-chip>
@@ -217,12 +219,14 @@ exports[`<bolt-chip-list> Component basic usage without links 1`] = `
217219
<bolt-list-item>
218220
<replace-with-grandchildren>
219221
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start">
220-
<bolt-chip tag="span">
222+
<bolt-chip>
221223
<replace-with-grandchildren>
222-
<span class="c-bolt-chip">
223-
<span class="c-bolt-chip__item-text">
224+
<span class="c-bolt-chip c-bolt-chip--spacing-xsmall"
225+
is="shadow-root"
226+
>
227+
<replace-with-children class="c-bolt-chip__text">
224228
Chip text 3
225-
</span>
229+
</replace-with-children>
226230
</span>
227231
</replace-with-grandchildren>
228232
</bolt-chip>
@@ -232,12 +236,14 @@ exports[`<bolt-chip-list> Component basic usage without links 1`] = `
232236
<bolt-list-item last>
233237
<replace-with-grandchildren>
234238
<li class="c-bolt-list-item c-bolt-list-item--display-inline c-bolt-list-item--spacing-xsmall c-bolt-list-item--align-start c-bolt-list-item--last-item">
235-
<bolt-chip tag="span">
239+
<bolt-chip>
236240
<replace-with-grandchildren>
237-
<span class="c-bolt-chip">
238-
<span class="c-bolt-chip__item-text">
241+
<span class="c-bolt-chip c-bolt-chip--spacing-xsmall"
242+
is="shadow-root"
243+
>
244+
<replace-with-children class="c-bolt-chip__text">
239245
Chip text 4
240-
</span>
246+
</replace-with-children>
241247
</span>
242248
</replace-with-grandchildren>
243249
</bolt-chip>

packages/components/bolt-chip/__tests__/__snapshots__/chip.js.snap

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`<bolt-chip> Component basic usage with attributes 1`] = `
4-
<bolt-chip tag="span"
5-
data-attr="some attribute"
6-
>
4+
<bolt-chip data-attr="some attribute">
75
<replace-with-grandchildren>
8-
<span data-attr="some attribute"
9-
class="c-bolt-chip"
6+
<span class="c-bolt-chip c-bolt-chip--spacing-xsmall"
7+
is="shadow-root"
108
>
11-
<span class="c-bolt-chip__item-text">
9+
<replace-with-children class="c-bolt-chip__text">
1210
This is a chip
13-
</span>
11+
</replace-with-children>
1412
</span>
1513
</replace-with-grandchildren>
1614
</bolt-chip>
1715
`;
1816
1917
exports[`<bolt-chip> Component with link 1`] = `
20-
<bolt-chip tag="a"
21-
url="!#"
22-
>
18+
<bolt-chip url="!#">
2319
<replace-with-grandchildren>
2420
<a href="!#"
25-
class="c-bolt-chip"
21+
class="c-bolt-chip c-bolt-chip--link c-bolt-chip--spacing-xsmall"
22+
is="shadow-root"
2623
>
27-
<span class="c-bolt-chip__item-text">
24+
<replace-with-children class="c-bolt-chip__text">
2825
This is a chip with link
29-
</span>
26+
</replace-with-children>
3027
</a>
3128
</replace-with-grandchildren>
3229
</bolt-chip>

packages/components/bolt-chip/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"access": "public"
3434
},
3535
"dependencies": {
36-
"@bolt/core": "^2.5.6"
36+
"@bolt/core": "^2.5.6",
37+
"@bolt/components-icon": "^2.5.6"
3738
},
3839
"gitHead": "d41aa75ae3d195d9d7fb3952eed5e0ae80988133"
3940
}

0 commit comments

Comments
 (0)