Skip to content

Commit e6d4256

Browse files
jameskosterciampoaduth
authored
Theme: Update dimension tokens (WordPress#75054)
* Consolidate dimension tokens * changelog * Update instances of old tokens * Begin scale at xs * Gap tokens * update stack instances, badge, box story * Remap gap tokens, fix Box * Introduce 32px gap * Use spaces for CHANGELOG indentation --------- Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: aduth <aduth@git.wordpress.org>
1 parent d8d98cc commit e6d4256

File tree

58 files changed

+423
-338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+423
-338
lines changed

packages/dataviews/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ Example:
12021202
id: 'title',
12031203
type: 'text',
12041204
header: (
1205-
<Stack direction="row" gap="2xs" justify="start">
1205+
<Stack direction="row" gap="xs" justify="start">
12061206
<Icon icon={ icon } />
12071207
<span>Title</span>
12081208
</Stack>

packages/dataviews/src/components/dataform-controls/date.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,11 +383,11 @@ function CalendarDateControl< Item >( {
383383
label={ displayLabel }
384384
hideLabelFromVision={ hideLabelFromVision }
385385
>
386-
<Stack direction="column" gap="md">
386+
<Stack direction="column" gap="lg">
387387
{ /* Preset buttons */ }
388388
<Stack
389389
direction="row"
390-
gap="xs"
390+
gap="sm"
391391
wrap="wrap"
392392
justify="flex-start"
393393
>
@@ -591,11 +591,11 @@ function CalendarDateRangeControl< Item >( {
591591
label={ displayLabel }
592592
hideLabelFromVision={ hideLabelFromVision }
593593
>
594-
<Stack direction="column" gap="md">
594+
<Stack direction="column" gap="lg">
595595
{ /* Preset buttons */ }
596596
<Stack
597597
direction="row"
598-
gap="xs"
598+
gap="sm"
599599
wrap="wrap"
600600
justify="flex-start"
601601
>
@@ -631,7 +631,7 @@ function CalendarDateRangeControl< Item >( {
631631
{ /* Manual date range inputs */ }
632632
<Stack
633633
direction="row"
634-
gap="xs"
634+
gap="sm"
635635
justify="space-between"
636636
className="dataviews-controls__date-range-inputs"
637637
>

packages/dataviews/src/components/dataform-controls/datetime.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function CalendarDateTimeControl< Item >( {
167167
help={ description }
168168
hideLabelFromVision={ hideLabelFromVision }
169169
>
170-
<Stack direction="column" gap="md">
170+
<Stack direction="column" gap="lg">
171171
{ /* Calendar widget */ }
172172
<DateCalendar
173173
style={ { width: '100%' } }

packages/dataviews/src/components/dataform-controls/utils/relative-date-control.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default function RelativeDateControl< Item >( {
9292
label={ label }
9393
hideLabelFromVision={ hideLabelFromVision }
9494
>
95-
<Stack direction="row" gap="xs">
95+
<Stack direction="row" gap="sm">
9696
<NumberControl
9797
__next40pxDefaultSize
9898
className="dataviews-controls__relative-date-number"

packages/dataviews/src/components/dataform-layouts/data-form-layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { getFormFieldLayout } from './index';
1717
import DataFormContext from '../dataform-context';
1818

1919
const DEFAULT_WRAPPER = ( { children }: { children: React.ReactNode } ) => (
20-
<Stack direction="column" className="dataforms-layouts__wrapper" gap="md">
20+
<Stack direction="column" className="dataforms-layouts__wrapper" gap="lg">
2121
{ children }
2222
</Stack>
2323
);

packages/dataviews/src/components/dataform-layouts/details/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default function FormDetailsField< Item >( {
109109
<Stack
110110
direction="row"
111111
align="center"
112-
gap="sm"
112+
gap="md"
113113
className="dataforms-layouts-details__summary-content"
114114
>
115115
{ summaryContent }

packages/dataviews/src/components/dataform-layouts/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const FORM_FIELD_LAYOUTS = [
2121
<Stack
2222
direction="column"
2323
className="dataforms-layouts__wrapper"
24-
gap="md"
24+
gap="lg"
2525
>
2626
{ children }
2727
</Stack>
@@ -34,7 +34,7 @@ const FORM_FIELD_LAYOUTS = [
3434
<Stack
3535
direction="column"
3636
className="dataforms-layouts__wrapper"
37-
gap="xs"
37+
gap="sm"
3838
>
3939
{ children }
4040
</Stack>
@@ -47,7 +47,7 @@ const FORM_FIELD_LAYOUTS = [
4747
<Stack
4848
direction="column"
4949
className="dataforms-layouts__wrapper"
50-
gap="lg"
50+
gap="xl"
5151
>
5252
{ children }
5353
</Stack>
@@ -66,12 +66,12 @@ const FORM_FIELD_LAYOUTS = [
6666
<Stack
6767
direction="column"
6868
className="dataforms-layouts__wrapper"
69-
gap="md"
69+
gap="lg"
7070
>
7171
<div className="dataforms-layouts-row__field">
7272
<Stack
7373
direction="row"
74-
gap="md"
74+
gap="lg"
7575
align={ ( layout as NormalizedRowLayout ).alignment }
7676
>
7777
{ children }

packages/dataviews/src/components/dataform-layouts/panel/dropdown.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ function DropdownHeader( {
3939
<Stack
4040
direction="column"
4141
className="dataforms-layouts-panel__dropdown-header"
42-
gap="md"
42+
gap="lg"
4343
>
44-
<Stack direction="row" gap="xs" align="center">
44+
<Stack direction="row" gap="sm" align="center">
4545
{ title && (
4646
<Heading level={ 2 } size={ 13 }>
4747
{ title }

packages/dataviews/src/components/dataform-layouts/panel/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export default function FormPanelField< Item >( {
172172
<Tooltip text={ errorMessage } placement="top">
173173
<Stack
174174
direction="row"
175-
gap="xs"
175+
gap="sm"
176176
className="dataforms-layouts-panel__field-label-error-content"
177177
justify="flex-start"
178178
>
@@ -234,7 +234,7 @@ export default function FormPanelField< Item >( {
234234
return (
235235
<Stack
236236
direction="row"
237-
gap="xs"
237+
gap="sm"
238238
className="dataforms-layouts-panel__field dataforms-layouts-panel__field--label-position-none"
239239
>
240240
{ showError && (
@@ -257,7 +257,7 @@ export default function FormPanelField< Item >( {
257257
return (
258258
<Stack
259259
direction="row"
260-
gap="xs"
260+
gap="sm"
261261
ref={ setPopoverAnchor }
262262
className="dataforms-layouts-panel__field"
263263
>

packages/dataviews/src/components/dataform-layouts/panel/modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function ModalContent< Item >( {
132132
<Stack
133133
direction="row"
134134
className="dataforms-layouts-panel__modal-footer"
135-
gap="sm"
135+
gap="md"
136136
>
137137
<Spacer style={ { flex: 1 } } />
138138
<Button

0 commit comments

Comments
 (0)