Switch out DropdownMenu to Popover across the builder
This commit is contained in:
parent
446c3af075
commit
66562400fe
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import DropdownMenu from '../DropdownMenu/DropdownMenu.svelte'
|
import Popover from '../Popover/Popover.svelte'
|
||||||
import Menu from '../Menu/Menu.svelte'
|
import Menu from '../Menu/Menu.svelte'
|
||||||
let anchor;
|
let anchor;
|
||||||
let dropdown;
|
let dropdown;
|
||||||
|
@ -17,11 +17,11 @@
|
||||||
<div class="contents" use:getAnchor on:click={dropdown.show}>
|
<div class="contents" use:getAnchor on:click={dropdown.show}>
|
||||||
<slot name="button" />
|
<slot name="button" />
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu bind:this={dropdown} {anchor} align="left">
|
<Popover bind:this={dropdown} {anchor} align="left">
|
||||||
<Menu>
|
<Menu>
|
||||||
<slot />
|
<slot />
|
||||||
</Menu>
|
</Menu>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
div {
|
div {
|
||||||
|
|
|
@ -1,24 +1,27 @@
|
||||||
<script>
|
<script>
|
||||||
|
import "@spectrum-css/popover/dist/index-vars.css"
|
||||||
import Portal from "svelte-portal"
|
import Portal from "svelte-portal"
|
||||||
import { createEventDispatcher } from "svelte"
|
import { createEventDispatcher } from "svelte"
|
||||||
import positionDropdown from "../Actions/position_dropdown"
|
import positionDropdown from "../Actions/position_dropdown"
|
||||||
import clickOutside from "../Actions/click_outside"
|
import clickOutside from "../Actions/click_outside"
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
export let anchor
|
export let anchor
|
||||||
export let align = "right"
|
export let align = "right"
|
||||||
let open = null
|
|
||||||
|
|
||||||
export const show = () => {
|
export const show = () => {
|
||||||
|
dispatch("open")
|
||||||
open = true
|
open = true
|
||||||
dispatch("show")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const hide = () => {
|
export const hide = () => {
|
||||||
|
dispatch("close")
|
||||||
open = false
|
open = false
|
||||||
dispatch("hide")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let open = null
|
||||||
|
|
||||||
function handleEscape(e) {
|
function handleEscape(e) {
|
||||||
if (open && e.key === "Escape") {
|
if (open && e.key === "Escape") {
|
||||||
hide()
|
hide()
|
||||||
|
@ -33,7 +36,8 @@
|
||||||
use:positionDropdown={{ anchor, align }}
|
use:positionDropdown={{ anchor, align }}
|
||||||
use:clickOutside={hide}
|
use:clickOutside={hide}
|
||||||
on:keydown={handleEscape}
|
on:keydown={handleEscape}
|
||||||
class="spectrum-Popover is-open">
|
class="spectrum-Popover is-open"
|
||||||
|
role="presentation">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</Portal>
|
</Portal>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { sortBy } from "lodash/fp"
|
import { sortBy } from "lodash/fp"
|
||||||
import { automationStore } from "builderStore"
|
import { automationStore } from "builderStore"
|
||||||
import { ActionButton, DropdownMenu, Modal } from "@budibase/bbui"
|
import { ActionButton, Popover, Modal } from "@budibase/bbui"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
import CreateWebhookModal from "../Shared/CreateWebhookModal.svelte"
|
import CreateWebhookModal from "../Shared/CreateWebhookModal.svelte"
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu
|
<Popover
|
||||||
on:close={() => (selectedIndex = null)}
|
on:close={() => (selectedIndex = null)}
|
||||||
bind:this={popover}
|
bind:this={popover}
|
||||||
{anchor}
|
{anchor}
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
on:click={() => addBlockToAutomation(stepId, blockDefinition)} />
|
on:click={() => addBlockToAutomation(stepId, blockDefinition)} />
|
||||||
{/each}
|
{/each}
|
||||||
</DropdownContainer>
|
</DropdownContainer>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
<Modal bind:this={webhookModal} width="30%">
|
<Modal bind:this={webhookModal} width="30%">
|
||||||
<CreateWebhookModal />
|
<CreateWebhookModal />
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { automationStore } from "builderStore"
|
import { automationStore } from "builderStore"
|
||||||
import { database } from "stores/backend"
|
import { database } from "stores/backend"
|
||||||
import { notifications } from "@budibase/bbui"
|
import { notifications } from "@budibase/bbui"
|
||||||
import { DropdownMenu } from "@budibase/bbui"
|
import { Popover } from "@budibase/bbui"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
|
|
||||||
|
@ -33,14 +33,14 @@
|
||||||
<div bind:this={anchor} class="icon" on:click={dropdown.show}>
|
<div bind:this={anchor} class="icon" on:click={dropdown.show}>
|
||||||
<i class="ri-more-line" />
|
<i class="ri-more-line" />
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu align="left" {anchor} bind:this={dropdown}>
|
<Popover align="left" {anchor} bind:this={dropdown}>
|
||||||
<DropdownContainer>
|
<DropdownContainer>
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
icon="ri-delete-bin-line"
|
icon="ri-delete-bin-line"
|
||||||
title="Delete"
|
title="Delete"
|
||||||
on:click={showModal} />
|
on:click={showModal} />
|
||||||
</DropdownContainer>
|
</DropdownContainer>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={confirmDeleteDialog}
|
bind:this={confirmDeleteDialog}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { goto } from "@roxi/routify"
|
import { goto } from "@roxi/routify"
|
||||||
import { datasources } from "stores/backend"
|
import { datasources } from "stores/backend"
|
||||||
import { notifications } from "@budibase/bbui"
|
import { notifications } from "@budibase/bbui"
|
||||||
import { DropdownMenu } from "@budibase/bbui"
|
import { Popover } from "@budibase/bbui"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
<div bind:this={anchor} class="icon" on:click={dropdown.show}>
|
<div bind:this={anchor} class="icon" on:click={dropdown.show}>
|
||||||
<i class="ri-more-line" />
|
<i class="ri-more-line" />
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu align="left" {anchor} bind:this={dropdown}>
|
<Popover align="left" {anchor} bind:this={dropdown}>
|
||||||
<DropdownContainer>
|
<DropdownContainer>
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
icon="ri-delete-bin-line"
|
icon="ri-delete-bin-line"
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
on:click={showModal}
|
on:click={showModal}
|
||||||
data-cy="delete-datasource" />
|
data-cy="delete-datasource" />
|
||||||
</DropdownContainer>
|
</DropdownContainer>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={confirmDeleteDialog}
|
bind:this={confirmDeleteDialog}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { notifications } from "@budibase/bbui"
|
import { notifications } from "@budibase/bbui"
|
||||||
import { DropdownMenu } from "@budibase/bbui"
|
import { Popover } from "@budibase/bbui"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
<div bind:this={anchor} class="icon" on:click={dropdown.show}>
|
<div bind:this={anchor} class="icon" on:click={dropdown.show}>
|
||||||
<i class="ri-more-line" />
|
<i class="ri-more-line" />
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu align="left" {anchor} bind:this={dropdown}>
|
<Popover align="left" {anchor} bind:this={dropdown}>
|
||||||
<DropdownContainer>
|
<DropdownContainer>
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
icon="ri-delete-bin-line"
|
icon="ri-delete-bin-line"
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
on:click={showModal}
|
on:click={showModal}
|
||||||
data-cy="delete-datasource" />
|
data-cy="delete-datasource" />
|
||||||
</DropdownContainer>
|
</DropdownContainer>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={confirmDeleteDialog}
|
bind:this={confirmDeleteDialog}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { store, allScreens } from "builderStore"
|
import { store, allScreens } from "builderStore"
|
||||||
import { tables } from "stores/backend"
|
import { tables } from "stores/backend"
|
||||||
import { notifications } from "@budibase/bbui"
|
import { notifications } from "@budibase/bbui"
|
||||||
import { DropdownMenu, Button, Input } from "@budibase/bbui"
|
import { Popover, Button, Input } from "@budibase/bbui"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
<div bind:this={anchor} class="icon" on:click={dropdown.show}>
|
<div bind:this={anchor} class="icon" on:click={dropdown.show}>
|
||||||
<i class="ri-more-line" />
|
<i class="ri-more-line" />
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu align="left" {anchor} bind:this={dropdown}>
|
<Popover align="left" {anchor} bind:this={dropdown}>
|
||||||
{#if editing}
|
{#if editing}
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<h5>Edit Table</h5>
|
<h5>Edit Table</h5>
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
data-cy="delete-table" />
|
data-cy="delete-table" />
|
||||||
</DropdownContainer>
|
</DropdownContainer>
|
||||||
{/if}
|
{/if}
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={confirmDeleteDialog}
|
bind:this={confirmDeleteDialog}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { goto } from "@roxi/routify"
|
import { goto } from "@roxi/routify"
|
||||||
import { views } from "stores/backend"
|
import { views } from "stores/backend"
|
||||||
import { notifications } from "@budibase/bbui"
|
import { notifications } from "@budibase/bbui"
|
||||||
import { DropdownMenu, Button, Input } from "@budibase/bbui"
|
import { Popover, Button, Input } from "@budibase/bbui"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
<div bind:this={anchor} class="icon" on:click={dropdown.show}>
|
<div bind:this={anchor} class="icon" on:click={dropdown.show}>
|
||||||
<i class="ri-more-line" />
|
<i class="ri-more-line" />
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu align="left" {anchor} bind:this={dropdown}>
|
<Popover align="left" {anchor} bind:this={dropdown}>
|
||||||
{#if editing}
|
{#if editing}
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<h5>Edit View</h5>
|
<h5>Edit View</h5>
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
on:click={showDelete} />
|
on:click={showDelete} />
|
||||||
</DropdownContainer>
|
</DropdownContainer>
|
||||||
{/if}
|
{/if}
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={confirmDeleteDialog}
|
bind:this={confirmDeleteDialog}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
currentAssetId,
|
currentAssetId,
|
||||||
} from "builderStore"
|
} from "builderStore"
|
||||||
import structure from "./componentStructure.json"
|
import structure from "./componentStructure.json"
|
||||||
import { DropdownMenu } from "@budibase/bbui"
|
import { Popover } from "@budibase/bbui"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
|
|
||||||
$: enrichedStructure = enrichStructure(structure, $store.components)
|
$: enrichedStructure = enrichStructure(structure, $store.components)
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu
|
<Popover
|
||||||
on:close={() => (selectedIndex = null)}
|
on:close={() => (selectedIndex = null)}
|
||||||
bind:this={popover}
|
bind:this={popover}
|
||||||
{anchor}
|
{anchor}
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
</DropdownContainer>
|
</DropdownContainer>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.container {
|
.container {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { store, currentAsset } from "builderStore"
|
import { store, currentAsset } from "builderStore"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
import { findComponentParent } from "builderStore/storeUtils"
|
import { findComponentParent } from "builderStore/storeUtils"
|
||||||
import { DropdownMenu } from "@budibase/bbui"
|
import { Popover } from "@budibase/bbui"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
|
|
||||||
export let component
|
export let component
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
|
|
||||||
<div bind:this={anchor} on:click|stopPropagation>
|
<div bind:this={anchor} on:click|stopPropagation>
|
||||||
<div class="icon" on:click={dropdown.show}><i class="ri-more-line" /></div>
|
<div class="icon" on:click={dropdown.show}><i class="ri-more-line" /></div>
|
||||||
<DropdownMenu bind:this={dropdown} width="170px" {anchor} align="left">
|
<Popover bind:this={dropdown} width="170px" {anchor} align="left">
|
||||||
<DropdownContainer on:click={hideDropdown}>
|
<DropdownContainer on:click={hideDropdown}>
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
icon="ri-delete-bin-line"
|
icon="ri-delete-bin-line"
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
disabled={noPaste || noChildrenAllowed}
|
disabled={noPaste || noChildrenAllowed}
|
||||||
on:click={() => pasteComponent('inside')} />
|
on:click={() => pasteComponent('inside')} />
|
||||||
</DropdownContainer>
|
</DropdownContainer>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={confirmDeleteDialog}
|
bind:this={confirmDeleteDialog}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<script>
|
<script>
|
||||||
import { goto } from "@roxi/routify"
|
|
||||||
import { store } from "builderStore"
|
import { store } from "builderStore"
|
||||||
import { notifications } from "@budibase/bbui"
|
import { notifications } from "@budibase/bbui"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
import { DropdownMenu, Modal, ModalContent, Input } from "@budibase/bbui"
|
import { Popover, Modal, ModalContent, Input } from "@budibase/bbui"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
import { cloneDeep } from "lodash/fp"
|
import { cloneDeep } from "lodash/fp"
|
||||||
|
|
||||||
|
@ -40,7 +39,7 @@
|
||||||
<div class="icon" on:click={() => dropdown.show()}>
|
<div class="icon" on:click={() => dropdown.show()}>
|
||||||
<i class="ri-more-line" />
|
<i class="ri-more-line" />
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu bind:this={dropdown} {anchor} align="left">
|
<Popover bind:this={dropdown} {anchor} align="left">
|
||||||
<DropdownContainer>
|
<DropdownContainer>
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
icon="ri-pencil-line"
|
icon="ri-pencil-line"
|
||||||
|
@ -51,7 +50,7 @@
|
||||||
title="Delete"
|
title="Delete"
|
||||||
on:click={() => confirmDeleteDialog.show()} />
|
on:click={() => confirmDeleteDialog.show()} />
|
||||||
</DropdownContainer>
|
</DropdownContainer>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={confirmDeleteDialog}
|
bind:this={confirmDeleteDialog}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { store, allScreens } from "builderStore"
|
import { store, allScreens } from "builderStore"
|
||||||
import { notifications } from "@budibase/bbui"
|
import { notifications } from "@budibase/bbui"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
import { DropdownMenu, Modal, ModalContent } from "@budibase/bbui"
|
import { Popover } from "@budibase/bbui"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
|
|
||||||
export let screenId
|
export let screenId
|
||||||
|
@ -31,14 +31,14 @@
|
||||||
<div class="icon" on:click={() => dropdown.show()}>
|
<div class="icon" on:click={() => dropdown.show()}>
|
||||||
<i class="ri-more-line" />
|
<i class="ri-more-line" />
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu bind:this={dropdown} {anchor} align="left">
|
<Popover bind:this={dropdown} {anchor} align="left">
|
||||||
<DropdownContainer>
|
<DropdownContainer>
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
icon="ri-delete-bin-line"
|
icon="ri-delete-bin-line"
|
||||||
title="Delete"
|
title="Delete"
|
||||||
on:click={() => confirmDeleteDialog.show()} />
|
on:click={() => confirmDeleteDialog.show()} />
|
||||||
</DropdownContainer>
|
</DropdownContainer>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={confirmDeleteDialog}
|
bind:this={confirmDeleteDialog}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Icon,
|
Icon,
|
||||||
DropdownMenu,
|
Popover,
|
||||||
Divider,
|
Divider,
|
||||||
Select,
|
Select,
|
||||||
Spacer,
|
Spacer,
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
</Drawer>
|
</Drawer>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu bind:this={dropdownRight} anchor={anchorRight}>
|
<Popover bind:this={dropdownRight} anchor={anchorRight}>
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<Heading xs h3>Tables</Heading>
|
<Heading xs h3>Tables</Heading>
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.container {
|
.container {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { flip } from "svelte/animate"
|
import { flip } from "svelte/animate"
|
||||||
import { dndzone } from "svelte-dnd-action"
|
import { dndzone } from "svelte-dnd-action"
|
||||||
import { Button, DropdownMenu, Spacer } from "@budibase/bbui"
|
import { Button, Popover, Spacer } from "@budibase/bbui"
|
||||||
import actionTypes from "./actions"
|
import actionTypes from "./actions"
|
||||||
import { generate } from "shortid"
|
import { generate } from "shortid"
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
</Button>
|
</Button>
|
||||||
<Spacer small />
|
<Spacer small />
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu
|
<Popover
|
||||||
bind:this={addActionDropdown}
|
bind:this={addActionDropdown}
|
||||||
anchor={addActionButton}
|
anchor={addActionButton}
|
||||||
align="right">
|
align="right">
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if actions && actions.length > 0}
|
{#if actions && actions.length > 0}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { DropdownMenu, Button, Input } from "@budibase/bbui"
|
import { Popover, Button, Input } from "@budibase/bbui"
|
||||||
import { createEventDispatcher, tick } from "svelte"
|
import { createEventDispatcher, tick } from "svelte"
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
<div bind:this={buttonAnchor}>
|
<div bind:this={buttonAnchor}>
|
||||||
<Button secondary small on:click={dropdown.show}>{displayValue}</Button>
|
<Button secondary small on:click={dropdown.show}>{displayValue}</Button>
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu
|
<Popover
|
||||||
bind:this={dropdown}
|
bind:this={dropdown}
|
||||||
on:open={setSelectedUI}
|
on:open={setSelectedUI}
|
||||||
anchor={buttonAnchor}>
|
anchor={buttonAnchor}>
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.container {
|
.container {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { Label, DropdownMenu } from "@budibase/bbui"
|
import { Label, Popover } from "@budibase/bbui"
|
||||||
import ThemeEditor from "./ThemeEditor.svelte"
|
import ThemeEditor from "./ThemeEditor.svelte"
|
||||||
|
|
||||||
let anchor
|
let anchor
|
||||||
|
@ -10,12 +10,12 @@
|
||||||
<i class="ri-paint-fill" />
|
<i class="ri-paint-fill" />
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<DropdownMenu bind:this={popover} {anchor} align="right">
|
<Popover bind:this={popover} {anchor} align="right">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<Label extraSmall grey>Theme</Label>
|
<Label extraSmall grey>Theme</Label>
|
||||||
<ThemeEditor />
|
<ThemeEditor />
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenu>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
Loading…
Reference in New Issue