@jumpgroup/jump-design-system 0.2.7 → 0.3.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/{index-41aaa52a.js → index-418c607f.js} +146 -2
- package/dist/{jump-design-system/p-20ceb40c.js.map → cjs/index-418c607f.js.map} +1 -1
- package/dist/cjs/jump-accordion.cjs.entry.js +22 -0
- package/dist/cjs/jump-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-badge_2.cjs.entry.js +88 -0
- package/dist/cjs/jump-badge_2.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-button.cjs.entry.js +3 -3
- package/dist/cjs/jump-button.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-card-ecommerce.cjs.entry.js +116 -0
- package/dist/cjs/jump-card-ecommerce.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-card.cjs.entry.js +4 -4
- package/dist/cjs/jump-card.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-design-system.cjs.js +2 -2
- package/dist/cjs/jump-filter.cjs.entry.js +59 -0
- package/dist/cjs/jump-filter.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-filtergroup.cjs.entry.js +119 -0
- package/dist/cjs/jump-filtergroup.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-icon.cjs.entry.js +547 -2371
- package/dist/cjs/jump-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-pagination-table.cjs.entry.js +12 -5
- package/dist/cjs/jump-pagination-table.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-pagination.cjs.entry.js +5 -4
- package/dist/cjs/jump-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-tab-item.cjs.entry.js +40 -0
- package/dist/cjs/jump-tab-item.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-tab-panel.cjs.entry.js +24 -0
- package/dist/cjs/jump-tab-panel.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-tab.cjs.entry.js +72 -9
- package/dist/cjs/jump-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/jump-accordion/jump-accordion.css +3 -0
- package/dist/collection/components/jump-accordion/jump-accordion.js +19 -0
- package/dist/collection/components/jump-accordion/jump-accordion.js.map +1 -0
- package/dist/collection/components/jump-accordion/test/jump-accordion.e2e.js +10 -0
- package/dist/collection/components/jump-accordion/test/jump-accordion.e2e.js.map +1 -0
- package/dist/collection/components/jump-accordion/test/jump-accordion.spec.js +18 -0
- package/dist/collection/components/jump-accordion/test/jump-accordion.spec.js.map +1 -0
- package/dist/collection/components/jump-badge/jump-badge.css +4 -10
- package/dist/collection/components/jump-badge/jump-badge.js +2 -1
- package/dist/collection/components/jump-badge/jump-badge.js.map +1 -1
- package/dist/collection/components/jump-badge/jump-badge.stories.js +18 -8
- package/dist/collection/components/jump-badge/jump-badge.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-anchor.stories.js +38 -29
- package/dist/collection/components/jump-button/jump-button-anchor.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js +4 -9
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-filled.stories.js +15 -24
- package/dist/collection/components/jump-button/jump-button-filled.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-only-icon.stories.js +43 -73
- package/dist/collection/components/jump-button/jump-button-only-icon.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button.css +2 -1
- package/dist/collection/components/jump-button/jump-button.js +1 -1
- package/dist/collection/components/jump-button/jump-button.stories.js +199 -0
- package/dist/collection/components/jump-button/jump-button.stories.js.map +1 -0
- package/dist/collection/components/jump-card/jump-card.css +2 -2
- package/dist/collection/components/jump-card/jump-card.js +2 -2
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.css +179 -0
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js +627 -0
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js.map +1 -0
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js +211 -0
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js.map +1 -0
- package/dist/collection/components/jump-card-ecommerce/test/jump-card-ecommerce.e2e.js +10 -0
- package/dist/collection/components/jump-card-ecommerce/test/jump-card-ecommerce.e2e.js.map +1 -0
- package/dist/collection/components/jump-card-ecommerce/test/jump-card-ecommerce.spec.js +18 -0
- package/dist/collection/components/jump-card-ecommerce/test/jump-card-ecommerce.spec.js.map +1 -0
- package/dist/collection/components/jump-filter/jump-filter.css +8 -0
- package/dist/collection/components/jump-filter/jump-filter.js +212 -0
- package/dist/collection/components/jump-filter/jump-filter.js.map +1 -0
- package/dist/collection/components/jump-filter/jump-filter.stories.js +122 -0
- package/dist/collection/components/jump-filter/jump-filter.stories.js.map +1 -0
- package/dist/collection/components/jump-filtergroup/jump-filtergroup.css +17 -0
- package/dist/collection/components/jump-filtergroup/jump-filtergroup.js +328 -0
- package/dist/collection/components/jump-filtergroup/jump-filtergroup.js.map +1 -0
- package/dist/collection/components/jump-filtergroup/jump-filtergroup.stories.js +49 -0
- package/dist/collection/components/jump-filtergroup/jump-filtergroup.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-custom.stories.js +67 -0
- package/dist/collection/components/jump-icon/jump-icon-custom.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-brands.stories.js +73 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-brands.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-duotone.stories.js +73 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-duotone.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-light.stories.js +73 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-light.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-regular.stories.js +73 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-regular.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-sharp-light.stories.js +73 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-sharp-light.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-sharp-regular.stories.js +73 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-sharp-regular.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-sharp-solid.stories.js +73 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-sharp-solid.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-sharp-thin.stories.js +73 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-sharp-thin.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-solid.stories.js +73 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-solid.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-thin.stories.js +73 -0
- package/dist/collection/components/jump-icon/jump-icon-fa-thin.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon-lucide.stories.js +67 -0
- package/dist/collection/components/jump-icon/jump-icon-lucide.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/jump-icon.css +61 -15
- package/dist/collection/components/jump-icon/jump-icon.js +132 -12
- package/dist/collection/components/jump-icon/jump-icon.js.map +1 -1
- package/dist/collection/components/jump-pagination/jump-pagination.js +7 -6
- package/dist/collection/components/jump-pagination/jump-pagination.js.map +1 -1
- package/dist/collection/components/jump-pagination/jump-pagination.stories.js +6 -4
- package/dist/collection/components/jump-pagination/jump-pagination.stories.js.map +1 -1
- package/dist/collection/components/jump-pagination-table/jump-pagination-table.js +16 -9
- package/dist/collection/components/jump-pagination-table/jump-pagination-table.js.map +1 -1
- package/dist/collection/components/jump-pagination-table/jump-pagination-table.stories.js +25 -7
- package/dist/collection/components/jump-pagination-table/jump-pagination-table.stories.js.map +1 -1
- package/dist/collection/components/jump-quantity/jump-quantity.css +50 -0
- package/dist/collection/components/jump-quantity/jump-quantity.js +219 -0
- package/dist/collection/components/jump-quantity/jump-quantity.js.map +1 -0
- package/dist/collection/components/jump-quantity/jump-quantity.stories.js +103 -0
- package/dist/collection/components/jump-quantity/jump-quantity.stories.js.map +1 -0
- package/dist/collection/components/jump-tab/jump-tab.css +12 -0
- package/dist/collection/components/jump-tab/jump-tab.js +107 -21
- package/dist/collection/components/jump-tab/jump-tab.js.map +1 -1
- package/dist/collection/components/jump-tab/jump-tab.stories.js +129 -0
- package/dist/collection/components/jump-tab/jump-tab.stories.js.map +1 -0
- package/dist/collection/components/jump-tab-item/jump-tab-item-boxed.stories.js +56 -0
- package/dist/collection/components/jump-tab-item/jump-tab-item-boxed.stories.js.map +1 -0
- package/dist/collection/components/jump-tab-item/jump-tab-item-inline.stories.js +56 -0
- package/dist/collection/components/jump-tab-item/jump-tab-item-inline.stories.js.map +1 -0
- package/dist/collection/components/jump-tab-item/jump-tab-item-rounded.stories.js +41 -0
- package/dist/collection/components/jump-tab-item/jump-tab-item-rounded.stories.js.map +1 -0
- package/dist/collection/components/jump-tab-item/jump-tab-item-sheet.stories.js +42 -0
- package/dist/collection/components/jump-tab-item/jump-tab-item-sheet.stories.js.map +1 -0
- package/dist/collection/components/jump-tab-item/jump-tab-item.css +109 -0
- package/dist/collection/components/jump-tab-item/jump-tab-item.js +172 -0
- package/dist/collection/components/jump-tab-item/jump-tab-item.js.map +1 -0
- package/dist/collection/components/jump-tab-item/test/jump-tab-item.e2e.js +10 -0
- package/dist/collection/components/jump-tab-item/test/jump-tab-item.e2e.js.map +1 -0
- package/dist/collection/components/jump-tab-item/test/jump-tab-item.spec.js +18 -0
- package/dist/collection/components/jump-tab-item/test/jump-tab-item.spec.js.map +1 -0
- package/dist/collection/components/jump-tab-panel/jump-tab-panel.css +11 -0
- package/dist/collection/components/jump-tab-panel/jump-tab-panel.js +63 -0
- package/dist/collection/components/jump-tab-panel/jump-tab-panel.js.map +1 -0
- package/dist/collection/components/jump-tab-panel/test/jump-tab-panel.e2e.js +10 -0
- package/dist/collection/components/jump-tab-panel/test/jump-tab-panel.e2e.js.map +1 -0
- package/dist/collection/components/jump-tab-panel/test/jump-tab-panel.spec.js +18 -0
- package/dist/collection/components/jump-tab-panel/test/jump-tab-panel.spec.js.map +1 -0
- package/dist/collection/utils/utils.js +41 -8
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/jump-accordion.d.ts +11 -0
- package/dist/components/jump-accordion.js +36 -0
- package/dist/components/jump-accordion.js.map +1 -0
- package/dist/components/jump-badge.js +1 -33
- package/dist/components/jump-badge.js.map +1 -1
- package/dist/components/jump-badge2.js +38 -0
- package/dist/components/jump-badge2.js.map +1 -0
- package/dist/components/jump-button.js +1 -65
- package/dist/components/jump-button.js.map +1 -1
- package/dist/components/jump-button2.js +69 -0
- package/dist/components/jump-button2.js.map +1 -0
- package/dist/components/jump-card-ecommerce.d.ts +11 -0
- package/dist/components/jump-card-ecommerce.js +180 -0
- package/dist/components/jump-card-ecommerce.js.map +1 -0
- package/dist/components/jump-card.js +3 -3
- package/dist/components/jump-card.js.map +1 -1
- package/dist/components/jump-filter.d.ts +11 -0
- package/dist/components/jump-filter.js +96 -0
- package/dist/components/jump-filter.js.map +1 -0
- package/dist/components/jump-filtergroup.d.ts +11 -0
- package/dist/components/jump-filtergroup.js +161 -0
- package/dist/components/jump-filtergroup.js.map +1 -0
- package/dist/components/jump-icon2.js +556 -2375
- package/dist/components/jump-icon2.js.map +1 -1
- package/dist/components/jump-pagination-table.js +11 -4
- package/dist/components/jump-pagination-table.js.map +1 -1
- package/dist/components/jump-pagination.js +4 -3
- package/dist/components/jump-pagination.js.map +1 -1
- package/dist/components/jump-quantity.d.ts +11 -0
- package/dist/components/jump-quantity.js +8 -0
- package/dist/components/jump-quantity.js.map +1 -0
- package/dist/components/jump-quantity2.js +94 -0
- package/dist/components/jump-quantity2.js.map +1 -0
- package/dist/components/jump-tab-item.d.ts +11 -0
- package/dist/components/jump-tab-item.js +67 -0
- package/dist/components/jump-tab-item.js.map +1 -0
- package/dist/components/jump-tab-panel.d.ts +11 -0
- package/dist/components/jump-tab-panel.js +41 -0
- package/dist/components/jump-tab-panel.js.map +1 -0
- package/dist/components/jump-tab.js +75 -12
- package/dist/components/jump-tab.js.map +1 -1
- package/dist/esm/{index-192aeaf1.js → index-056a0a66.js} +146 -3
- package/dist/esm/index-056a0a66.js.map +1 -0
- package/dist/esm/jump-accordion.entry.js +18 -0
- package/dist/esm/jump-accordion.entry.js.map +1 -0
- package/dist/esm/jump-badge_2.entry.js +83 -0
- package/dist/esm/jump-badge_2.entry.js.map +1 -0
- package/dist/esm/jump-button.entry.js +3 -3
- package/dist/esm/jump-button.entry.js.map +1 -1
- package/dist/esm/jump-card-ecommerce.entry.js +112 -0
- package/dist/esm/jump-card-ecommerce.entry.js.map +1 -0
- package/dist/esm/jump-card.entry.js +4 -4
- package/dist/esm/jump-card.entry.js.map +1 -1
- package/dist/esm/jump-design-system.js +3 -3
- package/dist/esm/jump-filter.entry.js +55 -0
- package/dist/esm/jump-filter.entry.js.map +1 -0
- package/dist/esm/jump-filtergroup.entry.js +115 -0
- package/dist/esm/jump-filtergroup.entry.js.map +1 -0
- package/dist/esm/jump-icon.entry.js +547 -2371
- package/dist/esm/jump-icon.entry.js.map +1 -1
- package/dist/esm/jump-pagination-table.entry.js +12 -5
- package/dist/esm/jump-pagination-table.entry.js.map +1 -1
- package/dist/esm/jump-pagination.entry.js +5 -4
- package/dist/esm/jump-pagination.entry.js.map +1 -1
- package/dist/esm/jump-tab-item.entry.js +36 -0
- package/dist/esm/jump-tab-item.entry.js.map +1 -0
- package/dist/esm/jump-tab-panel.entry.js +20 -0
- package/dist/esm/jump-tab-panel.entry.js.map +1 -0
- package/dist/esm/jump-tab.entry.js +72 -9
- package/dist/esm/jump-tab.entry.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
- package/dist/jump-design-system/p-0dc744ce.entry.js +2 -0
- package/dist/jump-design-system/p-0dc744ce.entry.js.map +1 -0
- package/dist/jump-design-system/p-357cf73d.entry.js +66 -0
- package/dist/jump-design-system/p-357cf73d.entry.js.map +1 -0
- package/dist/jump-design-system/p-58602fcb.entry.js +2 -0
- package/dist/jump-design-system/p-58602fcb.entry.js.map +1 -0
- package/dist/jump-design-system/p-58bed455.entry.js +2 -0
- package/dist/jump-design-system/p-58bed455.entry.js.map +1 -0
- package/dist/jump-design-system/p-647ec30b.entry.js +2 -0
- package/dist/jump-design-system/p-647ec30b.entry.js.map +1 -0
- package/dist/jump-design-system/p-83e6ab6e.entry.js +2 -0
- package/dist/jump-design-system/p-83e6ab6e.entry.js.map +1 -0
- package/dist/jump-design-system/p-8ec76454.entry.js +2 -0
- package/dist/jump-design-system/p-8ec76454.entry.js.map +1 -0
- package/dist/jump-design-system/p-91794ae6.js +3 -0
- package/dist/jump-design-system/p-91794ae6.js.map +1 -0
- package/dist/jump-design-system/p-afe0cca0.entry.js +2 -0
- package/dist/jump-design-system/p-afe0cca0.entry.js.map +1 -0
- package/dist/jump-design-system/p-b2ca2e96.entry.js +2 -0
- package/dist/jump-design-system/p-b2ca2e96.entry.js.map +1 -0
- package/dist/jump-design-system/p-d58e0952.entry.js +2 -0
- package/dist/jump-design-system/p-d58e0952.entry.js.map +1 -0
- package/dist/jump-design-system/p-e2318686.entry.js +2 -0
- package/dist/jump-design-system/p-e2318686.entry.js.map +1 -0
- package/dist/jump-design-system/p-ee61c223.entry.js +2 -0
- package/dist/jump-design-system/p-ee61c223.entry.js.map +1 -0
- package/dist/jump-design-system/p-f842ff46.entry.js +2 -0
- package/dist/jump-design-system/p-f842ff46.entry.js.map +1 -0
- package/dist/jump-design-system-elements.json +366 -9
- package/dist/types/components/jump-accordion/jump-accordion.d.ts +3 -0
- package/dist/types/components/jump-badge/jump-badge.stories.d.ts +1 -0
- package/dist/types/components/jump-button/jump-button-anchor.stories.d.ts +18 -4
- package/dist/types/components/jump-button/jump-button-dimension.stories.d.ts +0 -5
- package/dist/types/components/jump-button/jump-button-only-icon.stories.d.ts +4 -11
- package/dist/types/components/jump-button/jump-button.stories.d.ts +98 -0
- package/dist/types/components/jump-card-ecommerce/jump-card-ecommerce.d.ts +66 -0
- package/dist/types/components/jump-card-ecommerce/jump-card-ecommerce.stories.d.ts +123 -0
- package/dist/types/components/jump-filter/jump-filter.d.ts +22 -0
- package/dist/types/components/jump-filter/jump-filter.stories.d.ts +40 -0
- package/dist/types/components/jump-filtergroup/jump-filtergroup.d.ts +24 -0
- package/dist/types/components/jump-filtergroup/jump-filtergroup.stories.d.ts +43 -0
- package/dist/types/components/jump-icon/jump-icon-custom.stories.d.ts +40 -0
- package/dist/types/components/{jump-button/jump-button-outline.stories.d.ts → jump-icon/jump-icon-fa-brands.stories.d.ts} +19 -30
- package/dist/types/components/jump-icon/jump-icon-fa-duotone.stories.d.ts +45 -0
- package/dist/types/components/jump-icon/jump-icon-fa-light.stories.d.ts +45 -0
- package/dist/types/components/jump-icon/jump-icon-fa-regular.stories.d.ts +45 -0
- package/dist/types/components/jump-icon/jump-icon-fa-sharp-light.stories.d.ts +45 -0
- package/dist/types/components/jump-icon/jump-icon-fa-sharp-regular.stories.d.ts +45 -0
- package/dist/types/components/jump-icon/jump-icon-fa-sharp-solid.stories.d.ts +45 -0
- package/dist/types/components/jump-icon/jump-icon-fa-sharp-thin.stories.d.ts +45 -0
- package/dist/types/components/jump-icon/jump-icon-fa-solid.stories.d.ts +45 -0
- package/dist/types/components/jump-icon/jump-icon-fa-thin.stories.d.ts +45 -0
- package/dist/types/components/{jump-button/jump-button-text.stories.d.ts → jump-icon/jump-icon-lucide.stories.d.ts} +16 -16
- package/dist/types/components/jump-icon/jump-icon.d.ts +29 -4
- package/dist/types/components/jump-pagination/jump-pagination.d.ts +9 -0
- package/dist/types/components/jump-pagination-table/jump-pagination-table.d.ts +18 -2
- package/dist/types/components/jump-pagination-table/jump-pagination-table.stories.d.ts +5 -1
- package/dist/types/components/jump-quantity/jump-quantity.d.ts +20 -0
- package/dist/types/components/jump-quantity/jump-quantity.stories.d.ts +41 -0
- package/dist/types/components/jump-tab/jump-tab.d.ts +11 -3
- package/dist/types/components/jump-tab/jump-tab.stories.d.ts +27 -0
- package/dist/types/components/jump-tab-item/jump-tab-item-boxed.stories.d.ts +40 -0
- package/dist/types/components/jump-tab-item/jump-tab-item-inline.stories.d.ts +40 -0
- package/dist/types/components/jump-tab-item/jump-tab-item-rounded.stories.d.ts +28 -0
- package/dist/types/components/jump-tab-item/jump-tab-item-sheet.stories.d.ts +28 -0
- package/dist/types/components/jump-tab-item/jump-tab-item.d.ts +29 -0
- package/dist/types/components/jump-tab-panel/jump-tab-panel.d.ts +5 -0
- package/dist/types/components.d.ts +551 -6
- package/dist/types/utils/utils.d.ts +2 -0
- package/package.json +3 -2
- package/dist/cjs/index-41aaa52a.js.map +0 -1
- package/dist/cjs/jump-badge.cjs.entry.js +0 -24
- package/dist/cjs/jump-badge.cjs.entry.js.map +0 -1
- package/dist/collection/components/jump-button/jump-button-outline.stories.js +0 -111
- package/dist/collection/components/jump-button/jump-button-outline.stories.js.map +0 -1
- package/dist/collection/components/jump-button/jump-button-text.stories.js +0 -83
- package/dist/collection/components/jump-button/jump-button-text.stories.js.map +0 -1
- package/dist/collection/components/jump-icon/jump-icon.stories.js +0 -35
- package/dist/collection/components/jump-icon/jump-icon.stories.js.map +0 -1
- package/dist/collection/components/jump-tab/jump-tab-inline.stories.js +0 -28
- package/dist/collection/components/jump-tab/jump-tab-inline.stories.js.map +0 -1
- package/dist/esm/index-192aeaf1.js.map +0 -1
- package/dist/esm/jump-badge.entry.js +0 -20
- package/dist/esm/jump-badge.entry.js.map +0 -1
- package/dist/jump-design-system/p-02914b1e.entry.js +0 -2
- package/dist/jump-design-system/p-02914b1e.entry.js.map +0 -1
- package/dist/jump-design-system/p-1a533536.entry.js +0 -2
- package/dist/jump-design-system/p-1a533536.entry.js.map +0 -1
- package/dist/jump-design-system/p-20ceb40c.js +0 -3
- package/dist/jump-design-system/p-93d8245f.entry.js +0 -2
- package/dist/jump-design-system/p-93d8245f.entry.js.map +0 -1
- package/dist/jump-design-system/p-e69ee35f.entry.js +0 -2
- package/dist/jump-design-system/p-e69ee35f.entry.js.map +0 -1
- package/dist/jump-design-system/p-eb16952a.entry.js +0 -2
- package/dist/jump-design-system/p-eb16952a.entry.js.map +0 -1
- package/dist/jump-design-system/p-ed65e359.entry.js +0 -2
- package/dist/jump-design-system/p-ed65e359.entry.js.map +0 -1
- package/dist/jump-design-system/p-fa148b53.entry.js +0 -331
- package/dist/jump-design-system/p-fa148b53.entry.js.map +0 -1
- package/dist/types/components/jump-icon/jump-icon.stories.d.ts +0 -21
- package/dist/types/components/jump-tab/jump-tab-inline.stories.d.ts +0 -18
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { generateAttributesFromArgs, formatHtml } from "../../utils/utils";
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/CardEcommerce/Card',
|
|
4
|
+
tags: ['autodocs'],
|
|
5
|
+
argTypes: {
|
|
6
|
+
hasBackground: {
|
|
7
|
+
name: 'hasBackground',
|
|
8
|
+
description: 'Aggiungi o meno il background alla card',
|
|
9
|
+
control: 'boolean',
|
|
10
|
+
},
|
|
11
|
+
onlyIconButton: {
|
|
12
|
+
name: 'onlyIconButton',
|
|
13
|
+
description: 'Cambia lo stile della card mostrando solo il bottone icona',
|
|
14
|
+
control: 'boolean',
|
|
15
|
+
},
|
|
16
|
+
badge: {
|
|
17
|
+
name: 'badge',
|
|
18
|
+
description: 'Badge della card',
|
|
19
|
+
control: 'text',
|
|
20
|
+
},
|
|
21
|
+
favorite: {
|
|
22
|
+
name: 'favorite',
|
|
23
|
+
description: 'Aggiunge il prodotto ai preferiti',
|
|
24
|
+
control: 'boolean',
|
|
25
|
+
},
|
|
26
|
+
link: {
|
|
27
|
+
name: 'link',
|
|
28
|
+
description: 'Link della card',
|
|
29
|
+
control: 'text',
|
|
30
|
+
},
|
|
31
|
+
img: {
|
|
32
|
+
name: 'img',
|
|
33
|
+
description: 'Url dell\'immagine da visualizzare, si attiva solo se non è presente videoSrc',
|
|
34
|
+
control: 'text',
|
|
35
|
+
defaultValue: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',
|
|
36
|
+
if: {
|
|
37
|
+
arg: 'videoSrc',
|
|
38
|
+
exists: false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
imgAlt: {
|
|
42
|
+
name: 'imgAlt',
|
|
43
|
+
description: 'Alt dell\'immagine da visualizzare, si attiva solo se è presente img',
|
|
44
|
+
control: 'text',
|
|
45
|
+
if: {
|
|
46
|
+
arg: 'img',
|
|
47
|
+
exists: true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
videoSrc: {
|
|
51
|
+
name: 'videoSrc',
|
|
52
|
+
description: 'Url del video da visualizzare, si attiva solo se non è presente img',
|
|
53
|
+
control: 'text',
|
|
54
|
+
if: {
|
|
55
|
+
arg: 'img',
|
|
56
|
+
exists: false
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
notificationUrl: {
|
|
60
|
+
name: 'notificationUrl',
|
|
61
|
+
description: 'Url della notifica da visualizzare',
|
|
62
|
+
control: 'text',
|
|
63
|
+
},
|
|
64
|
+
notificationText: {
|
|
65
|
+
name: 'notificationText',
|
|
66
|
+
description: 'Testo della notifica da visualizzare',
|
|
67
|
+
control: 'text',
|
|
68
|
+
},
|
|
69
|
+
productName: {
|
|
70
|
+
name: 'productName',
|
|
71
|
+
description: 'Nome del prodotto',
|
|
72
|
+
control: 'text',
|
|
73
|
+
},
|
|
74
|
+
subtitle: {
|
|
75
|
+
name: 'subtitle',
|
|
76
|
+
description: 'Sottotitolo della card',
|
|
77
|
+
control: 'text',
|
|
78
|
+
},
|
|
79
|
+
productId: {
|
|
80
|
+
name: 'productId',
|
|
81
|
+
description: 'ID del prodotto',
|
|
82
|
+
control: 'text',
|
|
83
|
+
},
|
|
84
|
+
price: {
|
|
85
|
+
name: 'price',
|
|
86
|
+
description: 'Prezzo del prodotto',
|
|
87
|
+
control: 'number',
|
|
88
|
+
},
|
|
89
|
+
salePrice: {
|
|
90
|
+
name: 'salePrice',
|
|
91
|
+
description: 'Prezzo scontato del prodotto',
|
|
92
|
+
control: 'number',
|
|
93
|
+
},
|
|
94
|
+
outOfStock: {
|
|
95
|
+
name: 'outOfStock',
|
|
96
|
+
description: 'Indica se il prodotto è esaurito',
|
|
97
|
+
control: 'boolean',
|
|
98
|
+
defaultValue: false
|
|
99
|
+
},
|
|
100
|
+
outOfStockText: {
|
|
101
|
+
name: 'outOfStockText',
|
|
102
|
+
description: 'Testo da visualizzare se il prodotto è esaurito',
|
|
103
|
+
control: 'text',
|
|
104
|
+
},
|
|
105
|
+
addtoCartText: {
|
|
106
|
+
name: 'addtoCartText',
|
|
107
|
+
description: 'Testo bottone aggiungi al carrello',
|
|
108
|
+
control: 'text',
|
|
109
|
+
},
|
|
110
|
+
waitingListText: {
|
|
111
|
+
name: 'waitingListText',
|
|
112
|
+
description: 'cta per richiedere l\'avviso se il prodotto torna disponibile',
|
|
113
|
+
control: 'text',
|
|
114
|
+
},
|
|
115
|
+
quantity: {
|
|
116
|
+
name: 'quantity',
|
|
117
|
+
description: 'Indica se è visibile il campo per la quantità del prodotto',
|
|
118
|
+
control: 'boolean',
|
|
119
|
+
defaultValue: false
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const Template = (args) => {
|
|
124
|
+
const attributes = generateAttributesFromArgs(args);
|
|
125
|
+
return formatHtml(`<jump-card-ecommerce ${attributes}> </jump-card-ecommerce>`);
|
|
126
|
+
};
|
|
127
|
+
// const Template = (args) => {
|
|
128
|
+
// const attributes = generateAttributesFromArgs(args);
|
|
129
|
+
// return formatHtml(`
|
|
130
|
+
// <jump-card-ecommerce ${attributes}>
|
|
131
|
+
// <select slot="select" name="select" id="selectID" onChange={(event) => this.changeVariationBody(event)}>
|
|
132
|
+
// <option value='m'>mono</option>
|
|
133
|
+
// <option value='l'>enciclopedico</option>
|
|
134
|
+
// <option value='xl'>superlativogalattico</option>
|
|
135
|
+
// </select>
|
|
136
|
+
// <jump-quantity slot="quantity" onClick={(event) => this.changeQuantityProduct(event)}></jump-quantity>
|
|
137
|
+
// </jump-card-ecommerce>`);
|
|
138
|
+
// }
|
|
139
|
+
export const Card = Template.bind({});
|
|
140
|
+
Card.args = {
|
|
141
|
+
hasBackground: true,
|
|
142
|
+
onlyIconButton: true,
|
|
143
|
+
badge: 'Badge',
|
|
144
|
+
favorite: true,
|
|
145
|
+
link: '/prodotto',
|
|
146
|
+
img: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',
|
|
147
|
+
imgAlt: 'Immagine',
|
|
148
|
+
notificationUrl: '/cart',
|
|
149
|
+
notificationText: 'Aggiunto al carrello',
|
|
150
|
+
productName: 'T-shirt',
|
|
151
|
+
subtitle: 'T-shirt da uomo',
|
|
152
|
+
productId: '1',
|
|
153
|
+
price: 15,
|
|
154
|
+
salePrice: 10,
|
|
155
|
+
currency: '€',
|
|
156
|
+
outOfStock: false,
|
|
157
|
+
outOfStockText: 'Esaurito',
|
|
158
|
+
addtoCartText: 'Aggiungi al carrello',
|
|
159
|
+
waitingListText: 'Notifica disponibilità',
|
|
160
|
+
quantity: true
|
|
161
|
+
};
|
|
162
|
+
// const TemplateWithEvent = (args, data) => {
|
|
163
|
+
// let id = data.id;
|
|
164
|
+
// const attributes = generateAttributesFromArgs(args);
|
|
165
|
+
// return formatHtml(`<jump-card-ecommerce ${attributes}> </jump-card-ecommerce>
|
|
166
|
+
// <script>
|
|
167
|
+
// (function() {
|
|
168
|
+
// let container;
|
|
169
|
+
// container = document.querySelector('#story--${id}');
|
|
170
|
+
// container.querySelector('jump-card-ecommerce').addEventListener( 'jump-toggle-favorite', ev => {
|
|
171
|
+
// let productId = ev.detail.productId;
|
|
172
|
+
// let favorite = ev.detail.favorite;
|
|
173
|
+
// if(favorite){
|
|
174
|
+
// alert( 'Prodotto ' + productId + ' aggiunto ai preferiti');
|
|
175
|
+
// } else {
|
|
176
|
+
// alert( 'Prodotto ' + productId + ' rimosso dai preferiti');
|
|
177
|
+
// }
|
|
178
|
+
// })
|
|
179
|
+
// container.querySelector('jump-card-ecommerce').addEventListener( 'jump-add-to-cart', ev => {
|
|
180
|
+
// let productId = ev.detail.productId;
|
|
181
|
+
// let addedToCart = ev.detail.addedToCart;
|
|
182
|
+
// if(addedToCart){
|
|
183
|
+
// alert( 'Prodotto ' + productId + ' aggiunto al carrello');
|
|
184
|
+
// }
|
|
185
|
+
// })
|
|
186
|
+
// })();
|
|
187
|
+
// </script>
|
|
188
|
+
// ` );
|
|
189
|
+
// }
|
|
190
|
+
// export const CardEvent = TemplateWithEvent.bind({});
|
|
191
|
+
// CardEvent.args = {
|
|
192
|
+
// badge: 'Badge',
|
|
193
|
+
// favorite: false,
|
|
194
|
+
// link: '/prodotto',
|
|
195
|
+
// img: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',
|
|
196
|
+
// imgAlt: 'Immagine',
|
|
197
|
+
// // ricordati di mettere anche esempio con video
|
|
198
|
+
// notificationUrl: '/cart',
|
|
199
|
+
// notificationText: 'Aggiunto al carrello',
|
|
200
|
+
// addedToCart: false,
|
|
201
|
+
// onSale: true,
|
|
202
|
+
// variant: 'light',
|
|
203
|
+
// productName: 'T-shirt',
|
|
204
|
+
// subtitle: 'T-shirt da uomo',
|
|
205
|
+
// discount: '5%',
|
|
206
|
+
// price: 15,
|
|
207
|
+
// salePrice: 10,
|
|
208
|
+
// background: false,
|
|
209
|
+
// productId: '1',
|
|
210
|
+
// };
|
|
211
|
+
//# sourceMappingURL=jump-card-ecommerce.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-card-ecommerce.stories.js","sourceRoot":"","sources":["../../../src/components/jump-card-ecommerce/jump-card-ecommerce.stories.ts"],"names":[],"mappings":"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","sourcesContent":["import { generateAttributesFromArgs, formatHtml} from '../../utils/utils';\n\nexport default {\n title: 'Components/CardEcommerce/Card',\n tags: ['autodocs'],\n argTypes: {\n hasBackground: {\n name: 'hasBackground',\n description: 'Aggiungi o meno il background alla card',\n control: 'boolean',\n },\n onlyIconButton: {\n name: 'onlyIconButton',\n description: 'Cambia lo stile della card mostrando solo il bottone icona',\n control: 'boolean',\n },\n badge: {\n name: 'badge',\n description: 'Badge della card',\n control: 'text',\n },\n favorite: {\n name: 'favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n link: {\n name: 'link',\n description: 'Link della card',\n control: 'text',\n },\n img: {\n name: 'img',\n description: 'Url dell\\'immagine da visualizzare, si attiva solo se non è presente videoSrc',\n control: 'text',\n defaultValue: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n imgAlt: {\n name: 'imgAlt',\n description: 'Alt dell\\'immagine da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n videoSrc: {\n name: 'videoSrc',\n description: 'Url del video da visualizzare, si attiva solo se non è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: false\n }\n },\n notificationUrl: {\n name: 'notificationUrl',\n description: 'Url della notifica da visualizzare',\n control: 'text',\n },\n notificationText: {\n name: 'notificationText',\n description: 'Testo della notifica da visualizzare',\n control: 'text',\n },\n productName: {\n name: 'productName',\n description: 'Nome del prodotto',\n control: 'text',\n },\n subtitle: {\n name: 'subtitle',\n description: 'Sottotitolo della card',\n control: 'text',\n },\n productId: {\n name: 'productId',\n description: 'ID del prodotto',\n control: 'text',\n },\n price: {\n name: 'price',\n description: 'Prezzo del prodotto',\n control: 'number',\n },\n salePrice: {\n name: 'salePrice',\n description: 'Prezzo scontato del prodotto',\n control: 'number',\n },\n outOfStock: {\n name: 'outOfStock',\n description: 'Indica se il prodotto è esaurito',\n control: 'boolean',\n defaultValue: false\n },\n outOfStockText: {\n name: 'outOfStockText',\n description: 'Testo da visualizzare se il prodotto è esaurito',\n control: 'text',\n },\n addtoCartText: {\n name: 'addtoCartText',\n description: 'Testo bottone aggiungi al carrello',\n control: 'text',\n },\n waitingListText: {\n name: 'waitingListText',\n description: 'cta per richiedere l\\'avviso se il prodotto torna disponibile',\n control: 'text',\n },\n quantity: {\n name: 'quantity',\n description: 'Indica se è visibile il campo per la quantità del prodotto',\n control: 'boolean',\n defaultValue: false\n }\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<jump-card-ecommerce ${attributes}> </jump-card-ecommerce>`);\n}\n\n// const Template = (args) => {\n// const attributes = generateAttributesFromArgs(args);\n// return formatHtml(`\n// <jump-card-ecommerce ${attributes}> \n// <select slot=\"select\" name=\"select\" id=\"selectID\" onChange={(event) => this.changeVariationBody(event)}>\n// <option value='m'>mono</option>\n// <option value='l'>enciclopedico</option>\n// <option value='xl'>superlativogalattico</option>\n// </select>\n// <jump-quantity slot=\"quantity\" onClick={(event) => this.changeQuantityProduct(event)}></jump-quantity>\n// </jump-card-ecommerce>`);\n// }\n\nexport const Card = Template.bind({});\nCard.args = {\n hasBackground: true,\n onlyIconButton: true,\n badge: 'Badge',\n favorite: true,\n link: '/prodotto',\n img: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',\n imgAlt: 'Immagine',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n currency: '€',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n addtoCartText: 'Aggiungi al carrello',\n waitingListText: 'Notifica disponibilità',\n quantity: true\n};\n\n\n// const TemplateWithEvent = (args, data) => {\n// let id = data.id;\n// const attributes = generateAttributesFromArgs(args);\n// return formatHtml(`<jump-card-ecommerce ${attributes}> </jump-card-ecommerce>\n// <script>\n\n// (function() {\n// let container; \n// container = document.querySelector('#story--${id}');\n// container.querySelector('jump-card-ecommerce').addEventListener( 'jump-toggle-favorite', ev => {\n// let productId = ev.detail.productId;\n// let favorite = ev.detail.favorite;\n// if(favorite){\n// alert( 'Prodotto ' + productId + ' aggiunto ai preferiti');\n// } else {\n// alert( 'Prodotto ' + productId + ' rimosso dai preferiti');\n// }\n// })\n\n// container.querySelector('jump-card-ecommerce').addEventListener( 'jump-add-to-cart', ev => {\n// let productId = ev.detail.productId;\n// let addedToCart = ev.detail.addedToCart;\n// if(addedToCart){\n// alert( 'Prodotto ' + productId + ' aggiunto al carrello');\n// } \n// })\n\n// })();\n\n// </script>\n// ` );\n// }\n\n// export const CardEvent = TemplateWithEvent.bind({});\n// CardEvent.args = {\n// badge: 'Badge',\n// favorite: false,\n// link: '/prodotto',\n// img: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',\n// imgAlt: 'Immagine',\n// // ricordati di mettere anche esempio con video\n// notificationUrl: '/cart',\n// notificationText: 'Aggiunto al carrello',\n// addedToCart: false,\n// onSale: true,\n// variant: 'light',\n// productName: 'T-shirt',\n// subtitle: 'T-shirt da uomo',\n// discount: '5%',\n// price: 15,\n// salePrice: 10,\n// background: false,\n// productId: '1',\n// };\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('jump-card-ecommerce', () => {
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<jump-card-ecommerce></jump-card-ecommerce>');
|
|
6
|
+
const element = await page.find('jump-card-ecommerce');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=jump-card-ecommerce.e2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-card-ecommerce.e2e.js","sourceRoot":"","sources":["../../../../src/components/jump-card-ecommerce/test/jump-card-ecommerce.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,6CAA6C,CAAC,CAAC;QAErE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACvD,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('jump-card-ecommerce', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<jump-card-ecommerce></jump-card-ecommerce>');\n\n const element = await page.find('jump-card-ecommerce');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { JumpCardEcommerce } from "../jump-card-ecommerce";
|
|
3
|
+
describe('jump-card-ecommerce', () => {
|
|
4
|
+
it('renders', async () => {
|
|
5
|
+
const page = await newSpecPage({
|
|
6
|
+
components: [JumpCardEcommerce],
|
|
7
|
+
html: `<jump-card-ecommerce></jump-card-ecommerce>`,
|
|
8
|
+
});
|
|
9
|
+
expect(page.root).toEqualHtml(`
|
|
10
|
+
<jump-card-ecommerce>
|
|
11
|
+
<mock:shadow-root>
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</mock:shadow-root>
|
|
14
|
+
</jump-card-ecommerce>
|
|
15
|
+
`);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=jump-card-ecommerce.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-card-ecommerce.spec.js","sourceRoot":"","sources":["../../../../src/components/jump-card-ecommerce/test/jump-card-ecommerce.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,iBAAiB,CAAC;YAC/B,IAAI,EAAE,6CAA6C;SACpD,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAM7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { JumpCardEcommerce } from '../jump-card-ecommerce';\n\ndescribe('jump-card-ecommerce', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [JumpCardEcommerce],\n html: `<jump-card-ecommerce></jump-card-ecommerce>`,\n });\n expect(page.root).toEqualHtml(`\n <jump-card-ecommerce>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </jump-card-ecommerce>\n `);\n });\n});\n"]}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class JumpFilter {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.direction = 'vertical';
|
|
5
|
+
this.filterHeading = 'Filtra per';
|
|
6
|
+
this.filterButtonLabel = 'Filtri';
|
|
7
|
+
this.filterButtonIcon = 'filter';
|
|
8
|
+
this.mobileThreshold = 768;
|
|
9
|
+
this.filters = undefined;
|
|
10
|
+
this.activeFilters = 0;
|
|
11
|
+
this.showMobileFilters = false;
|
|
12
|
+
this.isMobile = false;
|
|
13
|
+
}
|
|
14
|
+
filterChangeHandler(event) {
|
|
15
|
+
//set this.filter as this.filters[event.detail.name] = event.detail.value; even if not present
|
|
16
|
+
this.filters = Object.assign(Object.assign({}, this.filters), { [event.detail.name]: event.detail.values });
|
|
17
|
+
console.log('Received the custom filterChange event: ', this.filters);
|
|
18
|
+
//TODO: increment this.activeFilters
|
|
19
|
+
}
|
|
20
|
+
handleResize() {
|
|
21
|
+
this.isMobile = window.innerWidth < this.mobileThreshold;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the active filters from the component
|
|
25
|
+
*/
|
|
26
|
+
async getFilters() {
|
|
27
|
+
return this.filters;
|
|
28
|
+
}
|
|
29
|
+
componentDidLoad() {
|
|
30
|
+
this.toggleMobileFilters();
|
|
31
|
+
}
|
|
32
|
+
toggleMobileFilters() {
|
|
33
|
+
if (this.mobileToggle) {
|
|
34
|
+
this.mobileToggle.addEventListener('click', () => {
|
|
35
|
+
if (!this.isMobile)
|
|
36
|
+
return;
|
|
37
|
+
this.showMobileFilters = !this.showMobileFilters;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
return (h(Host, { key: 'a25627f52d4e4eabd9714bca4605f7d506e8302a', mobileFilters: this.showMobileFilters }, this.isMobile && h("jump-button", { key: 'e58ab446793fd152b0e724ea8067f1030d6ecaaa', ref: (el) => { this.mobileToggle = el; }, buttonId: this.filterButtonIcon, variant: 'primary', outline: true }, h("slot", { key: '1ffb7d8f787733c037da73c4643d016a5d314c85', name: "prefix" }, this.filterButtonIcon && h("jump-icon", { key: 'ce09716fa23121cd5b4921eab94260d6a931a36a', class: "small", name: this.filterButtonIcon }), this.filterButtonLabel), h("slot", { key: 'fd339c7580f3e142fd80b4c4eb8503391b7ebfa2', name: "suffix" }, this.activeFilters > 0 ? `(${this.activeFilters})` : '0')), h("div", { key: '078c8038b81200c09f7ddf8d6d054449e896554b', ref: (el) => { this.filtersDrawer = el; }, class: "filtersDrawer", "data-variant": this.direction }, !this.isMobile &&
|
|
43
|
+
h("div", { key: '5476fe397f3599a50548b0ea4f47b4c66bbbd6cd', class: 'filtersDrawer__header' }, h("jump-icon", { key: '1e16b65feb8f923c2b9d1f421d939f6eeee136f7', class: "small", name: this.filterButtonIcon }), h("h3", { key: '02f99e915aa045d62d7afedaf0d216adbf8db7d0' }, this.filterHeading)), h("slot", { key: 'aa697d79b5ca21bdcf75e020780019effd19898c' }))));
|
|
44
|
+
}
|
|
45
|
+
static get is() { return "jump-filter"; }
|
|
46
|
+
static get encapsulation() { return "shadow"; }
|
|
47
|
+
static get originalStyleUrls() {
|
|
48
|
+
return {
|
|
49
|
+
"$": ["jump-filter.scss"]
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
static get styleUrls() {
|
|
53
|
+
return {
|
|
54
|
+
"$": ["jump-filter.css"]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
static get properties() {
|
|
58
|
+
return {
|
|
59
|
+
"direction": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"mutable": false,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "'horizontal' | 'vertical'",
|
|
64
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
65
|
+
"references": {}
|
|
66
|
+
},
|
|
67
|
+
"required": false,
|
|
68
|
+
"optional": false,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": ""
|
|
72
|
+
},
|
|
73
|
+
"attribute": "direction",
|
|
74
|
+
"reflect": false,
|
|
75
|
+
"defaultValue": "'vertical'"
|
|
76
|
+
},
|
|
77
|
+
"filterHeading": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "string",
|
|
82
|
+
"resolved": "string",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": false,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": ""
|
|
90
|
+
},
|
|
91
|
+
"attribute": "filter-heading",
|
|
92
|
+
"reflect": false,
|
|
93
|
+
"defaultValue": "'Filtra per'"
|
|
94
|
+
},
|
|
95
|
+
"filterButtonLabel": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"mutable": false,
|
|
98
|
+
"complexType": {
|
|
99
|
+
"original": "string",
|
|
100
|
+
"resolved": "string",
|
|
101
|
+
"references": {}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": ""
|
|
108
|
+
},
|
|
109
|
+
"attribute": "filter-button-label",
|
|
110
|
+
"reflect": false,
|
|
111
|
+
"defaultValue": "'Filtri'"
|
|
112
|
+
},
|
|
113
|
+
"filterButtonIcon": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"mutable": false,
|
|
116
|
+
"complexType": {
|
|
117
|
+
"original": "string",
|
|
118
|
+
"resolved": "string",
|
|
119
|
+
"references": {}
|
|
120
|
+
},
|
|
121
|
+
"required": false,
|
|
122
|
+
"optional": false,
|
|
123
|
+
"docs": {
|
|
124
|
+
"tags": [],
|
|
125
|
+
"text": ""
|
|
126
|
+
},
|
|
127
|
+
"attribute": "filter-button-icon",
|
|
128
|
+
"reflect": false,
|
|
129
|
+
"defaultValue": "'filter'"
|
|
130
|
+
},
|
|
131
|
+
"mobileThreshold": {
|
|
132
|
+
"type": "number",
|
|
133
|
+
"mutable": false,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "number",
|
|
136
|
+
"resolved": "number",
|
|
137
|
+
"references": {}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": false,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": ""
|
|
144
|
+
},
|
|
145
|
+
"attribute": "mobile-threshold",
|
|
146
|
+
"reflect": false,
|
|
147
|
+
"defaultValue": "768"
|
|
148
|
+
},
|
|
149
|
+
"filters": {
|
|
150
|
+
"type": "any",
|
|
151
|
+
"mutable": false,
|
|
152
|
+
"complexType": {
|
|
153
|
+
"original": "any",
|
|
154
|
+
"resolved": "any",
|
|
155
|
+
"references": {}
|
|
156
|
+
},
|
|
157
|
+
"required": false,
|
|
158
|
+
"optional": false,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": ""
|
|
162
|
+
},
|
|
163
|
+
"attribute": "filters",
|
|
164
|
+
"reflect": false
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
static get states() {
|
|
169
|
+
return {
|
|
170
|
+
"activeFilters": {},
|
|
171
|
+
"showMobileFilters": {},
|
|
172
|
+
"isMobile": {}
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
static get methods() {
|
|
176
|
+
return {
|
|
177
|
+
"getFilters": {
|
|
178
|
+
"complexType": {
|
|
179
|
+
"signature": "() => Promise<any>",
|
|
180
|
+
"parameters": [],
|
|
181
|
+
"references": {
|
|
182
|
+
"Promise": {
|
|
183
|
+
"location": "global",
|
|
184
|
+
"id": "global::Promise"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"return": "Promise<any>"
|
|
188
|
+
},
|
|
189
|
+
"docs": {
|
|
190
|
+
"text": "Get the active filters from the component",
|
|
191
|
+
"tags": []
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
static get listeners() {
|
|
197
|
+
return [{
|
|
198
|
+
"name": "jump-filterchange",
|
|
199
|
+
"method": "filterChangeHandler",
|
|
200
|
+
"target": undefined,
|
|
201
|
+
"capture": false,
|
|
202
|
+
"passive": false
|
|
203
|
+
}, {
|
|
204
|
+
"name": "resize",
|
|
205
|
+
"method": "handleResize",
|
|
206
|
+
"target": "window",
|
|
207
|
+
"capture": false,
|
|
208
|
+
"passive": true
|
|
209
|
+
}];
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=jump-filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-filter.js","sourceRoot":"","sources":["../../../src/components/jump-filter/jump-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAOhF,MAAM,OAAO,UAAU;;yBAE0B,UAAU;6BACzB,YAAY;iCACR,QAAQ;gCACT,QAAQ;+BACT,GAAG;;6BAGJ,CAAC;iCACI,KAAK;wBACd,KAAK;;IAMlC,mBAAmB,CAAC,KAAkB;QACpC,8FAA8F;QAC9F,IAAI,CAAC,OAAO,mCAAO,IAAI,CAAC,OAAO,KAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,GAAC,CAAC;QAC3E,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAItE,oCAAoC;IACtC,CAAC;IAGD,YAAY;QACV,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC;IAC3D,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,UAAU;QACd,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;IAED,mBAAmB;QACjB,IAAG,IAAI,CAAC,YAAY,EAAC,CAAC;YACpB,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;gBAC/C,IAAG,CAAC,IAAI,CAAC,QAAQ;oBAAE,OAAO;gBAC1B,IAAI,CAAC,iBAAiB,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC;YACnD,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,aAAa,EAAE,IAAI,CAAC,iBAAiB;YACxC,IAAI,CAAC,QAAQ,IAAI,oEAChB,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,GAAE,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA,CAAA,CAAC,EACrC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI;gBAClE,6DAAM,IAAI,EAAC,QAAQ;oBAChB,IAAI,CAAC,gBAAgB,IAAI,kEAAW,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,GAAc;oBAC3F,IAAI,CAAC,iBAAiB,CAClB;gBACP,6DAAM,IAAI,EAAC,QAAQ,IAChB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,GAAG,CACpD,CACK;YAEb,4DACC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,GAAE,IAAI,CAAC,aAAa,GAAG,EAAE,CAAA,CAAA,CAAC,EACtC,KAAK,EAAC,eAAe,kBAAe,IAAI,CAAC,SAAS;gBACjD,CAAC,IAAI,CAAC,QAAQ;oBACf,4DAAK,KAAK,EAAE,uBAAuB;wBACjC,kEAAW,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,GAAc;wBAClE,6DAAK,IAAI,CAAC,aAAa,CAAM,CACzB;gBACN,8DAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, State, Listen, Method } from '@stencil/core';\n\n@Component({\n tag: 'jump-filter',\n styleUrl: 'jump-filter.scss',\n shadow: true,\n})\nexport class JumpFilter {\n\n @Prop() direction: 'horizontal' | 'vertical' = 'vertical';\n @Prop() filterHeading: string = 'Filtra per';\n @Prop() filterButtonLabel: string = 'Filtri';\n @Prop() filterButtonIcon: string = 'filter';\n @Prop() mobileThreshold: number = 768;\n @Prop() filters: any;\n\n @State() activeFilters: number = 0;\n @State() showMobileFilters: boolean = false;\n @State() isMobile: boolean = false;\n\n mobileToggle: HTMLElement | null;\n filtersDrawer: HTMLElement;\n\n @Listen('jump-filterchange')\n filterChangeHandler(event: CustomEvent) {\n //set this.filter as this.filters[event.detail.name] = event.detail.value; even if not present\n this.filters = {...this.filters, [event.detail.name]: event.detail.values};\n console.log('Received the custom filterChange event: ', this.filters);\n\n\n\n //TODO: increment this.activeFilters\n }\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n this.isMobile = window.innerWidth < this.mobileThreshold;\n }\n\n /**\n * Get the active filters from the component\n */\n @Method()\n async getFilters() {\n return this.filters;\n }\n\n componentDidLoad(){\n this.toggleMobileFilters();\n }\n\n toggleMobileFilters() {\n if(this.mobileToggle){\n this.mobileToggle.addEventListener('click', () => {\n if(!this.isMobile) return;\n this.showMobileFilters = !this.showMobileFilters;\n });\n }\n }\n\n render() {\n return (\n <Host mobileFilters={this.showMobileFilters}>\n {this.isMobile && <jump-button\n ref={(el) => {this.mobileToggle = el}}\n buttonId={this.filterButtonIcon} variant={'primary'} outline={true}>\n <slot name=\"prefix\">\n {this.filterButtonIcon && <jump-icon class=\"small\" name={this.filterButtonIcon}></jump-icon>}\n {this.filterButtonLabel}\n </slot>\n <slot name=\"suffix\">\n {this.activeFilters > 0 ? `(${this.activeFilters})` : '0'}\n </slot>\n </jump-button>}\n\n {<div\n ref={(el) => {this.filtersDrawer = el}}\n class=\"filtersDrawer\" data-variant={this.direction}>\n {!this.isMobile &&\n <div class={'filtersDrawer__header'}>\n <jump-icon class=\"small\" name={this.filterButtonIcon}></jump-icon>\n <h3>{this.filterHeading}</h3>\n </div>}\n <slot></slot>\n </div>}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { generateAttributesFromArgs, formatHtml } from "../../utils/utils";
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/Filters/JumpFilter',
|
|
4
|
+
tags: ['autodocs'],
|
|
5
|
+
argTypes: {
|
|
6
|
+
//list all props
|
|
7
|
+
direction: {
|
|
8
|
+
control: {
|
|
9
|
+
type: 'select',
|
|
10
|
+
options: ['horizontal', 'vertical']
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
filterHeading: {
|
|
14
|
+
control: {
|
|
15
|
+
type: 'text',
|
|
16
|
+
description: 'Intestazione drawer dei filtri'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
filterButtonLabel: {
|
|
20
|
+
control: {
|
|
21
|
+
type: 'text'
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
filterButtonIcon: {
|
|
25
|
+
control: {
|
|
26
|
+
type: 'text'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
mobileThreshold: {
|
|
30
|
+
control: {
|
|
31
|
+
type: 'number'
|
|
32
|
+
},
|
|
33
|
+
defaultValue: 768
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const Template = (args) => {
|
|
38
|
+
const attributes = generateAttributesFromArgs(args);
|
|
39
|
+
return formatHtml(`<jump-filter ${attributes}>
|
|
40
|
+
<!-- TODO: Replace with jump components -->
|
|
41
|
+
<jump-filtergroup class='filterGroup' name="tax-name" title="Titolo del filtro" other-label="Mostra di più" max-elements=3>
|
|
42
|
+
<select label="Ordina per" variant="primary" size="small">
|
|
43
|
+
<option value="0">Ordina per</option>
|
|
44
|
+
<option value="latest">Più recenti</option>
|
|
45
|
+
<option value="oldest">Più vecchi</option>
|
|
46
|
+
</select>
|
|
47
|
+
</jump-filtergroup>
|
|
48
|
+
</jump-filter>`);
|
|
49
|
+
};
|
|
50
|
+
export const Default = Template.bind({});
|
|
51
|
+
const TemplateWithSelectFilter = (args) => {
|
|
52
|
+
const attributes = generateAttributesFromArgs(args);
|
|
53
|
+
return formatHtml(`<jump-filtergroup ${attributes} name='sort' title='Ordina per'>
|
|
54
|
+
<select class='filterGroupSelect' label="Ordina per" variant="primary" size="small">
|
|
55
|
+
<option value="0">Ordina per</option>
|
|
56
|
+
<option value="latest">Più recenti</option>
|
|
57
|
+
<option value="oldest">Più vecchi</option>
|
|
58
|
+
</select>
|
|
59
|
+
</jump-filtergroup>
|
|
60
|
+
</jump-filtergroup>`);
|
|
61
|
+
};
|
|
62
|
+
export const WithSelectFilter = TemplateWithSelectFilter.bind({});
|
|
63
|
+
const TemplateWithCheckboxFilter = (args) => {
|
|
64
|
+
const attributes = generateAttributesFromArgs(args);
|
|
65
|
+
return formatHtml(`<jump-filter ${attributes} name='sort' title='Ordina per'>
|
|
66
|
+
<jump-filtergroup class='filterGroupCheckbox' name='animal' title='Animale' other-label='Mostra di più' max-elements='3'>
|
|
67
|
+
<label><input type='checkbox' value='cane'>Cane</label>
|
|
68
|
+
<label><input type='checkbox' value='gatto'>Gatto</label>
|
|
69
|
+
<label><input type='checkbox' value='pesce'>Pesce</label>
|
|
70
|
+
</jump-filtergroup>
|
|
71
|
+
</jump-filter>`);
|
|
72
|
+
};
|
|
73
|
+
export const WithCheckboxFilter = TemplateWithCheckboxFilter.bind({});
|
|
74
|
+
//mixed kind of filters
|
|
75
|
+
const TemplateWithMixedFilters = (args) => {
|
|
76
|
+
const attributes = generateAttributesFromArgs(args);
|
|
77
|
+
return formatHtml(`<jump-filter ${attributes} name='sort' title='Ordina per'>
|
|
78
|
+
<!-- select group -->
|
|
79
|
+
<jump-filtergroup class='filterGroupSelect' name="tax-select-sample" title="Ordinamento" other-label="Mostra di più" max-elements=3>
|
|
80
|
+
<select class='filterGroupSelect' label="Ordina per" variant="primary" size="small">
|
|
81
|
+
<option value="0">Ordina per</option>
|
|
82
|
+
<option value="latest">Più recenti</option>
|
|
83
|
+
<option value="oldest">Più vecchi</option>
|
|
84
|
+
</select>
|
|
85
|
+
</jump-filtergroup>
|
|
86
|
+
|
|
87
|
+
<jump-filtergroup class='filterGroupCheckbox' name="tax-animal-sample-checkbox" title="Animali" other-label="Mostra di più" max-elements=3>
|
|
88
|
+
<label><input type='checkbox' value='cane'>Cane</label>
|
|
89
|
+
<label><input type='checkbox' value='gatto'>Gatto</label>
|
|
90
|
+
<label><input type='checkbox' value='pesce'>Pesce</label>
|
|
91
|
+
</jump-filtergroup>
|
|
92
|
+
|
|
93
|
+
<!-- radio group -->
|
|
94
|
+
<jump-filtergroup class='filterGroupRadio' name="tax-animal-sample-radio" title="Animali 2" other-label="Mostra di più" max-elements=3>
|
|
95
|
+
<label><input type='radio' value='snakes'>Serpenti</label>
|
|
96
|
+
<label><input type='radio' value='spiders'>Ragni</label>
|
|
97
|
+
</jump-filtergroup>
|
|
98
|
+
</jump-filter>`);
|
|
99
|
+
};
|
|
100
|
+
export const WithMixedFilters = TemplateWithMixedFilters.bind({});
|
|
101
|
+
const TemplateWithMoreFilters = (args) => {
|
|
102
|
+
const attributes = generateAttributesFromArgs(args);
|
|
103
|
+
return formatHtml(`<jump-filter ${attributes} name='sort' title='Ordina per'>
|
|
104
|
+
<jump-filtergroup class='filterGroupCheckbox' name="tax-animal-sample-checkbox" title="Animali" other-label="Mostra di più" max-elements=8>
|
|
105
|
+
<label><input type='checkbox' value='cane'>Cane</label>
|
|
106
|
+
<label><input type='checkbox' value='gatto'>Gatto</label>
|
|
107
|
+
<label><input type='checkbox' value='pesce'>Pesce</label>
|
|
108
|
+
<label><input type='checkbox' value='cavallo'>Cavallo</label>
|
|
109
|
+
<label><input type='checkbox' value='topo'>Topo</label>
|
|
110
|
+
<label><input type='checkbox' value='coniglio'>Coniglio</label>
|
|
111
|
+
<label><input type='checkbox' value='pappagallo'>Pappagallo</label>
|
|
112
|
+
<label><input type='checkbox' value='tartaruga'>Tartaruga</label>
|
|
113
|
+
<label><input type='checkbox' value='criceto'>Criceto</label>
|
|
114
|
+
<label><input type='checkbox' value='canarino'>Canarino</label>
|
|
115
|
+
<label><input type='checkbox' value='pesciolino'>Pesciolino</label>
|
|
116
|
+
<label><input type='checkbox' value='pappagallino'>Pappagallino</label>
|
|
117
|
+
<label><input type='checkbox' value='tartarughina'>Tartarughina</label>
|
|
118
|
+
</jump-filtergroup>
|
|
119
|
+
</jump-filter>`);
|
|
120
|
+
};
|
|
121
|
+
export const WithMoreFilters = TemplateWithMoreFilters.bind({});
|
|
122
|
+
//# sourceMappingURL=jump-filter.stories.js.map
|