diff --git a/docker-compose.yml b/docker-compose.yml index 5dabc622b7b..e8315db41f5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,6 +22,7 @@ services: # WEB WEB_UI_CONFIG: ${WEB_UI_CONFIG:-/web/config.json} WEB_ASSET_PATH: ${WEB_ASSET_PATH:-/web/dist} + WEB_UI_THEME_PATH: ${WEB_UI_THEME_PATH:-/themes/owncloud/theme.json} #FRONTEND FRONTEND_SEARCH_MIN_LENGTH: "2" diff --git a/packages/design-system/docs/components/tokens/IconList.vue b/packages/design-system/docs/components/tokens/IconList.vue index dbcc08cc4fe..f72e401dd07 100644 --- a/packages/design-system/docs/components/tokens/IconList.vue +++ b/packages/design-system/docs/components/tokens/IconList.vue @@ -46,19 +46,6 @@ - @@ -126,11 +113,6 @@ export default defineComponent({ title: 'Danger', type: 'slot' }, - { - name: 'inverse', - title: 'Inverse', - type: 'slot' - }, { name: 'fillType', title: 'Fill type' diff --git a/packages/design-system/src/components/OcButton/OcButton.vue b/packages/design-system/src/components/OcButton/OcButton.vue index 50f5e76e7f6..85d547a722a 100644 --- a/packages/design-system/src/components/OcButton/OcButton.vue +++ b/packages/design-system/src/components/OcButton/OcButton.vue @@ -95,25 +95,29 @@ export default defineComponent({ /** * Style variation to give additional meaning. * Defaults to `primary`. - * Can be `passive, primary, danger, success, warning`. + * Can be `passive, primary, danger, success, warning, brand`. */ variation: { type: String, default: 'passive', validator: (value: string) => { - return ['passive', 'primary', 'danger', 'success', 'warning', 'inverse'].includes(value) + return ['passive', 'primary', 'danger', 'success', 'warning', 'brand'].includes(value) } }, /** * Style variation to give additional meaning. * Defaults to `outline`. - * Can be `outline, filled, raw`. + * Can be `outline, filled, raw, raw-inverse` with following characteristics: + * - outline: transparent button with text- and border-color according to variation default-color + * - filled: button filled in variation default-color, text in variation contrast-color + * - raw: text-only button with text in variation default-color + * - raw-inverse: text-only button with text in variation contrast-color */ appearance: { type: String, default: 'outline', validator: (value: string) => { - return ['filled', 'outline', 'raw'].includes(value) + return ['filled', 'outline', 'raw', 'raw-inverse'].includes(value) } }, /** @@ -193,9 +197,7 @@ export default defineComponent({ line-height: $oc-size-icon-default * $factor; } -@mixin oc-button-variation($color, $hover-color, $muted-color) { - background-color: $color; - +@mixin oc-button-variation($color, $hover-color, $muted-color, $contrast-color) { &:disabled { background-color: $muted-color; } @@ -205,32 +207,51 @@ export default defineComponent({ background-color: $hover-color; } - &-raw { + &-raw, + &-raw-inverse { background-color: transparent; border-style: none; - color: $color; font-size: var(--oc-font-size-medium); font-weight: normal; min-height: 0; padding: 0; - .oc-icon > svg { - fill: $color; + &:focus:not([disabled]), + &:hover:not([disabled]) { + background-color: transparent; + } + + &:focus:not([disabled]):not(button), + &:hover:not([disabled]):not(button) { + text-decoration: underline; } &:disabled { background-color: transparent; color: $muted-color; } + } + &-raw { + color: $color; - &:focus:not([disabled]), - &:hover:not([disabled]) { - background-color: transparent; + .oc-icon > svg { + fill: $color; } + } + &-raw-inverse { + color: $contrast-color; - &:focus:not([disabled]):not(button), - &:hover:not([disabled]):not(button) { - text-decoration: underline; + .oc-icon > svg { + fill: $contrast-color; + } + } + + &-filled { + background-color: $color; + color: $contrast-color; + + .oc-icon > svg { + fill: $contrast-color; } } @@ -268,7 +289,6 @@ export default defineComponent({ align-items: center; border: 0; box-sizing: border-box; - color: var(--oc-color-text-inverse); display: inline-flex; font-weight: 400; padding: 0.5rem 0.8rem; @@ -348,15 +368,21 @@ export default defineComponent({ min-height: 2rem; } - .oc-icon > svg { - fill: var(--oc-color-text-inverse); - } - &-passive { @include oc-button-variation( var(--oc-color-swatch-passive-default), var(--oc-color-swatch-passive-hover), - var(--oc-color-swatch-passive-muted) + var(--oc-color-swatch-passive-muted), + var(--oc-color-swatch-passive-contrast) + ); + } + + &-brand { + @include oc-button-variation( + var(--oc-color-swatch-brand-default), + var(--oc-color-swatch-brand-hover), + var(--oc-color-swatch-brand-muted), + var(--oc-color-swatch-brand-contrast) ); } @@ -364,14 +390,15 @@ export default defineComponent({ @include oc-button-variation( var(--oc-color-swatch-primary-default), var(--oc-color-swatch-primary-hover), - var(--oc-color-swatch-primary-muted) + var(--oc-color-swatch-primary-muted), + var(--oc-color-swatch-primary-contrast) ); &-filled { @include oc-background-primary-gradient; - color: var(--oc-color-swatch-inverse-default) !important; + color: var(--oc-color-swatch-primary-contrast) !important; span > svg { - fill: var(--oc-color-swatch-inverse-default) !important; + fill: var(--oc-color-swatch-primary-contrast) !important; } } } @@ -380,7 +407,8 @@ export default defineComponent({ @include oc-button-variation( var(--oc-color-swatch-success-default), var(--oc-color-swatch-success-hover), - var(--oc-color-swatch-success-muted) + var(--oc-color-swatch-success-muted), + var(--oc-color-swatch-success-contrast) ); } @@ -388,7 +416,8 @@ export default defineComponent({ @include oc-button-variation( var(--oc-color-swatch-warning-default), var(--oc-color-swatch-warning-hover), - var(--oc-color-swatch-warning-muted) + var(--oc-color-swatch-warning-muted), + var(--oc-color-swatch-warning-contrast) ); } @@ -396,39 +425,9 @@ export default defineComponent({ @include oc-button-variation( var(--oc-color-swatch-danger-default), var(--oc-color-swatch-danger-hover), - var(--oc-color-swatch-danger-muted) - ); - } - - &-inverse { - @include oc-button-variation( - var(--oc-color-swatch-inverse-default), - var(--oc-color-swatch-inverse-hover), - var(--oc-color-swatch-inverse-muted) + var(--oc-color-swatch-danger-muted), + var(--oc-color-swatch-danger-contrast) ); - - &:not([disabled]) { - color: var(--oc-color-swatch-brand-default); - .oc-icon-passive > svg { - fill: var(--oc-color-swatch-brand-default); - } - } - - &-outline:not([disabled]), - &-raw:not([disabled]) { - color: var(--oc-color-swatch-inverse-default); - .oc-icon-passive > svg { - fill: var(--oc-color-swatch-inverse-default); - } - } - - &-outline:hover:not([disabled]), - &-outline:focus:not([disabled]) { - color: var(--oc-color-swatch-brand-default); - .oc-icon-passive > svg { - fill: var(--oc-color-swatch-brand-default); - } - } } &:disabled { @@ -611,10 +610,6 @@ export default { { title: "danger", description: "Use for triggering possible destructive and non-reversible actions, like permanently deleting a file" - }, - { - title: "inverse", - description: "Use on a dark background" } ] }, @@ -622,7 +617,8 @@ export default { return [ "outline", "filled", - "raw" + "raw", + "raw-inverse" ] }, }, diff --git a/packages/design-system/src/components/OcCheckbox/OcCheckbox.vue b/packages/design-system/src/components/OcCheckbox/OcCheckbox.vue index fb3739f6f2a..969c8c7ced7 100644 --- a/packages/design-system/src/components/OcCheckbox/OcCheckbox.vue +++ b/packages/design-system/src/components/OcCheckbox/OcCheckbox.vue @@ -184,7 +184,7 @@ export default defineComponent({ &-checked, :checked, &:indeterminate { - background-color: var(--oc-color-swatch-inverse-default); + background-color: var(--oc-color-swatch-passive-contrast); } &-checked, diff --git a/packages/design-system/src/components/OcIcon/OcIcon.vue b/packages/design-system/src/components/OcIcon/OcIcon.vue index 7da50cc563e..790afa4150a 100644 --- a/packages/design-system/src/components/OcIcon/OcIcon.vue +++ b/packages/design-system/src/components/OcIcon/OcIcon.vue @@ -133,14 +133,13 @@ export default defineComponent({ /** * Style variation to give additional meaning. * Defaults to `passive`. - * Can be `passive, primary, danger, success, warning or inverse`. - * Inverse is meant to be used for icons on a colorful background. + * Can be `passive, primary, danger, success, warning or brand`. */ variation: { type: String, default: 'passive', validator: (value: string) => { - return ['passive', 'primary', 'danger', 'success', 'warning', 'inverse'].includes(value) + return ['passive', 'primary', 'danger', 'success', 'warning', 'brand'].includes(value) } }, /** @@ -205,7 +204,6 @@ export default defineComponent({ svg { display: block; - fill: var(--oc-color-swatch-passive-default); } &, @@ -282,8 +280,8 @@ export default defineComponent({ fill: var(--oc-color-swatch-danger-default); } - &-inverse > svg { - fill: var(--oc-color-text-inverse) !important; + &-brand > svg { + fill: var(--oc-color-swatch-brand-default); } } @@ -318,7 +316,7 @@ export default defineComponent({ {{ variation.name }} - + @@ -379,7 +377,7 @@ export default defineComponent({ name: "warning", }, { id: "2324-8956-9042", - name: "inverse", + name: "brand", }] }, sizes() { diff --git a/packages/design-system/src/components/OcModal/OcModal.vue b/packages/design-system/src/components/OcModal/OcModal.vue index 9c0816f1d47..38d1bff2522 100644 --- a/packages/design-system/src/components/OcModal/OcModal.vue +++ b/packages/design-system/src/components/OcModal/OcModal.vue @@ -464,7 +464,7 @@ export default defineComponent({ } > h2 { - color: var(--oc-color-swatch-inverse-default); + color: var(--oc-color-swatch-brand-contrast); font-size: 1rem; font-weight: bold; margin: 0; diff --git a/packages/design-system/src/components/OcSearchBar/OcSearchBar.vue b/packages/design-system/src/components/OcSearchBar/OcSearchBar.vue index 19c9f39a403..8a7d165af9c 100644 --- a/packages/design-system/src/components/OcSearchBar/OcSearchBar.vue +++ b/packages/design-system/src/components/OcSearchBar/OcSearchBar.vue @@ -50,8 +50,8 @@ @@ -203,7 +203,18 @@ export default defineComponent({ required: false, default: 'primary', validator: (value: string) => { - return ['passive', 'primary', 'danger', 'success', 'warning', 'inverse'].includes(value) + return ['passive', 'primary', 'danger', 'success', 'warning', 'brand'].includes(value) + } + }, + /** + * Appearance of the cancel button + */ + cancelButtonAppearance: { + type: String, + required: false, + default: 'raw', + validator: (value: string) => { + return ['outline', 'filled', 'raw', 'raw-inverse'].includes(value) } }, /** @@ -294,7 +305,7 @@ export default defineComponent({ &-button { border-bottom-left-radius: 0; border-top-left-radius: 0; - // Prevend double borders + // Prevent double borders // from input and button transform: translateX(-1px); z-index: 0; diff --git a/packages/design-system/src/components/OcStatusIndicators/OcStatusIndicators.vue b/packages/design-system/src/components/OcStatusIndicators/OcStatusIndicators.vue index ed52e688cf1..8c3812a4204 100644 --- a/packages/design-system/src/components/OcStatusIndicators/OcStatusIndicators.vue +++ b/packages/design-system/src/components/OcStatusIndicators/OcStatusIndicators.vue @@ -9,8 +9,7 @@ class="oc-status-indicators-indicator oc-background-primary-gradient oc-p-xs oc-ml-xs" :aria-label="$gettext(indicator.label)" :aria-describedby="getIndicatorDescriptionId(indicator)" - appearance="raw" - variation="inverse" + appearance="raw-inverse" :data-testid="indicator.id" :data-test-indicator-type="indicator.type" @click="indicator.handler(resource, indicator.target, $router)" diff --git a/packages/design-system/src/tokens/ods/color.yaml b/packages/design-system/src/tokens/ods/color.yaml index 4296e9ae467..17733b456a8 100644 --- a/packages/design-system/src/tokens/ods/color.yaml +++ b/packages/design-system/src/tokens/ods/color.yaml @@ -21,6 +21,10 @@ color: value: rgb(4, 30, 66) hover: value: rgb(34, 57, 89) + muted: + value: rgb(0, 20, 40) + contrast: + value: "{color.text.inverse.value}" primary: default: value: rgb(74, 118, 172) @@ -33,6 +37,8 @@ color: value: rgb(8, 105, 222) gradient: value: rgb(78, 133, 200) + contrast: + value: "{color.text.inverse.value}" success: default: value: rgb(79, 130, 47) @@ -43,6 +49,8 @@ color: value: rgb(147, 224, 84) muted: value: rgb(83, 150, 10) + contrast: + value: "{color.text.inverse.value}" warning: default: value: rgb(198, 80, 27) @@ -53,6 +61,8 @@ color: value: rgb(253, 169, 75) muted: value: rgb(179, 81, 0) + contrast: + value: "{color.text.inverse.value}" danger: default: value: rgb(224, 0, 0) @@ -60,6 +70,8 @@ color: value: rgb(233, 100, 100) muted: value: rgb(181, 0, 0) + contrast: + value: "{color.text.inverse.value}" passive: default: value: rgb(76, 95, 121) @@ -67,6 +79,8 @@ color: value: rgb(151, 162, 177) muted: value: rgb(40, 62, 93) + contrast: + value: "{color.text.inverse.value}" inverse: default: value: rgb(255, 255, 255) @@ -74,6 +88,8 @@ color: value: rgb(255, 255, 255) muted: value: rgb(191, 191, 191) + contrast: + value: "{color.text.default.value}" background: default: value: rgb(255, 255, 255) diff --git a/packages/web-app-files/src/components/AppBar/SharesNavigation.vue b/packages/web-app-files/src/components/AppBar/SharesNavigation.vue index 8af8035da0d..bfd8bc31dd6 100644 --- a/packages/web-app-files/src/components/AppBar/SharesNavigation.vue +++ b/packages/web-app-files/src/components/AppBar/SharesNavigation.vue @@ -24,10 +24,9 @@ diff --git a/packages/web-app-files/src/components/FilesList/ResourceTable.vue b/packages/web-app-files/src/components/FilesList/ResourceTable.vue index af40165daf2..c3090e3060f 100644 --- a/packages/web-app-files/src/components/FilesList/ResourceTable.vue +++ b/packages/web-app-files/src/components/FilesList/ResourceTable.vue @@ -136,7 +136,7 @@ />