@infineon/infineon-design-system-stencil 30.1.0 → 30.1.1--canary.1640.e4770f238d16196b9059daf4898d2d6ef7cdcbdd.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 (188) 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 +74 -13
  28. package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -1
  29. package/dist/collection/components/content-switcher/content-switcher.stories.js +48 -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 +235 -13
  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-0a68c458.js → p-78f3e867.js} +4 -4
  108. package/dist/components/{p-0a68c458.js.map → p-78f3e867.js.map} +1 -1
  109. package/dist/components/{p-96fbc3db.js → p-bac84326.js} +6 -6
  110. package/dist/components/p-bac84326.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-227d384c.entry.js +2 -0
  126. package/dist/infineon-design-system-stencil/p-227d384c.entry.js.map +1 -0
  127. package/dist/infineon-design-system-stencil/p-2849823e.entry.js +2 -0
  128. package/dist/infineon-design-system-stencil/p-2849823e.entry.js.map +1 -0
  129. package/dist/infineon-design-system-stencil/p-3ca407c8.entry.js +2 -0
  130. package/dist/infineon-design-system-stencil/p-3ca407c8.entry.js.map +1 -0
  131. package/dist/infineon-design-system-stencil/p-b1688ca4.entry.js +2 -0
  132. package/dist/infineon-design-system-stencil/p-b1688ca4.entry.js.map +1 -0
  133. package/dist/infineon-design-system-stencil/{p-b8f31dc3.entry.js → p-c428a56a.entry.js} +2 -2
  134. package/dist/infineon-design-system-stencil/p-c428a56a.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 +50 -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-advanced-version/table.stories.d.ts +243 -2
  172. package/dist/types/components/table-basic-version/table.stories.d.ts +19 -1
  173. package/dist/types/components/tabs/tabs.stories.d.ts +77 -7
  174. package/dist/types/components/tag/tag.stories.d.ts +20 -0
  175. package/dist/types/components/text-field/text-field.stories.d.ts +96 -11
  176. package/dist/types/components/tooltip/tooltip.stories.d.ts +41 -6
  177. package/dist/types/components.d.ts +10 -10
  178. package/package.json +1 -1
  179. package/dist/components/p-96fbc3db.js.map +0 -1
  180. package/dist/infineon-design-system-stencil/p-75436967.entry.js +0 -2
  181. package/dist/infineon-design-system-stencil/p-75436967.entry.js.map +0 -1
  182. package/dist/infineon-design-system-stencil/p-79b4d359.entry.js +0 -2
  183. package/dist/infineon-design-system-stencil/p-79b4d359.entry.js.map +0 -1
  184. package/dist/infineon-design-system-stencil/p-a29b6247.entry.js +0 -2
  185. package/dist/infineon-design-system-stencil/p-a29b6247.entry.js.map +0 -1
  186. package/dist/infineon-design-system-stencil/p-b8f31dc3.entry.js.map +0 -1
  187. package/dist/infineon-design-system-stencil/p-cdad5d2c.entry.js +0 -2
  188. package/dist/infineon-design-system-stencil/p-cdad5d2c.entry.js.map +0 -1
@@ -82,51 +82,272 @@ export default {
82
82
  tableHeight: 'auto',
83
83
  pagination: false,
84
84
  paginationPageSize: 10,
85
- currentPage: 1,
86
85
  rowHeight: 40,
87
86
  showLoading: false,
87
+ maxVisibleItemsOfList: 6,
88
+ filterNameOfFilterSearch: 'Search',
88
89
  },
89
90
  argTypes: {
90
91
  tableHeight: {
92
+ description: 'Set the height of the table. Example for fixed height: "400px".',
91
93
  table: {
94
+ defaultValue: { summary: 'auto' },
95
+ category: 'ifx-table props',
92
96
  type: {
93
- summary: 'Options',
94
- detail: 'Default: "auto"\nExample for fixed height: "400px"',
97
+ summary: 'String',
95
98
  }
96
99
  },
97
100
  },
101
+ pagination: {
102
+ description: 'Add pagination to the table.',
103
+ table: {
104
+ category: 'ifx-table props',
105
+ defaultValue: { summary: true },
106
+ type: {
107
+ summary: 'Boolean',
108
+ }
109
+ }
110
+ },
98
111
  paginationPageSize: {
99
- description: "Results per page: minimum 10 - maximum 30",
100
- control: { type: 'number', min: 10, max: 30, step: 10 }
112
+ description: "Set the number of results per page.",
113
+ control: { type: 'number', min: 10, max: 30, step: 10 },
114
+ table: {
115
+ category: 'ifx-table props',
116
+ defaultValue: { summary: 10 },
117
+ type: {
118
+ summary: 'Details',
119
+ detail: 'Minimum: 10\nMaximum: 30',
120
+ }
121
+ }
101
122
  },
102
123
  showLoading: {
124
+ description: 'Show loading spinner.',
103
125
  options: [true, false],
104
126
  control: { type: 'radio' },
127
+ table: {
128
+ category: 'ifx-table props',
129
+ defaultValue: { summary: false },
130
+ type: {
131
+ summary: 'boolean',
132
+ }
133
+ }
105
134
  },
106
135
  rowHeight: {
136
+ description: 'Set the height of the rows.',
107
137
  options: ['compact', 'default'],
108
138
  control: { type: 'radio' },
139
+ table: {
140
+ category: 'ifx-table props',
141
+ defaultValue: { summary: 'default' },
142
+ type: {
143
+ summary: 'Options',
144
+ detail: 'Default: 40px\nCompact: 32px',
145
+ }
146
+ },
109
147
  },
110
148
  filterOrientation: {
149
+ description: 'Filter position options for the table.',
111
150
  options: ['sidebar', 'topbar', 'none'],
112
151
  control: { type: 'radio' },
152
+ table: {
153
+ category: 'ifx-table props',
154
+ defaultValue: { summary: 'sidebar' },
155
+ type: {
156
+ summary: 'Options',
157
+ detail: 'Sidebar: filter on the left side\nTopbar: filter on the top\nNone: no filter',
158
+ },
159
+ }
113
160
  },
114
161
  columnDefs: {
162
+ description: 'Column header options.',
115
163
  table: {
164
+ category: 'ifx-table props',
116
165
  type: {
117
- summary: 'Column header options',
166
+ summary: 'Options',
118
167
  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"',
119
168
  },
120
169
  },
121
170
  },
122
171
  rowData: {
172
+ description: 'Row data options.',
123
173
  table: {
174
+ category: 'ifx-table props',
124
175
  type: {
125
- summary: 'Row data options',
176
+ summary: 'Options',
126
177
  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}',
127
178
  },
128
179
  },
129
- }
180
+ },
181
+ filterGroupName: {
182
+ description: 'Set the filter group name.',
183
+ control: { type: 'text' },
184
+ table: {
185
+ category: 'ifx-filter-accordion props',
186
+ type: {
187
+ summary: 'String',
188
+ }
189
+ }
190
+ },
191
+ filterNameOfFilterSearch: {
192
+ name: 'filterName',
193
+ description: 'Set the filter name.',
194
+ control: { type: 'text' },
195
+ table: {
196
+ category: 'ifx-filter-search props',
197
+ type: {
198
+ summary: 'String',
199
+ }
200
+ }
201
+ },
202
+ filterLabel: {
203
+ description: 'Set the filter label.',
204
+ control: { type: 'text' },
205
+ table: {
206
+ category: 'ifx-set-filter props',
207
+ type: {
208
+ summary: 'String',
209
+ }
210
+ }
211
+ },
212
+ filterName: {
213
+ description: 'Set the filter name.',
214
+ control: { type: 'text' },
215
+ table: {
216
+ category: 'ifx-set-filter props',
217
+ type: {
218
+ summary: 'String',
219
+ }
220
+ }
221
+ },
222
+ type: {
223
+ description: 'Set the type of filter.',
224
+ options: ['text', 'single-select', 'multi-select'],
225
+ control: { type: 'radio' },
226
+ table: {
227
+ defaultValue: { summary: 'text' },
228
+ category: 'ifx-set-filter props',
229
+ type: {
230
+ summary: 'text | single-select | multi-select',
231
+ }
232
+ }
233
+ },
234
+ maxShownFilters: {
235
+ description: 'Set the maximum number of shown filters.',
236
+ control: { type: 'number' },
237
+ table: {
238
+ defaultValue: {
239
+ summary: 4
240
+ },
241
+ category: 'ifx-filter-bar props',
242
+ type: {
243
+ summary: 'Number',
244
+ }
245
+ }
246
+ },
247
+ typeOfList: {
248
+ name: 'type',
249
+ description: 'Set the type of list.',
250
+ control: { type: 'radio' },
251
+ table: {
252
+ category: 'ifx-list props',
253
+ defaultValue: { summary: 'checkbox' },
254
+ type: {
255
+ summary: 'String',
256
+ },
257
+ }
258
+ },
259
+ maxVisibleItemsOfList: {
260
+ name: 'maxVisibleItems',
261
+ description: 'Set the maximum number of visible items in the list.',
262
+ control: { type: 'number' },
263
+ table: {
264
+ defaultValue: {
265
+ summary: 6
266
+ },
267
+ category: 'ifx-list props',
268
+ type: {
269
+ summary: 'Number',
270
+ }
271
+ }
272
+ },
273
+ labelOfListEntry: {
274
+ name: 'label',
275
+ description: 'Set the label of the list entry.',
276
+ control: { type: 'text' },
277
+ table: {
278
+ category: 'ifx-list-entry props',
279
+ type: {
280
+ summary: 'String',
281
+ }
282
+ }
283
+ },
284
+ valueOfListEntry: {
285
+ name: 'value',
286
+ description: 'Set the value of the list entry.',
287
+ control: { type: 'boolean' },
288
+ table: {
289
+ category: 'ifx-list-entry props',
290
+ type: {
291
+ summary: 'Boolean',
292
+ }
293
+ }
294
+ },
295
+ ifxSidebarFilterChange: {
296
+ description: 'Custom event emitted when the filter is changed in the sidebar.',
297
+ table: {
298
+ category: 'custom events',
299
+ type: {
300
+ summary: 'Framework integration',
301
+ detail: `
302
+ React: onIfxSidebarFilterChange={handleChange}
303
+ Vue: @ifxSidebarFilterChange="handleChange"
304
+ Angular: (ifxSidebarFilterChange)="handleChange()"
305
+ VanillaJs: .addEventListener("ifxSidebarFilterChange", (event) => {/*handle change*/});`
306
+ }
307
+ }
308
+ },
309
+ ifxFilterSearchChange: {
310
+ description: 'Custom event emitted when the filter search is changed.',
311
+ table: {
312
+ category: 'custom events',
313
+ type: {
314
+ summary: 'Framework integration',
315
+ detail: `
316
+ React: onIfxFilterSearchChange={handleChange}
317
+ Vue: @ifxFilterSearchChange="handleChange"
318
+ Angular: (ifxFilterSearchChange)="handleChange()"
319
+ VanillaJs: .addEventListener("ifxFilterSearchChange", (event) => {/*handle change*/});`
320
+ }
321
+ }
322
+ },
323
+ ifxFilterSelect: {
324
+ description: 'Custom event emitted when the filter is selected.',
325
+ table: {
326
+ category: 'custom events',
327
+ type: {
328
+ summary: 'Framework integration',
329
+ detail: `
330
+ React: onIfxFilterSelect={handleSelect}
331
+ Vue: @ifxFilterSelect="handleSelect"
332
+ Angular: (ifxFilterSelect)="handleSelect()"
333
+ VanillaJs: .addEventListener("ifxFilterSelect", (event) => {/*handle select*/});`
334
+ }
335
+ }
336
+ },
337
+ ifxFilterAccordionChange: {
338
+ description: 'Custom event emitted when the filter accordion is changed.',
339
+ table: {
340
+ category: 'custom events',
341
+ type: {
342
+ summary: 'Framework integration',
343
+ detail: `
344
+ React: onIfxFilterAccordionChange={handleChange}
345
+ Vue: @ifxFilterAccordionChange="handleChange"
346
+ Angular: (ifxFilterAccordionChange)="handleChange()"
347
+ VanillaJs: .addEventListener("ifxFilterAccordionChange", (event) => {/*handle change*/});`
348
+ }
349
+ }
350
+ },
130
351
  }
131
352
  };
132
353
  const DefaultTemplate = (args) => {
@@ -147,11 +368,11 @@ const DefaultTemplate = (args) => {
147
368
  const filterAccordions = args.columnDefs.map(column => {
148
369
  const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];
149
370
  const filterOptions = uniqueColValues.map((option, index) => {
150
- return `<ifx-list-entry slot="slot${index}" label="${option}" value="false"></ifx-list-entry>`;
371
+ return `<ifx-list-entry slot="slot${index}" label="${option}" value="${args.valueOfListEntry}"></ifx-list-entry>`;
151
372
  }).join('');
152
373
  return `
153
374
  <ifx-filter-accordion slot="filter-accordion" filter-group-name="${column.field}">
154
- <ifx-list slot="list" type="checkbox" name="${column.field}" max-visible-items="6">
375
+ <ifx-list slot="list" type="checkbox" name="${column.field}" max-visible-items="${args.maxVisibleItemsOfList}">
155
376
  ${filterOptions}
156
377
  </ifx-list>
157
378
  </ifx-filter-accordion>
@@ -172,7 +393,7 @@ const DefaultTemplate = (args) => {
172
393
  options='${optionsString}'
173
394
  filter-label='${column.headerName}'
174
395
  filter-name='${column.field}'
175
- type='multi-select'
396
+ type='${args.type}'
176
397
  search-enabled='true'>
177
398
  </ifx-set-filter>
178
399
  `;
@@ -185,7 +406,7 @@ const DefaultTemplate = (args) => {
185
406
  ${filterAccordions}
186
407
  </ifx-filter-type-group>`
187
408
  :
188
- `<ifx-filter-bar slot="topbar-filter" max-shown-filters="3">
409
+ `<ifx-filter-bar slot="topbar-filter" max-shown-filters="${args.maxShownFilters}">
189
410
  <ifx-filter-search slot="filter-search" filter-orientation="topbar"></ifx-filter-search>
190
411
  ${filterComponents}
191
412
  </ifx-filter-bar>`;
@@ -197,6 +418,7 @@ const DefaultTemplate = (args) => {
197
418
  pagination="${args.pagination}"
198
419
  pagination-page-size="${args.paginationPageSize}"
199
420
  filter-orientation="${args.filterOrientation}">
421
+
200
422
  ${filterTypeGroupComponent}
201
423
  </ifx-table>`;
202
424
  return table;
@@ -223,7 +445,7 @@ SidebarFilter.args = {
223
445
  rowHeight: 'default',
224
446
  columnDefs: columnDefs,
225
447
  rowData: rowData,
226
- filterOrientation: 'sidebar'
448
+ filterOrientation: 'sidebar',
227
449
  };
228
450
  export const TopbarFilter = DefaultTemplate.bind({});
229
451
  TopbarFilter.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-advanced-version/table.stories.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,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;AAIF,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,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE;IACn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,CAAC,IAAI,GAAG;IACnB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,SAAS;CAC7B,CAAC;AAGF,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;CAC5B,CAAC;AAEF,uDAAuD;AACvD,uBAAuB;AACvB,uCAAuC;AACvC,sCAAsC;AACtC,KAAK","sourcesContent":["//default\nconst 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\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\n//table with button col\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 { headerName: '', field: 'button' }\n];\n\nconst rowDataWithButtonCol = [\n {\n make: 'Toyota', model: 'Celica', price: 35000, age: 10, button: 'something about Toyota'\n },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12, button: 'something about Ford' },\n {\n make: 'Porsche', model: 'Boxster', price: 72000, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n color: \"secondary\",\n text: \"Button\"\n // ... you can extend this as per the properties of `ifx-button`\n }\n }\n];\n\n\n\n//other example\n// const columnDefsDragAndDrop = [\n// { valueGetter: '\"Drag\"', dndSource: true },\n// { field: 'id' },\n// { field: 'color' },\n// { field: 'value1' },\n// { field: 'value2' },\n// ];\n\n// var rowIdSequence = 100;\n// function getRowDataDragAndDrop() {\n// var rowDataDragAndDrop = [];\n// [\n// 'Red',\n// 'Green',\n// 'Blue',\n// 'Red',\n// 'Green',\n// 'Blue',\n// 'Red',\n// 'Green',\n// 'Blue',\n// ].forEach(function (color) {\n// var newDataItem = {\n// id: rowIdSequence++,\n// color: color,\n// value1: Math.floor(Math.random() * 100),\n// value2: Math.floor(Math.random() * 100),\n// };\n// rowDataDragAndDrop.push(newDataItem);\n// });\n// return rowDataDragAndDrop;\n// }\n\n\nexport default {\n title: 'Components/Table (advanced)',\n // tags: ['autodocs'],\n args: {\n tableHeight: 'auto',\n pagination: false,\n paginationPageSize: 10,\n currentPage: 1,\n rowHeight: 40,\n showLoading: false,\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 }\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\nconst 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\n\nexport const IncludesButtons = DefaultTemplate.bind({});\nIncludesButtons.args = {\n rowHeight: 'default',\n columnDefs: columnDefsWithButtonCol,\n rowData: rowDataWithButtonCol,\n filterOrientation: 'none'\n\n};\n\n\nexport const SidebarFilter = DefaultTemplate.bind({});\nSidebarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'sidebar'\n};\n\n\nexport const TopbarFilter = DefaultTemplate.bind({});\nTopbarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'topbar'\n};\n\n// export const DragAndDrop = DefaultTemplate.bind({});\n// DragAndDrop.args = {\n// columnDefs: columnDefsDragAndDrop,\n// rowData: getRowDataDragAndDrop(),\n// };"]}
1
+ {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-advanced-version/table.stories.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,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;AAIF,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,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE;IACnD,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE;IACzC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE;IAC9C,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE;IAC7C,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK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pB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,MAAM;CAE1B,CAAC;AAGF,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxD,eAAe,CAAC,IAAI,GAAG;IACrB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,uBAAuB;IACnC,OAAO,EAAE,oBAAoB;IAC7B,iBAAiB,EAAE,MAAM;CAE1B,CAAC;AAGF,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;CAC7B,CAAC;AAGF,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;CAC5B,CAAC;AAEF,uDAAuD;AACvD,uBAAuB;AACvB,uCAAuC;AACvC,sCAAsC;AACtC,KAAK","sourcesContent":["//default\nconst 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\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\n//table with button col\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 { headerName: '', field: 'button' }\n];\n\nconst rowDataWithButtonCol = [\n {\n make: 'Toyota', model: 'Celica', price: 35000, age: 10, button: 'something about Toyota'\n },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12, button: 'something about Ford' },\n {\n make: 'Porsche', model: 'Boxster', price: 72000, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n color: \"secondary\",\n text: \"Button\"\n // ... you can extend this as per the properties of `ifx-button`\n }\n }\n];\n\n\n\n//other example\n// const columnDefsDragAndDrop = [\n// { valueGetter: '\"Drag\"', dndSource: true },\n// { field: 'id' },\n// { field: 'color' },\n// { field: 'value1' },\n// { field: 'value2' },\n// ];\n\n// var rowIdSequence = 100;\n// function getRowDataDragAndDrop() {\n// var rowDataDragAndDrop = [];\n// [\n// 'Red',\n// 'Green',\n// 'Blue',\n// 'Red',\n// 'Green',\n// 'Blue',\n// 'Red',\n// 'Green',\n// 'Blue',\n// ].forEach(function (color) {\n// var newDataItem = {\n// id: rowIdSequence++,\n// color: color,\n// value1: Math.floor(Math.random() * 100),\n// value2: Math.floor(Math.random() * 100),\n// };\n// rowDataDragAndDrop.push(newDataItem);\n// });\n// return rowDataDragAndDrop;\n// }\n\n\nexport default {\n title: 'Components/Table (advanced)',\n // tags: ['autodocs'],\n args: {\n tableHeight: 'auto',\n pagination: false,\n paginationPageSize: 10,\n rowHeight: 40,\n showLoading: false,\n maxVisibleItemsOfList: 6,\n filterNameOfFilterSearch: 'Search',\n\n },\n\n argTypes: {\n tableHeight: {\n description: 'Set the height of the table. Example for fixed height: \"400px\".',\n table: {\n defaultValue: { summary: 'auto' },\n category: 'ifx-table props',\n type: {\n summary: 'String',\n }\n },\n },\n pagination: {\n description: 'Add pagination to the table.',\n table: {\n category: 'ifx-table props',\n defaultValue: { summary: true },\n type: {\n summary: 'Boolean',\n }\n }\n },\n paginationPageSize: {\n description: \"Set the number of results per page.\",\n control: { type: 'number', min: 10, max: 30, step: 10 },\n table: {\n category: 'ifx-table props',\n defaultValue: { summary: 10 },\n type: {\n summary: 'Details',\n detail: 'Minimum: 10\\nMaximum: 30',\n }\n }\n },\n showLoading: {\n description: 'Show loading spinner.',\n options: [true, false],\n control: { type: 'radio' },\n table: {\n category: 'ifx-table props',\n defaultValue: { summary: false },\n type: {\n summary: 'boolean',\n }\n }\n },\n rowHeight: {\n description: 'Set the height of the rows.',\n options: ['compact', 'default'],\n control: { type: 'radio' },\n table: {\n category: 'ifx-table props',\n defaultValue: { summary: 'default' },\n type: {\n summary: 'Options',\n detail: 'Default: 40px\\nCompact: 32px',\n }\n },\n },\n filterOrientation: {\n description: 'Filter position options for the table.',\n options: ['sidebar', 'topbar', 'none'],\n control: { type: 'radio' },\n table: {\n category: 'ifx-table props',\n defaultValue: { summary: 'sidebar' },\n type: {\n summary: 'Options',\n detail: 'Sidebar: filter on the left side\\nTopbar: filter on the top\\nNone: no filter',\n },\n }\n },\n columnDefs: {\n description: 'Column header options.',\n table: {\n category: 'ifx-table props',\n type: {\n summary: '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 description: 'Row data options.',\n table: {\n category: 'ifx-table props',\n type: {\n summary: '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 filterGroupName: {\n description: 'Set the filter group name.',\n control: { type: 'text' },\n table: {\n category: 'ifx-filter-accordion props',\n type: {\n summary: 'String',\n }\n }\n },\n filterNameOfFilterSearch: {\n name: 'filterName',\n description: 'Set the filter name.',\n control: { type: 'text' },\n table: {\n category: 'ifx-filter-search props',\n type: {\n summary: 'String',\n }\n }\n },\n filterLabel: {\n description: 'Set the filter label.',\n control: { type: 'text' },\n table: {\n category: 'ifx-set-filter props',\n type: {\n summary: 'String',\n }\n }\n },\n filterName: {\n description: 'Set the filter name.',\n control: { type: 'text' },\n table: {\n category: 'ifx-set-filter props',\n type: {\n summary: 'String',\n }\n }\n },\n type: {\n description: 'Set the type of filter.',\n options: ['text', 'single-select', 'multi-select'],\n control: { type: 'radio' },\n table: {\n defaultValue: { summary: 'text' },\n category: 'ifx-set-filter props',\n type: {\n summary: 'text | single-select | multi-select',\n }\n }\n },\n maxShownFilters: {\n description: 'Set the maximum number of shown filters.',\n control: { type: 'number' },\n table: {\n defaultValue: {\n summary: 4\n },\n category: 'ifx-filter-bar props',\n type: {\n summary: 'Number',\n }\n }\n },\n typeOfList: {\n name: 'type',\n description: 'Set the type of list.',\n control: { type: 'radio' },\n table: {\n category: 'ifx-list props',\n defaultValue: { summary: 'checkbox' },\n type: {\n summary: 'String',\n },\n }\n },\n maxVisibleItemsOfList: {\n name: 'maxVisibleItems',\n description: 'Set the maximum number of visible items in the list.',\n control: { type: 'number' },\n table: {\n defaultValue: {\n summary: 6\n },\n category: 'ifx-list props',\n type: {\n summary: 'Number',\n }\n }\n },\n labelOfListEntry: {\n name: 'label',\n description: 'Set the label of the list entry.',\n control: { type: 'text' },\n table: {\n category: 'ifx-list-entry props',\n type: {\n summary: 'String',\n }\n }\n },\n valueOfListEntry: {\n name: 'value',\n description: 'Set the value of the list entry.',\n control: { type: 'boolean' },\n table: {\n category: 'ifx-list-entry props',\n type: {\n summary: 'Boolean',\n }\n }\n },\n ifxSidebarFilterChange: {\n description: 'Custom event emitted when the filter is changed in the sidebar.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: `\n React: onIfxSidebarFilterChange={handleChange}\n Vue: @ifxSidebarFilterChange=\"handleChange\"\n Angular: (ifxSidebarFilterChange)=\"handleChange()\"\n VanillaJs: .addEventListener(\"ifxSidebarFilterChange\", (event) => {/*handle change*/});`\n }\n }\n },\n ifxFilterSearchChange: {\n description: 'Custom event emitted when the filter search is changed.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: `\n React: onIfxFilterSearchChange={handleChange}\n Vue: @ifxFilterSearchChange=\"handleChange\"\n Angular: (ifxFilterSearchChange)=\"handleChange()\"\n VanillaJs: .addEventListener(\"ifxFilterSearchChange\", (event) => {/*handle change*/});`\n }\n }\n },\n ifxFilterSelect: {\n description: 'Custom event emitted when the filter is selected.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: `\n React: onIfxFilterSelect={handleSelect}\n Vue: @ifxFilterSelect=\"handleSelect\"\n Angular: (ifxFilterSelect)=\"handleSelect()\"\n VanillaJs: .addEventListener(\"ifxFilterSelect\", (event) => {/*handle select*/});`\n }\n }\n },\n ifxFilterAccordionChange: {\n description: 'Custom event emitted when the filter accordion is changed.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: `\n React: onIfxFilterAccordionChange={handleChange}\n Vue: @ifxFilterAccordionChange=\"handleChange\"\n Angular: (ifxFilterAccordionChange)=\"handleChange()\"\n VanillaJs: .addEventListener(\"ifxFilterAccordionChange\", (event) => {/*handle change*/});`\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=\"${args.valueOfListEntry}\"></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=\"${args.maxVisibleItemsOfList}\">\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='${args.type}'\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=\"${args.maxShownFilters}\">\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 \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\n\nexport const IncludesButtons = DefaultTemplate.bind({});\nIncludesButtons.args = {\n rowHeight: 'default',\n columnDefs: columnDefsWithButtonCol,\n rowData: rowDataWithButtonCol,\n filterOrientation: 'none'\n\n};\n\n\nexport const SidebarFilter = DefaultTemplate.bind({});\nSidebarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'sidebar',\n};\n\n\nexport const TopbarFilter = DefaultTemplate.bind({});\nTopbarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'topbar'\n};\n\n// export const DragAndDrop = DefaultTemplate.bind({});\n// DragAndDrop.args = {\n// columnDefs: columnDefsDragAndDrop,\n// rowData: getRowDataDragAndDrop(),\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;IACr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AEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;gBACjB,IAAI,CAAC,WAAW;mBACb,CAAC;AAEpB,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACX,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: 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,GA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ACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;gBACjB,IAAI,CAAC,WAAW;mBACb,CAAC;AAEpB,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,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"]}