Skip to content

Commit

Permalink
Merge branch 'main' of github.com:riptano/docs-ui into icons-tailwind…
Browse files Browse the repository at this point in the history
…-updates

# Conflicts:
#	src/partials/main.hbs
  • Loading branch information
colegoldsmith committed Oct 27, 2023
2 parents c5e8c94 + 08bc429 commit 23bfd4a
Show file tree
Hide file tree
Showing 16 changed files with 454 additions and 153 deletions.
284 changes: 284 additions & 0 deletions src/css/ds-blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,287 @@ html[data-theme="dark"] .listingblock:not(.default) .content .source-toolbox {
html[data-theme="dark"] .listingblock:not(.default) .hljs {
border-top-color: var(--ds-neutral-700);
}

/*
*
* Admonitions component
*
*/
.doc .admonitionblock {
border: 1px solid var(--ds-success-outlined-border);
border-radius: calc(6 / var(--rem-base) * 1rem);
overflow-x: hidden;
}

.doc .admonitionblock > table > tbody > tr {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}

.doc .admonitionblock .icon {
display: flex;
gap: var(--ds-space-1);
align-items: center;
align-self: stretch;
position: unset;
width: 100%;
transform: none;
text-transform: none;
color: var(--ds-text-primary);
font-size: calc(16 / var(--rem-base) * 1rem);
line-height: 1.5;
height: var(--ds-space-6);
padding: var(--ds-space-1h) var(--ds-space-2);
border-radius: 0;
}

.doc .admonitionblock td.content > *,
.doc .admonitionblock td.content p {
margin-top: var(--ds-space-2);
}

.doc .admonitionblock td.content .ulist p {
margin-top: 0;
}

.doc .admonitionblock td.content > .paragraph:first-child p:first-child,
.doc .admonitionblock td.content > .title {
margin: 0;
}

.doc .admonitionblock .title {
font-style: normal;
}

.doc .admonitionblock td.content {
background: none;
}

.doc .admonitionblock .icon::before {
font-family: "Material Icons Outlined", sans-serif;
font-size: calc(20 / var(--rem-base) * 1rem);
font-weight: normal;
}

/* TIP, NOTE */
.doc .admonitionblock.tip .icon,
.doc .admonitionblock.note .icon {
background: var(--ds-success-soft-bg);
color: var(--ds-text-primary);
}

.doc .admonitionblock.note .icon::before {
color: var(--ds-success-500);
content: '\e88e';
}

.doc .admonitionblock.tip .icon::before {
color: var(--ds-success-500);
content: '\e0f0';
}

/* CAUTION */
.doc .admonitionblock.caution .icon {
background: var(--ds-warning-soft-bg);
color: var(--ds-text-primary);
}

.doc .admonitionblock.caution {
border: 1px solid var(--ds-warning-outlined-border);
}

.doc .admonitionblock.caution .icon::before {
color: var(--ds-warning-500);
content: '\e88e';
}

/* WARNING, IMPORTANT */
.doc .admonitionblock.warning .icon,
.doc .admonitionblock.important .icon {
background: var(--ds-failure-soft-bg);
color: var(--ds-text-primary);
}

.doc .admonitionblock.warning,
.doc .admonitionblock.important {
border: 1px solid var(--ds-failure-outlined-border);
}

.doc .admonitionblock.warning .icon::before {
color: var(--ds-failure-500);
content: '\f083';
}

.doc .admonitionblock.important .icon::before {
color: var(--ds-failure-500);
content: '\e160';
}

html[data-theme="dark"] .doc .admonitionblock .icon::before {
color: var(--ds-primary-text);
}

/*
*
* Dialog component
*
*/

dialog {
display: none;
padding: 0;
flex-direction: column;
align-items: flex-start;
border-radius: 6px;
border: 1px solid var(--ds-neutral-300);
width: 90%;
max-width: 640px;
background: var(--body-background);
color: var(--doc-font-color);
}

/* dialog header */
dialog .header {
display: flex;
padding: var(--ds-space-3);
padding-bottom: var(--ds-space-2);
align-items: center;
gap: var(--ds-space-2);
align-self: stretch;
justify-content: space-between;
border-bottom: 1px solid var(--ds-neutral-200);
}

dialog .header .title {
@include text-h1;

color: var(--heading-font-color);
}

dialog .header .close-button {
display: flex;
justify-content: center;
align-items: center;
gap: var(--ds-space-1);
}

dialog .header kbd {
border: none;
box-shadow: none;
background: var(--ds-neutral-100);
}

dialog .header button {
background: transparent;
border: none;
line-height: 1;
}

dialog .header .material-icons {
color: var(--link-font-color);
}

/* dialog content */
dialog form {
width: 100%;
}

dialog .content {
display: flex;
flex-direction: column;
align-self: stretch;
border-bottom: 1px solid var(--ds-neutral-200);
padding: var(--ds-space-3) var(--ds-space-4) var(--ds-space-3) var(--ds-space-3);
}

dialog .content .message {
@include text-h2;

color: var(--heading-font-color);
margin-bottom: var(--ds-space-4);
}

dialog .content .question {
font-size: calc(13 / var(--rem-base) * 1rem);
color: var(--ds-neutral-700);
font-weight: 600;
letter-spacing: 0.65px;
}

dialog .content textarea {
font-family: var(--body-font-family);
color: var(--doc-font-color);
background: var(--body-background);
height: calc(160 / var(--rem-base) * 1rem);
margin-top: var(--ds-space-h);
resize: none;
padding: var(--ds-space-1);
border-radius: 6px;
border: 1px solid var(--ds-neutral-300);
}

dialog .action {
display: flex;
padding: var(--ds-space-2) var(--ds-space-3) var(--ds-space-3) var(--ds-space-3);
align-items: center;
gap: var(--ds-space-1);
align-self: stretch;
justify-content: flex-end;
}

dialog[open] {
display: flex;
}

dialog::backdrop {
background: rgba(10, 10, 10, 0.6);
}

.dialog-action,
.dialog-action--response {
transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1), visibility 500ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
transition-delay: 300ms;
}

.dialog-action + .dialog-action--response {
position: absolute;
top: 0;
line-height: var(--ds-space-5);
height: var(--ds-space-5);
}

.dialog-action--response {
font-weight: 600;
transition-delay: 1200ms;
}

.dialog-action--container {
position: relative;

& .dialog-action {
opacity: 1;
visibility: visible;
}

& .dialog-action--response {
opacity: 0;
visibility: hidden;
}

&:not(.first-time) .dialog-action {
transition-delay: 2000ms;
}

&.dialog-action--animate {
& .dialog-action {
opacity: 0;
visibility: hidden;
}

& .dialog-action--response {
opacity: 1;
visibility: visible;
}
}
}
Loading

0 comments on commit 23bfd4a

Please sign in to comment.