@wordpress/components 28.0.0 → 28.1.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/CHANGELOG.md +11 -0
- package/build/radio-control/index.js +1 -1
- package/build/radio-control/index.js.map +1 -1
- package/build/tabs/tablist.js +6 -4
- package/build/tabs/tablist.js.map +1 -1
- package/build/text/styles.js +7 -7
- package/build/text/styles.js.map +1 -1
- package/build-module/radio-control/index.js +1 -1
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/tabs/tablist.js +6 -4
- package/build-module/tabs/tablist.js.map +1 -1
- package/build-module/text/styles.js +7 -7
- package/build-module/text/styles.js.map +1 -1
- package/build-style/style-rtl.css +4 -3
- package/build-style/style.css +4 -3
- package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/tablist.d.ts.map +1 -1
- package/build-types/text/styles.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/checkbox-control/stories/index.story.tsx +3 -0
- package/src/checkbox-control/style.scss +4 -2
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -0
- package/src/heading/test/__snapshots__/index.tsx.snap +1 -0
- package/src/radio-control/index.tsx +1 -1
- package/src/radio-control/style.scss +1 -1
- package/src/tabs/tablist.tsx +6 -4
- package/src/text/styles.ts +1 -0
- package/src/text/test/__snapshots__/index.tsx.snap +2 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -142,6 +142,8 @@ export const WithCustomLabel: StoryFn< typeof CheckboxControl > = ( {
|
|
|
142
142
|
setChecked( v );
|
|
143
143
|
onChange( v );
|
|
144
144
|
} }
|
|
145
|
+
// Disable reason: For simplicity of the code snippet.
|
|
146
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
145
147
|
id="my-checkbox-with-custom-label"
|
|
146
148
|
aria-describedby="my-custom-description"
|
|
147
149
|
/>
|
|
@@ -149,6 +151,7 @@ export const WithCustomLabel: StoryFn< typeof CheckboxControl > = ( {
|
|
|
149
151
|
<label htmlFor="my-checkbox-with-custom-label">
|
|
150
152
|
My custom label
|
|
151
153
|
</label>
|
|
154
|
+
{ /* eslint-disable-next-line no-restricted-syntax */ }
|
|
152
155
|
<div id="my-custom-description" style={ { fontSize: 13 } }>
|
|
153
156
|
A custom description.
|
|
154
157
|
</div>
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
@include break-small() {
|
|
6
6
|
--checkbox-input-size: 20px;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
--checkbox-input-margin: #{$grid-unit-10};
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
.components-checkbox-control__label {
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
.components-checkbox-control__input-container {
|
|
56
58
|
position: relative;
|
|
57
59
|
display: inline-block;
|
|
58
|
-
margin-right:
|
|
60
|
+
margin-right: var(--checkbox-input-margin);
|
|
59
61
|
vertical-align: middle;
|
|
60
62
|
width: var(--checkbox-input-size);
|
|
61
63
|
aspect-ratio: 1;
|
|
@@ -84,5 +86,5 @@ svg.components-checkbox-control__indeterminate {
|
|
|
84
86
|
|
|
85
87
|
.components-checkbox-control__help {
|
|
86
88
|
display: inline-block;
|
|
87
|
-
margin-inline-start: calc(var(--checkbox-input-size) +
|
|
89
|
+
margin-inline-start: calc(var(--checkbox-input-size) + var(--checkbox-input-margin));
|
|
88
90
|
}
|
|
@@ -68,6 +68,7 @@ exports[`DimensionControl rendering renders with custom sizes 1`] = `
|
|
|
68
68
|
color: #1e1e1e;
|
|
69
69
|
line-height: 1.4;
|
|
70
70
|
margin: 0;
|
|
71
|
+
text-wrap: balance;
|
|
71
72
|
text-wrap: pretty;
|
|
72
73
|
font-size: calc((13 / 13) * 13px);
|
|
73
74
|
font-weight: normal;
|
|
@@ -347,6 +348,7 @@ exports[`DimensionControl rendering renders with defaults 1`] = `
|
|
|
347
348
|
color: #1e1e1e;
|
|
348
349
|
line-height: 1.4;
|
|
349
350
|
margin: 0;
|
|
351
|
+
text-wrap: balance;
|
|
350
352
|
text-wrap: pretty;
|
|
351
353
|
font-size: calc((13 / 13) * 13px);
|
|
352
354
|
font-weight: normal;
|
|
@@ -636,6 +638,7 @@ exports[`DimensionControl rendering renders with icon and custom icon label 1`]
|
|
|
636
638
|
color: #1e1e1e;
|
|
637
639
|
line-height: 1.4;
|
|
638
640
|
margin: 0;
|
|
641
|
+
text-wrap: balance;
|
|
639
642
|
text-wrap: pretty;
|
|
640
643
|
font-size: calc((13 / 13) * 13px);
|
|
641
644
|
font-weight: normal;
|
|
@@ -937,6 +940,7 @@ exports[`DimensionControl rendering renders with icon and default icon label 1`]
|
|
|
937
940
|
color: #1e1e1e;
|
|
938
941
|
line-height: 1.4;
|
|
939
942
|
margin: 0;
|
|
943
|
+
text-wrap: balance;
|
|
940
944
|
text-wrap: pretty;
|
|
941
945
|
font-size: calc((13 / 13) * 13px);
|
|
942
946
|
font-weight: normal;
|
package/src/tabs/tablist.tsx
CHANGED
|
@@ -53,10 +53,12 @@ function useTrackElementOffset(
|
|
|
53
53
|
|
|
54
54
|
function updateIndicator( element: HTMLElement ) {
|
|
55
55
|
setIndicatorPosition( {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
// Workaround to prevent unwanted scrollbars, see:
|
|
57
|
+
// https://github.com/WordPress/gutenberg/pull/61979
|
|
58
|
+
left: Math.max( element.offsetLeft - 1, 0 ),
|
|
59
|
+
top: Math.max( element.offsetTop - 1, 0 ),
|
|
60
|
+
width: parseFloat( getComputedStyle( element ).width ),
|
|
61
|
+
height: parseFloat( getComputedStyle( element ).height ),
|
|
60
62
|
} );
|
|
61
63
|
updateCallbackRef.current?.();
|
|
62
64
|
}
|
package/src/text/styles.ts
CHANGED
|
@@ -22,6 +22,7 @@ exports[`Text should render highlighted words with highlightCaseSensitive 1`] =
|
|
|
22
22
|
color: #1e1e1e;
|
|
23
23
|
line-height: 1.4;
|
|
24
24
|
margin: 0;
|
|
25
|
+
text-wrap: balance;
|
|
25
26
|
text-wrap: pretty;
|
|
26
27
|
font-size: calc((13 / 13) * 13px);
|
|
27
28
|
font-weight: normal;
|
|
@@ -54,6 +55,7 @@ exports[`Text snapshot tests should render correctly 1`] = `
|
|
|
54
55
|
color: #1e1e1e;
|
|
55
56
|
line-height: 1.4;
|
|
56
57
|
margin: 0;
|
|
58
|
+
text-wrap: balance;
|
|
57
59
|
text-wrap: pretty;
|
|
58
60
|
font-size: calc((13 / 13) * 13px);
|
|
59
61
|
font-weight: normal;
|