From 8c9618b33b66327f19290bf6239428d283fbfbae Mon Sep 17 00:00:00 2001 From: Conor_Mack <36074859+Conor-Mack@users.noreply.github.com> Date: Fri, 7 Feb 2020 20:56:00 +0000 Subject: [PATCH] Completed textfield, minor bug fixes and config changes to reference uncompiled components (#83) * Beginnings of text field * Completed textfield component and its dependents * Minor bug fixes --- .../materialdesign-components/package.json | 5 +- .../public/index.html | 3 +- .../rollup.testconfig.js | 19 +- .../src/Button/Button.svelte | 6 +- .../src/ClassBuilder.js | 9 +- .../src/Common/FloatingLabel.svelte | 7 + .../src/Common/NotchedOutline.svelte | 14 ++ .../materialdesign-components/src/Icon.svelte | 7 +- .../src/Test/TestApp.svelte | 3 +- .../src/Test/createApp.js | 3 +- .../src/Test/props.js | 14 +- .../src/Test/testComponents.js | 5 +- .../src/Textfield/Textfield.svelte | 173 ++++++++++++++++++ .../src/Textfield/_index.scss | 5 + .../src/Textfield/_mixins.scss | 45 +++++ .../src/Textfield/index.js | 2 + .../materialdesign-components/src/index.js | 3 +- 17 files changed, 304 insertions(+), 19 deletions(-) create mode 100644 packages/materialdesign-components/src/Common/FloatingLabel.svelte create mode 100644 packages/materialdesign-components/src/Common/NotchedOutline.svelte create mode 100644 packages/materialdesign-components/src/Textfield/Textfield.svelte create mode 100644 packages/materialdesign-components/src/Textfield/_index.scss create mode 100644 packages/materialdesign-components/src/Textfield/_mixins.scss create mode 100644 packages/materialdesign-components/src/Textfield/index.js diff --git a/packages/materialdesign-components/package.json b/packages/materialdesign-components/package.json index 69e08883ce..15d80d9e50 100644 --- a/packages/materialdesign-components/package.json +++ b/packages/materialdesign-components/package.json @@ -38,5 +38,8 @@ ], "version": "0.0.15", "license": "MIT", - "gitHead": "115189f72a850bfb52b65ec61d932531bf327072" + "gitHead": "115189f72a850bfb52b65ec61d932531bf327072", + "dependencies": { + "@material/textfield": "^4.0.0" + } } diff --git a/packages/materialdesign-components/public/index.html b/packages/materialdesign-components/public/index.html index 0008e34ed7..0571dbd6ee 100644 --- a/packages/materialdesign-components/public/index.html +++ b/packages/materialdesign-components/public/index.html @@ -4,7 +4,8 @@ - Svelte app + Budibase-Material Design + diff --git a/packages/materialdesign-components/rollup.testconfig.js b/packages/materialdesign-components/rollup.testconfig.js index dcbc392563..33c668b66a 100644 --- a/packages/materialdesign-components/rollup.testconfig.js +++ b/packages/materialdesign-components/rollup.testconfig.js @@ -5,15 +5,31 @@ import livereload from "rollup-plugin-livereload" import { terser } from "rollup-plugin-terser" import json from "rollup-plugin-json" import alias from "rollup-plugin-alias" +import postcss from "rollup-plugin-postcss"; import path from "path" const aliases = { resolve: [".js", ".svelte"], entries: [ - { find: "@BBMD", replacement: path.resolve(__dirname, "dist/index.js") }, + // { find: "@BBMD", replacement: path.resolve(__dirname, "dist/index.js") }, + { find: "@BBMD", replacement: path.resolve(__dirname, "src/index.js") }, ], } +const postcssOptions = () => ({ + extensions: [".scss", ".sass"], + extract: false, + minimize: true, + use: [ + [ + "sass", + { + includePaths: ["./node_modules"], + }, + ], + ], +}) + const production = !process.env.ROLLUP_WATCH const lodash_fp_exports = [ @@ -142,6 +158,7 @@ export default { // If we're building for production (npm run build // instead of npm run dev), minify production && terser(), + postcss(postcssOptions()), ], watch: { clearScreen: false, diff --git a/packages/materialdesign-components/src/Button/Button.svelte b/packages/materialdesign-components/src/Button/Button.svelte index 1bd40b2d78..eee93cac6d 100644 --- a/packages/materialdesign-components/src/Button/Button.svelte +++ b/packages/materialdesign-components/src/Button/Button.svelte @@ -13,7 +13,7 @@ export let href = "" export let icon = "" export let trailingIcon = false - export let fullBleed = false + export let fullwidth = false export let text = "" export let disabled = false @@ -40,7 +40,7 @@