newspack-components 3.0.0-alpha.1 → 3.0.0-alpha.2
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/babel.config.js +25 -0
- package/copy-styles.js +2 -10
- package/dist/accordion/index.js +50 -0
- package/dist/accordion/style.scss +31 -0
- package/dist/{cjs/action-card → action-card}/index.js +38 -41
- package/dist/{cjs/action-card → action-card}/style.scss +9 -9
- package/dist/{cjs/autocomplete-tokenfield → autocomplete-tokenfield}/index.js +19 -18
- package/dist/{esm/autocomplete-tokenfield → autocomplete-tokenfield}/style.scss +3 -3
- package/dist/{cjs/autocomplete-with-suggestions → autocomplete-with-suggestions}/index.js +29 -29
- package/dist/{cjs/autocomplete-with-suggestions → autocomplete-with-suggestions}/style.scss +8 -8
- package/dist/button/index.js +51 -0
- package/dist/button/index.tsx +48 -0
- package/dist/{cjs/button → button}/style.scss +1 -1
- package/dist/{cjs/button-card → button-card}/index.js +8 -8
- package/dist/{cjs/button-card → button-card}/style.scss +19 -13
- package/dist/{cjs/card → card}/index.js +3 -3
- package/dist/{esm/card → card}/style.scss +1 -1
- package/dist/{cjs/category-autocomplete → category-autocomplete}/index.js +50 -48
- package/dist/{cjs/category-autocomplete → category-autocomplete}/style.scss +2 -2
- package/dist/{cjs/color-picker → color-picker}/index.js +7 -7
- package/dist/{cjs/color-picker → color-picker}/style.scss +3 -3
- package/dist/{cjs/custom-select-control → custom-select-control}/index.js +3 -3
- package/dist/{esm/custom-select-control → custom-select-control}/style.scss +11 -10
- package/dist/date-range-picker/index.js +39 -0
- package/dist/date-range-picker/style.scss +148 -0
- package/dist/{cjs/footer → footer}/index.js +19 -17
- package/dist/{cjs/footer → footer}/style.scss +1 -1
- package/dist/{cjs/form-token-field → form-token-field}/index.js +5 -5
- package/dist/{esm/form-token-field → form-token-field}/style.scss +1 -1
- package/dist/{cjs/global-notices → global-notices}/index.js +3 -3
- package/dist/grid/index.js +44 -0
- package/dist/grid/index.tsx +34 -0
- package/dist/{esm/grid → grid}/style.scss +9 -9
- package/dist/{cjs/handoff → handoff}/index.js +72 -69
- package/dist/{cjs/handoff-message → handoff-message}/index.js +5 -3
- package/dist/hooks/index.js +29 -0
- package/dist/hooks/index.ts +15 -0
- package/dist/{cjs/hooks → hooks}/useObjectState.js +1 -1
- package/dist/{cjs/hooks → hooks}/useObjectState.test.js +9 -9
- package/dist/hooks/usePrompt.js +47 -0
- package/dist/hooks/usePrompt.ts +46 -0
- package/dist/image-upload/index.js +148 -0
- package/dist/{cjs/image-upload → image-upload}/index.test.js +13 -6
- package/dist/{cjs/image-upload → image-upload}/style.scss +5 -5
- package/dist/{cjs/index.js → index.js} +15 -1
- package/dist/{cjs/info-button → info-button}/index.js +5 -5
- package/dist/{cjs/modal → modal}/index.js +3 -3
- package/dist/{cjs/modal → modal}/style.scss +5 -5
- package/dist/{cjs/newspack-icon → newspack-icon}/index.js +4 -4
- package/dist/{cjs/newspack-icon → newspack-icon}/style.scss +1 -1
- package/dist/{cjs/newspack-logo → newspack-logo}/index.js +4 -4
- package/dist/{cjs/newspack-logo → newspack-logo}/style.scss +1 -1
- package/dist/{cjs/notice → notice}/index.js +11 -8
- package/dist/{cjs/notice → notice}/style.scss +11 -11
- package/dist/patrons-logo/index.js +77 -0
- package/dist/plugin-installer/index.js +297 -0
- package/dist/{esm/plugin-installer → plugin-installer}/style.scss +1 -1
- package/dist/{cjs/plugin-settings → plugin-settings}/SettingsSection.js +11 -9
- package/dist/plugin-settings/index.js +228 -0
- package/dist/{cjs/plugin-settings → plugin-settings}/style.scss +1 -1
- package/dist/plugin-toggle/README.md +53 -0
- package/dist/plugin-toggle/index.js +222 -0
- package/dist/{esm/plugin-toggle → plugin-toggle}/style.scss +1 -1
- package/dist/{cjs/popover → popover}/index.js +3 -3
- package/dist/{esm/popover → popover}/style.scss +7 -7
- package/dist/{cjs/position-control → position-control}/index.js +24 -22
- package/dist/{cjs/position-control → position-control}/style.scss +8 -8
- package/dist/{cjs/progress-bar → progress-bar}/index.js +8 -8
- package/dist/{cjs/progress-bar → progress-bar}/index.test.js +12 -11
- package/dist/{esm/progress-bar → progress-bar}/style.scss +2 -2
- package/dist/proxied-imports/router.js +15 -0
- package/dist/{cjs/radio-control → radio-control}/index.js +3 -3
- package/dist/{esm/radio-control → radio-control}/style.scss +3 -3
- package/dist/{cjs/section-header → section-header}/index.js +8 -8
- package/dist/{cjs/section-header → section-header}/style.scss +1 -1
- package/dist/{cjs/select-control → select-control}/ButtonGroupControl.js +7 -7
- package/dist/{cjs/select-control → select-control}/GroupedSelectControl.js +15 -14
- package/dist/{cjs/select-control → select-control}/index.js +6 -6
- package/dist/{esm/select-control → select-control}/style.scss +4 -4
- package/dist/{cjs/settings → settings}/MinMaxSetting.js +12 -11
- package/dist/{cjs/settings → settings}/SettingsCard.js +4 -4
- package/dist/{cjs/settings → settings}/SettingsSection.js +6 -6
- package/dist/{cjs/settings → settings}/index.js +1 -1
- package/dist/{cjs/settings → settings}/style.scss +1 -1
- package/dist/{cjs/sortable-newsletter-list-control → sortable-newsletter-list-control}/index.js +25 -24
- package/dist/{cjs/steps-list → steps-list}/index.js +4 -4
- package/dist/{esm/steps-list → steps-list}/style.scss +2 -2
- package/dist/{cjs/steps-list-item → steps-list-item}/index.js +5 -5
- package/dist/{cjs/steps-list-item → steps-list-item}/style.scss +5 -5
- package/dist/{cjs/style-card → style-card}/index.js +20 -17
- package/dist/{cjs/style-card → style-card}/style.scss +4 -4
- package/dist/{esm/style.scss → style.scss} +1 -1
- package/dist/{cjs/tabbed-navigation → tabbed-navigation}/index.js +7 -7
- package/dist/{cjs/tabbed-navigation → tabbed-navigation}/style.scss +4 -4
- package/dist/text-control/index.js +76 -0
- package/dist/text-control/index.tsx +71 -0
- package/dist/{cjs/utils → utils}/index.js +2 -2
- package/dist/{cjs/waiting → waiting}/index.js +3 -3
- package/dist/web-preview/index.js +191 -0
- package/dist/{esm/web-preview → web-preview}/style.scss +5 -5
- package/dist/with-wizard/index.js +328 -0
- package/dist/{cjs/with-wizard → with-wizard}/style.scss +44 -22
- package/dist/{cjs/with-wizard-screen → with-wizard-screen}/index.js +24 -23
- package/dist/{esm/with-wizard-screen → with-wizard-screen}/style.scss +7 -7
- package/dist/{cjs/wizard → wizard}/components/WizardError.js +10 -9
- package/dist/{cjs/wizard → wizard}/index.js +30 -27
- package/dist/{cjs/wizard → wizard}/store/index.js +1 -1
- package/package.json +18 -15
- package/shared/scss/_mixins.scss +2 -2
- package/src/accordion/index.js +35 -0
- package/src/accordion/style.scss +31 -0
- package/src/action-card/style.scss +9 -9
- package/src/autocomplete-tokenfield/style.scss +3 -3
- package/src/autocomplete-with-suggestions/index.js +46 -44
- package/src/autocomplete-with-suggestions/style.scss +8 -8
- package/src/button/style.scss +1 -1
- package/src/button-card/style.scss +19 -13
- package/src/card/style.scss +1 -1
- package/src/category-autocomplete/style.scss +2 -2
- package/src/color-picker/style.scss +3 -3
- package/src/custom-select-control/style.scss +11 -10
- package/src/date-range-picker/index.js +31 -0
- package/src/date-range-picker/style.scss +148 -0
- package/src/footer/style.scss +1 -1
- package/src/form-token-field/style.scss +1 -1
- package/src/grid/style.scss +9 -9
- package/src/handoff-message/index.js +3 -1
- package/src/image-upload/index.js +1 -1
- package/src/image-upload/index.test.js +6 -1
- package/src/image-upload/style.scss +5 -5
- package/src/index.js +2 -0
- package/src/modal/style.scss +5 -5
- package/src/newspack-icon/style.scss +1 -1
- package/src/newspack-logo/style.scss +1 -1
- package/src/notice/style.scss +11 -11
- package/src/plugin-installer/style.scss +1 -1
- package/src/plugin-settings/style.scss +1 -1
- package/src/plugin-toggle/index.js +6 -7
- package/src/plugin-toggle/style.scss +1 -1
- package/src/popover/style.scss +7 -7
- package/src/position-control/index.js +62 -63
- package/src/position-control/style.scss +8 -8
- package/src/progress-bar/style.scss +2 -2
- package/src/radio-control/style.scss +3 -3
- package/src/section-header/style.scss +1 -1
- package/src/select-control/style.scss +4 -4
- package/src/settings/style.scss +1 -1
- package/src/steps-list/style.scss +2 -2
- package/src/steps-list-item/style.scss +5 -5
- package/src/style-card/style.scss +4 -4
- package/src/style.scss +1 -1
- package/src/tabbed-navigation/index.js +1 -1
- package/src/tabbed-navigation/style.scss +4 -4
- package/src/web-preview/style.scss +5 -5
- package/src/with-wizard/style.scss +44 -22
- package/src/with-wizard-screen/style.scss +7 -7
- package/dist/cjs/autocomplete-tokenfield/style.scss +0 -49
- package/dist/cjs/button/index.js +0 -56
- package/dist/cjs/card/style.scss +0 -168
- package/dist/cjs/custom-select-control/style.scss +0 -92
- package/dist/cjs/form-token-field/style.scss +0 -37
- package/dist/cjs/grid/index.js +0 -37
- package/dist/cjs/grid/style.scss +0 -166
- package/dist/cjs/hooks/index.js +0 -25
- package/dist/cjs/hooks/usePrompt.js +0 -49
- package/dist/cjs/image-upload/index.js +0 -143
- package/dist/cjs/patrons-logo/index.js +0 -81
- package/dist/cjs/plugin-installer/index.js +0 -295
- package/dist/cjs/plugin-installer/style.scss +0 -72
- package/dist/cjs/plugin-settings/index.js +0 -221
- package/dist/cjs/plugin-toggle/index.js +0 -218
- package/dist/cjs/plugin-toggle/style.scss +0 -20
- package/dist/cjs/popover/style.scss +0 -161
- package/dist/cjs/progress-bar/style.scss +0 -42
- package/dist/cjs/proxied-imports/router.js +0 -14
- package/dist/cjs/radio-control/style.scss +0 -92
- package/dist/cjs/select-control/style.scss +0 -108
- package/dist/cjs/steps-list/style.scss +0 -11
- package/dist/cjs/style.scss +0 -55
- package/dist/cjs/text-control/index.js +0 -61
- package/dist/cjs/web-preview/index.js +0 -188
- package/dist/cjs/web-preview/style.scss +0 -155
- package/dist/cjs/with-wizard/index.js +0 -317
- package/dist/cjs/with-wizard-screen/style.scss +0 -160
- package/dist/esm/action-card/index.js +0 -221
- package/dist/esm/action-card/style.scss +0 -483
- package/dist/esm/autocomplete-tokenfield/index.js +0 -260
- package/dist/esm/autocomplete-with-suggestions/index.js +0 -276
- package/dist/esm/autocomplete-with-suggestions/style.scss +0 -163
- package/dist/esm/button/index.js +0 -48
- package/dist/esm/button/style.scss +0 -11
- package/dist/esm/button-card/index.js +0 -64
- package/dist/esm/button-card/style.scss +0 -174
- package/dist/esm/card/index.js +0 -43
- package/dist/esm/category-autocomplete/index.js +0 -181
- package/dist/esm/category-autocomplete/style.scss +0 -34
- package/dist/esm/color-picker/index.js +0 -59
- package/dist/esm/color-picker/style.scss +0 -37
- package/dist/esm/consts.js +0 -1
- package/dist/esm/custom-select-control/index.js +0 -37
- package/dist/esm/footer/index.js +0 -100
- package/dist/esm/footer/style.scss +0 -82
- package/dist/esm/form-token-field/index.js +0 -49
- package/dist/esm/global-notices/index.js +0 -30
- package/dist/esm/grid/index.js +0 -29
- package/dist/esm/handoff/index.js +0 -176
- package/dist/esm/handoff-message/index.js +0 -45
- package/dist/esm/hooks/index.js +0 -17
- package/dist/esm/hooks/useObjectState.js +0 -30
- package/dist/esm/hooks/useObjectState.test.js +0 -82
- package/dist/esm/hooks/useOnClickOutside.js +0 -31
- package/dist/esm/hooks/usePrompt.js +0 -40
- package/dist/esm/image-upload/index.js +0 -139
- package/dist/esm/image-upload/index.test.js +0 -28
- package/dist/esm/image-upload/style.scss +0 -103
- package/dist/esm/index.js +0 -45
- package/dist/esm/info-button/index.js +0 -42
- package/dist/esm/info-button/style.scss +0 -18
- package/dist/esm/modal/index.js +0 -39
- package/dist/esm/modal/style.scss +0 -56
- package/dist/esm/newspack-icon/index.js +0 -50
- package/dist/esm/newspack-icon/style.scss +0 -26
- package/dist/esm/newspack-logo/index.js +0 -46
- package/dist/esm/newspack-logo/style.scss +0 -30
- package/dist/esm/notice/index.js +0 -66
- package/dist/esm/notice/style.scss +0 -111
- package/dist/esm/patrons-logo/index.js +0 -75
- package/dist/esm/plugin-installer/index.js +0 -290
- package/dist/esm/plugin-settings/SettingsSection.js +0 -134
- package/dist/esm/plugin-settings/index.js +0 -216
- package/dist/esm/plugin-settings/style.scss +0 -7
- package/dist/esm/plugin-toggle/index.js +0 -213
- package/dist/esm/popover/index.js +0 -41
- package/dist/esm/position-control/index.js +0 -107
- package/dist/esm/position-control/style.scss +0 -66
- package/dist/esm/progress-bar/index.js +0 -68
- package/dist/esm/progress-bar/index.test.js +0 -109
- package/dist/esm/proxied-imports/router.js +0 -8
- package/dist/esm/radio-control/index.js +0 -37
- package/dist/esm/section-header/index.js +0 -67
- package/dist/esm/section-header/style.scss +0 -45
- package/dist/esm/select-control/ButtonGroupControl.js +0 -53
- package/dist/esm/select-control/GroupedSelectControl.js +0 -79
- package/dist/esm/select-control/index.js +0 -51
- package/dist/esm/settings/MinMaxSetting.js +0 -54
- package/dist/esm/settings/SettingsCard.js +0 -38
- package/dist/esm/settings/SettingsSection.js +0 -26
- package/dist/esm/settings/index.js +0 -9
- package/dist/esm/settings/style.scss +0 -119
- package/dist/esm/sortable-newsletter-list-control/index.js +0 -128
- package/dist/esm/sortable-newsletter-list-control/style.scss +0 -45
- package/dist/esm/steps-list/index.js +0 -43
- package/dist/esm/steps-list-item/index.js +0 -47
- package/dist/esm/steps-list-item/style.scss +0 -47
- package/dist/esm/style-card/index.js +0 -75
- package/dist/esm/style-card/style.scss +0 -94
- package/dist/esm/tabbed-navigation/index.js +0 -53
- package/dist/esm/tabbed-navigation/style.scss +0 -86
- package/dist/esm/text-control/index.js +0 -57
- package/dist/esm/text-control/style.scss +0 -32
- package/dist/esm/utils/index.js +0 -29
- package/dist/esm/waiting/index.js +0 -44
- package/dist/esm/waiting/style.scss +0 -27
- package/dist/esm/web-preview/index.js +0 -183
- package/dist/esm/with-wizard/index.js +0 -311
- package/dist/esm/with-wizard/style.scss +0 -260
- package/dist/esm/with-wizard-screen/index.js +0 -110
- package/dist/esm/wizard/components/WizardError.js +0 -67
- package/dist/esm/wizard/index.js +0 -120
- package/dist/esm/wizard/store/index.js +0 -155
- package/dist/esm/wizard/store/utils.js +0 -14
- /package/dist/{cjs/consts.js → consts.js} +0 -0
- /package/dist/{cjs/hooks → hooks}/useOnClickOutside.js +0 -0
- /package/dist/{cjs/info-button → info-button}/style.scss +0 -0
- /package/dist/{cjs/sortable-newsletter-list-control → sortable-newsletter-list-control}/style.scss +0 -0
- /package/dist/{cjs/text-control → text-control}/style.scss +0 -0
- /package/dist/{cjs/waiting → waiting}/style.scss +0 -0
- /package/dist/{cjs/wizard → wizard}/store/utils.js +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -16,17 +15,21 @@ var _router = _interopRequireDefault(require("../proxied-imports/router"));
|
|
|
16
15
|
var _store = _interopRequireWildcard(require("./store"));
|
|
17
16
|
var _utils = require("./store/utils");
|
|
18
17
|
var _WizardError = _interopRequireDefault(require("./components/WizardError"));
|
|
19
|
-
var _jsxRuntime = require("
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
21
|
/**
|
|
21
22
|
* External dependencies.
|
|
22
23
|
*/
|
|
24
|
+
|
|
23
25
|
/**
|
|
24
26
|
* WordPress dependencies.
|
|
25
27
|
*/
|
|
26
|
-
|
|
28
|
+
|
|
27
29
|
/**
|
|
28
30
|
* Internal dependencies
|
|
29
31
|
*/
|
|
32
|
+
|
|
30
33
|
(0, _store.default)();
|
|
31
34
|
const {
|
|
32
35
|
HashRouter,
|
|
@@ -53,10 +56,10 @@ const Wizard = ({
|
|
|
53
56
|
let displayedSections = sections.filter(section => !section.isHidden);
|
|
54
57
|
const [pluginRequirementsSatisfied, setPluginRequirementsSatisfied] = (0, _element.useState)(requiredPlugins.length === 0);
|
|
55
58
|
if (!pluginRequirementsSatisfied) {
|
|
56
|
-
headerText = requiredPlugins.length > 1 ? __('Required plugins', 'newspack-plugin') : __('Required plugin', 'newspack-plugin');
|
|
59
|
+
headerText = requiredPlugins.length > 1 ? (0, _i18n.__)('Required plugins', 'newspack-plugin') : (0, _i18n.__)('Required plugin', 'newspack-plugin');
|
|
57
60
|
displayedSections = [{
|
|
58
61
|
path: '/',
|
|
59
|
-
render: () => (0, _jsxRuntime.jsx)(_.PluginInstaller, {
|
|
62
|
+
render: () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_.PluginInstaller, {
|
|
60
63
|
plugins: requiredPlugins,
|
|
61
64
|
onStatus: ({
|
|
62
65
|
complete
|
|
@@ -64,59 +67,59 @@ const Wizard = ({
|
|
|
64
67
|
})
|
|
65
68
|
}];
|
|
66
69
|
}
|
|
67
|
-
return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
68
|
-
children: [(0, _jsxRuntime.jsx)("div", {
|
|
70
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
71
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
69
72
|
className: (0, _classnames.default)(isLoading ? 'newspack-wizard__is-loading' : 'newspack-wizard__is-loaded', {
|
|
70
73
|
'newspack-wizard__is-loading-quiet': isQuietLoading
|
|
71
74
|
}),
|
|
72
|
-
children: (0, _jsxRuntime.jsxs)(HashRouter, {
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(HashRouter, {
|
|
73
76
|
hashType: "slash",
|
|
74
|
-
children: [newspack_aux_data.is_debug_mode && (0, _jsxRuntime.jsx)(_.Notice, {
|
|
77
|
+
children: [newspack_aux_data.is_debug_mode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Notice, {
|
|
75
78
|
debugMode: true
|
|
76
|
-
}), (0, _jsxRuntime.jsx)("div", {
|
|
79
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
77
80
|
className: "bg-white",
|
|
78
|
-
children: (0, _jsxRuntime.jsx)("div", {
|
|
81
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
82
|
className: "newspack-wizard__header__inner",
|
|
80
|
-
children: (0, _jsxRuntime.jsxs)("div", {
|
|
83
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
81
84
|
className: "newspack-wizard__title",
|
|
82
|
-
children: [(0, _jsxRuntime.jsx)(_.Button, {
|
|
85
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, {
|
|
83
86
|
isLink: true,
|
|
84
87
|
href: newspack_urls.dashboard,
|
|
85
|
-
label: __('Return to Dashboard', 'newspack-plugin'),
|
|
88
|
+
label: (0, _i18n.__)('Return to Dashboard', 'newspack-plugin'),
|
|
86
89
|
showTooltip: true,
|
|
87
90
|
icon: _icons.category,
|
|
88
91
|
iconSize: 36,
|
|
89
|
-
children: (0, _jsxRuntime.jsx)(_.NewspackIcon, {
|
|
92
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.NewspackIcon, {
|
|
90
93
|
size: 36
|
|
91
94
|
})
|
|
92
|
-
}), (0, _jsxRuntime.jsxs)("div", {
|
|
93
|
-
children: [headerText && (0, _jsxRuntime.jsx)("h2", {
|
|
95
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
96
|
+
children: [headerText && /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
|
|
94
97
|
children: headerText
|
|
95
|
-
}), subHeaderText && (0, _jsxRuntime.jsx)("span", {
|
|
98
|
+
}), subHeaderText && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
96
99
|
children: subHeaderText
|
|
97
100
|
})]
|
|
98
101
|
})]
|
|
99
102
|
})
|
|
100
103
|
})
|
|
101
|
-
}), displayedSections.length > 1 && (0, _jsxRuntime.jsx)(_.TabbedNavigation, {
|
|
104
|
+
}), displayedSections.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.TabbedNavigation, {
|
|
102
105
|
items: displayedSections,
|
|
103
|
-
children: (0, _jsxRuntime.jsx)(_WizardError.default, {})
|
|
104
|
-
}), (0, _jsxRuntime.jsx)(_.HandoffMessage, {}), (0, _jsxRuntime.jsxs)(Switch, {
|
|
106
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_WizardError.default, {})
|
|
107
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.HandoffMessage, {}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Switch, {
|
|
105
108
|
children: [displayedSections.map((section, index) => {
|
|
106
109
|
const SectionComponent = section.render;
|
|
107
|
-
return (0, _jsxRuntime.jsx)(Route, {
|
|
110
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Route, {
|
|
108
111
|
path: section.path,
|
|
109
|
-
children: (0, _jsxRuntime.jsxs)("div", {
|
|
112
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
110
113
|
className: (0, _classnames.default)('newspack-wizard newspack-wizard__content', className),
|
|
111
|
-
children: ['function' === typeof renderAboveSections ? renderAboveSections() : null, (0, _jsxRuntime.jsx)(SectionComponent, {})]
|
|
114
|
+
children: ['function' === typeof renderAboveSections ? renderAboveSections() : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(SectionComponent, {})]
|
|
112
115
|
})
|
|
113
116
|
}, index);
|
|
114
|
-
}), (0, _jsxRuntime.jsx)(Redirect, {
|
|
117
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Redirect, {
|
|
115
118
|
to: displayedSections[0].path
|
|
116
119
|
})]
|
|
117
120
|
})]
|
|
118
121
|
})
|
|
119
|
-
}), !isLoading && (0, _jsxRuntime.jsx)(_.Footer, {
|
|
122
|
+
}), !isLoading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Footer, {
|
|
120
123
|
simple: hasSimpleFooter
|
|
121
124
|
})]
|
|
122
125
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newspack-components",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.2",
|
|
4
4
|
"description": "Newspack design system components",
|
|
5
5
|
"author": "Automattic",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -16,29 +16,32 @@
|
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "https://github.com/Automattic/newspack-plugin.git",
|
|
19
|
-
"directory": "
|
|
19
|
+
"directory": "src/components"
|
|
20
20
|
},
|
|
21
|
-
"main": "dist/
|
|
21
|
+
"main": "dist/index.js",
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@wordpress/base-styles": "^5.
|
|
27
|
-
"@wordpress/components": "^28.
|
|
28
|
-
"@wordpress/element": "^6.
|
|
29
|
-
"@wordpress/i18n": "^5.
|
|
30
|
-
"@wordpress/icons": "^10.
|
|
26
|
+
"@wordpress/base-styles": "^5.0.0",
|
|
27
|
+
"@wordpress/components": "^28.0.0",
|
|
28
|
+
"@wordpress/element": "^6.0.0",
|
|
29
|
+
"@wordpress/i18n": "^5.0.0",
|
|
30
|
+
"@wordpress/icons": "^10.0.0",
|
|
31
31
|
"classnames": "^2.3.1",
|
|
32
32
|
"lodash": "^4.17.21",
|
|
33
|
+
"moment-range": "^3.1.1",
|
|
33
34
|
"qs": "^6.10.1",
|
|
34
|
-
"react-
|
|
35
|
+
"react-daterange-picker": "^2.0.1",
|
|
36
|
+
"react-router-dom": "^5.3.4"
|
|
35
37
|
},
|
|
36
38
|
"devDependencies": {
|
|
37
|
-
"@
|
|
38
|
-
"@babel/
|
|
39
|
-
"@babel/
|
|
40
|
-
"@
|
|
41
|
-
"
|
|
39
|
+
"@babel/cli": "^7.24.0",
|
|
40
|
+
"@babel/core": "^7.24.0",
|
|
41
|
+
"@babel/preset-env": "^7.24.7",
|
|
42
|
+
"@babel/preset-react": "^7.24.7",
|
|
43
|
+
"@babel/preset-typescript": "^7.24.7",
|
|
44
|
+
"recursive-copy": "^2.0.0"
|
|
42
45
|
},
|
|
43
46
|
"babel": {
|
|
44
47
|
"ignore": [
|
|
@@ -46,7 +49,7 @@
|
|
|
46
49
|
]
|
|
47
50
|
},
|
|
48
51
|
"scripts": {
|
|
49
|
-
"prepublishOnly": "
|
|
52
|
+
"prepublishOnly": "npx babel src --out-dir dist && node copy-styles.js",
|
|
50
53
|
"postpublish": "rm -r dist && rm -r shared"
|
|
51
54
|
}
|
|
52
55
|
}
|
package/shared/scss/_mixins.scss
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
2
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* WordPress dependencies
|
|
6
|
+
*/
|
|
7
|
+
import { useState } from '@wordpress/element';
|
|
8
|
+
import { Icon, chevronRight } from '@wordpress/icons';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* External dependencies
|
|
12
|
+
*/
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Internal dependencies
|
|
17
|
+
*/
|
|
18
|
+
import './style.scss';
|
|
19
|
+
|
|
20
|
+
const Accordion = ( { children, title } ) => {
|
|
21
|
+
const [ isOpen, setIsOpen ] = useState( false );
|
|
22
|
+
return (
|
|
23
|
+
<details
|
|
24
|
+
className={ classNames( 'newspack-accordion', { 'newspack-accordion--is-open': isOpen } ) }
|
|
25
|
+
>
|
|
26
|
+
<summary onClick={ () => setIsOpen( ! isOpen ) }>
|
|
27
|
+
{ title }
|
|
28
|
+
<Icon className="newspack-accordion__icon" icon={ chevronRight } size={ 24 } />
|
|
29
|
+
</summary>
|
|
30
|
+
<div className="newspack-accordion__content">{ children }</div>
|
|
31
|
+
</details>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default Accordion;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
2
|
+
|
|
3
|
+
.newspack-accordion {
|
|
4
|
+
border: 1px solid wp-colors.$gray-300;
|
|
5
|
+
|
|
6
|
+
&__icon {
|
|
7
|
+
transition: transform 200ms ease-out;
|
|
8
|
+
transform: rotate(90deg);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&--is-open {
|
|
12
|
+
.newspack-accordion {
|
|
13
|
+
&__icon {
|
|
14
|
+
transform: rotate(-90deg);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
summary {
|
|
19
|
+
padding: 16px 32px;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
font-weight: bold;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__content {
|
|
29
|
+
padding: 16px 32px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Action Card
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@use
|
|
6
|
-
@use
|
|
5
|
+
@use "sass:color";
|
|
6
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
7
7
|
|
|
8
8
|
.newspack-card.newspack-action-card {
|
|
9
9
|
padding: 0;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
transition: box-shadow 125ms ease-in-out;
|
|
16
16
|
|
|
17
17
|
&:hover {
|
|
18
|
-
box-shadow: 0 4px 8px rgba(
|
|
18
|
+
box-shadow: 0 4px 8px rgba(black, 0.08);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&.newspack-card__is-primary {
|
|
37
|
-
box-shadow: inset 4px 0 0 var(
|
|
37
|
+
box-shadow: inset 4px 0 0 var(--wp-admin-theme-color);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&.newspack-card__is-secondary {
|
|
@@ -181,12 +181,12 @@
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
.newspack-action-card__region-top {
|
|
184
|
-
background-color: rgba(
|
|
184
|
+
background-color: rgba(black, 0.025);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
.newspack-action-card__region-center {
|
|
188
188
|
p {
|
|
189
|
-
color: color.adjust(
|
|
189
|
+
color: color.adjust(wp-colors.$gray-700, $lightness: -0.75%);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
}
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
border-left-width: 1px;
|
|
210
210
|
border-bottom-width: 1px;
|
|
211
211
|
border-radius: 0 0 0 2px;
|
|
212
|
-
content:
|
|
212
|
+
content: "";
|
|
213
213
|
display: block;
|
|
214
214
|
position: absolute;
|
|
215
215
|
inset: -17px 100% 50% -28px;
|
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
// Typography
|
|
220
220
|
|
|
221
221
|
h2,
|
|
222
|
-
p:not(
|
|
222
|
+
p:not([class*="components-base-control"]) {
|
|
223
223
|
margin: 0;
|
|
224
224
|
max-width: 100%;
|
|
225
225
|
width: 100%;
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
&:active,
|
|
243
243
|
&:focus,
|
|
244
244
|
&:hover {
|
|
245
|
-
color: var(
|
|
245
|
+
color: var(--wp-admin-theme-color);
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Autocomplete Token Field
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@use
|
|
5
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
6
6
|
|
|
7
7
|
.newspack-autocomplete-tokenfield {
|
|
8
8
|
.components-spinner {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
padding-left: 0;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.components-button:focus:not(
|
|
47
|
-
box-shadow: inset 0 0 0 var(
|
|
46
|
+
.components-button:focus:not(:disabled) {
|
|
47
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -81,24 +81,24 @@ const AutocompleteWithSuggestions = ( {
|
|
|
81
81
|
const handleFetchSaved = fetchSavedPosts
|
|
82
82
|
? fetchSavedPosts
|
|
83
83
|
: async ( postIds = [], searchSlug = null ) => {
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
const postTypeSlug = searchSlug || postTypeToSearch;
|
|
85
|
+
const endpoint =
|
|
86
86
|
'post' === postTypeSlug || 'page' === postTypeSlug
|
|
87
87
|
? postTypeSlug + 's' // Default post type endpoints are plural.
|
|
88
88
|
: postTypeSlug; // Custom post type endpoints are singular.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
const posts = await apiFetch( {
|
|
90
|
+
path: addQueryArgs( '/wp/v2/' + endpoint, {
|
|
91
|
+
per_page: 100,
|
|
92
|
+
include: postIds.join( ',' ),
|
|
93
|
+
_fields: 'id,title',
|
|
94
|
+
} ),
|
|
95
|
+
} );
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
return posts.map( post => ( {
|
|
98
|
+
value: parseInt( post.id ),
|
|
99
|
+
label: decodeEntities( post.title ) || __( '(no title)', 'newspack-plugin' ),
|
|
100
|
+
} ) );
|
|
101
|
+
};
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* If passed a `fetchSuggestions` prop, use that, otherwise, build it based on the selected post type.
|
|
@@ -106,36 +106,36 @@ const AutocompleteWithSuggestions = ( {
|
|
|
106
106
|
const handleFetchSuggestions = fetchSuggestions
|
|
107
107
|
? fetchSuggestions
|
|
108
108
|
: async ( search = null, offset = 0, searchSlug = null ) => {
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
const postTypeSlug = searchSlug || postTypeToSearch;
|
|
110
|
+
const endpoint =
|
|
111
111
|
'post' === postTypeSlug || 'page' === postTypeSlug
|
|
112
112
|
? postTypeSlug + 's' // Default post type endpoints are plural.
|
|
113
113
|
: postTypeSlug; // Custom post type endpoints are singular.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
const response = await apiFetch( {
|
|
115
|
+
parse: false,
|
|
116
|
+
path: addQueryArgs( '/wp/v2/' + endpoint, {
|
|
117
|
+
search,
|
|
118
|
+
offset,
|
|
119
|
+
per_page: suggestionsToFetch,
|
|
120
|
+
_fields: 'id,title',
|
|
121
|
+
} ),
|
|
122
|
+
} );
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
const total = parseInt( response.headers.get( 'x-wp-total' ) || 0 );
|
|
125
|
+
const posts = await response.json();
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
setMaxSuggestions( total );
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
129
|
+
// Format suggestions for FormTokenField display.
|
|
130
|
+
return posts.reduce( ( acc, post ) => {
|
|
131
|
+
acc.push( {
|
|
132
|
+
value: parseInt( post.id ),
|
|
133
|
+
label: decodeEntities( post?.title.rendered ) || __( '(no title)', 'newspack-plugin' ),
|
|
134
|
+
} );
|
|
135
135
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
return acc;
|
|
137
|
+
}, [] );
|
|
138
|
+
};
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* Intercept onChange callback so we can decide whether to allow multiple selections.
|
|
@@ -176,13 +176,15 @@ const AutocompleteWithSuggestions = ( {
|
|
|
176
176
|
const selections = selectedPost ? [ ...selectedItems, selectedPost ] : selectedItems;
|
|
177
177
|
const selectedMessage = multiSelect
|
|
178
178
|
? sprintf(
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
179
|
+
// Translators: %1: the length of selections. %2: the selection leabel.
|
|
180
|
+
__( '%1$s %2$s selected', 'newspack-plugin' ),
|
|
181
|
+
selections.length,
|
|
182
|
+
selections.length > 1 ? postTypeLabelPlural : postTypeLabel
|
|
183
|
+
) : sprintf(
|
|
184
|
+
// Translators: %s: The label for the selection.
|
|
185
|
+
__( 'Selected %s', 'newspack-plugin' ),
|
|
186
|
+
postTypeLabel
|
|
187
|
+
);
|
|
186
188
|
|
|
187
189
|
return (
|
|
188
190
|
<div className="newspack-autocomplete-with-suggestions__selected-items">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Styles for AutocompleteWithSuggestions component.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@use
|
|
5
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
6
6
|
|
|
7
7
|
.newspack-autocomplete-with-suggestions {
|
|
8
8
|
width: 100%;
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
padding-right: 8px;
|
|
98
98
|
|
|
99
99
|
&::after {
|
|
100
|
-
content:
|
|
100
|
+
content: "✕";
|
|
101
101
|
margin-left: 8px;
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -126,10 +126,10 @@
|
|
|
126
126
|
text-decoration: none;
|
|
127
127
|
width: 100%;
|
|
128
128
|
|
|
129
|
-
&:active:not(
|
|
130
|
-
&:hover:not(
|
|
129
|
+
&:active:not(:disabled),
|
|
130
|
+
&:hover:not(:disabled) {
|
|
131
131
|
background: wp-colors.$gray-900;
|
|
132
|
-
background: var(
|
|
132
|
+
background: var(--wp-admin-theme-color);
|
|
133
133
|
color: white;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
@@ -149,14 +149,14 @@
|
|
|
149
149
|
.components-button {
|
|
150
150
|
line-height: normal;
|
|
151
151
|
|
|
152
|
-
&:focus:not(
|
|
152
|
+
&:focus:not(:disabled) {
|
|
153
153
|
border-radius: 0;
|
|
154
154
|
box-shadow: inset 0 0 0 1.5px wp-colors.$gray-900;
|
|
155
|
-
box-shadow: inset 0 0 0 var(
|
|
155
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
&.is-secondary {
|
|
159
|
-
width: calc(
|
|
159
|
+
width: calc(100% - 16px);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
package/src/button/style.scss
CHANGED
|
@@ -2,40 +2,44 @@
|
|
|
2
2
|
* Button Card
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@use
|
|
5
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
6
6
|
|
|
7
7
|
.newspack-button-card {
|
|
8
8
|
background: white;
|
|
9
9
|
border-radius: 2px;
|
|
10
10
|
border: 1px solid wp-colors.$gray-300;
|
|
11
|
-
box-shadow: inset 0 0 0 var(
|
|
11
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent;
|
|
12
12
|
cursor: pointer;
|
|
13
13
|
display: block;
|
|
14
14
|
margin: 32px 0;
|
|
15
15
|
padding: 32px;
|
|
16
16
|
position: relative;
|
|
17
17
|
text-decoration: none;
|
|
18
|
-
transition:
|
|
18
|
+
transition:
|
|
19
|
+
background-color 125ms ease-in-out,
|
|
20
|
+
border-color 125ms ease-in-out,
|
|
19
21
|
box-shadow 125ms ease-in-out;
|
|
20
22
|
|
|
21
23
|
&:focus,
|
|
22
24
|
&.is-pressed {
|
|
23
25
|
background: white;
|
|
24
|
-
border-color: var(
|
|
25
|
-
box-shadow: inset 0 0 0 1px var(
|
|
26
|
+
border-color: var(--wp-admin-theme-color);
|
|
27
|
+
box-shadow: inset 0 0 0 1px var(--wp-admin-theme-color) !important;
|
|
26
28
|
outline: none !important;
|
|
27
29
|
z-index: 1;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
&.is-pressed:focus-visible {
|
|
31
|
-
box-shadow:
|
|
32
|
-
0 0 0
|
|
33
|
+
box-shadow:
|
|
34
|
+
inset 0 0 0 1px var(--wp-admin-theme-color),
|
|
35
|
+
0 0 0 1px white,
|
|
36
|
+
0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color) !important;
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
&:active,
|
|
36
40
|
&:hover {
|
|
37
|
-
border-color: var(
|
|
38
|
-
color: var(
|
|
41
|
+
border-color: var(--wp-admin-theme-color);
|
|
42
|
+
color: var(--wp-admin-theme-color);
|
|
39
43
|
text-decoration: none;
|
|
40
44
|
z-index: 1;
|
|
41
45
|
|
|
@@ -63,7 +67,7 @@
|
|
|
63
67
|
&.grouped {
|
|
64
68
|
border-radius: 0;
|
|
65
69
|
|
|
66
|
-
& + &:not(
|
|
70
|
+
& + &:not(.br--top) {
|
|
67
71
|
margin-top: -33px;
|
|
68
72
|
}
|
|
69
73
|
|
|
@@ -95,7 +99,7 @@
|
|
|
95
99
|
}
|
|
96
100
|
|
|
97
101
|
svg {
|
|
98
|
-
fill: var(
|
|
102
|
+
fill: var(--wp-admin-theme-color);
|
|
99
103
|
transition: fill 125ms ease-in-out;
|
|
100
104
|
}
|
|
101
105
|
}
|
|
@@ -161,8 +165,10 @@
|
|
|
161
165
|
}
|
|
162
166
|
|
|
163
167
|
&.is-pressed:focus-visible {
|
|
164
|
-
box-shadow:
|
|
165
|
-
0 0 0
|
|
168
|
+
box-shadow:
|
|
169
|
+
inset 0 0 0 1px wp-colors.$alert-red,
|
|
170
|
+
0 0 0 1px white,
|
|
171
|
+
0 0 0 var(--wp-admin-border-width-focus) wp-colors.$alert-red !important;
|
|
166
172
|
}
|
|
167
173
|
|
|
168
174
|
&:active,
|
package/src/card/style.scss
CHANGED