@patternfly/patternfly 6.0.0-alpha.213 → 6.0.0-alpha.215

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.
@@ -152,9 +152,6 @@ $multiple-file-upload: #{$pf-prefix} + 'c-multiple-file-upload';
152
152
  // Nav
153
153
  $nav: #{$pf-prefix} + 'c-nav';
154
154
 
155
- // Notification Badge
156
- $notification-badge: #{$pf-prefix} + 'c-notification-badge';
157
-
158
155
  // Notification Drawer
159
156
  $notification-drawer: #{$pf-prefix} + 'c-notification-drawer';
160
157
 
@@ -1,87 +0,0 @@
1
- :where(:root, .pf-v6-c-notification-badge) {
2
- --pf-v6-c-notification-badge--BackgroundColor: transparent;
3
- --pf-v6-c-notification-badge--MinWidth: 40px;
4
- --pf-v6-c-notification-badge--Gap: var(--pf-t--global--spacer--xs);
5
- --pf-v6-c-notification-badge--PaddingBlockStart: var(--pf-t--global--spacer--sm);
6
- --pf-v6-c-notification-badge--PaddingInlineEnd: var(--pf-t--global--spacer--sm);
7
- --pf-v6-c-notification-badge--PaddingBlockEnd: var(--pf-t--global--spacer--sm);
8
- --pf-v6-c-notification-badge--PaddingInlineStart: var(--pf-t--global--spacer--sm);
9
- --pf-v6-c-notification-badge--MarginBlockStart: calc(-1 * var(--pf-t--global--spacer--sm));
10
- --pf-v6-c-notification-badge--MarginInlineEnd: calc(-1 * var(--pf-t--global--spacer--sm));
11
- --pf-v6-c-notification-badge--MarginBlockEnd: calc(-1 * var(--pf-t--global--spacer--sm));
12
- --pf-v6-c-notification-badge--MarginInlineStart: calc(-1 * var(--pf-t--global--spacer--sm));
13
- --pf-v6-c-notification-badge--before--BorderColor: transparent;
14
- --pf-v6-c-notification-badge--BorderRadius: var(--pf-t--global--border--radius--small);
15
- --pf-v6-c-notification-badge--before--BorderWidth: var(--pf-t--global--border--width--control--default);
16
- --pf-v6-c-notification-badge--m-read--Color: var(--pf-t--global--text--color--regular);
17
- --pf-v6-c-notification-badge--m-read--before--BorderColor: var(--pf-t--global--border--color--default);
18
- --pf-v6-c-notification-badge--m-read--hover--before--BorderColor: var(--pf-t--global--border--color--hover);
19
- --pf-v6-c-notification-badge--m-read--m-expanded--before--BorderColor: var(--pf-t--global--border--color--clicked);
20
- --pf-v6-c-notification-badge--m-read--BackgroundColor: var(--pf-t--global--background--color--control--default);
21
- --pf-v6-c-notification-badge--m-read--m-expanded--BackgroundColor: var(--pf-t--global--background--color--control--default);
22
- --pf-v6-c-notification-badge--m-read--m-expanded--before--BorderColor: var(--pf-t--global--border--color--clicked);
23
- --pf-v6-c-notification-badge--m-unread--Color: var(--pf-t--global--icon--color--on-brand--default);
24
- --pf-v6-c-notification-badge--m-unread--BackgroundColor: var(--pf-t--global--color--brand--default);
25
- --pf-v6-c-notification-badge--m-unread--hover--BackgroundColor: var(--pf-t--global--color--brand--hover);
26
- --pf-v6-c-notification-badge--m-unread--m-expanded--BackgroundColor: var(--pf-t--global--color--brand--clicked);
27
- --pf-v6-c-notification-badge--m-attention--Color: var(--pf-t--global--icon--color--status--on-danger--default);
28
- --pf-v6-c-notification-badge--m-attention--BackgroundColor: var(--pf-t--global--color--status--danger--default);
29
- --pf-v6-c-notification-badge--m-attention--hover--BackgroundColor: var(--pf-t--global--color--status--danger--hover);
30
- --pf-v6-c-notification-badge--m-attention--m-expanded--BackgroundColor: var(--pf-t--global--color--status--danger--clicked);
31
- }
32
-
33
- .pf-v6-c-notification-badge {
34
- display: inline-flex;
35
- gap: var(--pf-v6-c-notification-badge--Gap);
36
- align-items: center;
37
- justify-content: center;
38
- padding-block-start: var(--pf-v6-c-notification-badge--PaddingBlockStart);
39
- padding-block-end: var(--pf-v6-c-notification-badge--PaddingBlockEnd);
40
- padding-inline-start: var(--pf-v6-c-notification-badge--PaddingInlineStart);
41
- padding-inline-end: var(--pf-v6-c-notification-badge--PaddingInlineEnd);
42
- margin-block-start: var(--pf-v6-c-notification-badge--MarginBlockStart);
43
- margin-block-end: var(--pf-v6-c-notification-badge--MarginBlockEnd);
44
- margin-inline-start: var(--pf-v6-c-notification-badge--MarginInlineStart);
45
- margin-inline-end: var(--pf-v6-c-notification-badge--MarginInlineEnd);
46
- background-color: var(--pf-v6-c-notification-badge--BackgroundColor);
47
- border-radius: var(--pf-v6-c-notification-badge--BorderRadius);
48
- }
49
- .pf-v6-c-notification-badge::before {
50
- position: absolute;
51
- inset-block-start: 0;
52
- inset-block-end: 0;
53
- inset-inline-start: 0;
54
- inset-inline-end: 0;
55
- content: "";
56
- border: var(--pf-v6-c-notification-badge--before--BorderWidth) solid var(--pf-v6-c-notification-badge--before--BorderColor);
57
- border-radius: var(--pf-v6-c-notification-badge--BorderRadius);
58
- transform: translate(var(--pf-v6-c-notification-badge--before--TranslateX), var(--pf-v6-c-notification-badge--before--TranslateY));
59
- }
60
- .pf-v6-c-notification-badge.pf-m-read {
61
- --pf-v6-c-notification-badge--BackgroundColor: var(--pf-v6-c-notification-badge--m-read--BackgroundColor);
62
- --pf-v6-c-notification-badge--before--BorderColor: var(--pf-v6-c-notification-badge--m-read--before--BorderColor);
63
- color: var(--pf-v6-c-notification-badge--m-read--Color, inherit);
64
- }
65
- .pf-v6-c-notification-badge.pf-m-read:hover {
66
- --pf-v6-c-notification-badge--before--BorderColor: var(--pf-v6-c-notification-badge--m-read--hover--before--BorderColor);
67
- }
68
- .pf-v6-c-notification-badge.pf-m-unread {
69
- --pf-v6-c-notification-badge--BackgroundColor: var(--pf-v6-c-notification-badge--m-unread--BackgroundColor);
70
- color: var(--pf-v6-c-notification-badge--m-unread--Color);
71
- }
72
- .pf-v6-c-notification-badge.pf-m-unread:hover {
73
- --pf-v6-c-notification-badge--BackgroundColor: var(--pf-v6-c-notification-badge--m-unread--hover--BackgroundColor);
74
- }
75
- .pf-v6-c-notification-badge.pf-m-attention {
76
- --pf-v6-c-notification-badge--BackgroundColor: var(--pf-v6-c-notification-badge--m-attention--BackgroundColor);
77
- color: var(--pf-v6-c-notification-badge--m-attention--Color);
78
- }
79
- .pf-v6-c-notification-badge.pf-m-attention:hover {
80
- --pf-v6-c-notification-badge--m-attention--BackgroundColor: var(--pf-v6-c-notification-badge--m-attention--hover--BackgroundColor);
81
- }
82
- .pf-v6-c-notification-badge.pf-m-expanded {
83
- --pf-v6-c-notification-badge--m-read--BackgroundColor: var(--pf-v6-c-notification-badge--m-read--m-expanded--BackgroundColor);
84
- --pf-v6-c-notification-badge--m-read--before--BorderColor: var(--pf-v6-c-notification-badge--m-read--m-expanded--before--BorderColor);
85
- --pf-v6-c-notification-badge--m-unread--BackgroundColor: var(--pf-v6-c-notification-badge--m-unread--m-expanded--BackgroundColor);
86
- --pf-v6-c-notification-badge--m-attention--BackgroundColor: var(--pf-v6-c-notification-badge--m-attention--m-expanded--BackgroundColor);
87
- }
@@ -1,108 +0,0 @@
1
- @use '../../sass-utilities' as *;
2
-
3
- :where(:root, .#{$notification-badge}) {
4
- --#{$notification-badge}--BackgroundColor: transparent;
5
- --#{$notification-badge}--MinWidth: 40px;
6
- --#{$notification-badge}--Gap: var(--pf-t--global--spacer--xs);
7
- --#{$notification-badge}--PaddingBlockStart: var(--pf-t--global--spacer--sm);
8
- --#{$notification-badge}--PaddingInlineEnd: var(--pf-t--global--spacer--sm);
9
- --#{$notification-badge}--PaddingBlockEnd: var(--pf-t--global--spacer--sm);
10
- --#{$notification-badge}--PaddingInlineStart: var(--pf-t--global--spacer--sm);
11
- --#{$notification-badge}--MarginBlockStart: calc(-1 * var(--pf-t--global--spacer--sm));
12
- --#{$notification-badge}--MarginInlineEnd: calc(-1 * var(--pf-t--global--spacer--sm));
13
- --#{$notification-badge}--MarginBlockEnd: calc(-1 * var(--pf-t--global--spacer--sm));
14
- --#{$notification-badge}--MarginInlineStart: calc(-1 * var(--pf-t--global--spacer--sm));
15
-
16
- // ::before border treatment
17
- --#{$notification-badge}--before--BorderColor: transparent;
18
- --#{$notification-badge}--BorderRadius: var(--pf-t--global--border--radius--small);
19
- --#{$notification-badge}--before--BorderWidth: var(--pf-t--global--border--width--control--default);
20
-
21
- // Modifiers
22
- --#{$notification-badge}--m-read--Color: var(--pf-t--global--text--color--regular);
23
- --#{$notification-badge}--m-read--before--BorderColor: var(--pf-t--global--border--color--default);
24
- --#{$notification-badge}--m-read--hover--before--BorderColor: var(--pf-t--global--border--color--hover);
25
- --#{$notification-badge}--m-read--m-expanded--before--BorderColor: var(--pf-t--global--border--color--clicked);
26
- --#{$notification-badge}--m-read--BackgroundColor: var(--pf-t--global--background--color--control--default);
27
- --#{$notification-badge}--m-read--m-expanded--BackgroundColor: var(--pf-t--global--background--color--control--default);
28
- --#{$notification-badge}--m-read--m-expanded--before--BorderColor: var(--pf-t--global--border--color--clicked);
29
-
30
- // Unread
31
- --#{$notification-badge}--m-unread--Color: var(--pf-t--global--icon--color--on-brand--default);
32
- --#{$notification-badge}--m-unread--BackgroundColor: var(--pf-t--global--color--brand--default);
33
- --#{$notification-badge}--m-unread--hover--BackgroundColor: var(--pf-t--global--color--brand--hover);
34
- --#{$notification-badge}--m-unread--m-expanded--BackgroundColor: var(--pf-t--global--color--brand--clicked);
35
-
36
- // Attention
37
- --#{$notification-badge}--m-attention--Color: var(--pf-t--global--icon--color--status--on-danger--default);
38
- --#{$notification-badge}--m-attention--BackgroundColor: var(--pf-t--global--color--status--danger--default);
39
- --#{$notification-badge}--m-attention--hover--BackgroundColor: var(--pf-t--global--color--status--danger--hover);
40
- --#{$notification-badge}--m-attention--m-expanded--BackgroundColor: var(--pf-t--global--color--status--danger--clicked);
41
- }
42
-
43
- .#{$notification-badge} {
44
- display: inline-flex;
45
- gap: var(--#{$notification-badge}--Gap);
46
- align-items: center;
47
- justify-content: center;
48
- padding-block-start: var(--#{$notification-badge}--PaddingBlockStart);
49
- padding-block-end: var(--#{$notification-badge}--PaddingBlockEnd);
50
- padding-inline-start: var(--#{$notification-badge}--PaddingInlineStart);
51
- padding-inline-end: var(--#{$notification-badge}--PaddingInlineEnd);
52
- margin-block-start: var(--#{$notification-badge}--MarginBlockStart);
53
- margin-block-end: var(--#{$notification-badge}--MarginBlockEnd);
54
- margin-inline-start: var(--#{$notification-badge}--MarginInlineStart);
55
- margin-inline-end: var(--#{$notification-badge}--MarginInlineEnd);
56
- background-color: var(--#{$notification-badge}--BackgroundColor);
57
- border-radius: var(--#{$notification-badge}--BorderRadius);
58
-
59
- &::before {
60
- position: absolute;
61
- inset-block-start: 0;
62
- inset-block-end: 0;
63
- inset-inline-start: 0;
64
- inset-inline-end: 0;
65
- content: "";
66
- border: var(--#{$notification-badge}--before--BorderWidth) solid var(--#{$notification-badge}--before--BorderColor);
67
- border-radius: var(--#{$notification-badge}--BorderRadius);
68
- transform: translate(var(--#{$notification-badge}--before--TranslateX), var(--#{$notification-badge}--before--TranslateY));
69
- }
70
-
71
- &.pf-m-read {
72
- --#{$notification-badge}--BackgroundColor: var(--#{$notification-badge}--m-read--BackgroundColor);
73
- --#{$notification-badge}--before--BorderColor: var(--#{$notification-badge}--m-read--before--BorderColor);
74
-
75
- color: var(--#{$notification-badge}--m-read--Color, inherit);
76
-
77
- &:hover {
78
- --#{$notification-badge}--before--BorderColor: var(--#{$notification-badge}--m-read--hover--before--BorderColor);
79
- }
80
- }
81
-
82
- &.pf-m-unread {
83
- --#{$notification-badge}--BackgroundColor: var(--#{$notification-badge}--m-unread--BackgroundColor);
84
-
85
- color: var(--#{$notification-badge}--m-unread--Color);
86
-
87
- &:hover {
88
- --#{$notification-badge}--BackgroundColor: var(--#{$notification-badge}--m-unread--hover--BackgroundColor);
89
- }
90
- }
91
-
92
- &.pf-m-attention {
93
- --#{$notification-badge}--BackgroundColor: var(--#{$notification-badge}--m-attention--BackgroundColor);
94
-
95
- color: var(--#{$notification-badge}--m-attention--Color);
96
-
97
- &:hover {
98
- --#{$notification-badge}--m-attention--BackgroundColor: var(--#{$notification-badge}--m-attention--hover--BackgroundColor);
99
- }
100
- }
101
-
102
- &.pf-m-expanded {
103
- --#{$notification-badge}--m-read--BackgroundColor: var(--#{$notification-badge}--m-read--m-expanded--BackgroundColor);
104
- --#{$notification-badge}--m-read--before--BorderColor: var(--#{$notification-badge}--m-read--m-expanded--before--BorderColor);
105
- --#{$notification-badge}--m-unread--BackgroundColor: var(--#{$notification-badge}--m-unread--m-expanded--BackgroundColor);
106
- --#{$notification-badge}--m-attention--BackgroundColor: var(--#{$notification-badge}--m-attention--m-expanded--BackgroundColor);
107
- }
108
- }
@@ -1,258 +0,0 @@
1
- ---
2
- id: Notification badge
3
- section: components
4
- cssPrefix: pf-v6-c-notification-badge
5
- ---## Examples
6
-
7
- ### Basic
8
-
9
- ```html
10
- <div>
11
- <button
12
- class="pf-v6-c-button pf-m-plain"
13
- type="button"
14
- aria-label="Notifications"
15
- >
16
- <span class="pf-v6-c-button__text">
17
- <span class="pf-v6-c-notification-badge pf-m-read">
18
- <i class="pf-v6-pficon-bell" aria-hidden="true"></i>
19
- </span>
20
- </span>
21
- </button>
22
- <button
23
- class="pf-v6-c-button pf-m-plain"
24
- type="button"
25
- aria-label="Unread notifications"
26
- >
27
- <span class="pf-v6-c-button__text">
28
- <span class="pf-v6-c-notification-badge pf-m-unread">
29
- <i class="pf-v6-pficon-bell" aria-hidden="true"></i>
30
- </span>
31
- </span>
32
- </button>
33
- <button
34
- class="pf-v6-c-button pf-m-plain"
35
- type="button"
36
- aria-label="Attention notifications"
37
- >
38
- <span class="pf-v6-c-button__text">
39
- <span class="pf-v6-c-notification-badge pf-m-attention">
40
- <i class="pf-v6-pficon-attention-bell" aria-hidden="true"></i>
41
- </span>
42
- </span>
43
- </button>
44
- <br />
45
- <br />
46
- <button class="pf-v6-c-button pf-m-plain" type="button" aria-label="Tasks">
47
- <span class="pf-v6-c-button__text">
48
- <span class="pf-v6-c-notification-badge pf-m-read">
49
- <i class="pf-v6-pficon-task" aria-hidden="true"></i>
50
- </span>
51
- </span>
52
- </button>
53
- <button
54
- class="pf-v6-c-button pf-m-plain"
55
- type="button"
56
- aria-label="Unread tasks"
57
- >
58
- <span class="pf-v6-c-button__text">
59
- <span class="pf-v6-c-notification-badge pf-m-unread">
60
- <i class="pf-v6-pficon-task" aria-hidden="true"></i>
61
- </span>
62
- </span>
63
- </button>
64
- <button
65
- class="pf-v6-c-button pf-m-plain"
66
- type="button"
67
- aria-label="Attention tasks"
68
- >
69
- <span class="pf-v6-c-button__text">
70
- <span class="pf-v6-c-notification-badge pf-m-attention">
71
- <i class="pf-v6-pficon-task" aria-hidden="true"></i>
72
- </span>
73
- </span>
74
- </button>
75
- </div>
76
-
77
- ```
78
-
79
- ### With count
80
-
81
- ```html
82
- <div>
83
- <button
84
- class="pf-v6-c-button pf-m-plain"
85
- type="button"
86
- aria-label="24 notifications"
87
- >
88
- <span class="pf-v6-c-button__text">
89
- <span class="pf-v6-c-notification-badge pf-m-read">
90
- <i class="pf-v6-pficon-bell" aria-hidden="true"></i>
91
- <span class="pf-v6-c-notification-badge__count">24</span>
92
- </span>
93
- </span>
94
- </button>
95
- <button
96
- class="pf-v6-c-button pf-m-plain"
97
- type="button"
98
- aria-label="24 unread notifications"
99
- >
100
- <span class="pf-v6-c-button__text">
101
- <span class="pf-v6-c-notification-badge pf-m-unread">
102
- <i class="pf-v6-pficon-bell" aria-hidden="true"></i>
103
- <span class="pf-v6-c-notification-badge__count">24</span>
104
- </span>
105
- </span>
106
- </button>
107
- <button
108
- class="pf-v6-c-button pf-m-plain"
109
- type="button"
110
- aria-label="24 attention notifications"
111
- >
112
- <span class="pf-v6-c-button__text">
113
- <span class="pf-v6-c-notification-badge pf-m-attention">
114
- <i class="pf-v6-pficon-attention-bell" aria-hidden="true"></i>
115
- <span class="pf-v6-c-notification-badge__count">24</span>
116
- </span>
117
- </span>
118
- </button>
119
- <br />
120
- <br />
121
- <button class="pf-v6-c-button pf-m-plain" type="button" aria-label="24 tasks">
122
- <span class="pf-v6-c-button__text">
123
- <span class="pf-v6-c-notification-badge pf-m-read">
124
- <i class="pf-v6-pficon-task" aria-hidden="true"></i>
125
- <span class="pf-v6-c-notification-badge__count">24</span>
126
- </span>
127
- </span>
128
- </button>
129
- <button
130
- class="pf-v6-c-button pf-m-plain"
131
- type="button"
132
- aria-label="24 unread tasks"
133
- >
134
- <span class="pf-v6-c-button__text">
135
- <span class="pf-v6-c-notification-badge pf-m-unread">
136
- <i class="pf-v6-pficon-task" aria-hidden="true"></i>
137
- <span class="pf-v6-c-notification-badge__count">24</span>
138
- </span>
139
- </span>
140
- </button>
141
- <button
142
- class="pf-v6-c-button pf-m-plain"
143
- type="button"
144
- aria-label="24 attention tasks"
145
- >
146
- <span class="pf-v6-c-button__text">
147
- <span class="pf-v6-c-notification-badge pf-m-attention">
148
- <i class="pf-v6-pficon-task" aria-hidden="true"></i>
149
- <span class="pf-v6-c-notification-badge__count">24</span>
150
- </span>
151
- </span>
152
- </button>
153
- </div>
154
-
155
- ```
156
-
157
- ### Expanded
158
-
159
- ```html
160
- <div>
161
- <button
162
- class="pf-v6-c-button pf-m-plain"
163
- type="button"
164
- aria-expanded="true"
165
- aria-label="Notifications"
166
- >
167
- <span class="pf-v6-c-button__text">
168
- <span class="pf-v6-c-notification-badge pf-m-read pf-m-expanded">
169
- <i class="pf-v6-pficon-bell" aria-hidden="true"></i>
170
- </span>
171
- </span>
172
- </button>
173
- <button
174
- class="pf-v6-c-button pf-m-plain"
175
- type="button"
176
- aria-expanded="true"
177
- aria-label="Unread notifications"
178
- >
179
- <span class="pf-v6-c-button__text">
180
- <span class="pf-v6-c-notification-badge pf-m-unread pf-m-expanded">
181
- <i class="pf-v6-pficon-bell" aria-hidden="true"></i>
182
- </span>
183
- </span>
184
- </button>
185
- <button
186
- class="pf-v6-c-button pf-m-plain"
187
- type="button"
188
- aria-expanded="true"
189
- aria-label="Attention notifications"
190
- >
191
- <span class="pf-v6-c-button__text">
192
- <span class="pf-v6-c-notification-badge pf-m-attention pf-m-expanded">
193
- <i class="pf-v6-pficon-attention-bell" aria-hidden="true"></i>
194
- </span>
195
- </span>
196
- </button>
197
- <br />
198
- <br />
199
- <button
200
- class="pf-v6-c-button pf-m-plain"
201
- type="button"
202
- aria-expanded="true"
203
- aria-label="Tasks"
204
- >
205
- <span class="pf-v6-c-button__text">
206
- <span class="pf-v6-c-notification-badge pf-m-read pf-m-expanded">
207
- <i class="pf-v6-pficon-task" aria-hidden="true"></i>
208
- </span>
209
- </span>
210
- </button>
211
- <button
212
- class="pf-v6-c-button pf-m-plain"
213
- type="button"
214
- aria-expanded="true"
215
- aria-label="Unread tasks"
216
- >
217
- <span class="pf-v6-c-button__text">
218
- <span class="pf-v6-c-notification-badge pf-m-unread pf-m-expanded">
219
- <i class="pf-v6-pficon-task" aria-hidden="true"></i>
220
- </span>
221
- </span>
222
- </button>
223
- <button
224
- class="pf-v6-c-button pf-m-plain"
225
- type="button"
226
- aria-expanded="true"
227
- aria-label="Attention tasks"
228
- >
229
- <span class="pf-v6-c-button__text">
230
- <span class="pf-v6-c-notification-badge pf-m-attention pf-m-expanded">
231
- <i class="pf-v6-pficon-task" aria-hidden="true"></i>
232
- </span>
233
- </span>
234
- </button>
235
- </div>
236
-
237
- ```
238
-
239
- ## Documentation
240
-
241
- ### Overview
242
-
243
- Always add a modifier class to indicate read, unread, or attention state. Never use the class `.pf-v6-c-notification-badge` on its own.
244
-
245
- ### Accessibility
246
-
247
- Be sure that the component associated with this indicator handles screen reader text indicating read or unread notifications.
248
-
249
- ### Usage
250
-
251
- | Class | Applied to | Outcome |
252
- | -- | -- | -- |
253
- | `.pf-v6-c-notification-badge` | `<div>` | Initiates a notification badge. **Always use it with a modifier class.** |
254
- | `.pf-v6-c-notification-badge__count` | `<span>` | Initiates a notification badge count. |
255
- | `.pf-m-read` | `.pf-v6-c-notification-badge` | Applies read notification badge styling. |
256
- | `.pf-m-unread` | `.pf-v6-c-notification-badge` | Applies unread notification badge styling. |
257
- | `.pf-m-attention` | `.pf-v6-c-notification-badge` | Applies attention notification badge styling. |
258
- | `.pf-m-expanded` | `.pf-v6-c-notification-badge` | Applies expanded notification badge styling. |