From f859ad5210c0eaa8b1ea2dfddd08d749990adef1 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 23 Apr 2021 10:48:19 +0100 Subject: [PATCH] Update lots of font sizes, padding and other UI improvements --- packages/bbui/src/Button/Button.svelte | 12 +- .../src/DetailSummary/DetailSummary.svelte | 5 +- packages/bbui/src/Modal/Modal.svelte | 3 + packages/bbui/src/Popover/Popover.svelte | 6 + packages/bbui/src/Table/Table.svelte | 4 +- packages/bbui/src/Tabs/Tab.svelte | 64 +++++---- packages/bbui/src/Tabs/Tabs.svelte | 123 ++++++++++-------- packages/bbui/src/bbui.css | 63 +-------- .../AutomationPanel/AutomationPanel.svelte | 4 +- .../popovers/CreateViewPopover.svelte | 6 +- .../DataTable/popovers/ExportPopover.svelte | 5 +- .../popovers/ManageAccessPopover.svelte | 20 ++- .../TableNavigator/TableDataImport.svelte | 2 +- .../common/Dropdowns/DropdownItem.svelte | 2 +- .../src/components/common/NavItem.svelte | 2 +- .../AppPreview/ComponentSelectionList.svelte | 4 +- .../FrontendNavigatePane.svelte | 23 +--- .../PropertiesPanel/PropertiesPanel.svelte | 34 ++--- .../FlatButtonGroup/FlatButton.svelte | 2 +- .../PropertiesPanel/SettingsView.svelte | 4 +- .../src/components/start/AppCard.svelte | 8 +- .../src/components/start/AppList.svelte | 11 +- packages/builder/src/global.css | 6 +- .../[application]/automate/_layout.svelte | 2 + .../builder/[application]/data/_layout.svelte | 6 +- 25 files changed, 191 insertions(+), 230 deletions(-) diff --git a/packages/bbui/src/Button/Button.svelte b/packages/bbui/src/Button/Button.svelte index 4023653d2b..83128c4f16 100644 --- a/packages/bbui/src/Button/Button.svelte +++ b/packages/bbui/src/Button/Button.svelte @@ -3,11 +3,11 @@ export let disabled = false export let size = "M" - export let cta = false; - export let primary = false; - export let secondary = false; + export let cta = false + export let primary = false + export let secondary = false export let warning = false - export let overBackground = false; + export let overBackground = false export let quiet = false export let icon = undefined export let active = false @@ -44,8 +44,4 @@ overflow: hidden; text-overflow: ellipsis; } - - button.active { - color: var(--spectrum-semantic-cta-color-background-default); - } diff --git a/packages/bbui/src/DetailSummary/DetailSummary.svelte b/packages/bbui/src/DetailSummary/DetailSummary.svelte index 84a4d9613a..3ff8462776 100644 --- a/packages/bbui/src/DetailSummary/DetailSummary.svelte +++ b/packages/bbui/src/DetailSummary/DetailSummary.svelte @@ -1,5 +1,5 @@ -
$selected = {...$selected, title, info: tab.getBoundingClientRect()} } class:is-selected={$selected.title === title} class="spectrum-Tabs-item" tabindex="0"> - {#if icon} - - {/if} - {title} +
($selected = { ...$selected, title, info: tab.getBoundingClientRect() })} + class:is-selected={$selected.title === title} + class="spectrum-Tabs-item" + tabindex="0"> + {#if icon} + + {/if} + {title}
{#if $selected.title === title} - - - -{/if} \ No newline at end of file + + + +{/if} diff --git a/packages/bbui/src/Tabs/Tabs.svelte b/packages/bbui/src/Tabs/Tabs.svelte index 10617a6a5a..3accd87e8f 100644 --- a/packages/bbui/src/Tabs/Tabs.svelte +++ b/packages/bbui/src/Tabs/Tabs.svelte @@ -1,71 +1,82 @@ -
- -
+ +
+ + {#if $tab.info} +
+ {/if}
\ No newline at end of file + .spectrum-Tabs { + padding-left: var(--spacing-xl); + padding-right: var(--spacing-xl); + } + .spectrum-Tabs-content { + margin-top: var(--spectrum-global-dimension-static-size-150); + } + .indicator-transition { + transition: all 200ms; + } + diff --git a/packages/bbui/src/bbui.css b/packages/bbui/src/bbui.css index 01d5c80f1b..de758ec7fa 100644 --- a/packages/bbui/src/bbui.css +++ b/packages/bbui/src/bbui.css @@ -45,7 +45,7 @@ --font-bold: "Inter Bold"; --font-medium: "Inter Medium"; --font-light: "Inter Light"; - --font-sans: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, "Inter", + --font-sans: Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, "Inter", "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-serif: "Georgia", Cambria, Times New Roman, Times, serif; @@ -96,67 +96,6 @@ --border-transparent: 2px transparent solid; } -h1 { - font-size: 3rem; - font-weight: 700; - text-rendering: var(--text-render); - -webkit-font-smoothing: var(--text-smooth); - color: var(--ink); -} - -h2 { - font-size: 2.25rem; - font-weight: 600; - text-rendering: var(--text-render); - -webkit-font-smoothing: var(--text-smooth); - color: var(--ink); -} - -h3 { - font-size: 1.7rem; - font-weight: 600; - text-rendering: var(--text-render); - -webkit-font-smoothing: var(--text-smooth); - color: var(--ink); -} - -h4 { - font-size: var(--font-size-xl); - font-weight: 500; - text-rendering: var(--text-render); - -webkit-font-smoothing: var(--text-smooth); - color: var(--ink); -} - -h5 { - font-size: var(--font-size-l); - font-weight: 500; - text-rendering: var(--text-render); - -webkit-font-smoothing: var(--text-smooth); - color: var(--ink); -} - -h6 { - font-size: var(--font-size-m); - font-weight: 500; - text-rendering: var(--text-render); - -webkit-font-smoothing: var(--text-smooth); - color: var(--ink); -} - -p { - font-size: var(--font-size); - font-family: var(--font-sans); - font-weight: 400; - text-rendering: var(--text-render); - -webkit-font-smoothing: var(--text-smooth); - color: var(--ink); -} - a { text-decoration: none; -} - -.spectrum { - --spectrum-alias-body-text-font-family: "Inter", sans-serif; } \ No newline at end of file diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte index 2dcb7ab211..159faff576 100644 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte @@ -24,14 +24,14 @@ diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte index 9b33e04056..3d0209b4d3 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte @@ -1,7 +1,7 @@
- {name} + {name}
diff --git a/packages/builder/src/components/start/AppList.svelte b/packages/builder/src/components/start/AppList.svelte index 66cd14a6eb..0715fa0302 100644 --- a/packages/builder/src/components/start/AppList.svelte +++ b/packages/builder/src/components/start/AppList.svelte @@ -19,8 +19,8 @@
- Your Apps - + Your Apps + {#await promise}
@@ -37,11 +37,14 @@
diff --git a/packages/builder/src/global.css b/packages/builder/src/global.css index 185e6e2e8b..28490782aa 100644 --- a/packages/builder/src/global.css +++ b/packages/builder/src/global.css @@ -6,6 +6,10 @@ html, body { min-height: 100%; } +.spectrum--light { + --spectrum-alias-background-color-primary: var(--spectrum-global-color-gray-75); +} + body { --background: var(--spectrum-alias-background-color-primary); --background-alt: var(--spectrum-alias-background-color-secondary); @@ -24,7 +28,7 @@ body { font-family: var(--font-sans); color: var(--ink); - background-color: var(--background); + background-color: var(--background-alt); } #app { diff --git a/packages/builder/src/pages/builder/[application]/automate/_layout.svelte b/packages/builder/src/pages/builder/[application]/automate/_layout.svelte index 968d5ec251..922631a582 100644 --- a/packages/builder/src/pages/builder/[application]/automate/_layout.svelte +++ b/packages/builder/src/pages/builder/[application]/automate/_layout.svelte @@ -33,6 +33,7 @@ justify-content: flex-start; align-items: stretch; border-right: var(--border-light); + background-color: var(--background); } .content { @@ -54,5 +55,6 @@ justify-content: flex-start; align-items: stretch; gap: var(--spacing-l); + background-color: var(--background); } diff --git a/packages/builder/src/pages/builder/[application]/data/_layout.svelte b/packages/builder/src/pages/builder/[application]/data/_layout.svelte index 5256c42b3b..eb54110b4f 100644 --- a/packages/builder/src/pages/builder/[application]/data/_layout.svelte +++ b/packages/builder/src/pages/builder/[application]/data/_layout.svelte @@ -69,7 +69,6 @@ height: calc(100vh - 60px); display: grid; grid-template-columns: 260px minmax(0, 1fr); - background: var(--grey-2); } .content { @@ -81,13 +80,12 @@ justify-content: flex-start; align-items: stretch; gap: var(--spacing-l); - background: var(--background); } .content :global(> span) { display: contents; } .tab-content-padding { - padding: 0 var(--spacing-s); + padding: 0 var(--spacing-xl); } .nav { @@ -105,7 +103,7 @@ font-size: 20px; position: absolute; top: var(--spacing-l); - right: var(--spacing-l); + right: var(--spacing-xl); } i:hover {