@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
@@ -12,24 +12,91 @@ export default {
12
12
  max: '',
13
13
  min: '',
14
14
  label: "Label Text",
15
- caption: "Caption text, description, error notification",
15
+ caption: "Caption text, description, error notification.",
16
16
  },
17
17
  argTypes: {
18
+ label: {
19
+ description: 'Label of Date Picker.',
20
+ table: {
21
+ category: 'ifx-date-picker props',
22
+ }
23
+ },
24
+ caption: {
25
+ description: 'Caption text, description, error notification.',
26
+ table: {
27
+ category: 'ifx-date-picker props',
28
+ }
29
+ },
30
+ min: {
31
+ description: 'Minimum date that can be selected',
32
+ table: {
33
+ category: 'ifx-date-picker props',
34
+ }
35
+ },
36
+ max: {
37
+ description: 'The latest date that can be selected.',
38
+ table: {
39
+ category: 'ifx-date-picker props',
40
+ }
41
+ },
42
+ disabled: {
43
+ description: 'Disables the date picker',
44
+ control: 'boolean',
45
+ table: {
46
+ category: 'ifx-date-picker props',
47
+ defaultValue: {
48
+ summary: false
49
+ }
50
+ }
51
+ },
52
+ success: {
53
+ description: 'Indicates success in the date picker.',
54
+ control: 'boolean',
55
+ table: {
56
+ category: 'ifx-date-picker props',
57
+ defaultValue: {
58
+ summary: false
59
+ }
60
+ }
61
+ },
62
+ error: {
63
+ description: 'Indicates error in the date picker.',
64
+ control: 'boolean',
65
+ table: {
66
+ category: 'ifx-date-picker props',
67
+ defaultValue: {
68
+ summary: false
69
+ }
70
+ }
71
+ },
18
72
  size: {
19
- description: 'Size options: Height small (36px) and Height large (40px) - default: small',
73
+ description: 'Sets the size of the date picker. Options: Height small (36px) and Height large (40px)',
74
+ control: 'radio',
20
75
  options: ['s', 'l'],
21
- control: { type: 'radio' },
76
+ table: {
77
+ category: 'ifx-date-picker props',
78
+ defaultValue: {
79
+ summary: 's'
80
+ }
81
+ }
22
82
  },
23
83
  name: {
24
- description: 'Name of the element, that is used as reference when a form is submitted.'
84
+ description: 'Name of the element, that is used as reference when a form is submitted.',
85
+ table: {
86
+ category: 'ifx-date-picker props'
87
+ }
25
88
  },
26
89
  value: {
27
- description: 'Displayed date is formatted based on the locale of the user`s browser, but the parsed value is always formatted yyyy-mm-dd'
90
+ description: 'Displayed date is formatted based on the locale of the user`s browser, but the parsed value is always formatted yyyy-mm-dd',
91
+ table: {
92
+ category: 'ifx-date-picker props'
93
+ }
28
94
  },
29
95
  ifxDate: {
30
96
  action: 'ifxDate',
31
- description: 'Custom event',
97
+ description: 'A custom event emitted when a date in the calendar is being selected.',
32
98
  table: {
99
+ category: 'custom events',
33
100
  type: {
34
101
  summary: 'Framework integration',
35
102
  detail: 'React: onIfxDate={handleInput}\nVue:@ifxDate="handleInput"\nAngular:(ifxDate)="handleInput()"\nVanillaJs:.addEventListener("ifxDate", (event) => {//handle input});',
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.stories.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,+CAA+C;KACzD;IACD,QAAQ,EA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BAAgB,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACvD,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/Date Picker',\n tags: ['autodocs'],\n\n args: {\n disabled: false,\n size: 's',\n success: false,\n error: false,\n name: 'date-picker',\n value: '',\n max: '',\n min: '',\n label: \"Label Text\",\n caption: \"Caption text, description, error notification\",\n },\n argTypes: {\n size: {\n description: 'Size options: Height small (36px) and Height large (40px) - default: small',\n options: ['s', 'l'],\n control: { type: 'radio' },\n },\n name: {\n description: 'Name of the element, that is used as reference when a form is submitted.'\n },\n value: { \n description: 'Displayed date is formatted based on the locale of the user`s browser, but the parsed value is always formatted yyyy-mm-dd'\n },\n ifxDate: {\n action: 'ifxDate',\n description: 'Custom event',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxDate={handleInput}\\nVue:@ifxDate=\"handleInput\"\\nAngular:(ifxDate)=\"handleInput()\"\\nVanillaJs:.addEventListener(\"ifxDate\", (event) => {//handle input});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = ({ error, disabled, success, size, value, max, min, caption, label }) => {\n const element = document.createElement('ifx-date-picker');\n element.setAttribute('error', error);\n element.setAttribute('disabled', disabled);\n element.setAttribute('size', size);\n element.setAttribute('success', success);\n element.setAttribute('value', value);\n element.setAttribute('max', max);\n element.setAttribute('min', min);\n element.setAttribute('label', label);\n element.setAttribute('caption', caption);\n element.addEventListener('ifxDate', action('ifxDate'));\n return element;\n};\n\nexport const Default = DefaultTemplate.bind({});"]}
1
+ {"version":3,"file":"date-picker.stories.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eA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,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACzC,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACvD,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/Date Picker',\n tags: ['autodocs'],\n\n args: {\n disabled: false,\n size: 's',\n success: false,\n error: false,\n name: 'date-picker',\n value: '',\n max: '',\n min: '',\n label: \"Label Text\",\n caption: \"Caption text, description, error notification.\",\n },\n argTypes: {\n label: {\n description: 'Label of Date Picker.',\n table: {\n category: 'ifx-date-picker props',\n }\n },\n caption: {\n description: 'Caption text, description, error notification.',\n table: {\n category: 'ifx-date-picker props',\n }\n },\n min: {\n description: 'Minimum date that can be selected',\n table: {\n category: 'ifx-date-picker props',\n }\n },\n max: {\n description: 'The latest date that can be selected.',\n table: {\n category: 'ifx-date-picker props',\n }\n },\n disabled: {\n description: 'Disables the date picker',\n control: 'boolean',\n table: {\n category: 'ifx-date-picker props',\n defaultValue: {\n summary: false\n }\n }\n },\n success: {\n description: 'Indicates success in the date picker.',\n control: 'boolean',\n table: {\n category: 'ifx-date-picker props',\n defaultValue: {\n summary: false\n }\n }\n },\n error: {\n description: 'Indicates error in the date picker.',\n control: 'boolean',\n table: {\n category: 'ifx-date-picker props',\n defaultValue: {\n summary: false\n }\n }\n },\n size: {\n description: 'Sets the size of the date picker. Options: Height small (36px) and Height large (40px)',\n control: 'radio',\n options: ['s', 'l'],\n table: {\n category: 'ifx-date-picker props',\n defaultValue: {\n summary: 's'\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-date-picker props'\n }\n },\n value: { \n description: 'Displayed date is formatted based on the locale of the user`s browser, but the parsed value is always formatted yyyy-mm-dd',\n table: {\n category: 'ifx-date-picker props'\n }\n },\n ifxDate: {\n action: 'ifxDate',\n description: 'A custom event emitted when a date in the calendar is being selected.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxDate={handleInput}\\nVue:@ifxDate=\"handleInput\"\\nAngular:(ifxDate)=\"handleInput()\"\\nVanillaJs:.addEventListener(\"ifxDate\", (event) => {//handle input});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = ({ error, disabled, success, size, value, max, min, caption, label }) => {\n const element = document.createElement('ifx-date-picker');\n element.setAttribute('error', error);\n element.setAttribute('disabled', disabled);\n element.setAttribute('size', size);\n element.setAttribute('success', success);\n element.setAttribute('value', value);\n element.setAttribute('max', max);\n element.setAttribute('min', min);\n element.setAttribute('label', label);\n element.setAttribute('caption', caption);\n element.addEventListener('ifxDate', action('ifxDate'));\n return element;\n};\n\nexport const Default = DefaultTemplate.bind({});"]}
@@ -4,25 +4,25 @@ export default {
4
4
  title: 'Components/Dropdown',
5
5
  tags: ['autodocs'],
6
6
  args: {
7
- Label: 'Dropdown',
8
- variant: 'primary',
7
+ label: 'Dropdown',
9
8
  disabled: false,
10
- icon: 'c-check-16',
11
- size: 'm',
12
- Search: false,
13
- Header: false,
14
- href: '',
15
- target: '_self',
16
- Separator: false,
17
- DropDownMenuItemIcon: false,
18
9
  defaultOpen: false,
19
10
  noCloseOnOutsideClick: false,
20
11
  noCloseOnMenuClick: false,
21
12
  noAppendToBody: false,
13
+ variant: 'primary',
22
14
  placement: 'bottom-start',
15
+ size: 'm',
16
+ searchField: false,
17
+ header: false,
18
+ separator: false,
19
+ href: '',
20
+ target: '_self',
21
+ icon: 'c-info-16',
23
22
  },
24
23
  argTypes: {
25
24
  placement: {
25
+ description: 'Specifies the position of the dropdown relative to its trigger element.',
26
26
  options: [
27
27
  'auto',
28
28
  'auto-start',
@@ -40,57 +40,159 @@ export default {
40
40
  'left-start',
41
41
  'left-end',
42
42
  ],
43
- control: { type: 'select' },
43
+ control: 'select',
44
+ table: {
45
+ category: 'ifx-dropdown props',
46
+ defaultValue: {
47
+ summary: 'bottom-start'
48
+ }
49
+ }
44
50
  },
45
- Label: {
46
- description: 'The visible name or label for the dropdown button',
51
+ label: {
52
+ name: 'Label of Dropdown',
53
+ description: 'The visible name or label for the dropdown button.',
54
+ table: {
55
+ category: 'story controls',
56
+ defaultValue: {
57
+ summary: 'Dropdown'
58
+ }
59
+ }
47
60
  // if: { arg: 'Type', eq: 'Default' }
48
61
  },
49
62
  size: {
50
- description: 'Font Size options for menu items: s (14px) and m (16px) - default: m',
63
+ description: 'Font Size options for menu items: s (14px) and m (16px) - default: m.',
51
64
  options: ['s', 'm'],
52
- control: { type: 'radio' },
65
+ control: 'radio',
66
+ table: {
67
+ category: 'ifx-dropdown-menu props',
68
+ defaultValue: {
69
+ summary: 'm'
70
+ }
71
+ }
72
+ },
73
+ disabled: {
74
+ description: 'Determines if the dropdown button should be disabled.',
75
+ control: 'boolean',
76
+ table: {
77
+ category: 'ifx-dropdown props',
78
+ defaultValue: {
79
+ summary: false
80
+ }
81
+ }
53
82
  },
54
- disabled: { description: 'Determines if the dropdown button should be disabled' },
55
83
  variant: {
56
- description: 'The visual style of the dropdown button. Accepted values are "primary", "secondary", "tertiary"',
84
+ description: 'The visual style of the dropdown button. Accepted values are "primary", "secondary", "tertiary".',
57
85
  options: ['primary', 'secondary', 'tertiary'],
58
- control: { type: 'radio' },
86
+ control: 'radio',
87
+ table: {
88
+ category: 'ifx-dropdown-trigger-button props',
89
+ defaultValue: {
90
+ summary: 'primary'
91
+ }
92
+ }
59
93
  // if: { arg: 'Type', eq: 'Default' }
60
94
  },
61
95
  target: {
96
+ description: 'Determines where to open the linked document when the dropdown item is clicked.',
62
97
  options: ['_self', '_blank'],
63
- control: { type: 'radio' },
98
+ control: 'radio',
99
+ table: {
100
+ category: 'ifx-dropdown-item props',
101
+ defaultValue: {
102
+ summary: '_self'
103
+ }
104
+ }
64
105
  },
65
106
  href: {
66
- description: 'href link to menu item'
107
+ description: 'href link to menu item.',
108
+ table: {
109
+ category: 'ifx-dropdown-item props'
110
+ }
67
111
  },
68
112
  icon: {
69
- description: 'The icon to be displayed on the dropdown button',
70
- options: Object.values(icons).map(i => i['name']),
71
- control: { type: 'select' },
113
+ description: 'The icon to be displayed on the dropdown items.',
114
+ options: ['none', ...Object.values(icons).map(i => i['name'])],
115
+ control: 'select',
116
+ table: {
117
+ category: 'ifx-dropdown-item props',
118
+ defaultValue: {
119
+ summary: 'c-info-16'
120
+ }
121
+ }
72
122
  // if: { arg: 'Type', eq: 'Label Trigger' }
73
123
  },
74
- Search: {
75
- description: 'Show Search Bar'
124
+ searchField: {
125
+ description: 'Show Search Bar.',
126
+ table: {
127
+ category: 'ifx-dropdown-menu props',
128
+ defaultValue: {
129
+ summary: false
130
+ }
131
+ }
132
+ },
133
+ header: {
134
+ description: 'Add Header Text.',
135
+ table: {
136
+ category: 'ifx-dropdown-menu props',
137
+ defaultValue: {
138
+ summary: false
139
+ }
140
+ }
141
+ },
142
+ separator: {
143
+ description: 'Use separator in dropdown.',
144
+ table: {
145
+ category: 'ifx-dropdown-menu props',
146
+ defaultValue: {
147
+ summary: false
148
+ }
149
+ }
150
+ },
151
+ defaultOpen: {
152
+ description: 'Determines if the dropdown should be open by default.',
153
+ control: 'boolean',
154
+ table: {
155
+ category: 'ifx-dropdown props',
156
+ defaultValue: {
157
+ summary: false
158
+ }
159
+ }
76
160
  },
77
- Header: {
78
- description: 'Add Header Text'
161
+ noCloseOnOutsideClick: {
162
+ description: 'Determines if the dropdown should not close when a click outside the dropdown happens.',
163
+ control: 'boolean',
164
+ table: {
165
+ category: 'ifx-dropdown props',
166
+ defaultValue: {
167
+ summary: false
168
+ }
169
+ }
79
170
  },
80
- Separator: {
81
- description: 'Use seperator in dropdown'
171
+ noCloseOnMenuClick: {
172
+ description: 'Determines if the dropdown should not close when a click inside the dropdown menu happens.',
173
+ control: 'boolean',
174
+ table: {
175
+ category: 'ifx-dropdown props',
176
+ defaultValue: {
177
+ summary: false
178
+ }
179
+ }
82
180
  },
83
- DropDownMenuItemIcon: {
84
- description: 'Show menu item icon in dropdown'
181
+ noAppendToBody: {
182
+ description: 'Determines if the dropdown should not be appended to the body.',
183
+ control: 'boolean',
184
+ table: {
185
+ category: 'ifx-dropdown props',
186
+ defaultValue: {
187
+ summary: false
188
+ }
189
+ }
85
190
  },
86
- defaultOpen: { description: 'Determines if the dropdown should be open by default' },
87
- noCloseOnOutsideClick: { description: 'Determines if the dropdown should not close when a click outside the dropdown happens' },
88
- noCloseOnMenuClick: { description: 'Determines if the dropdown should not close when a click inside the dropdown menu happens' },
89
- noAppendToBody: { description: 'Determines if the dropdown should not be appended to the body' },
90
191
  ifxOpen: {
91
192
  action: 'ifxOpen',
92
- description: 'Custom event that is emitted when the dropdown opens',
193
+ description: 'Custom event that is emitted when the dropdown opens.',
93
194
  table: {
195
+ category: 'custom events',
94
196
  type: {
95
197
  summary: 'Framework integration',
96
198
  detail: 'React: onIfxOpen={handleChange}\nVue:@ifxOpen="handleChange"\nAngular:(ifxOpen)="handleChange()"\nVanillaJs:.addEventListener("ifxOpen", (event) => {//handle change});',
@@ -99,8 +201,9 @@ export default {
99
201
  },
100
202
  ifxClose: {
101
203
  action: 'ifxClose',
102
- description: 'Custom event emitted when dropdown closes',
204
+ description: 'Custom event emitted when dropdown closes.',
103
205
  table: {
206
+ category: 'custom events',
104
207
  type: {
105
208
  summary: 'Framework integration',
106
209
  detail: 'React: onIfxClose={handleChange}\nVue:@ifxClose="handleChange"\nAngular:(ifxClose)="handleChange()"\nVanillaJs:.addEventListener("ifxClose", (event) => {//handle change});',
@@ -109,8 +212,9 @@ export default {
109
212
  },
110
213
  ifxDropdownMenuItem: {
111
214
  action: 'ifxDropdownMenuItem',
112
- description: 'Custom event emitted when an item is selected',
215
+ description: 'Custom event emitted when an item is selected.',
113
216
  table: {
217
+ category: 'custom events',
114
218
  type: {
115
219
  summary: 'Framework integration',
116
220
  detail: 'React: onIfxDropdownMenuItem={handleChange}\nVue:@ifxDropdownMenuItem="handleChange"\nAngular:(ifxDropdownMenuItem)="handleChange()"\nVanillaJs:.addEventListener("ifxDropdownMenuItem", (event) => {//handle change});',
@@ -129,18 +233,18 @@ const DefaultTemplate = args => {
129
233
  no-append-to-body="${args.noAppendToBody}">
130
234
 
131
235
  <ifx-dropdown-trigger-button variant="${args.variant}">
132
- ${args.Label}
236
+ ${args.label}
133
237
  </ifx-dropdown-trigger-button>
134
238
 
135
239
  <ifx-dropdown-menu size="${args.size}">
136
- ${args.Header ? `<ifx-dropdown-header>Header Text</ifx-dropdown-header>` : ''}
137
- ${args.Search ? `<ifx-search-field show-delete-icon="false"></ifx-search-field>` : ''}
138
- <ifx-dropdown-item icon="${args.DropDownMenuItemIcon ? 'c-info-16' : ''}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
139
- <ifx-dropdown-item icon="${args.DropDownMenuItemIcon ? 'c-info-16' : ''}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
140
- <ifx-dropdown-item icon="${args.DropDownMenuItemIcon ? 'c-info-16' : ''}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
141
- <ifx-dropdown-item icon="${args.DropDownMenuItemIcon ? 'c-info-16' : ''}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
142
- ${args.Separator ? `<ifx-dropdown-separator></ifx-dropdown-separator>` : ''}
143
- <ifx-dropdown-item icon="${args.DropDownMenuItemIcon ? 'c-info-16' : ''}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
240
+ ${args.header ? `<ifx-dropdown-header>Header Text</ifx-dropdown-header>` : ''}
241
+ ${args.searchField ? `<ifx-search-field show-delete-icon="false"></ifx-search-field>` : ''}
242
+ <ifx-dropdown-item icon="${args.icon === 'none' ? '' : args.icon}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
243
+ <ifx-dropdown-item icon="${args.icon === 'none' ? '' : args.icon}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
244
+ <ifx-dropdown-item icon="${args.icon === 'none' ? '' : args.icon}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
245
+ <ifx-dropdown-item icon="${args.icon === 'none' ? '' : args.icon}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
246
+ ${args.separator ? `<ifx-dropdown-separator></ifx-dropdown-separator>` : ''}
247
+ <ifx-dropdown-item icon="${args.icon === 'none' ? '' : args.icon}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
144
248
  </ifx-dropdown-menu>
145
249
  </ifx-dropdown>`;
146
250
  const dropdown = wrapper.querySelector('ifx-dropdown');
@@ -151,13 +255,6 @@ const DefaultTemplate = args => {
151
255
  return wrapper;
152
256
  };
153
257
  export const Default = DefaultTemplate.bind({});
154
- Default.argTypes = {
155
- icon: {
156
- table: {
157
- disable: true
158
- }
159
- }
160
- };
161
258
  const LabelTriggerTemplate = args => {
162
259
  const wrapper = document.createElement('div');
163
260
  wrapper.innerHTML = `<ifx-dropdown
@@ -170,18 +267,18 @@ const LabelTriggerTemplate = args => {
170
267
  >
171
268
  Hello World! Click on the text to open the dropdown
172
269
  <ifx-dropdown-trigger>
173
- <ifx-icon icon="${args.icon}"></ifx-icon>
270
+ <ifx-icon icon="${'c-check-16'}"></ifx-icon>
174
271
  </ifx-dropdown-trigger>
175
272
  Some more text
176
273
  <ifx-dropdown-menu size="${args.size}">
177
- ${args.Header ? `<ifx-dropdown-header>Header Text</ifx-dropdown-header>` : ''}
178
- ${args.Search ? `<ifx-search-field show-delete-icon="false"></ifx-search-field>` : ''}
179
- <ifx-dropdown-item icon="${args.DropDownMenuItemIcon ? 'c-info-16' : ''}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
180
- <ifx-dropdown-item icon="${args.DropDownMenuItemIcon ? 'c-info-16' : ''}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
181
- <ifx-dropdown-item icon="${args.DropDownMenuItemIcon ? 'c-info-16' : ''}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
182
- <ifx-dropdown-item icon="${args.DropDownMenuItemIcon ? 'c-info-16' : ''}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
183
- ${args.Separator ? `<ifx-dropdown-separator></ifx-dropdown-separator>` : ''}
184
- <ifx-dropdown-item icon="${args.DropDownMenuItemIcon ? 'c-info-16' : ''}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
274
+ ${args.header ? `<ifx-dropdown-header>Header Text</ifx-dropdown-header>` : ''}
275
+ ${args.search ? `<ifx-search-field show-delete-icon="false"></ifx-search-field>` : ''}
276
+ <ifx-dropdown-item icon="${args.icon === 'none' ? '' : args.icon}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
277
+ <ifx-dropdown-item icon="${args.icon === 'none' ? '' : args.icon}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
278
+ <ifx-dropdown-item icon="${args.icon === 'none' ? '' : args.icon}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
279
+ <ifx-dropdown-item icon="${args.icon === 'none' ? '' : args.icon}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
280
+ ${args.separator ? `<ifx-dropdown-separator></ifx-dropdown-separator>` : ''}
281
+ <ifx-dropdown-item icon="${args.icon === 'none' ? '' : args.icon}" target="${args.target}" href="${args.href !== '' ? args.href : ''}">Menu Item</ifx-dropdown-item>
185
282
  </ifx-dropdown-menu>
186
283
  </ifx-dropdown>`;
187
284
  const dropdown = wrapper.querySelector('ifx-dropdown');
@@ -193,7 +290,7 @@ const LabelTriggerTemplate = args => {
193
290
  };
194
291
  export const LabelTrigger = LabelTriggerTemplate.bind({});
195
292
  LabelTrigger.argTypes = {
196
- Label: {
293
+ label: {
197
294
  table: {
198
295
  disable: true
199
296
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.stories.js","sourceRoot":"","sources":["../../../src/components/dropdown/dropdown.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,GAAG;QACT,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,OAAO;QACf,SAAS,EAAE,KAAK;QAChB,oBAAoB,EAAE,KAAK;QAC3B,WAAW,EAAE,KAAK;QAClB,qBAAqB,EAAE,KAAK;QAC5B,kBAAkB,EAAE,KAAK;QACzB,cAAc,EAAE,KAAK;QACrB,SAAS,EAAE,cAAc;KAC1B;IACD,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,MAAM;gBACN,YAAY;gBACZ,UAAU;gBACV,KAAK;gBACL,WAAW;gBACX,SAAS;gBACT,QAAQ;gBACR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OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1D,YAAY,CAAC,QAAQ,GAAG;IACtB,KAAK,EAAE;QACL,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;CACF,CAAA","sourcesContent":["import { action } from '@storybook/addon-actions';\nimport { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Dropdown',\n tags: ['autodocs'],\n args: {\n Label: 'Dropdown',\n variant: 'primary',\n disabled: false,\n icon: 'c-check-16',\n size: 'm',\n Search: false,\n Header: false,\n href: '',\n target: '_self',\n Separator: false,\n DropDownMenuItemIcon: false,\n defaultOpen: false,\n noCloseOnOutsideClick: false,\n noCloseOnMenuClick: false,\n noAppendToBody: false,\n placement: 'bottom-start',\n },\n argTypes: {\n placement: {\n options: [\n 'auto',\n 'auto-start',\n 'auto-end',\n 'top',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'right',\n 'right-start',\n 'right-end',\n 'left',\n 'left-start',\n 'left-end',\n ],\n control: { type: 'select' },\n },\n Label: { \n description: 'The visible name or label for the dropdown button',\n // if: { arg: 'Type', eq: 'Default' }\n },\n size: {\n description: 'Font Size options for menu items: s (14px) and m (16px) - default: m',\n options: ['s', 'm'],\n control: { type: 'radio' },\n },\n disabled: { description: 'Determines if the dropdown button should be disabled' },\n variant: {\n description: 'The visual style of the dropdown button. Accepted values are \"primary\", \"secondary\", \"tertiary\"',\n options: ['primary', 'secondary', 'tertiary'],\n control: { type: 'radio' },\n // if: { arg: 'Type', eq: 'Default' }\n },\n\n target: {\n options: ['_self', '_blank'],\n control: { type: 'radio' },\n },\n href: {\n description: 'href link to menu item'\n },\n icon: {\n description: 'The icon to be displayed on the dropdown button',\n options: Object.values(icons).map(i => i['name']),\n control: { type: 'select' },\n // if: { arg: 'Type', eq: 'Label Trigger' }\n },\n Search :{\n description: 'Show Search Bar'\n },\n Header: {\n description: 'Add Header Text'\n },\n Separator:{\n description: 'Use seperator in dropdown'\n },\n DropDownMenuItemIcon: {\n description: 'Show menu item icon in dropdown'\n },\n defaultOpen: { description: 'Determines if the dropdown should be open by default' },\n noCloseOnOutsideClick: { description: 'Determines if the dropdown should not close when a click outside the dropdown happens' },\n noCloseOnMenuClick: { description: 'Determines if the dropdown should not close when a click inside the dropdown menu happens' },\n noAppendToBody: { description: 'Determines if the dropdown should not be appended to the body' },\n ifxOpen: {\n action: 'ifxOpen',\n description: 'Custom event that is emitted when the dropdown opens',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxOpen={handleChange}\\nVue:@ifxOpen=\"handleChange\"\\nAngular:(ifxOpen)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxOpen\", (event) => {//handle change});',\n },\n },\n },\n ifxClose: {\n action: 'ifxClose',\n description: 'Custom event emitted when dropdown closes',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxClose={handleChange}\\nVue:@ifxClose=\"handleChange\"\\nAngular:(ifxClose)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxClose\", (event) => {//handle change});',\n },\n },\n },\n ifxDropdownMenuItem: {\n action: 'ifxDropdownMenuItem',\n description: 'Custom event emitted when an item is selected',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxDropdownMenuItem={handleChange}\\nVue:@ifxDropdownMenuItem=\"handleChange\"\\nAngular:(ifxDropdownMenuItem)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxDropdownMenuItem\", (event) => {//handle change});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = `<ifx-dropdown placement=\"${args.placement}\" \n disabled=\"${args.disabled}\" \n default-open=\"${args.defaultOpen}\"\n no-close-on-outside-click=\"${args.noCloseOnOutsideClick}\"\n no-close-on-menu-click=\"${args.noCloseOnOutsideClick}\"\n no-append-to-body=\"${args.noAppendToBody}\">\n\n <ifx-dropdown-trigger-button variant=\"${args.variant}\">\n ${args.Label}\n </ifx-dropdown-trigger-button>\n\n <ifx-dropdown-menu size=\"${args.size}\">\n ${args.Header ? `<ifx-dropdown-header>Header Text</ifx-dropdown-header>` : ''}\n ${args.Search ? `<ifx-search-field show-delete-icon=\"false\"></ifx-search-field>` : ''}\n <ifx-dropdown-item icon=\"${args.DropDownMenuItemIcon ? 'c-info-16' : ''}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.DropDownMenuItemIcon ? 'c-info-16' : ''}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.DropDownMenuItemIcon ? 'c-info-16' : ''}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.DropDownMenuItemIcon ? 'c-info-16' : ''}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n ${args.Separator ? `<ifx-dropdown-separator></ifx-dropdown-separator>` : ''}\n <ifx-dropdown-item icon=\"${args.DropDownMenuItemIcon ? 'c-info-16' : ''}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n </ifx-dropdown-menu>\n</ifx-dropdown>`;\n\n const dropdown = wrapper.querySelector('ifx-dropdown') as HTMLElement;\n const dropdownMenu = dropdown.querySelector('ifx-dropdown-menu');\n\n dropdown.addEventListener('ifxOpen', action('ifxOpen'));\n dropdown.addEventListener('ifxClose', action('ifxClose'));\n dropdownMenu.addEventListener('ifxDropdownMenuItem', action('ifxDropdownMenuItem'));\n\n return wrapper;\n};\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {\n icon: {\n table: {\n disable: true\n }\n }\n}\n\n\n\nconst LabelTriggerTemplate = args => {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = `<ifx-dropdown\n placement=\"${args.placement}\"\n default-open=\"${args.defaultOpen}\"\n no-close-on-outside-click=\"${args.noCloseOnOutsideClick}\"\n no-close-on-menu-click=\"${args.noCloseOnOutsideClick}\"\n disabled=\"${args.disabled}\"\n no-append-to-body=\"${args.noAppendToBody}\"\n >\n Hello World! Click on the text to open the dropdown\n <ifx-dropdown-trigger>\n <ifx-icon icon=\"${args.icon}\"></ifx-icon>\n </ifx-dropdown-trigger>\n Some more text\n <ifx-dropdown-menu size=\"${args.size}\">\n ${args.Header ? `<ifx-dropdown-header>Header Text</ifx-dropdown-header>` : ''}\n ${args.Search ? `<ifx-search-field show-delete-icon=\"false\"></ifx-search-field>` : ''}\n <ifx-dropdown-item icon=\"${args.DropDownMenuItemIcon ? 'c-info-16' : ''}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.DropDownMenuItemIcon ? 'c-info-16' : ''}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.DropDownMenuItemIcon ? 'c-info-16' : ''}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.DropDownMenuItemIcon ? 'c-info-16' : ''}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n ${args.Separator ? `<ifx-dropdown-separator></ifx-dropdown-separator>` : ''}\n <ifx-dropdown-item icon=\"${args.DropDownMenuItemIcon ? 'c-info-16' : ''}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n </ifx-dropdown-menu>\n</ifx-dropdown>`;\n\n const dropdown = wrapper.querySelector('ifx-dropdown') as HTMLElement;\n const dropdownMenu = dropdown.querySelector('ifx-dropdown-menu');\n\n dropdown.addEventListener('ifxOpen', action('ifxOpen'));\n dropdown.addEventListener('ifxClose', action('ifxClose'));\n dropdownMenu.addEventListener('ifxDropdownMenuItem', action('ifxDropdownMenuItem'));\n\n return wrapper;\n};\n\nexport const LabelTrigger = LabelTriggerTemplate.bind({});\nLabelTrigger.argTypes = {\n Label: {\n table: {\n disable: true\n }\n },\n variant: {\n table: {\n disable: true\n }\n }\n}\n"]}
1
+ {"version":3,"file":"dropdown.stories.js","sourceRoot":"","sources":["../../../src/components/dropdown/dropdown.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,KAAK;QAClB,qBAAqB,EAAE,KAAK;QAC5B,kBAAkB,EAAE,KAAK;QACzB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,SAAS;QAClB,SAAS,EAAE,cAAc;QACzB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,KAAK;QAClB,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,WAAW;KAClB;IACD,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,WAAW,EAAE,yEAAyE;YACtF,OAAO,EAAE;gBACP,MAAM;gBACN,YAAY;gBACZ,UAAU;gBACV,KAAK;gBACL,WAAW;gBACX,SAAS;gBACT,QAAQ;gBACR,cAAc;gBACd,YAAY;gBACZ,OAAO;gBACP,aAAa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GAAG,OAAO,CAAC,aAAa,CAAC,cAAc,CAAgB,CAAC;IACtE,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAEjE,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACxD,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1D,YAAY,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAEpF,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1D,YAAY,CAAC,QAAQ,GAAG;IACtB,KAAK,EAAE;QACL,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;CACF,CAAA","sourcesContent":["import { action } from '@storybook/addon-actions';\nimport { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Dropdown',\n tags: ['autodocs'],\n args: {\n label: 'Dropdown',\n disabled: false,\n defaultOpen: false,\n noCloseOnOutsideClick: false,\n noCloseOnMenuClick: false,\n noAppendToBody: false,\n variant: 'primary',\n placement: 'bottom-start',\n size: 'm',\n searchField: false,\n header: false,\n separator: false,\n href: '',\n target: '_self',\n icon: 'c-info-16',\n },\n argTypes: {\n placement: {\n description: 'Specifies the position of the dropdown relative to its trigger element.',\n options: [\n 'auto',\n 'auto-start',\n 'auto-end',\n 'top',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'right',\n 'right-start',\n 'right-end',\n 'left',\n 'left-start',\n 'left-end',\n ],\n control: 'select',\n table: {\n category: 'ifx-dropdown props',\n defaultValue: {\n summary: 'bottom-start'\n }\n }\n },\n label: {\n name: 'Label of Dropdown',\n description: 'The visible name or label for the dropdown button.',\n table: {\n category: 'story controls',\n defaultValue: {\n summary: 'Dropdown'\n }\n }\n // if: { arg: 'Type', eq: 'Default' }\n },\n size: {\n description: 'Font Size options for menu items: s (14px) and m (16px) - default: m.',\n options: ['s', 'm'],\n control: 'radio',\n table: {\n category: 'ifx-dropdown-menu props',\n defaultValue: {\n summary: 'm'\n }\n }\n },\n disabled: {\n description: 'Determines if the dropdown button should be disabled.',\n control: 'boolean',\n table: {\n category: 'ifx-dropdown props',\n defaultValue: {\n summary: false\n }\n }\n },\n variant: {\n description: 'The visual style of the dropdown button. Accepted values are \"primary\", \"secondary\", \"tertiary\".',\n options: ['primary', 'secondary', 'tertiary'],\n control: 'radio',\n table: {\n category: 'ifx-dropdown-trigger-button props',\n defaultValue: {\n summary: 'primary'\n }\n }\n // if: { arg: 'Type', eq: 'Default' }\n },\n\n target: {\n description: 'Determines where to open the linked document when the dropdown item is clicked.',\n options: ['_self', '_blank'],\n control: 'radio',\n table: {\n category: 'ifx-dropdown-item props',\n defaultValue: {\n summary: '_self'\n }\n }\n },\n href: {\n description: 'href link to menu item.',\n table: {\n category: 'ifx-dropdown-item props'\n }\n },\n icon: {\n description: 'The icon to be displayed on the dropdown items.',\n options: ['none', ...Object.values(icons).map(i => i['name'])],\n control: 'select',\n table: {\n category: 'ifx-dropdown-item props',\n defaultValue: {\n summary: 'c-info-16'\n }\n }\n // if: { arg: 'Type', eq: 'Label Trigger' }\n },\n searchField: {\n description: 'Show Search Bar.',\n table: {\n category: 'ifx-dropdown-menu props',\n defaultValue: {\n summary: false\n }\n }\n },\n header: {\n description: 'Add Header Text.',\n table: {\n category: 'ifx-dropdown-menu props',\n defaultValue: {\n summary: false\n }\n }\n },\n separator: {\n description: 'Use separator in dropdown.',\n table: {\n category: 'ifx-dropdown-menu props',\n defaultValue: {\n summary: false\n }\n }\n },\n defaultOpen: {\n description: 'Determines if the dropdown should be open by default.',\n control: 'boolean',\n table: {\n category: 'ifx-dropdown props',\n defaultValue: {\n summary: false\n }\n }\n },\n noCloseOnOutsideClick: {\n description: 'Determines if the dropdown should not close when a click outside the dropdown happens.',\n control: 'boolean',\n table: {\n category: 'ifx-dropdown props',\n defaultValue: {\n summary: false\n }\n }\n },\n noCloseOnMenuClick: {\n description: 'Determines if the dropdown should not close when a click inside the dropdown menu happens.',\n control: 'boolean',\n table: {\n category: 'ifx-dropdown props',\n defaultValue: {\n summary: false\n }\n }\n },\n noAppendToBody: {\n description: 'Determines if the dropdown should not be appended to the body.',\n control: 'boolean',\n table: {\n category: 'ifx-dropdown props',\n defaultValue: {\n summary: false\n }\n }\n },\n ifxOpen: {\n action: 'ifxOpen',\n description: 'Custom event that is emitted when the dropdown opens.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxOpen={handleChange}\\nVue:@ifxOpen=\"handleChange\"\\nAngular:(ifxOpen)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxOpen\", (event) => {//handle change});',\n },\n },\n },\n ifxClose: {\n action: 'ifxClose',\n description: 'Custom event emitted when dropdown closes.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxClose={handleChange}\\nVue:@ifxClose=\"handleChange\"\\nAngular:(ifxClose)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxClose\", (event) => {//handle change});',\n },\n },\n },\n ifxDropdownMenuItem: {\n action: 'ifxDropdownMenuItem',\n description: 'Custom event emitted when an item is selected.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxDropdownMenuItem={handleChange}\\nVue:@ifxDropdownMenuItem=\"handleChange\"\\nAngular:(ifxDropdownMenuItem)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxDropdownMenuItem\", (event) => {//handle change});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = `<ifx-dropdown placement=\"${args.placement}\" \n disabled=\"${args.disabled}\" \n default-open=\"${args.defaultOpen}\"\n no-close-on-outside-click=\"${args.noCloseOnOutsideClick}\"\n no-close-on-menu-click=\"${args.noCloseOnOutsideClick}\"\n no-append-to-body=\"${args.noAppendToBody}\">\n\n <ifx-dropdown-trigger-button variant=\"${args.variant}\">\n ${args.label}\n </ifx-dropdown-trigger-button>\n\n <ifx-dropdown-menu size=\"${args.size}\">\n ${args.header ? `<ifx-dropdown-header>Header Text</ifx-dropdown-header>` : ''}\n ${args.searchField ? `<ifx-search-field show-delete-icon=\"false\"></ifx-search-field>` : ''}\n <ifx-dropdown-item icon=\"${args.icon === 'none' ? '' : args.icon}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.icon === 'none' ? '' : args.icon}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.icon === 'none' ? '' : args.icon}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.icon === 'none' ? '' : args.icon}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n ${args.separator ? `<ifx-dropdown-separator></ifx-dropdown-separator>` : ''}\n <ifx-dropdown-item icon=\"${args.icon === 'none' ? '' : args.icon}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n </ifx-dropdown-menu>\n</ifx-dropdown>`;\n\n const dropdown = wrapper.querySelector('ifx-dropdown') as HTMLElement;\n const dropdownMenu = dropdown.querySelector('ifx-dropdown-menu');\n\n dropdown.addEventListener('ifxOpen', action('ifxOpen'));\n dropdown.addEventListener('ifxClose', action('ifxClose'));\n dropdownMenu.addEventListener('ifxDropdownMenuItem', action('ifxDropdownMenuItem'));\n\n return wrapper;\n};\n\nexport const Default = DefaultTemplate.bind({});\n\n\nconst LabelTriggerTemplate = args => {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = `<ifx-dropdown\n placement=\"${args.placement}\"\n default-open=\"${args.defaultOpen}\"\n no-close-on-outside-click=\"${args.noCloseOnOutsideClick}\"\n no-close-on-menu-click=\"${args.noCloseOnOutsideClick}\"\n disabled=\"${args.disabled}\"\n no-append-to-body=\"${args.noAppendToBody}\"\n >\n Hello World! Click on the text to open the dropdown\n <ifx-dropdown-trigger>\n <ifx-icon icon=\"${'c-check-16'}\"></ifx-icon>\n </ifx-dropdown-trigger>\n Some more text\n <ifx-dropdown-menu size=\"${args.size}\">\n ${args.header ? `<ifx-dropdown-header>Header Text</ifx-dropdown-header>` : ''}\n ${args.search ? `<ifx-search-field show-delete-icon=\"false\"></ifx-search-field>` : ''}\n <ifx-dropdown-item icon=\"${args.icon === 'none' ? '' : args.icon}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.icon === 'none' ? '' : args.icon}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.icon === 'none' ? '' : args.icon}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n <ifx-dropdown-item icon=\"${args.icon === 'none' ? '' : args.icon}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n ${args.separator ? `<ifx-dropdown-separator></ifx-dropdown-separator>` : ''}\n <ifx-dropdown-item icon=\"${args.icon === 'none' ? '' : args.icon}\" target=\"${args.target}\" href=\"${args.href !== '' ? args.href : ''}\">Menu Item</ifx-dropdown-item>\n </ifx-dropdown-menu>\n</ifx-dropdown>`;\n\n const dropdown = wrapper.querySelector('ifx-dropdown') as HTMLElement;\n const dropdownMenu = dropdown.querySelector('ifx-dropdown-menu');\n\n dropdown.addEventListener('ifxOpen', action('ifxOpen'));\n dropdown.addEventListener('ifxClose', action('ifxClose'));\n dropdownMenu.addEventListener('ifxDropdownMenuItem', action('ifxDropdownMenuItem'));\n\n return wrapper;\n};\n\nexport const LabelTrigger = LabelTriggerTemplate.bind({});\nLabelTrigger.argTypes = {\n label: {\n table: {\n disable: true\n }\n },\n variant: {\n table: {\n disable: true\n }\n }\n}\n"]}
@@ -5,7 +5,13 @@ export default {
5
5
  copyrightText: '© 1999 - 2024 Infineon Technologies AG',
6
6
  },
7
7
  argTypes: {
8
- copyrightText: { control: 'text' },
8
+ copyrightText: {
9
+ description: 'Sets the text for the copyright.',
10
+ control: 'text',
11
+ table: {
12
+ category: 'ifx-footer props',
13
+ }
14
+ },
9
15
  },
10
16
  };
11
17
  const DefaultTemplate = args => {
@@ -1 +1 @@
1
- {"version":3,"file":"footer.stories.js","sourceRoot":"","sources":["../../../src/components/footer/footer.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,aAAa,EAAE,wCAAwC;KACxD;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;KACnC;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE;IAC7B,OAAO;kCACyB,IAAI,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA2BpC,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE/C,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC;;;;;;;gBAOZ,CAAC;AAEjB,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE5C,MAAM,aAAa,GAAG,GAAG,EAAE,CACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuDY,CAAC;AAEf,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["export default {\n title: 'Components/Footer',\n tags: ['autodocs'],\n args: {\n copyrightText: '© 1999 - 2024 Infineon Technologies AG',\n },\n argTypes: {\n copyrightText: { control: 'text' },\n },\n};\n\nconst DefaultTemplate = args => {\n return `\n <ifx-footer copyright-text=\"${args.copyrightText}\">\n <div slot=\"socials\">\n <ifx-link variant=\"title\" href=\"http://facebook.com/infineon\">\n <ifx-icon icon=\"facebook\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://youtube.com/infineon\">\n <ifx-icon icon=\"youtube\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://instagram.com/infineon\">\n <ifx-icon icon=\"instagram\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://linkedin.com/infineon\">\n <ifx-icon icon=\"linkedin\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://twitter.com/infineon\">\n <ifx-icon icon=\"twitter\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://xing.com/infineon\">\n <ifx-icon icon=\"xing\"></ifx-icon>\n </ifx-link>\n </div>\n <div slot=\"info\">\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/terms\" target=\"_blank\">Terms</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/imprint\" target=\"_blank\">Imprint</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/privacy-policy\" target=\"_blank\">Privacy policy</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/glossary\" target=\"_blank\">Glossary</ifx-link>\n </div>\n </ifx-footer>`;\n};\n\nexport const Medium = DefaultTemplate.bind({});\n\nconst SmallTemplate = () => `<ifx-footer>\n <div slot=\"info\">\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/terms\" target=\"_blank\">Terms</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/imprint\" target=\"_blank\">Imprint</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/privacy-policy\" target=\"_blank\">Privacy policy</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/glossary\" target=\"_blank\">Glossary</ifx-link>\n </div>\n </ifx-footer>`;\n\nexport const Small = SmallTemplate.bind({});\n\nconst LargeTemplate = () =>\n `<ifx-footer>\n <ifx-footer-column slot=\"col\">\n <h5 slot=\"title\">Title</h5>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n </ifx-footer-column>\n <ifx-footer-column slot=\"col\">\n <h5 slot=\"title\">Title</h5>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n </ifx-footer-column>\n <ifx-footer-column slot=\"col\">\n <h5 slot=\"title\">Title</h5>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n </ifx-footer-column>\n <ifx-footer-column slot=\"col\">\n <h5 slot=\"title\">Title</h5>\n <ifx-link variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n </ifx-footer-column>\n <div slot=\"socials\">\n <ifx-link variant=\"title\" href=\"http://facebook.com/infineon\">\n <ifx-icon icon=\"facebook\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://youtube.com/infineon\">\n <ifx-icon icon=\"youtube\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://instagram.com/infineon\">\n <ifx-icon icon=\"instagram\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://linkedin.com/infineon\">\n <ifx-icon icon=\"linkedin\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://twitter.com/infineon\">\n <ifx-icon icon=\"twitter\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://xing.com/infineon\">\n <ifx-icon icon=\"xing\"></ifx-icon>\n </ifx-link>\n </div>\n <div slot=\"info\">\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/terms\" target=\"_blank\">Terms</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/imprint\" target=\"_blank\">Imprint</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/privacy-policy\" target=\"_blank\">Privacy policy</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/glossary\" target=\"_blank\">Glossary</ifx-link>\n </div>\n</ifx-footer>`;\n\nexport const Large = LargeTemplate.bind({});\n"]}
1
+ {"version":3,"file":"footer.stories.js","sourceRoot":"","sources":["../../../src/components/footer/footer.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,aAAa,EAAE,wCAAwC;KACxD;IACD,QAAQ,EAAE;QACR,aAAa,EAAE;YACb,WAAW,EAAE,kCAAkC;YAC/C,OAAO,EAAE,MAAM;YACf,KAAK,EAAE;gBACL,QAAQ,EAAE,kBAAkB;aAC7B;SACF;KAEF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE;IAC7B,OAAO;kCACyB,IAAI,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA2BpC,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE/C,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC;;;;;;;gBAOZ,CAAC;AAEjB,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE5C,MAAM,aAAa,GAAG,GAAG,EAAE,CACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuDY,CAAC;AAEf,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["export default {\n title: 'Components/Footer',\n tags: ['autodocs'],\n args: {\n copyrightText: '© 1999 - 2024 Infineon Technologies AG',\n },\n argTypes: {\n copyrightText: {\n description: 'Sets the text for the copyright.',\n control: 'text',\n table: {\n category: 'ifx-footer props',\n }\n },\n\n },\n};\n\nconst DefaultTemplate = args => {\n return `\n <ifx-footer copyright-text=\"${args.copyrightText}\">\n <div slot=\"socials\">\n <ifx-link variant=\"title\" href=\"http://facebook.com/infineon\">\n <ifx-icon icon=\"facebook\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://youtube.com/infineon\">\n <ifx-icon icon=\"youtube\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://instagram.com/infineon\">\n <ifx-icon icon=\"instagram\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://linkedin.com/infineon\">\n <ifx-icon icon=\"linkedin\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://twitter.com/infineon\">\n <ifx-icon icon=\"twitter\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://xing.com/infineon\">\n <ifx-icon icon=\"xing\"></ifx-icon>\n </ifx-link>\n </div>\n <div slot=\"info\">\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/terms\" target=\"_blank\">Terms</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/imprint\" target=\"_blank\">Imprint</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/privacy-policy\" target=\"_blank\">Privacy policy</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/glossary\" target=\"_blank\">Glossary</ifx-link>\n </div>\n </ifx-footer>`;\n};\n\nexport const Medium = DefaultTemplate.bind({});\n\nconst SmallTemplate = () => `<ifx-footer>\n <div slot=\"info\">\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/terms\" target=\"_blank\">Terms</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/imprint\" target=\"_blank\">Imprint</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/privacy-policy\" target=\"_blank\">Privacy policy</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/glossary\" target=\"_blank\">Glossary</ifx-link>\n </div>\n </ifx-footer>`;\n\nexport const Small = SmallTemplate.bind({});\n\nconst LargeTemplate = () =>\n `<ifx-footer>\n <ifx-footer-column slot=\"col\">\n <h5 slot=\"title\">Title</h5>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n </ifx-footer-column>\n <ifx-footer-column slot=\"col\">\n <h5 slot=\"title\">Title</h5>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n </ifx-footer-column>\n <ifx-footer-column slot=\"col\">\n <h5 slot=\"title\">Title</h5>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link href=\"#\" variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n </ifx-footer-column>\n <ifx-footer-column slot=\"col\">\n <h5 slot=\"title\">Title</h5>\n <ifx-link variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n <ifx-link variant=\"underlined\" slot=\"link\">Footer Link</ifx-link>\n </ifx-footer-column>\n <div slot=\"socials\">\n <ifx-link variant=\"title\" href=\"http://facebook.com/infineon\">\n <ifx-icon icon=\"facebook\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://youtube.com/infineon\">\n <ifx-icon icon=\"youtube\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://instagram.com/infineon\">\n <ifx-icon icon=\"instagram\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://linkedin.com/infineon\">\n <ifx-icon icon=\"linkedin\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://twitter.com/infineon\">\n <ifx-icon icon=\"twitter\"></ifx-icon>\n </ifx-link>\n <ifx-link variant=\"title\" href=\"http://xing.com/infineon\">\n <ifx-icon icon=\"xing\"></ifx-icon>\n </ifx-link>\n </div>\n <div slot=\"info\">\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/terms\" target=\"_blank\">Terms</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/imprint\" target=\"_blank\">Imprint</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/privacy-policy\" target=\"_blank\">Privacy policy</ifx-link>\n <ifx-link variant=\"menu\" href=\"https://yourwebsite.com/glossary\" target=\"_blank\">Glossary</ifx-link>\n </div>\n</ifx-footer>`;\n\nexport const Large = LargeTemplate.bind({});\n"]}
@@ -8,16 +8,21 @@ export default {
8
8
  },
9
9
  argTypes: {
10
10
  icon: {
11
+ description: 'Set the icon.',
11
12
  options: Object.values(icons).map(i => i['name']),
12
13
  control: { type: 'select' },
14
+ table: {
15
+ category: 'ifx-icon props',
16
+ }
13
17
  },
14
18
  consoleError: {
15
19
  action: 'consoleError',
16
- description: 'Custom event emitted when icon is invalid',
20
+ description: 'Custom event emitted when icon is invalid.',
17
21
  table: {
22
+ category: 'custom events',
18
23
  type: {
19
24
  summary: 'Framework integration',
20
- detail: 'React: onConsoleError={handleChange}\nVue:@consoleError="handleChange"\nAngular:(consoleError)="handleChange()"\nVanillaJs:.addEventListener("consoleError", (event) => {//handle change});',
25
+ detail: 'React: onConsoleError={handleError}\nVue:@consoleError="handleError"\nAngular:(consoleError)="handleError()"\nVanillaJs:.addEventListener("consoleError", (event) => {//handle error});',
21
26
  },
22
27
  },
23
28
  },