@times-design-system/components-wordpress 1.13.0 → 1.16.1-alpha.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/dist/STYLE_HANDLES.md +3 -1
- package/dist/blocks/ad-container/block.json +5 -0
- package/dist/blocks/ad-container/render.php +10 -1
- package/dist/blocks/ad-container/style.css +1 -1
- package/dist/blocks/ad-container/style.scss +4 -3
- package/dist/blocks/button/block.json +5 -0
- package/dist/blocks/button/init.js +1 -1
- package/dist/blocks/button/render.php +12 -2
- package/dist/blocks/button/style.css +1 -1
- package/dist/blocks/button/style.scss +33 -33
- package/dist/blocks/chip/block.json +15 -0
- package/dist/blocks/chip/render.php +54 -21
- package/dist/blocks/chip/style.css +1 -1
- package/dist/blocks/chip/style.scss +137 -77
- package/dist/blocks/dialog-box/block.json +5 -0
- package/dist/blocks/dialog-box/render.php +9 -1
- package/dist/blocks/dialog-box/style.css +1 -1
- package/dist/blocks/dialog-box/style.scss +8 -6
- package/dist/blocks/divider/block.json +21 -1
- package/dist/blocks/divider/render.php +9 -1
- package/dist/blocks/divider/style.css +1 -1
- package/dist/blocks/divider/style.scss +5 -4
- package/dist/blocks/icon/block.json +5 -0
- package/dist/blocks/icon/render.php +10 -12
- package/dist/blocks/icon/style.css +1 -1
- package/dist/blocks/icon/style.scss +5 -1
- package/dist/blocks/icon-button/block.json +5 -0
- package/dist/blocks/icon-button/render.php +16 -6
- package/dist/blocks/icon-button/style.css +1 -1
- package/dist/blocks/icon-button/style.scss +34 -33
- package/dist/blocks/input/block.json +5 -0
- package/dist/blocks/input/render.php +10 -1
- package/dist/blocks/input/style.css +1 -1
- package/dist/blocks/input/style.scss +16 -14
- package/dist/blocks/input-helper-message/block.json +5 -0
- package/dist/blocks/input-helper-message/render.php +9 -1
- package/dist/blocks/input-helper-message/style.css +1 -1
- package/dist/blocks/input-helper-message/style.scss +7 -6
- package/dist/blocks/label/block.json +68 -0
- package/dist/blocks/label/edit.js +79 -0
- package/dist/blocks/label/index.js +11 -0
- package/dist/blocks/label/render.php +56 -0
- package/dist/blocks/label/save.js +21 -0
- package/dist/blocks/label/style.css +1 -0
- package/dist/blocks/label/style.scss +39 -0
- package/dist/blocks/link/block.json +5 -0
- package/dist/blocks/link/render.php +3 -1
- package/dist/blocks/link/style.css +1 -1
- package/dist/blocks/link/style.scss +20 -19
- package/dist/blocks/tab/block.json +5 -0
- package/dist/blocks/tab/render.php +9 -1
- package/dist/blocks/tab/style.css +1 -1
- package/dist/blocks/tab/style.scss +17 -16
- package/dist/blocks/tab-group/block.json +5 -0
- package/dist/blocks/tab-group/render.php +9 -1
- package/dist/blocks/tab-group/style.css +1 -1
- package/dist/blocks/tab-group/style.scss +4 -2
- package/dist/blocks/tag/block.json +5 -0
- package/dist/blocks/tag/render.php +10 -1
- package/dist/blocks/tag/style.css +1 -1
- package/dist/blocks/tag/style.scss +24 -26
- package/dist/blocks/text/block.json +5 -0
- package/dist/blocks/text/render.php +9 -1
- package/dist/blocks/text/style.scss +1 -1
- package/dist/blocks/toast/block.json +5 -0
- package/dist/blocks/toast/render.php +10 -1
- package/dist/blocks/toast/style.css +1 -1
- package/dist/blocks/toast/style.scss +14 -13
- package/dist/icon-data.json +1 -1
- package/dist/index.cjs +485 -177
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +485 -177
- package/dist/index.js.map +1 -1
- package/dist/plugin.php +1 -0
- package/dist/style-handles.json +5 -0
- package/dist/utils/render-icon.php +129 -117
- package/dist/utils/sanitize-aria-attributes.php +109 -0
- package/package.json +4 -4
- package/plugin.php +1 -0
- package/dist/blocks/utils/render-icon.php +0 -106
- package/dist/blocks/utils/sanitize-data-attributes.php +0 -37
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
/* Chip Block Frontend Styles */
|
|
2
|
-
/* Uses
|
|
2
|
+
/* Uses theme-scoped CSS variables from @times-design-system/theme-scss */
|
|
3
3
|
/* Synchronized with packages/components-react/src/Chip/styles.css */
|
|
4
4
|
|
|
5
|
-
@import '@times-design-system/theme-scss/src/
|
|
5
|
+
@import '@times-design-system/theme-scss/src/theme-classes.scss';
|
|
6
|
+
@import '@times-design-system/theme-scss/src/theme-apply.scss';
|
|
6
7
|
@import '@times-design-system/theme-scss/src/tds-layout.scss';
|
|
7
8
|
@import '@times-design-system/theme-scss/src/tds-typography.scss';
|
|
8
9
|
|
|
9
10
|
.tds-chip {
|
|
10
|
-
--tds-chip-bg:
|
|
11
|
-
--tds-chip-bg-hover:
|
|
12
|
-
--tds-chip-bg-pressed:
|
|
13
|
-
--tds-chip-fg:
|
|
14
|
-
--tds-chip-fg-hover:
|
|
15
|
-
--tds-chip-fg-pressed:
|
|
16
|
-
--tds-chip-icon:
|
|
17
|
-
--tds-chip-icon-hover:
|
|
18
|
-
--tds-chip-icon-pressed:
|
|
11
|
+
--tds-chip-bg: var(--interactive-chip-primary-on-fill-default);
|
|
12
|
+
--tds-chip-bg-hover: var(--interactive-chip-primary-on-fill-hover);
|
|
13
|
+
--tds-chip-bg-pressed: var(--interactive-chip-primary-on-fill-pressed);
|
|
14
|
+
--tds-chip-fg: var(--interactive-chip-primary-on-text-default);
|
|
15
|
+
--tds-chip-fg-hover: var(--interactive-chip-primary-on-text-hover);
|
|
16
|
+
--tds-chip-fg-pressed: var(--interactive-chip-primary-on-text-pressed);
|
|
17
|
+
--tds-chip-icon: var(--interactive-chip-primary-on-icon-default);
|
|
18
|
+
--tds-chip-icon-hover: var(--interactive-chip-primary-on-icon-hover);
|
|
19
|
+
--tds-chip-icon-pressed: var(--interactive-chip-primary-on-icon-pressed);
|
|
19
20
|
--tds-chip-border: transparent;
|
|
20
21
|
--tds-chip-border-hover: transparent;
|
|
21
22
|
--tds-chip-border-pressed: transparent;
|
|
22
|
-
--tds-chip-focus-ring:
|
|
23
|
+
--tds-chip-focus-ring: var(--text-tertiary);
|
|
23
24
|
|
|
24
25
|
position: relative;
|
|
25
26
|
display: inline-flex;
|
|
@@ -45,12 +46,24 @@
|
|
|
45
46
|
color: var(--tds-chip-fg-hover);
|
|
46
47
|
}
|
|
47
48
|
|
|
49
|
+
a.tds-chip:hover {
|
|
50
|
+
background-color: var(--tds-chip-bg-hover);
|
|
51
|
+
border-color: var(--tds-chip-border-hover);
|
|
52
|
+
color: var(--tds-chip-fg-hover);
|
|
53
|
+
}
|
|
54
|
+
|
|
48
55
|
.tds-chip:active:not(:disabled) {
|
|
49
56
|
background-color: var(--tds-chip-bg-pressed);
|
|
50
57
|
border-color: var(--tds-chip-border-pressed);
|
|
51
58
|
color: var(--tds-chip-fg-pressed);
|
|
52
59
|
}
|
|
53
60
|
|
|
61
|
+
a.tds-chip:active {
|
|
62
|
+
background-color: var(--tds-chip-bg-pressed);
|
|
63
|
+
border-color: var(--tds-chip-border-pressed);
|
|
64
|
+
color: var(--tds-chip-fg-pressed);
|
|
65
|
+
}
|
|
66
|
+
|
|
54
67
|
.tds-chip:focus-visible {
|
|
55
68
|
outline: none;
|
|
56
69
|
background-color: var(--tds-chip-bg-hover);
|
|
@@ -58,6 +71,13 @@
|
|
|
58
71
|
color: var(--tds-chip-fg-hover);
|
|
59
72
|
}
|
|
60
73
|
|
|
74
|
+
a.tds-chip:focus-visible {
|
|
75
|
+
outline: none;
|
|
76
|
+
background-color: var(--tds-chip-bg-hover);
|
|
77
|
+
border-color: var(--tds-chip-border-hover);
|
|
78
|
+
color: var(--tds-chip-fg-hover);
|
|
79
|
+
}
|
|
80
|
+
|
|
61
81
|
.tds-chip:focus-visible::after {
|
|
62
82
|
content: '';
|
|
63
83
|
position: absolute;
|
|
@@ -68,9 +88,9 @@
|
|
|
68
88
|
}
|
|
69
89
|
|
|
70
90
|
.tds-chip:disabled {
|
|
71
|
-
background-color:
|
|
91
|
+
background-color: var(--interactive-disabled-b);
|
|
72
92
|
border-color: transparent;
|
|
73
|
-
color:
|
|
93
|
+
color: var(--interactive-disabled-a);
|
|
74
94
|
cursor: not-allowed;
|
|
75
95
|
}
|
|
76
96
|
|
|
@@ -120,94 +140,134 @@
|
|
|
120
140
|
color: var(--tds-chip-icon-hover);
|
|
121
141
|
}
|
|
122
142
|
|
|
143
|
+
a.tds-chip:hover .tds-chip__icon,
|
|
144
|
+
a.tds-chip:focus-visible .tds-chip__icon {
|
|
145
|
+
color: var(--tds-chip-icon-hover);
|
|
146
|
+
}
|
|
147
|
+
|
|
123
148
|
.tds-chip:active:not(:disabled) .tds-chip__icon {
|
|
124
149
|
color: var(--tds-chip-icon-pressed);
|
|
125
150
|
}
|
|
126
151
|
|
|
152
|
+
a.tds-chip:active .tds-chip__icon {
|
|
153
|
+
color: var(--tds-chip-icon-pressed);
|
|
154
|
+
}
|
|
155
|
+
|
|
127
156
|
.tds-chip:disabled .tds-chip__icon {
|
|
128
|
-
color:
|
|
157
|
+
color: var(--interactive-disabled-a);
|
|
129
158
|
}
|
|
130
159
|
|
|
131
160
|
/* Intent: Primary, Toggle: On (default) */
|
|
132
161
|
.tds-chip--intent-primary.tds-chip--toggle-on {
|
|
133
|
-
--tds-chip-bg:
|
|
134
|
-
--tds-chip-bg-hover:
|
|
135
|
-
--tds-chip-bg-pressed:
|
|
136
|
-
--tds-chip-fg:
|
|
137
|
-
--tds-chip-fg-hover:
|
|
138
|
-
--tds-chip-fg-pressed:
|
|
139
|
-
--tds-chip-icon:
|
|
140
|
-
--tds-chip-icon-hover:
|
|
141
|
-
--tds-chip-icon-pressed:
|
|
162
|
+
--tds-chip-bg: var(--interactive-chip-primary-on-fill-default);
|
|
163
|
+
--tds-chip-bg-hover: var(--interactive-chip-primary-on-fill-hover);
|
|
164
|
+
--tds-chip-bg-pressed: var(--interactive-chip-primary-on-fill-pressed);
|
|
165
|
+
--tds-chip-fg: var(--interactive-chip-primary-on-text-default);
|
|
166
|
+
--tds-chip-fg-hover: var(--interactive-chip-primary-on-text-hover);
|
|
167
|
+
--tds-chip-fg-pressed: var(--interactive-chip-primary-on-text-pressed);
|
|
168
|
+
--tds-chip-icon: var(--interactive-chip-primary-on-icon-default);
|
|
169
|
+
--tds-chip-icon-hover: var(--interactive-chip-primary-on-icon-hover);
|
|
170
|
+
--tds-chip-icon-pressed: var(--interactive-chip-primary-on-icon-pressed);
|
|
142
171
|
}
|
|
143
172
|
|
|
144
173
|
/* Intent: Primary, Toggle: Off */
|
|
145
174
|
.tds-chip--intent-primary.tds-chip--toggle-off {
|
|
146
|
-
--tds-chip-bg:
|
|
147
|
-
--tds-chip-bg-hover:
|
|
148
|
-
--tds-chip-bg-pressed:
|
|
149
|
-
--tds-chip-fg:
|
|
150
|
-
--tds-chip-fg-hover:
|
|
151
|
-
--tds-chip-fg-pressed:
|
|
152
|
-
--tds-chip-icon:
|
|
153
|
-
--tds-chip-icon-hover:
|
|
154
|
-
--tds-chip-icon-pressed:
|
|
155
|
-
--tds-chip-border:
|
|
156
|
-
--tds-chip-border-hover:
|
|
157
|
-
--tds-chip-border-pressed:
|
|
175
|
+
--tds-chip-bg: var(--interactive-chip-primary-off-fill-default);
|
|
176
|
+
--tds-chip-bg-hover: var(--interactive-chip-primary-off-fill-hover);
|
|
177
|
+
--tds-chip-bg-pressed: var(--interactive-chip-primary-off-fill-pressed);
|
|
178
|
+
--tds-chip-fg: var(--interactive-chip-primary-off-text-default);
|
|
179
|
+
--tds-chip-fg-hover: var(--interactive-chip-primary-off-text-hover);
|
|
180
|
+
--tds-chip-fg-pressed: var(--interactive-chip-primary-off-text-pressed);
|
|
181
|
+
--tds-chip-icon: var(--interactive-chip-primary-off-icon-default);
|
|
182
|
+
--tds-chip-icon-hover: var(--interactive-chip-primary-off-icon-hover);
|
|
183
|
+
--tds-chip-icon-pressed: var(--interactive-chip-primary-off-icon-pressed);
|
|
184
|
+
--tds-chip-border: var(--interactive-chip-primary-off-border-default);
|
|
185
|
+
--tds-chip-border-hover: var(--interactive-chip-primary-off-border-hover);
|
|
186
|
+
--tds-chip-border-pressed: var(--interactive-chip-primary-off-border-pressed);
|
|
158
187
|
}
|
|
159
188
|
|
|
160
189
|
/* Intent: Secondary, Toggle: On */
|
|
161
190
|
.tds-chip--intent-secondary.tds-chip--toggle-on {
|
|
162
|
-
--tds-chip-bg:
|
|
163
|
-
--tds-chip-bg-hover:
|
|
164
|
-
--tds-chip-bg-pressed:
|
|
165
|
-
--tds-chip-fg:
|
|
166
|
-
--tds-chip-fg-hover:
|
|
167
|
-
--tds-chip-fg-pressed:
|
|
168
|
-
--tds-chip-icon:
|
|
169
|
-
--tds-chip-icon-hover:
|
|
170
|
-
--tds-chip-icon-pressed:
|
|
171
|
-
--tds-chip-border:
|
|
172
|
-
--tds-chip-border-hover:
|
|
173
|
-
--tds-chip-border-pressed:
|
|
191
|
+
--tds-chip-bg: var(--interactive-chip-secondary-on-fill-default);
|
|
192
|
+
--tds-chip-bg-hover: var(--interactive-chip-secondary-on-fill-hover);
|
|
193
|
+
--tds-chip-bg-pressed: var(--interactive-chip-secondary-on-fill-pressed);
|
|
194
|
+
--tds-chip-fg: var(--interactive-chip-secondary-on-text-default);
|
|
195
|
+
--tds-chip-fg-hover: var(--interactive-chip-secondary-on-text-hover);
|
|
196
|
+
--tds-chip-fg-pressed: var(--interactive-chip-secondary-on-text-pressed);
|
|
197
|
+
--tds-chip-icon: var(--interactive-chip-secondary-on-icon-default);
|
|
198
|
+
--tds-chip-icon-hover: var(--interactive-chip-secondary-on-icon-hover);
|
|
199
|
+
--tds-chip-icon-pressed: var(--interactive-chip-secondary-on-icon-pressed);
|
|
200
|
+
--tds-chip-border: var(--interactive-chip-secondary-on-border-default);
|
|
201
|
+
--tds-chip-border-hover: var(--interactive-chip-secondary-on-border-hover);
|
|
202
|
+
--tds-chip-border-pressed: var(--interactive-chip-secondary-on-border-pressed);
|
|
174
203
|
}
|
|
175
204
|
|
|
176
205
|
/* Intent: Secondary, Toggle: Off */
|
|
177
206
|
.tds-chip--intent-secondary.tds-chip--toggle-off {
|
|
178
|
-
--tds-chip-bg:
|
|
179
|
-
--tds-chip-bg-hover:
|
|
180
|
-
--tds-chip-bg-pressed:
|
|
181
|
-
--tds-chip-fg:
|
|
182
|
-
--tds-chip-fg-hover:
|
|
183
|
-
--tds-chip-fg-pressed:
|
|
184
|
-
--tds-chip-icon:
|
|
185
|
-
--tds-chip-icon-hover:
|
|
186
|
-
--tds-chip-icon-pressed:
|
|
207
|
+
--tds-chip-bg: var(--interactive-chip-secondary-off-fill-default);
|
|
208
|
+
--tds-chip-bg-hover: var(--interactive-chip-secondary-off-fill-hover);
|
|
209
|
+
--tds-chip-bg-pressed: var(--interactive-chip-secondary-off-fill-pressed);
|
|
210
|
+
--tds-chip-fg: var(--interactive-chip-secondary-off-text-default);
|
|
211
|
+
--tds-chip-fg-hover: var(--interactive-chip-secondary-off-text-hover);
|
|
212
|
+
--tds-chip-fg-pressed: var(--interactive-chip-secondary-off-text-pressed);
|
|
213
|
+
--tds-chip-icon: var(--interactive-chip-secondary-off-icon-default);
|
|
214
|
+
--tds-chip-icon-hover: var(--interactive-chip-secondary-off-icon-hover);
|
|
215
|
+
--tds-chip-icon-pressed: var(--interactive-chip-secondary-off-icon-pressed);
|
|
187
216
|
}
|
|
188
217
|
|
|
189
218
|
/* Channel: True (for filtering), Toggle: On */
|
|
190
|
-
.tds-chip--channel
|
|
191
|
-
--tds-chip-bg:
|
|
192
|
-
--tds-chip-bg-hover:
|
|
193
|
-
--tds-chip-bg-pressed:
|
|
194
|
-
--tds-chip-fg:
|
|
195
|
-
--tds-chip-fg-hover:
|
|
196
|
-
--tds-chip-fg-pressed:
|
|
219
|
+
.tds-chip--channel {
|
|
220
|
+
--tds-chip-bg: var(--interactive-chip-channel-primary-on-fill-default);
|
|
221
|
+
--tds-chip-bg-hover: var(--interactive-chip-channel-primary-on-fill-hover);
|
|
222
|
+
--tds-chip-bg-pressed: var(--interactive-chip-channel-primary-on-fill-pressed);
|
|
223
|
+
--tds-chip-fg: var(--interactive-chip-channel-primary-on-text-default);
|
|
224
|
+
--tds-chip-fg-hover: var(--interactive-chip-channel-primary-on-text-hover);
|
|
225
|
+
--tds-chip-fg-pressed: var(--interactive-chip-channel-primary-on-text-pressed);
|
|
226
|
+
--tds-chip-icon: var(--interactive-chip-channel-primary-on-icon-default);
|
|
227
|
+
--tds-chip-icon-hover: var(--interactive-chip-channel-primary-on-icon-hover);
|
|
228
|
+
--tds-chip-icon-pressed: var(--interactive-chip-channel-primary-on-icon-pressed);
|
|
229
|
+
--tds-chip-border: var(--interactive-chip-channel-primary-on-border-default);
|
|
230
|
+
--tds-chip-border-hover: var(--interactive-chip-channel-primary-on-border-hover);
|
|
231
|
+
--tds-chip-border-pressed: var(--interactive-chip-channel-primary-on-border-pressed);
|
|
232
|
+
}
|
|
233
|
+
.tds-chip--channel.tds-chip--toggle-off {
|
|
234
|
+
--tds-chip-bg: var(--interactive-chip-channel-primary-off-fill-default);
|
|
235
|
+
--tds-chip-bg-hover: var(--interactive-chip-channel-primary-off-fill-hover);
|
|
236
|
+
--tds-chip-bg-pressed: var(--interactive-chip-channel-primary-off-fill-pressed);
|
|
237
|
+
--tds-chip-fg: var(--interactive-chip-channel-primary-off-text-default);
|
|
238
|
+
--tds-chip-fg-hover: var(--interactive-chip-channel-primary-off-text-hover);
|
|
239
|
+
--tds-chip-fg-pressed: var(--interactive-chip-channel-primary-off-text-pressed);
|
|
240
|
+
--tds-chip-icon: var(--interactive-chip-channel-primary-off-icon-default);
|
|
241
|
+
--tds-chip-icon-hover: var(--interactive-chip-channel-primary-off-icon-hover);
|
|
242
|
+
--tds-chip-icon-pressed: var(--interactive-chip-channel-primary-off-icon-pressed);
|
|
243
|
+
--tds-chip-border: var(--interactive-chip-channel-primary-off-border-default);
|
|
244
|
+
--tds-chip-border-hover: var(--interactive-chip-channel-primary-off-border-hover);
|
|
245
|
+
--tds-chip-border-pressed: var(--interactive-chip-channel-primary-off-border-pressed);
|
|
197
246
|
}
|
|
198
247
|
|
|
199
248
|
/* Channel: Secondary, Toggle: On */
|
|
200
|
-
.tds-chip--channel-secondary
|
|
201
|
-
--tds-chip-bg:
|
|
202
|
-
--tds-chip-bg-hover:
|
|
203
|
-
--tds-chip-bg-pressed:
|
|
204
|
-
--tds-chip-fg:
|
|
205
|
-
--tds-chip-fg-hover:
|
|
206
|
-
--tds-chip-fg-pressed:
|
|
207
|
-
--tds-chip-icon:
|
|
208
|
-
--tds-chip-icon-hover:
|
|
209
|
-
--tds-chip-icon-pressed:
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
--tds-chip-
|
|
249
|
+
.tds-chip--channel-secondary {
|
|
250
|
+
--tds-chip-bg: var(--interactive-chip-channel-secondary-on-fill-default);
|
|
251
|
+
--tds-chip-bg-hover: var(--interactive-chip-channel-secondary-on-fill-hover);
|
|
252
|
+
--tds-chip-bg-pressed: var(--interactive-chip-channel-secondary-on-fill-pressed);
|
|
253
|
+
--tds-chip-fg: var(--interactive-chip-channel-secondary-on-text-default);
|
|
254
|
+
--tds-chip-fg-hover: var(--interactive-chip-channel-secondary-on-text-hover);
|
|
255
|
+
--tds-chip-fg-pressed: var(--interactive-chip-channel-secondary-on-text-pressed);
|
|
256
|
+
--tds-chip-icon: var(--interactive-chip-channel-secondary-on-icon-default);
|
|
257
|
+
--tds-chip-icon-hover: var(--interactive-chip-channel-secondary-on-icon-hover);
|
|
258
|
+
--tds-chip-icon-pressed: var(--interactive-chip-channel-secondary-on-icon-pressed);
|
|
259
|
+
}
|
|
260
|
+
.tds-chip--channel.tds-chip--intent-secondary.tds-chip--toggle-off {
|
|
261
|
+
--tds-chip-bg: var(--interactive-chip-channel-secondary-off-fill-default);
|
|
262
|
+
--tds-chip-bg-hover: var(--interactive-chip-channel-secondary-off-fill-hover);
|
|
263
|
+
--tds-chip-bg-pressed: var(--interactive-chip-channel-secondary-off-fill-pressed);
|
|
264
|
+
--tds-chip-fg: var(--interactive-chip-channel-secondary-off-text-default);
|
|
265
|
+
--tds-chip-fg-hover: var(--interactive-chip-channel-secondary-off-text-hover);
|
|
266
|
+
--tds-chip-fg-pressed: var(--interactive-chip-channel-secondary-off-text-pressed);
|
|
267
|
+
--tds-chip-icon: var(--interactive-chip-channel-secondary-off-icon-default);
|
|
268
|
+
--tds-chip-icon-hover: var(--interactive-chip-channel-secondary-off-icon-hover);
|
|
269
|
+
--tds-chip-icon-pressed: var(--interactive-chip-channel-secondary-off-icon-pressed);
|
|
270
|
+
--tds-chip-border: transparent;
|
|
271
|
+
--tds-chip-border-hover: transparent;
|
|
272
|
+
--tds-chip-border-pressed: transparent;
|
|
213
273
|
}
|
|
@@ -27,6 +27,11 @@
|
|
|
27
27
|
"type": "object",
|
|
28
28
|
"default": {},
|
|
29
29
|
"description": "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
30
|
+
},
|
|
31
|
+
"ariaAttributes": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"default": {},
|
|
34
|
+
"description": "Custom aria-* attributes for extensibility (allowlisted server-side)"
|
|
30
35
|
}
|
|
31
36
|
},
|
|
32
37
|
"render": "file:./render.php",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
require_once __DIR__ . '/../../utils/sanitize-data-attributes.php';
|
|
15
|
+
require_once __DIR__ . '/../../utils/sanitize-aria-attributes.php';
|
|
15
16
|
|
|
16
17
|
$content_text = isset($attributes['content']) ? wp_kses_post($attributes['content']) : '';
|
|
17
18
|
$element_class_name = isset($attributes['classes']) ? sanitize_text_field($attributes['classes']) : '';
|
|
@@ -23,6 +24,13 @@ foreach ($sanitized_data_attributes as $attr_name => $attr_value) {
|
|
|
23
24
|
$data_attrs_html .= ' ' . esc_attr($attr_name) . '="' . esc_attr($attr_value) . '"';
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
// Sanitize and prepare aria-* attributes
|
|
28
|
+
$sanitized_aria_attributes = tds_sanitize_aria_attributes($attributes['ariaAttributes'] ?? [], 'dialog-box', $attributes);
|
|
29
|
+
$aria_attrs_html = '';
|
|
30
|
+
foreach ($sanitized_aria_attributes as $attr_name => $attr_value) {
|
|
31
|
+
$aria_attrs_html .= ' ' . esc_attr($attr_name) . '="' . esc_attr($attr_value) . '"';
|
|
32
|
+
}
|
|
33
|
+
|
|
26
34
|
$wrapper_classes = ['tds-dialog-box'];
|
|
27
35
|
if ($element_class_name) {
|
|
28
36
|
$wrapper_classes[] = $element_class_name;
|
|
@@ -30,6 +38,6 @@ if ($element_class_name) {
|
|
|
30
38
|
$wrapper_attributes = get_block_wrapper_attributes(['class' => implode(' ', $wrapper_classes)]);
|
|
31
39
|
|
|
32
40
|
?>
|
|
33
|
-
<div <?php echo wp_kses_post($wrapper_attributes); ?><?php echo
|
|
41
|
+
<div <?php echo wp_kses_post($wrapper_attributes); ?><?php echo $aria_attrs_html; ?><?php echo $data_attrs_html; ?>>
|
|
34
42
|
<?php echo wp_kses_post($content_text); ?>
|
|
35
43
|
</div>
|