@wordpress/preferences 4.32.0 → 4.32.1-next.47f435fc9.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,14 +1,38 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "PreferenceToggleMenuItem", {
8
- enumerable: true,
9
- get: function () {
10
- return _preferenceToggleMenuItem.default;
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
16
  }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var components_exports = {};
29
+ __export(components_exports, {
30
+ PreferenceToggleMenuItem: () => import_preference_toggle_menu_item.default
31
+ });
32
+ module.exports = __toCommonJS(components_exports);
33
+ var import_preference_toggle_menu_item = __toESM(require("./preference-toggle-menu-item"));
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ PreferenceToggleMenuItem
12
37
  });
13
- var _preferenceToggleMenuItem = _interopRequireDefault(require("./preference-toggle-menu-item"));
14
- //# sourceMappingURL=index.js.map
38
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_preferenceToggleMenuItem","_interopRequireDefault","require"],"sources":["@wordpress/preferences/src/components/index.js"],"sourcesContent":["export { default as PreferenceToggleMenuItem } from './preference-toggle-menu-item';\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,yBAAA,GAAAC,sBAAA,CAAAC,OAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/index.js"],
4
+ "sourcesContent": ["export { default as PreferenceToggleMenuItem } from './preference-toggle-menu-item';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yCAAoD;",
6
+ "names": []
7
+ }
@@ -1,32 +1,41 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var preference_base_option_exports = {};
19
+ __export(preference_base_option_exports, {
20
+ default: () => preference_base_option_default
5
21
  });
6
- exports.default = void 0;
7
- var _components = require("@wordpress/components");
8
- var _jsxRuntime = require("react/jsx-runtime");
9
- /**
10
- * WordPress dependencies
11
- */
12
-
13
- function BaseOption({
14
- help,
15
- label,
16
- isChecked,
17
- onChange,
18
- children
19
- }) {
20
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
21
- className: "preference-base-option",
22
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
23
- __nextHasNoMarginBottom: true,
24
- help: help,
25
- label: label,
26
- checked: isChecked,
27
- onChange: onChange
28
- }), children]
29
- });
22
+ module.exports = __toCommonJS(preference_base_option_exports);
23
+ var import_jsx_runtime = require("react/jsx-runtime");
24
+ var import_components = require("@wordpress/components");
25
+ function BaseOption({ help, label, isChecked, onChange, children }) {
26
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "preference-base-option", children: [
27
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
28
+ import_components.ToggleControl,
29
+ {
30
+ __nextHasNoMarginBottom: true,
31
+ help,
32
+ label,
33
+ checked: isChecked,
34
+ onChange
35
+ }
36
+ ),
37
+ children
38
+ ] });
30
39
  }
31
- var _default = exports.default = BaseOption;
32
- //# sourceMappingURL=index.js.map
40
+ var preference_base_option_default = BaseOption;
41
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_components","require","_jsxRuntime","BaseOption","help","label","isChecked","onChange","children","jsxs","className","jsx","ToggleControl","__nextHasNoMarginBottom","checked","_default","exports","default"],"sources":["@wordpress/preferences/src/components/preference-base-option/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToggleControl } from '@wordpress/components';\n\nfunction BaseOption( { help, label, isChecked, onChange, children } ) {\n\treturn (\n\t\t<div className=\"preference-base-option\">\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\thelp={ help }\n\t\t\t\tlabel={ label }\n\t\t\t\tchecked={ isChecked }\n\t\t\t\tonChange={ onChange }\n\t\t\t/>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default BaseOption;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAsD,IAAAC,WAAA,GAAAD,OAAA;AAHtD;AACA;AACA;;AAGA,SAASE,UAAUA,CAAE;EAAEC,IAAI;EAAEC,KAAK;EAAEC,SAAS;EAAEC,QAAQ;EAAEC;AAAS,CAAC,EAAG;EACrE,oBACC,IAAAN,WAAA,CAAAO,IAAA;IAAKC,SAAS,EAAC,wBAAwB;IAAAF,QAAA,gBACtC,IAAAN,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,aAAa;MACbC,uBAAuB;MACvBT,IAAI,EAAGA,IAAM;MACbC,KAAK,EAAGA,KAAO;MACfS,OAAO,EAAGR,SAAW;MACrBC,QAAQ,EAAGA;IAAU,CACrB,CAAC,EACAC,QAAQ;EAAA,CACN,CAAC;AAER;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcd,UAAU","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/preference-base-option/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { ToggleControl } from '@wordpress/components';\n\nfunction BaseOption( { help, label, isChecked, onChange, children } ) {\n\treturn (\n\t\t<div className=\"preference-base-option\">\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\thelp={ help }\n\t\t\t\tlabel={ label }\n\t\t\t\tchecked={ isChecked }\n\t\t\t\tonChange={ onChange }\n\t\t\t/>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default BaseOption;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOE;AAJF,wBAA8B;AAE9B,SAAS,WAAY,EAAE,MAAM,OAAO,WAAW,UAAU,SAAS,GAAI;AACrE,SACC,6CAAC,SAAI,WAAU,0BACd;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,yBAAuB;AAAA,QACvB;AAAA,QACA;AAAA,QACA,SAAU;AAAA,QACV;AAAA;AAAA,IACD;AAAA,IACE;AAAA,KACH;AAEF;AAEA,IAAO,iCAAQ;",
6
+ "names": []
7
+ }
@@ -1,42 +1,64 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var preference_toggle_control_exports = {};
29
+ __export(preference_toggle_control_exports, {
30
+ default: () => preference_toggle_control_default
6
31
  });
7
- exports.default = void 0;
8
- var _data = require("@wordpress/data");
9
- var _store = require("../../store");
10
- var _preferenceBaseOption = _interopRequireDefault(require("../preference-base-option"));
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- /**
13
- * WordPress dependencies
14
- */
15
-
16
- /**
17
- * Internal dependencies
18
- */
19
-
32
+ module.exports = __toCommonJS(preference_toggle_control_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_data = require("@wordpress/data");
35
+ var import_store = require("../../store");
36
+ var import_preference_base_option = __toESM(require("../preference-base-option"));
20
37
  function PreferenceToggleControl(props) {
21
38
  const {
22
39
  scope,
23
40
  featureName,
24
- onToggle = () => {},
41
+ onToggle = () => {
42
+ },
25
43
  ...remainingProps
26
44
  } = props;
27
- const isChecked = (0, _data.useSelect)(select => !!select(_store.store).get(scope, featureName), [scope, featureName]);
28
- const {
29
- toggle
30
- } = (0, _data.useDispatch)(_store.store);
45
+ const isChecked = (0, import_data.useSelect)(
46
+ (select) => !!select(import_store.store).get(scope, featureName),
47
+ [scope, featureName]
48
+ );
49
+ const { toggle } = (0, import_data.useDispatch)(import_store.store);
31
50
  const onChange = () => {
32
51
  onToggle();
33
52
  toggle(scope, featureName);
34
53
  };
35
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_preferenceBaseOption.default, {
36
- onChange: onChange,
37
- isChecked: isChecked,
38
- ...remainingProps
39
- });
54
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
55
+ import_preference_base_option.default,
56
+ {
57
+ onChange,
58
+ isChecked,
59
+ ...remainingProps
60
+ }
61
+ );
40
62
  }
41
- var _default = exports.default = PreferenceToggleControl;
42
- //# sourceMappingURL=index.js.map
63
+ var preference_toggle_control_default = PreferenceToggleControl;
64
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_data","require","_store","_preferenceBaseOption","_interopRequireDefault","_jsxRuntime","PreferenceToggleControl","props","scope","featureName","onToggle","remainingProps","isChecked","useSelect","select","preferencesStore","get","toggle","useDispatch","onChange","jsx","default","_default","exports"],"sources":["@wordpress/preferences/src/components/preference-toggle-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as preferencesStore } from '../../store';\nimport PreferenceBaseOption from '../preference-base-option';\n\nfunction PreferenceToggleControl( props ) {\n\tconst {\n\t\tscope,\n\t\tfeatureName,\n\t\tonToggle = () => {},\n\t\t...remainingProps\n\t} = props;\n\tconst isChecked = useSelect(\n\t\t( select ) => !! select( preferencesStore ).get( scope, featureName ),\n\t\t[ scope, featureName ]\n\t);\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst onChange = () => {\n\t\tonToggle();\n\t\ttoggle( scope, featureName );\n\t};\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tonChange={ onChange }\n\t\t\tisChecked={ isChecked }\n\t\t\t{ ...remainingProps }\n\t\t/>\n\t);\n}\n\nexport default PreferenceToggleControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA6D,IAAAI,WAAA,GAAAJ,OAAA;AAT7D;AACA;AACA;;AAGA;AACA;AACA;;AAIA,SAASK,uBAAuBA,CAAEC,KAAK,EAAG;EACzC,MAAM;IACLC,KAAK;IACLC,WAAW;IACXC,QAAQ,GAAGA,CAAA,KAAM,CAAC,CAAC;IACnB,GAAGC;EACJ,CAAC,GAAGJ,KAAK;EACT,MAAMK,SAAS,GAAG,IAAAC,eAAS,EACxBC,MAAM,IAAM,CAAC,CAAEA,MAAM,CAAEC,YAAiB,CAAC,CAACC,GAAG,CAAER,KAAK,EAAEC,WAAY,CAAC,EACrE,CAAED,KAAK,EAAEC,WAAW,CACrB,CAAC;EACD,MAAM;IAAEQ;EAAO,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAiB,CAAC;EAClD,MAAMI,QAAQ,GAAGA,CAAA,KAAM;IACtBT,QAAQ,CAAC,CAAC;IACVO,MAAM,CAAET,KAAK,EAAEC,WAAY,CAAC;EAC7B,CAAC;EAED,oBACC,IAAAJ,WAAA,CAAAe,GAAA,EAACjB,qBAAA,CAAAkB,OAAoB;IACpBF,QAAQ,EAAGA,QAAU;IACrBP,SAAS,EAAGA,SAAW;IAAA,GAClBD;EAAc,CACnB,CAAC;AAEJ;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEcf,uBAAuB","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/preference-toggle-control/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as preferencesStore } from '../../store';\nimport PreferenceBaseOption from '../preference-base-option';\n\nfunction PreferenceToggleControl( props ) {\n\tconst {\n\t\tscope,\n\t\tfeatureName,\n\t\tonToggle = () => {},\n\t\t...remainingProps\n\t} = props;\n\tconst isChecked = useSelect(\n\t\t( select ) => !! select( preferencesStore ).get( scope, featureName ),\n\t\t[ scope, featureName ]\n\t);\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst onChange = () => {\n\t\tonToggle();\n\t\ttoggle( scope, featureName );\n\t};\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tonChange={ onChange }\n\t\t\tisChecked={ isChecked }\n\t\t\t{ ...remainingProps }\n\t\t/>\n\t);\n}\n\nexport default PreferenceToggleControl;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BE;AA1BF,kBAAuC;AAKvC,mBAA0C;AAC1C,oCAAiC;AAEjC,SAAS,wBAAyB,OAAQ;AACzC,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA,WAAW,MAAM;AAAA,IAAC;AAAA,IAClB,GAAG;AAAA,EACJ,IAAI;AACJ,QAAM,gBAAY;AAAA,IACjB,CAAE,WAAY,CAAC,CAAE,OAAQ,aAAAA,KAAiB,EAAE,IAAK,OAAO,WAAY;AAAA,IACpE,CAAE,OAAO,WAAY;AAAA,EACtB;AACA,QAAM,EAAE,OAAO,QAAI,yBAAa,aAAAA,KAAiB;AACjD,QAAM,WAAW,MAAM;AACtB,aAAS;AACT,WAAQ,OAAO,WAAY;AAAA,EAC5B;AAEA,SACC;AAAA,IAAC,8BAAAC;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MACE,GAAG;AAAA;AAAA,EACN;AAEF;AAEA,IAAO,oCAAQ;",
6
+ "names": ["preferencesStore", "PreferenceBaseOption"]
7
+ }
@@ -1,24 +1,32 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var preference_toggle_menu_item_exports = {};
19
+ __export(preference_toggle_menu_item_exports, {
20
+ default: () => PreferenceToggleMenuItem
5
21
  });
6
- exports.default = PreferenceToggleMenuItem;
7
- var _data = require("@wordpress/data");
8
- var _components = require("@wordpress/components");
9
- var _i18n = require("@wordpress/i18n");
10
- var _icons = require("@wordpress/icons");
11
- var _a11y = require("@wordpress/a11y");
12
- var _store = require("../../store");
13
- var _jsxRuntime = require("react/jsx-runtime");
14
- /**
15
- * WordPress dependencies
16
- */
17
-
18
- /**
19
- * Internal dependencies
20
- */
21
-
22
+ module.exports = __toCommonJS(preference_toggle_menu_item_exports);
23
+ var import_jsx_runtime = require("react/jsx-runtime");
24
+ var import_data = require("@wordpress/data");
25
+ var import_components = require("@wordpress/components");
26
+ var import_i18n = require("@wordpress/i18n");
27
+ var import_icons = require("@wordpress/icons");
28
+ var import_a11y = require("@wordpress/a11y");
29
+ var import_store = require("../../store");
22
30
  function PreferenceToggleMenuItem({
23
31
  scope,
24
32
  name,
@@ -31,36 +39,46 @@ function PreferenceToggleMenuItem({
31
39
  onToggle = () => null,
32
40
  disabled = false
33
41
  }) {
34
- const isActive = (0, _data.useSelect)(select => !!select(_store.store).get(scope, name), [scope, name]);
35
- const {
36
- toggle
37
- } = (0, _data.useDispatch)(_store.store);
42
+ const isActive = (0, import_data.useSelect)(
43
+ (select) => !!select(import_store.store).get(scope, name),
44
+ [scope, name]
45
+ );
46
+ const { toggle } = (0, import_data.useDispatch)(import_store.store);
38
47
  const speakMessage = () => {
39
48
  if (isActive) {
40
- const message = messageDeactivated || (0, _i18n.sprintf)(/* translators: %s: preference name, e.g. 'Fullscreen mode' */
41
- (0, _i18n.__)('Preference deactivated - %s'), label);
42
- (0, _a11y.speak)(message);
49
+ const message = messageDeactivated || (0, import_i18n.sprintf)(
50
+ /* translators: %s: preference name, e.g. 'Fullscreen mode' */
51
+ (0, import_i18n.__)("Preference deactivated - %s"),
52
+ label
53
+ );
54
+ (0, import_a11y.speak)(message);
43
55
  } else {
44
- const message = messageActivated || (0, _i18n.sprintf)(/* translators: %s: preference name, e.g. 'Fullscreen mode' */
45
- (0, _i18n.__)('Preference activated - %s'), label);
46
- (0, _a11y.speak)(message);
56
+ const message = messageActivated || (0, import_i18n.sprintf)(
57
+ /* translators: %s: preference name, e.g. 'Fullscreen mode' */
58
+ (0, import_i18n.__)("Preference activated - %s"),
59
+ label
60
+ );
61
+ (0, import_a11y.speak)(message);
47
62
  }
48
63
  };
49
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuItem, {
50
- icon: isActive && _icons.check,
51
- isSelected: isActive,
52
- onClick: () => {
53
- onToggle();
54
- if (handleToggling) {
55
- toggle(scope, name);
56
- }
57
- speakMessage();
58
- },
59
- role: "menuitemcheckbox",
60
- info: info,
61
- shortcut: shortcut,
62
- disabled: disabled,
63
- children: label
64
- });
64
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
65
+ import_components.MenuItem,
66
+ {
67
+ icon: isActive && import_icons.check,
68
+ isSelected: isActive,
69
+ onClick: () => {
70
+ onToggle();
71
+ if (handleToggling) {
72
+ toggle(scope, name);
73
+ }
74
+ speakMessage();
75
+ },
76
+ role: "menuitemcheckbox",
77
+ info,
78
+ shortcut,
79
+ disabled,
80
+ children: label
81
+ }
82
+ );
65
83
  }
66
- //# sourceMappingURL=index.js.map
84
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_data","require","_components","_i18n","_icons","_a11y","_store","_jsxRuntime","PreferenceToggleMenuItem","scope","name","label","info","messageActivated","messageDeactivated","shortcut","handleToggling","onToggle","disabled","isActive","useSelect","select","preferencesStore","get","toggle","useDispatch","speakMessage","message","sprintf","__","speak","jsx","MenuItem","icon","check","isSelected","onClick","role","children"],"sources":["@wordpress/preferences/src/components/preference-toggle-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { MenuItem } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { check } from '@wordpress/icons';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { store as preferencesStore } from '../../store';\n\nexport default function PreferenceToggleMenuItem( {\n\tscope,\n\tname,\n\tlabel,\n\tinfo,\n\tmessageActivated,\n\tmessageDeactivated,\n\tshortcut,\n\thandleToggling = true,\n\tonToggle = () => null,\n\tdisabled = false,\n} ) {\n\tconst isActive = useSelect(\n\t\t( select ) => !! select( preferencesStore ).get( scope, name ),\n\t\t[ scope, name ]\n\t);\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst speakMessage = () => {\n\t\tif ( isActive ) {\n\t\t\tconst message =\n\t\t\t\tmessageDeactivated ||\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: preference name, e.g. 'Fullscreen mode' */\n\t\t\t\t\t__( 'Preference deactivated - %s' ),\n\t\t\t\t\tlabel\n\t\t\t\t);\n\t\t\tspeak( message );\n\t\t} else {\n\t\t\tconst message =\n\t\t\t\tmessageActivated ||\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: preference name, e.g. 'Fullscreen mode' */\n\t\t\t\t\t__( 'Preference activated - %s' ),\n\t\t\t\t\tlabel\n\t\t\t\t);\n\t\t\tspeak( message );\n\t\t}\n\t};\n\n\treturn (\n\t\t<MenuItem\n\t\t\ticon={ isActive && check }\n\t\t\tisSelected={ isActive }\n\t\t\tonClick={ () => {\n\t\t\t\tonToggle();\n\t\t\t\tif ( handleToggling ) {\n\t\t\t\t\ttoggle( scope, name );\n\t\t\t\t}\n\t\t\t\tspeakMessage();\n\t\t\t} }\n\t\t\trole=\"menuitemcheckbox\"\n\t\t\tinfo={ info }\n\t\t\tshortcut={ shortcut }\n\t\t\tdisabled={ disabled }\n\t\t>\n\t\t\t{ label }\n\t\t</MenuItem>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AAAwD,IAAAM,WAAA,GAAAN,OAAA;AAZxD;AACA;AACA;;AAOA;AACA;AACA;;AAGe,SAASO,wBAAwBA,CAAE;EACjDC,KAAK;EACLC,IAAI;EACJC,KAAK;EACLC,IAAI;EACJC,gBAAgB;EAChBC,kBAAkB;EAClBC,QAAQ;EACRC,cAAc,GAAG,IAAI;EACrBC,QAAQ,GAAGA,CAAA,KAAM,IAAI;EACrBC,QAAQ,GAAG;AACZ,CAAC,EAAG;EACH,MAAMC,QAAQ,GAAG,IAAAC,eAAS,EACvBC,MAAM,IAAM,CAAC,CAAEA,MAAM,CAAEC,YAAiB,CAAC,CAACC,GAAG,CAAEd,KAAK,EAAEC,IAAK,CAAC,EAC9D,CAAED,KAAK,EAAEC,IAAI,CACd,CAAC;EACD,MAAM;IAAEc;EAAO,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAiB,CAAC;EAClD,MAAMI,YAAY,GAAGA,CAAA,KAAM;IAC1B,IAAKP,QAAQ,EAAG;MACf,MAAMQ,OAAO,GACZb,kBAAkB,IAClB,IAAAc,aAAO,EACN;MACA,IAAAC,QAAE,EAAE,6BAA8B,CAAC,EACnClB,KACD,CAAC;MACF,IAAAmB,WAAK,EAAEH,OAAQ,CAAC;IACjB,CAAC,MAAM;MACN,MAAMA,OAAO,GACZd,gBAAgB,IAChB,IAAAe,aAAO,EACN;MACA,IAAAC,QAAE,EAAE,2BAA4B,CAAC,EACjClB,KACD,CAAC;MACF,IAAAmB,WAAK,EAAEH,OAAQ,CAAC;IACjB;EACD,CAAC;EAED,oBACC,IAAApB,WAAA,CAAAwB,GAAA,EAAC7B,WAAA,CAAA8B,QAAQ;IACRC,IAAI,EAAGd,QAAQ,IAAIe,YAAO;IAC1BC,UAAU,EAAGhB,QAAU;IACvBiB,OAAO,EAAGA,CAAA,KAAM;MACfnB,QAAQ,CAAC,CAAC;MACV,IAAKD,cAAc,EAAG;QACrBQ,MAAM,CAAEf,KAAK,EAAEC,IAAK,CAAC;MACtB;MACAgB,YAAY,CAAC,CAAC;IACf,CAAG;IACHW,IAAI,EAAC,kBAAkB;IACvBzB,IAAI,EAAGA,IAAM;IACbG,QAAQ,EAAGA,QAAU;IACrBG,QAAQ,EAAGA,QAAU;IAAAoB,QAAA,EAEnB3B;EAAK,CACE,CAAC;AAEb","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/preference-toggle-menu-item/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { MenuItem } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { check } from '@wordpress/icons';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { store as preferencesStore } from '../../store';\n\nexport default function PreferenceToggleMenuItem( {\n\tscope,\n\tname,\n\tlabel,\n\tinfo,\n\tmessageActivated,\n\tmessageDeactivated,\n\tshortcut,\n\thandleToggling = true,\n\tonToggle = () => null,\n\tdisabled = false,\n} ) {\n\tconst isActive = useSelect(\n\t\t( select ) => !! select( preferencesStore ).get( scope, name ),\n\t\t[ scope, name ]\n\t);\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst speakMessage = () => {\n\t\tif ( isActive ) {\n\t\t\tconst message =\n\t\t\t\tmessageDeactivated ||\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: preference name, e.g. 'Fullscreen mode' */\n\t\t\t\t\t__( 'Preference deactivated - %s' ),\n\t\t\t\t\tlabel\n\t\t\t\t);\n\t\t\tspeak( message );\n\t\t} else {\n\t\t\tconst message =\n\t\t\t\tmessageActivated ||\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: preference name, e.g. 'Fullscreen mode' */\n\t\t\t\t\t__( 'Preference activated - %s' ),\n\t\t\t\t\tlabel\n\t\t\t\t);\n\t\t\tspeak( message );\n\t\t}\n\t};\n\n\treturn (\n\t\t<MenuItem\n\t\t\ticon={ isActive && check }\n\t\t\tisSelected={ isActive }\n\t\t\tonClick={ () => {\n\t\t\t\tonToggle();\n\t\t\t\tif ( handleToggling ) {\n\t\t\t\t\ttoggle( scope, name );\n\t\t\t\t}\n\t\t\t\tspeakMessage();\n\t\t\t} }\n\t\t\trole=\"menuitemcheckbox\"\n\t\t\tinfo={ info }\n\t\t\tshortcut={ shortcut }\n\t\t\tdisabled={ disabled }\n\t\t>\n\t\t\t{ label }\n\t\t</MenuItem>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsDE;AAnDF,kBAAuC;AACvC,wBAAyB;AACzB,kBAA4B;AAC5B,mBAAsB;AACtB,kBAAsB;AAKtB,mBAA0C;AAE3B,SAAR,yBAA2C;AAAA,EACjD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,WAAW,MAAM;AAAA,EACjB,WAAW;AACZ,GAAI;AACH,QAAM,eAAW;AAAA,IAChB,CAAE,WAAY,CAAC,CAAE,OAAQ,aAAAA,KAAiB,EAAE,IAAK,OAAO,IAAK;AAAA,IAC7D,CAAE,OAAO,IAAK;AAAA,EACf;AACA,QAAM,EAAE,OAAO,QAAI,yBAAa,aAAAA,KAAiB;AACjD,QAAM,eAAe,MAAM;AAC1B,QAAK,UAAW;AACf,YAAM,UACL,0BACA;AAAA;AAAA,YAEC,gBAAI,6BAA8B;AAAA,QAClC;AAAA,MACD;AACD,6BAAO,OAAQ;AAAA,IAChB,OAAO;AACN,YAAM,UACL,wBACA;AAAA;AAAA,YAEC,gBAAI,2BAA4B;AAAA,QAChC;AAAA,MACD;AACD,6BAAO,OAAQ;AAAA,IAChB;AAAA,EACD;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAO,YAAY;AAAA,MACnB,YAAa;AAAA,MACb,SAAU,MAAM;AACf,iBAAS;AACT,YAAK,gBAAiB;AACrB,iBAAQ,OAAO,IAAK;AAAA,QACrB;AACA,qBAAa;AAAA,MACd;AAAA,MACA,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MAEE;AAAA;AAAA,EACH;AAEF;",
6
+ "names": ["preferencesStore"]
7
+ }
@@ -1,25 +1,37 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var preferences_modal_exports = {};
19
+ __export(preferences_modal_exports, {
20
+ default: () => PreferencesModal
5
21
  });
6
- exports.default = PreferencesModal;
7
- var _components = require("@wordpress/components");
8
- var _i18n = require("@wordpress/i18n");
9
- var _jsxRuntime = require("react/jsx-runtime");
10
- /**
11
- * WordPress dependencies
12
- */
13
-
14
- function PreferencesModal({
15
- closeModal,
16
- children
17
- }) {
18
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Modal, {
19
- className: "preferences-modal",
20
- title: (0, _i18n.__)('Preferences'),
21
- onRequestClose: closeModal,
22
- children: children
23
- });
22
+ module.exports = __toCommonJS(preferences_modal_exports);
23
+ var import_jsx_runtime = require("react/jsx-runtime");
24
+ var import_components = require("@wordpress/components");
25
+ var import_i18n = require("@wordpress/i18n");
26
+ function PreferencesModal({ closeModal, children }) {
27
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
28
+ import_components.Modal,
29
+ {
30
+ className: "preferences-modal",
31
+ title: (0, import_i18n.__)("Preferences"),
32
+ onRequestClose: closeModal,
33
+ children
34
+ }
35
+ );
24
36
  }
25
- //# sourceMappingURL=index.js.map
37
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_components","require","_i18n","_jsxRuntime","PreferencesModal","closeModal","children","jsx","Modal","className","title","__","onRequestClose"],"sources":["@wordpress/preferences/src/components/preferences-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function PreferencesModal( { closeModal, children } ) {\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"preferences-modal\"\n\t\t\ttitle={ __( 'Preferences' ) }\n\t\t\tonRequestClose={ closeModal }\n\t\t>\n\t\t\t{ children }\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAAqC,IAAAE,WAAA,GAAAF,OAAA;AAJrC;AACA;AACA;;AAIe,SAASG,gBAAgBA,CAAE;EAAEC,UAAU;EAAEC;AAAS,CAAC,EAAG;EACpE,oBACC,IAAAH,WAAA,CAAAI,GAAA,EAACP,WAAA,CAAAQ,KAAK;IACLC,SAAS,EAAC,mBAAmB;IAC7BC,KAAK,EAAG,IAAAC,QAAE,EAAE,aAAc,CAAG;IAC7BC,cAAc,EAAGP,UAAY;IAAAC,QAAA,EAE3BA;EAAQ,CACJ,CAAC;AAEV","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/preferences-modal/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function PreferencesModal( { closeModal, children } ) {\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"preferences-modal\"\n\t\t\ttitle={ __( 'Preferences' ) }\n\t\t\tonRequestClose={ closeModal }\n\t\t>\n\t\t\t{ children }\n\t\t</Modal>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQE;AALF,wBAAsB;AACtB,kBAAmB;AAEJ,SAAR,iBAAmC,EAAE,YAAY,SAAS,GAAI;AACpE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,WAAQ,gBAAI,aAAc;AAAA,MAC1B,gBAAiB;AAAA,MAEf;AAAA;AAAA,EACH;AAEF;",
6
+ "names": []
7
+ }
@@ -1,29 +1,32 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var preferences_modal_section_exports = {};
19
+ __export(preferences_modal_section_exports, {
20
+ default: () => preferences_modal_section_default
5
21
  });
6
- exports.default = void 0;
7
- var _jsxRuntime = require("react/jsx-runtime");
8
- const Section = ({
9
- description,
10
- title,
11
- children
12
- }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("fieldset", {
13
- className: "preferences-modal__section",
14
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("legend", {
15
- className: "preferences-modal__section-legend",
16
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
17
- className: "preferences-modal__section-title",
18
- children: title
19
- }), description && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
20
- className: "preferences-modal__section-description",
21
- children: description
22
- })]
23
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
24
- className: "preferences-modal__section-content",
25
- children: children
26
- })]
27
- });
28
- var _default = exports.default = Section;
29
- //# sourceMappingURL=index.js.map
22
+ module.exports = __toCommonJS(preferences_modal_section_exports);
23
+ var import_jsx_runtime = require("react/jsx-runtime");
24
+ const Section = ({ description, title, children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("fieldset", { className: "preferences-modal__section", children: [
25
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("legend", { className: "preferences-modal__section-legend", children: [
26
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "preferences-modal__section-title", children: title }),
27
+ description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "preferences-modal__section-description", children: description })
28
+ ] }),
29
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "preferences-modal__section-content", children })
30
+ ] });
31
+ var preferences_modal_section_default = Section;
32
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["Section","description","title","children","_jsxRuntime","jsxs","className","jsx","_default","exports","default"],"sources":["@wordpress/preferences/src/components/preferences-modal-section/index.js"],"sourcesContent":["const Section = ( { description, title, children } ) => (\n\t<fieldset className=\"preferences-modal__section\">\n\t\t<legend className=\"preferences-modal__section-legend\">\n\t\t\t<h2 className=\"preferences-modal__section-title\">{ title }</h2>\n\t\t\t{ description && (\n\t\t\t\t<p className=\"preferences-modal__section-description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</legend>\n\t\t<div className=\"preferences-modal__section-content\">{ children }</div>\n\t</fieldset>\n);\n\nexport default Section;\n"],"mappings":";;;;;;;AAAA,MAAMA,OAAO,GAAGA,CAAE;EAAEC,WAAW;EAAEC,KAAK;EAAEC;AAAS,CAAC,kBACjD,IAAAC,WAAA,CAAAC,IAAA;EAAUC,SAAS,EAAC,4BAA4B;EAAAH,QAAA,gBAC/C,IAAAC,WAAA,CAAAC,IAAA;IAAQC,SAAS,EAAC,mCAAmC;IAAAH,QAAA,gBACpD,IAAAC,WAAA,CAAAG,GAAA;MAAID,SAAS,EAAC,kCAAkC;MAAAH,QAAA,EAAGD;IAAK,CAAM,CAAC,EAC7DD,WAAW,iBACZ,IAAAG,WAAA,CAAAG,GAAA;MAAGD,SAAS,EAAC,wCAAwC;MAAAH,QAAA,EAClDF;IAAW,CACX,CACH;EAAA,CACM,CAAC,eACT,IAAAG,WAAA,CAAAG,GAAA;IAAKD,SAAS,EAAC,oCAAoC;IAAAH,QAAA,EAAGA;EAAQ,CAAO,CAAC;AAAA,CAC7D,CACV;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,OAAO","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/preferences-modal-section/index.js"],
4
+ "sourcesContent": ["const Section = ( { description, title, children } ) => (\n\t<fieldset className=\"preferences-modal__section\">\n\t\t<legend className=\"preferences-modal__section-legend\">\n\t\t\t<h2 className=\"preferences-modal__section-title\">{ title }</h2>\n\t\t\t{ description && (\n\t\t\t\t<p className=\"preferences-modal__section-description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</legend>\n\t\t<div className=\"preferences-modal__section-content\">{ children }</div>\n\t</fieldset>\n);\n\nexport default Section;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEE;AAFF,MAAM,UAAU,CAAE,EAAE,aAAa,OAAO,SAAS,MAChD,6CAAC,cAAS,WAAU,8BACnB;AAAA,+CAAC,YAAO,WAAU,qCACjB;AAAA,gDAAC,QAAG,WAAU,oCAAqC,iBAAO;AAAA,IACxD,eACD,4CAAC,OAAE,WAAU,0CACV,uBACH;AAAA,KAEF;AAAA,EACA,4CAAC,SAAI,WAAU,sCAAuC,UAAU;AAAA,GACjE;AAGD,IAAO,oCAAQ;",
6
+ "names": []
7
+ }