diff --git a/packages/builder/src/components/userInterface/Colorpicker/Colorpicker.svelte b/packages/builder/src/components/userInterface/Colorpicker/Colorpicker.svelte
index 2ae31385aa..27b5e20b5b 100644
--- a/packages/builder/src/components/userInterface/Colorpicker/Colorpicker.svelte
+++ b/packages/builder/src/components/userInterface/Colorpicker/Colorpicker.svelte
@@ -13,16 +13,18 @@
import Palette from "./Palette.svelte"
import ButtonGroup from "./ButtonGroup.svelte"
import Input from "./Input.svelte"
+ import Portal from "./Portal.svelte"
export let value = "#3ec1d3ff"
+ export let open = false;
export let swatches = [] //TODO: Safe swatches - limit to 12. warn in console
export let disableSwatches = false
export let format = "hexa"
- export let open = false
-
+ export let style = ""
export let pickerHeight = 0
export let pickerWidth = 0
+ let colorPicker = null
let adder = null
let h = null
@@ -38,6 +40,10 @@
getRecentColors()
}
+ if(colorPicker) {
+ colorPicker.focus()
+ }
+
if (format) {
convertAndSetHSVA()
}
@@ -50,6 +56,12 @@
}
}
+ function handleEscape(e) {
+ if(open && e.key === "Escape") {
+ open = false
+ }
+ }
+
function setRecentColor(color) {
if (swatches.length === 12) {
swatches.splice(0, 1)
@@ -145,85 +157,97 @@
}
$: border = v > 90 && s < 5 ? "1px dashed #dedada" : ""
- $: style = buildStyle({ background: value, border })
+ $: selectedColorStyle = buildStyle({ background: value, border })
$: shrink = swatches.length > 0
+
-
-
+
+
-
-
-
-
-
setHue(hue.detail)}
- on:dragend={dispatchValue} />
+
-
+
+
+
+
setAlpha(alpha.detail, isDrag)}
+ type="hue"
+ value={h}
+ on:change={hue => setHue(hue.detail)}
on:dragend={dispatchValue} />
-
+
+ setAlpha(alpha.detail, isDrag)}
+ on:dragend={dispatchValue} />
+
+
+
+
+
+ {#if !disableSwatches}
+
+ {#if swatches.length > 0}
+ {#each swatches as color, idx}
+
applySwatch(color)}
+ on:removeswatch={() => removeSwatch(idx)} />
+ {/each}
+ {/if}
+ {#if swatches.length !== 12}
+
+ +
+
+ {/if}
+
+ {/if}
+
+
+
+ handleColorInput(event.target.value)}
+ on:change={dispatchInputChange} />
- {#if !disableSwatches}
-
- {#if swatches.length > 0}
- {#each swatches as color, idx}
-
applySwatch(color)}
- on:removeswatch={() => removeSwatch(idx)} />
- {/each}
- {/if}
- {#if swatches.length !== 12}
-
- +
-
- {/if}
-
- {/if}
-
-
-
- handleColorInput(event.target.value)}
- on:change={dispatchInputChange} />
-
-
-
+
diff --git a/packages/standard-components/src/DataFormWide.svelte b/packages/standard-components/src/DataFormWide.svelte
new file mode 100644
index 0000000000..f712c787de
--- /dev/null
+++ b/packages/standard-components/src/DataFormWide.svelte
@@ -0,0 +1,173 @@
+
+
+
+
+
diff --git a/packages/standard-components/src/index.js b/packages/standard-components/src/index.js
index 24342066e8..37d6abab74 100644
--- a/packages/standard-components/src/index.js
+++ b/packages/standard-components/src/index.js
@@ -16,6 +16,7 @@ export { default as icon } from "./Icon.svelte"
export { default as Navigation } from "./Navigation.svelte"
export { default as datatable } from "./DataTable.svelte"
export { default as dataform } from "./DataForm.svelte"
+export { default as dataformwide } from "./DataFormWide.svelte"
export { default as datachart } from "./DataChart.svelte"
export { default as datalist } from "./DataList.svelte"
export { default as list } from "./List.svelte"