payload-canvas 0.6.5 → 0.6.6

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.
@@ -1,84 +1,84 @@
1
- // The Motion tab. Builds on the Styles panel (styles/styles.scss): its sections, rows and
2
- // variables. Payload CSS variables only, no Tailwind.
3
-
4
- @layer payload-default {
5
- .builder-motion__bar {
6
- display: flex;
7
- align-items: center;
8
- justify-content: space-between;
9
- gap: 8px;
10
- padding: 0 0 8px;
11
- border-bottom: 1px solid var(--theme-elevation-100);
12
- }
13
-
14
- .builder-motion__summary {
15
- min-width: 0;
16
- margin: 0;
17
- color: var(--theme-text);
18
- font-size: var(--be-text-m);
19
- line-height: 1.35;
20
-
21
- &[data-empty] {
22
- color: var(--bs-muted);
23
- }
24
- }
25
-
26
- .builder-motion__preview {
27
- display: inline-flex;
28
- align-items: center;
29
- gap: 5px;
30
- padding: 0 9px 0 8px;
31
- font-weight: var(--be-weight-medium);
32
-
33
- &:disabled {
34
- opacity: 0.45;
35
- cursor: default;
36
- }
37
-
38
- @media (prefers-reduced-motion: no-preference) {
39
- transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
40
-
41
- &:active:not(:disabled) {
42
- transform: scale(0.97);
43
- }
44
- }
45
- }
46
-
47
- // Section head with the remove button at the end, in the rows' reset column.
48
- .builder-motion__head {
49
- display: grid;
50
- grid-template-columns: minmax(0, 1fr) var(--bs-gutter);
51
- align-items: center;
52
- gap: var(--bs-gap);
53
- }
54
-
55
- .builder-motion__note {
56
- margin: -2px 0 2px calc(var(--bs-label) + var(--bs-gap));
57
- color: var(--bs-muted);
58
- font-size: var(--be-text-s);
59
- line-height: 1.4;
60
- }
61
-
62
- .builder-motion__value {
63
- min-width: 46px;
64
- }
65
-
66
- // Payload's checkbox, in the control column and at the panel's text size.
67
- .builder-motion__check {
68
- display: flex;
69
- align-items: center;
70
- min-height: 28px;
71
- padding-left: calc(var(--bs-label) + var(--bs-gap));
72
-
73
- .checkbox-input {
74
- font-size: var(--be-text-m);
75
- }
76
- }
77
-
78
- .builder-motion__foot {
79
- margin: 10px 0 0;
80
- color: var(--bs-muted);
81
- font-size: var(--be-text-s);
82
- line-height: 1.4;
83
- }
84
- }
1
+ // The Motion tab. Builds on the Styles panel (styles/styles.scss): its sections, rows and
2
+ // variables. Payload CSS variables only, no Tailwind.
3
+
4
+ @layer payload-default {
5
+ .builder-motion__bar {
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: space-between;
9
+ gap: 8px;
10
+ padding: 0 0 8px;
11
+ border-bottom: 1px solid var(--theme-elevation-100);
12
+ }
13
+
14
+ .builder-motion__summary {
15
+ min-width: 0;
16
+ margin: 0;
17
+ color: var(--theme-text);
18
+ font-size: var(--be-text-m);
19
+ line-height: 1.35;
20
+
21
+ &[data-empty] {
22
+ color: var(--bs-muted);
23
+ }
24
+ }
25
+
26
+ .builder-motion__preview {
27
+ display: inline-flex;
28
+ align-items: center;
29
+ gap: 5px;
30
+ padding: 0 9px 0 8px;
31
+ font-weight: var(--be-weight-medium);
32
+
33
+ &:disabled {
34
+ opacity: 0.45;
35
+ cursor: default;
36
+ }
37
+
38
+ @media (prefers-reduced-motion: no-preference) {
39
+ transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
40
+
41
+ &:active:not(:disabled) {
42
+ transform: scale(0.97);
43
+ }
44
+ }
45
+ }
46
+
47
+ // Section head with the remove button at the end, in the rows' reset column.
48
+ .builder-motion__head {
49
+ display: grid;
50
+ grid-template-columns: minmax(0, 1fr) var(--bs-gutter);
51
+ align-items: center;
52
+ gap: var(--bs-gap);
53
+ }
54
+
55
+ .builder-motion__note {
56
+ margin: -2px 0 2px calc(var(--bs-label) + var(--bs-gap));
57
+ color: var(--bs-muted);
58
+ font-size: var(--be-text-s);
59
+ line-height: 1.4;
60
+ }
61
+
62
+ .builder-motion__value {
63
+ min-width: 46px;
64
+ }
65
+
66
+ // Payload's checkbox, in the control column and at the panel's text size.
67
+ .builder-motion__check {
68
+ display: flex;
69
+ align-items: center;
70
+ min-height: 28px;
71
+ padding-left: calc(var(--bs-label) + var(--bs-gap));
72
+
73
+ .checkbox-input {
74
+ font-size: var(--be-text-m);
75
+ }
76
+ }
77
+
78
+ .builder-motion__foot {
79
+ margin: 10px 0 0;
80
+ color: var(--bs-muted);
81
+ font-size: var(--be-text-s);
82
+ line-height: 1.4;
83
+ }
84
+ }
@@ -1,39 +1,39 @@
1
- // The editor tooltip (`Tooltips.tsx`). It lives in `<body>`, outside the editor root, so it uses
2
- // Payload's theme variables only.
3
-
4
- @layer payload-default {
5
- @keyframes builder-tooltip-in {
6
- from {
7
- opacity: 0;
8
- }
9
- }
10
-
11
- .builder-tooltip {
12
- position: fixed;
13
- inset: auto;
14
- box-sizing: border-box;
15
- width: max-content;
16
- max-width: 320px;
17
- margin: 0;
18
- padding: 4px 8px;
19
- overflow: visible;
20
- border: 0;
21
- border-radius: var(--style-radius-s, 4px);
22
- background: var(--theme-elevation-900);
23
- color: var(--theme-elevation-0);
24
- font-family: var(--font-body);
25
- font-size: var(--be-text-s);
26
- font-weight: var(--be-weight-medium);
27
- line-height: 16px;
28
- white-space: pre-line;
29
- overflow-wrap: anywhere;
30
- box-shadow: var(--be-shadow);
31
- pointer-events: none;
32
-
33
- @media (prefers-reduced-motion: no-preference) {
34
- &:popover-open {
35
- animation: builder-tooltip-in 100ms ease both;
36
- }
37
- }
38
- }
39
- }
1
+ // The editor tooltip (`Tooltips.tsx`). It lives in `<body>`, outside the editor root, so it uses
2
+ // Payload's theme variables only.
3
+
4
+ @layer payload-default {
5
+ @keyframes builder-tooltip-in {
6
+ from {
7
+ opacity: 0;
8
+ }
9
+ }
10
+
11
+ .builder-tooltip {
12
+ position: fixed;
13
+ inset: auto;
14
+ box-sizing: border-box;
15
+ width: max-content;
16
+ max-width: 320px;
17
+ margin: 0;
18
+ padding: 4px 8px;
19
+ overflow: visible;
20
+ border: 0;
21
+ border-radius: var(--style-radius-s, 4px);
22
+ background: var(--theme-elevation-900);
23
+ color: var(--theme-elevation-0);
24
+ font-family: var(--font-body);
25
+ font-size: var(--be-text-s);
26
+ font-weight: var(--be-weight-medium);
27
+ line-height: 16px;
28
+ white-space: pre-line;
29
+ overflow-wrap: anywhere;
30
+ box-shadow: var(--be-shadow);
31
+ pointer-events: none;
32
+
33
+ @media (prefers-reduced-motion: no-preference) {
34
+ &:popover-open {
35
+ animation: builder-tooltip-in 100ms ease both;
36
+ }
37
+ }
38
+ }
39
+ }
@@ -1,134 +1,134 @@
1
- // Drawers over the builder: Payload's Versions and API screens, and the page settings drawer.
2
- // They render in Payload's modal container, outside `.builder-editor`, so they use Payload's CSS
3
- // variables only. No Tailwind.
4
-
5
- @layer payload-default {
6
- // The width applies from the first frame. Payload animates every drawer property, so a width
7
- // that changes after the drawer opened would animate too.
8
- .builder-screen-drawer > .drawer__content {
9
- width: min(1280px, calc(100% - var(--gutter-h))) !important;
10
- }
11
-
12
- .builder-screen-drawer__header {
13
- position: sticky;
14
- z-index: 3;
15
- top: 0;
16
- border-bottom: 1px solid var(--theme-elevation-100);
17
- background: var(--theme-bg);
18
- }
19
-
20
- .builder-screen-drawer__bar {
21
- display: flex;
22
- align-items: center;
23
- gap: calc(var(--base) * 0.5);
24
- min-height: calc(var(--base) * 2.5);
25
- padding: calc(var(--base) * 1.5) 0 var(--base);
26
- }
27
-
28
- .builder-screen-drawer__title {
29
- flex: 1;
30
- min-width: 0;
31
- margin: 0;
32
- overflow: hidden;
33
- text-overflow: ellipsis;
34
- white-space: nowrap;
35
- }
36
-
37
- .builder-screen-drawer__icon-button {
38
- display: inline-grid;
39
- flex: none;
40
- place-items: center;
41
- width: 32px;
42
- height: 32px;
43
- padding: 0;
44
- border: 0;
45
- border-radius: var(--style-radius-s, 4px);
46
- background: transparent;
47
- color: var(--theme-elevation-800);
48
- cursor: pointer;
49
-
50
- &:hover {
51
- background: var(--theme-elevation-100);
52
- color: var(--theme-text);
53
- }
54
-
55
- &:focus-visible {
56
- outline: 2px solid var(--theme-success-500);
57
- outline-offset: 0;
58
- }
59
- }
60
-
61
- .builder-screen-drawer__restore {
62
- display: inline-flex;
63
- flex: none;
64
- align-items: center;
65
- gap: 6px;
66
- height: 32px;
67
- padding: 0 12px;
68
- border: 0;
69
- border-radius: var(--style-radius-s, 4px);
70
- background: var(--theme-elevation-800);
71
- color: var(--theme-elevation-0);
72
- font: inherit;
73
- font-size: var(--be-text-m);
74
- font-weight: var(--be-weight-medium);
75
- cursor: pointer;
76
-
77
- &:hover:not(:disabled) {
78
- background: var(--theme-elevation-1000);
79
- }
80
-
81
- &:disabled {
82
- opacity: 0.5;
83
- cursor: default;
84
- }
85
-
86
- &:focus-visible {
87
- outline: 2px solid var(--theme-success-500);
88
- outline-offset: 2px;
89
- }
90
- }
91
-
92
- .builder-screen-drawer__body {
93
- transition: opacity 150ms ease;
94
-
95
- // Loading the next screen: the current one stays, dimmed.
96
- &[aria-busy='true'] {
97
- opacity: 0.55;
98
- pointer-events: none;
99
- }
100
- }
101
-
102
- // Wraps the screen only to catch its link clicks: no box of its own.
103
- .builder-screen-drawer__screen {
104
- display: contents;
105
- }
106
-
107
- .builder-screen-drawer__loading {
108
- display: flex;
109
- flex-direction: column;
110
- gap: var(--base);
111
- padding-top: var(--base);
112
- }
113
-
114
- .builder-screen-drawer__error {
115
- margin: var(--base) 0;
116
- color: var(--theme-elevation-800);
117
- }
118
-
119
- .builder-screen-drawer__link {
120
- padding: 0;
121
- border: 0;
122
- background: none;
123
- color: var(--theme-text);
124
- font: inherit;
125
- text-decoration: underline;
126
- cursor: pointer;
127
- }
128
-
129
- // Restore runs through the builder (the header button): Payload's own would leave the live
130
- // session out.
131
- .builder-screen-drawer .restore-version {
132
- display: none;
133
- }
134
- }
1
+ // Drawers over the builder: Payload's Versions and API screens, and the page settings drawer.
2
+ // They render in Payload's modal container, outside `.builder-editor`, so they use Payload's CSS
3
+ // variables only. No Tailwind.
4
+
5
+ @layer payload-default {
6
+ // The width applies from the first frame. Payload animates every drawer property, so a width
7
+ // that changes after the drawer opened would animate too.
8
+ .builder-screen-drawer > .drawer__content {
9
+ width: min(1280px, calc(100% - var(--gutter-h))) !important;
10
+ }
11
+
12
+ .builder-screen-drawer__header {
13
+ position: sticky;
14
+ z-index: 3;
15
+ top: 0;
16
+ border-bottom: 1px solid var(--theme-elevation-100);
17
+ background: var(--theme-bg);
18
+ }
19
+
20
+ .builder-screen-drawer__bar {
21
+ display: flex;
22
+ align-items: center;
23
+ gap: calc(var(--base) * 0.5);
24
+ min-height: calc(var(--base) * 2.5);
25
+ padding: calc(var(--base) * 1.5) 0 var(--base);
26
+ }
27
+
28
+ .builder-screen-drawer__title {
29
+ flex: 1;
30
+ min-width: 0;
31
+ margin: 0;
32
+ overflow: hidden;
33
+ text-overflow: ellipsis;
34
+ white-space: nowrap;
35
+ }
36
+
37
+ .builder-screen-drawer__icon-button {
38
+ display: inline-grid;
39
+ flex: none;
40
+ place-items: center;
41
+ width: 32px;
42
+ height: 32px;
43
+ padding: 0;
44
+ border: 0;
45
+ border-radius: var(--style-radius-s, 4px);
46
+ background: transparent;
47
+ color: var(--theme-elevation-800);
48
+ cursor: pointer;
49
+
50
+ &:hover {
51
+ background: var(--theme-elevation-100);
52
+ color: var(--theme-text);
53
+ }
54
+
55
+ &:focus-visible {
56
+ outline: 2px solid var(--theme-success-500);
57
+ outline-offset: 0;
58
+ }
59
+ }
60
+
61
+ .builder-screen-drawer__restore {
62
+ display: inline-flex;
63
+ flex: none;
64
+ align-items: center;
65
+ gap: 6px;
66
+ height: 32px;
67
+ padding: 0 12px;
68
+ border: 0;
69
+ border-radius: var(--style-radius-s, 4px);
70
+ background: var(--theme-elevation-800);
71
+ color: var(--theme-elevation-0);
72
+ font: inherit;
73
+ font-size: var(--be-text-m);
74
+ font-weight: var(--be-weight-medium);
75
+ cursor: pointer;
76
+
77
+ &:hover:not(:disabled) {
78
+ background: var(--theme-elevation-1000);
79
+ }
80
+
81
+ &:disabled {
82
+ opacity: 0.5;
83
+ cursor: default;
84
+ }
85
+
86
+ &:focus-visible {
87
+ outline: 2px solid var(--theme-success-500);
88
+ outline-offset: 2px;
89
+ }
90
+ }
91
+
92
+ .builder-screen-drawer__body {
93
+ transition: opacity 150ms ease;
94
+
95
+ // Loading the next screen: the current one stays, dimmed.
96
+ &[aria-busy='true'] {
97
+ opacity: 0.55;
98
+ pointer-events: none;
99
+ }
100
+ }
101
+
102
+ // Wraps the screen only to catch its link clicks: no box of its own.
103
+ .builder-screen-drawer__screen {
104
+ display: contents;
105
+ }
106
+
107
+ .builder-screen-drawer__loading {
108
+ display: flex;
109
+ flex-direction: column;
110
+ gap: var(--base);
111
+ padding-top: var(--base);
112
+ }
113
+
114
+ .builder-screen-drawer__error {
115
+ margin: var(--base) 0;
116
+ color: var(--theme-elevation-800);
117
+ }
118
+
119
+ .builder-screen-drawer__link {
120
+ padding: 0;
121
+ border: 0;
122
+ background: none;
123
+ color: var(--theme-text);
124
+ font: inherit;
125
+ text-decoration: underline;
126
+ cursor: pointer;
127
+ }
128
+
129
+ // Restore runs through the builder (the header button): Payload's own would leave the live
130
+ // session out.
131
+ .builder-screen-drawer .restore-version {
132
+ display: none;
133
+ }
134
+ }
@@ -1,32 +1,32 @@
1
- // The "Not saved" banner in the settings drawer (settingsDrawer.tsx). It renders inside Payload's
2
- // document controls, outside `.builder-editor`, so it uses Payload's CSS variables only.
3
-
4
- @layer payload-default {
5
- // Above the form's fields (the banner moves there from the controls row).
6
- .builder-stale-save__slot {
7
- padding: var(--base) var(--gutter-h) 0;
8
- }
9
-
10
- .builder-stale-save {
11
- display: flex;
12
- flex-wrap: wrap;
13
- align-items: center;
14
- gap: calc(var(--base) * 0.5) var(--base);
15
- width: 100%;
16
- padding: calc(var(--base) * 0.5) calc(var(--base) * 0.75);
17
- border: 1px solid var(--theme-error-300);
18
- border-radius: var(--style-radius-m);
19
- background: var(--theme-error-50);
20
- color: var(--theme-error-800);
21
- line-height: 1.4;
22
- }
23
-
24
- .builder-stale-save__text {
25
- flex: 1 1 280px;
26
- margin: 0;
27
- }
28
-
29
- .builder-stale-save__reload {
30
- flex: none;
31
- }
32
- }
1
+ // The "Not saved" banner in the settings drawer (settingsDrawer.tsx). It renders inside Payload's
2
+ // document controls, outside `.builder-editor`, so it uses Payload's CSS variables only.
3
+
4
+ @layer payload-default {
5
+ // Above the form's fields (the banner moves there from the controls row).
6
+ .builder-stale-save__slot {
7
+ padding: var(--base) var(--gutter-h) 0;
8
+ }
9
+
10
+ .builder-stale-save {
11
+ display: flex;
12
+ flex-wrap: wrap;
13
+ align-items: center;
14
+ gap: calc(var(--base) * 0.5) var(--base);
15
+ width: 100%;
16
+ padding: calc(var(--base) * 0.5) calc(var(--base) * 0.75);
17
+ border: 1px solid var(--theme-error-300);
18
+ border-radius: var(--style-radius-m);
19
+ background: var(--theme-error-50);
20
+ color: var(--theme-error-800);
21
+ line-height: 1.4;
22
+ }
23
+
24
+ .builder-stale-save__text {
25
+ flex: 1 1 280px;
26
+ margin: 0;
27
+ }
28
+
29
+ .builder-stale-save__reload {
30
+ flex: none;
31
+ }
32
+ }