{heading}
+{description}
+diff --git a/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte b/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte index fa36018ae8..180ce154a3 100644 --- a/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte +++ b/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte @@ -168,6 +168,9 @@ max-width: 200px; text-overflow: ellipsis; border: 1px solid var(--grey-4); + overflow: hidden; + white-space: pre; + box-sizing: border-box; } tbody tr { @@ -187,6 +190,7 @@ .popovers { display: flex; + gap: var(--spacing-m); } .no-data { diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte index b25d7a4e7b..7de9670b0e 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte @@ -16,12 +16,15 @@ const joinPath = join("/") const normalizedName = name => - pipe(name, [ - trimCharsStart("./"), - trimCharsStart("~/"), - trimCharsStart("../"), - trimChars(" "), - ]) + pipe( + name, + [ + trimCharsStart("./"), + trimCharsStart("~/"), + trimCharsStart("../"), + trimChars(" "), + ] + ) const changeScreen = screen => { store.setCurrentScreen(screen.props._instanceName) @@ -94,10 +97,6 @@ margin: 0 0 0 5px; } - :global(svg) { - transition: 0.2s; - } - .rotate :global(svg) { transform: rotate(-90deg); } diff --git a/packages/builder/src/components/userInterface/PageLayout.svelte b/packages/builder/src/components/userInterface/PageLayout.svelte index d64ab670ba..5889903f2f 100644 --- a/packages/builder/src/components/userInterface/PageLayout.svelte +++ b/packages/builder/src/components/userInterface/PageLayout.svelte @@ -81,10 +81,6 @@ color: var(--grey-7); } - :global(svg) { - transition: 0.2s; - } - .rotate :global(svg) { transform: rotate(-90deg); } diff --git a/packages/builder/src/components/userInterface/propertyCategories.js b/packages/builder/src/components/userInterface/propertyCategories.js index 0a18cb544a..b85a9abacb 100644 --- a/packages/builder/src/components/userInterface/propertyCategories.js +++ b/packages/builder/src/components/userInterface/propertyCategories.js @@ -70,6 +70,20 @@ export const layout = [ { label: "no wrap", value: "noWrap" }, ], }, + { + label: "Gap", + key: "gap", + control: OptionSelect, + options: [ + { label: "None", value: "0px" }, + { label: "4px", value: "4px" }, + { label: "8px", value: "8px" }, + { label: "16px", value: "16px" }, + { label: "20px", value: "20px" }, + { label: "32px", value: "32px" }, + { label: "64px", value: "64px" }, + ], + }, ] export const margin = [ diff --git a/packages/builder/src/components/userInterface/temporaryPanelStructure.js b/packages/builder/src/components/userInterface/temporaryPanelStructure.js index 9a0d74b343..f9cd2740dd 100644 --- a/packages/builder/src/components/userInterface/temporaryPanelStructure.js +++ b/packages/builder/src/components/userInterface/temporaryPanelStructure.js @@ -311,6 +311,166 @@ export default { ], }, }, + { + name: "Card", + description: "Card components", + icon: "ri-layout-bottom-line", + commonProps: {}, + children: [ + { + _component: "@budibase/standard-components/card", + name: "Vertical", + description: + "A basic card component that can contain content and actions.", + icon: "ri-layout-bottom-line", + children: [], + properties: { + design: { ...all }, + settings: [ + { + label: "Image", + key: "imageUrl", + control: Input, + placeholder: "Image", + }, + { + label: "Heading", + key: "heading", + control: Input, + placeholder: "Heading", + }, + { + label: "Description", + key: "description", + control: Input, + placeholder: "Description", + }, + { + label: "Link Text", + key: "linkText", + control: Input, + placeholder: "Link Text", + }, + { + label: "Link Url", + key: "linkUrl", + control: Input, + placeholder: "Link URL", + }, + { + label: "Link Color", + key: "color", + control: Input, + placeholder: "Link Color", + }, + { + label: "Hover Color", + key: "linkHoverColor", + control: Input, + placeholder: "Hover Color", + }, + { + label: "Image Height", + key: "imageHeight", + control: OptionSelect, + options: ["12rem", "16rem", "20rem", "24rem"], + placeholder: "Image Height", + }, + { + label: "Card Width", + key: "cardWidth", + control: OptionSelect, + options: [ "16rem", "20rem", "24rem"], + placeholder: "Card Width", + }, + ], + }, + }, + { + _component: "@budibase/standard-components/cardhorizontal", + name: "Horizontal", + description: + "A basic card component that can contain content and actions.", + icon: "ri-layout-bottom-line", + children: [], + properties: { + design: { ...all }, + settings: [ + { + label: "Image", + key: "imageUrl", + control: Input, + placeholder: "Image", + }, + { + label: "Heading", + key: "heading", + control: Input, + placeholder: "Heading", + }, + { + label: "Description", + key: "description", + control: Input, + placeholder: "Description", + }, + { + label: "Subtext", + key: "subtext", + control: Input, + placeholder: "Subtext", + }, + { + label: "Link Text", + key: "linkText", + control: Input, + placeholder: "Link Text", + }, + { + label: "Link Url", + key: "linkUrl", + control: Input, + placeholder: "Link URL", + }, + { + label: "Link Color", + key: "color", + control: Input, + placeholder: "Link Color", + }, + { + label: "Hover Color", + key: "linkHoverColor", + control: Input, + placeholder: "Hover Color", + }, + { + label: "Card Width", + key: "cardWidth", + control: OptionSelect, + options: [ "24rem", "28rem", "32rem", "40rem", "48rem", "60rem", "100%"], + placeholder: "Card Height", + }, + { + label: "Image Width", + key: "imageWidth", + control: OptionSelect, + options: [ "8rem", "12rem", "16rem"], + placeholder: "Image Width", + }, + { + label: "Image Height", + key: "imageHeight", + control: OptionSelect, + options: [ "8rem", "12rem", "16rem", "auto"], + placeholder: "Image Height", + }, + ], + }, + }, + ] + }, + { _component: "@budibase/materialdesign-components/BasicCard", name: "Card", diff --git a/packages/standard-components/components.json b/packages/standard-components/components.json index 6836f4981c..cc2150282b 100644 --- a/packages/standard-components/components.json +++ b/packages/standard-components/components.json @@ -268,6 +268,81 @@ "model": "models" } }, + "card": { + "name": "Card", + "props": { + "imageUrl": "string", + "heading": "string", + "description": "string", + "linkText": "string", + "linkUrl": "string", + "color": "string", + "linkHoverColor": "string", + "imageHeight": { + "type": "options", + "default": "20rem", + "options": [ + "12rem", + "16rem", + "20rem", + "24rem" + ] + }, + "cardWidth": { + "type": "options", + "default": "20rem", + "options": [ + "16rem", + "20rem", + "24rem" + ] + } + } + }, + "cardhorizontal": { + "name": "Horizontal Card", + "props": { + "imageUrl": "string", + "heading": "string", + "description": "string", + "subtext": "string", + "linkText": "string", + "linkUrl": "string", + "color": "string", + "linkHoverColor": "string", + "imageWidth": { + "type": "options", + "default": "8rem", + "options": [ + "8rem", + "12rem", + "16rem" + ] + }, + "cardWidth": { + "type": "options", + "default": "32rem", + "options": [ + "24rem", + "28rem", + "32rem", + "40rem", + "48rem", + "60rem", + "100%" + ] + }, + "imageHeight": { + "type": "options", + "default": "8rem", + "options": [ + "8rem", + "12rem", + "16rem" + ] + } + } + }, "datamap": { "description": "shiny chart", "data": true, @@ -525,7 +600,7 @@ "bullet": { "description": "Bullet chart", "data": true, - "props": { + "props": { "model": "string", "color": "string", "customSubtitle": "string", diff --git a/packages/standard-components/src/Card.Svelte b/packages/standard-components/src/Card.Svelte new file mode 100644 index 0000000000..1d811dcbb3 --- /dev/null +++ b/packages/standard-components/src/Card.Svelte @@ -0,0 +1,80 @@ + + +
{description}
+