feat(SW-1259): Enter details multiroom * refactor: remove per-step URLs * WIP: map multiroom data * fix: lint errors in details page * fix: made useEnterDetailsStore tests pass * fix: WIP refactor enter details store * fix: WIP enter details store update * fix: added room index to select correct room * fix: added logic for navigating between steps and rooms * fix: update summary to work with store changes * fix: added room and total price calculation * fix: removed unused code and added test for breakfast included * refactor: move store selectors into helpers * refactor: session storage state for multiroom booking * feat: update enter details accordion navigation * fix: added room index to each form component so they select correct room * fix: added unique id to input to handle case when multiple inputs have same name * fix: update payment step with store changes * fix: rebase issues * fix: now you should only be able to go to a step if previous room is completed * refactor: cleanup * fix: if no availability just skip that room for now * fix: add select-rate Summary and adjust typings Approved-by: Arvid Norlin
128 lines
2.5 KiB
CSS
128 lines
2.5 KiB
CSS
.accordion {
|
|
--header-height: 2.4em;
|
|
--circle-height: 24px;
|
|
|
|
gap: var(--Spacing-x3);
|
|
width: 100%;
|
|
padding-top: var(--Spacing-x3);
|
|
transition: 0.3s ease-out;
|
|
|
|
display: grid;
|
|
grid-template-areas: "circle header" "content content";
|
|
grid-template-columns: auto 1fr;
|
|
grid-template-rows: var(--header-height) 0fr;
|
|
|
|
column-gap: var(--Spacing-x-one-and-half);
|
|
transform-origin: top;
|
|
}
|
|
|
|
.header {
|
|
grid-area: header;
|
|
}
|
|
|
|
.modifyButton {
|
|
display: grid;
|
|
grid-template-areas: "title button" "selection button";
|
|
cursor: pointer;
|
|
background-color: transparent;
|
|
border: none;
|
|
width: 100%;
|
|
padding: 0;
|
|
}
|
|
|
|
.modifyButton:disabled {
|
|
cursor: default;
|
|
}
|
|
|
|
.title {
|
|
grid-area: title;
|
|
text-align: start;
|
|
}
|
|
|
|
.button {
|
|
grid-area: button;
|
|
justify-self: flex-end;
|
|
transform-origin: 50% 50%;
|
|
transition: transform 0.3s;
|
|
}
|
|
|
|
.buttonOpen {
|
|
transform: rotate(180deg);
|
|
}
|
|
.selection {
|
|
grid-area: selection;
|
|
}
|
|
|
|
.iconWrapper {
|
|
position: relative;
|
|
grid-area: circle;
|
|
}
|
|
|
|
.circle {
|
|
width: var(--circle-height);
|
|
height: var(--circle-height);
|
|
border-radius: 100px;
|
|
transition: background-color 0.4s;
|
|
border: 2px solid var(--Base-Border-Inverted);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.circle[data-checked="true"] {
|
|
background-color: var(--UI-Input-Controls-Fill-Selected);
|
|
}
|
|
|
|
.accordion[data-section-open="true"] .circle[data-checked="false"] {
|
|
background-color: var(--UI-Text-Placeholder);
|
|
}
|
|
|
|
.accordion[data-section-open="false"] .circle[data-checked="false"] {
|
|
background-color: var(--Base-Surface-Subtle-Hover);
|
|
}
|
|
|
|
.accordion[data-section-open="true"] {
|
|
grid-template-rows: var(--header-height) 1fr;
|
|
}
|
|
|
|
.contentWrapper {
|
|
opacity: 0;
|
|
padding-bottom: var(--Spacing-x3);
|
|
}
|
|
|
|
.accordion[data-section-open="true"] .contentWrapper {
|
|
opacity: 1;
|
|
}
|
|
.content {
|
|
overflow: hidden;
|
|
grid-area: content;
|
|
border-bottom: 1px solid var(--Primary-Light-On-Surface-Divider-subtle);
|
|
transform-origin: top;
|
|
transition: opacity 0.2s linear;
|
|
}
|
|
|
|
.content:has([data-section-open="true"]) {
|
|
overflow: visible;
|
|
}
|
|
|
|
@media screen and (min-width: 768px) {
|
|
.accordion {
|
|
column-gap: var(--Spacing-x3);
|
|
grid-template-areas: "circle header" "circle content";
|
|
}
|
|
|
|
.iconWrapper {
|
|
top: var(--Spacing-x1);
|
|
}
|
|
|
|
.accordion:not(:last-child) .iconWrapper::after {
|
|
position: absolute;
|
|
left: 12px;
|
|
bottom: calc(0px - var(--Spacing-x5));
|
|
top: var(--circle-height);
|
|
|
|
content: "";
|
|
border-left: 1px solid var(--Primary-Light-On-Surface-Divider-subtle);
|
|
}
|
|
}
|