Skip to content
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
34 changes: 34 additions & 0 deletions packages/hub-ui/src/client/components/dock/DockEdge.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,37 @@ export const WithGroup: Story = {
),
}),
}

function patternedEdgeStory(theme: 'light' | 'dark'): Story {
return {
globals: { theme },
render: () => ({
setup: () => mountWithContext(
{
entries: categorizedEntries,
selectedId: 'overview',
panel: { mode: 'edge', position: 'bottom', height: 40, width: 30 },
session: { open: true },
},
ctx => h('div', { class: 'relative w-screen h-screen overflow-hidden bg-secondary bg-grid-24' }, [
h('div', {
'aria-hidden': 'true',
'class': 'pointer-events-none absolute left-[14%] top-[36%] h-72 w-72 rounded-full bg-primary-500 op40',
}),
h('div', {
'aria-hidden': 'true',
'class': 'pointer-events-none absolute right-[12%] bottom-[8%] h-40 w-72 rounded-3xl bg-active',
}),
h(DockEdge, { context: ctx }, { view: ({ entry }: any) => body(entry) }),
h(FloatingElements),
]),
),
}),
}
}

/** Tinted glass edge material blurring a grid in light mode. */
export const GlassMaterialLight: Story = patternedEdgeStory('light')

/** Tinted glass edge material blurring a grid in dark mode. */
export const GlassMaterialDark: Story = patternedEdgeStory('dark')
2 changes: 1 addition & 1 deletion packages/hub-ui/src/client/components/dock/DockEdge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ const dragPreviewStyle = computed<CSSProperties | undefined>(() => {
<template>
<div
id="devframes-edge-panel"
class="bg-glass:80 border border-base color-base shadow overflow-clip z-floating-anchor font-sans text-[15px] box-border"
class="bg-dock-glass border border-base color-base shadow overflow-clip z-floating-anchor font-sans text-[15px] box-border"
:class="[panelLayoutClass, { 'devframes-edge-collapsed': isCollapsed }]"
:style="panelStyle"
@mousemove="bringUp"
Expand Down
34 changes: 34 additions & 0 deletions packages/hub-ui/src/client/components/dock/DockPanel.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,37 @@ export const RightAnchored: Story = {
),
}),
}

function patternedPanelStory(theme: 'light' | 'dark'): Story {
return {
globals: { theme },
render: () => ({
setup: () => mountWithContext(
{ entries: categorizedEntries, selectedId: 'overview', panel: { position: 'bottom', left: 50, top: 100, width: 60, height: 60 } },
ctx => h('div', { class: 'relative w-screen h-screen overflow-hidden bg-secondary bg-grid-24' }, [
h('div', {
'aria-hidden': 'true',
'class': 'pointer-events-none absolute left-[14%] top-[36%] h-72 w-72 rounded-full bg-primary-500 op40',
}),
h('div', {
'aria-hidden': 'true',
'class': 'pointer-events-none absolute right-[12%] bottom-[8%] h-40 w-72 rounded-3xl bg-active',
}),
h('div', { id: 'devframes-anchor', style: { left: '50vw', top: '100vh' } }, [
h(DockPanel, {
context: ctx,
selected: ctx.docks.selected,
panelMargins: MARGINS,
}, { view: ({ entry }: any) => body(entry) }),
]),
]),
),
}),
}
}

/** Tinted glass panel material blurring a grid in light mode. */
export const GlassMaterialLight: Story = patternedPanelStory('light')

/** Tinted glass panel material blurring a grid in dark mode. */
export const GlassMaterialDark: Story = patternedPanelStory('dark')
2 changes: 1 addition & 1 deletion packages/hub-ui/src/client/components/dock/DockPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ onMounted(() => {
<div
v-show="context.docks.selected && context.docks.selected.type !== 'action'"
ref="dockPanel"
class="bg-glass:80 rounded-lg border border-base color-base shadow overflow-hidden"
class="bg-dock-glass rounded-lg border border-base color-base shadow overflow-hidden"
:style="panelStyle"
@contextmenu="openContextMenu"
>
Expand Down
2 changes: 2 additions & 0 deletions packages/hub-ui/uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default mergeConfigs([
},
},
shortcuts: {
/** Use the lighter glass in light mode while retaining dark-mode contrast. */
'bg-dock-glass': 'bg-glass dark:bg-[#111]/80',
Comment thread
dvcolomban marked this conversation as resolved.
// Dock-shell z-layers (named — the design preset blocks plain
// `z-<number>`). The floating shell layers sit at the very top of the
// host page's stacking order, mirroring the upstream dock.
Expand Down
Loading