@otto-de/b2b-core-components 1.2.0 → 1.3.2

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.
Files changed (205) hide show
  1. package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
  2. package/dist/b2b-core-components/{p-41e83c36.entry.js → p-08a50b6c.entry.js} +1 -1
  3. package/dist/b2b-core-components/p-09995310.entry.js +1 -0
  4. package/dist/b2b-core-components/p-144a3c59.entry.js +1 -0
  5. package/dist/b2b-core-components/{p-dfa3663c.entry.js → p-1493f7df.entry.js} +1 -1
  6. package/dist/b2b-core-components/{p-6dc0211c.entry.js → p-14f1b674.entry.js} +1 -1
  7. package/dist/b2b-core-components/{p-977d2fff.entry.js → p-15a499b0.entry.js} +1 -1
  8. package/dist/b2b-core-components/p-1fbb8c18.entry.js +1 -0
  9. package/dist/b2b-core-components/{p-2672e477.entry.js → p-22dab2b4.entry.js} +1 -1
  10. package/dist/b2b-core-components/{p-ee1d70fc.entry.js → p-400b3111.entry.js} +1 -1
  11. package/dist/b2b-core-components/{p-893f600f.entry.js → p-48d4d224.entry.js} +1 -1
  12. package/dist/b2b-core-components/p-4b25559c.entry.js +1 -0
  13. package/dist/b2b-core-components/{p-ca2722e8.entry.js → p-515eb49e.entry.js} +1 -1
  14. package/dist/b2b-core-components/{p-7149e60c.entry.js → p-5952fa73.entry.js} +1 -1
  15. package/dist/b2b-core-components/{p-3651b482.entry.js → p-686d6598.entry.js} +1 -1
  16. package/dist/b2b-core-components/p-6c9b0c23.entry.js +1 -0
  17. package/dist/b2b-core-components/p-6ddad1ab.entry.js +1 -0
  18. package/dist/b2b-core-components/{p-c8585513.entry.js → p-6e3b27cd.entry.js} +1 -1
  19. package/dist/b2b-core-components/{p-c8ec3c18.entry.js → p-7ca9b704.entry.js} +1 -1
  20. package/dist/b2b-core-components/{p-66399e78.entry.js → p-81a52d1a.entry.js} +1 -1
  21. package/dist/b2b-core-components/{p-414fef03.entry.js → p-83542aec.entry.js} +1 -1
  22. package/dist/b2b-core-components/{p-3cbf9cd2.entry.js → p-8970ae74.entry.js} +1 -1
  23. package/dist/b2b-core-components/{p-22cc8a9f.entry.js → p-9184036b.entry.js} +1 -1
  24. package/dist/b2b-core-components/{p-5048bec7.entry.js → p-925e40af.entry.js} +1 -1
  25. package/dist/b2b-core-components/{p-99d63c7c.entry.js → p-965ae161.entry.js} +1 -1
  26. package/dist/b2b-core-components/{p-2125ea38.entry.js → p-99f8cf34.entry.js} +1 -1
  27. package/dist/b2b-core-components/{p-a1832e33.entry.js → p-9facba86.entry.js} +1 -1
  28. package/dist/b2b-core-components/{p-9f670297.entry.js → p-a6248754.entry.js} +1 -1
  29. package/dist/b2b-core-components/p-a7417890.js +2 -0
  30. package/dist/b2b-core-components/{p-5b1bc987.entry.js → p-b6e0a6ea.entry.js} +1 -1
  31. package/dist/b2b-core-components/{p-5b40beba.entry.js → p-ba74cde5.entry.js} +1 -1
  32. package/dist/b2b-core-components/{p-84608432.entry.js → p-c2bcf0a8.entry.js} +1 -1
  33. package/dist/b2b-core-components/{p-ff4d56aa.entry.js → p-d6ce3259.entry.js} +1 -1
  34. package/dist/b2b-core-components/{p-72c780a5.entry.js → p-da6a1f55.entry.js} +1 -1
  35. package/dist/b2b-core-components/p-dacfc1ab.js +1 -0
  36. package/dist/b2b-core-components/{p-ad2548ba.entry.js → p-f0aa5e83.entry.js} +1 -1
  37. package/dist/b2b-core-components/p-f57b891b.entry.js +1 -0
  38. package/dist/b2b-core-components/{p-c2855f32.entry.js → p-fc639b29.entry.js} +1 -1
  39. package/dist/b2b-core-components/{p-7e28e0f2.entry.js → p-fd34bf31.entry.js} +1 -1
  40. package/dist/cjs/b2b-alert.cjs.entry.js +1 -1
  41. package/dist/cjs/b2b-anchor.cjs.entry.js +1 -1
  42. package/dist/cjs/b2b-button_2.cjs.entry.js +1 -1
  43. package/dist/cjs/b2b-card.cjs.entry.js +47 -0
  44. package/dist/cjs/b2b-checkbox-group.cjs.entry.js +1 -1
  45. package/dist/cjs/b2b-checkbox.cjs.entry.js +1 -1
  46. package/dist/cjs/b2b-core-components.cjs.js +2 -2
  47. package/dist/cjs/b2b-dropdown.cjs.entry.js +1 -1
  48. package/dist/cjs/b2b-grid-col.cjs.entry.js +1 -1
  49. package/dist/cjs/b2b-grid-row.cjs.entry.js +1 -1
  50. package/dist/cjs/b2b-grid.cjs.entry.js +1 -1
  51. package/dist/cjs/b2b-headline.cjs.entry.js +1 -1
  52. package/dist/cjs/b2b-icon.cjs.entry.js +4 -2
  53. package/dist/cjs/b2b-input-group_2.cjs.entry.js +3 -2
  54. package/dist/cjs/b2b-input-label.cjs.entry.js +1 -1
  55. package/dist/cjs/b2b-input_2.cjs.entry.js +1 -1
  56. package/dist/cjs/b2b-label.cjs.entry.js +1 -1
  57. package/dist/cjs/b2b-modal.cjs.entry.js +2 -2
  58. package/dist/cjs/b2b-pagination.cjs.entry.js +1 -1
  59. package/dist/cjs/b2b-paragraph.cjs.entry.js +1 -1
  60. package/dist/cjs/b2b-radio-button.cjs.entry.js +1 -1
  61. package/dist/cjs/b2b-radio-group.cjs.entry.js +1 -1
  62. package/dist/cjs/b2b-required-separator.cjs.entry.js +1 -1
  63. package/dist/cjs/b2b-scrollable-container.cjs.entry.js +1 -1
  64. package/dist/cjs/b2b-search.cjs.entry.js +3 -2
  65. package/dist/cjs/b2b-separator.cjs.entry.js +1 -1
  66. package/dist/cjs/b2b-tab-group.cjs.entry.js +1 -1
  67. package/dist/cjs/b2b-tab-panel.cjs.entry.js +1 -1
  68. package/dist/cjs/b2b-tab.cjs.entry.js +1 -1
  69. package/dist/cjs/{b2b-table-header.cjs.entry.js → b2b-table-cell_2.cjs.entry.js} +47 -2
  70. package/dist/cjs/b2b-table-row.cjs.entry.js +22 -5
  71. package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +58 -4
  72. package/dist/cjs/b2b-table.cjs.entry.js +2 -2
  73. package/dist/cjs/b2b-textarea.cjs.entry.js +1 -1
  74. package/dist/cjs/b2b-toggle-button.cjs.entry.js +1 -1
  75. package/dist/cjs/b2b-toggle-group.cjs.entry.js +1 -1
  76. package/dist/cjs/b2b-tooltip.cjs.entry.js +1 -1
  77. package/dist/cjs/{index-494f6064.js → index-496aa5dd.js} +11 -8
  78. package/dist/cjs/loader.cjs.js +2 -2
  79. package/dist/cjs/{types-9f580c92.js → types-4a59c127.js} +6 -0
  80. package/dist/collection/collection-manifest.json +2 -1
  81. package/dist/collection/components/alert/alert.css +2 -2
  82. package/dist/collection/components/anchor/anchor.css +2 -2
  83. package/dist/collection/components/button/button.css +2 -2
  84. package/dist/collection/components/card/card.css +257 -0
  85. package/dist/collection/components/card/card.js +138 -0
  86. package/dist/collection/components/card/card.stories.js +41 -0
  87. package/dist/collection/components/checkbox/checkbox.css +2 -2
  88. package/dist/collection/components/checkbox-group/checkbox-group.css +2 -2
  89. package/dist/collection/components/dropdown/dropdown.css +2 -2
  90. package/dist/collection/components/headline/headline.css +2 -2
  91. package/dist/collection/components/icon/icon.css +5 -2
  92. package/dist/collection/components/icon/icon.js +20 -0
  93. package/dist/collection/components/input/input.css +2 -2
  94. package/dist/collection/components/input-group/input-group.css +2 -2
  95. package/dist/collection/components/input-group/input-group.stories.js +7 -7
  96. package/dist/collection/components/input-list/input-list.css +2 -2
  97. package/dist/collection/components/input-list/input-list.js +21 -2
  98. package/dist/collection/components/input-list/input-list.stories.js +6 -1
  99. package/dist/collection/components/label/label.css +2 -2
  100. package/dist/collection/components/modal/modal.css +9 -4
  101. package/dist/collection/components/pagination/pagination.css +2 -2
  102. package/dist/collection/components/paragraph/paragraph.css +2 -2
  103. package/dist/collection/components/radio/radio.css +2 -2
  104. package/dist/collection/components/radio-group/radio-group.css +2 -2
  105. package/dist/collection/components/required-separator/required-separator.css +2 -2
  106. package/dist/collection/components/scrollable-container/scrollable-container.css +2 -2
  107. package/dist/collection/components/search/search.js +20 -1
  108. package/dist/collection/components/search/search.stories.js +12 -4
  109. package/dist/collection/components/separator/separator.css +2 -2
  110. package/dist/collection/components/spinner/spinner.css +2 -2
  111. package/dist/collection/components/tab/tab.css +2 -2
  112. package/dist/collection/components/tab-panel/tab-panel.css +2 -2
  113. package/dist/collection/components/table/table-cell/table-cell.css +2 -2
  114. package/dist/collection/components/table/table-cell/table-cell.js +4 -4
  115. package/dist/collection/components/table/table-header/table-header.css +2 -2
  116. package/dist/collection/components/table/table-row/table-row.css +26 -12
  117. package/dist/collection/components/table/table-row/table-row.js +92 -8
  118. package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +2 -2
  119. package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +101 -2
  120. package/dist/collection/components/table/table.css +2 -2
  121. package/dist/collection/components/table/table.stories.js +51 -1
  122. package/dist/collection/components/table/types.js +5 -0
  123. package/dist/collection/components/textarea/textarea.css +2 -2
  124. package/dist/collection/components/toggle-button/toggle-button.css +2 -2
  125. package/dist/collection/components/toggle-group/toggle-group.css +2 -2
  126. package/dist/collection/components/tooltip/tooltip.css +2 -2
  127. package/dist/components/b2b-card.d.ts +11 -0
  128. package/dist/components/b2b-card.js +65 -0
  129. package/dist/components/b2b-modal.js +1 -1
  130. package/dist/components/b2b-search.js +3 -1
  131. package/dist/components/b2b-table-cell.js +1 -68
  132. package/dist/components/b2b-table-header.js +1 -89
  133. package/dist/components/b2b-table-row.js +45 -7
  134. package/dist/components/b2b-table-rowgroup.js +61 -5
  135. package/dist/components/icon.js +4 -1
  136. package/dist/components/input-list.js +3 -1
  137. package/dist/{esm/b2b-table-cell.entry.js → components/table-cell.js} +31 -9
  138. package/dist/{esm/b2b-table-header.entry.js → components/table-header.js} +30 -9
  139. package/dist/components/types.js +6 -1
  140. package/dist/custom-elements.json +65 -1
  141. package/dist/esm/b2b-alert.entry.js +1 -1
  142. package/dist/esm/b2b-anchor.entry.js +1 -1
  143. package/dist/esm/b2b-button_2.entry.js +1 -1
  144. package/dist/esm/b2b-card.entry.js +43 -0
  145. package/dist/esm/b2b-checkbox-group.entry.js +1 -1
  146. package/dist/esm/b2b-checkbox.entry.js +1 -1
  147. package/dist/esm/b2b-core-components.js +3 -3
  148. package/dist/esm/b2b-dropdown.entry.js +1 -1
  149. package/dist/esm/b2b-grid-col.entry.js +1 -1
  150. package/dist/esm/b2b-grid-row.entry.js +1 -1
  151. package/dist/esm/b2b-grid.entry.js +1 -1
  152. package/dist/esm/b2b-headline.entry.js +1 -1
  153. package/dist/esm/b2b-icon.entry.js +4 -2
  154. package/dist/esm/b2b-input-group_2.entry.js +3 -2
  155. package/dist/esm/b2b-input-label.entry.js +1 -1
  156. package/dist/esm/b2b-input_2.entry.js +1 -1
  157. package/dist/esm/b2b-label.entry.js +1 -1
  158. package/dist/esm/b2b-modal.entry.js +2 -2
  159. package/dist/esm/b2b-pagination.entry.js +1 -1
  160. package/dist/esm/b2b-paragraph.entry.js +1 -1
  161. package/dist/esm/b2b-radio-button.entry.js +1 -1
  162. package/dist/esm/b2b-radio-group.entry.js +1 -1
  163. package/dist/esm/b2b-required-separator.entry.js +1 -1
  164. package/dist/esm/b2b-scrollable-container.entry.js +1 -1
  165. package/dist/esm/b2b-search.entry.js +3 -2
  166. package/dist/esm/b2b-separator.entry.js +1 -1
  167. package/dist/esm/b2b-tab-group.entry.js +1 -1
  168. package/dist/esm/b2b-tab-panel.entry.js +1 -1
  169. package/dist/esm/b2b-tab.entry.js +1 -1
  170. package/dist/esm/b2b-table-cell_2.entry.js +114 -0
  171. package/dist/esm/b2b-table-row.entry.js +22 -5
  172. package/dist/esm/b2b-table-rowgroup.entry.js +58 -4
  173. package/dist/esm/b2b-table.entry.js +2 -2
  174. package/dist/esm/b2b-textarea.entry.js +1 -1
  175. package/dist/esm/b2b-toggle-button.entry.js +1 -1
  176. package/dist/esm/b2b-toggle-group.entry.js +1 -1
  177. package/dist/esm/b2b-tooltip.entry.js +1 -1
  178. package/dist/esm/{index-ffd21e30.js → index-026605c2.js} +11 -8
  179. package/dist/esm/loader.js +3 -3
  180. package/dist/esm/{types-b6ef0c78.js → types-a2bb01cb.js} +6 -1
  181. package/dist/types/components/card/card.d.ts +16 -0
  182. package/dist/types/components/card/card.stories.d.ts +6 -0
  183. package/dist/types/components/icon/icon.d.ts +2 -0
  184. package/dist/types/components/input-list/input-list.d.ts +3 -0
  185. package/dist/types/components/input-list/input-list.stories.d.ts +1 -0
  186. package/dist/types/components/search/search.d.ts +2 -0
  187. package/dist/types/components/search/search.stories.d.ts +2 -1
  188. package/dist/types/components/table/table-cell/table-cell.d.ts +3 -4
  189. package/dist/types/components/table/table-row/table-row.d.ts +11 -2
  190. package/dist/types/components/table/table-rowgroup/table-rowgroup.d.ts +15 -0
  191. package/dist/types/components/table/table.stories.d.ts +1 -0
  192. package/dist/types/components/table/types.d.ts +7 -0
  193. package/dist/types/components.d.ts +116 -12
  194. package/dist/web-types.json +128 -4
  195. package/package.json +9 -9
  196. package/dist/b2b-core-components/p-4cc68a17.entry.js +0 -1
  197. package/dist/b2b-core-components/p-6000aa40.js +0 -2
  198. package/dist/b2b-core-components/p-81a32656.entry.js +0 -1
  199. package/dist/b2b-core-components/p-8d5e14b1.js +0 -1
  200. package/dist/b2b-core-components/p-9cab38a6.entry.js +0 -1
  201. package/dist/b2b-core-components/p-b35d3924.entry.js +0 -1
  202. package/dist/b2b-core-components/p-cfdb21b6.entry.js +0 -1
  203. package/dist/b2b-core-components/p-da6ddbb2.entry.js +0 -1
  204. package/dist/b2b-core-components/p-f6105da5.entry.js +0 -1
  205. package/dist/cjs/b2b-table-cell.cjs.entry.js +0 -52
@@ -0,0 +1,138 @@
1
+ import { h, Host, } from '@stencil/core';
2
+ export class CardComponent {
3
+ constructor() {
4
+ this.disabled = false;
5
+ this.href = '';
6
+ this.target = 'blank';
7
+ }
8
+ onClick() {
9
+ this.b2bChange.emit();
10
+ }
11
+ onKeyDown(event) {
12
+ if (event.key === 'Enter') {
13
+ this.b2bChange.emit();
14
+ }
15
+ }
16
+ getTabIndex() {
17
+ // not focusable
18
+ if (this.disabled)
19
+ return -1;
20
+ // <a> element has native focus so using 0 makes it focusable twice
21
+ // returning an empty string lets user agent decide if is focusable
22
+ else if (this.href != '')
23
+ return '';
24
+ // makes card focusable without <a> element
25
+ else
26
+ return 0;
27
+ }
28
+ render() {
29
+ return (h(Host, { tabIndex: this.getTabIndex(), "aria-disabled": this.disabled ? 'true' : null, class: {
30
+ 'b2b-card': true,
31
+ 'b2b-card--disabled': this.disabled,
32
+ } }, this.href != '' && h("a", { href: this.href, target: `_${this.target}` }), this.disabled && h("div", { class: "b2b-card--disabled-overlay" }), h("slot", null)));
33
+ }
34
+ static get is() { return "b2b-card"; }
35
+ static get encapsulation() { return "shadow"; }
36
+ static get originalStyleUrls() {
37
+ return {
38
+ "$": ["card.scss"]
39
+ };
40
+ }
41
+ static get styleUrls() {
42
+ return {
43
+ "$": ["card.css"]
44
+ };
45
+ }
46
+ static get properties() {
47
+ return {
48
+ "disabled": {
49
+ "type": "boolean",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "boolean",
53
+ "resolved": "boolean",
54
+ "references": {}
55
+ },
56
+ "required": false,
57
+ "optional": false,
58
+ "docs": {
59
+ "tags": [],
60
+ "text": "Disables the card. Per default, it is false"
61
+ },
62
+ "attribute": "disabled",
63
+ "reflect": false,
64
+ "defaultValue": "false"
65
+ },
66
+ "href": {
67
+ "type": "string",
68
+ "mutable": false,
69
+ "complexType": {
70
+ "original": "string",
71
+ "resolved": "string",
72
+ "references": {}
73
+ },
74
+ "required": false,
75
+ "optional": true,
76
+ "docs": {
77
+ "tags": [],
78
+ "text": "An optional href in case the card is used to redirect on click."
79
+ },
80
+ "attribute": "href",
81
+ "reflect": false,
82
+ "defaultValue": "''"
83
+ },
84
+ "target": {
85
+ "type": "string",
86
+ "mutable": false,
87
+ "complexType": {
88
+ "original": "'blank' | 'self'",
89
+ "resolved": "\"blank\" | \"self\"",
90
+ "references": {}
91
+ },
92
+ "required": false,
93
+ "optional": true,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": "The target of the card if used with an href. Blank per default."
97
+ },
98
+ "attribute": "target",
99
+ "reflect": false,
100
+ "defaultValue": "'blank'"
101
+ }
102
+ };
103
+ }
104
+ static get events() {
105
+ return [{
106
+ "method": "b2bChange",
107
+ "name": "b2b-selected",
108
+ "bubbles": true,
109
+ "cancelable": true,
110
+ "composed": true,
111
+ "docs": {
112
+ "tags": [],
113
+ "text": "Emits whenever the card is clicked on or enter is pressed while the card has focus."
114
+ },
115
+ "complexType": {
116
+ "original": "void",
117
+ "resolved": "void",
118
+ "references": {}
119
+ }
120
+ }];
121
+ }
122
+ static get elementRef() { return "host"; }
123
+ static get listeners() {
124
+ return [{
125
+ "name": "click",
126
+ "method": "onClick",
127
+ "target": undefined,
128
+ "capture": false,
129
+ "passive": false
130
+ }, {
131
+ "name": "keydown",
132
+ "method": "onKeyDown",
133
+ "target": undefined,
134
+ "capture": false,
135
+ "passive": false
136
+ }];
137
+ }
138
+ }
@@ -0,0 +1,41 @@
1
+ import { html } from 'lit-html';
2
+ import cardDocs from './card.docs.mdx';
3
+ import { getArgTypes } from '../../docs/config/utils';
4
+ const Template = ({ disabled, href, target }) => {
5
+ return html `<b2b-card disabled="${disabled}" href=${href} target="${target}">
6
+ <b2b-headline size="100">An Interactive Card</b2b-headline>
7
+ <b2b-paragraph
8
+ >You can hover over me or press tab on your keyboard to see me pop out. I
9
+ fill up to 100% of my parent element, so you can use me in a
10
+ grid.</b2b-paragraph
11
+ >
12
+ </b2b-card>`;
13
+ };
14
+ const defaultArgs = {
15
+ disabled: false,
16
+ href: '',
17
+ target: 'blank',
18
+ };
19
+ export const story010Card = Template.bind({});
20
+ story010Card.args = Object.assign({}, defaultArgs);
21
+ story010Card.storyName = 'Default Card';
22
+ export const story020DisabledCard = Template.bind({});
23
+ story020DisabledCard.args = Object.assign(Object.assign({}, defaultArgs), { disabled: true });
24
+ story020DisabledCard.storyName = 'Disabled';
25
+ export const story030LinkCard = Template.bind({});
26
+ story030LinkCard.args = Object.assign(Object.assign({}, defaultArgs), { href: 'https://www.otto.de' });
27
+ story030LinkCard.storyName = 'Card with Link';
28
+ const controls = {
29
+ href: 'string',
30
+ };
31
+ const cardArgs = getArgTypes('b2b-card', controls);
32
+ export default {
33
+ title: 'Components/Interaction/Card',
34
+ argTypes: Object.assign({}, cardArgs),
35
+ viewMode: 'docs',
36
+ parameters: {
37
+ docs: {
38
+ page: cardDocs,
39
+ },
40
+ },
41
+ };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -224,6 +224,9 @@
224
224
  line-height: var(--b2b-icon-line-height);
225
225
  cursor: var(--b2b-icon-cursor);
226
226
  }
227
+ :host .b2b-icon--clickable {
228
+ cursor: pointer;
229
+ }
227
230
  :host .b2b-icon.icon-50 {
228
231
  width: var(--b2b-size-40);
229
232
  height: var(--b2b-size-40);
@@ -9,6 +9,7 @@ export class B2bIcon {
9
9
  this.icon = undefined;
10
10
  this.color = 'inherit';
11
11
  this.size = '100';
12
+ this.clickable = false;
12
13
  this.pathData = null;
13
14
  }
14
15
  connectedCallback() {
@@ -21,6 +22,7 @@ export class B2bIcon {
21
22
  'b2b-icon': true,
22
23
  [`icon-${this.size}`]: true,
23
24
  [this.color]: true,
25
+ 'b2b-icon--clickable': this.clickable,
24
26
  }, innerHTML: this.pathData })));
25
27
  }
26
28
  loadIconPathData() {
@@ -113,6 +115,24 @@ export class B2bIcon {
113
115
  "attribute": "size",
114
116
  "reflect": false,
115
117
  "defaultValue": "'100'"
118
+ },
119
+ "clickable": {
120
+ "type": "boolean",
121
+ "mutable": false,
122
+ "complexType": {
123
+ "original": "boolean",
124
+ "resolved": "boolean",
125
+ "references": {}
126
+ },
127
+ "required": false,
128
+ "optional": false,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": "Will display a pointer cursor when hovering the icon"
132
+ },
133
+ "attribute": "clickable",
134
+ "reflect": false,
135
+ "defaultValue": "false"
116
136
  }
117
137
  };
118
138
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -3,26 +3,26 @@ import inputGroupDocs from './input-group.docs.mdx';
3
3
  import { getArgTypes } from '../../docs/config/utils';
4
4
  const Template = ({ invalid, disabled, error, hint, additionalSlot, }) => {
5
5
  return additionalSlot
6
- ? html `<div style="width: 480px">
6
+ ? html ` <div style="width: 380px">
7
7
  <b2b-input-group
8
8
  invalid="${invalid}"
9
9
  disabled="${disabled}"
10
10
  error="${error}"
11
11
  hint="${hint}">
12
12
  <b2b-input slot="start" label="Search Term"></b2b-input>
13
- <b2b-dropdown>
13
+ <b2b-dropdown style="width: 90px;">
14
14
  <option value="one">€</option>
15
15
  <option value="two">$</option>
16
16
  </b2b-dropdown>
17
- <b2b-button slot="end" variant="primary"
18
- ><b2b-icon icon="b2b_icon-search"></b2b-icon
19
- ></b2b-button>
17
+ <b2b-button slot="end" variant="primary">
18
+ <b2b-icon icon="b2b_icon-search"></b2b-icon>
19
+ </b2b-button>
20
20
  </b2b-input-group>
21
21
  </div>`
22
- : html `<div style="width: 480px">
22
+ : html `<div style="width: 280px">
23
23
  <b2b-input-group invalid="${invalid}" disabled="${disabled}" error="${error}" hint="${hint}">
24
24
  <b2b-input slot="start" label="Search Term"></b2b-input>
25
- <b2b-dropdown slot="end">
25
+ <b2b-dropdown slot="end" style="width: fit-content;">
26
26
  <option value="one">€</option>
27
27
  <option value="two">$</option>
28
28
  </b2b-dropdown>
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -83,6 +83,7 @@ export class InputListComponent {
83
83
  this.placeholder = undefined;
84
84
  this.optionsList = [];
85
85
  this.value = null;
86
+ this.disabled = false;
86
87
  this.hasOptionList = this.optionsList.length > 0;
87
88
  this.isElementFocused = false;
88
89
  }
@@ -146,7 +147,7 @@ export class InputListComponent {
146
147
  this.isElementFocused &&
147
148
  Boolean(this.value),
148
149
  [groupOrderClass]: true,
149
- } }, h("b2b-input", { type: "text", label: this.label, value: this.value, "onb2b-input": this.handleInput, placeholder: this.placeholder, required: this.required }, Boolean(this.value) && (h("b2b-icon", { icon: "b2b_icon-close", "aria-label": "reset", slot: "end", tabIndex: 0, onMouseDown: this.resetInput, onKeyDown: this.resetInput }))), this.isElementFocused && Boolean(this.value) ? (h("div", { class: "b2b-input-list__options-container" }, this.hasOptionList ? (h("div", { class: "b2b-input-list__options", role: "listbox" }, this.optionsList.map(option => (h("b2b-input-list-option", { option: option, tabIndex: -1, "onb2b-option-selected": this.onOptionSelected }))))) : (h("slot", null)))) : null)));
150
+ } }, h("b2b-input", { type: "text", label: this.label, value: this.value, disabled: this.disabled, "onb2b-input": this.handleInput, placeholder: this.placeholder, required: this.required }, Boolean(this.value) && (h("b2b-icon", { icon: "b2b_icon-close", "aria-label": "reset", slot: "end", tabIndex: 0, onMouseDown: this.resetInput, onKeyDown: this.resetInput }))), this.isElementFocused && Boolean(this.value) ? (h("div", { class: "b2b-input-list__options-container" }, this.hasOptionList ? (h("div", { class: "b2b-input-list__options", role: "listbox" }, this.optionsList.map(option => (h("b2b-input-list-option", { option: option, tabIndex: -1, "onb2b-option-selected": this.onOptionSelected }))))) : (h("slot", null)))) : null)));
150
151
  }
151
152
  static get is() { return "b2b-input-list"; }
152
153
  static get encapsulation() { return "shadow"; }
@@ -247,6 +248,24 @@ export class InputListComponent {
247
248
  "attribute": "value",
248
249
  "reflect": true,
249
250
  "defaultValue": "null"
251
+ },
252
+ "disabled": {
253
+ "type": "boolean",
254
+ "mutable": false,
255
+ "complexType": {
256
+ "original": "boolean",
257
+ "resolved": "boolean",
258
+ "references": {}
259
+ },
260
+ "required": false,
261
+ "optional": false,
262
+ "docs": {
263
+ "tags": [],
264
+ "text": "Whether or not the input is disabled. Default is false."
265
+ },
266
+ "attribute": "disabled",
267
+ "reflect": true,
268
+ "defaultValue": "false"
250
269
  }
251
270
  };
252
271
  }
@@ -265,7 +284,7 @@ export class InputListComponent {
265
284
  "composed": true,
266
285
  "docs": {
267
286
  "tags": [],
268
- "text": ""
287
+ "text": "Emits when the user clicks the clear button."
269
288
  },
270
289
  "complexType": {
271
290
  "original": "InputClear",
@@ -2,13 +2,14 @@ import { getArgTypes } from '../../docs/config/utils';
2
2
  import { html } from 'lit-html';
3
3
  import inputListDocs from './input-list.docs.mdx';
4
4
  import { userEvent } from '@storybook/testing-library';
5
- const Template = ({ label, required, placeholder, optionsList, customMarkup, }) => {
5
+ const Template = ({ label, required, placeholder, optionsList, customMarkup, disabled, }) => {
6
6
  return html `<div style="height: 130px; width: 300px">
7
7
  <b2b-input-list
8
8
  data-testid="element"
9
9
  label="${label}"
10
10
  required="${required}"
11
11
  placeholder="${placeholder}"
12
+ disabled="${disabled}"
12
13
  .optionsList=${optionsList}
13
14
  >${customMarkup}</b2b-input-list
14
15
  >
@@ -19,6 +20,7 @@ const defaultArgs = {
19
20
  required: false,
20
21
  placeholder: 'Search here',
21
22
  optionsList: ['option1', 'option2', 'option3'],
23
+ disabled: false,
22
24
  };
23
25
  export const story010InputList = Template.bind({});
24
26
  story010InputList.args = Object.assign({}, defaultArgs);
@@ -26,6 +28,9 @@ story010InputList.storyName = 'Input List';
26
28
  export const story020InputListFocused = Template.bind({});
27
29
  story020InputListFocused.args = Object.assign({}, defaultArgs);
28
30
  story020InputListFocused.storyName = 'Focused';
31
+ export const story025InputListDisabled = Template.bind({});
32
+ story025InputListDisabled.args = Object.assign(Object.assign({}, defaultArgs), { disabled: true });
33
+ story025InputListDisabled.storyName = 'Disabled';
29
34
  export const story030CustomList = Template.bind({});
30
35
  const list = html `<ul>
31
36
  <li>Option 1</li>
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -225,7 +225,7 @@
225
225
  left: 0;
226
226
  bottom: 0;
227
227
  width: 100%;
228
- z-index: 100;
228
+ z-index: 1000;
229
229
  display: none;
230
230
  position: fixed;
231
231
  background-color: var(--b2b-color-background-overlay-transparent-80);
@@ -265,9 +265,14 @@
265
265
  background: transparent;
266
266
  padding: 0;
267
267
  border: none;
268
+ /* this is a workaround to force purgecss to include the overwrites of the variable --b2b-icon-cursor */
268
269
  }
269
- :host .b2b-modal-dialog--close .b2b-icon {
270
+ :host .b2b-modal-dialog--close b2b-icon {
270
271
  transition: all 0.3s ease;
272
+ --b2b-icon-cursor: pointer;
273
+ }
274
+ :host .b2b-modal-dialog--close .purge-css-include-variables {
275
+ cursor: var(--b2b-icon-cursor);
271
276
  }
272
277
  :host .b2b-modal-dialog--footer {
273
278
  display: flex;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 25 May 2023 12:11:57 GMT
3
+ * Generated on Wed, 07 Jun 2023 20:04:52 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 Thu, 25 May 2023 12:11:57 GMT
126
+ * Generated on Wed, 07 Jun 2023 20:04:52 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */