@descope/web-components-ui 1.0.49 → 1.0.51
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.esm.js +346 -175
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/433.js +1 -0
- package/dist/umd/descope-button-index-js.js +1 -1
- package/dist/umd/descope-checkbox-index-js.js +1 -1
- package/dist/umd/descope-combo-index-js.js +1 -1
- package/dist/umd/descope-container-index-js.js +1 -1
- package/dist/umd/descope-date-picker-index-js.js +1 -1
- package/dist/umd/descope-email-field-index-js.js +1 -1
- package/dist/umd/descope-logo-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-password-field-index-js.js +1 -1
- package/dist/umd/descope-switch-toggle-index-js.js +1 -1
- package/dist/umd/descope-text-area-index-js.js +1 -1
- package/dist/umd/descope-text-field-index-js.js +1 -1
- package/dist/umd/descope-text-index-js.js +1 -0
- package/dist/umd/index.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-text/Text.js +46 -0
- package/src/components/descope-text/index.js +5 -0
- package/src/components/descope-text-area/TextArea.js +3 -3
- package/src/componentsHelpers/inputMixin.js +40 -8
- package/src/index.js +1 -0
- package/src/theme/components/index.js +3 -1
- package/src/theme/components/text.js +79 -0
- package/src/theme/components/textArea.js +0 -1
- package/src/theme/components/textField.js +6 -6
- package/src/theme/globals.js +49 -21
- package/dist/umd/313.js +0 -1
- package/dist/umd/599.js +0 -1
- package/dist/umd/938.js +0 -1
- package/dist/umd/97.js +0 -1
package/dist/index.esm.js
CHANGED
@@ -336,13 +336,20 @@ const createProxy = ({
|
|
336
336
|
return ProxyElement;
|
337
337
|
};
|
338
338
|
|
339
|
+
const attrs = {
|
340
|
+
valueMissing: 'data-errormessage-value-missing',
|
341
|
+
patternMismatch: 'data-errormessage-pattern-mismatch'
|
342
|
+
};
|
343
|
+
|
344
|
+
const errorAttrs = ['invalid', 'has-error-message'];
|
345
|
+
|
339
346
|
const propertyObserver = (src, target, property) => {
|
340
347
|
Object.defineProperty(src, property, {
|
341
348
|
set: function (v) {
|
342
|
-
return target[property] = v
|
349
|
+
return (target[property] = v);
|
343
350
|
},
|
344
351
|
get: function () {
|
345
|
-
return target[property]
|
352
|
+
return target[property];
|
346
353
|
},
|
347
354
|
configurable: true
|
348
355
|
});
|
@@ -366,6 +373,24 @@ const inputMixin = (superclass) =>
|
|
366
373
|
this.setValidity?.();
|
367
374
|
}
|
368
375
|
|
376
|
+
setValidationAttribute(attr) {
|
377
|
+
const validationAttr = this.getAttribute(attr);
|
378
|
+
if (validationAttr) {
|
379
|
+
this.proxyElement.setAttribute('error-message', validationAttr);
|
380
|
+
}
|
381
|
+
// normalize vaadin error attributes to have a boolean value
|
382
|
+
errorAttrs.forEach((att) => this.proxyElement.setAttribute(att, 'true'));
|
383
|
+
}
|
384
|
+
|
385
|
+
validate() {
|
386
|
+
const { valueMissing, patternMismatch, typeMismatch } = this.validity;
|
387
|
+
if (valueMissing) {
|
388
|
+
this.setValidationAttribute(attrs.valueMissing);
|
389
|
+
} else if (typeMismatch || patternMismatch) {
|
390
|
+
this.setValidationAttribute(attrs.patternMismatch);
|
391
|
+
}
|
392
|
+
}
|
393
|
+
|
369
394
|
connectedCallback() {
|
370
395
|
this.baseEle = this.shadowRoot.querySelector(this.baseSelector);
|
371
396
|
super.connectedCallback?.();
|
@@ -384,8 +409,6 @@ const inputMixin = (superclass) =>
|
|
384
409
|
propertyObserver(this, input, 'value');
|
385
410
|
this.setSelectionRange = input.setSelectionRange.bind(input);
|
386
411
|
|
387
|
-
this.checkValidity = () => input.checkValidity();
|
388
|
-
this.reportValidity = () => input.reportValidity();
|
389
412
|
this.validity = input.validity;
|
390
413
|
|
391
414
|
this.setValidity = () => {
|
@@ -396,6 +419,15 @@ const inputMixin = (superclass) =>
|
|
396
419
|
this.value = input.value;
|
397
420
|
this.setValidity();
|
398
421
|
};
|
422
|
+
|
423
|
+
this.onfocus = () => {
|
424
|
+
setTimeout(() => input.reportValidity(), 0);
|
425
|
+
this.validate();
|
426
|
+
};
|
427
|
+
|
428
|
+
input.oninvalid = () => {
|
429
|
+
this.validate();
|
430
|
+
};
|
399
431
|
}
|
400
432
|
};
|
401
433
|
|
@@ -432,7 +464,7 @@ const compose =
|
|
432
464
|
(val) =>
|
433
465
|
fns.reduceRight((res, fn) => fn(res), val);
|
434
466
|
|
435
|
-
const componentName$
|
467
|
+
const componentName$c = getComponentName('button');
|
436
468
|
|
437
469
|
const editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;
|
438
470
|
const resetStyles = `
|
@@ -486,7 +518,7 @@ const Button = compose(
|
|
486
518
|
style: () =>
|
487
519
|
`${resetStyles} ${editorOverrides} ${iconStyles} ${loadingIndicatorStyles}`,
|
488
520
|
excludeAttrsSync: ['tabindex'],
|
489
|
-
componentName: componentName$
|
521
|
+
componentName: componentName$c
|
490
522
|
})
|
491
523
|
);
|
492
524
|
|
@@ -519,7 +551,7 @@ const loadingIndicatorStyles = `
|
|
519
551
|
}
|
520
552
|
`;
|
521
553
|
|
522
|
-
customElements.define(componentName$
|
554
|
+
customElements.define(componentName$c, Button);
|
523
555
|
|
524
556
|
const selectors$1 = {
|
525
557
|
label: '::part(label)',
|
@@ -556,7 +588,7 @@ var textFieldMappings = {
|
|
556
588
|
placeholderColor: { selector: selectors$1.placeholder, property: 'color' }
|
557
589
|
};
|
558
590
|
|
559
|
-
const componentName$
|
591
|
+
const componentName$b = getComponentName('text-field');
|
560
592
|
|
561
593
|
let overrides$5 = ``;
|
562
594
|
|
@@ -573,7 +605,7 @@ const TextField = compose(
|
|
573
605
|
wrappedEleName: 'vaadin-text-field',
|
574
606
|
style: () => overrides$5,
|
575
607
|
excludeAttrsSync: ['tabindex'],
|
576
|
-
componentName: componentName$
|
608
|
+
componentName: componentName$b
|
577
609
|
})
|
578
610
|
);
|
579
611
|
|
@@ -618,11 +650,11 @@ overrides$5 = `
|
|
618
650
|
}
|
619
651
|
`;
|
620
652
|
|
621
|
-
customElements.define(componentName$
|
653
|
+
customElements.define(componentName$b, TextField);
|
622
654
|
|
623
655
|
const template = document.createElement('template');
|
624
656
|
|
625
|
-
const componentName$
|
657
|
+
const componentName$a = getComponentName('combo');
|
626
658
|
|
627
659
|
template.innerHTML = `
|
628
660
|
<descope-button></descope-button>
|
@@ -639,9 +671,9 @@ class Combo extends HTMLElement {
|
|
639
671
|
}
|
640
672
|
}
|
641
673
|
|
642
|
-
customElements.define(componentName$
|
674
|
+
customElements.define(componentName$a, Combo);
|
643
675
|
|
644
|
-
const componentName$
|
676
|
+
const componentName$9 = getComponentName('number-field');
|
645
677
|
|
646
678
|
let overrides$4 = ``;
|
647
679
|
|
@@ -660,7 +692,7 @@ const NumberField = compose(
|
|
660
692
|
wrappedEleName: 'vaadin-number-field',
|
661
693
|
style: () => overrides$4,
|
662
694
|
excludeAttrsSync: ['tabindex'],
|
663
|
-
componentName: componentName$
|
695
|
+
componentName: componentName$9
|
664
696
|
})
|
665
697
|
);
|
666
698
|
|
@@ -704,9 +736,9 @@ overrides$4 = `
|
|
704
736
|
}
|
705
737
|
`;
|
706
738
|
|
707
|
-
customElements.define(componentName$
|
739
|
+
customElements.define(componentName$9, NumberField);
|
708
740
|
|
709
|
-
const componentName$
|
741
|
+
const componentName$8 = getComponentName('email-field');
|
710
742
|
|
711
743
|
let overrides$3 = ``;
|
712
744
|
|
@@ -725,7 +757,7 @@ const EmailField = compose(
|
|
725
757
|
wrappedEleName: 'vaadin-email-field',
|
726
758
|
style: () => overrides$3,
|
727
759
|
excludeAttrsSync: ['tabindex'],
|
728
|
-
componentName: componentName$
|
760
|
+
componentName: componentName$8
|
729
761
|
})
|
730
762
|
);
|
731
763
|
|
@@ -769,9 +801,9 @@ overrides$3 = `
|
|
769
801
|
}
|
770
802
|
`;
|
771
803
|
|
772
|
-
customElements.define(componentName$
|
804
|
+
customElements.define(componentName$8, EmailField);
|
773
805
|
|
774
|
-
const componentName$
|
806
|
+
const componentName$7 = getComponentName('password-field');
|
775
807
|
|
776
808
|
let overrides$2 = ``;
|
777
809
|
|
@@ -797,7 +829,7 @@ const PasswordField = compose(
|
|
797
829
|
wrappedEleName: 'vaadin-password-field',
|
798
830
|
style: () => overrides$2,
|
799
831
|
excludeAttrsSync: ['tabindex'],
|
800
|
-
componentName: componentName$
|
832
|
+
componentName: componentName$7
|
801
833
|
})
|
802
834
|
);
|
803
835
|
|
@@ -841,13 +873,13 @@ overrides$2 = `
|
|
841
873
|
}
|
842
874
|
`;
|
843
875
|
|
844
|
-
customElements.define(componentName$
|
876
|
+
customElements.define(componentName$7, PasswordField);
|
845
877
|
|
846
|
-
const componentName$
|
878
|
+
const componentName$6 = getComponentName('text-area');
|
847
879
|
|
848
880
|
const selectors = {
|
849
881
|
label: '::part(label)',
|
850
|
-
input: '
|
882
|
+
input: '::part(input-field)',
|
851
883
|
required: '::part(required-indicator)::after'
|
852
884
|
};
|
853
885
|
|
@@ -878,7 +910,7 @@ const TextArea = compose(
|
|
878
910
|
wrappedEleName: 'vaadin-text-area',
|
879
911
|
style: () => overrides$1,
|
880
912
|
excludeAttrsSync: ['tabindex'],
|
881
|
-
componentName: componentName$
|
913
|
+
componentName: componentName$6
|
882
914
|
})
|
883
915
|
);
|
884
916
|
|
@@ -894,7 +926,7 @@ overrides$1 = `
|
|
894
926
|
vaadin-text-area::part(input-field) {
|
895
927
|
cursor: pointer;
|
896
928
|
}
|
897
|
-
vaadin-text-area[focused]
|
929
|
+
vaadin-text-area[focused]::part(input-field) {
|
898
930
|
cursor: text;
|
899
931
|
}
|
900
932
|
vaadin-text-area::part(required-indicator)::after {
|
@@ -903,29 +935,29 @@ overrides$1 = `
|
|
903
935
|
}
|
904
936
|
`;
|
905
937
|
|
906
|
-
customElements.define(componentName$
|
938
|
+
customElements.define(componentName$6, TextArea);
|
907
939
|
|
908
|
-
const componentName$
|
940
|
+
const componentName$5 = getComponentName('date-picker');
|
909
941
|
|
910
942
|
const DatePicker = compose(
|
911
943
|
draggableMixin,
|
912
944
|
componentNameValidationMixin
|
913
945
|
)(
|
914
946
|
createProxy({
|
915
|
-
componentName: componentName$
|
947
|
+
componentName: componentName$5,
|
916
948
|
slots: ['prefix', 'suffix'],
|
917
949
|
wrappedEleName: 'vaadin-date-picker',
|
918
950
|
style: ``
|
919
951
|
})
|
920
952
|
);
|
921
953
|
|
922
|
-
customElements.define(componentName$
|
954
|
+
customElements.define(componentName$5, DatePicker);
|
923
955
|
|
924
|
-
const componentName$
|
956
|
+
const componentName$4 = getComponentName('container');
|
925
957
|
|
926
958
|
class RawContainer extends HTMLElement {
|
927
959
|
static get componentName() {
|
928
|
-
return componentName$
|
960
|
+
return componentName$4;
|
929
961
|
}
|
930
962
|
constructor() {
|
931
963
|
super();
|
@@ -975,7 +1007,45 @@ const Container = compose(
|
|
975
1007
|
componentNameValidationMixin
|
976
1008
|
)(RawContainer);
|
977
1009
|
|
978
|
-
customElements.define(componentName$
|
1010
|
+
customElements.define(componentName$4, Container);
|
1011
|
+
|
1012
|
+
const componentName$3 = getComponentName('text');
|
1013
|
+
|
1014
|
+
class RawText extends HTMLElement {
|
1015
|
+
static get componentName() {
|
1016
|
+
return componentName$3;
|
1017
|
+
}
|
1018
|
+
constructor() {
|
1019
|
+
super();
|
1020
|
+
const template = document.createElement('template');
|
1021
|
+
template.innerHTML = `<slot></slot>`;
|
1022
|
+
|
1023
|
+
this.attachShadow({ mode: 'open' });
|
1024
|
+
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
1025
|
+
|
1026
|
+
this.baseSelector = ':host > slot';
|
1027
|
+
}
|
1028
|
+
}
|
1029
|
+
|
1030
|
+
const Text = compose(
|
1031
|
+
createStyleMixin({
|
1032
|
+
mappings: {
|
1033
|
+
fontFamily: {},
|
1034
|
+
lineHeight: {},
|
1035
|
+
fontStyle: {},
|
1036
|
+
fontSize: {},
|
1037
|
+
fontWeight: {},
|
1038
|
+
width: {},
|
1039
|
+
color: {},
|
1040
|
+
textAlign: matchHostStyle(),
|
1041
|
+
display: matchHostStyle()
|
1042
|
+
}
|
1043
|
+
}),
|
1044
|
+
draggableMixin,
|
1045
|
+
componentNameValidationMixin
|
1046
|
+
)(RawText);
|
1047
|
+
|
1048
|
+
customElements.define(componentName$3, Text);
|
979
1049
|
|
980
1050
|
const getVarName = (path) => getCssVarName(DESCOPE_PREFIX, ...path);
|
981
1051
|
|
@@ -1124,21 +1194,47 @@ const colors = genColors({
|
|
1124
1194
|
error: 'red'
|
1125
1195
|
});
|
1126
1196
|
|
1197
|
+
const fonts = {
|
1198
|
+
font1: ['Roboto', 'sans-serif'],
|
1199
|
+
font2: ['Oswald', 'serif']
|
1200
|
+
};
|
1201
|
+
const fontsRef = getThemeRefs({ fonts }).fonts;
|
1202
|
+
|
1127
1203
|
const typography = {
|
1128
1204
|
h1: {
|
1129
|
-
font:
|
1130
|
-
weight: '
|
1205
|
+
font: fontsRef.font1,
|
1206
|
+
weight: '900',
|
1131
1207
|
size: '48px'
|
1132
1208
|
},
|
1133
1209
|
h2: {
|
1134
|
-
font:
|
1135
|
-
weight: '
|
1210
|
+
font: fontsRef.font1,
|
1211
|
+
weight: '800',
|
1136
1212
|
size: '38px'
|
1137
1213
|
},
|
1138
1214
|
h3: {
|
1139
|
-
font:
|
1140
|
-
weight: '
|
1215
|
+
font: fontsRef.font1,
|
1216
|
+
weight: '600',
|
1141
1217
|
size: '28px'
|
1218
|
+
},
|
1219
|
+
subtitle1: {
|
1220
|
+
font: fontsRef.font2,
|
1221
|
+
weight: '500',
|
1222
|
+
size: '22px'
|
1223
|
+
},
|
1224
|
+
subtitle2: {
|
1225
|
+
font: fontsRef.font2,
|
1226
|
+
weight: '400',
|
1227
|
+
size: '20px'
|
1228
|
+
},
|
1229
|
+
body1: {
|
1230
|
+
font: fontsRef.font1,
|
1231
|
+
weight: '300',
|
1232
|
+
size: '16px'
|
1233
|
+
},
|
1234
|
+
body2: {
|
1235
|
+
font: fontsRef.font1,
|
1236
|
+
weight: '200',
|
1237
|
+
size: '14px'
|
1142
1238
|
}
|
1143
1239
|
};
|
1144
1240
|
|
@@ -1163,20 +1259,20 @@ const radius = {
|
|
1163
1259
|
};
|
1164
1260
|
|
1165
1261
|
const shadow = {
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1262
|
+
wide: {
|
1263
|
+
sm: '0 2px 3px -0.5px',
|
1264
|
+
md: '0 4px 6px -1px',
|
1265
|
+
lg: '0 10px 15px -3px',
|
1266
|
+
xl: '0 20px 25px -5px',
|
1267
|
+
'2xl': '0 25px 50px -12px'
|
1268
|
+
},
|
1269
|
+
narrow: {
|
1270
|
+
sm: '0 1px 2px -1px',
|
1271
|
+
md: '0 2px 4px -2px',
|
1272
|
+
lg: '0 4px 6px -4px',
|
1273
|
+
xl: '0 8px 10px -6px',
|
1274
|
+
'2xl': '0 16px 16px -8px'
|
1275
|
+
}
|
1180
1276
|
};
|
1181
1277
|
|
1182
1278
|
var globals = {
|
@@ -1185,159 +1281,154 @@ var globals = {
|
|
1185
1281
|
spacing,
|
1186
1282
|
border,
|
1187
1283
|
radius,
|
1188
|
-
shadow
|
1284
|
+
shadow,
|
1285
|
+
fonts
|
1189
1286
|
};
|
1190
1287
|
|
1191
|
-
const globalRefs$
|
1192
|
-
const vars$
|
1288
|
+
const globalRefs$4 = getThemeRefs(globals);
|
1289
|
+
const vars$8 = Button.cssVarList;
|
1193
1290
|
|
1194
1291
|
const mode = {
|
1195
|
-
primary: globalRefs$
|
1196
|
-
secondary: globalRefs$
|
1197
|
-
success: globalRefs$
|
1198
|
-
error: globalRefs$
|
1199
|
-
surface: globalRefs$
|
1292
|
+
primary: globalRefs$4.colors.primary,
|
1293
|
+
secondary: globalRefs$4.colors.secondary,
|
1294
|
+
success: globalRefs$4.colors.success,
|
1295
|
+
error: globalRefs$4.colors.error,
|
1296
|
+
surface: globalRefs$4.colors.surface
|
1200
1297
|
};
|
1201
1298
|
|
1202
|
-
const [helperTheme$1, helperRefs$1] = createHelperVars({ mode }, componentName$
|
1299
|
+
const [helperTheme$1, helperRefs$1] = createHelperVars({ mode }, componentName$c);
|
1203
1300
|
|
1204
1301
|
const button = {
|
1205
1302
|
...helperTheme$1,
|
1206
1303
|
|
1207
1304
|
size: {
|
1208
1305
|
xs: {
|
1209
|
-
[vars$
|
1210
|
-
[vars$
|
1211
|
-
[vars$
|
1306
|
+
[vars$8.height]: '10px',
|
1307
|
+
[vars$8.fontSize]: '10px',
|
1308
|
+
[vars$8.padding]: `0 ${globalRefs$4.spacing.xs}`
|
1212
1309
|
},
|
1213
1310
|
sm: {
|
1214
|
-
[vars$
|
1215
|
-
[vars$
|
1216
|
-
[vars$
|
1311
|
+
[vars$8.height]: '20px',
|
1312
|
+
[vars$8.fontSize]: '10px',
|
1313
|
+
[vars$8.padding]: `0 ${globalRefs$4.spacing.sm}`
|
1217
1314
|
},
|
1218
1315
|
md: {
|
1219
|
-
[vars$
|
1220
|
-
[vars$
|
1221
|
-
[vars$
|
1316
|
+
[vars$8.height]: '30px',
|
1317
|
+
[vars$8.fontSize]: '14px',
|
1318
|
+
[vars$8.padding]: `0 ${globalRefs$4.spacing.md}`
|
1222
1319
|
},
|
1223
1320
|
lg: {
|
1224
|
-
[vars$
|
1225
|
-
[vars$
|
1226
|
-
[vars$
|
1321
|
+
[vars$8.height]: '40px',
|
1322
|
+
[vars$8.fontSize]: '20px',
|
1323
|
+
[vars$8.padding]: `0 ${globalRefs$4.spacing.lg}`
|
1227
1324
|
},
|
1228
1325
|
xl: {
|
1229
|
-
[vars$
|
1230
|
-
[vars$
|
1231
|
-
[vars$
|
1326
|
+
[vars$8.height]: '50px',
|
1327
|
+
[vars$8.fontSize]: '25px',
|
1328
|
+
[vars$8.padding]: `0 ${globalRefs$4.spacing.xl}`
|
1232
1329
|
}
|
1233
1330
|
},
|
1234
1331
|
|
1235
|
-
[vars$
|
1236
|
-
[vars$
|
1237
|
-
[vars$
|
1238
|
-
[vars$
|
1239
|
-
[vars$
|
1332
|
+
[vars$8.borderRadius]: globalRefs$4.radius.lg,
|
1333
|
+
[vars$8.cursor]: 'pointer',
|
1334
|
+
[vars$8.borderWidth]: '2px',
|
1335
|
+
[vars$8.borderStyle]: 'solid',
|
1336
|
+
[vars$8.borderColor]: 'transparent',
|
1240
1337
|
|
1241
1338
|
_fullWidth: {
|
1242
|
-
[vars$
|
1339
|
+
[vars$8.width]: '100%'
|
1243
1340
|
},
|
1244
1341
|
_loading: {
|
1245
|
-
[vars$
|
1342
|
+
[vars$8.cursor]: 'wait'
|
1246
1343
|
},
|
1247
1344
|
|
1248
1345
|
variant: {
|
1249
1346
|
contained: {
|
1250
|
-
[vars$
|
1251
|
-
[vars$
|
1347
|
+
[vars$8.color]: helperRefs$1.contrast,
|
1348
|
+
[vars$8.backgroundColor]: helperRefs$1.main,
|
1252
1349
|
_hover: {
|
1253
|
-
[vars$
|
1350
|
+
[vars$8.backgroundColor]: helperRefs$1.dark
|
1254
1351
|
},
|
1255
1352
|
_loading: {
|
1256
|
-
[vars$
|
1353
|
+
[vars$8.backgroundColor]: helperRefs$1.main
|
1257
1354
|
}
|
1258
1355
|
},
|
1259
1356
|
outline: {
|
1260
|
-
[vars$
|
1261
|
-
[vars$
|
1357
|
+
[vars$8.color]: helperRefs$1.main,
|
1358
|
+
[vars$8.borderColor]: helperRefs$1.main,
|
1262
1359
|
_hover: {
|
1263
|
-
[vars$
|
1264
|
-
[vars$
|
1360
|
+
[vars$8.color]: helperRefs$1.dark,
|
1361
|
+
[vars$8.borderColor]: helperRefs$1.dark,
|
1265
1362
|
_error: {
|
1266
|
-
[vars$
|
1363
|
+
[vars$8.color]: helperRefs$1.error
|
1267
1364
|
}
|
1268
1365
|
}
|
1269
1366
|
},
|
1270
1367
|
link: {
|
1271
|
-
[vars$
|
1272
|
-
[vars$
|
1273
|
-
[vars$
|
1274
|
-
[vars$
|
1275
|
-
[vars$
|
1368
|
+
[vars$8.color]: helperRefs$1.main,
|
1369
|
+
[vars$8.padding]: 0,
|
1370
|
+
[vars$8.margin]: 0,
|
1371
|
+
[vars$8.lineHeight]: helperRefs$1.height,
|
1372
|
+
[vars$8.borderRadius]: 0,
|
1276
1373
|
_hover: {
|
1277
|
-
[vars$
|
1278
|
-
[vars$
|
1374
|
+
[vars$8.color]: helperRefs$1.main,
|
1375
|
+
[vars$8.textDecoration]: 'underline'
|
1279
1376
|
}
|
1280
1377
|
}
|
1281
1378
|
}
|
1282
1379
|
};
|
1283
1380
|
|
1284
|
-
const globalRefs$
|
1381
|
+
const globalRefs$3 = getThemeRefs(globals);
|
1285
1382
|
|
1286
|
-
const vars$
|
1383
|
+
const vars$7 = TextField.cssVarList;
|
1287
1384
|
|
1288
1385
|
const textField = (vars) => ({
|
1289
1386
|
size: {
|
1290
1387
|
xs: {
|
1291
1388
|
[vars.height]: '14px',
|
1292
1389
|
[vars.fontSize]: '8px',
|
1293
|
-
[vars.padding]: `0 ${globalRefs$
|
1390
|
+
[vars.padding]: `0 ${globalRefs$3.spacing.xs}`
|
1294
1391
|
},
|
1295
1392
|
sm: {
|
1296
1393
|
[vars.height]: '20px',
|
1297
1394
|
[vars.fontSize]: '10px',
|
1298
|
-
[vars.padding]: `0 ${globalRefs$
|
1395
|
+
[vars.padding]: `0 ${globalRefs$3.spacing.sm}`
|
1299
1396
|
},
|
1300
1397
|
md: {
|
1301
1398
|
[vars.height]: '30px',
|
1302
1399
|
[vars.fontSize]: '14px',
|
1303
|
-
[vars.padding]: `0 ${globalRefs$
|
1400
|
+
[vars.padding]: `0 ${globalRefs$3.spacing.md}`
|
1304
1401
|
},
|
1305
1402
|
lg: {
|
1306
1403
|
[vars.height]: '40px',
|
1307
1404
|
[vars.fontSize]: '16px',
|
1308
|
-
[vars.padding]: `0 ${globalRefs$
|
1405
|
+
[vars.padding]: `0 ${globalRefs$3.spacing.lg}`
|
1309
1406
|
},
|
1310
1407
|
xl: {
|
1311
1408
|
[vars.height]: '50px',
|
1312
1409
|
[vars.fontSize]: '25px',
|
1313
|
-
[vars.padding]: `0 ${globalRefs$
|
1410
|
+
[vars.padding]: `0 ${globalRefs$3.spacing.xl}`
|
1314
1411
|
}
|
1315
1412
|
},
|
1316
1413
|
|
1317
|
-
[vars.color]: globalRefs$
|
1318
|
-
[vars.placeholderColor]: globalRefs$
|
1414
|
+
[vars.color]: globalRefs$3.colors.surface.contrast,
|
1415
|
+
[vars.placeholderColor]: globalRefs$3.colors.surface.contrast,
|
1319
1416
|
|
1320
|
-
[vars.backgroundColor]: globalRefs$
|
1417
|
+
[vars.backgroundColor]: globalRefs$3.colors.surface.light,
|
1321
1418
|
|
1322
1419
|
[vars.borderWidth]: '1px',
|
1323
1420
|
[vars.borderStyle]: 'solid',
|
1324
1421
|
[vars.borderColor]: 'transparent',
|
1325
|
-
[vars.
|
1326
|
-
[vars.borderRadius]: globalRefs$2.radius.sm,
|
1422
|
+
[vars.borderRadius]: globalRefs$3.radius.sm,
|
1327
1423
|
|
1328
1424
|
_borderOffset: {
|
1329
1425
|
[vars.outlineOffset]: '2px'
|
1330
1426
|
},
|
1331
1427
|
|
1332
|
-
_invalid: {
|
1333
|
-
[vars.borderColor]: globalRefs$2.colors.error.main,
|
1334
|
-
[vars.color]: globalRefs$2.colors.error.main
|
1335
|
-
},
|
1336
|
-
|
1337
1428
|
_disabled: {
|
1338
|
-
[vars.color]: globalRefs$
|
1339
|
-
[vars.placeholderColor]: globalRefs$
|
1340
|
-
[vars.backgroundColor]: globalRefs$
|
1429
|
+
[vars.color]: globalRefs$3.colors.surface.dark,
|
1430
|
+
[vars.placeholderColor]: globalRefs$3.colors.surface.light,
|
1431
|
+
[vars.backgroundColor]: globalRefs$3.colors.surface.main
|
1341
1432
|
},
|
1342
1433
|
|
1343
1434
|
_fullWidth: {
|
@@ -1345,21 +1436,27 @@ const textField = (vars) => ({
|
|
1345
1436
|
},
|
1346
1437
|
|
1347
1438
|
_focused: {
|
1348
|
-
[vars.outline]: `2px solid ${globalRefs$
|
1439
|
+
[vars.outline]: `2px solid ${globalRefs$3.colors.surface.main}`
|
1349
1440
|
},
|
1350
1441
|
|
1351
1442
|
_bordered: {
|
1352
|
-
[vars.borderColor]: globalRefs$
|
1443
|
+
[vars.borderColor]: globalRefs$3.colors.surface.main
|
1444
|
+
},
|
1445
|
+
|
1446
|
+
_hasErrorMessage: {
|
1447
|
+
[vars.borderColor]: globalRefs$3.colors.error.main,
|
1448
|
+
[vars.color]: globalRefs$3.colors.error.main,
|
1449
|
+
[vars.placeholderColor]: globalRefs$3.colors.error.light
|
1353
1450
|
}
|
1354
1451
|
});
|
1355
1452
|
|
1356
|
-
var textField$1 = textField(vars$
|
1453
|
+
var textField$1 = textField(vars$7);
|
1357
1454
|
|
1358
|
-
const vars$
|
1455
|
+
const vars$6 = PasswordField.cssVarList;
|
1359
1456
|
|
1360
1457
|
const passwordField = {
|
1361
|
-
...textField(vars$
|
1362
|
-
[vars$
|
1458
|
+
...textField(vars$6),
|
1459
|
+
[vars$6.revealCursor]: 'pointer'
|
1363
1460
|
};
|
1364
1461
|
|
1365
1462
|
const numberField = {
|
@@ -1370,42 +1467,41 @@ const emailField = {
|
|
1370
1467
|
...textField(EmailField.cssVarList)
|
1371
1468
|
};
|
1372
1469
|
|
1373
|
-
const globalRefs$
|
1374
|
-
const vars$
|
1470
|
+
const globalRefs$2 = getThemeRefs(globals);
|
1471
|
+
const vars$5 = TextArea.cssVarList;
|
1375
1472
|
|
1376
1473
|
const textArea = {
|
1377
|
-
[vars$
|
1378
|
-
[vars$
|
1379
|
-
[vars$
|
1474
|
+
[vars$5.color]: globalRefs$2.colors.primary.main,
|
1475
|
+
[vars$5.backgroundColor]: globalRefs$2.colors.surface.light,
|
1476
|
+
[vars$5.resize]: 'vertical',
|
1380
1477
|
|
1381
|
-
[vars$
|
1382
|
-
[vars$
|
1383
|
-
[vars$
|
1384
|
-
[vars$
|
1478
|
+
[vars$5.borderRadius]: globalRefs$2.radius.sm,
|
1479
|
+
[vars$5.borderWidth]: '1px',
|
1480
|
+
[vars$5.borderStyle]: 'solid',
|
1481
|
+
[vars$5.borderColor]: 'transparent',
|
1385
1482
|
|
1386
1483
|
_borderOffset: {
|
1387
|
-
[vars$
|
1484
|
+
[vars$5.outlineOffset]: '2px'
|
1388
1485
|
},
|
1389
1486
|
|
1390
1487
|
_bordered: {
|
1391
|
-
[vars$
|
1488
|
+
[vars$5.borderColor]: globalRefs$2.colors.surface.main
|
1392
1489
|
},
|
1393
1490
|
|
1394
1491
|
_focused: {
|
1395
|
-
[vars$
|
1396
|
-
[vars$4.outline]: `2px solid ${globalRefs$1.colors.surface.main}`
|
1492
|
+
[vars$5.outline]: `2px solid ${globalRefs$2.colors.surface.main}`
|
1397
1493
|
},
|
1398
1494
|
|
1399
1495
|
_fullWidth: {
|
1400
|
-
[vars$
|
1496
|
+
[vars$5.width]: '100%'
|
1401
1497
|
},
|
1402
1498
|
|
1403
1499
|
_disabled: {
|
1404
|
-
[vars$
|
1500
|
+
[vars$5.cursor]: 'not-allowed'
|
1405
1501
|
},
|
1406
1502
|
|
1407
1503
|
_invalid: {
|
1408
|
-
[vars$
|
1504
|
+
[vars$5.outline]: `2px solid ${globalRefs$2.colors.error.main}`
|
1409
1505
|
}
|
1410
1506
|
};
|
1411
1507
|
|
@@ -1435,10 +1531,10 @@ const Checkbox = compose(
|
|
1435
1531
|
})
|
1436
1532
|
);
|
1437
1533
|
|
1438
|
-
const vars$
|
1534
|
+
const vars$4 = Checkbox.cssVarList;
|
1439
1535
|
|
1440
1536
|
const checkbox = {
|
1441
|
-
[vars$
|
1537
|
+
[vars$4.cursor]: 'pointer'
|
1442
1538
|
};
|
1443
1539
|
|
1444
1540
|
const componentName$1 = getComponentName('switch-toggle');
|
@@ -1515,16 +1611,16 @@ overrides = `
|
|
1515
1611
|
}
|
1516
1612
|
`;
|
1517
1613
|
|
1518
|
-
const vars$
|
1614
|
+
const vars$3 = SwitchToggle.cssVarList;
|
1519
1615
|
|
1520
1616
|
const swtichToggle = {
|
1521
|
-
[vars$
|
1522
|
-
[vars$
|
1617
|
+
[vars$3.width]: '70px',
|
1618
|
+
[vars$3.cursor]: [{}, { selector: '> label' }]
|
1523
1619
|
};
|
1524
1620
|
|
1525
|
-
const globalRefs = getThemeRefs(globals);
|
1621
|
+
const globalRefs$1 = getThemeRefs(globals);
|
1526
1622
|
|
1527
|
-
const vars$
|
1623
|
+
const vars$2 = Container.cssVarList;
|
1528
1624
|
|
1529
1625
|
const verticalAlignment = {
|
1530
1626
|
start: { verticalAlignment: 'start' },
|
@@ -1547,31 +1643,31 @@ const [helperTheme, helperRefs, helperVars] =
|
|
1547
1643
|
|
1548
1644
|
const container = {
|
1549
1645
|
...helperTheme,
|
1550
|
-
[vars$
|
1646
|
+
[vars$2.display]: 'flex',
|
1551
1647
|
verticalPadding: {
|
1552
|
-
sm: { [vars$
|
1553
|
-
md: { [vars$
|
1554
|
-
lg: { [vars$
|
1648
|
+
sm: { [vars$2.verticalPadding]: '5px' },
|
1649
|
+
md: { [vars$2.verticalPadding]: '10px' },
|
1650
|
+
lg: { [vars$2.verticalPadding]: '20px' },
|
1555
1651
|
},
|
1556
1652
|
horizontalPadding: {
|
1557
|
-
sm: { [vars$
|
1558
|
-
md: { [vars$
|
1559
|
-
lg: { [vars$
|
1653
|
+
sm: { [vars$2.horizontalPadding]: '5px' },
|
1654
|
+
md: { [vars$2.horizontalPadding]: '10px' },
|
1655
|
+
lg: { [vars$2.horizontalPadding]: '20px' },
|
1560
1656
|
},
|
1561
1657
|
direction: {
|
1562
1658
|
row: {
|
1563
|
-
[vars$
|
1564
|
-
[vars$
|
1565
|
-
[vars$
|
1659
|
+
[vars$2.flexDirection]: 'row',
|
1660
|
+
[vars$2.alignItems]: helperRefs.verticalAlignment,
|
1661
|
+
[vars$2.justifyContent]: helperRefs.horizontalAlignment,
|
1566
1662
|
horizontalAlignment: {
|
1567
1663
|
spaceBetween: { [helperVars.horizontalAlignment]: 'space-between' },
|
1568
1664
|
}
|
1569
1665
|
},
|
1570
1666
|
|
1571
1667
|
column: {
|
1572
|
-
[vars$
|
1573
|
-
[vars$
|
1574
|
-
[vars$
|
1668
|
+
[vars$2.flexDirection]: 'column',
|
1669
|
+
[vars$2.alignItems]: helperRefs.horizontalAlignment,
|
1670
|
+
[vars$2.justifyContent]: helperRefs.verticalAlignment,
|
1575
1671
|
verticalAlignment: {
|
1576
1672
|
spaceBetween: { [helperVars.verticalAlignment]: 'space-between' }
|
1577
1673
|
}
|
@@ -1580,44 +1676,44 @@ const container = {
|
|
1580
1676
|
|
1581
1677
|
spaceBetween: {
|
1582
1678
|
sm: {
|
1583
|
-
[vars$
|
1679
|
+
[vars$2.gap]: '10px'
|
1584
1680
|
},
|
1585
1681
|
md: {
|
1586
|
-
[vars$
|
1682
|
+
[vars$2.gap]: '20px'
|
1587
1683
|
},
|
1588
1684
|
lg: {
|
1589
|
-
[vars$
|
1685
|
+
[vars$2.gap]: '30px'
|
1590
1686
|
}
|
1591
1687
|
},
|
1592
1688
|
|
1593
1689
|
shadow: {
|
1594
1690
|
sm: {
|
1595
|
-
[vars$
|
1691
|
+
[vars$2.boxShadow]: `${globalRefs$1.shadow.wide.sm} ${helperRefs.shadowColor}, ${globalRefs$1.shadow.narrow.sm} ${helperRefs.shadowColor}`
|
1596
1692
|
},
|
1597
1693
|
md: {
|
1598
|
-
[vars$
|
1694
|
+
[vars$2.boxShadow]: `${globalRefs$1.shadow.wide.md} ${helperRefs.shadowColor}, ${globalRefs$1.shadow.narrow.md} ${helperRefs.shadowColor}`
|
1599
1695
|
},
|
1600
1696
|
lg: {
|
1601
|
-
[vars$
|
1697
|
+
[vars$2.boxShadow]: `${globalRefs$1.shadow.wide.lg} ${helperRefs.shadowColor}, ${globalRefs$1.shadow.narrow.lg} ${helperRefs.shadowColor}`
|
1602
1698
|
},
|
1603
1699
|
xl: {
|
1604
|
-
[vars$
|
1700
|
+
[vars$2.boxShadow]: `${globalRefs$1.shadow.wide.xl} ${helperRefs.shadowColor}, ${globalRefs$1.shadow.narrow.xl} ${helperRefs.shadowColor}`
|
1605
1701
|
},
|
1606
1702
|
'2xl': {
|
1607
1703
|
[helperVars.shadowColor]: '#00000050',
|
1608
|
-
[vars$
|
1704
|
+
[vars$2.boxShadow]: `${globalRefs$1.shadow.wide['2xl']} ${helperRefs.shadowColor}`
|
1609
1705
|
},
|
1610
1706
|
},
|
1611
1707
|
|
1612
1708
|
borderRadius: {
|
1613
1709
|
sm: {
|
1614
|
-
[vars$
|
1710
|
+
[vars$2.borderRadius]: globalRefs$1.radius.sm
|
1615
1711
|
},
|
1616
1712
|
md: {
|
1617
|
-
[vars$
|
1713
|
+
[vars$2.borderRadius]: globalRefs$1.radius.md
|
1618
1714
|
},
|
1619
1715
|
lg: {
|
1620
|
-
[vars$
|
1716
|
+
[vars$2.borderRadius]: globalRefs$1.radius.lg
|
1621
1717
|
},
|
1622
1718
|
}
|
1623
1719
|
};
|
@@ -1670,10 +1766,84 @@ style = `
|
|
1670
1766
|
}
|
1671
1767
|
`;
|
1672
1768
|
|
1673
|
-
const vars = Logo.cssVarList;
|
1769
|
+
const vars$1 = Logo.cssVarList;
|
1674
1770
|
|
1675
1771
|
const logo = {
|
1676
|
-
[vars.fallbackUrl]: 'url(https://content.app.descope.com/assets/flows/noLogoPlaceholder.svg)'
|
1772
|
+
[vars$1.fallbackUrl]: 'url(https://content.app.descope.com/assets/flows/noLogoPlaceholder.svg)'
|
1773
|
+
};
|
1774
|
+
|
1775
|
+
const globalRefs = getThemeRefs(globals);
|
1776
|
+
|
1777
|
+
const vars = Text.cssVarList;
|
1778
|
+
|
1779
|
+
const text = {
|
1780
|
+
[vars.lineHeight]: '1em',
|
1781
|
+
[vars.display]: 'inline-block',
|
1782
|
+
[vars.textAlign]: 'left',
|
1783
|
+
[vars.color]: globalRefs.colors.surface.dark,
|
1784
|
+
variant: {
|
1785
|
+
h1: {
|
1786
|
+
[vars.fontSize]: globalRefs.typography.h1.size,
|
1787
|
+
[vars.fontWeight]: globalRefs.typography.h1.weight,
|
1788
|
+
[vars.fontFamily]: globalRefs.typography.h1.font
|
1789
|
+
},
|
1790
|
+
h2: {
|
1791
|
+
[vars.fontSize]: globalRefs.typography.h2.size,
|
1792
|
+
[vars.fontWeight]: globalRefs.typography.h2.weight,
|
1793
|
+
[vars.fontFamily]: globalRefs.typography.h2.font
|
1794
|
+
},
|
1795
|
+
h3: {
|
1796
|
+
[vars.fontSize]: globalRefs.typography.h3.size,
|
1797
|
+
[vars.fontWeight]: globalRefs.typography.h3.weight,
|
1798
|
+
[vars.fontFamily]: globalRefs.typography.h3.font
|
1799
|
+
},
|
1800
|
+
subtitle1: {
|
1801
|
+
[vars.fontSize]: globalRefs.typography.subtitle1.size,
|
1802
|
+
[vars.fontWeight]: globalRefs.typography.subtitle1.weight,
|
1803
|
+
[vars.fontFamily]: globalRefs.typography.subtitle1.font
|
1804
|
+
},
|
1805
|
+
subtitle2: {
|
1806
|
+
[vars.fontSize]: globalRefs.typography.subtitle2.size,
|
1807
|
+
[vars.fontWeight]: globalRefs.typography.subtitle2.weight,
|
1808
|
+
[vars.fontFamily]: globalRefs.typography.subtitle2.font
|
1809
|
+
},
|
1810
|
+
body1: {
|
1811
|
+
[vars.fontSize]: globalRefs.typography.body1.size,
|
1812
|
+
[vars.fontWeight]: globalRefs.typography.body1.weight,
|
1813
|
+
[vars.fontFamily]: globalRefs.typography.body1.font
|
1814
|
+
},
|
1815
|
+
body2: {
|
1816
|
+
[vars.fontSize]: globalRefs.typography.body2.size,
|
1817
|
+
[vars.fontWeight]: globalRefs.typography.body2.weight,
|
1818
|
+
[vars.fontFamily]: globalRefs.typography.body2.font
|
1819
|
+
}
|
1820
|
+
},
|
1821
|
+
mode: {
|
1822
|
+
primary: {
|
1823
|
+
[vars.color]: globalRefs.colors.primary.main
|
1824
|
+
},
|
1825
|
+
secondary: {
|
1826
|
+
[vars.color]: globalRefs.colors.secondary.main
|
1827
|
+
},
|
1828
|
+
error: {
|
1829
|
+
[vars.color]: globalRefs.colors.error.main
|
1830
|
+
},
|
1831
|
+
success: {
|
1832
|
+
[vars.color]: globalRefs.colors.success.main
|
1833
|
+
}
|
1834
|
+
},
|
1835
|
+
textAlign: {
|
1836
|
+
right: { [vars.textAlign]: 'right' },
|
1837
|
+
left: { [vars.textAlign]: 'left' },
|
1838
|
+
center: { [vars.textAlign]: 'center' }
|
1839
|
+
},
|
1840
|
+
_fullWidth: {
|
1841
|
+
[vars.width]: '100%',
|
1842
|
+
[vars.display]: 'block'
|
1843
|
+
},
|
1844
|
+
_italic: {
|
1845
|
+
[vars.fontStyle]: 'italic'
|
1846
|
+
}
|
1677
1847
|
};
|
1678
1848
|
|
1679
1849
|
var components = {
|
@@ -1686,7 +1856,8 @@ var components = {
|
|
1686
1856
|
checkbox,
|
1687
1857
|
switchToggle: swtichToggle,
|
1688
1858
|
container,
|
1689
|
-
logo
|
1859
|
+
logo,
|
1860
|
+
text
|
1690
1861
|
};
|
1691
1862
|
|
1692
1863
|
var index = { globals, components };
|