diff --git a/models/lead/src/index.ts b/models/lead/src/index.ts index 384c09ace1..0c35675676 100644 --- a/models/lead/src/index.ts +++ b/models/lead/src/index.ts @@ -342,7 +342,7 @@ export function createModel (builder: Builder): void { size: 'small', kind: 'list' }, - displayProps: { optional: true } + displayProps: { compression: true } }, { key: 'modifiedOn', displayProps: { key: 'modified', fixed: 'right', dividerBefore: true } }, { diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index 86b656baeb..75e3b6e6a8 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -723,7 +723,7 @@ export function createModel (builder: Builder): void { size: 'small', kind: 'list' }, - displayProps: { optional: true } + displayProps: { compression: true } }, { key: 'modifiedOn', displayProps: { key: 'modified', fixed: 'right', dividerBefore: true } }, { diff --git a/models/tracker/src/index.ts b/models/tracker/src/index.ts index 5494a020bc..fe1f970b20 100644 --- a/models/tracker/src/index.ts +++ b/models/tracker/src/index.ts @@ -486,7 +486,7 @@ export function createModel (builder: Builder): void { { key: 'labels', presenter: tags.component.LabelsPresenter, - displayProps: { optional: true }, + displayProps: { compression: true }, props: { kind: 'list', full: false } }, { @@ -501,8 +501,7 @@ export function createModel (builder: Builder): void { displayProps: { key: 'milestone', excludeByKey: 'milestone', - compression: true, - optional: true + compression: true } }, { @@ -517,15 +516,14 @@ export function createModel (builder: Builder): void { displayProps: { key: 'component', excludeByKey: 'component', - compression: true, - optional: true + compression: true } }, { key: '', label: tracker.string.DueDate, presenter: tracker.component.DueDatePresenter, - displayProps: { key: 'dueDate', optional: true }, + displayProps: { key: 'dueDate', compression: true }, props: { kind: 'list' } }, { @@ -533,7 +531,7 @@ export function createModel (builder: Builder): void { label: tracker.string.Estimation, presenter: tracker.component.EstimationEditor, props: { kind: 'list', size: 'small' }, - displayProps: { key: 'estimation', fixed: 'left', dividerBefore: true } + displayProps: { key: 'estimation', fixed: 'left', dividerBefore: true, optional: true } }, { key: 'modifiedOn', @@ -633,21 +631,21 @@ export function createModel (builder: Builder): void { }, displayProps: { excludeByKey: 'milestone', - compression: true, - optional: true + compression: true } }, { key: '', label: tracker.string.DueDate, presenter: tracker.component.DueDatePresenter, - displayProps: { key: 'dueDate', optional: true }, + displayProps: { key: 'dueDate', compression: true }, props: { kind: 'list', size: 'small' } }, { key: '', label: tracker.string.Estimation, presenter: tracker.component.EstimationEditor, + displayProps: { optional: true }, props: { kind: 'list', size: 'small' } }, { @@ -703,7 +701,7 @@ export function createModel (builder: Builder): void { size: 'small', shouldShowPlaceholder: false }, - displayProps: { key: 'component', compression: true, optional: true } + displayProps: { key: 'component', compression: true } }, { key: '', @@ -714,7 +712,7 @@ export function createModel (builder: Builder): void { size: 'small', shouldShowPlaceholder: false }, - displayProps: { key: 'milestone', compression: true, optional: true } + displayProps: { key: 'milestone', compression: true } }, { key: '', @@ -724,7 +722,7 @@ export function createModel (builder: Builder): void { kind: 'list', size: 'small' }, - displayProps: { key: 'estimation', optional: true } + displayProps: { key: 'estimation', compression: true } }, { key: '', displayProps: { grow: true } }, { diff --git a/packages/text-editor/src/components/StyleButton.svelte b/packages/text-editor/src/components/StyleButton.svelte index 590877c1c7..9495a53873 100644 --- a/packages/text-editor/src/components/StyleButton.svelte +++ b/packages/text-editor/src/components/StyleButton.svelte @@ -50,7 +50,7 @@ } &:focus { color: var(--theme-caption-color); - box-shadow: 0 0 0 2px var(--accented-button-focused-border); + box-shadow: 0 0 0 2px var(--accented-button-outline); } &.selected { background-color: var(--theme-button-pressed); diff --git a/packages/theme/styles/_colors.scss b/packages/theme/styles/_colors.scss index 2724ada939..3b1f2a8af5 100644 --- a/packages/theme/styles/_colors.scss +++ b/packages/theme/styles/_colors.scss @@ -16,27 +16,27 @@ /* Common Colors */ * { --accented-button-color: #fff; + --accented-button-content-color: rgba(255, 255, 255, .8); --accented-button-border: rgba(255, 255, 255, .09); - --accented-button-focused-border: #fff; --accented-button-outline: #5190EC; --accented-button-transparent: rgba(43, 81, 144, 0.2); --accented-button-default: #2B5190; --accented-button-hovered: #325FA9; --accented-button-pressed: #284B86; - --accented-button-focused: #284B86; + --accented-button-focused: #2B5190; --brand-button-default: #4169E1; --brand-button-hovered: #587BE5; --brand-button-pressed: #2C58DE; - --brand-button-focused: #2C58DE; + --brand-button-focused: #4169E1; --positive-button-default: #26A869; --positive-button-hovered: #2BBB75; --positive-button-pressed: #21915B; - --positive-button-focused: #21915B; + --positive-button-focused: #26A869; --negative-button-default: #CA4242; --negative-button-hovered: #D05858; --negative-button-pressed: #BF3636; - --negative-button-focused: #BF3636; + --negative-button-focused: #CA4242; --white-color: #fff; --duotone-color: rgba(126, 134, 158, .25); @@ -66,21 +66,21 @@ /* Dark Theme */ .theme-dark { - --accented-button-disabled: #12213B; - --accented-button-disabled-color: #5E88CF; - --brand-button-disabled: #111F4B; - --brand-button-disabled-color: #6585E7; - --positive-button-disabled: #092518; - --positive-button-disabled-color: #25A265; - --negative-button-disabled: #330F0F; - --negative-button-disabled-color: #D06262; + --accented-button-disabled: rgba(255, 255, 255, .12); + --accented-button-disabled-color: rgba(255, 255, 255, .4); + --brand-button-disabled: rgba(255, 255, 255, .12); + --brand-button-disabled-color: rgba(255, 255, 255, .4); + --positive-button-disabled: rgba(38, 168, 105, .2); + --positive-button-disabled-color: rgba(38, 168, 105, .6); + --negative-button-disabled: rgba(202, 66, 66, .2); + --negative-button-disabled-color: rgba(202, 66, 66, .6); --theme-button-default: rgba(255, 255, 255, .02); --theme-button-hovered: rgba(255, 255, 255, .04); --theme-button-pressed: rgba(255, 255, 255, .08); --theme-button-focused: rgba(255, 255, 255, .04); --theme-button-focused-border: rgba(255, 255, 255, .09); - --theme-button-disabled: rgba(255, 255, 255, .08); + --theme-button-disabled: transparent; --theme-button-border: rgba(255, 255, 255, .09); --theme-button-contrast-color: #000; @@ -260,14 +260,14 @@ /* Light Theme */ .theme-light { - --accented-button-disabled: #E0E8F6; - --accented-button-disabled-color: #284B86; - --brand-button-disabled: #DCE3F9; - --brand-button-disabled-color: #2C58DE; - --positive-button-disabled: #DEF7EB; - --positive-button-disabled-color: #1A7046; - --negative-button-disabled: #F6E0E0; - --negative-button-disabled-color: #962C2C; + --accented-button-disabled: rgba(0, 0, 0, .12); + --accented-button-disabled-color: rgba(0, 0, 0, .4); + --brand-button-disabled: rgba(0, 0, 0, .12); + --brand-button-disabled-color: rgba(0, 0, 0, .4); + --positive-button-disabled: rgba(38, 168, 105, .2); + --positive-button-disabled-color: rgba(33, 145, 91, .6); + --negative-button-disabled: rgba(202, 66, 66, .2); + --negative-button-disabled-color: rgba(202, 66, 66, .6); --theme-button-default: rgba(0, 0, 0, .02); --theme-button-hovered: rgba(0, 0, 0, .04); diff --git a/packages/theme/styles/button.scss b/packages/theme/styles/button.scss index 547bedde04..88e5ad8120 100644 --- a/packages/theme/styles/button.scss +++ b/packages/theme/styles/button.scss @@ -185,16 +185,24 @@ } &:not(.no-focus):focus { box-shadow: none; } } + &.accented, &.brand, &.positive, &.negative { + &:hover, &:active, &:focus { + color: var(--accented-button-color); + .btn-icon { color: var(--accented-button-color); } + } + } + &.regular, &.ghost { + &:hover, &:active, &:focus { color: var(--theme-caption-color); } + } &.accented, &.brand, &.positive, &.negative { padding: 0 1.5rem; - color: var(--accented-button-color); + color: var(--accented-button-content-color); border-color: var(--accented-button-border); - .btn-icon { color: var(--accented-button-color); } - &:focus { border-color: var(--accented-button-focused-border); } + .btn-icon { color: var(--accented-button-content-color); } } &.accented { background-color: var(--accented-button-default); @@ -272,7 +280,7 @@ } &:disabled { - color: var(--theme-trans-color); + color: var(--theme-darker-color); border-color: transparent; cursor: not-allowed; diff --git a/packages/theme/styles/components.scss b/packages/theme/styles/components.scss index 22d2109d55..c205a76ca7 100644 --- a/packages/theme/styles/components.scss +++ b/packages/theme/styles/components.scss @@ -686,7 +686,6 @@ border-color: transparent; } &:focus { - border-color: var(--accented-button-focused-border); box-shadow: 0 0 0 3px var(--accented-button-outline); & > .icon { color: var(--caption-color); } } @@ -894,7 +893,7 @@ .fix-margin { margin-left: .875rem; } .name { margin-left: .375rem; } - .optional-bar { + .compression-bar { overflow: hidden; display: flex; justify-content: flex-end; @@ -913,7 +912,7 @@ width: max-content; } & > *:not(:first-child) { margin-left: .25rem; } - & > * > * { min-width: fit-content; } + & > * > *:not(.only-icon) { min-width: fit-content; } } } // Labels on the ListView @@ -956,7 +955,7 @@ .kanban-container .card-container .card-labels .label { font-size: .8125rem !important; } /* ListView & Kanban */ -.list-container .optional-bar .label-wrapper, +.list-container .compression-bar .label-wrapper, .kanban-container .card-container .card-labels .label-wrapper { display: flex; align-items: center; diff --git a/packages/ui/src/components/Button.svelte b/packages/ui/src/components/Button.svelte index 67810945f8..e38ca680d2 100644 --- a/packages/ui/src/components/Button.svelte +++ b/packages/ui/src/components/Button.svelte @@ -60,6 +60,7 @@ label === undefined && $$slots.content === undefined && (icon !== undefined || iconRight !== undefined || $$slots.icon || $$slots.iconRight) + $: primary = ['accented', 'brand', 'positive', 'negative'].some((p) => p === kind) onMount(() => { if (focus && input) { @@ -129,7 +130,11 @@ {/if} {#if loading} -