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

styles for context sidebar components #875

Merged
merged 4 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
22 changes: 22 additions & 0 deletions demo/sections/components/ContextSidebar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<template>
<ComponentPage title="Context Sidebar" :demos="[{ title: 'Context Sidebar' }]">
<template #context-sidebar>
<PContextSidebar>
<template #header>
Header
</template>
<PContextNavItem to="#0" title="Context Nav Item" icon="Agent" />
<PContextNavItem to="/" title="Context Nav Item" />
<PContextNavItem to="/" title="Context Nav Item" />
<PContextNavItem to="/" title="Context Nav Item" />
<template #footer>
Footer
</template>
</PContextSidebar>
</template>
</ComponentPage>
</template>

<script lang="ts" setup>
import ComponentPage from '@/demo/components/ComponentPage.vue'
</script>
1 change: 1 addition & 0 deletions demo/sections/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const components: Section = {
codeHighlight: () => import('./CodeHighlight.vue'),
codeInput: () => import('./CodeInput.vue'),
combobox: () => import('./Combobox.vue'),
contextSidebar: () => import('./ContextSidebar.vue'),
dateInput: () => import('./DateInput.vue'),
dateRangeInput: () => import('./DateRangeInput.vue'),
divider: () => import('./Divider.vue'),
Expand Down
15 changes: 8 additions & 7 deletions src/components/ContextAccordionItem/PContextAccordionItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@
font-medium
w-full
text-left
hover:text-primary
active:text-primary-600
hover:bg-selectable-hover
active:bg-selected
}

.p-context-accordion-item__header--highlighted { @apply
hover:text-primary
active:text-primary-600
hover:bg-selectable-hover
active:bg-selected
}

.p-context-accordion-item__icon { @apply
Expand Down Expand Up @@ -136,12 +136,13 @@
select-none
font-medium
cursor-pointer
hover:text-primary
active:text-primary-600
hover:bg-selectable-hover
active:bg-selected
}

.p-context-accordion-item__content-child--active { @apply
text-primary
bg-selected
hover:bg-selected
}

.p-context-accordion-item__indicator { @apply
Expand Down
3 changes: 1 addition & 2 deletions src/components/ContextDivider/PContextDivider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<style>
.p-context-sidebar-divider { @apply
border-t-2
border-slate-600
-mx-3
border-divider
my-2
}
</style>
18 changes: 10 additions & 8 deletions src/components/ContextNavItem/PContextNavItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,30 @@
<style>
.p-context-nav-item { @apply
flex
py-2.5
px-3
py-2
px-2
rounded-md
items-center
transition
duration-200
ease-linear
gap-3
gap-2
text-sm
leading-5
select-none
font-medium
hover:text-primary
active:text-primary-600
hover:bg-selectable-hover
active:bg-selected
}

.p-context-nav-item__icon { @apply
h-6
w-6
h-5
w-5
}

.p-context-nav-item--active { @apply
text-prefect-400
font-semibold
bg-selected
hover:bg-selected
}
</style>
13 changes: 6 additions & 7 deletions src/components/ContextSidebar/PContextSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

<style>
.p-context-sidebar { @apply
bg-slate-800
text-slate-300
fixed
lg:sticky
top-16
Expand All @@ -40,13 +38,14 @@
.p-context-sidebar__header,
.p-context-sidebar__body,
.p-context-sidebar__footer { @apply
p-3
py-4
px-4
overflow-y-auto
}

.p-context-sidebar__header { @apply
border-b-2
border-slate-600
border-b
border-divider
flex-shrink-0
}

Expand All @@ -58,8 +57,8 @@

.p-context-sidebar__footer { @apply
mt-auto
border-t-2
border-t
flex-shrink-0
border-slate-600
border-divider
}
</style>
4 changes: 2 additions & 2 deletions src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
--p-color-text-selection: rgba(69, 156, 255, 0.4);

--p-color-selected: #1F647A;
--p-color-selectable-hover: var(--p-color-bg-2);
--p-color-selectable-hover: #415258;
--p-color-focus-ring: #276EE7;
--p-color-focus-ring-offset: var(--p-color-bg-0);

Expand Down Expand Up @@ -340,7 +340,7 @@
--p-color-text-selection: rgba(69, 156, 255, 0.4);

--p-color-selected: #9DDDF1;
--p-color-selectable-hover: #DDDDDD;
--p-color-selectable-hover: #DDE2E3;
--p-color-focus: #1470EF;
--p-color-focus-halo: rgba(23, 92, 211, 0.4);

Expand Down
Loading