|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import Input from "../common/Input.svelte" |
|
|
|
import OptionSelect from "./OptionSelect.svelte" |
|
|
|
import InputGroup from "../common/Inputs/InputGroup.svelte" |
|
|
|
import FlatButtonGroup from "./FlatButtonGroup.svelte" |
|
|
|
// import Colorpicker from "../common/Colorpicker.svelte"
|
|
|
|
/* |
|
|
|
TODO: Allow for default values for all properties |
|
|
|
@ -20,13 +21,16 @@ export const layout = [ |
|
|
|
{ |
|
|
|
label: "Direction", |
|
|
|
key: "flex-direction", |
|
|
|
control: OptionSelect, |
|
|
|
initialValue: "Row", |
|
|
|
options: [ |
|
|
|
{ label: "Row", value: "row" }, |
|
|
|
{ label: "Row Reverse", value: "rowReverse" }, |
|
|
|
{ label: "column", value: "column" }, |
|
|
|
{ label: "Column Reverse", value: "columnReverse" }, |
|
|
|
control: FlatButtonGroup, |
|
|
|
buttonProps: [ |
|
|
|
{ icon: "ri-arrow-right-line", padding: "4px 8px", value: "row" }, |
|
|
|
{ icon: "ri-arrow-left-line", padding: "4px 8px", value: "rowReverse" }, |
|
|
|
{ icon: "ri-arrow-down-line", padding: "4px 8px", value: "column" }, |
|
|
|
{ |
|
|
|
icon: "ri-arrow-up-line", |
|
|
|
padding: "4px 8px", |
|
|
|
value: "columnReverse", |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
@ -68,10 +72,10 @@ export const layout = [ |
|
|
|
] |
|
|
|
|
|
|
|
const spacingMeta = [ |
|
|
|
{ placeholder: "L" }, |
|
|
|
{ placeholder: "B" }, |
|
|
|
{ placeholder: "R" }, |
|
|
|
{ placeholder: "T" }, |
|
|
|
{ placeholder: "↑" }, |
|
|
|
{ placeholder: "→" }, |
|
|
|
{ placeholder: "↓" }, |
|
|
|
{ placeholder: "←" }, |
|
|
|
] |
|
|
|
|
|
|
|
export const spacing = [ |
|
|
|
@ -85,12 +89,54 @@ export const spacing = [ |
|
|
|
] |
|
|
|
|
|
|
|
export const size = [ |
|
|
|
{ label: "Width", key: "width", control: Input }, |
|
|
|
{ label: "Height", key: "height", control: Input }, |
|
|
|
{ label: "Min W", key: "min-width", control: Input }, |
|
|
|
{ label: "Min H", key: "min-height", control: Input }, |
|
|
|
{ label: "Max W", key: "max-width", control: Input }, |
|
|
|
{ label: "Max H", key: "max-height", control: Input }, |
|
|
|
{ |
|
|
|
label: "Width", |
|
|
|
key: "width", |
|
|
|
control: Input, |
|
|
|
placeholder: "px", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Height", |
|
|
|
key: "height", |
|
|
|
control: Input, |
|
|
|
placeholder: "px", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Min W", |
|
|
|
key: "min-width", |
|
|
|
control: Input, |
|
|
|
placeholder: "px", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Min H", |
|
|
|
key: "min-height", |
|
|
|
control: Input, |
|
|
|
placeholder: "px", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Max W", |
|
|
|
key: "max-width", |
|
|
|
control: Input, |
|
|
|
placeholder: "px", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Max H", |
|
|
|
key: "max-height", |
|
|
|
control: Input, |
|
|
|
placeholder: "px", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
] |
|
|
|
|
|
|
|
export const position = [ |
|
|
|
@ -111,26 +157,41 @@ export const position = [ |
|
|
|
label: "Top", |
|
|
|
key: "top", |
|
|
|
control: Input, |
|
|
|
placeholder: "px", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Right", |
|
|
|
key: "right", |
|
|
|
control: Input, |
|
|
|
placeholder: "px", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Bottom", |
|
|
|
key: "bottom", |
|
|
|
control: Input, |
|
|
|
placeholder: "px", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Left", |
|
|
|
key: "left", |
|
|
|
control: Input, |
|
|
|
placeholder: "px", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Z-index", |
|
|
|
key: "z-index", |
|
|
|
control: Input, |
|
|
|
placeholder: "Num", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
] |
|
|
|
|
|
|
|
@ -166,8 +227,23 @@ export const typography = [ |
|
|
|
control: OptionSelect, |
|
|
|
options: ["normal", "bold", "bolder", "lighter"], |
|
|
|
}, |
|
|
|
{ label: "size", key: "font-size", defaultValue: "", control: Input }, |
|
|
|
{ label: "Line H", key: "line-height", control: Input }, |
|
|
|
{ |
|
|
|
label: "size", |
|
|
|
key: "font-size", |
|
|
|
defaultValue: "", |
|
|
|
control: Input, |
|
|
|
placeholder: "px", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Line H", |
|
|
|
key: "line-height", |
|
|
|
control: Input, |
|
|
|
placeholder: "lh", |
|
|
|
width: "48px", |
|
|
|
textAlign: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Color", |
|
|
|
key: "color", |
|
|
|
@ -176,11 +252,31 @@ export const typography = [ |
|
|
|
{ |
|
|
|
label: "align", |
|
|
|
key: "text-align", |
|
|
|
control: OptionSelect, |
|
|
|
options: ["initial", "left", "right", "center", "justify"], |
|
|
|
}, //custom
|
|
|
|
{ label: "transform", key: "text-transform", control: Input }, //custom
|
|
|
|
{ label: "style", key: "font-style", control: Input }, //custom
|
|
|
|
control: FlatButtonGroup, |
|
|
|
buttonProps: [ |
|
|
|
{ icon: "ri-align-left", padding: "4px 8px", value: "left" }, |
|
|
|
{ icon: "ri-align-center", padding: "4px 8px", value: "center" }, |
|
|
|
{ icon: "ri-align-right", padding: "4px 8px", value: "right" }, |
|
|
|
{ icon: "ri-align-justify", padding: "4px 8px", value: "justify" }, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "transform", |
|
|
|
key: "text-transform", |
|
|
|
control: FlatButtonGroup, |
|
|
|
buttonProps: [ |
|
|
|
{ text: "BB", padding: "4px 8px", fontWeight: 500, value: "uppercase" }, |
|
|
|
{ text: "Bb", padding: "4px 8px", fontWeight: 500, value: "capitalize" }, |
|
|
|
{ text: "bb", padding: "4px 8px", fontWeight: 500, value: "lowercase" }, |
|
|
|
{ |
|
|
|
text: "×", |
|
|
|
padding: "4px 8px", |
|
|
|
fontWeight: 500, |
|
|
|
value: "none", |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ label: "style", key: "font-style", control: Input }, |
|
|
|
] |
|
|
|
|
|
|
|
export const background = [ |
|
|
|
|