-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dock-manager): add support for floating panes
- Loading branch information
Showing
8 changed files
with
172 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
packages/html/src/dock-manager/templates/dock-manager-floating-pane-with-splitter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Button } from "../../button"; | ||
import { MenuButton } from "../../menu-button"; | ||
import { SplitterPane } from "../../splitter"; | ||
import { WindowNormal } from "../../window"; | ||
import DockManagerSplitter from "../dock-manager-splitter"; | ||
import PaneScrollable from "../pane-scrollable"; | ||
|
||
export const DockManagerFloatingPaneWithSplitter = (props) => ( | ||
<WindowNormal | ||
className="k-floating-pane" | ||
title="Pane Title 1" | ||
actions={["window-minimize", "window", "more-vertical"]} | ||
children={ | ||
<> | ||
<DockManagerSplitter> | ||
<SplitterPane> | ||
<PaneScrollable title="Pane Title 1" actions={ | ||
<> | ||
<Button fillMode="flat" icon="pin"></Button> | ||
<MenuButton fillMode="flat" icon="more-vertical" showArrow={false}></MenuButton> | ||
</> | ||
}> | ||
<p> | ||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusamus perspiciatis mollitia dicta expedita numquam reprehenderit assumenda rem eum id voluptas laborum pariatur ab alias iure accusantium blanditiis, corporis, ut maxime? | ||
Ea assumenda minus debitis excepturi ipsum facere inventore aperiam delectus maxime tenetur hic vel, cum ab est voluptas in laborum deserunt. Ipsum possimus nam aspernatur quia aliquid in doloremque ex. | ||
</p> | ||
</PaneScrollable> | ||
</SplitterPane> | ||
<SplitterPane> | ||
<PaneScrollable title="Pane Title 2" actions={ | ||
<> | ||
<Button fillMode="flat" icon="pin"></Button> | ||
<MenuButton fillMode="flat" icon="more-vertical" showArrow={false}></MenuButton> | ||
</> | ||
}> | ||
<p> | ||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusamus perspiciatis mollitia dicta expedita numquam reprehenderit assumenda rem eum id voluptas laborum pariatur ab alias iure accusantium blanditiis, corporis, ut maxime? | ||
Ea assumenda minus debitis excepturi ipsum facere inventore aperiam delectus maxime tenetur hic vel, cum ab est voluptas in laborum deserunt. Ipsum possimus nam aspernatur quia aliquid in doloremque ex. | ||
</p> | ||
</PaneScrollable> | ||
</SplitterPane> | ||
|
||
</DockManagerSplitter> | ||
</> | ||
} | ||
{...props} | ||
/> | ||
); |
53 changes: 53 additions & 0 deletions
53
packages/html/src/dock-manager/templates/dock-manager-floating-pane-with-tabstrip.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { Button } from "../../button"; | ||
import { MenuButton } from "../../menu-button"; | ||
import { TabStripNormal, TabStripItem, TabStripContent } from "../../tabstrip"; | ||
import { WindowNormal } from "../../window"; | ||
|
||
export const DockManagerFloatingPaneWithTabStrip = (props) => ( | ||
<WindowNormal | ||
className="k-floating-pane" | ||
title="Pane Title 1" | ||
actions={["window-minimize", "window", "more-vertical"]} | ||
children={ | ||
<TabStripNormal | ||
tabStripItems={ | ||
<> | ||
<TabStripItem | ||
first | ||
value="Pane Title 1" | ||
active | ||
actions={ | ||
<> | ||
<Button fillMode="flat" icon="pin"></Button> | ||
<MenuButton | ||
fillMode="flat" | ||
icon="more-vertical" | ||
showArrow={false} | ||
></MenuButton> | ||
</> | ||
} | ||
></TabStripItem> | ||
<TabStripItem | ||
last | ||
value="Pane Title 2" | ||
actions={ | ||
<> | ||
<Button fillMode="flat" icon="pin"></Button> | ||
<MenuButton | ||
fillMode="flat" | ||
icon="more-vertical" | ||
showArrow={false} | ||
></MenuButton> | ||
</> | ||
} | ||
></TabStripItem> | ||
</> | ||
}> | ||
<TabStripContent active> | ||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Commodi suscipit porro optio veritatis obcaecati nostrum molestias dolor maxime! Molestias ducimus placeat quia possimus esse atque odio, a recusandae iste exercitationem. | ||
</TabStripContent> | ||
</TabStripNormal> | ||
} | ||
{...props} | ||
/> | ||
); |
17 changes: 17 additions & 0 deletions
17
packages/html/src/dock-manager/templates/dock-manager-floating-pane.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { WindowNormal } from "../../window"; | ||
|
||
export const DockManagerFloatingPane = (props) => ( | ||
<WindowNormal | ||
className="k-floating-pane" | ||
title="Pane Title" | ||
actions={["window-minimize", "window", "more-vertical"]} | ||
children={ | ||
<p> | ||
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Consequatur error repudiandaecorrupti qui. Ipsum corporis, voluptates numquam distinctio et dolorem illum. Ipsa, laborumsoluta cum asperiores sit fuga iure ad. | ||
Deleniti veniam totam debitis quidem vitae id sunt, fuga at ipsa sed deserunt nulla ipsumquam! | ||
</p> | ||
} | ||
{...props} | ||
/> | ||
|
||
); |
28 changes: 28 additions & 0 deletions
28
packages/html/src/dock-manager/tests/dock-manager-floating-panes.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { DockManagerFloatingPane, DockManagerFloatingPaneWithTabStrip, DockManagerFloatingPaneWithSplitter } from "../"; | ||
|
||
const style = ` | ||
.k-window { | ||
position: relative; | ||
top: 1rem; | ||
} | ||
`; | ||
|
||
export default () => ( | ||
<> | ||
<style>{style}</style> | ||
<div id="test-area" className="k-d-grid k-grid-cols-2"> | ||
<section> | ||
<span>Floating Pane</span> | ||
<DockManagerFloatingPane/> | ||
</section> | ||
<section> | ||
<span>Floating Pane with TabStrip</span> | ||
<DockManagerFloatingPaneWithTabStrip style={{ width: "350px" }}/> | ||
</section> | ||
<section> | ||
<span>Floating Pane with Splitter</span> | ||
<DockManagerFloatingPaneWithSplitter /> | ||
</section> | ||
</div> | ||
</> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters