@trendyol/baklava 2.0.0-beta.22 → 2.0.0-beta.25
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/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/baklava-react.js +1 -1
- package/dist/baklava-react.js.map +3 -3
- package/dist/baklava.js +1 -1
- package/dist/chunk-5YWWSNRQ.js +30 -0
- package/dist/chunk-5YWWSNRQ.js.map +7 -0
- package/dist/chunk-AS43M6VT.js +24 -0
- package/dist/chunk-AS43M6VT.js.map +7 -0
- package/dist/chunk-CEIAWSNF.js +11 -0
- package/dist/chunk-CEIAWSNF.js.map +7 -0
- package/dist/chunk-DCSIJZKF.js +2 -0
- package/dist/chunk-DCSIJZKF.js.map +7 -0
- package/dist/chunk-DJNJ4CN4.js +7 -0
- package/dist/chunk-DJNJ4CN4.js.map +7 -0
- package/dist/chunk-DT3I7BV7.js +18 -0
- package/dist/chunk-DT3I7BV7.js.map +7 -0
- package/dist/chunk-E2DT737L.js +7 -0
- package/dist/{chunk-SQ3STNEW.js.map → chunk-E2DT737L.js.map} +0 -0
- package/dist/chunk-E6WXDMOY.js +5 -0
- package/dist/chunk-E6WXDMOY.js.map +7 -0
- package/dist/{chunk-BVALTOFF.js → chunk-RLRHLKBD.js} +2 -48
- package/dist/{chunk-BVALTOFF.js.map → chunk-RLRHLKBD.js.map} +2 -2
- package/dist/chunk-S7TTXZFP.js +17 -0
- package/dist/{chunk-BEHH5JPC.js.map → chunk-S7TTXZFP.js.map} +2 -2
- package/dist/chunk-SJW4HPSY.js +7 -0
- package/dist/{chunk-DGRXEOW7.js.map → chunk-SJW4HPSY.js.map} +2 -2
- package/dist/chunk-VX2FHEEO.js +25 -0
- package/dist/chunk-VX2FHEEO.js.map +7 -0
- package/dist/{chunk-HLQIZBQW.js → chunk-W53DEGK2.js} +2 -2
- package/dist/{chunk-HLQIZBQW.js.map → chunk-W53DEGK2.js.map} +0 -0
- package/dist/components/alert/bl-alert.js +2 -0
- package/dist/components/alert/bl-alert.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 +100 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/default.css.map +2 -2
- package/package.json +9 -24
- 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-AMTKE3PJ.js +0 -43
- package/dist/chunk-AMTKE3PJ.js.map +0 -7
- package/dist/chunk-BEHH5JPC.js +0 -17
- package/dist/chunk-DGRXEOW7.js +0 -21
- package/dist/chunk-DP5CC6SR.js +0 -185
- package/dist/chunk-DP5CC6SR.js.map +0 -7
- package/dist/chunk-FP5POXZC.js +0 -57
- package/dist/chunk-FP5POXZC.js.map +0 -7
- package/dist/chunk-RSHPTQX4.js +0 -148
- package/dist/chunk-RSHPTQX4.js.map +0 -7
- package/dist/chunk-SQ3STNEW.js +0 -7
|
@@ -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 ${inv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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-AMTKE3PJ.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import{a as i,b as l,e as o,f as u,g as a,h as s,i as p}from"./chunk-BEHH5JPC.js";import{a as r}from"./chunk-NZ3RGSR6.js";var v=i`.progress-indicator {
|
|
2
|
-
--max: 100;
|
|
3
|
-
--value: 0;
|
|
4
|
-
--value-color: var(--bl-color-success);
|
|
5
|
-
--height: var(--bl-size-2xs);
|
|
6
|
-
--radius: var(--bl-size-3xs);
|
|
7
|
-
|
|
8
|
-
position: relative;
|
|
9
|
-
background-color: var(--bl-color-secondary-background);
|
|
10
|
-
height: var(--height);
|
|
11
|
-
border-radius: var(--radius);
|
|
12
|
-
width: 100%;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.progress-indicator::before {
|
|
16
|
-
content: '';
|
|
17
|
-
position: absolute;
|
|
18
|
-
height: 100%;
|
|
19
|
-
width: calc(100% / var(--max) * var(--value));
|
|
20
|
-
background-color: var(--value-color);
|
|
21
|
-
border-radius: var(--radius);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:host([size='small']) .progress-indicator {
|
|
25
|
-
--height: var(--bl-size-3xs);
|
|
26
|
-
--radius: var(--bl-size-4xs);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:host([size='large']) .progress-indicator {
|
|
30
|
-
--height: var(--bl-size-xs);
|
|
31
|
-
--radius: 6px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host([failed]) .progress-indicator {
|
|
35
|
-
--value-color: var(--bl-color-danger);
|
|
36
|
-
}
|
|
37
|
-
`,m=v;var e=class extends o{constructor(){super(...arguments);this.size="medium";this.failed=!1;this._max=100;this._value=0}static get styles(){return m}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
|
|
38
|
-
class="progress-indicator"
|
|
39
|
-
role="progressbar"
|
|
40
|
-
aria-valuemax="${this._max}"
|
|
41
|
-
aria-valuenow="${this._value}"
|
|
42
|
-
></div>`}};r([p(".progress-indicator")],e.prototype,"wrapper",2),r([a({type:String})],e.prototype,"size",2),r([a({type:Boolean})],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};
|
|
43
|
-
//# sourceMappingURL=chunk-AMTKE3PJ.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
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 {\n --max: 100;\n --value: 0;\n --value-color: var(--bl-color-success);\n --height: var(--bl-size-2xs);\n --radius: var(--bl-size-3xs);\n\n position: relative;\n background-color: var(--bl-color-secondary-background);\n height: var(--height);\n border-radius: var(--radius);\n width: 100%;\n}\n\n.progress-indicator::before {\n content: '';\n position: absolute;\n height: 100%;\n width: calc(100% / var(--max) * var(--value));\n background-color: var(--value-color);\n border-radius: var(--radius);\n}\n\n:host([size='small']) .progress-indicator {\n --height: var(--bl-size-3xs);\n --radius: var(--bl-size-4xs);\n}\n\n:host([size='large']) .progress-indicator {\n --height: var(--bl-size-xs);\n --radius: 6px;\n}\n\n:host([failed]) .progress-indicator {\n --value-color: var(--bl-color-danger);\n}\n`;\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 * @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 })\n size: ProgressIndicatorSize = 'medium';\n\n /**\n * Sets the status\n */\n @property({ type: Boolean })\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-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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G,EAAM,GA3CYT,EA2CF,oBACAM,EAAA,CAAhBG,EAAM,GA5CYT,EA4CF,sBA5CEA,EAArBM,EAAA,CADCI,EAAc,uBAAuB,GACjBV",
|
|
6
|
-
"names": ["styles", "r", "bl_progress_indicator_default", "BlProgressIndicator", "s", "bl_progress_indicator_default", "max", "value", "$", "__decorateClass", "i", "e", "t", "n"]
|
|
7
|
-
}
|
package/dist/chunk-BEHH5JPC.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var M,E=globalThis.trustedTypes,G=E?E.createPolicy("lit-html",{createHTML:o=>o}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,st="?"+m,$t=`<${st}>`,b=document,U=(o="")=>b.createComment(o),T=o=>o===null||typeof o!="object"&&typeof o!="function",ot=Array.isArray,mt=o=>{var t;return ot(o)||typeof((t=o)===null||t===void 0?void 0:t[Symbol.iterator])=="function"},P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Q=/-->/g,X=/>/g,f=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,Y=/'/g,tt=/"/g,rt=/^(?:script|style|textarea|title)$/i,nt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),St=nt(1),Et=nt(2),y=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),et=new WeakMap,lt=(o,t,e)=>{var i,s;let r=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t,n=r._$litPart$;if(n===void 0){let h=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:null;r._$litPart$=n=new g(t.insertBefore(U(),h),h,void 0,e!=null?e:{})}return n._$AI(o),n},S=b.createTreeWalker(b,129,null,!1),ft=(o,t)=>{let e=o.length-1,i=[],s,r=t===2?"<svg>":"",n=P;for(let l=0;l<e;l++){let a=o[l],p,d,c=-1,v=0;for(;v<a.length&&(n.lastIndex=v,d=n.exec(a),d!==null);)v=n.lastIndex,n===P?d[1]==="!--"?n=Q:d[1]!==void 0?n=X:d[2]!==void 0?(rt.test(d[2])&&(s=RegExp("</"+d[2],"g")),n=f):d[3]!==void 0&&(n=f):n===f?d[0]===">"?(n=s!=null?s:P,c=-1):d[1]===void 0?c=-2:(c=n.lastIndex-d[2].length,p=d[1],n=d[3]===void 0?f:d[3]==='"'?tt:Y):n===tt||n===Y?n=f:n===Q||n===X?n=P:(n=f,s=void 0);let H=n===f&&o[l+1].startsWith("/>")?" ":"";r+=n===P?a+$t:c>=0?(i.push(p),a.slice(0,c)+"$lit$"+a.slice(c)+m+H):a+m+(c===-2?(i.push(void 0),l):H)}let h=r+(o[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return[G!==void 0?G.createHTML(h):h,i]},_=class{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,n=0,h=t.length-1,l=this.parts,[a,p]=ft(t,e);if(this.el=_.createElement(a,i),S.currentNode=this.el.content,e===2){let d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(s=S.nextNode())!==null&&l.length<h;){if(s.nodeType===1){if(s.hasAttributes()){let d=[];for(let c of s.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(m)){let v=p[n++];if(d.push(c),v!==void 0){let H=s.getAttribute(v.toLowerCase()+"$lit$").split(m),N=/([.?@])?(.*)/.exec(v);l.push({type:1,index:r,name:N[2],strings:H,ctor:N[1]==="."?z:N[1]==="?"?q:N[1]==="@"?B:w})}else l.push({type:6,index:r})}for(let c of d)s.removeAttribute(c)}if(rt.test(s.tagName)){let d=s.textContent.split(m),c=d.length-1;if(c>0){s.textContent=E?E.emptyScript:"";for(let v=0;v<c;v++)s.append(d[v],U()),S.nextNode(),l.push({type:2,index:++r});s.append(d[c],U())}}}else if(s.nodeType===8)if(s.data===st)l.push({type:2,index:r});else{let d=-1;for(;(d=s.data.indexOf(m,d+1))!==-1;)l.push({type:7,index:r}),d+=m.length-1}r++}}static createElement(t,e){let i=b.createElement("template");return i.innerHTML=t,i}};function C(o,t,e=o,i){var s,r,n,h;if(t===y)return t;let l=i!==void 0?(s=e._$Cl)===null||s===void 0?void 0:s[i]:e._$Cu,a=T(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==a&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),a===void 0?l=void 0:(l=new a(o),l._$AT(o,e,i)),i!==void 0?((n=(h=e)._$Cl)!==null&&n!==void 0?n:h._$Cl=[])[i]=l:e._$Cu=l),l!==void 0&&(t=C(o,l._$AS(o,t.values),l,i)),t}var L=class{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;let{el:{content:i},parts:s}=this._$AD,r=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:b).importNode(i,!0);S.currentNode=r;let n=S.nextNode(),h=0,l=0,a=s[0];for(;a!==void 0;){if(h===a.index){let p;a.type===2?p=new g(n,n.nextSibling,this,t):a.type===1?p=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(p=new D(n,this,t)),this.v.push(p),a=s[++l]}h!==(a==null?void 0:a.index)&&(n=S.nextNode(),h++)}return r}m(t){let e=0;for(let i of this.v)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},g=class{constructor(t,e,i,s){var r;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cg=(r=s==null?void 0:s.isConnected)===null||r===void 0||r}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=C(this,t,e),T(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==y&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):mt(t)?this.S(t):this.$(t)}A(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==u&&T(this._$AH)?this._$AA.nextSibling.data=t:this.k(b.createTextNode(t)),this._$AH=t}T(t){var e;let{values:i,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=_.createElement(s.h,this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.m(i);else{let n=new L(r,this),h=n.p(this.options);n.m(i),this.k(h),this._$AH=n}}_$AC(t){let e=et.get(t.strings);return e===void 0&&et.set(t.strings,e=new _(t)),e}S(t){ot(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,i,s=0;for(let r of t)s===e.length?e.push(i=new g(this.A(U()),this.A(U()),this,this.options)):i=e[s],i._$AI(r),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cg=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},w=class{constructor(t,e,i,s,r){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){let r=this.strings,n=!1;if(r===void 0)t=C(this,t,e,0),n=!T(t)||t!==this._$AH&&t!==y,n&&(this._$AH=t);else{let h=t,l,a;for(t=r[0],l=0;l<r.length-1;l++)a=C(this,h[i+l],e,l),a===y&&(a=this._$AH[l]),n||(n=!T(a)||a!==this._$AH[l]),a===u?t=u:t!==u&&(t+=(a!=null?a:"")+r[l+1]),this._$AH[l]=a}n&&!s&&this.C(t)}C(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},z=class extends w{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===u?void 0:t}},yt=E?E.emptyScript:"",q=class extends w{constructor(){super(...arguments),this.type=4}C(t){t&&t!==u?this.element.setAttribute(this.name,yt):this.element.removeAttribute(this.name)}},B=class extends w{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){var i;if((t=(i=C(this,t,e,0))!==null&&i!==void 0?i:u)===y)return;let s=this._$AH,r=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==u&&(s===u||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}},D=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){C(this,t)}};var it=window.litHtmlPolyfillSupport;it==null||it(_,g),((M=globalThis.litHtmlVersions)!==null&&M!==void 0?M:globalThis.litHtmlVersions=[]).push("2.2.1");var k=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,j=Symbol(),at=new Map,R=class{constructor(t,e){if(this._$cssResult$=!0,e!==j)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=at.get(this.cssText);return k&&t===void 0&&(at.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}},ht=o=>new R(typeof o=="string"?o:o+"",j),_t=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((i,s,r)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[r+1],o[0]);return new R(e,j)},I=(o,t)=>{k?o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{let i=document.createElement("style"),s=window.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,o.appendChild(i)})},O=k?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let i of t.cssRules)e+=i.cssText;return ht(e)})(o):o;var V,dt=window.trustedTypes,gt=dt?dt.emptyScript:"",ct=window.reactiveElementPolyfillSupport,W={toAttribute(o,t){switch(t){case Boolean:o=o?gt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},ut=(o,t)=>t!==o&&(t==t||o==o),K={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:ut},$=class extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;(e=this.l)!==null&&e!==void 0||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();let t=[];return this.elementProperties.forEach((e,i)=>{let s=this._$Eh(i,e);s!==void 0&&(this._$Eu.set(s,i),t.push(s))}),t}static createProperty(t,e=K){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){let i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){let r=this[t];this[e]=s,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||K}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;let t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){let e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let s of i)this.createProperty(s,e[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let s of i)e.unshift(O(s))}else t!==void 0&&e.push(O(t));return e}static _$Eh(t,e){let i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Em(),this.requestUpdate(),(t=this.constructor.l)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$Eg)!==null&&e!==void 0?e:this._$Eg=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$Eg)===null||e===void 0||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;let e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return I(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$Eg)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$Eg)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=K){var s,r;let n=this.constructor._$Eh(t,i);if(n!==void 0&&i.reflect===!0){let h=((r=(s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==null&&r!==void 0?r:W.toAttribute)(e,i.type);this._$Ei=t,h==null?this.removeAttribute(n):this.setAttribute(n,h),this._$Ei=null}}_$AK(t,e){var i,s,r;let n=this.constructor,h=n._$Eu.get(t);if(h!==void 0&&this._$Ei!==h){let l=n.getPropertyOptions(h),a=l.converter,p=(r=(s=(i=a)===null||i===void 0?void 0:i.fromAttribute)!==null&&s!==void 0?s:typeof a=="function"?a:null)!==null&&r!==void 0?r:W.fromAttribute;this._$Ei=h,this[h]=p(e,l.type),this._$Ei=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||ut)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Ei!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((s,r)=>this[r]=s),this._$Et=void 0);let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$Eg)===null||t===void 0||t.forEach(s=>{var r;return(r=s.hostUpdate)===null||r===void 0?void 0:r.call(s)}),this.update(i)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$Eg)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$ES(i,this[i],e)),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}};$.finalized=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},ct==null||ct({ReactiveElement:$}),((V=globalThis.reactiveElementVersions)!==null&&V!==void 0?V:globalThis.reactiveElementVersions=[]).push("1.3.0");var Z,J;var x=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;let i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!1)}render(){return y}};x.finalized=!0,x._$litElement$=!0,(Z=globalThis.litElementHydrateSupport)===null||Z===void 0||Z.call(globalThis,{LitElement:x});var pt=globalThis.litElementPolyfillSupport;pt==null||pt({LitElement:x});((J=globalThis.litElementVersions)!==null&&J!==void 0?J:globalThis.litElementVersions=[]).push("3.2.0");var zt=o=>t=>typeof t=="function"?((e,i)=>(window.customElements.define(e,i),i))(o,t):((e,i)=>{let{kind:s,elements:r}=i;return{kind:s,elements:r,finisher(n){window.customElements.define(e,n)}}})(o,t);var At=(o,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,o)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,o)}};function vt(o){return(t,e)=>e!==void 0?((i,s,r)=>{s.constructor.createProperty(r,i)})(o,t,e):At(o,t)}function jt(o){return vt({...o,state:!0})}var A=({finisher:o,descriptor:t})=>(e,i)=>{var s;if(i===void 0){let r=(s=e.originalKey)!==null&&s!==void 0?s:e.key,n=t!=null?{kind:"method",placement:"prototype",key:r,descriptor:t(e.key)}:{...e,key:r};return o!=null&&(n.finisher=function(h){o(h,r)}),n}{let r=e.constructor;t!==void 0&&Object.defineProperty(e,i,t(i)),o==null||o(r,i)}};function Wt(o,t){return A({descriptor:e=>{let i={get(){var s,r;return(r=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(o))!==null&&r!==void 0?r:null},enumerable:!0,configurable:!0};if(t){let s=typeof e=="symbol"?Symbol():"__"+e;i.get=function(){var r,n;return this[s]===void 0&&(this[s]=(n=(r=this.renderRoot)===null||r===void 0?void 0:r.querySelector(o))!==null&&n!==void 0?n:null),this[s]}}return i}})}var F,ee=((F=window.HTMLSlotElement)===null||F===void 0?void 0:F.prototype.assignedElements)!=null?(o,t)=>o.assignedElements(t):(o,t)=>o.assignedNodes(t).filter(e=>e.nodeType===Node.ELEMENT_NODE);export{_t as a,St as b,y as c,u as d,x as e,zt as f,vt as g,jt as h,Wt as i};
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2017 Google LLC
|
|
5
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2019 Google LLC
|
|
10
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* @license
|
|
14
|
-
* Copyright 2021 Google LLC
|
|
15
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
-
*/
|
|
17
|
-
//# sourceMappingURL=chunk-BEHH5JPC.js.map
|
package/dist/chunk-DGRXEOW7.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{a as w,b as m,c as E}from"./chunk-72IJCTLJ.js";import{a as p}from"./chunk-23UFIOHV.js";import{a as f,b as u,c as g,d as l,e as v,f as y,g as T,h as x}from"./chunk-BEHH5JPC.js";import{a as r}from"./chunk-NZ3RGSR6.js";var s=class extends E{constructor(t){if(super(t),this.it=l,t.type!==w.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===l||t==null)return this.ft=void 0,this.it=t;if(t===g)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;let i=[t];return i.raw=i,this.ft={_$litType$:this.constructor.resultType,strings:i,values:[]}}};s.directiveName="unsafeHTML",s.resultType=1;var G=m(s);var n=class extends s{};n.directiveName="unsafeSVG",n.resultType=2;var L=m(n);var P="./assets";function M(a){P=a}function $(){return P}var N=import.meta.url;N&&M(N.split("/").slice(0,-1).concat("assets").join("/"));var D=f`:host {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
position: relative;
|
|
4
|
-
width: 1em;
|
|
5
|
-
height: 1em;
|
|
6
|
-
min-width: 1em;
|
|
7
|
-
min-height: 1em;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
:host div,
|
|
11
|
-
:host svg {
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
}
|
|
15
|
-
`,b=D;var d=new Map,e=class extends v{static get styles(){return[b]}get name(){return this._iconName}set name(i){i!==this._iconName&&(this._iconName=i,this.load())}async load(){let c=`${$()}/${this.name}.svg`;d.has(c)||d.set(c,fetch(c));try{let o=await d.get(c),h=await(o==null?void 0:o.clone());h!=null&&h.ok?(this.svg=await h.text(),this.onLoad(`${this.name} icon loaded`),this.requestUpdate()):this.onError(`${this.name} icon failed to load`)}catch(o){this.onError(`${this.name} icon failed to load [${o}]`)}}render(){return u`<div aria-hidden="true">${L(this.svg)}</div>`}};r([T()],e.prototype,"name",1),r([p("bl-load")],e.prototype,"onLoad",2),r([p("bl-error")],e.prototype,"onError",2),r([x()],e.prototype,"svg",2),e=r([y("bl-icon")],e);export{M as a,$ as b,e as c};
|
|
16
|
-
/**
|
|
17
|
-
* @license
|
|
18
|
-
* Copyright 2017 Google LLC
|
|
19
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
|
-
*/
|
|
21
|
-
//# sourceMappingURL=chunk-DGRXEOW7.js.map
|
package/dist/chunk-DP5CC6SR.js
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-23UFIOHV.js";import{a as l,b as r,e as a,f as n,g as o}from"./chunk-BEHH5JPC.js";import{a as e}from"./chunk-NZ3RGSR6.js";var v=l`:host {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
background-color: var(--bl-color-primary-background);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.container {
|
|
9
|
-
--title-padding-vertical: var(--bl-size-m);
|
|
10
|
-
--title-padding-horizontal: var(--bl-size-xl);
|
|
11
|
-
--title-color: var(--bl-color-secondary);
|
|
12
|
-
--caption-color: var(--bl-color-secondary);
|
|
13
|
-
--icon-color: var(--bl-color-secondary);
|
|
14
|
-
--border-bottom-width: var(--bl-size-4xs);
|
|
15
|
-
--border-left-space: var(--bl-size-xl);
|
|
16
|
-
--font-title: var(--bl-font-title-3-medium);
|
|
17
|
-
--font-caption: var(--bl-font-title-4-regular);
|
|
18
|
-
--tab-right-padding: var(--bl-size-xl);
|
|
19
|
-
--help-container-width: var(--bl-size-2xl);
|
|
20
|
-
--tab-height: calc(var(--bl-size-3xl) + var(--bl-size-s));
|
|
21
|
-
|
|
22
|
-
display: flex;
|
|
23
|
-
border: none;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
background-color: initial;
|
|
26
|
-
width: max-content;
|
|
27
|
-
height: var(--tab-height);
|
|
28
|
-
padding: 0 var(--tab-right-padding);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.container::after {
|
|
32
|
-
position: absolute;
|
|
33
|
-
content: '';
|
|
34
|
-
right: 0;
|
|
35
|
-
top: var(--bl-size-m);
|
|
36
|
-
height: calc(100% - var(--bl-size-2xl));
|
|
37
|
-
border-right: 1px solid var(--bl-color-tertiary-hover);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
:host(:last-of-type) .container::after {
|
|
41
|
-
border-right: none;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
:host .container::before {
|
|
45
|
-
content: '';
|
|
46
|
-
position: absolute;
|
|
47
|
-
opacity: 0;
|
|
48
|
-
bottom: calc(-1 * var(--bl-size-4xs));
|
|
49
|
-
left: var(--border-left-space);
|
|
50
|
-
width: calc(100% - var(--bl-size-4xl));
|
|
51
|
-
border-bottom: var(--border-bottom-width) solid var(--bl-color-primary);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
:host([selected]:not([disabled])) .container::before {
|
|
55
|
-
opacity: 1;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
:host(:hover) .container,
|
|
59
|
-
:host([selected]) .container {
|
|
60
|
-
--title-color: var(--bl-color-primary);
|
|
61
|
-
--icon-color: var(--bl-color-primary);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
:host([disabled]) .container {
|
|
65
|
-
cursor: not-allowed;
|
|
66
|
-
|
|
67
|
-
--title-color: var(--bl-color-content-passive);
|
|
68
|
-
--caption-color: var(--bl-color-content-passive);
|
|
69
|
-
--icon-color: var(--bl-color-content-passive);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
:host(:hover) :where(.title, .icon) {
|
|
73
|
-
transition: color 120ms ease-out;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:host([selected]) .border-bottom {
|
|
77
|
-
display: inline-block;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
:host([disabled]) .container:hover {
|
|
81
|
-
cursor: not-allowed;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
:host([help-text]) button {
|
|
85
|
-
padding-right: 0;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.tab-button {
|
|
89
|
-
width: max-content;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.help-container {
|
|
93
|
-
display: flex;
|
|
94
|
-
justify-content: center;
|
|
95
|
-
align-items: center;
|
|
96
|
-
width: var(--help-container-width);
|
|
97
|
-
height: 100%;
|
|
98
|
-
font-size: var(--bl-font-size-m);
|
|
99
|
-
pointer-events: visible;
|
|
100
|
-
padding-right: var(--tab-right-padding);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
bl-tooltip {
|
|
104
|
-
--bl-tooltip-position: fixed;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.title {
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
justify-content: center;
|
|
111
|
-
font: var(--font-title);
|
|
112
|
-
color: var(--title-color);
|
|
113
|
-
line-height: var(--bl-size-m);
|
|
114
|
-
white-space: nowrap;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.title-container {
|
|
118
|
-
display: flex;
|
|
119
|
-
align-items: center;
|
|
120
|
-
justify-content: center;
|
|
121
|
-
flex-direction: column;
|
|
122
|
-
margin: auto;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.badge-container {
|
|
126
|
-
padding-left: var(--bl-size-3xs);
|
|
127
|
-
display: flex;
|
|
128
|
-
margin-bottom: 1px;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.caption {
|
|
132
|
-
font: var(--font-caption);
|
|
133
|
-
line-height: var(--bl-size-xs);
|
|
134
|
-
color: var(--caption-color);
|
|
135
|
-
text-align: center;
|
|
136
|
-
margin-top: var(--bl-size-4xs);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.icon {
|
|
140
|
-
display: flex;
|
|
141
|
-
color: var(--icon-color);
|
|
142
|
-
font-size: var(--bl-font-size-l);
|
|
143
|
-
margin-right: var(--bl-size-3xs);
|
|
144
|
-
margin-bottom: 1px;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
:host([notify]) .title::after {
|
|
148
|
-
content: '';
|
|
149
|
-
height: var(--bl-size-2xs);
|
|
150
|
-
width: var(--bl-size-2xs);
|
|
151
|
-
border-radius: var(--bl-size-3xs);
|
|
152
|
-
margin-left: var(--bl-size-3xs);
|
|
153
|
-
background-color: var(--bl-color-danger);
|
|
154
|
-
margin-bottom: 1px;
|
|
155
|
-
}
|
|
156
|
-
`,c=v;var t=class extends a{constructor(){super(...arguments);this.icon="";this.notify=!1;this.badge="";this.selected=!1;this.disabled=!1}static get styles(){return[c]}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{var i;this.tabGroup=this.closest("bl-tab-group"),(i=this.tabGroup)==null||i.registerTab(this)})}disconnectedCallback(){var i;super.disconnectedCallback(),(i=this.tabGroup)==null||i.unregisterTab(this)}select(){this._onSelect(this.name)}render(){let i=r` <slot></slot>`,b=this.helpText?r` <div class="help-container">
|
|
157
|
-
<bl-tooltip>
|
|
158
|
-
<bl-button
|
|
159
|
-
slot="tooltip-trigger"
|
|
160
|
-
icon="info"
|
|
161
|
-
variant="secondary"
|
|
162
|
-
kind="text"
|
|
163
|
-
label="${this.helpText}"
|
|
164
|
-
></bl-button>
|
|
165
|
-
${this.helpText}
|
|
166
|
-
</bl-tooltip>
|
|
167
|
-
</div>`:null,p=this.icon?r` <div class="icon">
|
|
168
|
-
<bl-icon name="${this.icon}"></bl-icon>
|
|
169
|
-
</div>`:null,d=this.badge?r` <div class="badge-container">
|
|
170
|
-
<bl-badge size="small">${this.badge}</bl-badge>
|
|
171
|
-
</div>`:null,h=this.caption?r` <div class="caption">${this.caption}</div>`:null;return r`
|
|
172
|
-
<button
|
|
173
|
-
?disabled="${this.disabled}"
|
|
174
|
-
role="tab"
|
|
175
|
-
class="container"
|
|
176
|
-
@click="${()=>this.select()}"
|
|
177
|
-
>
|
|
178
|
-
<div class="title-container">
|
|
179
|
-
<div class="title">${p} ${i} ${d}</div>
|
|
180
|
-
${h}
|
|
181
|
-
</div>
|
|
182
|
-
${b}
|
|
183
|
-
</button>
|
|
184
|
-
`}};e([o({type:String})],t.prototype,"caption",2),e([o({type:String,reflect:!0})],t.prototype,"name",2),e([o({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),e([o({type:String})],t.prototype,"icon",2),e([o({type:Boolean,reflect:!0})],t.prototype,"notify",2),e([o({type:String})],t.prototype,"badge",2),e([o({type:Boolean,reflect:!0})],t.prototype,"selected",2),e([o({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([s("bl-tab-selected")],t.prototype,"_onSelect",2),t=e([n("bl-tab")],t);export{t as a};
|
|
185
|
-
//# sourceMappingURL=chunk-DP5CC6SR.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/tab-group/tab/bl-tab.css", "../src/components/tab-group/tab/bl-tab.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host {\n position: relative;\n display: flex;\n align-items: center;\n background-color: var(--bl-color-primary-background);\n}\n\n.container {\n --title-padding-vertical: var(--bl-size-m);\n --title-padding-horizontal: var(--bl-size-xl);\n --title-color: var(--bl-color-secondary);\n --caption-color: var(--bl-color-secondary);\n --icon-color: var(--bl-color-secondary);\n --border-bottom-width: var(--bl-size-4xs);\n --border-left-space: var(--bl-size-xl);\n --font-title: var(--bl-font-title-3-medium);\n --font-caption: var(--bl-font-title-4-regular);\n --tab-right-padding: var(--bl-size-xl);\n --help-container-width: var(--bl-size-2xl);\n --tab-height: calc(var(--bl-size-3xl) + var(--bl-size-s));\n\n display: flex;\n border: none;\n cursor: pointer;\n background-color: initial;\n width: max-content;\n height: var(--tab-height);\n padding: 0 var(--tab-right-padding);\n}\n\n.container::after {\n position: absolute;\n content: '';\n right: 0;\n top: var(--bl-size-m);\n height: calc(100% - var(--bl-size-2xl));\n border-right: 1px solid var(--bl-color-tertiary-hover);\n}\n\n:host(:last-of-type) .container::after {\n border-right: none;\n}\n\n:host .container::before {\n content: '';\n position: absolute;\n opacity: 0;\n bottom: calc(-1 * var(--bl-size-4xs));\n left: var(--border-left-space);\n width: calc(100% - var(--bl-size-4xl));\n border-bottom: var(--border-bottom-width) solid var(--bl-color-primary);\n}\n\n:host([selected]:not([disabled])) .container::before {\n opacity: 1;\n}\n\n:host(:hover) .container,\n:host([selected]) .container {\n --title-color: var(--bl-color-primary);\n --icon-color: var(--bl-color-primary);\n}\n\n:host([disabled]) .container {\n cursor: not-allowed;\n\n --title-color: var(--bl-color-content-passive);\n --caption-color: var(--bl-color-content-passive);\n --icon-color: var(--bl-color-content-passive);\n}\n\n:host(:hover) :where(.title, .icon) {\n transition: color 120ms ease-out;\n}\n\n:host([selected]) .border-bottom {\n display: inline-block;\n}\n\n:host([disabled]) .container:hover {\n cursor: not-allowed;\n}\n\n:host([help-text]) button {\n padding-right: 0;\n}\n\n.tab-button {\n width: max-content;\n}\n\n.help-container {\n display: flex;\n justify-content: center;\n align-items: center;\n width: var(--help-container-width);\n height: 100%;\n font-size: var(--bl-font-size-m);\n pointer-events: visible;\n padding-right: var(--tab-right-padding);\n}\n\nbl-tooltip {\n --bl-tooltip-position: fixed;\n}\n\n.title {\n display: flex;\n align-items: center;\n justify-content: center;\n font: var(--font-title);\n color: var(--title-color);\n line-height: var(--bl-size-m);\n white-space: nowrap;\n}\n\n.title-container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n margin: auto;\n}\n\n.badge-container {\n padding-left: var(--bl-size-3xs);\n display: flex;\n margin-bottom: 1px;\n}\n\n.caption {\n font: var(--font-caption);\n line-height: var(--bl-size-xs);\n color: var(--caption-color);\n text-align: center;\n margin-top: var(--bl-size-4xs);\n}\n\n.icon {\n display: flex;\n color: var(--icon-color);\n font-size: var(--bl-font-size-l);\n margin-right: var(--bl-size-3xs);\n margin-bottom: 1px;\n}\n\n:host([notify]) .title::after {\n content: '';\n height: var(--bl-size-2xs);\n width: var(--bl-size-2xs);\n border-radius: var(--bl-size-3xs);\n margin-left: var(--bl-size-3xs);\n background-color: var(--bl-color-danger);\n margin-bottom: 1px;\n}\n`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { event, EventDispatcher } from '../../../utilities/event';\n\nimport style from './bl-tab.css';\nimport type BlTabGroup from '../bl-tab-group';\n\n/**\n * @tag bl-tab\n * @summary Baklava Tab component\n */\n@customElement('bl-tab')\nexport default class BlTab extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n private tabGroup: BlTabGroup | null;\n\n connectedCallback() {\n super.connectedCallback();\n\n this.updateComplete.then(() => {\n this.tabGroup = this.closest<BlTabGroup>('bl-tab-group');\n // FIXME: We need to warn if parent is not tab-group\n this.tabGroup?.registerTab(this);\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.tabGroup?.unregisterTab(this);\n }\n\n /**\n * Sets the caption of tab\n */\n @property({ type: String })\n caption: string;\n\n /**\n * Name of the tab that should match `tab-panel`'s `tab` attribute\n */\n @property({ type: String, reflect: true })\n name: string;\n\n /**\n * Set tooltip text. Should be set to display information icon.\n */\n @property({ type: String, attribute: 'help-text', reflect: true })\n helpText: string;\n\n /**\n * Name of the icon which display on the left side of the tab.\n */\n @property({ type: String })\n icon = '';\n\n /**\n * Shows notification dot.\n */\n @property({ type: Boolean, reflect: true })\n notify = false;\n\n /**\n * Sets the content of the badge.\n */\n @property({ type: String })\n badge = '';\n\n /**\n * Set `tab` as selected.\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * Set `tab` as disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Fires when tab is selected.\n */\n @event('bl-tab-selected') private _onSelect: EventDispatcher<string>;\n\n /**\n * Set tab selected.\n */\n select() {\n this._onSelect(this.name);\n }\n\n render(): TemplateResult {\n const title = html` <slot></slot>`;\n\n const helpTooltip = this.helpText\n ? html` <div class=\"help-container\">\n <bl-tooltip>\n <bl-button\n slot=\"tooltip-trigger\"\n icon=\"info\"\n variant=\"secondary\"\n kind=\"text\"\n label=\"${this.helpText}\"\n ></bl-button>\n ${this.helpText}\n </bl-tooltip>\n </div>`\n : null;\n\n const icon = this.icon\n ? html` <div class=\"icon\">\n <bl-icon name=\"${this.icon}\"></bl-icon>\n </div>`\n : null;\n\n const badge = this.badge\n ? html` <div class=\"badge-container\">\n <bl-badge size=\"small\">${this.badge}</bl-badge>\n </div>`\n : null;\n\n const caption = this.caption ? html` <div class=\"caption\">${this.caption}</div>` : null;\n\n return html`\n <button\n ?disabled=\"${this.disabled}\"\n role=\"tab\"\n class=\"container\"\n @click=\"${() => this.select()}\"\n >\n <div class=\"title-container\">\n <div class=\"title\">${icon} ${title} ${badge}</div>\n ${caption}\n </div>\n ${helpTooltip}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-tab': BlTab;\n }\n}\n"],
|
|
5
|
-
"mappings": "oJACO,IAAMA,EAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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KAAK;AAAA,gBAExB,KAEEG,EAAQ,KAAK,MACfH;AAAA,mCAC2B,KAAK;AAAA,gBAEhC,KAEEI,EAAU,KAAK,QAAUJ,0BAA6B,KAAK,gBAAkB,KAEnF,OAAOA;AAAA;AAAA,qBAEU,KAAK;AAAA;AAAA;AAAA,kBAGR,IAAM,KAAK,OAAO;AAAA;AAAA;AAAA,+BAGLE,KAAQH,KAASI;AAAA,YACpCC;AAAA;AAAA,UAEFH;AAAA;AAAA,KAGR,CACF,EAvGEI,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAzBPX,EA0BnB,uBAMAU,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GA/BtBX,EAgCnB,oBAMAU,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,YAAa,QAAS,EAAK,CAAC,GArC9CX,EAsCnB,wBAMAU,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GA3CPX,EA4CnB,oBAMAU,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAjDvBX,EAkDnB,sBAMAU,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAvDPX,EAwDnB,qBAMAU,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA7DvBX,EA8DnB,wBAMAU,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAnEvBX,EAoEnB,wBAKkCU,EAAA,CAAjCE,EAAM,iBAAiB,GAzELZ,EAyEe,yBAzEfA,EAArBU,EAAA,CADC,EAAc,QAAQ,GACFV",
|
|
6
|
-
"names": ["styles", "r", "bl_tab_default", "BlTab", "s", "bl_tab_default", "_a", "title", "$", "helpTooltip", "icon", "badge", "caption", "__decorateClass", "e", "event"]
|
|
7
|
-
}
|
package/dist/chunk-FP5POXZC.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{a as r,b as i,e as a,f as l,g as o}from"./chunk-BEHH5JPC.js";import{a as t}from"./chunk-NZ3RGSR6.js";var c=r`:host {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
max-width: 100%;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.badge {
|
|
7
|
-
--bg-color: var(--bl-badge-bg-color, var(--bl-color-accent-primary-background));
|
|
8
|
-
--color: var(--bl-badge-color, var(--bl-color-primary));
|
|
9
|
-
--font: var(--bl-font-title-4-medium);
|
|
10
|
-
--padding-vertical: var(--bl-size-3xs);
|
|
11
|
-
--padding-horizontal: var(--bl-size-3xs);
|
|
12
|
-
--margin-icon: var(--bl-size-3xs);
|
|
13
|
-
--icon-size: var(--bl-size-s);
|
|
14
|
-
--height: var(--bl-size-xl);
|
|
15
|
-
|
|
16
|
-
display: flex;
|
|
17
|
-
gap: var(--margin-icon);
|
|
18
|
-
justify-content: center;
|
|
19
|
-
align-items: center;
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
width: 100%;
|
|
22
|
-
border: none;
|
|
23
|
-
border-radius: var(--bl-size-4xs);
|
|
24
|
-
margin: 0;
|
|
25
|
-
padding: var(--padding-vertical) var(--padding-horizontal);
|
|
26
|
-
background-color: var(--bg-color);
|
|
27
|
-
color: var(--color, white);
|
|
28
|
-
font: var(--font);
|
|
29
|
-
font-kerning: none;
|
|
30
|
-
height: var(--height);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
:host([size='small']) .badge {
|
|
34
|
-
--font: var(--bl-font-caption-small-text);
|
|
35
|
-
--height: var(--bl-size-m);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:host([size='large']) .badge {
|
|
39
|
-
--font: var(--bl-font-title-3-medium);
|
|
40
|
-
--padding-vertical: var(--bl-size-2xs);
|
|
41
|
-
--padding-horizontal: var(--bl-size-2xs);
|
|
42
|
-
--height: var(--bl-size-2xl);
|
|
43
|
-
--icon-size: var(--bl-size-m);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:host ::slotted(bl-icon) {
|
|
47
|
-
font-size: var(--icon-size);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
:host([size='small']) bl-icon {
|
|
51
|
-
display: none;
|
|
52
|
-
}
|
|
53
|
-
`,n=c;var e=class extends a{constructor(){super(...arguments);this.size="medium"}static get styles(){return[n]}render(){let s=this.icon?i`<bl-icon name=${this.icon}></bl-icon>`:"";return i`<span class="badge">
|
|
54
|
-
<slot name="icon">${s}</slot>
|
|
55
|
-
<slot></slot>
|
|
56
|
-
</span>`}};t([o({type:String,reflect:!0})],e.prototype,"size",2),t([o({type:String})],e.prototype,"icon",2),e=t([l("bl-badge")],e);export{e as a};
|
|
57
|
-
//# sourceMappingURL=chunk-FP5POXZC.js.map
|