Skip to content

Commit 2bed786

Browse files
authored
Merge fd551da into 02103f4
2 parents 02103f4 + fd551da commit 2bed786

36 files changed

Lines changed: 1309 additions & 1351 deletions

docs/main.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import '@patternfly/elements/pf-v5-helper-text/pf-v5-helper-text.js';
1313
import '@patternfly/elements/pf-v5-hint/pf-v5-hint.js';
1414
import '@patternfly/elements/pf-v5-jump-links/pf-v5-jump-links.js';
1515
import '@patternfly/elements/pf-v5-label-group/pf-v5-label-group.js';
16-
import '@patternfly/elements/pf-v5-label/pf-v5-label.js';
16+
import '@patternfly/elements/pf-v6-label/pf-v6-label.js';
1717
import '@patternfly/elements/pf-v5-modal/pf-v5-modal.js';
1818
import '@patternfly/elements/pf-v5-panel/pf-v5-panel.js';
1919
import '@patternfly/elements/pf-v5-popover/pf-v5-popover.js';

elements/pf-v5-label-group/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ import '@patternfly/elements/pf-v5-label-group/pf-v5-label-group.js';
3030

3131
```html
3232
<pf-v5-label-group>
33-
<pf-v5-label color="blue">Security</pf-v5-label>
34-
<pf-v5-label color="green">Performance</pf-v5-label>
35-
<pf-v5-label color="red">Networking</pf-v5-label>
33+
<pf-v6-label color="blue">Security</pf-v6-label>
34+
<pf-v6-label color="green">Performance</pf-v6-label>
35+
<pf-v6-label color="red">Networking</pf-v6-label>
3636
</pf-v5-label-group>
3737
```
3838

3939
With a category:
4040
```html
4141
<pf-v5-label-group>
4242
<span slot="category">Filters</span>
43-
<pf-v5-label removable>Security</pf-v5-label>
44-
<pf-v5-label removable>Performance</pf-v5-label>
43+
<pf-v6-label removable>Security</pf-v6-label>
44+
<pf-v6-label removable>Performance</pf-v6-label>
4545
</pf-v5-label-group>
4646
```

elements/pf-v5-label-group/demo/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<pf-v5-label-group>
2-
<pf-v5-label color="blue">Blue</pf-v5-label>
3-
<pf-v5-label color="green">Green</pf-v5-label>
4-
<pf-v5-label color="orange">Orange</pf-v5-label>
2+
<pf-v6-label color="blue">Blue</pf-v6-label>
3+
<pf-v6-label color="green">Green</pf-v6-label>
4+
<pf-v6-label color="orange">Orange</pf-v6-label>
55
</pf-v5-label-group>
66

77
<script type="module">

elements/pf-v5-label-group/demo/label-group-closeable.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<pf-v5-label-group closeable>
22
<span slot="category">Filters</span>
3-
<pf-v5-label color="blue" removable>Security</pf-v5-label>
4-
<pf-v5-label color="green" removable>Performance</pf-v5-label>
5-
<pf-v5-label color="red" removable>Networking</pf-v5-label>
3+
<pf-v6-label color="blue" removable>Security</pf-v6-label>
4+
<pf-v6-label color="green" removable>Performance</pf-v6-label>
5+
<pf-v6-label color="red" removable>Networking</pf-v6-label>
66
</pf-v5-label-group>
77

88
<script type="module">

elements/pf-v5-label-group/demo/label-group-vertical.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<pf-v5-label-group orientation="vertical">
22
<span slot="category">Group</span>
3-
<pf-v5-label color="red" icon="info-circle" removable>Label 1</pf-v5-label>
4-
<pf-v5-label color="green" icon="info-circle" removable>Label 2</pf-v5-label>
5-
<pf-v5-label color="blue" icon="info-circle" removable>Label 3</pf-v5-label>
3+
<pf-v6-label color="red" removable>Label 1</pf-v6-label>
4+
<pf-v6-label color="green" removable>Label 2</pf-v6-label>
5+
<pf-v6-label color="blue" removable>Label 3</pf-v6-label>
66
</pf-v5-label-group>
77

88
<script type="module">

elements/pf-v5-label-group/demo/label-group-with-a-very-long-name.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<pf-v5-label-group>
22
<span slot="category">Label group with a very long category name</span>
3-
<pf-v5-label color="red" icon="info-circle">Label 1</pf-v5-label>
4-
<pf-v5-label color="blue" icon="info-circle">Label 2</pf-v5-label>
5-
<pf-v5-label color="green" icon="info-circle">Label 3</pf-v5-label>
3+
<pf-v6-label color="red">Label 1</pf-v6-label>
4+
<pf-v6-label color="blue">Label 2</pf-v6-label>
5+
<pf-v6-label color="green">Label 3</pf-v6-label>
66
</pf-v5-label-group>
77

88
<script type="module">

elements/pf-v5-label-group/demo/label-group-with-overflow-labels.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<pf-v5-label-group num-labels="3">
22
<span slot="category">Tags</span>
3-
<pf-v5-label color="orange" icon="info-circle" removable>Label 1</pf-v5-label>
4-
<pf-v5-label color="purple" icon="info-circle" removable>Label 2</pf-v5-label>
5-
<pf-v5-label color="blue" icon="info-circle" removable>Label 3</pf-v5-label>
6-
<pf-v5-label color="red" icon="info-circle" removable>Label 4</pf-v5-label>
7-
<pf-v5-label color="cyan" icon="info-circle" removable>Label 5</pf-v5-label>
8-
<pf-v5-label color="green" icon="info-circle" removable>Label 6</pf-v5-label>
3+
<pf-v6-label color="orange" removable>Label 1</pf-v6-label>
4+
<pf-v6-label color="purple" removable>Label 2</pf-v6-label>
5+
<pf-v6-label color="blue" removable>Label 3</pf-v6-label>
6+
<pf-v6-label color="red" removable>Label 4</pf-v6-label>
7+
<pf-v6-label color="teal" removable>Label 5</pf-v6-label>
8+
<pf-v6-label color="green" removable>Label 6</pf-v6-label>
99
</pf-v5-label-group>
1010

1111
<script type="module">

elements/pf-v5-label-group/pf-v5-label-group.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
line-height: 1.6;
5959
}
6060

61-
#labels ::slotted(pf-v5-label) {
61+
#labels ::slotted(pf-v6-label) {
6262
display: inline-flex;
6363
min-width: 0;
6464
margin-inline-end: var(--pf-v5-c-label-group__list-item--MarginRight);

elements/pf-v5-label-group/pf-v5-label-group.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { classMap } from 'lit/directives/class-map.js';
66
import { observes } from '@patternfly/pfe-core/decorators/observes.js';
77
import { RovingTabindexController } from '@patternfly/pfe-core/controllers/roving-tabindex-controller.js';
88

9-
import { PfV5Label } from '../pf-v5-label/pf-v5-label.js';
9+
import { PfV6Label } from '../pf-v6-label/pf-v6-label.js';
10+
import '@patternfly/elements/pf-v5-button/pf-v5-button.js';
1011

1112
import styles from './pf-v5-label-group.css';
1213

@@ -46,7 +47,7 @@ const REMAINING_RE = /\$\{\s*remaining\s*\}/g;
4647
* @slot category
4748
* Category name text for label group category.
4849
* If this slot is populated, the label group will have category styling applied.
49-
* @slot - `<pf-v5-label>` elements.
50+
* @slot - `<pf-v6-label>` elements.
5051
*/
5152
@customElement('pf-v5-label-group')
5253
export class PfV5LabelGroup extends LitElement {
@@ -87,8 +88,8 @@ export class PfV5LabelGroup extends LitElement {
8788
/** Label count tracked during SSR via child events. */
8889
_ssrLabelCount = 0;
8990

90-
get #overflowLabel(): PfV5Label | null {
91-
return this.renderRoot?.querySelector?.<PfV5Label>('#overflow') ?? null;
91+
get #overflowLabel(): PfV6Label | null {
92+
return this.renderRoot?.querySelector?.<PfV6Label>('#overflow') ?? null;
9293
}
9394

9495
get #closeButton(): HTMLButtonElement | null {
@@ -101,11 +102,11 @@ export class PfV5LabelGroup extends LitElement {
101102
return slot?.assignedNodes({ flatten: true }) ?? [];
102103
}
103104

104-
get #labels(): NodeListOf<PfV5Label> | PfV5Label[] {
105+
get #labels(): NodeListOf<PfV6Label> | PfV6Label[] {
105106
if (isServer) {
106-
return [] as PfV5Label[];
107+
return [] as PfV6Label[];
107108
}
108-
return this.querySelectorAll<PfV5Label>('pf-v5-label:not([slot]):not([overflow-label])');
109+
return this.querySelectorAll<PfV6Label>('pf-v6-label:not([slot]):not([overflow])');
109110
}
110111

111112
get #labelCount(): number {
@@ -154,14 +155,14 @@ export class PfV5LabelGroup extends LitElement {
154155
?hidden="${!this.accessibleLabel}">${this.accessibleLabel ?? ''}</span>
155156
</slot>
156157
<slot id="labels" @slotchange="${this.#onSlotchange}"></slot>
157-
<pf-v5-label id="overflow"
158+
<pf-v6-label id="overflow"
158159
aria-controls="labels"
159-
overflow-label
160+
overflow
160161
?hidden="${this.#remaining < 1}"
161162
@click="${this.#onMoreClick}"
162163
>${this.#remaining < 1 ? ''
163164
: this.open ? this.expandedText
164-
: this.collapsedText.replace(REMAINING_RE, this.#remaining.toString())}</pf-v5-label>
165+
: this.collapsedText.replace(REMAINING_RE, this.#remaining.toString())}</pf-v6-label>
165166
<pf-v5-button id="close-button"
166167
plain
167168
icon="times-circle"

elements/pf-v5-label-group/test/pf-label-group.spec.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ describe('<pf-v5-label-group>', function() {
3232
beforeEach(async function() {
3333
element = await createFixture<PfV5LabelGroup>(html`
3434
<pf-v5-label-group>
35-
<pf-v5-label>Label 1</pf-v5-label>
36-
<pf-v5-label>Label 2</pf-v5-label>
37-
<pf-v5-label>Label 3</pf-v5-label>
38-
<pf-v5-label>Label 4</pf-v5-label>
35+
<pf-v6-label>Label 1</pf-v6-label>
36+
<pf-v6-label>Label 2</pf-v6-label>
37+
<pf-v6-label>Label 3</pf-v6-label>
38+
<pf-v6-label>Label 4</pf-v6-label>
3939
</pf-v5-label-group>
4040
`);
4141
});
@@ -68,10 +68,10 @@ describe('<pf-v5-label-group>', function() {
6868
beforeEach(async function() {
6969
element = await createFixture<PfV5LabelGroup>(html`
7070
<pf-v5-label-group closeable>
71-
<pf-v5-label>Label 1</pf-v5-label>
72-
<pf-v5-label>Label 2</pf-v5-label>
73-
<pf-v5-label>Label 3</pf-v5-label>
74-
<pf-v5-label>Label 4</pf-v5-label>
71+
<pf-v6-label>Label 1</pf-v6-label>
72+
<pf-v6-label>Label 2</pf-v6-label>
73+
<pf-v6-label>Label 3</pf-v6-label>
74+
<pf-v6-label>Label 4</pf-v6-label>
7575
</pf-v5-label-group>
7676
`);
7777
});
@@ -103,10 +103,10 @@ describe('<pf-v5-label-group>', function() {
103103
<pf-v5-label-group collapsed-text="show $\{remaining} more"
104104
expanded-text="show fewer"
105105
accessible-label="My Label Group">
106-
<pf-v5-label>Label 1</pf-v5-label>
107-
<pf-v5-label>Label 2</pf-v5-label>
108-
<pf-v5-label>Label 3</pf-v5-label>
109-
<pf-v5-label>Label 4</pf-v5-label>
106+
<pf-v6-label>Label 1</pf-v6-label>
107+
<pf-v6-label>Label 2</pf-v6-label>
108+
<pf-v6-label>Label 3</pf-v6-label>
109+
<pf-v6-label>Label 4</pf-v6-label>
110110
</pf-v5-label-group>
111111
`);
112112
});
@@ -120,10 +120,10 @@ describe('<pf-v5-label-group>', function() {
120120
beforeEach(async function() {
121121
element = await createFixture<PfV5LabelGroup>(html`
122122
<pf-v5-label-group num-labels="2">
123-
<pf-v5-label>Label 1</pf-v5-label>
124-
<pf-v5-label>Label 2</pf-v5-label>
125-
<pf-v5-label>Label 3</pf-v5-label>
126-
<pf-v5-label>Label 4</pf-v5-label>
123+
<pf-v6-label>Label 1</pf-v6-label>
124+
<pf-v6-label>Label 2</pf-v6-label>
125+
<pf-v6-label>Label 3</pf-v6-label>
126+
<pf-v6-label>Label 4</pf-v6-label>
127127
</pf-v5-label-group>
128128
`);
129129
});
@@ -138,10 +138,10 @@ describe('<pf-v5-label-group>', function() {
138138
beforeEach(async function() {
139139
element = await createFixture<PfV5LabelGroup>(html`
140140
<pf-v5-label-group num-labels="4">
141-
<pf-v5-label>Label 1</pf-v5-label>
142-
<pf-v5-label>Label 2</pf-v5-label>
143-
<pf-v5-label>Label 3</pf-v5-label>
144-
<pf-v5-label>Label 4</pf-v5-label>
141+
<pf-v6-label>Label 1</pf-v6-label>
142+
<pf-v6-label>Label 2</pf-v6-label>
143+
<pf-v6-label>Label 3</pf-v6-label>
144+
<pf-v6-label>Label 4</pf-v6-label>
145145
</pf-v5-label-group>
146146
`);
147147
});
@@ -157,8 +157,8 @@ describe('<pf-v5-label-group>', function() {
157157
element = await createFixture<PfV5LabelGroup>(html`
158158
<pf-v5-label-group>
159159
<span slot="category">Group</span>
160-
<pf-v5-label>Label 1</pf-v5-label>
161-
<pf-v5-label>Label 2</pf-v5-label>
160+
<pf-v6-label>Label 1</pf-v6-label>
161+
<pf-v6-label>Label 2</pf-v6-label>
162162
</pf-v5-label-group>
163163
`);
164164
});

0 commit comments

Comments
 (0)