@trendyol/baklava 2.0.0-beta.16 → 2.0.0-beta.19

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 (52) hide show
  1. package/dist/baklava-react.js +1 -1
  2. package/dist/baklava-react.js.map +3 -3
  3. package/dist/baklava.js +1 -1
  4. package/dist/chunk-23UFIOHV.js +2 -0
  5. package/dist/chunk-23UFIOHV.js.map +7 -0
  6. package/dist/chunk-4HMEMZY7.js +29 -0
  7. package/dist/chunk-4HMEMZY7.js.map +7 -0
  8. package/dist/chunk-5AGXQPQY.js +14 -0
  9. package/dist/chunk-5AGXQPQY.js.map +7 -0
  10. package/dist/{chunk-WP2DP4K4.js → chunk-675JRUTN.js} +2 -2
  11. package/dist/{chunk-WP2DP4K4.js.map → chunk-675JRUTN.js.map} +1 -1
  12. package/dist/chunk-72IJCTLJ.js +7 -0
  13. package/dist/chunk-72IJCTLJ.js.map +7 -0
  14. package/dist/chunk-7NRCA735.js +64 -0
  15. package/dist/{chunk-NMJFO734.js.map → chunk-7NRCA735.js.map} +1 -1
  16. package/dist/chunk-AMTKE3PJ.js +43 -0
  17. package/dist/chunk-AMTKE3PJ.js.map +7 -0
  18. package/dist/chunk-BEHH5JPC.js +17 -0
  19. package/dist/{chunk-6TYTDGI6.js.map → chunk-BEHH5JPC.js.map} +4 -4
  20. package/dist/{chunk-OLHTJRSI.js → chunk-DGRXEOW7.js} +2 -2
  21. package/dist/{chunk-OLHTJRSI.js.map → chunk-DGRXEOW7.js.map} +1 -1
  22. package/dist/chunk-FP5POXZC.js +57 -0
  23. package/dist/chunk-FP5POXZC.js.map +7 -0
  24. package/dist/chunk-HLQIZBQW.js +7 -0
  25. package/dist/{chunk-4HPQWL76.js.map → chunk-HLQIZBQW.js.map} +1 -1
  26. package/dist/chunk-LZXRWVZI.js +185 -0
  27. package/dist/chunk-LZXRWVZI.js.map +7 -0
  28. package/dist/chunk-SQ3STNEW.js +7 -0
  29. package/dist/{chunk-2OZ27HBE.js.map → chunk-SQ3STNEW.js.map} +0 -0
  30. package/dist/{chunk-NOBSUBY4.js → chunk-U6ZMWZI6.js} +2 -2
  31. package/dist/{chunk-NOBSUBY4.js.map → chunk-U6ZMWZI6.js.map} +2 -2
  32. package/dist/components/badge/bl-badge.js +1 -1
  33. package/dist/components/button/bl-button.js +1 -1
  34. package/dist/components/icon/bl-icon.js +1 -1
  35. package/dist/components/input/bl-input.js +1 -1
  36. package/dist/components/progress-indicator/bl-progress-indicator.js +2 -0
  37. package/dist/components/progress-indicator/bl-progress-indicator.js.map +7 -0
  38. package/dist/components/tab-group/bl-tab-group.js +2 -0
  39. package/dist/components/tab-group/bl-tab-group.js.map +7 -0
  40. package/dist/components/tab-group/tab/bl-tab.js +2 -0
  41. package/dist/components/tab-group/tab/bl-tab.js.map +7 -0
  42. package/dist/components/tab-group/tab-panel/bl-tab-panel.js +2 -0
  43. package/dist/components/tab-group/tab-panel/bl-tab-panel.js.map +7 -0
  44. package/dist/components/tooltip/bl-tooltip.js +1 -1
  45. package/dist/custom-elements.json +281 -0
  46. package/package.json +1 -1
  47. package/dist/chunk-2OZ27HBE.js +0 -7
  48. package/dist/chunk-4HPQWL76.js +0 -7
  49. package/dist/chunk-6TYTDGI6.js +0 -17
  50. package/dist/chunk-L4EJFUQV.js +0 -57
  51. package/dist/chunk-L4EJFUQV.js.map +0 -7
  52. package/dist/chunk-NMJFO734.js +0 -64
@@ -476,6 +476,116 @@
476
476
  }
477
477
  ]
478
478
  },
479
+ {
480
+ "kind": "javascript-module",
481
+ "path": "src/components/progress-indicator/bl-progress-indicator.ts",
482
+ "declarations": [
483
+ {
484
+ "kind": "class",
485
+ "description": "",
486
+ "name": "BlProgressIndicator",
487
+ "attributes": [
488
+ {
489
+ "name": "size",
490
+ "type": {
491
+ "text": "ProgressIndicatorSize"
492
+ },
493
+ "default": "'medium'",
494
+ "description": "Sets the size",
495
+ "fieldName": "size"
496
+ },
497
+ {
498
+ "name": "failed",
499
+ "type": {
500
+ "text": "boolean"
501
+ },
502
+ "default": "false",
503
+ "description": "Sets the status",
504
+ "fieldName": "failed"
505
+ },
506
+ {
507
+ "name": "max",
508
+ "description": "Sets the max",
509
+ "type": {
510
+ "text": "max"
511
+ },
512
+ "default": "100",
513
+ "fieldName": "max"
514
+ },
515
+ {
516
+ "name": "value",
517
+ "description": "Sets the value",
518
+ "type": {
519
+ "text": "number"
520
+ },
521
+ "default": "0",
522
+ "fieldName": "value"
523
+ }
524
+ ],
525
+ "superclass": {
526
+ "name": "LitElement",
527
+ "package": "lit"
528
+ },
529
+ "tagName": "bl-progress-indicator",
530
+ "summary": "Baklava Progress Indicator component",
531
+ "customElement": true
532
+ }
533
+ ],
534
+ "exports": [
535
+ {
536
+ "kind": "js",
537
+ "name": "default",
538
+ "declaration": {
539
+ "name": "BlProgressIndicator",
540
+ "module": "src/components/progress-indicator/bl-progress-indicator.ts"
541
+ }
542
+ },
543
+ {
544
+ "kind": "custom-element-definition",
545
+ "name": "bl-progress-indicator",
546
+ "declaration": {
547
+ "name": "BlProgressIndicator",
548
+ "module": "src/components/progress-indicator/bl-progress-indicator.ts"
549
+ }
550
+ }
551
+ ]
552
+ },
553
+ {
554
+ "kind": "javascript-module",
555
+ "path": "src/components/tab-group/bl-tab-group.ts",
556
+ "declarations": [
557
+ {
558
+ "kind": "class",
559
+ "description": "",
560
+ "name": "BlTabGroup",
561
+ "superclass": {
562
+ "name": "LitElement",
563
+ "package": "lit"
564
+ },
565
+ "tagName": "bl-tab-group",
566
+ "summary": "Baklava Tab group component",
567
+ "customElement": true
568
+ }
569
+ ],
570
+ "exports": [
571
+ {
572
+ "kind": "js",
573
+ "name": "default",
574
+ "declaration": {
575
+ "name": "BlTabGroup",
576
+ "module": "src/components/tab-group/bl-tab-group.ts"
577
+ }
578
+ },
579
+ {
580
+ "kind": "custom-element-definition",
581
+ "name": "bl-tab-group",
582
+ "declaration": {
583
+ "name": "BlTabGroup",
584
+ "module": "src/components/tab-group/bl-tab-group.ts"
585
+ }
586
+ }
587
+ ]
588
+ },
479
589
  {
480
590
  "kind": "javascript-module",
481
591
  "path": "src/components/tooltip/bl-tooltip.ts",
@@ -544,6 +654,177 @@
544
654
  }
545
655
  }
546
656
  ]
657
+ },
658
+ {
659
+ "kind": "javascript-module",
660
+ "path": "src/components/tab-group/tab/bl-tab.ts",
661
+ "declarations": [
662
+ {
663
+ "kind": "class",
664
+ "description": "",
665
+ "name": "BlTab",
666
+ "events": [
667
+ {
668
+ "type": {
669
+ "text": "CustomEvent<string>"
670
+ },
671
+ "description": "Fires when tab is selected.",
672
+ "name": "bl-tab-selected"
673
+ }
674
+ ],
675
+ "attributes": [
676
+ {
677
+ "name": "caption",
678
+ "type": {
679
+ "text": "string"
680
+ },
681
+ "description": "Sets the caption of tab",
682
+ "fieldName": "caption"
683
+ },
684
+ {
685
+ "name": "name",
686
+ "type": {
687
+ "text": "string"
688
+ },
689
+ "description": "Name of the tab that should match `tab-panel`'s `tab` attribute",
690
+ "fieldName": "name"
691
+ },
692
+ {
693
+ "name": "help-text",
694
+ "type": {
695
+ "text": "string"
696
+ },
697
+ "description": "Set tooltip text. Should be set to display information icon.",
698
+ "fieldName": "helpText"
699
+ },
700
+ {
701
+ "name": "icon",
702
+ "type": {
703
+ "text": "string"
704
+ },
705
+ "default": "''",
706
+ "description": "Name of the icon which display on the left side of the tab.",
707
+ "fieldName": "icon"
708
+ },
709
+ {
710
+ "name": "notify",
711
+ "type": {
712
+ "text": "boolean"
713
+ },
714
+ "default": "false",
715
+ "description": "Shows notification dot.",
716
+ "fieldName": "notify"
717
+ },
718
+ {
719
+ "name": "badge",
720
+ "type": {
721
+ "text": "string"
722
+ },
723
+ "default": "''",
724
+ "description": "Sets the content of the badge.",
725
+ "fieldName": "badge"
726
+ },
727
+ {
728
+ "name": "selected",
729
+ "type": {
730
+ "text": "boolean"
731
+ },
732
+ "default": "false",
733
+ "description": "Set `tab` as selected.",
734
+ "fieldName": "selected"
735
+ },
736
+ {
737
+ "name": "disabled",
738
+ "type": {
739
+ "text": "boolean"
740
+ },
741
+ "default": "false",
742
+ "description": "Set `tab` as disabled.",
743
+ "fieldName": "disabled"
744
+ }
745
+ ],
746
+ "superclass": {
747
+ "name": "LitElement",
748
+ "package": "lit"
749
+ },
750
+ "tagName": "bl-tab",
751
+ "summary": "Baklava Tab component",
752
+ "customElement": true
753
+ }
754
+ ],
755
+ "exports": [
756
+ {
757
+ "kind": "js",
758
+ "name": "default",
759
+ "declaration": {
760
+ "name": "BlTab",
761
+ "module": "src/components/tab-group/tab/bl-tab.ts"
762
+ }
763
+ },
764
+ {
765
+ "kind": "custom-element-definition",
766
+ "name": "bl-tab",
767
+ "declaration": {
768
+ "name": "BlTab",
769
+ "module": "src/components/tab-group/tab/bl-tab.ts"
770
+ }
771
+ }
772
+ ]
773
+ },
774
+ {
775
+ "kind": "javascript-module",
776
+ "path": "src/components/tab-group/tab-panel/bl-tab-panel.ts",
777
+ "declarations": [
778
+ {
779
+ "kind": "class",
780
+ "description": "",
781
+ "name": "BlTabPanel",
782
+ "attributes": [
783
+ {
784
+ "name": "tab",
785
+ "type": {
786
+ "text": "string"
787
+ },
788
+ "description": "Name of the linked tab.",
789
+ "fieldName": "tab"
790
+ },
791
+ {
792
+ "name": "visible",
793
+ "type": {
794
+ "text": "boolean"
795
+ },
796
+ "default": "false",
797
+ "description": "This attribute set by `tab-group` to make panel visible or hidden.",
798
+ "fieldName": "visible"
799
+ }
800
+ ],
801
+ "superclass": {
802
+ "name": "LitElement",
803
+ "package": "lit"
804
+ },
805
+ "tagName": "bl-tab-panel",
806
+ "summary": "Baklava Tab panel component",
807
+ "customElement": true
808
+ }
809
+ ],
810
+ "exports": [
811
+ {
812
+ "kind": "js",
813
+ "name": "default",
814
+ "declaration": {
815
+ "name": "BlTabPanel",
816
+ "module": "src/components/tab-group/tab-panel/bl-tab-panel.ts"
817
+ }
818
+ },
819
+ {
820
+ "kind": "custom-element-definition",
821
+ "name": "bl-tab-panel",
822
+ "declaration": {
823
+ "name": "BlTabPanel",
824
+ "module": "src/components/tab-group/tab-panel/bl-tab-panel.ts"
825
+ }
826
+ }
827
+ ]
547
828
  }
548
829
  ]
549
830
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trendyol/baklava",
3
- "version": "2.0.0-beta.16",
3
+ "version": "2.0.0-beta.19",
4
4
  "description": "Trendyol Baklava Design System",
5
5
  "main": "dist/baklava.js",
6
6
  "module": "dist/baklava.js",
@@ -1,7 +0,0 @@
1
- import{d as t}from"./chunk-6TYTDGI6.js";var r=o=>o!=null?o:t;export{r as a};
2
- /**
3
- * @license
4
- * Copyright 2018 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */
7
- //# sourceMappingURL=chunk-2OZ27HBE.js.map
@@ -1,7 +0,0 @@
1
- import{c as a,j as d,k as h,l}from"./chunk-6TYTDGI6.js";var u=h(class extends l{constructor(s){var e;if(super(s),s.type!==d.ATTRIBUTE||s.name!=="class"||((e=s.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(e=>s[e]).join(" ")+" "}update(s,[e]){var i,r;if(this.et===void 0){this.et=new Set,s.strings!==void 0&&(this.st=new Set(s.strings.join(" ").split(/\s/).filter(t=>t!=="")));for(let t in e)e[t]&&!(!((i=this.st)===null||i===void 0)&&i.has(t))&&this.et.add(t);return this.render(e)}let n=s.element.classList;this.et.forEach(t=>{t in e||(n.remove(t),this.et.delete(t))});for(let t in e){let o=!!e[t];o===this.et.has(t)||((r=this.st)===null||r===void 0?void 0:r.has(t))||(o?(n.add(t),this.et.add(t)):(n.remove(t),this.et.delete(t)))}return a}});export{u as a};
2
- /**
3
- * @license
4
- * Copyright 2018 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */
7
- //# sourceMappingURL=chunk-4HPQWL76.js.map
@@ -1,17 +0,0 @@
1
- var M,b=globalThis.trustedTypes,Y=b?b.createPolicy("lit-html",{createHTML:r=>r}):void 0,f=`lit$${(Math.random()+"").slice(9)}$`,st="?"+f,ft=`<${st}>`,S=document,P=(r="")=>S.createComment(r),U=r=>r===null||typeof r!="object"&&typeof r!="function",rt=Array.isArray,mt=r=>{var t;return rt(r)||typeof((t=r)===null||t===void 0?void 0:t[Symbol.iterator])=="function"},T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,Q=/>/g,m=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,X=/'/g,tt=/"/g,ot=/^(?:script|style|textarea|title)$/i,nt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),St=nt(1),Ct=nt(2),_=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),et=new WeakMap,lt=(r,t,e)=>{var i,s;let o=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t,n=o._$litPart$;if(n===void 0){let h=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=n=new g(t.insertBefore(P(),h),h,void 0,e!=null?e:{})}return n._$AI(r),n},E=S.createTreeWalker(S,129,null,!1),_t=(r,t)=>{let e=r.length-1,i=[],s,o=t===2?"<svg>":"",n=T;for(let l=0;l<e;l++){let a=r[l],p,d,c=-1,v=0;for(;v<a.length&&(n.lastIndex=v,d=n.exec(a),d!==null);)v=n.lastIndex,n===T?d[1]==="!--"?n=G:d[1]!==void 0?n=Q:d[2]!==void 0?(ot.test(d[2])&&(s=RegExp("</"+d[2],"g")),n=m):d[3]!==void 0&&(n=m):n===m?d[0]===">"?(n=s!=null?s:T,c=-1):d[1]===void 0?c=-2:(c=n.lastIndex-d[2].length,p=d[1],n=d[3]===void 0?m:d[3]==='"'?tt:X):n===tt||n===X?n=m:n===G||n===Q?n=T:(n=m,s=void 0);let H=n===m&&r[l+1].startsWith("/>")?" ":"";o+=n===T?a+ft:c>=0?(i.push(p),a.slice(0,c)+"$lit$"+a.slice(c)+f+H):a+f+(c===-2?(i.push(void 0),l):H)}let h=o+(r[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Y!==void 0?Y.createHTML(h):h,i]},y=class{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,n=0,h=t.length-1,l=this.parts,[a,p]=_t(t,e);if(this.el=y.createElement(a,i),E.currentNode=this.el.content,e===2){let d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(s=E.nextNode())!==null&&l.length<h;){if(s.nodeType===1){if(s.hasAttributes()){let d=[];for(let c of s.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(f)){let v=p[n++];if(d.push(c),v!==void 0){let H=s.getAttribute(v.toLowerCase()+"$lit$").split(f),O=/([.?@])?(.*)/.exec(v);l.push({type:1,index:o,name:O[2],strings:H,ctor:O[1]==="."?D:O[1]==="?"?z:O[1]==="@"?B:x})}else l.push({type:6,index:o})}for(let c of d)s.removeAttribute(c)}if(ot.test(s.tagName)){let d=s.textContent.split(f),c=d.length-1;if(c>0){s.textContent=b?b.emptyScript:"";for(let v=0;v<c;v++)s.append(d[v],P()),E.nextNode(),l.push({type:2,index:++o});s.append(d[c],P())}}}else if(s.nodeType===8)if(s.data===st)l.push({type:2,index:o});else{let d=-1;for(;(d=s.data.indexOf(f,d+1))!==-1;)l.push({type:7,index:o}),d+=f.length-1}o++}}static createElement(t,e){let i=S.createElement("template");return i.innerHTML=t,i}};function C(r,t,e=r,i){var s,o,n,h;if(t===_)return t;let l=i!==void 0?(s=e._$Cl)===null||s===void 0?void 0:s[i]:e._$Cu,a=U(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==a&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),a===void 0?l=void 0:(l=new a(r),l._$AT(r,e,i)),i!==void 0?((n=(h=e)._$Cl)!==null&&n!==void 0?n:h._$Cl=[])[i]=l:e._$Cu=l),l!==void 0&&(t=C(r,l._$AS(r,t.values),l,i)),t}var L=class{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;let{el:{content:i},parts:s}=this._$AD,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:S).importNode(i,!0);E.currentNode=o;let n=E.nextNode(),h=0,l=0,a=s[0];for(;a!==void 0;){if(h===a.index){let p;a.type===2?p=new g(n,n.nextSibling,this,t):a.type===1?p=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(p=new q(n,this,t)),this.v.push(p),a=s[++l]}h!==(a==null?void 0:a.index)&&(n=E.nextNode(),h++)}return o}m(t){let e=0;for(let i of this.v)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},g=class{constructor(t,e,i,s){var o;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cg=(o=s==null?void 0:s.isConnected)===null||o===void 0||o}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=C(this,t,e),U(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==_&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):mt(t)?this.S(t):this.$(t)}A(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==u&&U(this._$AH)?this._$AA.nextSibling.data=t:this.k(S.createTextNode(t)),this._$AH=t}T(t){var e;let{values:i,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=y.createElement(s.h,this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.m(i);else{let n=new L(o,this),h=n.p(this.options);n.m(i),this.k(h),this._$AH=n}}_$AC(t){let e=et.get(t.strings);return e===void 0&&et.set(t.strings,e=new y(t)),e}S(t){rt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,i,s=0;for(let o of t)s===e.length?e.push(i=new g(this.A(P()),this.A(P()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cg=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},x=class{constructor(t,e,i,s,o){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){let o=this.strings,n=!1;if(o===void 0)t=C(this,t,e,0),n=!U(t)||t!==this._$AH&&t!==_,n&&(this._$AH=t);else{let h=t,l,a;for(t=o[0],l=0;l<o.length-1;l++)a=C(this,h[i+l],e,l),a===_&&(a=this._$AH[l]),n||(n=!U(a)||a!==this._$AH[l]),a===u?t=u:t!==u&&(t+=(a!=null?a:"")+o[l+1]),this._$AH[l]=a}n&&!s&&this.C(t)}C(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},D=class extends x{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===u?void 0:t}},yt=b?b.emptyScript:"",z=class extends x{constructor(){super(...arguments),this.type=4}C(t){t&&t!==u?this.element.setAttribute(this.name,yt):this.element.removeAttribute(this.name)}},B=class extends x{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=C(this,t,e,0))!==null&&i!==void 0?i:u)===_)return;let s=this._$AH,o=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==u&&(s===u||o);o&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}},q=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){C(this,t)}};var it=window.litHtmlPolyfillSupport;it==null||it(y,g),((M=globalThis.litHtmlVersions)!==null&&M!==void 0?M:globalThis.litHtmlVersions=[]).push("2.2.1");var N=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol(),at=new Map,R=class{constructor(t,e){if(this._$cssResult$=!0,e!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=at.get(this.cssText);return N&&t===void 0&&(at.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}},ht=r=>new R(typeof r=="string"?r:r+"",I),gt=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((i,s,o)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+r[o+1],r[0]);return new R(e,I)},j=(r,t)=>{N?r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{let i=document.createElement("style"),s=window.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,r.appendChild(i)})},k=N?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let i of t.cssRules)e+=i.cssText;return ht(e)})(r):r;var V,dt=window.trustedTypes,At=dt?dt.emptyScript:"",ct=window.reactiveElementPolyfillSupport,W={toAttribute(r,t){switch(t){case Boolean:r=r?At:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},ut=(r,t)=>t!==r&&(t==t||r==r),K={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:ut},$=class extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;(e=this.l)!==null&&e!==void 0||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();let t=[];return this.elementProperties.forEach((e,i)=>{let s=this._$Eh(i,e);s!==void 0&&(this._$Eu.set(s,i),t.push(s))}),t}static createProperty(t,e=K){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){let i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){let o=this[t];this[e]=s,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||K}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;let t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){let e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let s of i)this.createProperty(s,e[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let s of i)e.unshift(k(s))}else t!==void 0&&e.push(k(t));return e}static _$Eh(t,e){let i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Em(),this.requestUpdate(),(t=this.constructor.l)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$Eg)!==null&&e!==void 0?e:this._$Eg=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$Eg)===null||e===void 0||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;let e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return j(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$Eg)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$Eg)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=K){var s,o;let n=this.constructor._$Eh(t,i);if(n!==void 0&&i.reflect===!0){let h=((o=(s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==null&&o!==void 0?o:W.toAttribute)(e,i.type);this._$Ei=t,h==null?this.removeAttribute(n):this.setAttribute(n,h),this._$Ei=null}}_$AK(t,e){var i,s,o;let n=this.constructor,h=n._$Eu.get(t);if(h!==void 0&&this._$Ei!==h){let l=n.getPropertyOptions(h),a=l.converter,p=(o=(s=(i=a)===null||i===void 0?void 0:i.fromAttribute)!==null&&s!==void 0?s:typeof a=="function"?a:null)!==null&&o!==void 0?o:W.fromAttribute;this._$Ei=h,this[h]=p(e,l.type),this._$Ei=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||ut)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Ei!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((s,o)=>this[o]=s),this._$Et=void 0);let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$Eg)===null||t===void 0||t.forEach(s=>{var o;return(o=s.hostUpdate)===null||o===void 0?void 0:o.call(s)}),this.update(i)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$Eg)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$ES(i,this[i],e)),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}};$.finalized=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},ct==null||ct({ReactiveElement:$}),((V=globalThis.reactiveElementVersions)!==null&&V!==void 0?V:globalThis.reactiveElementVersions=[]).push("1.3.0");var Z,J;var w=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;let i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!1)}render(){return _}};w.finalized=!0,w._$litElement$=!0,(Z=globalThis.litElementHydrateSupport)===null||Z===void 0||Z.call(globalThis,{LitElement:w});var pt=globalThis.litElementPolyfillSupport;pt==null||pt({LitElement:w});((J=globalThis.litElementVersions)!==null&&J!==void 0?J:globalThis.litElementVersions=[]).push("3.2.0");var Bt=r=>t=>typeof t=="function"?((e,i)=>(window.customElements.define(e,i),i))(r,t):((e,i)=>{let{kind:s,elements:o}=i;return{kind:s,elements:o,finisher(n){window.customElements.define(e,n)}}})(r,t);var Et=(r,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,r)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,r)}};function vt(r){return(t,e)=>e!==void 0?((i,s,o)=>{s.constructor.createProperty(o,i)})(r,t,e):Et(r,t)}function Vt(r){return vt({...r,state:!0})}var A=({finisher:r,descriptor:t})=>(e,i)=>{var s;if(i===void 0){let o=(s=e.originalKey)!==null&&s!==void 0?s:e.key,n=t!=null?{kind:"method",placement:"prototype",key:o,descriptor:t(e.key)}:{...e,key:o};return r!=null&&(n.finisher=function(h){r(h,o)}),n}{let o=e.constructor;t!==void 0&&Object.defineProperty(e,i,t(i)),r==null||r(o,i)}};function Jt(r,t){return A({descriptor:e=>{let i={get(){var s,o;return(o=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(r))!==null&&o!==void 0?o:null},enumerable:!0,configurable:!0};if(t){let s=typeof e=="symbol"?Symbol():"__"+e;i.get=function(){var o,n;return this[s]===void 0&&(this[s]=(n=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(r))!==null&&n!==void 0?n:null),this[s]}}return i}})}var F,se=((F=window.HTMLSlotElement)===null||F===void 0?void 0:F.prototype.assignedElements)!=null?(r,t)=>r.assignedElements(t):(r,t)=>r.assignedNodes(t).filter(e=>e.nodeType===Node.ELEMENT_NODE);function bt(r,t){return function(e,i){r.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,cancelable:!1,composed:!0,...i}))}}function ye(r){return(t,e)=>{Object.defineProperty(t,e,{get(){return bt(this,r||e)},enumerable:!0,configurable:!0})}}var Ae={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ee=r=>(...t)=>({_$litDirective$:r,values:t}),$t=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};export{gt as a,St as b,_ as c,u as d,w as e,Bt as f,vt as g,Vt as h,Jt as i,Ae as j,Ee as k,$t as l,ye as m};
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */
7
- /**
8
- * @license
9
- * Copyright 2019 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- */
12
- /**
13
- * @license
14
- * Copyright 2021 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- */
17
- //# sourceMappingURL=chunk-6TYTDGI6.js.map
@@ -1,57 +0,0 @@
1
- import{a as i,b as a,e as o,f as r,g as t}from"./chunk-6TYTDGI6.js";import{a as l}from"./chunk-NZ3RGSR6.js";var s=i`:host {
2
- display: inline-block;
3
- max-width: 100%;
4
-
5
- --bl-badge-bg-color: var(--bl-color-accent-primary-background);
6
- --bl-badge-color: var(--bl-color-primary);
7
- --bl-badge-font: var(--bl-font-title-4-medium);
8
- --bl-badge-padding-vertical: var(--bl-size-3xs);
9
- --bl-badge-padding-horizontal: var(--bl-size-3xs);
10
- --bl-badge-margin-icon: var(--bl-size-3xs);
11
- --bl-badge-icon-size: var(--bl-size-s);
12
- --bl-badge-height: var(--bl-size-xl);
13
- }
14
-
15
- .badge {
16
- display: flex;
17
- gap: var(--bl-badge-margin-icon);
18
- justify-content: center;
19
- align-items: center;
20
- box-sizing: border-box;
21
- width: 100%;
22
- border: none;
23
- border-radius: var(--bl-size-4xs);
24
- margin: 0;
25
- padding: var(--bl-badge-padding-vertical) var(--bl-badge-padding-horizontal);
26
- background-color: var(--bl-badge-bg-color);
27
- color: var(--bl-badge-color, white);
28
- font: var(--bl-badge-font);
29
- font-kerning: none;
30
- height: var(--bl-badge-height);
31
- }
32
-
33
- :host([size='small']) {
34
- --bl-badge-font: var(--bl-font-caption-small-text);
35
- --bl-badge-height: var(--bl-size-m);
36
- }
37
-
38
- :host([size='large']) {
39
- --bl-badge-font: var(--bl-font-title-3-medium);
40
- --bl-badge-padding-vertical: var(--bl-size-2xs);
41
- --bl-badge-padding-horizontal: var(--bl-size-2xs);
42
- --bl-badge-height: var(--bl-size-2xl);
43
- --bl-badge-icon-size: var(--bl-size-m);
44
- }
45
-
46
- :host ::slotted(bl-icon) {
47
- font-size: var(--bl-badge-icon-size);
48
- }
49
-
50
- :host([size='small']) bl-icon {
51
- display: none;
52
- }
53
- `,b=s;var e=class extends o{constructor(){super(...arguments);this.size="medium"}static get styles(){return[b]}render(){let n=this.icon?a`<bl-icon name=${this.icon}></bl-icon>`:"";return a`<span class="badge">
54
- <slot name="icon">${n}</slot>
55
- <slot></slot>
56
- </span>`}};l([t({type:String,reflect:!0})],e.prototype,"size",2),l([t({type:String})],e.prototype,"icon",2),e=l([r("bl-badge")],e);export{e as a};
57
- //# sourceMappingURL=chunk-L4EJFUQV.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/badge/bl-badge.css", "../src/components/badge/bl-badge.ts"],
4
- "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host {\n display: inline-block;\n max-width: 100%;\n\n --bl-badge-bg-color: var(--bl-color-accent-primary-background);\n --bl-badge-color: var(--bl-color-primary);\n --bl-badge-font: var(--bl-font-title-4-medium);\n --bl-badge-padding-vertical: var(--bl-size-3xs);\n --bl-badge-padding-horizontal: var(--bl-size-3xs);\n --bl-badge-margin-icon: var(--bl-size-3xs);\n --bl-badge-icon-size: var(--bl-size-s);\n --bl-badge-height: var(--bl-size-xl);\n}\n\n.badge {\n display: flex;\n gap: var(--bl-badge-margin-icon);\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n border: none;\n border-radius: var(--bl-size-4xs);\n margin: 0;\n padding: var(--bl-badge-padding-vertical) var(--bl-badge-padding-horizontal);\n background-color: var(--bl-badge-bg-color);\n color: var(--bl-badge-color, white);\n font: var(--bl-badge-font);\n font-kerning: none;\n height: var(--bl-badge-height);\n}\n\n:host([size='small']) {\n --bl-badge-font: var(--bl-font-caption-small-text);\n --bl-badge-height: var(--bl-size-m);\n}\n\n:host([size='large']) {\n --bl-badge-font: var(--bl-font-title-3-medium);\n --bl-badge-padding-vertical: var(--bl-size-2xs);\n --bl-badge-padding-horizontal: var(--bl-size-2xs);\n --bl-badge-height: var(--bl-size-2xl);\n --bl-badge-icon-size: var(--bl-size-m);\n}\n\n:host ::slotted(bl-icon) {\n font-size: var(--bl-badge-icon-size);\n}\n\n:host([size='small']) bl-icon {\n display: none;\n}\n`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport style from './bl-badge.css';\nimport '../icon/bl-icon';\n\nexport type BadgeSize = 'small' | 'medium' | 'large';\n\n/**\n * @tag bl-badge\n * @summary Baklava Badge component\n *\n * @cssproperty --bl-badge-bg-color - Sets the background color of badge. Default value is `--bl-color-accent-primary-background`\n * @cssproperty --bl-badge-color - Sets the color of badge. Default value is `--bl-color-primary`\n */\n\n@customElement('bl-badge')\nexport default class BlBadge extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the badge size\n */\n @property({ type: String, reflect: true })\n size: BadgeSize = 'medium';\n\n /**\n * Sets the name of the icon\n */\n @property({ type: String })\n icon?: string;\n\n render(): TemplateResult {\n const icon = this.icon ? html`<bl-icon name=${this.icon}></bl-icon>` : '';\n\n return html`<span class=\"badge\">\n <slot name=\"icon\">${icon}</slot>\n <slot></slot>\n </span>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-badge': BlBadge;\n }\n}\n"],
5
- "mappings": "4GACO,IAAMA,EAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqDfC,EAAQF,ECtCf,IAAqBG,EAArB,cAAqCC,CAAW,CAAhD,kCASE,UAAkB,SARlB,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAcA,QAAyB,CACvB,IAAMC,EAAO,KAAK,KAAOC,kBAAqB,KAAK,kBAAoB,GAEvE,OAAOA;AAAA,0BACeD;AAAA;AAAA,YAGxB,CACF,EAhBEE,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GARtBN,EASnB,oBAMAK,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAdPN,EAenB,oBAfmBA,EAArBK,EAAA,CADCE,EAAc,UAAU,GACJP",
6
- "names": ["styles", "r", "bl_badge_default", "BlBadge", "s", "bl_badge_default", "icon", "$", "__decorateClass", "e", "n"]
7
- }
@@ -1,64 +0,0 @@
1
- import{a as ut}from"./chunk-4HPQWL76.js";import{a as lt,b as st,e as at,f as ct,g as ft,h as U,i as X,m as J}from"./chunk-6TYTDGI6.js";import{a as A}from"./chunk-NZ3RGSR6.js";function V(t){return t.split("-")[0]}function j(t){return t.split("-")[1]}function M(t){return["top","bottom"].includes(V(t))?"x":"y"}function Q(t){return t==="y"?"height":"width"}function pt(t,e,n){let{reference:i,floating:l}=t,r=i.x+i.width/2-l.width/2,s=i.y+i.height/2-l.height/2,o=M(e),a=Q(o),u=i[a]/2-l[a]/2,f=o==="x",c;switch(V(e)){case"top":c={x:r,y:i.y-l.height};break;case"bottom":c={x:r,y:i.y+i.height};break;case"right":c={x:i.x+i.width,y:s};break;case"left":c={x:i.x-l.width,y:s};break;default:c={x:i.x,y:i.y}}switch(j(e)){case"start":c[o]-=u*(n&&f?-1:1);break;case"end":c[o]+=u*(n&&f?-1:1)}return c}var ht=async(t,e,n)=>{let{placement:i="bottom",strategy:l="absolute",middleware:r=[],platform:s}=n,o=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:l}),{x:u,y:f}=pt(a,i,o),c=i,d={},p=0;for(let h=0;h<r.length;h++){let{name:m,fn:g}=r[h],{x:v,y:b,data:x,reset:y}=await g({x:u,y:f,initialPlacement:i,placement:c,strategy:l,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:e}});u=v!=null?v:u,f=b!=null?b:f,d={...d,[m]:{...d[m],...x}},y&&p<=50&&(p++,typeof y=="object"&&(y.placement&&(c=y.placement),y.rects&&(a=y.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:l}):y.rects),{x:u,y:f}=pt(a,c,o)),h=-1)}return{x:u,y:f,placement:c,strategy:l,middlewareData:d}};function mt(t){return typeof t!="number"?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(t):{top:t,right:t,bottom:t,left:t}}function z(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function Z(t,e){var n;e===void 0&&(e={});let{x:i,y:l,platform:r,rects:s,elements:o,strategy:a}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:d=!1,padding:p=0}=e,h=mt(p),m=o[d?c==="floating"?"reference":"floating":c],g=z(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(m)))==null||n?m:m.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(o.floating)),boundary:u,rootBoundary:f,strategy:a})),v=z(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:c==="floating"?{...s.floating,x:i,y:l}:s.reference,offsetParent:await(r.getOffsetParent==null?void 0:r.getOffsetParent(o.floating)),strategy:a}):s[c]);return{top:g.top-v.top+h.top,bottom:v.bottom-g.bottom+h.bottom,left:g.left-v.left+h.left,right:v.right-g.right+h.right}}var Dt=Math.min,Ot=Math.max;function K(t,e,n){return Ot(t,Dt(e,n))}var B=t=>({name:"arrow",options:t,async fn(e){let{element:n,padding:i=0}=t!=null?t:{},{x:l,y:r,placement:s,rects:o,platform:a}=e;if(n==null)return{};let u=mt(i),f={x:l,y:r},c=M(s),d=j(s),p=Q(c),h=await a.getDimensions(n),m=c==="y"?"top":"left",g=c==="y"?"bottom":"right",v=o.reference[p]+o.reference[c]-f[c]-o.floating[p],b=f[c]-o.reference[c],x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(n)),y=x?c==="y"?x.clientHeight||0:x.clientWidth||0:0;y===0&&(y=o.floating[p]);let _=v/2-b/2,S=u[m],k=y-h[p]-u[g],w=y/2-h[p]/2+_,P=K(S,w,k),D=(d==="start"?u[m]:u[g])>0&&w!==P&&o.reference[p]<=o.floating[p];return{[c]:f[c]-(D?w<S?S-w:k-w:0),data:{[c]:P,centerOffset:w-P}}}}),kt={left:"right",right:"left",bottom:"top",top:"bottom"};function Y(t){return t.replace(/left|right|bottom|top/g,e=>kt[e])}function Wt(t,e,n){n===void 0&&(n=!1);let i=j(t),l=M(t),r=Q(l),s=l==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=Y(s)),{main:s,cross:Y(s)}}var zt={start:"end",end:"start"};function dt(t){return t.replace(/start|end/g,e=>zt[e])}var Vt=["top","right","bottom","left"],Yt=Vt.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]);var tt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n;let{placement:i,middlewareData:l,rects:r,initialPlacement:s,platform:o,elements:a}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:c,fallbackStrategy:d="bestFit",flipAlignment:p=!0,...h}=t,m=V(i),g=c||(m===s||!p?[Y(s)]:function(w){let P=Y(w);return[dt(w),P,dt(P)]}(s)),v=[s,...g],b=await Z(e,h),x=[],y=((n=l.flip)==null?void 0:n.overflows)||[];if(u&&x.push(b[m]),f){let{main:w,cross:P}=Wt(i,r,await(o.isRTL==null?void 0:o.isRTL(a.floating)));x.push(b[w],b[P])}if(y=[...y,{placement:i,overflows:x}],!x.every(w=>w<=0)){var _,S;let w=((_=(S=l.flip)==null?void 0:S.index)!=null?_:0)+1,P=v[w];if(P)return{data:{index:w,overflows:y},reset:{placement:P}};let D="bottom";switch(d){case"bestFit":{var k;let rt=(k=y.map(F=>[F,F.overflows.filter(W=>W>0).reduce((W,St)=>W+St,0)]).sort((F,W)=>F[1]-W[1])[0])==null?void 0:k[0].placement;rt&&(D=rt);break}case"initialPlacement":D=s}if(i!==D)return{reset:{placement:D}}}return{}}}};var et=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){let{x:n,y:i}=e,l=await async function(r,s){let{placement:o,platform:a,elements:u}=r,f=await(a.isRTL==null?void 0:a.isRTL(u.floating)),c=V(o),d=j(o),p=M(o)==="x",h=["left","top"].includes(c)?-1:1,m=f&&p?-1:1,g=typeof s=="function"?s(r):s,{mainAxis:v,crossAxis:b,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return d&&typeof x=="number"&&(b=d==="end"?-1*x:x),p?{x:b*m,y:v*h}:{x:v*h,y:b*m}}(e,t);return{x:n+l.x,y:i+l.y,data:l}}}};function Mt(t){return t==="x"?"y":"x"}var ot=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:l}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:o={fn:g=>{let{x:v,y:b}=g;return{x:v,y:b}}},...a}=t,u={x:n,y:i},f=await Z(e,a),c=M(V(l)),d=Mt(c),p=u[c],h=u[d];if(r){let g=c==="y"?"bottom":"right";p=K(p+f[c==="y"?"top":"left"],p,p-f[g])}if(s){let g=d==="y"?"bottom":"right";h=K(h+f[d==="y"?"top":"left"],h,h-f[g])}let m=o.fn({...e,[c]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-i}}}}};function xt(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function E(t){if(t==null)return window;if(!xt(t)){let e=t.ownerDocument;return e&&e.defaultView||window}return t}function $(t){return E(t).getComputedStyle(t)}function T(t){return xt(t)?"":t?(t.nodeName||"").toLowerCase():""}function Rt(){let t=navigator.userAgentData;return t!=null&&t.brands?t.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function L(t){return t instanceof E(t).HTMLElement}function O(t){return t instanceof E(t).Element}function it(t){return typeof ShadowRoot>"u"?!1:t instanceof E(t).ShadowRoot||t instanceof ShadowRoot}function G(t){let{overflow:e,overflowX:n,overflowY:i}=$(t);return/auto|scroll|overlay|hidden/.test(e+i+n)}function Nt(t){return["table","td","th"].includes(T(t))}function gt(t){let e=/firefox/i.test(Rt()),n=$(t);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||e&&n.willChange==="filter"||e&&!!n.filter&&n.filter!=="none"}function Pt(){return!/^((?!chrome|android).)*safari/i.test(Rt())}var yt=Math.min,N=Math.max,q=Math.round;function H(t,e,n){var i,l,r,s;e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),a=1,u=1;e&&L(t)&&(a=t.offsetWidth>0&&q(o.width)/t.offsetWidth||1,u=t.offsetHeight>0&&q(o.height)/t.offsetHeight||1);let f=O(t)?E(t):window,c=!Pt()&&n,d=(o.left+(c&&(i=(l=f.visualViewport)==null?void 0:l.offsetLeft)!=null?i:0))/a,p=(o.top+(c&&(r=(s=f.visualViewport)==null?void 0:s.offsetTop)!=null?r:0))/u,h=o.width/a,m=o.height/u;return{width:h,height:m,top:p,right:d+h,bottom:p+m,left:d,x:d,y:p}}function C(t){return(e=t,(e instanceof E(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function I(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function At(t){return H(C(t)).left+I(t).scrollLeft}function $t(t,e,n){let i=L(e),l=C(e),r=H(t,i&&function(a){let u=H(a);return q(u.width)!==a.offsetWidth||q(u.height)!==a.offsetHeight}(e),n==="fixed"),s={scrollLeft:0,scrollTop:0},o={x:0,y:0};if(i||!i&&n!=="fixed")if((T(e)!=="body"||G(l))&&(s=I(e)),L(e)){let a=H(e,!0);o.x=a.x+e.clientLeft,o.y=a.y+e.clientTop}else l&&(o.x=At(l));return{x:r.left+s.scrollLeft-o.x,y:r.top+s.scrollTop-o.y,width:r.width,height:r.height}}function Lt(t){return T(t)==="html"?t:t.assignedSlot||t.parentNode||(it(t)?t.host:null)||C(t)}function vt(t){return L(t)&&getComputedStyle(t).position!=="fixed"?t.offsetParent:null}function nt(t){let e=E(t),n=vt(t);for(;n&&Nt(n)&&getComputedStyle(n).position==="static";)n=vt(n);return n&&(T(n)==="html"||T(n)==="body"&&getComputedStyle(n).position==="static"&&!gt(n))?e:n||function(i){let l=Lt(i);for(it(l)&&(l=l.host);L(l)&&!["html","body"].includes(T(l));){if(gt(l))return l;l=l.parentNode}return null}(t)||e}function wt(t){if(L(t))return{width:t.offsetWidth,height:t.offsetHeight};let e=H(t);return{width:e.width,height:e.height}}function Tt(t){let e=Lt(t);return["html","body","#document"].includes(T(e))?t.ownerDocument.body:L(e)&&G(e)?e:Tt(e)}function Et(t,e){var n;e===void 0&&(e=[]);let i=Tt(t),l=i===((n=t.ownerDocument)==null?void 0:n.body),r=E(i),s=l?[r].concat(r.visualViewport||[],G(i)?i:[]):i,o=e.concat(s);return l?o:o.concat(Et(s))}function bt(t,e,n){return e==="viewport"?z(function(i,l){let r=E(i),s=C(i),o=r.visualViewport,a=s.clientWidth,u=s.clientHeight,f=0,c=0;if(o){a=o.width,u=o.height;let d=Pt();(d||!d&&l==="fixed")&&(f=o.offsetLeft,c=o.offsetTop)}return{width:a,height:u,x:f,y:c}}(t,n)):O(e)?function(i,l){let r=H(i,!1,l==="fixed"),s=r.top+i.clientTop,o=r.left+i.clientLeft;return{top:s,left:o,x:o,y:s,right:o+i.clientWidth,bottom:s+i.clientHeight,width:i.clientWidth,height:i.clientHeight}}(e,n):z(function(i){var l;let r=C(i),s=I(i),o=(l=i.ownerDocument)==null?void 0:l.body,a=N(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),u=N(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-s.scrollLeft+At(i),c=-s.scrollTop;return $(o||r).direction==="rtl"&&(f+=N(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:u,x:f,y:c}}(C(t)))}function _t(t){let e=Et(t),n=["absolute","fixed"].includes($(t).position)&&L(t)?nt(t):t;return O(n)?e.filter(i=>O(i)&&function(l,r){let s=r.getRootNode==null?void 0:r.getRootNode();if(l.contains(r))return!0;if(s&&it(s)){let o=r;do{if(o&&l===o)return!0;o=o.parentNode||o.host}while(o)}return!1}(i,n)&&T(i)!=="body"):[]}var Ft={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:l}=t,r=[...n==="clippingAncestors"?_t(e):[].concat(n),i],s=r[0],o=r.reduce((a,u)=>{let f=bt(e,u,l);return a.top=N(f.top,a.top),a.right=yt(f.right,a.right),a.bottom=yt(f.bottom,a.bottom),a.left=N(f.left,a.left),a},bt(e,s,l));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:i}=t,l=L(n),r=C(n);if(n===r)return e;let s={scrollLeft:0,scrollTop:0},o={x:0,y:0};if((l||!l&&i!=="fixed")&&((T(n)!=="body"||G(r))&&(s=I(n)),L(n))){let a=H(n,!0);o.x=a.x+n.clientLeft,o.y=a.y+n.clientTop}return{...e,x:e.x-s.scrollLeft+o.x,y:e.y-s.scrollTop+o.y}},isElement:O,getDimensions:wt,getOffsetParent:nt,getDocumentElement:C,getElementRects:t=>{let{reference:e,floating:n,strategy:i}=t;return{reference:$t(e,nt(n),i),floating:{...wt(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>$(t).direction==="rtl"};var Ct=(t,e,n)=>ht(t,e,{platform:Ft,...n});var Xt=lt`:host {
2
- --bl-tooltip-position: absolute;
3
- --bl-tooltip-visibility: hidden;
4
- --bl-tooltip-left: 0;
5
- --bl-tooltip-top: 0;
6
- --bl-tooltip-arrow-top: 0;
7
- --bl-tooltip-arrow-bottom: 0;
8
- --bl-tooltip-arrow-right: 0;
9
- --bl-tooltip-arrow-left: 0;
10
- }
11
-
12
- .trigger {
13
- display: inline-block;
14
- cursor: pointer;
15
- }
16
-
17
- .tooltip {
18
- position: var(--bl-tooltip-position);
19
- box-sizing: border-box;
20
- border: none;
21
- background-color: var(--bl-color-secondary);
22
- color: var(--bl-color-primary-background);
23
- border-radius: var(--bl-size-3xs);
24
- pointer-events: none;
25
- font: var(--bl-font-title-3-regular);
26
- padding: var(--bl-size-m);
27
- left: var(--bl-tooltip-left);
28
- top: var(--bl-tooltip-top);
29
- visibility: var(--bl-tooltip-visibility);
30
- z-index: 999;
31
- max-width: 424px;
32
- }
33
-
34
- .arrow {
35
- position: absolute;
36
- background-color: var(--bl-color-secondary);
37
- width: var(--bl-size-2xs);
38
- height: var(--bl-size-2xs);
39
- transform: rotate(45deg);
40
- top: var(--bl-tooltip-arrow-top);
41
- bottom: var(--bl-tooltip-arrow-bottom);
42
- right: var(--bl-tooltip-arrow-right);
43
- left: var(--bl-tooltip-arrow-left);
44
- }
45
-
46
- .visible {
47
- --bl-tooltip-visibility: visible;
48
- }
49
-
50
- .hidden {
51
- --bl-tooltip-visibility: hidden;
52
- }
53
- `,Ht=Xt;var R=class extends at{constructor(){super(...arguments);this.placement="top";this._visible=!1;this._position="absolute"}static get styles(){return[Ht]}connectedCallback(){super.connectedCallback(),setTimeout(()=>{this._position=getComputedStyle(this).getPropertyValue("--bl-tooltip-position")})}setTooltip(){Ct(this.trigger,this.tooltip,{placement:this.placement,strategy:this._position,middleware:[et(8),ot({padding:5}),tt(),B({element:this.arrow,padding:5})]}).then(({x:n,y:i,placement:l,middlewareData:r})=>{var c,d,p,h;let s=((c=r.arrow)==null?void 0:c.x)!=null?`${(d=r.arrow)==null?void 0:d.x}px`:" ",o=((p=r.arrow)==null?void 0:p.y)!=null?`${(h=r.arrow)==null?void 0:h.y}px`:" ",a={top:"bottom",right:"left",bottom:"top",left:"right"},u=l.split("-")[0],f=a[u];this.style.setProperty("--bl-tooltip-left",`${n}px`),this.style.setProperty("--bl-tooltip-top",`${i}px`),this.style.setProperty("--bl-tooltip-arrow-left",s),this.style.setProperty("--bl-tooltip-arrow-top",o),this.style.setProperty("--bl-tooltip-arrow-bottom","0"),this.style.setProperty("--bl-tooltip-arrow-right","0"),this.style.setProperty(`--bl-tooltip-arrow-${f}`,"-4px")})}show(){this._visible=!0,this.setTooltip(),this.onShow("Show event fired!")}hide(){this._visible=!1,this.onHide("Hide event fired!")}render(){let n=ut({tooltip:!0,visible:this._visible});return st` <slot
54
- class="trigger"
55
- name="tooltip-trigger"
56
- @mouseover="${this.show}"
57
- @mouseleave="${this.hide}"
58
- >
59
- </slot>
60
- <div class=${n}>
61
- <slot></slot>
62
- <div class="arrow"></div>
63
- </div>`}};A([X(".tooltip")],R.prototype,"tooltip",2),A([X(".trigger")],R.prototype,"trigger",2),A([X(".arrow")],R.prototype,"arrow",2),A([ft({type:String})],R.prototype,"placement",2),A([U()],R.prototype,"_visible",2),A([U()],R.prototype,"_position",2),A([J("bl-tooltip-show")],R.prototype,"onShow",2),A([J("bl-tooltip-hide")],R.prototype,"onHide",2),R=A([ct("bl-tooltip")],R);export{R as a};
64
- //# sourceMappingURL=chunk-NMJFO734.js.map