@trendyol/baklava 3.3.0-beta.23 → 3.3.0-beta.24

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 (164) hide show
  1. package/dist/baklava-react.d.ts +12 -0
  2. package/dist/baklava-react.d.ts.map +1 -1
  3. package/dist/baklava-react.js +1 -1
  4. package/dist/baklava-react.js.map +3 -3
  5. package/dist/baklava-vue.d.ts +1 -0
  6. package/dist/baklava.d.ts +1 -0
  7. package/dist/baklava.d.ts.map +1 -1
  8. package/dist/baklava.js +1 -1
  9. package/dist/{chunk-OAF3R4PW.js → chunk-2IJL7HNY.js} +2 -2
  10. package/dist/chunk-2IJL7HNY.js.map +7 -0
  11. package/dist/chunk-4BLKAURK.js +16 -0
  12. package/dist/chunk-4BLKAURK.js.map +7 -0
  13. package/dist/chunk-7VMGFJ5X.js +2 -0
  14. package/dist/chunk-7VMGFJ5X.js.map +7 -0
  15. package/dist/chunk-APLBTZ36.js +24 -0
  16. package/dist/chunk-APLBTZ36.js.map +7 -0
  17. package/dist/chunk-DE3A37FL.js +20 -0
  18. package/dist/chunk-DE3A37FL.js.map +7 -0
  19. package/dist/chunk-DIGACNOH.js +21 -0
  20. package/dist/chunk-DIGACNOH.js.map +7 -0
  21. package/dist/chunk-ERL6CBPO.js +31 -0
  22. package/dist/chunk-ERL6CBPO.js.map +7 -0
  23. package/dist/{chunk-5VEXMTA4.js → chunk-H4WETBHJ.js} +2 -2
  24. package/dist/chunk-H4WETBHJ.js.map +7 -0
  25. package/dist/chunk-HYBPEELZ.js +5 -0
  26. package/dist/chunk-HYBPEELZ.js.map +7 -0
  27. package/dist/chunk-HZV6GUII.js +26 -0
  28. package/dist/chunk-HZV6GUII.js.map +7 -0
  29. package/dist/chunk-IDRA37BX.js +59 -0
  30. package/dist/chunk-IDRA37BX.js.map +7 -0
  31. package/dist/chunk-KJUZJAHW.js +84 -0
  32. package/dist/chunk-KJUZJAHW.js.map +7 -0
  33. package/dist/chunk-LEAVDIGF.js +2 -0
  34. package/dist/chunk-LEAVDIGF.js.map +7 -0
  35. package/dist/chunk-MWFGDECP.js +35 -0
  36. package/dist/chunk-MWFGDECP.js.map +7 -0
  37. package/dist/chunk-MWG4TBH7.js +27 -0
  38. package/dist/chunk-MWG4TBH7.js.map +7 -0
  39. package/dist/chunk-NXVLNG4L.js +65 -0
  40. package/dist/chunk-NXVLNG4L.js.map +7 -0
  41. package/dist/chunk-OXHRXOBD.js +32 -0
  42. package/dist/chunk-OXHRXOBD.js.map +7 -0
  43. package/dist/{chunk-CAIHRZ24.js → chunk-Q5D7W6YP.js} +2 -2
  44. package/dist/chunk-Q7CEGCDI.js +50 -0
  45. package/dist/chunk-Q7CEGCDI.js.map +7 -0
  46. package/dist/{chunk-GMVJABPT.js → chunk-QDYWH7BU.js} +2 -2
  47. package/dist/chunk-QDYWH7BU.js.map +7 -0
  48. package/dist/chunk-RER7OLAQ.js +22 -0
  49. package/dist/chunk-RER7OLAQ.js.map +7 -0
  50. package/dist/chunk-SBCJY5IU.js +34 -0
  51. package/dist/{chunk-75V3FKJS.js.map → chunk-SBCJY5IU.js.map} +2 -2
  52. package/dist/chunk-STZJ3LBU.js +37 -0
  53. package/dist/{chunk-KBNVATXF.js.map → chunk-STZJ3LBU.js.map} +2 -2
  54. package/dist/{chunk-4BZSILLM.js → chunk-T5MEA7JO.js} +2 -2
  55. package/dist/chunk-T5MEA7JO.js.map +7 -0
  56. package/dist/chunk-TUUQIEDI.js +25 -0
  57. package/dist/chunk-TUUQIEDI.js.map +7 -0
  58. package/dist/{chunk-BNUJWONI.js → chunk-UOGCEUXK.js} +2 -2
  59. package/dist/chunk-UOGCEUXK.js.map +7 -0
  60. package/dist/chunk-WPESQSKX.js +31 -0
  61. package/dist/chunk-WPESQSKX.js.map +7 -0
  62. package/dist/chunk-X5XH4HTW.js +17 -0
  63. package/dist/chunk-X5XH4HTW.js.map +7 -0
  64. package/dist/{chunk-IGNJQVQF.js → chunk-ZE7GYACV.js} +2 -2
  65. package/dist/chunk-ZE7GYACV.js.map +7 -0
  66. package/dist/{chunk-N4GAO7FQ.js → chunk-ZJBBQHF3.js} +2 -2
  67. package/dist/chunk-ZLJF4SVG.js +4 -0
  68. package/dist/chunk-ZLJF4SVG.js.map +7 -0
  69. package/dist/components/accordion-group/accordion/bl-accordion.js +1 -1
  70. package/dist/components/accordion-group/bl-accordion-group.js +1 -1
  71. package/dist/components/alert/bl-alert.js +1 -1
  72. package/dist/components/badge/bl-badge.js +1 -1
  73. package/dist/components/button/bl-button.js +1 -1
  74. package/dist/components/calendar/bl-calendar.js +1 -1
  75. package/dist/components/checkbox-group/bl-checkbox-group.js +1 -1
  76. package/dist/components/checkbox-group/checkbox/bl-checkbox.js +1 -1
  77. package/dist/components/datepicker/bl-datepicker.js +1 -1
  78. package/dist/components/dialog/bl-dialog.js +1 -1
  79. package/dist/components/drawer/bl-drawer.js +1 -1
  80. package/dist/components/dropdown/bl-dropdown.js +1 -1
  81. package/dist/components/dropdown/group/bl-dropdown-group.js +1 -1
  82. package/dist/components/dropdown/item/bl-dropdown-item.js +1 -1
  83. package/dist/components/input/bl-input.js +1 -1
  84. package/dist/components/notification/bl-notification.js +1 -1
  85. package/dist/components/notification/bl-notification.stories.d.ts.map +1 -1
  86. package/dist/components/notification/bl-notification.stories.js +30 -196
  87. package/dist/components/notification/bl-notification.stories.js.map +3 -3
  88. package/dist/components/notification/card/bl-notification-card.js +1 -1
  89. package/dist/components/pagination/bl-pagination.js +1 -1
  90. package/dist/components/popover/bl-popover.js +1 -1
  91. package/dist/components/progress-indicator/bl-progress-indicator.js +1 -1
  92. package/dist/components/radio-group/bl-radio-group.js +1 -1
  93. package/dist/components/radio-group/radio/bl-radio.js +1 -1
  94. package/dist/components/select/bl-select.js +1 -1
  95. package/dist/components/select/option/bl-select-option.js +1 -1
  96. package/dist/components/spinner/bl-spinner.js +1 -1
  97. package/dist/components/split-button/bl-split-button.js +1 -1
  98. package/dist/components/switch/bl-switch.js +1 -1
  99. package/dist/components/tab-group/bl-tab-group.js +1 -1
  100. package/dist/components/tab-group/tab/bl-tab.js +1 -1
  101. package/dist/components/table/table-cell/bl-table-cell.js +1 -1
  102. package/dist/components/table/table-header/bl-table-header.js +1 -1
  103. package/dist/components/table/table-header-cell/bl-table-header-cell.js +1 -1
  104. package/dist/components/table/table-row/bl-table-row.js +1 -1
  105. package/dist/components/tag/bl-tag.d.ts +52 -0
  106. package/dist/components/tag/bl-tag.d.ts.map +1 -0
  107. package/dist/components/tag/bl-tag.js +2 -0
  108. package/dist/components/tag/bl-tag.js.map +7 -0
  109. package/dist/components/tag/bl-tag.test.d.ts +2 -0
  110. package/dist/components/tag/bl-tag.test.d.ts.map +1 -0
  111. package/dist/components/textarea/bl-textarea.js +1 -1
  112. package/dist/components/tooltip/bl-tooltip.js +1 -1
  113. package/dist/custom-elements.json +112 -0
  114. package/package.json +1 -1
  115. package/dist/chunk-4BZSILLM.js.map +0 -7
  116. package/dist/chunk-4QFXDW3W.js +0 -31
  117. package/dist/chunk-4QFXDW3W.js.map +0 -7
  118. package/dist/chunk-5VEXMTA4.js.map +0 -7
  119. package/dist/chunk-73RGV4UX.js +0 -16
  120. package/dist/chunk-73RGV4UX.js.map +0 -7
  121. package/dist/chunk-757CMI4A.js +0 -78
  122. package/dist/chunk-757CMI4A.js.map +0 -7
  123. package/dist/chunk-75V3FKJS.js +0 -34
  124. package/dist/chunk-BNUJWONI.js.map +0 -7
  125. package/dist/chunk-CJDCQC7C.js +0 -50
  126. package/dist/chunk-CJDCQC7C.js.map +0 -7
  127. package/dist/chunk-FCEMOH4J.js +0 -27
  128. package/dist/chunk-FCEMOH4J.js.map +0 -7
  129. package/dist/chunk-FTQX7CEW.js +0 -35
  130. package/dist/chunk-FTQX7CEW.js.map +0 -7
  131. package/dist/chunk-FVBGMXMC.js +0 -17
  132. package/dist/chunk-FVBGMXMC.js.map +0 -7
  133. package/dist/chunk-GMVJABPT.js.map +0 -7
  134. package/dist/chunk-GXDVWGFU.js +0 -32
  135. package/dist/chunk-GXDVWGFU.js.map +0 -7
  136. package/dist/chunk-IGNJQVQF.js.map +0 -7
  137. package/dist/chunk-ILK55FB6.js +0 -65
  138. package/dist/chunk-ILK55FB6.js.map +0 -7
  139. package/dist/chunk-J45OQI7D.js +0 -20
  140. package/dist/chunk-J45OQI7D.js.map +0 -7
  141. package/dist/chunk-JAZGOWKA.js +0 -2
  142. package/dist/chunk-JAZGOWKA.js.map +0 -7
  143. package/dist/chunk-KBNVATXF.js +0 -37
  144. package/dist/chunk-NGJM4NWA.js +0 -4
  145. package/dist/chunk-NGJM4NWA.js.map +0 -7
  146. package/dist/chunk-OAF3R4PW.js.map +0 -7
  147. package/dist/chunk-QMVEWMEI.js +0 -20
  148. package/dist/chunk-QMVEWMEI.js.map +0 -7
  149. package/dist/chunk-S6HEBXIR.js +0 -84
  150. package/dist/chunk-S6HEBXIR.js.map +0 -7
  151. package/dist/chunk-T5EQ4OXS.js +0 -2
  152. package/dist/chunk-T5EQ4OXS.js.map +0 -7
  153. package/dist/chunk-UZJOCLOO.js +0 -21
  154. package/dist/chunk-UZJOCLOO.js.map +0 -7
  155. package/dist/chunk-VU6LRFZR.js +0 -26
  156. package/dist/chunk-VU6LRFZR.js.map +0 -7
  157. package/dist/chunk-WXWKIQAK.js +0 -22
  158. package/dist/chunk-WXWKIQAK.js.map +0 -7
  159. package/dist/chunk-X73CSBRO.js +0 -24
  160. package/dist/chunk-X73CSBRO.js.map +0 -7
  161. package/dist/chunk-YZRAUVUQ.js +0 -31
  162. package/dist/chunk-YZRAUVUQ.js.map +0 -7
  163. /package/dist/{chunk-CAIHRZ24.js.map → chunk-Q5D7W6YP.js.map} +0 -0
  164. /package/dist/{chunk-N4GAO7FQ.js.map → chunk-ZJBBQHF3.js.map} +0 -0
@@ -0,0 +1,27 @@
1
+ import{a as o}from"./chunk-GRL4DWKG.js";import{a as p,b as n,c as m,e as b}from"./chunk-5MOOXA2X.js";import{a as c,b as r,f as h}from"./chunk-4OT5AMS5.js";import{d as i}from"./chunk-IZ2LK5GK.js";var u=d=>{let l=d.match(/^(\d+(\.\d+)?)(.*)$/);if(!l)return null;let e=parseFloat(l[1]),a=l[3],s;switch(a){case"px":s=e;break;case"vw":s=e*window.innerWidth/100;break;case"%":s=e*window.innerWidth/100;break;default:s=null;break}return s};var w=c`.drawer{box-sizing:border-box;position:fixed;display:flex;top:0;bottom:0;inset-inline-end:0;width:var(--bl-drawer-current-width,424px);padding:var(--bl-size-xl);padding-top:max(env(safe-area-inset-top),var(--bl-size-xl));padding-inline-end:max(env(safe-area-inset-right),var(--bl-size-xl));padding-bottom:max(env(safe-area-inset-bottom),var(--bl-size-xl));background:var(--bl-color-neutral-full);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transition:right var(--bl-drawer-animation-duration, .25s);z-index:var(--bl-index-sticky)}iframe{height:100%;width:100%;border:none}.container{display:flex;flex-direction:column;gap:var(--bl-size-xl);flex:1;width:100%}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);background-color:#fff}header .header-buttons{display:flex;gap:var(--bl-size-xl);margin-inline-start:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-neutral-darker);overflow:hidden;margin:0;padding:0}.content{flex:1;overflow-y:scroll}.iframe-content{flex:1}`,f=w;var t=class extends h{constructor(){super(...arguments);this.open=!1;this.width="424px";this.domExistence=!1}static get styles(){return[f]}connectedCallback(){super.connectedCallback(),window==null||window.addEventListener("bl-drawer-open",e=>{e.target!==this&&this.closeDrawer()}),this.resizeDrawerWidth(),window==null||window.addEventListener("resize",()=>this.resizeDrawerWidth()),window==null||window.addEventListener("load",()=>this.resizeDrawerWidth())}disconnectedCallback(){super.disconnectedCallback(),window==null||window.removeEventListener("resize",()=>this.resizeDrawerWidth()),window==null||window.addEventListener("load",()=>this.resizeDrawerWidth())}updated(e){e.has("open")&&this.toggleDialogHandler(),e.has("width")&&this.resizeDrawerWidth()}resizeDrawerWidth(){let e=u(this.width),a=!e||e<100?"424px":this.width;e&&((window==null?void 0:window.innerWidth)<e?this.style.setProperty("--bl-drawer-current-width","calc(100vw - 24px)"):this.style.setProperty("--bl-drawer-current-width",a))}toggleDialogHandler(){this.open?(this.domExistenceSchedule&&clearTimeout(this.domExistenceSchedule),this.domExistence=!0,window.setTimeout(()=>{this.embedUrl&&this._drawerIframe&&(this._drawerIframe.src=this.embedUrl)}),this.onOpen("")):(this.domExistenceSchedule=window.setTimeout(()=>{this.domExistence=!1},1e3),this.onClose(""))}closeDrawer(){this.open=!1}renderContent(){let e=this.embedUrl?r`<iframe id="drawer-iframe" src=${this.embedUrl}></iframe>`:r`<slot></slot>`;return r`<section class=${this.embedUrl?"iframe-content":"content"}>
2
+ ${e}
3
+ </section>`}renderContainer(){let e=this.caption?r`<h2 id="drawer-caption">${this.caption}</h2>`:"",a=this.externalLink?r`<bl-button
4
+ icon="external_link"
5
+ variant="tertiary"
6
+ kind="neutral"
7
+ size="small"
8
+ href="${this.externalLink}"
9
+ target="_blank"
10
+ ></bl-button>`:"";return r`<div class="container">
11
+ <header>
12
+ ${e}
13
+ <div class="header-buttons">
14
+ ${a}
15
+ <bl-button
16
+ @click="${this.closeDrawer}"
17
+ icon="close"
18
+ label="close"
19
+ size="small"
20
+ variant="tertiary"
21
+ kind="neutral"
22
+ ></bl-button>
23
+ </div>
24
+ </header>
25
+ ${this.renderContent()}
26
+ </div>`}render(){return this.domExistence?r`<div class="drawer">${this.renderContainer()}</div>`:r``}};i([n({type:Boolean,reflect:!0})],t.prototype,"open",2),i([n({type:String})],t.prototype,"caption",2),i([n({type:String,attribute:"embed-url"})],t.prototype,"embedUrl",2),i([n({type:String,attribute:"external-link"})],t.prototype,"externalLink",2),i([n({type:String,attribute:"width"})],t.prototype,"width",2),i([o("bl-drawer-open")],t.prototype,"onOpen",2),i([o("bl-drawer-close")],t.prototype,"onClose",2),i([b("#drawer-iframe")],t.prototype,"_drawerIframe",2),i([m()],t.prototype,"domExistence",2),t=i([p("bl-drawer")],t);export{t as a};
27
+ //# sourceMappingURL=chunk-MWG4TBH7.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/utilities/style-to-px.converter.ts", "../src/components/drawer/bl-drawer.css", "../src/components/drawer/bl-drawer.ts"],
4
+ "sourcesContent": ["export const styleToPixelConverter = (styleValue: string): number | null => {\n const match = styleValue.match(/^(\\d+(\\.\\d+)?)(.*)$/);\n\n if (!match) return null;\n\n const value = parseFloat(match[1]);\n const unit = match[3];\n\n let styleInPixel: number | null;\n\n switch (unit) {\n case \"px\":\n styleInPixel = value;\n break;\n case \"vw\":\n styleInPixel = (value * window.innerWidth) / 100;\n break;\n case \"%\":\n styleInPixel = (value * window.innerWidth) / 100;\n break;\n default:\n styleInPixel = null;\n break;\n }\n return styleInPixel;\n};\n", "import {css} from 'lit';\nexport const styles = css`.drawer{box-sizing:border-box;position:fixed;display:flex;top:0;bottom:0;inset-inline-end:0;width:var(--bl-drawer-current-width,424px);padding:var(--bl-size-xl);padding-top:max(env(safe-area-inset-top),var(--bl-size-xl));padding-inline-end:max(env(safe-area-inset-right),var(--bl-size-xl));padding-bottom:max(env(safe-area-inset-bottom),var(--bl-size-xl));background:var(--bl-color-neutral-full);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transition:right var(--bl-drawer-animation-duration, .25s);z-index:var(--bl-index-sticky)}iframe{height:100%;width:100%;border:none}.container{display:flex;flex-direction:column;gap:var(--bl-size-xl);flex:1;width:100%}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);background-color:#fff}header .header-buttons{display:flex;gap:var(--bl-size-xl);margin-inline-start:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-neutral-darker);overflow:hidden;margin:0;padding:0}.content{flex:1;overflow-y:scroll}.iframe-content{flex:1}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport { styleToPixelConverter } from \"../../utilities/style-to-px.converter\";\nimport \"../button/bl-button\";\nimport style from \"./bl-drawer.css\";\n\n/**\n * @tag bl-drawer\n * @summary Baklava Drawer component\n *\n * @cssproperty [--bl-drawer-animation-duration=250ms] Drawer slide in animation duration\n */\n\n@customElement(\"bl-drawer\")\nexport default class BlDrawer extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets drawer open-close status\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Sets the drawer title\n */\n @property({ type: String })\n caption?: string;\n\n /**\n * Sets the drawer embed url for iframe\n */\n @property({ type: String, attribute: \"embed-url\" })\n embedUrl?: string;\n\n /**\n * Sets the drawer external link\n */\n @property({ type: String, attribute: \"external-link\" })\n externalLink?: string;\n\n /**\n * Sets the drawer width\n */\n @property({ type: String, attribute: \"width\" })\n width: string = \"424px\";\n\n /**\n * Fires when the drawer is opened\n */\n @event(\"bl-drawer-open\") private onOpen: EventDispatcher<string>;\n\n /**\n * Fires when the drawer is closed\n */\n @event(\"bl-drawer-close\") private onClose: EventDispatcher<string>;\n\n @query(\"#drawer-iframe\")\n _drawerIframe: HTMLIFrameElement;\n\n connectedCallback() {\n super.connectedCallback();\n window?.addEventListener(\"bl-drawer-open\", event => {\n if (event.target !== this) this.closeDrawer();\n });\n this.resizeDrawerWidth();\n\n window?.addEventListener(\"resize\", () => this.resizeDrawerWidth());\n window?.addEventListener(\"load\", () => this.resizeDrawerWidth());\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window?.removeEventListener(\"resize\", () => this.resizeDrawerWidth());\n window?.addEventListener(\"load\", () => this.resizeDrawerWidth());\n }\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has(\"open\")) {\n this.toggleDialogHandler();\n }\n\n if (changedProperties.has(\"width\")) {\n this.resizeDrawerWidth();\n }\n }\n\n private domExistenceSchedule: number;\n\n private resizeDrawerWidth() {\n const drawerWidth = styleToPixelConverter(this.width);\n\n const newWidth = !drawerWidth || drawerWidth < 100 ? \"424px\" : this.width;\n\n if (drawerWidth) {\n if (window?.innerWidth < drawerWidth) {\n this.style.setProperty(\"--bl-drawer-current-width\", \"calc(100vw - 24px)\");\n } else {\n this.style.setProperty(\"--bl-drawer-current-width\", newWidth);\n }\n }\n }\n\n private toggleDialogHandler() {\n if (this.open) {\n if (this.domExistenceSchedule) {\n clearTimeout(this.domExistenceSchedule);\n }\n this.domExistence = true;\n window.setTimeout(() => {\n if (this.embedUrl && this._drawerIframe) {\n this._drawerIframe.src = this.embedUrl;\n }\n });\n // FIXME: Allow events without payload\n this.onOpen(\"\");\n } else {\n // Give some time for exit animation\n this.domExistenceSchedule = window.setTimeout(() => {\n this.domExistence = false;\n }, 1000);\n\n // FIXME: Allow events without payload\n this.onClose(\"\");\n }\n }\n\n @state() private domExistence = false;\n\n private closeDrawer() {\n this.open = false;\n }\n\n private renderContent() {\n const content = this.embedUrl\n ? html`<iframe id=\"drawer-iframe\" src=${this.embedUrl}></iframe>`\n : html`<slot></slot>`;\n\n return html`<section class=${this.embedUrl ? \"iframe-content\" : \"content\"}>\n ${content}\n </section>`;\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"drawer-caption\">${this.caption}</h2>` : \"\";\n const external_button = this.externalLink\n ? html`<bl-button\n icon=\"external_link\"\n variant=\"tertiary\"\n kind=\"neutral\"\n size=\"small\"\n href=\"${this.externalLink}\"\n target=\"_blank\"\n ></bl-button>`\n : \"\";\n\n return html`<div class=\"container\">\n <header>\n ${title}\n <div class=\"header-buttons\">\n ${external_button}\n <bl-button\n @click=\"${this.closeDrawer}\"\n icon=\"close\"\n label=\"close\"\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n ></bl-button>\n </div>\n </header>\n ${this.renderContent()}\n </div>`;\n }\n\n render(): TemplateResult {\n if (this.domExistence) {\n return html`<div class=\"drawer\">${this.renderContainer()}</div>`;\n } else {\n return html``;\n }\n }\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bl-drawer\": BlDrawer;\n }\n}\n"],
5
+ "mappings": "mMAAO,IAAMA,EAAyBC,GAAsC,CAC1E,IAAMC,EAAQD,EAAW,MAAM,qBAAqB,EAEpD,GAAI,CAACC,EAAO,OAAO,KAEnB,IAAMC,EAAQ,WAAWD,EAAM,CAAC,CAAC,EAC3BE,EAAOF,EAAM,CAAC,EAEhBG,EAEJ,OAAQD,EAAM,CACZ,IAAK,KACHC,EAAeF,EACf,MACF,IAAK,KACHE,EAAgBF,EAAQ,OAAO,WAAc,IAC7C,MACF,IAAK,IACHE,EAAgBF,EAAQ,OAAO,WAAc,IAC7C,MACF,QACEE,EAAe,KACf,KACJ,CACA,OAAOA,CACT,ECxBO,IAAMC,EAASC,miCACfC,EAAQF,ECaf,IAAqBG,EAArB,cAAsCC,CAAW,CAAjD,kCASE,UAAO,GAwBP,WAAgB,QAkFP,KAAQ,aAAe,GAlHhC,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CA6CA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,qBAAQ,iBAAiB,iBAAkBC,GAAS,CAC9CA,EAAM,SAAW,MAAM,KAAK,YAAY,CAC9C,GACA,KAAK,kBAAkB,EAEvB,qBAAQ,iBAAiB,SAAU,IAAM,KAAK,kBAAkB,GAChE,qBAAQ,iBAAiB,OAAQ,IAAM,KAAK,kBAAkB,EAChE,CAEA,sBAA6B,CAC3B,MAAM,qBAAqB,EAC3B,qBAAQ,oBAAoB,SAAU,IAAM,KAAK,kBAAkB,GACnE,qBAAQ,iBAAiB,OAAQ,IAAM,KAAK,kBAAkB,EAChE,CAEA,QAAQC,EAAyC,CAC3CA,EAAkB,IAAI,MAAM,GAC9B,KAAK,oBAAoB,EAGvBA,EAAkB,IAAI,OAAO,GAC/B,KAAK,kBAAkB,CAE3B,CAIQ,mBAAoB,C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enB,uBAMAY,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,GApB/Bb,EAqBnB,wBAMAY,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,GA1BnCb,EA2BnB,4BAMAY,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,OAAQ,CAAC,GAhC3Bb,EAiCnB,qBAKiCY,EAAA,CAAhCT,EAAM,gBAAgB,GAtCJH,EAsCc,sBAKCY,EAAA,CAAjCT,EAAM,iBAAiB,GA3CLH,EA2Ce,uBAGlCY,EAAA,CADCE,EAAM,gBAAgB,GA7CJd,EA8CnB,6BAqEiBY,EAAA,CAAhBG,EAAM,GAnHYf,EAmHF,4BAnHEA,EAArBY,EAAA,CADCC,EAAc,WAAW,GACLb",
6
+ "names": ["styleToPixelConverter", "styleValue", "match", "value", "unit", "styleInPixel", "styles", "i", "bl_drawer_default", "BlDrawer", "s", "bl_drawer_default", "event", "changedProperties", "drawerWidth", "styleToPixelConverter", "newWidth", "content", "x", "title", "external_button", "__decorateClass", "e", "i", "t"]
7
+ }
@@ -0,0 +1,65 @@
1
+ import{a as f}from"./chunk-HYBPEELZ.js";import{a as w}from"./chunk-IPYZIIRV.js";import{a as s}from"./chunk-DINNT5P2.js";import{a as l}from"./chunk-GRL4DWKG.js";import{a as b,b as o,c as h,e as n}from"./chunk-5MOOXA2X.js";import{a as p,b as d,f as c}from"./chunk-4OT5AMS5.js";import{d as e}from"./chunk-IZ2LK5GK.js";var D=p`:host{position:relative;display:inline-block}:host([kind=neutral]) bl-popover{--bl-popover-border-color:var(--bl-color-neutral-darker)}:host([kind=success]) bl-popover{--bl-popover-border-color:var(--bl-color-success)}:host([kind=danger]) bl-popover{--bl-popover-border-color:var(--bl-color-danger)}.popover-content{display:flex;flex-direction:column;gap:var(--bl-size-xs)}`,x=D;var v="bl-dropdown",r=class extends c{constructor(){super(...arguments);this._isPopoverOpen=!1;this.variant="primary";this.kind="default";this.size="medium";this.disabled=!1;this.focusedOptionIndex=-1}static get styles(){return[x]}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(){this._popover.target=this._button}get opened(){return this._isPopoverOpen}_handleClick(){!this._isPopoverOpen&&!this.disabled?this.open():this.close()}handleKeyDown(i){if(["ArrowDown","ArrowRight"].includes(i.key))this.focusedOptionIndex++;else if(["ArrowUp","ArrowLeft"].includes(i.key))this.focusedOptionIndex--;else if(i.key==="Escape"){this.focusedOptionIndex=-1,this.close();return}else return;this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.options.length-1)),this.options[this.focusedOptionIndex].focus(),i.preventDefault()}get options(){return[...this.querySelectorAll(u)]}open(){this._isPopoverOpen=!0,this._popover.show(),this.onOpen("Dropdown opened!")}close(){this._isPopoverOpen=!1,this._popover.visible&&this._popover.hide(),this.onClose("Dropdown closed!")}render(){return d`<bl-button
2
+ dropdown
3
+ .active=${this.opened}
4
+ ?disabled=${this.disabled}
5
+ variant="${this.variant}"
6
+ kind="${this.kind}"
7
+ size="${this.size}"
8
+ icon="${s(this.icon)}"
9
+ @bl-click="${this._handleClick}"
10
+ >
11
+ ${this.label}
12
+ </bl-button>
13
+ <bl-popover fit-size placement="bottom-start" @bl-popover-hide="${this.close}"
14
+ ><div class="popover-content">
15
+ <slot></slot></div
16
+ ></bl-popover> `}};e([n("bl-popover")],r.prototype,"_popover",2),e([n("bl-button")],r.prototype,"_button",2),e([h()],r.prototype,"_isPopoverOpen",2),e([o({type:String,reflect:!0})],r.prototype,"label",2),e([o({type:String,reflect:!0})],r.prototype,"variant",2),e([o({type:String,reflect:!0})],r.prototype,"kind",2),e([o({type:String,reflect:!0})],r.prototype,"size",2),e([o({type:Boolean,reflect:!0})],r.prototype,"disabled",2),e([o({type:String,reflect:!0})],r.prototype,"icon",2),e([l("bl-dropdown-open")],r.prototype,"onOpen",2),e([l("bl-dropdown-close")],r.prototype,"onClose",2),r=e([b(v)],r);var C=p`:host{width:100%;--bl-button-display:block;--bl-button-justify:start}`,$=C;var u="bl-dropdown-item",a=class extends c{constructor(){super(...arguments);this.disabled=!1}static get styles(){return[$]}_handleClick(){var i,k;(i=this.BlDropdownField)==null||i.close(),(k=this.BlSplitButtonField)==null||k.close(),this.onClick("Action clicked!")}focus(){this.menuElement.focus()}connectedCallback(){super.connectedCallback(),this.BlDropdownGroupField=this.closest(f),this.BlDropdownField=this.closest(v),this.BlSplitButtonField=this.closest(m),!this.BlDropdownField&&!this.BlDropdownGroupField&&!this.BlSplitButtonField&&console.warn(`bl-dropdown-item is designed to be used inside a ${f}, ${v} or ${m}`,this)}disconnectedCallback(){super.disconnectedCallback()}render(){return d`<bl-button
17
+ variant="tertiary"
18
+ kind="neutral"
19
+ icon="${s(this.icon)}"
20
+ role="menuitem"
21
+ ?disabled="${this.disabled}"
22
+ @bl-click="${this._handleClick}"
23
+ ><slot></slot>
24
+ </bl-button>`}};e([o({type:String})],a.prototype,"icon",2),e([o({type:Boolean,reflect:!0})],a.prototype,"disabled",2),e([l("bl-dropdown-item-click")],a.prototype,"onClick",2),e([n("[role=menuitem]")],a.prototype,"menuElement",2),a=e([b(u)],a);var E=p`:host{position:relative;display:inline-block}:host([kind=neutral]) bl-popover{--bl-popover-border-color:var(--bl-color-neutral-darker)}:host([kind=success]) bl-popover{--bl-popover-border-color:var(--bl-color-success)}:host([kind=danger]) bl-popover{--bl-popover-border-color:var(--bl-color-danger)}.split-button-container{display:flex}.split-main-button{width:100%;--bl-border-radius-m:calc(var(--bl-size-xs) / 2) 0 0 calc(var(--bl-size-xs) / 2)}:host([dir=rtl]) .split-main-button{--bl-border-radius-m:0 calc(var(--bl-size-xs) / 2) calc(var(--bl-size-xs) / 2) 0}.split-main-button:focus{--bl-border-radius-l:calc(var(--bl-size-m) / 2) 0 0 calc(var(--bl-size-m) / 2)}.dropdown-button{--bl-border-radius-m:0 calc(var(--bl-size-xs) / 2) calc(var(--bl-size-xs) / 2) 0}:host([dir=rtl]) .dropdown-button{--bl-border-radius-m:calc(var(--bl-size-xs) / 2) 0 0 calc(var(--bl-size-xs) / 2)}.dropdown-button:focus{--bl-border-radius-l:0 calc(var(--bl-size-m) / 2) calc(var(--bl-size-m) / 2) 0}:host([variant=secondary][dir=rtl]) .dropdown-button{inset-inline-end:-1px}:host([variant=secondary]) .dropdown-button{inset-inline-start:-1px}:host([dropdown-disabled][variant=secondary]) .dropdown-button{inset-inline-start:0}:host([dropdown-disabled][variant=secondary][dir=rtl]) .dropdown-button{inset-inline-end:0}.split-divider{display:block;height:var(--bl-size-2xl);width:1px;background-color:var(--bl-color-neutral-full)}:host([variant=secondary]) .split-divider{display:none}:host([size=small]) .split-divider{height:var(--bl-size-xl)}:host([size=large]) .split-divider{height:var(--bl-size-3xl)}:host([dropdown-disabled][disabled]) .split-divider{display:block;background-color:var(--bl-color-neutral-lighter)}`,_=E;var m="bl-split-button",t=class extends c{constructor(){super(...arguments);this._isPopoverOpen=!1;this.variant="primary";this.kind="default";this.size="medium";this.disabled=!1;this.loading=!1;this.dropdownDisabled=!1;this.target="_self";this.autofocus=!1;this.focusedOptionIndex=-1}static get styles(){return[_]}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),w(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(){this._popover.target=this.trigger,this.dropdownButton.addEventListener("bl-click",i=>i.stopPropagation()),this.mainButton.addEventListener("bl-click",i=>i.stopPropagation())}get opened(){return this._isPopoverOpen}_handleClick(){!this._isPopoverOpen&&!this.dropdownDisabled?this.open():this.close()}_handlePrimaryClick(){this.onClick("Click event fired!")}handleKeyDown(i){if(this._isPopoverOpen&&["ArrowDown","ArrowRight"].includes(i.key))this.focusedOptionIndex++;else if(this._isPopoverOpen&&["ArrowUp","ArrowLeft"].includes(i.key))this.focusedOptionIndex--;else if(this._isPopoverOpen&&i.key==="Escape"){this.focusedOptionIndex=-1,this.close();return}else return;this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.options.length-1)),this.options[this.focusedOptionIndex].focus(),i.preventDefault()}get options(){return[...this.querySelectorAll(u)]}open(){this._isPopoverOpen=!0,this._popover.show(),this.onOpen("Dropdown opened!")}close(){this._isPopoverOpen&&(this._isPopoverOpen=!1,this._popover.visible&&this._popover.hide(),this.onClose("Dropdown closed!"))}render(){return d` <div class="split-button-container" id="split-button-container">
25
+ <bl-button
26
+ id="split-main-button"
27
+ class="split-main-button"
28
+ variant="${this.variant}"
29
+ kind="${this.kind}"
30
+ size="${this.size}"
31
+ loading-label="${s(this.loadingLabel)}"
32
+ icon="${s(this.icon)}"
33
+ href="${s(this.type)}"
34
+ ?disabled="${this.disabled}"
35
+ ?loading="${this.loading}"
36
+ type="${this.type}"
37
+ target="${s(this.target)}"
38
+ form="${s(this.form)}"
39
+ ?autofocus="${this.autofocus}"
40
+ @bl-click="${this._handlePrimaryClick}"
41
+ >
42
+ ${this.label}
43
+ </bl-button>
44
+ <div class="split-divider"></div>
45
+ <bl-button
46
+ id="dropdown-button"
47
+ class="dropdown-button"
48
+ .active="${this.opened}"
49
+ icon="${this.opened?"arrow_up":"arrow_down"}"
50
+ ?disabled="${this.dropdownDisabled}"
51
+ variant="${this.variant}"
52
+ kind="${this.kind}"
53
+ size="${this.size}"
54
+ ?loading="${this.loading}"
55
+ label="split-dropdown-button"
56
+ @bl-click="${this._handleClick}"
57
+ >
58
+ </bl-button>
59
+ <bl-popover fit-size placement="bottom-start" @bl-popover-hide="${this.close}">
60
+ <div class="popover-content">
61
+ <slot></slot>
62
+ </div>
63
+ </bl-popover>
64
+ </div>`}};e([n("#split-button-container")],t.prototype,"trigger",2),e([n("bl-popover")],t.prototype,"_popover",2),e([n("#split-main-button")],t.prototype,"mainButton",2),e([n("#dropdown-button")],t.prototype,"dropdownButton",2),e([h()],t.prototype,"_isPopoverOpen",2),e([o({type:String,reflect:!0})],t.prototype,"label",2),e([o({type:String,reflect:!0})],t.prototype,"variant",2),e([o({type:String,reflect:!0})],t.prototype,"kind",2),e([o({type:String,reflect:!0})],t.prototype,"size",2),e([o({type:String,reflect:!0})],t.prototype,"href",2),e([o({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([o({type:Boolean,reflect:!0})],t.prototype,"loading",2),e([o({type:String,attribute:"loading-label"})],t.prototype,"loadingLabel",2),e([o({attribute:"dropdown-disabled",type:Boolean})],t.prototype,"dropdownDisabled",2),e([o({type:String})],t.prototype,"icon",2),e([o({type:String})],t.prototype,"target",2),e([o({type:String})],t.prototype,"type",2),e([o({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),e([o({type:String})],t.prototype,"form",2),e([l("bl-dropdown-open")],t.prototype,"onOpen",2),e([l("bl-dropdown-close")],t.prototype,"onClose",2),e([l("bl-click")],t.prototype,"onClick",2),t=e([b(m)],t);export{m as a,t as b,u as c,a as d,v as e,r as f};
65
+ //# sourceMappingURL=chunk-NXVLNG4L.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/dropdown/bl-dropdown.css", "../src/components/dropdown/bl-dropdown.ts", "../src/components/dropdown/item/bl-dropdown-item.css", "../src/components/dropdown/item/bl-dropdown-item.ts", "../src/components/split-button/bl-split-button.css", "../src/components/split-button/bl-split-button.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{position:relative;display:inline-block}:host([kind=neutral]) bl-popover{--bl-popover-border-color:var(--bl-color-neutral-darker)}:host([kind=success]) bl-popover{--bl-popover-border-color:var(--bl-color-success)}:host([kind=danger]) bl-popover{--bl-popover-border-color:var(--bl-color-danger)}.popover-content{display:flex;flex-direction:column;gap:var(--bl-size-xs)}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport \"../button/bl-button\";\nimport BlButton, { ButtonKind, ButtonSize, ButtonVariant } from \"../button/bl-button\";\nimport BlPopover from \"../popover/bl-popover\";\nimport style from \"./bl-dropdown.css\";\nimport BlDropdownItem, { blDropdownItemTag } from \"./item/bl-dropdown-item\";\n\nexport const blDropdownTag = \"bl-dropdown\";\n\n/**\n * @tag bl-dropdown\n * @summary Baklava Dropdown component\n */\n@customElement(blDropdownTag)\nexport default class BlDropdown extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query(\"bl-popover\")\n private _popover: BlPopover;\n\n @query(\"bl-button\")\n private _button: BlButton;\n\n @state() private _isPopoverOpen = false;\n\n /**\n * Sets the dropdown button label\n */\n @property({ type: String, reflect: true })\n label: string;\n\n /**\n * Sets the dropdown button variant\n */\n @property({ type: String, reflect: true })\n variant: ButtonVariant = \"primary\";\n\n /**\n * Sets the dropdown button kind\n */\n @property({ type: String, reflect: true })\n kind: ButtonKind = \"default\";\n\n /**\n * Sets the dropdown button size\n */\n @property({ type: String, reflect: true })\n size: ButtonSize = \"medium\";\n\n /**\n * Sets button as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Sets the icon name to be displayed on the left side of the button label\n */\n @property({ type: String, reflect: true })\n icon?: string;\n\n /**\n * Fires when dropdown opened\n */\n @event(\"bl-dropdown-open\") private onOpen: EventDispatcher<string>;\n\n /**\n * Fires when dropdown closed\n */\n @event(\"bl-dropdown-close\") private onClose: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"keydown\", this.handleKeyDown);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"keydown\", this.handleKeyDown);\n }\n\n firstUpdated() {\n // `_button` will be undefined during the initial render.\n // To ensure proper rendering, we set `_popover.target` after the template has been created.\n this._popover.target = this._button;\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n private _handleClick() {\n !this._isPopoverOpen && !this.disabled ? this.open() : this.close();\n }\n\n private focusedOptionIndex = -1;\n\n private handleKeyDown(event: KeyboardEvent) {\n // Next action\n if ([\"ArrowDown\", \"ArrowRight\"].includes(event.key)) {\n this.focusedOptionIndex++;\n\n // Previous action\n } else if ([\"ArrowUp\", \"ArrowLeft\"].includes(event.key)) {\n this.focusedOptionIndex--;\n // Select action\n } else if (event.key === \"Escape\") {\n this.focusedOptionIndex = -1;\n this.close();\n return;\n } else {\n // Other keys are not our interest here\n return;\n }\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.options.length - 1)\n );\n\n this.options[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n }\n\n get options(): BlDropdownItem[] {\n return [...this.querySelectorAll(blDropdownItemTag)];\n }\n\n open() {\n this._isPopoverOpen = true;\n this._popover.show();\n this.onOpen(\"Dropdown opened!\");\n }\n\n close() {\n this._isPopoverOpen = false;\n this._popover.visible && this._popover.hide();\n this.onClose(\"Dropdown closed!\");\n }\n\n render(): TemplateResult {\n return html`<bl-button\n dropdown\n .active=${this.opened}\n ?disabled=${this.disabled}\n variant=\"${this.variant}\"\n kind=\"${this.kind}\"\n size=\"${this.size}\"\n icon=\"${ifDefined(this.icon)}\"\n @bl-click=\"${this._handleClick}\"\n >\n ${this.label}\n </bl-button>\n <bl-popover fit-size placement=\"bottom-start\" @bl-popover-hide=\"${this.close}\"\n ><div class=\"popover-content\">\n <slot></slot></div\n ></bl-popover> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blDropdownTag]: BlDropdown;\n }\n}\n", "import {css} from 'lit';\nexport const styles = css`:host{width:100%;--bl-button-display:block;--bl-button-justify:start}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { event, EventDispatcher } from \"../../../utilities/event\";\nimport \"../../button/bl-button\";\nimport BlButton from \"../../button/bl-button\";\nimport { BaklavaIcon } from \"../../icon/icon-list\";\nimport type BlSplitButton from \"../../split-button/bl-split-button\";\nimport { blSplitButtonTag } from \"../../split-button/bl-split-button\";\nimport type BlDropdown from \"../bl-dropdown\";\nimport { blDropdownTag } from \"../bl-dropdown\";\nimport type BlDropdownGroup from \"../group/bl-dropdown-group\";\nimport { blDropdownGroupTag } from \"../group/bl-dropdown-group\";\nimport style from \"./bl-dropdown-item.css\";\n\nexport const blDropdownItemTag = \"bl-dropdown-item\";\n\n/**\n * @tag bl-dropdown-item\n * @summary Baklava Dropdown Item component\n */\n@customElement(blDropdownItemTag)\nexport default class BlDropdownItem extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the icon name. Shows icon with bl-icon component\n */\n\n @property({ type: String })\n icon?: BaklavaIcon;\n\n /**\n * Sets item as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n @event(\"bl-dropdown-item-click\") private onClick: EventDispatcher<string>;\n\n private _handleClick() {\n this.BlDropdownField?.close();\n this.BlSplitButtonField?.close();\n this.onClick(\"Action clicked!\");\n }\n\n @query(\"[role=menuitem]\") private menuElement: BlButton;\n\n /**\n * Focuses this action\n */\n focus() {\n this.menuElement.focus();\n }\n\n private BlDropdownGroupField: BlDropdownGroup | null;\n private BlDropdownField: BlDropdown | null;\n private BlSplitButtonField: BlSplitButton | null;\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.BlDropdownGroupField = this.closest<BlDropdownGroup>(blDropdownGroupTag);\n this.BlDropdownField = this.closest<BlDropdown>(blDropdownTag);\n this.BlSplitButtonField = this.closest<BlSplitButton>(blSplitButtonTag);\n\n if (!this.BlDropdownField && !this.BlDropdownGroupField && !this.BlSplitButtonField) {\n console.warn(\n `bl-dropdown-item is designed to be used inside a ${blDropdownGroupTag}, ${blDropdownTag} or ${blSplitButtonTag}`,\n this\n );\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n }\n\n render(): TemplateResult {\n return html`<bl-button\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"${ifDefined(this.icon)}\"\n role=\"menuitem\"\n ?disabled=\"${this.disabled}\"\n @bl-click=\"${this._handleClick}\"\n ><slot></slot>\n </bl-button>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blDropdownItemTag]: BlDropdownItem;\n }\n}\n", "import {css} from 'lit';\nexport const styles = css`:host{position:relative;display:inline-block}:host([kind=neutral]) bl-popover{--bl-popover-border-color:var(--bl-color-neutral-darker)}:host([kind=success]) bl-popover{--bl-popover-border-color:var(--bl-color-success)}:host([kind=danger]) bl-popover{--bl-popover-border-color:var(--bl-color-danger)}.split-button-container{display:flex}.split-main-button{width:100%;--bl-border-radius-m:calc(var(--bl-size-xs) / 2) 0 0 calc(var(--bl-size-xs) / 2)}:host([dir=rtl]) .split-main-button{--bl-border-radius-m:0 calc(var(--bl-size-xs) / 2) calc(var(--bl-size-xs) / 2) 0}.split-main-button:focus{--bl-border-radius-l:calc(var(--bl-size-m) / 2) 0 0 calc(var(--bl-size-m) / 2)}.dropdown-button{--bl-border-radius-m:0 calc(var(--bl-size-xs) / 2) calc(var(--bl-size-xs) / 2) 0}:host([dir=rtl]) .dropdown-button{--bl-border-radius-m:calc(var(--bl-size-xs) / 2) 0 0 calc(var(--bl-size-xs) / 2)}.dropdown-button:focus{--bl-border-radius-l:0 calc(var(--bl-size-m) / 2) calc(var(--bl-size-m) / 2) 0}:host([variant=secondary][dir=rtl]) .dropdown-button{inset-inline-end:-1px}:host([variant=secondary]) .dropdown-button{inset-inline-start:-1px}:host([dropdown-disabled][variant=secondary]) .dropdown-button{inset-inline-start:0}:host([dropdown-disabled][variant=secondary][dir=rtl]) .dropdown-button{inset-inline-end:0}.split-divider{display:block;height:var(--bl-size-2xl);width:1px;background-color:var(--bl-color-neutral-full)}:host([variant=secondary]) .split-divider{display:none}:host([size=small]) .split-divider{height:var(--bl-size-xl)}:host([size=large]) .split-divider{height:var(--bl-size-3xl)}:host([dropdown-disabled][disabled]) .split-divider{display:block;background-color:var(--bl-color-neutral-lighter)}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { ReferenceElement } from \"@floating-ui/core\";\nimport { setDirectionProperty } from \"../../utilities/direction\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport \"../button/bl-button\";\nimport BlButton, { ButtonKind, ButtonSize, ButtonVariant, TargetType } from \"../button/bl-button\";\nimport BlDropdownItem, { blDropdownItemTag } from \"../dropdown/item/bl-dropdown-item\";\nimport { BaklavaIcon } from \"../icon/icon-list\";\nimport BlPopover from \"../popover/bl-popover\";\nimport style from \"./bl-split-button.css\";\n\nexport const blSplitButtonTag = \"bl-split-button\";\n\n/**\n * @tag bl-split-button\n * @summary Baklava Split Button component\n */\n\n@customElement(blSplitButtonTag)\nexport default class BlSplitButton extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query(\"#split-button-container\") private trigger: ReferenceElement;\n\n @query(\"bl-popover\")\n private _popover: BlPopover;\n\n @query(\"#split-main-button\")\n private mainButton: BlButton;\n\n @query(\"#dropdown-button\")\n private dropdownButton: BlButton;\n\n @state() private _isPopoverOpen = false;\n\n /**\n * Sets the split button label\n */\n @property({ type: String, reflect: true })\n label: string;\n\n /**\n * Sets the split button variant\n */\n @property({ type: String, reflect: true })\n variant: Exclude<ButtonVariant, \"tertiary\"> = \"primary\";\n\n /**\n * Sets the split button kind\n */\n @property({ type: String, reflect: true })\n kind: ButtonKind = \"default\";\n\n /**\n * Sets the split button size\n */\n @property({ type: String, reflect: true })\n size: ButtonSize = \"medium\";\n\n /**\n * Set link url. If set, split main button will be rendered as anchor tag.\n */\n @property({ type: String, reflect: true })\n href: string;\n\n /**\n * Sets main button as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Sets loading state of button\n */\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n /**\n * Sets the button label for loading status.\n */\n @property({ type: String, attribute: \"loading-label\" })\n loadingLabel: string;\n\n /**\n * Sets dropdown button as disabled\n */\n @property({ attribute: \"dropdown-disabled\", type: Boolean })\n dropdownDisabled = false;\n\n /**\n * Sets the icon name. Shows icon with bl-icon component\n */\n @property({ type: String })\n icon?: BaklavaIcon;\n\n /**\n * Sets the anchor target. Used when `href` is set.\n */\n @property({ type: String })\n target?: TargetType = \"_self\";\n\n /**\n * Sets the type of the button. Set `submit` to use button as the submitter of parent form.\n */\n @property({ type: String })\n type: \"submit\";\n\n /**\n * Sets button to get keyboard focus automatically\n */\n @property({ type: Boolean, reflect: true })\n autofocus = false;\n\n /**\n * Sets the associated form of the button. Use when `type` is set to `submit` and button is not inside the target form.\n */\n @property({ type: String })\n form: HTMLFormElement | string;\n\n /**\n * Fires when dropdown opened\n */\n @event(\"bl-dropdown-open\") private onOpen: EventDispatcher<string>;\n\n /**\n * Fires when dropdown closed\n */\n @event(\"bl-dropdown-close\") private onClose: EventDispatcher<string>;\n\n /**\n * Fires when main button click\n */\n @event(\"bl-click\") private onClick: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"keydown\", this.handleKeyDown);\n\n setDirectionProperty(this);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"keydown\", this.handleKeyDown);\n }\n\n firstUpdated() {\n // To ensure proper rendering, we set `_popover.target` after the template has been created.\n this._popover.target = this.trigger;\n this.dropdownButton.addEventListener(\"bl-click\", e => e.stopPropagation());\n this.mainButton.addEventListener(\"bl-click\", e => e.stopPropagation());\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n private _handleClick() {\n !this._isPopoverOpen && !this.dropdownDisabled ? this.open() : this.close();\n }\n\n private _handlePrimaryClick() {\n this.onClick(\"Click event fired!\");\n }\n\n private focusedOptionIndex = -1;\n\n private handleKeyDown(event: KeyboardEvent) {\n // Next action\n if (this._isPopoverOpen && [\"ArrowDown\", \"ArrowRight\"].includes(event.key)) {\n this.focusedOptionIndex++;\n // Previous action\n } else if (this._isPopoverOpen && [\"ArrowUp\", \"ArrowLeft\"].includes(event.key)) {\n this.focusedOptionIndex--;\n // Select action\n } else if (this._isPopoverOpen && event.key === \"Escape\") {\n this.focusedOptionIndex = -1;\n this.close();\n return;\n } else {\n // Other keys are not our interest here\n return;\n }\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.options.length - 1)\n );\n\n this.options[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n }\n\n get options(): BlDropdownItem[] {\n return [...this.querySelectorAll(blDropdownItemTag)];\n }\n\n open() {\n this._isPopoverOpen = true;\n this._popover.show();\n this.onOpen(\"Dropdown opened!\");\n }\n\n close() {\n if (!this._isPopoverOpen) {\n return;\n }\n\n this._isPopoverOpen = false;\n this._popover.visible && this._popover.hide();\n this.onClose(\"Dropdown closed!\");\n }\n\n render(): TemplateResult {\n return html` <div class=\"split-button-container\" id=\"split-button-container\">\n <bl-button\n id=\"split-main-button\"\n class=\"split-main-button\"\n variant=\"${this.variant}\"\n kind=\"${this.kind}\"\n size=\"${this.size}\"\n loading-label=\"${ifDefined(this.loadingLabel)}\"\n icon=\"${ifDefined(this.icon)}\"\n href=\"${ifDefined(this.type)}\"\n ?disabled=\"${this.disabled}\"\n ?loading=\"${this.loading}\"\n type=\"${this.type}\"\n target=\"${ifDefined(this.target)}\"\n form=\"${ifDefined(this.form)}\"\n ?autofocus=\"${this.autofocus}\"\n @bl-click=\"${this._handlePrimaryClick}\"\n >\n ${this.label}\n </bl-button>\n <div class=\"split-divider\"></div>\n <bl-button\n id=\"dropdown-button\"\n class=\"dropdown-button\"\n .active=\"${this.opened}\"\n icon=\"${this.opened ? \"arrow_up\" : \"arrow_down\"}\"\n ?disabled=\"${this.dropdownDisabled}\"\n variant=\"${this.variant}\"\n kind=\"${this.kind}\"\n size=\"${this.size}\"\n ?loading=\"${this.loading}\"\n label=\"split-dropdown-button\"\n @bl-click=\"${this._handleClick}\"\n >\n </bl-button>\n <bl-popover fit-size placement=\"bottom-start\" @bl-popover-hide=\"${this.close}\">\n <div class=\"popover-content\">\n <slot></slot>\n </div>\n </bl-popover>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blSplitButtonTag]: BlSplitButton;\n }\n}\n"],
5
+ "mappings": "2TACO,IAAMA,EAASC,yXACfC,EAAQF,ECQR,IAAMG,EAAgB,cAORC,EAArB,cAAwCC,CAAW,CAAnD,kCAWW,KAAQ,eAAiB,GAYlC,aAAyB,UAMzB,UAAmB,UAMnB,UAAmB,SAMnB,cAAW,GA0CX,KAAQ,mBAAqB,GAlF7B,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAwDA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,KAAK,iBAAiB,UAAW,KAAK,aAAa,CACrD,CAEA,sBAAuB,CACrB,MAAM,qBAAqB,EAC3B,KAAK,oBAAoB,UAAW,KAAK,aAAa,CACxD,CAEA,cAAe,CAGb,KAAK,SAAS,OAAS,KAAK,OAC9B,CAEA,IAAI,QAAS,CACX,OAAO,KAAK,cACd,CAEQ,cAAe,CACrB,CAAC,KAAK,gBAAkB,CAAC,KAAK,SAAW,KAAK,KAAK,EAAI,KAAK,MAAM,CACpE,CAIQ,cAAcC,EAAsB,CAE1C,GAAI,CAAC,YAAa,YAAY,EAAE,SAASA,EAAM,GAAG,EAChD,KAAK,6BAGI,CAAC,UAAW,WAAW,EAAE,SAASA,EAAM,GAAG,EACpD,KAAK,6BAEIA,EAAM,MAAQ,SAAU,CACjC,KAAK,mBAAqB,GAC1B,KAAK,MAAM,EACX,WAGA,QAIF,KAAK,mBAAqB,KAAK,IAC7B,EACA,KAAK,IAAI,KAAK,mBAAoB,KAAK,QAAQ,OAAS,CAAC,CA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AAmB,GA9GPL,EA8GiB,uBAKTS,EAAA,CAA1BJ,EAAM,UAAU,GAnHEL,EAmHQ,uBAnHRA,EAArBS,EAAA,CADCL,EAAcL,CAAgB,GACVC",
6
+ "names": ["styles", "i", "bl_dropdown_default", "blDropdownTag", "BlDropdown", "s", "bl_dropdown_default", "event", "blDropdownItemTag", "x", "l", "__decorateClass", "i", "t", "e", "styles", "i", "bl_dropdown_item_default", "blDropdownItemTag", "BlDropdownItem", "s", "bl_dropdown_item_default", "_a", "_b", "blDropdownGroupTag", "blDropdownTag", "blSplitButtonTag", "x", "l", "__decorateClass", "e", "event", "i", "styles", "i", "bl_split_button_default", "blSplitButtonTag", "BlSplitButton", "s", "bl_split_button_default", "setDirectionProperty", "e", "event", "blDropdownItemTag", "x", "l", "__decorateClass", "i", "t"]
7
+ }
@@ -0,0 +1,32 @@
1
+ import{a as x}from"./chunk-6LT7O7T2.js";import{a as h}from"./chunk-GRL4DWKG.js";import{a as y,b as d,e as c}from"./chunk-5MOOXA2X.js";import{a as m,b as a,f as w}from"./chunk-4OT5AMS5.js";import{d as o}from"./chunk-IZ2LK5GK.js";var E=m`:host{display:contents}.container{--background-color:var(--bl-color-neutral-full);display:flex;flex-direction:column;background:var(--background-color);width:var(--bl-dialog-width,auto);max-width:calc(100vw - var(--bl-size-4xl));max-height:calc(100vh - var(--bl-size-4xl));min-width:424px;padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog,.dialog-polyfill .container{padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog-polyfill .container{position:fixed;z-index:var(--bl-index-dialog)}.dialog::backdrop{background-color:#273142b3}.dialog-polyfill{display:none;position:fixed;inset-inline-start:0;top:0;width:100vw;height:100vh;align-items:center;justify-content:center;z-index:var(--bl-index-dialog);background-color:#273142b3}:host([open]) .dialog-polyfill{display:flex}header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl)}header bl-button{margin-inline-start:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-neutral-darker);overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--bl-dialog-caption-line-clamp,1);margin:0;padding:0}.content{padding:var(--bl-size-xl);overflow:auto}:host([critical]) .content{padding-top:0}.container.has-footer .content{padding-bottom:0}footer{padding:var(--bl-size-xl);display:flex;flex-flow:row-reverse wrap;gap:var(--bl-size-m)}footer.shadow{box-shadow:0 -4px 15px #27314226}@media only screen and (max-width:471px){.container{max-width:calc(100vw - var(--bl-size-2xl));max-height:calc(100vh - var(--bl-size-2xl));min-width:auto;min-height:auto}footer{flex-flow:column wrap}}::slotted(bl-tab-group){display:block;transform:translateX(calc(var(--bl-size-xl) * -1));width:calc(100% + calc(var(--bl-size-xl) * 2))}`,k=E;var t=class extends w{constructor(){super(...arguments);this.open=!1;this.critical=!1;this.polyfilled=!0;this.clickOutsideHandler=e=>{if(this.critical)return;e.composedPath().includes(this.container)||this.closeDialog("backdrop")};this.onKeydown=e=>{e.code==="Escape"&&this.open&&!this.critical&&(e.preventDefault(),this.closeDialog("keyboard"))};this.toggleFooterShadow=()=>{var l,n,s,p,v,g,f;let e=(l=this.content)==null?void 0:l.scrollTop,i=(n=this.content)==null?void 0:n.scrollHeight,r=(s=this.content)==null?void 0:s.clientHeight;e+r>=i?(v=(p=this.footer)==null?void 0:p.classList)==null||v.remove("shadow"):(f=(g=this.footer)==null?void 0:g.classList)==null||f.add("shadow")}}static get styles(){return[k]}updated(e){(e.has("open")||e.has("polyfilled"))&&this.toggleDialogHandler()}get _hasFooter(){return[...this.childNodes].some(e=>e.nodeName==="BL-BUTTON")}toggleDialogHandler(){var e,i,r,l,n,s;this.open?((i=(e=this.dialog)==null?void 0:e.showModal)==null||i.call(e),this.onOpen({isOpen:!0}),document.body.style.overflow="hidden",this.toggleFooterShadow(),window==null||window.addEventListener("keydown",p=>this.onKeydown(p)),window==null||window.addEventListener("resize",this.toggleFooterShadow),(r=this.content)==null||r.addEventListener("scroll",this.toggleFooterShadow)):((n=(l=this.dialog)==null?void 0:l.close)==null||n.call(l),this.onClose({isOpen:!1},{bubbles:!1}),document.body.style.overflow="auto",window==null||window.removeEventListener("keydown",this.onKeydown),window==null||window.removeEventListener("resize",this.toggleFooterShadow),(s=this.content)==null||s.removeEventListener("scroll",this.toggleFooterShadow))}closeDialog(e){this.onRequestClose({source:e},{cancelable:!0}).defaultPrevented||(this.open=!1)}renderFooter(){return this._hasFooter?a`<footer>
2
+ <slot name="primary-action"></slot>
3
+ <slot name="secondary-action"></slot>
4
+ <slot name="tertiary-action"></slot>
5
+ </footer>`:""}renderContainer(){let e=this.caption?a`<h2 id="dialog-caption">${this.caption}</h2>`:"",i=this.critical?null:a`<bl-button
6
+ @click="${()=>this.closeDialog("close-button")}"
7
+ icon="close"
8
+ label="close"
9
+ variant="tertiary"
10
+ kind="neutral"
11
+ size="small"
12
+ ></bl-button>`,r={container:!0,"has-footer":this._hasFooter};return a` <div class="${x(r)}">
13
+ <header>${e} ${i}</header>
14
+ <section class="content"><slot></slot></section>
15
+ ${this.renderFooter()}
16
+ </div>`}render(){return this.polyfilled||!window.HTMLDialogElement?a`<div
17
+ class="dialog-polyfill"
18
+ role="dialog"
19
+ aria-labelledby="dialog-caption"
20
+ @click=${this.clickOutsideHandler}
21
+ >
22
+ ${this.renderContainer()}
23
+ </div>`:a`
24
+ <dialog
25
+ class="dialog"
26
+ aria-labelledby="dialog-caption"
27
+ @click=${this.clickOutsideHandler}
28
+ >
29
+ ${this.renderContainer()}
30
+ </dialog>
31
+ `}};o([d({type:Boolean,reflect:!0,hasChanged(b,u){return b===!1&&u===void 0?!1:b!==u}})],t.prototype,"open",2),o([d({type:String})],t.prototype,"caption",2),o([d({type:Boolean,reflect:!0})],t.prototype,"critical",2),o([d({type:Boolean,reflect:!0})],t.prototype,"polyfilled",2),o([c(".dialog")],t.prototype,"dialog",2),o([c("footer")],t.prototype,"footer",2),o([c(".container")],t.prototype,"container",2),o([c(".content")],t.prototype,"content",2),o([h("bl-dialog-open")],t.prototype,"onOpen",2),o([h("bl-dialog-request-close")],t.prototype,"onRequestClose",2),o([h("bl-dialog-close")],t.prototype,"onClose",2),t=o([y("bl-dialog")],t);export{t as a};
32
+ //# sourceMappingURL=chunk-OXHRXOBD.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/dialog/bl-dialog.css", "../src/components/dialog/bl-dialog.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:contents}.container{--background-color:var(--bl-color-neutral-full);display:flex;flex-direction:column;background:var(--background-color);width:var(--bl-dialog-width,auto);max-width:calc(100vw - var(--bl-size-4xl));max-height:calc(100vh - var(--bl-size-4xl));min-width:424px;padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog,.dialog-polyfill .container{padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog-polyfill .container{position:fixed;z-index:var(--bl-index-dialog)}.dialog::backdrop{background-color:#273142b3}.dialog-polyfill{display:none;position:fixed;inset-inline-start:0;top:0;width:100vw;height:100vh;align-items:center;justify-content:center;z-index:var(--bl-index-dialog);background-color:#273142b3}:host([open]) .dialog-polyfill{display:flex}header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl)}header bl-button{margin-inline-start:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-neutral-darker);overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--bl-dialog-caption-line-clamp,1);margin:0;padding:0}.content{padding:var(--bl-size-xl);overflow:auto}:host([critical]) .content{padding-top:0}.container.has-footer .content{padding-bottom:0}footer{padding:var(--bl-size-xl);display:flex;flex-flow:row-reverse wrap;gap:var(--bl-size-m)}footer.shadow{box-shadow:0 -4px 15px #27314226}@media only screen and (max-width:471px){.container{max-width:calc(100vw - var(--bl-size-2xl));max-height:calc(100vh - var(--bl-size-2xl));min-width:auto;min-height:auto}footer{flex-flow:column wrap}}::slotted(bl-tab-group){display:block;transform:translateX(calc(var(--bl-size-xl) * -1));width:calc(100% + calc(var(--bl-size-xl) * 2))}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport \"../button/bl-button\";\nimport style from \"./bl-dialog.css\";\n\ntype DialogElement = {\n showModal: () => void;\n close: () => void;\n};\n\n/**\n * @tag bl-dialog\n * @summary Baklava Dialog component\n *\n * @cssproperty [--bl-dialog-width=auto] Sets the width of the dialog content\n * @cssproperty [--bl-dialog-caption-line-clamp=1] Sets the line clamp of the caption\n */\n@customElement(\"bl-dialog\")\nexport default class BlDialog extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets dialog open-close status\n */\n @property({\n type: Boolean,\n reflect: true,\n hasChanged(newVal: boolean, oldVal: boolean | undefined) {\n if (newVal === false && oldVal === undefined) {\n // Assume that the initial value is false\n return false;\n }\n return newVal !== oldVal;\n },\n })\n open = false;\n\n /**\n * Sets the dialog title\n */\n @property({ type: String })\n caption?: string;\n\n /**\n * Determines if the dialog is critical, which disables closing through keyboard, backdrop, and close button interactions.\n */\n @property({ type: Boolean, reflect: true })\n critical = false;\n\n /**\n * Determines if dialog currently uses polyfilled version instead of native HTML Dialog. By\n * default, it uses native Dialog if the browser supports it, otherwise polyfills. You can force\n * using polyfill by setting this to true in some cases like to show some content on top of dialog\n * in case you are not able to use Popover API. Be aware that, polyfilled version can cause some\n * inconsistencies in terms of accessibility and stacking context. So use it with extra caution.\n *\n * As of the current implementation, you can render above the dialog HTML element using the Popover API. However,\n * it will block any actions on the Popover element. This issue was encountered during the development of the `bl-notification` component.\n * As a result, we decided to enable the polyfill for the `bl-dialog` component by default. If you prefer to use the native dialog, you can set\n * this property to false. Please note, doing so will cause notifications to render under the dialog backdrop.\n * For more information, refer to the comment linked below:\n *\n * https://github.com/Trendyol/baklava/issues/141#issuecomment-1810301413\n */\n @property({ type: Boolean, reflect: true })\n polyfilled = true;\n\n @query(\".dialog\")\n private dialog: HTMLDialogElement & DialogElement;\n\n @query(\"footer\")\n private footer: HTMLElement;\n\n @query(\".container\")\n private container: HTMLElement;\n\n @query(\".content\")\n private content: HTMLElement;\n\n /**\n * Fires when the dialog is opened\n */\n @event(\"bl-dialog-open\") private onOpen: EventDispatcher<object>;\n\n /**\n * Fires before the dialog is closed with internal actions like clicking close button,\n * pressing Escape key or clicking backdrop. Can be prevented by calling `event.preventDefault()`\n */\n @event(\"bl-dialog-request-close\") private onRequestClose: EventDispatcher<{\n source: \"close-button\" | \"keyboard\" | \"backdrop\";\n }>;\n\n /**\n * Fires when the dialog is closed\n */\n @event(\"bl-dialog-close\") private onClose: EventDispatcher<object>;\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has(\"open\") || changedProperties.has(\"polyfilled\")) {\n this.toggleDialogHandler();\n }\n }\n\n private get _hasFooter() {\n return [...this.childNodes].some(node => node.nodeName === \"BL-BUTTON\");\n }\n\n private toggleDialogHandler() {\n if (this.open) {\n this.dialog?.showModal?.();\n this.onOpen({ isOpen: true });\n document.body.style.overflow = \"hidden\";\n this.toggleFooterShadow();\n window?.addEventListener(\"keydown\", event => this.onKeydown(event));\n window?.addEventListener(\"resize\", this.toggleFooterShadow);\n this.content?.addEventListener(\"scroll\", this.toggleFooterShadow);\n } else {\n this.dialog?.close?.();\n this.onClose({ isOpen: false }, { bubbles: false });\n document.body.style.overflow = \"auto\";\n window?.removeEventListener(\"keydown\", this.onKeydown);\n window?.removeEventListener(\"resize\", this.toggleFooterShadow);\n this.content?.removeEventListener(\"scroll\", this.toggleFooterShadow);\n }\n }\n\n private closeDialog(source: \"close-button\" | \"keyboard\" | \"backdrop\") {\n const requestCloseEvent = this.onRequestClose({ source }, { cancelable: true });\n\n if (requestCloseEvent.defaultPrevented) {\n return;\n }\n\n this.open = false;\n }\n\n private clickOutsideHandler = (event: MouseEvent) => {\n if (this.critical) return;\n\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath.includes(this.container)) {\n this.closeDialog(\"backdrop\");\n }\n };\n\n private onKeydown = (event: KeyboardEvent): void => {\n if (event.code === \"Escape\" && this.open && !this.critical) {\n event.preventDefault();\n this.closeDialog(\"keyboard\");\n }\n };\n\n private toggleFooterShadow = () => {\n const scrollTop = this.content?.scrollTop;\n const scrollHeight = this.content?.scrollHeight;\n const clientHeight = this.content?.clientHeight;\n\n if (scrollTop + clientHeight >= scrollHeight) {\n this.footer?.classList?.remove(\"shadow\");\n } else {\n this.footer?.classList?.add(\"shadow\");\n }\n };\n\n private renderFooter() {\n return this._hasFooter\n ? html`<footer>\n <slot name=\"primary-action\"></slot>\n <slot name=\"secondary-action\"></slot>\n <slot name=\"tertiary-action\"></slot>\n </footer>`\n : \"\";\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"dialog-caption\">${this.caption}</h2>` : \"\";\n const closeButton = !this.critical\n ? html`<bl-button\n @click=\"${() => this.closeDialog(\"close-button\")}\"\n icon=\"close\"\n label=\"close\"\n variant=\"tertiary\"\n kind=\"neutral\"\n size=\"small\"\n ></bl-button>`\n : null;\n\n const classes = {\n \"container\": true,\n \"has-footer\": this._hasFooter,\n };\n\n return html` <div class=\"${classMap(classes)}\">\n <header>${title} ${closeButton}</header>\n <section class=\"content\"><slot></slot></section>\n ${this.renderFooter()}\n </div>`;\n }\n\n render(): TemplateResult {\n return this.polyfilled || !window.HTMLDialogElement\n ? html`<div\n class=\"dialog-polyfill\"\n role=\"dialog\"\n aria-labelledby=\"dialog-caption\"\n @click=${this.clickOutsideHandler}\n >\n ${this.renderContainer()}\n </div>`\n : html`\n <dialog\n class=\"dialog\"\n aria-labelledby=\"dialog-caption\"\n @click=${this.clickOutsideHandler}\n >\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;AAAA;AAAA,mBAIW,KAAK;AAAA;AAAA,YAEZ,KAAK,gBAAgB;AAAA,gBAEzBA;AAAA;AAAA;AAAA;AAAA,qBAIa,KAAK;AAAA;AAAA,cAEZ,KAAK,gBAAgB;AAAA;AAAA,SAGjC,CACF,EAzLEK,EAAA,CAXCC,EAAS,CACR,KAAM,QACN,QAAS,GACT,WAAWC,EAAiBC,EAA6B,CACvD,OAAID,IAAW,IAASC,IAAW,OAE1B,GAEFD,IAAWC,CACpB,CACF,CAAC,GAlBkBzB,EAmBnB,oBAMAsB,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAxBPvB,EAyBnB,uBAMAsB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA9BvBvB,EA+BnB,wBAkBAsB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAhDvBvB,EAiDnB,0BAGQsB,EAAA,CADPI,EAAM,SAAS,GAnDG1B,EAoDX,sBAGAsB,EAAA,CADPI,EAAM,QAAQ,GAtDI1B,EAuDX,sBAGAsB,EAAA,CADPI,EAAM,YAAY,GAzDA1B,EA0DX,yBAGAsB,EAAA,CADPI,EAAM,UAAU,GA5DE1B,EA6DX,uBAKyBsB,EAAA,CAAhCpB,EAAM,gBAAgB,GAlEJF,EAkEc,sBAMSsB,EAAA,CAAzCpB,EAAM,yBAAyB,GAxEbF,EAwEuB,8BAORsB,EAAA,CAAjCpB,EAAM,iBAAiB,GA/ELF,EA+Ee,uBA/EfA,EAArBsB,EAAA,CADCC,EAAc,WAAW,GACLvB",
6
+ "names": ["styles", "i", "bl_dialog_default", "BlDialog", "s", "event", "_a", "_b", "_c", "_d", "_e", "_f", "_g", "scrollTop", "scrollHeight", "clientHeight", "bl_dialog_default", "changedProperties", "node", "source", "x", "title", "closeButton", "classes", "o", "__decorateClass", "e", "newVal", "oldVal", "i"]
7
+ }
@@ -1,4 +1,4 @@
1
- import{a as m}from"./chunk-JAZGOWKA.js";import{a as u}from"./chunk-DINNT5P2.js";import{a as b,b as p}from"./chunk-5MOOXA2X.js";import{a as d,b as i,f as h}from"./chunk-4OT5AMS5.js";import{d as a}from"./chunk-IZ2LK5GK.js";var x=d`:host{--header-cell-width:var(--bl-table-header-cell-width, auto);--header-cell-min-width:var(--bl-table-header-cell-min-width, auto);display:table-cell;border:1px solid var(--bl-color-neutral-lighter);background-color:var(--bl-color-neutral-lightest);padding:var(--bl-size-m);font:var(--bl-font-title-3-medium);color:var(--bl-color-neutral-darker);box-sizing:border-box;vertical-align:middle;white-space:normal;width:var(--header-cell-width);min-width:var(--header-cell-min-width);background-clip:padding-box}.table-header-cell{display:flex;align-items:center}.table-header-cell.shadow-right::before{content:"";position:absolute;inset-inline-end:-1px;top:0;width:16px;height:100%;z-index:-1;border-inline-end:1px solid var(--bl-color-neutral-lighter);box-shadow:calc(8px * var(--bl-text-x-direction)) 0 16px 0 rgb(39 49 66 / 10%)}.table-header-cell.shadow-left::before{content:"";position:absolute;inset-inline-start:-1px;top:0;width:16px;height:100%;z-index:-1;border-inline-start:1px solid var(--bl-color-neutral-lighter);box-shadow:calc(-8px * var(--bl-text-x-direction)) 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-inline-end:var(--bl-size-m)}.sort-icons-wrapper{all:unset;width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--bl-size-4xs);cursor:pointer}.sort-icons-wrapper:focus-visible{outline:2px solid var(--bl-color-primary);outline-offset:2px;border-radius:var(--bl-border-radius-xs)}.sort-icons-wrapper bl-icon{font-size:var(--bl-font-size-m);color:var(--bl-color-neutral-darker)}`,g=x;var f="bl-table-header-cell",r=class extends h{constructor(){super(...arguments);this.sortKey=""}static get styles(){return[g]}get _table(){return this.closest("bl-table")}get _tableRow(){return this.closest("bl-table-row")}get selectable(){var e;return this.index===0&&!!((e=this._table)!=null&&e.isSelectable(!0))}get sortable(){var e;return!!((e=this._table)!=null&&e.sortable)&&!!this.sortKey}get index(){let e=this.parentNode;return e?[...e.children].indexOf(this):-1}get checked(){var e;return!!((e=this._table)!=null&&e.isAllSelected())}get indeterminate(){var e;return!!((e=this._table)!=null&&e.isAnySelected())}get isAllUnselectedDisabled(){var e;return!!((e=this._table)!=null&&e.isAllUnselectedDisabled())}get sortDirection(){var e,t;return((e=this._table)==null?void 0:e.sortKey)===this.sortKey&&((t=this._table)==null?void 0:t.sortDirection)||""}get sortIconName(){return this.sortDirection==="asc"?"sorting_asc":this.sortDirection==="desc"?"sorting_desc":"sorting"}get shadowRight(){var e;return!!((e=this._tableRow)!=null&&e.stickyFirstColumn)&&this.index===0}get shadowLeft(){var e;return!!((e=this._tableRow)!=null&&e.stickyLastColumn)&&this.nextElementSibling===null}connectedCallback(){super.connectedCallback(),this.closest(m)||console.warn("bl-table-header-cell is designed to be used inside a bl-table-row",this)}onChange(e){var o,l;let t=(o=this.shadowRoot)==null?void 0:o.querySelector(".select-all");if(e.detail&&this.isAllUnselectedDisabled){setTimeout(()=>{var c;let s=(c=t==null?void 0:t.shadowRoot)==null?void 0:c.querySelector("input");s==null||s.click()},0);return}(l=this._table)==null||l.onSelectionChange(!0,e.detail,""),setTimeout(()=>{t.checked=this.checked,t.indeterminate=this.indeterminate})}onSort(){var t;let e="asc";this.sortDirection==="asc"?e="desc":this.sortDirection==="desc"&&(e=""),(t=this._table)==null||t.onSortChange(this.sortKey,e)}_renderCheckbox(){return this.selectable?i`<bl-checkbox
1
+ import{a as m}from"./chunk-LEAVDIGF.js";import{a as u}from"./chunk-DINNT5P2.js";import{a as b,b as p}from"./chunk-5MOOXA2X.js";import{a as d,b as i,f as h}from"./chunk-4OT5AMS5.js";import{d as a}from"./chunk-IZ2LK5GK.js";var x=d`:host{--header-cell-width:var(--bl-table-header-cell-width, auto);--header-cell-min-width:var(--bl-table-header-cell-min-width, auto);display:table-cell;border:1px solid var(--bl-color-neutral-lighter);background-color:var(--bl-color-neutral-lightest);padding:var(--bl-size-m);font:var(--bl-font-title-3-medium);color:var(--bl-color-neutral-darker);box-sizing:border-box;vertical-align:middle;white-space:normal;width:var(--header-cell-width);min-width:var(--header-cell-min-width);background-clip:padding-box}.table-header-cell{display:flex;align-items:center}.table-header-cell.shadow-right::before{content:"";position:absolute;inset-inline-end:-1px;top:0;width:16px;height:100%;z-index:-1;border-inline-end:1px solid var(--bl-color-neutral-lighter);box-shadow:calc(8px * var(--bl-text-x-direction)) 0 16px 0 rgb(39 49 66 / 10%)}.table-header-cell.shadow-left::before{content:"";position:absolute;inset-inline-start:-1px;top:0;width:16px;height:100%;z-index:-1;border-inline-start:1px solid var(--bl-color-neutral-lighter);box-shadow:calc(-8px * var(--bl-text-x-direction)) 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-inline-end:var(--bl-size-m)}.sort-icons-wrapper{all:unset;width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--bl-size-4xs);cursor:pointer}.sort-icons-wrapper:focus-visible{outline:2px solid var(--bl-color-primary);outline-offset:2px;border-radius:var(--bl-border-radius-xs)}.sort-icons-wrapper bl-icon{font-size:var(--bl-font-size-m);color:var(--bl-color-neutral-darker)}`,g=x;var f="bl-table-header-cell",r=class extends h{constructor(){super(...arguments);this.sortKey=""}static get styles(){return[g]}get _table(){return this.closest("bl-table")}get _tableRow(){return this.closest("bl-table-row")}get selectable(){var e;return this.index===0&&!!((e=this._table)!=null&&e.isSelectable(!0))}get sortable(){var e;return!!((e=this._table)!=null&&e.sortable)&&!!this.sortKey}get index(){let e=this.parentNode;return e?[...e.children].indexOf(this):-1}get checked(){var e;return!!((e=this._table)!=null&&e.isAllSelected())}get indeterminate(){var e;return!!((e=this._table)!=null&&e.isAnySelected())}get isAllUnselectedDisabled(){var e;return!!((e=this._table)!=null&&e.isAllUnselectedDisabled())}get sortDirection(){var e,t;return((e=this._table)==null?void 0:e.sortKey)===this.sortKey&&((t=this._table)==null?void 0:t.sortDirection)||""}get sortIconName(){return this.sortDirection==="asc"?"sorting_asc":this.sortDirection==="desc"?"sorting_desc":"sorting"}get shadowRight(){var e;return!!((e=this._tableRow)!=null&&e.stickyFirstColumn)&&this.index===0}get shadowLeft(){var e;return!!((e=this._tableRow)!=null&&e.stickyLastColumn)&&this.nextElementSibling===null}connectedCallback(){super.connectedCallback(),this.closest(m)||console.warn("bl-table-header-cell is designed to be used inside a bl-table-row",this)}onChange(e){var o,l;let t=(o=this.shadowRoot)==null?void 0:o.querySelector(".select-all");if(e.detail&&this.isAllUnselectedDisabled){setTimeout(()=>{var c;let s=(c=t==null?void 0:t.shadowRoot)==null?void 0:c.querySelector("input");s==null||s.click()},0);return}(l=this._table)==null||l.onSelectionChange(!0,e.detail,""),setTimeout(()=>{t.checked=this.checked,t.indeterminate=this.indeterminate})}onSort(){var t;let e="asc";this.sortDirection==="asc"?e="desc":this.sortDirection==="desc"&&(e=""),(t=this._table)==null||t.onSortChange(this.sortKey,e)}_renderCheckbox(){return this.selectable?i`<bl-checkbox
2
2
  class="select-all"
3
3
  value="all"
4
4
  .indeterminate="${this.indeterminate}"
@@ -13,4 +13,4 @@ import{a as m}from"./chunk-JAZGOWKA.js";import{a as u}from"./chunk-DINNT5P2.js";
13
13
  </button>`:i` <slot></slot>`;return i`<div class="table-header-cell ${o}" aria-sort=${u(n)}>
14
14
  ${this._renderCheckbox()} ${l}
15
15
  </div> `}};a([p({type:String,reflect:!0,attribute:"sort-key"})],r.prototype,"sortKey",2),r=a([b(f)],r);export{f as a,r as b};
16
- //# sourceMappingURL=chunk-CAIHRZ24.js.map
16
+ //# sourceMappingURL=chunk-Q5D7W6YP.js.map
@@ -0,0 +1,50 @@
1
+ import{a as g}from"./chunk-KJUZJAHW.js";import{a as f}from"./chunk-GRL4DWKG.js";import{a as b,b as r,c,e as _}from"./chunk-5MOOXA2X.js";import{a as m,b as p}from"./chunk-4OT5AMS5.js";import{d as o}from"./chunk-IZ2LK5GK.js";var D=m`:host{width:314px;display:block}.datepicker-content{--bl-input-cursor:pointer;--icon-size:var(--line-height);--icon-color:var(--bl-color-neutral-light);width:100%;position:relative;display:grid}.datepicker-input{width:var(--bl-datepicker-input-width,auto);white-space:nowrap;text-overflow:ellipsis}.icon-container{display:flex;gap:var(--bl-size-3xs);align-items:center}.calendar-icon{display:flex;align-items:center;gap:var(--icon-gap);flex-basis:var(--icon-size);align-self:center;margin-right:var(--label-padding);font-size:var(--icon-size);color:var(--icon-color);height:var(--icon-size)}.action-divider{display:block;height:var(--bl-size-m);width:1px;background-color:var(--bl-color-neutral-lighter);margin-right:var(--bl-size-3xs)}bl-popover{--bl-popover-padding:0;--bl-popover-background-color:transparent}`,E=D;var i=class extends g{constructor(){super(...arguments);this.size="medium";this.labelFixed=!1;this.valueFormatter=null;this._inputValue="";this._floatingDateCount=0;this._fittingDateCount=0}static get styles(){return[E]}defaultInputValueFormatter(){var t,e,n,l,a,s,d,u;if(this.type==="single")this._inputValue=this.formatDate((t=this._calendarEl)==null?void 0:t._dates[0]),this.closePopoverWithTimeout();else if(this.type==="multiple"){this.setFloatingDates();let h=(e=this._calendarEl)==null?void 0:e._dates.slice(0,this._fittingDateCount).map(v=>this.formatDate(v));this._inputValue=h.join(",")+(this._floatingDateCount>0?" ,...":"")}else this.type==="range"&&((n=this._calendarEl)!=null&&n._dates[0]&&(this._inputValue=this.formatDate((l=this._calendarEl)==null?void 0:l._dates[0])),(a=this._calendarEl)!=null&&a._dates[1]&&(this._inputValue=`${this._inputValue}-${this.formatDate((s=this._calendarEl)==null?void 0:s._dates[1])}`),(d=this._calendarEl)!=null&&d._dates[0]&&((u=this._calendarEl)!=null&&u._dates[1])&&this.closePopoverWithTimeout())}closePopoverWithTimeout(){setTimeout(()=>{this.closePopover(),this._inputEl.blur()},200)}setFloatingDates(){var l,a,s;let t=(l=this.shadowRoot)==null?void 0:l.getElementById("datepicker-input"),e=(a=this.shadowRoot)==null?void 0:a.getElementById("icon-container"),n=t.offsetWidth-e.offsetWidth;this._fittingDateCount=Math.floor(n/90),this._floatingDateCount=((s=this._calendarEl)==null?void 0:s._dates.length)-this._fittingDateCount}setDatePickerInput(){var t,e;(t=this._calendarEl)!=null&&t._dates.length?this.valueFormatter?this._inputValue=this.valueFormatter((e=this._calendarEl)==null?void 0:e._dates):this.defaultInputValueFormatter():this._inputValue=""}formatDate(t){return`${String(t==null?void 0:t.getDate()).padStart(2,"0")}/${String((t==null?void 0:t.getMonth())+1).padStart(2,"0")}/${t==null?void 0:t.getFullYear()}`}clearDatepicker(){this._calendarEl.handleClearSelectedDates(),this._inputValue="",this._floatingDateCount=0}openPopover(){this._popoverEl.target=this._inputEl,this._popoverEl.show()}closePopover(){this._popoverEl.hide()}_togglePopover(){this._popoverEl.visible?this.closePopover():this.openPopover()}formatAdditionalDates(t){let e=t.split(",");return e==null?void 0:e.reduce((n,l,a)=>(a>0&&a%3===0&&n.push(p`<br />`),n.push(p`<span>${l.trim()}${a<e.length-1?", ":""}</span>`),n),[])}async firstUpdated(){var t,e,n;this._onCalendarMouseDown=l=>{var a;l.preventDefault(),(a=this._inputEl)==null||a.focus()},this._onInputMouseDown=l=>{var a;l.preventDefault(),(a=this._inputEl)==null||a.focus()},(t=this._calendarEl)==null||t.addEventListener("mousedown",this._onCalendarMouseDown),(e=this._inputEl)==null||e.addEventListener("mousedown",this._onInputMouseDown),(n=this._calendarEl)!=null&&n._dates&&this.setDatePickerInput()}onCalendarChange(){var t;this.setDatePickerInput(),this._onBlDatepickerChange((t=this._calendarEl)==null?void 0:t._dates)}disconnectedCallback(){var t,e;super.disconnectedCallback(),(t=this._calendarEl)==null||t.removeEventListener("mousedown",this._onCalendarMouseDown),(e=this._inputEl)==null||e.removeEventListener("mousedown",this._onInputMouseDown)}render(){var s,d,u,h;let t=p`
2
+ <bl-popover target="datepicker-content" placement="bottom-start">
3
+ <bl-calendar
4
+ type=${this.type}
5
+ .minDate=${this.minDate}
6
+ .maxDate=${this.maxDate}
7
+ .startOfWeek=${this.startOfWeek}
8
+ .disabledDates=${this.disabledDates}
9
+ .value=${this.value}
10
+ .locale=${this.locale}
11
+ @bl-calendar-change="${this.onCalendarChange}"
12
+ ></bl-calendar>
13
+ </bl-popover>
14
+ `,e=(u=(d=(s=this._calendarEl)==null?void 0:s._dates)==null?void 0:d.slice(this._fittingDateCount).map(v=>this.formatDate(v)).join(","))!=null?u:"",n=this.formatAdditionalDates(e),l=this._floatingDateCount>0?p` <bl-tooltip>
15
+ <span slot="tooltip-trigger">+${this._floatingDateCount}</span>
16
+ <div>${n}</div>
17
+ </bl-tooltip>`:"",a=((h=this._calendarEl)==null?void 0:h._dates.length)>0?p` <bl-button
18
+ size="small"
19
+ variant="tertiary"
20
+ kind="neutral"
21
+ icon="close"
22
+ @click=${this.clearDatepicker}
23
+ ></bl-button>
24
+ <div class="action-divider"></div>`:"";return p`
25
+ <div class="datepicker-content" id="datepicker-content" tabindex="-1">
26
+ <bl-input
27
+ .value="${this._inputValue}"
28
+ .label="${this.label}"
29
+ placeholder="${this.placeholder}"
30
+ class="datepicker-input"
31
+ role="button"
32
+ id="datepicker-input"
33
+ aria-haspopup="listbox"
34
+ aria-labelledby="label"
35
+ @click=${this._togglePopover}
36
+ help-text=${this.helpText}
37
+ ?disabled=${this.disabled}
38
+ .size=${this.size}
39
+ .labelFixed=${this.labelFixed}
40
+ readonly
41
+ >
42
+ <div slot="icon" class="icon-container" id="icon-container">
43
+ ${l} ${a}
44
+ <bl-icon name="calendar" size="small" class="calendar-icon"></bl-icon>
45
+ </div>
46
+ </bl-input>
47
+ ${t}
48
+ </div>
49
+ `}};o([r({type:String,attribute:"placeholder",reflect:!0})],i.prototype,"placeholder",2),o([r({type:String,reflect:!0})],i.prototype,"size",2),o([r({type:Boolean,attribute:"label-fixed",reflect:!0})],i.prototype,"labelFixed",2),o([r({type:String,attribute:"label",reflect:!0})],i.prototype,"label",2),o([r({type:Function,attribute:"value-formatter"})],i.prototype,"valueFormatter",2),o([r({type:Boolean})],i.prototype,"disabled",2),o([r({type:String,attribute:"help-text",reflect:!0})],i.prototype,"helpText",2),o([c()],i.prototype,"_inputValue",2),o([c()],i.prototype,"_floatingDateCount",2),o([c()],i.prototype,"_fittingDateCount",2),o([_("bl-calendar")],i.prototype,"_calendarEl",2),o([_("bl-popover")],i.prototype,"_popoverEl",2),o([_("bl-input")],i.prototype,"_inputEl",2),o([f("bl-datepicker-change")],i.prototype,"_onBlDatepickerChange",2),i=o([b("bl-datepicker")],i);export{i as a};
50
+ //# sourceMappingURL=chunk-Q7CEGCDI.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/datepicker/bl-datepicker.css", "../src/components/datepicker/bl-datepicker.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{width:314px;display:block}.datepicker-content{--bl-input-cursor:pointer;--icon-size:var(--line-height);--icon-color:var(--bl-color-neutral-light);width:100%;position:relative;display:grid}.datepicker-input{width:var(--bl-datepicker-input-width,auto);white-space:nowrap;text-overflow:ellipsis}.icon-container{display:flex;gap:var(--bl-size-3xs);align-items:center}.calendar-icon{display:flex;align-items:center;gap:var(--icon-gap);flex-basis:var(--icon-size);align-self:center;margin-right:var(--label-padding);font-size:var(--icon-size);color:var(--icon-color);height:var(--icon-size)}.action-divider{display:block;height:var(--bl-size-m);width:1px;background-color:var(--bl-color-neutral-lighter);margin-right:var(--bl-size-3xs)}bl-popover{--bl-popover-padding:0;--bl-popover-background-color:transparent}`;\nexport default styles;\n", "import { CSSResultGroup, html, TemplateResult } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport { BlCalendar, BlPopover } from \"../../baklava\";\nimport DatepickerCalendarMixin from \"../../mixins/datepicker-calendar-mixin/datepicker-calendar-mixin\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport \"../calendar/bl-calendar\";\nimport { CALENDAR_TYPES } from \"../calendar/bl-calendar.constant\";\nimport \"../input/bl-input\";\nimport BlInput, { InputSize } from \"../input/bl-input\";\nimport \"../tooltip/bl-tooltip\";\nimport style from \"./bl-datepicker.css\";\n\n/**\n * @tag bl-datepicker\n * @summary Baklava DatePicker component\n *\n * @cssproperty [--bl-datepicker-input-width] - Sets the width of datepicker input\n **/\n@customElement(\"bl-datepicker\")\nexport default class BlDatepicker extends DatepickerCalendarMixin {\n /**\n * Defines the datepicker input placeholder\n */\n @property({ type: String, attribute: \"placeholder\", reflect: true })\n placeholder: string;\n /**\n * Sets input size.\n */\n @property({ type: String, reflect: true })\n size?: InputSize = \"medium\";\n\n /**\n * Makes datepicker input label as fixed positioned\n */\n @property({ type: Boolean, attribute: \"label-fixed\", reflect: true })\n labelFixed = false;\n /**\n * Defines the datepicker input label\n */\n @property({ type: String, attribute: \"label\", reflect: true })\n label: string;\n /**\n * Defines the custom formatter function\n */\n @property({ type: Function, attribute: \"value-formatter\" })\n valueFormatter: ((dates: Date[]) => string) | null = null;\n /**\n * Sets datepicker to disabled\n */\n @property({ type: Boolean })\n disabled: boolean;\n /**\n * Defines help text to datepicker input for users\n */\n @property({ type: String, attribute: \"help-text\", reflect: true })\n helpText: string;\n\n @state()\n _inputValue = \"\";\n\n @state()\n _floatingDateCount: number = 0;\n\n @state()\n _fittingDateCount: number = 0;\n\n @query(\"bl-calendar\")\n _calendarEl: BlCalendar;\n\n @query(\"bl-popover\")\n _popoverEl: BlPopover;\n\n @query(\"bl-input\")\n _inputEl!: BlInput;\n\n private _onCalendarMouseDown!: (event: MouseEvent) => void;\n private _onInputMouseDown!: (event: MouseEvent) => void;\n\n /**\n * Fires when date selection is changed\n */\n @event(\"bl-datepicker-change\") private _onBlDatepickerChange: EventDispatcher<Date[]>;\n\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n defaultInputValueFormatter() {\n if (this.type === CALENDAR_TYPES.SINGLE) {\n this._inputValue = this.formatDate(this._calendarEl?._dates[0]);\n this.closePopoverWithTimeout();\n } else if (this.type === CALENDAR_TYPES.MULTIPLE) {\n this.setFloatingDates();\n const values = this._calendarEl?._dates\n .slice(0, this._fittingDateCount)\n .map(date => this.formatDate(date));\n\n this._inputValue = values.join(\",\") + (this._floatingDateCount > 0 ? \" ,...\" : \"\");\n } else if (this.type === CALENDAR_TYPES.RANGE) {\n if (this._calendarEl?._dates[0])\n this._inputValue = this.formatDate(this._calendarEl?._dates[0]);\n if (this._calendarEl?._dates[1])\n this._inputValue = `${this._inputValue}-${this.formatDate(this._calendarEl?._dates[1])}`;\n if (this._calendarEl?._dates[0] && this._calendarEl?._dates[1])\n this.closePopoverWithTimeout();\n }\n }\n\n closePopoverWithTimeout() {\n setTimeout(() => {\n this.closePopover();\n this._inputEl.blur();\n }, 200);\n }\n\n setFloatingDates() {\n const datepickerInput = this.shadowRoot?.getElementById(\"datepicker-input\");\n const iconsContainer = this.shadowRoot?.getElementById(\"icon-container\");\n const datesTextTotalWidth = datepickerInput!.offsetWidth! - iconsContainer!.offsetWidth!;\n\n this._fittingDateCount = Math.floor(datesTextTotalWidth / 90);\n\n this._floatingDateCount = this._calendarEl?._dates.length - this._fittingDateCount;\n }\n\n setDatePickerInput() {\n if (!this._calendarEl?._dates.length) {\n this._inputValue = \"\";\n } else {\n if (this.valueFormatter) {\n this._inputValue = this.valueFormatter(this._calendarEl?._dates);\n } else {\n this.defaultInputValueFormatter();\n }\n }\n }\n\n formatDate(date: Date): string {\n return `${String(date?.getDate()).padStart(2, \"0\")}/${String(date?.getMonth() + 1).padStart(\n 2,\n \"0\"\n )}/${date?.getFullYear()}`;\n }\n\n clearDatepicker() {\n this._calendarEl.handleClearSelectedDates();\n this._inputValue = \"\";\n this._floatingDateCount = 0;\n }\n\n openPopover() {\n this._popoverEl.target = this._inputEl;\n this._popoverEl.show();\n }\n\n closePopover() {\n this._popoverEl.hide();\n }\n\n _togglePopover() {\n this._popoverEl.visible ? this.closePopover() : this.openPopover();\n }\n\n formatAdditionalDates(str: string): TemplateResult[] {\n const parts = str.split(\",\");\n\n return parts?.reduce<TemplateResult[]>((acc, part, index) => {\n if (index > 0 && index % 3 === 0) {\n acc.push(html`<br />`);\n }\n acc.push(html`<span>${part.trim()}${index < parts.length - 1 ? \", \" : \"\"}</span>`);\n return acc;\n }, []);\n }\n\n async firstUpdated() {\n this._onCalendarMouseDown = event => {\n event.preventDefault();\n this._inputEl?.focus();\n };\n\n this._onInputMouseDown = event => {\n event.preventDefault();\n this._inputEl?.focus();\n };\n\n this._calendarEl?.addEventListener(\"mousedown\", this._onCalendarMouseDown);\n this._inputEl?.addEventListener(\"mousedown\", this._onInputMouseDown);\n\n if (this._calendarEl?._dates) {\n this.setDatePickerInput();\n }\n }\n\n onCalendarChange() {\n this.setDatePickerInput();\n this._onBlDatepickerChange(this._calendarEl?._dates);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._calendarEl?.removeEventListener(\"mousedown\", this._onCalendarMouseDown);\n this._inputEl?.removeEventListener(\"mousedown\", this._onInputMouseDown);\n }\n\n render() {\n const renderCalendar = html`\n <bl-popover target=\"datepicker-content\" placement=\"bottom-start\">\n <bl-calendar\n type=${this.type}\n .minDate=${this.minDate}\n .maxDate=${this.maxDate}\n .startOfWeek=${this.startOfWeek}\n .disabledDates=${this.disabledDates}\n .value=${this.value}\n .locale=${this.locale}\n @bl-calendar-change=\"${this.onCalendarChange}\"\n ></bl-calendar>\n </bl-popover>\n `;\n const additionalDates =\n this._calendarEl?._dates\n ?.slice(this._fittingDateCount)\n .map(date => {\n return this.formatDate(date);\n })\n .join(\",\") ?? \"\";\n\n const formattedAdditionalDates = this.formatAdditionalDates(additionalDates);\n\n const additionalDatesView =\n this._floatingDateCount > 0\n ? html` <bl-tooltip>\n <span slot=\"tooltip-trigger\">+${this._floatingDateCount}</span>\n <div>${formattedAdditionalDates}</div>\n </bl-tooltip>`\n : \"\";\n\n const clearDatepickerButton =\n this._calendarEl?._dates.length > 0\n ? html` <bl-button\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"close\"\n @click=${this.clearDatepicker}\n ></bl-button>\n <div class=\"action-divider\"></div>`\n : \"\";\n\n return html`\n <div class=\"datepicker-content\" id=\"datepicker-content\" tabindex=\"-1\">\n <bl-input\n .value=\"${this._inputValue}\"\n .label=\"${this.label}\"\n placeholder=\"${this.placeholder}\"\n class=\"datepicker-input\"\n role=\"button\"\n id=\"datepicker-input\"\n aria-haspopup=\"listbox\"\n aria-labelledby=\"label\"\n @click=${this._togglePopover}\n help-text=${this.helpText}\n ?disabled=${this.disabled}\n .size=${this.size}\n .labelFixed=${this.labelFixed}\n readonly\n >\n <div slot=\"icon\" class=\"icon-container\" id=\"icon-container\">\n ${additionalDatesView} ${clearDatepickerButton}\n <bl-icon name=\"calendar\" size=\"small\" class=\"calendar-icon\"></bl-icon>\n </div>\n </bl-input>\n ${renderCalendar}\n </div>\n `;\n }\n}\n"],
5
+ "mappings": "+NACO,IAAMA,EAASC,gzBACfC,EAAQF,ECiBf,IAAqBG,EAArB,cAA0CC,CAAwB,CAAlE,kCAUE,UAAmB,SAMnB,gBAAa,GAUb,oBAAqD,KAarD,iBAAc,GAGd,wBAA6B,EAG7B,uBAA4B,EAmB5B,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAEA,4BAA6B,CAvF/B,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAwFI,GAAI,KAAK,gBACP,KAAK,YAAc,KAAK,YAAWP,EAAA,KAAK,cAAL,YAAAA,EAAkB,OAAO,EAAE,EAC9D,KAAK,wBAAwB,UACpB,KAAK,kBAAkC,CAChD,KAAK,iBAAiB,EACtB,IAAMQ,GAASP,EAAA,KAAK,cAAL,YAAAA,EAAkB,OAC9B,MAAM,EAAG,KAAK,mBACd,IAAIQ,GAAQ,KAAK,WAAWA,CAAI,GAEnC,KAAK,YAAcD,EAAO,KAAK,GAAG,GAAK,KAAK,mBAAqB,EAAI,QAAU,SACtE,KAAK,kBACVN,EAAA,KAAK,cAAL,MAAAA,EAAkB,OAAO,KAC3B,KAAK,YAAc,KAAK,YAAWC,EAAA,KAAK,cAAL,YAAAA,EAAkB,OAAO,EAAE,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S,CAAE,KAAM,OAAQ,UAAW,QAAS,QAAS,EAAK,CAAC,GApB1C7B,EAqBnB,qBAKA4B,EAAA,CADCC,EAAS,CAAE,KAAM,SAAU,UAAW,iBAAkB,CAAC,GAzBvC7B,EA0BnB,8BAKA4B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,CAAC,GA9BR7B,EA+BnB,wBAKA4B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,YAAa,QAAS,EAAK,CAAC,GAnC9C7B,EAoCnB,wBAGA4B,EAAA,CADCE,EAAM,GAtCY9B,EAuCnB,2BAGA4B,EAAA,CADCE,EAAM,GAzCY9B,EA0CnB,kCAGA4B,EAAA,CADCE,EAAM,GA5CY9B,EA6CnB,iCAGA4B,EAAA,CADCG,EAAM,aAAa,GA/CD/B,EAgDnB,2BAGA4B,EAAA,CADCG,EAAM,YAAY,GAlDA/B,EAmDnB,0BAGA4B,EAAA,CADCG,EAAM,UAAU,GArDE/B,EAsDnB,wBAQuC4B,EAAA,CAAtCN,EAAM,sBAAsB,GA9DVtB,EA8DoB,qCA9DpBA,EAArB4B,EAAA,CADCC,EAAc,eAAe,GACT7B",
6
+ "names": ["styles", "i", "bl_datepicker_default", "BlDatepicker", "DatepickerCalendarMixin", "bl_datepicker_default", "_a", "_b", "_c", "_d", "_e", "_f", "_g", "_h", "values", "date", "datepickerInput", "iconsContainer", "datesTextTotalWidth", "str", "parts", "acc", "part", "index", "x", "event", "renderCalendar", "additionalDates", "formattedAdditionalDates", "additionalDatesView", "clearDatepickerButton", "__decorateClass", "e", "t", "i"]
7
+ }
@@ -1,8 +1,8 @@
1
- import{a as u,b as a,c as s,e as p}from"./chunk-5MOOXA2X.js";import{a as i,b as l,f as o}from"./chunk-4OT5AMS5.js";import{d as r}from"./chunk-IZ2LK5GK.js";var m=i`.progress-indicator{--max:100;--value:0;--value-color:var(--bl-color-success);--height:var(--bl-size-2xs);--radius:var(--bl-border-radius-s);position:relative;background-color:var(--bl-color-neutral-lightest);height:var(--height);border-radius:var(--radius);width:100%;transform:scaleX(var(--bl-text-x-direction))}.progress-indicator::before{content:"";position:absolute;height:100%;width:calc(100% / var(--max) * var(--value));background-color:var(--value-color);border-radius:var(--radius);transition:width ease var(--bl-progress-indicator-transition-duration, 0.2s)}:host([size="small"]) .progress-indicator{--height:var(--bl-size-3xs);--radius:var(--bl-border-radius-xs)}:host([size="large"]) .progress-indicator{--height:var(--bl-size-xs);--radius:var(--bl-border-radius-m)}:host([failed]) .progress-indicator{--value-color:var(--bl-color-danger)}`,d=m;var e=class extends o{constructor(){super(...arguments);this.size="medium";this.failed=!1;this._max=100;this._value=0}static get styles(){return d}get max(){return this._max}set max(t){this._max=t,this.updateCssVariable()}get value(){return this._value}set value(t){this._value=t,this.updateCssVariable()}async updateCssVariable(){await this.updateComplete,this.wrapper.style.setProperty("--value",`${this.value}`),this.wrapper.style.setProperty("--max",`${this.max}`)}render(){return l`<div
1
+ import{a as u,b as a,c as s,e as p}from"./chunk-5MOOXA2X.js";import{a as i,b as l,f as o}from"./chunk-4OT5AMS5.js";import{d as r}from"./chunk-IZ2LK5GK.js";var m=i`.progress-indicator{--max:100;--value:0;--value-color:var(--bl-color-success);--height:var(--bl-size-2xs);--radius:var(--bl-border-radius-s);position:relative;background-color:var(--bl-color-neutral-lightest);height:var(--height);border-radius:var(--radius);width:100%;transform:scaleX(var(--bl-text-x-direction))}.progress-indicator::before{content:"";position:absolute;height:100%;width:calc(100% / var(--max) * var(--value));background-color:var(--value-color);border-radius:var(--radius);transition:width ease var(--bl-progress-indicator-transition-duration, .2s)}:host([size=small]) .progress-indicator{--height:var(--bl-size-3xs);--radius:var(--bl-border-radius-xs)}:host([size=large]) .progress-indicator{--height:var(--bl-size-xs);--radius:var(--bl-border-radius-m)}:host([failed]) .progress-indicator{--value-color:var(--bl-color-danger)}`,d=m;var e=class extends o{constructor(){super(...arguments);this.size="medium";this.failed=!1;this._max=100;this._value=0}static get styles(){return d}get max(){return this._max}set max(t){this._max=t,this.updateCssVariable()}get value(){return this._value}set value(t){this._value=t,this.updateCssVariable()}async updateCssVariable(){await this.updateComplete,this.wrapper.style.setProperty("--value",`${this.value}`),this.wrapper.style.setProperty("--max",`${this.max}`)}render(){return l`<div
2
2
  class="progress-indicator"
3
3
  role="progressbar"
4
4
  aria-label="progress indicator"
5
5
  aria-valuemax="${this._max}"
6
6
  aria-valuenow="${this._value}"
7
7
  ></div>`}};r([p(".progress-indicator")],e.prototype,"wrapper",2),r([a({type:String,reflect:!0})],e.prototype,"size",2),r([a({type:Boolean,reflect:!0})],e.prototype,"failed",2),r([a({type:Number})],e.prototype,"max",1),r([a({type:Number})],e.prototype,"value",1),r([s()],e.prototype,"_max",2),r([s()],e.prototype,"_value",2),e=r([u("bl-progress-indicator")],e);export{e as a};
8
- //# sourceMappingURL=chunk-GMVJABPT.js.map
8
+ //# sourceMappingURL=chunk-QDYWH7BU.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/progress-indicator/bl-progress-indicator.css", "../src/components/progress-indicator/bl-progress-indicator.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.progress-indicator{--max:100;--value:0;--value-color:var(--bl-color-success);--height:var(--bl-size-2xs);--radius:var(--bl-border-radius-s);position:relative;background-color:var(--bl-color-neutral-lightest);height:var(--height);border-radius:var(--radius);width:100%;transform:scaleX(var(--bl-text-x-direction))}.progress-indicator::before{content:\"\";position:absolute;height:100%;width:calc(100% / var(--max) * var(--value));background-color:var(--value-color);border-radius:var(--radius);transition:width ease var(--bl-progress-indicator-transition-duration, .2s)}:host([size=small]) .progress-indicator{--height:var(--bl-size-3xs);--radius:var(--bl-border-radius-xs)}:host([size=large]) .progress-indicator{--height:var(--bl-size-xs);--radius:var(--bl-border-radius-m)}:host([failed]) .progress-indicator{--value-color:var(--bl-color-danger)}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport style from \"./bl-progress-indicator.css\";\n\nexport type ProgressIndicatorSize = \"small\" | \"medium\" | \"large\";\n\n/**\n * @tag bl-progress-indicator\n * @summary Baklava Progress Indicator component\n *\n * @cssproperty [--bl-progress-indicator-transition-duration=.2s] Duration of the transition of progress bar\n * @property {max} [max=100]\n * @property {number} [value=0]\n */\n\n@customElement(\"bl-progress-indicator\")\nexport default class BlProgressIndicator extends LitElement {\n static get styles(): CSSResultGroup {\n return style;\n }\n\n @query(\".progress-indicator\") private wrapper: HTMLElement;\n\n /**\n * Sets the size\n */\n @property({ type: String, reflect: true })\n size: ProgressIndicatorSize = \"medium\";\n\n /**\n * Sets the status\n */\n @property({ type: Boolean, reflect: true })\n failed = false;\n\n /**\n * Sets the max\n */\n @property({ type: Number })\n get max() {\n return this._max;\n }\n set max(max: number) {\n this._max = max;\n this.updateCssVariable();\n }\n\n /**\n * Sets the value\n */\n @property({ type: Number })\n get value() {\n return this._value;\n }\n set value(value: number) {\n this._value = value;\n this.updateCssVariable();\n }\n\n @state() private _max = 100;\n @state() private _value = 0;\n\n async updateCssVariable() {\n await this.updateComplete;\n this.wrapper.style.setProperty(\"--value\", `${this.value}`);\n this.wrapper.style.setProperty(\"--max\", `${this.max}`);\n }\n\n render(): TemplateResult {\n return html`<div\n class=\"progress-indicator\"\n role=\"progressbar\"\n aria-label=\"progress indicator\"\n aria-valuemax=\"${this._max}\"\n aria-valuenow=\"${this._value}\"\n ></div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bl-progress-indicator\": BlProgressIndicator;\n }\n}\n"],
5
+ "mappings": "2JACO,IAAMA,EAAS,m1BACfC,EAAQD,ECcf,IAAqBE,EAArB,cAAiDC,CAAW,CAA5D,kCAWE,UAA8B,SAM9B,YAAS,GA0BA,KAAQ,KAAO,IACf,KAAQ,OAAS,EA3C1B,WAAW,QAAyB,CAClC,OAAOC,CACT,CAoBA,IAAI,KAAM,CACR,OAAO,KAAK,IACd,CACA,IAAI,IAAIC,EAAa,CACnB,KAAK,KAAOA,EACZ,KAAK,kBAAkB,CACzB,CAMA,IAAI,OAAQ,CACV,OAAO,KAAK,MACd,CACA,IAAI,MAAMC,EAAe,CACvB,KAAK,OAASA,EACd,KAAK,kBAAkB,CACzB,CAKA,MAAM,mBAAoB,CACxB,MAAM,KAAK,eACX,KAAK,QAAQ,MAAM,YAAY,UAAW,GAAG,KAAK,OAAO,EACzD,KAAK,QAAQ,MAAM,YAAY,QAAS,GAAG,KAAK,KAAK,CACvD,CAEA,QAAyB,CACvB,OAAOC;AAAA;AAAA;AAAA;AAAA,uBAIY,KAAK;AAAA,uBACL,KAAK;AAAA,YAE1B,CACF,EAxDwCC,EAAA,CAArCC,EAAM,qBAAqB,GALTP,EAKmB,uBAMtCM,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAVtBR,EAWnB,oBAMAM,EAAA,CADCE,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAhBvBR,EAiBnB,sBAMIM,EAAA,CADHE,EAAS,CAAE,KAAM,MAAO,CAAC,GAtBPR,EAuBf,mBAYAM,EAAA,CADHE,EAAS,CAAE,KAAM,MAAO,CAAC,GAlCPR,EAmCf,qBAQaM,EAAA,CAAhBG,EAAM,GA3CYT,EA2CF,oBACAM,EAAA,CAAhBG,EAAM,GA5CYT,EA4CF,sBA5CEA,EAArBM,EAAA,CADCE,EAAc,uBAAuB,GACjBR",
6
+ "names": ["styles", "bl_progress_indicator_default", "BlProgressIndicator", "s", "bl_progress_indicator_default", "max", "value", "x", "__decorateClass", "i", "e", "t"]
7
+ }
@@ -0,0 +1,22 @@
1
+ import{a as r}from"./chunk-GRL4DWKG.js";import{a as c,b as l,c as p,e as u}from"./chunk-5MOOXA2X.js";import{a,b as i,f as n}from"./chunk-4OT5AMS5.js";import{d as o}from"./chunk-IZ2LK5GK.js";var d=a`:host{position:relative}.option-container{--option-font:var(--bl-font-title-3-regular);--option-spacing:var(--bl-size-xs) 0;--option-selected-color:var(--bl-color-primary);--option-hover-color:var(--bl-color-primary-highlight);--option-color:var(--bl-color-neutral-darker);--option-disabled-color:var(--bl-color-neutral-light);--option-separator:1px solid var(--bl-color-neutral-lighter);--option-gap:var(--bl-size-2xs);--option-transition:color 120ms ease-out}.option-container::after{position:absolute;content:"";width:100%;bottom:0;border-bottom:var(--option-separator)}.no-border-bottom::after{border-bottom:none}:host(:last-of-type) .option-container::after{border-bottom:none}.single-option{width:100%;display:block;cursor:pointer;color:var(--option-color);margin:var(--option-spacing);transition:var(--option-transition);font:var(--option-font);user-select:none;position:relative;outline:0}.single-option:focus-visible::after{content:"";position:absolute;inset:calc(var(--bl-size-3xs) * -1);border:var(--bl-size-4xs) solid var(--option-hover-color);border-radius:var(--bl-size-4xs)}:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .single-option,:host(:hover) .single-option{color:var(--option-hover-color)}:host([selected]) .single-option{color:var(--option-selected-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .single-option{color:var(--option-disabled-color);cursor:not-allowed;pointer-events:none}.checkbox-option{width:100%;display:block;color:var(--option-color);padding:var(--option-spacing)}`,h=d;var e=class extends n{constructor(){super(...arguments);this.label="";this.disabled=!1;this.selected=!1;this.multiple=!1}static get styles(){return[h]}get value(){return this._value||this.textContent}set value(t){this._value=t}focus(){this.multiple||(this.focusTarget.tabIndex=0),this.focusTarget.focus(),this.onFocus(this.value)}blur(){this.onBlur(this.value),this.focusTarget.tabIndex=-1}singleOptionTemplate(){return i`<div
2
+ class="single-option focus-target"
3
+ @blur=${this.blur}
4
+ @keydown=${this.handleKeydown}
5
+ @click="${this._onClickOption}"
6
+ role="option"
7
+ aria-selected="${this.selected}"
8
+ >
9
+ <slot></slot>
10
+ </div>`}checkboxOptionTemplate(){return i`<bl-checkbox
11
+ class="checkbox-option focus-target"
12
+ .checked="${this.selected}"
13
+ .disabled="${this.disabled}"
14
+ @bl-checkbox-change="${this._onCheckboxChange}"
15
+ role="option"
16
+ aria-selected="${this.selected}"
17
+ >
18
+ <slot></slot>
19
+ </bl-checkbox>`}render(){return i`<div class="option-container">
20
+ ${this.multiple?this.checkboxOptionTemplate():this.singleOptionTemplate()}
21
+ </div>`}handleKeydown(t){(t.code==="Enter"||t.code==="Space")&&(this._onClickOption(),t.preventDefault())}_handleEvent(){this._onSelect(this.value)}_onClickOption(){this.selected=!this.selected,this._handleEvent()}_onCheckboxChange(t){this.selected=t.detail,this._handleEvent()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{var t,s;this.blSelect=this.closest("bl-select"),this.multiple=((t=this.blSelect)==null?void 0:t.multiple)||!1,(s=this.blSelect)==null||s.registerOption(this)})}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.blSelect)==null||t.unregisterOption(this)}};o([l({})],e.prototype,"value",1),o([l({type:String,reflect:!0,attribute:"label"})],e.prototype,"label",2),o([l({type:Boolean,reflect:!0})],e.prototype,"disabled",2),o([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),o([p()],e.prototype,"multiple",2),o([r("bl-select-option")],e.prototype,"_onSelect",2),o([r("bl-focus")],e.prototype,"onFocus",2),o([r("bl-blur")],e.prototype,"onBlur",2),o([u(".focus-target")],e.prototype,"focusTarget",2),e=o([c("bl-select-option")],e);export{e as a};
22
+ //# sourceMappingURL=chunk-RER7OLAQ.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/select/option/bl-select-option.css", "../src/components/select/option/bl-select-option.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{position:relative}.option-container{--option-font:var(--bl-font-title-3-regular);--option-spacing:var(--bl-size-xs) 0;--option-selected-color:var(--bl-color-primary);--option-hover-color:var(--bl-color-primary-highlight);--option-color:var(--bl-color-neutral-darker);--option-disabled-color:var(--bl-color-neutral-light);--option-separator:1px solid var(--bl-color-neutral-lighter);--option-gap:var(--bl-size-2xs);--option-transition:color 120ms ease-out}.option-container::after{position:absolute;content:\"\";width:100%;bottom:0;border-bottom:var(--option-separator)}.no-border-bottom::after{border-bottom:none}:host(:last-of-type) .option-container::after{border-bottom:none}.single-option{width:100%;display:block;cursor:pointer;color:var(--option-color);margin:var(--option-spacing);transition:var(--option-transition);font:var(--option-font);user-select:none;position:relative;outline:0}.single-option:focus-visible::after{content:\"\";position:absolute;inset:calc(var(--bl-size-3xs) * -1);border:var(--bl-size-4xs) solid var(--option-hover-color);border-radius:var(--bl-size-4xs)}:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .single-option,:host(:hover) .single-option{color:var(--option-hover-color)}:host([selected]) .single-option{color:var(--option-selected-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .single-option{color:var(--option-disabled-color);cursor:not-allowed;pointer-events:none}.checkbox-option{width:100%;display:block;color:var(--option-color);padding:var(--option-spacing)}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport { FormValue } from \"@open-wc/form-helpers\";\nimport { event, EventDispatcher } from \"../../../utilities/event\";\nimport BlSelect from \"../bl-select\";\nimport style from \"./bl-select-option.css\";\n\n@customElement(\"bl-select-option\")\nexport default class BlSelectOption<ValueType extends FormValue = string> extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n private _value: ValueType;\n\n /* Declare reactive properties */\n /**\n * Sets the value for the option\n */\n @property({})\n get value(): ValueType {\n return this._value || (this.textContent as ValueType);\n }\n\n set value(val: ValueType) {\n this._value = val;\n }\n\n /**\n * Sets the label for bl-select, and bl-select renders this value instead of the option's textContent\n */\n @property({ type: String, reflect: true, attribute: \"label\" })\n label = \"\";\n\n /**\n * Sets option as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Sets option as selected state\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n @state()\n multiple = false;\n\n /**\n * Fires when clicked on the option\n */\n @event(\"bl-select-option\") private _onSelect: EventDispatcher<ValueType | string | null>;\n\n /**\n * Fires when checkbox is focused\n */\n @event(\"bl-focus\") private onFocus: EventDispatcher<ValueType | string | null>;\n\n /**\n * Fires when checkbox is blurred\n */\n @event(\"bl-blur\") private onBlur: EventDispatcher<ValueType | string | null>;\n\n @query(\".focus-target\") private focusTarget: HTMLElement;\n\n /**\n * Focuses this option\n */\n focus() {\n if (!this.multiple) {\n this.focusTarget.tabIndex = 0;\n }\n this.focusTarget.focus();\n this.onFocus(this.value);\n }\n\n /**\n * Blurs from this option\n */\n blur() {\n this.onBlur(this.value);\n this.focusTarget.tabIndex = -1;\n }\n\n private blSelect: BlSelect<ValueType> | null;\n\n private singleOptionTemplate() {\n return html`<div\n class=\"single-option focus-target\"\n @blur=${this.blur}\n @keydown=${this.handleKeydown}\n @click=\"${this._onClickOption}\"\n role=\"option\"\n aria-selected=\"${this.selected}\"\n >\n <slot></slot>\n </div>`;\n }\n\n private checkboxOptionTemplate() {\n return html`<bl-checkbox\n class=\"checkbox-option focus-target\"\n .checked=\"${this.selected}\"\n .disabled=\"${this.disabled}\"\n @bl-checkbox-change=\"${this._onCheckboxChange}\"\n role=\"option\"\n aria-selected=\"${this.selected}\"\n >\n <slot></slot>\n </bl-checkbox>`;\n }\n\n render() {\n return html`<div class=\"option-container\">\n ${this.multiple ? this.checkboxOptionTemplate() : this.singleOptionTemplate()}\n </div>`;\n }\n\n private handleKeydown(event: KeyboardEvent) {\n if (event.code === \"Enter\" || event.code === \"Space\") {\n this._onClickOption();\n event.preventDefault();\n }\n }\n\n private _handleEvent() {\n this._onSelect(this.value);\n }\n\n private _onClickOption() {\n this.selected = !this.selected;\n this._handleEvent();\n }\n\n private _onCheckboxChange(event: CustomEvent) {\n this.selected = event.detail;\n this._handleEvent();\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n this.updateComplete.then(() => {\n this.blSelect = this.closest<BlSelect<ValueType>>(\"bl-select\");\n // FIXME: We should warn when parent is not bl-select\n\n this.multiple = this.blSelect?.multiple || false;\n this.blSelect?.registerOption(this);\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.blSelect?.unregisterOption(this);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bl-select-option\": BlSelectOption;\n }\n}\n"],
5
+ "mappings": "8LACO,IAAMA,EAASC,0/CACfC,EAAQF,ECMf,IAAqBG,EAArB,cAAkFC,CAAW,CAA7F,kCAwBE,WAAQ,GAMR,cAAW,GAMX,cAAW,GAGX,cAAW,GAtCX,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CASA,IAAI,OAAmB,CACrB,OAAO,KAAK,QAAW,KAAK,WAC9B,CAEA,IAAI,MAAMC,EAAgB,CACxB,KAAK,OAASA,CAChB,CA2CA,OAAQ,CACD,KAAK,WACR,KAAK,YAAY,SAAW,GAE9B,KAAK,YAAY,MAAM,EACvB,KAAK,QAAQ,KAAK,KAAK,CACzB,CAKA,MAAO,CACL,KAAK,OAAO,KAAK,KAAK,EACtB,KAAK,YAAY,SAAW,EAC9B,CAIQ,sBAAuB,CAC7B,OAAOC;AAAA;AAAA,cAEG,KAAK;AAAA,iBACF,KAAK;AAAA,gBACN,KAAK;AAAA;AAAA,uBAEE,KAAK;AAAA;AAAA;AAAA,WAI1B,CAEQ,wBAAyB,CAC/B,OAAOA;AAAA;AAAA,kBAEO,KAAK;AAAA,mBACJ,KAAK;AAAA,6BACK,KAAK;AAAA;AAAA,uBAEX,KAAK;AAAA;AAAA;AAAA,mBAI1B,CAEA,QAAS,CACP,OAAOA;AAAA,QACH,KAAK,SAAW,KAAK,uBAAuB,EAAI,KAAK,qBAAqB;AAAA,WAEhF,CAEQ,cAAcC,EAAsB,EACtCA,EAAM,OAAS,SAAWA,EAAM,OAAS,WAC3C,KAAK,eAAe,EACpBA,EAAM,eAAe,EAEzB,CAEQ,cAAe,CACrB,KAAK,UAAU,KAAK,KAAK,CAC3B,CAEQ,gBAAiB,CACvB,KAAK,SAAW,CAAC,KAAK,SACtB,KAAK,aAAa,CACpB,CAEQ,kBAAkBA,EAAoB,CAC5C,KAAK,SAAWA,EAAM,OACtB,KAAK,aAAa,CACpB,CAEA,mBAAoB,CAClB,MAAM,kBAAkB,EAExB,KAAK,eAAe,KAAK,IAAM,CA/InC,IAAAC,EAAAC,EAgJM,KAAK,SAAW,KAAK,QAA6B,WAAW,EAG7D,KAAK,WAAWD,EAAA,KAAK,WAAL,YAAAA,EAAe,WAAY,IAC3CC,EAAA,KAAK,WAAL,MAAAA,EAAe,eAAe,KAChC,CAAC,CACH,CAEA,sBAAuB,CAxJzB,IAAAD,EAyJI,MAAM,qBAAqB,GAC3BA,EAAA,KAAK,WAAL,MAAAA,EAAe,iBAAiB,KAClC,CACF,EAxIME,EAAA,CADHC,EAAS,CAAC,CAAC,GAXOT,EAYf,qBAYJQ,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,OAAQ,CAAC,GAvB1CT,EAwBnB,qBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA7BvBT,EA8BnB,wBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAnCvBT,EAoCnB,wBAGAQ,EAAA,CADCE,EAAM,GAtCYV,EAuCnB,wBAKmCQ,EAAA,CAAlCH,EAAM,kBAAkB,GA5CNL,EA4CgB,yBAKRQ,EAAA,CAA1BH,EAAM,UAAU,GAjDEL,EAiDQ,uBAKDQ,EAAA,CAAzBH,EAAM,SAAS,GAtDGL,EAsDO,sBAEMQ,EAAA,CAA/BG,EAAM,eAAe,GAxDHX,EAwDa,2BAxDbA,EAArBQ,EAAA,CADCC,EAAc,kBAAkB,GACZT",
6
+ "names": ["styles", "i", "bl_select_option_default", "BlSelectOption", "s", "bl_select_option_default", "val", "x", "event", "_a", "_b", "__decorateClass", "e", "t", "i"]
7
+ }
@@ -0,0 +1,34 @@
1
+ import{b as y,c as g,d as D,e as H,f as $}from"./chunk-AYJMIZZ3.js";import{a as Y}from"./chunk-DINNT5P2.js";import{a as N,b as L,c as R}from"./chunk-7GK5LKBV.js";import{a as k,b as A,c as M,d as S}from"./chunk-5MOOXA2X.js";import{a as P,b as w,c as z,f as C}from"./chunk-4OT5AMS5.js";import{d as v}from"./chunk-IZ2LK5GK.js";var I=(s,f,t)=>{let o=new Map;for(let n=f;n<=t;n++)o.set(s[n],n);return o},V=L(class extends R{constructor(s){if(super(s),s.type!==N.CHILD)throw Error("repeat() can only be used in text expressions")}ct(s,f,t){let o;t===void 0?t=f:f!==void 0&&(o=f);let n=[],i=[],a=0;for(let c of s)n[a]=o?o(c,a):a,i[a]=t(c,a),a++;return{values:i,keys:n}}render(s,f,t){return this.ct(s,f,t).values}update(s,[f,t,o]){var n;let i=H(s),{values:a,keys:c}=this.ct(f,t,o);if(!Array.isArray(i))return this.ut=c,a;let p=(n=this.ut)!==null&&n!==void 0?n:this.ut=[],m=[],b,x,e=0,l=i.length-1,r=0,d=a.length-1;for(;e<=l&&r<=d;)if(i[e]===null)e++;else if(i[l]===null)l--;else if(p[e]===c[r])m[r]=g(i[e],a[r]),e++,r++;else if(p[l]===c[d])m[d]=g(i[l],a[d]),l--,d--;else if(p[e]===c[d])m[d]=g(i[e],a[d]),y(s,m[d+1],i[e]),e++,d--;else if(p[l]===c[r])m[r]=g(i[l],a[r]),y(s,i[e],i[l]),l--,r++;else if(b===void 0&&(b=I(c,r,d),x=I(p,e,l)),b.has(p[e]))if(b.has(p[l])){let h=x.get(c[r]),T=h!==void 0?i[h]:null;if(T===null){let E=y(s,i[e]);g(E,a[r]),m[r]=E}else m[r]=g(T,a[r]),y(s,i[e],T),i[h]=null;r++}else $(i[l]),l--;else $(i[e]),e++;for(;r<=d;){let h=y(s,m[d+1]);g(h,a[r]),m[r++]=h}for(;e<=l;){let h=i[e++];h!==null&&$(h)}return this.ut=c,D(s,m),z}});var X=P`:host{--bl-notification-width:396px;--bl-notification-gap:var(--bl-size-2xs);--bl-notification-animation-duration:0.3s}.wrapper{--margin:var(--bl-size-xl);display:flex;flex-direction:column-reverse;position:fixed;top:0;inset-inline-end:0;max-width:var(--bl-notification-width);margin:var(--margin);width:calc(100% - var(--margin) * 2);z-index:var(--bl-index-notification)}@media screen and (max-width:480px){.wrapper{flex-direction:column;max-width:100%}}.notification{will-change:transform height margin;animation:slide-in-right var(--bl-notification-animation-duration) ease;margin-bottom:var(--bl-notification-gap);touch-action:none}:host(:has([dir=rtl])) .notification{animation:slide-in-left var(--bl-notification-animation-duration) ease}.notification[data-slide=top]{animation:slide-in-top var(--bl-notification-animation-duration) ease}:host([no-animation]) .notification{animation:none}.notification.removing{animation:slide-out-right var(--bl-notification-animation-duration) ease forwards,size-to-zero var(--bl-notification-animation-duration) ease var(--bl-notification-animation-duration) forwards}.notification[data-slide=top].removing{animation:slide-out-top var(--bl-notification-animation-duration) ease forwards,size-to-zero var(--bl-notification-animation-duration) ease var(--bl-notification-animation-duration) forwards}:host([no-animation]) .notification.removing{animation:0 size-to-zero}@media (prefers-reduced-motion){.notification.removing{animation:0 size-to-zero}.notification{animation:none}}@keyframes slide-in-right{from{transform:translateX(var(--travel-distance,10px));height:0;opacity:0;margin:0}}@keyframes slide-in-left{from{transform:translateX(var(--travel-distance,-10px));height:0;opacity:0;margin:0}}@keyframes slide-out-right{to{transform:translateX(var(--travel-distance,10px));opacity:0}}@keyframes slide-in-top{from{transform:translateY(var(--travel-distance,-10px));height:0;opacity:0;margin:0}}@keyframes slide-out-top{to{transform:translateY(var(--travel-distance,-10px));opacity:0}}@keyframes size-to-zero{to{height:0;margin:0}}`,B=X;var G=-50,u=class extends C{constructor(){super(...arguments);this.noAnimation=!1;this.duration=7;this.notifications=[];this.touchStartY=0}static get styles(){return[B]}get notificationList(){return this.notifications}get touchStart(){return{y:this.touchStartY}}get isMobile(){return window.matchMedia("(max-width: 480px)").matches}addNotification(t){let o=Math.random().toString(36).substr(2,9),n={...t,id:o,duration:t.duration||this.duration,remove:()=>this.removeNotification(o)},i=[...this.notifications,n];return this.notifications=i,n}async removeNotification(t){return new Promise(o=>{var i;let n=(i=this.shadowRoot)==null?void 0:i.getElementById(t);if(!n){o(!1);return}n.style.height=`${n.clientHeight}px`,n.addEventListener("animationend",({animationName:a})=>{a==="size-to-zero"&&(this.notifications=this.notifications.filter(c=>c.id!==t),o(!0))}),n.classList.add("removing")})}handleTouchStart(t){this.isMobile&&(t.stopPropagation(),this.touchStartY=t.touches[0].clientY)}handleTouchMove(t){if(!this.isMobile)return;t.stopPropagation();let o=t.currentTarget,n=t.touches[0].clientY,i=Math.min(n-this.touchStartY,0);o.style.transform=`translateY(${i}px)`}handleTouchEnd(t){if(!this.isMobile)return;t.stopPropagation();let o=t.currentTarget,i=t.changedTouches[0].clientY-this.touchStartY;i<G?(o.style.setProperty("--travel-distance",`${i-10}px`),this.removeNotification(o.id)):(o.style.transition="transform 0.3s ease",o.style.transform="translateY(0px)",o.addEventListener("transitionend",()=>{o.style.transition="",o.style.transform=""})),this.touchStartY=0}renderActionSlot(t,o){let n=t==="primary-action"?o.primaryAction:o.secondaryAction;return!n||!n.label?"":w`<bl-button slot="${t}" @bl-click=${()=>n.onClick(o)}>
2
+ ${n.label}
3
+ </bl-button>`}render(){return w`
4
+ <div class="wrapper">
5
+ ${V(this.notifications,t=>t.id,t=>{let{caption:o,description:n,icon:i=!0,variant:a="info",id:c,duration:p=this.duration,permanent:m}=t,b=this.renderActionSlot("primary-action",t),x=this.renderActionSlot("secondary-action",t);return w`
6
+ <bl-notification-card
7
+ id="${c}"
8
+ class="notification"
9
+ data-slide=${this.isMobile?"top":"right"}
10
+ duration=${p}
11
+ caption="${Y(o)}"
12
+ icon=${i}
13
+ variant=${Y(a)}
14
+ ?permanent=${m}
15
+ @bl-notification-card-request-close=${e=>{e.preventDefault(),this.removeNotification(c)}}
16
+ @touchstart=${this.handleTouchStart}
17
+ @touchmove=${this.handleTouchMove}
18
+ @touchend=${this.handleTouchEnd}
19
+ >
20
+ ${n} ${b} ${x}
21
+ </bl-notification-card>
22
+ `})}
23
+ </div>
24
+ `}};v([A({type:Boolean,attribute:"no-animation",reflect:!0})],u.prototype,"noAnimation",2),v([A({type:Number})],u.prototype,"duration",2),v([M()],u.prototype,"notifications",2),v([S({passive:!0})],u.prototype,"handleTouchStart",1),v([S({passive:!0})],u.prototype,"handleTouchMove",1),v([S({passive:!0})],u.prototype,"handleTouchEnd",1),u=v([k("bl-notification")],u);export{G as a,u as b};
25
+ /*! Bundled license information:
26
+
27
+ lit-html/directives/repeat.js:
28
+ (**
29
+ * @license
30
+ * Copyright 2017 Google LLC
31
+ * SPDX-License-Identifier: BSD-3-Clause
32
+ *)
33
+ */
34
+ //# sourceMappingURL=chunk-SBCJY5IU.js.map