Update new component panel so that long component names take up 2 columns. Reorder component sections and components
This commit is contained in:
parent
77a943cc36
commit
b5716623b8
|
@ -188,6 +188,7 @@
|
||||||
{#each category.children as component}
|
{#each category.children as component}
|
||||||
<div
|
<div
|
||||||
class="component"
|
class="component"
|
||||||
|
class:wide={component.name?.length > 15}
|
||||||
class:selected={selectedIndex === orderMap[component.component]}
|
class:selected={selectedIndex === orderMap[component.component]}
|
||||||
on:click={() => addComponent(component.component)}
|
on:click={() => addComponent(component.component)}
|
||||||
on:mouseover={() => (selectedIndex = null)}
|
on:mouseover={() => (selectedIndex = null)}
|
||||||
|
@ -226,7 +227,7 @@
|
||||||
.component {
|
.component {
|
||||||
background-color: var(--spectrum-global-color-gray-200);
|
background-color: var(--spectrum-global-color-gray-200);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
height: 72px;
|
height: 76px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -238,6 +239,9 @@
|
||||||
border: 1px solid var(--spectrum-global-color-gray-200);
|
border: 1px solid var(--spectrum-global-color-gray-200);
|
||||||
transition: border-color 130ms ease-out;
|
transition: border-color 130ms ease-out;
|
||||||
}
|
}
|
||||||
|
.component.wide {
|
||||||
|
grid-column: span 2;
|
||||||
|
}
|
||||||
.component.selected,
|
.component.selected,
|
||||||
.component:hover {
|
.component:hover {
|
||||||
border-color: var(--spectrum-global-color-blue-400);
|
border-color: var(--spectrum-global-color-blue-400);
|
||||||
|
|
|
@ -26,6 +26,26 @@
|
||||||
"dynamicfilter"
|
"dynamicfilter"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Basic",
|
||||||
|
"icon": "TextParagraph",
|
||||||
|
"children": [
|
||||||
|
"heading",
|
||||||
|
"text",
|
||||||
|
"button",
|
||||||
|
"tag",
|
||||||
|
"spectrumcard",
|
||||||
|
"cardstat",
|
||||||
|
"divider",
|
||||||
|
"image",
|
||||||
|
"link",
|
||||||
|
"icon",
|
||||||
|
"embed",
|
||||||
|
"markdownviewer",
|
||||||
|
"backgroundimage",
|
||||||
|
"embeddedmap"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Form",
|
"name": "Form",
|
||||||
"icon": "Form",
|
"icon": "Form",
|
||||||
|
@ -39,23 +59,15 @@
|
||||||
"optionsfield",
|
"optionsfield",
|
||||||
"booleanfield",
|
"booleanfield",
|
||||||
"longformfield",
|
"longformfield",
|
||||||
"datetimefield",
|
|
||||||
"attachmentfield",
|
"attachmentfield",
|
||||||
"relationshipfield",
|
|
||||||
"daterangepicker",
|
"daterangepicker",
|
||||||
"multifieldselect",
|
|
||||||
"jsonfield",
|
"jsonfield",
|
||||||
|
"relationshipfield",
|
||||||
|
"datetimefield",
|
||||||
|
"multifieldselect",
|
||||||
"s3upload"
|
"s3upload"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Card",
|
|
||||||
"icon": "Card",
|
|
||||||
"children": [
|
|
||||||
"spectrumcard",
|
|
||||||
"cardstat"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Chart",
|
"name": "Chart",
|
||||||
"icon": "GraphBarVertical",
|
"icon": "GraphBarVertical",
|
||||||
|
@ -63,27 +75,9 @@
|
||||||
"bar",
|
"bar",
|
||||||
"line",
|
"line",
|
||||||
"area",
|
"area",
|
||||||
|
"candlestick",
|
||||||
"pie",
|
"pie",
|
||||||
"donut",
|
"donut"
|
||||||
"candlestick"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Elements",
|
|
||||||
"icon": "TextParagraph",
|
|
||||||
"children": [
|
|
||||||
"heading",
|
|
||||||
"text",
|
|
||||||
"button",
|
|
||||||
"tag",
|
|
||||||
"divider",
|
|
||||||
"image",
|
|
||||||
"backgroundimage",
|
|
||||||
"link",
|
|
||||||
"icon",
|
|
||||||
"embed",
|
|
||||||
"markdownviewer",
|
|
||||||
"embeddedmap"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue