@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-056a0a66.js';
|
|
2
2
|
|
|
3
3
|
const jumpPaginationTableCss = ":host{display:block}.JumpPaginationTable{--jump-pagination-table-label:var(--neutral-grey-secondary);--jump-pagination-table-arrows:var(--neutral-grey-secondary);--jump-pagination-table-arrows-disabled:var(--neutral-grey-disabled);font-family:var(--ff-primary)}.JumpPaginationTable__Wrapper{display:flex;justify-content:space-between}.JumpPaginationTable__Wrapper .elementsPerPage{display:flex;gap:1rem;align-items:center}.JumpPaginationTable__Wrapper .elementsPerPage label{color:var(--jump-pagination-table-label);font-size:var(--fs-300);font-weight:normal}.JumpPaginationTable__Wrapper .indicators{font-size:var(--fs-400);font-weight:normal;display:flex;justify-content:space-between;gap:20px;color:var(--jump-pagination-table-label)}.JumpPaginationTable__Wrapper .indicators .arrow{color:var(--jump-pagination-table-arrows);display:flex;align-items:center;gap:10px}.JumpPaginationTable__Wrapper .indicators .arrow button{background-color:transparent;border:none;cursor:pointer;padding:0px;display:flex;align-items:center}.JumpPaginationTable__Wrapper .indicators .arrow button:disabled{cursor:not-allowed;color:var(--jump-pagination-table-arrows-disabled)}.JumpPaginationTable__Wrapper .indicators .elements{color:var(--jump-pagination-table-label);display:flex;align-items:center;gap:5px}";
|
|
4
4
|
const JumpPaginationTableStyle0 = jumpPaginationTableCss;
|
|
@@ -23,9 +23,15 @@ const JumpPaginationTable = class {
|
|
|
23
23
|
this.first = 1;
|
|
24
24
|
this.last = Math.min(this.total, newValue);
|
|
25
25
|
}
|
|
26
|
-
console.log('quaaaa');
|
|
27
26
|
this.changeElPerPage.emit({ elPerPage: newValue });
|
|
28
27
|
}
|
|
28
|
+
/* -------------------- LYFECYCLE EVENTS ---------------------- */
|
|
29
|
+
componentWillLoad() {
|
|
30
|
+
this.elPerPage = this.elementsRanges[0];
|
|
31
|
+
}
|
|
32
|
+
/* -------------------- @LISTEN ------------------------------- */
|
|
33
|
+
/* -------------------- @METHOD ------------------------------- */
|
|
34
|
+
/* -------------------- LOCAL METHODS ------------------------- */
|
|
29
35
|
setElPerPage(e) {
|
|
30
36
|
this.elPerPage = e.target.value;
|
|
31
37
|
}
|
|
@@ -58,11 +64,12 @@ const JumpPaginationTable = class {
|
|
|
58
64
|
};
|
|
59
65
|
this.changePage.emit(details);
|
|
60
66
|
}
|
|
67
|
+
/* --------------------- RENDER ------------------------------- */
|
|
61
68
|
render() {
|
|
62
69
|
var _a;
|
|
63
|
-
return (h(Host, { key: '
|
|
64
|
-
h("button", { key: '
|
|
65
|
-
h("button", { key: '
|
|
70
|
+
return (h(Host, { key: '7aaf182b98f9dbdbb1d6534a1d7b466bbc486fca', class: "JumpPaginationTable" }, h("div", { key: 'b8a5d5213ae3a20ee69aeb75b0d82c58ab4d5200', class: "JumpPaginationTable__Wrapper" }, h("div", { key: '2de29a7b2bb549e3b6e4260429651c1cc3ba72b6', class: "elementsPerPage" }, h("label", { key: 'a9d541046112f0a44239b3d61dea7a80924e56a6', htmlFor: "elements" }, (_a = this.labelElementsPerPage) !== null && _a !== void 0 ? _a : 'Elements per page'), h("select", { key: '28db5dfa88e11493b41a1b846ae35da95ab97926', name: "elements", id: "elements", onChange: (e) => this.setElPerPage(e) }, this.elementsRanges.map((range) => (h("option", { value: range, selected: (this.elPerPage == range) && true }, range))))), h("div", { key: '67f6433160f242f108682af2e97c6fdca2136836', class: "indicators" }, h("div", { key: 'a2babacab58ca903d543396f184ac0e82af517c0', class: "elements" }, h("span", { key: 'b50d80c5aff8d99a9146fb22a7624f3c47784f78' }, h("span", { key: '33e54e9d66a4c80ed6c85ad3ac48e82bd1b329f0' }, this.first), " - ", h("span", { key: '925393912439fb60530f18eb863de15b22e41f25' }, this.last), " ", this.pagLabel, " ", h("span", { key: '1d27a6418dbe2a43e18b99bb48164ffbc0c2c8ca' }, this.total))), h("div", { key: '7d5f3508e4110320bf990c51e8f324d1e2c3cb8a', class: "arrow" }, this.showFirstAndLast &&
|
|
71
|
+
h("button", { key: '6807e1defb67535f7ca92443d6869ae203155226', onClick: () => this.doChangePage('first'), disabled: this.first === 1 }, h("jump-icon", { key: '221eda90c3a22540531674ff4bf6e980fded8e22', slot: "prefix", name: "chevrons-left" })), h("button", { key: '7cc613b04ac2aee3621fe8d8375afc5fbfffe41b', onClick: () => this.doChangePage('previous'), disabled: this.first === 1 }, h("jump-icon", { key: 'e05d4ea32e2f48fb59c768a6f5a7589b16dbabe2', slot: "prefix", name: "chevron-left" })), h("button", { key: 'dc347685f6183ed76c4b3e0ac1e9b762d974ef39', onClick: () => this.doChangePage('next'), disabled: this.last === this.total }, h("jump-icon", { key: 'd2b9da97638a1d53936d7ff238ee93f0eff910c2', slot: "prefix", name: "chevron-right" })), this.showFirstAndLast &&
|
|
72
|
+
h("button", { key: '9a4a7253847f4e60ae44866b3e12d8623562f7f6', onClick: () => this.doChangePage('last'), disabled: this.last === this.total }, h("jump-icon", { key: 'bcec81a82757e92facd426c351986b19552c9506', slot: "prefix", name: "chevrons-right" })))))));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gBAAgB,GAAa,CACpD,CAEP,CACF,CACF,CACD,EACP;KACH;;;;;;;;;","names":[],"sources":["src/components/jump-pagination-table/jump-pagination-table.scss?tag=jump-pagination-table","src/components/jump-pagination-table/jump-pagination-table.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.JumpPaginationTable {\n --jump-pagination-table-label: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows-disabled: var(--neutral-grey-disabled); //mappare una variabile del design system\n\n font-family: var(--ff-primary);\n\n &__Wrapper {\n display: flex;\n justify-content: space-between;\n \n .elementsPerPage {\n display: flex;\n gap: 1rem;\n align-items: center;\n \n label {\n color: var(--jump-pagination-table-label);\n font-size: var(--fs-300);\n font-weight: normal;\n }\n }\n \n .indicators {\n font-size: var(--fs-400);\n font-weight: normal;\n display: flex;\n justify-content: space-between;\n gap: 20px;\n \n color: var(--jump-pagination-table-label);\n \n .arrow {\n color: var(--jump-pagination-table-arrows);\n display: flex;\n align-items: center;\n gap: 10px;\n \n button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n padding: 0px;\n display: flex;\n align-items: center;\n }\n \n button:disabled {\n cursor: not-allowed;\n color: var(--jump-pagination-table-arrows-disabled);\n \n }\n }\n \n .elements {\n color: var(--jump-pagination-table-label);\n display: flex;\n align-items: center;\n gap: 5px;\n }\n }\n \n }\n}","import { Component, Event, EventEmitter, Watch, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-pagination-table',\n styleUrl: 'jump-pagination-table.scss',\n shadow: false,\n})\nexport class JumpPaginationTable {\n\n /**\n * Values for the elements per page select\n */\n @Prop({ reflect: true }) elementsRanges: Array<number> = [10, 20, 60, 100];\n\n @Prop() elPerPage: number = 10;\n\n @Prop({ reflect: true }) pagLabel: string = 'di'; // Identifica la label testuale di pagination. \n\n /**\n * Label for the elements per page select\n */\n @Prop({ reflect: true }) labelElementsPerPage: string = 'Elementi per pagina';\n\n @Prop({ reflect: true }) total: number = 100; // Totale di elementi, usata se completeVersion = true\n\n\n @Prop({ reflect: true }) first: number = 1;\n @Prop({ reflect: true }) last: number = 10;\n\n @Prop({ reflect: true }) showFirstAndLast: boolean = false;\n\n\n\n @Watch('elPerPage')\n elPerPageChanged(newValue: number, oldValue: number) {\n if (newValue !== oldValue) {\n // Riporta la paginazione allo stato iniziale\n this.first = 1;\n this.last = Math.min(this.total, newValue);\n }\n\n\n console.log('quaaaa');\n this.changeElPerPage.emit({elPerPage: newValue});\n }\n\n setElPerPage(e){\n this.elPerPage = e.target.value;\n }\n\n @Event({ eventName: 'jump-change-page' }) changePage: EventEmitter;\n @Event({ eventName: 'jump-change-el-per-page' }) changeElPerPage: EventEmitter;\n\n doChangePage(dir) {\n let newFirst;\n let newLast;\n\n //TODO refactorare \n if (dir === 'first') {\n newFirst = 1;\n newLast = Math.min(this.total, this.elPerPage);\n } else if (dir === 'last') {\n newLast = this.total;\n newFirst = Math.max(1, this.total - this.elPerPage + 1);\n } else if (dir === 'previous') {\n newFirst = Math.max(1, this.first - this.elPerPage);\n newLast = Math.min(this.total, newFirst + this.elPerPage - 1);\n } else if (dir === 'next') {\n newLast = Math.min(this.total, this.last + this.elPerPage);\n newFirst = Math.max(1, newLast - this.elPerPage + 1);\n }\n\n this.first = newFirst;\n this.last = newLast;\n\n let details = {\n first: newFirst,\n last: newLast,\n direction: dir\n }\n\n\n this.changePage.emit(details);\n }\n\n\n render() {\n return (\n <Host class=\"JumpPaginationTable\">\n <div class=\"JumpPaginationTable__Wrapper\">\n <div class=\"elementsPerPage\">\n <label htmlFor=\"elements\">{this.labelElementsPerPage ?? 'Elements per page'}</label>\n <select name=\"elements\" id=\"elements\" onChange={(e) => this.setElPerPage(e)}>\n {this.elementsRanges.map((range) => (\n <option value={range} selected={(this.elPerPage == range) && true}>{range}</option>\n ))}\n </select>\n </div> \n <div class=\"indicators\">\n <div class=\"elements\">\n <span>\n <span>{this.first}</span> - <span>{this.last}</span> {this.pagLabel} <span>{this.total}</span>\n </span>\n </div>\n <div class=\"arrow\">\n {this.showFirstAndLast &&\n <button \n onClick={() => this.doChangePage('first')}\n disabled={this.first === 1}\n >\n <jump-icon slot=\"prefix\" name=\"chevrons-left\"></jump-icon>\n </button>\n }\n <button\n onClick={() => this.doChangePage('previous')}\n disabled={this.first === 1}\n >\n <jump-icon slot=\"prefix\" name=\"chevron-left\"></jump-icon>\n </button>\n <button\n onClick={() => this.doChangePage('next')}\n disabled={this.last === this.total}\n >\n <jump-icon slot=\"prefix\" name=\"chevron-right\"></jump-icon>\n </button>\n {this.showFirstAndLast &&\n <button\n onClick={() => this.doChangePage('last')}\n disabled={this.last === this.total}\n >\n <jump-icon slot=\"prefix\" name=\"chevrons-right\"></jump-icon>\n </button>\n }\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
1
|
+
{"file":"jump-pagination-table.entry.js","mappings":";;AAAA,MAAM,sBAAsB,GAAG,+wCAA+wC,CAAC;AAC/yC,kCAAe,sBAAsB;;MCMxB,mBAAmB;;;;;8BAa2B,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;yBAK9C,EAAE;wBAYc,IAAI;oCAKQ,qBAAqB;qBAKpC,GAAG;qBAKH,CAAC;oBAKF,EAAE;gCAKW,KAAK;;IAnC1D,gBAAgB,CAAC,QAAgB,EAAE,QAAgB;QACjD,IAAI,QAAQ,KAAK,QAAQ,EAAE;;YAEzB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;SAC5C;QAED,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;KACpD;;IAkCD,iBAAiB;QACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;KACzC;;;;IA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C,IAE1B,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,cAAc,GAAa,CAClD,EACT,+DACE,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EACxC,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,IAElC,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,eAAe,GAAa,CACnD,EACR,IAAI,CAAC,gBAAgB;YACpB,+DACE,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EACxC,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,IAElC,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,gBAAgB,GAAa,CACpD,CAEP,CACF,CACF,CACD,EACP;KACH;;;;;;;;;","names":[],"sources":["src/components/jump-pagination-table/jump-pagination-table.scss?tag=jump-pagination-table","src/components/jump-pagination-table/jump-pagination-table.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.JumpPaginationTable {\n --jump-pagination-table-label: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows-disabled: var(--neutral-grey-disabled); //mappare una variabile del design system\n\n font-family: var(--ff-primary);\n\n &__Wrapper {\n display: flex;\n justify-content: space-between;\n \n .elementsPerPage {\n display: flex;\n gap: 1rem;\n align-items: center;\n \n label {\n color: var(--jump-pagination-table-label);\n font-size: var(--fs-300);\n font-weight: normal;\n }\n }\n \n .indicators {\n font-size: var(--fs-400);\n font-weight: normal;\n display: flex;\n justify-content: space-between;\n gap: 20px;\n \n color: var(--jump-pagination-table-label);\n \n .arrow {\n color: var(--jump-pagination-table-arrows);\n display: flex;\n align-items: center;\n gap: 10px;\n \n button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n padding: 0px;\n display: flex;\n align-items: center;\n }\n \n button:disabled {\n cursor: not-allowed;\n color: var(--jump-pagination-table-arrows-disabled);\n \n }\n }\n \n .elements {\n color: var(--jump-pagination-table-label);\n display: flex;\n align-items: center;\n gap: 5px;\n }\n }\n \n }\n}","import { Component, Event, EventEmitter, Watch, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-pagination-table',\n styleUrl: 'jump-pagination-table.scss',\n shadow: false,\n})\nexport class JumpPaginationTable {\n\n /* ---------------------- OWN PROPERTIES ---------------------- */\n\n /* ---------------------- @ELEMENT ---------------------------- */\n\n /* ---------------------- @STATE ------------------------------ */\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /**\n * Values for the elements per page select\n */\n @Prop({ reflect: true }) elementsRanges: Array<number> = [10, 20, 60, 100];\n\n /**\n * Number of elements per page selected\n */\n @Prop() elPerPage: number = 10;\n @Watch('elPerPage')\n elPerPageChanged(newValue: number, oldValue: number) {\n if (newValue !== oldValue) {\n // Riporta la paginazione allo stato iniziale\n this.first = 1;\n this.last = Math.min(this.total, newValue);\n }\n\n this.changeElPerPage.emit({ elPerPage: newValue });\n }\n\n @Prop({ reflect: true }) pagLabel: string = 'di'; // Identifica la label testuale di pagination. \n\n /**\n * Label for the elements per page select\n */\n @Prop({ reflect: true }) labelElementsPerPage: string = 'Elementi per pagina';\n\n /**\n * Total of elements\n */\n @Prop({ reflect: true }) total: number = 100; \n\n /**\n * First element of the page\n */\n @Prop({ reflect: true }) first: number = 1;\n\n /**\n * Last element of the page\n */\n @Prop({ reflect: true }) last: number = 10;\n\n /**\n * Show button to navigate so first e last page\n */\n @Prop({ reflect: true }) showFirstAndLast: boolean = false;\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-change-page' }) changePage: EventEmitter;\n @Event({ eventName: 'jump-change-el-per-page' }) changeElPerPage: EventEmitter;\n\n /* -------------------- LYFECYCLE EVENTS ---------------------- */\n componentWillLoad() {\n this.elPerPage = this.elementsRanges[0];\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n\n /* -------------------- @METHOD ------------------------------- */\n\n /* -------------------- LOCAL METHODS ------------------------- */\n setElPerPage(e) {\n this.elPerPage = e.target.value;\n }\n\n doChangePage(dir) {\n let newFirst;\n let newLast;\n\n //TODO refactorare \n if (dir === 'first') {\n newFirst = 1;\n newLast = Math.min(this.total, this.elPerPage);\n } else if (dir === 'last') {\n newLast = this.total;\n newFirst = Math.max(1, this.total - this.elPerPage + 1);\n } else if (dir === 'previous') {\n newFirst = Math.max(1, this.first - this.elPerPage);\n newLast = Math.min(this.total, newFirst + this.elPerPage - 1);\n } else if (dir === 'next') {\n newLast = Math.min(this.total, this.last + this.elPerPage);\n newFirst = Math.max(1, newLast - this.elPerPage + 1);\n }\n\n this.first = newFirst;\n this.last = newLast;\n\n let details = {\n first: newFirst,\n last: newLast,\n direction: dir\n }\n\n this.changePage.emit(details);\n }\n\n /* --------------------- RENDER ------------------------------- */\n render() {\n return (\n <Host class=\"JumpPaginationTable\">\n <div class=\"JumpPaginationTable__Wrapper\">\n <div class=\"elementsPerPage\">\n <label htmlFor=\"elements\">{this.labelElementsPerPage ?? 'Elements per page'}</label>\n <select name=\"elements\" id=\"elements\" onChange={(e) => this.setElPerPage(e)}>\n {this.elementsRanges.map((range) => (\n <option value={range} selected={(this.elPerPage == range) && true}>{range}</option>\n ))}\n </select>\n </div> \n <div class=\"indicators\">\n <div class=\"elements\">\n <span>\n <span>{this.first}</span> - <span>{this.last}</span> {this.pagLabel} <span>{this.total}</span>\n </span>\n </div>\n <div class=\"arrow\">\n {this.showFirstAndLast &&\n <button \n onClick={() => this.doChangePage('first')}\n disabled={this.first === 1}\n >\n <jump-icon slot=\"prefix\" name=\"chevrons-left\"></jump-icon>\n </button>\n }\n <button\n onClick={() => this.doChangePage('previous')}\n disabled={this.first === 1}\n >\n <jump-icon slot=\"prefix\" name=\"chevron-left\"></jump-icon>\n </button>\n <button\n onClick={() => this.doChangePage('next')}\n disabled={this.last === this.total}\n >\n <jump-icon slot=\"prefix\" name=\"chevron-right\"></jump-icon>\n </button>\n {this.showFirstAndLast &&\n <button\n onClick={() => this.doChangePage('last')}\n disabled={this.last === this.total}\n >\n <jump-icon slot=\"prefix\" name=\"chevrons-right\"></jump-icon>\n </button>\n }\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-056a0a66.js';
|
|
2
2
|
|
|
3
3
|
const jumpPaginationCss = ":host{display:block}.JumpPagination{--jump-pagination-label:var(--neutral-grey-secondary);--jump-pagination-arrows-color:var(--neutral-grey-secondary);--jump-pagination-arrows-disabled:var(--neutral-grey-disabled);font-family:var(--ff-primary)}.JumpPagination__Wrapper{display:flex;justify-content:space-between}.JumpPagination__Wrapper .indicators{font-size:var(--fs-400);font-weight:normal;display:flex;justify-content:space-between;gap:20px;color:var(--jump-pagination-label)}.JumpPagination__Wrapper .indicators .arrow{color:var(--jump-pagination-arrows-color);display:flex;align-items:center;gap:10px}.JumpPagination__Wrapper .indicators .arrow button{background-color:transparent;border:none;cursor:pointer;padding:0px;display:flex;align-items:center}.JumpPagination__Wrapper .indicators .arrow button:disabled{cursor:not-allowed;color:var(--jump-pagination-arrows-disabled)}.JumpPagination__Wrapper .indicators .elements{color:var(--jump-pagination-label);display:flex;align-items:center;gap:5px}";
|
|
4
4
|
const JumpPaginationStyle0 = jumpPaginationCss;
|
|
@@ -26,10 +26,11 @@ const JumpPagination = class {
|
|
|
26
26
|
componentWillLoad() {
|
|
27
27
|
this.current = 1;
|
|
28
28
|
}
|
|
29
|
+
/* --------------------- RENDER ------------------------------- */
|
|
29
30
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
31
|
-
h("button", { key: '
|
|
32
|
-
h("button", { key: '
|
|
31
|
+
return (h(Host, { key: '91a535355690cc66cac5f6c7ba7b770cc1898d39', class: "JumpPagination" }, h("div", { key: 'b14a24e6c1f4d1cf7348eaacd2a77cd828eccb78', class: "JumpPagination__Wrapper" }, h("div", { key: '4492c23fc92b7aba537cb3f9025524a6bb07ce6c', class: "indicators" }, h("div", { key: 'f48411d785dd35e6404772c1d39d9d78f3da462b', class: "elements" }, h("span", { key: '1d2d195a9ec45c2bd5795b4474de9dc052af22d5' }, h("span", { key: 'c7f9f4473cc2e82e754c3748eb04704f62676e52' }, this.current), " ", this.pagLabel, " ", h("span", { key: 'c1a2a36aef2b86aef07aa040d4d5c9043aeaf75e' }, this.last))), h("div", { key: 'a2645af8e6ce12cc897796fa132dba44f448acd2', class: "arrow" }, this.showFirstAndLast &&
|
|
32
|
+
h("button", { key: 'ee246362f466d4691d31f8efc7182ca7c5e9963f', onClick: () => { this.current = 1; }, disabled: (this.current === 1) ? true : false }, " ", h("jump-icon", { key: 'e132a8f0c4aad2fb5924e54ad1015315983f2be5', slot: "prefix", name: "chevrons-left" }), " "), h("button", { key: '0c7144d281a536b73fda1ac94a36e54a17af846b', onClick: () => { this.current--; }, disabled: (this.current === 1) ? true : false }, " ", h("jump-icon", { key: '15d1c8b75d229cc33349145bad0ac1dfb5eac83e', slot: "prefix", name: "chevron-left" }), " "), h("button", { key: '0721ba5bfb54732174707e61833ceb19d5c8c2fa', onClick: () => { this.current++; }, disabled: (this.current === this.last) ? true : false }, " ", h("jump-icon", { key: '2f0545ccb0da5032604fe535af035be5059508e0', slot: "prefix", name: "chevron-right" }), " "), this.showFirstAndLast &&
|
|
33
|
+
h("button", { key: '1a62859d3dd69ac106335f9fb3d605ec90d685a7', onClick: () => { this.current = this.last; }, disabled: (this.current === this.last) ? true : false }, " ", h("jump-icon", { key: 'de0dd15cf47d11a59118ca3b8f0999ef60c66997', slot: "prefix", name: "chevrons-right" }), " "))))));
|
|
33
34
|
}
|
|
34
35
|
static get watchers() { return {
|
|
35
36
|
"current": ["watchcurrent"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-pagination.entry.js","mappings":";;AAAA,MAAM,iBAAiB,GA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AAC,OAAO,EAAE,CAAA,EAAC,EAC/B,QAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,IAAI,IAAI,GAAG,KAAK,SAC7C,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,cAAc,GAAa,QAAY,EACvE,+DACE,OAAO,EAAE,QAAO,IAAI,CAAC,OAAO,EAAE,CAAA,EAAC,EAC/B,QAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,IAAI,IAAI,GAAG,KAAK,SACnD,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,eAAe,GAAa,QAAY,EACzE,IAAI,CAAC,gBAAgB;YACpB,+DACE,OAAO,EAAE,QAAO,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAA,EAAC,EACzC,QAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,IAAI,IAAI,GAAG,KAAK,SACnD,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,gBAAgB,GAAa,QAAY,CAEzE,CACF,CACF,CACD,EACP;KACH;;;;;;;;;","names":[],"sources":["src/components/jump-pagination/jump-pagination.scss?tag=jump-pagination","src/components/jump-pagination/jump-pagination.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.JumpPagination {\n --jump-pagination-label: var(--neutral-grey-secondary);\n --jump-pagination-arrows-color: var(--neutral-grey-secondary);\n --jump-pagination-arrows-disabled: var(--neutral-grey-disabled);\n \n font-family: var(--ff-primary);\n\n &__Wrapper {\n display: flex;\n justify-content: space-between;\n\n .indicators {\n font-size: var(--fs-400);\n font-weight: normal;\n display: flex;\n justify-content: space-between;\n gap: 20px;\n \n color: var(--jump-pagination-label);\n\n .arrow {\n color: var(--jump-pagination-arrows-color);\n display: flex;\n align-items: center;\n gap: 10px;\n\n button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n padding: 0px;\n display: flex;\n align-items: center;\n }\n\n button:disabled {\n cursor: not-allowed;\n color: var(--jump-pagination-arrows-disabled); \n }\n }\n\n .elements {\n color: var(--jump-pagination-label);\n display: flex;\n align-items: center;\n gap: 5px;\n }\n }\n }\n}","import { Component, Host, State, Event, EventEmitter, Prop, h, Watch } from '@stencil/core';\n\n@Component({\n tag: 'jump-pagination',\n styleUrl: 'jump-pagination.scss',\n shadow: false,\n})\nexport class JumpPagination {\n \n /* ---------------------- @STATE ------------------------- */\n @State() current: number = 1;\n\n @Watch('current')\n watchcurrent(newValue: number, oldValue: number) {\n let details = {\n current: newValue,\n previousPage: oldValue,\n first: 1,\n last: this.last,\n direction: newValue > oldValue ? 'next' : 'prev'\n };\n\n this.changePage.emit(details);\n }\n\n /* ---------------------- @PROPERTIES ------------------------- */\n /**\n * Label of the pagination\n */\n @Prop() pagLabel: string = 'di'; \n\n /**\n * Last element of the page\n */\n @Prop() last: number = 10; \n\n /**\n * Show button to navigate so first e last page\n */\n @Prop() showFirstAndLast: boolean = false;\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-change-page' }) changePage: EventEmitter;\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentWillLoad() {\n this.current = 1;\n }\n \n /* --------------------- RENDER ------------------------------- */\n render() {\n return (\n <Host class=\"JumpPagination\">\n <div class=\"JumpPagination__Wrapper\">\n <div class=\"indicators\"> \n <div class=\"elements\">\n <span>\n <span>{this.current}</span> {this.pagLabel} <span>{this.last}</span>\n </span>\n </div>\n <div class=\"arrow\">\n {this.showFirstAndLast &&\n <button \n onClick={() => {this.current = 1} }\n disabled={(this.current === 1) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevrons-left\"></jump-icon> </button>\n }\n <button \n onClick={() => {this.current--}} \n disabled={(this.current === 1) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevron-left\"></jump-icon> </button>\n <button \n onClick={() => {this.current++}}\n disabled={(this.current === this.last) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevron-right\"></jump-icon> </button>\n {this.showFirstAndLast &&\n <button \n onClick={() => {this.current = this.last}}\n disabled={(this.current === this.last) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevrons-right\"></jump-icon> </button> \n }\n </div> \n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-056a0a66.js';
|
|
2
|
+
|
|
3
|
+
const jumpTabItemCss = ":host{display:block}.JumpTabItem{--jump-tabitem-active-color:var(--secondary-standard);--jump-tabitem-color:var(--neutral-grey-secondary);--jump-tabitem-hover-color:var(--neutral-grey-disabled, #CBCBCB);--jump-tabitem-boxed-bg-color:var(--secondary-soft, #EDF2FA);--jump-tabitem-rounded-bg-color:white;font-family:var(--ff-primary)}.JumpTabItem.inline{border-bottom:1px solid var(--jump-tabitem-hover-color)}.JumpTabItem.inline:hover:not(.disabled):not(.active){border-bottom:3px solid var(--jump-tabitem-hover-color);cursor:pointer}.JumpTabItem.inline.active{border-bottom:3px solid var(--jump-tabitem-active-color)}.JumpTabItem__Content{display:flex;}.JumpTabItem__Content label{font-size:16px}.JumpTabItem__Content.left{flex-direction:row;gap:6px;align-items:center}.JumpTabItem__Content.top{flex-direction:column;gap:2px;align-items:center}.JumpTabItem__Content.inline{color:var(--jump-tabitem-color);padding:12px 24px}.JumpTabItem__Content.inline.active{color:var(--jump-tabitem-active-color)}.JumpTabItem__Content.inline.active span{font-weight:bold}.JumpTabItem__Content.boxed{color:var(--jump-tabitem-color);padding:15px 39px;background-color:transparent;border:1px solid var(--jump-tabitem-boxed-bg-color)}.JumpTabItem__Content.boxed:hover:not(.disabled),.JumpTabItem__Content.boxed:hover:not(.active){background-color:transparent}.JumpTabItem__Content.boxed:hover:not(.disabled) span,.JumpTabItem__Content.boxed:hover:not(.active) span{font-weight:bold}.JumpTabItem__Content.boxed.active{color:var(--jump-tabitem-active-color);background-color:var(--jump-tabitem-boxed-bg-color);border:1px solid var(--jump-tabitem-boxed-bg-color)}.JumpTabItem__Content.boxed.active span{font-weight:bold}.JumpTabItem__Content.rounded{padding:12px 32px;color:var(--jump-tabitem-color)}.JumpTabItem__Content.rounded:hover:not(.disabled){cursor:pointer}.JumpTabItem__Content.rounded:hover:not(.disabled) span{font-weight:bold}.JumpTabItem__Content.rounded.active{color:var(--jump-tabitem-active-color);background-color:var(--jump-tabitem-rounded-bg-color);border:1px solid var(--jump-tabitem-active-color);border-radius:50px}.JumpTabItem__Content.sheet{padding:12px 32px;color:var(--neutral-grey-secondary)}.JumpTabItem__Content.sheet:hover:not(.disabled){cursor:pointer}.JumpTabItem__Content.sheet:hover:not(.disabled) span{font-weight:bold}.JumpTabItem__Content.sheet.active{color:var(--jump-tabitem-active-color);background-color:var(--jump-tabitem-rounded-bg-color);border-radius:8px 8px 0px 0px}.JumpTabItem__Content.disabled{cursor:not-allowed;opacity:0.5;pointer-events:none}";
|
|
4
|
+
const JumpTabItemStyle0 = jumpTabItemCss;
|
|
5
|
+
|
|
6
|
+
const JumpTabItem = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.changeActiveTab = createEvent(this, "jump-change-active-tab", 7);
|
|
10
|
+
this.identifier = undefined;
|
|
11
|
+
this.iconName = undefined;
|
|
12
|
+
this.iconPosition = 'left';
|
|
13
|
+
this.label = '';
|
|
14
|
+
this.active = false;
|
|
15
|
+
this.disabled = false;
|
|
16
|
+
this.variant = 'inline';
|
|
17
|
+
}
|
|
18
|
+
changeTab(identifier) {
|
|
19
|
+
this.changeActiveTab.emit({ id: identifier });
|
|
20
|
+
}
|
|
21
|
+
componentDidLoad() {
|
|
22
|
+
console.log('Component has been rendered');
|
|
23
|
+
// Deve leggere la prop "variant" del componente babbo jump-tab e popolare la propria prop "variant"
|
|
24
|
+
let parentVariant = this.tabEl.parentElement.getAttribute('variant');
|
|
25
|
+
this.variant = parentVariant;
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
return (h(Host, { key: '82864ca72b0febf6a25431ad2788b11e80744d57', ref: (el) => { this.tabEl = el; }, class: "JumpTabItem " + (this.active ? 'active' : '') + " " + (this.variant) }, h("div", { key: '9275613b491731afc823f0c63be2ae797b372fa6', class: "JumpTabItem__Content " + (this.iconName ? this.iconPosition : '') + " " + (this.variant) + " " + (this.active ? 'active' : '') + " " + (this.disabled ? 'disabled' : ''), onClick: () => this.changeTab(this.identifier), id: this.identifier }, (this.iconName && (this.variant == 'inline' || this.variant == 'boxed')) &&
|
|
29
|
+
h("jump-icon", { key: 'fcd4ab436a0695fdf3ca07f2ca9d1a6343c79d56', class: "small", name: this.iconName }), h("span", { key: '1d518eb336443596c090beafe74b5186f0a1ff37', class: "label" }, this.label))));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
JumpTabItem.style = JumpTabItemStyle0;
|
|
33
|
+
|
|
34
|
+
export { JumpTabItem as jump_tab_item };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=jump-tab-item.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"jump-tab-item.entry.js","mappings":";;AAAA,MAAM,cAAc,GAAG,+gFAA+gF,CAAC;AACviF,0BAAe,cAAc;;MCMhB,WAAW;;;;0BAOO,SAAS;wBAKX,SAAS;4BAML,MAAM;qBACb,EAAE;sBACA,KAAK;wBAEH,KAAK;uBAMN,QAAQ;;IAInC,SAAS,CAAC,UAAU;QAClB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAC,EAAE,EAAE,UAAU,EAAC,CAAC,CAAC;KAC7C;IAED,gBAAgB;QACd,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;;QAE3C,IAAI,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QACtE,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC;KAC7B;IAkED,MAAM;QACJ,QACE,EAAC,IAAI,qDACH,GAAG,EAAE,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA,EAAE,EACjC,KAAK,EAAE,cAAc,IAAI,IAAI,CAAC,MAAM,GAAG,QAAQ,GAAG,EAAE,CAAC,GAAG,GAAG,IAAG,IAAI,CAAC,OAAO,CAAC,IAC1E,4DAAK,KAAK,EAAE,uBAAuB,IAAI,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,MAAM,GAAG,QAAQ,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,IACvP,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,OAAO,IAAI,QAAQ,IAAI,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC;YACtE,kEAAW,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAc,EAE5D,6DAAM,KAAK,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ,CACnC,CACD,EACP;KACH;;;;;;","names":[],"sources":["src/components/jump-tab-item/jump-tab-item.scss?tag=jump-tab-item","src/components/jump-tab-item/jump-tab-item.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.JumpTabItem {\n --jump-tabitem-active-color: var(--secondary-standard);\n --jump-tabitem-color: var(--neutral-grey-secondary);\n --jump-tabitem-hover-color: var(--neutral-grey-disabled, #CBCBCB);\n --jump-tabitem-boxed-bg-color: var(--secondary-soft, #EDF2FA);\n --jump-tabitem-rounded-bg-color: white;\n\n font-family: var(--ff-primary);\n\n &.inline {\n border-bottom: 1px solid var(--jump-tabitem-hover-color);\n\n &:hover:not(.disabled):not(.active) {\n border-bottom: 3px solid var(--jump-tabitem-hover-color);\n cursor: pointer;\n }\n\n &.active {\n border-bottom: 3px solid var(--jump-tabitem-active-color);\n }\n\n }\n\n\n &__Content {\n\n display: flex;\n\n label {\n font-size: 16px;\n }\n\n &.left {\n flex-direction: row;\n gap: 6px;\n align-items: center;\n }\n\n &.top {\n flex-direction: column;\n gap: 2px;\n align-items: center;\n }\n\n /*Tipologia inline */\n &.inline {\n color: var(--jump-tabitem-color);\n padding: 12px 24px;\n }\n\n &.inline.active {\n color: var(--jump-tabitem-active-color);\n \n \n span {\n font-weight: bold;\n }\n }\n\n /* Tipologia boxed */\n &.boxed {\n color: var(--jump-tabitem-color);\n padding: 15px 39px;\n background-color: transparent;\n border: 1px solid var(--jump-tabitem-boxed-bg-color);\n }\n\n &.boxed:hover:not(.disabled), &.boxed:hover:not(.active) {\n background-color: transparent;\n\n span {\n font-weight: bold;\n }\n }\n\n \n\n &.boxed.active {\n color: var(--jump-tabitem-active-color);\n background-color: var(--jump-tabitem-boxed-bg-color);\n border: 1px solid var(--jump-tabitem-boxed-bg-color);\n\n span {\n font-weight: bold;\n }\n }\n\n /* Tipologia rounded */\n &.rounded {\n padding: 12px 32px;\n color: var(--jump-tabitem-color);\n \n }\n\n &.rounded:hover:not(.disabled){\n cursor: pointer;\n\n span {\n font-weight: bold;\n }\n }\n\n &.rounded.active {\n color: var(--jump-tabitem-active-color);\n background-color: var(--jump-tabitem-rounded-bg-color);\n border: 1px solid var(--jump-tabitem-active-color);\n border-radius: 50px;\n\n }\n\n /** Tipologia sheet */\n &.sheet {\n padding: 12px 32px;\n color: var(--neutral-grey-secondary);\n // border: 1px solid transparent;\n \n }\n\n &.sheet:hover:not(.disabled){\n cursor: pointer;\n\n span {\n font-weight: bold;\n }\n }\n\n &.sheet.active {\n color: var(--jump-tabitem-active-color);\n background-color: var(--jump-tabitem-rounded-bg-color);\n //border: 1px solid var(--jump-tabitem-rounded-bg-color);\n border-radius: 8px 8px 0px 0px;\n }\n\n /* Disabilitato */\n &.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n }\n\n }\n}","import { Component, Host, Prop,State, h, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab-item',\n styleUrl: 'jump-tab-item.scss',\n shadow: false,\n})\nexport class JumpTabItem {\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /**\n * Identifier of the tab\n */\n @Prop() identifier: string = undefined;\n\n /**\n * Name of the icon. If not provided, the icon will not be displayed\n */\n @Prop() iconName: string = undefined;\n\n /**\n * Icon position, apply only if the icon is present\n * Choosed from \"left\", \"top\"\n */\n @Prop() iconPosition: string = 'left';\n @Prop() label: string = '';\n @Prop() active: boolean = false;\n\n @Prop() disabled: boolean = false;\n\n /**\n * The style of the tab item\n * Choosed from \"inline\", \"boxed\", \"sheet\", \"rounded\"\n */\n @State() variant: string = 'inline';\n\n @Event({ eventName: 'jump-change-active-tab' }) changeActiveTab: EventEmitter;\n\n changeTab(identifier){\n this.changeActiveTab.emit({id: identifier});\n }\n\n componentDidLoad() {\n console.log('Component has been rendered');\n // Deve leggere la prop \"variant\" del componente babbo jump-tab e popolare la propria prop \"variant\"\n let parentVariant = this.tabEl.parentElement.getAttribute('variant');\n this.variant = parentVariant;\n }\n\n // componentDidLoad() {\n // console.log('Component has been rendered');\n \n // // console.log('THIS', this);\n // if(this.active){\n // let tab = this.tabEl.previousElementSibling as any;\n // if(tab){\n // tab.style.borderRight = 'none';\n // }\n // }\n // }\n\n // @Watch('active')\n // watchActive(newValue) {\n // console.log('watch active');\n // // Devo ripristinare i bordi di tutti i fratelli di this.tabEl\n // let siblings = this.tabEl.parentElement.children as any;\n // for (let i = 0; i < siblings.length; i++) {\n // siblings[i].style.borderRight = '1px solid red';\n // }\n\n // console.log('thisel', this.tabEl);\n // console.log('newvalue', newValue);\n // console.log('xxxxxx', this.tabEl.classList);\n\n // // Se this.tabEl ha la classe 'active' allora rimuovo il bordo destro\n // if (newValue && this.tabEl.classList.contains('active')) {\n // console.log('contiene ');\n // this.tabEl.style.borderRight = 'none';\n\n // // Rimuovere il bordo destro dal fratello precedente, se esiste\n // let prevEl = this.tabEl.previousElementSibling as any;\n // console.log('revEl', prevEl);\n // if (prevEl) {\n // prevEl.style.borderRight = 'none';\n // }\n // }\n // }\n\n // @Watch('active')\n // watchActive(newValue) {\n // // Ripristina i bordi di tutti gli elementi\n // const items = document.querySelectorAll('.JumpTabItem') as any;\n // console.log('ITEMS', items);\n // items.forEach(item => {\n // item.style.borderRight = '1px solid red';\n // });\n\n // // Verifica se this.tabEl ha la classe 'active'\n // if (newValue && this.tabEl.classList.contains('active')) {\n // // Rimuovere il bordo destro dal nuovo elemento attivo\n // this.tabEl.style.borderRight = 'none';\n\n // // Rimuovere il bordo destro dal fratello precedente, se esiste\n // let prevEl = this.tabEl.previousElementSibling as any;\n // if (prevEl) {\n // prevEl.style.borderRight = 'none';\n // }\n // }\n // }\n\n\n tabEl: HTMLElement;\n\n render() {\n return (\n <Host\n ref={(el) => { this.tabEl = el }}\n class={\"JumpTabItem \" + (this.active ? 'active' : '') + \" \" +(this.variant)}>\n <div class={\"JumpTabItem__Content \" + (this.iconName ? this.iconPosition : '') + \" \" + (this.variant) + \" \" + (this.active ? 'active' : '') + \" \" + (this.disabled ? 'disabled' : '')} onClick={() => this.changeTab(this.identifier)} id={this.identifier}>\n {(this.iconName && (this.variant == 'inline' || this.variant == 'boxed')) &&\n <jump-icon class=\"small\" name={this.iconName}></jump-icon>\n }\n <span class=\"label\">{this.label}</span>\n </div>\n </Host>\n );\n }\n}\n\n"],"version":3}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-056a0a66.js';
|
|
2
|
+
|
|
3
|
+
const jumpTabPanelCss = ":host{display:block}.JumpTabPanel__Content{display:none;padding:1rem 0}.JumpTabPanel__Content.active{display:block}";
|
|
4
|
+
const JumpTabPanelStyle0 = jumpTabPanelCss;
|
|
5
|
+
|
|
6
|
+
const JumpTabPanel = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.identifier = undefined;
|
|
10
|
+
this.active = false;
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return (h(Host, { key: '5a2a846c7470d079a668b9951d9463a312be4341', class: "JumpTabPanel", id: this.identifier }, h("div", { key: '0b04369ba6c7ed54566383516b8e736cad30b2c3', class: "JumpTabPanel__Content " + (this.active ? 'active' : '') }, h("slot", { key: '1381d2e4e39f2ddbac4b9532458419c5c03dc704' }))));
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
JumpTabPanel.style = JumpTabPanelStyle0;
|
|
17
|
+
|
|
18
|
+
export { JumpTabPanel as jump_tab_panel };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=jump-tab-panel.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"jump-tab-panel.entry.js","mappings":";;AAAA,MAAM,eAAe,GAAG,qHAAqH,CAAC;AAC9I,2BAAe,eAAe;;MCMjB,YAAY;;;0BAEM,SAAS;sBACZ,KAAK;;IAE/B,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,KAAK,EAAC,cAAc,EAAC,EAAE,EAAE,IAAI,CAAC,UAAU,IAC5C,4DAAK,KAAK,EAAE,wBAAwB,IAAI,IAAI,CAAC,MAAM,GAAG,QAAQ,GAAG,EAAE,CAAC,IAClE,8DAAa,CACT,CACD,EACP;KACH;;;;;;","names":[],"sources":["src/components/jump-tab-panel/jump-tab-panel.scss?tag=jump-tab-panel&encapsulation=shadow","src/components/jump-tab-panel/jump-tab-panel.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n\n.JumpTabPanel {\n \n &__Content { \n display: none;\n padding: 1rem 0;\n\n &.active {\n display: block;\n }\n }\n}","import { Component, Prop, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab-panel',\n styleUrl: 'jump-tab-panel.scss',\n shadow: true,\n})\nexport class JumpTabPanel {\n\n @Prop() identifier: string = undefined;\n @Prop() active: boolean = false;\n\n render() {\n return (\n <Host class=\"JumpTabPanel\" id={this.identifier}>\n <div class={\"JumpTabPanel__Content \" + (this.active ? 'active' : '')}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -1,21 +1,84 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-056a0a66.js';
|
|
2
2
|
|
|
3
|
-
const jumpTabCss = ":host{display:block}";
|
|
3
|
+
const jumpTabCss = ":host{display:block}.JumpTab{--jump-tab-bg-color:var(--gray-ultralight, #f8f8f8)}.JumpTab__Wrapper{display:flex;width:fit-content}.JumpTab__Wrapper.rounded{border-radius:50px;background-color:#f8f8f8}";
|
|
4
4
|
const JumpTabStyle0 = jumpTabCss;
|
|
5
5
|
|
|
6
6
|
const JumpTab = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
9
|
+
this.setActiveTab = createEvent(this, "jump-change-activetab", 7);
|
|
10
|
+
this.tabGroupName = undefined;
|
|
11
|
+
this.variant = 'inline';
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
changeActiveTabHandler(event) {
|
|
14
|
+
this.setActiveTab.emit(event.detail);
|
|
15
|
+
// Recupera il valore della variabile CSS
|
|
16
|
+
const rootStyles = getComputedStyle(document.documentElement);
|
|
17
|
+
const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();
|
|
18
|
+
let items = this.JumpTabEl.querySelectorAll('jump-tab-item');
|
|
19
|
+
if (items.length > 0) {
|
|
20
|
+
items.forEach((item) => {
|
|
21
|
+
if (item.getAttribute('identifier') === event.detail.id) {
|
|
22
|
+
item.setAttribute('active', '');
|
|
23
|
+
if (this.variant === 'sheet') {
|
|
24
|
+
// Aggiungi il bordo ai fratelli dell'elemento attivo tranne l'ultimo
|
|
25
|
+
items.forEach((sibling, index) => {
|
|
26
|
+
if (sibling !== item && index !== items.length - 1) {
|
|
27
|
+
sibling.style.borderRight = `1px solid ${primaryColor}`; // Usa i backticks
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
sibling.style.borderRight = '1px solid transparent';
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
// Rimuovi il bordo dal fratello precedente
|
|
34
|
+
let previousSibling = item.previousElementSibling;
|
|
35
|
+
if (previousSibling) {
|
|
36
|
+
previousSibling.style.borderRight = '1px solid transparent';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
item.removeAttribute('active');
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
let panel = this.JumpTabEl.querySelectorAll('jump-tab-panel');
|
|
46
|
+
if (panel.length > 0) {
|
|
47
|
+
panel.forEach((panel) => {
|
|
48
|
+
if (panel.getAttribute('identifier') === event.detail.id) {
|
|
49
|
+
panel.setAttribute('active', '');
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
panel.removeAttribute('active');
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
componentDidLoad() {
|
|
58
|
+
console.log('Component has been rendered');
|
|
59
|
+
if (this.variant === 'sheet') {
|
|
60
|
+
// Recupera il valore della variabile CSS
|
|
61
|
+
const rootStyles = getComputedStyle(document.documentElement);
|
|
62
|
+
const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();
|
|
63
|
+
// Seleziona tutti gli elementi jump-tab-item
|
|
64
|
+
let items = this.JumpTabEl.querySelectorAll('jump-tab-item');
|
|
65
|
+
if (items.length > 0) {
|
|
66
|
+
items.forEach((item, index) => {
|
|
67
|
+
// Aggiungi bordo destro a tutti tranne:
|
|
68
|
+
// - l'ultimo elemento
|
|
69
|
+
// - l'elemento attivo (avente classe "active")
|
|
70
|
+
if (index === items.length - 1 || item.classList.contains('active')) {
|
|
71
|
+
item.style.borderRight = '1px solid transparent';
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
item.style.borderRight = `1px solid ${primaryColor}`;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
16
79
|
}
|
|
17
80
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '5adce348b75c58349a4ff443cf2f6b39b646722f', class: "JumpTab", id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, h("div", { key: 'dcfe4b594261f40f91bff6fba243fcc2c9d19368', class: "JumpTab__Wrapper " + this.variant }, h("slot", { key: 'ce9cf25e3d5566a2e52469aafeeac6392862c348', name: "tab-item" })), h("div", { key: 'a396fbb89c2299c2cee8b9bd1828ad70faf3caee' }, h("slot", { key: '34f95fe28043b74be2cdba5e0253e50c9326bf01', name: "tab-content" }))));
|
|
19
82
|
}
|
|
20
83
|
};
|
|
21
84
|
JumpTab.style = JumpTabStyle0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-tab.entry.js","mappings":";;AAAA,MAAM,UAAU,GAAG,
|
|
1
|
+
{"file":"jump-tab.entry.js","mappings":";;AAAA,MAAM,UAAU,GAAG,0MAA0M,CAAC;AAC9N,sBAAe,UAAU;;MCMZ,OAAO;;;;4BAIa,SAAS;uBAMd,QAAQ;;IAKlC,sBAAsB,CAAC,KAAkB;QACvC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;;QAGrC,MAAM,UAAU,GAAG,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC9D,MAAM,YAAY,GAAG,UAAU,CAAC,gBAAgB,CAAC,0BAA0B,CAAC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AAQ,CAC5B,CACD,EACP;KACH;;;;;;","names":[],"sources":["src/components/jump-tab/jump-tab.scss?tag=jump-tab&encapsulation=shadow","src/components/jump-tab/jump-tab.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.JumpTab {\n --jump-tab-bg-color: var(--gray-ultralight, #f8f8f8);\n\n &__Wrapper {\n display: flex;\n width: fit-content;\n\n &.rounded {\n border-radius: 50px;\n background-color: #f8f8f8; // dovrà andarci var(--jump-tab-bg-color)\n } \n }\n}","import { Component, Host, Event, EventEmitter, Prop, h, Listen } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab',\n styleUrl: 'jump-tab.scss',\n shadow: true,\n})\nexport class JumpTab {\n\n JumpTabEl: HTMLElement;\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() tabGroupName: string = undefined;\n\n /**\n * The style of the tab. The same value must be passed to all the items.\n * Choosed from \"inline\", \"boxed\", \"sheet\", \"rounded\"\n */\n @Prop() variant: string = 'inline';\n\n @Event({ eventName: 'jump-change-activetab'}) setActiveTab: EventEmitter;\n\n @Listen('jump-change-active-tab')\n changeActiveTabHandler(event: CustomEvent) {\n this.setActiveTab.emit(event.detail);\n\n // Recupera il valore della variabile CSS\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item) => {\n if (item.getAttribute('identifier') === event.detail.id) {\n item.setAttribute('active', '');\n\n if (this.variant === 'sheet') {\n // Aggiungi il bordo ai fratelli dell'elemento attivo tranne l'ultimo\n items.forEach((sibling, index) => {\n if (sibling !== item && index !== items.length - 1) {\n sibling.style.borderRight = `1px solid ${primaryColor}`; // Usa i backticks\n } else {\n sibling.style.borderRight = '1px solid transparent';\n }\n });\n\n // Rimuovi il bordo dal fratello precedente\n let previousSibling = item.previousElementSibling as any;\n if (previousSibling) {\n previousSibling.style.borderRight = '1px solid transparent';\n }\n }\n\n } else {\n item.removeAttribute('active');\n }\n });\n }\n\n let panel = this.JumpTabEl.querySelectorAll('jump-tab-panel');\n if (panel.length > 0) {\n panel.forEach((panel) => {\n if (panel.getAttribute('identifier') === event.detail.id) {\n panel.setAttribute('active', '');\n } else {\n panel.removeAttribute('active');\n }\n });\n }\n }\n\n\n componentDidLoad() {\n console.log('Component has been rendered');\n if(this.variant === 'sheet') {\n // Recupera il valore della variabile CSS\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n // Seleziona tutti gli elementi jump-tab-item\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item, index) => {\n // Aggiungi bordo destro a tutti tranne:\n // - l'ultimo elemento\n // - l'elemento attivo (avente classe \"active\")\n if (index === items.length - 1 || item.classList.contains('active')) {\n item.style.borderRight = '1px solid transparent';\n } else {\n item.style.borderRight = `1px solid ${primaryColor}`;\n }\n });\n }\n }\n\n }\n\n\n\n\n render() {\n return (\n <Host class=\"JumpTab\" id={this.tabGroupName} ref={(el) => {this.JumpTabEl = el;}}> \n <div class={\"JumpTab__Wrapper \" + this.variant}>\n <slot name=\"tab-item\"></slot>\n </div>\n <div>\n <slot name=\"tab-content\"></slot>\n </div>\n </Host>\n );\n }\n}"],"version":3}
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-056a0a66.js';
|
|
2
|
+
export { s as setNonce } from './index-056a0a66.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["jump-pagination",[[0,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table",[[0,"jump-pagination-table",{"elementsRanges":[16],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"]},null,{"elPerPage":["elPerPageChanged"]}]]],["jump-
|
|
8
|
+
return bootstrapLazy([["jump-card-ecommerce",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"],"addedToCart":[4,"added-to-cart"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addtoCartText":[1,"addto-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"quantity":[1540],"changedQuantity":[4,"changed-quantity"],"changedVariation":[4,"changed-variation"]}]]],["jump-filter",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]]]]],["jump-filtergroup",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]}]]],["jump-pagination",[[0,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table",[[0,"jump-pagination-table",{"elementsRanges":[16],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"]},null,{"elPerPage":["elPerPageChanged"]}]]],["jump-tab-item",[[0,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion",[[1,"jump-accordion"]]],["jump-card",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-tab",[[1,"jump-tab",{"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-button",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}]]],["jump-badge_2",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[32]},null,{"value":["onValueChange"]}],[1,"jump-badge",{"label":[1],"variant":[1]}]]],["jump-icon",[[1,"jump-icon",{"class":[1],"library":[1],"name":[1],"category":[1],"size":[1],"label":[1],"src":[1]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as
|
|
1
|
+
import{p as e,b as t}from"./p-91794ae6.js";export{s as setNonce}from"./p-91794ae6.js";import{g as a}from"./p-e1255160.js";const i=()=>{const t=import.meta.url;const a={};if(t!==""){a.resourcesUrl=new URL(".",t).href}return e(a)};i().then((async e=>{await a();return t([["p-e2318686",[[1,"jump-card-ecommerce",{onlyIconButton:[4,"only-icon-button"],hasBackground:[4,"has-background"],badge:[1],favorite:[1540],link:[1],img:[1],imgAlt:[1,"img-alt"],videoSrc:[1,"video-src"],addedToCart:[4,"added-to-cart"],notificationUrl:[1,"notification-url"],notificationText:[1,"notification-text"],productName:[1,"product-name"],subtitle:[1],productId:[1,"product-id"],price:[2],salePrice:[2,"sale-price"],currency:[1],outOfStock:[1540,"out-of-stock"],outOfStockText:[1,"out-of-stock-text"],addtoCartText:[1,"addto-cart-text"],waitingListText:[1,"waiting-list-text"],addToWaitingList:[4,"add-to-waiting-list"],quantity:[1540],changedQuantity:[4,"changed-quantity"],changedVariation:[4,"changed-variation"]}]]],["p-0dc744ce",[[1,"jump-filter",{direction:[1],filterHeading:[1,"filter-heading"],filterButtonLabel:[1,"filter-button-label"],filterButtonIcon:[1,"filter-button-icon"],mobileThreshold:[2,"mobile-threshold"],filters:[8],activeFilters:[32],showMobileFilters:[32],isMobile:[32],getFilters:[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]]]]],["p-83e6ab6e",[[1,"jump-filtergroup",{name:[1],heading:[1],otherLabel:[1,"other-label"],lessLabel:[1,"less-label"],maxElements:[2,"max-elements"],variant:[1],values:[32],value:[32],slotItems:[32],inputs:[32],showMore:[32],getValues:[64],getActiveAmount:[64],getInputs:[64],getName:[64]}]]],["p-647ec30b",[[0,"jump-pagination",{pagLabel:[1,"pag-label"],last:[2],showFirstAndLast:[4,"show-first-and-last"],current:[32]},null,{current:["watchcurrent"]}]]],["p-b2ca2e96",[[0,"jump-pagination-table",{elementsRanges:[16],elPerPage:[2,"el-per-page"],pagLabel:[513,"pag-label"],labelElementsPerPage:[513,"label-elements-per-page"],total:[514],first:[514],last:[514],showFirstAndLast:[516,"show-first-and-last"]},null,{elPerPage:["elPerPageChanged"]}]]],["p-d58e0952",[[0,"jump-tab-item",{identifier:[1],iconName:[1,"icon-name"],iconPosition:[1,"icon-position"],label:[1],active:[4],disabled:[4],variant:[32]}]]],["p-afe0cca0",[[1,"jump-accordion"]]],["p-58602fcb",[[4,"jump-card",{horizontal:[4],dark:[4],shadow:[4],border:[4],borderRadius:[4,"border-radius"],topBorderContentRadius:[4,"top-border-content-radius"],boxed:[4],roundedMedia:[4,"rounded-media"],imgSrc:[1,"img-src"],imgAlt:[1,"img-alt"],videoSrc:[1,"video-src"]}]]],["p-8ec76454",[[1,"jump-tab",{tabGroupName:[1,"tab-group-name"],variant:[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["p-ee61c223",[[1,"jump-tab-panel",{identifier:[1],active:[4]}]]],["p-f842ff46",[[1,"jump-button",{disabled:[4],variant:[1],outline:[4],size:[1],full:[4],pill:[4],text:[4],onlyIcon:[4,"only-icon"],href:[1],target:[1],type:[1],name:[1],value:[1],ariaLabel:[1,"aria-label"],class:[1],buttonId:[1,"button-id"]}]]],["p-58bed455",[[65,"jump-quantity",{min:[2],max:[2],step:[2],label:[1],type:[1],variant:[1],showButtons:[4,"show-buttons"],value:[32]},null,{value:["onValueChange"]}],[1,"jump-badge",{label:[1],variant:[1]}]]],["p-357cf73d",[[1,"jump-icon",{class:[1],library:[1],name:[1],category:[1],size:[1],label:[1],src:[1]}]]]],e)}));
|
|
2
2
|
//# sourceMappingURL=jump-design-system.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","
|
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","onlyIconButton","hasBackground","badge","favorite","link","img","imgAlt","videoSrc","addedToCart","notificationUrl","notificationText","productName","subtitle","productId","price","salePrice","currency","outOfStock","outOfStockText","addtoCartText","waitingListText","addToWaitingList","quantity","changedQuantity","changedVariation","direction","filterHeading","filterButtonLabel","filterButtonIcon","mobileThreshold","filters","activeFilters","showMobileFilters","isMobile","getFilters","name","heading","otherLabel","lessLabel","maxElements","variant","values","value","slotItems","inputs","showMore","getValues","getActiveAmount","getInputs","getName","pagLabel","last","showFirstAndLast","current","elementsRanges","elPerPage","labelElementsPerPage","total","first","identifier","iconName","iconPosition","label","active","disabled","horizontal","dark","shadow","border","borderRadius","topBorderContentRadius","boxed","roundedMedia","imgSrc","tabGroupName","outline","size","full","pill","text","onlyIcon","target","type","ariaLabel","class","buttonId","min","max","step","showButtons","library","category","src"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.15.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAKA,MAAMA,EAAe,KAajB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACnBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACrD,CACI,OAAOC,EAAeJ,EAAK,ECnB/BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAc,yCAAuC,CAAAC,eAAA,uBAAAC,cAAA,qBAAAC,MAAA,IAAAC,SAAA,OAAAC,KAAA,IAAAC,IAAA,IAAAC,OAAA,cAAAC,SAAA,gBAAAC,YAAA,oBAAAC,gBAAA,uBAAAC,iBAAA,wBAAAC,YAAA,mBAAAC,SAAA,IAAAC,UAAA,iBAAAC,MAAA,IAAAC,UAAA,iBAAAC,SAAA,IAAAC,WAAA,sBAAAC,eAAA,wBAAAC,cAAA,sBAAAC,gBAAA,wBAAAC,iBAAA,0BAAAC,SAAA,OAA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A,qCAAAoB,MAAA,IAAAtB,QAAA,uCAAA4C,MAAA,IAAAM,QAAA,IAAAvD,KAAA,IAAAwD,SAAA,IAAAf,KAAA,IAAAd,MAAA,IAAA8B,IAAA,SAAA/F,EAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,h as t,H as i}from"./p-91794ae6.js";const s=":host h3{margin:0}:host .filtersDrawer{display:flex;flex-direction:column;gap:1rem}";const a=s;const f=class{constructor(t){e(this,t);this.direction="vertical";this.filterHeading="Filtra per";this.filterButtonLabel="Filtri";this.filterButtonIcon="filter";this.mobileThreshold=768;this.filters=undefined;this.activeFilters=0;this.showMobileFilters=false;this.isMobile=false}filterChangeHandler(e){this.filters=Object.assign(Object.assign({},this.filters),{[e.detail.name]:e.detail.values});console.log("Received the custom filterChange event: ",this.filters)}handleResize(){this.isMobile=window.innerWidth<this.mobileThreshold}async getFilters(){return this.filters}componentDidLoad(){this.toggleMobileFilters()}toggleMobileFilters(){if(this.mobileToggle){this.mobileToggle.addEventListener("click",(()=>{if(!this.isMobile)return;this.showMobileFilters=!this.showMobileFilters}))}}render(){return t(i,{key:"a25627f52d4e4eabd9714bca4605f7d506e8302a",mobileFilters:this.showMobileFilters},this.isMobile&&t("jump-button",{key:"e58ab446793fd152b0e724ea8067f1030d6ecaaa",ref:e=>{this.mobileToggle=e},buttonId:this.filterButtonIcon,variant:"primary",outline:true},t("slot",{key:"1ffb7d8f787733c037da73c4643d016a5d314c85",name:"prefix"},this.filterButtonIcon&&t("jump-icon",{key:"ce09716fa23121cd5b4921eab94260d6a931a36a",class:"small",name:this.filterButtonIcon}),this.filterButtonLabel),t("slot",{key:"fd339c7580f3e142fd80b4c4eb8503391b7ebfa2",name:"suffix"},this.activeFilters>0?`(${this.activeFilters})`:"0")),t("div",{key:"078c8038b81200c09f7ddf8d6d054449e896554b",ref:e=>{this.filtersDrawer=e},class:"filtersDrawer","data-variant":this.direction},!this.isMobile&&t("div",{key:"5476fe397f3599a50548b0ea4f47b4c66bbbd6cd",class:"filtersDrawer__header"},t("jump-icon",{key:"1e16b65feb8f923c2b9d1f421d939f6eeee136f7",class:"small",name:this.filterButtonIcon}),t("h3",{key:"02f99e915aa045d62d7afedaf0d216adbf8db7d0"},this.filterHeading)),t("slot",{key:"aa697d79b5ca21bdcf75e020780019effd19898c"})))}};f.style=a;export{f as jump_filter};
|
|
2
|
+
//# sourceMappingURL=p-0dc744ce.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpFilterCss","JumpFilterStyle0","JumpFilter","filterChangeHandler","event","this","filters","Object","assign","detail","name","values","console","log","handleResize","isMobile","window","innerWidth","mobileThreshold","getFilters","componentDidLoad","toggleMobileFilters","mobileToggle","addEventListener","showMobileFilters","render","h","Host","key","mobileFilters","ref","el","buttonId","filterButtonIcon","variant","outline","class","filterButtonLabel","activeFilters","filtersDrawer","direction","filterHeading"],"sources":["src/components/jump-filter/jump-filter.scss?tag=jump-filter&encapsulation=shadow","src/components/jump-filter/jump-filter.tsx"],"sourcesContent":[":host {\n h3{\n margin: 0;\n }\n .filtersDrawer{\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n}\n","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"],"mappings":"kDAAA,MAAMA,EAAgB,sFACtB,MAAAC,EAAeD,E,MCMFE,EAAU,M,wCAE0B,W,mBACf,a,uBACI,S,sBACD,S,qBACD,I,0CAGD,E,uBACK,M,cACT,K,CAM7B,mBAAAC,CAAoBC,GAElBC,KAAKC,QAAOC,OAAAC,OAAAD,OAAAC,OAAA,GAAOH,KAAKC,SAAO,CAAE,CAACF,EAAMK,OAAOC,MAAON,EAAMK,OAAOE,SACnEC,QAAQC,IAAI,2CAA4CR,KAAKC,Q,CAQ/D,YAAAQ,GACET,KAAKU,SAAWC,OAAOC,WA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