@trendyol/baklava 2.0.0-beta.20 → 2.0.0-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/baklava.js +1 -1
- package/dist/chunk-7M2LGOCX.js +7 -0
- package/dist/chunk-7M2LGOCX.js.map +7 -0
- package/dist/{chunk-DGRXEOW7.js → chunk-BBQNBSAJ.js} +2 -16
- package/dist/{chunk-DGRXEOW7.js.map → chunk-BBQNBSAJ.js.map} +2 -2
- package/dist/chunk-HEJ42DNS.js +18 -0
- package/dist/chunk-HEJ42DNS.js.map +7 -0
- package/dist/chunk-LVWH2KEY.js +30 -0
- package/dist/chunk-LVWH2KEY.js.map +7 -0
- package/dist/chunk-O4DFKSRZ.js +2 -0
- package/dist/chunk-O4DFKSRZ.js.map +7 -0
- package/dist/chunk-O5S6ERZ7.js +11 -0
- package/dist/chunk-O5S6ERZ7.js.map +7 -0
- package/dist/chunk-W4OOR3LR.js +20 -0
- package/dist/chunk-W4OOR3LR.js.map +7 -0
- package/dist/chunk-WATPLV54.js +5 -0
- package/dist/chunk-WATPLV54.js.map +7 -0
- package/dist/chunk-ZHDVBZMU.js +12 -0
- package/dist/chunk-ZHDVBZMU.js.map +7 -0
- package/dist/components/badge/bl-badge.js +1 -1
- package/dist/components/button/bl-button.js +1 -1
- package/dist/components/icon/bl-icon.js +1 -1
- package/dist/components/input/bl-input.js +1 -1
- package/dist/components/progress-indicator/bl-progress-indicator.js +1 -1
- package/dist/components/tab-group/bl-tab-group.js +1 -1
- package/dist/components/tab-group/tab/bl-tab.js +1 -1
- package/dist/components/tab-group/tab-panel/bl-tab-panel.js +1 -1
- package/dist/components/tooltip/bl-tooltip.js +1 -1
- package/dist/custom-elements.json +19 -61
- package/package.json +1 -1
- package/dist/chunk-4HMEMZY7.js +0 -29
- package/dist/chunk-4HMEMZY7.js.map +0 -7
- package/dist/chunk-5AGXQPQY.js +0 -14
- package/dist/chunk-5AGXQPQY.js.map +0 -7
- package/dist/chunk-675JRUTN.js +0 -185
- package/dist/chunk-675JRUTN.js.map +0 -7
- package/dist/chunk-7NRCA735.js +0 -64
- package/dist/chunk-7NRCA735.js.map +0 -7
- package/dist/chunk-AMTKE3PJ.js +0 -43
- package/dist/chunk-AMTKE3PJ.js.map +0 -7
- package/dist/chunk-EKMTGBDD.js +0 -148
- package/dist/chunk-EKMTGBDD.js.map +0 -7
- package/dist/chunk-FP5POXZC.js +0 -57
- package/dist/chunk-FP5POXZC.js.map +0 -7
- package/dist/chunk-LZXRWVZI.js +0 -185
- package/dist/chunk-LZXRWVZI.js.map +0 -7
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a}from"../../chunk-
|
|
1
|
+
import{c as a}from"../../chunk-BBQNBSAJ.js";import"../../chunk-72IJCTLJ.js";import"../../chunk-23UFIOHV.js";import"../../chunk-BEHH5JPC.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-icon.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-W4OOR3LR.js";import"../../chunk-SQ3STNEW.js";import"../../chunk-HLQIZBQW.js";import"../../chunk-BBQNBSAJ.js";import"../../chunk-72IJCTLJ.js";import"../../chunk-23UFIOHV.js";import"../../chunk-BEHH5JPC.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-input.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-7M2LGOCX.js";import"../../chunk-BEHH5JPC.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-progress-indicator.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-O5S6ERZ7.js";import"../../chunk-O4DFKSRZ.js";import"../../chunk-LVWH2KEY.js";import"../../chunk-23UFIOHV.js";import"../../chunk-BEHH5JPC.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-tab-group.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-LVWH2KEY.js";import"../../../chunk-23UFIOHV.js";import"../../../chunk-BEHH5JPC.js";import"../../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-tab.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-O4DFKSRZ.js";import"../../../chunk-BEHH5JPC.js";import"../../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-tab-panel.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-ZHDVBZMU.js";import"../../chunk-HLQIZBQW.js";import"../../chunk-72IJCTLJ.js";import"../../chunk-23UFIOHV.js";import"../../chunk-BEHH5JPC.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-tooltip.js.map
|
|
@@ -92,63 +92,27 @@
|
|
|
92
92
|
],
|
|
93
93
|
"attributes": [
|
|
94
94
|
{
|
|
95
|
-
"name": "
|
|
95
|
+
"name": "variant",
|
|
96
96
|
"type": {
|
|
97
|
-
"text": "
|
|
98
|
-
},
|
|
99
|
-
"default": "false",
|
|
100
|
-
"description": "Sets variant to primary",
|
|
101
|
-
"fieldName": "primary"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"name": "secondary",
|
|
105
|
-
"type": {
|
|
106
|
-
"text": "boolean"
|
|
107
|
-
},
|
|
108
|
-
"default": "false",
|
|
109
|
-
"description": "Sets variant to secondary",
|
|
110
|
-
"fieldName": "secondary"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"name": "success",
|
|
114
|
-
"type": {
|
|
115
|
-
"text": "boolean"
|
|
97
|
+
"text": "ButtonVariant"
|
|
116
98
|
},
|
|
117
|
-
"default": "
|
|
118
|
-
"description": "Sets
|
|
119
|
-
"fieldName": "
|
|
99
|
+
"default": "'primary'",
|
|
100
|
+
"description": "Sets the button variant",
|
|
101
|
+
"fieldName": "variant"
|
|
120
102
|
},
|
|
121
103
|
{
|
|
122
|
-
"name": "
|
|
104
|
+
"name": "kind",
|
|
123
105
|
"type": {
|
|
124
|
-
"text": "
|
|
106
|
+
"text": "ButtonKind"
|
|
125
107
|
},
|
|
126
|
-
"default": "
|
|
127
|
-
"description": "Sets
|
|
128
|
-
"fieldName": "
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"name": "outline",
|
|
132
|
-
"type": {
|
|
133
|
-
"text": "boolean"
|
|
134
|
-
},
|
|
135
|
-
"default": "false",
|
|
136
|
-
"description": "Sets button version to outline",
|
|
137
|
-
"fieldName": "outline"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"name": "text",
|
|
141
|
-
"type": {
|
|
142
|
-
"text": "boolean"
|
|
143
|
-
},
|
|
144
|
-
"default": "false",
|
|
145
|
-
"description": "Sets the button version to text",
|
|
146
|
-
"fieldName": "text"
|
|
108
|
+
"default": "'contained'",
|
|
109
|
+
"description": "Sets the button kind",
|
|
110
|
+
"fieldName": "kind"
|
|
147
111
|
},
|
|
148
112
|
{
|
|
149
113
|
"name": "size",
|
|
150
114
|
"type": {
|
|
151
|
-
"text": "
|
|
115
|
+
"text": "ButtonSize"
|
|
152
116
|
},
|
|
153
117
|
"default": "'medium'",
|
|
154
118
|
"description": "Sets the button size",
|
|
@@ -159,7 +123,7 @@
|
|
|
159
123
|
"type": {
|
|
160
124
|
"text": "string"
|
|
161
125
|
},
|
|
162
|
-
"description": "Sets the
|
|
126
|
+
"description": "Sets the button label. Used for accessibility.",
|
|
163
127
|
"fieldName": "label"
|
|
164
128
|
},
|
|
165
129
|
{
|
|
@@ -168,32 +132,32 @@
|
|
|
168
132
|
"text": "boolean"
|
|
169
133
|
},
|
|
170
134
|
"default": "false",
|
|
171
|
-
"description": "
|
|
135
|
+
"description": "Sets button as disabled",
|
|
172
136
|
"fieldName": "disabled"
|
|
173
137
|
},
|
|
174
138
|
{
|
|
175
139
|
"name": "href",
|
|
176
140
|
"type": {
|
|
177
|
-
"text": "string"
|
|
141
|
+
"text": "string | undefined"
|
|
178
142
|
},
|
|
179
|
-
"description": "
|
|
143
|
+
"description": "Set link url. If set, button will be rendered as anchor tag.",
|
|
180
144
|
"fieldName": "href"
|
|
181
145
|
},
|
|
182
146
|
{
|
|
183
147
|
"name": "icon",
|
|
184
148
|
"type": {
|
|
185
|
-
"text": "string"
|
|
149
|
+
"text": "string | undefined"
|
|
186
150
|
},
|
|
187
|
-
"description": "Sets the name
|
|
151
|
+
"description": "Sets the icon name. Shows icon with bl-icon component",
|
|
188
152
|
"fieldName": "icon"
|
|
189
153
|
},
|
|
190
154
|
{
|
|
191
155
|
"name": "target",
|
|
192
156
|
"type": {
|
|
193
|
-
"text": "
|
|
157
|
+
"text": "TargetType | undefined"
|
|
194
158
|
},
|
|
195
159
|
"default": "'_self'",
|
|
196
|
-
"description": "Sets
|
|
160
|
+
"description": "Sets the anchor target. Used when `href` is set.",
|
|
197
161
|
"fieldName": "target"
|
|
198
162
|
}
|
|
199
163
|
],
|
|
@@ -594,12 +558,6 @@
|
|
|
594
558
|
"kind": "class",
|
|
595
559
|
"description": "",
|
|
596
560
|
"name": "BlTooltip",
|
|
597
|
-
"cssProperties": [
|
|
598
|
-
{
|
|
599
|
-
"description": "Sets the position. Default value is 'absolute'",
|
|
600
|
-
"name": "--bl-tooltip-position"
|
|
601
|
-
}
|
|
602
|
-
],
|
|
603
561
|
"events": [
|
|
604
562
|
{
|
|
605
563
|
"type": {
|
package/package.json
CHANGED
package/dist/chunk-4HMEMZY7.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{a as i,b as r,e as n,f as c}from"./chunk-BEHH5JPC.js";import{a as l}from"./chunk-NZ3RGSR6.js";var o=i`.tabs {
|
|
2
|
-
background-color: var(--bl-color-primary-background);
|
|
3
|
-
border-bottom: var(--bl-size-4xs) solid var(--bl-color-secondary-background);
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.tabs-list {
|
|
9
|
-
overflow-x: scroll;
|
|
10
|
-
|
|
11
|
-
/* FIXME: use variables */
|
|
12
|
-
border-radius: 6px 6px 0 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.panels {
|
|
16
|
-
/* FIXME: use variables */
|
|
17
|
-
border-radius: 0 0 6px 6px;
|
|
18
|
-
}
|
|
19
|
-
`,d=o;var s=class extends n{constructor(){super(...arguments);this._connectedTabs=[];this._connectedPanels=[]}static get styles(){return[d]}get tabs(){return this._connectedTabs}get panels(){return this._connectedPanels}registerTab(e){let t=this._connectedTabs.filter(a=>!a.disabled).length===0&&!e.disabled;this._connectedTabs.push(e),(!e.disabled&&e.selected||t)&&(this.selectedTabName=e.name)}unregisterTab(e){var t;this._connectedTabs.splice(this._connectedTabs.indexOf(e),1),e.selected&&((t=this._connectedTabs.find(a=>!a.disabled))==null||t.select())}registerTabPanel(e){e.visible=e.tab===this.selectedTabName,this._connectedPanels.push(e)}unregisterTabPanel(e){this._connectedTabs.splice(this._connectedPanels.indexOf(e),1)}get selectedTabName(){return this._selectedTabName}set selectedTabName(e){this._selectedTabName=e,this._connectedTabs.forEach(t=>{t.selected=e===t.name}),this._connectedPanels.forEach(t=>{t.visible=t.tab===this._selectedTabName})}_handleTabSelected(e){this.selectedTabName=e.detail}render(){return r` <div class="container" @bl-tab-selected="${this._handleTabSelected}">
|
|
20
|
-
<div role="tablist" class="tabs-list">
|
|
21
|
-
<div class="tabs">
|
|
22
|
-
<slot name="tabs"></slot>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<div role="tabpanel" class="panels">
|
|
26
|
-
<slot></slot>
|
|
27
|
-
</div>
|
|
28
|
-
</div>`}};s=l([c("bl-tab-group")],s);export{s as a};
|
|
29
|
-
//# sourceMappingURL=chunk-4HMEMZY7.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/tab-group/bl-tab-group.css", "../src/components/tab-group/bl-tab-group.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.tabs {\n background-color: var(--bl-color-primary-background);\n border-bottom: var(--bl-size-4xs) solid var(--bl-color-secondary-background);\n display: flex;\n flex-direction: row;\n}\n\n.tabs-list {\n overflow-x: scroll;\n\n /* FIXME: use variables */\n border-radius: 6px 6px 0 0;\n}\n\n.panels {\n /* FIXME: use variables */\n border-radius: 0 0 6px 6px;\n}\n`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport style from './bl-tab-group.css';\nimport './tab-panel/bl-tab-panel';\nimport './tab/bl-tab';\nimport type BlTabPanel from './tab-panel/bl-tab-panel';\nimport type BlTab from './tab/bl-tab';\n\n/**\n * @tag bl-tab-group\n * @summary Baklava Tab group component\n */\n@customElement('bl-tab-group')\nexport default class BlTabGroup extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n private _connectedTabs: BlTab[] = [];\n private _connectedPanels: BlTabPanel[] = [];\n\n get tabs() {\n return this._connectedTabs;\n }\n\n get panels() {\n return this._connectedPanels;\n }\n\n /**\n * This method is used by `tab` component to register them self to the tab group.\n * @param tab BlTab reference to be registered\n */\n registerTab(tab: BlTab) {\n const isFirstAndNotDisabled =\n this._connectedTabs.filter(t => !t.disabled).length === 0 && !tab.disabled;\n this._connectedTabs.push(tab);\n if ((!tab.disabled && tab.selected) || isFirstAndNotDisabled) {\n this.selectedTabName = tab.name;\n }\n }\n\n /**\n * This method is used by `tab` component to unregister them self to the tab group.\n * @param tab BlTab reference to be unregistered\n */\n unregisterTab(tab: BlTab) {\n this._connectedTabs.splice(this._connectedTabs.indexOf(tab), 1);\n if (tab.selected) {\n this._connectedTabs.find(t => !t.disabled)?.select();\n }\n }\n\n /**\n * This method is used by `tab-panel` component to register them self to the tab group.\n * @param panel BlTabPanel reference to be registered\n */\n registerTabPanel(panel: BlTabPanel) {\n panel.visible = panel.tab === this.selectedTabName;\n this._connectedPanels.push(panel);\n }\n\n /**\n * This method is used by `tab-panel` component to unregister them self to the tab group.\n * @param panel BlTabPanel reference to be unregistered\n */\n unregisterTabPanel(panel: BlTabPanel) {\n this._connectedTabs.splice(this._connectedPanels.indexOf(panel), 1);\n }\n\n private _selectedTabName: string;\n\n get selectedTabName() {\n return this._selectedTabName;\n }\n\n set selectedTabName(name: string) {\n this._selectedTabName = name;\n this._connectedTabs.forEach(t => {\n t.selected = name === t.name;\n });\n this._connectedPanels.forEach(p => {\n p.visible = p.tab === this._selectedTabName;\n });\n }\n\n private _handleTabSelected(e: CustomEvent) {\n this.selectedTabName = e.detail;\n }\n\n render(): TemplateResult {\n return html` <div class=\"container\" @bl-tab-selected=\"${this._handleTabSelected}\">\n <div role=\"tablist\" class=\"tabs-list\">\n <div class=\"tabs\">\n <slot name=\"tabs\"></slot>\n </div>\n </div>\n <div role=\"tabpanel\" class=\"panels\">\n <slot></slot>\n </div>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-tab-group': BlTabGroup;\n }\n}\n"],
|
|
5
|
-
"mappings": "qGACO,IAAMA,EAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBfC,EAAQF,ECPf,IAAqBG,EAArB,cAAwCC,CAAW,CAAnD,kCAKE,KAAQ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,CADCC,EAAc,cAAc,GACRZ",
|
|
6
|
-
"names": ["styles", "r", "bl_tab_group_default", "BlTabGroup", "s", "bl_tab_group_default", "tab", "isFirstAndNotDisabled", "t", "_a", "panel", "name", "p", "$", "__decorateClass", "n"]
|
|
7
|
-
}
|
package/dist/chunk-5AGXQPQY.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{a as o,b as s,e as a,f as p,g as l}from"./chunk-BEHH5JPC.js";import{a as r}from"./chunk-NZ3RGSR6.js";var u=o`:host {
|
|
2
|
-
display: none;
|
|
3
|
-
|
|
4
|
-
/* FIXME: use variables */
|
|
5
|
-
border-radius: 0 0 6px 6px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:host([visible]) {
|
|
9
|
-
display: block;
|
|
10
|
-
padding: var(--bl-size-xl);
|
|
11
|
-
background-color: var(--bl-color-primary-background);
|
|
12
|
-
}
|
|
13
|
-
`,i=u;var t=class extends a{constructor(){super(...arguments);this.visible=!1}static get styles(){return[i]}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{var e;this.tabGroup=this.closest("bl-tab-group"),(e=this.tabGroup)==null||e.registerTabPanel(this)})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.tabGroup)==null||e.unregisterTabPanel(this)}render(){return s`<slot></slot>`}};r([l({type:String,reflect:!0})],t.prototype,"tab",2),r([l({type:Boolean,reflect:!0})],t.prototype,"visible",2),t=r([p("bl-tab-panel")],t);export{t as a};
|
|
14
|
-
//# sourceMappingURL=chunk-5AGXQPQY.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/tab-group/tab-panel/bl-tab-panel.css", "../src/components/tab-group/tab-panel/bl-tab-panel.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host {\n display: none;\n\n /* FIXME: use variables */\n border-radius: 0 0 6px 6px;\n}\n\n:host([visible]) {\n display: block;\n padding: var(--bl-size-xl);\n background-color: var(--bl-color-primary-background);\n}\n`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport styles from './bl-tab-panel.css';\nimport type BlTabGroup from '../bl-tab-group';\n\n/**\n * @tag bl-tab-panel\n * @summary Baklava Tab panel component\n */\n@customElement('bl-tab-panel')\nexport default class BlTabPanel extends LitElement {\n static get styles(): CSSResultGroup {\n return [styles];\n }\n\n private tabGroup: BlTabGroup | null;\n\n connectedCallback() {\n super.connectedCallback();\n\n this.updateComplete.then(() => {\n this.tabGroup = this.closest('bl-tab-group');\n // FIXME: We need to warn if parent is not tab-group\n this.tabGroup?.registerTabPanel(this);\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.tabGroup?.unregisterTabPanel(this);\n }\n\n /**\n * Name of the linked tab.\n */\n @property({ type: String, reflect: true })\n tab: string;\n\n /**\n * This attribute set by `tab-group` to make panel visible or hidden.\n */\n @property({ type: Boolean, reflect: true })\n visible = false;\n\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-tab-panel': BlTabPanel;\n }\n}\n"],
|
|
5
|
-
"mappings": "4GACO,IAAMA,EAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAafC,EAAQF,ECJf,IAAqBG,EAArB,cAAwCC,CAAW,CAAnD,kCAgCE,aAAU,GA/BV,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAM,CAChB,CAIA,mBAAoB,CAClB,MAAM,kBAAkB,EAExB,KAAK,eAAe,KAAK,IAAM,CApBnC,IAAAC,EAqBM,KAAK,SAAW,KAAK,QAAQ,cAAc,GAE3CA,EAAA,KAAK,WAAL,MAAAA,EAAe,iBAAiB,KAClC,CAAC,CACH,CAEA,sBAAuB,CA3BzB,IAAAA,EA4BI,MAAM,qBAAqB,GAC3BA,EAAA,KAAK,WAAL,MAAAA,EAAe,mBAAmB,KACpC,CAcA,QAAyB,CACvB,OAAOC,gBACT,CACF,EAXEC,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAzBtBN,EA0BnB,mBAMAK,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA/BvBN,EAgCnB,uBAhCmBA,EAArBK,EAAA,CADCE,EAAc,cAAc,GACRP",
|
|
6
|
-
"names": ["styles", "r", "bl_tab_panel_default", "BlTabPanel", "s", "bl_tab_panel_default", "_a", "$", "__decorateClass", "e", "n"]
|
|
7
|
-
}
|
package/dist/chunk-675JRUTN.js
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-SQ3STNEW.js";import{a as b}from"./chunk-HLQIZBQW.js";import{a as o}from"./chunk-23UFIOHV.js";import{a as n,b as a,e as s,f as d,g as r,h as p,i as c}from"./chunk-BEHH5JPC.js";import{a as i}from"./chunk-NZ3RGSR6.js";var m=n`:host {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
width: 200px;
|
|
4
|
-
position: relative;
|
|
5
|
-
|
|
6
|
-
--bl-input-padding-vertical: var(--bl-size-2xs);
|
|
7
|
-
--bl-input-padding-horizontal: var(--bl-size-xs);
|
|
8
|
-
--bl-input-border-color: var(--bl-color-border);
|
|
9
|
-
--bl-input-icon-color: var(--bl-color-content-tertiary);
|
|
10
|
-
--bl-input-text-color: var(--bl-color-content-primary);
|
|
11
|
-
--bl-input-height: var(--bl-size-2xl);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
input {
|
|
15
|
-
outline: none;
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
height: var(--bl-input-height);
|
|
18
|
-
border: solid 1px var(--bl-input-border-color);
|
|
19
|
-
width: 100%;
|
|
20
|
-
font: var(--bl-font-title-3-regular);
|
|
21
|
-
padding: 0 var(--bl-input-padding-horizontal);
|
|
22
|
-
margin: 0;
|
|
23
|
-
border-radius: 4px;
|
|
24
|
-
color: var(--bl-input-text-color);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
bl-icon {
|
|
28
|
-
position: absolute;
|
|
29
|
-
top: var(--bl-input-padding-vertical);
|
|
30
|
-
right: var(--bl-input-padding-horizontal);
|
|
31
|
-
font-size: var(--bl-size-m);
|
|
32
|
-
z-index: 1;
|
|
33
|
-
color: var(--bl-input-icon-color);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
input:focus {
|
|
37
|
-
--bl-input-border-color: var(--bl-color-primary);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
input:focus ~ bl-icon {
|
|
41
|
-
--bl-input-icon-color: var(--bl-color-primary);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
:host([label-fixed]) bl-icon {
|
|
45
|
-
top: calc(var(--bl-input-padding-vertical) + var(--bl-size-m));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:host ::placeholder {
|
|
49
|
-
color: var(--bl-color-content-tertiary);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:host([label]) ::placeholder {
|
|
53
|
-
color: transparent;
|
|
54
|
-
transition: color ease-out 0.4s;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
:host input:focus::placeholder,
|
|
58
|
-
:host([label-fixed]) ::placeholder {
|
|
59
|
-
color: var(--bl-color-content-tertiary);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
input:disabled {
|
|
63
|
-
background-color: var(--bl-color-primary-background);
|
|
64
|
-
|
|
65
|
-
--bl-input-text-color: var(--bl-color-content-tertiary);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
input.dirty:invalid {
|
|
69
|
-
--bl-input-border-color: var(--bl-color-danger);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
input.has-icon {
|
|
73
|
-
padding-right: calc(var(--bl-size-xs) * 2 + var(--bl-size-m));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.error-icon,
|
|
77
|
-
.invalid-text {
|
|
78
|
-
display: none;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
label {
|
|
82
|
-
position: absolute;
|
|
83
|
-
top: var(--bl-input-padding-vertical);
|
|
84
|
-
left: var(--bl-input-padding-horizontal);
|
|
85
|
-
transition: all ease-in 0.2s;
|
|
86
|
-
pointer-events: none;
|
|
87
|
-
font: var(--bl-font-title-3-regular);
|
|
88
|
-
color: var(--bl-color-content-tertiary);
|
|
89
|
-
padding: 0;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
:where(input:focus, input.has-value) ~ label {
|
|
93
|
-
top: 0;
|
|
94
|
-
left: var(--bl-size-2xs);
|
|
95
|
-
transform: translateY(-50%);
|
|
96
|
-
font: var(--bl-font-form-label);
|
|
97
|
-
color: var(--bl-color-content-secondary);
|
|
98
|
-
padding: 0 var(--bl-size-3xs);
|
|
99
|
-
background-color: var(--bl-color-primary-background);
|
|
100
|
-
pointer-events: initial;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
:host([label-fixed]) {
|
|
104
|
-
padding-top: var(--bl-size-m);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
:host([label-fixed]) label {
|
|
108
|
-
top: 0;
|
|
109
|
-
left: 0;
|
|
110
|
-
transition: none;
|
|
111
|
-
transform: none;
|
|
112
|
-
pointer-events: initial;
|
|
113
|
-
font: var(--bl-font-form-label);
|
|
114
|
-
color: var(--bl-color-content-secondary);
|
|
115
|
-
padding: 0;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.dirty:invalid ~ label {
|
|
119
|
-
color: var(--bl-color-danger);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.invalid-text,
|
|
123
|
-
.help-text {
|
|
124
|
-
font: var(--bl-font-title-4-regular);
|
|
125
|
-
padding: var(--bl-size-3xs) var(--bl-input-padding-horizontal);
|
|
126
|
-
margin: 0;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.invalid-text {
|
|
130
|
-
color: var(--bl-color-danger);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.help-text {
|
|
134
|
-
color: var(--bl-color-content-secondary);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.error-icon {
|
|
138
|
-
color: var(--bl-color-danger);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.dirty:invalid ~ .invalid-text {
|
|
142
|
-
display: block;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.dirty:invalid ~ .help-text {
|
|
146
|
-
display: none;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.dirty:invalid ~ .error-icon {
|
|
150
|
-
display: inline-block;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.dirty:invalid ~ .custom-icon ~ .error-icon {
|
|
154
|
-
display: none;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.dirty:invalid ~ .custom-icon {
|
|
158
|
-
--bl-input-icon-color: var(--bl-color-danger);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
:host([size='large']) {
|
|
162
|
-
--bl-input-height: var(--bl-size-3xl);
|
|
163
|
-
--bl-input-padding-vertical: var(--bl-size-xs);
|
|
164
|
-
--bl-input-padding-horizontal: var(--bl-size-m);
|
|
165
|
-
}
|
|
166
|
-
`,h=m;var t=class extends s{constructor(){super(...arguments);this.type="text";this.required=!1;this.size="medium";this.disabled=!1;this.labelFixed=!1;this._dirty=!1}static get styles(){return[h]}reportValidity(){this._dirty=!0,this.input.checkValidity()}get dirty(){return this._dirty}get hasValue(){var e;return((e=this.input)==null?void 0:e.value.length)>0}get _invalidText(){var e;return this.customInvalidText||((e=this.input)==null?void 0:e.validationMessage)}get _invalidState(){var e;return this.input&&!((e=this.input)!=null&&e.validity.valid)}inputHandler(){var e;this.validity=(e=this.input)==null?void 0:e.validity,this.value=this.input.value,this.onInput(this.input.value)}changeHandler(){this._dirty=!0,this.onChange(this.input.value)}firstUpdated(){var e;this.validity=(e=this.input)==null?void 0:e.validity,this._invalidState&&this.requestUpdate()}render(){let e=this._invalidState?a`<p class="invalid-text">${this._invalidText}</p>`:"",v=this.helpText?a`<p class="help-text">${this.helpText}</p>`:"",u=this.icon?a` <bl-icon class="custom-icon" name="${this.icon}"></bl-icon>`:"",g=this.label?a`<label>${this.label}</label>`:"";return a`
|
|
167
|
-
<input
|
|
168
|
-
type=${this.type}
|
|
169
|
-
class=${b({dirty:this.dirty,"has-icon":this.icon||this.dirty&&this._invalidState,"has-value":this.hasValue})}
|
|
170
|
-
value=${l(this.value)}
|
|
171
|
-
placeholder="${l(this.placeholder)}"
|
|
172
|
-
minlength="${l(this.minlength)}"
|
|
173
|
-
maxlength="${l(this.maxlength)}"
|
|
174
|
-
min="${l(this.min)}"
|
|
175
|
-
max="${l(this.max)}"
|
|
176
|
-
?required=${this.required}
|
|
177
|
-
?disabled=${this.disabled}
|
|
178
|
-
@change=${this.changeHandler}
|
|
179
|
-
@input=${this.inputHandler}
|
|
180
|
-
/>
|
|
181
|
-
${g} ${u}
|
|
182
|
-
<bl-icon class="error-icon" name="alert"></bl-icon>
|
|
183
|
-
${e} ${v}
|
|
184
|
-
`}};i([c("input")],t.prototype,"input",2),i([r({})],t.prototype,"type",2),i([r({})],t.prototype,"label",2),i([r({})],t.prototype,"placeholder",2),i([r({})],t.prototype,"value",2),i([r({type:Boolean})],t.prototype,"required",2),i([r({type:Number})],t.prototype,"minlength",2),i([r({type:Number})],t.prototype,"maxlength",2),i([r({type:Number})],t.prototype,"min",2),i([r({type:Number})],t.prototype,"max",2),i([r({type:String})],t.prototype,"icon",2),i([r({type:String,reflect:!0})],t.prototype,"size",2),i([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([r({type:Boolean,attribute:"label-fixed"})],t.prototype,"labelFixed",2),i([r({type:String,attribute:"invalid-text"})],t.prototype,"customInvalidText",2),i([r({type:String,attribute:"help-text"})],t.prototype,"helpText",2),i([o("bl-change")],t.prototype,"onChange",2),i([o("bl-input")],t.prototype,"onInput",2),i([p()],t.prototype,"_dirty",2),t=i([d("bl-input")],t);export{t as a};
|
|
185
|
-
//# sourceMappingURL=chunk-675JRUTN.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/input/bl-input.css", "../src/components/input/bl-input.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host {\n display: inline-block;\n width: 200px;\n position: relative;\n\n --bl-input-padding-vertical: var(--bl-size-2xs);\n --bl-input-padding-horizontal: var(--bl-size-xs);\n --bl-input-border-color: var(--bl-color-border);\n --bl-input-icon-color: var(--bl-color-content-tertiary);\n --bl-input-text-color: var(--bl-color-content-primary);\n --bl-input-height: var(--bl-size-2xl);\n}\n\ninput {\n outline: none;\n box-sizing: border-box;\n height: var(--bl-input-height);\n border: solid 1px var(--bl-input-border-color);\n width: 100%;\n font: var(--bl-font-title-3-regular);\n padding: 0 var(--bl-input-padding-horizontal);\n margin: 0;\n border-radius: 4px;\n color: var(--bl-input-text-color);\n}\n\nbl-icon {\n position: absolute;\n top: var(--bl-input-padding-vertical);\n right: var(--bl-input-padding-horizontal);\n font-size: var(--bl-size-m);\n z-index: 1;\n color: var(--bl-input-icon-color);\n}\n\ninput:focus {\n --bl-input-border-color: var(--bl-color-primary);\n}\n\ninput:focus ~ bl-icon {\n --bl-input-icon-color: var(--bl-color-primary);\n}\n\n:host([label-fixed]) bl-icon {\n top: calc(var(--bl-input-padding-vertical) + var(--bl-size-m));\n}\n\n:host ::placeholder {\n color: var(--bl-color-content-tertiary);\n}\n\n:host([label]) ::placeholder {\n color: transparent;\n transition: color ease-out 0.4s;\n}\n\n:host input:focus::placeholder,\n:host([label-fixed]) ::placeholder {\n color: var(--bl-color-content-tertiary);\n}\n\ninput:disabled {\n background-color: var(--bl-color-primary-background);\n\n --bl-input-text-color: var(--bl-color-content-tertiary);\n}\n\ninput.dirty:invalid {\n --bl-input-border-color: var(--bl-color-danger);\n}\n\ninput.has-icon {\n padding-right: calc(var(--bl-size-xs) * 2 + var(--bl-size-m));\n}\n\n.error-icon,\n.invalid-text {\n display: none;\n}\n\nlabel {\n position: absolute;\n top: var(--bl-input-padding-vertical);\n left: var(--bl-input-padding-horizontal);\n transition: all ease-in 0.2s;\n pointer-events: none;\n font: var(--bl-font-title-3-regular);\n color: var(--bl-color-content-tertiary);\n padding: 0;\n}\n\n:where(input:focus, input.has-value) ~ label {\n top: 0;\n left: var(--bl-size-2xs);\n transform: translateY(-50%);\n font: var(--bl-font-form-label);\n color: var(--bl-color-content-secondary);\n padding: 0 var(--bl-size-3xs);\n background-color: var(--bl-color-primary-background);\n pointer-events: initial;\n}\n\n:host([label-fixed]) {\n padding-top: var(--bl-size-m);\n}\n\n:host([label-fixed]) label {\n top: 0;\n left: 0;\n transition: none;\n transform: none;\n pointer-events: initial;\n font: var(--bl-font-form-label);\n color: var(--bl-color-content-secondary);\n padding: 0;\n}\n\n.dirty:invalid ~ label {\n color: var(--bl-color-danger);\n}\n\n.invalid-text,\n.help-text {\n font: var(--bl-font-title-4-regular);\n padding: var(--bl-size-3xs) var(--bl-input-padding-horizontal);\n margin: 0;\n}\n\n.invalid-text {\n color: var(--bl-color-danger);\n}\n\n.help-text {\n color: var(--bl-color-content-secondary);\n}\n\n.error-icon {\n color: var(--bl-color-danger);\n}\n\n.dirty:invalid ~ .invalid-text {\n display: block;\n}\n\n.dirty:invalid ~ .help-text {\n display: none;\n}\n\n.dirty:invalid ~ .error-icon {\n display: inline-block;\n}\n\n.dirty:invalid ~ .custom-icon ~ .error-icon {\n display: none;\n}\n\n.dirty:invalid ~ .custom-icon {\n --bl-input-icon-color: var(--bl-color-danger);\n}\n\n:host([size='large']) {\n --bl-input-height: var(--bl-size-3xl);\n --bl-input-padding-vertical: var(--bl-size-xs);\n --bl-input-padding-horizontal: var(--bl-size-m);\n}\n`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../icon/bl-icon';\n\nimport style from './bl-input.css';\n\nexport type InputSize = 'medium' | 'large';\n/**\n * @tag bl-input\n * @summary Baklava Input component\n */\n@customElement('bl-input')\nexport default class BlInput extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query('input') private input: HTMLInputElement;\n\n /**\n * Type of the input. It's used to set `type` attribute of native input inside. Only `text` and `number` is supported for now.\n */\n @property({})\n type: 'text' | 'number' = 'text';\n\n /**\n * Sets label of the input\n */\n @property({})\n label?: string;\n\n /**\n * Sets placeholder of the input\n */\n @property({})\n placeholder?: string;\n\n /**\n * Sets initial value of the input\n */\n @property({})\n value?: string;\n\n /**\n * Makes input a mandatory field\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Sets minimum length of the input\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * Sets maximum length of the input\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * Sets the smallest number can be entered to a `number` input\n */\n @property({ type: Number })\n min?: number;\n\n /**\n * Sets the biggest number can be entered to a `number` input\n */\n @property({ type: Number })\n max?: number;\n\n /**\n * Sets the custom icon name. `bl-icon` component is used to show an icon\n */\n @property({ type: String })\n icon?: string;\n\n /**\n * Sets input size.\n */\n @property({ type: String, reflect: true })\n size?: InputSize = 'medium';\n\n /**\n * Disables the input\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Makes label as fixed positioned\n */\n @property({ type: Boolean, attribute: 'label-fixed' })\n labelFixed = false;\n\n /**\n * Set custom error message\n */\n @property({ type: String, attribute: 'invalid-text' })\n customInvalidText?: string;\n\n /**\n * Adds help text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText?: string;\n\n /**\n * Fires when an alteration to the element's value is committed by the user. Unlike the input event, the change event is not necessarily fired for each alteration to an element's value.\n */\n @event('bl-change') private onChange: EventDispatcher<string>;\n\n /**\n * Fires when the value of an input element has been changed.\n */\n @event('bl-input') private onInput: EventDispatcher<string>;\n\n /**\n * Current validity state of input\n */\n validity: ValidityState;\n\n /**\n * Runs input validation\n */\n reportValidity() {\n this._dirty = true;\n this.input.checkValidity();\n }\n\n @state() private _dirty = false;\n\n private get dirty(): boolean {\n return this._dirty;\n }\n\n private get hasValue(): boolean {\n return this.input?.value.length > 0;\n }\n\n private get _invalidText() {\n return this.customInvalidText || this.input?.validationMessage;\n }\n\n private get _invalidState() {\n return this.input && !this.input?.validity.valid;\n }\n\n private inputHandler() {\n this.validity = this.input?.validity;\n this.value = this.input.value;\n this.onInput(this.input.value);\n }\n\n private changeHandler() {\n this._dirty = true;\n this.onChange(this.input.value);\n }\n\n firstUpdated() {\n this.validity = this.input?.validity;\n if (this._invalidState) {\n this.requestUpdate();\n }\n }\n\n render(): TemplateResult {\n const invalidMessage = this._invalidState\n ? html`<p class=\"invalid-text\">${this._invalidText}</p>`\n : ``;\n const helpMessage = this.helpText ? html`<p class=\"help-text\">${this.helpText}</p>` : ``;\n const icon = this.icon\n ? html` <bl-icon class=\"custom-icon\" name=\"${this.icon}\"></bl-icon>`\n : '';\n const label = this.label ? html`<label>${this.label}</label>` : '';\n\n return html`\n <input\n type=${this.type}\n class=${classMap({\n 'dirty': this.dirty,\n 'has-icon': this.icon || (this.dirty && this._invalidState),\n 'has-value': this.hasValue,\n })}\n value=${ifDefined(this.value)}\n placeholder=\"${ifDefined(this.placeholder)}\"\n minlength=\"${ifDefined(this.minlength)}\"\n maxlength=\"${ifDefined(this.maxlength)}\"\n min=\"${ifDefined(this.min)}\"\n max=\"${ifDefined(this.max)}\"\n ?required=${this.required}\n ?disabled=${this.disabled}\n @change=${this.changeHandler}\n @input=${this.inputHandler}\n />\n ${label} ${icon}\n <bl-icon class=\"error-icon\" name=\"alert\"></bl-icon>\n ${inval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CADCE,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,GAxFlCX,EAyFnB,iCAMAS,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,GA9F/BX,EA+FnB,wBAK4BS,EAAA,CAA3BG,EAAM,WAAW,GApGCZ,EAoGS,wBAKDS,EAAA,CAA1BG,EAAM,UAAU,GAzGEZ,EAyGQ,uBAeVS,EAAA,CAAhBI,EAAM,GAxHYb,EAwHF,sBAxHEA,EAArBS,EAAA,CADCK,EAAc,UAAU,GACJd",
|
|
6
|
-
"names": ["styles", "r", "bl_input_default", "BlInput", "bl_input_default", "_a", "invalidMessage", "$", "helpMessage", "icon", "label", "o", "__decorateClass", "i", "e", "event", "t", "n"]
|
|
7
|
-
}
|
package/dist/chunk-7NRCA735.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import{a as ut}from"./chunk-HLQIZBQW.js";import{a as J}from"./chunk-23UFIOHV.js";import{a as lt,b as st,e as at,f as ct,g as ft,h as U,i as X}from"./chunk-BEHH5JPC.js";import{a as A}from"./chunk-NZ3RGSR6.js";function V(t){return t.split("-")[0]}function j(t){return t.split("-")[1]}function M(t){return["top","bottom"].includes(V(t))?"x":"y"}function Q(t){return t==="y"?"height":"width"}function pt(t,e,n){let{reference:i,floating:l}=t,r=i.x+i.width/2-l.width/2,s=i.y+i.height/2-l.height/2,o=M(e),a=Q(o),u=i[a]/2-l[a]/2,f=o==="x",c;switch(V(e)){case"top":c={x:r,y:i.y-l.height};break;case"bottom":c={x:r,y:i.y+i.height};break;case"right":c={x:i.x+i.width,y:s};break;case"left":c={x:i.x-l.width,y:s};break;default:c={x:i.x,y:i.y}}switch(j(e)){case"start":c[o]-=u*(n&&f?-1:1);break;case"end":c[o]+=u*(n&&f?-1:1)}return c}var ht=async(t,e,n)=>{let{placement:i="bottom",strategy:l="absolute",middleware:r=[],platform:s}=n,o=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:l}),{x:u,y:f}=pt(a,i,o),c=i,d={},p=0;for(let h=0;h<r.length;h++){let{name:m,fn:g}=r[h],{x:v,y:b,data:x,reset:y}=await g({x:u,y:f,initialPlacement:i,placement:c,strategy:l,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:e}});u=v!=null?v:u,f=b!=null?b:f,d={...d,[m]:{...d[m],...x}},y&&p<=50&&(p++,typeof y=="object"&&(y.placement&&(c=y.placement),y.rects&&(a=y.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:l}):y.rects),{x:u,y:f}=pt(a,c,o)),h=-1)}return{x:u,y:f,placement:c,strategy:l,middlewareData:d}};function mt(t){return typeof t!="number"?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(t):{top:t,right:t,bottom:t,left:t}}function z(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function Z(t,e){var n;e===void 0&&(e={});let{x:i,y:l,platform:r,rects:s,elements:o,strategy:a}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:d=!1,padding:p=0}=e,h=mt(p),m=o[d?c==="floating"?"reference":"floating":c],g=z(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(m)))==null||n?m:m.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(o.floating)),boundary:u,rootBoundary:f,strategy:a})),v=z(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:c==="floating"?{...s.floating,x:i,y:l}:s.reference,offsetParent:await(r.getOffsetParent==null?void 0:r.getOffsetParent(o.floating)),strategy:a}):s[c]);return{top:g.top-v.top+h.top,bottom:v.bottom-g.bottom+h.bottom,left:g.left-v.left+h.left,right:v.right-g.right+h.right}}var Dt=Math.min,Ot=Math.max;function K(t,e,n){return Ot(t,Dt(e,n))}var B=t=>({name:"arrow",options:t,async fn(e){let{element:n,padding:i=0}=t!=null?t:{},{x:l,y:r,placement:s,rects:o,platform:a}=e;if(n==null)return{};let u=mt(i),f={x:l,y:r},c=M(s),d=j(s),p=Q(c),h=await a.getDimensions(n),m=c==="y"?"top":"left",g=c==="y"?"bottom":"right",v=o.reference[p]+o.reference[c]-f[c]-o.floating[p],b=f[c]-o.reference[c],x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(n)),y=x?c==="y"?x.clientHeight||0:x.clientWidth||0:0;y===0&&(y=o.floating[p]);let _=v/2-b/2,S=u[m],k=y-h[p]-u[g],w=y/2-h[p]/2+_,P=K(S,w,k),D=(d==="start"?u[m]:u[g])>0&&w!==P&&o.reference[p]<=o.floating[p];return{[c]:f[c]-(D?w<S?S-w:k-w:0),data:{[c]:P,centerOffset:w-P}}}}),kt={left:"right",right:"left",bottom:"top",top:"bottom"};function Y(t){return t.replace(/left|right|bottom|top/g,e=>kt[e])}function Wt(t,e,n){n===void 0&&(n=!1);let i=j(t),l=M(t),r=Q(l),s=l==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=Y(s)),{main:s,cross:Y(s)}}var zt={start:"end",end:"start"};function dt(t){return t.replace(/start|end/g,e=>zt[e])}var Vt=["top","right","bottom","left"],Yt=Vt.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]);var tt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n;let{placement:i,middlewareData:l,rects:r,initialPlacement:s,platform:o,elements:a}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:c,fallbackStrategy:d="bestFit",flipAlignment:p=!0,...h}=t,m=V(i),g=c||(m===s||!p?[Y(s)]:function(w){let P=Y(w);return[dt(w),P,dt(P)]}(s)),v=[s,...g],b=await Z(e,h),x=[],y=((n=l.flip)==null?void 0:n.overflows)||[];if(u&&x.push(b[m]),f){let{main:w,cross:P}=Wt(i,r,await(o.isRTL==null?void 0:o.isRTL(a.floating)));x.push(b[w],b[P])}if(y=[...y,{placement:i,overflows:x}],!x.every(w=>w<=0)){var _,S;let w=((_=(S=l.flip)==null?void 0:S.index)!=null?_:0)+1,P=v[w];if(P)return{data:{index:w,overflows:y},reset:{placement:P}};let D="bottom";switch(d){case"bestFit":{var k;let rt=(k=y.map(F=>[F,F.overflows.filter(W=>W>0).reduce((W,St)=>W+St,0)]).sort((F,W)=>F[1]-W[1])[0])==null?void 0:k[0].placement;rt&&(D=rt);break}case"initialPlacement":D=s}if(i!==D)return{reset:{placement:D}}}return{}}}};var et=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){let{x:n,y:i}=e,l=await async function(r,s){let{placement:o,platform:a,elements:u}=r,f=await(a.isRTL==null?void 0:a.isRTL(u.floating)),c=V(o),d=j(o),p=M(o)==="x",h=["left","top"].includes(c)?-1:1,m=f&&p?-1:1,g=typeof s=="function"?s(r):s,{mainAxis:v,crossAxis:b,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return d&&typeof x=="number"&&(b=d==="end"?-1*x:x),p?{x:b*m,y:v*h}:{x:v*h,y:b*m}}(e,t);return{x:n+l.x,y:i+l.y,data:l}}}};function Mt(t){return t==="x"?"y":"x"}var ot=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:l}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:o={fn:g=>{let{x:v,y:b}=g;return{x:v,y:b}}},...a}=t,u={x:n,y:i},f=await Z(e,a),c=M(V(l)),d=Mt(c),p=u[c],h=u[d];if(r){let g=c==="y"?"bottom":"right";p=K(p+f[c==="y"?"top":"left"],p,p-f[g])}if(s){let g=d==="y"?"bottom":"right";h=K(h+f[d==="y"?"top":"left"],h,h-f[g])}let m=o.fn({...e,[c]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-i}}}}};function xt(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function E(t){if(t==null)return window;if(!xt(t)){let e=t.ownerDocument;return e&&e.defaultView||window}return t}function $(t){return E(t).getComputedStyle(t)}function T(t){return xt(t)?"":t?(t.nodeName||"").toLowerCase():""}function Rt(){let t=navigator.userAgentData;return t!=null&&t.brands?t.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function L(t){return t instanceof E(t).HTMLElement}function O(t){return t instanceof E(t).Element}function it(t){return typeof ShadowRoot>"u"?!1:t instanceof E(t).ShadowRoot||t instanceof ShadowRoot}function G(t){let{overflow:e,overflowX:n,overflowY:i}=$(t);return/auto|scroll|overlay|hidden/.test(e+i+n)}function Nt(t){return["table","td","th"].includes(T(t))}function gt(t){let e=/firefox/i.test(Rt()),n=$(t);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||e&&n.willChange==="filter"||e&&!!n.filter&&n.filter!=="none"}function Pt(){return!/^((?!chrome|android).)*safari/i.test(Rt())}var yt=Math.min,N=Math.max,q=Math.round;function H(t,e,n){var i,l,r,s;e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),a=1,u=1;e&&L(t)&&(a=t.offsetWidth>0&&q(o.width)/t.offsetWidth||1,u=t.offsetHeight>0&&q(o.height)/t.offsetHeight||1);let f=O(t)?E(t):window,c=!Pt()&&n,d=(o.left+(c&&(i=(l=f.visualViewport)==null?void 0:l.offsetLeft)!=null?i:0))/a,p=(o.top+(c&&(r=(s=f.visualViewport)==null?void 0:s.offsetTop)!=null?r:0))/u,h=o.width/a,m=o.height/u;return{width:h,height:m,top:p,right:d+h,bottom:p+m,left:d,x:d,y:p}}function C(t){return(e=t,(e instanceof E(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function I(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function At(t){return H(C(t)).left+I(t).scrollLeft}function $t(t,e,n){let i=L(e),l=C(e),r=H(t,i&&function(a){let u=H(a);return q(u.width)!==a.offsetWidth||q(u.height)!==a.offsetHeight}(e),n==="fixed"),s={scrollLeft:0,scrollTop:0},o={x:0,y:0};if(i||!i&&n!=="fixed")if((T(e)!=="body"||G(l))&&(s=I(e)),L(e)){let a=H(e,!0);o.x=a.x+e.clientLeft,o.y=a.y+e.clientTop}else l&&(o.x=At(l));return{x:r.left+s.scrollLeft-o.x,y:r.top+s.scrollTop-o.y,width:r.width,height:r.height}}function Lt(t){return T(t)==="html"?t:t.assignedSlot||t.parentNode||(it(t)?t.host:null)||C(t)}function vt(t){return L(t)&&getComputedStyle(t).position!=="fixed"?t.offsetParent:null}function nt(t){let e=E(t),n=vt(t);for(;n&&Nt(n)&&getComputedStyle(n).position==="static";)n=vt(n);return n&&(T(n)==="html"||T(n)==="body"&&getComputedStyle(n).position==="static"&&!gt(n))?e:n||function(i){let l=Lt(i);for(it(l)&&(l=l.host);L(l)&&!["html","body"].includes(T(l));){if(gt(l))return l;l=l.parentNode}return null}(t)||e}function wt(t){if(L(t))return{width:t.offsetWidth,height:t.offsetHeight};let e=H(t);return{width:e.width,height:e.height}}function Tt(t){let e=Lt(t);return["html","body","#document"].includes(T(e))?t.ownerDocument.body:L(e)&&G(e)?e:Tt(e)}function Et(t,e){var n;e===void 0&&(e=[]);let i=Tt(t),l=i===((n=t.ownerDocument)==null?void 0:n.body),r=E(i),s=l?[r].concat(r.visualViewport||[],G(i)?i:[]):i,o=e.concat(s);return l?o:o.concat(Et(s))}function bt(t,e,n){return e==="viewport"?z(function(i,l){let r=E(i),s=C(i),o=r.visualViewport,a=s.clientWidth,u=s.clientHeight,f=0,c=0;if(o){a=o.width,u=o.height;let d=Pt();(d||!d&&l==="fixed")&&(f=o.offsetLeft,c=o.offsetTop)}return{width:a,height:u,x:f,y:c}}(t,n)):O(e)?function(i,l){let r=H(i,!1,l==="fixed"),s=r.top+i.clientTop,o=r.left+i.clientLeft;return{top:s,left:o,x:o,y:s,right:o+i.clientWidth,bottom:s+i.clientHeight,width:i.clientWidth,height:i.clientHeight}}(e,n):z(function(i){var l;let r=C(i),s=I(i),o=(l=i.ownerDocument)==null?void 0:l.body,a=N(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),u=N(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-s.scrollLeft+At(i),c=-s.scrollTop;return $(o||r).direction==="rtl"&&(f+=N(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:u,x:f,y:c}}(C(t)))}function _t(t){let e=Et(t),n=["absolute","fixed"].includes($(t).position)&&L(t)?nt(t):t;return O(n)?e.filter(i=>O(i)&&function(l,r){let s=r.getRootNode==null?void 0:r.getRootNode();if(l.contains(r))return!0;if(s&&it(s)){let o=r;do{if(o&&l===o)return!0;o=o.parentNode||o.host}while(o)}return!1}(i,n)&&T(i)!=="body"):[]}var Ft={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:l}=t,r=[...n==="clippingAncestors"?_t(e):[].concat(n),i],s=r[0],o=r.reduce((a,u)=>{let f=bt(e,u,l);return a.top=N(f.top,a.top),a.right=yt(f.right,a.right),a.bottom=yt(f.bottom,a.bottom),a.left=N(f.left,a.left),a},bt(e,s,l));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:i}=t,l=L(n),r=C(n);if(n===r)return e;let s={scrollLeft:0,scrollTop:0},o={x:0,y:0};if((l||!l&&i!=="fixed")&&((T(n)!=="body"||G(r))&&(s=I(n)),L(n))){let a=H(n,!0);o.x=a.x+n.clientLeft,o.y=a.y+n.clientTop}return{...e,x:e.x-s.scrollLeft+o.x,y:e.y-s.scrollTop+o.y}},isElement:O,getDimensions:wt,getOffsetParent:nt,getDocumentElement:C,getElementRects:t=>{let{reference:e,floating:n,strategy:i}=t;return{reference:$t(e,nt(n),i),floating:{...wt(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>$(t).direction==="rtl"};var Ct=(t,e,n)=>ht(t,e,{platform:Ft,...n});var Xt=lt`:host {
|
|
2
|
-
--bl-tooltip-position: absolute;
|
|
3
|
-
--bl-tooltip-visibility: hidden;
|
|
4
|
-
--bl-tooltip-left: 0;
|
|
5
|
-
--bl-tooltip-top: 0;
|
|
6
|
-
--bl-tooltip-arrow-top: 0;
|
|
7
|
-
--bl-tooltip-arrow-bottom: 0;
|
|
8
|
-
--bl-tooltip-arrow-right: 0;
|
|
9
|
-
--bl-tooltip-arrow-left: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.trigger {
|
|
13
|
-
display: inline-block;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.tooltip {
|
|
18
|
-
position: var(--bl-tooltip-position);
|
|
19
|
-
box-sizing: border-box;
|
|
20
|
-
border: none;
|
|
21
|
-
background-color: var(--bl-color-secondary);
|
|
22
|
-
color: var(--bl-color-primary-background);
|
|
23
|
-
border-radius: var(--bl-size-3xs);
|
|
24
|
-
pointer-events: none;
|
|
25
|
-
font: var(--bl-font-title-3-regular);
|
|
26
|
-
padding: var(--bl-size-m);
|
|
27
|
-
left: var(--bl-tooltip-left);
|
|
28
|
-
top: var(--bl-tooltip-top);
|
|
29
|
-
visibility: var(--bl-tooltip-visibility);
|
|
30
|
-
z-index: 999;
|
|
31
|
-
max-width: 424px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.arrow {
|
|
35
|
-
position: absolute;
|
|
36
|
-
background-color: var(--bl-color-secondary);
|
|
37
|
-
width: var(--bl-size-2xs);
|
|
38
|
-
height: var(--bl-size-2xs);
|
|
39
|
-
transform: rotate(45deg);
|
|
40
|
-
top: var(--bl-tooltip-arrow-top);
|
|
41
|
-
bottom: var(--bl-tooltip-arrow-bottom);
|
|
42
|
-
right: var(--bl-tooltip-arrow-right);
|
|
43
|
-
left: var(--bl-tooltip-arrow-left);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.visible {
|
|
47
|
-
--bl-tooltip-visibility: visible;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.hidden {
|
|
51
|
-
--bl-tooltip-visibility: hidden;
|
|
52
|
-
}
|
|
53
|
-
`,Ht=Xt;var R=class extends at{constructor(){super(...arguments);this.placement="top";this._visible=!1;this._position="absolute"}static get styles(){return[Ht]}connectedCallback(){super.connectedCallback(),setTimeout(()=>{this._position=getComputedStyle(this).getPropertyValue("--bl-tooltip-position")})}setTooltip(){Ct(this.trigger,this.tooltip,{placement:this.placement,strategy:this._position,middleware:[et(8),ot({padding:5}),tt(),B({element:this.arrow,padding:5})]}).then(({x:n,y:i,placement:l,middlewareData:r})=>{var c,d,p,h;let s=((c=r.arrow)==null?void 0:c.x)!=null?`${(d=r.arrow)==null?void 0:d.x}px`:" ",o=((p=r.arrow)==null?void 0:p.y)!=null?`${(h=r.arrow)==null?void 0:h.y}px`:" ",a={top:"bottom",right:"left",bottom:"top",left:"right"},u=l.split("-")[0],f=a[u];this.style.setProperty("--bl-tooltip-left",`${n}px`),this.style.setProperty("--bl-tooltip-top",`${i}px`),this.style.setProperty("--bl-tooltip-arrow-left",s),this.style.setProperty("--bl-tooltip-arrow-top",o),this.style.setProperty("--bl-tooltip-arrow-bottom","0"),this.style.setProperty("--bl-tooltip-arrow-right","0"),this.style.setProperty(`--bl-tooltip-arrow-${f}`,"-4px")})}show(){this._visible=!0,this.setTooltip(),this.onShow("Show event fired!")}hide(){this._visible=!1,this.onHide("Hide event fired!")}render(){let n=ut({tooltip:!0,visible:this._visible});return st` <slot
|
|
54
|
-
class="trigger"
|
|
55
|
-
name="tooltip-trigger"
|
|
56
|
-
@mouseover="${this.show}"
|
|
57
|
-
@mouseleave="${this.hide}"
|
|
58
|
-
>
|
|
59
|
-
</slot>
|
|
60
|
-
<div class=${n}>
|
|
61
|
-
<slot></slot>
|
|
62
|
-
<div class="arrow"></div>
|
|
63
|
-
</div>`}};A([X(".tooltip")],R.prototype,"tooltip",2),A([X(".trigger")],R.prototype,"trigger",2),A([X(".arrow")],R.prototype,"arrow",2),A([ft({type:String})],R.prototype,"placement",2),A([U()],R.prototype,"_visible",2),A([U()],R.prototype,"_position",2),A([J("bl-tooltip-show")],R.prototype,"onShow",2),A([J("bl-tooltip-hide")],R.prototype,"onHide",2),R=A([ct("bl-tooltip")],R);export{R as a};
|
|
64
|
-
//# sourceMappingURL=chunk-7NRCA735.js.map
|