@jumpgroup/jump-design-system 0.3.40 → 0.3.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/cjs/jump-design-system.cjs.js +1 -1
  2. package/dist/cjs/jump-filter-checkbox.cjs.entry.js +2 -2
  3. package/dist/cjs/jump-filter.cjs.entry.js +15 -5
  4. package/dist/cjs/jump-filter.cjs.entry.js.map +1 -1
  5. package/dist/cjs/jump-filtergroup.cjs.entry.js +3 -3
  6. package/dist/cjs/jump-navbar.cjs.entry.js +5 -5
  7. package/dist/cjs/jump-pagination-table.cjs.entry.js +3 -3
  8. package/dist/cjs/jump-pagination.cjs.entry.js +3 -3
  9. package/dist/cjs/jump-quantity.cjs.entry.js +3 -3
  10. package/dist/cjs/jump-search-bar.cjs.entry.js +2 -2
  11. package/dist/cjs/jump-tab-item.cjs.entry.js +2 -2
  12. package/dist/cjs/jump-tab-panel.cjs.entry.js +1 -1
  13. package/dist/cjs/jump-tab.cjs.entry.js +2 -2
  14. package/dist/cjs/jump-tab.cjs.entry.js.map +1 -1
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/collection/components/jump-accordion/jump-accordion.stories.js +18 -0
  17. package/dist/collection/components/jump-accordion/jump-accordion.stories.js.map +1 -1
  18. package/dist/collection/components/jump-accordion-group/jump-accordion-group.stories.js +8 -1
  19. package/dist/collection/components/jump-accordion-group/jump-accordion-group.stories.js.map +1 -1
  20. package/dist/collection/components/jump-filter/jump-filter.css +23 -0
  21. package/dist/collection/components/jump-filter/jump-filter.js +52 -5
  22. package/dist/collection/components/jump-filter/jump-filter.js.map +1 -1
  23. package/dist/collection/components/jump-filter/jump-filter.stories.js +5 -0
  24. package/dist/collection/components/jump-filter/jump-filter.stories.js.map +1 -1
  25. package/dist/collection/components/jump-filter-checkbox/jump-filter-checkbox.js +2 -2
  26. package/dist/collection/components/jump-filtergroup/jump-filtergroup.js +3 -3
  27. package/dist/collection/components/jump-navbar/jump-navbar.js +5 -5
  28. package/dist/collection/components/jump-pagination/jump-pagination.js +3 -3
  29. package/dist/collection/components/jump-pagination/jump-pagination.stories.js +19 -3
  30. package/dist/collection/components/jump-pagination/jump-pagination.stories.js.map +1 -1
  31. package/dist/collection/components/jump-pagination-table/jump-pagination-table.js +3 -3
  32. package/dist/collection/components/jump-pagination-table/jump-pagination-table.stories.js +31 -3
  33. package/dist/collection/components/jump-pagination-table/jump-pagination-table.stories.js.map +1 -1
  34. package/dist/collection/components/jump-quantity/jump-quantity.js +3 -3
  35. package/dist/collection/components/jump-search-bar/jump-search-bar.js +2 -2
  36. package/dist/collection/components/jump-search-bar/jump-search-bar.stories.js +23 -3
  37. package/dist/collection/components/jump-search-bar/jump-search-bar.stories.js.map +1 -1
  38. package/dist/collection/components/jump-tab/jump-tab.css +1 -0
  39. package/dist/collection/components/jump-tab/jump-tab.js +1 -1
  40. package/dist/collection/components/jump-tab/jump-tab.js.map +1 -1
  41. package/dist/collection/components/jump-tab/jump-tab.stories.js +1 -0
  42. package/dist/collection/components/jump-tab/jump-tab.stories.js.map +1 -1
  43. package/dist/collection/components/jump-tab-item/jump-tab-item-boxed.stories.js +25 -4
  44. package/dist/collection/components/jump-tab-item/jump-tab-item-boxed.stories.js.map +1 -1
  45. package/dist/collection/components/jump-tab-item/jump-tab-item-inline.stories.js +25 -4
  46. package/dist/collection/components/jump-tab-item/jump-tab-item-inline.stories.js.map +1 -1
  47. package/dist/collection/components/jump-tab-item/jump-tab-item-rounded.stories.js +16 -2
  48. package/dist/collection/components/jump-tab-item/jump-tab-item-rounded.stories.js.map +1 -1
  49. package/dist/collection/components/jump-tab-item/jump-tab-item-sheet.stories.js +16 -2
  50. package/dist/collection/components/jump-tab-item/jump-tab-item-sheet.stories.js.map +1 -1
  51. package/dist/collection/components/jump-tab-item/jump-tab-item.js +2 -2
  52. package/dist/collection/components/jump-tab-panel/jump-tab-panel.js +1 -1
  53. package/dist/components/jump-filter-checkbox.js +2 -2
  54. package/dist/components/jump-filter.js +18 -5
  55. package/dist/components/jump-filter.js.map +1 -1
  56. package/dist/components/jump-filtergroup.js +3 -3
  57. package/dist/components/jump-navbar.js +5 -5
  58. package/dist/components/jump-pagination-table.js +3 -3
  59. package/dist/components/jump-pagination.js +3 -3
  60. package/dist/components/jump-quantity.js +3 -3
  61. package/dist/components/jump-search-bar.js +2 -2
  62. package/dist/components/jump-tab-item.js +2 -2
  63. package/dist/components/jump-tab-panel.js +1 -1
  64. package/dist/components/jump-tab.js +2 -2
  65. package/dist/components/jump-tab.js.map +1 -1
  66. package/dist/esm/jump-design-system.js +1 -1
  67. package/dist/esm/jump-filter-checkbox.entry.js +2 -2
  68. package/dist/esm/jump-filter.entry.js +15 -5
  69. package/dist/esm/jump-filter.entry.js.map +1 -1
  70. package/dist/esm/jump-filtergroup.entry.js +3 -3
  71. package/dist/esm/jump-navbar.entry.js +5 -5
  72. package/dist/esm/jump-pagination-table.entry.js +3 -3
  73. package/dist/esm/jump-pagination.entry.js +3 -3
  74. package/dist/esm/jump-quantity.entry.js +3 -3
  75. package/dist/esm/jump-search-bar.entry.js +2 -2
  76. package/dist/esm/jump-tab-item.entry.js +2 -2
  77. package/dist/esm/jump-tab-panel.entry.js +1 -1
  78. package/dist/esm/jump-tab.entry.js +2 -2
  79. package/dist/esm/jump-tab.entry.js.map +1 -1
  80. package/dist/esm/loader.js +1 -1
  81. package/dist/jump-design-system/jump-design-system.esm.js +1 -1
  82. package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
  83. package/dist/jump-design-system/{p-15416bf7.entry.js → p-134e548b.entry.js} +2 -2
  84. package/dist/jump-design-system/{p-4cd128b5.entry.js → p-1c882126.entry.js} +2 -2
  85. package/dist/jump-design-system/p-26d18480.entry.js +2 -0
  86. package/dist/jump-design-system/p-26d18480.entry.js.map +1 -0
  87. package/dist/jump-design-system/{p-6def596d.entry.js → p-30c9d7c7.entry.js} +2 -2
  88. package/dist/jump-design-system/{p-eb71b342.entry.js → p-396d2541.entry.js} +2 -2
  89. package/dist/jump-design-system/p-5f12bbbb.entry.js +2 -0
  90. package/dist/jump-design-system/{p-54230a70.entry.js → p-745c61b2.entry.js} +2 -2
  91. package/dist/jump-design-system/{p-6563f128.entry.js → p-87d6c01a.entry.js} +2 -2
  92. package/dist/jump-design-system/{p-5d9817a2.entry.js → p-8bdb9702.entry.js} +2 -2
  93. package/dist/jump-design-system/p-dc4a3920.entry.js +2 -0
  94. package/dist/jump-design-system/p-dc4a3920.entry.js.map +1 -0
  95. package/dist/jump-design-system/{p-ce3c1ff9.entry.js → p-f371718a.entry.js} +2 -2
  96. package/dist/jump-design-system-elements.json +8 -0
  97. package/dist/types/components/jump-accordion/jump-accordion.stories.d.ts +34 -0
  98. package/dist/types/components/jump-accordion-group/jump-accordion-group.stories.d.ts +13 -0
  99. package/dist/types/components/jump-filter/jump-filter.d.ts +3 -0
  100. package/dist/types/components/jump-pagination/jump-pagination.stories.d.ts +32 -0
  101. package/dist/types/components/jump-pagination-table/jump-pagination-table.stories.d.ts +56 -0
  102. package/dist/types/components/jump-search-bar/jump-search-bar.stories.d.ts +40 -0
  103. package/dist/types/components/jump-tab-item/jump-tab-item-boxed.stories.d.ts +39 -0
  104. package/dist/types/components/jump-tab-item/jump-tab-item-inline.stories.d.ts +39 -0
  105. package/dist/types/components/jump-tab-item/jump-tab-item-rounded.stories.d.ts +26 -0
  106. package/dist/types/components/jump-tab-item/jump-tab-item-sheet.stories.d.ts +26 -0
  107. package/dist/types/components.d.ts +4 -0
  108. package/package.json +1 -1
  109. package/readme.md +33 -0
  110. package/dist/jump-design-system/p-7b43933f.entry.js +0 -2
  111. package/dist/jump-design-system/p-8893a85e.entry.js +0 -2
  112. package/dist/jump-design-system/p-8893a85e.entry.js.map +0 -1
  113. package/dist/jump-design-system/p-fbd2cbb8.entry.js +0 -2
  114. package/dist/jump-design-system/p-fbd2cbb8.entry.js.map +0 -1
  115. /package/dist/jump-design-system/{p-15416bf7.entry.js.map → p-134e548b.entry.js.map} +0 -0
  116. /package/dist/jump-design-system/{p-4cd128b5.entry.js.map → p-1c882126.entry.js.map} +0 -0
  117. /package/dist/jump-design-system/{p-6def596d.entry.js.map → p-30c9d7c7.entry.js.map} +0 -0
  118. /package/dist/jump-design-system/{p-eb71b342.entry.js.map → p-396d2541.entry.js.map} +0 -0
  119. /package/dist/jump-design-system/{p-7b43933f.entry.js.map → p-5f12bbbb.entry.js.map} +0 -0
  120. /package/dist/jump-design-system/{p-54230a70.entry.js.map → p-745c61b2.entry.js.map} +0 -0
  121. /package/dist/jump-design-system/{p-6563f128.entry.js.map → p-87d6c01a.entry.js.map} +0 -0
  122. /package/dist/jump-design-system/{p-5d9817a2.entry.js.map → p-8bdb9702.entry.js.map} +0 -0
  123. /package/dist/jump-design-system/{p-ce3c1ff9.entry.js.map → p-f371718a.entry.js.map} +0 -0
@@ -291,6 +291,8 @@ export namespace Components {
291
291
  */
292
292
  "getFilters": () => Promise<any>;
293
293
  "mobileThreshold": number;
294
+ "offCanvasOverlay": boolean;
295
+ "showCount": boolean;
294
296
  }
295
297
  interface JumpFilterCheckbox {
296
298
  "checked": boolean;
@@ -1070,6 +1072,8 @@ declare namespace LocalJSX {
1070
1072
  "filterHeading"?: string;
1071
1073
  "filters"?: any;
1072
1074
  "mobileThreshold"?: number;
1075
+ "offCanvasOverlay"?: boolean;
1076
+ "showCount"?: boolean;
1073
1077
  }
1074
1078
  interface JumpFilterCheckbox {
1075
1079
  "checked"?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jumpgroup/jump-design-system",
3
- "version": "0.3.40",
3
+ "version": "0.3.42",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
package/readme.md CHANGED
@@ -31,6 +31,39 @@ When creating new component tags, use `jump` as component name prefix (ex: `<jum
31
31
  When passing a `@Prop()` to the component within `nomecomponente.stories.ts`, it is necessary to do so using the notation with `-`.
32
32
  So, if the prop inside `nomecomponente.tsx` is `currentPage`, in the story, it should be passed as follows: `current-page="${args.currentPage}"`
33
33
 
34
+ ## Info utili sulle storie
35
+
36
+ ### Associare un default nella tabella degli argomenti
37
+ Per associare un default nella tabella degli argomenti associata alla storia, inserire all'interno della Prop, il seguente codice
38
+ ```
39
+ table: {
40
+ type: { summary: 'string' },
41
+ defaultValue: { summary: 'inline' },
42
+ },
43
+ ```
44
+
45
+ Es:
46
+
47
+ ```
48
+ argTypes: {
49
+ ….
50
+ variant: {
51
+ name: 'variant',
52
+ control: 'select',
53
+ options: ['inline', 'boxed', 'sheet', 'rounded'],
54
+ description: 'Stile del tab e di tutti i suoi item',
55
+ table: {
56
+ type: { summary: 'string' },
57
+ defaultValue: { summary: 'inline' },
58
+ },
59
+ },
60
+ ….
61
+ }
62
+ ```
63
+
64
+ La riga **type** fa apparire la tipologia di variabile sotto la colonna della descrizione.
65
+ La riga **defaultValue** popola la colonna Default.
66
+
34
67
  ## Using this component
35
68
 
36
69
  ### Script tag
@@ -1,2 +0,0 @@
1
- import{r as a,h as e,H as s}from"./p-1c5db8d3.js";const t=":host{display:block}.JumpTabPanel__Content{display:none;padding:1rem 0}.JumpTabPanel__Content.active{display:block}";const n=t;const d=class{constructor(e){a(this,e);this.identifier=undefined;this.active=false}render(){return e(s,{key:"c307478192ab5d9b581de68902723c04dcd33278",class:"JumpTabPanel",id:this.identifier},e("div",{key:"ed8748df27a43e0b68be3eacb614eba1aa64d887",class:"JumpTabPanel__Content "+(this.active?"active":"")},e("slot",{key:"22a5c9f17117ea16bbbda5bb067ea4a998f62a32"})))}};d.style=n;export{d as jump_tab_panel};
2
- //# sourceMappingURL=p-7b43933f.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as e,c as t,h as i,H as a}from"./p-1c5db8d3.js";const s=":host{display:block;--jump-tab-bg-color:var(--gray-ultralight, #f8f8f8);--jump-tab-border-color:var(--neutral-grey-disabled, #CBCBCB)}:host .Wrapper{display:flex;flex-direction:column}:host .ContentWrapper{display:flex;width:100%;justify-content:var(--alignment, flex-start)}:host .Content{display:flex;flex-direction:row;align-items:flex-end;width:fit-content}:host .Content.fullBorder{width:100%;border-bottom:1px solid var(--jump-tab-border-color)}:host .Content.fullBorder.inline ::slotted([slot=tab-item]){margin-bottom:-1px}:host .Content.rounded{border-radius:50px;background-color:var(--jump-tab-bg-color)}:host .Content.disabled{cursor:not-allowed;opacity:0.5;pointer-events:none}:host jump-tab-item{display:flex;align-items:flex-end;overflow:hidden}:host jump-tab-item .tab-title{display:block;white-space:normal;text-align:center}";const n=s;const o=class{constructor(i){e(this,i);this.setActiveTab=t(this,"jump-change-activetab",7);this.disabled=false;this.alignment="left";this.fullBorder=false;this.tabGroupName=undefined;this.variant="inline"}changeActiveTabHandler(e){this.setActiveTab.emit(e.detail);const t=getComputedStyle(document.documentElement);const i=t.getPropertyValue("--neutral-grey-secondary").trim();let a=this.JumpTabEl.querySelectorAll("jump-tab-item");if(a.length>0){a.forEach((t=>{if(t.getAttribute("identifier")===e.detail.id){t.setAttribute("active","");if(this.variant==="sheet"){a.forEach(((e,s)=>{if(e!==t&&s!==a.length-1){e.style.borderRight=`1px solid ${i}`}else{e.style.borderRight="1px solid transparent"}}));let e=t.previousElementSibling;if(e){e.style.borderRight="1px solid transparent"}}}else{t.removeAttribute("active")}}))}let s=this.JumpTabEl.querySelectorAll("jump-tab-panel");if(s.length>0){s.forEach((t=>{if(t.getAttribute("identifier")===e.detail.id){t.setAttribute("active","")}else{t.removeAttribute("active")}}))}}componentDidLoad(){if(this.variant==="sheet"){const e=getComputedStyle(document.documentElement);const t=e.getPropertyValue("--neutral-grey-secondary").trim();let i=this.JumpTabEl.querySelectorAll("jump-tab-item");if(i.length>0){i.forEach(((e,a)=>{if(a===i.length-1||e.classList.contains("active")){e.style.borderRight="1px solid transparent"}else{e.style.borderRight=`1px solid ${t}`}}))}}}render(){return i(a,{key:"beb020fdd6c31ad90be02ebcee610df87164d90d",class:"JumpTab "+this.variant,id:this.tabGroupName,ref:e=>{this.JumpTabEl=e}},i("div",{key:"f35ed1271bbe668b86ce881181c823e2e360d01a",class:"Wrapper "+(this.fullBorder?"fullBorder":"")},i("div",{key:"334884fcec4a4c45da838679d7331117f7e17846",class:"ContentWrapper",style:{"--alignment":this.getAlignment(this.alignment)}},i("div",{key:"a115d0cf84c671a892db304e7203fe25ff7ffc3f",class:"Content "+this.variant+" "+(this.disabled?"disabled":"")+" "+(this.fullBorder?"fullBorder":"")},i("slot",{key:"1394f8cab6f79c6799906c5f04dc180685fd5bef",name:"tab-item"}))),i("div",{key:"880f63d36aba524ec864323f6fa259d49b87840c",class:"ContentWrapper"},i("slot",{key:"64060015cb968819ea9d6f7411ad654cd92337ba",name:"tab-content"}))))}getAlignment(e){switch(e){case"center":return"center";case"right":return"flex-end";default:return"flex-start"}}};o.style=n;export{o as jump_tab};
2
- //# sourceMappingURL=p-8893a85e.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["jumpTabCss","JumpTabStyle0","JumpTab","undefined","changeActiveTabHandler","event","this","setActiveTab","emit","detail","rootStyles","getComputedStyle","document","documentElement","primaryColor","getPropertyValue","trim","items","JumpTabEl","querySelectorAll","length","forEach","item","getAttribute","id","setAttribute","variant","sibling","index","style","borderRight","previousSibling","previousElementSibling","removeAttribute","panel","componentDidLoad","classList","contains","render","h","Host","key","class","tabGroupName","ref","el","fullBorder","getAlignment","alignment","disabled","name"],"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 --jump-tab-bg-color: var(--gray-ultralight, #f8f8f8);\n --jump-tab-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n .Wrapper {\n display: flex;\n flex-direction: column;\n }\n\n .ContentWrapper {\n display: flex;\n width: 100%;\n justify-content: var(--alignment, flex-start);\n }\n\n .Content {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n width: fit-content;\n\n &.fullBorder {\n width: 100%;\n border-bottom: 1px solid var(--jump-tab-border-color);\n }\n\n &.fullBorder.inline ::slotted([slot=\"tab-item\"]) {\n margin-bottom: -1px;\n }\n\n &.rounded {\n border-radius: 50px;\n background-color: var(--jump-tab-bg-color);\n }\n\n &.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n }\n }\n\n jump-tab-item {\n display: flex;\n align-items: flex-end;\n overflow: hidden;\n\n .tab-title {\n display: block;\n white-space: normal;\n text-align: center;\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 JumpTabEl: HTMLElement;\n\n @Prop() disabled: boolean = false;\n @Prop() alignment: string = 'left';\n @Prop() fullBorder: boolean = false;\n @Prop() tabGroupName: string = undefined;\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 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 items.forEach((sibling, index) => {\n if (sibling !== item && index !== items.length - 1) {\n sibling.style.borderRight = `1px solid ${primaryColor}`;\n } else {\n sibling.style.borderRight = '1px solid transparent';\n }\n });\n\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 componentDidLoad() {\n if (this.variant === 'sheet') {\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, index) => {\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 render() {\n return (\n <Host class={\"JumpTab \" + this.variant} id={this.tabGroupName} ref={(el) => { this.JumpTabEl = el; }}>\n <div class={\"Wrapper \" + (this.fullBorder ? 'fullBorder' : '')}>\n <div class={\"ContentWrapper\"} style={{ '--alignment': this.getAlignment(this.alignment) }}>\n <div class={\"Content \" + this.variant + \" \" + (this.disabled ? 'disabled' : '') + \" \" + (this.fullBorder ? 'fullBorder' : '')}>\n <slot name=\"tab-item\"></slot>\n </div>\n </div>\n <div class=\"ContentWrapper\">\n <slot name=\"tab-content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n private getAlignment(alignment: string): string {\n switch (alignment) {\n case 'center':\n return 'center';\n case 'right':\n return 'flex-end';\n default:\n return 'flex-start';\n }\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAa,40BACnB,MAAAC,EAAeD,E,MCMFE,EAAO,M,2FAGU,M,eACA,O,gBACE,M,kBACCC,U,aACL,Q,CAK1B,sBAAAC,CAAuBC,GACrBC,KAAKC,aAAaC,KAAKH,EAAMI,QAE7B,MAAMC,EAAaC,iBAAiBC,SAASC,iBAC7C,MAAMC,EAAeJ,EAAWK,iBAAiB,4BAA4BC,OAE7E,IAAIC,EAAQX,KAAKY,UAAUC,iBAAiB,iBAC5C,GAAIF,EAAMG,OAAS,EAAG,CACpBH,EAAMI,SAASC,IACb,GAAIA,EAAKC,aAAa,gBAAkBlB,EAA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MAAO,CAAE,cAAevB,KAAKyC,aAAazC,KAAK0C,aAC3ET,EAAA,OAAAE,IAAA,2CAAKC,MAAO,WAAapC,KAAKoB,QAAU,KAAOpB,KAAK2C,SAAW,WAAa,IAAM,KAAO3C,KAAKwC,WAAa,aAAe,KACxHP,EAAA,QAAAE,IAAA,2CAAMS,KAAK,eAGfX,EAAA,OAAAE,IAAA,2CAAKC,MAAM,kBACTH,EAAA,QAAAE,IAAA,2CAAMS,KAAK,kB,CAOb,YAAAH,CAAaC,GACnB,OAAQA,GACN,IAAK,SACH,MAAO,SACT,IAAK,QACH,MAAO,WACT,QACE,MAAO,a"}
@@ -1,2 +0,0 @@
1
- import{r as e,h as a,H as i}from"./p-1c5db8d3.js";const t=":host{--primary-standard:var(--secondary-hard, #435171);--jump-button-background-hover:red;--bg-drawer:var(--bg-drawer, #fff);--header-height:var(--header-height, 80px);--drawer-width:var(--drawer-width, 240px)}:host h3{margin:0}.filtersDrawer{position:fixed;display:flex;flex-direction:column;gap:2.5rem;left:-100vw;top:var(--header-height);height:-webkit-fill-available;max-height:calc(100vh - var(--header-height));transition:0.3s all ease-in-out;background-color:var(--bg-drawer, #fff);padding:1rem;width:100%;max-width:var(--drawer-width);box-shadow:8px 0 15px 0 rgba(0, 0, 0, 0.1490196078);z-index:2;overflow:auto}.filtersDrawer[aria-hidden=false]{left:0;transition:0.3s all ease-in-out}.filtersDrawer[aria-hidden=false] .filtersDrawer__close{position:fixed;top:calc(var(--header-height) + 1rem);left:calc(var(--drawer-width) - 2rem)}@media (min-width: 768px){.filtersDrawer{position:relative;left:0;height:auto;max-width:initial;box-shadow:none}}.filtersDrawer .filtersDrawer__header{display:flex;justify-content:flex-start;align-items:center;gap:0.5rem}";const r=t;const s=class{constructor(a){e(this,a);this.direction="vertical";this.filterHeading="Filtra per";this.filterButtonLabel="Filtri";this.filterButtonIcon="sliders";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}watchHandler(e,a){var i,t,r,s;if(e!==a){if(e){(i=this.mobileToggle)===null||i===void 0?void 0:i.setAttribute("aria-expanded","true");(t=this.filtersDrawer)===null||t===void 0?void 0:t.setAttribute("aria-hidden","false")}else{(r=this.mobileToggle)===null||r===void 0?void 0:r.setAttribute("aria-expanded","false");(s=this.filtersDrawer)===null||s===void 0?void 0:s.setAttribute("aria-hidden","true")}}}async getFilters(){return this.filters}componentDidLoad(){this.handleResize()}render(){return a(i,{key:"b45c2e4a0ed8985f709b5ef0cd6796c73f78080b",mobileFilters:this.showMobileFilters},this.isMobile&&a("jump-button",{key:"a8bf5423d154fe3dc7c91bc12a379fc30ab85992",ref:e=>{this.mobileToggle=e},buttonId:this.filterButtonIcon,variant:"primary",outline:true,onClick:()=>this.showMobileFilters=!this.showMobileFilters},a("slot",{key:"e9cdf515fe9d1f5f6c557f1b345ccaa5e75ed5ba",name:"prefix"},this.filterButtonIcon&&a("jump-icon",{key:"7175bf68ccc5cba19384ac74de269a83a9321f9c",library:"fa",category:"regular",name:this.filterButtonIcon,size:"small"}),this.filterButtonLabel),a("slot",{key:"43d5a322cf0d0828b821abfb8bdfe14a9c2bf706",name:"suffix"},this.activeFilters>0&&a("jump-badge",{key:"2d27ab99d6980334ca33b7d75ccceef9561005b0",label:this.activeFilters.toString(),variant:"success",soft:true,dimension:"dot"},"1"))),a("div",{key:"b960e02353e147de8dc633b6f3fa74e8aebd4fc1",ref:e=>{this.filtersDrawer=e},class:"filtersDrawer","data-variant":this.direction},!this.isMobile&&a("div",{key:"6c86c707343eab1720d49208d487dacfed2c7a69",class:"filtersDrawer__header"},a("jump-icon",{key:"44e43addc3beecc57cc0b5a4bbc1f004df9f4ea3",class:"small",name:this.filterButtonIcon}),a("h3",{key:"49893521129b517c91caa15fb38d7c1bfc17be2c"},this.filterHeading)),this.isMobile&&a("jump-icon",{key:"91d6bfe0b195cad204df517eb4e2ab02b141a3a8",library:"lucide",name:"x",size:"small",label:"",class:"filtersDrawer__close",onClick:()=>this.showMobileFilters=false}),a("slot",{key:"5691db6520a4ea84d3b3ea5b1b4c622893770317"})))}static get watchers(){return{showMobileFilters:["watchHandler"]}}};s.style=r;export{s as jump_filter};
2
- //# sourceMappingURL=p-fbd2cbb8.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["jumpFilterCss","JumpFilterStyle0","JumpFilter","filterChangeHandler","event","this","filters","Object","assign","detail","name","values","console","log","handleResize","isMobile","window","innerWidth","mobileThreshold","watchHandler","newValue","oldValue","_a","mobileToggle","setAttribute","_b","filtersDrawer","_c","_d","getFilters","componentDidLoad","render","h","Host","key","mobileFilters","showMobileFilters","ref","el","buttonId","filterButtonIcon","variant","outline","onClick","library","category","size","filterButtonLabel","activeFilters","label","toString","soft","dimension","class","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 --primary-standard: var(--secondary-hard, #435171);\n //--jump-button-background-hover: var(--secondary-hard, #435171);\n --jump-button-background-hover: red;\n --bg-drawer: var(--bg-drawer, #fff);\n --header-height: var(--header-height, 80px);\n --drawer-width: var(--drawer-width, 240px);\n\n h3 {\n margin: 0;\n }\n}\n\n.filtersDrawer {\n position: fixed;\n display: flex;\n flex-direction: column;\n gap: 2.5rem;\n left: -100vw;\n top: var(--header-height);\n height: -webkit-fill-available;\n max-height: calc(100vh - var(--header-height));\n transition: 0.3s all ease-in-out;\n background-color: var(--bg-drawer, #fff);\n padding: 1rem;\n width: 100%;\n max-width: var(--drawer-width);\n box-shadow: 8px 0 15px 0 #00000026;\n z-index: 2;\n overflow: auto;\n\n &[aria-hidden=\"false\"] {\n left: 0;\n transition: 0.3s all ease-in-out;\n\n .filtersDrawer__close {\n position: fixed;\n top: calc(var(--header-height) + 1rem);\n left: calc(var(--drawer-width) - 2rem);\n }\n }\n\n @media (min-width: 768px) { //md breakpoint tailwind\n position: relative;\n left: 0;\n height: auto;\n max-width: initial;\n box-shadow: none;\n }\n\n .filtersDrawer__header {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n gap: 0.5rem;\n }\n}\n","import { Component, Host, Prop, h, State, Listen, Method, Watch } 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 = 'sliders';\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 @Watch('showMobileFilters')\n watchHandler(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n if (newValue) {\n this.mobileToggle?.setAttribute('aria-expanded', 'true');\n this.filtersDrawer?.setAttribute('aria-hidden', 'false');\n } else {\n this.mobileToggle?.setAttribute('aria-expanded', 'false');\n this.filtersDrawer?.setAttribute('aria-hidden', 'true');\n }\n }\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.handleResize();\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\n onClick={() => this.showMobileFilters = !this.showMobileFilters}>\n <slot name=\"prefix\">\n {this.filterButtonIcon &&\n <jump-icon library=\"fa\" category=\"regular\" name={this.filterButtonIcon} size=\"small\"></jump-icon>}\n {this.filterButtonLabel}\n </slot>\n <slot name=\"suffix\">\n {this.activeFilters > 0 &&\n <jump-badge label={this.activeFilters.toString()} variant=\"success\" soft dimension=\"dot\">1</jump-badge>}\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 {this.isMobile && <jump-icon library=\"lucide\" name=\"x\" size=\"small\" label=\"\" class={'filtersDrawer__close'}\n onClick={() => this.showMobileFilters = false}></jump-icon>}\n <slot></slot>\n </div>}\n </Host>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAgB,wiCACtB,MAAAC,EAAeD,E,MCMFE,EAAU,M,wCAE0B,W,mBACf,a,uBACI,S,sBACD,U,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,WAAaZ,KAAKa,e,CAI3C,YAAAC,CAAaC,EAAmBC,G,YAC9B,GAAID,IAAaC,EAAU,CACzB,GAAID,EAAU,EACZE,EAAAjB,KAAKkB,gBAAY,MAAAD,SAAA,SAAAA,EAAEE,aAAa,gBAAiB,SACjDC,EAAApB,KAAKqB,iBAAa,MAAAD,SAAA,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