@otto-de/b2b-core-components 1.18.0 → 1.20.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.
Files changed (217) hide show
  1. package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
  2. package/dist/b2b-core-components/icons-50/b2b_icon-arrow-down.svg +2 -1
  3. package/dist/b2b-core-components/icons-50/b2b_icon-arrow-left.svg +2 -1
  4. package/dist/b2b-core-components/icons-50/b2b_icon-arrow-right.svg +2 -1
  5. package/dist/b2b-core-components/icons-50/b2b_icon-arrow-up.svg +2 -1
  6. package/dist/b2b-core-components/icons-50/b2b_icon-basket.svg +3 -2
  7. package/dist/b2b-core-components/icons-50/b2b_icon-check.svg +2 -1
  8. package/dist/b2b-core-components/icons-50/b2b_icon-close.svg +2 -1
  9. package/dist/b2b-core-components/icons-50/b2b_icon-delete.svg +5 -4
  10. package/dist/b2b-core-components/icons-50/b2b_icon-error-hint.svg +2 -1
  11. package/dist/b2b-core-components/icons-50/b2b_icon-filter.svg +4 -3
  12. package/dist/b2b-core-components/icons-50/b2b_icon-info-hint.svg +2 -1
  13. package/dist/b2b-core-components/icons-50/b2b_icon-info.svg +2 -1
  14. package/dist/b2b-core-components/icons-50/b2b_icon-leaving-page.svg +3 -2
  15. package/dist/b2b-core-components/icons-50/b2b_icon-minus.svg +2 -1
  16. package/dist/b2b-core-components/icons-50/b2b_icon-pin.svg +3 -2
  17. package/dist/b2b-core-components/icons-50/b2b_icon-plus.svg +2 -1
  18. package/dist/b2b-core-components/icons-50/b2b_icon-question-hint.svg +2 -1
  19. package/dist/b2b-core-components/icons-50/b2b_icon-question.svg +2 -1
  20. package/dist/b2b-core-components/icons-50/b2b_icon-rating-empty.svg +2 -1
  21. package/dist/b2b-core-components/icons-50/b2b_icon-rating-filled.svg +2 -1
  22. package/dist/b2b-core-components/icons-50/b2b_icon-rating-half.svg +2 -1
  23. package/dist/b2b-core-components/icons-50/b2b_icon-refresh.svg +2 -1
  24. package/dist/b2b-core-components/icons-50/b2b_icon-reply.svg +2 -1
  25. package/dist/b2b-core-components/icons-50/b2b_icon-smiley-positive.svg +5 -4
  26. package/dist/b2b-core-components/icons-50/b2b_icon-sort-ascending.svg +2 -1
  27. package/dist/b2b-core-components/icons-50/b2b_icon-sort-descending.svg +2 -1
  28. package/dist/b2b-core-components/icons-50/b2b_icon-sort.svg +6 -5
  29. package/dist/b2b-core-components/icons-50/b2b_icon-success-hint.svg +2 -1
  30. package/dist/b2b-core-components/icons-50/b2b_icon-trend-down.svg +2 -1
  31. package/dist/b2b-core-components/icons-50/b2b_icon-trend-up.svg +2 -1
  32. package/dist/b2b-core-components/icons-50/b2b_icon-warning-hint.svg +2 -1
  33. package/dist/b2b-core-components/icons-50/b2b_icon-wishlist-active.svg +2 -1
  34. package/dist/b2b-core-components/icons-50/b2b_icon-wishlist.svg +2 -1
  35. package/dist/b2b-core-components/p-08a26519.entry.js +1 -0
  36. package/dist/b2b-core-components/p-19392020.js +1 -0
  37. package/dist/b2b-core-components/{p-7128c388.entry.js → p-3665d675.entry.js} +1 -1
  38. package/dist/b2b-core-components/p-376ba9ef.entry.js +1 -0
  39. package/dist/b2b-core-components/p-4ac8b0ba.entry.js +1 -0
  40. package/dist/b2b-core-components/p-670a0599.entry.js +1 -0
  41. package/dist/b2b-core-components/p-68a836cb.entry.js +1 -0
  42. package/dist/b2b-core-components/p-6e031b32.entry.js +1 -0
  43. package/dist/b2b-core-components/{p-d4ab2a73.entry.js → p-72e23a4e.entry.js} +1 -1
  44. package/dist/b2b-core-components/p-ab8d496b.entry.js +1 -0
  45. package/dist/b2b-core-components/p-c03d0533.entry.js +1 -0
  46. package/dist/b2b-core-components/p-d0e930f2.entry.js +1 -0
  47. package/dist/b2b-core-components/p-d51551c9.entry.js +1 -0
  48. package/dist/cjs/b2b-breadcrumb-item.cjs.entry.js +1 -1
  49. package/dist/cjs/b2b-breadcrumb.cjs.entry.js +8 -3
  50. package/dist/cjs/b2b-checkbox.cjs.entry.js +1 -1
  51. package/dist/cjs/b2b-core-components.cjs.js +1 -1
  52. package/dist/cjs/b2b-date-picker-days_5.cjs.entry.js +1 -1
  53. package/dist/cjs/b2b-date-picker.cjs.entry.js +28 -14
  54. package/dist/cjs/b2b-modal.cjs.entry.js +1 -1
  55. package/dist/cjs/b2b-multiselect-dropdown.cjs.entry.js +15 -3
  56. package/dist/cjs/b2b-paragraph.cjs.entry.js +10 -3
  57. package/dist/cjs/b2b-table-cell_2.cjs.entry.js +18 -19
  58. package/dist/cjs/b2b-table-row.cjs.entry.js +27 -20
  59. package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +10 -27
  60. package/dist/cjs/b2b-table.cjs.entry.js +3 -4
  61. package/dist/cjs/loader.cjs.js +1 -1
  62. package/dist/cjs/{utils-41f7ffa8.js → utils-499e9db5.js} +43 -0
  63. package/dist/collection/components/alert/alert.css +2 -2
  64. package/dist/collection/components/anchor/anchor.css +2 -2
  65. package/dist/collection/components/background-box/background-box.css +2 -2
  66. package/dist/collection/components/breadcrumb/breadcrumb.css +13 -11
  67. package/dist/collection/components/breadcrumb/breadcrumb.js +47 -2
  68. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +15 -6
  69. package/dist/collection/components/button/button.css +2 -2
  70. package/dist/collection/components/card/card.css +2 -2
  71. package/dist/collection/components/checkbox/checkbox.css +2 -2
  72. package/dist/collection/components/checkbox/checkbox.e2e.js +6 -0
  73. package/dist/collection/components/checkbox/checkbox.js +1 -1
  74. package/dist/collection/components/checkbox/checkbox.stories.js +5 -0
  75. package/dist/collection/components/checkbox-group/checkbox-group.css +2 -2
  76. package/dist/collection/components/chip/chip.css +2 -2
  77. package/dist/collection/components/date-picker/date-picker-days-header.css +2 -2
  78. package/dist/collection/components/date-picker/date-picker-days.css +2 -3
  79. package/dist/collection/components/date-picker/date-picker-header.css +2 -2
  80. package/dist/collection/components/date-picker/date-picker-months.css +2 -2
  81. package/dist/collection/components/date-picker/date-picker-years.css +2 -2
  82. package/dist/collection/components/date-picker/date-picker.css +5 -5
  83. package/dist/collection/components/date-picker/date-picker.js +27 -13
  84. package/dist/collection/components/dropdown/dropdown.css +2 -2
  85. package/dist/collection/components/flyout-menu/flyout-menu-option.css +2 -2
  86. package/dist/collection/components/flyout-menu/flyout-menu.css +2 -2
  87. package/dist/collection/components/headline/headline.css +2 -2
  88. package/dist/collection/components/icon/icon.css +2 -2
  89. package/dist/collection/components/icon-100/icon-100.css +2 -2
  90. package/dist/collection/components/icon-50/icon-50.css +2 -2
  91. package/dist/collection/components/icon-50/icons-50/b2b_icon-arrow-down.svg +2 -1
  92. package/dist/collection/components/icon-50/icons-50/b2b_icon-arrow-left.svg +2 -1
  93. package/dist/collection/components/icon-50/icons-50/b2b_icon-arrow-right.svg +2 -1
  94. package/dist/collection/components/icon-50/icons-50/b2b_icon-arrow-up.svg +2 -1
  95. package/dist/collection/components/icon-50/icons-50/b2b_icon-basket.svg +3 -2
  96. package/dist/collection/components/icon-50/icons-50/b2b_icon-check.svg +2 -1
  97. package/dist/collection/components/icon-50/icons-50/b2b_icon-close.svg +2 -1
  98. package/dist/collection/components/icon-50/icons-50/b2b_icon-delete.svg +5 -4
  99. package/dist/collection/components/icon-50/icons-50/b2b_icon-error-hint.svg +2 -1
  100. package/dist/collection/components/icon-50/icons-50/b2b_icon-filter.svg +4 -3
  101. package/dist/collection/components/icon-50/icons-50/b2b_icon-info-hint.svg +2 -1
  102. package/dist/collection/components/icon-50/icons-50/b2b_icon-info.svg +2 -1
  103. package/dist/collection/components/icon-50/icons-50/b2b_icon-leaving-page.svg +3 -2
  104. package/dist/collection/components/icon-50/icons-50/b2b_icon-minus.svg +2 -1
  105. package/dist/collection/components/icon-50/icons-50/b2b_icon-pin.svg +3 -2
  106. package/dist/collection/components/icon-50/icons-50/b2b_icon-plus.svg +2 -1
  107. package/dist/collection/components/icon-50/icons-50/b2b_icon-question-hint.svg +2 -1
  108. package/dist/collection/components/icon-50/icons-50/b2b_icon-question.svg +2 -1
  109. package/dist/collection/components/icon-50/icons-50/b2b_icon-rating-empty.svg +2 -1
  110. package/dist/collection/components/icon-50/icons-50/b2b_icon-rating-filled.svg +2 -1
  111. package/dist/collection/components/icon-50/icons-50/b2b_icon-rating-half.svg +2 -1
  112. package/dist/collection/components/icon-50/icons-50/b2b_icon-refresh.svg +2 -1
  113. package/dist/collection/components/icon-50/icons-50/b2b_icon-reply.svg +2 -1
  114. package/dist/collection/components/icon-50/icons-50/b2b_icon-smiley-positive.svg +5 -4
  115. package/dist/collection/components/icon-50/icons-50/b2b_icon-sort-ascending.svg +2 -1
  116. package/dist/collection/components/icon-50/icons-50/b2b_icon-sort-descending.svg +2 -1
  117. package/dist/collection/components/icon-50/icons-50/b2b_icon-sort.svg +6 -5
  118. package/dist/collection/components/icon-50/icons-50/b2b_icon-success-hint.svg +2 -1
  119. package/dist/collection/components/icon-50/icons-50/b2b_icon-trend-down.svg +2 -1
  120. package/dist/collection/components/icon-50/icons-50/b2b_icon-trend-up.svg +2 -1
  121. package/dist/collection/components/icon-50/icons-50/b2b_icon-warning-hint.svg +2 -1
  122. package/dist/collection/components/icon-50/icons-50/b2b_icon-wishlist-active.svg +2 -1
  123. package/dist/collection/components/icon-50/icons-50/b2b_icon-wishlist.svg +2 -1
  124. package/dist/collection/components/input/input.css +2 -2
  125. package/dist/collection/components/input-group/input-group.css +2 -2
  126. package/dist/collection/components/input-list/input-list.css +2 -2
  127. package/dist/collection/components/label/label.css +2 -2
  128. package/dist/collection/components/modal/modal.css +3 -3
  129. package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.css +2 -2
  130. package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.js +25 -9
  131. package/dist/collection/components/pagination/pagination.css +2 -2
  132. package/dist/collection/components/paragraph/paragraph.css +11 -3
  133. package/dist/collection/components/paragraph/paragraph.js +63 -2
  134. package/dist/collection/components/paragraph/paragraph.stories.js +130 -27
  135. package/dist/collection/components/progress-bar/progress-bar.css +2 -2
  136. package/dist/collection/components/radio/radio.css +2 -2
  137. package/dist/collection/components/radio-group/radio-group.css +2 -2
  138. package/dist/collection/components/required-separator/required-separator.css +2 -2
  139. package/dist/collection/components/rounded-icon/rounded-icon.css +2 -2
  140. package/dist/collection/components/scrollable-container/scrollable-container.css +2 -2
  141. package/dist/collection/components/separator/separator.css +2 -2
  142. package/dist/collection/components/spinner/spinner.css +2 -2
  143. package/dist/collection/components/tab/tab.css +2 -2
  144. package/dist/collection/components/tab-panel/tab-panel.css +2 -2
  145. package/dist/collection/components/table/table-cell/table-cell.css +2 -2
  146. package/dist/collection/components/table/table-header/table-header.css +2 -2
  147. package/dist/collection/components/table/table-row/table-row.css +2 -2
  148. package/dist/collection/components/table/table-row/table-row.js +25 -43
  149. package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +2 -2
  150. package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +6 -22
  151. package/dist/collection/components/table/table.css +2 -2
  152. package/dist/collection/components/table/table.e2e.js +5 -5
  153. package/dist/collection/components/table/utils.js +5 -0
  154. package/dist/collection/components/textarea/textarea.css +2 -2
  155. package/dist/collection/components/toggle-button/toggle-button.css +2 -2
  156. package/dist/collection/components/toggle-chip/toggle-chip.css +2 -2
  157. package/dist/collection/components/toggle-group/toggle-group.css +2 -2
  158. package/dist/collection/components/toggle-switch/toggle-switch.css +2 -2
  159. package/dist/collection/components/tooltip/tooltip.css +2 -2
  160. package/dist/collection/components/wizard/wizard.css +2 -2
  161. package/dist/collection/components/wizard-icon/wizard-icon.css +2 -2
  162. package/dist/collection/utils/types/table.types.js +0 -5
  163. package/dist/components/b2b-breadcrumb-item.js +1 -1
  164. package/dist/components/b2b-breadcrumb.js +12 -4
  165. package/dist/components/b2b-date-picker.js +28 -14
  166. package/dist/components/b2b-modal.js +1 -1
  167. package/dist/components/b2b-multiselect-dropdown.js +17 -5
  168. package/dist/components/b2b-paragraph.js +14 -4
  169. package/dist/components/b2b-table-row.js +24 -18
  170. package/dist/components/b2b-table-rowgroup.js +5 -21
  171. package/dist/components/checkbox.js +1 -1
  172. package/dist/components/date-picker-days.js +1 -1
  173. package/dist/components/utils.js +6 -6
  174. package/dist/custom-elements.json +49 -1
  175. package/dist/esm/b2b-breadcrumb-item.entry.js +1 -1
  176. package/dist/esm/b2b-breadcrumb.entry.js +8 -3
  177. package/dist/esm/b2b-checkbox.entry.js +1 -1
  178. package/dist/esm/b2b-core-components.js +1 -1
  179. package/dist/esm/b2b-date-picker-days_5.entry.js +1 -1
  180. package/dist/esm/b2b-date-picker.entry.js +28 -14
  181. package/dist/esm/b2b-modal.entry.js +1 -1
  182. package/dist/esm/b2b-multiselect-dropdown.entry.js +15 -3
  183. package/dist/esm/b2b-paragraph.entry.js +10 -3
  184. package/dist/esm/b2b-table-cell_2.entry.js +1 -2
  185. package/dist/esm/b2b-table-row.entry.js +24 -17
  186. package/dist/esm/b2b-table-rowgroup.entry.js +5 -22
  187. package/dist/esm/b2b-table.entry.js +1 -2
  188. package/dist/esm/loader.js +1 -1
  189. package/dist/esm/{utils-71968b12.js → utils-868299de.js} +37 -1
  190. package/dist/types/components/breadcrumb/breadcrumb.d.ts +4 -0
  191. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +1 -0
  192. package/dist/types/components/checkbox/checkbox.stories.d.ts +2 -1
  193. package/dist/types/components/date-picker/date-picker.d.ts +1 -0
  194. package/dist/types/components/multiselect-dropdown/multiselect-dropdown.d.ts +5 -3
  195. package/dist/types/components/paragraph/paragraph.d.ts +6 -0
  196. package/dist/types/components/paragraph/paragraph.stories.d.ts +13 -8
  197. package/dist/types/components/table/table-row/table-row.d.ts +3 -3
  198. package/dist/types/components/table/table-rowgroup/table-rowgroup.d.ts +0 -1
  199. package/dist/types/components/table/utils.d.ts +1 -0
  200. package/dist/types/components.d.ts +46 -7
  201. package/dist/types/utils/types/table.types.d.ts +0 -6
  202. package/dist/web-types.json +59 -8
  203. package/package.json +2 -2
  204. package/dist/b2b-core-components/p-000d700d.entry.js +0 -1
  205. package/dist/b2b-core-components/p-0af31837.entry.js +0 -1
  206. package/dist/b2b-core-components/p-2c60a909.entry.js +0 -1
  207. package/dist/b2b-core-components/p-2d3de3a7.entry.js +0 -1
  208. package/dist/b2b-core-components/p-39254a15.entry.js +0 -1
  209. package/dist/b2b-core-components/p-6148866a.entry.js +0 -1
  210. package/dist/b2b-core-components/p-619f67f6.entry.js +0 -1
  211. package/dist/b2b-core-components/p-92bfd54e.entry.js +0 -1
  212. package/dist/b2b-core-components/p-a6fa7831.entry.js +0 -1
  213. package/dist/b2b-core-components/p-bff69403.js +0 -1
  214. package/dist/b2b-core-components/p-d6400aa5.js +0 -1
  215. package/dist/b2b-core-components/p-e1672700.entry.js +0 -1
  216. package/dist/cjs/table.types-5df665b6.js +0 -45
  217. package/dist/esm/table.types-083a173a.js +0 -37
@@ -1,7 +1,39 @@
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
14
  import { getArgTypes } from "../../docs/config/utils";
3
- const template = ({ weight, size, align }) => {
4
- return html `<b2b-paragraph weight="${weight}" size="${size}" align="${align}">
15
+ const paragraphArgs = getArgTypes('b2b-paragraph');
16
+ const meta = {
17
+ title: 'Components/Content/Paragraph',
18
+ component: 'b2b-paragraph',
19
+ args: {
20
+ weight: 'normal',
21
+ size: '100',
22
+ align: 'left',
23
+ margin: true,
24
+ variant: 'black',
25
+ display: 'block',
26
+ },
27
+ argTypes: Object.assign({}, paragraphArgs),
28
+ render: (_a) => {
29
+ var args = __rest(_a, []);
30
+ return html `<b2b-paragraph
31
+ weight="${args.weight}"
32
+ size="${args.size}"
33
+ align="${args.align}"
34
+ margin="${args.margin}"
35
+ variant="${args.variant}"
36
+ display="${args.display}">
5
37
  Far far away, behind the word mountains, far from the countries Vokalia and
6
38
  Consonantia, there live the blind texts. Separated they live in
7
39
  Bookmarksgrove right at the coast of the Semantics, a large language ocean.
@@ -14,30 +46,101 @@ const template = ({ weight, size, align }) => {
14
46
  because there were thousands of bad Commas, wild Question Marks and devious
15
47
  Semikoli, but the Little Blind Text didn’t listen.
16
48
  </b2b-paragraph>`;
49
+ },
17
50
  };
18
- const defaultArgs = {
19
- weight: 'normal',
20
- size: '100',
21
- align: 'left',
22
- };
23
- export const story010Default = template.bind({});
24
- story010Default.args = defaultArgs;
25
- story010Default.storyName = 'Default';
26
- export const story020Bold = template.bind({});
27
- story020Bold.args = Object.assign(Object.assign({}, defaultArgs), { weight: 'bold' });
28
- story020Bold.storyName = 'Bold text';
29
- export const story030Small = template.bind({});
30
- story030Small.args = Object.assign(Object.assign({}, defaultArgs), { size: '50' });
31
- story030Small.storyName = 'Small text';
32
- export const story040Center = template.bind({});
33
- story040Center.args = Object.assign(Object.assign({}, defaultArgs), { align: 'center' });
34
- story040Center.storyName = 'Center aligned text';
35
- export const story050Right = template.bind({});
36
- story050Right.args = Object.assign(Object.assign({}, defaultArgs), { align: 'right' });
37
- story050Right.storyName = 'Right aligned text';
38
- const argTypes = getArgTypes('b2b-paragraph');
39
- export default {
40
- title: 'Components/Content/Paragraph',
41
- argTypes: argTypes,
42
- viewMode: 'docs',
51
+ export default meta;
52
+ export const Default = {
53
+ args: Object.assign({}, meta.args),
54
+ };
55
+ export const Bold = {
56
+ args: Object.assign(Object.assign({}, meta.args), { weight: 'bold' }),
57
+ };
58
+ export const Small = {
59
+ args: Object.assign(Object.assign({}, meta.args), { size: '50' }),
60
+ };
61
+ export const CenterAligned = {
62
+ args: Object.assign(Object.assign({}, meta.args), { align: 'center' }),
63
+ };
64
+ export const RightAligned = {
65
+ args: Object.assign(Object.assign({}, meta.args), { align: 'right' }),
66
+ };
67
+ export const NoBottomMargin = {
68
+ args: Object.assign(Object.assign({}, meta.args), { margin: false }),
69
+ };
70
+ export const GreyVariant = {
71
+ args: Object.assign(Object.assign({}, meta.args), { variant: 'grey-400' }),
72
+ };
73
+ export const DisplayInline = {
74
+ args: Object.assign(Object.assign({}, meta.args), { display: 'inline' }),
75
+ render: (_a) => {
76
+ var args = __rest(_a, []);
77
+ return html `<b2b-paragraph
78
+ weight="${args.weight}"
79
+ size="${args.size}"
80
+ align="${args.align}"
81
+ margin="${args.margin}"
82
+ variant="${args.variant}"
83
+ display="${args.display}">
84
+ Far far away, behind the word mountains, far from the countries Vokalia
85
+ and Consonantia, there live the blind texts. Separated they live in
86
+ Bookmarksgrove right at the coast of the Semantics, a large language
87
+ ocean. A small river named Duden flows by their place and supplies it with
88
+ the necessary regelialia. It is a paradisematic country, in which roasted
89
+ parts of sentences fly into your mouth. Even the all-powerful Pointing has
90
+ no control about the blind texts it is an almost unorthographic life One
91
+ day however a small line of blind text by the name of Lorem Ipsum decided
92
+ to leave for the far World of Grammar. The Big Oxmox advised her not to do
93
+ so, because there were thousands of bad Commas, wild Question Marks and
94
+ devious Semikoli, but the Little Blind Text didn’t listen. </b2b-paragraph
95
+ ><b2b-paragraph
96
+ >Far far away, behind the word mountains, far from the countries Vokalia
97
+ and Consonantia, there live the blind texts. Separated they live in
98
+ Bookmarksgrove right at the coast of the Semantics, a large language
99
+ ocean. A small river named Duden flows by their place and supplies it with
100
+ the necessary regelialia. It is a paradisematic country, in which roasted
101
+ parts of sentences fly into your mouth. Even the all-powerful Pointing has
102
+ no control about the blind texts it is an almost unorthographic life One
103
+ day however a small line of blind text by the name of Lorem Ipsum decided
104
+ to leave for the far World of Grammar. The Big Oxmox advised her not to do
105
+ so, because there were thousands of bad Commas, wild Question Marks and
106
+ devious Semikoli, but the Little Blind Text didn’t listen.
107
+ </b2b-paragraph>`;
108
+ },
109
+ };
110
+ export const DisplayInlineBlock = {
111
+ args: Object.assign(Object.assign({}, meta.args), { display: 'inline-block' }),
112
+ render: (_a) => {
113
+ var args = __rest(_a, []);
114
+ return html `<b2b-paragraph
115
+ weight="${args.weight}"
116
+ size="${args.size}"
117
+ align="${args.align}"
118
+ margin="${args.margin}"
119
+ variant="${args.variant}"
120
+ display="${args.display}">
121
+ Far far away, behind the word mountains, far from the countries Vokalia
122
+ and Consonantia, there live the blind texts. Separated they live in
123
+ Bookmarksgrove right at the coast of the Semantics, a large language
124
+ ocean. A small river named Duden flows by their place and supplies it with
125
+ the necessary regelialia. It is a paradisematic country, in which roasted
126
+ parts of sentences fly into your mouth. Even the all-powerful Pointing has
127
+ no control about the blind texts it is an almost unorthographic life One
128
+ day however a small line of blind text by the name of Lorem Ipsum decided
129
+ to leave for the far World of Grammar. The Big Oxmox advised her not to do
130
+ so, because there were thousands of bad Commas, wild Question Marks and
131
+ devious Semikoli, but the Little Blind Text didn’t listen. </b2b-paragraph
132
+ ><b2b-paragraph
133
+ >Far far away, behind the word mountains, far from the countries Vokalia
134
+ and Consonantia, there live the blind texts. Separated they live in
135
+ Bookmarksgrove right at the coast of the Semantics, a large language
136
+ ocean. A small river named Duden flows by their place and supplies it with
137
+ the necessary regelialia. It is a paradisematic country, in which roasted
138
+ parts of sentences fly into your mouth. Even the all-powerful Pointing has
139
+ no control about the blind texts it is an almost unorthographic life One
140
+ day however a small line of blind text by the name of Lorem Ipsum decided
141
+ to leave for the far World of Grammar. The Big Oxmox advised her not to do
142
+ so, because there were thousands of bad Commas, wild Question Marks and
143
+ devious Semikoli, but the Little Blind Text didn’t listen.
144
+ </b2b-paragraph>`;
145
+ },
43
146
  };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,5 +1,6 @@
1
1
  import { h, Host, } from "@stencil/core";
2
- import { TableAccordionRowTypes, TableColourOptions, TableSizes, } from "../../../utils/types/table.types";
2
+ import { TableColourOptions, TableSizes, } from "../../../utils/types/table.types";
3
+ import { isFirstRow } from "../utils";
3
4
  export class TableRowComponent {
4
5
  constructor() {
5
6
  this.toggleOpen = () => {
@@ -17,8 +18,11 @@ export class TableRowComponent {
17
18
  });
18
19
  };
19
20
  this.getRowColor = () => {
20
- if (this.accordionType === TableAccordionRowTypes.PARENT)
21
+ if (this.isAccordion() &&
22
+ isFirstRow(this.hostElement) &&
23
+ !this.isHeader()) {
21
24
  return TableColourOptions.GROUP;
25
+ }
22
26
  return this.color;
23
27
  };
24
28
  /** Only needs to be added if we control the state of the selection. */
@@ -29,8 +33,14 @@ export class TableRowComponent {
29
33
  this.getParentRowGroup = () => {
30
34
  return this.hostElement.closest('b2b-table-rowgroup');
31
35
  };
36
+ this.isAccordion = () => {
37
+ return this.getParentRowGroup().hasAttribute('accordion');
38
+ };
39
+ this.isHeader = () => {
40
+ return this.getParentRowGroup().type === 'header';
41
+ };
32
42
  this.getCheckbox = () => {
33
- let parent = this.getParentRowGroup();
43
+ const parent = this.getParentRowGroup();
34
44
  if (this.shouldAddCheckbox()) {
35
45
  if (parent.type === 'header') {
36
46
  return (h("b2b-table-header", { class: "b2b-table-row__control-cell--checkbox" }, h("b2b-checkbox", { standalone: true, checked: this.checked, indeterminate: this.indeterminate })));
@@ -41,23 +51,21 @@ export class TableRowComponent {
41
51
  }
42
52
  };
43
53
  this.getAccordionColumns = () => {
44
- if (this.accordionType != undefined) {
45
- switch (this.accordionType) {
46
- case TableAccordionRowTypes.HEADER:
47
- return (h("b2b-table-header", { class: "b2b-table-row__control-cell--accordion" }));
48
- case TableAccordionRowTypes.PARENT:
49
- return (h("b2b-table-cell", null, h("button", { onClick: this.toggleOpen, class: {
50
- 'b2b-table-row__accordion-icon': true,
51
- 'b2b-table-row__accordion-icon--open': this.isOpen,
52
- } }, h("b2b-icon", { icon: "b2b_icon-arrow-right", clickable: true }))));
53
- case TableAccordionRowTypes.CHILD:
54
- return (h("b2b-table-cell", { class: "b2b-table-row__control-cell--accordion" }));
54
+ if (this.isAccordion() && !this.isHeader()) {
55
+ if (isFirstRow(this.hostElement)) {
56
+ return (h("b2b-table-cell", null, h("button", { onClick: this.toggleOpen, class: {
57
+ 'b2b-table-row__accordion-icon': true,
58
+ 'b2b-table-row__accordion-icon--open': this.isOpen,
59
+ } }, h("b2b-icon", { icon: "b2b_icon-arrow-right", clickable: true }))));
55
60
  }
61
+ return (h("b2b-table-cell", { class: "b2b-table-row__control-cell--accordion" }));
62
+ }
63
+ else if (this.isAccordion() && this.isHeader()) {
64
+ return (h("b2b-table-header", { class: "b2b-table-row__control-cell--accordion" }));
56
65
  }
57
66
  };
58
67
  this.highlight = true;
59
68
  this.color = 'default';
60
- this.accordionType = undefined;
61
69
  this.selectable = undefined;
62
70
  this.size = undefined;
63
71
  this.value = undefined;
@@ -91,12 +99,12 @@ export class TableRowComponent {
91
99
  }
92
100
  }
93
101
  render() {
94
- return (h(Host, { key: '5c12f0e1d67ff6dac1223d8973e376c2773b3735', class: {
102
+ return (h(Host, { key: '158ea38cbc14a9fd14a87beaa20cc6610d348eef', class: {
95
103
  'b2b-table-row': true,
96
104
  ['b2b-table-row--colspan']: this.size === TableSizes.COLSPAN,
97
105
  ['b2b-table-row--highlight']: this.highlight,
98
106
  [`b2b-table-row--color-${this.getRowColor()}`]: true,
99
- }, role: "row" }, this.getAccordionColumns(), this.getCheckbox(), h("slot", { key: '2aaf7ec2f09c1c9a5a37dded002408bff7c1754a' })));
107
+ }, role: "row" }, this.getAccordionColumns(), this.getCheckbox(), h("slot", { key: '0f4afc0529929c2d308f76ce91a0353af7532607' })));
100
108
  }
101
109
  static get is() { return "b2b-table-row"; }
102
110
  static get encapsulation() { return "shadow"; }
@@ -154,32 +162,6 @@ export class TableRowComponent {
154
162
  "reflect": false,
155
163
  "defaultValue": "'default'"
156
164
  },
157
- "accordionType": {
158
- "type": "string",
159
- "mutable": false,
160
- "complexType": {
161
- "original": "TableAccordionRowTypes",
162
- "resolved": "\"child\" | \"header\" | \"parent\"",
163
- "references": {
164
- "TableAccordionRowTypes": {
165
- "location": "import",
166
- "path": "../../../utils/types/table.types",
167
- "id": "src/utils/types/table.types.ts::TableAccordionRowTypes"
168
- }
169
- }
170
- },
171
- "required": false,
172
- "optional": false,
173
- "docs": {
174
- "tags": [{
175
- "name": "internal",
176
- "text": "Determined by the parent rowgroup for accordion rowgroups."
177
- }],
178
- "text": ""
179
- },
180
- "attribute": "accordion-type",
181
- "reflect": false
182
- },
183
165
  "selectable": {
184
166
  "type": "boolean",
185
167
  "mutable": false,
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,11 +1,11 @@
1
1
  import { h, Host, } from "@stencil/core";
2
- import { TableAccordionRowTypes, TableRowgroupTypes, TableSizes, } from "../../../utils/types/table.types";
3
- import { updateCheckboxState, getFirstRow, getAllRows, getRemainingRows, } from "../utils";
2
+ import { TableRowgroupTypes, TableSizes, } from "../../../utils/types/table.types";
3
+ import { updateCheckboxState, getFirstRow, getAllRows, getRemainingRows, isFirstRow, } from "../utils";
4
4
  export class TableRowgroupComponent {
5
5
  constructor() {
6
6
  this.toggleSelectAll = (event, children) => {
7
7
  this.toggleList(children, event);
8
- const rows = children.filter(child => child.accordionType !== TableAccordionRowTypes.PARENT);
8
+ const rows = children.filter(child => !isFirstRow(child));
9
9
  this.selectedValues = [...rows]
10
10
  .filter(child => child.checked)
11
11
  .map(child => child.value);
@@ -13,20 +13,6 @@ export class TableRowgroupComponent {
13
13
  this.toggleList = (list, event) => {
14
14
  list.forEach(child => ((child.checked = event.detail.checked), (child.indeterminate = false)));
15
15
  };
16
- this.addAccordionControlColumn = () => {
17
- const firstRow = getFirstRow(this.host);
18
- if (this.type === TableRowgroupTypes.HEADER) {
19
- firstRow && (firstRow.accordionType = TableAccordionRowTypes.HEADER);
20
- }
21
- else {
22
- firstRow && (firstRow.accordionType = TableAccordionRowTypes.PARENT);
23
- }
24
- const children = getRemainingRows(this.host);
25
- children &&
26
- children.forEach(child => {
27
- child.accordionType = TableAccordionRowTypes.CHILD;
28
- });
29
- };
30
16
  this.addCheckboxColumn = () => {
31
17
  const children = getAllRows(this.host);
32
18
  children.forEach(child => (child.selectable = true));
@@ -84,8 +70,7 @@ export class TableRowgroupComponent {
84
70
  const target = event.target;
85
71
  const table = this.host.closest('b2b-table');
86
72
  const parentValue = (_a = getFirstRow(this.host).value) !== null && _a !== void 0 ? _a : 'header';
87
- if (this.accordion &&
88
- target.accordionType === TableAccordionRowTypes.PARENT) {
73
+ if (this.accordion && isFirstRow(target) && parentValue != 'header') {
89
74
  const children = getRemainingRows(this.host);
90
75
  this.toggleSelectAll(event, children);
91
76
  }
@@ -118,7 +103,6 @@ export class TableRowgroupComponent {
118
103
  }
119
104
  componentWillLoad() {
120
105
  if (this.accordion) {
121
- this.addAccordionControlColumn();
122
106
  this.toggleInitialVisibility();
123
107
  }
124
108
  if (this.selectable) {
@@ -129,11 +113,11 @@ export class TableRowgroupComponent {
129
113
  this.makeHeaderRowNotSelectable();
130
114
  }
131
115
  render() {
132
- return (h(Host, { key: '79e8f3929f142b1d0f063e38c1b3a0295fe5c9d2', class: {
116
+ return (h(Host, { key: 'b32971c633a27af352651656743e5788f08dbc70', class: {
133
117
  ['b2b-table-rowgroup__' + this.type]: true,
134
118
  'b2b-table-rowgroup--fixed': this.fixed,
135
119
  'b2b-table-rowgroup--colspan': this.size === TableSizes.COLSPAN,
136
- }, role: "rowgroup" }, h("slot", { key: 'cbd36b06a0911c2e0309e65aaaa31c83396dd6b4' })));
120
+ }, role: "rowgroup" }, h("slot", { key: '53e1830d7834f3330a2a74f94d0ebea102fc5d5d' })));
137
121
  }
138
122
  static get is() { return "b2b-table-rowgroup"; }
139
123
  static get encapsulation() { return "shadow"; }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Thu, 12 Dec 2024 07:14:23 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 Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Thu, 12 Dec 2024 07:14:23 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -200,15 +200,15 @@ describe('B2B-Table', () => {
200
200
  page = await newE2EPage();
201
201
  await page.setContent(tableWithAccordion);
202
202
  const firstRow = await page.find('#test-parent');
203
- const type = await firstRow.getProperty('accordionType');
204
- expect(type).toEqualText('parent');
203
+ const arrowCell = await firstRow.find('b2b-table-row__accordion-icon');
204
+ expect(arrowCell).toBeDefined();
205
205
  });
206
206
  it('should render all rows as accordion children when they are in the same rowgroup of type body in which accordion is true', async () => {
207
207
  page = await newE2EPage();
208
208
  await page.setContent(tableWithAccordion);
209
- const firstRow = await page.find('#test-child');
210
- const type = await firstRow.getProperty('accordionType');
211
- expect(type).toEqualText('child');
209
+ const childRow = await page.find('#test-child');
210
+ const controlCell = await childRow.find('.b2b-table-row__control-cell--accordion');
211
+ expect(controlCell).toBeDefined();
212
212
  });
213
213
  it('should add an extra column for controls if accordion is true on a rowgroup', async () => {
214
214
  page = await newE2EPage();
@@ -30,3 +30,8 @@ export function getFirstRow(hostEl) {
30
30
  return firstRow;
31
31
  }
32
32
  }
33
+ export function isFirstRow(el) {
34
+ // attr is nullable so
35
+ // eslint-disable-next-line @stencil-community/strict-boolean-conditions
36
+ return el.previousElementSibling ? false : true;
37
+ }