-
{name}
-
-
-
+
{name}
+
@@ -32,10 +28,9 @@
.property-group-container {
display: flex;
flex-direction: column;
- height: auto;
- justify-content: center;
- border-radius: var(--border-radius-m);
- font-family: var(--font-sans);
+ justify-content: flex-start;
+ align-items: stretch;
+ border-bottom: var(--border-light);
}
.property-group-name {
@@ -45,42 +40,38 @@
flex-direction: row;
justify-content: space-between;
align-items: center;
+ padding: var(--spacing-m) var(--spacing-xl);
+ color: var(--spectrum-global-color-gray-600);
+ transition: color 130ms ease-in-out;
+ }
+ .property-group-name:hover {
+ color: var(--spectrum-global-color-gray-900);
}
.name {
text-align: left;
- font-size: 14px;
+ font-size: var(--font-size-s);
font-weight: 600;
letter-spacing: 0.14px;
- color: var(--ink);
flex: 1 1 auto;
overflow: hidden;
text-overflow: ellipsis;
- text-transform: capitalize;
+ text-transform: uppercase;
white-space: nowrap;
user-select: none;
}
- .name.thin {
- font-size: var(--spectrum-global-dimension-font-size-75);
- }
-
- .icon {
- flex: 0 0 20px;
- text-align: center;
- }
.property-panel {
- /* height: 0px;
- overflow: hidden; */
display: none;
+ padding: var(--spacing-s) var(--spacing-xl) var(--spacing-xl)
+ var(--spacing-xl);
}
.show {
- /* overflow: auto;
- height: auto; */
display: flex;
flex-direction: column;
- flex: 1;
- margin-top: var(--spacing-m);
+ justify-content: flex-start;
+ align-items: stretch;
+ gap: var(--spacing-m);
}
diff --git a/packages/bbui/src/Tabs/Tabs.svelte b/packages/bbui/src/Tabs/Tabs.svelte
index 3eddb3dfec..3e1080f2cd 100644
--- a/packages/bbui/src/Tabs/Tabs.svelte
+++ b/packages/bbui/src/Tabs/Tabs.svelte
@@ -5,6 +5,8 @@
export let selected
export let vertical = false
+ export let noPadding = false
+
let _id = id()
const tab = writable({ title: selected, id: _id })
setContext("tab", tab)
@@ -63,14 +65,17 @@
{/if}
-
+
diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js
index 9a7e2715da..a462167ce2 100644
--- a/packages/builder/src/builderStore/store/frontend.js
+++ b/packages/builder/src/builderStore/store/frontend.js
@@ -488,12 +488,12 @@ export const getFrontendStore = () => {
})
await Promise.all(promises)
},
- updateStyle: async (type, name, value) => {
+ updateStyle: async (name, value) => {
const selected = get(selectedComponent)
if (value == null || value === "") {
- delete selected._styles[type][name]
+ delete selected._styles.normal[name]
} else {
- selected._styles[type][name] = value
+ selected._styles.normal[name] = value
}
await store.actions.preview.saveSelected()
},
diff --git a/packages/builder/src/components/design/PropertiesPanel/ActionsSection.svelte b/packages/builder/src/components/design/PropertiesPanel/ActionsSection.svelte
new file mode 100644
index 0000000000..febfb56f16
--- /dev/null
+++ b/packages/builder/src/components/design/PropertiesPanel/ActionsSection.svelte
@@ -0,0 +1,50 @@
+
+
+
+
+ Reset styles
+
+ {#if componentDefinition?.component?.endsWith("/fieldgroup")}
+ confirmResetFieldsDialog?.show()}
+ >
+ Update form fields
+
+ {/if}
+
+
+
diff --git a/packages/builder/src/components/design/PropertiesPanel/CategoryTab.svelte b/packages/builder/src/components/design/PropertiesPanel/CategoryTab.svelte
deleted file mode 100644
index 66212036a8..0000000000
--- a/packages/builder/src/components/design/PropertiesPanel/CategoryTab.svelte
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
- {#each categories as category}
-
onClick(category)}
- class:active={selectedCategory === category}
- >
- {category.name}
-
- {/each}
-
-
-
diff --git a/packages/builder/src/components/design/PropertiesPanel/CustomStylesSection.svelte b/packages/builder/src/components/design/PropertiesPanel/CustomStylesSection.svelte
new file mode 100644
index 0000000000..17a3e7c084
--- /dev/null
+++ b/packages/builder/src/components/design/PropertiesPanel/CustomStylesSection.svelte
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
diff --git a/packages/builder/src/components/design/PropertiesPanel/DesignSection.svelte b/packages/builder/src/components/design/PropertiesPanel/DesignSection.svelte
new file mode 100644
index 0000000000..bfcb9b6b4a
--- /dev/null
+++ b/packages/builder/src/components/design/PropertiesPanel/DesignSection.svelte
@@ -0,0 +1,42 @@
+
+
+
+ {#if groups.length > 0}
+ {#each groups as groupName}
+ (currentGroup = groupName)}
+ />
+ {/each}
+ {:else}
+
+ This component doesn't have any design properties.
+
+ {/if}
+
+
+
diff --git a/packages/builder/src/components/design/PropertiesPanel/DesignView.svelte b/packages/builder/src/components/design/PropertiesPanel/DesignView.svelte
deleted file mode 100644
index 1c7ead521a..0000000000
--- a/packages/builder/src/components/design/PropertiesPanel/DesignView.svelte
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
-
-
-
-
-
- {#if groups.length > 0}
- {#each groups as groupName}
-
(currentGroup = groupName)}
- />
- {/each}
- (currentGroup = "custom")}
- show={currentGroup === "custom"}
- thin
- >
-
-
-
-
- {:else}
-
- This component doesn't have any design properties.
-
- {/if}
-
-
-
-
-
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte
index 201a7a8fc7..34762d552d 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte
@@ -3,11 +3,16 @@
import { store, selectedComponent, currentAsset } from "builderStore"
import { Tabs, Tab } from "@budibase/bbui"
import { FrontendTypes } from "constants"
- import DesignView from "./DesignView.svelte"
- import SettingsView from "./SettingsView.svelte"
+ import SettingsSection from "./SettingsSection.svelte"
+ import DesignSection from "./DesignSection.svelte"
+ import CustomStylesSection from "./CustomStylesSection.svelte"
+ import ActionsSection from "./ActionsSection.svelte"
import { setWith } from "lodash"
- $: definition = store.actions.components.getDefinition(
+ let openSection = "settings"
+
+ $: componentInstance = $selectedComponent
+ $: componentDefinition = store.actions.components.getDefinition(
$selectedComponent?._component
)
$: isComponentOrScreen =
@@ -16,10 +21,6 @@
$: isNotScreenslot = !$selectedComponent._component.endsWith("screenslot")
$: showDisplayName = isComponentOrScreen && isNotScreenslot
- const onStyleChanged = store.actions.components.updateStyle
- const onCustomStyleChanged = store.actions.components.updateCustomStyle
- const onResetStyles = store.actions.components.resetStyles
-
function setAssetProps(name, value) {
const selectedAsset = get(currentAsset)
store.update(state => {
@@ -37,48 +38,34 @@
}
-
+
-
- {#if definition && definition.name}
-
{definition.name}
- {/if}
-
-
-
-
-
- {#if definition && definition.name}
-
{definition.name}
- {/if}
-
-
+ (openSection = "settings")}
+ />
+ (openSection = "design")}
+ />
+ (openSection = "custom")}
+ />
+ (openSection = "actions")}
+ />
-
-
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte
index d5d51ff52b..ac23e819d5 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte
@@ -1,5 +1,5 @@
-
{label}
+ {#if type !== "boolean"}
+
+
+
+ {/if}
-
- {#if bindable && !key.startsWith("_") && type === "text"}
-
-
-
-
-
- Add the objects on the left to enrich your text.
-
-
- (temporaryBindableValue = e.detail)}
- {bindableProperties}
- />
-
- {/if}
+
+
+
+
+ Add the objects on the left to enrich your text.
+
+
+ (temporaryBindableValue = e.detail)}
+ {bindableProperties}
+ />
+
+ {/if}
+