@wordpress/preferences 4.32.0 → 4.32.1-next.b8c8708f3.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.
Files changed (68) hide show
  1. package/build/components/index.js +36 -12
  2. package/build/components/index.js.map +7 -1
  3. package/build/components/preference-base-option/index.js +39 -30
  4. package/build/components/preference-base-option/index.js.map +7 -1
  5. package/build/components/preference-toggle-control/index.js +52 -30
  6. package/build/components/preference-toggle-control/index.js.map +7 -1
  7. package/build/components/preference-toggle-menu-item/index.js +65 -47
  8. package/build/components/preference-toggle-menu-item/index.js.map +7 -1
  9. package/build/components/preferences-modal/index.js +35 -23
  10. package/build/components/preferences-modal/index.js.map +7 -1
  11. package/build/components/preferences-modal-section/index.js +31 -28
  12. package/build/components/preferences-modal-section/index.js.map +7 -1
  13. package/build/components/preferences-modal-tabs/index.js +123 -134
  14. package/build/components/preferences-modal-tabs/index.js.map +7 -1
  15. package/build/index.js +29 -36
  16. package/build/index.js.map +7 -1
  17. package/build/lock-unlock.js +31 -15
  18. package/build/lock-unlock.js.map +7 -1
  19. package/build/private-apis.js +49 -24
  20. package/build/private-apis.js.map +7 -1
  21. package/build/store/actions.js +36 -69
  22. package/build/store/actions.js.map +7 -1
  23. package/build/store/constants.js +27 -12
  24. package/build/store/constants.js.map +7 -1
  25. package/build/store/index.js +44 -32
  26. package/build/store/index.js.map +7 -1
  27. package/build/store/reducer.js +39 -65
  28. package/build/store/reducer.js.map +7 -1
  29. package/build/store/selectors.js +67 -33
  30. package/build/store/selectors.js.map +7 -1
  31. package/build-module/components/index.js +5 -2
  32. package/build-module/components/index.js.map +7 -1
  33. package/build-module/components/preference-base-option/index.js +21 -24
  34. package/build-module/components/preference-base-option/index.js.map +7 -1
  35. package/build-module/components/preference-toggle-control/index.js +24 -23
  36. package/build-module/components/preference-toggle-control/index.js.map +7 -1
  37. package/build-module/components/preference-toggle-menu-item/index.js +46 -40
  38. package/build-module/components/preference-toggle-menu-item/index.js.map +7 -1
  39. package/build-module/components/preferences-modal/index.js +17 -17
  40. package/build-module/components/preferences-modal/index.js.map +7 -1
  41. package/build-module/components/preferences-modal-section/index.js +13 -23
  42. package/build-module/components/preferences-modal-section/index.js.map +7 -1
  43. package/build-module/components/preferences-modal-tabs/index.js +116 -127
  44. package/build-module/components/preferences-modal-tabs/index.js.map +7 -1
  45. package/build-module/index.js +7 -4
  46. package/build-module/index.js.map +7 -1
  47. package/build-module/lock-unlock.js +8 -7
  48. package/build-module/lock-unlock.js.map +7 -1
  49. package/build-module/private-apis.js +11 -11
  50. package/build-module/private-apis.js.map +7 -1
  51. package/build-module/store/actions.js +15 -65
  52. package/build-module/store/actions.js.map +7 -1
  53. package/build-module/store/constants.js +5 -7
  54. package/build-module/store/constants.js.map +7 -1
  55. package/build-module/store/index.js +10 -22
  56. package/build-module/store/index.js.map +7 -1
  57. package/build-module/store/reducer.js +17 -59
  58. package/build-module/store/reducer.js.map +7 -1
  59. package/build-module/store/selectors.js +35 -26
  60. package/build-module/store/selectors.js.map +7 -1
  61. package/build-style/style-rtl.css +4 -158
  62. package/build-style/style.css +4 -158
  63. package/package.json +20 -12
  64. package/src/components/preference-base-option/style.scss +2 -0
  65. package/src/components/preferences-modal/style.scss +6 -2
  66. package/src/components/preferences-modal-section/style.scss +3 -0
  67. package/src/components/preferences-modal-tabs/style.scss +4 -1
  68. package/src/style.scss +4 -4
@@ -1,12 +1,3 @@
1
- /**
2
- * Colors
3
- */
4
- /**
5
- * Breakpoints & Media Queries
6
- */
7
- /**
8
- * Colors
9
- */
10
1
  /**
11
2
  * SCSS Variables.
12
3
  *
@@ -14,51 +5,9 @@
14
5
  * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
15
6
  * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
16
7
  */
17
- /**
18
- * Fonts & basic variables.
19
- */
20
- /**
21
- * Typography
22
- */
23
- /**
24
- * Grid System.
25
- * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
26
- */
27
- /**
28
- * Radius scale.
29
- */
30
- /**
31
- * Elevation scale.
32
- */
33
- /**
34
- * Dimensions.
35
- */
36
- /**
37
- * Mobile specific styles
38
- */
39
- /**
40
- * Editor styles.
41
- */
42
- /**
43
- * Block & Editor UI.
44
- */
45
- /**
46
- * Block paddings.
47
- */
48
- /**
49
- * React Native specific.
50
- * These variables do not appear to be used anywhere else.
51
- */
52
8
  /**
53
9
  * Colors
54
10
  */
55
- /**
56
- * SCSS Variables.
57
- *
58
- * Please use variables from this sheet to ensure consistency across the UI.
59
- * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
60
- * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
61
- */
62
11
  /**
63
12
  * Fonts & basic variables.
64
13
  */
@@ -94,94 +43,16 @@
94
43
  * React Native specific.
95
44
  * These variables do not appear to be used anywhere else.
96
45
  */
46
+ .preference-base-option + .preference-base-option {
47
+ margin-top: 16px;
48
+ }
49
+
97
50
  /**
98
51
  * Breakpoints & Media Queries
99
52
  */
100
- /**
101
- * Converts a hex value into the rgb equivalent.
102
- *
103
- * @param {string} hex - the hexadecimal value to convert
104
- * @return {string} comma separated rgb values
105
- */
106
- /**
107
- * Long content fade mixin
108
- *
109
- * Creates a fading overlay to signify that the content is longer
110
- * than the space allows.
111
- */
112
- /**
113
- * Typography
114
- */
115
- /**
116
- * Breakpoint mixins
117
- */
118
- /**
119
- * Focus styles.
120
- */
121
- /**
122
- * Applies editor left position to the selector passed as argument
123
- */
124
- /**
125
- * Styles that are reused verbatim in a few places
126
- */
127
- /**
128
- * Allows users to opt-out of animations via OS-level preferences.
129
- */
130
- /**
131
- * Reset default styles for JavaScript UI based pages.
132
- * This is a WP-admin agnostic reset
133
- */
134
- /**
135
- * Reset the WP Admin page styles for Gutenberg-like pages.
136
- */
137
- /**
138
- * Colors
139
- */
140
- /**
141
- * SCSS Variables.
142
- *
143
- * Please use variables from this sheet to ensure consistency across the UI.
144
- * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
145
- * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
146
- */
147
- /**
148
- * Fonts & basic variables.
149
- */
150
53
  /**
151
54
  * Typography
152
55
  */
153
- /**
154
- * Grid System.
155
- * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
156
- */
157
- /**
158
- * Radius scale.
159
- */
160
- /**
161
- * Elevation scale.
162
- */
163
- /**
164
- * Dimensions.
165
- */
166
- /**
167
- * Mobile specific styles
168
- */
169
- /**
170
- * Editor styles.
171
- */
172
- /**
173
- * Block & Editor UI.
174
- */
175
- /**
176
- * Block paddings.
177
- */
178
- /**
179
- * React Native specific.
180
- * These variables do not appear to be used anywhere else.
181
- */
182
- /**
183
- * Breakpoints & Media Queries
184
- */
185
56
  /**
186
57
  * Converts a hex value into the rgb equivalent.
187
58
  *
@@ -194,9 +65,6 @@
194
65
  * Creates a fading overlay to signify that the content is longer
195
66
  * than the space allows.
196
67
  */
197
- /**
198
- * Typography
199
- */
200
68
  /**
201
69
  * Breakpoint mixins
202
70
  */
@@ -219,28 +87,6 @@
219
87
  /**
220
88
  * Reset the WP Admin page styles for Gutenberg-like pages.
221
89
  */
222
- :root {
223
- --wp-block-synced-color: #7a00df;
224
- --wp-block-synced-color--rgb: 122, 0, 223;
225
- --wp-bound-block-color: var(--wp-block-synced-color);
226
- --wp-admin-theme-color: #007cba;
227
- --wp-admin-theme-color--rgb: 0, 124, 186;
228
- --wp-admin-theme-color-darker-10: #006ba1;
229
- --wp-admin-theme-color-darker-10--rgb: 0, 107, 161;
230
- --wp-admin-theme-color-darker-20: #005a87;
231
- --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
232
- --wp-admin-border-width-focus: 2px;
233
- }
234
- @media (min-resolution: 192dpi) {
235
- :root {
236
- --wp-admin-border-width-focus: 1.5px;
237
- }
238
- }
239
-
240
- .preference-base-option + .preference-base-option {
241
- margin-top: 16px;
242
- }
243
-
244
90
  @media (min-width: 600px) {
245
91
  .preferences-modal {
246
92
  width: calc(100% - 32px);
@@ -1,12 +1,3 @@
1
- /**
2
- * Colors
3
- */
4
- /**
5
- * Breakpoints & Media Queries
6
- */
7
- /**
8
- * Colors
9
- */
10
1
  /**
11
2
  * SCSS Variables.
12
3
  *
@@ -14,51 +5,9 @@
14
5
  * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
15
6
  * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
16
7
  */
17
- /**
18
- * Fonts & basic variables.
19
- */
20
- /**
21
- * Typography
22
- */
23
- /**
24
- * Grid System.
25
- * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
26
- */
27
- /**
28
- * Radius scale.
29
- */
30
- /**
31
- * Elevation scale.
32
- */
33
- /**
34
- * Dimensions.
35
- */
36
- /**
37
- * Mobile specific styles
38
- */
39
- /**
40
- * Editor styles.
41
- */
42
- /**
43
- * Block & Editor UI.
44
- */
45
- /**
46
- * Block paddings.
47
- */
48
- /**
49
- * React Native specific.
50
- * These variables do not appear to be used anywhere else.
51
- */
52
8
  /**
53
9
  * Colors
54
10
  */
55
- /**
56
- * SCSS Variables.
57
- *
58
- * Please use variables from this sheet to ensure consistency across the UI.
59
- * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
60
- * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
61
- */
62
11
  /**
63
12
  * Fonts & basic variables.
64
13
  */
@@ -94,94 +43,16 @@
94
43
  * React Native specific.
95
44
  * These variables do not appear to be used anywhere else.
96
45
  */
46
+ .preference-base-option + .preference-base-option {
47
+ margin-top: 16px;
48
+ }
49
+
97
50
  /**
98
51
  * Breakpoints & Media Queries
99
52
  */
100
- /**
101
- * Converts a hex value into the rgb equivalent.
102
- *
103
- * @param {string} hex - the hexadecimal value to convert
104
- * @return {string} comma separated rgb values
105
- */
106
- /**
107
- * Long content fade mixin
108
- *
109
- * Creates a fading overlay to signify that the content is longer
110
- * than the space allows.
111
- */
112
- /**
113
- * Typography
114
- */
115
- /**
116
- * Breakpoint mixins
117
- */
118
- /**
119
- * Focus styles.
120
- */
121
- /**
122
- * Applies editor left position to the selector passed as argument
123
- */
124
- /**
125
- * Styles that are reused verbatim in a few places
126
- */
127
- /**
128
- * Allows users to opt-out of animations via OS-level preferences.
129
- */
130
- /**
131
- * Reset default styles for JavaScript UI based pages.
132
- * This is a WP-admin agnostic reset
133
- */
134
- /**
135
- * Reset the WP Admin page styles for Gutenberg-like pages.
136
- */
137
- /**
138
- * Colors
139
- */
140
- /**
141
- * SCSS Variables.
142
- *
143
- * Please use variables from this sheet to ensure consistency across the UI.
144
- * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
145
- * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
146
- */
147
- /**
148
- * Fonts & basic variables.
149
- */
150
53
  /**
151
54
  * Typography
152
55
  */
153
- /**
154
- * Grid System.
155
- * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
156
- */
157
- /**
158
- * Radius scale.
159
- */
160
- /**
161
- * Elevation scale.
162
- */
163
- /**
164
- * Dimensions.
165
- */
166
- /**
167
- * Mobile specific styles
168
- */
169
- /**
170
- * Editor styles.
171
- */
172
- /**
173
- * Block & Editor UI.
174
- */
175
- /**
176
- * Block paddings.
177
- */
178
- /**
179
- * React Native specific.
180
- * These variables do not appear to be used anywhere else.
181
- */
182
- /**
183
- * Breakpoints & Media Queries
184
- */
185
56
  /**
186
57
  * Converts a hex value into the rgb equivalent.
187
58
  *
@@ -194,9 +65,6 @@
194
65
  * Creates a fading overlay to signify that the content is longer
195
66
  * than the space allows.
196
67
  */
197
- /**
198
- * Typography
199
- */
200
68
  /**
201
69
  * Breakpoint mixins
202
70
  */
@@ -219,28 +87,6 @@
219
87
  /**
220
88
  * Reset the WP Admin page styles for Gutenberg-like pages.
221
89
  */
222
- :root {
223
- --wp-block-synced-color: #7a00df;
224
- --wp-block-synced-color--rgb: 122, 0, 223;
225
- --wp-bound-block-color: var(--wp-block-synced-color);
226
- --wp-admin-theme-color: #007cba;
227
- --wp-admin-theme-color--rgb: 0, 124, 186;
228
- --wp-admin-theme-color-darker-10: #006ba1;
229
- --wp-admin-theme-color-darker-10--rgb: 0, 107, 161;
230
- --wp-admin-theme-color-darker-20: #005a87;
231
- --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
232
- --wp-admin-border-width-focus: 2px;
233
- }
234
- @media (min-resolution: 192dpi) {
235
- :root {
236
- --wp-admin-border-width-focus: 1.5px;
237
- }
238
- }
239
-
240
- .preference-base-option + .preference-base-option {
241
- margin-top: 16px;
242
- }
243
-
244
90
  @media (min-width: 600px) {
245
91
  .preferences-modal {
246
92
  width: calc(100% - 32px);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/preferences",
3
- "version": "4.32.0",
3
+ "version": "4.32.1-next.b8c8708f3.0",
4
4
  "description": "Utilities for managing WordPress preferences.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -26,20 +26,28 @@
26
26
  },
27
27
  "main": "build/index.js",
28
28
  "module": "build-module/index.js",
29
+ "exports": {
30
+ ".": {
31
+ "import": "./build-module/index.js",
32
+ "require": "./build/index.js"
33
+ },
34
+ "./package.json": "./package.json",
35
+ "./build-style/": "./build-style/"
36
+ },
29
37
  "react-native": "src/index",
30
38
  "wpScript": true,
31
39
  "sideEffects": false,
32
40
  "dependencies": {
33
- "@babel/runtime": "7.25.7",
34
- "@wordpress/a11y": "^4.32.0",
35
- "@wordpress/components": "^30.5.0",
36
- "@wordpress/compose": "^7.32.0",
37
- "@wordpress/data": "^10.32.0",
38
- "@wordpress/deprecated": "^4.32.0",
39
- "@wordpress/element": "^6.32.0",
40
- "@wordpress/i18n": "^6.5.0",
41
- "@wordpress/icons": "^10.32.0",
42
- "@wordpress/private-apis": "^1.32.0",
41
+ "@wordpress/a11y": "^4.32.1-next.b8c8708f3.0",
42
+ "@wordpress/base-styles": "^6.8.1-next.b8c8708f3.0",
43
+ "@wordpress/components": "^30.6.1-next.b8c8708f3.0",
44
+ "@wordpress/compose": "^7.32.1-next.b8c8708f3.0",
45
+ "@wordpress/data": "^10.32.1-next.b8c8708f3.0",
46
+ "@wordpress/deprecated": "^4.32.1-next.b8c8708f3.0",
47
+ "@wordpress/element": "^6.32.1-next.b8c8708f3.0",
48
+ "@wordpress/i18n": "^6.5.1-next.b8c8708f3.0",
49
+ "@wordpress/icons": "^11.0.1-next.b8c8708f3.0",
50
+ "@wordpress/private-apis": "^1.32.1-next.b8c8708f3.0",
43
51
  "clsx": "^2.1.1"
44
52
  },
45
53
  "peerDependencies": {
@@ -49,5 +57,5 @@
49
57
  "publishConfig": {
50
58
  "access": "public"
51
59
  },
52
- "gitHead": "a030b4c0e0695239b942c7dc18511782b64f10ed"
60
+ "gitHead": "67cfd7e661931aeb0d06bec894599d287a4f8d0f"
53
61
  }
@@ -1,3 +1,5 @@
1
+ @use "@wordpress/base-styles/variables" as *;
2
+
1
3
  .preference-base-option {
2
4
  & + & {
3
5
  margin-top: $grid-unit-20;
@@ -1,3 +1,7 @@
1
+ @use "@wordpress/base-styles/breakpoints" as breakpoints;
2
+ @use "@wordpress/base-styles/mixins" as *;
3
+ @use "@wordpress/base-styles/variables" as *;
4
+
1
5
  .preferences-modal {
2
6
  // To keep modal dimensions consistent as subsections are navigated, width
3
7
  // and height are used instead of max-(width/height).
@@ -6,14 +10,14 @@
6
10
  height: calc(100% - #{ $header-height * 2 });
7
11
  }
8
12
  @include break-medium() {
9
- width: $break-medium - $grid-unit-20 * 2;
13
+ width: breakpoints.$break-medium - $grid-unit-20 * 2;
10
14
  }
11
15
  @include break-large() {
12
16
  height: 70%;
13
17
  }
14
18
 
15
19
  // Clears spacing to flush fit the navigator component to the modal edges.
16
- @media (max-width: #{ ($break-medium - 1) }) {
20
+ @media (max-width: #{ (breakpoints.$break-medium - 1) }) {
17
21
  .components-modal__content {
18
22
  padding: 0;
19
23
  }
@@ -1,3 +1,6 @@
1
+ @use "@wordpress/base-styles/colors" as *;
2
+ @use "@wordpress/base-styles/variables" as *;
3
+
1
4
  .preferences-modal__section {
2
5
  // Reset `fieldset` browser defaults.
3
6
  border: 0;
@@ -1,3 +1,6 @@
1
+ @use "@wordpress/base-styles/breakpoints" as breakpoints;
2
+ @use "@wordpress/base-styles/variables" as *;
3
+
1
4
  $vertical-tabs-width: 160px;
2
5
 
3
6
  .preferences__tabs-tablist {
@@ -13,7 +16,7 @@ $vertical-tabs-width: 160px;
13
16
  margin-left: $vertical-tabs-width;
14
17
  }
15
18
 
16
- @media (max-width: #{ ($break-medium - 1) }) {
19
+ @media (max-width: #{ (breakpoints.$break-medium - 1) }) {
17
20
  // Keep the navigator component from overflowing the modal content area
18
21
  // to ensure that sticky position elements stick where intended.
19
22
  .preferences__provider {
package/src/style.scss CHANGED
@@ -1,4 +1,4 @@
1
- @import "./components/preference-base-option/style.scss";
2
- @import "./components/preferences-modal/style.scss";
3
- @import "./components/preferences-modal-tabs/style.scss";
4
- @import "./components/preferences-modal-section/style.scss";
1
+ @use "./components/preference-base-option/style.scss" as *;
2
+ @use "./components/preferences-modal/style.scss" as *;
3
+ @use "./components/preferences-modal-tabs/style.scss" as *;
4
+ @use "./components/preferences-modal-section/style.scss" as *;