diff --git a/package.json b/package.json
index 01e91b64ac..ea235ae5b4 100644
--- a/package.json
+++ b/package.json
@@ -24,5 +24,8 @@
"lint:fix": "eslint --fix packages",
"format": "prettier --write \"{,!(node_modules)/**/}*.{js,jsx,svelte}\""
},
- "dependencies": {}
+ "dependencies": {
+ "@material/icon-button": "4.0.0",
+ "date-fns": "^2.10.0"
+ }
}
diff --git a/packages/builder/src/budibase.css b/packages/builder/src/budibase.css
index 30fb9fd02b..7a82999241 100644
--- a/packages/builder/src/budibase.css
+++ b/packages/builder/src/budibase.css
@@ -1,7 +1,8 @@
/* Budibase Component Styles */
.header {
font-size: 0.75rem;
- color: #999;
+ color: #000333;
+ opacity: 0.4;
text-transform: uppercase;
margin-top: 1rem;
font-weight: 500;
@@ -58,7 +59,7 @@
cursor: pointer;
padding: 0 7px 0 3px;
height: 35px;
- margin: 5px 0;
+ margin: 5px 20px 5px 0px;
border-radius: 0 5px 5px 0;
display: flex;
align-items: center;
@@ -68,7 +69,7 @@
.budibase__nav-item.selected {
color: var(--button-text);
- background: var(--background-button) !important;
+ background: #fafafa !important;
}
.budibase__nav-item:hover {
@@ -82,7 +83,7 @@
border: 1px solid #DBDBDB;
text-align: left;
letter-spacing: 0.7px;
- color: #163057;
+ color: #000333;
font-size: 16px;
padding-left: 5px;
}
diff --git a/packages/builder/src/common/ActionButton.svelte b/packages/builder/src/common/ActionButton.svelte
index e1230692d1..f4f13c0757 100644
--- a/packages/builder/src/common/ActionButton.svelte
+++ b/packages/builder/src/common/ActionButton.svelte
@@ -2,6 +2,7 @@
export let disabled = false
export let hidden = false
export let primary = true
+ export let cancel = false
export let alert = false
export let warning = false
@@ -12,6 +13,7 @@
class:hidden
class:primary
class:alert
+ class:cancel
class:warning
{disabled}>
@@ -19,8 +21,8 @@
diff --git a/packages/builder/src/common/ConfirmDialog.svelte b/packages/builder/src/common/ConfirmDialog.svelte
index 5d1002c483..8b69a120ad 100644
--- a/packages/builder/src/common/ConfirmDialog.svelte
+++ b/packages/builder/src/common/ConfirmDialog.svelte
@@ -41,13 +41,26 @@
@@ -108,17 +110,28 @@
padding: 0;
}
+
+.root {
+ display: grid;
+ grid-template-columns: 275px 1fr 275px;
+ height: 100%;
+ width: 100%;
+ background: #fafafa;
+}
+
+@media only screen and (min-width: 1800px) {
.root {
display: grid;
- grid-template-columns: 290px 1fr 350px;
+ grid-template-columns: 300px 1fr 300px;
height: 100%;
width: 100%;
background: #fafafa;
}
+}
.ui-nav {
grid-column: 1;
- background-color: var(--secondary5);
+ background-color: var(--white);
height: calc(100vh - 49px);
padding: 0;
overflow: hidden;
@@ -136,29 +149,34 @@
.components-pane {
grid-column: 3;
- background-color: var(--secondary5);
+ background-color: var(--white);
min-height: 0px;
overflow-y: hidden;
}
- .components-nav-header {
- font-size: 0.75rem;
- color: #999;
+ .components-nav-page {
+ font-size: 12px;
+ color: #000333;
text-transform: uppercase;
- margin-top: 1rem;
- font-weight: 500;
+ padding-left: 20px;
+ margin-top: 20px;
+ font-weight: 700;
+ opacity: 0.6;
}
- .nav-group-header {
- font-size: 0.9rem;
- padding-left: 1rem;
+ .components-nav-header {
+ font-size: 12px;
+ color: #000333;
+ text-transform: uppercase;
+ margin-top: 20px;
+ font-weight: 700;
+ opacity: 0.6;
}
.nav-header {
display: flex;
flex-direction: column;
- margin-top: 1.5rem;
- padding: 0 1.8rem;
+ margin-top: 20px;
}
.nav-items-container {
@@ -167,7 +185,7 @@
.nav-group-header {
display: flex;
- padding: 1.5rem 0 0 1.8rem;
+ padding: 0px 20px 0px 20px;
font-size: 0.9rem;
font-weight: bold;
justify-content: space-between;
@@ -200,20 +218,20 @@
}
.navigator-title {
+ font-size: 14px;
+ color: var(--secondary100);
+ font-weight: 500;
text-transform: uppercase;
- font-weight: 400;
- color: #999;
- font-size: 0.9rem;
+ padding: 0 20px 20px 20px;
+ line-height: 1rem !important;
}
.border-line {
- border-bottom: 1px solid #ddd;
- margin-top: 1.5rem;
- width: calc(100% + 1.5rem);
+ border-bottom: 1px solid #d8d8d8;
}
.components-list-container {
overflow: auto;
- padding: 0 30px 0 0;
+ padding: 20px 0px 0 0;
}
diff --git a/packages/materialdesign-components/components.json b/packages/materialdesign-components/components.json
index 0028b39545..d017e54b11 100644
--- a/packages/materialdesign-components/components.json
+++ b/packages/materialdesign-components/components.json
@@ -169,6 +169,16 @@
"description": "Material Design
.",
"props": {}
},
+ "DatePicker": {
+ "name": "DatePicker",
+ "description": "Material Design DatePicker",
+ "props": {
+ "date": "string",
+ "label": "string",
+ "onSelect": "event"
+ },
+ "tags": []
+ },
"H1": {
"name": "H1",
"description": "Sets the font properties as Roboto Headline1",
@@ -217,6 +227,18 @@
},
"tags": []
},
+ "IconButton": {
+ "onClick": "event",
+ "disabled": "bool",
+ "href": "string",
+ "icon": "string",
+ "size": {
+ "type":"options",
+ "options": ["small", "medium", "large"],
+ "default": "medium"
+ },
+ "tags": []
+ },
"Label": {
"name": "Label",
"description": "A simple label component that displays its text in the standard Roboto Material Design font",
diff --git a/packages/materialdesign-components/package.json b/packages/materialdesign-components/package.json
index 576aebeed5..f21c6c8d6b 100644
--- a/packages/materialdesign-components/package.json
+++ b/packages/materialdesign-components/package.json
@@ -18,6 +18,7 @@
"@material/checkbox": "^4.0.0",
"@material/data-table": "4.0.0",
"@material/form-field": "^4.0.0",
+ "@material/icon-button": "4.0.0",
"@material/list": "4.0.0",
"@material/menu": "4.0.0",
"@material/radio": "^4.0.0",
@@ -25,6 +26,7 @@
"@material/textfield": "^4.0.0",
"@nx-js/compiler-util": "^2.0.0",
"bcryptjs": "^2.4.3",
+ "date-fns": "^2.10.0",
"fs-extra": "^8.1.0",
"lodash": "^4.17.15",
"npm-run-all": "^4.1.5",
diff --git a/packages/materialdesign-components/src/Common/Ripple.js b/packages/materialdesign-components/src/Common/Ripple.js
index 2553bbca65..6a19dac3ea 100644
--- a/packages/materialdesign-components/src/Common/Ripple.js
+++ b/packages/materialdesign-components/src/Common/Ripple.js
@@ -2,7 +2,7 @@ import { MDCRipple } from "@material/ripple"
export default function ripple(
node,
- props = { colour: "primary", unbounded: false }
+ props = { colour: "primary", unbounded: true }
) {
node.classList.add("mdc-ripple-surface")
let component = new MDCRipple(node)
diff --git a/packages/materialdesign-components/src/DatePicker/DatePicker.svelte b/packages/materialdesign-components/src/DatePicker/DatePicker.svelte
new file mode 100644
index 0000000000..d43cbc072e
--- /dev/null
+++ b/packages/materialdesign-components/src/DatePicker/DatePicker.svelte
@@ -0,0 +1,178 @@
+
+
+
+
+
diff --git a/packages/materialdesign-components/src/DatePicker/_style.scss b/packages/materialdesign-components/src/DatePicker/_style.scss
new file mode 100644
index 0000000000..6cc1f5510a
--- /dev/null
+++ b/packages/materialdesign-components/src/DatePicker/_style.scss
@@ -0,0 +1,15 @@
+@import "@material/ripple/mdc-ripple.scss";
+@import "@material/theme/mixins";
+
+.bbmd-day {
+ transition: background-color .25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
+ display: flex;
+ border-radius: 50%;
+ justify-content: center;
+ align-items: center;
+ cursor: pointer;
+}
+.selected {
+ @include mdc-theme-prop(background-color, primary);
+ @include mdc-theme-prop(color, on-primary);
+}
diff --git a/packages/materialdesign-components/src/DatePicker/index.js b/packages/materialdesign-components/src/DatePicker/index.js
new file mode 100644
index 0000000000..de6a6e1f09
--- /dev/null
+++ b/packages/materialdesign-components/src/DatePicker/index.js
@@ -0,0 +1,2 @@
+import "./_style.scss";
+export { default as DatePicker } from "./DatePicker.svelte";
diff --git a/packages/materialdesign-components/src/IconButton/IconButton.svelte b/packages/materialdesign-components/src/IconButton/IconButton.svelte
new file mode 100644
index 0000000000..57580776e3
--- /dev/null
+++ b/packages/materialdesign-components/src/IconButton/IconButton.svelte
@@ -0,0 +1,66 @@
+
+
+{#if useLinkButton}
+
+ {#if isToggleButton}
+
+ {onIcon}
+
+ {icon}
+ {:else}{icon}{/if}
+
+{:else}
+
+{/if}
diff --git a/packages/materialdesign-components/src/IconButton/_style.scss b/packages/materialdesign-components/src/IconButton/_style.scss
new file mode 100644
index 0000000000..412ea0ad6a
--- /dev/null
+++ b/packages/materialdesign-components/src/IconButton/_style.scss
@@ -0,0 +1,18 @@
+@import "@material/icon-button/mdc-icon-button";
+
+.mdc-icon-button {
+
+ &.bbmd-mdc-icon-button--size-large {
+ @include mdc-icon-button-icon-size(24px);
+ }
+
+ &.bbmd-mdc-icon-button--size-medium {
+ @include mdc-icon-button-icon-size(20px);
+ }
+
+ &.bbmd-mdc-icon-button--size-small {
+ @include mdc-icon-button-icon-size(16px);
+ }
+}
+
+
diff --git a/packages/materialdesign-components/src/IconButton/index.js b/packages/materialdesign-components/src/IconButton/index.js
new file mode 100644
index 0000000000..697e69f10c
--- /dev/null
+++ b/packages/materialdesign-components/src/IconButton/index.js
@@ -0,0 +1,2 @@
+import "./_style.scss";
+export { default as IconButton } from "./IconButton.svelte";
diff --git a/packages/materialdesign-components/src/Test/TestApp.svelte b/packages/materialdesign-components/src/Test/TestApp.svelte
index baf3db4c81..a84d0280d4 100644
--- a/packages/materialdesign-components/src/Test/TestApp.svelte
+++ b/packages/materialdesign-components/src/Test/TestApp.svelte
@@ -17,6 +17,8 @@
Icon,
List,
Select,
+ DatePicker,
+ IconButton,
} = props
let currentComponent
@@ -34,6 +36,8 @@
Select,
Radiobutton,
Radiobuttongroup,
+ DatePicker,
+ IconButton,
],
},
}
diff --git a/packages/materialdesign-components/src/Test/props.js b/packages/materialdesign-components/src/Test/props.js
index 73672f7b3e..e53441c8ce 100644
--- a/packages/materialdesign-components/src/Test/props.js
+++ b/packages/materialdesign-components/src/Test/props.js
@@ -205,5 +205,16 @@ export const props = {
value: "2",
},
],
- }
+ },
+ DatePicker: {
+ _component: "@budibase/materialdesign-components/DatePicker",
+ _children: [],
+ label: "Date of Admission",
+ onSelect: date => console.log("SELECTED DATE", date)
+ },
+ IconButton: {
+ _component: "@budibase/materialdesign-components/IconButton",
+ _children: [],
+ icon: "calendar_today",
+ },
}
diff --git a/packages/materialdesign-components/src/Textfield/Textfield.svelte b/packages/materialdesign-components/src/Textfield/Textfield.svelte
index 7de3141e54..36c4618df3 100644
--- a/packages/materialdesign-components/src/Textfield/Textfield.svelte
+++ b/packages/materialdesign-components/src/Textfield/Textfield.svelte
@@ -9,10 +9,12 @@
import HelperText from "./HelperText.svelte"
import CharacterCounter from "./CharacterCounter.svelte"
import Icon from "../Common/Icon.svelte"
+ import { IconButton } from "../IconButton"
const cb = new ClassBuilder("text-field", ["primary", "medium"])
let tf = null
+ export let tfHeight = null
let tfInstance = null
onMount(() => {
@@ -40,6 +42,8 @@
export let placeholder = ""
export let icon = ""
export let trailingIcon = false
+ export let useIconButton = false
+ export let iconButtonClick = () => {}
export let textarea = false
export let rows = 4
export let cols = 40
@@ -93,10 +97,11 @@
function changed(e) {
const val = e.target.value
value = val
- if (_bb.isBound(_bb.props.value)) {
- _bb.setStateFromBinding(_bb.props.value, val)
- }
- _bb.call(onChange, val)
+ onChange(value)
+ // if (_bb.isBound(_bb.props.value)) {
+ // _bb.setStateFromBinding(_bb.props.value, val)
+ // }
+ // _bb.call(onChange, val)
}
@@ -105,7 +110,7 @@ TODO:Needs error handling - this will depend on how Budibase handles errors
-->
-
+
{#if textarea}
{:else}
{#if renderLeadingIcon}
-
+ {#if useIconButton}
+
+ {:else}
+
+ {/if}
{/if}
{#if renderTrailingIcon}
-
+ {#if useIconButton}
+
+ {:else}
+
+ {/if}
{/if}
{#if variant !== 'outlined'}
diff --git a/packages/materialdesign-components/src/Typography/Caption.svelte b/packages/materialdesign-components/src/Typography/Caption.svelte
index 17d60048d3..84c8c39d61 100644
--- a/packages/materialdesign-components/src/Typography/Caption.svelte
+++ b/packages/materialdesign-components/src/Typography/Caption.svelte
@@ -2,4 +2,4 @@
export let text = ""
-
{text}
+
{text}
diff --git a/packages/materialdesign-components/src/index.js b/packages/materialdesign-components/src/index.js
index 5e1df0081e..13cf4fb2ca 100644
--- a/packages/materialdesign-components/src/index.js
+++ b/packages/materialdesign-components/src/index.js
@@ -19,3 +19,5 @@ export { default as recordForm } from "./Templates/recordForm"
export { List, ListItem } from "./List"
export { Menu } from "./Menu"
export { Select } from "./Select"
+export { DatePicker } from "./DatePicker"
+export { IconButton } from "./IconButton"
diff --git a/packages/standard-components/src/Button.svelte b/packages/standard-components/src/Button.svelte
index d4bcd7b354..10f66d9311 100644
--- a/packages/standard-components/src/Button.svelte
+++ b/packages/standard-components/src/Button.svelte
@@ -78,13 +78,12 @@
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 2px;
- color: #333;
- background-color: #f4f4f4;
+ color: #000333;
outline: none;
}
.default:active {
- background-color: #ddd;
+ background-color: #f9f9f9;
}
.default:focus {
diff --git a/packages/standard-components/src/Login.svelte b/packages/standard-components/src/Login.svelte
index b3f6f36779..501023d83e 100644
--- a/packages/standard-components/src/Login.svelte
+++ b/packages/standard-components/src/Login.svelte
@@ -155,16 +155,15 @@
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 2px;
- color: #333;
- background-color: #f4f4f4;
+ color: #000333;
outline: none;
}
.default-button:active {
- background-color: #ddd;
+ background-color: #f9f9f9;
}
.default-button:focus {
- border-color: #666;
+ border-color: #f9f9f9;
}
diff --git a/yarn.lock b/yarn.lock
index 0daff7db37..7a11b53ea3 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -756,6 +756,62 @@
npmlog "^4.1.2"
write-file-atomic "^2.3.0"
+"@material/animation@^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@material/animation/-/animation-4.0.0.tgz#19eaf377809f20978f8452a4237d27867d3ffd1d"
+ integrity sha512-IfzXzstWdtKQcsNWu+s2Hpz5dBwkTHtgtzoesr+FC7TqENH+SJdsF1ntnZI1XVi2C9ZlBf7f4BSmXpWHD0MIlw==
+ dependencies:
+ tslib "^1.9.3"
+
+"@material/base@^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@material/base/-/base-4.0.0.tgz#535574d0b63c18892cfb70e88b27bc8f8090677a"
+ integrity sha512-vHm7fkqXzjdfxifXvlmaZColoIfKuWmO+1rvdzDORTWP+A8Dq70cgKd2I1SBqxzDGjOasMzHbQI6f9MISQf2vQ==
+ dependencies:
+ tslib "^1.9.3"
+
+"@material/dom@^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@material/dom/-/dom-4.0.0.tgz#f0e68c4429e555040304c958bb3e11614276fdfa"
+ integrity sha512-GRCJT9+PGWqygZwGf1XLTrbmzP35YWG7+T0hpfhoIJO8VDiMTeyfvhJXFuA2wh9pD0noEjte0lmbdBlykrbWZw==
+ dependencies:
+ tslib "^1.9.3"
+
+"@material/feature-targeting@^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-4.0.0.tgz#8d9d1470801a1fd166773731613d9fa89e0fd85e"
+ integrity sha512-0gk+f151vqmEdWkrQ9ocPlQRU9aUtSGsVBhletqIbsthLUsZIz9qk25FHjV1wHd/bGHknd9NH+T8ENprv3KLFg==
+
+"@material/icon-button@4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@material/icon-button/-/icon-button-4.0.0.tgz#f7293462f1b4967712f9b8755b87c2228dcccc3d"
+ integrity sha512-b1SyWtr2cwlKgIVo+irxRgW0lpIzauADLAxQEJ8/RTO9qVFviohJUnS+5QQCkC5zex5Q52OmQ+aNl0KRjkUdvQ==
+ dependencies:
+ "@material/base" "^4.0.0"
+ "@material/feature-targeting" "^4.0.0"
+ "@material/ripple" "^4.0.0"
+ "@material/theme" "^4.0.0"
+ tslib "^1.9.3"
+
+"@material/ripple@^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@material/ripple/-/ripple-4.0.0.tgz#906ba421a3e6c68651d829d44c50a95060aa1e75"
+ integrity sha512-9BLIOvyCP5sM+fQpLlcJZWyrHguusJq8E5A1pxg0wQwputOyaPBM7recHhYkJmVjzRpTcPgf1PkvkpN6DKGcNg==
+ dependencies:
+ "@material/animation" "^4.0.0"
+ "@material/base" "^4.0.0"
+ "@material/dom" "^4.0.0"
+ "@material/feature-targeting" "^4.0.0"
+ "@material/theme" "^4.0.0"
+ tslib "^1.9.3"
+
+"@material/theme@^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@material/theme/-/theme-4.0.0.tgz#8de388fcdbae20fd09b02a3bdef3049bf2f623a8"
+ integrity sha512-vS4G4rusJTatTH50kSYO1U3UGN8EY9kGRvPaFsEFKikJBOqcR6KWK9H9/wCLqqd6nDNifEj9H2sdWw1AV4NA6Q==
+ dependencies:
+ "@material/feature-targeting" "^4.0.0"
+
"@mrmlnc/readdir-enhanced@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
@@ -1630,6 +1686,11 @@ dashdash@^1.12.0:
dependencies:
assert-plus "^1.0.0"
+date-fns@^2.10.0:
+ version "2.10.0"
+ resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.10.0.tgz#abd10604d8bafb0bcbd2ba2e9b0563b922ae4b6b"
+ integrity sha512-EhfEKevYGWhWlZbNeplfhIU/+N+x0iCIx7VzKlXma2EdQyznVlZhCptXUY+BegNpPW2kjdx15Rvq503YcXXrcA==
+
dateformat@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"