@infineon/infineon-design-system-stencil 31.0.0--canary.1697.223df0ff1431a5398fd1261ed013c9dd2a89e7a0.0 → 31.0.0--canary.1640.0cb387dc208aadd19f988395e2eb1027e7e7f343.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 +7 -7
- package/dist/cjs/ifx-accordion_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js +1 -1
- package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/ifx-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-chip_3.cjs.entry.js +25 -27
- package/dist/cjs/ifx-chip_3.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 +4 -4
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-navbar.cjs.entry.js +3 -3
- package/dist/cjs/ifx-navbar.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 -10
- package/dist/cjs/ifx-sidebar-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-table.cjs.entry.js +22 -20
- package/dist/cjs/ifx-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-tabs.cjs.entry.js +6 -6
- package/dist/cjs/ifx-tabs.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.js +2 -2
- package/dist/collection/components/accordion/accordion.js.map +1 -1
- package/dist/collection/components/accordion/accordion.stories.js +81 -7
- package/dist/collection/components/accordion/accordion.stories.js.map +1 -1
- package/dist/collection/components/accordion/accordionItem.js +10 -10
- 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-item-label.js +3 -3
- package/dist/collection/components/breadcrumb/breadcrumb-item-label.js.map +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +3 -3
- package/dist/collection/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +87 -13
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
- package/dist/collection/components/button/button.stories.js +101 -9
- package/dist/collection/components/button/button.stories.js.map +1 -1
- package/dist/collection/components/card/card.stories.js +85 -4
- package/dist/collection/components/card/card.stories.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.stories.js +72 -14
- package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -1
- package/dist/collection/components/chip/chip-item/chip-item.js +4 -4
- package/dist/collection/components/chip/chip-item/chip-item.js.map +1 -1
- package/dist/collection/components/chip/chip.js +15 -15
- package/dist/collection/components/chip/chip.js.map +1 -1
- package/dist/collection/components/chip/chip.stories.js +21 -26
- package/dist/collection/components/chip/chip.stories.js.map +1 -1
- package/dist/collection/components/chip/interfaces.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 +97 -7
- package/dist/collection/components/date-picker/date-picker.stories.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.stories.js +222 -64
- package/dist/collection/components/dropdown/dropdown.stories.js.map +1 -1
- package/dist/collection/components/footer/footer.stories.js +31 -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 +53 -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.js +4 -4
- package/dist/collection/components/navigation/navbar/navbar.js.map +1 -1
- package/dist/collection/components/navigation/navbar/navbar.stories.js +176 -12
- package/dist/collection/components/navigation/navbar/navbar.stories.js.map +1 -1
- package/dist/collection/components/navigation/sidebar/sidebar-item.js +11 -32
- package/dist/collection/components/navigation/sidebar/sidebar-item.js.map +1 -1
- package/dist/collection/components/navigation/sidebar/sidebar.stories.js +184 -19
- package/dist/collection/components/navigation/sidebar/sidebar.stories.js.map +1 -1
- package/dist/collection/components/notification/notification.stories.js +55 -8
- 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.js +8 -57
- package/dist/collection/components/pagination/pagination.js.map +1 -1
- package/dist/collection/components/pagination/pagination.stories.js +19 -16
- 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 +54 -8
- package/dist/collection/components/search-field/search-field.stories.js.map +1 -1
- package/dist/collection/components/segmented-control/segmented-control.stories.js +1 -10
- package/dist/collection/components/segmented-control/segmented-control.stories.js.map +1 -1
- package/dist/collection/components/select/multi-select/multiselect.js +5 -5
- 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 +25 -1
- package/dist/collection/components/status/status.stories.js.map +1 -1
- package/dist/collection/components/stepper/stepper.stories.js +54 -25
- package/dist/collection/components/stepper/stepper.stories.js.map +1 -1
- package/dist/collection/components/switch/switch.stories.js +51 -4
- package/dist/collection/components/switch/switch.stories.js.map +1 -1
- package/dist/collection/components/table-advanced-version/table.js +23 -21
- package/dist/collection/components/table-advanced-version/table.js.map +1 -1
- package/dist/collection/components/table-advanced-version/table.stories.js +124 -39
- package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
- package/dist/collection/components/table-basic-version/table.stories.js +31 -4
- package/dist/collection/components/table-basic-version/table.stories.js.map +1 -1
- package/dist/collection/components/tabs/tabs.js +7 -7
- package/dist/collection/components/tabs/tabs.js.map +1 -1
- package/dist/collection/components/tabs/tabs.stories.js +104 -29
- 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 +116 -13
- package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
- package/dist/collection/components/textarea/textarea.stories.js +1 -3
- package/dist/collection/components/textarea/textarea.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-accordion.js +1 -1
- package/dist/components/ifx-breadcrumb-item-label.js +2 -2
- package/dist/components/ifx-breadcrumb-item-label.js.map +1 -1
- package/dist/components/ifx-breadcrumb.js +3 -3
- package/dist/components/ifx-breadcrumb.js.map +1 -1
- package/dist/components/ifx-chip-item.js +1 -1
- package/dist/components/ifx-chip.js +1 -1
- package/dist/components/ifx-faq.js +2 -2
- 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-navbar.js +4 -4
- package/dist/components/ifx-navbar.js.map +1 -1
- package/dist/components/ifx-pagination.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 -13
- package/dist/components/ifx-sidebar-item.js.map +1 -1
- package/dist/components/ifx-table.js +26 -24
- package/dist/components/ifx-table.js.map +1 -1
- package/dist/components/ifx-tabs.js +6 -6
- package/dist/components/ifx-tabs.js.map +1 -1
- package/dist/components/{p-654ff7d8.js → p-120f0d27.js} +3 -3
- package/dist/components/{p-654ff7d8.js.map → p-120f0d27.js.map} +1 -1
- package/dist/components/{p-a7e5035e.js → p-62a4b616.js} +9 -12
- package/dist/components/p-62a4b616.js.map +1 -0
- package/dist/components/{p-e57d6c00.js → p-6a284649.js} +5 -5
- package/dist/components/p-6a284649.js.map +1 -0
- package/dist/components/{p-0fce434b.js → p-7c1f2252.js} +15 -15
- package/dist/components/p-7c1f2252.js.map +1 -0
- package/dist/components/{p-ff48962a.js → p-a51cb7b6.js} +8 -8
- package/dist/components/{p-ff48962a.js.map → p-a51cb7b6.js.map} +1 -1
- package/dist/components/{p-d3904b2f.js → p-bb48fe64.js} +5 -5
- package/dist/components/p-bb48fe64.js.map +1 -0
- package/dist/esm/ifx-accordion_2.entry.js +7 -7
- package/dist/esm/ifx-accordion_2.entry.js.map +1 -1
- package/dist/esm/ifx-breadcrumb-item-label.entry.js +1 -1
- package/dist/esm/ifx-breadcrumb-item-label.entry.js.map +1 -1
- package/dist/esm/ifx-breadcrumb.entry.js +3 -3
- package/dist/esm/ifx-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ifx-chip_3.entry.js +25 -27
- package/dist/esm/ifx-chip_3.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 +4 -4
- package/dist/esm/ifx-multiselect_2.entry.js.map +1 -1
- package/dist/esm/ifx-navbar.entry.js +3 -3
- package/dist/esm/ifx-navbar.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 -10
- package/dist/esm/ifx-sidebar-item.entry.js.map +1 -1
- package/dist/esm/ifx-table.entry.js +22 -20
- package/dist/esm/ifx-table.entry.js.map +1 -1
- package/dist/esm/ifx-tabs.entry.js +6 -6
- package/dist/esm/ifx-tabs.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-0a03645f.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-0a03645f.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-0b90ce9a.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-0b90ce9a.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-1da58025.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-1da58025.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-3e68969c.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-500bc0ed.entry.js.map → p-3e68969c.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-258c4e35.entry.js → p-68dd9fa2.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-68dd9fa2.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-75d5418a.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-75d5418a.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-88f484ee.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-88f484ee.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-1f004047.entry.js → p-8953e0ef.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-8953e0ef.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-7cc1beed.entry.js → p-aebfd7f8.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-aebfd7f8.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-e67e7cbc.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-e67e7cbc.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-6c18926e.entry.js → p-fd0474f3.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-fd0474f3.entry.js.map +1 -0
- package/dist/types/components/accordion/accordion.stories.d.ts +67 -1
- package/dist/types/components/accordion/accordionItem.d.ts +3 -3
- 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-item-label.d.ts +1 -1
- package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +83 -1
- package/dist/types/components/button/button.stories.d.ts +92 -16
- package/dist/types/components/card/card.stories.d.ts +95 -1
- package/dist/types/components/checkbox/checkbox.stories.d.ts +65 -10
- package/dist/types/components/chip/chip-item/chip-item.d.ts +1 -1
- package/dist/types/components/chip/chip.d.ts +1 -1
- package/dist/types/components/chip/chip.stories.d.ts +11 -4
- package/dist/types/components/chip/interfaces.d.ts +1 -1
- package/dist/types/components/content-switcher/content-switcher.stories.d.ts +66 -0
- package/dist/types/components/date-picker/date-picker.stories.d.ts +89 -2
- package/dist/types/components/dropdown/dropdown.stories.d.ts +90 -33
- package/dist/types/components/footer/footer.stories.d.ts +26 -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 +49 -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 +222 -6
- package/dist/types/components/navigation/sidebar/sidebar-item.d.ts +2 -3
- package/dist/types/components/navigation/sidebar/sidebar.stories.d.ts +161 -7
- package/dist/types/components/notification/notification.stories.d.ts +46 -2
- package/dist/types/components/number-indicator/number-indicator.stories.d.ts +19 -0
- package/dist/types/components/pagination/pagination.d.ts +1 -4
- package/dist/types/components/pagination/pagination.stories.d.ts +12 -8
- 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 +45 -6
- package/dist/types/components/segmented-control/segmented-control.stories.d.ts +0 -3
- 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 +24 -2
- package/dist/types/components/stepper/stepper.stories.d.ts +30 -6
- package/dist/types/components/switch/switch.stories.d.ts +47 -1
- package/dist/types/components/table-advanced-version/table.stories.d.ts +50 -11
- package/dist/types/components/table-basic-version/table.stories.d.ts +21 -1
- package/dist/types/components/tabs/tabs.d.ts +1 -1
- package/dist/types/components/tabs/tabs.stories.d.ts +88 -9
- package/dist/types/components/tag/tag.stories.d.ts +20 -0
- package/dist/types/components/text-field/text-field.stories.d.ts +106 -10
- package/dist/types/components/tooltip/tooltip.stories.d.ts +41 -6
- package/dist/types/components.d.ts +20 -28
- package/package.json +3 -2
- package/dist/components/p-0fce434b.js.map +0 -1
- package/dist/components/p-a7e5035e.js.map +0 -1
- package/dist/components/p-d3904b2f.js.map +0 -1
- package/dist/components/p-e57d6c00.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-1f004047.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-258c4e35.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-500bc0ed.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-5acdecf6.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-5acdecf6.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-6c18926e.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-77a8fc5e.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-77a8fc5e.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-7cc1beed.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-98c50956.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-98c50956.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-c6ff49d7.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-c6ff49d7.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-d61ab729.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-d61ab729.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-f63ce1bc.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-f63ce1bc.entry.js.map +0 -1
@@ -1,18 +1,77 @@
|
|
1
1
|
import { action } from "@storybook/addon-actions";
|
2
|
+
import { icons } from "@infineon/infineon-icons";
|
2
3
|
export default {
|
3
4
|
title: 'Components/Content Switcher',
|
4
5
|
tags: ['autodocs'],
|
5
6
|
args: {
|
6
7
|
amountOfItems: 4,
|
8
|
+
label: 'Item',
|
9
|
+
value: 'item',
|
10
|
+
selected: false,
|
11
|
+
icon: 'applications-16'
|
7
12
|
},
|
8
13
|
argTypes: {
|
9
14
|
amountOfItems: {
|
15
|
+
name: 'Amount of Items',
|
10
16
|
control: { type: 'number' },
|
17
|
+
description: 'Set the number of content-switcher-items to be rendered.',
|
18
|
+
table: {
|
19
|
+
category: 'story controls',
|
20
|
+
type: {
|
21
|
+
summary: 'number'
|
22
|
+
}
|
23
|
+
}
|
24
|
+
},
|
25
|
+
label: {
|
26
|
+
name: 'Label of Content Switcher Item',
|
27
|
+
control: { type: 'text' },
|
28
|
+
description: 'Set the label of the *<ifx-content-switcher-item>*.',
|
29
|
+
table: {
|
30
|
+
category: 'story controls',
|
31
|
+
type: {
|
32
|
+
summary: 'string'
|
33
|
+
}
|
34
|
+
}
|
35
|
+
},
|
36
|
+
value: {
|
37
|
+
control: { type: 'text' },
|
38
|
+
description: 'Set the value of the content-switcher-item.',
|
39
|
+
table: {
|
40
|
+
category: 'content-switcher-item props',
|
41
|
+
type: {
|
42
|
+
summary: 'string'
|
43
|
+
}
|
44
|
+
}
|
45
|
+
},
|
46
|
+
selected: {
|
47
|
+
control: { type: 'boolean' },
|
48
|
+
description: 'Set the selected state of the content-switcher-item. Only one item can be selected at the time. If there initially exists more than one selected item, then only the first item will be selected.',
|
49
|
+
table: {
|
50
|
+
category: 'content-switcher-item props',
|
51
|
+
defaultValue: {
|
52
|
+
summary: 'false'
|
53
|
+
},
|
54
|
+
type: {
|
55
|
+
summary: 'boolean'
|
56
|
+
}
|
57
|
+
}
|
58
|
+
},
|
59
|
+
icon: {
|
60
|
+
description: 'The icon of the content-switcher-item.',
|
61
|
+
options: Object.values(icons).map(i => i['name']),
|
62
|
+
control: { type: 'select' },
|
63
|
+
table: {
|
64
|
+
category: 'ifx-icon props',
|
65
|
+
type: {
|
66
|
+
summary: 'string'
|
67
|
+
}
|
68
|
+
}
|
11
69
|
},
|
12
70
|
ifxChange: {
|
13
71
|
action: 'ifxChange',
|
14
72
|
description: 'Custom event emitted when a different content-switcher-item gets selected. Contains the value of the previous and the new selected item.',
|
15
73
|
table: {
|
74
|
+
category: 'custom events',
|
16
75
|
type: {
|
17
76
|
summary: 'Framework integration',
|
18
77
|
detail: 'React: onIfxChange={handleChange}\nVue:@ifxChange="handleChange"\nAngular:(ifxChange)="handleChange()"\nVanillaJs:.addEventListener("ifxChange", (event) => {//handle change});',
|
@@ -21,14 +80,17 @@ export default {
|
|
21
80
|
}
|
22
81
|
},
|
23
82
|
};
|
24
|
-
const DefaultTemplate = ({ amountOfItems }) => {
|
83
|
+
const DefaultTemplate = ({ amountOfItems, label, value, icon, selected }) => {
|
25
84
|
const element = document.createElement('ifx-content-switcher');
|
26
85
|
for (let i = 0; i < amountOfItems; i++) {
|
27
86
|
const item = document.createElement('ifx-content-switcher-item');
|
28
|
-
item.setAttribute('value',
|
87
|
+
item.setAttribute('value', `${value} ${i + 1}`);
|
29
88
|
item.innerHTML = `
|
30
|
-
<ifx-icon icon="
|
89
|
+
<ifx-icon icon="${icon}"></ifx-icon> ${label} ${i + 1}
|
31
90
|
`;
|
91
|
+
if (i === 1 && selected) {
|
92
|
+
item.setAttribute('selected', 'true');
|
93
|
+
}
|
32
94
|
element.appendChild(item);
|
33
95
|
}
|
34
96
|
element.addEventListener('ifxChange', action('ifxChange'));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"content-switcher.stories.js","sourceRoot":"","sources":["../../../src/components/content-switcher/content-switcher.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;
|
1
|
+
{"version":3,"file":"content-switcher.stories.js","sourceRoot":"","sources":["../../../src/components/content-switcher/content-switcher.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,6BAA6B;IACpC,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,aAAa,EAAE,CAAC;QAChB,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,iBAAiB;KAExB;IACD,QAAQ,EAAE;QACR,aAAa,EAAE;YACb,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,WAAW,EAAE,0DAA0D;YACvE,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;gBAC1B,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,gCAAgC;YACtC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,qDAAqD;YAClE,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;gBAC1B,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,6CAA6C;YAC1D,KAAK,EAAE;gBACL,QAAQ,EAAE,6BAA6B;gBACvC,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,EAAE,IAA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,iBAAiB,KAAK,IAAI,CAAC,GAAG,CAAC;KACtD,CAAC;QACF,IAAI,CAAC,KAAK,CAAC,IAAI,QAAQ,EAAE,CAAC;YACxB,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACxC,CAAC;QAED,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,CAAC,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IAE3D,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/Content Switcher',\n tags: ['autodocs'],\n\n args: {\n amountOfItems: 4,\n label: 'Item',\n value: 'item',\n selected: false,\n icon: 'applications-16'\n\n },\n argTypes: {\n amountOfItems: {\n name: 'Amount of Items',\n control: { type: 'number' },\n description: 'Set the number of content-switcher-items to be rendered.',\n table: {\n category: 'story controls',\n type: {\n summary: 'number'\n }\n }\n },\n label: {\n name: 'Label of Content Switcher Item',\n control: { type: 'text' },\n description: 'Set the label of the *<ifx-content-switcher-item>*.',\n table: {\n category: 'story controls',\n type: {\n summary: 'string'\n }\n }\n },\n value: {\n control: { type: 'text' },\n description: 'Set the value of the content-switcher-item.',\n table: {\n category: 'content-switcher-item props',\n type: {\n summary: 'string'\n }\n }\n },\n selected: {\n control: { type: 'boolean' },\n description: 'Set the selected state of the content-switcher-item. Only one item can be selected at the time. If there initially exists more than one selected item, then only the first item will be selected.',\n table: {\n category: 'content-switcher-item props',\n defaultValue: {\n summary: 'false'\n },\n type: {\n summary: 'boolean'\n }\n }\n },\n icon: {\n description: 'The icon of the content-switcher-item.',\n options: Object.values(icons).map(i => i['name']),\n control: { type: 'select' },\n table: {\n category: 'ifx-icon props',\n type: {\n summary: 'string'\n }\n }\n },\n ifxChange: {\n action: 'ifxChange',\n description: 'Custom event emitted when a different content-switcher-item gets selected. Contains the value of the previous and the new selected item.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxChange={handleChange}\\nVue:@ifxChange=\"handleChange\"\\nAngular:(ifxChange)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxChange\", (event) => {//handle change});',\n },\n },\n }\n },\n};\n\nconst DefaultTemplate = ({ amountOfItems, label, value, icon, selected }) => {\n const element = document.createElement('ifx-content-switcher');\n\n for (let i = 0; i < amountOfItems; i++) {\n const item = document.createElement('ifx-content-switcher-item');\n item.setAttribute('value', `${value} ${i + 1}`);\n item.innerHTML = `\n <ifx-icon icon=\"${icon}\"></ifx-icon> ${label} ${i + 1}\n `;\n if (i === 1 && selected) {\n item.setAttribute('selected', 'true');\n }\n\n element.appendChild(item);\n }\n element.addEventListener('ifxChange', action('ifxChange'));\n\n return element;\n};\n\nexport const Default = DefaultTemplate.bind({});"]}
|
@@ -12,24 +12,111 @@ export default {
|
|
12
12
|
max: '',
|
13
13
|
min: '',
|
14
14
|
label: "Label Text",
|
15
|
-
caption: "Caption text, description, error notification",
|
15
|
+
caption: "Caption text, description, error notification.",
|
16
|
+
AriaLabel: 'Date Picker',
|
17
|
+
required: false,
|
16
18
|
},
|
17
19
|
argTypes: {
|
20
|
+
label: {
|
21
|
+
description: 'Label of Date Picker.',
|
22
|
+
table: {
|
23
|
+
category: 'ifx-date-picker props',
|
24
|
+
}
|
25
|
+
},
|
26
|
+
caption: {
|
27
|
+
description: 'Caption text, description, error notification.',
|
28
|
+
table: {
|
29
|
+
category: 'ifx-date-picker props',
|
30
|
+
}
|
31
|
+
},
|
32
|
+
min: {
|
33
|
+
description: 'Minimum date that can be selected. The parsed value is always formatted as yyyy-mm-dd.',
|
34
|
+
table: {
|
35
|
+
category: 'ifx-date-picker props',
|
36
|
+
}
|
37
|
+
},
|
38
|
+
max: {
|
39
|
+
description: 'The latest date that can be selected. The parsed value is always formatted as yyyy-mm-dd.',
|
40
|
+
table: {
|
41
|
+
category: 'ifx-date-picker props',
|
42
|
+
}
|
43
|
+
},
|
44
|
+
disabled: {
|
45
|
+
description: 'Disables the date picker',
|
46
|
+
control: 'boolean',
|
47
|
+
table: {
|
48
|
+
category: 'ifx-date-picker props',
|
49
|
+
defaultValue: {
|
50
|
+
summary: false
|
51
|
+
}
|
52
|
+
}
|
53
|
+
},
|
54
|
+
success: {
|
55
|
+
description: 'Indicates success in the date picker.',
|
56
|
+
control: 'boolean',
|
57
|
+
table: {
|
58
|
+
category: 'ifx-date-picker props',
|
59
|
+
defaultValue: {
|
60
|
+
summary: false
|
61
|
+
}
|
62
|
+
}
|
63
|
+
},
|
64
|
+
error: {
|
65
|
+
description: 'Indicates error in the date picker.',
|
66
|
+
control: 'boolean',
|
67
|
+
table: {
|
68
|
+
category: 'ifx-date-picker props',
|
69
|
+
defaultValue: {
|
70
|
+
summary: false
|
71
|
+
}
|
72
|
+
}
|
73
|
+
},
|
18
74
|
size: {
|
19
|
-
description: '
|
75
|
+
description: 'Sets the size of the date picker. Options: Height small (36px) and Height large (40px).S',
|
76
|
+
control: 'radio',
|
20
77
|
options: ['s', 'l'],
|
21
|
-
|
78
|
+
table: {
|
79
|
+
category: 'ifx-date-picker props',
|
80
|
+
defaultValue: {
|
81
|
+
summary: 's'
|
82
|
+
}
|
83
|
+
}
|
22
84
|
},
|
23
85
|
name: {
|
24
|
-
description: 'Name of the element, that is used as reference when a form is submitted.'
|
86
|
+
description: 'Name of the element, that is used as reference when a form is submitted.',
|
87
|
+
control: 'text',
|
88
|
+
table: {
|
89
|
+
category: 'ifx-date-picker props'
|
90
|
+
}
|
25
91
|
},
|
26
92
|
value: {
|
27
|
-
description: 'Displayed date is formatted based on the locale of the user`s browser, but the parsed value is always formatted yyyy-mm-dd'
|
93
|
+
description: 'Displayed date is formatted based on the locale of the user`s browser, but the parsed value is always formatted as yyyy-mm-dd.',
|
94
|
+
table: {
|
95
|
+
category: 'ifx-date-picker props'
|
96
|
+
}
|
97
|
+
},
|
98
|
+
AriaLabel: {
|
99
|
+
control: { type: 'text' },
|
100
|
+
description: 'Set the aria label of the date picker. Enhances accessibility.',
|
101
|
+
table: {
|
102
|
+
category: 'ifx-date-picker props'
|
103
|
+
}
|
104
|
+
},
|
105
|
+
required: {
|
106
|
+
description: 'Set the required attribute to true to make the date picker mandatory.',
|
107
|
+
control: 'boolean',
|
108
|
+
table: {
|
109
|
+
category: 'ifx-date-picker props',
|
110
|
+
defaultValue: {
|
111
|
+
summary: false
|
112
|
+
}
|
113
|
+
}
|
28
114
|
},
|
29
115
|
ifxDate: {
|
30
116
|
action: 'ifxDate',
|
31
|
-
description: '
|
117
|
+
description: 'A custom event emitted when a date in the calendar is being selected.',
|
32
118
|
table: {
|
119
|
+
category: 'custom events',
|
33
120
|
type: {
|
34
121
|
summary: 'Framework integration',
|
35
122
|
detail: 'React: onIfxDate={handleInput}\nVue:@ifxDate="handleInput"\nAngular:(ifxDate)="handleInput()"\nVanillaJs:.addEventListener("ifxDate", (event) => {//handle input});',
|
@@ -38,8 +125,9 @@ export default {
|
|
38
125
|
},
|
39
126
|
},
|
40
127
|
};
|
41
|
-
const DefaultTemplate = ({ error, disabled, success, size, value, max, min, caption, label }) => {
|
128
|
+
const DefaultTemplate = ({ error, disabled, success, size, value, max, min, caption, label, AriaLabel, required, name }) => {
|
42
129
|
const element = document.createElement('ifx-date-picker');
|
130
|
+
element.setAttribute('name', name);
|
43
131
|
element.setAttribute('error', error);
|
44
132
|
element.setAttribute('disabled', disabled);
|
45
133
|
element.setAttribute('size', size);
|
@@ -49,6 +137,8 @@ const DefaultTemplate = ({ error, disabled, success, size, value, max, min, capt
|
|
49
137
|
element.setAttribute('min', min);
|
50
138
|
element.setAttribute('label', label);
|
51
139
|
element.setAttribute('caption', caption);
|
140
|
+
element.setAttribute('AriaLabel', AriaLabel);
|
141
|
+
element.setAttribute('required', required);
|
52
142
|
element.addEventListener('ifxDate', action('ifxDate'));
|
53
143
|
return element;
|
54
144
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"date-picker.stories.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE
|
1
|
+
{"version":3,"file":"date-picker.stories.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,gDAAgD;QACzD,SAAS,EAAE,aAAa;QACxB,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,WAAW,EAAE,uBAAuB;YACpC,KAAK,EAAE;gBACL,QAAQ,EAAE,uBAAuB;aAClC;SACF;QACD,OAAO,EAAE;YACP,WAAW,EAAE,gDAAgD;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AY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACzC,OAAO,CAAC,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAC7C,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC3C,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACvD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Date Picker',\n tags: ['autodocs'],\n\n args: {\n disabled: false,\n size: 's',\n success: false,\n error: false,\n name: 'date-picker',\n value: '',\n max: '',\n min: '',\n label: \"Label Text\",\n caption: \"Caption text, description, error notification.\",\n AriaLabel: 'Date Picker',\n required: false,\n },\n argTypes: {\n label: {\n description: 'Label of Date Picker.',\n table: {\n category: 'ifx-date-picker props',\n }\n },\n caption: {\n description: 'Caption text, description, error notification.',\n table: {\n category: 'ifx-date-picker props',\n }\n },\n min: {\n description: 'Minimum date that can be selected. The parsed value is always formatted as yyyy-mm-dd.',\n table: {\n category: 'ifx-date-picker props',\n }\n },\n max: {\n description: 'The latest date that can be selected. The parsed value is always formatted as yyyy-mm-dd.',\n table: {\n category: 'ifx-date-picker props',\n }\n },\n disabled: {\n description: 'Disables the date picker',\n control: 'boolean',\n table: {\n category: 'ifx-date-picker props',\n defaultValue: {\n summary: false\n }\n }\n },\n success: {\n description: 'Indicates success in the date picker.',\n control: 'boolean',\n table: {\n category: 'ifx-date-picker props',\n defaultValue: {\n summary: false\n }\n }\n },\n error: {\n description: 'Indicates error in the date picker.',\n control: 'boolean',\n table: {\n category: 'ifx-date-picker props',\n defaultValue: {\n summary: false\n }\n }\n },\n size: {\n description: 'Sets the size of the date picker. Options: Height small (36px) and Height large (40px).S',\n control: 'radio',\n options: ['s', 'l'],\n table: {\n category: 'ifx-date-picker props',\n defaultValue: {\n summary: 's'\n }\n }\n },\n name: {\n description: 'Name of the element, that is used as reference when a form is submitted.',\n control: 'text',\n table: {\n category: 'ifx-date-picker props'\n }\n },\n value: {\n description: 'Displayed date is formatted based on the locale of the user`s browser, but the parsed value is always formatted as yyyy-mm-dd.',\n table: {\n category: 'ifx-date-picker props'\n }\n },\n AriaLabel: {\n control: { type: 'text' },\n description: 'Set the aria label of the date picker. Enhances accessibility.',\n table: {\n category: 'ifx-date-picker props'\n }\n },\n required: {\n description: 'Set the required attribute to true to make the date picker mandatory.',\n control: 'boolean',\n table: {\n category: 'ifx-date-picker props',\n defaultValue: {\n summary: false\n }\n }\n },\n ifxDate: {\n action: 'ifxDate',\n description: 'A custom event emitted when a date in the calendar is being selected.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxDate={handleInput}\\nVue:@ifxDate=\"handleInput\"\\nAngular:(ifxDate)=\"handleInput()\"\\nVanillaJs:.addEventListener(\"ifxDate\", (event) => {//handle input});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = ({ error, disabled, success, size, value, max, min, caption, label, AriaLabel, required, name }) => {\n const element = document.createElement('ifx-date-picker');\n element.setAttribute('name', name);\n element.setAttribute('error', error);\n element.setAttribute('disabled', disabled);\n element.setAttribute('size', size);\n element.setAttribute('success', success);\n element.setAttribute('value', value);\n element.setAttribute('max', max);\n element.setAttribute('min', min);\n element.setAttribute('label', label);\n element.setAttribute('caption', caption);\n element.setAttribute('AriaLabel', AriaLabel);\n element.setAttribute('required', required);\n element.addEventListener('ifxDate', action('ifxDate'));\n return element;\n};\n\nexport const Default = DefaultTemplate.bind({});"]}
|