Skip to content

Commit

Permalink
Merge pull request #808 from adobecom/MWPW-157036
Browse files Browse the repository at this point in the history
MWPW-157036: Nonprofit form with api integration
  • Loading branch information
Blainegunn authored Sep 17, 2024
2 parents ea9e421 + 73d3d10 commit e66b687
Show file tree
Hide file tree
Showing 8 changed files with 1,931 additions and 0 deletions.
427 changes: 427 additions & 0 deletions acrobat/blocks/nonprofit/constants.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions acrobat/blocks/nonprofit/icons/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
384 changes: 384 additions & 0 deletions acrobat/blocks/nonprofit/nonprofit.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,384 @@
:root {
--np-content-width: 378px;
--np-organization-item-height: 72px;
--np-organization-cannot-find-height: 51px;
}

.np-container {
display: flex;
flex-direction: column;
align-items: center;
padding-block: 86px;
}

.np-stepper-container {
display: flex;
align-items: center;
gap: 12px;
}

.np-step-container {
display: flex;
align-items: center;
gap: 12px;
}

.np-step-container span {
user-select: none;
}

.np-step-icon {
width: 20px;
height: 20px;
border-radius: 10px;
background-color: var(--color-gray-300);
color: var(--color-white);
font-weight: 700;
font-size: 16px;
line-height: 18px;
text-align: center;
vertical-align: middle;
}

.np-step-name {
font-size: 16px;
color: var(--color-gray-300);
}

.np-step-container.is-cleared .np-step-icon {
background-color: var(--color-gray-600);
}

.np-step-container.is-cleared .np-step-name {
color: var(--color-gray-600);
}

.np-step-container.is-active .np-step-icon {
background-color: var(--link-color);
}

.np-step-container.is-active .np-step-name {
color: var(--link-color);
}

.np-step-separator {
width: 12px;
height: 12px;
background: url(../../img/icons/ui/chevron-right.svg) no-repeat;
background-position: top 2px left 3px;
}

.np-content-container {
display: flex;
flex-direction: column;
align-items: center;
}

.np-description {
display: flex;
flex-direction: column;
align-items: center;
padding-block: 56px;
gap: 16px;
}

.np-title {
font-weight: 700;
line-height: 35px;
font-size: 24px;
text-align: center;
}

.np-subtitle {
text-align: center;
max-width: 800px;
}

.np-form {
width: var(--np-content-width);
display: flex;
flex-direction: column;
gap: 25px;
}

.np-form .np-button {
align-self: start;
}

.np-control {
display: flex;
flex-direction: column;
gap: 7px;
position: relative;
}

.np-label {
font-weight: 400;
font-size: 14px;
line-height: 18px;
color: var(--color-gray-700);
}

.np-input {
width: 100%;
border: 1px solid var(--color-gray-500);
line-height: 20px;
padding: 9px 15px;
box-sizing: border-box;
border-radius: 4px;
appearance: none;
}

.np-input:disabled {
border: 1px solid var(--color-gray-300);
}

.np-select-search {
appearance: none;
padding-right: 40px;
text-overflow: ellipsis;
white-space: nowrap;
}

.np-select-icon {
position: absolute;
padding: 6px;
right: 6px;
top: 36px;
display: flex;
cursor: pointer;
}

.np-input:disabled ~ .np-select-icon path {
fill: var(--color-gray-400);
}

.np-select-list-container {
display: none;
position: absolute;
list-style-type: none;
border: 1px solid var(--color-gray-500);
background-color: var(--color-white);
border-radius: 4px;
box-sizing: border-box;
width: 100%;
top: 100%;
margin-top: 4px;
min-height: var(--np-organization-cannot-find-height);
max-height: calc(
4 * var(--np-organization-item-height) + var(--np-organization-cannot-find-height) + 1px
);
overflow: hidden;
z-index: 1;
box-shadow: 0 2px 6px -1px rgb(0 0 0 / 10%);
}

.np-select-list {
list-style-type: none;
width: 100%;
margin: 0;
padding: 5px 0;
max-height: calc(4 * var(--np-organization-item-height));
overflow-x: hidden;
overflow-y: auto;
}

.np-select-list-tag {
padding: 10px 15px;
font-size: 16px;
line-height: 21px;
cursor: pointer;
display: flex;
flex-direction: column;
outline: none;
overflow: hidden;
}

.np-select-item:hover {
background-color: var(--color-gray-100);
}

.np-select-item:focus {
background-color: var(--color-gray-200);
}

.np-select-item span {
line-height: 21px;
width: 100%;
}

.np-organization-select-name {
font-weight: 700;
padding-bottom: 10px;
}

.np-organization-select-id {
font-weight: 400;
}

.np-organization-select-name,
.np-organization-select-id {
text-wrap: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}

.np-select-no-options {
color: var(--color-gray-500);
}

.np-select-loader {
text-align: start;
}

.np-selected-organization-container {
display: none;
border: 1px solid var(--color-gray-500);
border-radius: 4px;
box-sizing: border-box;
flex-direction: column;
padding-inline: 15px;
position: relative;
}

.np-selected-organization-container .np-selected-organization-detail {
font-size: 16px;
font-weight: 400;
line-height: 21px;
padding-block: 10px;
}

.np-selected-organization-header {
display: flex;
align-items: center;
padding-block: 10px;
gap: 10px;
}

.np-selected-organization-header .np-selected-organization-detail {
padding-right: 10px;
}

.np-selected-organization-avatar {
width: 40px;
height: 40px;
border-radius: 20px;
background-color: #da408b;
display: flex;
justify-content: center;
align-items: center;
flex-shrink: 0;
}

.np-selected-organization-initials {
color: var(--color-white);
font-size: 18px;
font-weight: 700;
}

.np-selected-organization-separator {
height: 1px;
background-color: var(--color-gray-300);
}

.np-selected-organization-clear {
position: absolute;
width: 12px;
height: 12px;
top: 15px;
right: 15px;
cursor: pointer;
}

.np-personal-data-disclaimer {
font-size: 14px;
line-height: 18px;
padding-bottom: 15px;
color: var(--color-gray-600);
}

.np-button {
background-color: var(--link-color);
color: var(--color-white);
font-weight: 700;
font-size: 16px;
line-height: 20px;
border: none;
border-radius: 20px;
padding: 10px 20px;
cursor: pointer;
}

.np-application-review-container {
display: flex;
flex-direction: column;
align-items: center;
margin-block: 56px;
}

.np-application-review-detail {
margin-block: 16px;
font-size: 18px;
line-height: 24px;
font-weight: 400;
}

/* Temporary stuff */
.nonprofit {
height: 1125px;
display: flex;
flex-direction: column;
}

.np-controller-buffer {
flex-grow: 1;
}

.np-controller-container {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 50px;
gap: 10px;
}

.np-controller-title {
font-weight: 700;
font-size: 16px;
color: var(--feds-color-adobeBrand);
}

.np-controller-section {
display: flex;
width: 415px;

& .np-controller-button:last-child {
margin: 0;
}
}

.np-controller-button {
border: 2px solid var(--link-color);
background-color: var(--color-white);
color: var(--link-color);
font-weight: 700;
font-size: 16px;
line-height: 20px;
border-radius: 20px;
padding: 10px 20px;
align-self: start;
cursor: pointer;
width: 200px;
margin-right: 12px;
white-space: nowrap;

&.is-step {
width: 100px;
margin-right: 3px;
}

&.selected {
background-color: var(--link-color);
color: var(--color-white);
}
}
Loading

0 comments on commit e66b687

Please sign in to comment.