@infineon/infineon-design-system-stencil 30.9.2--canary.1640.55f6082d40b32de317977a352b37983c1f14902c.0 → 30.9.2--canary.1640.c975b901d4687359a30b31a7f68f83e3017eabd6.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 (137) hide show
  1. package/dist/cjs/ifx-accordion_2.cjs.entry.js +6 -6
  2. package/dist/cjs/ifx-accordion_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js +2 -2
  4. package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ifx-breadcrumb.cjs.entry.js +3 -3
  6. package/dist/cjs/ifx-breadcrumb.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ifx-chip_3.cjs.entry.js +18 -18
  8. package/dist/cjs/ifx-chip_3.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ifx-table.cjs.entry.js +2 -2
  10. package/dist/cjs/ifx-table.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.js +2 -2
  14. package/dist/collection/components/accordion/accordion.js.map +1 -1
  15. package/dist/collection/components/accordion/accordion.stories.js +18 -18
  16. package/dist/collection/components/accordion/accordion.stories.js.map +1 -1
  17. package/dist/collection/components/accordion/accordionItem.js +7 -7
  18. package/dist/collection/components/accordion/accordionItem.js.map +1 -1
  19. package/dist/collection/components/breadcrumb/breadcrumb-item-label.js +4 -4
  20. package/dist/collection/components/breadcrumb/breadcrumb-item-label.js.map +1 -1
  21. package/dist/collection/components/breadcrumb/breadcrumb.js +3 -3
  22. package/dist/collection/components/breadcrumb/breadcrumb.js.map +1 -1
  23. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +29 -14
  24. package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
  25. package/dist/collection/components/button/button.stories.js +1 -4
  26. package/dist/collection/components/button/button.stories.js.map +1 -1
  27. package/dist/collection/components/card/card.stories.js +9 -11
  28. package/dist/collection/components/card/card.stories.js.map +1 -1
  29. package/dist/collection/components/checkbox/checkbox.stories.js +1 -4
  30. package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -1
  31. package/dist/collection/components/chip/chip-item/chip-item.js +4 -4
  32. package/dist/collection/components/chip/chip-item/chip-item.js.map +1 -1
  33. package/dist/collection/components/chip/chip.js +15 -15
  34. package/dist/collection/components/chip/chip.js.map +1 -1
  35. package/dist/collection/components/chip/chip.stories.js +18 -26
  36. package/dist/collection/components/chip/chip.stories.js.map +1 -1
  37. package/dist/collection/components/chip/interfaces.js.map +1 -1
  38. package/dist/collection/components/content-switcher/content-switcher.stories.js +2 -2
  39. package/dist/collection/components/content-switcher/content-switcher.stories.js.map +1 -1
  40. package/dist/collection/components/date-picker/date-picker.stories.js +22 -1
  41. package/dist/collection/components/date-picker/date-picker.stories.js.map +1 -1
  42. package/dist/collection/components/dropdown/dropdown.stories.js +100 -39
  43. package/dist/collection/components/dropdown/dropdown.stories.js.map +1 -1
  44. package/dist/collection/components/link/link.stories.js +1 -4
  45. package/dist/collection/components/link/link.stories.js.map +1 -1
  46. package/dist/collection/components/navigation/navbar/navbar.stories.js +5 -32
  47. package/dist/collection/components/navigation/navbar/navbar.stories.js.map +1 -1
  48. package/dist/collection/components/notification/notification.stories.js +1 -1
  49. package/dist/collection/components/notification/notification.stories.js.map +1 -1
  50. package/dist/collection/components/number-indicator/number-indicator.stories.js +1 -1
  51. package/dist/collection/components/number-indicator/number-indicator.stories.js.map +1 -1
  52. package/dist/collection/components/radio-button/radio-button.stories.js +1 -1
  53. package/dist/collection/components/radio-button/radio-button.stories.js.map +1 -1
  54. package/dist/collection/components/segmented-control/segmented-control.stories.js +0 -3
  55. package/dist/collection/components/segmented-control/segmented-control.stories.js.map +1 -1
  56. package/dist/collection/components/status/status.stories.js +1 -1
  57. package/dist/collection/components/status/status.stories.js.map +1 -1
  58. package/dist/collection/components/switch/switch.stories.js +2 -5
  59. package/dist/collection/components/switch/switch.stories.js.map +1 -1
  60. package/dist/collection/components/table-advanced-version/table.js +3 -3
  61. package/dist/collection/components/table-advanced-version/table.js.map +1 -1
  62. package/dist/collection/components/tag/tag.stories.js +2 -2
  63. package/dist/collection/components/tag/tag.stories.js.map +1 -1
  64. package/dist/collection/components/text-field/text-field.stories.js +1 -1
  65. package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
  66. package/dist/components/ifx-accordion-item.js +1 -1
  67. package/dist/components/ifx-accordion.js +1 -1
  68. package/dist/components/ifx-breadcrumb-item-label.js +3 -3
  69. package/dist/components/ifx-breadcrumb-item-label.js.map +1 -1
  70. package/dist/components/ifx-breadcrumb.js +3 -3
  71. package/dist/components/ifx-breadcrumb.js.map +1 -1
  72. package/dist/components/ifx-chip-item.js +1 -1
  73. package/dist/components/ifx-chip.js +1 -1
  74. package/dist/components/ifx-faq.js +2 -2
  75. package/dist/components/ifx-table.js +5 -5
  76. package/dist/components/ifx-table.js.map +1 -1
  77. package/dist/components/{p-62c6aeb2.js → p-053d42ef.js} +6 -6
  78. package/dist/components/{p-62c6aeb2.js.map → p-053d42ef.js.map} +1 -1
  79. package/dist/components/{p-094bb435.js → p-3baaa460.js} +3 -3
  80. package/dist/components/{p-094bb435.js.map → p-3baaa460.js.map} +1 -1
  81. package/dist/components/{p-184f1004.js → p-793d89e7.js} +15 -15
  82. package/dist/components/p-793d89e7.js.map +1 -0
  83. package/dist/components/{p-23cdd5a7.js → p-7b5e297f.js} +5 -5
  84. package/dist/components/p-7b5e297f.js.map +1 -0
  85. package/dist/esm/ifx-accordion_2.entry.js +6 -6
  86. package/dist/esm/ifx-accordion_2.entry.js.map +1 -1
  87. package/dist/esm/ifx-breadcrumb-item-label.entry.js +2 -2
  88. package/dist/esm/ifx-breadcrumb-item-label.entry.js.map +1 -1
  89. package/dist/esm/ifx-breadcrumb.entry.js +3 -3
  90. package/dist/esm/ifx-breadcrumb.entry.js.map +1 -1
  91. package/dist/esm/ifx-chip_3.entry.js +18 -18
  92. package/dist/esm/ifx-chip_3.entry.js.map +1 -1
  93. package/dist/esm/ifx-table.entry.js +2 -2
  94. package/dist/esm/ifx-table.entry.js.map +1 -1
  95. package/dist/esm/infineon-design-system-stencil.js +1 -1
  96. package/dist/esm/loader.js +1 -1
  97. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  98. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  99. package/dist/infineon-design-system-stencil/{p-00d6e46e.entry.js → p-26810237.entry.js} +2 -2
  100. package/dist/infineon-design-system-stencil/p-26810237.entry.js.map +1 -0
  101. package/dist/infineon-design-system-stencil/p-26df4dfe.entry.js +2 -0
  102. package/dist/infineon-design-system-stencil/{p-28fb795b.entry.js.map → p-26df4dfe.entry.js.map} +1 -1
  103. package/dist/infineon-design-system-stencil/p-355cea09.entry.js +2 -0
  104. package/dist/infineon-design-system-stencil/p-355cea09.entry.js.map +1 -0
  105. package/dist/infineon-design-system-stencil/p-9f6c1499.entry.js +2 -0
  106. package/dist/infineon-design-system-stencil/p-9f6c1499.entry.js.map +1 -0
  107. package/dist/infineon-design-system-stencil/p-df6cadc1.entry.js +2 -0
  108. package/dist/infineon-design-system-stencil/p-df6cadc1.entry.js.map +1 -0
  109. package/dist/types/components/accordion/accordion.stories.d.ts +2 -2
  110. package/dist/types/components/accordion/accordionItem.d.ts +2 -2
  111. package/dist/types/components/breadcrumb/breadcrumb-item-label.d.ts +1 -1
  112. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +19 -2
  113. package/dist/types/components/button/button.stories.d.ts +0 -3
  114. package/dist/types/components/card/card.stories.d.ts +10 -10
  115. package/dist/types/components/checkbox/checkbox.stories.d.ts +0 -3
  116. package/dist/types/components/chip/chip-item/chip-item.d.ts +1 -1
  117. package/dist/types/components/chip/chip.d.ts +1 -1
  118. package/dist/types/components/chip/chip.stories.d.ts +11 -4
  119. package/dist/types/components/chip/interfaces.d.ts +1 -1
  120. package/dist/types/components/date-picker/date-picker.stories.d.ts +21 -0
  121. package/dist/types/components/dropdown/dropdown.stories.d.ts +3 -30
  122. package/dist/types/components/link/link.stories.d.ts +0 -3
  123. package/dist/types/components/navigation/navbar/navbar.stories.d.ts +1 -22
  124. package/dist/types/components/segmented-control/segmented-control.stories.d.ts +0 -3
  125. package/dist/types/components/switch/switch.stories.d.ts +0 -3
  126. package/dist/types/components.d.ts +8 -8
  127. package/package.json +1 -1
  128. package/dist/components/p-184f1004.js.map +0 -1
  129. package/dist/components/p-23cdd5a7.js.map +0 -1
  130. package/dist/infineon-design-system-stencil/p-00d6e46e.entry.js.map +0 -1
  131. package/dist/infineon-design-system-stencil/p-28fb795b.entry.js +0 -2
  132. package/dist/infineon-design-system-stencil/p-72d804fb.entry.js +0 -2
  133. package/dist/infineon-design-system-stencil/p-72d804fb.entry.js.map +0 -1
  134. package/dist/infineon-design-system-stencil/p-7bef9272.entry.js +0 -2
  135. package/dist/infineon-design-system-stencil/p-7bef9272.entry.js.map +0 -1
  136. package/dist/infineon-design-system-stencil/p-dac5d6d5.entry.js +0 -2
  137. package/dist/infineon-design-system-stencil/p-dac5d6d5.entry.js.map +0 -1
@@ -57,31 +57,31 @@ export default {
57
57
  }
58
58
  }
59
59
  },
60
- ifxItemOpen: {
61
- action: 'ifxItemOpen',
60
+ ifxOpen: {
61
+ action: 'ifxOpen',
62
62
  description: 'Event emitted when an accordion item is opened.',
63
63
  table: {
64
64
  category: 'custom events',
65
65
  type: {
66
66
  summary: 'Framework integration',
67
- detail: `React: onIfxItemOpen={handleOpen}
68
- Vue: @ifxItemOpen="handleOpen"
69
- Angular: (ifxItemOpen)="handleOpen()"
70
- VanillaJs: .addEventListener("ifxItemOpen", (event) => {/*handle open*/});`
67
+ detail: `React: onIfxOpen={handleOpen}
68
+ Vue: @ifxOpen="handleOpen"
69
+ Angular: (ifxOpen)="handleOpen()"
70
+ VanillaJs: .addEventListener("ifxOpen", (event) => {/*handle open*/});`
71
71
  }
72
72
  },
73
73
  },
74
- ifxItemClose: {
75
- action: 'ifxItemClose',
74
+ ifxClose: {
75
+ action: 'ifxClose',
76
76
  description: 'Event emitted when an accordion item is closed.',
77
77
  table: {
78
78
  category: 'custom events',
79
79
  type: {
80
80
  summary: 'Framework integration',
81
- detail: `React: onIfxItemClose={handleClose}
82
- Vue: @ifxItemClose="handleClose"
83
- Angular: (ifxItemClose)="handleClose()"
84
- VanillaJs: .addEventListener("ifxItemClose", (event) => {/*handle close*/});`
81
+ detail: `React: onIfxClose={handleClose}
82
+ Vue: @ifxClose="handleClose"
83
+ Angular: (ifxClose)="handleClose()"
84
+ VanillaJs: .addEventListener("ifxClose", (event) => {/*handle close*/});`
85
85
  }
86
86
  },
87
87
  }
@@ -94,16 +94,16 @@ const Template = args => {
94
94
  initialItem.setAttribute('open', `true`);
95
95
  initialItem.setAttribute('aria-level', args.AriaLevel);
96
96
  initialItem.setAttribute('mutable', args.mutable);
97
- initialItem.addEventListener('ifxItemOpen', action('ifxItemOpen'));
98
- initialItem.addEventListener('ifxItemClose', action('ifxItemClose'));
97
+ initialItem.addEventListener('ifxOpen', action('ifxOpen'));
98
+ initialItem.addEventListener('ifxClose', action('ifxClose'));
99
99
  initialItem.innerHTML = `
100
100
  Content for Initial Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.
101
101
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.
102
102
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.
103
103
  `;
104
104
  initialItem.setAttribute('caption', `Label`);
105
- initialItem.addEventListener('ifxItemOpen', action('ifxItemOpen'));
106
- initialItem.addEventListener('ifxItemClose', action('ifxItemClose'));
105
+ initialItem.addEventListener('ifxOpen', action('ifxOpen'));
106
+ initialItem.addEventListener('ifxClose', action('ifxClose'));
107
107
  accordionElement.append(initialItem);
108
108
  accordionElement.setAttribute('auto-collapse', args.autoCollapse);
109
109
  for (let i = 1; i < args.amountOfItems; i++) {
@@ -117,8 +117,8 @@ const Template = args => {
117
117
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.
118
118
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.
119
119
  `;
120
- item.addEventListener('ifxItemOpen', action('ifxItemOpen'));
121
- item.addEventListener('ifxItemClose', action('ifxItemClose'));
120
+ item.addEventListener('ifxOpen', action('ifxOpen'));
121
+ item.addEventListener('ifxClose', action('ifxClose'));
122
122
  accordionElement.append(item);
123
123
  }
124
124
  return accordionElement;
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.stories.js","sourceRoot":"","sources":["../../../src/components/accordion/accordion.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,eAAe;IAC1B,qBAAqB;IAErB,IAAI,EAAE;QACJ,aAAa,EAAE,CAAC;QAChB,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,KAAK;KACpB;IAED,QAAQ,EAAE;QACR,aAAa,EAAE;YACb,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,+CAA+C;YAC5D,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;gBAC1B,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;QACD,SAAS,EAAE;YACT,OAAO,EAAE,Q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AC,SAAS,CAAC,CAAC;QAChD,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAE3C,IAAI,CAAC,SAAS,GAAG;4BAEX,CAAC,GAAG,CACN;;;KAGH,CAAC;QACF,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;QAE9D,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACb,aAAa,EAAE,CAAC;IAChB,OAAO,EAAE,IAAI;CACd,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Accordion',\n component: 'ifx-accordion',\n //tags: ['autodocs'],\n\n args: {\n amountOfItems: 3,\n AriaLevel: 3,\n autoCollapse: false,\n },\n\n argTypes: {\n amountOfItems: { \n control: 'number', \n name: 'Amount of Items',\n description: 'Control the number of *<ifx-accordion-item>*.',\n table: {\n category: 'story controls',\n type: {\n summary: 'number'\n }\n }\n },\n AriaLevel: {\n control: 'number', \n min: 1, \n max: 6, \n description: 'The aria-level attribute for the accordion item header.',\n table: {\n defaultValue: {summary: '3'},\n category: 'ifx-accordion-item props',\n type: {\n summary: 'number'\n }\n } \n }, \n mutable: {\n control: 'boolean',\n description: 'Set the mutable attribute.',\n table: {\n category: 'ifx-accordion-item props',\n defaultValue: {summary: 'true'},\n type: {\n summary: 'boolean'\n }\n }\n },\n autoCollapse: {\n control: 'boolean',\n description: 'Collapse the other items when one item is opened.',\n table: {\n category: 'ifx-accordion props',\n defaultValue: { \n summary: 'false' \n },\n type: {\n summary: 'boolean'\n }\n }\n },\n ifxItemOpen: { \n action: 'ifxItemOpen',\n description: 'Event emitted when an accordion item is opened.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:`React: onIfxItemOpen={handleOpen}\n Vue: @ifxItemOpen=\"handleOpen\"\n Angular: (ifxItemOpen)=\"handleOpen()\"\n VanillaJs: .addEventListener(\"ifxItemOpen\", (event) => {/*handle open*/});`\n }\n },\n },\n ifxItemClose: { \n action: 'ifxItemClose',\n description: 'Event emitted when an accordion item is closed.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: \n `React: onIfxItemClose={handleClose}\n Vue: @ifxItemClose=\"handleClose\"\n Angular: (ifxItemClose)=\"handleClose()\"\n VanillaJs: .addEventListener(\"ifxItemClose\", (event) => {/*handle close*/});`\n }\n },\n }\n },\n};\n\nconst Template = args => {\n const accordionElement = document.createElement('ifx-accordion');\n const initialItem = document.createElement('ifx-accordion-item');\n initialItem.setAttribute('caption', `Label`);\n initialItem.setAttribute('open', `true`);\n initialItem.setAttribute('aria-level', args.AriaLevel);\n initialItem.setAttribute('mutable', args.mutable);\n initialItem.addEventListener('ifxItemOpen', action('ifxItemOpen'));\n initialItem.addEventListener('ifxItemClose', action('ifxItemClose'));\n\n initialItem.innerHTML = `\n Content for Initial Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n`;\ninitialItem.setAttribute('caption', `Label`);\n initialItem.addEventListener('ifxItemOpen', action('ifxItemOpen'));\n initialItem.addEventListener('ifxItemClose', action('ifxItemClose'));\n\n accordionElement.append(initialItem);\n\n accordionElement.setAttribute('auto-collapse', args.autoCollapse);\n for (let i = 1; i < args.amountOfItems; i++) {\n const item = document.createElement('ifx-accordion-item');\n item.setAttribute('caption', `Label`);\n item.setAttribute('open', `false`);\n item.setAttribute('aria-level', args.AriaLevel);\n item.setAttribute('mutable', args.mutable);\n\n item.innerHTML = `\n Content for Item #${\n i + 1\n }. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n `;\n item.addEventListener('ifxItemOpen', action('ifxItemOpen'));\n item.addEventListener('ifxItemClose', action('ifxItemClose'));\n\n accordionElement.append(item);\n }\n\n return accordionElement;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n amountOfItems: 3,\n mutable: true,\n};\n"]}
1
+ {"version":3,"file":"accordion.stories.js","sourceRoot":"","sources":["../../../src/components/accordion/accordion.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,eAAe;IAC1B,qBAAqB;IAErB,IAAI,EAAE;QACJ,aAAa,EAAE,CAAC;QAChB,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,KAAK;KACpB;IAED,QAAQ,EAAE;QACR,aAAa,EAAE;YACb,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,+CAA+C;YAC5D,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;gBAC1B,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;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AAI,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAChD,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAE3C,IAAI,CAAC,SAAS,GAAG;4BAEX,CAAC,GAAG,CACN;;;KAGH,CAAC;QACF,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QACpD,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;QAEtD,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACb,aAAa,EAAE,CAAC;IAChB,OAAO,EAAE,IAAI;CACd,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Accordion',\n component: 'ifx-accordion',\n //tags: ['autodocs'],\n\n args: {\n amountOfItems: 3,\n AriaLevel: 3,\n autoCollapse: false,\n },\n\n argTypes: {\n amountOfItems: { \n control: 'number', \n name: 'Amount of Items',\n description: 'Control the number of *<ifx-accordion-item>*.',\n table: {\n category: 'story controls',\n type: {\n summary: 'number'\n }\n }\n },\n AriaLevel: {\n control: 'number', \n min: 1, \n max: 6, \n description: 'The aria-level attribute for the accordion item header.',\n table: {\n defaultValue: {summary: '3'},\n category: 'ifx-accordion-item props',\n type: {\n summary: 'number'\n }\n } \n }, \n mutable: {\n control: 'boolean',\n description: 'Set the mutable attribute.',\n table: {\n category: 'ifx-accordion-item props',\n defaultValue: {summary: 'true'},\n type: {\n summary: 'boolean'\n }\n }\n },\n autoCollapse: {\n control: 'boolean',\n description: 'Collapse the other items when one item is opened.',\n table: {\n category: 'ifx-accordion props',\n defaultValue: { \n summary: 'false' \n },\n type: {\n summary: 'boolean'\n }\n }\n },\n ifxOpen: { \n action: 'ifxOpen',\n description: 'Event emitted when an accordion item is opened.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:`React: onIfxOpen={handleOpen}\n Vue: @ifxOpen=\"handleOpen\"\n Angular: (ifxOpen)=\"handleOpen()\"\n VanillaJs: .addEventListener(\"ifxOpen\", (event) => {/*handle open*/});`\n }\n },\n },\n ifxClose: { \n action: 'ifxClose',\n description: 'Event emitted when an accordion item is closed.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: \n `React: onIfxClose={handleClose}\n Vue: @ifxClose=\"handleClose\"\n Angular: (ifxClose)=\"handleClose()\"\n VanillaJs: .addEventListener(\"ifxClose\", (event) => {/*handle close*/});`\n }\n },\n }\n },\n};\n\nconst Template = args => {\n const accordionElement = document.createElement('ifx-accordion');\n const initialItem = document.createElement('ifx-accordion-item');\n initialItem.setAttribute('caption', `Label`);\n initialItem.setAttribute('open', `true`);\n initialItem.setAttribute('aria-level', args.AriaLevel);\n initialItem.setAttribute('mutable', args.mutable);\n initialItem.addEventListener('ifxOpen', action('ifxOpen'));\n initialItem.addEventListener('ifxClose', action('ifxClose'));\n\n initialItem.innerHTML = `\n Content for Initial Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n`;\ninitialItem.setAttribute('caption', `Label`);\n initialItem.addEventListener('ifxOpen', action('ifxOpen'));\n initialItem.addEventListener('ifxClose', action('ifxClose'));\n\n accordionElement.append(initialItem);\n\n accordionElement.setAttribute('auto-collapse', args.autoCollapse);\n for (let i = 1; i < args.amountOfItems; i++) {\n const item = document.createElement('ifx-accordion-item');\n item.setAttribute('caption', `Label`);\n item.setAttribute('open', `false`);\n item.setAttribute('aria-level', args.AriaLevel);\n item.setAttribute('mutable', args.mutable);\n\n item.innerHTML = `\n Content for Item #${\n i + 1\n }. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.\n `;\n item.addEventListener('ifxOpen', action('ifxOpen'));\n item.addEventListener('ifxClose', action('ifxClose'));\n\n accordionElement.append(item);\n }\n\n return accordionElement;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n amountOfItems: 3,\n mutable: true,\n};\n"]}
@@ -23,10 +23,10 @@ export class IfxAccordionItem {
23
23
  this.internalOpen = !this.internalOpen;
24
24
  this.open = this.internalOpen;
25
25
  if (this.internalOpen) {
26
- this.ifxItemOpen.emit({ isOpen: this.internalOpen });
26
+ this.ifxOpen.emit({ isOpen: this.internalOpen });
27
27
  }
28
28
  else {
29
- this.ifxItemClose.emit({ isClosed: !this.internalOpen });
29
+ this.ifxClose.emit({ isClosed: !this.internalOpen });
30
30
  }
31
31
  }
32
32
  openAccordionItem() {
@@ -68,7 +68,7 @@ export class IfxAccordionItem {
68
68
  }
69
69
  }
70
70
  render() {
71
- return (h("div", { key: '81ca5bfa7f1766eb5b2657b4e2df0019cde776aa', class: `accordion-item ${this.internalOpen ? 'open' : ''}` }, h("div", { key: '0b4daafa22e601cbf1ad1efbe79665c19b751fde', role: "button", "aria-expanded": this.internalOpen, "aria-controls": "accordion-content", class: "accordion-title", onClick: () => this.toggleOpen(), tabindex: '0' }, h("span", { key: 'e48ea5054c730b317df221a3f191d13186af1932', "aria-hidden": "true", role: "heading", "aria-level": String(this.AriaLevel), class: "accordion-icon" }, h("ifx-icon", { key: 'e9581b95bb5a60319c1537c3de6525030d56bf2c', icon: "chevron-down-12" })), h("span", { key: '28862a5c2e3c801b6be02d38c20bd91dce003cbf', id: "accordion-caption", class: "accordion-caption" }, this.caption)), h("div", { key: 'bfe16bfca9899e00e3356bf723caeec83e256486', id: "accordion-content", class: "accordion-content", ref: (el) => (this.contentEl = el), role: "region", "aria-labelledby": "accordion-caption" }, h("div", { key: '1da3e12ea0120b6450f3f88c3a81e40b9c0c2cd5', class: "inner-content" }, h("slot", { key: '229dec050d2cf0fdd1f78b03dc37e831869c624d', onSlotchange: (e) => this.handleSlotChange(e) })))));
71
+ return (h("div", { key: '90b42fe0fdc59bcb707cdbd345d457a651cadd34', class: `accordion-item ${this.internalOpen ? 'open' : ''}` }, h("div", { key: '691f906ddcf27924b85cb06a7cd1d469bed4b57d', role: "button", "aria-expanded": this.internalOpen, "aria-controls": "accordion-content", class: "accordion-title", onClick: () => this.toggleOpen(), tabindex: '0' }, h("span", { key: '5a83c087659f68747176e3bc26d6653b4db9dcaf', "aria-hidden": "true", role: "heading", "aria-level": String(this.AriaLevel), class: "accordion-icon" }, h("ifx-icon", { key: '050e89939de98c6e22b6a0563ebc7213e7204b0f', icon: "chevron-down-12" })), h("span", { key: '960c0ba799af03b588ac53dd5ef4b3071e2f83f4', id: "accordion-caption", class: "accordion-caption" }, this.caption)), h("div", { key: '64a83fedce2c9b0b9a5c65a7fbcd3b76e156dd56', id: "accordion-content", class: "accordion-content", ref: (el) => (this.contentEl = el), role: "region", "aria-labelledby": "accordion-caption" }, h("div", { key: '59033c70e0ac0990cd7bdf60e131d2091339b314', class: "inner-content" }, h("slot", { key: 'a73b3a5b932c9e71275dd4735142cd4fc222e404', onSlotchange: (e) => this.handleSlotChange(e) })))));
72
72
  }
73
73
  static get is() { return "ifx-accordion-item"; }
74
74
  static get encapsulation() { return "shadow"; }
@@ -152,8 +152,8 @@ export class IfxAccordionItem {
152
152
  }
153
153
  static get events() {
154
154
  return [{
155
- "method": "ifxItemOpen",
156
- "name": "ifxItemOpen",
155
+ "method": "ifxOpen",
156
+ "name": "ifxOpen",
157
157
  "bubbles": true,
158
158
  "cancelable": true,
159
159
  "composed": true,
@@ -167,8 +167,8 @@ export class IfxAccordionItem {
167
167
  "references": {}
168
168
  }
169
169
  }, {
170
- "method": "ifxItemClose",
171
- "name": "ifxItemClose",
170
+ "method": "ifxClose",
171
+ "name": "ifxClose",
172
172
  "bubbles": true,
173
173
  "cancelable": true,
174
174
  "composed": true,
@@ -1 +1 @@
1
- {"version":3,"file":"accordionItem.js","sourceRoot":"","sources":["../../../src/components/accordion/accordionItem.tsx"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAO9F,MAAM,OAAO,gBAAgB;;;oBAIR,KAAK;yBACJ,CAAC;4BACY,KAAK;;IAMtC,iBAAiB;QACf,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC;IAChC,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,iBAAiB,EAAE,CAAA;IAC1B,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,iBAAiB,EAAE,CAAA;IAC1B,CAAC;IAKD,WAAW,CAAC,QAAiB;QAC3B,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC;IAC/B,CAAC;IAED,UAAU;QACR,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC;QAE9B,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,IAAI,CAAC,W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gB,CAAC,CAAC,CAAC,GAAI,CACnD,CACF,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["//ifxAccordionItem\nimport { Component, Prop, h, State, Event, EventEmitter, Watch, Listen } from '@stencil/core';\n\n@Component({\n tag: 'ifx-accordion-item',\n styleUrl: 'accordionItem.scss',\n shadow: true,\n})\nexport class IfxAccordionItem {\n @Prop() caption: string;\n @Prop({\n mutable: true,\n }) open: boolean = false;\n @Prop() AriaLevel = 3;\n @State() internalOpen: boolean = false;\n @Event() ifxItemOpen: EventEmitter;\n @Event() ifxItemClose: EventEmitter;\n private contentEl!: HTMLElement;\n\n\n componentWillLoad() {\n this.internalOpen = this.open;\n }\n\n componentDidLoad() {\n this.openAccordionItem()\n }\n\n componentDidUpdate() {\n this.openAccordionItem()\n }\n\n\n\n @Watch('open')\n openChanged(newValue: boolean) {\n this.internalOpen = newValue;\n }\n\n toggleOpen() {\n this.internalOpen = !this.internalOpen;\n this.open = this.internalOpen;\n\n if (this.internalOpen) {\n this.ifxItemOpen.emit({ isOpen: this.internalOpen });\n } else {\n this.ifxItemClose.emit({ isClosed: !this.internalOpen });\n }\n }\n\n openAccordionItem() {\n if (this.internalOpen) {\n this.contentEl.style.maxHeight = `${this.contentEl.scrollHeight}px`;\n } else {\n this.contentEl.style.maxHeight = '0';\n }\n }\n\n handleSlotChange(e) {\n const slotElement = e.target;\n const nodes = slotElement.assignedNodes();\n \n if(nodes.length > 0) {\n nodes.forEach(node => {\n const observer = new MutationObserver((mutationsList, _) => {\n for(let mutation of mutationsList) {\n if (mutation.type === 'childList') {\n if (this.internalOpen) {\n this.openAccordionItem();\n }\n }\n }\n });\n observer.observe(node, { attributes: true, childList: true, subtree: true });\n });\n }\n\n if (this.internalOpen) {\n this.openAccordionItem();\n }\n }\n\n \n\n @Listen('keydown')\n handleKeydown(ev: KeyboardEvent) {\n switch (ev.key) {\n case 'Enter': // fallthrough\n case ' ': // space\n ev.preventDefault();\n this.toggleOpen();\n break;\n }\n }\n\n\n render() {\n return (\n <div class={`accordion-item ${this.internalOpen ? 'open' : ''}`}>\n <div role=\"button\" aria-expanded={this.internalOpen} aria-controls=\"accordion-content\" class=\"accordion-title\" onClick={() => this.toggleOpen()} tabindex='0'>\n <span aria-hidden=\"true\" role=\"heading\" aria-level={String(this.AriaLevel) as string} class=\"accordion-icon\">\n <ifx-icon icon=\"chevron-down-12\"/>\n </span>\n <span id=\"accordion-caption\" class=\"accordion-caption\">{this.caption}</span>\n </div>\n <div id=\"accordion-content\" class=\"accordion-content\" ref={(el) => (this.contentEl = el as HTMLElement)} role=\"region\" aria-labelledby=\"accordion-caption\">\n <div class=\"inner-content\">\n <slot onSlotchange={(e) => this.handleSlotChange(e)} />\n </div>\n </div>\n </div>\n );\n }\n}"]}
1
+ {"version":3,"file":"accordionItem.js","sourceRoot":"","sources":["../../../src/components/accordion/accordionItem.tsx"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAO9F,MAAM,OAAO,gBAAgB;;;oBAIR,KAAK;yBACJ,CAAC;4BACY,KAAK;;IAMtC,iBAAiB;QACf,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC;IAChC,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,iBAAiB,EAAE,CAAA;IAC1B,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,iBAAiB,EAAE,CAAA;IAC1B,CAAC;IAKD,WAAW,CAAC,QAAiB;QAC3B,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC;IAC/B,CAAC;IAED,UAAU;QACR,IAAI,CAAC,YAAY,GA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,EAAE,IAAI,EAAC,QAAQ,qBAAiB,mBAAmB;gBACxJ,4DAAK,KAAK,EAAC,eAAe;oBACxB,6DAAM,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAI,CACnD,CACF,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["//ifxAccordionItem\nimport { Component, Prop, h, State, Event, EventEmitter, Watch, Listen } from '@stencil/core';\n\n@Component({\n tag: 'ifx-accordion-item',\n styleUrl: 'accordionItem.scss',\n shadow: true,\n})\nexport class IfxAccordionItem {\n @Prop() caption: string;\n @Prop({\n mutable: true,\n }) open: boolean = false;\n @Prop() AriaLevel = 3;\n @State() internalOpen: boolean = false;\n @Event() ifxOpen: EventEmitter;\n @Event() ifxClose: EventEmitter;\n private contentEl!: HTMLElement;\n\n\n componentWillLoad() {\n this.internalOpen = this.open;\n }\n\n componentDidLoad() {\n this.openAccordionItem()\n }\n\n componentDidUpdate() {\n this.openAccordionItem()\n }\n\n\n\n @Watch('open')\n openChanged(newValue: boolean) {\n this.internalOpen = newValue;\n }\n\n toggleOpen() {\n this.internalOpen = !this.internalOpen;\n this.open = this.internalOpen;\n\n if (this.internalOpen) {\n this.ifxOpen.emit({ isOpen: this.internalOpen });\n } else {\n this.ifxClose.emit({ isClosed: !this.internalOpen });\n }\n }\n\n openAccordionItem() {\n if (this.internalOpen) {\n this.contentEl.style.maxHeight = `${this.contentEl.scrollHeight}px`;\n } else {\n this.contentEl.style.maxHeight = '0';\n }\n }\n\n handleSlotChange(e) {\n const slotElement = e.target;\n const nodes = slotElement.assignedNodes();\n \n if(nodes.length > 0) {\n nodes.forEach(node => {\n const observer = new MutationObserver((mutationsList, _) => {\n for(let mutation of mutationsList) {\n if (mutation.type === 'childList') {\n if (this.internalOpen) {\n this.openAccordionItem();\n }\n }\n }\n });\n observer.observe(node, { attributes: true, childList: true, subtree: true });\n });\n }\n\n if (this.internalOpen) {\n this.openAccordionItem();\n }\n }\n\n \n\n @Listen('keydown')\n handleKeydown(ev: KeyboardEvent) {\n switch (ev.key) {\n case 'Enter': // fallthrough\n case ' ': // space\n ev.preventDefault();\n this.toggleOpen();\n break;\n }\n }\n\n\n render() {\n return (\n <div class={`accordion-item ${this.internalOpen ? 'open' : ''}`}>\n <div role=\"button\" aria-expanded={this.internalOpen} aria-controls=\"accordion-content\" class=\"accordion-title\" onClick={() => this.toggleOpen()} tabindex='0'>\n <span aria-hidden=\"true\" role=\"heading\" aria-level={String(this.AriaLevel) as string} class=\"accordion-icon\">\n <ifx-icon icon=\"chevron-down-12\"/>\n </span>\n <span id=\"accordion-caption\" class=\"accordion-caption\">{this.caption}</span>\n </div>\n <div id=\"accordion-content\" class=\"accordion-content\" ref={(el) => (this.contentEl = el as HTMLElement)} role=\"region\" aria-labelledby=\"accordion-caption\">\n <div class=\"inner-content\">\n <slot onSlotchange={(e) => this.handleSlotChange(e)} />\n </div>\n </div>\n </div>\n );\n }\n}"]}
@@ -2,7 +2,7 @@ import { h } from "@stencil/core";
2
2
  export class BreadcrumbItemLabel {
3
3
  constructor() {
4
4
  this.icon = undefined;
5
- this.url = undefined;
5
+ this.href = undefined;
6
6
  this.target = "_self";
7
7
  }
8
8
  componentDidLoad() {
@@ -11,7 +11,7 @@ export class BreadcrumbItemLabel {
11
11
  this.breadcrumbMenuIconWrapper.emit(menuWrapper);
12
12
  }
13
13
  render() {
14
- return (h("a", { key: '16ddbc6dfce781d06c5e852423d1646426c6fb04', href: this.url, target: this.target, class: "breadcrumb-item-label-container", role: 'link' }, h("ifx-icon", { key: '6d62e4f854b7ea735c46a3849a92c09a8d222e54', icon: this.icon, "aria-hidden": "true" }), h("span", { key: '452dc64f08a93f4872f0f033b0b7016073818aab', class: "label-wrapper" }, h("slot", { key: '0a522ff8d13c3133367e62b50480af2dc970961d' })), h("span", { key: '7f5d3a5305ad187e312ae20a59610c9cfe4b13cf', class: "menu-icon-wrapper", "aria-hiden": "true" }, h("ifx-icon", { key: '07dc7f9912e3d87f286273e5758490f39df31d0d', icon: "chevron-down-12" }))));
14
+ return (h("a", { key: '856f06f931087b841e5f0350f1eb03e83b70e598', href: this.href, target: this.target, class: "breadcrumb-item-label-container", role: 'link' }, h("ifx-icon", { key: 'b67ee6634bea1f1626e073c1cf4238d12e0e8902', icon: this.icon, "aria-hidden": "true" }), h("span", { key: '270394a637cc6dd822d74d47dcc0bce51e9455c5', class: "label-wrapper" }, h("slot", { key: 'a2c15ce4581d3323d52fe931706ed86f3a777e08' })), h("span", { key: 'f013021b230b0a83a9fc1133d395f91c74cec4c4', class: "menu-icon-wrapper", "aria-hiden": "true" }, h("ifx-icon", { key: 'b22c149f7cb47f43054ba7e7a2ca669a94f2d8bc', icon: "chevron-down-12" }))));
15
15
  }
16
16
  static get is() { return "ifx-breadcrumb-item-label"; }
17
17
  static get encapsulation() { return "shadow"; }
@@ -46,7 +46,7 @@ export class BreadcrumbItemLabel {
46
46
  "attribute": "icon",
47
47
  "reflect": false
48
48
  },
49
- "url": {
49
+ "href": {
50
50
  "type": "string",
51
51
  "mutable": false,
52
52
  "complexType": {
@@ -62,7 +62,7 @@ export class BreadcrumbItemLabel {
62
62
  },
63
63
  "getter": false,
64
64
  "setter": false,
65
- "attribute": "url",
65
+ "attribute": "href",
66
66
  "reflect": false
67
67
  },
68
68
  "target": {
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb-item-label.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb-item-label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAOjF,MAAM,OAAO,mBAAmB;;;;sBAGL,OAAO;;IAIhC,gBAAgB;QACd,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,kCAAkC,CAAC,CAAA;QACtF,MAAM,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAA;QACjE,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAClD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,0DAAG,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAC,iCAAiC,EAAC,IAAI,EAAC,MAAM;YACzF,iEAAU,IAAI,EAAE,IAAI,CAAC,IAAI,iBAAc,MAAM,GAAY;YACzD,6DAAM,KAAK,EAAC,eAAe;gBACzB,8DAAQ,CACH;YACR,6DAAM,KAAK,EAAC,mBAAmB,gBAAY,MAAM;gBAChD,iEAAU,IAAI,EAAC,iBAAiB,GAAY,CACtC,CACJ,CACL,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'ifx-breadcrumb-item-label',\n styleUrl: 'breadcrumb-item-label.scss',\n shadow: true,\n})\nexport class BreadcrumbItemLabel {\n @Prop() icon: string;\n @Prop() url: string;\n @Prop() target: string = \"_self\"\n @Element() el;\n @Event() breadcrumbMenuIconWrapper: EventEmitter<CustomEvent>;\n\n componentDidLoad() { \n const container = this.el.shadowRoot.querySelector('.breadcrumb-item-label-container')\n const menuWrapper = container.querySelector('.menu-icon-wrapper')\n this.breadcrumbMenuIconWrapper.emit(menuWrapper)\n }\n\n render() {\n return (\n <a href={this.url} target={this.target} class=\"breadcrumb-item-label-container\" role='link'>\n <ifx-icon icon={this.icon} aria-hidden=\"true\"></ifx-icon>\n <span class=\"label-wrapper\">\n <slot />\n </span>\n <span class=\"menu-icon-wrapper\" aria-hiden=\"true\">\n <ifx-icon icon=\"chevron-down-12\"></ifx-icon>\n </span>\n </a>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"breadcrumb-item-label.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb-item-label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAOjF,MAAM,OAAO,mBAAmB;;;;sBAGL,OAAO;;IAIhC,gBAAgB;QACd,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,kCAAkC,CAAC,CAAA;QACtF,MAAM,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAA;QACjE,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAClD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,0DAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAC,iCAAiC,EAAC,IAAI,EAAC,MAAM;YAC1F,iEAAU,IAAI,EAAE,IAAI,CAAC,IAAI,iBAAc,MAAM,GAAY;YACzD,6DAAM,KAAK,EAAC,eAAe;gBACzB,8DAAQ,CACH;YACR,6DAAM,KAAK,EAAC,mBAAmB,gBAAY,MAAM;gBAChD,iEAAU,IAAI,EAAC,iBAAiB,GAAY,CACtC,CACJ,CACL,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'ifx-breadcrumb-item-label',\n styleUrl: 'breadcrumb-item-label.scss',\n shadow: true,\n})\nexport class BreadcrumbItemLabel {\n @Prop() icon: string;\n @Prop() href: string;\n @Prop() target: string = \"_self\"\n @Element() el;\n @Event() breadcrumbMenuIconWrapper: EventEmitter<CustomEvent>;\n\n componentDidLoad() { \n const container = this.el.shadowRoot.querySelector('.breadcrumb-item-label-container')\n const menuWrapper = container.querySelector('.menu-icon-wrapper')\n this.breadcrumbMenuIconWrapper.emit(menuWrapper)\n }\n\n render() {\n return (\n <a href={this.href} target={this.target} class=\"breadcrumb-item-label-container\" role='link'>\n <ifx-icon icon={this.icon} aria-hidden=\"true\"></ifx-icon>\n <span class=\"label-wrapper\">\n <slot />\n </span>\n <span class=\"menu-icon-wrapper\" aria-hiden=\"true\">\n <ifx-icon icon=\"chevron-down-12\"></ifx-icon>\n </span>\n </a>\n );\n }\n}\n"]}
@@ -18,15 +18,15 @@ export class Breadcrumb {
18
18
  const breadcrumbItem = node;
19
19
  const breadcrumbItemLabel = breadcrumbItem.querySelector('ifx-breadcrumb-item-label');
20
20
  const breadcrumbDropdown = breadcrumbItem.querySelector('ifx-dropdown-menu');
21
- if (breadcrumbItemLabel.hasAttribute('url') && breadcrumbDropdown) {
22
- throw new Error('ifx-breadcrumb-item cannot have both a url and a dropdown menu.');
21
+ if (breadcrumbItemLabel.hasAttribute('href') && breadcrumbDropdown) {
22
+ throw new Error('ifx-breadcrumb-item cannot have both a href and a dropdown menu.');
23
23
  }
24
24
  }
25
25
  }
26
26
  }
27
27
  }
28
28
  render() {
29
- return (h("nav", { key: '82aec60bebf9a71d7cdcfc2916f91c0e36dee868', "aria-label": "Page navigation breadcrumb" }, h("ol", { key: '70bae75b26b5df4c509f16c0ab8e2b10333de8ac', class: "breadcrumb" }, h("slot", { key: '1cb28e3640f20319349b4f6d3cb1568508d3b1ba' }))));
29
+ return (h("nav", { key: '3d01af951d4a6a396545eb9cf26454cbe2b31ed0', "aria-label": "Page navigation breadcrumb" }, h("ol", { key: '95ae08a0de7099ecd7c3aa963c1bf9952918ecda', class: "breadcrumb" }, h("slot", { key: 'e9fed255fa08b28c8974498d329df69b1e92edf5' }))));
30
30
  }
31
31
  static get is() { return "ifx-breadcrumb"; }
32
32
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOtD,MAAM,OAAO,UAAU;IAGrB,gBAAgB;QACd,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;QAC9C,IAAI,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IAEO,+BAA+B,CAAC,OAAoB;QAC1D,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACnC,OAAO;QACT,CAAC;QAED,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAG,IAAI,EAAE,CAAC;YACR,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YAE3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC9C,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;gBAC9B,IAAI,IAAI,CAAC,QAAQ,KAAK,qBAAqB,EAAE,CAAC;oBAC5C,MAAM,cAAc,GAAG,IAAoC,CAAC;oBAC5D,MAAM,mBAAmB,GAAG,cAAc,CAAC,aAAa,CAAC,2BAA2B,CAAC,CAAC;oBACtF,MAAM,kBAAkB,GAAG,cAAc,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;oBAC7E,IAAI,mBAAmB,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,kBAAkB,EAAE,CAAC;wBAClE,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;oBACrF,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,0EAAgB,4BAA4B;YAC1C,2DAAI,KAAK,EAAC,YAAY;gBACpB,8DAAQ,CACL,CACD,CACP,CAAC;IACJ,CAAC;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Element } from '@stencil/core';\n\n@Component({\n tag: 'ifx-breadcrumb',\n styleUrl: 'breadcrumb.scss',\n shadow: true\n})\nexport class Breadcrumb {\n @Element() el;\n\n componentDidLoad() {\n const element = this.el.shadowRoot.firstChild;\n this.validateBreadcrumbItemStructure(element);\n }\n\n private validateBreadcrumbItemStructure(element: HTMLElement) {\n if (!element) {\n console.error('element not found');\n return;\n }\n \n const slot = element.querySelector('slot');\n if(slot) { \n const assignedNodes = slot.assignedNodes();\n \n for (let i = 0; i < assignedNodes.length; i++) {\n const node = assignedNodes[i];\n if (node.nodeName === 'IFX-BREADCRUMB-ITEM') {\n const breadcrumbItem = node as HTMLIfxBreadcrumbItemElement;\n const breadcrumbItemLabel = breadcrumbItem.querySelector('ifx-breadcrumb-item-label');\n const breadcrumbDropdown = breadcrumbItem.querySelector('ifx-dropdown-menu');\n if (breadcrumbItemLabel.hasAttribute('url') && breadcrumbDropdown) {\n throw new Error('ifx-breadcrumb-item cannot have both a url and a dropdown menu.');\n }\n }\n }\n }\n }\n\n render() {\n return (\n <nav aria-label=\"Page navigation breadcrumb\">\n <ol class=\"breadcrumb\">\n <slot />\n </ol>\n </nav>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOtD,MAAM,OAAO,UAAU;IAG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\n styleUrl: 'breadcrumb.scss',\n shadow: true\n})\nexport class Breadcrumb {\n @Element() el;\n\n componentDidLoad() {\n const element = this.el.shadowRoot.firstChild;\n this.validateBreadcrumbItemStructure(element);\n }\n\n private validateBreadcrumbItemStructure(element: HTMLElement) {\n if (!element) {\n console.error('element not found');\n return;\n }\n \n const slot = element.querySelector('slot');\n if(slot) { \n const assignedNodes = slot.assignedNodes();\n \n for (let i = 0; i < assignedNodes.length; i++) {\n const node = assignedNodes[i];\n if (node.nodeName === 'IFX-BREADCRUMB-ITEM') {\n const breadcrumbItem = node as HTMLIfxBreadcrumbItemElement;\n const breadcrumbItemLabel = breadcrumbItem.querySelector('ifx-breadcrumb-item-label');\n const breadcrumbDropdown = breadcrumbItem.querySelector('ifx-dropdown-menu');\n if (breadcrumbItemLabel.hasAttribute('href') && breadcrumbDropdown) {\n throw new Error('ifx-breadcrumb-item cannot have both a href and a dropdown menu.');\n }\n }\n }\n }\n }\n\n render() {\n return (\n <nav aria-label=\"Page navigation breadcrumb\">\n <ol class=\"breadcrumb\">\n <slot />\n </ol>\n </nav>\n );\n }\n}\n"]}
@@ -6,7 +6,8 @@ export default {
6
6
  args: {
7
7
  icon: '',
8
8
  iconArialLabel: '',
9
- url: 'http://google.com',
9
+ href: 'http://yahoo.com',
10
+ hrefOfDropdownItem: 'http://google.com',
10
11
  target: '_self',
11
12
  },
12
13
  argTypes: {
@@ -50,9 +51,23 @@ export default {
50
51
  }
51
52
  }
52
53
  },
53
- url: {
54
+ href: {
54
55
  control: { type: 'text' },
55
- description: 'Set the url of the link.',
56
+ description: 'Set the href of the breadcrumb item.',
57
+ table: {
58
+ category: 'ifx-breadcrumb-item-label props',
59
+ defaultValue: {
60
+ summary: ''
61
+ },
62
+ type: {
63
+ summary: 'string'
64
+ }
65
+ }
66
+ },
67
+ hrefOfDropdownItem: {
68
+ name: 'href',
69
+ control: { type: 'text' },
70
+ description: 'Set the href of the dropdown item.',
56
71
  table: {
57
72
  category: 'ifx-dropdown-item props',
58
73
  defaultValue: {
@@ -65,7 +80,7 @@ export default {
65
80
  },
66
81
  ifxDropdownMenuItem: {
67
82
  action: 'ifxDropdownMenuItem',
68
- description: 'Custom event emitted when an item is selected.',
83
+ description: 'Custom event emitted by ifx-dropdown-menu when an item is selected.',
69
84
  table: {
70
85
  category: 'custom events',
71
86
  type: {
@@ -81,27 +96,27 @@ const DefaultTemplate = args => {
81
96
  const wrapper = document.createElement('div');
82
97
  wrapper.innerHTML = `<ifx-breadcrumb>
83
98
  <ifx-breadcrumb-item>
84
- <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? icon : ''}">Breadcrumb 1</ifx-breadcrumb-item-label>
99
+ <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? icon : ''}" href="${args.href}"">Breadcrumb 1</ifx-breadcrumb-item-label>
85
100
  <ifx-dropdown-menu>
86
- <ifx-dropdown-item url=${args.url}>Google</ifx-dropdown-item>
87
- <ifx-dropdown-item url="http://bing.com">Bing</ifx-dropdown-item>
88
- <ifx-dropdown-item url="http://yahoo.com">Yahoo</ifx-dropdown-item>
89
- <ifx-dropdown-item url="http://naver.com">Naver</ifx-dropdown-item>
101
+ <ifx-dropdown-item href=${args.hrefOfDropdownItem}>Google</ifx-dropdown-item>
102
+ <ifx-dropdown-item href="http://bing.com">Bing</ifx-dropdown-item>
103
+ <ifx-dropdown-item href="http://yahoo.com">Yahoo</ifx-dropdown-item>
104
+ <ifx-dropdown-item href="http://naver.com">Naver</ifx-dropdown-item>
90
105
  </ifx-dropdown-menu>
91
106
  </ifx-breadcrumb-item>
92
107
 
93
108
  <ifx-breadcrumb-item>
94
109
  <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? icon : ''}">Breadcrumb 2</ifx-breadcrumb-item-label>
95
110
  <ifx-dropdown-menu>
96
- <ifx-dropdown-item url=${args.url}>Google</ifx-dropdown-item>
97
- <ifx-dropdown-item url="http://bing.com">Bing</ifx-dropdown-item>
98
- <ifx-dropdown-item url="http://yahoo.com">Yahoo</ifx-dropdown-item>
99
- <ifx-dropdown-item url="http://naver.com">Naver</ifx-dropdown-item>
111
+ <ifx-dropdown-item href=${args.href}>Google</ifx-dropdown-item>
112
+ <ifx-dropdown-item href="http://bing.com">Bing</ifx-dropdown-item>
113
+ <ifx-dropdown-item href="http://yahoo.com">Yahoo</ifx-dropdown-item>
114
+ <ifx-dropdown-item href="http://naver.com">Naver</ifx-dropdown-item>
100
115
  </ifx-dropdown-menu>
101
116
  </ifx-breadcrumb-item>
102
117
 
103
118
  <ifx-breadcrumb-item>
104
- <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? icon : ''}" url="http://google.com">Breadcrumb 3</ifx-breadcrumb-item-label>
119
+ <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? icon : ''}" href="http://google.com">Breadcrumb 3</ifx-breadcrumb-item-label>
105
120
  </ifx-breadcrumb-item>
106
121
  </ifx-breadcrumb>`;
107
122
  const breadcrumb = wrapper.querySelector('ifx-breadcrumb');
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.stories.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.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,uBAAuB;IAC9B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,IAAI,EAAE,EAAE;QACR,cAAc,EAAE,EAAE;QAClB,GAAG,EAAE,mBAAmB;QACxB,MAAM,EAAE,OAAO;KAChB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC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;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IACnD,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,SAAS,GAAG;;oDAE8B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;;+BAE1C,IAAI,CAAC,GAAG;;;;;;;;oDAQa,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;;6BAE5C,IAAI,CAAC,GAAG;;;;;;;;oDAQe,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;;kBAEvD,CAAC;IAEjB,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAgB,CAAC;IAC1E,oFAAoF;IACpF,MAAM,eAAe,GAAG,UAAU,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;IAC3E,eAAe,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;QACvC,MAAM,YAAY,GAAG,cAAc,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;QACvE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,gBAAgB,CAAC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;IAEH,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';\nimport { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Breadcrumb',\n tags: ['autodocs'],\n\n args: {\n icon: '',\n iconArialLabel: '',\n url: 'http://google.com',\n target: '_self',\n },\n argTypes: {\n icon: {\n control: { type: 'select' },\n options: ['none', ...Object.values(icons).map(i => i['name'])],\n description: 'Set the icon of the tab. Choose \"none\" to display no icon.',\n table: {\n category: 'ifx-breadcrumb-item-label props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\n }\n }\n },\n target: {\n control: { type: 'text' },\n description: 'Set the target of the link.',\n table: {\n category: 'ifx-breadcrumb-item-label props',\n defaultValue: {\n summary: '_self'\n },\n type: {\n summary: 'string'\n }\n }\n },\n iconArialLabel: {\n control: { type: 'text' },\n description: 'Set the aria label of the icon.',\n table: {\n category: 'ifx-breadcrumb-item-label props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\n }\n }\n },\n url: {\n control: { type: 'text' },\n description: 'Set the url of the link.',\n table: {\n category: 'ifx-dropdown-item props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\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 icon = args.icon === 'none' ? '' : args.icon;\n const wrapper = document.createElement('div');\n wrapper.innerHTML = `<ifx-breadcrumb>\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? icon : ''}\">Breadcrumb 1</ifx-breadcrumb-item-label>\n <ifx-dropdown-menu>\n <ifx-dropdown-item url=${args.url}>Google</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://bing.com\">Bing</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://yahoo.com\">Yahoo</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://naver.com\">Naver</ifx-dropdown-item>\n </ifx-dropdown-menu>\n </ifx-breadcrumb-item>\n\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? icon : ''}\">Breadcrumb 2</ifx-breadcrumb-item-label>\n <ifx-dropdown-menu>\n <ifx-dropdown-item url=${args.url}>Google</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://bing.com\">Bing</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://yahoo.com\">Yahoo</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://naver.com\">Naver</ifx-dropdown-item>\n </ifx-dropdown-menu>\n </ifx-breadcrumb-item>\n\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? icon : ''}\" url=\"http://google.com\">Breadcrumb 3</ifx-breadcrumb-item-label>\n </ifx-breadcrumb-item>\n</ifx-breadcrumb>`;\n\n const breadcrumb = wrapper.querySelector('ifx-breadcrumb') as HTMLElement;\n // Loop through each breadcrumb item and attach event listeners to its dropdown menu\n const breadcrumbItems = breadcrumb.querySelectorAll('ifx-breadcrumb-item');\n breadcrumbItems.forEach(breadcrumbItem => {\n const dropdownMenu = breadcrumbItem.querySelector('ifx-dropdown-menu');\n dropdownMenu?.addEventListener('ifxDropdownMenuItem', action('ifxDropdownMenuItem'));\n });\n\n return wrapper;\n};\n\nexport const Default = DefaultTemplate.bind({});\n"]}
1
+ {"version":3,"file":"breadcrumb.stories.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.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,uBAAuB;IAC9B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,IAAI,EAAE,EAAE;QACR,cAAc,EAAE,EAAE;QAClB,IAAI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GAAG,UAAU,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;IAC3E,eAAe,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;QACvC,MAAM,YAAY,GAAG,cAAc,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;QACvE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,gBAAgB,CAAC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;IAEH,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';\nimport { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Breadcrumb',\n tags: ['autodocs'],\n\n args: {\n icon: '',\n iconArialLabel: '',\n href: 'http://yahoo.com',\n hrefOfDropdownItem: 'http://google.com',\n target: '_self',\n },\n argTypes: {\n icon: {\n control: { type: 'select' },\n options: ['none', ...Object.values(icons).map(i => i['name'])],\n description: 'Set the icon of the tab. Choose \"none\" to display no icon.',\n table: {\n category: 'ifx-breadcrumb-item-label props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\n }\n }\n },\n target: {\n control: { type: 'text' },\n description: 'Set the target of the link.',\n table: {\n category: 'ifx-breadcrumb-item-label props',\n defaultValue: {\n summary: '_self'\n },\n type: {\n summary: 'string'\n }\n }\n },\n iconArialLabel: {\n control: { type: 'text' },\n description: 'Set the aria label of the icon.',\n table: {\n category: 'ifx-breadcrumb-item-label props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\n }\n }\n },\n href: {\n control: { type: 'text' },\n description: 'Set the href of the breadcrumb item.',\n table: {\n category: 'ifx-breadcrumb-item-label props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\n }\n }\n },\n hrefOfDropdownItem: {\n name: 'href',\n control: { type: 'text' },\n description: 'Set the href of the dropdown item.',\n table: {\n category: 'ifx-dropdown-item props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\n }\n }\n },\n ifxDropdownMenuItem: {\n action: 'ifxDropdownMenuItem',\n description: 'Custom event emitted by ifx-dropdown-menu 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 icon = args.icon === 'none' ? '' : args.icon;\n const wrapper = document.createElement('div');\n wrapper.innerHTML = `<ifx-breadcrumb>\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? icon : ''}\" href=\"${args.href}\"\">Breadcrumb 1</ifx-breadcrumb-item-label>\n <ifx-dropdown-menu>\n <ifx-dropdown-item href=${args.hrefOfDropdownItem}>Google</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://bing.com\">Bing</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://yahoo.com\">Yahoo</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://naver.com\">Naver</ifx-dropdown-item>\n </ifx-dropdown-menu>\n </ifx-breadcrumb-item>\n\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? icon : ''}\">Breadcrumb 2</ifx-breadcrumb-item-label>\n <ifx-dropdown-menu>\n <ifx-dropdown-item href=${args.href}>Google</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://bing.com\">Bing</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://yahoo.com\">Yahoo</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://naver.com\">Naver</ifx-dropdown-item>\n </ifx-dropdown-menu>\n </ifx-breadcrumb-item>\n\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? icon : ''}\" href=\"http://google.com\">Breadcrumb 3</ifx-breadcrumb-item-label>\n </ifx-breadcrumb-item>\n</ifx-breadcrumb>`;\n\n const breadcrumb = wrapper.querySelector('ifx-breadcrumb') as HTMLElement;\n // Loop through each breadcrumb item and attach event listeners to its dropdown menu\n const breadcrumbItems = breadcrumb.querySelectorAll('ifx-breadcrumb-item');\n breadcrumbItems.forEach(breadcrumbItem => {\n const dropdownMenu = breadcrumbItem.querySelector('ifx-dropdown-menu');\n dropdownMenu?.addEventListener('ifxDropdownMenuItem', action('ifxDropdownMenuItem'));\n });\n\n return wrapper;\n};\n\nexport const Default = DefaultTemplate.bind({});\n"]}
@@ -19,12 +19,9 @@ export default {
19
19
  argTypes: {
20
20
  label: {
21
21
  name: 'Label of Button',
22
- description: 'Sets the text displayed on the button.',
22
+ description: 'Sets the text displayed on the *<ifx-button>*.',
23
23
  table: {
24
24
  category: 'story controls',
25
- type: {
26
- summary: '<ifx-button> `label` </ifx-button>'
27
- }
28
25
  }
29
26
  },
30
27
  icon: {
@@ -1 +1 @@
1
- {"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../src/components/button/button.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,GAAG;QACT,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,EAAE;QACR,YAAY,EAAE,MAAM;QACpB,IAAI,EAAE,KAAK;QACX,GAAG,EAAE,EAAE;QACP,MAAM,EAAE,QAAQ;KACjB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EAAE,OAAO,EAAE,SAAS,CAAC;YACvC,KAAK,EAAE;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,YAAY,EAAE;oBACZ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAC7B,qBAAqB,IAAI,CAAC,IAAI,eAAe,IAAI,CAAC,QAAQ,cAAc,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,IAAI,aAAa,IAAI,CAAC,MAAM,YAAY,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,gBAAgB,IAAI,CAAC,SAAS;IAC5N,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE;cAC3N,CAAC;AAEf,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Button',\n tags: ['autodocs'],\n\n args: {\n label: 'Button',\n variant: 'primary',\n theme: 'default',\n type: 'button',\n size: 'm',\n fullWidth: false,\n disabled: false,\n icon: '',\n iconPosition: 'left',\n href: false,\n url: '',\n target: '_blank',\n },\n\n argTypes: {\n label: {\n name: 'Label of Button',\n description: 'Sets the text displayed on the button.',\n table: {\n category: 'story controls',\n type: {\n summary: '<ifx-button> `label` </ifx-button>'\n }\n }\n },\n icon: {\n description: 'The icon to be displayed.',\n control: 'select',\n options: Object.values(icons).map(i => i['name']),\n table: {\n category: 'ifx-button props',\n type: {\n summary: 'string'\n }\n }\n },\n variant: {\n description: 'Sets the style variant of the button.',\n control: 'radio',\n options: ['primary', 'secondary', 'tertiary'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'primary'\n }\n }\n },\n theme: {\n description: 'Specifies the theme style of the button.',\n control: 'radio',\n options: ['default', 'danger', 'inverse'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'default'\n }\n }\n },\n type: {\n description: 'Sets the type attribute of the button.',\n control: 'radio',\n options: ['button', 'submit', 'reset'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'button'\n }\n }\n },\n size: {\n description: 'Sets the size of the button. Options: xs (32px) s (36px), m (40px), l (48px)',\n control: 'radio',\n options: ['xs', 's', 'm', 'l'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'm'\n }\n }\n },\n fullWidth: {\n description: 'When set to **true**, expands the button to take the full width of its container.',\n control: 'boolean',\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'false'\n }\n }\n },\n disabled: {\n description: 'Disables the button when set to true.',\n control: 'boolean',\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'false'\n }\n }\n },\n iconPosition: {\n description: 'Determines the position of an icon within the button if an icon is used.',\n control: 'radio',\n options: ['left', 'right'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'left'\n }\n }\n },\n href: {\n description: 'When set to **true**, treats the button as a link by setting a URL.',\n control: 'boolean',\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'false'\n }\n }\n },\n url: {\n description: 'Specifies the destination URL for the button when it acts as a link.',\n table: {\n category: 'ifx-button props',\n type: {\n summary: 'string'\n }\n }\n },\n target: {\n description: 'Determines where to open the linked document when the button is clicked.',\n control: 'radio',\n options: ['_blank', '_self', '_parent'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: '_blank'\n }\n }\n },\n },\n};\n\nconst DefaultTemplate = args =>\n `<ifx-button type=\"${args.type}\" disabled=\"${args.disabled}\" variant=\"${args.variant}\" size=\"${args.size}\" target=\"${args.target}\" theme=\"${args.theme}\" ${args.href ? `href=\"${args.url}\"` : ''} full-width=\"${args.fullWidth}\">\n ${args.icon && args.iconPosition.toUpperCase() === 'LEFT' ? `<ifx-icon icon=\"${args.icon}\"></ifx-icon>` : ''}${args.label}${args.icon && args.iconPosition.toUpperCase() === 'RIGHT' ? `<ifx-icon icon=\"${args.icon}\"></ifx-icon>` : ''} \n</ifx-button>`;\n\nexport const Default = DefaultTemplate.bind({});\n"]}
1
+ {"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../src/components/button/button.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,GAAG;QACT,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,EAAE;QACR,YAAY,EAAE,MAAM;QACpB,IAAI,EAAE,KAAK;QACX,GAAG,EAAE,EAAE;QACP,MAAM,EAAE,QAAQ;KACjB;IAED,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,gDAAgD;YAC7D,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,2BAA2B;YACxC,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CA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AI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,gBAAgB,IAAI,CAAC,SAAS;IAC5N,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE;cAC3N,CAAC;AAEf,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Button',\n tags: ['autodocs'],\n\n args: {\n label: 'Button',\n variant: 'primary',\n theme: 'default',\n type: 'button',\n size: 'm',\n fullWidth: false,\n disabled: false,\n icon: '',\n iconPosition: 'left',\n href: false,\n url: '',\n target: '_blank',\n },\n\n argTypes: {\n label: {\n name: 'Label of Button',\n description: 'Sets the text displayed on the *<ifx-button>*.',\n table: {\n category: 'story controls',\n }\n },\n icon: {\n description: 'The icon to be displayed.',\n control: 'select',\n options: Object.values(icons).map(i => i['name']),\n table: {\n category: 'ifx-button props',\n type: {\n summary: 'string'\n }\n }\n },\n variant: {\n description: 'Sets the style variant of the button.',\n control: 'radio',\n options: ['primary', 'secondary', 'tertiary'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'primary'\n }\n }\n },\n theme: {\n description: 'Specifies the theme style of the button.',\n control: 'radio',\n options: ['default', 'danger', 'inverse'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'default'\n }\n }\n },\n type: {\n description: 'Sets the type attribute of the button.',\n control: 'radio',\n options: ['button', 'submit', 'reset'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'button'\n }\n }\n },\n size: {\n description: 'Sets the size of the button. Options: xs (32px) s (36px), m (40px), l (48px)',\n control: 'radio',\n options: ['xs', 's', 'm', 'l'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'm'\n }\n }\n },\n fullWidth: {\n description: 'When set to **true**, expands the button to take the full width of its container.',\n control: 'boolean',\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'false'\n }\n }\n },\n disabled: {\n description: 'Disables the button when set to true.',\n control: 'boolean',\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'false'\n }\n }\n },\n iconPosition: {\n description: 'Determines the position of an icon within the button if an icon is used.',\n control: 'radio',\n options: ['left', 'right'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'left'\n }\n }\n },\n href: {\n description: 'When set to **true**, treats the button as a link by setting a URL.',\n control: 'boolean',\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'false'\n }\n }\n },\n url: {\n description: 'Specifies the destination URL for the button when it acts as a link.',\n table: {\n category: 'ifx-button props',\n type: {\n summary: 'string'\n }\n }\n },\n target: {\n description: 'Determines where to open the linked document when the button is clicked.',\n control: 'radio',\n options: ['_blank', '_self', '_parent'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: '_blank'\n }\n }\n },\n },\n};\n\nconst DefaultTemplate = args =>\n `<ifx-button type=\"${args.type}\" disabled=\"${args.disabled}\" variant=\"${args.variant}\" size=\"${args.size}\" target=\"${args.target}\" theme=\"${args.theme}\" ${args.href ? `href=\"${args.url}\"` : ''} full-width=\"${args.fullWidth}\">\n ${args.icon && args.iconPosition.toUpperCase() === 'LEFT' ? `<ifx-icon icon=\"${args.icon}\"></ifx-icon>` : ''}${args.label}${args.icon && args.iconPosition.toUpperCase() === 'RIGHT' ? `<ifx-icon icon=\"${args.icon}\"></ifx-icon>` : ''} \n</ifx-button>`;\n\nexport const Default = DefaultTemplate.bind({});\n"]}
@@ -11,6 +11,7 @@ export default {
11
11
  target: '_blank',
12
12
  position: 'right',
13
13
  src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',
14
+ AriaLabel: 'Card',
14
15
  },
15
16
  argTypes: {
16
17
  overline: {
@@ -61,6 +62,13 @@ export default {
61
62
  options: ['horizontal', 'vertical'],
62
63
  control: { type: 'radio' },
63
64
  },
65
+ AriaLabel: {
66
+ control: { type: 'text' },
67
+ description: 'Sets the aria-label attribute of the card. Enhances accessibility.',
68
+ table: {
69
+ category: 'ifx-card props',
70
+ },
71
+ },
64
72
  position: {
65
73
  description: 'Sets the position of the image in the card.',
66
74
  table: {
@@ -88,16 +96,6 @@ export default {
88
96
  options: ['_blank', '_self', '_parent'],
89
97
  control: { type: 'radio' },
90
98
  },
91
- isHovered: {
92
- description: 'Changes the color of the headline when hovered.',
93
- type: 'boolean',
94
- table: {
95
- defaultValue: {
96
- summary: false
97
- },
98
- category: 'ifx-card-headline props',
99
- },
100
- },
101
99
  src: {
102
100
  description: 'Sets the image source.',
103
101
  type: { name: 'string' },
@@ -114,7 +112,7 @@ export default {
114
112
  },
115
113
  },
116
114
  };
117
- const DefaultTemplate = args => `<ifx-card direction="${args.direction}" href="${args.href}" target="${args.target}">
115
+ const DefaultTemplate = args => `<ifx-card direction="${args.direction}" href="${args.href}" target="${args.target}" aria-label="${args.AriaLabel}">
118
116
  <ifx-card-image position="${args.position}" src="${args.src}" alt="" slot="img"></ifx-card-image>
119
117
  ${args.overline
120
118
  ? `<ifx-card-overline>
@@ -1 +1 @@
1
- {"version":3,"file":"card.stories.js","sourceRoot":"","sources":["../../../src/components/card/card.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,WAAW,EA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AAC;cACQ,IAAI,CAAC,WAAW;6BACD;IACzB,CAAC,CAAC,EACJ;QACM,IAAI,CAAC,MAAM,KAAK,QAAQ;IAC5B,CAAC,CAAC;;;4BAGsB;IACxB,CAAC,CAAC,EACJ;YACU,IAAI,CAAC,MAAM,KAAK,MAAM;IAC9B,CAAC,CAAC;;;;;;;;;0BASoB;IACtB,CAAC,CAAC,EACJ;cACY,CAAC;AAEf,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,UAAU,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,YAAY;IACvB,GAAG,EAAE,+EAA+E;CACrF,CAAC;AACF,UAAU,CAAC,QAAQ,GAAG;IACpB,SAAS,EAAE;QACT,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;CACF,CAAC","sourcesContent":["export default {\n title: 'Components/Card',\n tags: ['autodocs'],\n args: {\n overline: 'Overline',\n headline: 'Headline',\n description: \"Some quick example text to build on the card title and make up the bulk of the card's content.\",\n direction: 'vertical',\n button: 'button',\n href: '',\n target: '_blank',\n position: 'right',\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n },\n\n argTypes: {\n overline: {\n name: 'Overline',\n description: 'Sets the overline text of the card.',\n type: { name: 'string' },\n table: {\n category: 'story controls',\n },\n },\n headline: {\n name: 'Headline',\n description: 'Sets the headline text of the card.',\n type: { name: 'string' },\n table: {\n category: 'story controls',\n },\n },\n description: {\n name: 'Description',\n description: 'Sets the description text of the card.',\n type: { name: 'string' },\n table: {\n category: 'story controls',\n },\n },\n button: {\n name: 'Button',\n options: ['button', 'link', 'none'],\n description: 'Sets the button type of the card.',\n control: { type: 'radio' },\n table: {\n category: 'story controls',\n },\n },\n direction: {\n description: 'Sets the direction of the card layout.',\n table: {\n category: 'ifx-card props',\n defaultValue: {\n summary: 'vertical',\n },\n type: {\n summary: 'horizontal | vertical',\n disable: true,\n },\n },\n options: ['horizontal', 'vertical'],\n control: { type: 'radio' },\n },\n\n position: {\n description: 'Sets the position of the image in the card.',\n table: {\n category: 'ifx-card-image props',\n },\n options: ['left', 'right'],\n control: { type: 'radio' },\n if: { arg: 'direction', eq: 'horizontal' },\n },\n href: {\n description: 'Sets the hyperlink reference.',\n type: { name: 'string' },\n table: {\n category: 'ifx-card props',\n },\n },\n target: {\n description: 'Sets the target of the hyperlink reference',\n table: {\n category: 'ifx-card props',\n defaultValue: {\n summary: '_self',\n },\n },\n options: ['_blank', '_self', '_parent'],\n control: { type: 'radio' },\n },\n isHovered: {\n description: 'Changes the color of the headline when hovered.',\n type: 'boolean',\n table: {\n defaultValue: {\n summary: false\n },\n category: 'ifx-card-headline props',\n },\n },\n src: {\n description: 'Sets the image source.',\n type: { name: 'string' },\n table: {\n category: 'ifx-card-image props',\n },\n },\n alt: {\n description: 'Sets the alternative text for the image.',\n type: { name: 'string' },\n table: {\n category: 'ifx-card-image props',\n },\n },\n },\n};\n\nconst DefaultTemplate = args =>\n `<ifx-card direction=\"${args.direction}\" href=\"${args.href}\" target=\"${args.target}\">\n <ifx-card-image position=\"${args.position}\" src=\"${args.src}\" alt=\"\" slot=\"img\"></ifx-card-image>\n ${args.overline\n ? `<ifx-card-overline>\n ${args.overline}\n </ifx-card-overline>`\n : ''\n }\n ${args.headline\n ? `<ifx-card-headline>\n ${args.headline}\n </ifx-card-headline>`\n : ''\n }\n ${args.description\n ? `<ifx-card-text>\n ${args.description}\n </ifx-card-text>`\n : ''\n }\n ${args.button === 'button'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-button variant=\"primary\">Button</ifx-button>\n <ifx-button variant=\"secondary\">Button</ifx-button>\n </ifx-card-links>`\n : ''\n }\n ${args.button === 'link'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-link href=\"https://google.com\" target=\"_blank\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n <ifx-link href=\"https://yahoo.com\" target=\"_blank\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n </ifx-card-links>`\n : ''\n }\n </ifx-card>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.args = {\n alt: 'Coffee',\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n};\n\nconst HorizontalTemplate = args =>\n `<ifx-card direction=\"${args.direction}\" href=\"${args.href}\" target=\"${args.target}\">\n <ifx-card-image position=\"${args.position}\" src=\"${args.src}\" alt=\"${args.alt}\" slot=\"img\"></ifx-card-image>\n ${args.overline\n ? `<ifx-card-overline>\n ${args.overline}\n </ifx-card-overline>`\n : ''\n }\n ${args.headline\n ? `<ifx-card-headline>\n ${args.headline}\n </ifx-card-headline>`\n : ''\n }\n ${args.description\n ? `<ifx-card-text>\n ${args.description}\n </ifx-card-text>`\n : ''\n }\n ${args.button === 'button'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-button variant=\"primary\">Button</ifx-button>\n <ifx-button variant=\"secondary\">Button</ifx-button>\n </ifx-card-links>`\n : ''\n }\n ${args.button === 'link'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-link color=\"primary\" href=\"https://google.com\" target=\"_blank\" underline=\"false\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n <ifx-link color=\"primary\" href=\"https://yahoo.com\" target=\"_blank\" underline=\"false\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n </ifx-card-links>`\n : ''\n }\n </ifx-card>`;\n\nexport const Horizontal = HorizontalTemplate.bind({});\nHorizontal.args = {\n direction: 'horizontal',\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n};\nHorizontal.argTypes = {\n direction: {\n table: {\n disable: true,\n },\n },\n};\n"]}
1
+ {"version":3,"file":"card.stories.js","sourceRoot":"","sources":["../../../src/components/card/card.stories.ts"],"names":[],"mappings":"AAAA,eAAe;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AAQ;6BACM;IACzB,CAAC,CAAC,EACJ;QACM,IAAI,CAAC,QAAQ;IACjB,CAAC,CAAC;YACM,IAAI,CAAC,QAAQ;+BACM;IAC3B,CAAC,CAAC,EACJ;UACQ,IAAI,CAAC,WAAW;IACtB,CAAC,CAAC;cACQ,IAAI,CAAC,WAAW;6BACD;IACzB,CAAC,CAAC,EACJ;QACM,IAAI,CAAC,MAAM,KAAK,QAAQ;IAC5B,CAAC,CAAC;;;4BAGsB;IACxB,CAAC,CAAC,EACJ;YACU,IAAI,CAAC,MAAM,KAAK,MAAM;IAC9B,CAAC,CAAC;;;;;;;;;0BASoB;IACtB,CAAC,CAAC,EACJ;cACY,CAAC;AAEf,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,UAAU,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,YAAY;IACvB,GAAG,EAAE,+EAA+E;CACrF,CAAC;AACF,UAAU,CAAC,QAAQ,GAAG;IACpB,SAAS,EAAE;QACT,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;CACF,CAAC","sourcesContent":["export default {\n title: 'Components/Card',\n tags: ['autodocs'],\n args: {\n overline: 'Overline',\n headline: 'Headline',\n description: \"Some quick example text to build on the card title and make up the bulk of the card's content.\",\n direction: 'vertical',\n button: 'button',\n href: '',\n target: '_blank',\n position: 'right',\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n AriaLabel: 'Card',\n },\n\n argTypes: {\n overline: {\n name: 'Overline',\n description: 'Sets the overline text of the card.',\n type: { name: 'string' },\n table: {\n category: 'story controls',\n },\n },\n headline: {\n name: 'Headline',\n description: 'Sets the headline text of the card.',\n type: { name: 'string' },\n table: {\n category: 'story controls',\n },\n },\n description: {\n name: 'Description',\n description: 'Sets the description text of the card.',\n type: { name: 'string' },\n table: {\n category: 'story controls',\n },\n },\n button: {\n name: 'Button',\n options: ['button', 'link', 'none'],\n description: 'Sets the button type of the card.',\n control: { type: 'radio' },\n table: {\n category: 'story controls',\n },\n },\n direction: {\n description: 'Sets the direction of the card layout.',\n table: {\n category: 'ifx-card props',\n defaultValue: {\n summary: 'vertical',\n },\n type: {\n summary: 'horizontal | vertical',\n disable: true,\n },\n },\n options: ['horizontal', 'vertical'],\n control: { type: 'radio' },\n },\n AriaLabel: {\n control: { type: 'text' },\n description: 'Sets the aria-label attribute of the card. Enhances accessibility.',\n table: {\n category: 'ifx-card props',\n },\n },\n\n position: {\n description: 'Sets the position of the image in the card.',\n table: {\n category: 'ifx-card-image props',\n },\n options: ['left', 'right'],\n control: { type: 'radio' },\n if: { arg: 'direction', eq: 'horizontal' },\n },\n href: {\n description: 'Sets the hyperlink reference.',\n type: { name: 'string' },\n table: {\n category: 'ifx-card props',\n },\n },\n target: {\n description: 'Sets the target of the hyperlink reference',\n table: {\n category: 'ifx-card props',\n defaultValue: {\n summary: '_self',\n },\n },\n options: ['_blank', '_self', '_parent'],\n control: { type: 'radio' },\n },\n src: {\n description: 'Sets the image source.',\n type: { name: 'string' },\n table: {\n category: 'ifx-card-image props',\n },\n },\n alt: {\n description: 'Sets the alternative text for the image.',\n type: { name: 'string' },\n table: {\n category: 'ifx-card-image props',\n },\n },\n },\n};\n\nconst DefaultTemplate = args =>\n `<ifx-card direction=\"${args.direction}\" href=\"${args.href}\" target=\"${args.target}\" aria-label=\"${args.AriaLabel}\">\n <ifx-card-image position=\"${args.position}\" src=\"${args.src}\" alt=\"\" slot=\"img\"></ifx-card-image>\n ${args.overline\n ? `<ifx-card-overline>\n ${args.overline}\n </ifx-card-overline>`\n : ''\n }\n ${args.headline\n ? `<ifx-card-headline>\n ${args.headline}\n </ifx-card-headline>`\n : ''\n }\n ${args.description\n ? `<ifx-card-text>\n ${args.description}\n </ifx-card-text>`\n : ''\n }\n ${args.button === 'button'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-button variant=\"primary\">Button</ifx-button>\n <ifx-button variant=\"secondary\">Button</ifx-button>\n </ifx-card-links>`\n : ''\n }\n ${args.button === 'link'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-link href=\"https://google.com\" target=\"_blank\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n <ifx-link href=\"https://yahoo.com\" target=\"_blank\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n </ifx-card-links>`\n : ''\n }\n </ifx-card>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.args = {\n alt: 'Coffee',\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n};\n\nconst HorizontalTemplate = args =>\n `<ifx-card direction=\"${args.direction}\" href=\"${args.href}\" target=\"${args.target}\">\n <ifx-card-image position=\"${args.position}\" src=\"${args.src}\" alt=\"${args.alt}\" slot=\"img\"></ifx-card-image>\n ${args.overline\n ? `<ifx-card-overline>\n ${args.overline}\n </ifx-card-overline>`\n : ''\n }\n ${args.headline\n ? `<ifx-card-headline>\n ${args.headline}\n </ifx-card-headline>`\n : ''\n }\n ${args.description\n ? `<ifx-card-text>\n ${args.description}\n </ifx-card-text>`\n : ''\n }\n ${args.button === 'button'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-button variant=\"primary\">Button</ifx-button>\n <ifx-button variant=\"secondary\">Button</ifx-button>\n </ifx-card-links>`\n : ''\n }\n ${args.button === 'link'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-link color=\"primary\" href=\"https://google.com\" target=\"_blank\" underline=\"false\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n <ifx-link color=\"primary\" href=\"https://yahoo.com\" target=\"_blank\" underline=\"false\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n </ifx-card-links>`\n : ''\n }\n </ifx-card>`;\n\nexport const Horizontal = HorizontalTemplate.bind({});\nHorizontal.args = {\n direction: 'horizontal',\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n};\nHorizontal.argTypes = {\n direction: {\n table: {\n disable: true,\n },\n },\n};\n"]}
@@ -14,12 +14,9 @@ export default {
14
14
  argTypes: {
15
15
  label: {
16
16
  name: 'Label of Checkbox',
17
- description: 'Sets the label of *<ifx-checkbox>*.',
17
+ description: 'Set the label displayed next to *<ifx-checkbox>*.',
18
18
  table: {
19
19
  category: 'story controls',
20
- type: {
21
- summary: '<ifx-checkbox> `label` </ifx-checkbox>'
22
- }
23
20
  }
24
21
  },
25
22
  error: {