@descope/web-components-ui 3.20.4 → 3.21.1
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/dist/cjs/index.cjs.js +358 -25
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +358 -25
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1411.js +339 -0
- package/dist/umd/1411.js.map +1 -0
- package/dist/umd/189.js +171 -0
- package/dist/umd/189.js.map +1 -0
- package/dist/umd/2894.js +339 -0
- package/dist/umd/2894.js.map +1 -0
- package/dist/umd/3792.js +339 -0
- package/dist/umd/3792.js.map +1 -0
- package/dist/umd/{9117.js → 384.js} +121 -9
- package/dist/umd/{descope-tooltip.js.LICENSE.txt → 384.js.LICENSE.txt} +2 -2
- package/dist/umd/384.js.map +1 -0
- package/dist/umd/4268.js +339 -0
- package/dist/umd/4268.js.LICENSE.txt +11 -0
- package/dist/umd/4268.js.map +1 -0
- package/dist/umd/513.js +339 -0
- package/dist/umd/513.js.LICENSE.txt +11 -0
- package/dist/umd/513.js.map +1 -0
- package/dist/umd/6227.js +320 -0
- package/dist/umd/6227.js.map +1 -0
- package/dist/umd/6535.js +115 -0
- package/dist/umd/{9275.js.LICENSE.txt → 6535.js.LICENSE.txt} +0 -6
- package/dist/umd/6535.js.map +1 -0
- package/dist/umd/6649.js +339 -0
- package/dist/umd/6649.js.LICENSE.txt +11 -0
- package/dist/umd/6649.js.map +1 -0
- package/dist/umd/7125.js +339 -0
- package/dist/umd/7125.js.LICENSE.txt +11 -0
- package/dist/umd/7125.js.map +1 -0
- package/dist/umd/{5263.js → 8264.js} +5 -5
- package/dist/umd/8264.js.map +1 -0
- package/dist/umd/8983.js +7 -324
- package/dist/umd/8983.js.map +1 -1
- package/dist/umd/9030.js +339 -0
- package/dist/umd/9030.js.LICENSE.txt +11 -0
- package/dist/umd/9030.js.map +1 -0
- package/dist/umd/9380.js +130 -0
- package/dist/umd/9380.js.map +1 -0
- package/dist/umd/9506.js +339 -0
- package/dist/umd/9506.js.LICENSE.txt +11 -0
- package/dist/umd/9506.js.map +1 -0
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -338
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
- package/dist/umd/descope-apps-list.js +161 -1
- package/dist/umd/descope-apps-list.js.LICENSE.txt +17 -0
- package/dist/umd/descope-apps-list.js.map +1 -1
- package/dist/umd/descope-avatar.js +5 -20
- package/dist/umd/descope-avatar.js.LICENSE.txt +0 -12
- package/dist/umd/descope-avatar.js.map +1 -1
- package/dist/umd/descope-button.js +3 -3
- package/dist/umd/descope-button.js.LICENSE.txt +6 -0
- package/dist/umd/descope-button.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +4 -321
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.LICENSE.txt +0 -6
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +5 -322
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +4 -321
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.LICENSE.txt +0 -6
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.map +1 -1
- package/dist/umd/descope-multi-line-mappings.js +1 -1
- package/dist/umd/descope-multi-line-mappings.js.map +1 -1
- package/dist/umd/descope-multi-sso.js +1 -338
- package/dist/umd/descope-multi-sso.js.map +1 -1
- package/dist/umd/descope-outbound-app-button.js +1 -338
- package/dist/umd/descope-outbound-app-button.js.map +1 -1
- package/dist/umd/descope-recovery-codes.js +1 -1
- package/dist/umd/descope-recovery-codes.js.map +1 -1
- package/dist/umd/descope-timer-button.js +1 -338
- package/dist/umd/descope-timer-button.js.map +1 -1
- package/dist/umd/descope-tooltip.js +1 -2
- package/dist/umd/descope-tooltip.js.map +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -338
- package/dist/umd/descope-upload-file-index-js.js.map +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +1 -338
- package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -338
- package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
- package/dist/umd/descope-user-passkeys.js +1 -338
- package/dist/umd/descope-user-passkeys.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +42 -42
- package/dist/umd/1453.js +0 -177
- package/dist/umd/1453.js.LICENSE.txt +0 -29
- package/dist/umd/1453.js.map +0 -1
- package/dist/umd/5263.js.map +0 -1
- package/dist/umd/6063.js +0 -18
- package/dist/umd/6063.js.map +0 -1
- package/dist/umd/6818.js +0 -3
- package/dist/umd/6818.js.map +0 -1
- package/dist/umd/8248.js +0 -171
- package/dist/umd/8248.js.map +0 -1
- package/dist/umd/8968.js +0 -432
- package/dist/umd/8968.js.map +0 -1
- package/dist/umd/9117.js.map +0 -1
- package/dist/umd/9275.js +0 -18
- package/dist/umd/9275.js.map +0 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.LICENSE.txt +0 -5
- package/dist/umd/descope-multi-sso.js.LICENSE.txt +0 -5
- package/dist/umd/descope-outbound-app-button.js.LICENSE.txt +0 -5
- package/dist/umd/descope-timer-button.js.LICENSE.txt +0 -5
- package/dist/umd/descope-upload-file-index-js.js.LICENSE.txt +0 -5
- package/dist/umd/descope-user-attribute-index-js.js.LICENSE.txt +0 -5
- package/dist/umd/descope-user-passkeys.js.LICENSE.txt +0 -5
- /package/dist/umd/{8968.js.LICENSE.txt → 1411.js.LICENSE.txt} +0 -0
- /package/dist/umd/{6063.js.LICENSE.txt → 189.js.LICENSE.txt} +0 -0
- /package/dist/umd/{9117.js.LICENSE.txt → 2894.js.LICENSE.txt} +0 -0
- /package/dist/umd/{descope-user-auth-method-index-js.js.LICENSE.txt → 3792.js.LICENSE.txt} +0 -0
- /package/dist/umd/{6818.js.LICENSE.txt → 6227.js.LICENSE.txt} +0 -0
- /package/dist/umd/{5263.js.LICENSE.txt → 8264.js.LICENSE.txt} +0 -0
- /package/dist/umd/{8248.js.LICENSE.txt → 9380.js.LICENSE.txt} +0 -0
package/dist/umd/1411.js
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
/*! For license information please see 1411.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1411,3792,4268,6649,7125,9030,9506],{5745(t,e,o){o.d(e,{i:()=>r});const r=(0,o(98741).y)(t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})},7888(t,e,o){o.d(e,{f:()=>r});const r=(0,o(98741).y)(t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",t=>{this._onKeyDown(t)}),this.addEventListener("keyup",t=>{this._onKeyUp(t)})}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})},36176(t,e,o){o.d(e,{l:()=>a});var r=o(5745);const a=t=>class extends((0,r.i)(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}},89389(t,e,o){o.d(e,{$:()=>b});var r=o(13256),a=o(55774),i=o(82901),n=o(72562),s=o(81488),l=o(87550);const d=o(51450).AH`
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
position: relative;
|
|
6
|
+
outline: none;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
-webkit-user-select: none;
|
|
9
|
+
-moz-user-select: none;
|
|
10
|
+
user-select: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host([hidden]) {
|
|
14
|
+
display: none !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Aligns the button with form fields when placed on the same line.
|
|
18
|
+
Note, to make it work, the form fields should have the same "::before" pseudo-element. */
|
|
19
|
+
.vaadin-button-container::before {
|
|
20
|
+
content: '\\2003';
|
|
21
|
+
display: inline-block;
|
|
22
|
+
width: 0;
|
|
23
|
+
max-height: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.vaadin-button-container {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
text-align: center;
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
min-height: inherit;
|
|
34
|
+
text-shadow: inherit;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[part='prefix'],
|
|
38
|
+
[part='suffix'] {
|
|
39
|
+
flex: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[part='label'] {
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
text-overflow: ellipsis;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (forced-colors: active) {
|
|
49
|
+
:host {
|
|
50
|
+
outline: 1px solid;
|
|
51
|
+
outline-offset: -1px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([focused]) {
|
|
55
|
+
outline-width: 2px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([disabled]) {
|
|
59
|
+
outline-color: GrayText;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`;var c=o(84467),u=o(53149),h=o(36176);const m=t=>class extends((0,c.e)((0,h.l)((0,u.y)(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}};(0,l.SF)("vaadin-button",d,{moduleId:"vaadin-button-styles"});class b extends(m((0,n.q)((0,l.cp)((0,a.w)(r.Pu))))){static get is(){return"vaadin-button"}static get template(){return r.qy`
|
|
63
|
+
<div class="vaadin-button-container">
|
|
64
|
+
<span part="prefix" aria-hidden="true">
|
|
65
|
+
<slot name="prefix"></slot>
|
|
66
|
+
</span>
|
|
67
|
+
<span part="label">
|
|
68
|
+
<slot></slot>
|
|
69
|
+
</span>
|
|
70
|
+
<span part="suffix" aria-hidden="true">
|
|
71
|
+
<slot name="suffix"></slot>
|
|
72
|
+
</span>
|
|
73
|
+
</div>
|
|
74
|
+
<slot name="tooltip"></slot>
|
|
75
|
+
`}ready(){super.ready(),this._tooltipController=new s.I(this),this.addController(this._tooltipController)}}(0,i.X)(b)},93555(t,e,o){o.d(e,{x:()=>a}),o(64511),o(42068),o(9433),o(3241),o(83315);var r=o(87550);const a=r.AH`
|
|
76
|
+
:host {
|
|
77
|
+
/* Sizing */
|
|
78
|
+
--lumo-button-size: var(--lumo-size-m);
|
|
79
|
+
min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));
|
|
80
|
+
height: var(--_button-size);
|
|
81
|
+
padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));
|
|
82
|
+
margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
/* Style */
|
|
85
|
+
font-family: var(--lumo-font-family);
|
|
86
|
+
font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));
|
|
87
|
+
font-weight: var(--vaadin-button-font-weight, 500);
|
|
88
|
+
color: var(--_lumo-button-text-color);
|
|
89
|
+
background: var(--_lumo-button-background);
|
|
90
|
+
border: var(--vaadin-button-border, none);
|
|
91
|
+
border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));
|
|
92
|
+
cursor: var(--lumo-clickable-cursor);
|
|
93
|
+
-webkit-tap-highlight-color: transparent;
|
|
94
|
+
-webkit-font-smoothing: antialiased;
|
|
95
|
+
-moz-osx-font-smoothing: grayscale;
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
--_button-size: var(--vaadin-button-height, var(--lumo-button-size));
|
|
98
|
+
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
|
99
|
+
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
|
100
|
+
/* Used by notification */
|
|
101
|
+
--_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));
|
|
102
|
+
--_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));
|
|
103
|
+
--_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));
|
|
104
|
+
--_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Set only for the internal parts so we don't affect the host vertical alignment */
|
|
108
|
+
[part='label'],
|
|
109
|
+
[part='prefix'],
|
|
110
|
+
[part='suffix'] {
|
|
111
|
+
line-height: var(--lumo-line-height-xs);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[part='label'] {
|
|
115
|
+
padding: calc(var(--lumo-button-size) / 6) 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:host([theme~='small']) {
|
|
119
|
+
font-size: var(--lumo-font-size-s);
|
|
120
|
+
--lumo-button-size: var(--lumo-size-s);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:host([theme~='large']) {
|
|
124
|
+
font-size: var(--lumo-font-size-l);
|
|
125
|
+
--lumo-button-size: var(--lumo-size-l);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* For interaction states */
|
|
129
|
+
:host::before,
|
|
130
|
+
:host::after {
|
|
131
|
+
content: '';
|
|
132
|
+
/* We rely on the host always being relative */
|
|
133
|
+
position: absolute;
|
|
134
|
+
z-index: 1;
|
|
135
|
+
inset: 0;
|
|
136
|
+
background-color: currentColor;
|
|
137
|
+
border-radius: inherit;
|
|
138
|
+
opacity: 0;
|
|
139
|
+
pointer-events: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Hover */
|
|
143
|
+
|
|
144
|
+
@media (any-hover: hover) {
|
|
145
|
+
:host(:hover)::before {
|
|
146
|
+
opacity: 0.02;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Active */
|
|
151
|
+
|
|
152
|
+
:host::after {
|
|
153
|
+
transition: opacity 1.4s, transform 0.1s;
|
|
154
|
+
filter: blur(8px);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:host([active])::before {
|
|
158
|
+
opacity: 0.05;
|
|
159
|
+
transition-duration: 0s;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host([active])::after {
|
|
163
|
+
opacity: 0.1;
|
|
164
|
+
transition-duration: 0s, 0s;
|
|
165
|
+
transform: scale(0);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Keyboard focus */
|
|
169
|
+
|
|
170
|
+
:host([focus-ring]) {
|
|
171
|
+
box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host([theme~='primary'][focus-ring]) {
|
|
175
|
+
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Types (primary, tertiary, tertiary-inline */
|
|
179
|
+
|
|
180
|
+
:host([theme~='tertiary']),
|
|
181
|
+
:host([theme~='tertiary-inline']) {
|
|
182
|
+
--_background: transparent !important;
|
|
183
|
+
background: var(--vaadin-button-tertiary-background, var(--_background));
|
|
184
|
+
min-width: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:host([theme~='tertiary']) {
|
|
188
|
+
border: var(--vaadin-button-tertiary-border, none);
|
|
189
|
+
color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));
|
|
190
|
+
font-weight: var(--vaadin-button-tertiary-font-weight, 500);
|
|
191
|
+
padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:host([theme~='tertiary-inline'])::before {
|
|
195
|
+
display: none;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
:host([theme~='tertiary-inline']) {
|
|
199
|
+
margin: 0;
|
|
200
|
+
height: auto;
|
|
201
|
+
padding: 0;
|
|
202
|
+
line-height: inherit;
|
|
203
|
+
font-size: inherit;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
:host([theme~='tertiary-inline']) [part='label'] {
|
|
207
|
+
padding: 0;
|
|
208
|
+
overflow: visible;
|
|
209
|
+
line-height: inherit;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:host([theme~='primary']) {
|
|
213
|
+
background: var(--_lumo-button-primary-background);
|
|
214
|
+
border: var(--vaadin-button-primary-border, none);
|
|
215
|
+
color: var(--_lumo-button-primary-text-color);
|
|
216
|
+
font-weight: var(--vaadin-button-primary-font-weight, 600);
|
|
217
|
+
min-width: calc(var(--lumo-button-size) * 2.5);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
:host([theme~='primary'])::before {
|
|
221
|
+
background-color: black;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@media (any-hover: hover) {
|
|
225
|
+
:host([theme~='primary']:hover)::before {
|
|
226
|
+
opacity: 0.05;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
:host([theme~='primary'][active])::before {
|
|
231
|
+
opacity: 0.1;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
:host([theme~='primary'][active])::after {
|
|
235
|
+
opacity: 0.2;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* Colors (success, error, contrast) */
|
|
239
|
+
|
|
240
|
+
:host([theme~='success']) {
|
|
241
|
+
color: var(--lumo-success-text-color);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
:host([theme~='success'][theme~='primary']) {
|
|
245
|
+
background-color: var(--lumo-success-color);
|
|
246
|
+
color: var(--lumo-success-contrast-color);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
:host([theme~='error']) {
|
|
250
|
+
color: var(--lumo-error-text-color);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
:host([theme~='error'][theme~='primary']) {
|
|
254
|
+
background-color: var(--lumo-error-color);
|
|
255
|
+
color: var(--lumo-error-contrast-color);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
:host([theme~='contrast']) {
|
|
259
|
+
color: var(--lumo-contrast);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:host([theme~='contrast'][theme~='primary']) {
|
|
263
|
+
background-color: var(--lumo-contrast);
|
|
264
|
+
color: var(--lumo-base-color);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* Disabled state. Keep selectors after other color variants. */
|
|
268
|
+
|
|
269
|
+
:host([disabled]) {
|
|
270
|
+
pointer-events: none;
|
|
271
|
+
color: var(--lumo-disabled-text-color);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
:host([theme~='primary'][disabled]) {
|
|
275
|
+
background-color: var(--lumo-contrast-30pct);
|
|
276
|
+
color: var(--lumo-base-color);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
:host([theme~='primary'][disabled]) [part] {
|
|
280
|
+
opacity: 0.7;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* Icons */
|
|
284
|
+
|
|
285
|
+
[part] ::slotted(vaadin-icon) {
|
|
286
|
+
display: inline-block;
|
|
287
|
+
width: var(--lumo-icon-size-m);
|
|
288
|
+
height: var(--lumo-icon-size-m);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
292
|
+
[part] ::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
293
|
+
padding: 0.25em;
|
|
294
|
+
box-sizing: border-box !important;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
[part='prefix'] {
|
|
298
|
+
margin-left: -0.25em;
|
|
299
|
+
margin-right: 0.25em;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
[part='suffix'] {
|
|
303
|
+
margin-left: 0.25em;
|
|
304
|
+
margin-right: -0.25em;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/* Icon-only */
|
|
308
|
+
|
|
309
|
+
:host([theme~='icon']:not([theme~='tertiary-inline'])) {
|
|
310
|
+
min-width: var(--lumo-button-size);
|
|
311
|
+
padding-left: calc(var(--lumo-button-size) / 4);
|
|
312
|
+
padding-right: calc(var(--lumo-button-size) / 4);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
:host([theme~='icon']) [part='prefix'],
|
|
316
|
+
:host([theme~='icon']) [part='suffix'] {
|
|
317
|
+
margin-left: 0;
|
|
318
|
+
margin-right: 0;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* RTL specific styles */
|
|
322
|
+
|
|
323
|
+
:host([dir='rtl']) [part='prefix'] {
|
|
324
|
+
margin-left: 0.25em;
|
|
325
|
+
margin-right: -0.25em;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
:host([dir='rtl']) [part='suffix'] {
|
|
329
|
+
margin-left: -0.25em;
|
|
330
|
+
margin-right: 0.25em;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
:host([dir='rtl'][theme~='icon']) [part='prefix'],
|
|
334
|
+
:host([dir='rtl'][theme~='icon']) [part='suffix'] {
|
|
335
|
+
margin-left: 0;
|
|
336
|
+
margin-right: 0;
|
|
337
|
+
}
|
|
338
|
+
`;(0,r.SF)("vaadin-button",a,{moduleId:"lumo-button"})},83799(t,e,o){o(93555),o(89389)}}]);
|
|
339
|
+
//# sourceMappingURL=1411.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1411.js","mappings":";oLAYO,MAAAA,GAAsB,WAAAC,GAC7BC,GACA,cAAAA,EACA,qBAAAC,GACA,OAIAC,SAAA,CACAC,KAAAC,QACAC,OAAA,EACAC,SAAA,mBACAC,oBAAA,GAGA,CAMA,gBAAAC,CAAAN,GACAO,KAAAC,iBAAAR,EACA,CAMA,gBAAAQ,CAAAR,GACAA,EACAO,KAAAE,aAAA,wBAEAF,KAAAG,gBAAA,gBAEA,CAQA,KAAAC,GACAJ,KAAAP,UACAY,MAAAD,OAEA,kCC7CO,MAAAE,GAAsB,WAAAhB,GAC7BC,GACA,cAAAA,EAEA,KAAAgB,GACAF,MAAAE,QAEAP,KAAAQ,iBAAA,UAAAC,IACAT,KAAAU,WAAAD,KAGAT,KAAAQ,iBAAA,QAAAC,IACAT,KAAAW,SAAAF,IAEA,CAUA,UAAAC,CAAAD,GACA,OAAAA,EAAAG,KACA,YACAZ,KAAAa,SAAAJ,GACA,MACA,aACAT,KAAAc,UAAAL,GAKA,CASA,QAAAE,CAAAI,GAEA,CASA,QAAAF,CAAAE,GAEA,CASA,SAAAD,CAAAC,GAEA,iDClEO,MAAAC,EAAAzB,GACP,eAAmC,EAAA0B,EAAAC,GAAa3B,IAChD,qBAAAC,GACA,OAMA2B,SAAA,CACAzB,KAAA0B,OACAtB,oBAAA,EACAD,SAAA,oBAQAwB,cAAA,CACA3B,KAAA0B,QAGA,CAWA,gBAAArB,CAAAN,EAAA6B,GACAjB,MAAAN,iBAAAN,EAAA6B,GAEA7B,QACA8B,IAAAvB,KAAAmB,WACAnB,KAAAqB,cAAArB,KAAAmB,UAEAnB,KAAAmB,UAAA,GACQG,IACRtB,KAAAmB,SAAAnB,KAAAqB,cAEA,CASA,gBAAAG,CAAAL,GACAnB,KAAAP,WAAA,IAAA0B,IACAnB,KAAAqB,cAAAF,EACAnB,KAAAmB,UAAA,EAEA,wGCrEO,MAAAM,WAAqBC,EAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCCUxB,MAAAC,EAAAC,GACP,eAAiC,EAAAC,EAAAC,IAAY,EAAAC,EAAAC,IAAc,EAAAC,EAAA3C,GAAUsC,MACrE,qBAAApC,GACA,OAOA2B,SAAA,CACAzB,KAAA0B,OACAxB,MAAA,EACAE,oBAAA,GAGA,CAUA,eAAAoC,GACA,mBACA,CAGA,KAAA3B,GACAF,MAAAE,QAIAP,KAAAmC,aAAA,SACAnC,KAAAE,aAAA,gBAEA,CAiBA,UAAAQ,CAAAD,GACAJ,MAAAK,WAAAD,GAEAA,EAAA2B,QAAA3B,EAAA4B,UAAA5B,EAAA6B,SAAA7B,EAAA8B,SAIAvC,KAAAkC,YAAAM,SAAA/B,EAAAG,OACAH,EAAAgC,iBAIAzC,KAAAI,QAEA,ICzEA,EAAAsC,EAAAC,IAAc,gBAAkBlB,EAAY,CAAImB,SAAA,yBAqChD,MAAAC,UAAqBlB,GAAY,EAAAmB,EAAAC,IAAa,EAAAL,EAAAM,KAAc,EAAAC,EAAAC,GAAgBC,EAAAC,QAC5E,aAAAC,GACA,qBACA,CAEA,mBAAAC,GACA,OAA0BH,EAAAI,EFYnB;;;;;;;;;;;;;CEXP,CAGA,KAAAhD,GACAF,MAAAE,QAEAP,KAAAwD,mBAAA,IAAkCC,EAAAC,EAAiB1D,MACnDA,KAAA2D,cAAA3D,KAAAwD,mBACA,GAGA,EAAAI,EAAAC,GAAmBhB,4FC9DnB,MAAAiB,EAAeC,EAAArC,EAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyQlB,EAAAqC,EAAApB,IAAc,gBAAAmB,EAAA,CAA4BlB,SAAA","sources":["webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/a11y-base/src/disabled-mixin.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/a11y-base/src/keyboard-mixin.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/a11y-base/src/tabindex-mixin.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\n\n/**\n * A mixin to provide disabled property for field components.\n *\n * @polymerMixin\n */\nexport const DisabledMixin = dedupingMixin(\n (superclass) =>\n class DisabledMixinClass extends superclass {\n static get properties() {\n return {\n /**\n * If true, the user cannot interact with this element.\n */\n disabled: {\n type: Boolean,\n value: false,\n observer: '_disabledChanged',\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * @param {boolean} disabled\n * @protected\n */\n _disabledChanged(disabled) {\n this._setAriaDisabled(disabled);\n }\n\n /**\n * @param {boolean} disabled\n * @protected\n */\n _setAriaDisabled(disabled) {\n if (disabled) {\n this.setAttribute('aria-disabled', 'true');\n } else {\n this.removeAttribute('aria-disabled');\n }\n }\n\n /**\n * Overrides the default element `click` method in order to prevent\n * firing the `click` event when the element is disabled.\n * @protected\n * @override\n */\n click() {\n if (!this.disabled) {\n super.click();\n }\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\n\n/**\n * A mixin that manages keyboard handling.\n * The mixin subscribes to the keyboard events while an actual implementation\n * for the event handlers is left to the client (a component or another mixin).\n *\n * @polymerMixin\n */\nexport const KeyboardMixin = dedupingMixin(\n (superclass) =>\n class KeyboardMixinClass extends superclass {\n /** @protected */\n ready() {\n super.ready();\n\n this.addEventListener('keydown', (event) => {\n this._onKeyDown(event);\n });\n\n this.addEventListener('keyup', (event) => {\n this._onKeyUp(event);\n });\n }\n\n /**\n * A handler for the `keydown` event. By default, it calls\n * separate methods for handling \"Enter\" and \"Escape\" keys.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} event\n * @protected\n */\n _onKeyDown(event) {\n switch (event.key) {\n case 'Enter':\n this._onEnter(event);\n break;\n case 'Escape':\n this._onEscape(event);\n break;\n default:\n break;\n }\n }\n\n /**\n * A handler for the `keyup` event. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onKeyUp(_event) {\n // To be implemented.\n }\n\n /**\n * A handler for the \"Enter\" key. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onEnter(_event) {\n // To be implemented.\n }\n\n /**\n * A handler for the \"Escape\" key. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onEscape(_event) {\n // To be implemented.\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { DisabledMixin } from './disabled-mixin.js';\n\n/**\n * A mixin to toggle the `tabindex` attribute.\n *\n * The attribute is set to -1 whenever the user disables the element\n * and restored with the last known value once the element is enabled.\n *\n * @polymerMixin\n * @mixes DisabledMixin\n */\nexport const TabindexMixin = (superclass) =>\n class TabindexMixinClass extends DisabledMixin(superclass) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @protected\n */\n tabindex: {\n type: Number,\n reflectToAttribute: true,\n observer: '_tabindexChanged',\n },\n\n /**\n * Stores the last known tabindex since the element has been disabled.\n *\n * @protected\n */\n _lastTabIndex: {\n type: Number,\n },\n };\n }\n\n /**\n * When the element gets disabled, the observer saves the last known tabindex\n * and makes the element not focusable by setting tabindex to -1.\n * As soon as the element gets enabled, the observer restores the last known tabindex\n * so that the element can be focusable again.\n *\n * @protected\n * @override\n */\n _disabledChanged(disabled, oldDisabled) {\n super._disabledChanged(disabled, oldDisabled);\n\n if (disabled) {\n if (this.tabindex !== undefined) {\n this._lastTabIndex = this.tabindex;\n }\n this.tabindex = -1;\n } else if (oldDisabled) {\n this.tabindex = this._lastTabIndex;\n }\n }\n\n /**\n * When the user has changed tabindex while the element is disabled,\n * the observer reverts tabindex to -1 and rather saves the new tabindex value to apply it later.\n * The new value will be applied as soon as the element becomes enabled.\n *\n * @protected\n */\n _tabindexChanged(tabindex) {\n if (this.disabled && tabindex !== -1) {\n this._lastTabIndex = tabindex;\n this.tabindex = -1;\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-block;\n position: relative;\n outline: none;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Aligns the button with form fields when placed on the same line.\n Note, to make it work, the form fields should have the same \"::before\" pseudo-element. */\n .vaadin-button-container::before {\n content: '\\\\2003';\n display: inline-block;\n width: 0;\n max-height: 100%;\n }\n\n .vaadin-button-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n min-height: inherit;\n text-shadow: inherit;\n }\n\n [part='prefix'],\n [part='suffix'] {\n flex: none;\n }\n\n [part='label'] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) {\n outline-width: 2px;\n }\n\n :host([disabled]) {\n outline-color: GrayText;\n }\n }\n`;\n\nexport const buttonTemplate = (html) => html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n <slot name=\"tooltip\"></slot>\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles, buttonTemplate } from './vaadin-button-base.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\nregisterStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following attributes are available for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n * `disabled` | Set when the button is disabled.\n * `focus-ring` | Set when the button is focused using the keyboard.\n * `focused` | Set when the button is focused.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get template() {\n return buttonTemplate(html);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst button = css`\n :host {\n /* Sizing */\n --lumo-button-size: var(--lumo-size-m);\n min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));\n height: var(--_button-size);\n padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));\n margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);\n box-sizing: border-box;\n /* Style */\n font-family: var(--lumo-font-family);\n font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--_lumo-button-text-color);\n background: var(--_lumo-button-background);\n border: var(--vaadin-button-border, none);\n border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));\n cursor: var(--lumo-clickable-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n flex-shrink: 0;\n --_button-size: var(--vaadin-button-height, var(--lumo-button-size));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n /* Used by notification */\n --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));\n --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));\n --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));\n --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));\n }\n\n /* Set only for the internal parts so we don't affect the host vertical alignment */\n [part='label'],\n [part='prefix'],\n [part='suffix'] {\n line-height: var(--lumo-line-height-xs);\n }\n\n [part='label'] {\n padding: calc(var(--lumo-button-size) / 6) 0;\n }\n\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-button-size: var(--lumo-size-s);\n }\n\n :host([theme~='large']) {\n font-size: var(--lumo-font-size-l);\n --lumo-button-size: var(--lumo-size-l);\n }\n\n /* For interaction states */\n :host::before,\n :host::after {\n content: '';\n /* We rely on the host always being relative */\n position: absolute;\n z-index: 1;\n inset: 0;\n background-color: currentColor;\n border-radius: inherit;\n opacity: 0;\n pointer-events: none;\n }\n\n /* Hover */\n\n @media (any-hover: hover) {\n :host(:hover)::before {\n opacity: 0.02;\n }\n }\n\n /* Active */\n\n :host::after {\n transition: opacity 1.4s, transform 0.1s;\n filter: blur(8px);\n }\n\n :host([active])::before {\n opacity: 0.05;\n transition-duration: 0s;\n }\n\n :host([active])::after {\n opacity: 0.1;\n transition-duration: 0s, 0s;\n transform: scale(0);\n }\n\n /* Keyboard focus */\n\n :host([focus-ring]) {\n box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);\n }\n\n :host([theme~='primary'][focus-ring]) {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n /* Types (primary, tertiary, tertiary-inline */\n\n :host([theme~='tertiary']),\n :host([theme~='tertiary-inline']) {\n --_background: transparent !important;\n background: var(--vaadin-button-tertiary-background, var(--_background));\n min-width: 0;\n }\n\n :host([theme~='tertiary']) {\n border: var(--vaadin-button-tertiary-border, none);\n color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));\n font-weight: var(--vaadin-button-tertiary-font-weight, 500);\n padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));\n }\n\n :host([theme~='tertiary-inline'])::before {\n display: none;\n }\n\n :host([theme~='tertiary-inline']) {\n margin: 0;\n height: auto;\n padding: 0;\n line-height: inherit;\n font-size: inherit;\n }\n\n :host([theme~='tertiary-inline']) [part='label'] {\n padding: 0;\n overflow: visible;\n line-height: inherit;\n }\n\n :host([theme~='primary']) {\n background: var(--_lumo-button-primary-background);\n border: var(--vaadin-button-primary-border, none);\n color: var(--_lumo-button-primary-text-color);\n font-weight: var(--vaadin-button-primary-font-weight, 600);\n min-width: calc(var(--lumo-button-size) * 2.5);\n }\n\n :host([theme~='primary'])::before {\n background-color: black;\n }\n\n @media (any-hover: hover) {\n :host([theme~='primary']:hover)::before {\n opacity: 0.05;\n }\n }\n\n :host([theme~='primary'][active])::before {\n opacity: 0.1;\n }\n\n :host([theme~='primary'][active])::after {\n opacity: 0.2;\n }\n\n /* Colors (success, error, contrast) */\n\n :host([theme~='success']) {\n color: var(--lumo-success-text-color);\n }\n\n :host([theme~='success'][theme~='primary']) {\n background-color: var(--lumo-success-color);\n color: var(--lumo-success-contrast-color);\n }\n\n :host([theme~='error']) {\n color: var(--lumo-error-text-color);\n }\n\n :host([theme~='error'][theme~='primary']) {\n background-color: var(--lumo-error-color);\n color: var(--lumo-error-contrast-color);\n }\n\n :host([theme~='contrast']) {\n color: var(--lumo-contrast);\n }\n\n :host([theme~='contrast'][theme~='primary']) {\n background-color: var(--lumo-contrast);\n color: var(--lumo-base-color);\n }\n\n /* Disabled state. Keep selectors after other color variants. */\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n }\n\n :host([theme~='primary'][disabled]) {\n background-color: var(--lumo-contrast-30pct);\n color: var(--lumo-base-color);\n }\n\n :host([theme~='primary'][disabled]) [part] {\n opacity: 0.7;\n }\n\n /* Icons */\n\n [part] ::slotted(vaadin-icon) {\n display: inline-block;\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n [part] ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n [part='prefix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n [part='suffix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n /* Icon-only */\n\n :host([theme~='icon']:not([theme~='tertiary-inline'])) {\n min-width: var(--lumo-button-size);\n padding-left: calc(var(--lumo-button-size) / 4);\n padding-right: calc(var(--lumo-button-size) / 4);\n }\n\n :host([theme~='icon']) [part='prefix'],\n :host([theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='prefix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n :host([dir='rtl']) [part='suffix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n :host([dir='rtl'][theme~='icon']) [part='prefix'],\n :host([dir='rtl'][theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n`;\n\nregisterStyles('vaadin-button', button, { moduleId: 'lumo-button' });\n\nexport { button };\n"],"names":["DisabledMixin","y","superclass","properties","disabled","type","Boolean","value","observer","reflectToAttribute","_disabledChanged","this","_setAriaDisabled","setAttribute","removeAttribute","click","super","KeyboardMixin","ready","addEventListener","event","_onKeyDown","_onKeyUp","key","_onEnter","_onEscape","_event","TabindexMixin","_disabled_mixin_js__WEBPACK_IMPORTED_MODULE_0__","i","tabindex","Number","_lastTabIndex","oldDisabled","undefined","_tabindexChanged","buttonStyles","AH","ButtonMixin","superClass","active_mixin","e","tabindex_mixin","l","focus_mixin","_activeKeys","hasAttribute","altKey","shiftKey","ctrlKey","metaKey","includes","preventDefault","vaadin_themable_mixin","SF","moduleId","Button","element_mixin","q","cp","controller_mixin","w","polymer_element","Pu","is","template","qy","_tooltipController","tooltip_controller","I","addController","src_define","X","button","_vaadin_vaadin_themable_mixin_vaadin_themable_mixin_js__WEBPACK_IMPORTED_MODULE_5__"],"sourceRoot":""}
|
package/dist/umd/189.js
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*! For license information please see 189.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[189],{24943(e,t,r){r.d(t,{v:()=>o});var s=r(98741),i=r(53149),a=r(36176);const o=(0,s.y)(e=>class extends((0,i.y)((0,a.l)(e))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame(()=>{this.focus(),this.setAttribute("focus-ring","")})}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(e,t){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):t&&this._removeFocusListeners(t)}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus)}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,t){super._disabledChanged(e,t),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur()}_tabindexChanged(e){this.__forwardTabIndex(e)}__forwardTabIndex(e){void 0!==e&&this.focusElement&&(this.focusElement.tabIndex=e,-1!==e&&(this.tabindex=void 0)),this.disabled&&e&&(-1!==e&&(this._lastTabIndex=e),this.tabindex=void 0)}})},5745(e,t,r){r.d(t,{i:()=>s});const s=(0,r(98741).y)(e=>class extends e{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(e){this._setAriaDisabled(e)}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})},50558(e,t,r){r.d(t,{G:()=>d});var s=r(1508);const i=new Map;function a(e){return i.has(e)||i.set(e,new WeakMap),i.get(e)}function o(e,t){e&&e.removeAttribute(t)}function l(e,t){if(!e||!t)return;const r=a(t);if(r.has(e))return;const i=(0,s.Z4)(e.getAttribute(t));r.set(e,new Set(i))}function n(e,t,r={newId:null,oldId:null,fromUser:!1}){if(!e||!t)return;const{newId:i,oldId:n,fromUser:d}=r,h=a(t),u=h.get(e);if(!d&&u)return n&&u.delete(n),void(i&&u.add(i));d&&(u?i||h.delete(e):l(e,t),o(e,t)),(0,s.Wr)(e,t,n);const _=i||(0,s.sz)(u);_&&(0,s.iA)(e,t,_)}class d{constructor(e){this.host=e,this.__required=!1}setTarget(e){this.__target=e,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(e){this.__setAriaRequiredAttribute(e),this.__required=e}setAriaLabel(e){this.__setAriaLabelToAttribute(e),this.__label=e}setLabelId(e,t=!1){const r=t?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(e,r,t),t?this.__labelIdFromUser=e:this.__labelId=e}setErrorId(e){this.__setErrorIdToAriaAttribute(e,this.__errorId),this.__errorId=e}setHelperId(e){this.__setHelperIdToAriaAttribute(e,this.__helperId),this.__helperId=e}__setAriaLabelToAttribute(e){var t;this.__target&&(e?(l(t=this.__target,"aria-labelledby"),o(t,"aria-labelledby"),this.__target.setAttribute("aria-label",e)):this.__label&&(function(e,t){if(!e)return;const r=a(t),i=r.get(e);i&&0!==i.size?(0,s.iA)(e,t,(0,s.sz)(i)):e.removeAttribute(t),r.delete(e)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(e,t,r){n(this.__target,"aria-labelledby",{newId:e,oldId:t,fromUser:r})}__setErrorIdToAriaAttribute(e,t){n(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setHelperIdToAriaAttribute(e,t){n(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setAriaRequiredAttribute(e){this.__target&&(["input","textarea"].includes(this.__target.localName)||(e?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}},7888(e,t,r){r.d(t,{f:()=>s});const s=(0,r(98741).y)(e=>class extends e{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e)}),this.addEventListener("keyup",e=>{this._onKeyUp(e)})}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e)}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}})},36176(e,t,r){r.d(t,{l:()=>i});var s=r(5745);const i=e=>class extends((0,s.i)(e)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(e,t){super._disabledChanged(e,t),e?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):t&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(e){this.disabled&&-1!==e&&(this._lastTabIndex=e,this.tabindex=-1)}}},88057(e,t,r){r.d(t,{q:()=>s});const s=(0,r(98741).y)(e=>class extends e{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(e){e&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach(e=>{this._delegateAttribute(e,this[e])})}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(e=>{this._delegateProperty(e,this[e])})}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach((t,r)=>{this._delegateAttribute(t,e[r])})}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((t,r)=>{this._delegateProperty(t,e[r])})}_delegateAttribute(e,t){this.stateTarget&&("invalid"===e&&this._delegateAttribute("aria-invalid",!!t&&"true"),"boolean"==typeof t?this.stateTarget.toggleAttribute(e,t):t?this.stateTarget.setAttribute(e,t):this.stateTarget.removeAttribute(e))}_delegateProperty(e,t){this.stateTarget&&(this.stateTarget[e]=t)}})},15009(e,t,r){r.d(t,{J:()=>i});var s=r(44099);class i extends s.r{constructor(e,t,r,s={}){super(e,t,r,{...s,useUniqueId:!0})}initCustomNode(e){this.__updateNodeId(e),this.__notifyChange(e)}teardownNode(e){const t=this.getSlotChild();t&&t!==this.defaultNode?this.__notifyChange(t):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const e=super.attachDefaultNode();return e&&this.__updateNodeId(e),e}restoreDefaultNode(){}updateDefaultNode(e){this.__notifyChange(e)}observeNode(e){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(e=>{e.forEach(e=>{const t=e.target,r=t===this.node;"attributes"===e.type?r&&this.__updateNodeId(t):(r||t.parentElement===this.node)&&this.__notifyChange(this.node)})}),this.__nodeObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(e){return!!e&&(e.nodeType===Node.ELEMENT_NODE&&(customElements.get(e.localName)||e.children.length>0)||e.textContent&&""!==e.textContent.trim())}__notifyChange(e){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(e),node:e}}))}__updateNodeId(e){const t=!this.nodes||e===this.nodes[0];e.nodeType!==Node.ELEMENT_NODE||this.multiple&&!t||e.id||(e.id=this.defaultId)}}},26127(e,t,r){r.d(t,{Y:()=>h});var s=r(50558),i=r(55774),a=r(15009);class o extends a.J{constructor(e){super(e,"error-message","div")}setErrorMessage(e){this.errorMessage=e,this.updateDefaultNode(this.node)}setInvalid(e){this.invalid=e,this.updateDefaultNode(this.node)}initAddedNode(e){e!==this.defaultNode&&this.initCustomNode(e)}initNode(e){this.updateDefaultNode(e)}initCustomNode(e){e.textContent&&!this.errorMessage&&(this.errorMessage=e.textContent.trim()),super.initCustomNode(e)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(e){const{errorMessage:t,invalid:r}=this,s=Boolean(r&&t&&""!==t.trim());e&&(e.textContent=s?t:"",e.hidden=!s,s?e.setAttribute("role","alert"):e.removeAttribute("role")),super.updateDefaultNode(e)}}class l extends a.J{constructor(e){super(e,"helper",null)}setHelperText(e){this.helperText=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:e}=this;if(e&&""!==e.trim()){this.tagName="div";const e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.helperText),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}var n=r(78896),d=r(38483);const h=e=>class extends((0,d.u)((0,n.U)((0,i.w)(e)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new s.G(this),this._helperController=new l(this),this._errorController=new o(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent)}),this._labelController.addEventListener("slot-content-changed",e=>{const{hasContent:t,node:r}=e.detail;this.__labelChanged(t,r)}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:t,node:r}=e.detail;this.toggleAttribute("has-helper",t),this.__helperChanged(t,r)})}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(e,t){e?this._fieldAriaController.setHelperId(t.id):this._fieldAriaController.setHelperId(null)}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e)}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0)}__labelChanged(e,t){e?this._fieldAriaController.setLabelId(t.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(e){this._errorController.setErrorMessage(e)}_helperTextChanged(e){this._helperController.setHelperText(e)}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e)}_requiredChanged(e){this._fieldAriaController.setRequired(e)}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){const e=this._errorNode;this._fieldAriaController.setErrorId(e&&e.id)}else this._fieldAriaController.setErrorId(null)})}}},33637(e,t,r){r.d(t,{g:()=>s});const s=(0,r(98741).y)(e=>class extends e{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange)}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange)}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=null!=e?e:"")}_inputElementChanged(e,t){e?this._addInputListeners(e):t&&this._removeInputListeners(t)}_hasInputValueChanged(e,t){(e||t)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(e){this._setHasInputValue(e),this._onInput(e)}_onInput(e){const t=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=t.value,this.__userInput=!1}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e)}_valueChanged(e,t){this._toggleHasValue(this._hasValue),""===e&&void 0===t||this.__userInput||this._forwardInputValue(e)}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0}})},78896(e,t,r){r.d(t,{U:()=>l});var s=r(98741),i=r(55774),a=r(15009);class o extends a.J{constructor(e){super(e,"label","label")}setLabel(e){this.label=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:e}=this;if(e&&""!==e.trim()){const e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.label),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}const l=(0,s.y)(e=>class extends((0,i.w)(e)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new o(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent)})}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(e){this._labelController.setLabel(e)}})},37720(e,t,r){r.d(t,{q:()=>s});class s{constructor(e,t){this.input=e,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),t.addEventListener("slot-content-changed",e=>{this.__initLabel(e.detail.node)}),this.__initLabel(t.node)}__initLabel(e){e&&(e.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&e.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const e=t=>{t.stopImmediatePropagation(),this.input.removeEventListener("click",e)};this.input.addEventListener("click",e)}}},38483(e,t,r){r.d(t,{u:()=>s});const s=(0,r(98741).y)(e=>class extends e{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return!this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}})},57843(e,t,r){r.d(t,{d:()=>s}),r(64511),r(42068),r(3241),r(83315);const s=r(87550).AH`
|
|
3
|
+
:host {
|
|
4
|
+
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:host([has-helper]) [part='helper-text']::before {
|
|
8
|
+
content: '';
|
|
9
|
+
display: block;
|
|
10
|
+
height: var(--_helper-spacing);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[part='helper-text'] {
|
|
14
|
+
display: block;
|
|
15
|
+
color: var(--vaadin-input-field-helper-color, var(--lumo-secondary-text-color));
|
|
16
|
+
font-size: var(--vaadin-input-field-helper-font-size, var(--lumo-font-size-xs));
|
|
17
|
+
line-height: var(--lumo-line-height-xs);
|
|
18
|
+
font-weight: var(--vaadin-input-field-helper-font-weight, 400);
|
|
19
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
20
|
+
transition: color 0.2s;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host(:hover:not([readonly])) [part='helper-text'] {
|
|
24
|
+
color: var(--lumo-body-text-color);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host([disabled]) [part='helper-text'] {
|
|
28
|
+
color: var(--lumo-disabled-text-color);
|
|
29
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
|
|
37
|
+
content: '';
|
|
38
|
+
display: block;
|
|
39
|
+
height: var(--_helper-spacing);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] {
|
|
43
|
+
order: 0;
|
|
44
|
+
padding-bottom: var(--_helper-spacing);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
|
|
48
|
+
order: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] + * {
|
|
52
|
+
order: 2;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([has-helper][theme~='helper-above-field']) [part='error-message'] {
|
|
56
|
+
order: 3;
|
|
57
|
+
}
|
|
58
|
+
`},8403(e,t,r){r.d(t,{Q:()=>i}),r(64511),r(9433),r(3241),r(83315);var s=r(87550);const i=s.AH`
|
|
59
|
+
[part='label'] {
|
|
60
|
+
align-self: flex-start;
|
|
61
|
+
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
62
|
+
font-weight: var(--vaadin-input-field-label-font-weight, 500);
|
|
63
|
+
font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
|
|
64
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
65
|
+
transition: color 0.2s;
|
|
66
|
+
line-height: 1;
|
|
67
|
+
padding-right: 1em;
|
|
68
|
+
padding-bottom: 0.5em;
|
|
69
|
+
/* As a workaround for diacritics being cut off, add a top padding and a
|
|
70
|
+
negative margin to compensate */
|
|
71
|
+
padding-top: 0.25em;
|
|
72
|
+
margin-top: -0.25em;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
text-overflow: ellipsis;
|
|
76
|
+
position: relative;
|
|
77
|
+
max-width: 100%;
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host([focused]:not([readonly])) [part='label'] {
|
|
82
|
+
color: var(--vaadin-input-field-focused-label-color, var(--lumo-primary-text-color));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
86
|
+
color: var(--vaadin-input-field-hovered-label-color, var(--lumo-body-text-color));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Touch device adjustment */
|
|
90
|
+
@media (pointer: coarse) {
|
|
91
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
92
|
+
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host([has-label])::before {
|
|
97
|
+
margin-top: calc(var(--lumo-font-size-s) * 1.5);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:host([has-label][theme~='small'])::before {
|
|
101
|
+
margin-top: calc(var(--lumo-font-size-xs) * 1.5);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host([has-label]) {
|
|
105
|
+
padding-top: var(--lumo-space-m);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host([has-label]) ::slotted([slot='tooltip']) {
|
|
109
|
+
--vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:host([required]) [part='required-indicator']::after {
|
|
113
|
+
content: var(--lumo-required-field-indicator, '\\2022');
|
|
114
|
+
transition: opacity 0.2s;
|
|
115
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
|
|
116
|
+
position: absolute;
|
|
117
|
+
right: 0;
|
|
118
|
+
width: 1em;
|
|
119
|
+
text-align: center;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:host([invalid]) [part='required-indicator']::after {
|
|
123
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
[part='error-message'] {
|
|
127
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
128
|
+
font-size: var(--vaadin-input-field-error-font-size, var(--lumo-font-size-xs));
|
|
129
|
+
line-height: var(--lumo-line-height-xs);
|
|
130
|
+
font-weight: var(--vaadin-input-field-error-font-weight, 400);
|
|
131
|
+
color: var(--vaadin-input-field-error-color, var(--lumo-error-text-color));
|
|
132
|
+
will-change: max-height;
|
|
133
|
+
transition: 0.4s max-height;
|
|
134
|
+
max-height: 5em;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:host([has-error-message]) [part='error-message']::before,
|
|
138
|
+
:host([has-error-message]) [part='error-message']::after {
|
|
139
|
+
content: '';
|
|
140
|
+
display: block;
|
|
141
|
+
height: 0.4em;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:host(:not([invalid])) [part='error-message'] {
|
|
145
|
+
max-height: 0;
|
|
146
|
+
overflow: hidden;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* RTL specific styles */
|
|
150
|
+
|
|
151
|
+
:host([dir='rtl']) [part='label'] {
|
|
152
|
+
margin-left: 0;
|
|
153
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:host([dir='rtl']) [part='label'] {
|
|
157
|
+
padding-left: 1em;
|
|
158
|
+
padding-right: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
:host([dir='rtl']) [part='required-indicator']::after {
|
|
162
|
+
right: auto;
|
|
163
|
+
left: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:host([dir='rtl']) [part='error-message'] {
|
|
167
|
+
margin-left: 0;
|
|
168
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
169
|
+
}
|
|
170
|
+
`;(0,s.SF)("",i,{moduleId:"lumo-required-field"})}}]);
|
|
171
|
+
//# sourceMappingURL=189.js.map
|