@infineon/infineon-design-system-stencil 30.9.1--canary.1663.04cb986ccd7894a97ab77b9bea18e02ca81adbee.0 → 30.9.2--canary.1640.55f6082d40b32de317977a352b37983c1f14902c.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 (187) hide show
  1. package/dist/cjs/ifx-accordion_2.cjs.entry.js +2 -2
  2. package/dist/cjs/ifx-accordion_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ifx-modal.cjs.entry.js +8 -8
  4. package/dist/cjs/ifx-modal.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ifx-multiselect_2.cjs.entry.js +5 -5
  6. package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ifx-search-bar.cjs.entry.js +5 -5
  8. package/dist/cjs/ifx-search-bar.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ifx-sidebar-item.cjs.entry.js +9 -9
  10. package/dist/cjs/ifx-sidebar-item.cjs.entry.js.map +1 -1
  11. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/collection/components/accordion/accordion.stories.js +79 -3
  14. package/dist/collection/components/accordion/accordion.stories.js.map +1 -1
  15. package/dist/collection/components/accordion/accordionItem.js +4 -4
  16. package/dist/collection/components/accordion/accordionItem.js.map +1 -1
  17. package/dist/collection/components/alert/alert.stories.js +45 -12
  18. package/dist/collection/components/alert/alert.stories.js.map +1 -1
  19. package/dist/collection/components/badge/badge.stories.js +28 -7
  20. package/dist/collection/components/badge/badge.stories.js.map +1 -1
  21. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +66 -7
  22. package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
  23. package/dist/collection/components/button/button.stories.js +104 -9
  24. package/dist/collection/components/button/button.stories.js.map +1 -1
  25. package/dist/collection/components/card/card.stories.js +85 -2
  26. package/dist/collection/components/card/card.stories.js.map +1 -1
  27. package/dist/collection/components/checkbox/checkbox.stories.js +75 -14
  28. package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -1
  29. package/dist/collection/components/content-switcher/content-switcher.stories.js +65 -3
  30. package/dist/collection/components/content-switcher/content-switcher.stories.js.map +1 -1
  31. package/dist/collection/components/date-picker/date-picker.stories.js +73 -6
  32. package/dist/collection/components/date-picker/date-picker.stories.js.map +1 -1
  33. package/dist/collection/components/dropdown/dropdown.stories.js +161 -64
  34. package/dist/collection/components/dropdown/dropdown.stories.js.map +1 -1
  35. package/dist/collection/components/footer/footer.stories.js +7 -1
  36. package/dist/collection/components/footer/footer.stories.js.map +1 -1
  37. package/dist/collection/components/icon/infineonIconStencil.stories.js +7 -2
  38. package/dist/collection/components/icon/infineonIconStencil.stories.js.map +1 -1
  39. package/dist/collection/components/icon-button/icon-button.stories.js +61 -5
  40. package/dist/collection/components/icon-button/icon-button.stories.js.map +1 -1
  41. package/dist/collection/components/link/link.stories.js +56 -4
  42. package/dist/collection/components/link/link.stories.js.map +1 -1
  43. package/dist/collection/components/modal/modal.js +10 -10
  44. package/dist/collection/components/modal/modal.js.map +1 -1
  45. package/dist/collection/components/modal/modal.stories.js +96 -19
  46. package/dist/collection/components/modal/modal.stories.js.map +1 -1
  47. package/dist/collection/components/navigation/navbar/navbar.stories.js +203 -12
  48. package/dist/collection/components/navigation/navbar/navbar.stories.js.map +1 -1
  49. package/dist/collection/components/navigation/sidebar/sidebar-item.js +11 -11
  50. package/dist/collection/components/navigation/sidebar/sidebar-item.js.map +1 -1
  51. package/dist/collection/components/navigation/sidebar/sidebar.stories.js +110 -17
  52. package/dist/collection/components/navigation/sidebar/sidebar.stories.js.map +1 -1
  53. package/dist/collection/components/notification/notification.stories.js +51 -4
  54. package/dist/collection/components/notification/notification.stories.js.map +1 -1
  55. package/dist/collection/components/number-indicator/number-indicator.stories.js +19 -0
  56. package/dist/collection/components/number-indicator/number-indicator.stories.js.map +1 -1
  57. package/dist/collection/components/pagination/pagination.stories.js +30 -3
  58. package/dist/collection/components/pagination/pagination.stories.js.map +1 -1
  59. package/dist/collection/components/progress-bar/progress-bar.stories.js +31 -8
  60. package/dist/collection/components/progress-bar/progress-bar.stories.js.map +1 -1
  61. package/dist/collection/components/radio-button/radio-button.stories.js +66 -13
  62. package/dist/collection/components/radio-button/radio-button.stories.js.map +1 -1
  63. package/dist/collection/components/search-bar/search-bar.js +6 -6
  64. package/dist/collection/components/search-bar/search-bar.js.map +1 -1
  65. package/dist/collection/components/search-bar/search-bar.stories.js +58 -9
  66. package/dist/collection/components/search-bar/search-bar.stories.js.map +1 -1
  67. package/dist/collection/components/search-field/search-field.stories.js +43 -7
  68. package/dist/collection/components/search-field/search-field.stories.js.map +1 -1
  69. package/dist/collection/components/select/multi-select/multiselect.js +6 -6
  70. package/dist/collection/components/select/multi-select/multiselect.js.map +1 -1
  71. package/dist/collection/components/select/multi-select/multiselect.stories.js +131 -5
  72. package/dist/collection/components/select/multi-select/multiselect.stories.js.map +1 -1
  73. package/dist/collection/components/select/single-select/select.stories.js +83 -26
  74. package/dist/collection/components/select/single-select/select.stories.js.map +1 -1
  75. package/dist/collection/components/slider/slider.stories.js +97 -13
  76. package/dist/collection/components/slider/slider.stories.js.map +1 -1
  77. package/dist/collection/components/spinner/spinner.stories.js +34 -2
  78. package/dist/collection/components/spinner/spinner.stories.js.map +1 -1
  79. package/dist/collection/components/status/status.stories.js +24 -1
  80. package/dist/collection/components/status/status.stories.js.map +1 -1
  81. package/dist/collection/components/stepper/stepper.stories.js +33 -16
  82. package/dist/collection/components/stepper/stepper.stories.js.map +1 -1
  83. package/dist/collection/components/switch/switch.stories.js +54 -4
  84. package/dist/collection/components/switch/switch.stories.js.map +1 -1
  85. package/dist/collection/components/table-advanced-version/table.stories.js +71 -11
  86. package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
  87. package/dist/collection/components/table-basic-version/table.stories.js +17 -1
  88. package/dist/collection/components/table-basic-version/table.stories.js.map +1 -1
  89. package/dist/collection/components/tabs/tabs.stories.js +89 -23
  90. package/dist/collection/components/tabs/tabs.stories.js.map +1 -1
  91. package/dist/collection/components/tag/tag.stories.js +18 -0
  92. package/dist/collection/components/tag/tag.stories.js.map +1 -1
  93. package/dist/collection/components/text-field/text-field.stories.js +104 -13
  94. package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
  95. package/dist/collection/components/tooltip/tooltip.stories.js +48 -4
  96. package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -1
  97. package/dist/components/ifx-accordion-item.js +1 -1
  98. package/dist/components/ifx-faq.js +1 -1
  99. package/dist/components/ifx-modal.js +8 -8
  100. package/dist/components/ifx-modal.js.map +1 -1
  101. package/dist/components/ifx-multiselect.js +1 -1
  102. package/dist/components/ifx-search-bar.js +5 -5
  103. package/dist/components/ifx-search-bar.js.map +1 -1
  104. package/dist/components/ifx-set-filter.js +1 -1
  105. package/dist/components/ifx-sidebar-item.js +11 -11
  106. package/dist/components/ifx-sidebar-item.js.map +1 -1
  107. package/dist/components/{p-b2439194.js → p-62c6aeb2.js} +4 -4
  108. package/dist/components/{p-b2439194.js.map → p-62c6aeb2.js.map} +1 -1
  109. package/dist/components/{p-04b73e62.js → p-cf8fd0f4.js} +6 -6
  110. package/dist/components/p-cf8fd0f4.js.map +1 -0
  111. package/dist/esm/ifx-accordion_2.entry.js +2 -2
  112. package/dist/esm/ifx-accordion_2.entry.js.map +1 -1
  113. package/dist/esm/ifx-modal.entry.js +8 -8
  114. package/dist/esm/ifx-modal.entry.js.map +1 -1
  115. package/dist/esm/ifx-multiselect_2.entry.js +5 -5
  116. package/dist/esm/ifx-multiselect_2.entry.js.map +1 -1
  117. package/dist/esm/ifx-search-bar.entry.js +5 -5
  118. package/dist/esm/ifx-search-bar.entry.js.map +1 -1
  119. package/dist/esm/ifx-sidebar-item.entry.js +9 -9
  120. package/dist/esm/ifx-sidebar-item.entry.js.map +1 -1
  121. package/dist/esm/infineon-design-system-stencil.js +1 -1
  122. package/dist/esm/loader.js +1 -1
  123. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  124. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  125. package/dist/infineon-design-system-stencil/p-60dcd508.entry.js +2 -0
  126. package/dist/infineon-design-system-stencil/p-60dcd508.entry.js.map +1 -0
  127. package/dist/infineon-design-system-stencil/p-6a274db4.entry.js +2 -0
  128. package/dist/infineon-design-system-stencil/p-6a274db4.entry.js.map +1 -0
  129. package/dist/infineon-design-system-stencil/p-c3e3eda9.entry.js +2 -0
  130. package/dist/infineon-design-system-stencil/p-c3e3eda9.entry.js.map +1 -0
  131. package/dist/infineon-design-system-stencil/{p-bc8a4226.entry.js → p-d93eb561.entry.js} +2 -2
  132. package/dist/infineon-design-system-stencil/p-d93eb561.entry.js.map +1 -0
  133. package/dist/infineon-design-system-stencil/p-dac5d6d5.entry.js +2 -0
  134. package/dist/infineon-design-system-stencil/p-dac5d6d5.entry.js.map +1 -0
  135. package/dist/types/components/accordion/accordion.stories.d.ts +67 -1
  136. package/dist/types/components/accordion/accordionItem.d.ts +1 -1
  137. package/dist/types/components/alert/alert.stories.d.ts +38 -11
  138. package/dist/types/components/badge/badge.stories.d.ts +23 -3
  139. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +66 -1
  140. package/dist/types/components/button/button.stories.d.ts +95 -16
  141. package/dist/types/components/card/card.stories.d.ts +95 -1
  142. package/dist/types/components/checkbox/checkbox.stories.d.ts +68 -10
  143. package/dist/types/components/content-switcher/content-switcher.stories.d.ts +66 -0
  144. package/dist/types/components/date-picker/date-picker.stories.d.ts +67 -2
  145. package/dist/types/components/dropdown/dropdown.stories.d.ts +111 -27
  146. package/dist/types/components/footer/footer.stories.d.ts +4 -0
  147. package/dist/types/components/icon/infineonIconStencil.stories.d.ts +5 -0
  148. package/dist/types/components/icon-button/icon-button.stories.d.ts +56 -8
  149. package/dist/types/components/link/link.stories.d.ts +52 -6
  150. package/dist/types/components/modal/modal.d.ts +2 -2
  151. package/dist/types/components/modal/modal.stories.d.ts +77 -3
  152. package/dist/types/components/navigation/navbar/navbar.stories.d.ts +243 -6
  153. package/dist/types/components/navigation/sidebar/sidebar-item.d.ts +2 -2
  154. package/dist/types/components/navigation/sidebar/sidebar.stories.d.ts +90 -7
  155. package/dist/types/components/notification/notification.stories.d.ts +44 -0
  156. package/dist/types/components/number-indicator/number-indicator.stories.d.ts +19 -0
  157. package/dist/types/components/pagination/pagination.stories.d.ts +27 -0
  158. package/dist/types/components/progress-bar/progress-bar.stories.d.ts +25 -4
  159. package/dist/types/components/radio-button/radio-button.stories.d.ts +59 -8
  160. package/dist/types/components/search-bar/search-bar.d.ts +1 -1
  161. package/dist/types/components/search-bar/search-bar.stories.d.ts +60 -3
  162. package/dist/types/components/search-field/search-field.stories.d.ts +36 -6
  163. package/dist/types/components/select/multi-select/multiselect.d.ts +1 -1
  164. package/dist/types/components/select/multi-select/multiselect.stories.d.ts +125 -0
  165. package/dist/types/components/select/single-select/select.stories.d.ts +67 -24
  166. package/dist/types/components/slider/slider.stories.d.ts +110 -0
  167. package/dist/types/components/spinner/spinner.stories.d.ts +32 -0
  168. package/dist/types/components/status/status.stories.d.ts +23 -2
  169. package/dist/types/components/stepper/stepper.stories.d.ts +21 -4
  170. package/dist/types/components/switch/switch.stories.d.ts +50 -1
  171. package/dist/types/components/table-basic-version/table.stories.d.ts +19 -1
  172. package/dist/types/components/tabs/tabs.stories.d.ts +77 -7
  173. package/dist/types/components/tag/tag.stories.d.ts +20 -0
  174. package/dist/types/components/text-field/text-field.stories.d.ts +96 -11
  175. package/dist/types/components/tooltip/tooltip.stories.d.ts +41 -6
  176. package/dist/types/components.d.ts +10 -10
  177. package/package.json +1 -1
  178. package/dist/components/p-04b73e62.js.map +0 -1
  179. package/dist/infineon-design-system-stencil/p-222c1af9.entry.js +0 -2
  180. package/dist/infineon-design-system-stencil/p-222c1af9.entry.js.map +0 -1
  181. package/dist/infineon-design-system-stencil/p-436babb8.entry.js +0 -2
  182. package/dist/infineon-design-system-stencil/p-436babb8.entry.js.map +0 -1
  183. package/dist/infineon-design-system-stencil/p-9481adc8.entry.js +0 -2
  184. package/dist/infineon-design-system-stencil/p-9481adc8.entry.js.map +0 -1
  185. package/dist/infineon-design-system-stencil/p-bc8a4226.entry.js.map +0 -1
  186. package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js +0 -2
  187. package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js.map +0 -1
@@ -4,20 +4,52 @@ export default {
4
4
  args: {
5
5
  size: 'm',
6
6
  variant: 'default',
7
+ inverted: false,
7
8
  },
8
9
  argTypes: {
9
10
  size: {
10
- description: 'Size options: s (24px) and m (40px) - default: m',
11
+ description: 'Size options: s (24px) and m (40px).',
11
12
  options: ['s', 'm'],
12
13
  control: { type: 'radio' },
14
+ table: {
15
+ category: 'ifx-spinner props',
16
+ defaultValue: {
17
+ summary: 'm'
18
+ },
19
+ type: {
20
+ summary: 's | m'
21
+ }
22
+ }
13
23
  },
14
24
  variant: {
25
+ description: 'Variant of the spinner.',
15
26
  options: ['default', 'brand'],
16
27
  control: { type: 'radio' },
28
+ table: {
29
+ category: 'ifx-spinner props',
30
+ defaultValue: {
31
+ summary: 'default'
32
+ },
33
+ type: {
34
+ summary: 'string'
35
+ }
36
+ },
17
37
  },
38
+ inverted: {
39
+ description: 'Changes the color of spinner to white.',
40
+ table: {
41
+ category: 'ifx-spinner props',
42
+ defaultValue: {
43
+ summary: 'false'
44
+ },
45
+ type: {
46
+ summary: 'boolean'
47
+ }
48
+ }
49
+ }
18
50
  },
19
51
  };
20
- const DefaultTemplate = args => `<ifx-spinner variant="${args.variant}" size="${args.size}"></ifx-spinner>`;
52
+ const DefaultTemplate = args => `<ifx-spinner variant="${args.variant}" size="${args.size}" inverted="${args.inverted}"></ifx-spinner>`;
21
53
  export const Default = DefaultTemplate.bind({});
22
54
  Default.argsTypes = {};
23
55
  //# sourceMappingURL=spinner.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.stories.js","sourceRoot":"","sources":["../../../src/components/spinner/spinner.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,SAAS;KACnB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,WAAW,EAAE,kDAAkD;YAC/D,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;YACnB,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;QACD,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;YAC7B,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC,yBAAyB,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,IAAI,kBAAkB,CAAC;AAE5G,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,SAAS,GAAG,EAAE,CAAC","sourcesContent":["export default {\n title: 'Components/Spinner',\n tags: ['autodocs'],\n\n args: {\n size: 'm',\n variant: 'default',\n },\n argTypes: {\n size: {\n description: 'Size options: s (24px) and m (40px) - default: m',\n options: ['s', 'm'],\n control: { type: 'radio' },\n },\n variant: {\n options: ['default', 'brand'],\n control: { type: 'radio' },\n },\n },\n};\n\nconst DefaultTemplate = args => `<ifx-spinner variant=\"${args.variant}\" size=\"${args.size}\"></ifx-spinner>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argsTypes = {};\n"]}
1
+ {"version":3,"file":"spinner.stories.js","sourceRoot":"","sources":["../../../src/components/spinner/spinner.stories.ts"],"names":[],"mappings":"AACA,eAAe;IACb,KAAK,EAAE,oBAAoB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esContent":["\nexport default {\n title: 'Components/Spinner',\n tags: ['autodocs'],\n\n args: {\n size: 'm',\n variant: 'default',\n inverted: false,\n },\n argTypes: {\n size: {\n description: 'Size options: s (24px) and m (40px).',\n options: ['s', 'm'],\n control: { type: 'radio' },\n table: {\n category: 'ifx-spinner props',\n defaultValue: {\n summary: 'm'\n },\n type: {\n summary: 's | m'\n }\n }\n },\n variant: {\n description: 'Variant of the spinner.',\n options: ['default', 'brand'],\n control: { type: 'radio' },\n table: {\n category: 'ifx-spinner props',\n defaultValue: {\n summary: 'default'\n },\n type: {\n summary: 'string'\n }\n },\n },\n inverted: {\n description: 'Changes the color of spinner to white.',\n table: {\n category: 'ifx-spinner props',\n defaultValue: {\n summary: 'false'\n },\n type: {\n summary: 'boolean'\n }\n }\n }\n },\n};\n\nconst DefaultTemplate = args => `<ifx-spinner variant=\"${args.variant}\" size=\"${args.size}\" inverted=\"${args.inverted}\"></ifx-spinner>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argsTypes = {};\n"]}
@@ -7,13 +7,36 @@ export default {
7
7
  border: true,
8
8
  },
9
9
  argTypes: {
10
+ label: {
11
+ description: 'Sets the label of *<ifx-status>*.',
12
+ table: {
13
+ category: 'ifx-status props',
14
+ type: {
15
+ summary: '<ifx-status> `label` </ifx-status>'
16
+ }
17
+ }
18
+ },
10
19
  border: {
20
+ description: 'When set to **true** the status has a border.',
11
21
  control: 'boolean',
12
22
  attr: 'border',
23
+ table: {
24
+ category: 'ifx-status props',
25
+ defaultValue: {
26
+ summary: true
27
+ }
28
+ }
13
29
  },
14
30
  color: {
31
+ description: 'Sets the color of the status.',
32
+ control: 'radio',
15
33
  options: ['orange', 'ocean', 'grey', 'light-grey', 'red', 'green', 'berry'],
16
- control: { type: 'radio' },
34
+ table: {
35
+ category: 'ifx-status props',
36
+ defaultValue: {
37
+ summary: 'orange'
38
+ }
39
+ }
17
40
  },
18
41
  },
19
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"status.stories.js","sourceRoot":"","sources":["../../../src/components/status/status.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,IAAI;KACb;IACD,QAAQ,EAAE;QACR,MAAM,EAAE;YACN,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,QAAQ;SACf;QACD,KAAK,EAAE;YACL,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;YAC3E,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC,sBAAsB,IAAI,CAAC,KAAK,YAAY,IAAI,CAAC,KAAK,aAAa,IAAI,CAAC,MAAM,KAAK,CAAC;AAEpH,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC","sourcesContent":["export default {\n title: 'Components/Status',\n tags: ['autodocs'],\n\n args: {\n label: 'text',\n color: 'orange',\n border: true,\n },\n argTypes: {\n border: {\n control: 'boolean',\n attr: 'border',\n },\n color: {\n options: ['orange', 'ocean', 'grey', 'light-grey', 'red', 'green', 'berry'],\n control: { type: 'radio' },\n },\n },\n};\n\nconst DefaultTemplate = args => `<ifx-status label=\"${args.label}\" color=\"${args.color}\" border=\"${args.border}\"/>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}
1
+ {"version":3,"file":"status.stories.js","sourceRoot":"","sources":["../../../src/components/status/status.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,IAAI;KACb;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,WAAW,EAAE,mCAAmC;YAChD,KAAK,EAAE;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE;oBACJ,OAAO,EAAE,oCAAoC;iBAC9C;aACF;SACF;QACD,MAAM,EAAE;YACN,WAAW,EAAE,+CAA+C;YAC5D,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,YAAY,EAAE;oBACZ,OAAO,EAAE,IAAI;iBACd;aACF;SACF;QACD,KAAK,EAAE;YACL,WAAW,EAAE,+BAA+B;YAC5C,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;YAC3E,KAAK,EAAE;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,YAAY,EAAE;oBACZ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC,sBAAsB,IAAI,CAAC,KAAK,YAAY,IAAI,CAAC,KAAK,aAAa,IAAI,CAAC,MAAM,KAAK,CAAC;AAEpH,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC","sourcesContent":["export default {\n title: 'Components/Status',\n tags: ['autodocs'],\n\n args: {\n label: 'text',\n color: 'orange',\n border: true,\n },\n argTypes: {\n label: {\n description: 'Sets the label of *<ifx-status>*.',\n table: {\n category: 'ifx-status props',\n type: {\n summary: '<ifx-status> `label` </ifx-status>'\n }\n }\n },\n border: {\n description: 'When set to **true** the status has a border.',\n control: 'boolean',\n attr: 'border',\n table: {\n category: 'ifx-status props',\n defaultValue: {\n summary: true\n }\n }\n },\n color: {\n description: 'Sets the color of the status.',\n control: 'radio',\n options: ['orange', 'ocean', 'grey', 'light-grey', 'red', 'green', 'berry'],\n table: {\n category: 'ifx-status props',\n defaultValue: {\n summary: 'orange'\n }\n }\n },\n },\n};\n\nconst DefaultTemplate = args => `<ifx-status label=\"${args.label}\" color=\"${args.color}\" border=\"${args.border}\"/>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}
@@ -2,8 +2,8 @@ import { action } from "@storybook/addon-actions";
2
2
  export default {
3
3
  title: 'Components/Stepper',
4
4
  args: {
5
- activeStep: 2,
6
5
  amountOfSteps: 5,
6
+ activeStep: 2,
7
7
  errorStep: 0,
8
8
  disabled: false,
9
9
  indicatorPosition: 'left',
@@ -16,20 +16,26 @@ export default {
16
16
  type: 'number',
17
17
  min: 1
18
18
  },
19
- description: 'Indicates the current active step',
19
+ description: 'Indicates the current active step.',
20
20
  table: {
21
- defaultValue: { summary: 1 }
21
+ category: 'ifx-stepper props',
22
+ defaultValue: { summary: 2 }
22
23
  }
23
24
  },
24
25
  amountOfSteps: {
25
- name: 'Amount of steps',
26
+ name: 'Amount of Steps',
26
27
  control: 'number',
27
- description: 'Indicates the number of steps in stepper in a story'
28
+ description: 'Indicates the number of steps in stepper in a story.',
29
+ table: {
30
+ category: 'story controls',
31
+ defaultValue: { summary: 5 }
32
+ }
28
33
  },
29
34
  completeStep: {
30
35
  name: 'complete',
31
- description: 'A boolean prop to mark a step complete.<br>Usage:',
36
+ description: 'A boolean prop to mark one or more steps as complete.<br>Usage:',
32
37
  table: {
38
+ category: 'ifx-step props',
33
39
  defaultValue: { summary: false },
34
40
  type: {
35
41
  summary: `<ifx-step complete=true> </ifx-step>`
@@ -39,8 +45,9 @@ export default {
39
45
  disabled: {
40
46
  name: 'disabled',
41
47
  control: 'boolean',
42
- description: 'A boolean prop to make the step unclickable:',
48
+ description: 'A boolean prop to make one or more steps unclickable.',
43
49
  table: {
50
+ category: 'ifx-step props',
44
51
  defaultValue: { summary: false },
45
52
  type: {
46
53
  summary: `<ifx-step disabled=true> </ifx-step>`
@@ -51,34 +58,44 @@ export default {
51
58
  errorStep: {
52
59
  name: 'error',
53
60
  control: 'number',
54
- description: 'Specified step number indicates to have an error',
61
+ description: 'Specified step number indicates to have an error.',
55
62
  table: {
56
- defaultValue: { summary: false }
63
+ category: 'ifx-step props'
57
64
  },
58
65
  },
59
66
  indicatorPosition: {
60
67
  control: 'radio',
61
68
  defaultValue: { summary: 'left' },
62
- description: 'Allows to swap the progross bar and steps\' label',
69
+ description: 'Allows to swap the progress bar and steps\' label.',
63
70
  options: ['left', 'right'],
64
- if: { arg: 'variant', eq: 'compact' }
71
+ if: { arg: 'variant', eq: 'compact' },
72
+ table: {
73
+ category: 'ifx-stepper props'
74
+ }
65
75
  },
66
76
  showStepNumber: {
67
77
  control: 'boolean',
68
78
  defaultValue: { summary: 'false' },
69
- description: 'Shows the step number when set true',
70
- if: { arg: 'variant', eq: 'default' }
79
+ description: 'Shows the step number when set true.',
80
+ if: { arg: 'variant', eq: 'default' },
81
+ table: {
82
+ category: 'ifx-stepper props'
83
+ }
71
84
  },
72
85
  variant: {
73
86
  options: ['default', 'compact', 'vertical'],
74
87
  defaultValue: { summary: 'default' },
75
- description: 'Allows to switch between default and compact variant',
76
- control: 'radio'
88
+ description: 'Allows to switch between default and compact variant.',
89
+ control: 'radio',
90
+ table: {
91
+ category: 'ifx-stepper props'
92
+ }
77
93
  },
78
94
  ifxChange: {
79
95
  action: 'ifxChange',
80
- description: 'A custom event emitted when active step changes',
96
+ description: 'A custom event emitted when active step changes.',
81
97
  table: {
98
+ category: 'custom events',
82
99
  type: {
83
100
  summary: 'Framework integration',
84
101
  detail: `
@@ -1 +1 @@
1
- {"version":3,"file":"stepper.stories.js","sourceRoot":"","sources":["../../../src/components/stepper/stepper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AAQ,CAAC,IAAI,GAAG;IACZ,OAAO,EAAE,UAAU;CACtB,CAAA","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default{\n title: 'Components/Stepper',\n args: { \n activeStep: 2,\n amountOfSteps: 5,\n errorStep: 0,\n disabled: false,\n indicatorPosition: 'left',\n showStepNumber: false,\n variant: 'default'\n },\n argTypes: {\n activeStep: { \n control: {\n type: 'number',\n min: 1\n }, \n description: 'Indicates the current active step', \n table: {\n defaultValue: { summary: 1 }\n }\n },\n amountOfSteps: { \n name: 'Amount of steps',\n control: 'number', \n description: 'Indicates the number of steps in stepper in a story'\n },\n completeStep: {\n name: 'complete',\n description: 'A boolean prop to mark a step complete.<br>Usage:',\n table: {\n defaultValue: { summary: false },\n type: {\n summary: `<ifx-step complete=true> </ifx-step>`\n }\n }\n },\n disabled: {\n name: 'disabled',\n control: 'boolean',\n description: 'A boolean prop to make the step unclickable:',\n table: {\n defaultValue: { summary: false },\n type: {\n summary: `<ifx-step disabled=true> </ifx-step>`\n }\n },\n if: { arg:'variant', eq: 'default' }\n },\n errorStep: {\n name: 'error',\n control: 'number',\n description: 'Specified step number indicates to have an error',\n table: {\n defaultValue: { summary: false }\n },\n },\n indicatorPosition: {\n control: 'radio',\n defaultValue: { summary: 'left' },\n description: 'Allows to swap the progross bar and steps\\' label',\n options: ['left', 'right'],\n if: { arg:'variant', eq: 'compact' }\n },\n showStepNumber: { \n control: 'boolean', \n defaultValue: { summary: 'false' },\n description: 'Shows the step number when set true',\n if: { arg: 'variant', eq: 'default' }\n },\n variant: {\n options: ['default', 'compact', 'vertical'],\n defaultValue: { summary: 'default' },\n description: 'Allows to switch between default and compact variant',\n control: 'radio'\n },\n ifxChange: {\n action: 'ifxChange',\n description: 'A custom event emitted when active step changes',\n table: {\n type: {\n summary: 'Framework integration',\n detail: `\nReact: onIfxChange={handleChange}\nVue:@ifxChange=\"handleChange\"\nAngular:(ifxChange)=\"handleChange()\"\nVanillaJs:.addEventListener(\"ifxChange\", (event) => {//handle change});`,\n }\n }\n }\n }\n}\n\nconst Template = (args) => {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = `\n<ifx-stepper \nactive-step=${args.activeStep} \n${args.variant === 'compact' ? `indicator-position=${args.indicatorPosition}` : ''} \n${args.variant === 'default' ? `show-step-number=${args.showStepNumber}` : ''} \nvariant=${args.variant}>\n ${\n (()=>{\n return Array.from({ length: args.amountOfSteps }, (_, stepId) => {\n const step = document.createElement('ifx-step')\n step.innerHTML = `Step Label ${stepId+1}`\n if (args.errorStep === stepId+1) step.setAttribute('error', 'true')\n if (args.disabled) step.setAttribute('disabled', 'true')\n return step.outerHTML\n }).join(`\\n `)\n })()\n }\n</ifx-stepper>`\n\n const stepper = wrapper.querySelector('ifx-stepper');\n stepper.addEventListener('ifxChange', action('ifxChange'));\n \n return stepper;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n variant: 'default'\n};\n\nexport const Compact = Template.bind({});\nCompact.args = {\n variant: 'compact'\n};\n\nexport const Vertical = Template.bind({});\nVertical.args = {\n variant: 'vertical'\n}\n"]}
1
+ {"version":3,"file":"stepper.stories.js","sourceRoot":"","sources":["../../../src/components/stepper/stepper.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACX,KAAK,EAAE,oBAAoB;IAC3B,IAAI,EAAE;QACF,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,CAAC;QACb,SAAS,EAAE,CAAC;QACZ,QAAQ,EAAE,KAAK;QACf,iBAAiB,EAAE,MAAM;QACzB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,SAAS;KACrB;IACD,QAAQ,EAAE;QACN,UAAU,EAAE;YACR,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,GAAG,EAAE,CAAC;aACT;YACD,WAAW,EAAE,oCAAoC;YACjD,KAAK,EAAE;gBACH,QAAQ,EAAE,mBAAmB;gBAC7B,YAAY,EAAE,EA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2,\n errorStep: 0,\n disabled: false,\n indicatorPosition: 'left',\n showStepNumber: false,\n variant: 'default'\n },\n argTypes: {\n activeStep: {\n control: {\n type: 'number',\n min: 1\n },\n description: 'Indicates the current active step.',\n table: {\n category: 'ifx-stepper props',\n defaultValue: { summary: 2 }\n }\n },\n amountOfSteps: {\n name: 'Amount of Steps',\n control: 'number',\n description: 'Indicates the number of steps in stepper in a story.',\n table: {\n category: 'story controls',\n defaultValue: { summary: 5 }\n }\n },\n completeStep: {\n name: 'complete',\n description: 'A boolean prop to mark one or more steps as complete.<br>Usage:',\n table: {\n category: 'ifx-step props',\n defaultValue: { summary: false },\n type: {\n summary: `<ifx-step complete=true> </ifx-step>`\n }\n }\n },\n disabled: {\n name: 'disabled',\n control: 'boolean',\n description: 'A boolean prop to make one or more steps unclickable.',\n table: {\n category: 'ifx-step props',\n defaultValue: { summary: false },\n type: {\n summary: `<ifx-step disabled=true> </ifx-step>`\n }\n },\n if: { arg: 'variant', eq: 'default' }\n },\n errorStep: {\n name: 'error',\n control: 'number',\n description: 'Specified step number indicates to have an error.',\n table: {\n category: 'ifx-step props'\n },\n },\n indicatorPosition: {\n control: 'radio',\n defaultValue: { summary: 'left' },\n description: 'Allows to swap the progress bar and steps\\' label.',\n options: ['left', 'right'],\n if: { arg: 'variant', eq: 'compact' },\n table: {\n category: 'ifx-stepper props'\n }\n },\n showStepNumber: {\n control: 'boolean',\n defaultValue: { summary: 'false' },\n description: 'Shows the step number when set true.',\n if: { arg: 'variant', eq: 'default' },\n table: {\n category: 'ifx-stepper props'\n }\n },\n variant: {\n options: ['default', 'compact', 'vertical'],\n defaultValue: { summary: 'default' },\n description: 'Allows to switch between default and compact variant.',\n control: 'radio',\n table: {\n category: 'ifx-stepper props'\n }\n },\n ifxChange: {\n action: 'ifxChange',\n description: 'A custom event emitted when active step changes.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: `\nReact: onIfxChange={handleChange}\nVue:@ifxChange=\"handleChange\"\nAngular:(ifxChange)=\"handleChange()\"\nVanillaJs:.addEventListener(\"ifxChange\", (event) => {//handle change});`,\n }\n }\n }\n }\n}\n\nconst Template = (args) => {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = `\n<ifx-stepper \nactive-step=${args.activeStep} \n${args.variant === 'compact' ? `indicator-position=${args.indicatorPosition}` : ''} \n${args.variant === 'default' ? `show-step-number=${args.showStepNumber}` : ''} \nvariant=${args.variant}>\n ${(() => {\n return Array.from({ length: args.amountOfSteps }, (_, stepId) => {\n const step = document.createElement('ifx-step')\n step.innerHTML = `Step Label ${stepId + 1}`\n if (args.errorStep === stepId + 1) step.setAttribute('error', 'true')\n if (args.disabled) step.setAttribute('disabled', 'true')\n return step.outerHTML\n }).join(`\\n `)\n })()\n }\n</ifx-stepper>`\n\n const stepper = wrapper.querySelector('ifx-stepper');\n stepper.addEventListener('ifxChange', action('ifxChange'));\n\n return stepper;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n variant: 'default'\n};\n\nexport const Compact = Template.bind({});\nCompact.args = {\n variant: 'compact'\n};\n\nexport const Vertical = Template.bind({});\nVertical.args = {\n variant: 'vertical'\n}\n"]}
@@ -3,21 +3,70 @@ export default {
3
3
  title: 'Components/Switch',
4
4
  tags: ['autodocs'],
5
5
  args: {
6
- checked: false,
7
6
  label: 'Switch',
7
+ checked: false,
8
8
  name: 'switch',
9
9
  value: 'switch',
10
+ disabled: false,
10
11
  },
11
12
  argTypes: {
13
+ label: {
14
+ name: 'Label',
15
+ description: 'Set the label of <ifx-switch>.',
16
+ table: {
17
+ category: 'story controls',
18
+ type: {
19
+ summary: '<ifx-switch> `label` </ifx-switch>'
20
+ }
21
+ }
22
+ },
12
23
  name: {
13
- description: 'Name of the element, that is used as reference when a form is submitted.'
24
+ description: 'Name of the element, that is used as reference when a form is submitted.',
25
+ table: {
26
+ category: 'ifx-switch props',
27
+ type: {
28
+ summary: 'string'
29
+ }
30
+ }
31
+ },
32
+ checked: {
33
+ name: 'checked',
34
+ description: 'Set the checked state of the switch.',
35
+ table: {
36
+ category: 'ifx-switch props',
37
+ defaultValue: {
38
+ summary: 'false'
39
+ },
40
+ type: {
41
+ summary: 'boolean'
42
+ }
43
+ }
14
44
  },
15
45
  value: {
16
- description: 'The value that gets submitted, when the radio button is checked'
46
+ description: 'The value that gets submitted, when the radio button is checked.',
47
+ table: {
48
+ category: 'ifx-switch props',
49
+ type: {
50
+ summary: 'string'
51
+ }
52
+ }
53
+ },
54
+ disabled: {
55
+ description: 'The value that gets submitted, when the radio button is checked.',
56
+ table: {
57
+ category: 'ifx-switch props',
58
+ defaultValue: {
59
+ summary: 'false'
60
+ },
61
+ type: {
62
+ summary: 'boolean'
63
+ }
64
+ }
17
65
  },
18
66
  ifxChange: {
19
- description: 'Custom event emitted on change',
67
+ description: 'Custom event emitted on change.',
20
68
  table: {
69
+ category: 'custom events',
21
70
  type: {
22
71
  summary: 'Framework integration',
23
72
  detail: 'React: onIfxChange={handleChange}\nVue:@ifxChange="handleChange"\nAngular:(ifxChange)="handleChange()"\nVanillaJs:.addEventListener("ifxChange", (event) => {//handle change});',
@@ -33,6 +82,7 @@ const DefaultTemplate = args => {
33
82
  element.setAttribute('checked', args.checked);
34
83
  element.setAttribute('name', args.name);
35
84
  element.setAttribute('value', args.value);
85
+ element.setAttribute('disabled', args.disabled);
36
86
  // Add the event listener
37
87
  // element.addEventListener('ifxChange', action('ifxChange'));
38
88
  // Inside your story, add an event listener for the custom event
@@ -1 +1 @@
1
- {"version":3,"file":"switch.stories.js","sourceRoot":"","sources":["../../../src/components/switch/switch.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,QA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CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Switch',\n tags: ['autodocs'],\n\n args: {\n checked: false,\n label: 'Switch',\n name: 'switch',\n value: 'switch',\n },\n argTypes: {\n name: {\n description: 'Name of the element, that is used as reference when a form is submitted.'\n },\n value: {\n description: 'The value that gets submitted, when the radio button is checked'\n },\n ifxChange: {\n description: 'Custom event emitted on change',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxChange={handleChange}\\nVue:@ifxChange=\"handleChange\"\\nAngular:(ifxChange)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxChange\", (event) => {//handle change});',\n },\n },\n action: 'ifxChange',\n },\n },\n};\n\nconst DefaultTemplate = args => {\n const element = document.createElement('ifx-switch') as HTMLIfxSwitchElement;\n\n // Set the attributes\n element.setAttribute('checked', args.checked);\n element.setAttribute('name', args.name);\n element.setAttribute('value', args.value);\n\n // Add the event listener\n // element.addEventListener('ifxChange', action('ifxChange'));\n // Inside your story, add an event listener for the custom event\n element.addEventListener('ifxChange', (event: Event) => {\n const customEvent = event as CustomEvent;\n const newValue = customEvent.detail;\n\n action('ifxChange')(customEvent);\n\n args.value = newValue;\n });\n\n const slotContent = document.createTextNode(args.label);\n element.appendChild(slotContent);\n\n return element;\n};\n\nexport const Default = DefaultTemplate.bind({});\n"]}
1
+ {"version":3,"file":"switch.stories.js","sourceRoot":"","sources":["../../../src/components/switch/switch.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,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B,OAAO,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAEhD,yBAAyB;IACzB,8DAA8D;IAC9D,gEAAgE;IAChE,OAAO,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,KAAY,EAAE,EAAE;QACrD,MAAM,WAAW,GAAG,KAAoB,CAAC;QACzC,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC;QAEpC,MAAM,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC;QAEjC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxD,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAEjC,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Switch',\n tags: ['autodocs'],\n\n args: {\n label: 'Switch',\n checked: false,\n name: 'switch',\n value: 'switch',\n disabled: false,\n },\n argTypes: {\n label: {\n name: 'Label',\n description: 'Set the label of <ifx-switch>.',\n table: {\n category: 'story controls',\n type: {\n summary: '<ifx-switch> `label` </ifx-switch>'\n }\n }\n },\n name: {\n description: 'Name of the element, that is used as reference when a form is submitted.',\n table: {\n category: 'ifx-switch props',\n type: {\n summary: 'string'\n }\n }\n },\n checked: {\n name: 'checked',\n description: 'Set the checked state of the switch.',\n table: {\n category: 'ifx-switch props',\n defaultValue: {\n summary: 'false'\n },\n type: {\n summary: 'boolean'\n }\n }\n },\n value: {\n description: 'The value that gets submitted, when the radio button is checked.',\n table: {\n category: 'ifx-switch props',\n type: {\n summary: 'string'\n }\n }\n },\n disabled: {\n description: 'The value that gets submitted, when the radio button is checked.',\n table: {\n category: 'ifx-switch props',\n defaultValue: {\n summary: 'false'\n },\n type: {\n summary: 'boolean'\n }\n }\n },\n ifxChange: {\n description: 'Custom event emitted on change.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxChange={handleChange}\\nVue:@ifxChange=\"handleChange\"\\nAngular:(ifxChange)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxChange\", (event) => {//handle change});',\n },\n },\n action: 'ifxChange',\n },\n },\n\n\n\n}\n\nconst DefaultTemplate = args => {\n const element = document.createElement('ifx-switch') as HTMLIfxSwitchElement;\n\n // Set the attributes\n element.setAttribute('checked', args.checked);\n element.setAttribute('name', args.name);\n element.setAttribute('value', args.value);\n element.setAttribute('disabled', args.disabled);\n\n // Add the event listener\n // element.addEventListener('ifxChange', action('ifxChange'));\n // Inside your story, add an event listener for the custom event\n element.addEventListener('ifxChange', (event: Event) => {\n const customEvent = event as CustomEvent;\n const newValue = customEvent.detail;\n\n action('ifxChange')(customEvent);\n\n args.value = newValue;\n });\n\n const slotContent = document.createTextNode(args.label);\n element.appendChild(slotContent);\n\n return element;\n};\n\nexport const Default = DefaultTemplate.bind({});\n"]}
@@ -137,17 +137,77 @@ export default {
137
137
  }
138
138
  };
139
139
  const DefaultTemplate = (args) => {
140
- const table = `
141
- <ifx-table
142
- row-height="${args.rowHeight}"
143
- cols='${JSON.stringify(args.columnDefs)}'
144
- rows='${JSON.stringify(args.rowData)}'
145
- table-height="${args.tableHeight}"
146
- pagination="${args.pagination}"
147
- pagination-page-size="${args.paginationPageSize}"
148
- filter-orientation="${args.filterOrientation}">
149
- </ifx-table>`;
150
- return table;
140
+ if (args.filterOrientation === 'none') {
141
+ const table = `<ifx-table
142
+ row-height="${args.rowHeight}"
143
+ cols='${JSON.stringify(args.columnDefs)}'
144
+ rows='${JSON.stringify(args.rowData)}'
145
+ table-height="${args.tableHeight}"
146
+ pagination="${args.pagination}"
147
+ pagination-page-size="${args.paginationPageSize}"
148
+ filter-orientation="${args.filterOrientation}">
149
+ </ifx-table>`;
150
+ return table;
151
+ }
152
+ else {
153
+ //sidebar
154
+ const filterAccordions = args.columnDefs.map(column => {
155
+ const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];
156
+ const filterOptions = uniqueColValues.map((option, index) => {
157
+ return `<ifx-list-entry slot="slot${index}" label="${option}" value="false"></ifx-list-entry>`;
158
+ }).join('');
159
+ return `
160
+ <ifx-filter-accordion slot="filter-accordion" filter-group-name="${column.field}">
161
+ <ifx-list slot="list" type="checkbox" name="${column.field}" max-visible-items="6">
162
+ ${filterOptions}
163
+ </ifx-list>
164
+ </ifx-filter-accordion>
165
+ `;
166
+ }).join('');
167
+ //topbar
168
+ const filterComponents = args.columnDefs.map((column, index) => {
169
+ const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];
170
+ const options = uniqueColValues.map(option => ({
171
+ value: option,
172
+ label: option,
173
+ selected: false
174
+ }));
175
+ // Directly use JSON.stringify without replacing quotes
176
+ const optionsString = JSON.stringify(options);
177
+ return `
178
+ <ifx-set-filter slot="filter-component-${index + 1}"
179
+ options='${optionsString}'
180
+ filter-label='${column.headerName}'
181
+ filter-name='${column.field}'
182
+ type='multi-select'
183
+ search-enabled='true'>
184
+ </ifx-set-filter>
185
+ `;
186
+ }).join('\n');
187
+ const filterTypeGroupComponent = args.filterOrientation === 'sidebar'
188
+ ? `<ifx-filter-type-group slot="sidebar-filter">
189
+ <div slot="filter-search">
190
+ <ifx-filter-search filter-orientation="sidebar" filter-name="search"></ifx-filter-search>
191
+ </div>
192
+ ${filterAccordions}
193
+ </ifx-filter-type-group>`
194
+ :
195
+ `<ifx-filter-bar slot="topbar-filter" max-shown-filters="3">
196
+ <ifx-filter-search slot="filter-search" filter-orientation="topbar"></ifx-filter-search>
197
+ ${filterComponents}
198
+ </ifx-filter-bar>`;
199
+ const table = `<ifx-table
200
+ row-height="${args.rowHeight}"
201
+ cols='${JSON.stringify(args.columnDefs)}'
202
+ rows='${JSON.stringify(args.rowData)}'
203
+ table-height="${args.tableHeight}"
204
+ pagination="${args.pagination}"
205
+ pagination-page-size="${args.paginationPageSize}"
206
+ filter-orientation="${args.filterOrientation}">
207
+ ${filterTypeGroupComponent}
208
+ </ifx-table>`;
209
+ return table;
210
+ }
151
211
  };
152
212
  export const Pagination = DefaultTemplate.bind({});
153
213
  Pagination.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-advanced-version/table.stories.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG;IACjB,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;IACrF,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;IACzE,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACvC,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;CACpC,CAAC;AAEF,MAAM,OAAO,GAAG;IACd,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;IAC1D,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;IACxD,EAAE,IAAI,EAAE,SAAS,EAAE,K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EAAE,uBAAuB;IACnC,OAAO,EAAE,oBAAoB;IAC7B,iBAAiB,EAAE,MAAM;IACzB,UAAU,EAAE,KAAK;IACjB,kBAAkB,EAAE,EAAE;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,aAAa,CAAC,IAAI,GAAG;IACnB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,SAAS;IAC5B,qBAAqB,EAAE;QACrB,aAAa,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAC/B,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrD,YAAY,CAAC,IAAI,GAAG;IAClB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,QAAQ;IAC3B,qBAAqB,EAAE;QACrB,aAAa,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAC/B,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC;KACF;CACF,CAAC","sourcesContent":["const columnDefs = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' }\n];\n\nconst rowData = [\n { make: 'Toyota', model: 'Celica', price: 35000, age: 10 },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n { make: 'Bmw', model: 'x', price: 72000 },\n { make: 'Mercedes', model: 'y', price: 72000 },\n { make: 'Ferrari', model: 'z', price: 72000 },\n { make: 'Chrysler', model: 'a', price: 72000 },\n { make: 'Range rover', model: 'b', price: 72000 },\n { make: 'Tesla', model: 'x', price: 72000 },\n { make: 'Audi', model: '3', price: 72000 },\n { make: 'Landrover', model: 'x', price: 72000 },\n];\n\nconst columnDefsWithButtonCol = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' },\n { \n headerName: '', \n field: 'button',\n }\n];\n\n\nconst rowDataWithButtonCol = [\n {\n make: 'Toyota', model: 'Celica', price: 35000, age: 10, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Toyota Button\"\n }\n },\n {\n make: 'Ford', model: 'Mondeo', price: 32000, age: 12, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Ford Button\"\n }\n },\n {\n make: 'Porsche', model: 'Boxster', price: 72000, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Porsche Button\"\n }\n }\n];\n \nexport default {\n title: 'Components/Table (advanced)',\n args: {\n tableHeight: 'auto',\n pagination: false,\n paginationPageSize: 10,\n currentPage: 1,\n rowHeight: 40,\n showLoading: false,\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n },\n argTypes: {\n tableHeight: {\n table: {\n type: {\n summary: 'Options',\n detail: 'Default: \"auto\"\\nExample for fixed height: \"400px\"',\n }\n },\n },\n paginationPageSize: {\n description: \"Results per page: minimum 10 - maximum 30\",\n control: { type: 'number', min: 10, max: 30, step: 10 }\n },\n showLoading: {\n options: [true, false],\n control: { type: 'radio' },\n },\n rowHeight: {\n options: ['compact', 'default'],\n control: { type: 'radio' },\n },\n filterOrientation: {\n options: ['sidebar', 'topbar', 'none'],\n control: { type: 'radio' },\n },\n columnDefs: {\n table: {\n type: {\n summary: 'Column header options',\n detail: 'Standard columns:\\nheaderName: \"Model\", \\nfield: \"model\", \\nsortable: true (optional),\\nsort: \"desc\" (optional) => descending sort (show icon)\\nunSortIcon: true (optional) => unsorted (show icon)\\n\\nSpecial columns:\\nheaderName: \"\",\\nfield: \"button\"\\nheaderName: \"\",\\nfield: \"link\"',\n },\n },\n },\n rowData: {\n table: {\n type: {\n summary: 'Row data options',\n detail: 'Standard row values:\\nmake: \"Toyota\", \\nmodel: \"Celica\", \\nprice: 35000 \\n\\nSpecial row values (incl buttons):\\nmake: \"Porsche\",\\nmodel: \"Boxster\",\\nprice: \"72000\",\\nbutton: { \\ndisabled: false (optional),\\nvariant: \"outline\" (optional)\\nsize: \"s\" (optional),\\ntext: \"Button\"\\n...other ifx-button properties\\n}',\n },\n },\n },\n buttonRendererOptions: {\n control: 'object',\n description: 'Options for button cell renderer, including event handlers.',\n table: {\n type: {\n summary: 'Button Renderer Options',\n detail: 'Custom event handlers and other options for the button cell renderer in the table.'\n },\n },\n },\n }\n};\n\nconst DefaultTemplate = (args) => {\n const table = `\n <ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n </ifx-table>`;\n return table;\n};\n\n\nexport const Pagination = DefaultTemplate.bind({});\nPagination.args = {\n pagination: true,\n paginationPageSize: 10,\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'none',\n};\n\n\nconst CustomCellTemplate = (args) => {\n const table = `\n <ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n </ifx-table>`;\n return table;\n};\n\n\n\nexport const IncludesButtons = CustomCellTemplate.bind({});\nIncludesButtons.args = {\n rowHeight: 'default',\n columnDefs: columnDefsWithButtonCol,\n rowData: rowDataWithButtonCol,\n filterOrientation: 'none',\n pagination: false,\n paginationPageSize: 10,\n};\n\nexport const SidebarFilter = DefaultTemplate.bind({});\nSidebarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'sidebar',\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n};\n\nexport const TopbarFilter = DefaultTemplate.bind({});\nTopbarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'topbar',\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n};\n"]}
1
+ {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-advanced-version/table.stories.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG;IACjB,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;IACrF,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;IACzE,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACvC,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KA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,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,SAAS;IAC5B,qBAAqB,EAAE;QACrB,aAAa,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAC/B,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrD,YAAY,CAAC,IAAI,GAAG;IAClB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,QAAQ;IAC3B,qBAAqB,EAAE;QACrB,aAAa,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAC/B,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC;KACF;CACF,CAAC","sourcesContent":["const columnDefs = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' }\n];\n\nconst rowData = [\n { make: 'Toyota', model: 'Celica', price: 35000, age: 10 },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n { make: 'Bmw', model: 'x', price: 72000 },\n { make: 'Mercedes', model: 'y', price: 72000 },\n { make: 'Ferrari', model: 'z', price: 72000 },\n { make: 'Chrysler', model: 'a', price: 72000 },\n { make: 'Range rover', model: 'b', price: 72000 },\n { make: 'Tesla', model: 'x', price: 72000 },\n { make: 'Audi', model: '3', price: 72000 },\n { make: 'Landrover', model: 'x', price: 72000 },\n];\n\nconst columnDefsWithButtonCol = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' },\n {\n headerName: '',\n field: 'button',\n }\n];\n\n\nconst rowDataWithButtonCol = [\n {\n make: 'Toyota', model: 'Celica', price: 35000, age: 10, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Toyota Button\"\n }\n },\n {\n make: 'Ford', model: 'Mondeo', price: 32000, age: 12, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Ford Button\"\n }\n },\n {\n make: 'Porsche', model: 'Boxster', price: 72000, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Porsche Button\"\n }\n }\n];\n\nexport default {\n title: 'Components/Table (advanced)',\n args: {\n tableHeight: 'auto',\n pagination: false,\n paginationPageSize: 10,\n currentPage: 1,\n rowHeight: 40,\n showLoading: false,\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n },\n argTypes: {\n tableHeight: {\n table: {\n type: {\n summary: 'Options',\n detail: 'Default: \"auto\"\\nExample for fixed height: \"400px\"',\n }\n },\n },\n paginationPageSize: {\n description: \"Results per page: minimum 10 - maximum 30\",\n control: { type: 'number', min: 10, max: 30, step: 10 }\n },\n showLoading: {\n options: [true, false],\n control: { type: 'radio' },\n },\n rowHeight: {\n options: ['compact', 'default'],\n control: { type: 'radio' },\n },\n filterOrientation: {\n options: ['sidebar', 'topbar', 'none'],\n control: { type: 'radio' },\n },\n columnDefs: {\n table: {\n type: {\n summary: 'Column header options',\n detail: 'Standard columns:\\nheaderName: \"Model\", \\nfield: \"model\", \\nsortable: true (optional),\\nsort: \"desc\" (optional) => descending sort (show icon)\\nunSortIcon: true (optional) => unsorted (show icon)\\n\\nSpecial columns:\\nheaderName: \"\",\\nfield: \"button\"\\nheaderName: \"\",\\nfield: \"link\"',\n },\n },\n },\n rowData: {\n table: {\n type: {\n summary: 'Row data options',\n detail: 'Standard row values:\\nmake: \"Toyota\", \\nmodel: \"Celica\", \\nprice: 35000 \\n\\nSpecial row values (incl buttons):\\nmake: \"Porsche\",\\nmodel: \"Boxster\",\\nprice: \"72000\",\\nbutton: { \\ndisabled: false (optional),\\nvariant: \"outline\" (optional)\\nsize: \"s\" (optional),\\ntext: \"Button\"\\n...other ifx-button properties\\n}',\n },\n },\n },\n buttonRendererOptions: {\n control: 'object',\n description: 'Options for button cell renderer, including event handlers.',\n table: {\n type: {\n summary: 'Button Renderer Options',\n detail: 'Custom event handlers and other options for the button cell renderer in the table.'\n },\n },\n },\n }\n};\n\n\n\nconst DefaultTemplate = (args) => {\n if (args.filterOrientation === 'none') {\n const table = `<ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n</ifx-table>`;\n return table;\n } else {\n //sidebar\n const filterAccordions = args.columnDefs.map(column => {\n const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];\n const filterOptions = uniqueColValues.map((option, index) => {\n return `<ifx-list-entry slot=\"slot${index}\" label=\"${option}\" value=\"false\"></ifx-list-entry>`;\n }).join('');\n\n return `\n <ifx-filter-accordion slot=\"filter-accordion\" filter-group-name=\"${column.field}\">\n <ifx-list slot=\"list\" type=\"checkbox\" name=\"${column.field}\" max-visible-items=\"6\">\n ${filterOptions}\n </ifx-list>\n </ifx-filter-accordion>\n `;\n }).join('');\n\n //topbar\n const filterComponents = args.columnDefs.map((column, index) => {\n const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];\n const options = uniqueColValues.map(option => ({\n value: option,\n label: option,\n selected: false\n }));\n\n // Directly use JSON.stringify without replacing quotes\n const optionsString = JSON.stringify(options);\n\n return `\n <ifx-set-filter slot=\"filter-component-${index + 1}\"\n options='${optionsString}' \n filter-label='${column.headerName}'\n filter-name='${column.field}'\n type='multi-select'\n search-enabled='true'>\n </ifx-set-filter>\n `;\n }).join('\\n');\n\n\n\n const filterTypeGroupComponent = args.filterOrientation === 'sidebar'\n ? `<ifx-filter-type-group slot=\"sidebar-filter\">\n <div slot=\"filter-search\">\n <ifx-filter-search filter-orientation=\"sidebar\" filter-name=\"search\"></ifx-filter-search>\n </div>\n ${filterAccordions}\n </ifx-filter-type-group>`\n :\n `<ifx-filter-bar slot=\"topbar-filter\" max-shown-filters=\"3\">\n <ifx-filter-search slot=\"filter-search\" filter-orientation=\"topbar\"></ifx-filter-search>\n ${filterComponents}\n </ifx-filter-bar>`;\n\n const table = `<ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n ${filterTypeGroupComponent}\n</ifx-table>`;\n\n return table;\n }\n};\n\n\n\nexport const Pagination = DefaultTemplate.bind({});\nPagination.args = {\n pagination: true,\n paginationPageSize: 10,\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'none',\n};\n\n\nconst CustomCellTemplate = (args) => {\n const table = `\n <ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n </ifx-table>`;\n return table;\n};\n\n\n\nexport const IncludesButtons = CustomCellTemplate.bind({});\nIncludesButtons.args = {\n rowHeight: 'default',\n columnDefs: columnDefsWithButtonCol,\n rowData: rowDataWithButtonCol,\n filterOrientation: 'none',\n pagination: false,\n paginationPageSize: 10,\n};\n\nexport const SidebarFilter = DefaultTemplate.bind({});\nSidebarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'sidebar',\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n};\n\nexport const TopbarFilter = DefaultTemplate.bind({});\nTopbarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'topbar',\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n};\n"]}
@@ -15,11 +15,14 @@ export default {
15
15
  // tags: ['autodocs'],
16
16
  args: {
17
17
  tableHeight: 'auto',
18
- rowHeight: 40,
18
+ rowHeight: 'default',
19
19
  },
20
20
  argTypes: {
21
21
  tableHeight: {
22
+ description: 'Controls the height of the table.',
22
23
  table: {
24
+ category: 'ifx-table props',
25
+ defaultValue: { summary: 'auto' },
23
26
  type: {
24
27
  summary: 'Options',
25
28
  detail: 'Default: "auto"\nExample for fixed height: "400px"',
@@ -27,11 +30,21 @@ export default {
27
30
  },
28
31
  },
29
32
  rowHeight: {
33
+ description: 'Controls the height of the rows.',
34
+ table: {
35
+ category: 'ifx-table props',
36
+ defaultValue: { summary: 'default' },
37
+ type: {
38
+ summary: 'Options',
39
+ detail: 'Default: 40\nCompact: 32\nOptions: 40, 32',
40
+ },
41
+ },
30
42
  options: ['compact', 'default'],
31
43
  control: { type: 'radio' },
32
44
  },
33
45
  cols: {
34
46
  table: {
47
+ category: 'ifx-table props',
35
48
  type: {
36
49
  summary: 'Column header options',
37
50
  detail: 'Standard columns:\nheaderName: "Model", \nfield: "model", \nsortable: true (optional),\nsort: "desc" (optional) => descending sort (show icon)\nunSortIcon: true (optional) => unsorted (show icon)\n\nSpecial columns:\nheaderName: "",\nfield: "button"\nheaderName: "",\nfield: "link"',
@@ -40,6 +53,7 @@ export default {
40
53
  },
41
54
  rows: {
42
55
  table: {
56
+ category: 'ifx-table props',
43
57
  type: {
44
58
  summary: 'Row data options',
45
59
  detail: 'Standard row values:\nmake: "Toyota", \nmodel: "Celica", \nprice: 35000 \n\nSpecial row values (incl buttons):\nmake: "Porsche",\nmodel: "Boxster",\nprice: "72000",\nbutton: { \ndisabled: false (optional),\nvariant: "outline" (optional)\nsize: "s" (optional),\ntext: "Button"\n...other ifx-button properties\n}',
@@ -57,6 +71,8 @@ export const Default = DefaultTemplate.bind({});
57
71
  Default.args = {
58
72
  cols: cols,
59
73
  rows: rows,
74
+ tableHeight: 'auto',
75
+ rowHeight: 'default',
60
76
  };
61
77
  export const FixedHeight = DefaultTemplate.bind({});
62
78
  FixedHeight.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-basic-version/table.stories.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,MAAM,IAAI,GAAG;IACX,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;IACrF,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;IACzE,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACvC,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;CACpC,CAAC;AACF,MAAM,IAAI,GAAG;IACX,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;IAC1D,EAAE,IA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W,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,WAAW,CAAC,IAAI,GAAG;IACjB,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACX,CAAC","sourcesContent":["//default\nconst cols = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' },\n];\nconst rows = [\n { make: 'Toyota', model: 'Celica', price: 35000, age: 10 },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n];\n\nexport default {\n title: 'Components/Table (basic)',\n // tags: ['autodocs'],\n args: {\n tableHeight: 'auto',\n rowHeight: 40,\n },\n argTypes: {\n tableHeight: {\n table: {\n type: {\n summary: 'Options',\n detail: 'Default: \"auto\"\\nExample for fixed height: \"400px\"',\n },\n },\n },\n rowHeight: {\n options: ['compact', 'default'],\n control: { type: 'radio' },\n },\n cols: {\n table: {\n type: {\n summary: 'Column header options',\n detail:\n 'Standard columns:\\nheaderName: \"Model\", \\nfield: \"model\", \\nsortable: true (optional),\\nsort: \"desc\" (optional) => descending sort (show icon)\\nunSortIcon: true (optional) => unsorted (show icon)\\n\\nSpecial columns:\\nheaderName: \"\",\\nfield: \"button\"\\nheaderName: \"\",\\nfield: \"link\"',\n },\n },\n },\n rows: {\n table: {\n type: {\n summary: 'Row data options',\n detail:\n 'Standard row values:\\nmake: \"Toyota\", \\nmodel: \"Celica\", \\nprice: 35000 \\n\\nSpecial row values (incl buttons):\\nmake: \"Porsche\",\\nmodel: \"Boxster\",\\nprice: \"72000\",\\nbutton: { \\ndisabled: false (optional),\\nvariant: \"outline\" (optional)\\nsize: \"s\" (optional),\\ntext: \"Button\"\\n...other ifx-button properties\\n}',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => `<ifx-basic-table \ncols='${JSON.stringify(args.cols)}' \nrows='${JSON.stringify(args.rows)}'\ntable-height='${args.tableHeight}'>\n</ifx-basic-table>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.args = {\n cols: cols,\n rows: rows,\n};\n\nexport const FixedHeight = DefaultTemplate.bind({});\nFixedHeight.args = {\n tableHeight: '400px',\n cols: cols,\n rows: rows,\n};\n"]}
1
+ {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-basic-version/table.stories.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,MAAM,IAAI,GAAG;IACX,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;IACrF,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;IACzE,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACvC,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;CACpC,CAAC;AACF,MAAM,IAAI,GAAG;IACX,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;IAC1D,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;IACxD,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE;CACpD,CAAC;AAEF,eAAe;IACb,KAAK,EAAE,0BAA0B;IACjC,sBAAsB;IACtB,IAAI,EAAE;QACJ,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,SAAS;KACrB;IACD,QAAQ,EAAE;QACR,WAAW,EAAE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AE,MAAM;IACnB,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,WAAW,CAAC,IAAI,GAAG;IACjB,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACX,CAAC","sourcesContent":["//default\nconst cols = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' },\n];\nconst rows = [\n { make: 'Toyota', model: 'Celica', price: 35000, age: 10 },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n];\n\nexport default {\n title: 'Components/Table (basic)',\n // tags: ['autodocs'],\n args: {\n tableHeight: 'auto',\n rowHeight: 'default',\n },\n argTypes: {\n tableHeight: {\n description: 'Controls the height of the table.',\n table: {\n category: 'ifx-table props',\n defaultValue: { summary: 'auto' },\n type: {\n summary: 'Options',\n detail: 'Default: \"auto\"\\nExample for fixed height: \"400px\"',\n },\n },\n },\n rowHeight: {\n description: 'Controls the height of the rows.',\n table: {\n category: 'ifx-table props',\n defaultValue: { summary: 'default' },\n type: {\n summary: 'Options',\n detail: 'Default: 40\\nCompact: 32\\nOptions: 40, 32',\n },\n },\n options: ['compact', 'default'],\n control: { type: 'radio' },\n },\n cols: {\n table: {\n category: 'ifx-table props',\n type: {\n summary: 'Column header options',\n detail:\n 'Standard columns:\\nheaderName: \"Model\", \\nfield: \"model\", \\nsortable: true (optional),\\nsort: \"desc\" (optional) => descending sort (show icon)\\nunSortIcon: true (optional) => unsorted (show icon)\\n\\nSpecial columns:\\nheaderName: \"\",\\nfield: \"button\"\\nheaderName: \"\",\\nfield: \"link\"',\n },\n },\n },\n rows: {\n table: {\n category: 'ifx-table props',\n type: {\n summary: 'Row data options',\n detail:\n 'Standard row values:\\nmake: \"Toyota\", \\nmodel: \"Celica\", \\nprice: 35000 \\n\\nSpecial row values (incl buttons):\\nmake: \"Porsche\",\\nmodel: \"Boxster\",\\nprice: \"72000\",\\nbutton: { \\ndisabled: false (optional),\\nvariant: \"outline\" (optional)\\nsize: \"s\" (optional),\\ntext: \"Button\"\\n...other ifx-button properties\\n}',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => `<ifx-basic-table \ncols='${JSON.stringify(args.cols)}' \nrows='${JSON.stringify(args.rows)}'\ntable-height='${args.tableHeight}'>\n</ifx-basic-table>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.args = {\n cols: cols,\n rows: rows,\n tableHeight: 'auto',\n rowHeight: 'default',\n};\n\nexport const FixedHeight = DefaultTemplate.bind({});\nFixedHeight.args = {\n tableHeight: '400px',\n cols: cols,\n rows: rows,\n};\n"]}