@wordpress/notices 5.40.1-next.v.202602241322.0 → 5.41.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
CHANGED
|
@@ -39,9 +39,9 @@ var import_data = require("@wordpress/data");
|
|
|
39
39
|
var import_store = require("../../store/index.cjs");
|
|
40
40
|
|
|
41
41
|
// packages/notices/src/components/inline-notices/style.scss
|
|
42
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='
|
|
42
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='51ef33823e']")) {
|
|
43
43
|
const style = document.createElement("style");
|
|
44
|
-
style.setAttribute("data-wp-hash", "
|
|
44
|
+
style.setAttribute("data-wp-hash", "51ef33823e");
|
|
45
45
|
style.appendChild(document.createTextNode(".components-notices__dismissible,.components-notices__pinned{color:#1e1e1e}.components-notices__dismissible .components-notice,.components-notices__pinned .components-notice{border-bottom:1px solid #0003;box-sizing:border-box;min-height:64px;padding:0 12px}.components-notices__dismissible .components-notice .components-notice__dismiss,.components-notices__pinned .components-notice .components-notice__dismiss{margin-top:12px}"));
|
|
46
46
|
document.head.appendChild(style);
|
|
47
47
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/inline-notices/index.tsx", "../../../src/components/inline-notices/style.scss"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { NoticeList } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as noticesStore } from '../../store';\nimport './style.scss';\n\ntype InlineNoticesProps = {\n\tchildren?: ReactNode;\n\tpinnedNoticesClassName?: string;\n\tdismissibleNoticesClassName?: string;\n\tcontext?: string;\n};\n\nexport default function InlineNotices( {\n\tchildren,\n\tpinnedNoticesClassName,\n\tdismissibleNoticesClassName,\n\tcontext,\n}: InlineNoticesProps ) {\n\tconst notices = useSelect(\n\t\t( select ) => select( noticesStore ).getNotices( context ),\n\t\t[ context ]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'components-notices__pinned',\n\t\t\t\t\tpinnedNoticesClassName\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'components-notices__dismissible',\n\t\t\t\t\tdismissibleNoticesClassName\n\t\t\t\t) }\n\t\t\t\tonRemove={ ( id ) => removeNotice( id, context ) }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</NoticeList>\n\t\t</>\n\t);\n}\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kBAAiB;AAKjB,wBAA2B;AAC3B,kBAAuC;AAKvC,mBAAsC;;;ACftC,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { NoticeList } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as noticesStore } from '../../store';\nimport './style.scss';\n\ntype InlineNoticesProps = {\n\tchildren?: ReactNode;\n\tpinnedNoticesClassName?: string;\n\tdismissibleNoticesClassName?: string;\n\tcontext?: string;\n};\n\nexport default function InlineNotices( {\n\tchildren,\n\tpinnedNoticesClassName,\n\tdismissibleNoticesClassName,\n\tcontext,\n}: InlineNoticesProps ) {\n\tconst notices = useSelect(\n\t\t( select ) => select( noticesStore ).getNotices( context ),\n\t\t[ context ]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'components-notices__pinned',\n\t\t\t\t\tpinnedNoticesClassName\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'components-notices__dismissible',\n\t\t\t\t\tdismissibleNoticesClassName\n\t\t\t\t) }\n\t\t\t\tonRemove={ ( id ) => removeNotice( id, context ) }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</NoticeList>\n\t\t</>\n\t);\n}\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='51ef33823e']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"51ef33823e\");\n\tstyle.appendChild(document.createTextNode(\".components-notices__dismissible,.components-notices__pinned{color:#1e1e1e}.components-notices__dismissible .components-notice,.components-notices__pinned .components-notice{border-bottom:1px solid #0003;box-sizing:border-box;min-height:64px;padding:0 12px}.components-notices__dismissible .components-notice .components-notice__dismiss,.components-notices__pinned .components-notice .components-notice__dismiss{margin-top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"names": ["noticesStore", "clsx"]
|
|
7
7
|
}
|
|
@@ -5,9 +5,9 @@ import { useDispatch, useSelect } from "@wordpress/data";
|
|
|
5
5
|
import { store as noticesStore } from "../../store/index.mjs";
|
|
6
6
|
|
|
7
7
|
// packages/notices/src/components/inline-notices/style.scss
|
|
8
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='
|
|
8
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='51ef33823e']")) {
|
|
9
9
|
const style = document.createElement("style");
|
|
10
|
-
style.setAttribute("data-wp-hash", "
|
|
10
|
+
style.setAttribute("data-wp-hash", "51ef33823e");
|
|
11
11
|
style.appendChild(document.createTextNode(".components-notices__dismissible,.components-notices__pinned{color:#1e1e1e}.components-notices__dismissible .components-notice,.components-notices__pinned .components-notice{border-bottom:1px solid #0003;box-sizing:border-box;min-height:64px;padding:0 12px}.components-notices__dismissible .components-notice .components-notice__dismiss,.components-notices__pinned .components-notice .components-notice__dismiss{margin-top:12px}"));
|
|
12
12
|
document.head.appendChild(style);
|
|
13
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/inline-notices/index.tsx", "../../../src/components/inline-notices/style.scss"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { NoticeList } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as noticesStore } from '../../store';\nimport './style.scss';\n\ntype InlineNoticesProps = {\n\tchildren?: ReactNode;\n\tpinnedNoticesClassName?: string;\n\tdismissibleNoticesClassName?: string;\n\tcontext?: string;\n};\n\nexport default function InlineNotices( {\n\tchildren,\n\tpinnedNoticesClassName,\n\tdismissibleNoticesClassName,\n\tcontext,\n}: InlineNoticesProps ) {\n\tconst notices = useSelect(\n\t\t( select ) => select( noticesStore ).getNotices( context ),\n\t\t[ context ]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'components-notices__pinned',\n\t\t\t\t\tpinnedNoticesClassName\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'components-notices__dismissible',\n\t\t\t\t\tdismissibleNoticesClassName\n\t\t\t\t) }\n\t\t\t\tonRemove={ ( id ) => removeNotice( id, context ) }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</NoticeList>\n\t\t</>\n\t);\n}\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='
|
|
5
|
-
"mappings": ";AAIA,OAAO,UAAU;AAKjB,SAAS,kBAAkB;AAC3B,SAAS,aAAa,iBAAiB;AAKvC,SAAS,SAAS,oBAAoB;;;ACftC,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { NoticeList } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as noticesStore } from '../../store';\nimport './style.scss';\n\ntype InlineNoticesProps = {\n\tchildren?: ReactNode;\n\tpinnedNoticesClassName?: string;\n\tdismissibleNoticesClassName?: string;\n\tcontext?: string;\n};\n\nexport default function InlineNotices( {\n\tchildren,\n\tpinnedNoticesClassName,\n\tdismissibleNoticesClassName,\n\tcontext,\n}: InlineNoticesProps ) {\n\tconst notices = useSelect(\n\t\t( select ) => select( noticesStore ).getNotices( context ),\n\t\t[ context ]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'components-notices__pinned',\n\t\t\t\t\tpinnedNoticesClassName\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'components-notices__dismissible',\n\t\t\t\t\tdismissibleNoticesClassName\n\t\t\t\t) }\n\t\t\t\tonRemove={ ( id ) => removeNotice( id, context ) }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</NoticeList>\n\t\t</>\n\t);\n}\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='51ef33823e']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"51ef33823e\");\n\tstyle.appendChild(document.createTextNode(\".components-notices__dismissible,.components-notices__pinned{color:#1e1e1e}.components-notices__dismissible .components-notice,.components-notices__pinned .components-notice{border-bottom:1px solid #0003;box-sizing:border-box;min-height:64px;padding:0 12px}.components-notices__dismissible .components-notice .components-notice__dismiss,.components-notices__pinned .components-notice .components-notice__dismiss{margin-top:12px}\"));\n\tdocument.head.appendChild(style);\n}\n"],
|
|
5
|
+
"mappings": ";AAIA,OAAO,UAAU;AAKjB,SAAS,kBAAkB;AAC3B,SAAS,aAAa,iBAAiB;AAKvC,SAAS,SAAS,oBAAoB;;;ACftC,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,8aAA8a,CAAC;AACzd,WAAS,KAAK,YAAY,KAAK;AAChC;;;ADuCE,mBACC,KADD;AAnBa,SAAR,cAAgC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAwB;AACvB,QAAM,UAAU;AAAA,IACf,CAAE,WAAY,OAAQ,YAAa,EAAE,WAAY,OAAQ;AAAA,IACzD,CAAE,OAAQ;AAAA,EACX;AACA,QAAM,EAAE,aAAa,IAAI,YAAa,YAAa;AACnD,QAAM,qBAAqB,QAAQ;AAAA,IAClC,CAAE,EAAE,eAAe,KAAK,MAAO,iBAAiB,SAAS;AAAA,EAC1D;AACA,QAAM,wBAAwB,QAAQ;AAAA,IACrC,CAAE,EAAE,eAAe,KAAK,MAAO,CAAE,iBAAiB,SAAS;AAAA,EAC5D;AAEA,SACC,iCACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,SAAU;AAAA,QACV,WAAY;AAAA,UACX;AAAA,UACA;AAAA,QACD;AAAA;AAAA,IACD;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA,SAAU;AAAA,QACV,WAAY;AAAA,UACX;AAAA,UACA;AAAA,QACD;AAAA,QACA,UAAW,CAAE,OAAQ,aAAc,IAAI,OAAQ;AAAA,QAE7C;AAAA;AAAA,IACH;AAAA,KACD;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/notices",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.41.0",
|
|
4
4
|
"description": "State management for notices.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"wpScript": true,
|
|
44
44
|
"types": "build-types",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@wordpress/a11y": "^4.
|
|
47
|
-
"@wordpress/components": "^32.3.
|
|
48
|
-
"@wordpress/data": "^10.
|
|
46
|
+
"@wordpress/a11y": "^4.41.0",
|
|
47
|
+
"@wordpress/components": "^32.3.0",
|
|
48
|
+
"@wordpress/data": "^10.41.0",
|
|
49
49
|
"clsx": "^2.1.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "8bfc179b9aed74c0a6dd6e8edf7a49e40e4f87cc"
|
|
61
61
|
}
|