@otto-de/b2b-core-components 1.6.1 → 1.7.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/icons/b2b_icon-error-hint.svg +3 -0
- package/dist/b2b-core-components/p-03e21565.entry.js +1 -0
- package/dist/b2b-core-components/p-1c0df04b.entry.js +1 -0
- package/dist/b2b-core-components/p-1dc70300.js +1 -0
- package/dist/b2b-core-components/{p-a50ea33f.entry.js → p-33e66446.entry.js} +1 -1
- package/dist/b2b-core-components/{p-90a3ffed.entry.js → p-7a879329.entry.js} +1 -1
- package/dist/b2b-core-components/p-8bad814b.entry.js +1 -0
- package/dist/b2b-core-components/{p-db7d2ec3.entry.js → p-98b563a9.entry.js} +1 -1
- package/dist/b2b-core-components/p-9c0e419e.entry.js +1 -0
- package/dist/b2b-core-components/p-c60253d2.entry.js +1 -0
- package/dist/b2b-core-components/p-c885a630.entry.js +1 -0
- package/dist/b2b-core-components/p-cf0999e2.entry.js +1 -0
- package/dist/b2b-core-components/p-e31915cf.entry.js +1 -0
- package/dist/b2b-core-components/{p-0beabdb4.entry.js → p-f8ed569f.entry.js} +1 -1
- package/dist/cjs/b2b-breadcrumb-item.cjs.entry.js +40 -0
- package/dist/cjs/b2b-breadcrumb.cjs.entry.js +34 -0
- package/dist/cjs/b2b-button_2.cjs.entry.js +1 -1
- package/dist/cjs/b2b-checkbox_3.cjs.entry.js +24 -8
- package/dist/cjs/b2b-chip-component.cjs.entry.js +37 -0
- package/dist/cjs/b2b-core-components.cjs.js +1 -1
- package/dist/cjs/b2b-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/b2b-icon.cjs.entry.js +1 -0
- package/dist/cjs/b2b-tab-group.cjs.entry.js +3 -1
- package/dist/cjs/b2b-table-row.cjs.entry.js +5 -8
- package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +1 -1
- package/dist/cjs/b2b-table.cjs.entry.js +1 -1
- package/dist/cjs/b2b-textarea.cjs.entry.js +2 -1
- package/dist/cjs/index-04e07a00.js +12 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{table.types-00c8228a.js → table.types-196dc690.js} +6 -0
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/alert/alert.css +2 -2
- package/dist/collection/components/alert/alert.stories.js +1 -8
- package/dist/collection/components/anchor/anchor.css +2 -2
- package/dist/collection/components/anchor/anchor.stories.js +0 -6
- package/dist/collection/components/breadcrumb/breadcrumb-item.js +123 -0
- package/dist/collection/components/breadcrumb/breadcrumb.css +250 -0
- package/dist/collection/components/breadcrumb/breadcrumb.e2e.js +50 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +66 -0
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +22 -0
- package/dist/collection/components/button/button.css +10 -6
- package/dist/collection/components/button/button.stories.js +136 -80
- package/dist/collection/components/card/card.css +2 -2
- package/dist/collection/components/card/card.stories.js +0 -6
- package/dist/collection/components/checkbox/checkbox.css +5 -5
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/checkbox/checkbox.stories.js +0 -6
- package/dist/collection/components/checkbox-group/checkbox-group.css +2 -2
- package/dist/collection/components/checkbox-group/checkbox-group.stories.js +0 -6
- package/dist/collection/components/chip/chip.css +249 -0
- package/dist/collection/components/chip/chip.e2e.js +19 -0
- package/dist/collection/components/chip/chip.js +134 -0
- package/dist/collection/components/chip/chip.stories.js +30 -0
- package/dist/collection/components/dropdown/dropdown.css +2 -2
- package/dist/collection/components/dropdown/dropdown.js +2 -2
- package/dist/collection/components/dropdown/dropdown.stories.js +0 -6
- package/dist/collection/components/grid/grid.stories.js +0 -4
- package/dist/collection/components/headline/headline.css +2 -2
- package/dist/collection/components/headline/headline.stories.js +0 -6
- package/dist/collection/components/icon/icon.css +2 -2
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/icon.stories.js +0 -6
- package/dist/collection/components/icon/icons/b2b_icon-error-hint.svg +3 -0
- package/dist/collection/components/icon/types.js +1 -0
- package/dist/collection/components/input/input.css +2 -2
- package/dist/collection/components/input/input.stories.js +124 -75
- package/dist/collection/components/input-group/input-group.css +2 -2
- package/dist/collection/components/input-group/input-group.stories.js +0 -6
- package/dist/collection/components/input-list/input-list.css +2 -2
- package/dist/collection/components/input-list/input-list.stories.js +74 -58
- package/dist/collection/components/label/label.css +2 -2
- package/dist/collection/components/label/label.stories.js +0 -6
- package/dist/collection/components/modal/modal.css +2 -2
- package/dist/collection/components/modal/modal.stories.js +1 -7
- package/dist/collection/components/pagination/pagination.css +2 -2
- package/dist/collection/components/pagination/pagination.stories.js +0 -4
- package/dist/collection/components/paragraph/paragraph.css +2 -2
- package/dist/collection/components/paragraph/paragraph.stories.js +0 -9
- package/dist/collection/components/radio/radio.css +2 -2
- package/dist/collection/components/radio/radio.stories.js +0 -6
- package/dist/collection/components/radio-group/radio-group.css +2 -2
- package/dist/collection/components/radio-group/radio-group.stories.js +0 -6
- package/dist/collection/components/required-separator/required-separator.css +2 -2
- package/dist/collection/components/required-separator/required-separator.stories.js +0 -6
- package/dist/collection/components/rounded-icon/rounded-icon.css +2 -2
- package/dist/collection/components/rounded-icon/rounded-icon.stories.js +0 -4
- package/dist/collection/components/scrollable-container/scrollable-container.css +2 -2
- package/dist/collection/components/scrollable-container/scrollable-container.stories.js +0 -4
- package/dist/collection/components/search/search.stories.js +2 -8
- package/dist/collection/components/separator/separator.css +2 -2
- package/dist/collection/components/separator/separator.stories.js +0 -6
- package/dist/collection/components/spinner/spinner.css +2 -2
- package/dist/collection/components/spinner/spinner.stories.js +0 -6
- package/dist/collection/components/tab/tab.css +2 -2
- package/dist/collection/components/tab-group/tab-group.e2e.js +1 -0
- package/dist/collection/components/tab-group/tab-group.js +3 -1
- package/dist/collection/components/tab-group/tab-group.stories.js +0 -6
- package/dist/collection/components/tab-panel/tab-panel.css +2 -2
- package/dist/collection/components/table/stories.data.js +4 -26
- package/dist/collection/components/table/table-cell/table-cell.css +2 -2
- package/dist/collection/components/table/table-header/table-header.css +25 -2
- package/dist/collection/components/table/table-header/table-header.js +46 -6
- package/dist/collection/components/table/table-row/table-row.css +2 -2
- package/dist/collection/components/table/table-row/table-row.js +4 -7
- 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/table/table.e2e.js +7 -3
- package/dist/collection/components/table/table.stories.js +334 -275
- package/dist/collection/components/textarea/textarea.css +2 -2
- package/dist/collection/components/textarea/textarea.js +19 -1
- package/dist/collection/components/textarea/textarea.stories.js +5 -7
- package/dist/collection/components/toggle-button/toggle-button.css +2 -2
- package/dist/collection/components/toggle-group/toggle-group.css +2 -2
- package/dist/collection/components/toggle-group/toggle-group.stories.js +0 -6
- package/dist/collection/components/tooltip/tooltip.css +2 -2
- package/dist/collection/components/tooltip/tooltip.stories.js +1 -7
- package/dist/collection/components/wizard/wizard.css +2 -2
- package/dist/collection/components/wizard/wizard.stories.js +0 -4
- package/dist/collection/components/wizard-icon/wizard-icon.css +2 -2
- package/dist/collection/components/wizard-icon/wizard-icon.stories.js +9 -7
- package/dist/collection/docs/tokens/color.stories.js +1 -5
- package/dist/collection/docs/tokens/font.stories.js +1 -6
- package/dist/collection/docs/tokens/size.stories.js +1 -5
- package/dist/collection/utils/types/table.types.js +5 -0
- package/dist/components/b2b-breadcrumb-item.d.ts +11 -0
- package/dist/components/b2b-breadcrumb-item.js +58 -0
- package/dist/components/b2b-breadcrumb.d.ts +11 -0
- package/dist/components/b2b-breadcrumb.js +48 -0
- package/dist/components/b2b-chip-component.d.ts +11 -0
- package/dist/components/b2b-chip-component.js +56 -0
- package/dist/components/b2b-dropdown.js +2 -2
- package/dist/components/b2b-tab-group.js +3 -1
- package/dist/components/b2b-table-row.js +4 -7
- package/dist/components/b2b-textarea.js +4 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox.js +2 -2
- package/dist/components/icon.js +1 -0
- package/dist/components/table-header.js +25 -7
- package/dist/components/table.types.js +6 -1
- package/dist/custom-elements.json +76 -0
- package/dist/esm/b2b-breadcrumb-item.entry.js +36 -0
- package/dist/esm/b2b-breadcrumb.entry.js +30 -0
- package/dist/esm/b2b-button_2.entry.js +1 -1
- package/dist/esm/b2b-checkbox_3.entry.js +24 -8
- package/dist/esm/b2b-chip-component.entry.js +33 -0
- package/dist/esm/b2b-core-components.js +1 -1
- package/dist/esm/b2b-dropdown.entry.js +2 -2
- package/dist/esm/b2b-icon.entry.js +1 -0
- package/dist/esm/b2b-tab-group.entry.js +3 -1
- package/dist/esm/b2b-table-row.entry.js +5 -8
- package/dist/esm/b2b-table-rowgroup.entry.js +1 -1
- package/dist/esm/b2b-table.entry.js +1 -1
- package/dist/esm/b2b-textarea.entry.js +2 -1
- package/dist/esm/index-dfdbf4b9.js +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{table.types-dd829d83.js → table.types-46c5a83a.js} +6 -1
- package/{loader → dist/loader}/cdn.js +1 -1
- package/{loader → dist/loader}/index.cjs.js +1 -1
- package/{loader → dist/loader}/index.d.ts +1 -1
- package/dist/loader/index.es2017.js +3 -0
- package/{loader → dist/loader}/index.js +2 -2
- package/dist/types/components/breadcrumb/breadcrumb-item.d.ts +15 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +11 -0
- package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +4 -0
- package/dist/types/components/button/button.stories.d.ts +14 -12
- package/dist/types/components/chip/chip.d.ts +17 -0
- package/dist/types/components/chip/chip.stories.d.ts +6 -0
- package/dist/types/components/icon/types.d.ts +1 -1
- package/dist/types/components/input/input.stories.d.ts +14 -13
- package/dist/types/components/input-list/input-list.stories.d.ts +8 -7
- package/dist/types/components/paragraph/paragraph.stories.d.ts +0 -1
- package/dist/types/components/table/stories.data.d.ts +3 -3
- package/dist/types/components/table/table-header/table-header.d.ts +5 -2
- package/dist/types/components/table/table.stories.d.ts +18 -16
- package/dist/types/components/textarea/textarea.d.ts +2 -0
- package/dist/types/components/textarea/textarea.stories.d.ts +1 -0
- package/dist/types/components.d.ts +135 -4
- package/dist/types/utils/interfaces/form.interface.d.ts +3 -0
- package/dist/types/utils/interfaces/interaction.interface.d.ts +4 -0
- package/dist/types/utils/types/table.types.d.ts +6 -0
- package/dist/web-types.json +149 -3
- package/package.json +26 -21
- package/dist/b2b-core-components/p-01fd54a1.entry.js +0 -1
- package/dist/b2b-core-components/p-077217b3.entry.js +0 -1
- package/dist/b2b-core-components/p-163466cf.entry.js +0 -1
- package/dist/b2b-core-components/p-34eb99cb.js +0 -1
- package/dist/b2b-core-components/p-62e43f91.entry.js +0 -1
- package/dist/b2b-core-components/p-d7bb8aa1.entry.js +0 -1
- package/loader/index.es2017.js +0 -3
- /package/{loader → dist/loader}/package.json +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Host, h, } from '@stencil/core';
|
|
2
|
+
export class B2bBreadCrumbComponent {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.getBreadcrumbItems = () => {
|
|
5
|
+
return Array.from(this.host.querySelectorAll('b2b-breadcrumb-item'));
|
|
6
|
+
};
|
|
7
|
+
this.updateActiveItem = (newItem) => {
|
|
8
|
+
this.getBreadcrumbItems()
|
|
9
|
+
.filter(x => x.value != newItem.value)
|
|
10
|
+
.forEach(x => (x.active = false));
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
onSelectedChange(event) {
|
|
14
|
+
const item = event.target;
|
|
15
|
+
this.updateActiveItem(item);
|
|
16
|
+
this.b2bSelected.emit({ value: item.value });
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (h(Host, null, h("div", { class: "b2b-breadcrumb-nav" }, h("slot", null))));
|
|
20
|
+
}
|
|
21
|
+
static get is() { return "b2b-breadcrumb"; }
|
|
22
|
+
static get encapsulation() { return "shadow"; }
|
|
23
|
+
static get originalStyleUrls() {
|
|
24
|
+
return {
|
|
25
|
+
"$": ["breadcrumb.scss"]
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static get styleUrls() {
|
|
29
|
+
return {
|
|
30
|
+
"$": ["breadcrumb.css"]
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
static get events() {
|
|
34
|
+
return [{
|
|
35
|
+
"method": "b2bSelected",
|
|
36
|
+
"name": "b2b-selected",
|
|
37
|
+
"bubbles": true,
|
|
38
|
+
"cancelable": true,
|
|
39
|
+
"composed": true,
|
|
40
|
+
"docs": {
|
|
41
|
+
"tags": [],
|
|
42
|
+
"text": "Emits the value of the currently selected item whenever an item is selected."
|
|
43
|
+
},
|
|
44
|
+
"complexType": {
|
|
45
|
+
"original": "BreadCrumbChangeEventDetail",
|
|
46
|
+
"resolved": "BreadCrumbChangeEventDetail<any>",
|
|
47
|
+
"references": {
|
|
48
|
+
"BreadCrumbChangeEventDetail": {
|
|
49
|
+
"location": "import",
|
|
50
|
+
"path": "../../utils/interfaces/interaction.interface"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}];
|
|
55
|
+
}
|
|
56
|
+
static get elementRef() { return "host"; }
|
|
57
|
+
static get listeners() {
|
|
58
|
+
return [{
|
|
59
|
+
"name": "b2b-change",
|
|
60
|
+
"method": "onSelectedChange",
|
|
61
|
+
"target": undefined,
|
|
62
|
+
"capture": false,
|
|
63
|
+
"passive": false
|
|
64
|
+
}];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
import { getArgTypes } from '../../docs/config/utils';
|
|
3
|
+
const Template = ({ href, active }) => {
|
|
4
|
+
return html ` <b2b-breadcrumb>
|
|
5
|
+
<b2b-breadcrumb-item href="${href}">Start</b2b-breadcrumb-item>
|
|
6
|
+
<b2b-breadcrumb-item>Weiter</b2b-breadcrumb-item>
|
|
7
|
+
<b2b-breadcrumb-item active="${active}">Ende</b2b-breadcrumb-item>
|
|
8
|
+
</b2b-breadcrumb>`;
|
|
9
|
+
};
|
|
10
|
+
const defaultArgs = {
|
|
11
|
+
href: 'https://www.otto.de',
|
|
12
|
+
active: true,
|
|
13
|
+
};
|
|
14
|
+
export const story010Default = Template.bind({});
|
|
15
|
+
story010Default.args = Object.assign({}, defaultArgs);
|
|
16
|
+
story010Default.storyName = 'Default Breadcrumb';
|
|
17
|
+
const breadcrumbArgs = getArgTypes('b2b-breadcrumb');
|
|
18
|
+
export default {
|
|
19
|
+
title: 'Components/Interaction/Breadcrumb',
|
|
20
|
+
argTypes: breadcrumbArgs,
|
|
21
|
+
viewMode: 'docs',
|
|
22
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 26 Oct 2023 14:16:21 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* Do not edit directly
|
|
125
|
-
* Generated on
|
|
125
|
+
* Generated on Thu, 26 Oct 2023 14:16:22 GMT
|
|
126
126
|
*/
|
|
127
127
|
:root [data-theme="dark"] {
|
|
128
128
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -284,8 +284,9 @@
|
|
|
284
284
|
border: 0.125rem solid rgba(51, 51, 51, 0.2);
|
|
285
285
|
border-top: 0.125rem solid var(--b2b-color-copy-default);
|
|
286
286
|
}
|
|
287
|
-
:host button:disabled,
|
|
288
|
-
:host a:disabled
|
|
287
|
+
:host button:disabled, :host button.disabled,
|
|
288
|
+
:host a:disabled,
|
|
289
|
+
:host a.disabled {
|
|
289
290
|
cursor: default;
|
|
290
291
|
pointer-events: none;
|
|
291
292
|
background-color: var(--b2b-color-grey-50);
|
|
@@ -294,9 +295,12 @@
|
|
|
294
295
|
color: var(--b2b-color-grey-250);
|
|
295
296
|
}
|
|
296
297
|
:host button:disabled [slot=start],
|
|
297
|
-
:host button:disabled [slot=end],
|
|
298
|
+
:host button:disabled [slot=end], :host button.disabled [slot=start],
|
|
299
|
+
:host button.disabled [slot=end],
|
|
298
300
|
:host a:disabled [slot=start],
|
|
299
|
-
:host a:disabled [slot=end]
|
|
301
|
+
:host a:disabled [slot=end],
|
|
302
|
+
:host a.disabled [slot=start],
|
|
303
|
+
:host a.disabled [slot=end] {
|
|
300
304
|
fill: var(--b2b-color-grey-250);
|
|
301
305
|
}
|
|
302
306
|
:host button:focus,
|
|
@@ -1,88 +1,144 @@
|
|
|
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
|
+
};
|
|
1
13
|
import { html } from 'lit-html';
|
|
2
|
-
import buttonDocs from './button.docs.mdx';
|
|
3
14
|
import { getArgTypes } from '../../docs/config/utils';
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
target
|
|
15
|
-
|
|
15
|
+
const meta = {
|
|
16
|
+
title: 'Components/Interaction/Button',
|
|
17
|
+
component: 'b2b-button',
|
|
18
|
+
args: {
|
|
19
|
+
variant: 'secondary',
|
|
20
|
+
type: 'button',
|
|
21
|
+
size: '100',
|
|
22
|
+
disabled: false,
|
|
23
|
+
loading: false,
|
|
24
|
+
active: false,
|
|
25
|
+
target: 'self',
|
|
26
|
+
label: 'B2B Button',
|
|
27
|
+
},
|
|
28
|
+
argTypes: getArgTypes('b2b-button'),
|
|
29
|
+
render: (_a) => {
|
|
30
|
+
var args = __rest(_a, []);
|
|
31
|
+
return html `<b2b-button
|
|
32
|
+
variant="${args.variant}"
|
|
33
|
+
size="${args.size}"
|
|
34
|
+
disabled="${args.disabled}"
|
|
35
|
+
loading="${args.loading}"
|
|
36
|
+
type="${args.type}">
|
|
37
|
+
${args.label}
|
|
16
38
|
</b2b-button>`;
|
|
39
|
+
},
|
|
17
40
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
disabled: false,
|
|
22
|
-
loading: false,
|
|
23
|
-
type: 'button',
|
|
24
|
-
href: undefined,
|
|
25
|
-
target: 'blank',
|
|
26
|
-
download: null,
|
|
41
|
+
export default meta;
|
|
42
|
+
export const Primary = {
|
|
43
|
+
args: Object.assign(Object.assign({}, meta.args), { variant: 'primary', label: 'Primary' }),
|
|
27
44
|
};
|
|
28
|
-
export const
|
|
29
|
-
|
|
30
|
-
story010Secondary.storyName = 'Secondary';
|
|
31
|
-
export const story020Primary = Template.bind({});
|
|
32
|
-
story020Primary.args = Object.assign(Object.assign({}, defaultArgs), { variant: 'primary', content: 'Primary' });
|
|
33
|
-
story020Primary.storyName = 'Primary';
|
|
34
|
-
export const story030Loading = Template.bind({});
|
|
35
|
-
story030Loading.args = Object.assign(Object.assign({}, defaultArgs), { variant: 'primary', loading: true, content: 'Primary' });
|
|
36
|
-
story030Loading.storyName = 'Loading';
|
|
37
|
-
export const story040IconStart = Template.bind({});
|
|
38
|
-
const iconStartContent = html `<b2b-icon
|
|
39
|
-
slot="start"
|
|
40
|
-
icon="b2b_icon-check"
|
|
41
|
-
size="100"
|
|
42
|
-
color="inherit"></b2b-icon>
|
|
43
|
-
Text`;
|
|
44
|
-
story040IconStart.args = Object.assign(Object.assign({}, defaultArgs), { variant: 'primary', content: iconStartContent });
|
|
45
|
-
story040IconStart.storyName = 'Button With Icon Start';
|
|
46
|
-
export const story050IconEnd = Template.bind({});
|
|
47
|
-
const iconEndContent = html `Text
|
|
48
|
-
<b2b-icon
|
|
49
|
-
slot="end"
|
|
50
|
-
icon="b2b_icon-check"
|
|
51
|
-
size="100"
|
|
52
|
-
color="inherit"></b2b-icon>`;
|
|
53
|
-
story050IconEnd.args = Object.assign(Object.assign({}, defaultArgs), { variant: 'primary', content: iconEndContent });
|
|
54
|
-
story050IconEnd.storyName = 'Button With Icon End';
|
|
55
|
-
export const story055IconStartPali = Template.bind({});
|
|
56
|
-
const iconStartPaliContent = html `<i class="obc_icon-check obc_mr-1"></i> Icon
|
|
57
|
-
Button`;
|
|
58
|
-
story055IconStartPali.args = Object.assign(Object.assign({}, defaultArgs), { variant: 'primary', content: iconStartPaliContent });
|
|
59
|
-
story055IconStartPali.storyName = 'Button With Pali Icon';
|
|
60
|
-
export const story060IconSearch = Template.bind({});
|
|
61
|
-
const iconSearchContent = html `<b2b-icon
|
|
62
|
-
icon="b2b_icon-check"
|
|
63
|
-
size="100"
|
|
64
|
-
color="primary"></b2b-icon>`;
|
|
65
|
-
story060IconSearch.args = Object.assign(Object.assign({}, defaultArgs), { variant: 'secondary', content: iconSearchContent });
|
|
66
|
-
story060IconSearch.storyName = 'Icon Only Button';
|
|
67
|
-
export const story070Disabled = Template.bind({});
|
|
68
|
-
story070Disabled.args = Object.assign(Object.assign({}, defaultArgs), { variant: 'primary', disabled: true, content: 'Primary has grey color when disabled' });
|
|
69
|
-
story070Disabled.storyName = 'Disabled';
|
|
70
|
-
export const story080Anchor = Template.bind({});
|
|
71
|
-
story080Anchor.args = Object.assign(Object.assign({}, defaultArgs), { href: 'https://www.otto.de', content: 'Anchor Button' });
|
|
72
|
-
story080Anchor.storyName = 'Anchor Button';
|
|
73
|
-
const controls = {
|
|
74
|
-
variant: 'radio',
|
|
45
|
+
export const Secondary = {
|
|
46
|
+
args: Object.assign(Object.assign({}, meta.args), { label: 'Secondary' }),
|
|
75
47
|
};
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
48
|
+
export const Loading = {
|
|
49
|
+
args: Object.assign(Object.assign({}, meta.args), { loading: true, label: 'Loading' }),
|
|
50
|
+
};
|
|
51
|
+
export const IconStart = {
|
|
52
|
+
args: Object.assign(Object.assign({}, meta.args), { label: 'Icon Start' }),
|
|
53
|
+
render: (_a) => {
|
|
54
|
+
var args = __rest(_a, []);
|
|
55
|
+
return html `<b2b-button
|
|
56
|
+
variant="${args.variant}"
|
|
57
|
+
size="${args.size}"
|
|
58
|
+
disabled="${args.disabled}"
|
|
59
|
+
loading="${args.loading}"
|
|
60
|
+
type="${args.type}">
|
|
61
|
+
<b2b-icon slot="start" icon="b2b_icon-check" size="100"></b2b-icon>
|
|
62
|
+
${args.label}
|
|
63
|
+
</b2b-button>`;
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
export const IconEnd = {
|
|
67
|
+
args: Object.assign(Object.assign({}, meta.args), { label: 'Icon End' }),
|
|
68
|
+
render: (_a) => {
|
|
69
|
+
var args = __rest(_a, []);
|
|
70
|
+
return html `<b2b-button
|
|
71
|
+
variant="${args.variant}"
|
|
72
|
+
size="${args.size}"
|
|
73
|
+
disabled="${args.disabled}"
|
|
74
|
+
loading="${args.loading}"
|
|
75
|
+
type="${args.type}">
|
|
76
|
+
${args.label}
|
|
77
|
+
<b2b-icon slot="end" icon="b2b_icon-check" size="100"></b2b-icon>
|
|
78
|
+
</b2b-button>`;
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
export const PaliIcon = {
|
|
82
|
+
args: Object.assign(Object.assign({}, meta.args), { label: 'Icon from PaLi' }),
|
|
83
|
+
render: (_a) => {
|
|
84
|
+
var args = __rest(_a, []);
|
|
85
|
+
return html `<b2b-button
|
|
86
|
+
variant="${args.variant}"
|
|
87
|
+
size="${args.size}"
|
|
88
|
+
disabled="${args.disabled}"
|
|
89
|
+
loading="${args.loading}"
|
|
90
|
+
type="${args.type}">
|
|
91
|
+
<i slot="start" class="obc_icon-info"></i>
|
|
92
|
+
${args.label}
|
|
93
|
+
</b2b-button>`;
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
export const IconOnly = {
|
|
97
|
+
args: Object.assign({}, meta.args),
|
|
98
|
+
render: (_a) => {
|
|
99
|
+
var args = __rest(_a, []);
|
|
100
|
+
return html `<b2b-button
|
|
101
|
+
variant="${args.variant}"
|
|
102
|
+
size="${args.size}"
|
|
103
|
+
disabled="${args.disabled}"
|
|
104
|
+
loading="${args.loading}"
|
|
105
|
+
type="${args.type}">
|
|
106
|
+
<b2b-icon slot="end" icon="b2b_icon-search" size="100"></b2b-icon>
|
|
107
|
+
</b2b-button>`;
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
export const Disabled = {
|
|
111
|
+
args: Object.assign(Object.assign({}, meta.args), { disabled: true, label: 'Disabled' }),
|
|
112
|
+
};
|
|
113
|
+
export const Anchor = {
|
|
114
|
+
args: Object.assign({}, meta.args),
|
|
115
|
+
render: (_a) => {
|
|
116
|
+
var args = __rest(_a, []);
|
|
117
|
+
return html `<b2b-button
|
|
118
|
+
variant="${args.variant}"
|
|
119
|
+
size="${args.size}"
|
|
120
|
+
disabled="${args.disabled}"
|
|
121
|
+
loading="${args.loading}"
|
|
122
|
+
href="www.otto.de"
|
|
123
|
+
target="blank"
|
|
124
|
+
type="${args.type}">
|
|
125
|
+
Go to otto.de
|
|
126
|
+
</b2b-button>`;
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
export const DisabledAnchor = {
|
|
130
|
+
args: Object.assign(Object.assign({}, meta.args), { disabled: true }),
|
|
131
|
+
render: (_a) => {
|
|
132
|
+
var args = __rest(_a, []);
|
|
133
|
+
return html `<b2b-button
|
|
134
|
+
variant="${args.variant}"
|
|
135
|
+
size="${args.size}"
|
|
136
|
+
disabled="${args.disabled}"
|
|
137
|
+
loading="${args.loading}"
|
|
138
|
+
href="www.otto.de"
|
|
139
|
+
target="blank"
|
|
140
|
+
type="${args.type}">
|
|
141
|
+
Go to otto.de
|
|
142
|
+
</b2b-button>`;
|
|
87
143
|
},
|
|
88
144
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 26 Oct 2023 14:16:21 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* Do not edit directly
|
|
125
|
-
* Generated on
|
|
125
|
+
* Generated on Thu, 26 Oct 2023 14:16:22 GMT
|
|
126
126
|
*/
|
|
127
127
|
:root [data-theme="dark"] {
|
|
128
128
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
|
-
import cardDocs from './card.docs.mdx';
|
|
3
2
|
import { getArgTypes } from '../../docs/config/utils';
|
|
4
3
|
const Template = ({ disabled, href, target }) => {
|
|
5
4
|
return html `<b2b-card disabled="${disabled}" href=${href} target="${target}">
|
|
@@ -33,9 +32,4 @@ export default {
|
|
|
33
32
|
title: 'Components/Interaction/Card',
|
|
34
33
|
argTypes: Object.assign({}, cardArgs),
|
|
35
34
|
viewMode: 'docs',
|
|
36
|
-
parameters: {
|
|
37
|
-
docs: {
|
|
38
|
-
page: cardDocs,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
35
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 26 Oct 2023 14:16:21 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* Do not edit directly
|
|
125
|
-
* Generated on
|
|
125
|
+
* Generated on Thu, 26 Oct 2023 14:16:22 GMT
|
|
126
126
|
*/
|
|
127
127
|
:root [data-theme="dark"] {
|
|
128
128
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -305,12 +305,12 @@
|
|
|
305
305
|
background-color: var(--b2b-color-black-100);
|
|
306
306
|
}
|
|
307
307
|
.b2b-checkbox--indeterminate .b2b-checkbox__icon {
|
|
308
|
-
margin-top:
|
|
309
|
-
margin-left: var(--b2b-size-
|
|
308
|
+
margin-top: 9px;
|
|
309
|
+
margin-left: var(--b2b-size-7);
|
|
310
310
|
display: inline-block;
|
|
311
311
|
}
|
|
312
312
|
.b2b-checkbox--indeterminate.b2b-checkbox--standalone .b2b-checkbox__icon {
|
|
313
|
-
margin-top:
|
|
313
|
+
margin-top: 7px;
|
|
314
314
|
}
|
|
315
315
|
/* stylelint-disable selector-class-pattern */
|
|
316
316
|
.b2b-checkbox.b2b-checkbox--disabled.b2b-checkbox--checked .b2b-checkbox__input {
|
|
@@ -39,7 +39,7 @@ export class CheckboxComponent {
|
|
|
39
39
|
};
|
|
40
40
|
this.renderIcon = () => {
|
|
41
41
|
if (this.indeterminate) {
|
|
42
|
-
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0
|
|
42
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 12", class: "b2b-checkbox__icon" }, h("path", { d: "M8.5 0H0.5C0.223633 0 0 0.223633 0 0.5C0 0.776367 0.223633 1 0.5 1H8.5C8.77637 1 9 0.776367 9 0.5C9 0.223633 8.77637 0 8.5 0Z", fill: "white" })));
|
|
43
43
|
}
|
|
44
44
|
if (this.checked) {
|
|
45
45
|
return (h("svg", { class: "b2b-checkbox__icon", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { d: "M11.798 25.082c-.341 0-.681-.13-.942-.389l-7.132-7.115a1.334 1.334 0 0 1 1.884-1.888l6.19 6.175L26.391 7.307a1.334 1.334 0 0 1 1.884 1.888L12.74 24.693c-.26.259-.601.389-.942.389z" })));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
|
-
import inputCheckboxDocs from './checkbox.docs.mdx';
|
|
3
2
|
import { getArgTypes } from '../../docs/config/utils';
|
|
4
3
|
const Template = ({ label, required, checked, disabled, hint, error, name, value, invalid, }) => {
|
|
5
4
|
return html `<b2b-checkbox
|
|
@@ -48,9 +47,4 @@ export default {
|
|
|
48
47
|
title: 'Components/Form/Checkbox',
|
|
49
48
|
argTypes: inputCheckboxArgs,
|
|
50
49
|
viewMode: 'docs',
|
|
51
|
-
parameters: {
|
|
52
|
-
docs: {
|
|
53
|
-
page: inputCheckboxDocs,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
50
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 26 Oct 2023 14:16:21 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* Do not edit directly
|
|
125
|
-
* Generated on
|
|
125
|
+
* Generated on Thu, 26 Oct 2023 14:16:22 GMT
|
|
126
126
|
*/
|
|
127
127
|
:root [data-theme="dark"] {
|
|
128
128
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
|
-
import inputCheckboxGroupDocs from './checkbox-group.docs.mdx';
|
|
3
2
|
import { getArgTypes } from '../../docs/config/utils';
|
|
4
3
|
const Template = ({ label, required, disabled, invalid, hint, error, alignment, }) => {
|
|
5
4
|
const firstLabel = 'One';
|
|
@@ -49,9 +48,4 @@ export default {
|
|
|
49
48
|
title: 'Components/Form/Checkbox Group',
|
|
50
49
|
argTypes: checkboxGroupArgs,
|
|
51
50
|
viewMode: 'docs',
|
|
52
|
-
parameters: {
|
|
53
|
-
docs: {
|
|
54
|
-
page: inputCheckboxGroupDocs,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
51
|
};
|