diff --git a/packages/builder/.vscode/launch.json b/packages/builder/.vscode/launch.json new file mode 100644 index 0000000000..f6b35a0b63 --- /dev/null +++ b/packages/builder/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:3000", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/packages/builder/rollup.config.js b/packages/builder/rollup.config.js index 834e0b9a9b..c0869fbdba 100644 --- a/packages/builder/rollup.config.js +++ b/packages/builder/rollup.config.js @@ -34,7 +34,7 @@ const production = !process.env.ROLLUP_WATCH; const lodash_fp_exports = ["union", "reduce", "isUndefined", "cloneDeep", "split", "some", "map", "filter", "isEmpty", "countBy", "includes", "last", "find", "constant", "take", "first", "intersection", "mapValues", "isNull", "has", "isNumber", "isString", "isBoolean", "isDate", "isArray", "isObject", "clone", "values", "keyBy", "keys", "orderBy", "concat", "reverse", "difference", "merge", "flatten", "each", "pull", "join", "defaultCase", "uniqBy", "every", "uniqWith", "isFunction", "groupBy", -"differenceBy", "intersectionBy", "isEqual", "max", "sortBy", "assign", "uniq", "trimChars", "trimCharsStart", "isObjectLike"]; +"differenceBy", "intersectionBy", "isEqual", "max", "sortBy", "assign", "uniq", "trimChars", "trimCharsStart", "isObjectLike", "flattenDeep", "indexOf"]; const lodash_exports = ["toNumber", "flow", "isArray", "join", "replace", "trim", "dropRight", "takeRight", "head", "isUndefined", "isNull", "isNaN", "reduce", "isEmpty", "constant", "tail", "includes", "startsWith", "findIndex", "isInteger", "isDate", "isString", "split", "clone", "keys", "isFunction", "merge", "has", "isBoolean", "isNumber", diff --git a/packages/builder/src/common/Button.svelte b/packages/builder/src/common/Button.svelte index 7bd6f8e96e..6254a9f4bf 100644 --- a/packages/builder/src/common/Button.svelte +++ b/packages/builder/src/common/Button.svelte @@ -14,7 +14,7 @@ $: borderClass = grouped diff --git a/packages/builder/src/common/IconButton.svelte b/packages/builder/src/common/IconButton.svelte index 43a4ea8f58..5880cd90bc 100644 --- a/packages/builder/src/common/IconButton.svelte +++ b/packages/builder/src/common/IconButton.svelte @@ -6,15 +6,43 @@ export let icon = ""; export let style = ""; export let color = ""; export let hoverColor = ""; +export let attributes = {}; $: borderClass = grouped ? "" : "border-normal"; +let currentAttributes = []; +const addAttributes = (node, attributes) => { + + const add = (_attributes) => { + const attrs = []; + for(let attr in _attributes) { + node.setAttribute(attr, _attributes[attr]); + attrs.push("uk-toggle") + } + currentAttributes = attrs; + } + + add(attributes); + + return { + // should implement update method + update(attributes) { + for(let attr of currentAttributes) { + node.removeAttribute(attr) + } + add(attributes); + }, + destroy() {} + } +} + diff --git a/packages/builder/src/common/Textbox.svelte b/packages/builder/src/common/Textbox.svelte index 86e1264542..92eb542743 100644 --- a/packages/builder/src/common/Textbox.svelte +++ b/packages/builder/src/common/Textbox.svelte @@ -3,12 +3,30 @@ export let text = ""; export let label = ""; export let width = "medium"; export let size = "small"; +export let margin = true; +export let infoText = ""; +export let hasError = false; +export let disabled = false; -