Skip to content

Commit

Permalink
Merge branch 'v5/darkmode-alternative' into v5/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Dec 2, 2024
2 parents a84e5fb + c8232db commit 62f5cf6
Show file tree
Hide file tree
Showing 81 changed files with 439 additions and 272 deletions.
1 change: 1 addition & 0 deletions panel/lab/basics/icons/1_iconset/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default {
align-items: center;
gap: 0.75rem;
padding: var(--spacing-2);
color: var(--color-black);
background: var(--color-white);
border-radius: var(--rounded);
box-shadow: var(--shadow);
Expand Down
6 changes: 0 additions & 6 deletions panel/lab/components/browsers/browser/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,4 @@ export default {
.k-lab-example .k-headline {
margin-bottom: 0.5rem;
}
.k-lab-example .k-browser {
border: 1px solid var(--color-border);
background: var(--color-white);
border-radius: var(--rounded);
padding: var(--spacing-2);
}
</style>
2 changes: 1 addition & 1 deletion panel/lab/components/toolbar/3_writer/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default {

<style>
.k-writer-input {
background-color: white;
background-color: var(--input-color-back);
border-radius: var(--rounded);
}
</style>
129 changes: 129 additions & 0 deletions panel/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"vue": "^2.7.16"
},
"devDependencies": {
"@csstools/postcss-light-dark-function": "^2.0.7",
"@vitejs/plugin-vue2": "^2.3.1",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
Expand Down
4 changes: 3 additions & 1 deletion panel/src/components/Collection/Item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,14 @@ export default {
:root {
--item-button-height: var(--height-md);
--item-button-width: var(--height-md);
--item-color-back: light-dark(var(--color-white), var(--color-gray-850));
--item-height: auto;
--item-height-cardlet: calc(var(--height-md) * 3);
}
.k-item {
position: relative;
background: var(--color-white);
background: var(--item-color-back);
box-shadow: var(--shadow);
border-radius: var(--rounded);
min-height: var(--item-height);
Expand Down Expand Up @@ -252,6 +253,7 @@ export default {
.k-item:is([data-layout="cardlets"], [data-layout="cards"]) .k-sort-button {
top: var(--spacing-2);
inset-inline-start: var(--spacing-2);
color: var(--color-black);
background: hsla(0, 0%, var(--color-l-max), 50%);
backdrop-filter: blur(5px);
box-shadow: 0 2px 5px hsla(0, 0%, 0%, 20%);
Expand Down
2 changes: 1 addition & 1 deletion panel/src/components/Dialogs/Dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default {

<style>
:root {
--dialog-color-back: var(--color-light);
--dialog-color-back: var(--panel-color-back);
--dialog-color-text: currentColor;
--dialog-margin: var(--spacing-6);
--dialog-padding: var(--spacing-6);
Expand Down
2 changes: 1 addition & 1 deletion panel/src/components/Dialogs/Elements/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ export default {
.k-dialog-search {
margin-bottom: 0.75rem;
--input-color-border: transparent;
--input-color-back: var(--color-gray-300);
--input-color-back: light-dark(var(--color-gray-300), var(--color-gray-950));
}
</style>
2 changes: 1 addition & 1 deletion panel/src/components/Drawers/Drawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default {
<style>
:root {
--drawer-body-padding: 1.5rem;
--drawer-color-back: var(--color-light);
--drawer-color-back: var(--panel-color-back);
--drawer-header-height: 2.5rem;
--drawer-header-padding: 1rem;
--drawer-shadow: var(--shadow-xl);
Expand Down
2 changes: 1 addition & 1 deletion panel/src/components/Drawers/Elements/Body.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {};
.k-drawer-body {
padding: var(--drawer-body-padding);
flex-grow: 1;
background: var(--color-light);
background: var(--drawer-color-back);
}
/* Sticky elements inside drawer */
/** TODO: .k-drawer-body .k-toolbar:not([data-inline="true"]):has(~ :focus-within) */
Expand Down
2 changes: 1 addition & 1 deletion panel/src/components/Drawers/Elements/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default {
align-items: center;
line-height: 1;
justify-content: space-between;
background: var(--color-white);
background: light-dark(var(--color-white), var(--color-gray-850));
font-size: var(--text-sm);
}
Expand Down
10 changes: 3 additions & 7 deletions panel/src/components/Dropdowns/DropdownContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -343,19 +343,15 @@ export default {
<style>
:root {
--dropdown-color-bg: var(--color-black);
--dropdown-color-bg: var(--color-gray-950);
--dropdown-color-current: var(--color-blue-500);
--dropdown-color-hr: hsla(0, 0%, var(--color-l-max), 0.25);
--dropdown-color-hr: var(--color-gray-850);
--dropdown-color-text: var(--color-white);
--dropdown-padding: var(--spacing-2);
--dropdown-rounded: var(--rounded);
--dropdown-shadow: var(--shadow-xl);
}
.k-panel[data-theme="dark"] {
--dropdown-color-hr: hsla(0, 0%, var(--color-l-max), 0.1);
}
.k-dropdown-content {
--dropdown-x: 0;
--dropdown-y: 0;
Expand Down Expand Up @@ -395,7 +391,7 @@ export default {
.k-dropdown-content[data-theme="light"] {
--dropdown-color-bg: var(--color-white);
--dropdown-color-current: var(--color-blue-800);
--dropdown-color-hr: var(--color-border-dimmed);
--dropdown-color-hr: var(--color-gray-250);
--dropdown-color-text: var(--color-black);
}
</style>
8 changes: 4 additions & 4 deletions panel/src/components/Forms/Blocks/Block.vue
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,11 @@ export default {
.k-block-container {
position: relative;
padding: var(--spacing-3);
background: var(--color-white);
background: var(--block-color-back);
border-radius: var(--rounded);
}
.k-block-container:not(:last-of-type) {
border-bottom: 1px dashed var(--color-border-dimmed);
border-bottom: 1px dashed var(--panel-color-back);
}
.k-block-container:focus {
outline: 0;
Expand Down Expand Up @@ -403,7 +403,7 @@ export default {
display: inline-grid;
}
.k-block-container[data-disabled="true"] {
background: var(--color-light);
background: var(--panel-color-back);
}
/* Collapse long blocks while dragging */
Expand All @@ -418,6 +418,6 @@ export default {
content: "";
height: 2rem;
width: 100%;
background: linear-gradient(to top, var(--color-white), transparent);
background: linear-gradient(to top, var(--block-color-back), transparent);
}
</style>
6 changes: 3 additions & 3 deletions panel/src/components/Forms/Blocks/BlockOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ export default {
<style>
.k-block-options {
--toolbar-size: 30px;
box-shadow: var(--shadow-toolbar);
border: 1px solid light-dark(var(--color-border), var(--color-gray-900));
box-shadow: var(--shadow-xl);
}
.k-block-options > .k-button:not(:last-of-type) {
border-inline-end: 1px solid var(--color-light);
border-inline-end: 1px solid var(--toolbar-border);
}
.k-block-options .k-dropdown-content {
margin-top: 0.5rem;
Expand Down
2 changes: 1 addition & 1 deletion panel/src/components/Forms/Blocks/BlockSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default {
}
.k-block-types .k-button {
--button-color-icon: var(--color-text);
--button-color-back: var(--color-white);
--button-color-back: light-dark(var(--color-white), var(--color-gray-850));
--button-padding: var(--spacing-3);
width: 100%;
justify-content: start;
Expand Down
6 changes: 5 additions & 1 deletion panel/src/components/Forms/Blocks/Blocks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,15 @@ export default {
</script>
<style>
:root {
--block-color-back: var(--item-color-back);
}
.k-blocks {
border-radius: var(--rounded);
}
.k-blocks:not([data-empty="true"], [data-disabled="true"]) {
background: var(--color-white);
background: var(--block-color-back);
box-shadow: var(--shadow);
}
.k-blocks[data-disabled="true"]:not([data-empty="true"]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
:options="[
{
text: $t('field.blocks.figure.back.plain'),
click: 'var(--color-white)'
click: 'transparent'
},
{
text: $t('field.blocks.figure.back.pattern.light'),
Expand Down
4 changes: 2 additions & 2 deletions panel/src/components/Forms/Blocks/Elements/BlockFigure.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default {

<style>
.k-block-figure:not([data-empty="true"]) {
--block-figure-back: var(--color-white);
--block-figure-back: var(--block-color-back);
background: var(--block-figure-back);
}
.k-block-figure-container:not([data-disabled="true"]) {
Expand All @@ -73,7 +73,7 @@ export default {
--button-width: 100%;
--button-height: 6rem;
--button-color-text: var(--color-text-dimmed);
--button-color-back: var(--color-light);
--button-color-back: var(--panel-color-back);
}
.k-block-figure-empty,
Expand Down
4 changes: 0 additions & 4 deletions panel/src/components/Forms/Blocks/Types/Code.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ export default {
--input-padding: var(--spacing-3);
--input-padding-multiline: var(--input-padding);
}
.k-panel[data-theme="dark"] .k-block-type-code-editor .k-input {
--input-color-back: var(--color-light);
--input-color-text: var(--color-text);
}
.k-block-type-code-editor .k-input[data-type="textarea"] {
white-space: pre-wrap;
Expand Down
Loading

0 comments on commit 62f5cf6

Please sign in to comment.