@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.
- package/dist/cjs/ifx-accordion_2.cjs.entry.js +2 -2
- package/dist/cjs/ifx-accordion_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-modal.cjs.entry.js +8 -8
- package/dist/cjs/ifx-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js +5 -5
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-search-bar.cjs.entry.js +5 -5
- package/dist/cjs/ifx-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-sidebar-item.cjs.entry.js +9 -9
- package/dist/cjs/ifx-sidebar-item.cjs.entry.js.map +1 -1
- package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/accordion/accordion.stories.js +79 -3
- package/dist/collection/components/accordion/accordion.stories.js.map +1 -1
- package/dist/collection/components/accordion/accordionItem.js +4 -4
- package/dist/collection/components/accordion/accordionItem.js.map +1 -1
- package/dist/collection/components/alert/alert.stories.js +45 -12
- package/dist/collection/components/alert/alert.stories.js.map +1 -1
- package/dist/collection/components/badge/badge.stories.js +28 -7
- package/dist/collection/components/badge/badge.stories.js.map +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +66 -7
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
- package/dist/collection/components/button/button.stories.js +104 -9
- package/dist/collection/components/button/button.stories.js.map +1 -1
- package/dist/collection/components/card/card.stories.js +85 -2
- package/dist/collection/components/card/card.stories.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.stories.js +75 -14
- package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -1
- package/dist/collection/components/content-switcher/content-switcher.stories.js +65 -3
- package/dist/collection/components/content-switcher/content-switcher.stories.js.map +1 -1
- package/dist/collection/components/date-picker/date-picker.stories.js +73 -6
- package/dist/collection/components/date-picker/date-picker.stories.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.stories.js +161 -64
- package/dist/collection/components/dropdown/dropdown.stories.js.map +1 -1
- package/dist/collection/components/footer/footer.stories.js +7 -1
- package/dist/collection/components/footer/footer.stories.js.map +1 -1
- package/dist/collection/components/icon/infineonIconStencil.stories.js +7 -2
- package/dist/collection/components/icon/infineonIconStencil.stories.js.map +1 -1
- package/dist/collection/components/icon-button/icon-button.stories.js +61 -5
- package/dist/collection/components/icon-button/icon-button.stories.js.map +1 -1
- package/dist/collection/components/link/link.stories.js +56 -4
- package/dist/collection/components/link/link.stories.js.map +1 -1
- package/dist/collection/components/modal/modal.js +10 -10
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/modal/modal.stories.js +96 -19
- package/dist/collection/components/modal/modal.stories.js.map +1 -1
- package/dist/collection/components/navigation/navbar/navbar.stories.js +203 -12
- package/dist/collection/components/navigation/navbar/navbar.stories.js.map +1 -1
- package/dist/collection/components/navigation/sidebar/sidebar-item.js +11 -11
- package/dist/collection/components/navigation/sidebar/sidebar-item.js.map +1 -1
- package/dist/collection/components/navigation/sidebar/sidebar.stories.js +110 -17
- package/dist/collection/components/navigation/sidebar/sidebar.stories.js.map +1 -1
- package/dist/collection/components/notification/notification.stories.js +51 -4
- package/dist/collection/components/notification/notification.stories.js.map +1 -1
- package/dist/collection/components/number-indicator/number-indicator.stories.js +19 -0
- package/dist/collection/components/number-indicator/number-indicator.stories.js.map +1 -1
- package/dist/collection/components/pagination/pagination.stories.js +30 -3
- package/dist/collection/components/pagination/pagination.stories.js.map +1 -1
- package/dist/collection/components/progress-bar/progress-bar.stories.js +31 -8
- package/dist/collection/components/progress-bar/progress-bar.stories.js.map +1 -1
- package/dist/collection/components/radio-button/radio-button.stories.js +66 -13
- package/dist/collection/components/radio-button/radio-button.stories.js.map +1 -1
- package/dist/collection/components/search-bar/search-bar.js +6 -6
- package/dist/collection/components/search-bar/search-bar.js.map +1 -1
- package/dist/collection/components/search-bar/search-bar.stories.js +58 -9
- package/dist/collection/components/search-bar/search-bar.stories.js.map +1 -1
- package/dist/collection/components/search-field/search-field.stories.js +43 -7
- package/dist/collection/components/search-field/search-field.stories.js.map +1 -1
- package/dist/collection/components/select/multi-select/multiselect.js +6 -6
- package/dist/collection/components/select/multi-select/multiselect.js.map +1 -1
- package/dist/collection/components/select/multi-select/multiselect.stories.js +131 -5
- package/dist/collection/components/select/multi-select/multiselect.stories.js.map +1 -1
- package/dist/collection/components/select/single-select/select.stories.js +83 -26
- package/dist/collection/components/select/single-select/select.stories.js.map +1 -1
- package/dist/collection/components/slider/slider.stories.js +97 -13
- package/dist/collection/components/slider/slider.stories.js.map +1 -1
- package/dist/collection/components/spinner/spinner.stories.js +34 -2
- package/dist/collection/components/spinner/spinner.stories.js.map +1 -1
- package/dist/collection/components/status/status.stories.js +24 -1
- package/dist/collection/components/status/status.stories.js.map +1 -1
- package/dist/collection/components/stepper/stepper.stories.js +33 -16
- package/dist/collection/components/stepper/stepper.stories.js.map +1 -1
- package/dist/collection/components/switch/switch.stories.js +54 -4
- package/dist/collection/components/switch/switch.stories.js.map +1 -1
- package/dist/collection/components/table-advanced-version/table.stories.js +71 -11
- package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
- package/dist/collection/components/table-basic-version/table.stories.js +17 -1
- package/dist/collection/components/table-basic-version/table.stories.js.map +1 -1
- package/dist/collection/components/tabs/tabs.stories.js +89 -23
- package/dist/collection/components/tabs/tabs.stories.js.map +1 -1
- package/dist/collection/components/tag/tag.stories.js +18 -0
- package/dist/collection/components/tag/tag.stories.js.map +1 -1
- package/dist/collection/components/text-field/text-field.stories.js +104 -13
- package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.stories.js +48 -4
- package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -1
- package/dist/components/ifx-accordion-item.js +1 -1
- package/dist/components/ifx-faq.js +1 -1
- package/dist/components/ifx-modal.js +8 -8
- package/dist/components/ifx-modal.js.map +1 -1
- package/dist/components/ifx-multiselect.js +1 -1
- package/dist/components/ifx-search-bar.js +5 -5
- package/dist/components/ifx-search-bar.js.map +1 -1
- package/dist/components/ifx-set-filter.js +1 -1
- package/dist/components/ifx-sidebar-item.js +11 -11
- package/dist/components/ifx-sidebar-item.js.map +1 -1
- package/dist/components/{p-b2439194.js → p-62c6aeb2.js} +4 -4
- package/dist/components/{p-b2439194.js.map → p-62c6aeb2.js.map} +1 -1
- package/dist/components/{p-04b73e62.js → p-cf8fd0f4.js} +6 -6
- package/dist/components/p-cf8fd0f4.js.map +1 -0
- package/dist/esm/ifx-accordion_2.entry.js +2 -2
- package/dist/esm/ifx-accordion_2.entry.js.map +1 -1
- package/dist/esm/ifx-modal.entry.js +8 -8
- package/dist/esm/ifx-modal.entry.js.map +1 -1
- package/dist/esm/ifx-multiselect_2.entry.js +5 -5
- package/dist/esm/ifx-multiselect_2.entry.js.map +1 -1
- package/dist/esm/ifx-search-bar.entry.js +5 -5
- package/dist/esm/ifx-search-bar.entry.js.map +1 -1
- package/dist/esm/ifx-sidebar-item.entry.js +9 -9
- package/dist/esm/ifx-sidebar-item.entry.js.map +1 -1
- package/dist/esm/infineon-design-system-stencil.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
- package/dist/infineon-design-system-stencil/p-60dcd508.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-60dcd508.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-6a274db4.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-6a274db4.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-c3e3eda9.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-c3e3eda9.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-bc8a4226.entry.js → p-d93eb561.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-d93eb561.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-dac5d6d5.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-dac5d6d5.entry.js.map +1 -0
- package/dist/types/components/accordion/accordion.stories.d.ts +67 -1
- package/dist/types/components/accordion/accordionItem.d.ts +1 -1
- package/dist/types/components/alert/alert.stories.d.ts +38 -11
- package/dist/types/components/badge/badge.stories.d.ts +23 -3
- package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +66 -1
- package/dist/types/components/button/button.stories.d.ts +95 -16
- package/dist/types/components/card/card.stories.d.ts +95 -1
- package/dist/types/components/checkbox/checkbox.stories.d.ts +68 -10
- package/dist/types/components/content-switcher/content-switcher.stories.d.ts +66 -0
- package/dist/types/components/date-picker/date-picker.stories.d.ts +67 -2
- package/dist/types/components/dropdown/dropdown.stories.d.ts +111 -27
- package/dist/types/components/footer/footer.stories.d.ts +4 -0
- package/dist/types/components/icon/infineonIconStencil.stories.d.ts +5 -0
- package/dist/types/components/icon-button/icon-button.stories.d.ts +56 -8
- package/dist/types/components/link/link.stories.d.ts +52 -6
- package/dist/types/components/modal/modal.d.ts +2 -2
- package/dist/types/components/modal/modal.stories.d.ts +77 -3
- package/dist/types/components/navigation/navbar/navbar.stories.d.ts +243 -6
- package/dist/types/components/navigation/sidebar/sidebar-item.d.ts +2 -2
- package/dist/types/components/navigation/sidebar/sidebar.stories.d.ts +90 -7
- package/dist/types/components/notification/notification.stories.d.ts +44 -0
- package/dist/types/components/number-indicator/number-indicator.stories.d.ts +19 -0
- package/dist/types/components/pagination/pagination.stories.d.ts +27 -0
- package/dist/types/components/progress-bar/progress-bar.stories.d.ts +25 -4
- package/dist/types/components/radio-button/radio-button.stories.d.ts +59 -8
- package/dist/types/components/search-bar/search-bar.d.ts +1 -1
- package/dist/types/components/search-bar/search-bar.stories.d.ts +60 -3
- package/dist/types/components/search-field/search-field.stories.d.ts +36 -6
- package/dist/types/components/select/multi-select/multiselect.d.ts +1 -1
- package/dist/types/components/select/multi-select/multiselect.stories.d.ts +125 -0
- package/dist/types/components/select/single-select/select.stories.d.ts +67 -24
- package/dist/types/components/slider/slider.stories.d.ts +110 -0
- package/dist/types/components/spinner/spinner.stories.d.ts +32 -0
- package/dist/types/components/status/status.stories.d.ts +23 -2
- package/dist/types/components/stepper/stepper.stories.d.ts +21 -4
- package/dist/types/components/switch/switch.stories.d.ts +50 -1
- package/dist/types/components/table-basic-version/table.stories.d.ts +19 -1
- package/dist/types/components/tabs/tabs.stories.d.ts +77 -7
- package/dist/types/components/tag/tag.stories.d.ts +20 -0
- package/dist/types/components/text-field/text-field.stories.d.ts +96 -11
- package/dist/types/components/tooltip/tooltip.stories.d.ts +41 -6
- package/dist/types/components.d.ts +10 -10
- package/package.json +1 -1
- package/dist/components/p-04b73e62.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-222c1af9.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-222c1af9.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-436babb8.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-436babb8.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-9481adc8.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-9481adc8.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-bc8a4226.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js.map +0 -1
@@ -1,18 +1,55 @@
|
|
1
1
|
import { action } from "@storybook/addon-actions";
|
2
|
+
import { icons } from "@infineon/infineon-icons";
|
2
3
|
export default {
|
3
4
|
title: 'Components/Tabs',
|
4
5
|
tags: ['autodocs'],
|
5
6
|
component: 'ifx-tabs',
|
7
|
+
args: {
|
8
|
+
amountOfTabs: 3,
|
9
|
+
orientation: 'horizontal',
|
10
|
+
icon: '',
|
11
|
+
header: 'Tab',
|
12
|
+
disabled: false,
|
13
|
+
},
|
6
14
|
argTypes: {
|
7
|
-
amountOfTabs: {
|
15
|
+
amountOfTabs: {
|
16
|
+
name: 'Amount of Tabs', control: 'number',
|
17
|
+
description: 'Set the number of tabs.',
|
18
|
+
table: {
|
19
|
+
category: 'story controls',
|
20
|
+
type: {
|
21
|
+
summary: 'number'
|
22
|
+
}
|
23
|
+
}
|
24
|
+
},
|
8
25
|
orientation: {
|
9
|
-
name: 'Orientation',
|
10
26
|
options: ['horizontal', 'vertical'],
|
11
27
|
control: { type: 'radio' },
|
28
|
+
description: 'Set the orientation of the tabs.',
|
29
|
+
table: {
|
30
|
+
category: 'ifx-tabs props',
|
31
|
+
defaultValue: {
|
32
|
+
summary: 'horizontal',
|
33
|
+
},
|
34
|
+
type: {
|
35
|
+
summary: 'horizontal | vertical'
|
36
|
+
}
|
37
|
+
}
|
12
38
|
},
|
13
39
|
icon: {
|
14
|
-
name: '
|
15
|
-
control: { type: '
|
40
|
+
name: 'icon',
|
41
|
+
control: { type: 'select' },
|
42
|
+
options: ['none', ...Object.values(icons).map(i => i['name'])],
|
43
|
+
description: 'Set the icon of the tab. Choose "none" to display no icon.',
|
44
|
+
table: {
|
45
|
+
category: 'ifx-tab props',
|
46
|
+
defaultValue: {
|
47
|
+
summary: ''
|
48
|
+
},
|
49
|
+
type: {
|
50
|
+
summary: 'string'
|
51
|
+
}
|
52
|
+
}
|
16
53
|
},
|
17
54
|
fullWidth: {
|
18
55
|
name: 'Full width',
|
@@ -20,19 +57,53 @@ export default {
|
|
20
57
|
description: "Adds flex: 1 to the ifx-tab child components, thus making them occupy the full width of their parent"
|
21
58
|
},
|
22
59
|
iconPosition: {
|
23
|
-
name: 'Icon position',
|
24
60
|
options: ['left', 'right'],
|
25
61
|
control: { type: 'radio' },
|
26
|
-
|
62
|
+
description: 'Set the position of the icon.',
|
63
|
+
table: {
|
64
|
+
category: 'ifx-tab props',
|
65
|
+
defaultValue: {
|
66
|
+
summary: 'left'
|
67
|
+
},
|
68
|
+
type: {
|
69
|
+
summary: 'left | right'
|
70
|
+
},
|
71
|
+
},
|
27
72
|
},
|
28
73
|
activeTabIndex: {
|
29
|
-
|
30
|
-
|
74
|
+
description: 'Set the tab as active by providing the index (tab can not be disabled).',
|
75
|
+
table: {
|
76
|
+
category: 'ifx-tabs props',
|
77
|
+
defaultValue: { summary: '0' },
|
78
|
+
type: {
|
79
|
+
summary: 'number'
|
80
|
+
}
|
81
|
+
}
|
82
|
+
},
|
83
|
+
header: {
|
84
|
+
control: 'text',
|
85
|
+
description: 'Set the header of the tab.',
|
86
|
+
table: {
|
87
|
+
defaultValue: { summary: 'Tab' },
|
88
|
+
category: 'ifx-tab props',
|
89
|
+
type: {
|
90
|
+
summary: 'string'
|
91
|
+
}
|
92
|
+
}
|
93
|
+
},
|
94
|
+
disabled: {
|
95
|
+
control: 'boolean',
|
96
|
+
description: 'Set the tab to disabled. In the storybook, the second tab will be disabled.',
|
97
|
+
table: {
|
98
|
+
category: 'ifx-tab props',
|
99
|
+
defaultValue: { summary: 'false' },
|
100
|
+
}
|
31
101
|
},
|
32
102
|
ifxTabChange: {
|
33
103
|
action: 'ifxTabChange',
|
34
|
-
description: 'Custom event emitted on tab index change, containing the current (currentTab) and the previous tab (previousTab)',
|
104
|
+
description: 'Custom event emitted on tab index change, containing the current (currentTab) and the previous tab (previousTab).',
|
35
105
|
table: {
|
106
|
+
category: 'custom events',
|
36
107
|
type: {
|
37
108
|
summary: 'Framework integration',
|
38
109
|
detail: 'React: onIfxTabChange={handleChange}\nVue:@ifxTabChange="handleChange"\nAngular:(ifxTabChange)="handleChange()"\nVanillaJs:.addEventListener("ifxTabChange", (event) => {//handle change});',
|
@@ -49,14 +120,13 @@ const Template = args => {
|
|
49
120
|
tabsElement.addEventListener('ifxTabChange', action(`ifxTabChange`));
|
50
121
|
for (let i = 0; i < args.amountOfTabs; i++) {
|
51
122
|
const tabContent = document.createElement('ifx-tab');
|
52
|
-
tabContent.setAttribute('header',
|
123
|
+
tabContent.setAttribute('header', `${args.header} ${i + 1}`);
|
53
124
|
if (i == 1) {
|
54
|
-
tabContent.setAttribute('disabled',
|
55
|
-
}
|
56
|
-
if (args.icon) {
|
57
|
-
tabContent.setAttribute('icon', 'c-check-16');
|
58
|
-
tabContent.setAttribute('icon-position', args.iconPosition);
|
125
|
+
tabContent.setAttribute('disabled', args.disabled);
|
59
126
|
}
|
127
|
+
var icon = args.icon === 'none' ? '' : args.icon;
|
128
|
+
tabContent.setAttribute('icon', icon);
|
129
|
+
tabContent.setAttribute('icon-position', args.iconPosition);
|
60
130
|
tabContent.innerHTML = `
|
61
131
|
Content for Tab #${i + 1}. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.
|
62
132
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat, ligula eu aliquam bibendum, orci nisl cursus ipsum, nec egestas odio sapien eget neque.
|
@@ -71,13 +141,9 @@ Default.args = {
|
|
71
141
|
amountOfTabs: 3,
|
72
142
|
orientation: 'horizontal',
|
73
143
|
activeTabIndex: 0,
|
74
|
-
icon:
|
75
|
-
iconPosition: 'left'
|
76
|
-
|
77
|
-
|
78
|
-
Disabled.args = {
|
79
|
-
amountOfTabs: 3,
|
80
|
-
orientation: 'horizontal',
|
81
|
-
activeTabIndex: 2,
|
144
|
+
icon: '',
|
145
|
+
iconPosition: 'left',
|
146
|
+
header: 'Tab',
|
147
|
+
disabled: false,
|
82
148
|
};
|
83
149
|
//# sourceMappingURL=tabs.stories.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tabs.stories.js","sourceRoot":"","sources":["../../../src/components/tabs/tabs.stories.ts"],"names":[],"mappings":"AAAA,O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,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC5D,UAAU,CAAC,SAAS,GAAG;2BACA,CAAC,GAAG,CAAC;;;KAG3B,CAAC;QACF,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACb,YAAY,EAAE,CAAC;IACf,WAAW,EAAE,YAAY;IACzB,cAAc,EAAE,CAAC;IACjB,IAAI,EAAE,EAAE;IACR,YAAY,EAAE,MAAM;IACpB,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,KAAK;CAChB,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\nimport { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Tabs',\n tags: ['autodocs'],\n\n component: 'ifx-tabs',\n args: {\n amountOfTabs: 3,\n orientation: 'horizontal',\n icon: '',\n header: 'Tab',\n disabled: false,\n },\n argTypes: {\n amountOfTabs: {\n name: 'Amount of Tabs', control: 'number',\n description: 'Set the number of tabs.',\n table: {\n category: 'story controls',\n type: {\n summary: 'number'\n }\n }\n },\n orientation: {\n options: ['horizontal', 'vertical'],\n control: { type: 'radio' },\n description: 'Set the orientation of the tabs.',\n table: {\n category:\n 'ifx-tabs props',\n defaultValue: {\n summary: 'horizontal',\n },\n type: {\n summary: 'horizontal | vertical'\n }\n }\n },\n icon: {\n name: '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-tab props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\n }\n }\n },\n fullWidth: {\n name: 'Full width',\n control: {type: 'boolean'},\n description: \"Adds flex: 1 to the ifx-tab child components, thus making them occupy the full width of their parent\"\n },\n iconPosition: {\n options: ['left', 'right'],\n control: { type: 'radio' },\n description: 'Set the position of the icon.',\n table: {\n category: 'ifx-tab props',\n defaultValue: {\n summary: 'left'\n },\n type: {\n summary: 'left | right'\n },\n },\n },\n activeTabIndex: {\n description: 'Set the tab as active by providing the index (tab can not be disabled).',\n table: {\n category: 'ifx-tabs props',\n defaultValue: { summary: '0' },\n type: {\n summary: 'number'\n }\n }\n },\n header: {\n control: 'text',\n description: 'Set the header of the tab.',\n table: {\n defaultValue: { summary: 'Tab' },\n category: 'ifx-tab props',\n type: {\n summary: 'string'\n }\n }\n },\n disabled: {\n control: 'boolean',\n description: 'Set the tab to disabled. In the storybook, the second tab will be disabled.',\n table: {\n category: 'ifx-tab props',\n defaultValue: { summary: 'false' },\n }\n },\n ifxTabChange: {\n action: 'ifxTabChange',\n description: 'Custom event emitted on tab index change, containing the current (currentTab) and the previous tab (previousTab).',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxTabChange={handleChange}\\nVue:@ifxTabChange=\"handleChange\"\\nAngular:(ifxTabChange)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxTabChange\", (event) => {//handle change});',\n },\n },\n },\n },\n};\n\nconst Template = args => {\n const tabsElement = document.createElement('ifx-tabs') as HTMLIfxTabsElement;\n tabsElement.setAttribute('orientation', args.orientation);\n tabsElement.setAttribute('active-tab-index', args.activeTabIndex);\n tabsElement.setAttribute('full-width', args.fullWidth);\n tabsElement.addEventListener('ifxTabChange', action(`ifxTabChange`));\n\n for (let i = 0; i < args.amountOfTabs; i++) {\n const tabContent = document.createElement('ifx-tab');\n tabContent.setAttribute('header', `${args.header} ${i + 1}`);\n if (i == 1) {\n tabContent.setAttribute('disabled', args.disabled);\n }\n var icon = args.icon === 'none' ? '' : args.icon;\n tabContent.setAttribute('icon', icon);\n tabContent.setAttribute('icon-position', args.iconPosition);\n tabContent.innerHTML = `\n Content for Tab #${i + 1}. 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 tabsElement.append(tabContent);\n }\n\n return tabsElement;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n amountOfTabs: 3,\n orientation: 'horizontal',\n activeTabIndex: 0,\n icon: '',\n iconPosition: 'left',\n header: 'Tab',\n disabled: false,\n};"]}
|
@@ -7,9 +7,27 @@ export default {
|
|
7
7
|
icon: 'chevron-up-16',
|
8
8
|
},
|
9
9
|
argTypes: {
|
10
|
+
label: {
|
11
|
+
name: 'Label',
|
12
|
+
control: { type: 'text' },
|
13
|
+
description: 'Set the label of the tag.',
|
14
|
+
table: {
|
15
|
+
category: 'story controls',
|
16
|
+
type: {
|
17
|
+
summary: 'string'
|
18
|
+
}
|
19
|
+
}
|
20
|
+
},
|
10
21
|
icon: {
|
11
22
|
options: Object.values(icons).map(i => i['name']),
|
12
23
|
control: { type: 'select' },
|
24
|
+
description: 'Set the icon of the tag.',
|
25
|
+
table: {
|
26
|
+
category: 'ifx-tag props',
|
27
|
+
type: {
|
28
|
+
summary: 'string'
|
29
|
+
}
|
30
|
+
}
|
13
31
|
},
|
14
32
|
},
|
15
33
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tag.stories.js","sourceRoot":"","sources":["../../../src/components/tag/tag.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE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AAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Tag',\n tags: ['autodocs'],\n\n args: {\n label: 'Tag label',\n icon: 'chevron-up-16',\n },\n argTypes: {\n label: {\n name: 'Label',\n control: { type: 'text' },\n description: 'Set the label of the tag.',\n table: {\n category: 'story controls',\n type: {\n summary: 'string'\n }\n }\n },\n icon: {\n options: Object.values(icons).map(i => i['name']),\n control: { type: 'select' },\n description: 'Set the icon of the tag.',\n table: {\n category: 'ifx-tag props',\n type: {\n summary: 'string'\n }\n }\n },\n },\n};\n\nconst DefaultTemplate = args => `<ifx-tag icon=\"${args.icon}\">${args.label}</ifx-tag>`;\n\nexport const Default = DefaultTemplate.bind({});\n"]}
|
@@ -4,43 +4,134 @@ export default {
|
|
4
4
|
title: 'Components/Text Field',
|
5
5
|
// tags: ['autodocs'],
|
6
6
|
args: {
|
7
|
+
label: 'Label',
|
8
|
+
error: false,
|
7
9
|
disabled: false,
|
8
10
|
size: 'm',
|
11
|
+
icon: 'c-info-16',
|
9
12
|
success: false,
|
10
|
-
label: 'Label',
|
11
13
|
placeholder: 'Placeholder',
|
12
|
-
error: false,
|
13
14
|
caption: 'Caption',
|
14
15
|
required: true,
|
15
16
|
optional: false,
|
16
|
-
icon: 'c-info-16',
|
17
17
|
name: 'text-field',
|
18
|
-
showDeleteIcon: false
|
18
|
+
showDeleteIcon: false,
|
19
|
+
maxlength: '',
|
19
20
|
},
|
20
21
|
argTypes: {
|
22
|
+
label: {
|
23
|
+
name: 'Label of Text Field',
|
24
|
+
description: 'The text label displayed above the text field.',
|
25
|
+
table: {
|
26
|
+
category: 'story controls',
|
27
|
+
}
|
28
|
+
},
|
29
|
+
error: {
|
30
|
+
description: 'Indicates an error state for the text field.',
|
31
|
+
table: {
|
32
|
+
category: 'ifx-text-field props',
|
33
|
+
defaultValue: {
|
34
|
+
summary: false
|
35
|
+
}
|
36
|
+
}
|
37
|
+
},
|
38
|
+
disabled: {
|
39
|
+
description: 'Disables the text field.',
|
40
|
+
table: {
|
41
|
+
category: 'ifx-text-field props',
|
42
|
+
defaultValue: {
|
43
|
+
summary: false
|
44
|
+
}
|
45
|
+
}
|
46
|
+
},
|
21
47
|
size: {
|
22
48
|
description: 'Size options: s (36px) and m (40px) - default: m',
|
23
49
|
options: ['s', 'm'],
|
24
|
-
control:
|
50
|
+
control: 'radio',
|
51
|
+
table: {
|
52
|
+
category: 'ifx-text-field props',
|
53
|
+
defaultValue: {
|
54
|
+
summary: 'm'
|
55
|
+
}
|
56
|
+
}
|
25
57
|
},
|
26
58
|
icon: {
|
59
|
+
description: 'Specifies an icon to display within the text field.',
|
27
60
|
options: Object.values(icons).map(i => i['name']),
|
28
|
-
control:
|
61
|
+
control: 'select',
|
62
|
+
table: {
|
63
|
+
category: 'ifx-text-field props',
|
64
|
+
defaultValue: {
|
65
|
+
summary: 'c-info-16'
|
66
|
+
}
|
67
|
+
}
|
29
68
|
},
|
30
|
-
|
31
|
-
description: '
|
69
|
+
success: {
|
70
|
+
description: 'Indicates a successful state for the text field.',
|
71
|
+
table: {
|
72
|
+
category: 'ifx-text-field props',
|
73
|
+
defaultValue: {
|
74
|
+
summary: false
|
75
|
+
}
|
76
|
+
}
|
32
77
|
},
|
33
|
-
|
34
|
-
description: '
|
35
|
-
|
78
|
+
placeholder: {
|
79
|
+
description: 'Displays a placeholder text inside the text field when it is empty.',
|
80
|
+
table: {
|
81
|
+
category: 'ifx-text-field props',
|
82
|
+
}
|
83
|
+
},
|
84
|
+
caption: {
|
85
|
+
description: 'Text displayed below the text field to provide additional information.',
|
86
|
+
table: {
|
87
|
+
category: 'ifx-text-field props',
|
88
|
+
}
|
89
|
+
},
|
90
|
+
required: {
|
91
|
+
description: 'Marks the text field as required for form submission. Displays an asterisk next to the label when set to **true**.',
|
92
|
+
table: {
|
93
|
+
category: 'ifx-text-field props',
|
94
|
+
defaultValue: {
|
95
|
+
summary: true
|
96
|
+
}
|
97
|
+
}
|
98
|
+
},
|
99
|
+
optional: {
|
100
|
+
description: 'Indicates that the field is optional.',
|
101
|
+
table: {
|
102
|
+
category: 'ifx-text-field props',
|
103
|
+
defaultValue: {
|
104
|
+
summary: false
|
105
|
+
}
|
106
|
+
}
|
107
|
+
},
|
108
|
+
name: {
|
109
|
+
description: 'Name of the element, that is used as reference when a form is submitted.',
|
110
|
+
table: {
|
111
|
+
category: 'ifx-text-field props',
|
112
|
+
}
|
36
113
|
},
|
37
114
|
showDeleteIcon: {
|
38
|
-
description: '
|
115
|
+
description: 'Displays a delete icon inside the text field when set to **true**, allowing user to clear the input content.',
|
116
|
+
table: {
|
117
|
+
category: 'ifx-text-field props',
|
118
|
+
defaultValue: {
|
119
|
+
summary: false
|
120
|
+
}
|
121
|
+
}
|
122
|
+
},
|
123
|
+
maxlength: {
|
124
|
+
description: 'Specifies the maximum number of characters that can be entered into the text field.',
|
125
|
+
control: 'number',
|
126
|
+
table: {
|
127
|
+
category: 'ifx-text-field props',
|
128
|
+
}
|
39
129
|
},
|
40
130
|
ifxInput: {
|
41
131
|
action: 'ifxInput',
|
42
|
-
description: 'Custom event',
|
132
|
+
description: 'Custom event emitted on input change.',
|
43
133
|
table: {
|
134
|
+
category: 'custom events',
|
44
135
|
type: {
|
45
136
|
summary: 'Framework integration',
|
46
137
|
detail: 'React: onIfxInput={handleInput}\nVue:@ifxInput="handleInput"\nAngular:(ifxInput)="handleInput()"\nVanillaJs:.addEventListener("ifxInput", (event) => {//handle input});',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text-field.stories.js","sourceRoot":"","sources":["../../../src/components/text-field/text-field.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,sBAAsB;IAEtB,IAAI,EAAE;QACJ,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,GAAG;QACT,
|
1
|
+
{"version":3,"file":"text-field.stories.js","sourceRoot":"","sources":["../../../src/components/text-field/text-field.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,sBAAsB;IAEtB,IAAI,EAAE;QACJ,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,aAAa;QAC1B,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE,KAAK;QACrB,SAAS,EAAE,EAAE;KACd;IAED,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EAAE,gDAAgD;YAC7D,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,KAAK,EAAE;YACL,WAAW,EAAE,8CAA8C;YAC3D,KAAK,EAAE;gBACL,QAAQ,EAAE,sBAAsB;gBAChC,YAAY,EAAE;oBACZ,OAAO,EAAE,KAAK;iBACf;aACF;SACF;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,0BAA0B;YACvC,KAAK,EAAE;gBACL,QAAQ,EAAE,sBAAsB;gBAChC,YAAY,EAAE;oBACZ,OAAO,EAAE,KAAK;iBACf;aACF;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,kDAAkD;YAC/D,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;YACnB,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE;gBACL,QAAQ,EAAE,sBAAsB;gB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E,IAAI,CAAC,CAAC;IACnC,OAAO,CAAC,YAAY,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;IACzD,IAAI,SAAS;QAAE,OAAO,CAAC,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAE5D,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAGzD,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACnD,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAEjC,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\nimport { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Text Field',\n // tags: ['autodocs'],\n\n args: {\n label: 'Label',\n error: false,\n disabled: false,\n size: 'm',\n icon: 'c-info-16',\n success: false,\n placeholder: 'Placeholder',\n caption: 'Caption',\n required: true,\n optional: false,\n name: 'text-field',\n showDeleteIcon: false,\n maxlength: '',\n },\n\n argTypes: {\n label: {\n name: 'Label of Text Field',\n description: 'The text label displayed above the text field.',\n table: {\n category: 'story controls',\n }\n },\n error: {\n description: 'Indicates an error state for the text field.',\n table: {\n category: 'ifx-text-field props',\n defaultValue: {\n summary: false\n }\n }\n },\n disabled: {\n description: 'Disables the text field.',\n table: {\n category: 'ifx-text-field props',\n defaultValue: {\n summary: false\n }\n }\n },\n size: {\n description: 'Size options: s (36px) and m (40px) - default: m',\n options: ['s', 'm'],\n control: 'radio',\n table: {\n category: 'ifx-text-field props',\n defaultValue: {\n summary: 'm'\n }\n }\n },\n icon: {\n description: 'Specifies an icon to display within the text field.',\n options: Object.values(icons).map(i => i['name']),\n control: 'select',\n table: {\n category: 'ifx-text-field props',\n defaultValue: {\n summary: 'c-info-16'\n }\n }\n },\n success: {\n description: 'Indicates a successful state for the text field.',\n table: {\n category: 'ifx-text-field props',\n defaultValue: {\n summary: false\n }\n }\n },\n placeholder: {\n description: 'Displays a placeholder text inside the text field when it is empty.',\n table: {\n category: 'ifx-text-field props',\n }\n },\n caption: {\n description: 'Text displayed below the text field to provide additional information.',\n table: {\n category: 'ifx-text-field props',\n }\n },\n required: {\n description: 'Marks the text field as required for form submission. Displays an asterisk next to the label when set to **true**.',\n table: {\n category: 'ifx-text-field props',\n defaultValue: {\n summary: true\n }\n }\n },\n optional: {\n description: 'Indicates that the field is optional.',\n table: {\n category: 'ifx-text-field props',\n defaultValue: {\n summary: false\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-text-field props',\n }\n },\n showDeleteIcon: {\n description: 'Displays a delete icon inside the text field when set to **true**, allowing user to clear the input content.',\n table: {\n category: 'ifx-text-field props',\n defaultValue: {\n summary: false\n }\n }\n },\n maxlength: {\n description: 'Specifies the maximum number of characters that can be entered into the text field.',\n control: 'number',\n table: {\n category: 'ifx-text-field props',\n }\n },\n ifxInput: {\n action: 'ifxInput',\n description: 'Custom event emitted on input change.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxInput={handleInput}\\nVue:@ifxInput=\"handleInput\"\\nAngular:(ifxInput)=\"handleInput()\"\\nVanillaJs:.addEventListener(\"ifxInput\", (event) => {//handle input});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = ({ error, disabled, success, size, placeholder, label, caption, icon, required, optional, name, maxlength, showDeleteIcon }) => {\n const element = document.createElement('ifx-text-field');\n element.setAttribute('error', error);\n element.setAttribute('disabled', disabled);\n element.setAttribute('size', size);\n element.setAttribute('icon', icon);\n element.setAttribute('success', success);\n element.setAttribute('placeholder', placeholder);\n element.setAttribute('caption', caption);\n element.setAttribute('required', required);\n element.setAttribute('optional', optional);\n element.setAttribute('name', name);\n element.setAttribute('show-delete-icon', showDeleteIcon);\n if (maxlength) element.setAttribute('maxlength', maxlength);\n\n element.addEventListener('ifxInput', action('ifxInput'));\n\n\n const slotContent = document.createTextNode(label);\n element.appendChild(slotContent);\n\n return element;\n};\n\nexport const Default = DefaultTemplate.bind({});\n"]}
|
@@ -10,19 +10,63 @@ export default {
|
|
10
10
|
icon: 'c-info-24',
|
11
11
|
},
|
12
12
|
argTypes: {
|
13
|
+
text: {
|
14
|
+
description: 'Defines the main content of the tooltip.',
|
15
|
+
control: 'text',
|
16
|
+
table: {
|
17
|
+
category: 'ifx-tooltip props',
|
18
|
+
type: {
|
19
|
+
summary: 'string'
|
20
|
+
}
|
21
|
+
}
|
22
|
+
},
|
13
23
|
icon: {
|
24
|
+
description: 'The icon to be displayed. This control is only applicable when the variant is set to ***extended***.',
|
14
25
|
options: Object.values(icons).map(i => i['name']),
|
15
|
-
control:
|
26
|
+
control: 'select',
|
27
|
+
table: {
|
28
|
+
category: 'ifx-tooltip props',
|
29
|
+
type: {
|
30
|
+
summary: 'string',
|
31
|
+
defaultValue: {
|
32
|
+
summary: 'c-info-24'
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
16
36
|
},
|
17
37
|
position: {
|
38
|
+
description: 'Determines the position of the tooltip relative to the reference element.',
|
18
39
|
options: ['auto', 'bottom-start', 'top-start', 'left', 'bottom-end', 'top-end', 'right', 'bottom', 'top'],
|
19
|
-
control:
|
40
|
+
control: 'radio',
|
41
|
+
table: {
|
42
|
+
category: 'ifx-tooltip props',
|
43
|
+
defaultValue: {
|
44
|
+
summary: 'auto'
|
45
|
+
}
|
46
|
+
}
|
20
47
|
},
|
21
48
|
variant: {
|
49
|
+
description: 'Sets the style variant of the tooltip.',
|
50
|
+
control: 'radio',
|
22
51
|
options: ['compact', 'dismissible', 'extended'],
|
23
|
-
|
52
|
+
table: {
|
53
|
+
category: 'ifx-tooltip props',
|
54
|
+
defaultValue: {
|
55
|
+
summary: 'compact'
|
56
|
+
}
|
57
|
+
}
|
58
|
+
},
|
59
|
+
header: {
|
60
|
+
description: 'Specifies the header or title of the tooltip. This field is only applicable when the variant is set to ***dismissible*** or ***extended***.',
|
61
|
+
control: 'text',
|
62
|
+
if: { arg: 'variant', neq: 'compact' },
|
63
|
+
table: {
|
64
|
+
category: 'ifx-tooltip props',
|
65
|
+
type: {
|
66
|
+
summary: 'string'
|
67
|
+
}
|
68
|
+
}
|
24
69
|
},
|
25
|
-
header: { control: 'text', if: { arg: 'variant', neq: 'compact' } },
|
26
70
|
},
|
27
71
|
};
|
28
72
|
const DefaultTemplate = ({ header, text, variant, position, icon }) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tooltip.stories.js","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,MAAM,EAAE,kBAAkB;QAC1B,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,MAAM;QAChB,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,WAAW;KAClB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YACjD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;
|
1
|
+
{"version":3,"file":"tooltip.stories.js","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,MAAM,EAAE,kBAAkB;QAC1B,IAAI,E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1J,OAAO,EAAE,MAAM;YACf,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE;YACtC,KAAK,EAAE;gBACL,QAAQ,EAAE,mBAAmB;gBAC7B,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE;IACpE,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IACtD,IAAI,OAAO,KAAK,aAAa,IAAI,OAAO,KAAK,UAAU,EAAE,CAAC;QACxD,OAAO,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnC,OAAO,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC/E,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC3C,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAEnC,OAAO,CAAC,WAAW,GAAG,8CAA8C,OAAO,KAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,wCAAwC;IAE9J,OAAO,OAAO,CAAC;AACjB,CAAC,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/Tooltip',\n tags: ['autodocs'],\n args: {\n header: 'Tooltip headline',\n text: \"Hi, I'm a tooltip\",\n position: 'auto',\n variant: 'compact',\n icon: 'c-info-24',\n },\n argTypes: {\n text: {\n description: 'Defines the main content of the tooltip.',\n control: 'text',\n table: {\n category: 'ifx-tooltip props',\n type: {\n summary: 'string'\n }\n }\n },\n icon: {\n description: 'The icon to be displayed. This control is only applicable when the variant is set to ***extended***.',\n options: Object.values(icons).map(i => i['name']),\n control: 'select',\n table: {\n category: 'ifx-tooltip props',\n type: {\n summary: 'string',\n defaultValue: {\n summary: 'c-info-24'\n }\n }\n }\n },\n position: {\n description: 'Determines the position of the tooltip relative to the reference element.',\n options: ['auto', 'bottom-start', 'top-start', 'left', 'bottom-end', 'top-end', 'right', 'bottom', 'top'],\n control: 'radio',\n table: {\n category: 'ifx-tooltip props',\n defaultValue: {\n summary: 'auto'\n }\n }\n },\n variant: {\n description: 'Sets the style variant of the tooltip.',\n control: 'radio',\n options: ['compact', 'dismissible', 'extended'],\n table: {\n category: 'ifx-tooltip props',\n defaultValue: {\n summary: 'compact'\n }\n }\n },\n header: {\n description: 'Specifies the header or title of the tooltip. This field is only applicable when the variant is set to ***dismissible*** or ***extended***.',\n control: 'text', \n if: { arg: 'variant', neq: 'compact' },\n table: {\n category: 'ifx-tooltip props',\n type: {\n summary: 'string'\n }\n }\n },\n },\n};\n\nconst DefaultTemplate = ({ header, text, variant, position, icon }) => {\n const element = document.createElement('ifx-tooltip');\n if (variant === 'dismissible' || variant === 'extended') {\n element.setAttribute('header', header);\n }\n element.setAttribute('text', text);\n element.setAttribute('variant', variant === 'extended' ? 'extended' : variant);\n element.setAttribute('position', position);\n element.setAttribute('icon', icon);\n\n element.textContent = `I'm the tooltip reference element - Please ${variant==='dismissible' ? 'click' : 'hover'} me`; // Set content for the reference element\n\n return element;\n};\n\nexport const Default = DefaultTemplate.bind({});\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { I as IfxAccordionItem$1, d as defineCustomElement$1 } from './p-
|
1
|
+
import { I as IfxAccordionItem$1, d as defineCustomElement$1 } from './p-62c6aeb2.js';
|
2
2
|
|
3
3
|
const IfxAccordionItem = IfxAccordionItem$1;
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './p-68d90201.js';
|
2
2
|
import { d as defineCustomElement$4 } from './p-094bb435.js';
|
3
|
-
import { d as defineCustomElement$3 } from './p-
|
3
|
+
import { d as defineCustomElement$3 } from './p-62c6aeb2.js';
|
4
4
|
import { d as defineCustomElement$2 } from './p-7e430b83.js';
|
5
5
|
|
6
6
|
const faqCss = ".container{padding-top:10px}";
|
@@ -154,8 +154,8 @@ const IfxModal$1 = /*@__PURE__*/ proxyCustomElement(class IfxModal extends H {
|
|
154
154
|
super();
|
155
155
|
this.__registerHost();
|
156
156
|
this.__attachShadow();
|
157
|
-
this.
|
158
|
-
this.
|
157
|
+
this.ifxOpen = createEvent(this, "ifxOpen", 7);
|
158
|
+
this.ifxClose = createEvent(this, "ifxClose", 7);
|
159
159
|
this.focusableElements = [];
|
160
160
|
this.handleTopFocus = () => {
|
161
161
|
this.attemptFocus(this.getLastFocusableElement());
|
@@ -219,12 +219,12 @@ const IfxModal$1 = /*@__PURE__*/ proxyCustomElement(class IfxModal extends H {
|
|
219
219
|
(_a = this.getLastFocusableElement()) === null || _a === void 0 ? void 0 : _a.focus();
|
220
220
|
(_b = this.getLastFocusableElement()) === null || _b === void 0 ? void 0 : _b.blur();
|
221
221
|
}, 0);
|
222
|
-
this.
|
222
|
+
this.ifxOpen.emit();
|
223
223
|
});
|
224
224
|
this.hostElement.addEventListener('keydown', this.handleKeypress);
|
225
225
|
}
|
226
226
|
catch (err) {
|
227
|
-
this.
|
227
|
+
this.ifxOpen.emit();
|
228
228
|
}
|
229
229
|
}
|
230
230
|
close() {
|
@@ -234,13 +234,13 @@ const IfxModal$1 = /*@__PURE__*/ proxyCustomElement(class IfxModal extends H {
|
|
234
234
|
});
|
235
235
|
anim.addEventListener('finish', () => {
|
236
236
|
this.showModal = false;
|
237
|
-
this.
|
237
|
+
this.ifxClose.emit();
|
238
238
|
});
|
239
239
|
this.hostElement.removeEventListener('keydown', this.handleKeypress);
|
240
240
|
}
|
241
241
|
catch (err) {
|
242
242
|
this.showModal = false;
|
243
|
-
this.
|
243
|
+
this.ifxClose.emit();
|
244
244
|
}
|
245
245
|
}
|
246
246
|
doBeforeClose(trigger) {
|
@@ -275,8 +275,8 @@ const IfxModal$1 = /*@__PURE__*/ proxyCustomElement(class IfxModal extends H {
|
|
275
275
|
}
|
276
276
|
render() {
|
277
277
|
const isAlertVariant = this.variant !== 'default';
|
278
|
-
return (h(Host, { key: '
|
279
|
-
h("ifx-icon-button", { key: '
|
278
|
+
return (h(Host, { key: '38194353600e6e6ba689ff3c3bec631624c12f24' }, h("div", { key: 'f08db61f400c4af5d0384dc996ff47630537ab53', ref: (el) => (this.modalContainer = el), class: `modal-container ${this.showModal ? 'open' : ''}` }, h("div", { key: '0f80cf4b8f04c46df7ccd8f3cff9fdeb4171cf90', class: "modal-overlay", onClick: () => this.handleOverlayClick() }), h("div", { key: '5fe062d671589f423ef9bbd8e485f4e345e2a7a9', "data-focus-trap-edge": true, onFocus: this.handleTopFocus, tabindex: "0" }), h("div", { key: 'b4bd6f3cc799ed24e5eb4736b3d6f9b0d69e408c', class: `modal-content-container ${this.size}`, role: "dialog", "aria-modal": "true", "aria-label": this.caption }, isAlertVariant ? (h("div", { class: `modal-icon-container ${this.variant === 'alert-brand' ? '' : 'danger'}` }, this.alertIcon ? h("ifx-icon", { icon: this.alertIcon }) : null)) : null, h("div", { key: '09f8862f88cde0d410b50da912563db79e812f8d', class: "modal-content" }, h("div", { key: '6770fefb279be63b37179a6e531214a94a43df41', class: "modal-header" }, h("h2", { key: 'babc6449e513fc3ef8513ef98fa192393b32918c', class: "modal-caption" }, this.caption), this.showCloseButton &&
|
279
|
+
h("ifx-icon-button", { key: '6d7fe6a29c39a3c5e3662107f78ca5768ac3ce00', class: 'modal-close-button', ref: (el) => (this.closeButton = el), icon: "cross-24", variant: "tertiary", onClick: () => this.doBeforeClose('CLOSE_BUTTON') })), h("div", { key: '0488350e36fd845481e2bb779e7b54484dd9e070', class: "modal-body" }, h("slot", { key: '269d38f446c6d3d80f89538b57256e19bcdf871d', name: "content" /*onSlotchange={() => console.log('slots children modified')}*/ })), h("div", { key: 'cbf98594014a535f7f8e08e59af6600f70a24350', class: `modal-footer ${this.slotButtonsPresent ? 'buttons-present' : ''}` }, h("slot", { key: '08f41c2265ec73b466ce8c666d1d653aa2d6e114', name: "buttons", onSlotchange: (e) => this.handleButtonsSlotChange(e) })))), h("div", { key: 'a4d68099d24172497f3e5e20abb44a9d7279b236', "data-focus-trap-edge": true, onFocus: this.handleBottomFocus, tabindex: "0" }))));
|
280
280
|
}
|
281
281
|
get hostElement() { return this; }
|
282
282
|
static get watchers() { return {
|