ErrorBoundary
1 year ago
Icons
1 year ago
Notifications
1 year ago
Tabs
1 year ago
store
1 year ago
AdminDetailsPage.module.scss
1 year ago
AdminSection.tsx
1 year ago
ConfirmationDialog.tsx
1 year ago
DefaultPrimaryActionButton.tsx
1 year ago
index.tsx
1 year ago
types.ts
1 year ago
utils.ts
1 year ago
AdminDetailsPage.module.scss
594 lines
| 1 | .container { |
| 2 | margin-top: 3rem; |
| 3 | padding: 3rem; |
| 4 | } |
| 5 | |
| 6 | :global { |
| 7 | :root { |
| 8 | --give-primary-color: #69b868; |
| 9 | } |
| 10 | |
| 11 | .post-type-give_forms #wpbody { |
| 12 | -webkit-font-smoothing: antialiased; |
| 13 | box-sizing: border-box; |
| 14 | background-color: #f9fafb; |
| 15 | min-height: calc(100vh - 32px); |
| 16 | |
| 17 | & > a { |
| 18 | text-decoration: underline; |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | .post-type-give_forms #wpbody-content { |
| 23 | box-sizing: border-box; |
| 24 | } |
| 25 | |
| 26 | .post-type-give_forms #wpbody::after { |
| 27 | all: revert; |
| 28 | } |
| 29 | |
| 30 | .give-visually-hidden { |
| 31 | position: absolute; |
| 32 | width: 1px; |
| 33 | height: 1px; |
| 34 | padding: 0; |
| 35 | margin: -1px; |
| 36 | overflow: hidden; |
| 37 | clip: rect(0, 0, 0, 0); |
| 38 | white-space: nowrap; |
| 39 | border-width: 0; |
| 40 | } |
| 41 | |
| 42 | #wpcontent { |
| 43 | padding: 0; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | .page { |
| 48 | box-sizing: border-box; |
| 49 | color: #333; |
| 50 | font-family: Inter, system-ui, sans-serif; |
| 51 | font-size: 1rem; |
| 52 | |
| 53 | *, |
| 54 | ::before, |
| 55 | ::after { |
| 56 | box-sizing: inherit; |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | .pageHeader { |
| 61 | background-color: var(--givewp-shades-white); |
| 62 | border-bottom: 0.0625rem solid #dbdbdb; |
| 63 | padding-block: 1rem 0; |
| 64 | padding-inline: 1.5rem; |
| 65 | position: sticky; |
| 66 | top: 2rem; |
| 67 | z-index: 100; |
| 68 | } |
| 69 | |
| 70 | .flexContainer { |
| 71 | display: flex; |
| 72 | flex-wrap: wrap; |
| 73 | align-items: center; |
| 74 | justify-content: space-between; |
| 75 | gap: 1rem; |
| 76 | margin-top: var(--givewp-spacing-2); |
| 77 | |
| 78 | & > * { |
| 79 | flex-shrink: 0; |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | .flexRow { |
| 84 | position: relative; |
| 85 | display: flex; |
| 86 | flex-direction: row; |
| 87 | align-items: center; |
| 88 | column-gap: var(--givewp-spacing-2); |
| 89 | margin-top: auto; |
| 90 | } |
| 91 | |
| 92 | .flexRow:not(:first-child) { |
| 93 | flex: 1; |
| 94 | justify-content: flex-end; |
| 95 | } |
| 96 | |
| 97 | .justifyContentEnd { |
| 98 | flex: 1; |
| 99 | justify-content: flex-end; |
| 100 | } |
| 101 | |
| 102 | .breadcrumb { |
| 103 | display: flex; |
| 104 | align-items: center; |
| 105 | gap: 0.25rem; |
| 106 | line-height: 1.125rem; |
| 107 | font-size: 0.75rem; |
| 108 | |
| 109 | & > span { |
| 110 | font-weight: bold; |
| 111 | color: var(--givewp-neutral-900); |
| 112 | } |
| 113 | |
| 114 | & > a { |
| 115 | text-decoration: none; |
| 116 | color: var(--givewp-neutral-500); |
| 117 | font-weight: 400; |
| 118 | } |
| 119 | |
| 120 | & > a:hover { |
| 121 | text-decoration: underline; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | .pageTitle { |
| 126 | color: var(--givewp-neutral-900); |
| 127 | margin: 0; |
| 128 | font-size: 1.5rem; |
| 129 | font-weight: 700; |
| 130 | line-height: 2.25rem; |
| 131 | } |
| 132 | |
| 133 | .tabs { |
| 134 | display: flex; |
| 135 | gap: 0.25rem; |
| 136 | margin-top: 1rem; |
| 137 | |
| 138 | &.fullWidth { |
| 139 | padding-left: var(--givewp-spacing-6); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | .tabs [data-reach-tab]], |
| 144 | .tabs [role='tab']='tab'] { |
| 145 | position: relative; |
| 146 | appearance: none; |
| 147 | padding: var(--givewp-spacing-2) var(--givewp-spacing-4); |
| 148 | border: 0; |
| 149 | background-color: transparent; |
| 150 | color: var(--givewp-neutral-700); |
| 151 | font-size: 0.8rem; |
| 152 | line-height: 1.5rem; |
| 153 | text-align: center; |
| 154 | cursor: pointer; |
| 155 | box-sizing: border-box |
| 156 | } |
| 157 | |
| 158 | @media screen and (min-width: 48rem) { |
| 159 | .tabs [data-reach-tab]], |
| 160 | .tabs [role='tab']='tab'] { |
| 161 | font-size: 1rem; |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | .tabs [data-reach-tab]]::after, |
| 166 | .tabs [role='tab']='tab']:after { |
| 167 | content: ''; |
| 168 | display: block; |
| 169 | position: absolute; |
| 170 | top: calc(100% - 0.1875em); |
| 171 | left: 0; |
| 172 | right: 0; |
| 173 | height: 0.1875rem; |
| 174 | background-color: transparent; |
| 175 | transition: background-color 100ms ease-in-out; |
| 176 | } |
| 177 | |
| 178 | .tabs [role='tab']='tab']:hover, |
| 179 | .tabs [data-reach-tab]]:hover { |
| 180 | color: var(--givewp-neutral-900); |
| 181 | background-color: var(--givewp-neutral-50); |
| 182 | } |
| 183 | |
| 184 | .tabs [data-reach-tab]][aria-selected='true']='true'], |
| 185 | .tabs [role='tab']='tab'][aria-selected='true']='true'] { |
| 186 | font-weight: 600; |
| 187 | color: var(--givewp-neutral-900); |
| 188 | } |
| 189 | |
| 190 | // set width for each tab to maintain size on hover. |
| 191 | .tabs [data-reach-tab]]:first-child, |
| 192 | .tabs [role='tab']='tab']:first-child { |
| 193 | width: 106px; |
| 194 | } |
| 195 | |
| 196 | .tabs [data-reach-tab]]:nth-child(2), |
| 197 | .tabs [role='tab']='tab']:nth-child(2) { |
| 198 | width: 95px; |
| 199 | } |
| 200 | |
| 201 | .tabs [data-reach-tab]]:last-child, |
| 202 | .tabs [role='tab']='tab']:last-child { |
| 203 | width: 79px; |
| 204 | } |
| 205 | |
| 206 | .tabs [data-reach-tab]][aria-selected='true']='true']::after, |
| 207 | .tabs [role='tab']='tab'][aria-selected='true']='true']::after { |
| 208 | background-color: #66bb6a; |
| 209 | } |
| 210 | |
| 211 | .archiveDialogContent { |
| 212 | font-size: 16px; |
| 213 | font-weight: 500; |
| 214 | line-height: 1.5; |
| 215 | color: var(--givewp-neutral-700); |
| 216 | } |
| 217 | |
| 218 | .archiveDialogButtons { |
| 219 | display: flex; |
| 220 | flex-direction: row; |
| 221 | justify-content: space-between; |
| 222 | gap: var(--givewp-spacing-2); |
| 223 | margin-top: var(--givewp-spacing-6); |
| 224 | |
| 225 | button { |
| 226 | cursor: pointer; |
| 227 | display: flex; |
| 228 | flex: 1; |
| 229 | justify-content: center; |
| 230 | border-radius: 4px; |
| 231 | font-size: 1rem; |
| 232 | font-weight: 500; |
| 233 | line-height: 1.5; |
| 234 | padding: var(--givewp-spacing-3) var(--givewp-spacing-6); |
| 235 | border: none; |
| 236 | } |
| 237 | |
| 238 | .cancelButton { |
| 239 | border: 1px solid var(--givewp-neutral-300); |
| 240 | background-color: var(--givewp-shades-white); |
| 241 | color: var(--givewp-neutral-900); |
| 242 | |
| 243 | &:hover { |
| 244 | background-color: var(--givewp-neutral-50); |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | .confirmButton { |
| 249 | border: 1px solid var(--givewp-red-500); |
| 250 | background-color: var(--givewp-red-500); |
| 251 | color: var(--givewp-shades-white); |
| 252 | |
| 253 | &:hover { |
| 254 | border: 1px solid var(--givewp-red-400); |
| 255 | background-color: var(--givewp-red-400); |
| 256 | } |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | .pageContent { |
| 261 | /*padding: 0 var(--givewp-spacing-6) var(--givewp-spacing-6);*/ |
| 262 | |
| 263 | &:not(.fullWidth) { |
| 264 | padding: var(--givewp-spacing-4) var(--givewp-spacing-6); |
| 265 | } |
| 266 | |
| 267 | section { |
| 268 | margin-bottom: var(--givewp-spacing-14); |
| 269 | position: relative; |
| 270 | |
| 271 | h2 { |
| 272 | font-size: 1.125rem; |
| 273 | line-height: 1.56; |
| 274 | margin: 0 0 var(--givewp-spacing-2); |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | .sections { |
| 279 | display: flex; |
| 280 | flex-direction: column; |
| 281 | gap: var(--givewp-spacing-6); |
| 282 | |
| 283 | .section { |
| 284 | display: flex; |
| 285 | align-content: flex-start; |
| 286 | flex-direction: row; |
| 287 | flex-wrap: wrap; |
| 288 | background-color: var(--givewp-shades-white); |
| 289 | padding: var(--givewp-spacing-9) var(--givewp-spacing-6); |
| 290 | border-radius: var(--givewp-spacing-2); |
| 291 | |
| 292 | @media (max-width: 1100px) { |
| 293 | flex-direction: column; |
| 294 | } |
| 295 | |
| 296 | .leftColumn { |
| 297 | flex: 1; |
| 298 | padding-right: var(--givewp-spacing-6); |
| 299 | |
| 300 | @media (max-width: 1100px) { |
| 301 | width: 100%; |
| 302 | margin-bottom: var(--givewp-spacing-4); |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | .rightColumn { |
| 307 | flex: 2; |
| 308 | } |
| 309 | |
| 310 | .sectionTitle { |
| 311 | font-size: 18px; |
| 312 | font-weight: 600; |
| 313 | line-height: 1.56; |
| 314 | color: var(--givewp-neutral-900); |
| 315 | padding: 0; |
| 316 | margin: 0 0 var(--givewp-spacing-1); |
| 317 | } |
| 318 | |
| 319 | .sectionDescription { |
| 320 | font-size: 16px; |
| 321 | line-height: 1.5; |
| 322 | color: var(--givewp-neutral-500); |
| 323 | } |
| 324 | |
| 325 | .sectionSubtitle { |
| 326 | color: var(--givewp-neutral-700); |
| 327 | font-size: 1rem; |
| 328 | font-weight: 500; |
| 329 | line-height: 1.5; |
| 330 | margin: 0; |
| 331 | } |
| 332 | |
| 333 | .sectionField { |
| 334 | position: relative; |
| 335 | display: flex; |
| 336 | flex-direction: column; |
| 337 | gap: var(--givewp-spacing-1); |
| 338 | margin-bottom: var(--givewp-spacing-6); |
| 339 | |
| 340 | input, |
| 341 | textarea, |
| 342 | select, |
| 343 | .upload { |
| 344 | margin-top: var(--givewp-spacing-1); |
| 345 | color: var(--givewp-neutral-900); |
| 346 | font-weight: 500; |
| 347 | } |
| 348 | |
| 349 | input, select { |
| 350 | border-radius: var(--givewp-rounded-4); |
| 351 | border: 1px solid #9ca0af; |
| 352 | display: block; |
| 353 | font-size: 1rem; |
| 354 | line-height: 1.5; |
| 355 | max-width: 100%; |
| 356 | padding: var(--givewp-spacing-4); |
| 357 | width: 100%; |
| 358 | |
| 359 | &:not([type="checkbox"]) { |
| 360 | height: auto; |
| 361 | } |
| 362 | |
| 363 | &:focus { |
| 364 | border-color: rgb(34, 113, 177); |
| 365 | outline: none; |
| 366 | box-shadow: rgb(34, 113, 177) 0px 0px 0px 1px; |
| 367 | } |
| 368 | |
| 369 | &:disabled { |
| 370 | cursor: not-allowed; |
| 371 | |
| 372 | &:not([type="checkbox"]) { |
| 373 | background-color: #f6f7f7; |
| 374 | box-shadow: none; |
| 375 | border-color: #9ca0af; |
| 376 | opacity: 0.7; |
| 377 | text-shadow: 0 1px 0 #fff; |
| 378 | transform: none; |
| 379 | } |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | select { |
| 384 | background-position: right var(--givewp-spacing-4) top 50%; |
| 385 | } |
| 386 | } |
| 387 | |
| 388 | .sectionField:last-child { |
| 389 | margin: 0; |
| 390 | |
| 391 | .sectionFieldCurrencyControl { |
| 392 | div { |
| 393 | margin: 0; |
| 394 | } |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | .sectionFieldDescription { |
| 399 | font-size: 14px; |
| 400 | line-height: 1.43; |
| 401 | color: var(--givewp-neutral-500); |
| 402 | } |
| 403 | |
| 404 | .sectionFieldHelpText { |
| 405 | font-size: 0.875rem; |
| 406 | line-height: 1.43; |
| 407 | margin: var(--givewp-spacing-1) 0 0; |
| 408 | font-weight: 400; |
| 409 | color: var(--givewp-neutral-500); |
| 410 | } |
| 411 | |
| 412 | .errorMsg { |
| 413 | font-size: 14px; |
| 414 | padding: var(--givewp-spacing-2) 0; |
| 415 | color: #ff0000; |
| 416 | } |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | .toggle { |
| 421 | margin-top: var(--givewp-spacing-3); |
| 422 | |
| 423 | span:is(:global(.components-form-toggle)) { |
| 424 | height: 24px; |
| 425 | } |
| 426 | |
| 427 | & > div { |
| 428 | margin-bottom: 0; |
| 429 | } |
| 430 | |
| 431 | span:is(:global(.components-form-toggle .components-form-toggle__track)) { |
| 432 | width: 48px; |
| 433 | height: 24px; |
| 434 | border-radius: 133.3px; |
| 435 | } |
| 436 | |
| 437 | span:is(:global(.components-form-toggle .components-form-toggle__thumb)) { |
| 438 | width: 1rem; |
| 439 | height: 1rem; |
| 440 | top: 4px; |
| 441 | left: 4px; |
| 442 | } |
| 443 | |
| 444 | span:is(:global(.components-form-toggle.is-checked .components-form-toggle__thumb)) { |
| 445 | left: 12px; |
| 446 | } |
| 447 | |
| 448 | span:is(:global(.components-form-toggle.is-checked .components-form-toggle__track)) { |
| 449 | background-color: #007cba; |
| 450 | } |
| 451 | |
| 452 | span:is(:global(.components-form-toggle .components-form-toggle__input:focus+.components-form-toggle__track)) { |
| 453 | box-shadow: 0 0 0 var(--wp-admin-border-width-focus) #fff, 0 0 0 calc(var(--wp-admin-border-width-focus) * 2) #007cba; |
| 454 | } |
| 455 | |
| 456 | label { |
| 457 | font-family: Inter, system-ui, sans-serif; |
| 458 | font-size: 1rem; |
| 459 | font-weight: 500; |
| 460 | line-height: 1.5; |
| 461 | color: #1f2937; |
| 462 | padding: var(--givewp-spacing-2) 0; |
| 463 | margin-left: 0.5rem; |
| 464 | } |
| 465 | |
| 466 | p { |
| 467 | font-family: Inter, system-ui, sans-serif; |
| 468 | font-size: .875rem; |
| 469 | color: #4b5563; |
| 470 | margin-top: -0.1rem; |
| 471 | margin-left: 1.5rem; |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | .warningNotice { |
| 476 | display: flex; |
| 477 | gap: 0.3rem; |
| 478 | margin-top: var(--givewp-spacing-2); |
| 479 | padding: 0 0.5rem 0 0.5rem; |
| 480 | background-color: #fffaf2; |
| 481 | border-radius: 4px; |
| 482 | border: 1px solid var(--givewp-orange-400); |
| 483 | border-left-width: 4px; |
| 484 | font-size: 0.875rem; |
| 485 | font-weight: 500; |
| 486 | color: #1a0f00; |
| 487 | |
| 488 | svg { |
| 489 | margin: 0.8rem 0.3rem; |
| 490 | height: 1.25rem; |
| 491 | width: 1.25rem; |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | .colorControl { |
| 496 | margin-top: var(--givewp-spacing-3); |
| 497 | } |
| 498 | } |
| 499 | |
| 500 | .loadingContainer { |
| 501 | display: flex; |
| 502 | justify-content: center; |
| 503 | align-items: center; |
| 504 | height: 100vh; |
| 505 | |
| 506 | .loadingContainerContent { |
| 507 | display: flex; |
| 508 | background-color: #fff; |
| 509 | padding: var(--givewp-spacing-6); |
| 510 | border-radius: var(--givewp-spacing-2); |
| 511 | margin-bottom: var(--givewp-spacing-4); |
| 512 | align-items: center; |
| 513 | flex-direction: column; |
| 514 | } |
| 515 | |
| 516 | .loadingContainerContentText { |
| 517 | padding: var(--givewp-spacing-4); |
| 518 | font-size: 1rem; |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | :global(#givewp-details-form) { |
| 523 | .primaryActionButton, |
| 524 | .secondaryActionButton { |
| 525 | display: flex; |
| 526 | align-content: center; |
| 527 | border-radius: var(--givewp-rounded-4); |
| 528 | font-size: 0.875rem; |
| 529 | font-weight: 500; |
| 530 | line-height: 1.5; |
| 531 | text-align: center; |
| 532 | padding: var(--givewp-spacing-2) var(--givewp-spacing-4); |
| 533 | |
| 534 | svg { |
| 535 | margin: 3px 0 0 8px !important; |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | .secondaryActionButton { |
| 540 | color: #060c1a; |
| 541 | background-color: var(--givewp-neutral-100); |
| 542 | border-color: var(--givewp-neutral-100); |
| 543 | |
| 544 | &:hover { |
| 545 | background-color: var(--givewp-neutral-200); |
| 546 | border-color: var(--givewp-neutral-200); |
| 547 | } |
| 548 | } |
| 549 | |
| 550 | .contextMenuButton { |
| 551 | background-color: var(--givewp-neutral-100); |
| 552 | border-color: var(--givewp-neutral-100); |
| 553 | border-radius: var(--givewp-rounded-4); |
| 554 | line-height: 0; |
| 555 | padding: var(--givewp-spacing-2); |
| 556 | |
| 557 | &:hover, &:active, &:focus { |
| 558 | background-color: var(--givewp-neutral-200); |
| 559 | border-color: var(--givewp-neutral-200); |
| 560 | } |
| 561 | } |
| 562 | |
| 563 | .contextMenu { |
| 564 | position: absolute; |
| 565 | display: flex; |
| 566 | flex-direction: column; |
| 567 | gap: var(--givewp-spacing-1); |
| 568 | z-index: 9999; |
| 569 | padding: var(--givewp-spacing-1); |
| 570 | top: 50px; |
| 571 | width: 203px; |
| 572 | border-radius: 4px; |
| 573 | box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); |
| 574 | border: solid 1px var(--givewp-neutral-50); |
| 575 | background-color: var(--givewp-shades-white); |
| 576 | |
| 577 | .contextMenuItem { |
| 578 | text-decoration: none; |
| 579 | gap: 4px; |
| 580 | display: flex; |
| 581 | align-items: center; |
| 582 | padding: var(--givewp-spacing-2); |
| 583 | font-size: .875rem; |
| 584 | font-weight: 500; |
| 585 | line-height: 1.43; |
| 586 | color: var(--contextMenuItemColor, var(--givewp-neutral-700)); |
| 587 | |
| 588 | &:hover { |
| 589 | background-color: #f3f4f6; |
| 590 | } |
| 591 | } |
| 592 | } |
| 593 | } |
| 594 |