-
-
{item.label || item.field}
+ >
+
+
+ {item.field}
+
+
+
{readableText}
@@ -53,4 +81,20 @@
.list-item-body {
justify-content: space-between;
}
+ .type-icon {
+ display: flex;
+ gap: var(--spacing-m);
+ margin: var(--spacing-xl);
+ margin-bottom: 0px;
+ height: var(--spectrum-alias-item-height-m);
+ padding: 0px var(--spectrum-alias-item-padding-m);
+ border-width: var(--spectrum-actionbutton-border-size);
+ border-radius: var(--spectrum-alias-border-radius-regular);
+ border: 1px solid
+ var(
+ --spectrum-actionbutton-m-border-color,
+ var(--spectrum-alias-border-color)
+ );
+ align-items: center;
+ }
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json
index 11a130490a..dd129be11e 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json
@@ -36,6 +36,7 @@
"heading",
"text",
"button",
+ "buttongroup",
"tag",
"spectrumcard",
"cardstat",
diff --git a/packages/client/manifest.json b/packages/client/manifest.json
index d316688f8b..c8ef406472 100644
--- a/packages/client/manifest.json
+++ b/packages/client/manifest.json
@@ -258,6 +258,186 @@
"description": "Contains your app screens",
"static": true
},
+ "buttongroup": {
+ "name": "Button group",
+ "icon": "Button",
+ "hasChildren": false,
+ "settings": [
+ {
+ "section": true,
+ "name": "Buttons",
+ "settings": [
+ {
+ "type": "buttonConfiguration",
+ "key": "buttons",
+ "nested": true,
+ "defaultValue": [
+ {
+ "type": "cta",
+ "text": "Button 1"
+ },
+ {
+ "type": "primary",
+ "text": "Button 2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "section": true,
+ "name": "Layout",
+ "settings": [
+ {
+ "type": "select",
+ "label": "Direction",
+ "key": "direction",
+ "showInBar": true,
+ "barStyle": "buttons",
+ "options": [
+ {
+ "label": "Column",
+ "value": "column",
+ "barIcon": "ViewColumn",
+ "barTitle": "Column layout"
+ },
+ {
+ "label": "Row",
+ "value": "row",
+ "barIcon": "ViewRow",
+ "barTitle": "Row layout"
+ }
+ ],
+ "defaultValue": "row"
+ },
+ {
+ "type": "select",
+ "label": "Horiz. align",
+ "key": "hAlign",
+ "showInBar": true,
+ "barStyle": "buttons",
+ "options": [
+ {
+ "label": "Left",
+ "value": "left",
+ "barIcon": "AlignLeft",
+ "barTitle": "Align left"
+ },
+ {
+ "label": "Center",
+ "value": "center",
+ "barIcon": "AlignCenter",
+ "barTitle": "Align center"
+ },
+ {
+ "label": "Right",
+ "value": "right",
+ "barIcon": "AlignRight",
+ "barTitle": "Align right"
+ },
+ {
+ "label": "Stretch",
+ "value": "stretch",
+ "barIcon": "MoveLeftRight",
+ "barTitle": "Align stretched horizontally"
+ }
+ ],
+ "defaultValue": "left"
+ },
+ {
+ "type": "select",
+ "label": "Vert. align",
+ "key": "vAlign",
+ "showInBar": true,
+ "barStyle": "buttons",
+ "options": [
+ {
+ "label": "Top",
+ "value": "top",
+ "barIcon": "AlignTop",
+ "barTitle": "Align top"
+ },
+ {
+ "label": "Middle",
+ "value": "middle",
+ "barIcon": "AlignMiddle",
+ "barTitle": "Align middle"
+ },
+ {
+ "label": "Bottom",
+ "value": "bottom",
+ "barIcon": "AlignBottom",
+ "barTitle": "Align bottom"
+ },
+ {
+ "label": "Stretch",
+ "value": "stretch",
+ "barIcon": "MoveUpDown",
+ "barTitle": "Align stretched vertically"
+ }
+ ],
+ "defaultValue": "top"
+ },
+ {
+ "type": "select",
+ "label": "Size",
+ "key": "size",
+ "showInBar": true,
+ "barStyle": "buttons",
+ "options": [
+ {
+ "label": "Shrink",
+ "value": "shrink",
+ "barIcon": "Minimize",
+ "barTitle": "Shrink container"
+ },
+ {
+ "label": "Grow",
+ "value": "grow",
+ "barIcon": "Maximize",
+ "barTitle": "Grow container"
+ }
+ ],
+ "defaultValue": "shrink"
+ },
+ {
+ "type": "select",
+ "label": "Gap",
+ "key": "gap",
+ "showInBar": true,
+ "barStyle": "picker",
+ "options": [
+ {
+ "label": "None",
+ "value": "N"
+ },
+ {
+ "label": "Small",
+ "value": "S"
+ },
+ {
+ "label": "Medium",
+ "value": "M"
+ },
+ {
+ "label": "Large",
+ "value": "L"
+ }
+ ],
+ "defaultValue": "M"
+ },
+ {
+ "type": "boolean",
+ "label": "Wrap",
+ "key": "wrap",
+ "showInBar": true,
+ "barIcon": "ModernGridView",
+ "barTitle": "Wrap"
+ }
+ ]
+ }
+ ]
+ },
"button": {
"name": "Button",
"description": "A basic html button that is ready for styling",
@@ -2409,7 +2589,6 @@
"key": "disabled",
"defaultValue": false
},
-
{
"type": "text",
"label": "Initial form step",
@@ -5745,4 +5924,4 @@
}
]
}
-}
+}
\ No newline at end of file
diff --git a/packages/client/src/components/app/ButtonGroup.svelte b/packages/client/src/components/app/ButtonGroup.svelte
new file mode 100644
index 0000000000..87b0990701
--- /dev/null
+++ b/packages/client/src/components/app/ButtonGroup.svelte
@@ -0,0 +1,37 @@
+
+
+
+
+ {#each buttons as { text, type, quiet, disabled, onClick, size }}
+
+ {/each}
+
+
diff --git a/packages/client/src/components/app/index.js b/packages/client/src/components/app/index.js
index 060c15a857..97df3741e1 100644
--- a/packages/client/src/components/app/index.js
+++ b/packages/client/src/components/app/index.js
@@ -19,6 +19,7 @@ export { default as dataprovider } from "./DataProvider.svelte"
export { default as divider } from "./Divider.svelte"
export { default as screenslot } from "./ScreenSlot.svelte"
export { default as button } from "./Button.svelte"
+export { default as buttongroup } from "./ButtonGroup.svelte"
export { default as repeater } from "./Repeater.svelte"
export { default as text } from "./Text.svelte"
export { default as layout } from "./Layout.svelte"