newspack-components 2.0.3 → 2.1.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/copy-styles.js +1 -1
- package/dist/cjs/action-card/index.js +29 -20
- package/dist/cjs/action-card/style.scss +52 -27
- package/dist/cjs/autocomplete-tokenfield/style.scss +4 -4
- package/dist/cjs/autocomplete-with-suggestions/index.js +3 -2
- package/dist/cjs/autocomplete-with-suggestions/style.scss +19 -20
- package/dist/cjs/button/index.js +2 -13
- package/dist/cjs/button/style.scss +3 -344
- package/dist/cjs/button-card/index.js +11 -6
- package/dist/cjs/button-card/style.scss +60 -30
- package/dist/cjs/card/index.js +3 -1
- package/dist/cjs/card/style.scss +29 -62
- package/dist/cjs/category-autocomplete/index.js +52 -13
- package/dist/cjs/category-autocomplete/style.scss +20 -22
- package/dist/cjs/color-picker/index.js +17 -35
- package/dist/cjs/color-picker/style.scss +20 -160
- package/dist/cjs/custom-select-control/style.scss +12 -42
- package/dist/cjs/footer/index.js +21 -7
- package/dist/cjs/footer/style.scss +9 -10
- package/dist/cjs/form-token-field/index.js +2 -2
- package/dist/cjs/form-token-field/style.scss +8 -103
- package/dist/cjs/global-notices/index.js +2 -1
- package/dist/cjs/grid/style.scss +14 -1
- package/dist/cjs/handoff/index.js +7 -7
- package/dist/cjs/image-upload/index.js +1 -1
- package/dist/cjs/image-upload/style.scss +10 -11
- package/dist/cjs/index.js +7 -53
- package/dist/cjs/modal/index.js +0 -3
- package/dist/cjs/modal/style.scss +19 -131
- package/dist/cjs/newspack-icon/index.js +4 -2
- package/dist/cjs/newspack-icon/style.scss +15 -0
- package/dist/cjs/notice/index.js +8 -9
- package/dist/cjs/notice/style.scss +38 -10
- package/dist/cjs/plugin-installer/index.js +1 -1
- package/dist/cjs/plugin-settings/SettingsSection.js +74 -43
- package/dist/cjs/plugin-settings/index.js +34 -30
- package/dist/cjs/plugin-settings/style.scss +7 -0
- package/dist/cjs/plugin-toggle/index.js +22 -1
- package/dist/cjs/popover/style.scss +2 -2
- package/dist/cjs/radio-control/style.scss +1 -2
- package/dist/cjs/section-header/index.js +18 -5
- package/dist/cjs/section-header/style.scss +22 -1
- package/dist/cjs/select-control/ButtonGroupControl.js +8 -8
- package/dist/cjs/select-control/GroupedSelectControl.js +33 -30
- package/dist/cjs/select-control/index.js +1 -2
- package/dist/cjs/select-control/style.scss +46 -87
- package/dist/cjs/settings/MinMaxSetting.js +4 -2
- package/dist/cjs/settings/SettingsCard.js +6 -1
- package/dist/cjs/settings/SettingsSection.js +4 -4
- package/dist/cjs/settings/style.scss +32 -4
- package/dist/cjs/style-card/index.js +10 -6
- package/dist/cjs/style-card/style.scss +12 -8
- package/dist/cjs/style.scss +44 -0
- package/dist/cjs/tabbed-navigation/index.js +13 -20
- package/dist/cjs/tabbed-navigation/style.scss +56 -34
- package/dist/cjs/text-control/index.js +0 -3
- package/dist/cjs/text-control/style.scss +0 -126
- package/dist/cjs/waiting/index.js +9 -25
- package/dist/cjs/waiting/style.scss +9 -20
- package/dist/cjs/web-preview/index.js +18 -30
- package/dist/cjs/web-preview/style.scss +33 -26
- package/dist/cjs/with-wizard/index.js +4 -2
- package/dist/cjs/with-wizard/style.scss +44 -89
- package/dist/cjs/with-wizard-screen/index.js +17 -21
- package/dist/cjs/with-wizard-screen/style.scss +74 -121
- package/dist/cjs/wizard/components/WizardError.js +86 -0
- package/dist/cjs/wizard/index.js +145 -0
- package/dist/cjs/wizard/store/index.js +178 -0
- package/dist/cjs/wizard/store/utils.js +31 -0
- package/dist/esm/action-card/index.js +30 -21
- package/dist/esm/action-card/style.scss +52 -27
- package/dist/esm/autocomplete-tokenfield/style.scss +4 -4
- package/dist/esm/autocomplete-with-suggestions/index.js +3 -2
- package/dist/esm/autocomplete-with-suggestions/style.scss +19 -20
- package/dist/esm/button/index.js +2 -12
- package/dist/esm/button/style.scss +3 -344
- package/dist/esm/button-card/index.js +10 -6
- package/dist/esm/button-card/style.scss +60 -30
- package/dist/esm/card/index.js +3 -1
- package/dist/esm/card/style.scss +29 -62
- package/dist/esm/category-autocomplete/index.js +54 -14
- package/dist/esm/category-autocomplete/style.scss +20 -22
- package/dist/esm/color-picker/index.js +15 -34
- package/dist/esm/color-picker/style.scss +20 -160
- package/dist/esm/custom-select-control/style.scss +12 -42
- package/dist/esm/footer/index.js +21 -7
- package/dist/esm/footer/style.scss +9 -10
- package/dist/esm/form-token-field/index.js +2 -2
- package/dist/esm/form-token-field/style.scss +8 -103
- package/dist/esm/global-notices/index.js +2 -1
- package/dist/esm/grid/style.scss +14 -1
- package/dist/esm/handoff/index.js +7 -7
- package/dist/esm/image-upload/index.js +1 -1
- package/dist/esm/image-upload/style.scss +10 -11
- package/dist/esm/index.js +3 -8
- package/dist/esm/modal/index.js +0 -3
- package/dist/esm/modal/style.scss +19 -131
- package/dist/esm/newspack-icon/index.js +4 -2
- package/dist/esm/newspack-icon/style.scss +15 -0
- package/dist/esm/notice/index.js +8 -3
- package/dist/esm/notice/style.scss +38 -10
- package/dist/esm/plugin-installer/index.js +2 -1
- package/dist/esm/plugin-settings/SettingsSection.js +72 -44
- package/dist/esm/plugin-settings/index.js +34 -30
- package/dist/esm/plugin-settings/style.scss +7 -0
- package/dist/esm/plugin-toggle/index.js +23 -1
- package/dist/esm/popover/style.scss +2 -2
- package/dist/esm/radio-control/style.scss +1 -2
- package/dist/esm/section-header/index.js +17 -5
- package/dist/esm/section-header/style.scss +22 -1
- package/dist/esm/select-control/ButtonGroupControl.js +8 -8
- package/dist/esm/select-control/GroupedSelectControl.js +33 -30
- package/dist/esm/select-control/index.js +1 -2
- package/dist/esm/select-control/style.scss +46 -87
- package/dist/esm/settings/MinMaxSetting.js +3 -2
- package/dist/esm/settings/SettingsCard.js +6 -1
- package/dist/esm/settings/SettingsSection.js +5 -5
- package/dist/esm/settings/style.scss +32 -4
- package/dist/esm/style-card/index.js +11 -8
- package/dist/esm/style-card/style.scss +12 -8
- package/dist/esm/style.scss +44 -0
- package/dist/esm/tabbed-navigation/index.js +14 -22
- package/dist/esm/tabbed-navigation/style.scss +56 -34
- package/dist/esm/text-control/index.js +0 -3
- package/dist/esm/text-control/style.scss +0 -126
- package/dist/esm/waiting/index.js +9 -22
- package/dist/esm/waiting/style.scss +9 -20
- package/dist/esm/web-preview/index.js +12 -25
- package/dist/esm/web-preview/style.scss +33 -26
- package/dist/esm/with-wizard/index.js +4 -2
- package/dist/esm/with-wizard/style.scss +44 -89
- package/dist/esm/with-wizard-screen/index.js +18 -22
- package/dist/esm/with-wizard-screen/style.scss +74 -121
- package/dist/esm/wizard/components/WizardError.js +78 -0
- package/dist/esm/wizard/index.js +128 -0
- package/dist/esm/wizard/store/index.js +161 -0
- package/dist/esm/wizard/store/utils.js +17 -0
- package/package.json +1 -1
- package/shared/scss/_colors.scss +15 -0
- package/src/action-card/index.js +28 -18
- package/src/action-card/style.scss +52 -27
- package/src/autocomplete-tokenfield/style.scss +4 -4
- package/src/autocomplete-with-suggestions/index.js +4 -2
- package/src/autocomplete-with-suggestions/style.scss +19 -20
- package/src/button/index.js +2 -9
- package/src/button/style.scss +3 -344
- package/src/button-card/index.js +19 -5
- package/src/button-card/style.scss +60 -30
- package/src/card/index.js +4 -0
- package/src/card/style.scss +29 -62
- package/src/category-autocomplete/index.js +51 -18
- package/src/category-autocomplete/style.scss +20 -22
- package/src/color-picker/index.js +16 -22
- package/src/color-picker/style.scss +20 -160
- package/src/custom-select-control/style.scss +12 -42
- package/src/footer/index.js +19 -8
- package/src/footer/style.scss +9 -10
- package/src/form-token-field/index.js +1 -1
- package/src/form-token-field/style.scss +8 -103
- package/src/global-notices/index.js +1 -1
- package/src/grid/style.scss +14 -1
- package/src/handoff/index.js +7 -7
- package/src/image-upload/style.scss +10 -11
- package/src/index.js +3 -7
- package/src/modal/index.js +2 -5
- package/src/modal/style.scss +19 -131
- package/src/newspack-icon/index.js +7 -2
- package/src/newspack-icon/style.scss +15 -0
- package/src/notice/index.js +7 -1
- package/src/notice/style.scss +38 -10
- package/src/plugin-installer/index.js +2 -2
- package/src/plugin-settings/SettingsSection.js +64 -26
- package/src/plugin-settings/index.js +23 -7
- package/src/plugin-settings/style.scss +7 -0
- package/src/plugin-toggle/index.js +35 -9
- package/src/popover/style.scss +2 -2
- package/src/radio-control/style.scss +1 -2
- package/src/section-header/index.js +25 -6
- package/src/section-header/style.scss +22 -1
- package/src/select-control/ButtonGroupControl.js +13 -6
- package/src/select-control/GroupedSelectControl.js +26 -24
- package/src/select-control/index.js +1 -2
- package/src/select-control/style.scss +46 -87
- package/src/settings/MinMaxSetting.js +2 -1
- package/src/settings/SettingsCard.js +9 -7
- package/src/settings/SettingsSection.js +4 -4
- package/src/settings/style.scss +32 -4
- package/src/style-card/index.js +14 -16
- package/src/style-card/style.scss +12 -8
- package/src/style.scss +44 -0
- package/src/tabbed-navigation/index.js +12 -24
- package/src/tabbed-navigation/style.scss +56 -34
- package/src/text-control/index.js +1 -2
- package/src/text-control/style.scss +0 -126
- package/src/waiting/index.js +7 -18
- package/src/waiting/style.scss +9 -20
- package/src/web-preview/index.js +12 -33
- package/src/web-preview/style.scss +33 -26
- package/src/with-wizard/index.js +7 -5
- package/src/with-wizard/style.scss +44 -89
- package/src/with-wizard-screen/index.js +14 -17
- package/src/with-wizard-screen/style.scss +74 -121
- package/src/wizard/components/WizardError.js +57 -0
- package/src/wizard/index.js +133 -0
- package/src/wizard/store/index.js +126 -0
- package/src/wizard/store/utils.js +16 -0
- package/dist/cjs/button-group/index.js +0 -57
- package/dist/cjs/button-group/style.scss +0 -73
- package/dist/cjs/checkbox-control/index.js +0 -63
- package/dist/cjs/checkbox-control/style.scss +0 -78
- package/dist/cjs/preview-box/index.js +0 -36
- package/dist/cjs/preview-box/style.scss +0 -18
- package/dist/cjs/textarea-control/index.js +0 -54
- package/dist/cjs/textarea-control/style.scss +0 -76
- package/dist/cjs/toggle-control/index.js +0 -58
- package/dist/cjs/toggle-control/style.scss +0 -74
- package/dist/cjs/toggle-group/index.js +0 -71
- package/dist/cjs/toggle-group/style.scss +0 -28
- package/dist/cjs/wizard-pagination/index.js +0 -71
- package/dist/cjs/wizard-pagination/style.scss +0 -74
- package/dist/esm/button-group/index.js +0 -43
- package/dist/esm/button-group/style.scss +0 -73
- package/dist/esm/checkbox-control/index.js +0 -49
- package/dist/esm/checkbox-control/style.scss +0 -78
- package/dist/esm/preview-box/index.js +0 -30
- package/dist/esm/preview-box/style.scss +0 -18
- package/dist/esm/textarea-control/index.js +0 -40
- package/dist/esm/textarea-control/style.scss +0 -76
- package/dist/esm/toggle-control/index.js +0 -44
- package/dist/esm/toggle-control/style.scss +0 -74
- package/dist/esm/toggle-group/index.js +0 -58
- package/dist/esm/toggle-group/style.scss +0 -28
- package/dist/esm/wizard-pagination/index.js +0 -57
- package/dist/esm/wizard-pagination/style.scss +0 -74
- package/src/button-group/index.js +0 -35
- package/src/button-group/style.scss +0 -73
- package/src/checkbox-control/index.js +0 -38
- package/src/checkbox-control/style.scss +0 -78
- package/src/preview-box/index.js +0 -18
- package/src/preview-box/style.scss +0 -18
- package/src/textarea-control/index.js +0 -32
- package/src/textarea-control/style.scss +0 -76
- package/src/toggle-control/index.js +0 -38
- package/src/toggle-control/style.scss +0 -74
- package/src/toggle-group/index.js +0 -43
- package/src/toggle-group/style.scss +0 -28
- package/src/wizard-pagination/index.js +0 -59
- package/src/wizard-pagination/style.scss +0 -74
|
@@ -6,114 +6,19 @@
|
|
|
6
6
|
@import '~@wordpress/base-styles/colors';
|
|
7
7
|
|
|
8
8
|
.newspack-form-token-field {
|
|
9
|
-
color: $gray-700;
|
|
10
|
-
font-size: 14px;
|
|
11
|
-
line-height: 24px;
|
|
12
|
-
margin: 32px 0;
|
|
13
9
|
width: 100%;
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
font-weight: bold;
|
|
19
|
-
line-height: inherit;
|
|
20
|
-
margin: 0;
|
|
11
|
+
.components-form-token-field__input-container {
|
|
12
|
+
padding-bottom: 1px;
|
|
13
|
+
padding-top: 1px;
|
|
21
14
|
}
|
|
22
15
|
|
|
23
|
-
|
|
24
|
-
background: white;
|
|
25
|
-
border: 1px solid $gray-300;
|
|
26
|
-
border-radius: 3px;
|
|
27
|
-
box-shadow: none;
|
|
28
|
-
box-sizing: border-box;
|
|
29
|
-
color: inherit;
|
|
30
|
-
font-size: 16px;
|
|
31
|
-
line-height: inherit;
|
|
32
|
-
margin: 0;
|
|
33
|
-
min-height: 48px;
|
|
34
|
-
padding: 9px 8px;
|
|
35
|
-
transition: border-color 125ms ease-in-out, box-shadow 125ms ease-in-out;
|
|
36
|
-
width: 100%;
|
|
16
|
+
// Help
|
|
37
17
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
&.is-active {
|
|
43
|
-
border-color: $primary-500;
|
|
44
|
-
box-shadow: inset 0 0 0 2px $primary-500;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&:disabled,
|
|
48
|
-
&.is-disabled {
|
|
49
|
-
background: $gray-100;
|
|
50
|
-
color: $gray-600;
|
|
51
|
-
cursor: not-allowed;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
input[type='text'] {
|
|
55
|
-
border: 0;
|
|
56
|
-
line-height: inherit;
|
|
57
|
-
margin: 2px 0;
|
|
58
|
-
padding: 0;
|
|
59
|
-
|
|
60
|
-
&:focus {
|
|
61
|
-
box-shadow: none;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.components-form-token-field__token-text {
|
|
66
|
-
font-size: inherit;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.components-form-token-field__remove-token {
|
|
70
|
-
height: 24px;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.components-form-token-field__suggestions-list {
|
|
75
|
-
border-top-color: $gray-300;
|
|
76
|
-
margin: 12px -8px -11px;
|
|
77
|
-
padding: 8px 0 0;
|
|
78
|
-
|
|
79
|
-
.components-form-token-field__suggestion {
|
|
80
|
-
font-size: inherit;
|
|
81
|
-
margin-bottom: 8px;
|
|
82
|
-
|
|
83
|
-
&.is-selected {
|
|
84
|
-
background: $primary-500;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Help Text
|
|
90
|
-
|
|
91
|
-
.components-form-token-field__help {
|
|
92
|
-
margin: 0;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Multiple Form Token Field
|
|
96
|
-
|
|
97
|
-
& + & {
|
|
98
|
-
margin-bottom: 32px;
|
|
99
|
-
margin-top: -16px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Multiple Controls
|
|
103
|
-
|
|
104
|
-
+ .newspack-select-control,
|
|
105
|
-
+ .newspack-textarea-control,
|
|
106
|
-
+ .newspack-text-control {
|
|
107
|
-
margin-bottom: 32px;
|
|
108
|
-
margin-top: -16px;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Reset
|
|
112
|
-
|
|
113
|
-
.components-base-control__field,
|
|
114
|
-
.components-base-control__label {
|
|
115
|
-
display: block;
|
|
116
|
-
margin: 0;
|
|
18
|
+
&__help {
|
|
19
|
+
color: $gray-700;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
margin: 8px 0 0 !important;
|
|
117
22
|
}
|
|
118
23
|
|
|
119
24
|
// Hidden Elements
|
package/dist/cjs/grid/style.scss
CHANGED
|
@@ -118,6 +118,19 @@
|
|
|
118
118
|
margin-top: 0 !important;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
.components-base-control {
|
|
122
|
+
&__field,
|
|
123
|
+
&__help {
|
|
124
|
+
margin-bottom: 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.components-form-token-field {
|
|
129
|
+
&__input-container {
|
|
130
|
+
margin-bottom: 0;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
121
134
|
// Cards
|
|
122
135
|
> .newspack-card {
|
|
123
136
|
> *:first-child {
|
|
@@ -131,7 +144,7 @@
|
|
|
131
144
|
|
|
132
145
|
// Table-like
|
|
133
146
|
&__thead {
|
|
134
|
-
background:
|
|
147
|
+
background: rgba( black, 0.025 );
|
|
135
148
|
border-bottom: 1px solid $gray-300;
|
|
136
149
|
border-top: 1px solid $gray-300;
|
|
137
150
|
color: $gray-900;
|
|
@@ -102,13 +102,13 @@ class Handoff extends _element.Component {
|
|
|
102
102
|
children,
|
|
103
103
|
compact,
|
|
104
104
|
useModal,
|
|
105
|
-
// eslint-disable-next-line no-unused-vars
|
|
105
|
+
// eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
|
|
106
106
|
modalTitle: _modalTitle,
|
|
107
|
-
// eslint-disable-next-line no-unused-vars
|
|
107
|
+
// eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
|
|
108
108
|
modalBody: _modalBody,
|
|
109
|
-
// eslint-disable-next-line no-unused-vars
|
|
109
|
+
// eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
|
|
110
110
|
onReady,
|
|
111
|
-
// eslint-disable-next-line no-unused-vars
|
|
111
|
+
// eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
|
|
112
112
|
editLink,
|
|
113
113
|
...otherProps
|
|
114
114
|
} = this.props;
|
|
@@ -141,7 +141,7 @@ class Handoff extends _element.Component {
|
|
|
141
141
|
children: children ? children : primaryButton
|
|
142
142
|
}), Name && 'active' !== Status && (0, _jsxRuntime.jsx)(_.Button, {
|
|
143
143
|
className: classes,
|
|
144
|
-
|
|
144
|
+
variant: "secondary",
|
|
145
145
|
disabled: true,
|
|
146
146
|
...otherProps,
|
|
147
147
|
children: Name + __(' not installed', 'newspack')
|
|
@@ -166,13 +166,13 @@ class Handoff extends _element.Component {
|
|
|
166
166
|
noBorder: true,
|
|
167
167
|
className: "justify-end",
|
|
168
168
|
children: [(0, _jsxRuntime.jsx)(_.Button, {
|
|
169
|
-
|
|
169
|
+
variant: "secondary",
|
|
170
170
|
onClick: () => this.setState({
|
|
171
171
|
showModal: false
|
|
172
172
|
}),
|
|
173
173
|
children: dismissModalButton
|
|
174
174
|
}), (0, _jsxRuntime.jsx)(_.Button, {
|
|
175
|
-
|
|
175
|
+
variant: "primary",
|
|
176
176
|
onClick: () => this.goToPlugin(Slug),
|
|
177
177
|
children: primaryModalButton
|
|
178
178
|
})]
|
|
@@ -96,7 +96,7 @@ class ImageUpload extends _element.Component {
|
|
|
96
96
|
className: classes,
|
|
97
97
|
style: { ...style
|
|
98
98
|
},
|
|
99
|
-
children: image
|
|
99
|
+
children: image?.url ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
100
100
|
children: [(0, _jsxRuntime.jsx)("img", {
|
|
101
101
|
"data-testid": "image-upload",
|
|
102
102
|
src: image.url,
|
|
@@ -11,18 +11,15 @@
|
|
|
11
11
|
display: flex;
|
|
12
12
|
}
|
|
13
13
|
&__label {
|
|
14
|
-
|
|
15
|
-
font-size: 14px;
|
|
16
|
-
font-weight: bold;
|
|
17
|
-
line-height: 24px;
|
|
14
|
+
margin: 0 0 8px;
|
|
18
15
|
}
|
|
19
16
|
&__image {
|
|
20
17
|
align-items: center;
|
|
21
18
|
background-repeat: no-repeat;
|
|
22
19
|
background-size: contain;
|
|
23
20
|
background-position: center;
|
|
24
|
-
border: 1px dashed $gray-
|
|
25
|
-
border-radius:
|
|
21
|
+
border: 1px dashed $gray-700;
|
|
22
|
+
border-radius: 2px;
|
|
26
23
|
display: flex;
|
|
27
24
|
justify-content: center;
|
|
28
25
|
max-width: 100%;
|
|
@@ -34,7 +31,7 @@
|
|
|
34
31
|
&:not( &--has-image ) {
|
|
35
32
|
.newspack-button {
|
|
36
33
|
background: white !important;
|
|
37
|
-
border-radius:
|
|
34
|
+
border-radius: 2px !important;
|
|
38
35
|
padding: 4px 16px !important;
|
|
39
36
|
|
|
40
37
|
&:active,
|
|
@@ -53,8 +50,8 @@
|
|
|
53
50
|
overflow: hidden;
|
|
54
51
|
&::before,
|
|
55
52
|
&::after {
|
|
56
|
-
border: 1px solid rgba( black, 0.
|
|
57
|
-
border-radius:
|
|
53
|
+
border: 1px solid rgba( black, 0.54 );
|
|
54
|
+
border-radius: 2px;
|
|
58
55
|
bottom: 0;
|
|
59
56
|
content: '';
|
|
60
57
|
left: 0;
|
|
@@ -74,7 +71,7 @@
|
|
|
74
71
|
}
|
|
75
72
|
&::after {
|
|
76
73
|
background: rgba( white, 0.9 );
|
|
77
|
-
border-color: $gray-
|
|
74
|
+
border-color: $gray-700;
|
|
78
75
|
}
|
|
79
76
|
&:focus-within,
|
|
80
77
|
&:hover {
|
|
@@ -97,7 +94,9 @@
|
|
|
97
94
|
}
|
|
98
95
|
}
|
|
99
96
|
&__image + &__help {
|
|
100
|
-
|
|
97
|
+
color: $gray-700;
|
|
98
|
+
font-size: 12px;
|
|
99
|
+
margin: 1em 0 0;
|
|
101
100
|
}
|
|
102
101
|
&__controls {
|
|
103
102
|
align-items: center;
|
package/dist/cjs/index.js
CHANGED
|
@@ -35,12 +35,6 @@ Object.defineProperty(exports, "ButtonCard", {
|
|
|
35
35
|
return _buttonCard.default;
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
Object.defineProperty(exports, "ButtonGroup", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function () {
|
|
41
|
-
return _buttonGroup.default;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
38
|
Object.defineProperty(exports, "Card", {
|
|
45
39
|
enumerable: true,
|
|
46
40
|
get: function () {
|
|
@@ -53,12 +47,6 @@ Object.defineProperty(exports, "CategoryAutocomplete", {
|
|
|
53
47
|
return _categoryAutocomplete.default;
|
|
54
48
|
}
|
|
55
49
|
});
|
|
56
|
-
Object.defineProperty(exports, "CheckboxControl", {
|
|
57
|
-
enumerable: true,
|
|
58
|
-
get: function () {
|
|
59
|
-
return _checkboxControl.default;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
50
|
Object.defineProperty(exports, "ColorPicker", {
|
|
63
51
|
enumerable: true,
|
|
64
52
|
get: function () {
|
|
@@ -173,12 +161,6 @@ Object.defineProperty(exports, "Popover", {
|
|
|
173
161
|
return _popover.default;
|
|
174
162
|
}
|
|
175
163
|
});
|
|
176
|
-
Object.defineProperty(exports, "PreviewBox", {
|
|
177
|
-
enumerable: true,
|
|
178
|
-
get: function () {
|
|
179
|
-
return _previewBox.default;
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
164
|
Object.defineProperty(exports, "ProgressBar", {
|
|
183
165
|
enumerable: true,
|
|
184
166
|
get: function () {
|
|
@@ -233,24 +215,6 @@ Object.defineProperty(exports, "TextControl", {
|
|
|
233
215
|
return _textControl.default;
|
|
234
216
|
}
|
|
235
217
|
});
|
|
236
|
-
Object.defineProperty(exports, "TextareaControl", {
|
|
237
|
-
enumerable: true,
|
|
238
|
-
get: function () {
|
|
239
|
-
return _textareaControl.default;
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
Object.defineProperty(exports, "ToggleControl", {
|
|
243
|
-
enumerable: true,
|
|
244
|
-
get: function () {
|
|
245
|
-
return _toggleControl.default;
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
Object.defineProperty(exports, "ToggleGroup", {
|
|
249
|
-
enumerable: true,
|
|
250
|
-
get: function () {
|
|
251
|
-
return _toggleGroup.default;
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
218
|
Object.defineProperty(exports, "Waiting", {
|
|
255
219
|
enumerable: true,
|
|
256
220
|
get: function () {
|
|
@@ -263,10 +227,10 @@ Object.defineProperty(exports, "WebPreview", {
|
|
|
263
227
|
return _webPreview.default;
|
|
264
228
|
}
|
|
265
229
|
});
|
|
266
|
-
Object.defineProperty(exports, "
|
|
230
|
+
Object.defineProperty(exports, "Wizard", {
|
|
267
231
|
enumerable: true,
|
|
268
232
|
get: function () {
|
|
269
|
-
return
|
|
233
|
+
return _wizard.default;
|
|
270
234
|
}
|
|
271
235
|
});
|
|
272
236
|
Object.defineProperty(exports, "hooks", {
|
|
@@ -304,16 +268,10 @@ var _button = _interopRequireDefault(require("./button"));
|
|
|
304
268
|
|
|
305
269
|
var _buttonCard = _interopRequireDefault(require("./button-card"));
|
|
306
270
|
|
|
307
|
-
var _buttonGroup = _interopRequireDefault(require("./button-group"));
|
|
308
|
-
|
|
309
271
|
var _card = _interopRequireDefault(require("./card"));
|
|
310
272
|
|
|
311
|
-
var _previewBox = _interopRequireDefault(require("./preview-box"));
|
|
312
|
-
|
|
313
273
|
var _categoryAutocomplete = _interopRequireDefault(require("./category-autocomplete"));
|
|
314
274
|
|
|
315
|
-
var _checkboxControl = _interopRequireDefault(require("./checkbox-control"));
|
|
316
|
-
|
|
317
275
|
var _colorPicker = _interopRequireDefault(require("./color-picker"));
|
|
318
276
|
|
|
319
277
|
var _customSelectControl = _interopRequireDefault(require("./custom-select-control"));
|
|
@@ -368,24 +326,20 @@ var _tabbedNavigation = _interopRequireDefault(require("./tabbed-navigation"));
|
|
|
368
326
|
|
|
369
327
|
var _textControl = _interopRequireDefault(require("./text-control"));
|
|
370
328
|
|
|
371
|
-
var _textareaControl = _interopRequireDefault(require("./textarea-control"));
|
|
372
|
-
|
|
373
|
-
var _toggleControl = _interopRequireDefault(require("./toggle-control"));
|
|
374
|
-
|
|
375
|
-
var _toggleGroup = _interopRequireDefault(require("./toggle-group"));
|
|
376
|
-
|
|
377
329
|
var _waiting = _interopRequireDefault(require("./waiting"));
|
|
378
330
|
|
|
379
331
|
var _webPreview = _interopRequireDefault(require("./web-preview"));
|
|
380
332
|
|
|
333
|
+
var _wizard = _interopRequireDefault(require("./wizard"));
|
|
334
|
+
|
|
381
335
|
var _withWizard = _interopRequireDefault(require("./with-wizard"));
|
|
382
336
|
|
|
383
337
|
var _withWizardScreen = _interopRequireDefault(require("./with-wizard-screen"));
|
|
384
338
|
|
|
385
|
-
var _wizardPagination = _interopRequireDefault(require("./wizard-pagination"));
|
|
386
|
-
|
|
387
339
|
var _router = _interopRequireDefault(require("./proxied-imports/router"));
|
|
388
340
|
|
|
389
341
|
var _hooks = _interopRequireDefault(require("./hooks"));
|
|
390
342
|
|
|
391
|
-
var _utils = _interopRequireDefault(require("./utils"));
|
|
343
|
+
var _utils = _interopRequireDefault(require("./utils"));
|
|
344
|
+
|
|
345
|
+
require("./style.scss");
|
package/dist/cjs/modal/index.js
CHANGED
|
@@ -39,16 +39,13 @@ class Modal extends _element.Component {
|
|
|
39
39
|
render() {
|
|
40
40
|
const {
|
|
41
41
|
className,
|
|
42
|
-
overlayClassName,
|
|
43
42
|
isWide,
|
|
44
43
|
isNarrow,
|
|
45
44
|
...otherProps
|
|
46
45
|
} = this.props;
|
|
47
46
|
const classes = (0, _classnames.default)('newspack-modal', isWide && 'newspack-modal--wide', isNarrow && 'newspack-modal--narrow', className);
|
|
48
|
-
const overlayClasses = (0, _classnames.default)('newspack-modal__overlay', overlayClassName);
|
|
49
47
|
return (0, _jsxRuntime.jsx)(_components.Modal, {
|
|
50
48
|
className: classes,
|
|
51
|
-
overlayClassName: overlayClasses,
|
|
52
49
|
...otherProps
|
|
53
50
|
});
|
|
54
51
|
}
|
|
@@ -3,166 +3,54 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
@import '../../../shared/scss/colors';
|
|
6
|
-
@import '~@wordpress/base-styles/colors';
|
|
7
6
|
|
|
8
7
|
.newspack-modal {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
color: $
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
width: 100%;
|
|
17
|
-
|
|
18
|
-
@media screen and ( min-width: 600px ) {
|
|
19
|
-
border-radius: 3px;
|
|
20
|
-
max-width: 80%;
|
|
21
|
-
max-width: calc( 100% - 64px );
|
|
22
|
-
}
|
|
8
|
+
// Color
|
|
9
|
+
--wp-admin-theme-color: #{$primary-500};
|
|
10
|
+
--wp-admin-theme-color--rgb: #{$primary-500--rgb};
|
|
11
|
+
--wp-admin-theme-color-darker-10: #{$primary-600};
|
|
12
|
+
--wp-admin-theme-color-darker-10--rgb: #{$primary-600--rgb};
|
|
13
|
+
--wp-admin-theme-color-darker-20: #{$primary-700};
|
|
14
|
+
--wp-admin-theme-color-darker-20--rgb: #{$primary-700--rgb};
|
|
23
15
|
|
|
24
16
|
@media screen and ( min-width: 744px ) {
|
|
25
17
|
max-width: 680px;
|
|
18
|
+
width: 680px;
|
|
26
19
|
|
|
27
20
|
&--wide {
|
|
28
21
|
max-width: 1168px;
|
|
22
|
+
width: 1168px;
|
|
29
23
|
}
|
|
30
24
|
}
|
|
31
25
|
|
|
32
26
|
&--narrow {
|
|
33
27
|
max-width: 360px;
|
|
28
|
+
width: 360px;
|
|
34
29
|
}
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
.components-modal__header {
|
|
39
|
-
align-items: flex-start;
|
|
40
|
-
background: white;
|
|
41
|
-
border: 0;
|
|
42
|
-
height: auto;
|
|
43
|
-
justify-content: flex-end;
|
|
44
|
-
margin: 0 -32px 0;
|
|
45
|
-
padding: 32px 32px 0;
|
|
46
|
-
position: relative;
|
|
47
|
-
|
|
48
|
-
.components-modal__header-heading-container {
|
|
49
|
-
display: block;
|
|
50
|
-
margin-right: 16px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.components-button.has-icon {
|
|
54
|
-
flex: 0 0 36px;
|
|
55
|
-
left: 0;
|
|
56
|
-
margin: -2px 0;
|
|
57
|
-
|
|
58
|
-
&:hover,
|
|
59
|
-
&[aria-expended='true'] {
|
|
60
|
-
color: $primary-500;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&:focus:not( :disabled ) {
|
|
64
|
-
box-shadow: 0 0 0 2px $primary-500;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
svg {
|
|
68
|
-
width: 24px;
|
|
69
|
-
height: 24px;
|
|
70
|
-
|
|
71
|
-
+ span {
|
|
72
|
-
display: none;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.components-modal__header-heading {
|
|
78
|
-
color: $gray-900;
|
|
79
|
-
font-size: 21px;
|
|
80
|
-
font-weight: bold;
|
|
81
|
-
line-height: 32px;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Content
|
|
86
|
-
|
|
87
|
-
.components-modal__content {
|
|
88
|
-
padding: 0 32px;
|
|
89
|
-
margin: 0;
|
|
90
|
-
|
|
91
|
-
&::before {
|
|
92
|
-
display: none;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Typography
|
|
97
|
-
|
|
98
|
-
h2,
|
|
99
|
-
p {
|
|
100
|
-
line-height: 24px;
|
|
101
|
-
margin: 32px 0;
|
|
102
|
-
padding: 0;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
h2 {
|
|
106
|
-
color: $gray-900;
|
|
107
|
-
font-size: 17px;
|
|
108
|
-
font-weight: bold;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
p {
|
|
112
|
-
font-size: 14px;
|
|
113
|
-
|
|
114
|
-
&.is-dark {
|
|
115
|
-
color: $gray-900;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// Thematic Break
|
|
120
|
-
|
|
121
|
-
hr {
|
|
122
|
-
background: $gray-300;
|
|
123
|
-
border: 0;
|
|
124
|
-
height: 1px;
|
|
125
|
-
margin: 48px -48px;
|
|
126
|
-
|
|
127
|
-
@media screen and ( min-width: 744px ) {
|
|
128
|
-
margin: 64px -64px;
|
|
129
|
-
}
|
|
31
|
+
@media screen and ( min-width: 960px ) {
|
|
32
|
+
max-height: calc( 100% - 128px );
|
|
130
33
|
}
|
|
131
34
|
|
|
132
35
|
// Links
|
|
133
|
-
|
|
134
36
|
a {
|
|
135
|
-
color:
|
|
37
|
+
color: var( --wp-admin-theme-color );
|
|
136
38
|
|
|
137
39
|
&:active,
|
|
138
40
|
&:focus,
|
|
139
41
|
&:hover {
|
|
140
|
-
color:
|
|
141
|
-
text-decoration: none;
|
|
42
|
+
color: var( --wp-admin-theme-color-darker-10 );
|
|
142
43
|
}
|
|
143
44
|
|
|
144
45
|
&:focus {
|
|
145
|
-
box-shadow:
|
|
146
|
-
outline:
|
|
147
|
-
outline-offset: 2px;
|
|
46
|
+
box-shadow: 0 0 0 var( --wp-admin-border-width-focus ) var( --wp-admin-theme-color );
|
|
47
|
+
outline: 3px solid transparent;
|
|
148
48
|
}
|
|
149
49
|
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// Overlay
|
|
153
50
|
|
|
154
|
-
.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
// Small Screens
|
|
159
|
-
|
|
160
|
-
@media ( max-width: 599px ) {
|
|
161
|
-
.newspack-modal {
|
|
162
|
-
top: auto;
|
|
163
|
-
|
|
164
|
-
.components-modal__content {
|
|
165
|
-
height: auto;
|
|
51
|
+
.components-modal__content {
|
|
52
|
+
> *:last-child {
|
|
53
|
+
margin-bottom: 8px;
|
|
166
54
|
}
|
|
167
55
|
}
|
|
168
56
|
}
|
|
@@ -39,9 +39,11 @@ class NewspackIcon extends _element.Component {
|
|
|
39
39
|
render() {
|
|
40
40
|
const {
|
|
41
41
|
className,
|
|
42
|
-
|
|
42
|
+
simple,
|
|
43
|
+
size,
|
|
44
|
+
white
|
|
43
45
|
} = this.props;
|
|
44
|
-
const classes = (0, _classnames.default)('newspack-icon', className);
|
|
46
|
+
const classes = (0, _classnames.default)('newspack-icon', simple && 'newspack-icon--simple', white && 'newspack-icon--white', className);
|
|
45
47
|
return (0, _jsxRuntime.jsx)(_components.SVG, {
|
|
46
48
|
xmlns: "http://www.w3.org/2000/svg",
|
|
47
49
|
height: size,
|
|
@@ -8,4 +8,19 @@
|
|
|
8
8
|
background: $primary-500;
|
|
9
9
|
fill: white;
|
|
10
10
|
padding: 12px;
|
|
11
|
+
|
|
12
|
+
&--white {
|
|
13
|
+
background: white;
|
|
14
|
+
fill: $primary-500;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&--simple {
|
|
18
|
+
background: none;
|
|
19
|
+
fill: $primary-500;
|
|
20
|
+
padding: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&#{&}--simple#{&}--white {
|
|
24
|
+
fill: white;
|
|
25
|
+
}
|
|
11
26
|
}
|
package/dist/cjs/notice/index.js
CHANGED
|
@@ -11,6 +11,8 @@ var _element = require("@wordpress/element");
|
|
|
11
11
|
|
|
12
12
|
var _icons = require("@wordpress/icons");
|
|
13
13
|
|
|
14
|
+
var _i18n = require("@wordpress/i18n");
|
|
15
|
+
|
|
14
16
|
require("./style.scss");
|
|
15
17
|
|
|
16
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -24,14 +26,8 @@ var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
|
24
26
|
/**
|
|
25
27
|
* WordPress dependencies.
|
|
26
28
|
*/
|
|
29
|
+
const __ = _i18n.__;
|
|
27
30
|
|
|
28
|
-
/**
|
|
29
|
-
* Internal dependencies.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* External dependencies.
|
|
34
|
-
*/
|
|
35
31
|
class Notice extends _element.Component {
|
|
36
32
|
/**
|
|
37
33
|
* Render
|
|
@@ -39,6 +35,7 @@ class Notice extends _element.Component {
|
|
|
39
35
|
render() {
|
|
40
36
|
const {
|
|
41
37
|
className,
|
|
38
|
+
debugMode,
|
|
42
39
|
isError,
|
|
43
40
|
isHelp,
|
|
44
41
|
isSuccess,
|
|
@@ -48,13 +45,15 @@ class Notice extends _element.Component {
|
|
|
48
45
|
style = {},
|
|
49
46
|
children = null
|
|
50
47
|
} = this.props;
|
|
51
|
-
const classes = (0, _classnames.default)('newspack-notice', className, isError && 'newspack-notice__is-error', isHelp && 'newspack-notice__is-help', isSuccess && 'newspack-notice__is-success', isWarning && 'newspack-notice__is-warning');
|
|
48
|
+
const classes = (0, _classnames.default)('newspack-notice', className, debugMode && 'newspack-notice__is-debug', isError && 'newspack-notice__is-error', isHelp && 'newspack-notice__is-help', isSuccess && 'newspack-notice__is-success', isWarning && 'newspack-notice__is-warning');
|
|
52
49
|
let noticeIcon;
|
|
53
50
|
|
|
54
51
|
if (isHelp) {
|
|
55
52
|
noticeIcon = _icons.help;
|
|
56
53
|
} else if (isSuccess) {
|
|
57
54
|
noticeIcon = _icons.check;
|
|
55
|
+
} else if (debugMode) {
|
|
56
|
+
noticeIcon = _icons.bug;
|
|
58
57
|
} else {
|
|
59
58
|
noticeIcon = _icons.info;
|
|
60
59
|
}
|
|
@@ -68,7 +67,7 @@ class Notice extends _element.Component {
|
|
|
68
67
|
className: "newspack-notice__content",
|
|
69
68
|
children: [rawHTML ? (0, _jsxRuntime.jsx)(_element.RawHTML, {
|
|
70
69
|
children: noticeText
|
|
71
|
-
}) : noticeText, children || null]
|
|
70
|
+
}) : noticeText, debugMode && __('Debug Mode', 'newspack'), children || null]
|
|
72
71
|
})]
|
|
73
72
|
});
|
|
74
73
|
}
|