@descope/web-components-ui 1.0.93 → 1.0.94
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[939],{7102:(t,e,n)=>{n.r(e);var i=n(4988),r=n(4447),o=n(7361),d=n(9063),a=n(2061),l=n(4567);const p=(0,l.iY)("passcode"),{borderStyle:s,borderWidth:c,...u}=r.Z,{digitField:g,label:h,requiredIndicator:f,internalWrapper:m,focusedValidDigitField:b}={focusedValidDigitField:{selector:()=>`${d.Z.componentName}[focused="true"]:not([invalid="true"])`},digitField:{selector:()=>d.Z.componentName},label:{selector:"> label"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:"descope-passcode-internal .wrapper"}},y=d.Z.cssVarList,x=(0,a.qC)((0,i.yk)({mappings:{...u,borderColor:{...g,property:y.borderColor},outlineColor:{...g,property:y.outlineColor},outlineWidth:[{...g,property:y.outlineWidth},{...m,property:"padding"}],color:[u.color,h,f],padding:{...g,property:y.padding},margin:{...g,property:y.margin},textAlign:{...g,property:y.textAlign},caretColor:{...g,property:y.caretColor},digitsGap:{...m,property:"gap"},focusedValidDigitFieldBorderColor:{...b,property:y.borderColor}}}),i.e4,i.dj,i.Ae,(t=>class extends t{constructor(){super()}get digits(){return Number.parseInt(this.getAttribute("digits"))||6}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t<${o.f} \n\t\t\t\tbordered="true" \n\t\t\t\tname="code" \n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n\t\t\t></${o.f}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),(0,l.oP)(this,this.inputElement,{includeAttrs:["digits","size"]})}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n --vaadin-field-default-width: auto;\n\t\t\tdisplay: inline-block;\n }\n\n descope-passcode-internal {\n\t\t-webkit-mask-image: none;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmin-height: initial;\n }\n\n\tdescope-passcode-internal .wrapper {\n\t\tbox-sizing: border-box;\n\t\tmin-height: initial;\n\t\theight: 100%;\n\t\tjustify-content: center;\n }\n\n\tdescope-passcode-internal descope-text-field {\n\t\twidth: var(${y.height})\t\t\t\n\t}\n\n vaadin-text-field::part(input-field) {\n\t\tbackground-color: transparent;\n\t\tpadding: 0;\n\t\toverflow: hidden;\n\t\t-webkit-mask-image: none;\n }\n\n\tvaadin-text-field {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%\n\t}\n\n\tvaadin-text-field::before {\n\t\theight:
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[939],{7102:(t,e,n)=>{n.r(e);var i=n(4988),r=n(4447),o=n(7361),d=n(9063),a=n(2061),l=n(4567);const p=(0,l.iY)("passcode"),{borderStyle:s,borderWidth:c,...u}=r.Z,{digitField:g,label:h,requiredIndicator:f,internalWrapper:m,focusedValidDigitField:b}={focusedValidDigitField:{selector:()=>`${d.Z.componentName}[focused="true"]:not([invalid="true"])`},digitField:{selector:()=>d.Z.componentName},label:{selector:"> label"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:"descope-passcode-internal .wrapper"}},y=d.Z.cssVarList,x=(0,a.qC)((0,i.yk)({mappings:{...u,borderColor:{...g,property:y.borderColor},outlineColor:{...g,property:y.outlineColor},outlineWidth:[{...g,property:y.outlineWidth},{...m,property:"padding"}],color:[u.color,h,f],padding:{...g,property:y.padding},margin:{...g,property:y.margin},textAlign:{...g,property:y.textAlign},caretColor:{...g,property:y.caretColor},digitsGap:{...m,property:"gap"},focusedValidDigitFieldBorderColor:{...b,property:y.borderColor}}}),i.e4,i.dj,i.Ae,(t=>class extends t{constructor(){super()}get digits(){return Number.parseInt(this.getAttribute("digits"))||6}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t<${o.f} \n\t\t\t\tbordered="true" \n\t\t\t\tname="code" \n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n\t\t\t></${o.f}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),(0,l.oP)(this,this.inputElement,{includeAttrs:["digits","size"]})}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n --vaadin-field-default-width: auto;\n\t\t\tdisplay: inline-block;\n }\n\n descope-passcode-internal {\n\t\t-webkit-mask-image: none;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmin-height: initial;\n }\n\n\tdescope-passcode-internal .wrapper {\n\t\tbox-sizing: border-box;\n\t\tmin-height: initial;\n\t\theight: 100%;\n\t\tjustify-content: center;\n }\n\n\tdescope-passcode-internal descope-text-field {\n\t\twidth: var(${y.height})\t\t\t\n\t}\n\n vaadin-text-field::part(input-field) {\n\t\tbackground-color: transparent;\n\t\tpadding: 0;\n\t\toverflow: hidden;\n\t\t-webkit-mask-image: none;\n }\n\n\tvaadin-text-field {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%\n\t}\n\n\tvaadin-text-field::before {\n\t\theight: 0;\n\t}\n\n\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\topacity: 1;\n\t}\n\n\tvaadin-text-field::part(input-field):focus {\n\t\tcursor: text;\n\t}\n\n\tvaadin-text-field[required]::part(required-indicator)::after {\n\t\tfont-size: "12px";\n\t\tcontent: "*";\n\t}\n\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\tborder: 0 solid;\n\t}\n `,excludeAttrsSync:["tabindex"],componentName:p}));n(9357),n(4775),customElements.define(p,x)}}]);
|
package/package.json
CHANGED
@@ -43,7 +43,7 @@ export const textField = (vars) => ({
|
|
43
43
|
[vars.borderWidth]: '1px',
|
44
44
|
[vars.borderStyle]: 'solid',
|
45
45
|
[vars.borderColor]: 'transparent',
|
46
|
-
[vars.borderRadius]: globalRefs.radius.
|
46
|
+
[vars.borderRadius]: globalRefs.radius.xs,
|
47
47
|
|
48
48
|
_disabled: {
|
49
49
|
[vars.color]: globalRefs.colors.surface.dark,
|
package/src/theme/globals.js
CHANGED
@@ -14,44 +14,82 @@ export const colors = genColors({
|
|
14
14
|
});
|
15
15
|
|
16
16
|
const fonts = {
|
17
|
-
font1:
|
18
|
-
|
17
|
+
font1: {
|
18
|
+
family: [
|
19
|
+
"Roboto",
|
20
|
+
"ui-sans-serif",
|
21
|
+
"system-ui",
|
22
|
+
"-apple-system",
|
23
|
+
"BlinkMacSystemFont",
|
24
|
+
"Segoe UI",
|
25
|
+
"Helvetica Neue",
|
26
|
+
"Arial",
|
27
|
+
"Noto Sans",
|
28
|
+
"sans-serif",
|
29
|
+
"Apple Color Emoji",
|
30
|
+
"Segoe UI Emoji",
|
31
|
+
"Segoe UI Symbol",
|
32
|
+
"Noto Color Emoji"
|
33
|
+
],
|
34
|
+
label: "Roboto",
|
35
|
+
url: "https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900"
|
36
|
+
},
|
37
|
+
font2: {
|
38
|
+
family: [
|
39
|
+
"ui-sans-serif",
|
40
|
+
"system-ui",
|
41
|
+
"-apple-system",
|
42
|
+
"BlinkMacSystemFont",
|
43
|
+
"Segoe UI",
|
44
|
+
"Roboto",
|
45
|
+
"Helvetica Neue",
|
46
|
+
"Arial",
|
47
|
+
"Noto Sans",
|
48
|
+
"sans-serif",
|
49
|
+
"Apple Color Emoji",
|
50
|
+
"Segoe UI Emoji",
|
51
|
+
"Segoe UI Symbol",
|
52
|
+
"Noto Color Emoji"
|
53
|
+
],
|
54
|
+
label: "Sans Serif"
|
55
|
+
}
|
19
56
|
};
|
57
|
+
|
20
58
|
const fontsRef = getThemeRefs({ fonts }).fonts;
|
21
59
|
|
22
60
|
const typography = {
|
23
61
|
h1: {
|
24
|
-
font: fontsRef.font1,
|
62
|
+
font: fontsRef.font1.family,
|
25
63
|
weight: '900',
|
26
64
|
size: '48px'
|
27
65
|
},
|
28
66
|
h2: {
|
29
|
-
font: fontsRef.font1,
|
67
|
+
font: fontsRef.font1.family,
|
30
68
|
weight: '800',
|
31
69
|
size: '38px'
|
32
70
|
},
|
33
71
|
h3: {
|
34
|
-
font: fontsRef.font1,
|
72
|
+
font: fontsRef.font1.family,
|
35
73
|
weight: '600',
|
36
74
|
size: '28px'
|
37
75
|
},
|
38
76
|
subtitle1: {
|
39
|
-
font: fontsRef.font2,
|
77
|
+
font: fontsRef.font2.family,
|
40
78
|
weight: '500',
|
41
79
|
size: '22px'
|
42
80
|
},
|
43
81
|
subtitle2: {
|
44
|
-
font: fontsRef.font2,
|
82
|
+
font: fontsRef.font2.family,
|
45
83
|
weight: '400',
|
46
84
|
size: '20px'
|
47
85
|
},
|
48
86
|
body1: {
|
49
|
-
font: fontsRef.font1,
|
87
|
+
font: fontsRef.font1.family,
|
50
88
|
weight: '300',
|
51
89
|
size: '16px'
|
52
90
|
},
|
53
91
|
body2: {
|
54
|
-
font: fontsRef.font1,
|
92
|
+
font: fontsRef.font1.family,
|
55
93
|
weight: '200',
|
56
94
|
size: '14px'
|
57
95
|
}
|