@apolitical/component-library 1.12.0 → 1.12.1
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/form/types/index.d.ts +0 -1
- package/index.js +35 -35
- package/index.mjs +5775 -6117
- package/modals/index.d.ts +0 -1
- package/modals/overlay/overlay.d.ts +1 -5
- package/package.json +1 -2
- package/style.css +1 -1
- package/styles/variables/colors/_theme.scss +57 -19
- package/form/types/invite-form/index.d.ts +0 -1
- package/form/types/invite-form/invite-form.d.ts +0 -30
- package/modals/invite-modal/index.d.ts +0 -1
- package/modals/invite-modal/invite-modal.d.ts +0 -31
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@import 'colors';
|
|
3
3
|
|
|
4
|
+
|
|
4
5
|
$c: $default-colors;
|
|
5
6
|
$theme: (
|
|
6
7
|
// Base styles
|
|
7
8
|
default_focus: map.get($c, 'b100'),
|
|
9
|
+
|
|
8
10
|
background: map.get($c, 'white'),
|
|
11
|
+
|
|
9
12
|
title: map.get($c, 'n900'),
|
|
10
13
|
subtitle: map.get($c, 'n800'),
|
|
11
14
|
text: map.get($c, 'n900'),
|
|
12
15
|
text_error: map.get($c, 'error600'),
|
|
13
16
|
text_line: map.get($c, 'g50'),
|
|
14
17
|
text_line_dark: map.get($c, 'b700'),
|
|
18
|
+
|
|
15
19
|
link: map.get($c, 'b700'),
|
|
16
20
|
link_hover: map.get($c, 'b800'),
|
|
21
|
+
|
|
17
22
|
button_primary: map.get($c, 'white'),
|
|
18
23
|
button_primary_bg: map.get($c, 'b700'),
|
|
19
24
|
button_primary_bg_hover: map.get($c, 'b500'),
|
|
@@ -24,6 +29,7 @@ $theme: (
|
|
|
24
29
|
button_primary_destructive_bg: map.get($c, 'error600'),
|
|
25
30
|
button_primary_destructive_bg_hover: map.get($c, 'error700'),
|
|
26
31
|
button_primary_destructive_box-shadow: map.get($c, 'error50'),
|
|
32
|
+
|
|
27
33
|
button_secondary: map.get($c, 'b700'),
|
|
28
34
|
button_secondary_focus: map.get($c, 'white'),
|
|
29
35
|
button_secondary_muted: map.get($c, 'n600'),
|
|
@@ -44,6 +50,7 @@ $theme: (
|
|
|
44
50
|
button_secondary_border_muted_hover: map.get($c, 'n500'),
|
|
45
51
|
button_secondary_border_disabled: map.get($c, 'b700'),
|
|
46
52
|
button_secondary_border_destructive: map.get($c, 'error600'),
|
|
53
|
+
|
|
47
54
|
button_tertiary: map.get($c, 'b700'),
|
|
48
55
|
button_tertiary_hover: map.get($c, 'b500'),
|
|
49
56
|
button_tertiary_active: map.get($c, 'b800'),
|
|
@@ -57,7 +64,9 @@ $theme: (
|
|
|
57
64
|
|
|
58
65
|
blockquote: map.get($c, 'n900'),
|
|
59
66
|
'blockquote_border': map.get($c, 'g300'),
|
|
67
|
+
|
|
60
68
|
divider: map.get($c, 'n100'),
|
|
69
|
+
|
|
61
70
|
form_input: map.get($c, 'n900'),
|
|
62
71
|
form_input_placeholder: map.get($c, 'n600'),
|
|
63
72
|
form_input_bg: map.get($c, 'white'),
|
|
@@ -66,10 +75,13 @@ $theme: (
|
|
|
66
75
|
form_input_error_border: map.get($c, 'error600'),
|
|
67
76
|
form_input_focus_box-shadow: map.get($c, 'b100'),
|
|
68
77
|
form_search-button_bg: map.get($c, 'n900'),
|
|
78
|
+
|
|
69
79
|
table_border: map.get($c, 'n200'),
|
|
70
80
|
table_th: map.get($c, 'white'),
|
|
71
81
|
table_th_bg: map.get($c, 'n600'),
|
|
82
|
+
|
|
72
83
|
overlay: rgb(21 25 33 / 25%),
|
|
84
|
+
|
|
73
85
|
// Banners
|
|
74
86
|
banner-section: map.get($c, 'white'),
|
|
75
87
|
banner-section_light: map.get($c, 'n700'),
|
|
@@ -79,69 +91,78 @@ $theme: (
|
|
|
79
91
|
banner-section_eyebrow: map.get($c, 'y300'),
|
|
80
92
|
banner-section_light_eyebrow: map.get($c, 'b700'),
|
|
81
93
|
banner-section_light_title: map.get($c, 'n900'),
|
|
94
|
+
|
|
82
95
|
marketing-block_title: map.get($c, 'n900'),
|
|
83
96
|
marketing-block_tertiary_title: map.get($c, 'white'),
|
|
84
97
|
marketing-block_text: map.get($c, 'n700'),
|
|
85
98
|
marketing-block_tertiary_text: map.get($c, 'b100'),
|
|
86
99
|
marketing-block_circle: map.get($c, 'b700'),
|
|
87
100
|
marketing-block_tertiary_circle: map.get($c, 'g300'),
|
|
101
|
+
|
|
88
102
|
marketing-block_primary_bg_1: map.get($c, 'g100'),
|
|
89
103
|
marketing-block_secondary_bg_1: map.get($c, 'p100'),
|
|
90
104
|
marketing-block_tertiary_bg_1: map.get($c, 'b700'),
|
|
105
|
+
|
|
91
106
|
marketing-block_primary_bg_2: map.get($c, 'y300'),
|
|
92
107
|
marketing-block_secondary_bg_2: map.get($c, 'g100'),
|
|
93
108
|
marketing-block_tertiary_bg_2: map.get($c, 'p600'),
|
|
109
|
+
|
|
94
110
|
// Communities
|
|
95
111
|
community-details_link_hover: map.get($c, 'b500'),
|
|
112
|
+
|
|
96
113
|
// Discussion
|
|
97
114
|
discussion-actions: map.get($c, 'n600'),
|
|
98
115
|
discussion-actions_hover_bg: map.get($c, 'b100'),
|
|
99
116
|
discussion-actions_likes_liked: map.get($c, 'p500'),
|
|
100
117
|
discussion-actions_likes_liked_bg: map.get($c, 'p500'),
|
|
118
|
+
|
|
101
119
|
discussion-form_bg: map.get($c, 'b50'),
|
|
102
120
|
discussion-form_placeholder: map.get($c, 'n500'),
|
|
103
121
|
discussion-form_small: map.get($c, 'n700'),
|
|
122
|
+
|
|
104
123
|
discussion-question_bg: map.get($c, 'sand'),
|
|
124
|
+
|
|
105
125
|
discussion-responses-heading_p: map.get($c, 'n600'),
|
|
106
126
|
discussion-responses-heading_icon: map.get($c, 'n700'),
|
|
127
|
+
|
|
107
128
|
discussion-thread_border: map.get($c, 'n200'),
|
|
129
|
+
|
|
108
130
|
// Form
|
|
109
131
|
password-rules: map.get($c, 'error600'),
|
|
110
132
|
password-rules_matches: map.get($c, 'success500'),
|
|
111
133
|
password-rules_small: map.get($c, 'n600'),
|
|
134
|
+
|
|
112
135
|
rating: map.get($c, 'n600'),
|
|
113
136
|
rating_hover_button: map.get($c, 'n500'),
|
|
114
137
|
rating_selected_button: map.get($c, 'b700'),
|
|
115
138
|
rating_shadow: map.get($c, 'b500'),
|
|
139
|
+
|
|
116
140
|
search_button_hover_bg: map.get($c, 'b700'),
|
|
117
141
|
search_clear-button_bg: map.get($c, 'n500'),
|
|
118
142
|
search_search-button_bg: map.get($c, 'n600'),
|
|
119
143
|
search_search-button_active_bg: map.get($c, 'white'),
|
|
120
|
-
|
|
121
|
-
invite_form_border_focus: map.get($c, 'b500'),
|
|
122
|
-
invite_form_shadow: map.get($c, 'b100'),
|
|
123
|
-
invite_form_remove_email_button: map.get($c, 'n700'),
|
|
124
|
-
invite_form_email_bg: map.get($c, 'n50'),
|
|
125
|
-
invite_form_email_color: map.get($c, 'n700'),
|
|
126
|
-
invite_form_email_input_border: map.get($c, 'n200'),
|
|
144
|
+
|
|
127
145
|
// General
|
|
128
146
|
tooltip: map.get($c, 'white'),
|
|
129
147
|
tooltip_bg: rgb(21 25 33 / 90%),
|
|
148
|
+
|
|
130
149
|
// Layout
|
|
131
150
|
cookie-banner_bg: map.get($c, 'n50'),
|
|
132
151
|
cookie-banner_shadow: rgb(107 91 82 / 40%),
|
|
133
152
|
cookie-banner_title_border: map.get($c, 'n100'),
|
|
153
|
+
|
|
134
154
|
download-section_bg: map.get($c, 'g300'),
|
|
155
|
+
|
|
135
156
|
footer: map.get($c, 'g300'),
|
|
136
157
|
footer_bg: map.get($c, 'b800'),
|
|
137
|
-
footer_before_bg:
|
|
138
|
-
linear-gradient(90deg, map.get($c, 'b700') 0%, map.get($c, 'g300') 100%),
|
|
158
|
+
footer_before_bg: linear-gradient(90deg, map.get($c, 'b700') 0%, map.get($c, 'g300') 100%),
|
|
139
159
|
footer_title: map.get($c, 'y300'),
|
|
140
160
|
footer_link: map.get($c, 'g300'),
|
|
141
161
|
footer_dt: map.get($c, 'white'),
|
|
142
162
|
footer_dd: map.get($c, 'g300'),
|
|
143
163
|
footer_hr: map.get($c, 'y300'),
|
|
144
164
|
footer_small: map.get($c, 'b200'),
|
|
165
|
+
|
|
145
166
|
header: map.get($c, 'n900'),
|
|
146
167
|
header_bg: map.get($c, 'white'),
|
|
147
168
|
header_link: map.get($c, 'n900'),
|
|
@@ -151,19 +172,25 @@ $theme: (
|
|
|
151
172
|
header_account-button_bg: map.get($c, 'n700'),
|
|
152
173
|
header_account-button_border: map.get($c, 'n700'),
|
|
153
174
|
header_menu-button_bg: map.get($c, 'n900'),
|
|
175
|
+
|
|
154
176
|
header_parent_hover: map.get($c, 'b700'),
|
|
155
177
|
header_child: map.get($c, 'n700'),
|
|
156
178
|
header_child_divider: map.get($c, 'n100'),
|
|
157
179
|
header_border: map.get($c, 'n100'),
|
|
180
|
+
|
|
181
|
+
|
|
158
182
|
logos_title: map.get($c, 'n700'),
|
|
159
183
|
logos_small: map.get($c, 'n600'),
|
|
184
|
+
|
|
160
185
|
page-layout_gradient_bg_1: map.get($c, 'n50'),
|
|
161
186
|
page-layout_gradient_bg_2: rgb(240 245 255 / 0%),
|
|
187
|
+
|
|
162
188
|
// Loaders
|
|
163
189
|
loading-block_icon_bg: map.get($c, 'n600'),
|
|
190
|
+
|
|
164
191
|
loading-placeholder_bg: map.get($c, 'n10'),
|
|
165
|
-
loading-placeholder_after_bg:
|
|
166
|
-
|
|
192
|
+
loading-placeholder_after_bg: linear-gradient(90deg, transparent, rgba(255 255 255 / 20%), transparent),
|
|
193
|
+
|
|
167
194
|
progress-bar_bg: map.get($c, 'n50'),
|
|
168
195
|
progress-bar_before_bg: map.get($c, 'n200'),
|
|
169
196
|
progress-bar_25_bg_1: map.get($c, 'p100'),
|
|
@@ -174,18 +201,17 @@ $theme: (
|
|
|
174
201
|
progress-bar_75_bg_2: map.get($c, 'b200'),
|
|
175
202
|
progress-bar_100_bg_1: map.get($c, 'b200'),
|
|
176
203
|
progress-bar_100_bg_2: map.get($c, 'g100'),
|
|
204
|
+
|
|
177
205
|
// Modals
|
|
178
206
|
modal_bg: map.get($c, 'white'),
|
|
179
207
|
modal_shadow: rgba(42 49 65 / 30%),
|
|
180
208
|
modal_close: map.get($c, 'n700'),
|
|
181
209
|
modal_close_hover_bg: map.get($c, 'b100'),
|
|
182
|
-
|
|
183
|
-
modal_success_title_background: map.get($c, 'g100'),
|
|
184
|
-
modal_success_icon_background: map.get($c, 'success600'),
|
|
185
|
-
// Invite Modal
|
|
210
|
+
|
|
186
211
|
// Navigation
|
|
187
212
|
breadcrumbs: map.get($c, 'n600'),
|
|
188
213
|
breadcrumbs_hover: map.get($c, 'b500'),
|
|
214
|
+
|
|
189
215
|
filters: map.get($c, 'n700'),
|
|
190
216
|
filters_selected: map.get($c, 'g700'),
|
|
191
217
|
filters_active: map.get($c, 'n700'),
|
|
@@ -195,48 +221,58 @@ $theme: (
|
|
|
195
221
|
filters_active_bg: map.get($c, 'g300'),
|
|
196
222
|
filters_outline: map.get($c, 'n200'),
|
|
197
223
|
filters_selected_outline: map.get($c, 'g200'),
|
|
224
|
+
|
|
198
225
|
language-switcher_bg: map.get($c, 'n50'),
|
|
199
226
|
language-switcher_a: map.get($c, 'n900'),
|
|
200
227
|
language-switcher_a_selected: map.get($c, 'b700'),
|
|
201
228
|
language-switcher_a_hover: map.get($c, 'b800'),
|
|
229
|
+
|
|
202
230
|
more-menu: map.get($c, 'n700'),
|
|
203
231
|
more-menu_hover_button_bg: map.get($c, 'b100'),
|
|
204
232
|
more-menu_menu_bg: map.get($c, 'white'),
|
|
205
233
|
more-menu_menu_shadow: rgba(0 0 0 / 10%),
|
|
234
|
+
|
|
206
235
|
tags: map.get($c, 'b700'),
|
|
207
236
|
tags_light: map.get($c, 'p500'),
|
|
237
|
+
|
|
238
|
+
|
|
208
239
|
// Text
|
|
209
240
|
collapsible-section_bg: map.get($c, 'white'),
|
|
210
241
|
collapsible-section_border: map.get($c, 'n500'),
|
|
211
242
|
collapsible-section_icon: map.get($c, 'n900'),
|
|
212
243
|
collapsible-section_icon_hover: map.get($c, 'b100'),
|
|
213
244
|
collapsible-section_discrete-links_link_hover: map.get($c, 'b700'),
|
|
245
|
+
|
|
214
246
|
empty-state-box: map.get($c, 'n700'),
|
|
215
247
|
empty-state-box_error_border: map.get($c, 'error600'),
|
|
248
|
+
|
|
216
249
|
helper-text-box: map.get($c, 'n700'),
|
|
217
250
|
helper-text-box_bg: map.get($c, 'info50'),
|
|
218
251
|
helper-text-box_warning_bg: map.get($c, 'warning50'),
|
|
219
252
|
helper-text-box_error_bg: map.get($c, 'error50'),
|
|
220
253
|
helper-text-box_success_bg: map.get($c, 'success50'),
|
|
254
|
+
|
|
221
255
|
highlighted-text-box_bg: map.get($c, 'n50'),
|
|
222
256
|
highlighted-text-box_secondary_bg: map.get($c, 'y50'),
|
|
223
257
|
highlighted-text-box_tertiary_bg: map.get($c, 'error50'),
|
|
224
258
|
highlighted-text-box_subtle_bg: map.get($c, 'white'),
|
|
225
|
-
highlighted-text-box_bold_bg:
|
|
226
|
-
|
|
227
|
-
highlighted-text-box_subtle_gradient:
|
|
228
|
-
linear-gradient(rgba(255 255 255 / 0%), rgba(255 255 255 / 100%)),
|
|
259
|
+
highlighted-text-box_bold_bg: linear-gradient(135deg, map.get($c, 'b100'), map.get($c, 'g50')),
|
|
260
|
+
highlighted-text-box_subtle_gradient: linear-gradient(rgba(255 255 255 / 0%), rgba(255 255 255 / 100%)),
|
|
229
261
|
highlighted-text-box_bold_icon: map.get($c, 'b500'),
|
|
262
|
+
|
|
230
263
|
highlighted-text-box_subtle_border: map.get($c, 'n100'),
|
|
264
|
+
|
|
231
265
|
pill: map.get($c, 'n900'),
|
|
232
266
|
pill_highlighted: map.get($c, 'n700'),
|
|
233
267
|
pill_bg: map.get($c, 'n200'),
|
|
234
268
|
pill_highlighted_bg: map.get($c, 'y300'),
|
|
269
|
+
|
|
235
270
|
status-banner_bg: map.get($c, 'y50'),
|
|
236
271
|
status-banner_success_bg: map.get($c, 'success50'),
|
|
237
272
|
status-banner_success_icon: map.get($c, 'success600'),
|
|
238
273
|
status-banner_error_bg: map.get($c, 'error50'),
|
|
239
274
|
status-banner_error_icon: map.get($c, 'error600'),
|
|
275
|
+
|
|
240
276
|
// User
|
|
241
277
|
contributor: map.get($c, 'n700'),
|
|
242
278
|
contributor_bg: map.get($c, 'white'),
|
|
@@ -244,7 +280,9 @@ $theme: (
|
|
|
244
280
|
contributor_border: map.get($c, 'white'),
|
|
245
281
|
contributor_inner-border: map.get($c, 'n200'),
|
|
246
282
|
contributor_label: map.get($c, 'n600'),
|
|
283
|
+
|
|
247
284
|
member_highlighted_name: map.get($c, 'p500'),
|
|
248
285
|
member_additional-content: map.get($c, 'n700'),
|
|
249
286
|
member_small: map.get($c, 'n700')
|
|
250
287
|
);
|
|
288
|
+
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as InviteForm } from './invite-form';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare enum FormStatus {
|
|
2
|
-
NOT_SUBMITTED = "NOT_SUBMITTED",
|
|
3
|
-
SUCCESS = "SUCCESS",
|
|
4
|
-
CLOSED = "CLOSED",
|
|
5
|
-
ERROR = "ERROR"
|
|
6
|
-
}
|
|
7
|
-
interface IProps {
|
|
8
|
-
/** Title displayed on the form */
|
|
9
|
-
title: string;
|
|
10
|
-
/** Form input label*/
|
|
11
|
-
label: string;
|
|
12
|
-
/** CTA button text displayed */
|
|
13
|
-
ctaMessage: string;
|
|
14
|
-
/** Colour of the title */
|
|
15
|
-
titleColor?: string;
|
|
16
|
-
/** Colour of the label */
|
|
17
|
-
labelColor?: string;
|
|
18
|
-
/** Background colour of the form */
|
|
19
|
-
backgroundColor?: string;
|
|
20
|
-
/** Function to run before form gets closed */
|
|
21
|
-
onClose(): void;
|
|
22
|
-
/** Function to report errors */
|
|
23
|
-
reportError(error: unknown): void;
|
|
24
|
-
/** Function to send the invites */
|
|
25
|
-
sendInvites(emails: string[]): void;
|
|
26
|
-
/** Initial form status */
|
|
27
|
-
initialFormStatus?: FormStatus;
|
|
28
|
-
}
|
|
29
|
-
declare const InviteForm: ({ title, label, ctaMessage, titleColor, labelColor, backgroundColor, onClose, reportError, sendInvites, initialFormStatus, }: IProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
30
|
-
export default InviteForm;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as InviteModal } from './invite-modal';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface IProps {
|
|
3
|
-
/** The ID of the element */
|
|
4
|
-
id?: string;
|
|
5
|
-
/** Additional classes */
|
|
6
|
-
className?: string;
|
|
7
|
-
/** Optional styling */
|
|
8
|
-
style?: React.CSSProperties;
|
|
9
|
-
/** Whether the modal is open on page load */
|
|
10
|
-
showModal?: boolean;
|
|
11
|
-
/** Function to close the modal */
|
|
12
|
-
onClose(): void;
|
|
13
|
-
/** Function to report errors */
|
|
14
|
-
reportError?(error: unknown): void;
|
|
15
|
-
/** Title displayed on the modal */
|
|
16
|
-
title?: string;
|
|
17
|
-
/** Title on the form */
|
|
18
|
-
formTitle?: string;
|
|
19
|
-
/** Form input label */
|
|
20
|
-
formLabel?: string;
|
|
21
|
-
/** CTA button text displayed on the form */
|
|
22
|
-
ctaMessage: string;
|
|
23
|
-
/** Function to send the invites */
|
|
24
|
-
sendInvites(emails: string[]): void;
|
|
25
|
-
/** Whether to show the check icon */
|
|
26
|
-
showIcon?: boolean;
|
|
27
|
-
/** Whether to show the modal header */
|
|
28
|
-
showHeader?: boolean;
|
|
29
|
-
}
|
|
30
|
-
declare const InviteModal: ({ className, showModal, title, formTitle, formLabel, ctaMessage, showIcon, onClose, reportError, sendInvites, }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
export default InviteModal;
|