Remove some old stuff and update binding icon
This commit is contained in:
parent
b2fc4e56eb
commit
57aaa05461
|
@ -2,7 +2,6 @@
|
||||||
import "@spectrum-css/popover/dist/index-vars.css"
|
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 buildStyle from "../utils/buildStyle"
|
|
||||||
import positionDropdown from "../Actions/position_dropdown"
|
import positionDropdown from "../Actions/position_dropdown"
|
||||||
import clickOutside from "../Actions/click_outside"
|
import clickOutside from "../Actions/click_outside"
|
||||||
|
|
||||||
|
@ -10,7 +9,6 @@
|
||||||
|
|
||||||
export let anchor
|
export let anchor
|
||||||
export let align = "right"
|
export let align = "right"
|
||||||
export let borderColor = ""
|
|
||||||
|
|
||||||
export const show = () => {
|
export const show = () => {
|
||||||
dispatch("open")
|
dispatch("open")
|
||||||
|
@ -29,10 +27,6 @@
|
||||||
hide()
|
hide()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$: menuStyle = buildStyle({
|
|
||||||
borderColor,
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if open}
|
{#if open}
|
||||||
|
@ -41,7 +35,6 @@
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
use:positionDropdown={{ anchor, align }}
|
use:positionDropdown={{ anchor, align }}
|
||||||
use:clickOutside={hide}
|
use:clickOutside={hide}
|
||||||
style={menuStyle}
|
|
||||||
on:keydown={handleEscape}
|
on:keydown={handleEscape}
|
||||||
class="spectrum-Popover is-open"
|
class="spectrum-Popover is-open"
|
||||||
role="presentation">
|
role="presentation">
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
<script>
|
|
||||||
import Input from "../Form/Input.svelte"
|
|
||||||
|
|
||||||
export let categories = [
|
|
||||||
{
|
|
||||||
name: "Customers List - Data Row",
|
|
||||||
items: [
|
|
||||||
{ name: "Name", id: "chjaHICHc82h2" },
|
|
||||||
{ name: "Created", id: "chjaHICgr56Hc82h2" },
|
|
||||||
{ name: "Status", id: "chjaHICHc8646462h2" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Home Screen Components",
|
|
||||||
items: [{ name: "Title", id: "chjaHICHc82h2" }],
|
|
||||||
},
|
|
||||||
]
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<Input thin placeholder="Search" />
|
|
||||||
{#each categories as { name, items }}
|
|
||||||
<div class="title">{name}</div>
|
|
||||||
<ul>
|
|
||||||
{#each items as { name, id }}
|
|
||||||
<li>{name}</li>
|
|
||||||
{/each}
|
|
||||||
</ul>
|
|
||||||
{/each}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
</style>
|
|
|
@ -1,8 +0,0 @@
|
||||||
<script>
|
|
||||||
import Search from "./Search.svelte";
|
|
||||||
import { View } from "svench";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<View name="Name">
|
|
||||||
<Search />
|
|
||||||
</View>
|
|
|
@ -1,14 +0,0 @@
|
||||||
export default function buildStyle(styles) {
|
|
||||||
const convertCamel = str => {
|
|
||||||
return str.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
let str = ""
|
|
||||||
for (let s in styles) {
|
|
||||||
if (styles[s]) {
|
|
||||||
let key = convertCamel(s)
|
|
||||||
str += `${key}: ${styles[s]}; `
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str
|
|
||||||
}
|
|
|
@ -36,7 +36,7 @@
|
||||||
on:change={event => onChange(event.detail)}
|
on:change={event => onChange(event.detail)}
|
||||||
{placeholder} />
|
{placeholder} />
|
||||||
<div class="icon" on:click={bindingDrawer.show}>
|
<div class="icon" on:click={bindingDrawer.show}>
|
||||||
<Icon s name="Brackets" />
|
<Icon s name="FlashOn" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Drawer bind:this={bindingDrawer} {title}>
|
<Drawer bind:this={bindingDrawer} {title}>
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
class="icon"
|
class="icon"
|
||||||
data-cy={`${key}-binding-button`}
|
data-cy={`${key}-binding-button`}
|
||||||
on:click={bindingDrawer.show}>
|
on:click={bindingDrawer.show}>
|
||||||
<Icon s name="Brackets" />
|
<Icon s name="FlashOn" />
|
||||||
</div>
|
</div>
|
||||||
<Drawer bind:this={bindingDrawer} title={capitalise(key)}>
|
<Drawer bind:this={bindingDrawer} title={capitalise(key)}>
|
||||||
<div slot="description">
|
<div slot="description">
|
||||||
|
|
Loading…
Reference in New Issue