ada-ui 7.1.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +3 -3
- package/css/ada.css +1 -1
- package/index.html +27 -0
- package/package.json +1 -1
- package/scss/_command.scss +4 -67
- package/scss/_compound-commands.scss +48 -0
- package/scss/_global.scss +29 -2
- package/scss/_panel-commands.scss +51 -0
- package/scss/_typography.scss +1 -1
- package/scss/ada.scss +2 -0
- package/todo-scss-module-structure.md +30 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ My sci-fi inspired UI components library. Still growing...
|
|
|
6
6
|
|
|
7
7
|
## CDN
|
|
8
8
|
|
|
9
|
-
https://cdn.jsdelivr.net/gh/tklepzig/Ada@7.
|
|
9
|
+
https://cdn.jsdelivr.net/gh/tklepzig/Ada@7.2.0/css/ada.css
|
|
10
10
|
|
|
11
11
|
The link points at the latest release. To pin a different one, swap the version
|
|
12
12
|
— see https://github.com/tklepzig/Ada/releases.
|
|
@@ -30,8 +30,8 @@ a theme alongside it. A theme is just a handful of custom properties on `:root`
|
|
|
30
30
|
|
|
31
31
|
Or via the CDN:
|
|
32
32
|
|
|
33
|
-
https://cdn.jsdelivr.net/gh/tklepzig/Ada@7.
|
|
34
|
-
https://cdn.jsdelivr.net/gh/tklepzig/Ada@7.
|
|
33
|
+
https://cdn.jsdelivr.net/gh/tklepzig/Ada@7.2.0/css/ada.css
|
|
34
|
+
https://cdn.jsdelivr.net/gh/tklepzig/Ada@7.2.0/css/ada.blue.css
|
|
35
35
|
|
|
36
36
|
With npm, import the base entry first and the theme second (same cascade rule
|
|
37
37
|
through your bundler):
|
package/css/ada.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root,.primary{--hue: var(--base-hue)}.tone-1{--hue: calc(var(--base-hue) - 26)}.tone-2{--hue: calc(var(--base-hue) - 51)}.tone-3{--hue: calc(var(--base-hue) - 76)}.warn{--hue: 29}:root,.primary,.tone-1,.tone-2,.tone-3,.warn{--lightness-resolved: var(--lightness);--chroma-resolved: var(--chroma);--bg-body: var(--color950);--fg-body: var(--color100);--bg-body-light: var(--color100);--fg-body-light: var(--color800)}.light-theme:root,.light-theme.primary,.light-theme.tone-1,.light-theme.tone-2,.light-theme.tone-3,.light-theme.warn,:root.light-theme :root,:root.light-theme .primary,:root.light-theme .tone-1,:root.light-theme .tone-2,:root.light-theme .tone-3,:root.light-theme .warn{--lightness-resolved: calc(var(--lightness) + var(--lightness-light-shift, 0));--chroma-resolved: calc(var(--chroma) + var(--chroma-light-shift, 0));--bg-body: var(--bg-body-light);--fg-body: var(--fg-body-light)}:root,.primary,.tone-1,.tone-2,.tone-3,.warn{--panel-bg: oklch(var(--500) / 0.1);--100: 0.91 0.05 var(--hue);--500: calc(var(--lightness-resolved) + 0.15) calc(var(--chroma-resolved) + 0.06) var(--hue);--600: calc(var(--lightness-resolved) + 0.1) calc(var(--chroma-resolved) + 0.04) var(--hue);--700: calc(var(--lightness-resolved) + 0.05) calc(var(--chroma-resolved) + 0.02) var(--hue);--800: var(--lightness-resolved) var(--chroma-resolved) var(--hue);--950: 0.18 0.03 var(--hue);--color100: oklch(var(--100));--color500: oklch(var(--500));--color600: oklch(var(--600));--color700: oklch(var(--700));--color800: oklch(var(--800));--color950: oklch(var(--950))}*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0}h1,h2,h3,h4,h5,h6,p,pre{font-size:inherit;font-weight:inherit;margin:0}a{color:inherit;text-decoration:inherit}button,input,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:rgba(0,0,0,0);background-image:none}button,[role=button]{cursor:pointer}:disabled{cursor:default}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}ol,ul,menu{list-style:none;margin:0;padding:0}:root{--font-family: "Open Sans", sans-serif;--font-size: 16px;--spacing-xs: 2px;--spacing-sm: 6px;--spacing: 10px;--spacing-lg: 14px;--border-width-sm: 1px;--border-width: 2px;--box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4)}@media screen and (min-width: 640px){:root{--font-size: 14px}}:root.light-theme{--box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.4)}.scaled,:root{--text-xs: calc(0.75rem * var(--scale, 1));--text-sm: calc(0.85rem * var(--scale, 1));--text-base: calc(1rem * var(--scale, 1));--text-lg: calc(1.2rem * var(--scale, 1));--text-xl: calc(1.4rem * var(--scale, 1));--text-2xl: calc(1.6rem * var(--scale, 1));--text-3xl: calc(1.8rem * var(--scale, 1));--padding-xs: calc(0.15rem * var(--scale, 1));--padding-sm: calc(0.4rem * var(--scale, 1));--padding: calc(0.75rem * var(--scale, 1));--padding-lg: calc(1rem * var(--scale, 1));--border-radius: calc(0.3rem * var(--scale, 1));--command-min-size: calc(3rem * var(--scale, 1));--command-min-size-thin: calc(2rem * var(--scale, 1));--compound-spacer-min-size: calc(1rem * var(--scale, 1));--corner-size: calc(1rem * var(--scale, 1));--corner-small-size: calc(0.75rem * var(--scale, 1))}.panel>article::-webkit-scrollbar,.tile>article::-webkit-scrollbar,body::-webkit-scrollbar{width:var(--spacing-sm);background:rgba(0,0,0,0)}.panel>article::-webkit-scrollbar-thumb,.tile>article::-webkit-scrollbar-thumb,body::-webkit-scrollbar-thumb{min-width:1rem;border-style:solid;border-color:rgba(0,0,0,0);border-width:var(--spacing-sm);background:var(--color700);box-sizing:border-box;background-clip:border-box}html{font-family:var(--font-family);font-weight:400;font-size:var(--font-size)}body{font-size:var(--text-base);padding:var(--padding);background:var(--bg-body);color:var(--fg-body);transition:background-color .15s ease-in-out}h1,h2,h3,h4,.panel>header,.tile>header{font-weight:300;text-shadow:0 0 4px oklch(var(--400)/0.5);color:var(--fg-body)}h1{font-size:var(--text-3xl)}h2{font-size:var(--text-2xl)}h3{font-size:var(--text-xl)}h4{font-size:var(--text-lg)}.command{background-color:var(--color800);box-shadow:var(--box-shadow);display:grid;align-items:end;justify-items:end;text-align:end;border-style:solid;border-color:rgba(0,0,0,0);border-width:var(--border-width);padding:var(--padding-xs) var(--padding-sm);min-height:var(--command-min-size);min-width:var(--command-min-size);border-radius:var(--border-radius);overflow:hidden;outline:none;color:var(--command-fg, var(--color100));font-family:inherit;font-size:var(--text-base);cursor:pointer;user-select:none;vertical-align:middle;transition:border-color .15s ease-in-out,background-color .15s ease-in-out}.command.thin{min-height:var(--command-min-size-thin);min-width:var(--command-min-size-thin)}.command.flash{animation:flash-background 1s ease-in-out infinite}.command[data-label][data-abbr]::after{content:attr(data-abbr)}@media(min-width: 640px){.command[data-label][data-abbr]::after{content:attr(data-label)}}.command:disabled{opacity:.7;cursor:default;pointer-events:none;background:#6d6d6d;color:#ededed}.command.outline{background-color:rgba(0,0,0,0);border-color:var(--color700);color:var(--fg-body)}.command.outline.flash{animation-name:flash-border}.command.outline:disabled{background:rgba(0,0,0,0);border-color:#6d6d6d;color:#6d6d6d}.command.outline:active{color:var(--command-fg, var(--color100))}.command:focus{border-color:var(--color500)}.command:active{border-color:var(--color500);background-color:var(--color500);animation-play-state:paused}.compound-commands{display:inline-flex;gap:var(--spacing-sm)}.compound-commands>.flex{flex:1}.compound-commands>.spacer{background-color:var(--color800);box-shadow:var(--box-shadow);min-width:var(--compound-spacer-min-size);min-height:var(--compound-spacer-min-size)}.compound-commands>.spacer.outline{background-color:rgba(0,0,0,0);border:var(--border-width) solid var(--color700)}.compound-commands>.text{font-size:var(--text-3xl);line-height:var(--text-3xl);align-self:center;padding:var(--padding-xs)}.compound-commands>.command:first-child,.compound-commands .spacer:first-child{border-radius:var(--border-radius) 0 0 var(--border-radius)}.compound-commands>.command:not(:first-child):not(:last-child),.compound-commands .spacer:not(:first-child):not(:last-child){border-radius:0}.compound-commands>.command:last-child,.compound-commands .spacer:last-child{border-radius:0 var(--border-radius) var(--border-radius) 0}.compound-commands.thin>.command{min-height:var(--command-min-size-thin);min-width:var(--command-min-size-thin)}.compound-commands.vertical{flex-direction:column}.compound-commands.vertical>.text{justify-self:center}.compound-commands.vertical>.command:first-child,.compound-commands.vertical .spacer:first-child{border-radius:var(--border-radius) var(--border-radius) 0 0}.compound-commands.vertical>.command:last-child,.compound-commands.vertical .spacer:last-child{border-radius:0 0 var(--border-radius) var(--border-radius)}@keyframes flash-background{50%{background-color:var(--color600)}}@keyframes flash-border{50%{border-color:var(--color500)}}.input{border-radius:var(--border-radius);box-shadow:var(--box-shadow);outline:none;border:var(--border-width) solid var(--color600);color:var(--fg-body);font-family:inherit;background-color:rgba(0,0,0,0);transition:border-color .15s ease-in-out;padding:var(--padding);font-size:var(--text-base)}.input:focus{border:var(--border-width) solid var(--color500)}.input:disabled{opacity:.4;filter:saturate(0.6);cursor:default;pointer-events:none}.panel>footer::after,.tile>footer::after,.panel>footer::before,.tile>footer::before,.panel>header::after,.tile>header::after,.panel>header::before,.tile>header::before{content:"";border-style:solid;border-color:var(--color700);position:absolute;height:var(--corner-size);width:var(--corner-size);z-index:2;--thickness: var(--border-width)}.tile>footer::after,.tile>footer::before,.tile>header::after,.tile>header::before{height:var(--corner-small-size);width:var(--corner-small-size);border-color:var(--color600);--thickness: var(--border-width-sm)}.panel,.tile{background:var(--panel-bg);box-shadow:var(--box-shadow);border-radius:var(--border-radius);display:grid;grid-template-rows:auto 1fr auto;overflow:auto}.panel>header,.tile>header{position:relative;font-size:var(--text-2xl);padding:var(--padding-sm) var(--padding)}.panel>header:empty,.tile>header:empty{padding:0}.panel>header::before,.tile>header::before{border-width:var(--thickness) 0 0 var(--thickness);border-radius:var(--border-radius) 0 0 0;left:0;top:0}.panel>header::after,.tile>header::after{border-width:var(--thickness) var(--thickness) 0 0;border-radius:0 var(--border-radius) 0 0;right:0;top:0}.panel>article,.tile>article{z-index:1;padding:var(--padding);overflow:auto;font-size:var(--text-base)}.panel>footer,.tile>footer{position:relative;padding:var(--padding-sm) var(--padding);font-size:var(--text-sm);text-align:right}.panel>footer:empty,.tile>footer:empty{padding:0}.panel>footer::before,.tile>footer::before{border-width:0 0 var(--thickness) var(--thickness);border-radius:0 0 0 var(--border-radius);left:0;bottom:0}.panel>footer::after,.tile>footer::after{border-width:0 var(--thickness) var(--thickness) 0;border-radius:0 0 var(--border-radius) 0;right:0;bottom:0}.tile{background:oklch(var(--800)/0.75);color:var(--tile-fg, var(--fg-body))}.tile>header{font-size:var(--text-lg)}.tile>footer{font-size:var(--text-xs)}.spinner{display:inline-grid;justify-items:center;align-items:center;width:1em;height:1em;position:relative;box-sizing:border-box;animation:6s .5s rotate ease-in-out alternate infinite}.spinner::before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-style:solid;border-width:.05em;border-radius:50%;border-color:var(--color700) rgba(0,0,0,0);animation:4s .5s inset1 ease-in-out infinite;box-shadow:0px 12px 10px -12px rgba(0,0,0,.4),0px -12px 10px -12px rgba(0,0,0,.4)}.spinner::after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-style:solid;border-width:.05em;border-radius:50%;border-color:rgba(0,0,0,0) var(--color500);animation:4s .5s inset2 ease-in-out infinite;box-shadow:12px 0px 10px -12px rgba(0,0,0,.4),-12px 0px 10px -12px rgba(0,0,0,.4)}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes inset1{0%{top:0;left:0;right:0;bottom:0;transform:rotate(0)}12.5%{top:.2em;left:.2em;right:.2em;bottom:.2em;transform:rotate(0)}37.5%{top:.2em;left:.2em;right:.2em;bottom:.2em;transform:rotate(180deg)}50%{top:0;left:0;right:0;bottom:0;transform:rotate(180deg)}100%{top:0;left:0;right:0;bottom:0;transform:rotate(180deg)}}@keyframes inset2{0%{top:0;left:0;right:0;bottom:0;transform:rotate(0)}50%{top:0;left:0;right:0;bottom:0;transform:rotate(0)}62.5%{top:.2em;left:.2em;right:.2em;bottom:.2em;transform:rotate(0)}87.5%{top:.2em;left:.2em;right:.2em;bottom:.2em;transform:rotate(180deg)}100%{top:0;left:0;right:0;bottom:0;transform:rotate(180deg)}}
|
|
1
|
+
:root,.primary{--hue: var(--base-hue)}.tone-1{--hue: calc(var(--base-hue) - 26)}.tone-2{--hue: calc(var(--base-hue) - 51)}.tone-3{--hue: calc(var(--base-hue) - 76)}.warn{--hue: 29}:root,.primary,.tone-1,.tone-2,.tone-3,.warn{--lightness-resolved: var(--lightness);--chroma-resolved: var(--chroma);--bg-body: var(--color950);--fg-body: var(--color100);--bg-body-light: var(--color100);--fg-body-light: var(--color800)}.light-theme:root,.light-theme.primary,.light-theme.tone-1,.light-theme.tone-2,.light-theme.tone-3,.light-theme.warn,:root.light-theme :root,:root.light-theme .primary,:root.light-theme .tone-1,:root.light-theme .tone-2,:root.light-theme .tone-3,:root.light-theme .warn{--lightness-resolved: calc(var(--lightness) + var(--lightness-light-shift, 0));--chroma-resolved: calc(var(--chroma) + var(--chroma-light-shift, 0));--bg-body: var(--bg-body-light);--fg-body: var(--fg-body-light)}:root,.primary,.tone-1,.tone-2,.tone-3,.warn{--panel-bg: oklch(var(--500) / 0.1);--100: 0.91 0.05 var(--hue);--500: calc(var(--lightness-resolved) + 0.15) calc(var(--chroma-resolved) + 0.06) var(--hue);--600: calc(var(--lightness-resolved) + 0.1) calc(var(--chroma-resolved) + 0.04) var(--hue);--700: calc(var(--lightness-resolved) + 0.05) calc(var(--chroma-resolved) + 0.02) var(--hue);--800: var(--lightness-resolved) var(--chroma-resolved) var(--hue);--950: 0.18 0.03 var(--hue);--color100: oklch(var(--100));--color500: oklch(var(--500));--color600: oklch(var(--600));--color700: oklch(var(--700));--color800: oklch(var(--800));--color950: oklch(var(--950))}*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0}h1,h2,h3,h4,h5,h6,p,pre{font-size:inherit;font-weight:inherit;margin:0}a{color:inherit;text-decoration:inherit}button,input,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:rgba(0,0,0,0);background-image:none}button,[role=button]{cursor:pointer}:disabled{cursor:default}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}ol,ul,menu{list-style:none;margin:0;padding:0}:root{--font-family: "Open Sans", sans-serif;--font-size: 16px;--font-weight-light: 300;--font-weight: 400;--font-weight-bold: 600;--spacing-xs: 2px;--spacing-sm: 6px;--spacing: 10px;--spacing-lg: 14px;--border-width-sm: 1px;--border-width: 2px;--box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4)}@media screen and (min-width: 640px){:root{--font-size: 14px}}:root.light-theme{--box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.4)}.scaled,:root{--text-xs: calc(0.75rem * var(--scale, 1));--text-sm: calc(0.85rem * var(--scale, 1));--text-base: calc(1rem * var(--scale, 1));--text-lg: calc(1.2rem * var(--scale, 1));--text-xl: calc(1.4rem * var(--scale, 1));--text-2xl: calc(1.6rem * var(--scale, 1));--text-3xl: calc(1.8rem * var(--scale, 1));--padding-xs: calc(0.15rem * var(--scale, 1));--padding-sm: calc(0.4rem * var(--scale, 1));--padding: calc(0.75rem * var(--scale, 1));--padding-lg: calc(1rem * var(--scale, 1));--border-radius: calc(0.3rem * var(--scale, 1));--command-min-size: calc(3rem * var(--scale, 1));--command-min-size-thin: calc(2rem * var(--scale, 1));--spacer-min-size: calc(1rem * var(--scale, 1));--corner-size: calc(1rem * var(--scale, 1));--corner-small-size: calc(0.75rem * var(--scale, 1))}.panel>article::-webkit-scrollbar,.tile>article::-webkit-scrollbar,body::-webkit-scrollbar{width:var(--spacing-sm);background:rgba(0,0,0,0)}.panel>article::-webkit-scrollbar-thumb,.tile>article::-webkit-scrollbar-thumb,body::-webkit-scrollbar-thumb{min-width:1rem;border-style:solid;border-color:rgba(0,0,0,0);border-width:var(--spacing-sm);background:var(--color700);box-sizing:border-box;background-clip:border-box}.panel-commands>.spacer,.compound-commands>.spacer{background-color:var(--color800);box-shadow:var(--box-shadow);min-width:var(--spacer-min-size);min-height:var(--spacer-min-size)}.panel-commands>.outline.spacer,.compound-commands>.outline.spacer{background-color:rgba(0,0,0,0);border:var(--border-width) solid var(--color700)}.panel-commands>.command:first-child,.panel-commands .spacer:first-child,.compound-commands>.command:first-child,.compound-commands .spacer:first-child{border-radius:var(--border-radius) 0 0 var(--border-radius)}.panel-commands>.command:not(:first-child):not(:last-child),.panel-commands .spacer:not(:first-child):not(:last-child),.compound-commands>.command:not(:first-child):not(:last-child),.compound-commands .spacer:not(:first-child):not(:last-child){border-radius:0}.panel-commands>.command:last-child,.panel-commands .spacer:last-child,.compound-commands>.command:last-child,.compound-commands .spacer:last-child{border-radius:0 var(--border-radius) var(--border-radius) 0}html{font-family:var(--font-family);font-weight:var(--font-weight);font-size:var(--font-size)}body{font-size:var(--text-base);padding:var(--padding);background:var(--bg-body);color:var(--fg-body);transition:background-color .15s ease-in-out}h1,h2,h3,h4,.panel>header,.tile>header{font-weight:var(--font-weight-light);text-shadow:0 0 4px oklch(var(--400)/0.5);color:var(--fg-body)}h1{font-size:var(--text-3xl)}h2{font-size:var(--text-2xl)}h3{font-size:var(--text-xl)}h4{font-size:var(--text-lg)}.command{background-color:var(--color800);box-shadow:var(--box-shadow);display:grid;align-items:end;justify-items:end;text-align:end;border-style:solid;border-color:rgba(0,0,0,0);border-width:var(--border-width);padding:var(--padding-xs) var(--padding-sm);min-height:var(--command-min-size);min-width:var(--command-min-size);border-radius:var(--border-radius);overflow:hidden;outline:none;color:var(--command-fg, var(--color100));font-family:inherit;font-weight:var(--font-weight);font-size:var(--text-base);cursor:pointer;user-select:none;vertical-align:middle;transition:border-color .15s ease-in-out,background-color .15s ease-in-out}.command.thin{min-height:var(--command-min-size-thin);min-width:var(--command-min-size-thin)}.command.flash{animation:flash-background 1s ease-in-out infinite}.command[data-label][data-abbr]::after{content:attr(data-abbr)}@media(min-width: 640px){.command[data-label][data-abbr]::after{content:attr(data-label)}}.command:disabled{opacity:.7;cursor:default;pointer-events:none;background:#6d6d6d;color:#ededed}.command.outline{background-color:rgba(0,0,0,0);border-color:var(--color700);color:var(--fg-body)}.command.outline.flash{animation-name:flash-border}.command.outline:disabled{background:rgba(0,0,0,0);border-color:#6d6d6d;color:#6d6d6d}.command.outline:active{color:var(--command-fg, var(--color100))}.command:focus{border-color:var(--color500)}.command:active{border-color:var(--color500);background-color:var(--color500);animation-play-state:paused}@keyframes flash-background{50%{background-color:var(--color600)}}@keyframes flash-border{50%{border-color:var(--color500)}}.compound-commands{display:inline-flex;gap:var(--spacing-sm)}.compound-commands>.flex{flex:1}.compound-commands>.text{font-size:var(--text-3xl);line-height:var(--text-3xl);align-self:center;padding:var(--padding-xs)}.compound-commands.thin>.command{min-height:var(--command-min-size-thin);min-width:var(--command-min-size-thin)}.compound-commands.vertical{flex-direction:column}.compound-commands.vertical>.text{justify-self:center}.compound-commands.vertical>.command:first-child,.compound-commands.vertical .spacer:first-child{border-radius:var(--border-radius) var(--border-radius) 0 0}.compound-commands.vertical>.command:last-child,.compound-commands.vertical .spacer:last-child{border-radius:0 0 var(--border-radius) var(--border-radius)}.input{border-radius:var(--border-radius);box-shadow:var(--box-shadow);outline:none;border:var(--border-width) solid var(--color600);color:var(--fg-body);font-family:inherit;background-color:rgba(0,0,0,0);transition:border-color .15s ease-in-out;padding:var(--padding);font-size:var(--text-base)}.input:focus{border:var(--border-width) solid var(--color500)}.input:disabled{opacity:.4;filter:saturate(0.6);cursor:default;pointer-events:none}.panel>footer::after,.tile>footer::after,.panel>footer::before,.tile>footer::before,.panel>header::after,.tile>header::after,.panel>header::before,.tile>header::before{content:"";border-style:solid;border-color:var(--color700);position:absolute;height:var(--corner-size);width:var(--corner-size);z-index:2;--thickness: var(--border-width)}.tile>footer::after,.tile>footer::before,.tile>header::after,.tile>header::before{height:var(--corner-small-size);width:var(--corner-small-size);border-color:var(--color600);--thickness: var(--border-width-sm)}.panel,.tile{background:var(--panel-bg);box-shadow:var(--box-shadow);border-radius:var(--border-radius);display:grid;grid-template-rows:auto 1fr auto;overflow:auto}.panel>header,.tile>header{position:relative;font-size:var(--text-2xl);padding:var(--padding-sm) var(--padding)}.panel>header:empty,.tile>header:empty{padding:0}.panel>header::before,.tile>header::before{border-width:var(--thickness) 0 0 var(--thickness);border-radius:var(--border-radius) 0 0 0;left:0;top:0}.panel>header::after,.tile>header::after{border-width:var(--thickness) var(--thickness) 0 0;border-radius:0 var(--border-radius) 0 0;right:0;top:0}.panel>article,.tile>article{z-index:1;padding:var(--padding);overflow:auto;font-size:var(--text-base)}.panel>footer,.tile>footer{position:relative;padding:var(--padding-sm) var(--padding);font-size:var(--text-sm);text-align:right}.panel>footer:empty,.tile>footer:empty{padding:0}.panel>footer::before,.tile>footer::before{border-width:0 0 var(--thickness) var(--thickness);border-radius:0 0 0 var(--border-radius);left:0;bottom:0}.panel>footer::after,.tile>footer::after{border-width:0 var(--thickness) var(--thickness) 0;border-radius:0 0 var(--border-radius) 0;right:0;bottom:0}.tile{background:oklch(var(--800)/0.75);color:var(--tile-fg, var(--fg-body))}.tile>header{font-size:var(--text-lg)}.tile>footer{font-size:var(--text-xs)}.panel-commands{display:flex;align-items:stretch;gap:var(--spacing-sm);min-height:var(--command-min-size-thin)}.panel-commands>.command{min-width:var(--command-min-size-thin);min-height:var(--command-min-size-thin)}.panel-commands>.flex{flex:1}.panel>header:has(>.panel-commands),.tile>header:has(>.panel-commands),.panel>footer:has(>.panel-commands),.tile>footer:has(>.panel-commands){padding:0}.panel>header:has(>.panel-commands)::before,.tile>header:has(>.panel-commands)::before,.panel>header:has(>.panel-commands)::after,.tile>header:has(>.panel-commands)::after,.panel>footer:has(>.panel-commands)::before,.tile>footer:has(>.panel-commands)::before,.panel>footer:has(>.panel-commands)::after,.tile>footer:has(>.panel-commands)::after{display:none}.panel>footer>.panel-commands>:first-child,.tile>footer>.panel-commands>:first-child{border-radius:0 0 0 var(--border-radius)}.panel>footer>.panel-commands>:last-child,.tile>footer>.panel-commands>:last-child{border-radius:0 0 var(--border-radius) 0}.panel>header>.panel-commands>:first-child,.tile>header>.panel-commands>:first-child{border-radius:var(--border-radius) 0 0 0}.panel>header>.panel-commands>:last-child,.tile>header>.panel-commands>:last-child{border-radius:0 var(--border-radius) 0 0}.spinner{display:inline-grid;justify-items:center;align-items:center;width:1em;height:1em;position:relative;box-sizing:border-box;animation:6s .5s rotate ease-in-out alternate infinite}.spinner::before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-style:solid;border-width:.05em;border-radius:50%;border-color:var(--color700) rgba(0,0,0,0);animation:4s .5s inset1 ease-in-out infinite;box-shadow:0px 12px 10px -12px rgba(0,0,0,.4),0px -12px 10px -12px rgba(0,0,0,.4)}.spinner::after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-style:solid;border-width:.05em;border-radius:50%;border-color:rgba(0,0,0,0) var(--color500);animation:4s .5s inset2 ease-in-out infinite;box-shadow:12px 0px 10px -12px rgba(0,0,0,.4),-12px 0px 10px -12px rgba(0,0,0,.4)}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes inset1{0%{top:0;left:0;right:0;bottom:0;transform:rotate(0)}12.5%{top:.2em;left:.2em;right:.2em;bottom:.2em;transform:rotate(0)}37.5%{top:.2em;left:.2em;right:.2em;bottom:.2em;transform:rotate(180deg)}50%{top:0;left:0;right:0;bottom:0;transform:rotate(180deg)}100%{top:0;left:0;right:0;bottom:0;transform:rotate(180deg)}}@keyframes inset2{0%{top:0;left:0;right:0;bottom:0;transform:rotate(0)}50%{top:0;left:0;right:0;bottom:0;transform:rotate(0)}62.5%{top:.2em;left:.2em;right:.2em;bottom:.2em;transform:rotate(0)}87.5%{top:.2em;left:.2em;right:.2em;bottom:.2em;transform:rotate(180deg)}100%{top:0;left:0;right:0;bottom:0;transform:rotate(180deg)}}
|
package/index.html
CHANGED
|
@@ -405,6 +405,33 @@
|
|
|
405
405
|
<article>Content</article>
|
|
406
406
|
<footer>Footer</footer>
|
|
407
407
|
</div>
|
|
408
|
+
<h3>With Commands</h3>
|
|
409
|
+
<h4>Docked in the Footer</h4>
|
|
410
|
+
<div class="panel">
|
|
411
|
+
<header>Header</header>
|
|
412
|
+
<article>Content</article>
|
|
413
|
+
<footer>
|
|
414
|
+
<div class="panel-commands">
|
|
415
|
+
<div class="spacer"></div>
|
|
416
|
+
<div class="spacer flex"></div>
|
|
417
|
+
<button class="command">Command</button>
|
|
418
|
+
<div class="spacer"></div>
|
|
419
|
+
</div>
|
|
420
|
+
</footer>
|
|
421
|
+
</div>
|
|
422
|
+
<h4>Docked in the Header</h4>
|
|
423
|
+
<div class="panel">
|
|
424
|
+
<header>
|
|
425
|
+
<div class="panel-commands">
|
|
426
|
+
<div class="spacer"></div>
|
|
427
|
+
<button class="command">Command</button>
|
|
428
|
+
<div class="spacer flex"></div>
|
|
429
|
+
<div class="spacer"></div>
|
|
430
|
+
</div>
|
|
431
|
+
</header>
|
|
432
|
+
<article>Content</article>
|
|
433
|
+
<footer>Footer</footer>
|
|
434
|
+
</div>
|
|
408
435
|
<h3>Stacking</h3>
|
|
409
436
|
<p>
|
|
410
437
|
The panel has a translucent background, so when stacking multiple
|
package/package.json
CHANGED
package/scss/_command.scss
CHANGED
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
// orange — set a dark --command-fg so labels stay legible (WCAG AA).
|
|
20
20
|
color: var(--command-fg, var(--color100));
|
|
21
21
|
font-family: inherit;
|
|
22
|
+
// pin the weight: buttons inherit font-weight (reset), so a command docked in
|
|
23
|
+
// a panel header would otherwise pick up the header's 300 and look lighter
|
|
24
|
+
// than the same command in a footer
|
|
25
|
+
font-weight: var(--font-weight);
|
|
22
26
|
font-size: var(--text-base);
|
|
23
27
|
cursor: pointer;
|
|
24
28
|
user-select: none;
|
|
@@ -84,73 +88,6 @@
|
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
90
|
|
|
87
|
-
.compound-commands {
|
|
88
|
-
display: inline-flex;
|
|
89
|
-
gap: var(--spacing-sm);
|
|
90
|
-
|
|
91
|
-
> .flex {
|
|
92
|
-
flex: 1;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
> .spacer {
|
|
96
|
-
background-color: var(--color800);
|
|
97
|
-
box-shadow: var(--box-shadow);
|
|
98
|
-
min-width: var(--compound-spacer-min-size);
|
|
99
|
-
min-height: var(--compound-spacer-min-size);
|
|
100
|
-
|
|
101
|
-
&.outline {
|
|
102
|
-
background-color: transparent;
|
|
103
|
-
border: var(--border-width) solid var(--color700);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
> .text {
|
|
108
|
-
font-size: var(--text-3xl);
|
|
109
|
-
line-height: var(--text-3xl);
|
|
110
|
-
align-self: center;
|
|
111
|
-
padding: var(--padding-xs);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
> .command,
|
|
115
|
-
.spacer {
|
|
116
|
-
&:first-child {
|
|
117
|
-
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
&:not(:first-child):not(:last-child) {
|
|
121
|
-
border-radius: 0;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&:last-child {
|
|
125
|
-
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&.thin > .command {
|
|
130
|
-
min-height: var(--command-min-size-thin);
|
|
131
|
-
min-width: var(--command-min-size-thin);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&.vertical {
|
|
135
|
-
flex-direction: column;
|
|
136
|
-
|
|
137
|
-
> .text {
|
|
138
|
-
justify-self: center;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
> .command,
|
|
142
|
-
.spacer {
|
|
143
|
-
&:first-child {
|
|
144
|
-
border-radius: var(--border-radius) var(--border-radius) 0 0;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&:last-child {
|
|
148
|
-
border-radius: 0 0 var(--border-radius) var(--border-radius);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
91
|
@keyframes flash-background {
|
|
155
92
|
50% {
|
|
156
93
|
background-color: var(--color600);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.compound-commands {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
gap: var(--spacing-sm);
|
|
4
|
+
|
|
5
|
+
> .flex {
|
|
6
|
+
flex: 1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
> .spacer {
|
|
10
|
+
@extend %spacer;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
> .text {
|
|
14
|
+
font-size: var(--text-3xl);
|
|
15
|
+
line-height: var(--text-3xl);
|
|
16
|
+
align-self: center;
|
|
17
|
+
padding: var(--padding-xs);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
> .command,
|
|
21
|
+
.spacer {
|
|
22
|
+
@extend %bar-segment;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.thin > .command {
|
|
26
|
+
min-height: var(--command-min-size-thin);
|
|
27
|
+
min-width: var(--command-min-size-thin);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.vertical {
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
|
|
33
|
+
> .text {
|
|
34
|
+
justify-self: center;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
> .command,
|
|
38
|
+
.spacer {
|
|
39
|
+
&:first-child {
|
|
40
|
+
border-radius: var(--border-radius) var(--border-radius) 0 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:last-child {
|
|
44
|
+
border-radius: 0 0 var(--border-radius) var(--border-radius);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
package/scss/_global.scss
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
:root {
|
|
6
6
|
--font-family: "Open Sans", sans-serif;
|
|
7
7
|
--font-size: 16px;
|
|
8
|
+
--font-weight-light: 300;
|
|
9
|
+
--font-weight: 400;
|
|
10
|
+
--font-weight-bold: 600;
|
|
8
11
|
|
|
9
12
|
--spacing-xs: 2px;
|
|
10
13
|
--spacing-sm: 6px;
|
|
@@ -45,7 +48,7 @@
|
|
|
45
48
|
|
|
46
49
|
--command-min-size: #{scalable(3rem)};
|
|
47
50
|
--command-min-size-thin: #{scalable(2rem)};
|
|
48
|
-
--
|
|
51
|
+
--spacer-min-size: #{scalable(1rem)};
|
|
49
52
|
|
|
50
53
|
--corner-size: #{scalable(1rem)};
|
|
51
54
|
--corner-small-size: #{scalable(0.75rem)};
|
|
@@ -67,9 +70,33 @@
|
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
72
|
|
|
73
|
+
%spacer {
|
|
74
|
+
background-color: var(--color800);
|
|
75
|
+
box-shadow: var(--box-shadow);
|
|
76
|
+
min-width: var(--spacer-min-size);
|
|
77
|
+
min-height: var(--spacer-min-size);
|
|
78
|
+
|
|
79
|
+
&.outline {
|
|
80
|
+
background-color: transparent;
|
|
81
|
+
border: var(--border-width) solid var(--color700);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
%bar-segment {
|
|
86
|
+
&:first-child {
|
|
87
|
+
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
|
88
|
+
}
|
|
89
|
+
&:not(:first-child):not(:last-child) {
|
|
90
|
+
border-radius: 0;
|
|
91
|
+
}
|
|
92
|
+
&:last-child {
|
|
93
|
+
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
70
97
|
html {
|
|
71
98
|
font-family: var(--font-family);
|
|
72
|
-
font-weight:
|
|
99
|
+
font-weight: var(--font-weight);
|
|
73
100
|
font-size: var(--font-size);
|
|
74
101
|
}
|
|
75
102
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.panel-commands {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: stretch;
|
|
4
|
+
gap: var(--spacing-sm);
|
|
5
|
+
min-height: var(--command-min-size-thin);
|
|
6
|
+
|
|
7
|
+
> .command {
|
|
8
|
+
min-width: var(--command-min-size-thin);
|
|
9
|
+
min-height: var(--command-min-size-thin);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
> .spacer {
|
|
13
|
+
@extend %spacer;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
> .flex {
|
|
17
|
+
flex: 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
> .command,
|
|
21
|
+
.spacer {
|
|
22
|
+
@extend %bar-segment;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.panel > header:has(> .panel-commands),
|
|
27
|
+
.panel > footer:has(> .panel-commands) {
|
|
28
|
+
padding: 0;
|
|
29
|
+
|
|
30
|
+
&::before,
|
|
31
|
+
&::after {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.panel > footer > .panel-commands {
|
|
37
|
+
> :first-child {
|
|
38
|
+
border-radius: 0 0 0 var(--border-radius);
|
|
39
|
+
}
|
|
40
|
+
> :last-child {
|
|
41
|
+
border-radius: 0 0 var(--border-radius) 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
.panel > header > .panel-commands {
|
|
45
|
+
> :first-child {
|
|
46
|
+
border-radius: var(--border-radius) 0 0 0;
|
|
47
|
+
}
|
|
48
|
+
> :last-child {
|
|
49
|
+
border-radius: 0 var(--border-radius) 0 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
package/scss/_typography.scss
CHANGED
package/scss/ada.scss
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# SCSS restructure — `@import` → `@use`
|
|
2
|
+
|
|
3
|
+
## Option A — minimal
|
|
4
|
+
|
|
5
|
+
Add a `@use` to each partial that extends a cross-file placeholder:
|
|
6
|
+
|
|
7
|
+
- `_command.scss` → `@use "global";`
|
|
8
|
+
- `_panel-commands.scss` → `@use "global";`
|
|
9
|
+
- `_panel.scss` → `@use "typography";` + `@use "global";`
|
|
10
|
+
|
|
11
|
+
Smallest diff, but the shared spine stays scattered.
|
|
12
|
+
|
|
13
|
+
## Option B — abstracts module (preferred)
|
|
14
|
+
|
|
15
|
+
Move the shared placeholders + `scalable()` into a dedicated `_abstracts.scss`
|
|
16
|
+
that emits no CSS of its own; every consumer `@use`s it.
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
scss/
|
|
20
|
+
_abstracts.scss // %spacer, %bar-segment, %scrollbar, %header, scalable(), tokens
|
|
21
|
+
_global.scss // @use "abstracts"
|
|
22
|
+
_typography.scss // @use "abstracts"
|
|
23
|
+
_command.scss // @use "abstracts"
|
|
24
|
+
_panel.scss // @use "abstracts"
|
|
25
|
+
_panel-commands.scss // @use "abstracts"
|
|
26
|
+
ada.scss // @use each partial
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
One explicit shared module; each partial declares its own deps. Keep
|
|
30
|
+
intra-file-only placeholders (`%corner-base`, `%ladder`) where they are.
|