mirror of https://github.com/Budibase/budibase.git
nocodelowcodelow-codedockerdocker-composeinternal-projectinternal-toolinternal-toolslow-code-developmentlow-code-development-platformopensourceselfhostedweb-devweb-developmentweb-development-toolswebdevwebdevelopmentworkflow-automationautomationdeveloper-tools
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
391 lines
12 KiB
391 lines
12 KiB
/*
|
|
Copyright 2019 Adobe. All rights reserved.
|
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software distributed under
|
|
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
governing permissions and limitations under the License.
|
|
*/
|
|
|
|
@import "../overlay/index.css";
|
|
|
|
.spectrum-Dialog {
|
|
/* The font-size of the fullscreen dialog header */
|
|
--spectrum-dialog-fullscreen-header-text-size: 28px;
|
|
|
|
--spectrum-dialog-confirm-small-width: 400px;
|
|
--spectrum-dialog-confirm-medium-width: 480px;
|
|
--spectrum-dialog-confirm-large-width: 640px;
|
|
--spectrum-dialog-confirm-max-inline-size: 90vw;
|
|
--spectrum-dialog-confirm-max-height: 90vh;
|
|
--spectrum-dialog-error-width: var(--spectrum-dialog-confirm-medium-width);
|
|
|
|
--spectrum-dialog-confirm-hero-height: var(
|
|
--spectrum-global-dimension-size-1600
|
|
);
|
|
--spectrum-dialog-confirm-gap-size: var(--spectrum-global-dimension-size-200);
|
|
--spectrum-dialog-confirm-description-padding: var(
|
|
--spectrum-global-dimension-size-25
|
|
);
|
|
--spectrum-dialog-confirm-description-margin: calc(
|
|
var(--spectrum-global-dimension-size-25) * -1
|
|
);
|
|
--spectrum-dialog-confirm-footer-padding-top: var(
|
|
--spectrum-global-dimension-static-size-500
|
|
);
|
|
--spectrum-dialog-confirm-gap-size: var(--spectrum-global-dimension-size-200);
|
|
--spectrum-dialog-confirm-buttongroup-padding-top: var(
|
|
--spectrum-global-dimension-static-size-500
|
|
);
|
|
--spectrum-dialog-confirm-close-button-size: var(
|
|
--spectrum-global-dimension-size-400
|
|
);
|
|
--spectrum-dialog-confirm-close-button-padding: calc(
|
|
26px - var(--spectrum-global-dimension-size-175)
|
|
);
|
|
--spectrum-dialog-confirm-divider-height: var(--spectrum-global-dimension-static-size-25);
|
|
}
|
|
|
|
.spectrum-Dialog {
|
|
/* Be a flexbox to allow a full sized content area that scrolls */
|
|
display: flex;
|
|
|
|
/* Allow 100% width, taking into account padding */
|
|
box-sizing: border-box;
|
|
|
|
/* Be no bigger than max-width, but also be 90% if the viewport is smaller than max-width */
|
|
inline-size: fit-content;
|
|
min-inline-size: var(--spectrum-dialog-confirm-min-width);
|
|
max-inline-size: 100%;
|
|
|
|
max-height: inherit;
|
|
|
|
outline: none;
|
|
}
|
|
|
|
.spectrum-Dialog--small {
|
|
inline-size: var(--spectrum-dialog-confirm-small-width);
|
|
}
|
|
|
|
.spectrum-Dialog--medium {
|
|
inline-size: var(--spectrum-dialog-confirm-medium-width);
|
|
}
|
|
|
|
.spectrum-Dialog--large {
|
|
inline-size: var(--spectrum-dialog-confirm-large-width);
|
|
}
|
|
|
|
.spectrum-Dialog-hero {
|
|
grid-area: hero;
|
|
height: var(--spectrum-dialog-confirm-hero-height);
|
|
|
|
border-top-left-radius: var(--spectrum-dialog-confirm-border-radius);
|
|
border-top-right-radius: var(--spectrum-dialog-confirm-border-radius);
|
|
|
|
background-size: cover;
|
|
background-position: center center;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.spectrum-Dialog .spectrum-Dialog-grid {
|
|
display: grid;
|
|
grid-template-columns:
|
|
var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0, auto)
|
|
var(--spectrum-dialog-confirm-padding);
|
|
grid-template-rows: auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(
|
|
--spectrum-dialog-confirm-padding
|
|
);
|
|
grid-template-areas:
|
|
"hero hero hero hero hero hero"
|
|
". . . . . ."
|
|
". heading header header typeIcon ."
|
|
". divider divider divider divider ."
|
|
". content content content content ."
|
|
". footer footer buttonGroup buttonGroup ."
|
|
". . . . . .";
|
|
inline-size: 100%;
|
|
}
|
|
|
|
.spectrum-Dialog-heading {
|
|
grid-area: heading;
|
|
|
|
margin: 0;
|
|
|
|
font-size: var(--spectrum-dialog-confirm-title-text-size);
|
|
font-weight: var(--spectrum-dialog-confirm-title-text-font-weight);
|
|
line-height: var(--spectrum-dialog-confirm-title-text-line-height);
|
|
|
|
outline: none; /* Hide focus outline */
|
|
|
|
padding-inline-end: var(--spectrum-dialog-confirm-gap-size);
|
|
|
|
&.spectrum-Dialog-heading--noHeader {
|
|
grid-area: heading-start / heading-start / header-end / header-end;
|
|
padding-inline-end: 0;
|
|
}
|
|
}
|
|
|
|
.spectrum-Dialog-header {
|
|
grid-area: header;
|
|
display: flex;
|
|
/* Without this, buttons will be stretched */
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
|
|
box-sizing: border-box;
|
|
|
|
outline: none; /* Hide focus outline around header */
|
|
}
|
|
|
|
.spectrum-Dialog-typeIcon {
|
|
grid-area: typeIcon;
|
|
}
|
|
|
|
.spectrum-Dialog .spectrum-Dialog-divider {
|
|
grid-area: divider;
|
|
inline-size: 100%;
|
|
margin-top: var(--spectrum-dialog-confirm-divider-margin-top);
|
|
margin-bottom: var(--spectrum-dialog-confirm-divider-margin-bottom);
|
|
}
|
|
|
|
.spectrum-Dialog--noDivider {
|
|
.spectrum-Dialog-divider {
|
|
display: none;
|
|
}
|
|
.spectrum-Dialog-heading {
|
|
padding-bottom: calc(
|
|
var(--spectrum-dialog-confirm-divider-margin-top) +
|
|
var(--spectrum-dialog-confirm-divider-margin-bottom) +
|
|
var(--spectrum-dialog-confirm-divider-height)
|
|
);
|
|
}
|
|
}
|
|
|
|
.spectrum-Dialog-content {
|
|
grid-area: content;
|
|
box-sizing: border-box;
|
|
|
|
/*
|
|
v2 is currently worse, inputs that get focus rings get a slight clipping unless overflow: visible replaces this line
|
|
we should think of a better way to handle this, see padding/margin below for fix
|
|
*/
|
|
overflow-y: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
|
|
outline: none; /* Hide focus outline */
|
|
|
|
font-size: var(--spectrum-dialog-confirm-description-text-size);
|
|
font-weight: var(--spectrum-dialog-confirm-description-text-font-weight);
|
|
line-height: var(--spectrum-dialog-confirm-description-text-line-height);
|
|
|
|
/* this is kinda dumb, but needed for the keyboard focus rings so they don't get clipped. is there a better way to treat this */
|
|
padding: 0 var(--spectrum-dialog-confirm-description-padding);
|
|
margin: 0 var(--spectrum-dialog-confirm-description-margin);
|
|
}
|
|
|
|
.spectrum-Dialog-footer {
|
|
grid-area: footer;
|
|
/* this padding isn't built into the grid because it disappears with this footer */
|
|
padding-block-start: var(--spectrum-dialog-confirm-footer-padding-top);
|
|
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
|
|
outline: none; /* Hide focus outline */
|
|
|
|
/* Both selectors are required to override the button + button rule */
|
|
> *,
|
|
> .spectrum-Button + .spectrum-Button {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
.spectrum-Dialog-buttonGroup {
|
|
grid-area: buttonGroup;
|
|
/* this padding isn't built into the grid because it disappears with this buttonGroup */
|
|
padding-block-start: var(--spectrum-dialog-confirm-buttongroup-padding-top);
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
/* this padding should be safe as button group is always end aligned */
|
|
padding-inline-start: var(--spectrum-dialog-confirm-gap-size);
|
|
|
|
&.spectrum-Dialog-buttonGroup--noFooter {
|
|
grid-area: footer-start / footer-start / buttonGroup-end / buttonGroup-end;
|
|
}
|
|
}
|
|
|
|
.spectrum-Dialog.spectrum-Dialog--dismissable .spectrum-Dialog-grid {
|
|
grid-template-columns:
|
|
var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0, auto)
|
|
minmax(0, var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);
|
|
grid-template-rows: auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(
|
|
--spectrum-dialog-confirm-padding
|
|
);
|
|
grid-template-areas:
|
|
"hero hero hero hero hero hero hero"
|
|
". . . . . closeButton closeButton"
|
|
". heading header header typeIcon closeButton closeButton"
|
|
". divider divider divider divider divider ."
|
|
". content content content content content ."
|
|
". footer footer buttonGroup buttonGroup buttonGroup ."
|
|
". . . . . . .";
|
|
|
|
.spectrum-Dialog-buttonGroup {
|
|
display: none;
|
|
}
|
|
.spectrum-Dialog-footer {
|
|
grid-area: footer / footer/ buttonGroup / buttonGroup;
|
|
}
|
|
}
|
|
|
|
.spectrum-Dialog-closeButton {
|
|
grid-area: closeButton;
|
|
/* align and justify so it doesn't do the default 'stretch' and end up with forced height/width */
|
|
align-self: start;
|
|
justify-self: end;
|
|
|
|
margin-inline-end: var(--spectrum-dialog-confirm-close-button-padding);
|
|
margin-block-start: var(--spectrum-dialog-confirm-close-button-padding);
|
|
}
|
|
|
|
/* Alert Dialog is a specific type of Dialog */
|
|
.spectrum-Dialog--error {
|
|
inline-size: var(--spectrum-dialog-error-width);
|
|
}
|
|
|
|
.spectrum-Dialog--fullscreen {
|
|
inline-size: 100%;
|
|
height: 100%;
|
|
}
|
|
.spectrum-Dialog--fullscreenTakeover {
|
|
inline-size: 100%;
|
|
height: 100%;
|
|
|
|
border-radius: 0;
|
|
}
|
|
|
|
.spectrum-Dialog--fullscreen,
|
|
.spectrum-Dialog--fullscreenTakeover {
|
|
max-height: none;
|
|
max-inline-size: none;
|
|
|
|
&.spectrum-Dialog .spectrum-Dialog-grid {
|
|
display: grid;
|
|
grid-template-columns: var(--spectrum-dialog-confirm-padding) 1fr auto auto var(
|
|
--spectrum-dialog-confirm-padding
|
|
);
|
|
grid-template-rows: var(--spectrum-dialog-confirm-padding) auto auto 1fr var(
|
|
--spectrum-dialog-confirm-padding
|
|
);
|
|
grid-template-areas:
|
|
". . . . ."
|
|
". heading header buttonGroup ."
|
|
". divider divider divider ."
|
|
". content content content ."
|
|
". . . . .";
|
|
}
|
|
|
|
.spectrum-Dialog-heading {
|
|
font-size: var(--spectrum-dialog-fullscreen-header-text-size);
|
|
}
|
|
|
|
.spectrum-Dialog-content {
|
|
max-height: none;
|
|
}
|
|
|
|
.spectrum-Dialog-footer,
|
|
.spectrum-Dialog-buttonGroup {
|
|
padding-block-start: 0px;
|
|
}
|
|
|
|
.spectrum-Dialog-footer {
|
|
display: none;
|
|
}
|
|
|
|
.spectrum-Dialog-buttonGroup {
|
|
grid-area: buttonGroup;
|
|
align-self: start;
|
|
}
|
|
}
|
|
|
|
@media screen and (max-inline-size: 700px) {
|
|
.spectrum-Dialog .spectrum-Dialog-grid {
|
|
grid-template-columns:
|
|
var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0, auto)
|
|
var(--spectrum-dialog-confirm-padding);
|
|
grid-template-rows: auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(
|
|
--spectrum-dialog-confirm-padding
|
|
);
|
|
grid-template-areas:
|
|
"hero hero hero hero hero hero"
|
|
". . . . . ."
|
|
". heading heading heading typeIcon ."
|
|
". header header header header ."
|
|
". divider divider divider divider ."
|
|
". content content content content ."
|
|
". footer footer buttonGroup buttonGroup ."
|
|
". . . . . .";
|
|
}
|
|
|
|
.spectrum-Dialog.spectrum-Dialog--dismissable .spectrum-Dialog-grid {
|
|
grid-template-columns:
|
|
var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0, auto)
|
|
minmax(0, var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);
|
|
grid-template-rows: auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(
|
|
--spectrum-dialog-confirm-padding
|
|
);
|
|
grid-template-areas:
|
|
"hero hero hero hero hero hero hero"
|
|
". . . . . closeButton closeButton"
|
|
". heading heading heading typeIcon closeButton closeButton"
|
|
". header header header header header ."
|
|
". divider divider divider divider divider ."
|
|
". content content content content content ."
|
|
". footer footer buttonGroup buttonGroup buttonGroup ."
|
|
". . . . . . .";
|
|
}
|
|
|
|
.spectrum-Dialog .spectrum-Dialog-header {
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.spectrum-Dialog--fullscreen,
|
|
.spectrum-Dialog--fullscreenTakeover {
|
|
&.spectrum-Dialog .spectrum-Dialog-grid {
|
|
display: grid;
|
|
grid-template-columns: var(--spectrum-dialog-confirm-padding) 1fr var(
|
|
--spectrum-dialog-confirm-padding
|
|
);
|
|
grid-template-rows: var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(
|
|
--spectrum-dialog-confirm-padding
|
|
);
|
|
grid-template-areas:
|
|
". . ."
|
|
". heading ."
|
|
". header ."
|
|
". divider ."
|
|
". content ."
|
|
". buttonGroup ."
|
|
". . .";
|
|
}
|
|
|
|
.spectrum-Dialog-buttonGroup {
|
|
padding-block-start: var(
|
|
--spectrum-dialog-confirm-buttongroup-padding-top
|
|
);
|
|
}
|
|
|
|
.spectrum-Dialog-heading {
|
|
font-size: var(--spectrum-dialog-confirm-title-text-size);
|
|
}
|
|
}
|
|
}
|
|
|
|
@media (forced-colors: active) {
|
|
.spectrum-Dialog {
|
|
border: solid;
|
|
}
|
|
}
|