@otto-de/b2b-core-components 1.23.4 → 1.26.0
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-01a5c813.entry.js +1 -0
- package/dist/b2b-core-components/{p-9c055a4e.entry.js → p-02b5dcb1.entry.js} +1 -1
- package/dist/b2b-core-components/{p-1cbf75dd.entry.js → p-10e9a961.entry.js} +1 -1
- package/dist/b2b-core-components/{p-ec4f82b1.entry.js → p-150f78f4.entry.js} +1 -1
- package/dist/b2b-core-components/{p-ae71a78f.entry.js → p-201b438d.entry.js} +1 -1
- package/dist/b2b-core-components/p-225e561a.entry.js +1 -0
- package/dist/b2b-core-components/{p-96968c24.entry.js → p-3e50a85d.entry.js} +1 -1
- package/dist/b2b-core-components/{p-8967cc6c.entry.js → p-40c31c85.entry.js} +1 -1
- package/dist/b2b-core-components/{p-9a6c243e.entry.js → p-45e19c6e.entry.js} +1 -1
- package/dist/b2b-core-components/p-4d96ee04.entry.js +1 -0
- package/dist/b2b-core-components/p-51dab4f2.entry.js +1 -0
- package/dist/b2b-core-components/p-5c576b32.entry.js +1 -0
- package/dist/b2b-core-components/{p-4cfb4131.entry.js → p-71f1d9a1.entry.js} +1 -1
- package/dist/b2b-core-components/{p-a033a6b5.entry.js → p-8c3b4f01.entry.js} +1 -1
- package/dist/b2b-core-components/{p-44d5a9d3.entry.js → p-900f47c2.entry.js} +1 -1
- package/dist/b2b-core-components/{p-25fa6d92.entry.js → p-99060fad.entry.js} +1 -1
- package/dist/b2b-core-components/p-9e3d9908.entry.js +1 -0
- package/dist/b2b-core-components/{p-47081742.entry.js → p-a6dec156.entry.js} +1 -1
- package/dist/b2b-core-components/{p-c1135326.entry.js → p-b98f7c3c.entry.js} +1 -1
- package/dist/b2b-core-components/p-b9cc3f9f.entry.js +1 -0
- package/dist/b2b-core-components/{p-928e7db4.entry.js → p-c69df063.entry.js} +1 -1
- package/dist/b2b-core-components/{p-2a80fb82.entry.js → p-c8838f46.entry.js} +1 -1
- package/dist/b2b-core-components/p-e73552ea.entry.js +1 -0
- package/dist/b2b-core-components/{p-921e7a37.entry.js → p-ee371752.entry.js} +1 -1
- package/dist/b2b-core-components/{p-3caed6e8.entry.js → p-ef0bbdd1.entry.js} +1 -1
- package/dist/b2b-core-components/p-f31cc91d.entry.js +1 -0
- package/dist/cjs/b2b-background-box.cjs.entry.js +5 -5
- package/dist/cjs/b2b-button_2.cjs.entry.js +1 -1
- package/dist/cjs/b2b-core-components.cjs.js +1 -1
- package/dist/cjs/b2b-date-picker.cjs.entry.js +2 -1
- package/dist/cjs/b2b-dropdown.cjs.entry.js +12 -3
- package/dist/cjs/b2b-grid-row.cjs.entry.js +65 -11
- package/dist/cjs/b2b-input-group_2.cjs.entry.js +1 -1
- package/dist/cjs/b2b-input_2.cjs.entry.js +27 -6
- package/dist/cjs/b2b-multiselect-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/b2b-shimmer.cjs.entry.js +27 -0
- package/dist/cjs/b2b-snackbar.cjs.entry.js +5 -4
- package/dist/cjs/b2b-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/b2b-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/b2b-tab.cjs.entry.js +2 -2
- package/dist/cjs/b2b-table-cell_2.cjs.entry.js +3 -3
- package/dist/cjs/b2b-table-row.cjs.entry.js +2 -2
- package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +2 -2
- package/dist/cjs/b2b-table.cjs.entry.js +2 -2
- package/dist/cjs/b2b-textarea.cjs.entry.js +2 -2
- package/dist/cjs/b2b-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/b2b-toggle-chip.cjs.entry.js +3 -3
- package/dist/cjs/b2b-toggle-group.cjs.entry.js +2 -2
- package/dist/cjs/b2b-toggle-switch.cjs.entry.js +4 -4
- package/dist/cjs/b2b-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/b2b-wizard-icon.cjs.entry.js +1 -1
- package/dist/cjs/b2b-wizard-step.cjs.entry.js +2 -2
- package/dist/cjs/b2b-wizard.cjs.entry.js +1 -1
- package/dist/cjs/index-668808fd.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/alert/alert.css +2 -2
- package/dist/collection/components/alert/alert.stories.js +1 -2
- package/dist/collection/components/anchor/anchor.css +2 -2
- package/dist/collection/components/background-box/background-box.css +6 -6
- package/dist/collection/components/background-box/background-box.e2e.js +3 -3
- package/dist/collection/components/background-box/background-box.js +7 -7
- package/dist/collection/components/background-box/background-box.spec.js +3 -3
- package/dist/collection/components/background-box/background-box.stories.js +18 -18
- package/dist/collection/components/breadcrumb/breadcrumb.css +2 -2
- package/dist/collection/components/button/button.css +2 -2
- package/dist/collection/components/button/button.stories.js +79 -79
- 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/chip/chip.stories.js +15 -15
- 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/date-picker/date-picker.js +20 -1
- package/dist/collection/components/date-picker/date-picker.stories.js +4 -1
- package/dist/collection/components/dropdown/dropdown.css +4 -4
- package/dist/collection/components/dropdown/dropdown.js +47 -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/flyout-menu/flyout-menu.stories.js +44 -44
- package/dist/collection/components/grid/grid.stories.js +151 -148
- package/dist/collection/components/grid/row.js +65 -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-100/icon-100.stories.js +5 -5
- package/dist/collection/components/icon-50/icon-50.css +2 -2
- package/dist/collection/components/icon-50/icon-50.stories.js +4 -4
- package/dist/collection/components/input/input.css +3 -3
- package/dist/collection/components/input/input.e2e.js +28 -0
- package/dist/collection/components/input/input.js +26 -5
- package/dist/collection/components/input/input.stories.js +75 -55
- package/dist/collection/components/input-group/input-group.css +3 -3
- package/dist/collection/components/input-list/input-list.css +2 -2
- package/dist/collection/components/input-list/input-list.stories.js +50 -50
- package/dist/collection/components/label/label.css +2 -2
- package/dist/collection/components/modal/modal.css +2 -2
- package/dist/collection/components/modal/modal.stories.js +1 -1
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.css +2 -2
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.js +4 -4
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.stories.js +19 -19
- package/dist/collection/components/pagination/pagination.css +2 -2
- package/dist/collection/components/paragraph/paragraph.css +2 -2
- package/dist/collection/components/paragraph/paragraph.stories.js +82 -78
- package/dist/collection/components/progress-bar/progress-bar.css +2 -2
- package/dist/collection/components/progress-bar/progress-bar.stories.js +4 -4
- 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/shimmer/shimmer.css +242 -0
- package/dist/collection/components/shimmer/shimmer.e2e.js +18 -0
- package/dist/collection/components/shimmer/shimmer.js +82 -0
- package/dist/collection/components/shimmer/shimmer.spec.js +35 -0
- package/dist/collection/components/shimmer/shimmer.stories.js +38 -0
- package/dist/collection/components/snackbar/snackbar.css +2 -2
- package/dist/collection/components/snackbar/snackbar.js +22 -4
- package/dist/collection/components/snackbar/snackbar.stories.js +10 -2
- package/dist/collection/components/spinner/spinner.css +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/tab/tab.css +2 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-group/tab-group.js +1 -1
- package/dist/collection/components/tab-panel/tab-panel.css +2 -2
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/table/table-cell/table-cell.css +2 -2
- package/dist/collection/components/table/table-cell/table-cell.js +2 -2
- package/dist/collection/components/table/table-header/table-header.css +2 -2
- package/dist/collection/components/table/table-header/table-header.js +1 -1
- package/dist/collection/components/table/table-row/table-row.css +2 -2
- package/dist/collection/components/table/table-row/table-row.js +2 -2
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +2 -2
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +2 -2
- package/dist/collection/components/table/table.css +2 -2
- package/dist/collection/components/table/table.e2e.js +2 -1
- package/dist/collection/components/table/table.js +2 -2
- package/dist/collection/components/table/table.stories.js +157 -157
- package/dist/collection/components/textarea/textarea.css +2 -2
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/toggle-button/toggle-button.css +2 -2
- package/dist/collection/components/toggle-button/toggle-button.js +3 -3
- package/dist/collection/components/toggle-chip/toggle-chip.css +2 -2
- package/dist/collection/components/toggle-chip/toggle-chip.js +3 -3
- package/dist/collection/components/toggle-chip/toggle-chip.stories.js +14 -2
- package/dist/collection/components/toggle-group/toggle-group.css +2 -2
- package/dist/collection/components/toggle-group/toggle-group.js +2 -2
- package/dist/collection/components/toggle-switch/toggle-switch.css +2 -2
- package/dist/collection/components/toggle-switch/toggle-switch.js +4 -4
- package/dist/collection/components/toggle-switch/toggle-switch.stories.js +4 -4
- package/dist/collection/components/tooltip/tooltip.css +2 -2
- package/dist/collection/components/tooltip/tooltip.js +3 -3
- package/dist/collection/components/wizard/wizard-step.js +2 -2
- package/dist/collection/components/wizard/wizard.css +2 -2
- package/dist/collection/components/wizard/wizard.js +1 -1
- package/dist/collection/components/wizard-icon/wizard-icon.css +2 -2
- package/dist/collection/components/wizard-icon/wizard-icon.js +1 -1
- package/dist/components/b2b-background-box.js +6 -6
- package/dist/components/b2b-date-picker.js +23 -15
- package/dist/components/b2b-dropdown.js +14 -3
- package/dist/components/b2b-grid-row.js +65 -11
- package/dist/components/b2b-multiselect-dropdown.js +4 -4
- package/dist/components/b2b-shimmer.d.ts +11 -0
- package/dist/components/b2b-shimmer.js +45 -0
- package/dist/components/b2b-snackbar.js +7 -5
- package/dist/components/b2b-tab-group.js +1 -1
- package/dist/components/b2b-tab-panel.js +1 -1
- package/dist/components/b2b-tab.js +2 -2
- package/dist/components/b2b-table-row.js +2 -2
- package/dist/components/b2b-table-rowgroup.js +2 -2
- package/dist/components/b2b-table.js +2 -2
- package/dist/components/b2b-textarea.js +2 -2
- package/dist/components/b2b-toggle-button.js +3 -3
- package/dist/components/b2b-toggle-chip.js +3 -3
- package/dist/components/b2b-toggle-group.js +2 -2
- package/dist/components/b2b-toggle-switch.js +4 -4
- package/dist/components/b2b-tooltip.js +3 -3
- package/dist/components/b2b-wizard-step.js +2 -2
- package/dist/components/b2b-wizard.js +1 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input.js +27 -6
- package/dist/components/spinner.js +1 -1
- package/dist/components/table-cell.js +2 -2
- package/dist/components/table-header.js +1 -1
- package/dist/components/wizard-icon.js +1 -1
- package/dist/custom-elements.json +39 -2
- package/dist/esm/b2b-background-box.entry.js +5 -5
- package/dist/esm/b2b-button_2.entry.js +1 -1
- package/dist/esm/b2b-core-components.js +1 -1
- package/dist/esm/b2b-date-picker.entry.js +2 -1
- package/dist/esm/b2b-dropdown.entry.js +12 -3
- package/dist/esm/b2b-grid-row.entry.js +65 -11
- package/dist/esm/b2b-input-group_2.entry.js +1 -1
- package/dist/esm/b2b-input_2.entry.js +27 -6
- package/dist/esm/b2b-multiselect-dropdown.entry.js +4 -4
- package/dist/esm/b2b-shimmer.entry.js +23 -0
- package/dist/esm/b2b-snackbar.entry.js +5 -4
- package/dist/esm/b2b-tab-group.entry.js +1 -1
- package/dist/esm/b2b-tab-panel.entry.js +1 -1
- package/dist/esm/b2b-tab.entry.js +2 -2
- package/dist/esm/b2b-table-cell_2.entry.js +3 -3
- package/dist/esm/b2b-table-row.entry.js +2 -2
- package/dist/esm/b2b-table-rowgroup.entry.js +2 -2
- package/dist/esm/b2b-table.entry.js +2 -2
- package/dist/esm/b2b-textarea.entry.js +2 -2
- package/dist/esm/b2b-toggle-button.entry.js +3 -3
- package/dist/esm/b2b-toggle-chip.entry.js +3 -3
- package/dist/esm/b2b-toggle-group.entry.js +2 -2
- package/dist/esm/b2b-toggle-switch.entry.js +4 -4
- package/dist/esm/b2b-tooltip.entry.js +3 -3
- package/dist/esm/b2b-wizard-icon.entry.js +1 -1
- package/dist/esm/b2b-wizard-step.entry.js +2 -2
- package/dist/esm/b2b-wizard.entry.js +1 -1
- package/dist/esm/index-ab9eb36d.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/background-box/background-box.d.ts +2 -2
- package/dist/types/components/background-box/background-box.stories.d.ts +1 -1
- package/dist/types/components/button/button.stories.d.ts +2 -2
- package/dist/types/components/date-picker/date-picker.d.ts +2 -0
- package/dist/types/components/dropdown/dropdown.d.ts +4 -0
- package/dist/types/components/grid/row.d.ts +3 -0
- package/dist/types/components/icon/icon.stories.d.ts +3 -3
- package/dist/types/components/input/input.d.ts +4 -0
- package/dist/types/components/input/input.stories.d.ts +1 -0
- package/dist/types/components/shimmer/shimmer.d.ts +9 -0
- package/dist/types/components/shimmer/shimmer.stories.d.ts +5 -0
- package/dist/types/components/snackbar/snackbar.d.ts +2 -0
- package/dist/types/components/snackbar/snackbar.stories.d.ts +1 -0
- package/dist/types/components/toggle-chip/toggle-chip.stories.d.ts +3 -2
- package/dist/types/components.d.ts +73 -4
- package/dist/web-types.json +82 -3
- package/package.json +21 -16
- package/dist/b2b-core-components/p-191b7d0b.entry.js +0 -1
- package/dist/b2b-core-components/p-333969c9.entry.js +0 -1
- package/dist/b2b-core-components/p-339dd3ba.entry.js +0 -1
- package/dist/b2b-core-components/p-56293400.entry.js +0 -1
- package/dist/b2b-core-components/p-95d3519f.entry.js +0 -1
- package/dist/b2b-core-components/p-992dd377.entry.js +0 -1
- package/dist/b2b-core-components/p-be5c3d5d.entry.js +0 -1
- package/dist/b2b-core-components/p-fdfdc92d.entry.js +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class ShimmerComponent {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.loading = undefined;
|
|
5
|
+
this.width = undefined;
|
|
6
|
+
this.height = undefined;
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
const shimmerStyle = {
|
|
10
|
+
width: `${this.width}px`,
|
|
11
|
+
height: `${this.height}px`,
|
|
12
|
+
};
|
|
13
|
+
return (h(Host, { key: 'd49facd00500b965059c0322adfc56961bc69f8e' }, this.loading ? (h("div", { class: "b2b-shimmer", style: shimmerStyle })) : (h("slot", null))));
|
|
14
|
+
}
|
|
15
|
+
static get is() { return "b2b-shimmer"; }
|
|
16
|
+
static get encapsulation() { return "shadow"; }
|
|
17
|
+
static get originalStyleUrls() {
|
|
18
|
+
return {
|
|
19
|
+
"$": ["shimmer.scss"]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static get styleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["shimmer.css"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get properties() {
|
|
28
|
+
return {
|
|
29
|
+
"loading": {
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"mutable": false,
|
|
32
|
+
"complexType": {
|
|
33
|
+
"original": "boolean",
|
|
34
|
+
"resolved": "boolean",
|
|
35
|
+
"references": {}
|
|
36
|
+
},
|
|
37
|
+
"required": false,
|
|
38
|
+
"optional": false,
|
|
39
|
+
"docs": {
|
|
40
|
+
"tags": [],
|
|
41
|
+
"text": "Whether the shimmer effect is shown or not."
|
|
42
|
+
},
|
|
43
|
+
"attribute": "loading",
|
|
44
|
+
"reflect": false
|
|
45
|
+
},
|
|
46
|
+
"width": {
|
|
47
|
+
"type": "number",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "number",
|
|
51
|
+
"resolved": "number",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": false,
|
|
55
|
+
"optional": false,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": "The width of the shimmer effect im px."
|
|
59
|
+
},
|
|
60
|
+
"attribute": "width",
|
|
61
|
+
"reflect": false
|
|
62
|
+
},
|
|
63
|
+
"height": {
|
|
64
|
+
"type": "number",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "number",
|
|
68
|
+
"resolved": "number",
|
|
69
|
+
"references": {}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": false,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": "The height of the shimmer effect in px."
|
|
76
|
+
},
|
|
77
|
+
"attribute": "height",
|
|
78
|
+
"reflect": false
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { ShimmerComponent } from "./shimmer";
|
|
3
|
+
import { h } from "@stencil/core";
|
|
4
|
+
describe('B2B-Shimmer', () => {
|
|
5
|
+
async function renderPage(template) {
|
|
6
|
+
return newSpecPage({
|
|
7
|
+
components: [ShimmerComponent],
|
|
8
|
+
template: () => template,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
it('should render shimmer effect with width 100 and height 100 attributes', async () => {
|
|
12
|
+
const dummyContent = 'Dummy content';
|
|
13
|
+
const page = await renderPage(h("b2b-shimmer", { loading: true, width: 100, height: 100 }, dummyContent));
|
|
14
|
+
expect(page.root).toEqualHtml(`
|
|
15
|
+
<b2b-shimmer>
|
|
16
|
+
<mock:shadow-root>
|
|
17
|
+
<div class="b2b-shimmer" style="width: 100px; height: 100px;"></div>
|
|
18
|
+
</mock:shadow-root>
|
|
19
|
+
${dummyContent}
|
|
20
|
+
</b2b-shimmer>
|
|
21
|
+
`);
|
|
22
|
+
});
|
|
23
|
+
it('should show slot content and hide shimmer effect', async () => {
|
|
24
|
+
const dummyContent = 'Dummy content';
|
|
25
|
+
const page = await renderPage(h("b2b-shimmer", { loading: false, width: 100, height: 100 }, dummyContent));
|
|
26
|
+
expect(page.root).toEqualHtml(`
|
|
27
|
+
<b2b-shimmer>
|
|
28
|
+
<mock:shadow-root>
|
|
29
|
+
<slot></slot>
|
|
30
|
+
</mock:shadow-root>
|
|
31
|
+
${dummyContent}
|
|
32
|
+
</b2b-shimmer>
|
|
33
|
+
`);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { html } from "lit-html";
|
|
14
|
+
import { getArgTypes } from "../../docs/config/utils";
|
|
15
|
+
const meta = {
|
|
16
|
+
title: 'Components/Status & Feedback/Shimmer',
|
|
17
|
+
component: 'b2b-shimmer',
|
|
18
|
+
args: {
|
|
19
|
+
loading: true,
|
|
20
|
+
width: 400,
|
|
21
|
+
height: 25,
|
|
22
|
+
},
|
|
23
|
+
argTypes: Object.assign({}, getArgTypes('b2b-shimmer')),
|
|
24
|
+
render: (_a) => {
|
|
25
|
+
var args = __rest(_a, []);
|
|
26
|
+
return html `<b2b-shimmer
|
|
27
|
+
loading="${args.loading}"
|
|
28
|
+
width="${args.width}"
|
|
29
|
+
height="${args.height}">
|
|
30
|
+
This is the mean content which takes a while to load.
|
|
31
|
+
</b2b-shimmer>`;
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
export default meta;
|
|
35
|
+
export const story010Default = {
|
|
36
|
+
name: 'Default',
|
|
37
|
+
args: Object.assign({}, meta.args),
|
|
38
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Do not edit directly
|
|
126
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
127
127
|
*/
|
|
128
128
|
:root [data-theme="dark"] {
|
|
129
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -48,6 +48,7 @@ export class SnackbarComponent {
|
|
|
48
48
|
this.duration = 5000;
|
|
49
49
|
this.hasAction = false;
|
|
50
50
|
this.actionLabel = undefined;
|
|
51
|
+
this.width = undefined;
|
|
51
52
|
}
|
|
52
53
|
onVisibleChange(newValue) {
|
|
53
54
|
if (this.timed && this.type !== 'error') {
|
|
@@ -79,17 +80,17 @@ export class SnackbarComponent {
|
|
|
79
80
|
clearTimeout(this.timeoutId);
|
|
80
81
|
}
|
|
81
82
|
render() {
|
|
82
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: '693f7639a65edfd76e101540ccd663cc3f533448', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("div", { key: 'f522b01889ee90866e2fd01036805139aa0f39df', class: {
|
|
83
84
|
'b2b-snackbar': true,
|
|
84
85
|
[`b2b-snackbar--${this.type}`]: true,
|
|
85
86
|
'b2b-snackbar--opened': this.opened,
|
|
86
|
-
} }, h("div", { key: '
|
|
87
|
+
}, style: this.width ? { width: this.width } : { width: 'auto' } }, h("div", { key: '3cafcd2cbff1203950ad15b038f0346e12232131', class: "b2b-snackbar__content" }, h("span", { key: '5811cd72a94d7ba281f3733dd9ed0281cb47c37f', class: { [`b2b-snackbar--${this.type}__icon`]: true } }, this.chooseIcon()), h("p", { key: '079f6ad5e83c365a224bc0c1f9862cd6409a7a6d', class: "b2b-snackbar__content__description" }, this.description)), this.isActionPresent() && (h("div", { class: {
|
|
87
88
|
'b2b-snackbar__action': true,
|
|
88
89
|
[`b2b-snackbar__action--${this.type}`]: true,
|
|
89
|
-
}, onClick: this.handleActionClick }, h("a", null, this.actionLabel))), h("div", { key: '
|
|
90
|
+
}, onClick: this.handleActionClick }, h("a", null, this.actionLabel))), h("div", { key: '901aa5ad65f440e7de8a87e5a1fd88643b9766b6', class: {
|
|
90
91
|
'b2b-snackbar__close-icon': true,
|
|
91
92
|
[`b2b-snackbar__close-icon--${this.type}`]: true,
|
|
92
|
-
}, onClick: this.close }, h("b2b-icon-100", { key: '
|
|
93
|
+
}, onClick: this.close }, h("b2b-icon-100", { key: 'efd48b87b50a36d790f59bccfc3553a9d105adfd', clickable: true, size: 24, icon: "b2b_icon-close" })))));
|
|
93
94
|
}
|
|
94
95
|
static get is() { return "b2b-snackbar"; }
|
|
95
96
|
static get encapsulation() { return "shadow"; }
|
|
@@ -228,6 +229,23 @@ export class SnackbarComponent {
|
|
|
228
229
|
},
|
|
229
230
|
"attribute": "action-label",
|
|
230
231
|
"reflect": false
|
|
232
|
+
},
|
|
233
|
+
"width": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"mutable": false,
|
|
236
|
+
"complexType": {
|
|
237
|
+
"original": "string",
|
|
238
|
+
"resolved": "string",
|
|
239
|
+
"references": {}
|
|
240
|
+
},
|
|
241
|
+
"required": false,
|
|
242
|
+
"optional": false,
|
|
243
|
+
"docs": {
|
|
244
|
+
"tags": [],
|
|
245
|
+
"text": "Width of the snackbar can be specified in px. If not provided, the default value is auto, which will adjust the width to fit the content."
|
|
246
|
+
},
|
|
247
|
+
"attribute": "width",
|
|
248
|
+
"reflect": false
|
|
231
249
|
}
|
|
232
250
|
};
|
|
233
251
|
}
|
|
@@ -13,7 +13,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
13
13
|
import { getArgTypes } from "../../docs/config/utils";
|
|
14
14
|
import { html } from "lit-html";
|
|
15
15
|
import { useArgs } from "@storybook/preview-api";
|
|
16
|
-
import { screen } from "@storybook/
|
|
16
|
+
import { screen } from "@storybook/test";
|
|
17
17
|
getArgTypes('b2b-snackbar');
|
|
18
18
|
const meta = {
|
|
19
19
|
title: 'Components/Status & Feedback/Snackbar',
|
|
@@ -26,6 +26,7 @@ const meta = {
|
|
|
26
26
|
duration: 5000,
|
|
27
27
|
hasAction: true,
|
|
28
28
|
actionLabel: 'Call to Action',
|
|
29
|
+
width: 'auto',
|
|
29
30
|
},
|
|
30
31
|
argTypes: getArgTypes('b2b-snackbar'),
|
|
31
32
|
render: (_a) => {
|
|
@@ -49,7 +50,8 @@ const meta = {
|
|
|
49
50
|
timed="${args.timed}"
|
|
50
51
|
duration="${args.duration}"
|
|
51
52
|
has-action="${args.hasAction}"
|
|
52
|
-
action-label="${args.actionLabel}"
|
|
53
|
+
action-label="${args.actionLabel}"
|
|
54
|
+
width="${args.width}"></b2b-snackbar>`;
|
|
53
55
|
},
|
|
54
56
|
};
|
|
55
57
|
export default meta;
|
|
@@ -87,3 +89,9 @@ export const TimedSnackbar = {
|
|
|
87
89
|
await showSnackBar();
|
|
88
90
|
},
|
|
89
91
|
};
|
|
92
|
+
export const WithWidth = {
|
|
93
|
+
args: Object.assign(Object.assign({}, meta.args), { type: 'info', description: 'This is a snackbar with custom width', width: '800px' }),
|
|
94
|
+
play: async () => {
|
|
95
|
+
await showSnackBar();
|
|
96
|
+
},
|
|
97
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Do not edit directly
|
|
126
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
127
127
|
*/
|
|
128
128
|
:root [data-theme="dark"] {
|
|
129
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -9,7 +9,7 @@ export class SpinnerComponent {
|
|
|
9
9
|
this.color = 'primary';
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h("div", { key: '
|
|
12
|
+
return (h("div", { key: '8739a726fd4f0a51b87d51cab6a3f85264f1ed08', class: {
|
|
13
13
|
'b2b-spinner': true,
|
|
14
14
|
['b2b-spinner--size-' + this.size]: true,
|
|
15
15
|
['b2b-spinner--color-' + this.color]: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Do not edit directly
|
|
126
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
127
127
|
*/
|
|
128
128
|
:root [data-theme="dark"] {
|
|
129
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -17,12 +17,12 @@ export class B2bTabComponent {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '12d81a324c80b9005c0ac9524fcfe5db9efb831d', id: `b2b-tab-${this.generatedId}`, "aria-role": "tab", "aria-selected": this.selected, role: this.disabled ? false : 'tab', disabled: this.disabled, tabindex: this.disabled ? false : this.selected ? '0' : '-1' }, h("span", { key: 'f7c39b2cd098336fa4808a0ab8830631dc3db7db', class: {
|
|
21
21
|
'b2b-tab': true,
|
|
22
22
|
'b2b-tab--selected': this.selected,
|
|
23
23
|
'b2b-tab--disabled': this.disabled,
|
|
24
24
|
'b2b-tab--error': this.invalid,
|
|
25
|
-
} }, h("slot", { key: '
|
|
25
|
+
} }, h("slot", { key: 'd8066ec2d861a5d623e118a14a474af951d9ea70' }))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "b2b-tab"; }
|
|
28
28
|
static get encapsulation() { return "shadow"; }
|
|
@@ -121,7 +121,7 @@ export class B2bTabGroupComponent {
|
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
render() {
|
|
124
|
-
return (h(Host, { key: '
|
|
124
|
+
return (h(Host, { key: '8324f8a2a6c8b77a048bab28d3a5382f27c07ce1' }, h("slot", { key: 'b97fc6fb827875d8f70bd0f6c8e4b01d9b57d098', name: "tab" }), h("b2b-separator", { key: 'b1b68f251b274afc40cdb9e2e79fe3410cd21063' }), h("slot", { key: '93587b074a6354d31b038a130ca35548f6803f43', name: "panel" })));
|
|
125
125
|
}
|
|
126
126
|
static get is() { return "b2b-tab-group"; }
|
|
127
127
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Do not edit directly
|
|
126
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
127
127
|
*/
|
|
128
128
|
:root [data-theme="dark"] {
|
|
129
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -5,7 +5,7 @@ export class B2bTabPanelComponent {
|
|
|
5
5
|
this.generatedId = i++;
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: 'e4d4215b6795a66b2a944ef5d535552ef5adbba2', id: `b2b-tab-panel-${this.generatedId}`, role: "tabpanel" }, h("div", { key: '90736ddfab88b436b1b63cad2a69d8bbfcf3485d', class: "b2b-tab-panel" }, h("slot", { key: '11793052ee41b883a968e0d667ff44c9c30b73aa' }))));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "b2b-tab-panel"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Do not edit directly
|
|
126
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
127
127
|
*/
|
|
128
128
|
:root [data-theme="dark"] {
|
|
129
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -36,14 +36,14 @@ export class TableCellComponent {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: 'c9054312fdf96b346c6ed6633845b676471ee1e6', onMouseEnter: this.addExpandStyles, onMouseLeave: this.removeExpandStyles, class: {
|
|
40
40
|
'b2b-table-cell': true,
|
|
41
41
|
['b2b-table-cell--colspan']: this.size === TableSizes.COLSPAN,
|
|
42
42
|
['b2b-table-cell--ellipsis']: this.useTextEllipsis,
|
|
43
43
|
['b2b-table-cell--' + this.align]: true,
|
|
44
44
|
['b2b-table-cell--divider']: this.divider,
|
|
45
45
|
[`b2b-table-cell-color-${this.color}`]: true,
|
|
46
|
-
}, role: "cell" }, h("slot", { key: '
|
|
46
|
+
}, role: "cell" }, h("slot", { key: 'f05c8ea4484ce55c6f08a85034883fe74051638f' })));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "b2b-table-cell"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Do not edit directly
|
|
126
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
127
127
|
*/
|
|
128
128
|
:root [data-theme="dark"] {
|
|
129
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -72,7 +72,7 @@ export class TableHeaderComponent {
|
|
|
72
72
|
this.setIconPlacement();
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: 'e6604084cded7295c561d2ddcb443fa4ac890a96', class: {
|
|
76
76
|
[`b2b-table-header--${this.sortDirection && this.iconAlign}`]: true,
|
|
77
77
|
'b2b-table-header--divider': this.divider,
|
|
78
78
|
[`b2b-table-header--${this.size}`]: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Do not edit directly
|
|
126
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
127
127
|
*/
|
|
128
128
|
:root [data-theme="dark"] {
|
|
129
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -110,12 +110,12 @@ export class TableRowComponent {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
render() {
|
|
113
|
-
return (h(Host, { key: '
|
|
113
|
+
return (h(Host, { key: 'e2986d793ab548b9452aded06773b63c86db8375', class: {
|
|
114
114
|
'b2b-table-row': true,
|
|
115
115
|
['b2b-table-row--colspan']: this.size === TableSizes.COLSPAN,
|
|
116
116
|
['b2b-table-row--highlight']: this.highlight,
|
|
117
117
|
[`b2b-table-row--color-${this.getRowColor()}`]: true,
|
|
118
|
-
}, role: "row" }, this.getAccordionColumns(), this.getCheckbox(), h("slot", { key: '
|
|
118
|
+
}, role: "row" }, this.getAccordionColumns(), this.getCheckbox(), h("slot", { key: '72962668970275a6e00cd99c98871241f6fd2956' })));
|
|
119
119
|
}
|
|
120
120
|
static get is() { return "b2b-table-row"; }
|
|
121
121
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Do not edit directly
|
|
126
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
127
127
|
*/
|
|
128
128
|
:root [data-theme="dark"] {
|
|
129
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -113,11 +113,11 @@ export class TableRowgroupComponent {
|
|
|
113
113
|
this.makeHeaderRowNotSelectable();
|
|
114
114
|
}
|
|
115
115
|
render() {
|
|
116
|
-
return (h(Host, { key: '
|
|
116
|
+
return (h(Host, { key: '5f69a02dde8828439de23f661b3237c8cd2061da', class: {
|
|
117
117
|
['b2b-table-rowgroup__' + this.type]: true,
|
|
118
118
|
'b2b-table-rowgroup--fixed': this.fixed,
|
|
119
119
|
'b2b-table-rowgroup--colspan': this.size === TableSizes.COLSPAN,
|
|
120
|
-
}, role: "rowgroup" }, h("slot", { key: '
|
|
120
|
+
}, role: "rowgroup" }, h("slot", { key: '4df0d32b50e5c4dccee61cfd39d44da34c37960a' })));
|
|
121
121
|
}
|
|
122
122
|
static get is() { return "b2b-table-rowgroup"; }
|
|
123
123
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Do not edit directly
|
|
126
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 20 Mar 2025 06:20:36 GMT
|
|
127
127
|
*/
|
|
128
128
|
:root [data-theme="dark"] {
|
|
129
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -2,7 +2,8 @@ import { newE2EPage } from "@stencil/core/testing";
|
|
|
2
2
|
describe('B2B-Table', () => {
|
|
3
3
|
let page;
|
|
4
4
|
beforeEach(async () => {
|
|
5
|
-
page = await newE2EPage(
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
page.setDefaultTimeout(10000);
|
|
6
7
|
await page.setContent(`
|
|
7
8
|
<b2b-table size='equal'>
|
|
8
9
|
<b2b-table-rowgroup type='header'>
|
|
@@ -60,9 +60,9 @@ export class TableComponent {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
render() {
|
|
63
|
-
return (h(Host, { key: '
|
|
63
|
+
return (h(Host, { key: '065f6cb66e8195bd73258b636585ef26acb9f0ac', class: {
|
|
64
64
|
['b2b-table--' + this.size]: true,
|
|
65
|
-
}, role: "table" }, h("slot", { key: '
|
|
65
|
+
}, role: "table" }, h("slot", { key: 'f9d9ab1c60c408d0c3931d31bb05d645e6744038' })));
|
|
66
66
|
}
|
|
67
67
|
static get is() { return "b2b-table"; }
|
|
68
68
|
static get encapsulation() { return "shadow"; }
|