diff --git a/packages/builder/src/builderStore/generate_css.js b/packages/builder/src/builderStore/generate_css.js index 5826d4f824..bc82cb48f1 100644 --- a/packages/builder/src/builderStore/generate_css.js +++ b/packages/builder/src/builderStore/generate_css.js @@ -1,3 +1,5 @@ +import { toNumber } from "lodash/fp" + export const generate_screen_css = component_arr => { let styles = "" for (const { _styles, _id, _children, _component } of component_arr) { @@ -37,7 +39,7 @@ export const generate_css = style => { export const generate_array_styles = item => { let safeItem = item === "" ? 0 : item let hasPx = new RegExp("px$") - if (!hasPx.test(safeItem)) { + if (!hasPx.test(safeItem) && !isNaN(toNumber(safeItem))) { return `${safeItem}px` } else { return safeItem diff --git a/packages/builder/src/components/common/Input.svelte b/packages/builder/src/components/common/Input.svelte index a136b4e2f3..b80e24e000 100644 --- a/packages/builder/src/components/common/Input.svelte +++ b/packages/builder/src/components/common/Input.svelte @@ -16,7 +16,6 @@ line-height: 1.3; padding: 12px; width: 164px; - float: right; max-width: 100%; box-sizing: border-box; margin: 0; diff --git a/packages/builder/src/components/common/Inputs/InputGroup.svelte b/packages/builder/src/components/common/Inputs/InputGroup.svelte index ffe6880f51..95ebf1a3b4 100644 --- a/packages/builder/src/components/common/Inputs/InputGroup.svelte +++ b/packages/builder/src/components/common/Inputs/InputGroup.svelte @@ -4,7 +4,7 @@ export let meta = [] export let label = "" export let value = [0, 0, 0, 0] - export let type = "number" + export let type = "text" export let onChange = () => {} function handleChange(val, idx) { @@ -28,9 +28,6 @@ diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte index 344e02d127..43473a85a3 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte @@ -40,7 +40,10 @@ class="budibase__nav-item item" class:selected={currentComponent === component} style="padding-left: {level * 20 + 53}px"> -
{get_capitalised_name(component._component)}
+
@@ -72,15 +75,13 @@ border-radius: 3px; height: 35px; align-items: center; - font-weight: 400; - font-size: 13px; } .actions { display: none; - height: 20px; - width: 28px; - color: var(--slate); + height: 24px; + width: 24px; + color: var(--ink); padding: 0px 5px; border-style: none; background: rgba(0, 0, 0, 0); @@ -89,10 +90,22 @@ } .item:hover { - background: #fafafa; + background: var(--grey-light); cursor: pointer; } .item:hover .actions { display: block; } + + .nav-item { + display: flex; + align-items: center; + font-size: 14px; + color: var(--ink); + } + + .icon { + color: var(--ink-light); + margin-right: 8px; + } diff --git a/packages/builder/src/components/userInterface/propertyCategories.js b/packages/builder/src/components/userInterface/propertyCategories.js index 35d624140a..2a81b5fcf7 100644 --- a/packages/builder/src/components/userInterface/propertyCategories.js +++ b/packages/builder/src/components/userInterface/propertyCategories.js @@ -22,11 +22,12 @@ export const layout = [ label: "Direction", key: "flex-direction", control: OptionSelect, - initialValue: "Row", + initialValue: "Select Option", options: [ + { label: "Select Option", value: "" }, { label: "Row", value: "row" }, { label: "Row Reverse", value: "rowReverse" }, - { label: "column", value: "column" }, + { label: "Column", value: "column" }, { label: "Column Reverse", value: "columnReverse" }, ], }, @@ -34,8 +35,9 @@ export const layout = [ label: "Justify", key: "justify-content", control: OptionSelect, - initialValue: "Flex Start", + initialValue: "Select Option", options: [ + { label: "Select Option", value: "" }, { label: "Flex Start", value: "flex-start" }, { label: "Flex End", value: "flex-end" }, { label: "Center", value: "center" }, @@ -48,8 +50,9 @@ export const layout = [ label: "Align", key: "align-items", control: OptionSelect, - initialValue: "Flex Start", + initialValue: "Select Option", options: [ + { label: "Select Option", value: "" }, { label: "Flex Start", value: "flex-start" }, { label: "Flex End", value: "flex-end" }, { label: "Center", value: "center" }, @@ -61,8 +64,9 @@ export const layout = [ label: "Wrap", key: "flex-wrap", control: OptionSelect, - initialValue: "NoWrap", + initialValue: "Select Option", options: [ + { label: "Select Option", value: "" }, { label: "No Wrap", value: "nowrap" }, { label: "Wrap", value: "wrap" }, { label: "Wrap Reverse", value: "wrap-reverse" }, @@ -71,10 +75,10 @@ export const layout = [ ] const spacingMeta = [ - { placeholder: "L" }, - { placeholder: "B" }, - { placeholder: "R" }, { placeholder: "T" }, + { placeholder: "R" }, + { placeholder: "B" }, + { placeholder: "L" }, ] export const spacing = [ diff --git a/packages/builder/src/pages/_layout.svelte b/packages/builder/src/pages/_layout.svelte index 001561cae9..8ad997205b 100644 --- a/packages/builder/src/pages/_layout.svelte +++ b/packages/builder/src/pages/_layout.svelte @@ -197,7 +197,7 @@ .nav-item-title { font-size: 14px; color: var(--ink); - font-weight: 500; + font-weight: 400; margin-left: 12px; }