@otto-de/b2b-core-components 1.23.1 → 1.23.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
- package/dist/b2b-core-components/p-4b7870fd.entry.js +1 -0
- package/dist/b2b-core-components/p-be5c3d5d.entry.js +1 -0
- package/dist/b2b-core-components/{p-545b6ba2.entry.js → p-d2c93cb5.entry.js} +1 -1
- package/dist/cjs/b2b-grid-col.cjs.entry.js +1 -1
- package/dist/cjs/b2b-grid-row.cjs.entry.js +11 -11
- package/dist/cjs/b2b-grid.cjs.entry.js +1 -1
- package/dist/collection/components/alert/alert.css +2 -2
- package/dist/collection/components/anchor/anchor.css +2 -2
- package/dist/collection/components/background-box/background-box.css +2 -2
- package/dist/collection/components/breadcrumb/breadcrumb.css +2 -2
- package/dist/collection/components/button/button.css +2 -2
- package/dist/collection/components/card/card.css +2 -2
- package/dist/collection/components/checkbox/checkbox.css +2 -2
- package/dist/collection/components/checkbox-group/checkbox-group.css +2 -2
- package/dist/collection/components/chip/chip.css +2 -2
- package/dist/collection/components/date-picker/date-picker-days-header.css +2 -2
- package/dist/collection/components/date-picker/date-picker-days.css +2 -2
- package/dist/collection/components/date-picker/date-picker-header.css +2 -2
- package/dist/collection/components/date-picker/date-picker-months.css +2 -2
- package/dist/collection/components/date-picker/date-picker-years.css +2 -2
- package/dist/collection/components/date-picker/date-picker.css +2 -2
- package/dist/collection/components/dropdown/dropdown.css +2 -2
- package/dist/collection/components/flyout-menu/flyout-menu-option.css +2 -2
- package/dist/collection/components/flyout-menu/flyout-menu.css +2 -2
- package/dist/collection/components/grid/column.js +2 -2
- package/dist/collection/components/grid/grid.css +6 -0
- package/dist/collection/components/grid/row.js +11 -11
- package/dist/collection/components/headline/headline.css +2 -2
- package/dist/collection/components/icon/icon.css +2 -2
- package/dist/collection/components/icon-100/icon-100.css +2 -2
- package/dist/collection/components/icon-50/icon-50.css +2 -2
- package/dist/collection/components/input/input.css +2 -2
- package/dist/collection/components/input-group/input-group.css +2 -2
- package/dist/collection/components/input-list/input-list.css +2 -2
- package/dist/collection/components/label/label.css +2 -2
- package/dist/collection/components/modal/modal.css +2 -2
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.css +2 -2
- package/dist/collection/components/pagination/pagination.css +2 -2
- package/dist/collection/components/paragraph/paragraph.css +2 -2
- package/dist/collection/components/progress-bar/progress-bar.css +2 -2
- package/dist/collection/components/radio/radio.css +2 -2
- package/dist/collection/components/radio-group/radio-group.css +2 -2
- package/dist/collection/components/required-separator/required-separator.css +2 -2
- package/dist/collection/components/rounded-icon/rounded-icon.css +2 -2
- package/dist/collection/components/scrollable-container/scrollable-container.css +2 -2
- package/dist/collection/components/separator/separator.css +2 -2
- package/dist/collection/components/snackbar/snackbar.css +2 -2
- package/dist/collection/components/spinner/spinner.css +2 -2
- package/dist/collection/components/tab/tab.css +2 -2
- package/dist/collection/components/tab-panel/tab-panel.css +2 -2
- package/dist/collection/components/table/table-cell/table-cell.css +2 -2
- package/dist/collection/components/table/table-header/table-header.css +2 -2
- package/dist/collection/components/table/table-row/table-row.css +2 -2
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +2 -2
- package/dist/collection/components/table/table.css +2 -2
- package/dist/collection/components/textarea/textarea.css +2 -2
- package/dist/collection/components/toggle-button/toggle-button.css +2 -2
- package/dist/collection/components/toggle-chip/toggle-chip.css +2 -2
- package/dist/collection/components/toggle-group/toggle-group.css +2 -2
- package/dist/collection/components/toggle-switch/toggle-switch.css +2 -2
- package/dist/collection/components/tooltip/tooltip.css +2 -2
- package/dist/collection/components/wizard/wizard.css +2 -2
- package/dist/collection/components/wizard-icon/wizard-icon.css +2 -2
- package/dist/components/b2b-grid-col.js +1 -1
- package/dist/components/b2b-grid-row.js +11 -11
- package/dist/components/b2b-grid.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/esm/b2b-grid-col.entry.js +1 -1
- package/dist/esm/b2b-grid-row.entry.js +11 -11
- package/dist/esm/b2b-grid.entry.js +1 -1
- package/dist/types/components/grid/column.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/dist/web-types.json +2 -2
- package/package.json +2 -2
- package/dist/b2b-core-components/p-0f5b8f0f.entry.js +0 -1
- package/dist/b2b-core-components/p-2610db01.entry.js +0 -1
|
@@ -783,7 +783,7 @@
|
|
|
783
783
|
"attributes": [
|
|
784
784
|
{
|
|
785
785
|
"name": "span",
|
|
786
|
-
"description": "How many columns the width of the col element should be. If not specified, the col will take up all available space in one row. Up to single 12 columns fit in one row."
|
|
786
|
+
"description": "How many columns the width of the col element should be. If not specified, the col will take up all available space in one row. We recommend explicitly defining the span in scenarios where the distribution of 12 spans across columns is clear. Up to single 12 columns fit in one row."
|
|
787
787
|
},
|
|
788
788
|
{
|
|
789
789
|
"name": "text-align",
|
|
@@ -15,7 +15,7 @@ const B2bGridColumnComponent = class {
|
|
|
15
15
|
this.textAlign = 'left';
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: 'c7e327cb2e4fdca61e297b8a9f1ad502b5ca141c', style: Object.assign(Object.assign({}, this.calculateGrowDimension(this.span)), { ['text-align']: `${this.textAlign}` }) }, h("slot", { key: '05fb26f49c8563185a8c09242cdbda6846f2f54c' })));
|
|
19
19
|
}
|
|
20
20
|
get hostElement() { return getElement(this); }
|
|
21
21
|
};
|
|
@@ -12,7 +12,7 @@ const B2bGridRowComponent = class {
|
|
|
12
12
|
this.adjustColumnFlex();
|
|
13
13
|
}
|
|
14
14
|
adjustColumnFlex() {
|
|
15
|
-
const columns = this.hostElement.querySelectorAll('b2b-grid-col');
|
|
15
|
+
const columns = this.hostElement.querySelectorAll(':scope > b2b-grid-col');
|
|
16
16
|
let totalSpan = 0;
|
|
17
17
|
let columnsWithoutSpan = [];
|
|
18
18
|
columns.forEach((column) => {
|
|
@@ -25,22 +25,22 @@ const B2bGridRowComponent = class {
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
const remainingSpan = 12 - totalSpan;
|
|
28
|
-
if (remainingSpan ==
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
28
|
+
if (remainingSpan == 0) {
|
|
29
|
+
columnsWithoutSpan.forEach(column => {
|
|
30
|
+
column.style.width = '100%';
|
|
31
|
+
});
|
|
32
|
+
return;
|
|
34
33
|
}
|
|
35
34
|
if (columnsWithoutSpan.length > 0) {
|
|
36
|
-
const
|
|
35
|
+
const spanPerColumn = Math.floor(remainingSpan / columnsWithoutSpan.length);
|
|
37
36
|
columnsWithoutSpan.forEach(column => {
|
|
38
|
-
column.
|
|
37
|
+
column.setAttribute('span', spanPerColumn.toString());
|
|
38
|
+
column.style.width = `${(spanPerColumn / 12) * 100}%`;
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: 'f77863071f40aef68345792802a1170b59d6bd30', style: {
|
|
44
44
|
['justify-content']: `${this.justify}`,
|
|
45
45
|
['gap']: `${this.columnGap}px`,
|
|
46
46
|
['margin']: `${this.rowGap}px 0`,
|
|
@@ -48,7 +48,7 @@ const B2bGridRowComponent = class {
|
|
|
48
48
|
['display']: 'flex',
|
|
49
49
|
['flex-wrap']: 'wrap',
|
|
50
50
|
['box-sizing']: 'border-box',
|
|
51
|
-
} }, h("slot", { key: '
|
|
51
|
+
} }, h("slot", { key: '1cb248539477e9fc94a604e43200aa5e391b3ed7' })));
|
|
52
52
|
}
|
|
53
53
|
get hostElement() { return getElement(this); }
|
|
54
54
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-ab9eb36d.js';
|
|
2
2
|
|
|
3
|
-
const gridCss = ":host(.b2b-grid){width:100%;margin:0 auto;box-sizing:border-box}";
|
|
3
|
+
const gridCss = ":host(.b2b-grid){width:100%;margin:0 auto;box-sizing:border-box}:host(.b2b-grid-col){display:flex;flex-direction:column;min-width:0}";
|
|
4
4
|
const B2bGridStyle0 = gridCss;
|
|
5
5
|
|
|
6
6
|
const B2bGridComponent = class {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare class B2bGridColumnComponent {
|
|
2
2
|
hostElement: HTMLB2bGridColElement;
|
|
3
|
-
/** How many columns the width of the col element should be. If not specified, the col will take up all available space in one row. Up to single 12 columns fit in one row. */
|
|
3
|
+
/** How many columns the width of the col element should be. If not specified, the col will take up all available space in one row. We recommend explicitly defining the span in scenarios where the distribution of 12 spans across columns is clear. Up to single 12 columns fit in one row. */
|
|
4
4
|
span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
5
5
|
/** The alignment of text placed inside of a column. Note that this will apply to all children. */
|
|
6
6
|
textAlign: 'left' | 'center' | 'right';
|
|
@@ -491,7 +491,7 @@ export namespace Components {
|
|
|
491
491
|
}
|
|
492
492
|
interface B2bGridCol {
|
|
493
493
|
/**
|
|
494
|
-
* How many columns the width of the col element should be. If not specified, the col will take up all available space in one row. Up to single 12 columns fit in one row.
|
|
494
|
+
* How many columns the width of the col element should be. If not specified, the col will take up all available space in one row. We recommend explicitly defining the span in scenarios where the distribution of 12 spans across columns is clear. Up to single 12 columns fit in one row.
|
|
495
495
|
*/
|
|
496
496
|
"span": | 1
|
|
497
497
|
| 2
|
|
@@ -2955,7 +2955,7 @@ declare namespace LocalJSX {
|
|
|
2955
2955
|
}
|
|
2956
2956
|
interface B2bGridCol {
|
|
2957
2957
|
/**
|
|
2958
|
-
* How many columns the width of the col element should be. If not specified, the col will take up all available space in one row. Up to single 12 columns fit in one row.
|
|
2958
|
+
* How many columns the width of the col element should be. If not specified, the col will take up all available space in one row. We recommend explicitly defining the span in scenarios where the distribution of 12 spans across columns is clear. Up to single 12 columns fit in one row.
|
|
2959
2959
|
*/
|
|
2960
2960
|
"span"?: | 1
|
|
2961
2961
|
| 2
|
package/dist/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json.schemastore.org/web-types",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "@otto-de/b2b-core-components",
|
|
5
|
-
"version": "1.23.
|
|
5
|
+
"version": "1.23.2",
|
|
6
6
|
"js-types-syntax": "typescript",
|
|
7
7
|
"description-markup": "markdown",
|
|
8
8
|
"contributions": {
|
|
@@ -1465,7 +1465,7 @@
|
|
|
1465
1465
|
"attributes": [
|
|
1466
1466
|
{
|
|
1467
1467
|
"name": "span",
|
|
1468
|
-
"description": "How many columns the width of the col element should be. If not specified, the col will take up all available space in one row. Up to single 12 columns fit in one row.\r\nValues: 1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9",
|
|
1468
|
+
"description": "How many columns the width of the col element should be. If not specified, the col will take up all available space in one row. We recommend explicitly defining the span in scenarios where the distribution of 12 spans across columns is clear. Up to single 12 columns fit in one row.\r\nValues: 1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9",
|
|
1469
1469
|
"required": false,
|
|
1470
1470
|
"value": {
|
|
1471
1471
|
"kind": "expression",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@otto-de/b2b-core-components",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.3",
|
|
4
4
|
"description": "Core components defined with Stencil",
|
|
5
5
|
"author": "Otto GmbH",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"build:storybook": "npm run copy-md-files && storybook build -o docs-build/design-system"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@otto-de/b2b-tokens": "1.23.
|
|
43
|
+
"@otto-de/b2b-tokens": "1.23.3",
|
|
44
44
|
"@stencil-community/eslint-plugin": "^0.5.0",
|
|
45
45
|
"@stencil/core": "^4.12.4"
|
|
46
46
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as s,g as a}from"./p-b6a753e8.js";const r=class{constructor(e){t(this,e),this.calculateGrowDimension=t=>{if(void 0!==t)return{flex:""+t/12*100}},this.span=void 0,this.textAlign="left"}render(){return e(s,{key:"84919b56153393d378a29ce84d4048af80a95fea",style:Object.assign(Object.assign({},this.calculateGrowDimension(this.span)),{"text-align":`${this.textAlign}`})},e("slot",{key:"1fef59961b312a1efdd94488865aa0a436170489"}))}get hostElement(){return a(this)}};export{r as b2b_grid_col}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s,H as e,g as a}from"./p-b6a753e8.js";const i=class{constructor(s){t(this,s),this.columnGap=24,this.rowGap=24,this.alignItems="stretch",this.justify="start"}componentDidLoad(){this.adjustColumnFlex()}adjustColumnFlex(){const t=this.hostElement.querySelectorAll("b2b-grid-col");let s=0,e=[];t.forEach((t=>{const a=t.getAttribute("span");a?s+=parseInt(a,10):e.push(t)}));const a=12-s;if(12==a&&e.length>0&&e.forEach((t=>{t.setAttribute("span","1")})),e.length>0){const t=a/12*100/e.length;e.forEach((s=>{s.style.flex=`${t}%`}))}}render(){return s(e,{key:"76c179fe5253504e038b6ac11a8d528a1e5f1109",style:{"justify-content":`${this.justify}`,gap:`${this.columnGap}px`,margin:`${this.rowGap}px 0`,"align-items":`${this.alignItems}`,display:"flex","flex-wrap":"wrap","box-sizing":"border-box"}},s("slot",{key:"c4af8f5183e948a8d2115ad60cb6751c8a9d6595"}))}get hostElement(){return a(this)}};export{i as b2b_grid_row}
|