@internetarchive/ia-book-actions 0.0.1 → 0.0.2-7.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/README.md +93 -47
- package/assets/ia-book-action-screen.png +0 -0
- package/assets/ia-book-title-screen.png +0 -0
- package/demo/index.html +108 -55
- package/package.json +13 -12
- package/src/assets/data/archive-logo.js +32 -0
- package/src/assets/data/dropdown-arrow.js +1 -1
- package/src/assets/data/lending-get-status-service.js +2 -337
- package/src/assets/data/purchase.js +1 -1
- package/src/assets/styles/collapsible-action-group.js +90 -32
- package/src/assets/styles/ia-button.js +75 -33
- package/src/components/book-title-bar.js +93 -0
- package/src/components/collapsible-action-group.js +81 -51
- package/src/components/info-icon.js +6 -10
- package/src/components/text-group.js +1 -1
- package/src/core/config/analytics-event-and-category.js +4 -2
- package/src/core/config/url-helper.js +2 -1
- package/src/core/services/actions-config.js +27 -14
- package/src/core/services/actions-handler/actions-handler-service.js +48 -36
- package/src/core/services/actions-handler/actions-handler.js +152 -37
- package/src/core/services/doc-cookies.js +83 -0
- package/src/core/services/get-lending-actions.js +70 -55
- package/src/core/services/loan-token-poller.js +100 -0
- package/src/ia-book-actions.js +307 -33
- package/test/components/book-title-bar.test.js +39 -0
- package/test/components/collapsible-action-group.test.js +51 -3
- package/test/core/services/get-lending-actions.test.js +116 -55
- package/test/core/services/loan-token-poller.test.js +46 -0
- package/test/ia-book-actions.test.js +185 -3
- package/web-test-runner.config.mjs +1 -1
|
@@ -34,6 +34,7 @@ export const defaultLendingStatus = {
|
|
|
34
34
|
users_on_waitlist: 0,
|
|
35
35
|
// userid: "",
|
|
36
36
|
bookUrl: '/details/practicalorganic00plim',
|
|
37
|
+
browsingExpired: false,
|
|
37
38
|
daysLeftOnLoan: 0,
|
|
38
39
|
isAdmin: false,
|
|
39
40
|
isArchiveOrgLending: true,
|
|
@@ -47,7 +48,7 @@ export const defaultLendingStatus = {
|
|
|
47
48
|
loanRecord: [],
|
|
48
49
|
loansUrl: '/details/@neeraj-archive?tab=loans#loans-on-loan',
|
|
49
50
|
maxLoans: 10,
|
|
50
|
-
secondsLeftOnLoan:
|
|
51
|
+
secondsLeftOnLoan: 10,
|
|
51
52
|
shouldProtectImages: true,
|
|
52
53
|
totalWaitlistCount: 0,
|
|
53
54
|
userHasBorrowed: false,
|
|
@@ -58,139 +59,6 @@ export const defaultLendingStatus = {
|
|
|
58
59
|
userWaitlistPosition: -1,
|
|
59
60
|
userid: '@neeraj-archive',
|
|
60
61
|
};
|
|
61
|
-
|
|
62
|
-
export const canBrowse = {
|
|
63
|
-
active_borrows: 0,
|
|
64
|
-
active_browses: 0,
|
|
65
|
-
available_borrowable_copies: 0,
|
|
66
|
-
available_browsable_copies: 1,
|
|
67
|
-
available_lendable_copies: 1,
|
|
68
|
-
available_to_borrow: false,
|
|
69
|
-
available_to_browse: true,
|
|
70
|
-
available_to_waitlist: false,
|
|
71
|
-
copies_reserved_for_waitlist: 0,
|
|
72
|
-
is_lendable: true,
|
|
73
|
-
is_login_required: false,
|
|
74
|
-
is_printdisabled: true,
|
|
75
|
-
is_readable: false,
|
|
76
|
-
last_borrow: null,
|
|
77
|
-
last_browse: null,
|
|
78
|
-
last_waitlist: null,
|
|
79
|
-
max_borrowable_copies: 0,
|
|
80
|
-
max_browsable_copies: 1,
|
|
81
|
-
max_lendable_copies: 1,
|
|
82
|
-
next_borrow_expiration: null,
|
|
83
|
-
next_browse_expiration: null,
|
|
84
|
-
orphaned_acs_loans: 0,
|
|
85
|
-
upgradable_browses: 0,
|
|
86
|
-
user_at_max_loans: false,
|
|
87
|
-
user_can_claim_waitlist: false,
|
|
88
|
-
user_has_acs_borrowed: false,
|
|
89
|
-
user_has_borrowed: false,
|
|
90
|
-
user_has_browsed: false,
|
|
91
|
-
user_is_printdisabled: false,
|
|
92
|
-
user_loan_count: 0,
|
|
93
|
-
user_loan_record: [],
|
|
94
|
-
user_on_waitlist: false,
|
|
95
|
-
users_on_waitlist: 0,
|
|
96
|
-
// userid: "",
|
|
97
|
-
bookUrl: '/details/practicalorganic00plim',
|
|
98
|
-
daysLeftOnLoan: 0,
|
|
99
|
-
isAdmin: false,
|
|
100
|
-
isArchiveOrgLending: true,
|
|
101
|
-
isAvailable: false,
|
|
102
|
-
isAvailableForBrowsing: true,
|
|
103
|
-
isBrowserBorrowable: true,
|
|
104
|
-
isLendingRequired: true,
|
|
105
|
-
isOpenLibraryLending: false,
|
|
106
|
-
isPrintDisabledOnly: false,
|
|
107
|
-
loanCount: 0,
|
|
108
|
-
loanRecord: [],
|
|
109
|
-
loansUrl: '/details/@neeraj-archive?tab=loans#loans-on-loan',
|
|
110
|
-
maxLoans: 10,
|
|
111
|
-
secondsLeftOnLoan: 0,
|
|
112
|
-
shouldProtectImages: true,
|
|
113
|
-
totalWaitlistCount: 0,
|
|
114
|
-
userHasBorrowed: false,
|
|
115
|
-
userHasBrowsed: false,
|
|
116
|
-
userHoldIsReady: false,
|
|
117
|
-
userIsPrintDisabled: false,
|
|
118
|
-
userOnWaitingList: false,
|
|
119
|
-
userWaitlistPosition: -1,
|
|
120
|
-
userid: '@neeraj-archive',
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export const browsed = {
|
|
124
|
-
active_borrows: 0,
|
|
125
|
-
active_browses: 1,
|
|
126
|
-
available_borrowable_copies: 0,
|
|
127
|
-
available_browsable_copies: 0,
|
|
128
|
-
available_lendable_copies: 0,
|
|
129
|
-
available_to_borrow: false,
|
|
130
|
-
available_to_browse: false,
|
|
131
|
-
available_to_waitlist: false,
|
|
132
|
-
copies_reserved_for_waitlist: 0,
|
|
133
|
-
is_lendable: true,
|
|
134
|
-
is_login_required: false,
|
|
135
|
-
is_printdisabled: true,
|
|
136
|
-
is_readable: false,
|
|
137
|
-
last_borrow: null,
|
|
138
|
-
last_browse: '2021-07-30 09:57:40',
|
|
139
|
-
last_waitlist: null,
|
|
140
|
-
max_borrowable_copies: 0,
|
|
141
|
-
max_browsable_copies: 1,
|
|
142
|
-
max_lendable_copies: 1,
|
|
143
|
-
next_borrow_expiration: null,
|
|
144
|
-
next_browse_expiration: '2021-07-30 10:57:40',
|
|
145
|
-
orphaned_acs_loans: 0,
|
|
146
|
-
upgradable_browses: 0,
|
|
147
|
-
user_at_max_loans: false,
|
|
148
|
-
user_can_claim_waitlist: false,
|
|
149
|
-
user_has_acs_borrowed: false,
|
|
150
|
-
user_has_borrowed: false,
|
|
151
|
-
user_has_browsed: true,
|
|
152
|
-
user_is_printdisabled: false,
|
|
153
|
-
user_loan_count: 1,
|
|
154
|
-
user_loan_record: {
|
|
155
|
-
userid: '@neeraj-archive',
|
|
156
|
-
listname: 'loan',
|
|
157
|
-
identifier: 'practicalorganic00plim',
|
|
158
|
-
},
|
|
159
|
-
user_on_waitlist: false,
|
|
160
|
-
users_on_waitlist: 0,
|
|
161
|
-
// userid: "",
|
|
162
|
-
bookUrl: '/details/practicalorganic00plim',
|
|
163
|
-
daysLeftOnLoan: 0,
|
|
164
|
-
isAdmin: false,
|
|
165
|
-
isArchiveOrgLending: true,
|
|
166
|
-
isAvailable: false,
|
|
167
|
-
isAvailableForBrowsing: false,
|
|
168
|
-
isBrowserBorrowable: true,
|
|
169
|
-
isLendingRequired: true,
|
|
170
|
-
isOpenLibraryLending: false,
|
|
171
|
-
isPrintDisabledOnly: false,
|
|
172
|
-
loanCount: 1,
|
|
173
|
-
loanId: '1ca15f92d07dfdae3f7b1516084aec5d603800b8',
|
|
174
|
-
loanRecord: {
|
|
175
|
-
userid: '@neeraj-archive',
|
|
176
|
-
listname: 'loan',
|
|
177
|
-
identifier: 'practicalorganic00plim',
|
|
178
|
-
},
|
|
179
|
-
loanStartDate: '2021-07-30 09:57:40',
|
|
180
|
-
loansUrl: '/details/@neeraj-archive?tab=loans#loans-on-loan',
|
|
181
|
-
maxLoans: 10,
|
|
182
|
-
secondsLeftOnLoan: 3591,
|
|
183
|
-
shouldProtectImages: true,
|
|
184
|
-
totalWaitlistCount: 0,
|
|
185
|
-
userHasBorrowed: false,
|
|
186
|
-
userHasBrowsed: true,
|
|
187
|
-
userHoldIsReady: false,
|
|
188
|
-
userIsPrintDisabled: false,
|
|
189
|
-
userOnWaitingList: false,
|
|
190
|
-
userWaitlistPosition: -1,
|
|
191
|
-
userid: '@neeraj-archive',
|
|
192
|
-
};
|
|
193
|
-
|
|
194
62
|
export const canBrowseAndBorrow = {
|
|
195
63
|
active_borrows: 0,
|
|
196
64
|
active_browses: 1,
|
|
@@ -261,206 +129,3 @@ export const canBrowseAndBorrow = {
|
|
|
261
129
|
userWaitlistPosition: -1,
|
|
262
130
|
userid: '@neeraj-archive',
|
|
263
131
|
};
|
|
264
|
-
|
|
265
|
-
export const browsedAndBorrow = {
|
|
266
|
-
active_borrows: 0,
|
|
267
|
-
active_browses: 1,
|
|
268
|
-
available_borrowable_copies: 0,
|
|
269
|
-
available_browsable_copies: 0,
|
|
270
|
-
available_lendable_copies: 0,
|
|
271
|
-
available_to_borrow: true,
|
|
272
|
-
available_to_browse: true,
|
|
273
|
-
available_to_waitlist: false,
|
|
274
|
-
copies_reserved_for_waitlist: 0,
|
|
275
|
-
is_lendable: true,
|
|
276
|
-
is_login_required: false,
|
|
277
|
-
is_printdisabled: true,
|
|
278
|
-
is_readable: false,
|
|
279
|
-
last_borrow: null,
|
|
280
|
-
last_browse: '2021-07-30 09:57:40',
|
|
281
|
-
last_waitlist: null,
|
|
282
|
-
max_borrowable_copies: 0,
|
|
283
|
-
max_browsable_copies: 1,
|
|
284
|
-
max_lendable_copies: 1,
|
|
285
|
-
next_borrow_expiration: null,
|
|
286
|
-
next_browse_expiration: '2021-07-30 10:57:40',
|
|
287
|
-
orphaned_acs_loans: 0,
|
|
288
|
-
upgradable_browses: 0,
|
|
289
|
-
user_at_max_loans: false,
|
|
290
|
-
user_can_claim_waitlist: false,
|
|
291
|
-
user_has_acs_borrowed: false,
|
|
292
|
-
user_has_borrowed: false,
|
|
293
|
-
user_has_browsed: true,
|
|
294
|
-
user_is_printdisabled: false,
|
|
295
|
-
user_loan_count: 1,
|
|
296
|
-
user_loan_record: {
|
|
297
|
-
userid: '@neeraj-archive',
|
|
298
|
-
listname: 'loan',
|
|
299
|
-
identifier: 'practicalorganic00plim',
|
|
300
|
-
},
|
|
301
|
-
user_on_waitlist: false,
|
|
302
|
-
users_on_waitlist: 0,
|
|
303
|
-
// userid: "",
|
|
304
|
-
bookUrl: '/details/practicalorganic00plim',
|
|
305
|
-
daysLeftOnLoan: 0,
|
|
306
|
-
isAdmin: false,
|
|
307
|
-
isArchiveOrgLending: true,
|
|
308
|
-
isAvailable: false,
|
|
309
|
-
isAvailableForBrowsing: false,
|
|
310
|
-
isBrowserBorrowable: true,
|
|
311
|
-
isLendingRequired: true,
|
|
312
|
-
isOpenLibraryLending: false,
|
|
313
|
-
isPrintDisabledOnly: false,
|
|
314
|
-
loanCount: 1,
|
|
315
|
-
loanId: '1ca15f92d07dfdae3f7b1516084aec5d603800b8',
|
|
316
|
-
loanRecord: {
|
|
317
|
-
userid: '@neeraj-archive',
|
|
318
|
-
listname: 'loan',
|
|
319
|
-
identifier: 'practicalorganic00plim',
|
|
320
|
-
},
|
|
321
|
-
loanStartDate: '2021-07-30 09:57:40',
|
|
322
|
-
loansUrl: '/details/@neeraj-archive?tab=loans#loans-on-loan',
|
|
323
|
-
maxLoans: 10,
|
|
324
|
-
secondsLeftOnLoan: 3591,
|
|
325
|
-
shouldProtectImages: true,
|
|
326
|
-
totalWaitlistCount: 0,
|
|
327
|
-
userHasBorrowed: false,
|
|
328
|
-
userHasBrowsed: true,
|
|
329
|
-
userHoldIsReady: false,
|
|
330
|
-
userIsPrintDisabled: false,
|
|
331
|
-
userOnWaitingList: false,
|
|
332
|
-
userWaitlistPosition: -1,
|
|
333
|
-
userid: '@neeraj-archive',
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
export const canBrowseAndBorrowod = {
|
|
337
|
-
active_borrows: 0,
|
|
338
|
-
active_browses: 1,
|
|
339
|
-
available_borrowable_copies: 0,
|
|
340
|
-
available_browsable_copies: 0,
|
|
341
|
-
available_lendable_copies: 0,
|
|
342
|
-
available_to_borrow: true,
|
|
343
|
-
available_to_browse: true,
|
|
344
|
-
available_to_waitlist: false,
|
|
345
|
-
copies_reserved_for_waitlist: 0,
|
|
346
|
-
is_lendable: true,
|
|
347
|
-
is_login_required: false,
|
|
348
|
-
is_printdisabled: true,
|
|
349
|
-
is_readable: false,
|
|
350
|
-
last_borrow: null,
|
|
351
|
-
last_browse: '2021-07-30 09:57:40',
|
|
352
|
-
last_waitlist: null,
|
|
353
|
-
max_borrowable_copies: 0,
|
|
354
|
-
max_browsable_copies: 1,
|
|
355
|
-
max_lendable_copies: 1,
|
|
356
|
-
next_borrow_expiration: null,
|
|
357
|
-
next_browse_expiration: '2021-07-30 10:57:40',
|
|
358
|
-
orphaned_acs_loans: 0,
|
|
359
|
-
upgradable_browses: 0,
|
|
360
|
-
user_at_max_loans: false,
|
|
361
|
-
user_can_claim_waitlist: false,
|
|
362
|
-
user_has_acs_borrowed: false,
|
|
363
|
-
user_has_borrowed: true,
|
|
364
|
-
user_has_browsed: false,
|
|
365
|
-
user_is_printdisabled: false,
|
|
366
|
-
user_loan_count: 1,
|
|
367
|
-
user_loan_record: {
|
|
368
|
-
userid: '@neeraj-archive',
|
|
369
|
-
listname: 'loan',
|
|
370
|
-
identifier: 'practicalorganic00plim',
|
|
371
|
-
},
|
|
372
|
-
user_on_waitlist: false,
|
|
373
|
-
users_on_waitlist: 0,
|
|
374
|
-
// userid: "",
|
|
375
|
-
bookUrl: '/details/practicalorganic00plim',
|
|
376
|
-
daysLeftOnLoan: 0,
|
|
377
|
-
isAdmin: false,
|
|
378
|
-
isArchiveOrgLending: true,
|
|
379
|
-
isAvailable: false,
|
|
380
|
-
isAvailableForBrowsing: false,
|
|
381
|
-
isBrowserBorrowable: true,
|
|
382
|
-
isLendingRequired: true,
|
|
383
|
-
isOpenLibraryLending: false,
|
|
384
|
-
isPrintDisabledOnly: false,
|
|
385
|
-
loanCount: 1,
|
|
386
|
-
loanId: '1ca15f92d07dfdae3f7b1516084aec5d603800b8',
|
|
387
|
-
loanRecord: {
|
|
388
|
-
userid: '@neeraj-archive',
|
|
389
|
-
listname: 'loan',
|
|
390
|
-
identifier: 'practicalorganic00plim',
|
|
391
|
-
},
|
|
392
|
-
loanStartDate: '2021-07-30 09:57:40',
|
|
393
|
-
loansUrl: '/details/@neeraj-archive?tab=loans#loans-on-loan',
|
|
394
|
-
maxLoans: 10,
|
|
395
|
-
secondsLeftOnLoan: 3591,
|
|
396
|
-
shouldProtectImages: true,
|
|
397
|
-
totalWaitlistCount: 0,
|
|
398
|
-
userHasBorrowed: false,
|
|
399
|
-
userHasBrowsed: true,
|
|
400
|
-
userHoldIsReady: false,
|
|
401
|
-
userIsPrintDisabled: false,
|
|
402
|
-
userOnWaitingList: false,
|
|
403
|
-
userWaitlistPosition: -1,
|
|
404
|
-
userid: '@neeraj-archive',
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
export const canBrowseAndJoinWaitlistForBorrow = {
|
|
408
|
-
active_borrows: 1,
|
|
409
|
-
active_browses: 0,
|
|
410
|
-
available_borrowable_copies: 0,
|
|
411
|
-
available_browsable_copies: 1,
|
|
412
|
-
available_lendable_copies: 1,
|
|
413
|
-
available_to_borrow: false,
|
|
414
|
-
available_to_browse: true,
|
|
415
|
-
available_to_waitlist: true,
|
|
416
|
-
copies_reserved_for_waitlist: 0,
|
|
417
|
-
is_lendable: true,
|
|
418
|
-
is_login_required: false,
|
|
419
|
-
is_printdisabled: true,
|
|
420
|
-
is_readable: false,
|
|
421
|
-
last_borrow: '2021-07-24 18:17:46',
|
|
422
|
-
last_browse: null,
|
|
423
|
-
last_waitlist: '2021-07-27 11:03:23',
|
|
424
|
-
max_borrowable_copies: 1,
|
|
425
|
-
max_browsable_copies: 2,
|
|
426
|
-
max_lendable_copies: 2,
|
|
427
|
-
next_borrow_expiration: '2021-08-02 18:29:41',
|
|
428
|
-
next_browse_expiration: null,
|
|
429
|
-
orphaned_acs_loans: 0,
|
|
430
|
-
upgradable_browses: 0,
|
|
431
|
-
user_at_max_loans: false,
|
|
432
|
-
user_can_claim_waitlist: false,
|
|
433
|
-
user_has_acs_borrowed: false,
|
|
434
|
-
user_has_borrowed: false,
|
|
435
|
-
user_has_browsed: false,
|
|
436
|
-
user_is_printdisabled: false,
|
|
437
|
-
user_loan_count: 0,
|
|
438
|
-
user_loan_record: [],
|
|
439
|
-
user_on_waitlist: false,
|
|
440
|
-
users_on_waitlist: 2,
|
|
441
|
-
// userid: "",
|
|
442
|
-
bookUrl: '/details/worldletitutio0000vish',
|
|
443
|
-
daysLeftOnLoan: 0,
|
|
444
|
-
isAdmin: false,
|
|
445
|
-
isArchiveOrgLending: true,
|
|
446
|
-
isAvailable: false,
|
|
447
|
-
isAvailableForBrowsing: true,
|
|
448
|
-
isBrowserBorrowable: true,
|
|
449
|
-
isLendingRequired: true,
|
|
450
|
-
isOpenLibraryLending: false,
|
|
451
|
-
isPrintDisabledOnly: false,
|
|
452
|
-
loanCount: 0,
|
|
453
|
-
loanRecord: [],
|
|
454
|
-
loansUrl: '/details/@neeraj-archive?tab=loans#loans-on-loan',
|
|
455
|
-
maxLoans: 10,
|
|
456
|
-
secondsLeftOnLoan: 0,
|
|
457
|
-
shouldProtectImages: true,
|
|
458
|
-
totalWaitlistCount: 2,
|
|
459
|
-
userHasBorrowed: false,
|
|
460
|
-
userHasBrowsed: false,
|
|
461
|
-
userHoldIsReady: false,
|
|
462
|
-
userIsPrintDisabled: false,
|
|
463
|
-
userOnWaitingList: false,
|
|
464
|
-
userWaitlistPosition: -1,
|
|
465
|
-
userid: '@neeraj-archive',
|
|
466
|
-
};
|
|
@@ -1,73 +1,132 @@
|
|
|
1
|
-
import { css } from 'lit
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
const whiteColor = css`var(--white, #fff)`;
|
|
4
|
+
const blackColor = css`var(--primaryBGColor, #000)`;
|
|
5
|
+
const dropdownBGColor = css`var(--iaBookActionsDropdownBGColor, #2d2d2d)`;
|
|
2
6
|
|
|
3
7
|
export default css`
|
|
8
|
+
:host {
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
height: 3.5rem;
|
|
11
|
+
padding: 1rem 0;
|
|
12
|
+
}
|
|
13
|
+
.actiongroup {
|
|
14
|
+
display: flex;
|
|
15
|
+
}
|
|
4
16
|
.action-buttons {
|
|
5
|
-
display: inline-
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-items: center;
|
|
6
19
|
}
|
|
7
20
|
.action-buttons .ia-button {
|
|
8
|
-
|
|
21
|
+
margin: 0;
|
|
9
22
|
height: 3.5rem;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
}
|
|
24
|
+
.action-buttons .desktop {
|
|
25
|
+
background-color: ${whiteColor};
|
|
26
|
+
border-radius: 10px;
|
|
27
|
+
}
|
|
28
|
+
.action-buttons .desktop.purchase {
|
|
29
|
+
margin-left: 5px;
|
|
30
|
+
}
|
|
31
|
+
.action-buttons .mobile.purchase.dark {
|
|
32
|
+
padding-left: 0;
|
|
33
|
+
}
|
|
34
|
+
.primary {
|
|
35
|
+
background-color: ${whiteColor};
|
|
13
36
|
}
|
|
14
37
|
.primary,
|
|
15
38
|
.secondary {
|
|
16
39
|
position: relative;
|
|
40
|
+
border-radius: 5px;
|
|
41
|
+
margin: 0 3px;
|
|
17
42
|
}
|
|
18
43
|
.primary .initial {
|
|
19
|
-
|
|
20
|
-
|
|
44
|
+
border-radius: 4px 0 0 4px;
|
|
45
|
+
margin-right: 0;
|
|
21
46
|
}
|
|
22
|
-
.
|
|
23
|
-
|
|
47
|
+
.primary svg {
|
|
48
|
+
vertical-align: middle;
|
|
24
49
|
}
|
|
25
|
-
|
|
50
|
+
|
|
51
|
+
.secondary .ia-button.purchase {
|
|
52
|
+
padding: 2px 10px 2px 35px;
|
|
53
|
+
position: relative;
|
|
26
54
|
display: inline-block;
|
|
55
|
+
vertical-align: middle;
|
|
27
56
|
}
|
|
57
|
+
.secondary .ia-button.exit-admin {
|
|
58
|
+
background-color: ${blackColor};
|
|
59
|
+
border: 1px solid ${whiteColor};
|
|
60
|
+
}
|
|
61
|
+
|
|
28
62
|
.dropdown-content {
|
|
29
63
|
position: absolute;
|
|
30
64
|
min-width: 14rem;
|
|
31
65
|
margin: 0;
|
|
32
66
|
padding: 0;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
border-radius: 0.4rem;
|
|
67
|
+
background: ${dropdownBGColor};
|
|
68
|
+
border-radius: 4px;
|
|
36
69
|
border: 1px solid var(--primaryCTABorder);
|
|
37
|
-
top: 3.
|
|
70
|
+
top: 3.4rem;
|
|
71
|
+
left: 50%;
|
|
72
|
+
-webkit-transform: translateX(-50%);
|
|
73
|
+
transform: translateX(-50%);
|
|
38
74
|
}
|
|
39
75
|
.dropdown-content li {
|
|
40
|
-
color:
|
|
76
|
+
color: ${blackColor};
|
|
41
77
|
list-style: none;
|
|
42
78
|
height: 3rem;
|
|
43
79
|
}
|
|
44
80
|
.dropdown-content .ia-button {
|
|
45
81
|
background: none;
|
|
82
|
+
color: ${whiteColor};
|
|
46
83
|
border: none;
|
|
47
84
|
box-sizing: border-box;
|
|
48
|
-
display: block;
|
|
49
85
|
width: 100%;
|
|
50
86
|
text-align: left;
|
|
51
87
|
height: 3rem;
|
|
52
88
|
position: relative;
|
|
53
89
|
padding: 0.6rem 1.2rem;
|
|
90
|
+
margin: 0;
|
|
91
|
+
}
|
|
92
|
+
.dropdown-content .ia-button:is(:focus-visible, :hover) {
|
|
93
|
+
background: unset;
|
|
94
|
+
}
|
|
95
|
+
.dropdown-content li .ia-button {
|
|
96
|
+
border-radius: 0;
|
|
54
97
|
}
|
|
55
98
|
.dropdown-content li .ia-button:hover {
|
|
56
|
-
background:
|
|
99
|
+
background: ${whiteColor};
|
|
57
100
|
color: rgb(45, 45, 45);
|
|
58
101
|
}
|
|
102
|
+
.dropdown-content li:first-child .ia-button {
|
|
103
|
+
border-radius: 0.3rem 0.3rem 0 0;
|
|
104
|
+
}
|
|
105
|
+
.dropdown-content li:last-child .ia-button {
|
|
106
|
+
border-radius: 0;
|
|
107
|
+
border-radius: 0 0 0.3rem 0.3rem;
|
|
108
|
+
}
|
|
59
109
|
.dropdown-content .purchase:hover svg g {
|
|
60
110
|
fill: black;
|
|
61
111
|
}
|
|
62
|
-
.
|
|
112
|
+
.dropdown-content .purchase {
|
|
113
|
+
padding-left: 35px;
|
|
114
|
+
margin: 0;
|
|
115
|
+
}
|
|
116
|
+
.dropdown-content .purchase small {
|
|
117
|
+
display: initial;
|
|
118
|
+
font-size: 1.4rem;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.ia-button.down-arrow {
|
|
63
122
|
border-radius: 0 0.4rem 0.4rem 0;
|
|
64
123
|
padding: 0 0.6rem;
|
|
65
124
|
margin-left: 0;
|
|
66
|
-
vertical-align: bottom;
|
|
67
125
|
}
|
|
68
|
-
.
|
|
126
|
+
.actionloader {
|
|
69
127
|
vertical-align: middle;
|
|
70
128
|
visibility: hidden;
|
|
129
|
+
padding: 0.9rem 0.2rem;
|
|
71
130
|
}
|
|
72
131
|
.close {
|
|
73
132
|
display: none;
|
|
@@ -75,34 +134,33 @@ export default css`
|
|
|
75
134
|
.open {
|
|
76
135
|
display: block;
|
|
77
136
|
z-index: 2;
|
|
78
|
-
border-top: 0;
|
|
79
137
|
}
|
|
80
138
|
.visible {
|
|
81
139
|
display: inline-block;
|
|
82
140
|
}
|
|
83
141
|
.btn:hover,
|
|
84
142
|
.dropdown:hover .btn {
|
|
85
|
-
background-color:
|
|
143
|
+
background-color: ${whiteColor};
|
|
86
144
|
}
|
|
87
|
-
|
|
88
145
|
a {
|
|
89
146
|
text-decoration: none;
|
|
90
147
|
}
|
|
91
|
-
.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
.dropdown-content .purchase,
|
|
95
|
-
.purchase {
|
|
96
|
-
padding-left: 35px;
|
|
97
|
-
position: relative;
|
|
148
|
+
.purchase small {
|
|
149
|
+
display: block;
|
|
150
|
+
font-size: 1rem;
|
|
98
151
|
}
|
|
99
152
|
.purchase svg {
|
|
100
153
|
position: absolute;
|
|
101
|
-
left:
|
|
154
|
+
left: 10px;
|
|
102
155
|
top: 20%;
|
|
103
156
|
}
|
|
104
157
|
.unavailable {
|
|
105
158
|
opacity: 0.7;
|
|
106
159
|
pointer-events: none;
|
|
107
160
|
}
|
|
161
|
+
.disabled {
|
|
162
|
+
opacity: 0.8;
|
|
163
|
+
pointer-events: none;
|
|
164
|
+
visibility: visible;
|
|
165
|
+
}
|
|
108
166
|
`;
|
|
@@ -1,65 +1,107 @@
|
|
|
1
|
-
import { css } from 'lit
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
const whiteColor = css`var(--white, #fff)`;
|
|
4
|
+
const disabledButtonFillColor = css`var(--primaryDisableCTAFill, #767676)`;
|
|
5
|
+
const disabledButtonBorderColor = css`var(--secondaryCTABorder, #999)`;
|
|
6
|
+
|
|
7
|
+
const primaryButtonFillColor = css`var(--primaryCTAFill, #194880)`;
|
|
8
|
+
const primaryButtonFillColorRGB = css`var(--primaryCTAFillRGB, 25, 72, 128)`; // RBG format of --primaryCTAFill
|
|
9
|
+
const primaryButtonBorderColor = css`var(--primaryCTABorder, #c5d1df)`;
|
|
10
|
+
|
|
11
|
+
const dangerButtonFillColor = css`var(--primaryErrorCTAFill, #d9534f)`;
|
|
12
|
+
const dangerButtonFillColorRGB = css`var(--primaryErrorCTAFillRGB, 229, 28, 38)`; // RBG format of --primaryErrorCTAFill
|
|
13
|
+
const dangerButtonBorderColor = css`var(--primaryErrorCTABorder, #d43f3a)`;
|
|
14
|
+
|
|
15
|
+
const darkButtonFillColor = css`var(--secondaryCTAFill, #333)`;
|
|
16
|
+
const darkButtonFillColorRGB = css`var(--secondaryCTAFillRGB, 51, 51, 51)`; // RBG format of --secondaryCTAFill
|
|
17
|
+
const darkButtonBorderColor = css`var(--primaryCTABorder, #979797)`;
|
|
18
|
+
|
|
19
|
+
const warningButtonBGColor = css`#ee8950`;
|
|
20
|
+
const warningButtonBorderColor = css`#ec7939`;
|
|
2
21
|
|
|
3
22
|
export default css`
|
|
4
23
|
.ia-button {
|
|
5
24
|
min-height: 3rem;
|
|
6
|
-
border: none;
|
|
7
|
-
outline: none;
|
|
8
25
|
cursor: pointer;
|
|
9
|
-
color:
|
|
26
|
+
color: ${whiteColor};
|
|
10
27
|
line-height: normal;
|
|
11
28
|
border-radius: 0.4rem;
|
|
12
|
-
text-align: center;
|
|
13
|
-
vertical-align: middle;
|
|
14
29
|
font-size: 1.4rem;
|
|
15
30
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
16
|
-
display: inline-block;
|
|
17
|
-
padding: 0.85rem 1.2rem;
|
|
18
31
|
border: 1px solid transparent;
|
|
19
32
|
white-space: nowrap;
|
|
20
33
|
appearance: auto;
|
|
21
34
|
box-sizing: border-box;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
transition: all 0.1s ease 0s;
|
|
38
|
+
vertical-align: middle;
|
|
39
|
+
padding: 0 1rem;
|
|
40
|
+
outline-color: ${whiteColor};
|
|
41
|
+
outline-offset: -4px;
|
|
42
|
+
user-select: none;
|
|
43
|
+
text-decoration: none;
|
|
44
|
+
width: fit-content;
|
|
22
45
|
-webkit-user-select: none;
|
|
23
46
|
-moz-user-select: none;
|
|
24
47
|
-ms-user-select: none;
|
|
25
48
|
-o-user-select: none;
|
|
26
|
-
user-select: none;
|
|
27
49
|
}
|
|
28
|
-
.ia-button:
|
|
29
|
-
|
|
50
|
+
.ia-button:focus-visible {
|
|
51
|
+
outline-style: double;
|
|
52
|
+
}
|
|
53
|
+
.ia-button:disabled {
|
|
30
54
|
cursor: not-allowed;
|
|
31
|
-
background-color:
|
|
32
|
-
border: 1px solid
|
|
33
|
-
color: var(--primaryTextColor, #fff);
|
|
55
|
+
background-color: ${disabledButtonFillColor};
|
|
56
|
+
border: 1px solid ${disabledButtonBorderColor};
|
|
34
57
|
}
|
|
35
58
|
.ia-button.transparent {
|
|
36
59
|
background-color: transparent;
|
|
37
60
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
61
|
+
.ia-button.warning {
|
|
62
|
+
background-color: ${warningButtonBGColor}
|
|
63
|
+
border-color: ${warningButtonBorderColor};
|
|
41
64
|
}
|
|
65
|
+
|
|
42
66
|
.ia-button.primary {
|
|
43
|
-
background-color:
|
|
44
|
-
border-color:
|
|
67
|
+
background-color: ${primaryButtonFillColor};
|
|
68
|
+
border-color: ${primaryButtonBorderColor};
|
|
45
69
|
}
|
|
46
|
-
.ia-button.
|
|
47
|
-
color:
|
|
48
|
-
|
|
49
|
-
|
|
70
|
+
.ia-button.primary:hover {
|
|
71
|
+
background-color: rgba(${primaryButtonFillColorRGB}, 0.9);
|
|
72
|
+
}
|
|
73
|
+
.ia-button.primary:focus-visible {
|
|
74
|
+
background-color: rgba(${primaryButtonFillColorRGB}, 0.8);
|
|
75
|
+
}
|
|
76
|
+
.ia-button.primary:active {
|
|
77
|
+
background-color: rgba(${primaryButtonFillColorRGB}, 0.7);
|
|
50
78
|
}
|
|
79
|
+
|
|
51
80
|
.ia-button.danger {
|
|
52
|
-
color:
|
|
53
|
-
|
|
54
|
-
border-color: #d43f3a;
|
|
81
|
+
background-color: ${dangerButtonFillColor};
|
|
82
|
+
border-color: ${dangerButtonBorderColor};
|
|
55
83
|
}
|
|
56
|
-
.ia-button.
|
|
57
|
-
color:
|
|
58
|
-
|
|
59
|
-
|
|
84
|
+
.ia-button.danger:hover {
|
|
85
|
+
background-color: rgba(${dangerButtonFillColorRGB}, 0.9);
|
|
86
|
+
}
|
|
87
|
+
.ia-button.danger:focus-visible {
|
|
88
|
+
background-color: rgba(${dangerButtonFillColorRGB}, 0.8);
|
|
89
|
+
}
|
|
90
|
+
.ia-button.danger:active {
|
|
91
|
+
background-color: rgba(${dangerButtonFillColorRGB}, 0.7);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.ia-button.dark {
|
|
95
|
+
background-color: ${darkButtonFillColor};
|
|
96
|
+
border-color: ${darkButtonBorderColor};
|
|
97
|
+
}
|
|
98
|
+
.ia-button.dark:hover {
|
|
99
|
+
background-color: rgba(${darkButtonFillColorRGB}, 0.9);
|
|
100
|
+
}
|
|
101
|
+
.ia-button.dark:focus-visible {
|
|
102
|
+
background-color: rgba(${darkButtonFillColorRGB}, 0.8);
|
|
60
103
|
}
|
|
61
|
-
.ia-button.
|
|
62
|
-
background-color:
|
|
63
|
-
border-color: #f8c6c8;
|
|
104
|
+
.ia-button.dark:active {
|
|
105
|
+
background-color: rgba(${darkButtonFillColorRGB}, 0.7);
|
|
64
106
|
}
|
|
65
107
|
`;
|