Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update the dark mode & ui components clean up #1888

Merged
merged 8 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions extension-manifest-v3/src/pages/panel/components/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default {
layout[slide]="absolute inset bottom:auto"
>
<ui-icon name="${icon}"></ui-icon>
<ui-text type="label-s" underline layout="block:center">
<ui-text type="label-s" underline layout="block:center" color="inherit">
<slot></slot>
</ui-text>
${!!autoclose &&
Expand All @@ -86,8 +86,6 @@ export default {
border: 1px solid var(--ui-color-gray-200);
box-shadow: 1px 2px 7px rgba(0, 0, 0, 0.15);
border-radius: 30px;
--ui-text-color-heading: currentColor;
--ui-text-color-anchor: currentColor;
}

:host([type="success"]) {
Expand Down
2 changes: 1 addition & 1 deletion extension-manifest-v3/src/pages/panel/components/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
transition: 0.2s all;
}

@media (hover: hover) and (pointer: fine) {
@media (hover: hover) {
ui-text:hover {
background: var(--ui-color-primary-700);
}
Expand Down
1 change: 0 additions & 1 deletion extension-manifest-v3/src/pages/panel/components/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default {

@media (hover: hover) {
button:hover ui-text, button:hover ui-icon {
--ui-text-color: var(--ui-color-primary-700);
color: var(--ui-color-primary-700);
}
}
Expand Down
6 changes: 3 additions & 3 deletions extension-manifest-v3/src/pages/panel/components/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default {
#dialog {
border: none;
border-radius: 12px 12px 0 0;
background: var(--ui-color-white);
background: var(--ui-color-layout);
overscroll-behavior: contain;
transform: translateY(100%);
transition: transform 500ms cubic-bezier(0.4, 0.15, 0, 1);
Expand All @@ -87,15 +87,15 @@ export default {
#backdrop {
background: var(--ui-color-backdrop);
opacity: 0;
transition: all 500ms ease-out;
transition: all 300ms;
}

:host([open]) #dialog {
transform: translateY(0);
}

:host([open]) #backdrop {
opacity: 0.7;
opacity: 0.9;
}

#header {
Expand Down
5 changes: 2 additions & 3 deletions extension-manifest-v3/src/pages/panel/components/menu-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default {
:host {
text-decoration: none;
color: var(--ui-color-gray-800);
--ui-text-color-heading: currentColor;
}

ui-icon {
Expand All @@ -38,8 +37,8 @@ export default {
overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
:host(:hover) {
@media (hover: hover) {
:host(:hover) ui-text {
color: var(--ui-color-primary-700);
}

Expand Down
38 changes: 12 additions & 26 deletions extension-manifest-v3/src/pages/panel/components/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export default {
</div>
`}
<div layout="column gap grow">
<ui-text type="body-s"><slot></slot></ui-text>
<ui-text id="desc" type="body-s" color="gray-600">
<slot></slot>
</ui-text>
<ui-text id="action" type="label-s">
<slot name="action"></slot>
</ui-text>
Expand All @@ -45,10 +47,6 @@ export default {
--ui-panel-notification-color: var(--ui-color-primary-700);
}

#action {
color: var(--ui-panel-notification-color);
}

:host([type="warning"]) {
--ui-panel-notification-bg: var(--ui-color-danger-100);
--ui-panel-notification-color: var(--ui-color-danger-700);
Expand All @@ -57,40 +55,28 @@ export default {
a {
background: var(--ui-panel-notification-bg);
border-radius: 12px;
color: inherit;
text-decoration: none;
color: inherit;
}

#action {
color: var(--ui-panel-notification-color);
}

#icon {
background: var(--ui-color-white);
background: var(--ui-color-layout);
box-shadow: 0px 2px 6px rgba(32, 44, 68, 0.08);
border-radius: 8px;
}

#icon ui-icon {
ui-icon {
color: var(--ui-panel-notification-color);
}

#close > * {
color: var(--ui-color-gray-600);
background: var(--ui-color-white);
border-radius: 12px;
}

@media (hover: hover) and (pointer: fine) {
a:hover:not(:has(#close:hover)) {
background: var(--ui-panel-notification-bg);
--ui-text-color: var(--ui-panel-notification-color);
}

a:hover:not(:has(#close:hover)) #action {
@media (hover: hover) {
a:hover ui-text {
text-decoration: underline;
}

#close:hover > * {
color: var(--ui-color-white);
background: var(--ui-panel-notification-color);
}
}
`,
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
render: ({ icon, enabled, terms }) => html`
<template layout="row gap items:center padding:1:1.5">
${icon && html`<ui-icon name="${icon}" layout="margin:right"></ui-icon>`}
<ui-text type="body-s" color="gray-800" layout="grow">
<ui-text type="body-s" layout="grow">
<slot></slot>
</ui-text>
<ui-text
Expand All @@ -36,7 +36,7 @@ export default {
</template>
`.css`
:host {
background: var(--ui-color-white);
background: var(--ui-color-layout);
border: 1px solid var(--ui-color-gray-200);
}

Expand All @@ -56,7 +56,7 @@ export default {
color: var(--ui-color-gray-600);
}

@media (hover: hover) and (pointer: fine) {
@media (hover: hover) {
:host(:hover) {
background: var(--ui-color-primary-100);
}
Expand All @@ -66,7 +66,7 @@ export default {
}

:host(:hover) ui-text {
--ui-text-color: var(--ui-color-primary-700);
color: var(--ui-color-primary-700);
}
}
`,
Expand Down
Loading
Loading