diff --git a/lerna.json b/lerna.json
index e1e95f2ab7..05fea191af 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "2.9.30-alpha.11",
+ "version": "2.9.30-alpha.13",
"npmClient": "yarn",
"packages": [
"packages/*"
diff --git a/packages/bbui/src/Actions/position_dropdown.js b/packages/bbui/src/Actions/position_dropdown.js
index 8fa02bb8f3..4a5ef890bf 100644
--- a/packages/bbui/src/Actions/position_dropdown.js
+++ b/packages/bbui/src/Actions/position_dropdown.js
@@ -32,11 +32,10 @@ export default function positionDropdown(element, opts) {
left: null,
top: null,
}
-
// Determine vertical styles
if (align === "right-outside") {
styles.top = anchorBounds.top
- } else if (window.innerHeight - anchorBounds.bottom < 100) {
+ } else if (window.innerHeight - anchorBounds.bottom < (maxHeight || 100)) {
styles.top = anchorBounds.top - elementBounds.height - offset
styles.maxHeight = maxHeight || 240
} else {
diff --git a/packages/bbui/src/ColorPicker/ColorPicker.svelte b/packages/bbui/src/ColorPicker/ColorPicker.svelte
index 9a70134fb6..2ba5309860 100644
--- a/packages/bbui/src/ColorPicker/ColorPicker.svelte
+++ b/packages/bbui/src/ColorPicker/ColorPicker.svelte
@@ -1,8 +1,8 @@
-
-
- {#if open}
-
+
{
+ dropdown.toggle()
+ }}
+>
+
+
+
+
+
+
{#each categories as category}
{category.label}
@@ -187,8 +184,8 @@
- {/if}
-
+
+
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/theme/_components/AppThemeSelect.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/AppThemeSelect.svelte
similarity index 100%
rename from packages/builder/src/pages/builder/app/[application]/design/[screenId]/theme/_components/AppThemeSelect.svelte
rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/AppThemeSelect.svelte
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/theme/_components/ButtonRoundnessSelect.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/ButtonRoundnessSelect.svelte
similarity index 100%
rename from packages/builder/src/pages/builder/app/[application]/design/[screenId]/theme/_components/ButtonRoundnessSelect.svelte
rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/ButtonRoundnessSelect.svelte
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenSettingsPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/GeneralPanel.svelte
similarity index 72%
rename from packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenSettingsPanel.svelte
rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/GeneralPanel.svelte
index 8982cd20de..a08ded8eee 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenSettingsPanel.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/GeneralPanel.svelte
@@ -1,12 +1,8 @@
-
-
- {#if $selectedScreen.layoutId}
-
- This screen uses a custom layout, which is deprecated
-
- {/if}
- {#each screenSettings as setting (setting.key)}
- setScreenSetting(setting, val)}
- props={{ ...setting.props, error: errors[setting.key] }}
- {bindings}
- />
- {/each}
-
-
-
+{#if $selectedScreen.layoutId}
+
+ This screen uses a custom layout, which is deprecated
+
+{/if}
+{#each screenSettings as setting (setting.key)}
+ setScreenSetting(setting, val)}
+ props={{ ...setting.props, error: errors[setting.key] }}
+ {bindings}
+ />
+{/each}
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/ThemePanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/ThemePanel.svelte
new file mode 100644
index 0000000000..13a008fae0
--- /dev/null
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/ThemePanel.svelte
@@ -0,0 +1,78 @@
+
+
+
+
+ These settings apply to all screens
+
+
+
+
+
+
+
+ update("buttonBorderRadius", e.detail)}
+ />
+
+ update("primaryColor", val)}
+ props={{
+ spectrumTheme: $store.theme,
+ }}
+ />
+ update("primaryColorHover", val)}
+ props={{
+ spectrumTheme: $store.theme,
+ }}
+ />
+
+
+
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/index.svelte
new file mode 100644
index 0000000000..778fa303cc
--- /dev/null
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Screen/index.svelte
@@ -0,0 +1,51 @@
+
+
+
+
+
+ {#each tabs as tab}
+
{
+ activeTab = tab
+ }}
+ >
+ {capitalise(tab)}
+
+ {/each}
+
+
+
+ {#if activeTab === "theme"}
+
+ {:else}
+
+ {/if}
+
+
+
+
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_layout.svelte
new file mode 100644
index 0000000000..19cb1d8dff
--- /dev/null
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_layout.svelte
@@ -0,0 +1,52 @@
+
+
+{#if routeComponentId === `${$store.selectedScreenId}-screen`}
+
+{:else if routeComponentId === `${$store.selectedScreenId}-navigation`}
+
+{:else}
+
+{/if}
+
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/index.svelte
new file mode 100644
index 0000000000..0ff63d1ead
--- /dev/null
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/index.svelte
@@ -0,0 +1 @@
+
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/NewComponentPanel.svelte
similarity index 98%
rename from packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte
rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/NewComponentPanel.svelte
index 7dca5b792b..248bbc8141 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/NewComponentPanel.svelte
@@ -31,6 +31,10 @@
$: orderMap = createComponentOrderMap(componentList)
const getAllowedComponents = (allComponents, screen, component) => {
+ // Default to using the root screen container if no component specified
+ if (!component) {
+ component = screen.props
+ }
const path = findComponentPath(screen?.props, component?._id)
if (!path?.length) {
return []
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/componentStructure.json b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json
similarity index 100%
rename from packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/componentStructure.json
rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/index.svelte
similarity index 100%
rename from packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/index.svelte
rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/index.svelte
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPanel.svelte
index 785b221239..09f97302fd 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPanel.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPanel.svelte
@@ -1,32 +1,16 @@