@descope/web-components-ui 1.0.54 → 1.0.56

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import '@vaadin/button';
2
+ import '@vaadin/checkbox';
2
3
  import '@vaadin/text-field';
3
- import '@vaadin/number-field';
4
+ import '@vaadin/date-picker';
4
5
  import '@vaadin/email-field';
6
+ import '@vaadin/number-field';
5
7
  import '@vaadin/password-field';
6
8
  import '@vaadin/text-area';
7
- import '@vaadin/date-picker';
8
- import '@vaadin/checkbox';
9
9
  import merge from 'lodash.merge';
10
10
  import set from 'lodash.set';
11
11
  import Color from 'color';
@@ -535,7 +535,7 @@ const compose =
535
535
  (val) =>
536
536
  fns.reduceRight((res, fn) => fn(res), val);
537
537
 
538
- const componentName$g = getComponentName('button');
538
+ const componentName$i = getComponentName('button');
539
539
 
540
540
  const editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;
541
541
  const resetStyles = `
@@ -558,7 +558,7 @@ const iconStyles = `
558
558
  }
559
559
  `;
560
560
 
561
- const selectors$4 = {
561
+ const selectors$5 = {
562
562
  label: '::part(label)'
563
563
  };
564
564
 
@@ -567,7 +567,7 @@ const Button = compose(
567
567
  mappings: {
568
568
  backgroundColor: {},
569
569
  borderRadius: {},
570
- color: { selector: selectors$4.label },
570
+ color: { selector: selectors$5.label },
571
571
  borderColor: {},
572
572
  borderStyle: {},
573
573
  borderWidth: {},
@@ -575,8 +575,8 @@ const Button = compose(
575
575
  height: {},
576
576
  width: matchHostStyle(),
577
577
  cursor: {},
578
- padding: [{ selector: selectors$4.label }],
579
- textDecoration: { selector: selectors$4.label }
578
+ padding: [{ selector: selectors$5.label }],
579
+ textDecoration: { selector: selectors$5.label }
580
580
  }
581
581
  }),
582
582
  draggableMixin,
@@ -588,7 +588,7 @@ const Button = compose(
588
588
  style: () =>
589
589
  `${resetStyles} ${editorOverrides} ${iconStyles} ${loadingIndicatorStyles}`,
590
590
  excludeAttrsSync: ['tabindex'],
591
- componentName: componentName$g
591
+ componentName: componentName$i
592
592
  })
593
593
  );
594
594
 
@@ -621,7 +621,155 @@ const loadingIndicatorStyles = `
621
621
  }
622
622
  `;
623
623
 
624
- customElements.define(componentName$g, Button);
624
+ customElements.define(componentName$i, Button);
625
+
626
+ const componentName$h = getComponentName('checkbox');
627
+
628
+ const Checkbox = compose(
629
+ createStyleMixin({
630
+ mappings: {
631
+ width: matchHostStyle(),
632
+ cursor: [{}, { selector: '> label' }]
633
+ }
634
+ }),
635
+ draggableMixin,
636
+ inputMixin,
637
+ componentNameValidationMixin
638
+ )(
639
+ createProxy({
640
+ slots: [],
641
+ wrappedEleName: 'vaadin-checkbox',
642
+ style: `
643
+ :host {
644
+ display: inline-block;
645
+ }
646
+ `,
647
+ excludeAttrsSync: ['tabindex'],
648
+ componentName: componentName$h
649
+ })
650
+ );
651
+
652
+ customElements.define(componentName$h, Checkbox);
653
+
654
+ const componentName$g = getComponentName('loader-linear');
655
+
656
+ class RawLoaderLinear extends DescopeBaseClass {
657
+ static get componentName() {
658
+ return componentName$g;
659
+ }
660
+ constructor() {
661
+ super();
662
+ const template = document.createElement('template');
663
+ template.innerHTML = `
664
+ <style>
665
+ @keyframes tilt {
666
+ 0% { transform: translateX(0); }
667
+ 50% { transform: translateX(400%); }
668
+ }
669
+ :host {
670
+ position: relative;
671
+ }
672
+ div::after {
673
+ content: '';
674
+ animation-name: tilt;
675
+ position: absolute;
676
+ left: 0;
677
+ }
678
+ </style>
679
+ <div></div>
680
+ `;
681
+
682
+ this.attachShadow({ mode: 'open' });
683
+ this.shadowRoot.appendChild(template.content.cloneNode(true));
684
+
685
+ this.baseSelector = ':host > div';
686
+ }
687
+ }
688
+
689
+ const selectors$4 = {
690
+ root: {},
691
+ after: { selector: '::after' }
692
+ };
693
+
694
+ const { root: root$1, after: after$1 } = selectors$4;
695
+
696
+ const LoaderLinear = compose(
697
+ createStyleMixin({
698
+ mappings: {
699
+ display: root$1,
700
+ width: matchHostStyle(root$1),
701
+ height: [root$1, after$1],
702
+ borderRadius: [root$1, after$1],
703
+ surfaceColor: [{ property: 'background-color' }],
704
+ barColor: [{ ...after$1, property: 'background-color' }],
705
+ barWidth: { ...after$1, property: 'width' },
706
+ animationDuration: [root$1, after$1],
707
+ animationTimingFunction: [root$1, after$1],
708
+ animationIterationCount: [root$1, after$1]
709
+ }
710
+ }),
711
+ draggableMixin,
712
+ componentNameValidationMixin
713
+ )(RawLoaderLinear);
714
+
715
+ customElements.define(componentName$g, LoaderLinear);
716
+
717
+ const componentName$f = getComponentName('loader-radial');
718
+
719
+ class RawLoaderRadial extends DescopeBaseClass {
720
+ static get componentName() {
721
+ return componentName$f;
722
+ }
723
+ constructor() {
724
+ super();
725
+ const template = document.createElement('template');
726
+ template.innerHTML = `
727
+ <style>
728
+ @keyframes spin {
729
+ 0% { transform: rotate(0deg); }
730
+ 100% { transform: rotate(360deg); }
731
+ }
732
+ :host {
733
+ position: relative;
734
+ }
735
+ :host > div {
736
+ animation-name: spin;
737
+ }
738
+ </style>
739
+ <div></div>
740
+ `;
741
+
742
+ this.attachShadow({ mode: 'open' });
743
+ this.shadowRoot.appendChild(template.content.cloneNode(true));
744
+
745
+ this.baseSelector = ':host > div';
746
+ }
747
+ }
748
+
749
+ const LoaderRadial = compose(
750
+ createStyleMixin({
751
+ mappings: {
752
+ display: {},
753
+ width: matchHostStyle({}),
754
+ height: {},
755
+ spinnerWidth: { property: 'border-width' },
756
+ spinnerStyle: { property: 'border-style' },
757
+ spinnerRadius: { property: 'border-radius' },
758
+ spinnerTopColor: { property: 'border-top-color' },
759
+ spinnerBottomColor: { property: 'border-bottom-color' },
760
+ spinnerRightColor: { property: 'border-right-color' },
761
+ spinnerLeftColor: { property: 'border-left-color' },
762
+ color: {},
763
+ animationDuration: {},
764
+ animationTimingFunction: {},
765
+ animationIterationCount: {}
766
+ }
767
+ }),
768
+ draggableMixin,
769
+ componentNameValidationMixin
770
+ )(RawLoaderRadial);
771
+
772
+ customElements.define(componentName$f, LoaderRadial);
625
773
 
626
774
  const selectors$3 = {
627
775
  label: '::part(label)',
@@ -658,7 +806,7 @@ var textFieldMappings = {
658
806
  placeholderColor: { selector: selectors$3.placeholder, property: 'color' }
659
807
  };
660
808
 
661
- const componentName$f = getComponentName('text-field');
809
+ const componentName$e = getComponentName('text-field');
662
810
 
663
811
  let overrides$6 = ``;
664
812
 
@@ -675,7 +823,7 @@ const TextField = compose(
675
823
  wrappedEleName: 'vaadin-text-field',
676
824
  style: () => overrides$6,
677
825
  excludeAttrsSync: ['tabindex'],
678
- componentName: componentName$f
826
+ componentName: componentName$e
679
827
  })
680
828
  );
681
829
 
@@ -720,11 +868,11 @@ overrides$6 = `
720
868
  }
721
869
  `;
722
870
 
723
- customElements.define(componentName$f, TextField);
871
+ customElements.define(componentName$e, TextField);
724
872
 
725
873
  const template = document.createElement('template');
726
874
 
727
- const componentName$e = getComponentName('combo');
875
+ const componentName$d = getComponentName('combo');
728
876
 
729
877
  template.innerHTML = `
730
878
  <descope-button></descope-button>
@@ -741,392 +889,85 @@ class Combo extends DescopeBaseClass {
741
889
  }
742
890
  }
743
891
 
744
- customElements.define(componentName$e, Combo);
892
+ customElements.define(componentName$d, Combo);
745
893
 
746
- const componentName$d = getComponentName('number-field');
894
+ const componentName$c = getComponentName('container');
747
895
 
748
- let overrides$5 = ``;
896
+ class RawContainer extends DescopeBaseClass {
897
+ static get componentName() {
898
+ return componentName$c;
899
+ }
900
+ constructor() {
901
+ super();
902
+ const template = document.createElement('template');
903
+ template.innerHTML = `
904
+ <style>
905
+ :host > slot {
906
+ box-sizing: border-box;
907
+ }
908
+ </style>
909
+ <slot></slot>
910
+ `;
749
911
 
750
- const NumberField = compose(
912
+ this.attachShadow({ mode: 'open' });
913
+ this.shadowRoot.appendChild(template.content.cloneNode(true));
914
+
915
+ this.baseSelector = ':host > slot';
916
+ }
917
+ }
918
+
919
+ const Container = compose(
751
920
  createStyleMixin({
752
921
  mappings: {
753
- ...textFieldMappings
754
- }
755
- }),
756
- draggableMixin,
757
- inputMixin,
758
- componentNameValidationMixin
759
- )(
760
- createProxy({
761
- slots: ['prefix', 'suffix'],
762
- wrappedEleName: 'vaadin-number-field',
763
- style: () => overrides$5,
764
- excludeAttrsSync: ['tabindex'],
765
- componentName: componentName$d
766
- })
767
- );
922
+ height: matchHostStyle(),
923
+ width: matchHostStyle(),
768
924
 
769
- overrides$5 = `
770
- :host {
771
- display: inline-block;
772
- }
773
- vaadin-number-field {
774
- margin: 0;
775
- padding: 0;
776
- }
777
- vaadin-number-field::part(input-field) {
778
- overflow: hidden;
779
- }
780
- vaadin-number-field[readonly] > input:placeholder-shown {
781
- opacity: 1;
782
- }
783
- vaadin-number-field input:-webkit-autofill,
784
- vaadin-number-field input:-webkit-autofill::first-line,
785
- vaadin-number-field input:-webkit-autofill:hover,
786
- vaadin-number-field input:-webkit-autofill:active,
787
- vaadin-number-field input:-webkit-autofill:focus {
788
- -webkit-text-fill-color: var(${NumberField.cssVarList.color});
789
- box-shadow: 0 0 0 var(${NumberField.cssVarList.height}) var(${NumberField.cssVarList.backgroundColor}) inset;
790
- }
791
- vaadin-number-field > label,
792
- vaadin-number-field::part(input-field) {
793
- cursor: pointer;
794
- color: var(${NumberField.cssVarList.color});
795
- }
796
- vaadin-number-field::part(input-field):focus {
797
- cursor: text;
798
- }
799
- vaadin-number-field[required]::part(required-indicator)::after {
800
- font-size: "12px";
801
- content: "*";
802
- color: var(${NumberField.cssVarList.color});
803
- }
804
- vaadin-number-field[readonly]::part(input-field)::after {
805
- border: 0 solid;
806
- }
807
- `;
925
+ verticalPadding: [
926
+ { property: 'padding-top' },
927
+ { property: 'padding-bottom' }
928
+ ],
929
+ horizontalPadding: [
930
+ { property: 'padding-left' },
931
+ { property: 'padding-right' }
932
+ ],
808
933
 
809
- customElements.define(componentName$d, NumberField);
934
+ display: {}, // maybe this should be hardcoded to flex
935
+ flexDirection: {},
936
+ justifyContent: {},
937
+ alignItems: {},
938
+ gap: {},
810
939
 
811
- const componentName$c = getComponentName('email-field');
940
+ backgroundColor: {},
941
+ borderRadius: {},
812
942
 
813
- let overrides$4 = ``;
943
+ borderColor: {},
944
+ borderStyle: {},
945
+ borderWidth: {},
814
946
 
815
- const EmailField = compose(
816
- createStyleMixin({
817
- mappings: {
818
- ...textFieldMappings
947
+ boxShadow: {}
819
948
  }
820
949
  }),
821
950
  draggableMixin,
822
- inputMixin,
951
+ componentNameValidationMixin
952
+ )(RawContainer);
953
+
954
+ customElements.define(componentName$c, Container);
955
+
956
+ const componentName$b = getComponentName('date-picker');
957
+
958
+ const DatePicker = compose(
959
+ draggableMixin,
823
960
  componentNameValidationMixin
824
961
  )(
825
962
  createProxy({
826
- slots: ['suffix'],
827
- wrappedEleName: 'vaadin-email-field',
828
- style: () => overrides$4,
829
- excludeAttrsSync: ['tabindex'],
830
- componentName: componentName$c
963
+ componentName: componentName$b,
964
+ slots: ['prefix', 'suffix'],
965
+ wrappedEleName: 'vaadin-date-picker',
966
+ style: ``
831
967
  })
832
968
  );
833
969
 
834
- overrides$4 = `
835
- :host {
836
- display: inline-block;
837
- }
838
- vaadin-email-field {
839
- margin: 0;
840
- padding: 0;
841
- }
842
- vaadin-email-field::part(input-field) {
843
- overflow: hidden;
844
- }
845
- vaadin-email-field[readonly] > input:placeholder-shown {
846
- opacity: 1;
847
- }
848
- vaadin-email-field input:-webkit-autofill,
849
- vaadin-email-field input:-webkit-autofill::first-line,
850
- vaadin-email-field input:-webkit-autofill:hover,
851
- vaadin-email-field input:-webkit-autofill:active,
852
- vaadin-email-field input:-webkit-autofill:focus {
853
- -webkit-text-fill-color: var(${EmailField.cssVarList.color});
854
- box-shadow: 0 0 0 var(${EmailField.cssVarList.height}) var(${EmailField.cssVarList.backgroundColor}) inset;
855
- }
856
- vaadin-email-field > label,
857
- vaadin-email-field::part(input-field) {
858
- cursor: pointer;
859
- color: var(${EmailField.cssVarList.color});
860
- }
861
- vaadin-email-field::part(input-field):focus {
862
- cursor: text;
863
- }
864
- vaadin-email-field[required]::part(required-indicator)::after {
865
- font-size: "12px";
866
- content: "*";
867
- color: var(${EmailField.cssVarList.color});
868
- }
869
- vaadin-email-field[readonly]::part(input-field)::after {
870
- border: 0 solid;
871
- }
872
- `;
873
-
874
- customElements.define(componentName$c, EmailField);
875
-
876
- const componentName$b = getComponentName('password-field');
877
-
878
- let overrides$3 = ``;
879
-
880
- const PasswordField = compose(
881
- createStyleMixin({
882
- mappings: {
883
- ...textFieldMappings,
884
- revealCursor: [
885
- {
886
- selector: '::part(reveal-button)::before',
887
- property: 'cursor'
888
- }
889
- ]
890
- }
891
- }),
892
- draggableMixin,
893
- inputMixin,
894
- componentNameValidationMixin
895
- )(
896
- createProxy({
897
- slots: ['suffix'],
898
- wrappedEleName: 'vaadin-password-field',
899
- style: () => overrides$3,
900
- excludeAttrsSync: ['tabindex'],
901
- componentName: componentName$b
902
- })
903
- );
904
-
905
- overrides$3 = `
906
- :host {
907
- display: inline-block;
908
- }
909
- vaadin-password-field {
910
- margin: 0;
911
- padding: 0;
912
- }
913
- vaadin-password-field::part(input-field) {
914
- overflow: hidden;
915
- }
916
- vaadin-password-field[readonly] > input:placeholder-shown {
917
- opacity: 1;
918
- }
919
- vaadin-password-field input:-webkit-autofill,
920
- vaadin-password-field input:-webkit-autofill::first-line,
921
- vaadin-password-field input:-webkit-autofill:hover,
922
- vaadin-password-field input:-webkit-autofill:active,
923
- vaadin-password-field input:-webkit-autofill:focus {
924
- -webkit-text-fill-color: var(${PasswordField.cssVarList.color});
925
- box-shadow: 0 0 0 var(${PasswordField.cssVarList.height}) var(${PasswordField.cssVarList.backgroundColor}) inset;
926
- }
927
- vaadin-password-field > label,
928
- vaadin-password-field::part(input-field) {
929
- cursor: pointer;
930
- color: var(${PasswordField.cssVarList.color});
931
- }
932
- vaadin-password-field::part(input-field):focus {
933
- cursor: text;
934
- }
935
- vaadin-password-field[required]::part(required-indicator)::after {
936
- font-size: "12px";
937
- content: "*";
938
- color: var(${PasswordField.cssVarList.color});
939
- }
940
- vaadin-password-field[readonly]::part(input-field)::after {
941
- border: 0 solid;
942
- }
943
- `;
944
-
945
- customElements.define(componentName$b, PasswordField);
946
-
947
- const componentName$a = getComponentName('text-area');
948
-
949
- const selectors$2 = {
950
- label: '::part(label)',
951
- input: '::part(input-field)',
952
- required: '::part(required-indicator)::after'
953
- };
954
-
955
- let overrides$2 = ``;
956
-
957
- const TextArea = compose(
958
- createStyleMixin({
959
- mappings: {
960
- resize: { selector: '> textarea' },
961
- color: { selector: selectors$2.label },
962
- cursor: {},
963
- width: matchHostStyle(),
964
- backgroundColor: { selector: selectors$2.input },
965
- borderWidth: { selector: selectors$2.input },
966
- borderStyle: { selector: selectors$2.input },
967
- borderColor: { selector: selectors$2.input },
968
- borderRadius: { selector: selectors$2.input },
969
- outline: { selector: selectors$2.input },
970
- outlineOffset: { selector: selectors$2.input }
971
- }
972
- }),
973
- draggableMixin,
974
- inputMixin,
975
- componentNameValidationMixin
976
- )(
977
- createProxy({
978
- slots: [],
979
- wrappedEleName: 'vaadin-text-area',
980
- style: () => overrides$2,
981
- excludeAttrsSync: ['tabindex'],
982
- componentName: componentName$a
983
- })
984
- );
985
-
986
- overrides$2 = `
987
- :host {
988
- display: inline-block;
989
- }
990
-
991
- vaadin-text-area {
992
- margin: 0;
993
- }
994
- vaadin-text-area > label,
995
- vaadin-text-area::part(input-field) {
996
- cursor: pointer;
997
- }
998
- vaadin-text-area[focused]::part(input-field) {
999
- cursor: text;
1000
- }
1001
- vaadin-text-area::part(required-indicator)::after {
1002
- font-size: "12px";
1003
- content: "*";
1004
- }
1005
- `;
1006
-
1007
- customElements.define(componentName$a, TextArea);
1008
-
1009
- const componentName$9 = getComponentName('date-picker');
1010
-
1011
- const DatePicker = compose(
1012
- draggableMixin,
1013
- componentNameValidationMixin
1014
- )(
1015
- createProxy({
1016
- componentName: componentName$9,
1017
- slots: ['prefix', 'suffix'],
1018
- wrappedEleName: 'vaadin-date-picker',
1019
- style: ``
1020
- })
1021
- );
1022
-
1023
- customElements.define(componentName$9, DatePicker);
1024
-
1025
- const componentName$8 = getComponentName('container');
1026
-
1027
- class RawContainer extends DescopeBaseClass {
1028
- static get componentName() {
1029
- return componentName$8;
1030
- }
1031
- constructor() {
1032
- super();
1033
- const template = document.createElement('template');
1034
- template.innerHTML = `
1035
- <style>
1036
- :host > slot {
1037
- box-sizing: border-box;
1038
- }
1039
- </style>
1040
- <slot></slot>
1041
- `;
1042
-
1043
- this.attachShadow({ mode: 'open' });
1044
- this.shadowRoot.appendChild(template.content.cloneNode(true));
1045
-
1046
- this.baseSelector = ':host > slot';
1047
- }
1048
- }
1049
-
1050
- const Container = compose(
1051
- createStyleMixin({
1052
- mappings: {
1053
- height: matchHostStyle(),
1054
- width: matchHostStyle(),
1055
-
1056
- verticalPadding: [
1057
- { property: 'padding-top' },
1058
- { property: 'padding-bottom' }
1059
- ],
1060
- horizontalPadding: [
1061
- { property: 'padding-left' },
1062
- { property: 'padding-right' }
1063
- ],
1064
-
1065
- display: {}, // maybe this should be hardcoded to flex
1066
- flexDirection: {},
1067
- justifyContent: {},
1068
- alignItems: {},
1069
- gap: {},
1070
-
1071
- backgroundColor: {},
1072
- borderRadius: {},
1073
-
1074
- borderColor: {},
1075
- borderStyle: {},
1076
- borderWidth: {},
1077
-
1078
- boxShadow: {}
1079
- }
1080
- }),
1081
- draggableMixin,
1082
- componentNameValidationMixin
1083
- )(RawContainer);
1084
-
1085
- customElements.define(componentName$8, Container);
1086
-
1087
- const componentName$7 = getComponentName('text');
1088
-
1089
- class RawText extends DescopeBaseClass {
1090
- static get componentName() {
1091
- return componentName$7;
1092
- }
1093
- constructor() {
1094
- super();
1095
- const template = document.createElement('template');
1096
- template.innerHTML = `<slot></slot>`;
1097
-
1098
- this.attachShadow({ mode: 'open' });
1099
- this.shadowRoot.appendChild(template.content.cloneNode(true));
1100
-
1101
- this.baseSelector = ':host > slot';
1102
- }
1103
- }
1104
-
1105
- const Text = compose(
1106
- createStyleMixin({
1107
- mappings: {
1108
- fontFamily: {},
1109
- lineHeight: {},
1110
- fontStyle: {},
1111
- fontSize: {},
1112
- fontWeight: {},
1113
- width: {},
1114
- color: {},
1115
- letterSpacing: {},
1116
- textShadow: {},
1117
- borderWidth: {},
1118
- borderStyle: {},
1119
- borderColor: {},
1120
- textTransform: {},
1121
- textAlign: matchHostStyle(),
1122
- display: matchHostStyle()
1123
- }
1124
- }),
1125
- draggableMixin,
1126
- componentNameValidationMixin
1127
- )(RawText);
1128
-
1129
- customElements.define(componentName$7, Text);
970
+ customElements.define(componentName$b, DatePicker);
1130
971
 
1131
972
  const getChildObserver = (callback) => {
1132
973
  return new MutationObserver((mutationsList) => {
@@ -1222,87 +1063,10 @@ const enforceNestingElementsStylesMixin =
1222
1063
  };
1223
1064
  };
1224
1065
 
1225
- const componentName$6 = getComponentName('link');
1226
- class RawLink extends DescopeBaseClass {
1066
+ const componentName$a = getComponentName('divider');
1067
+ class RawDivider extends DescopeBaseClass {
1227
1068
  static get componentName() {
1228
- return componentName$6;
1229
- }
1230
- constructor() {
1231
- super();
1232
- const template = document.createElement('template');
1233
-
1234
- template.innerHTML = `
1235
- <style>
1236
- :host {
1237
- display: inline-block;
1238
- }
1239
- :host a {
1240
- display: inline-block;
1241
- }
1242
- </style>
1243
- <div>
1244
- <a>
1245
- <slot name="text"></slot>
1246
- </a>
1247
- </div>
1248
- `;
1249
-
1250
- this.attachShadow({ mode: 'open' });
1251
- this.shadowRoot.appendChild(template.content.cloneNode(true));
1252
-
1253
- forwardAttrs(this.shadowRoot.host, this.shadowRoot.querySelector('a'), {
1254
- includeAttrs: ['href', 'target', 'tooltip'],
1255
- mapAttrs: {
1256
- tooltip: 'title'
1257
- }
1258
- });
1259
-
1260
- this.baseSelector = ':host > div';
1261
- }
1262
- }
1263
-
1264
- const selectors$1 = {
1265
- anchor: { selector: '> a' }
1266
- };
1267
-
1268
- const { anchor } = selectors$1;
1269
-
1270
- const Link = compose(
1271
- enforceNestingElementsStylesMixin({
1272
- nestingElementTagName: 'descope-text',
1273
- nestingElementDestSlotName: 'text',
1274
- forwardAttrOptions: {
1275
- includeAttrs: ['variant', 'italic', 'uppercase', 'lowercase']
1276
- }
1277
- }),
1278
- createStyleMixin({
1279
- mappings: {
1280
- width: matchHostStyle(),
1281
- textAlign: {},
1282
- color: anchor,
1283
- cursor: anchor,
1284
- borderBottomWidth: anchor,
1285
- borderBottomStyle: anchor,
1286
- borderBottomColor: anchor
1287
- },
1288
- nestedMappings: {
1289
- color: {
1290
- selector: ` ${Text.componentName}`,
1291
- property: Text.cssVarList.color
1292
- }
1293
- }
1294
- }),
1295
- hoverableMixin(anchor.selector),
1296
- draggableMixin,
1297
- componentNameValidationMixin
1298
- )(RawLink);
1299
-
1300
- customElements.define(componentName$6, Link);
1301
-
1302
- const componentName$5 = getComponentName('divider');
1303
- class RawDivider extends DescopeBaseClass {
1304
- static get componentName() {
1305
- return componentName$5;
1069
+ return componentName$a;
1306
1070
  }
1307
1071
  constructor() {
1308
1072
  super();
@@ -1336,14 +1100,14 @@ class RawDivider extends DescopeBaseClass {
1336
1100
  }
1337
1101
  }
1338
1102
 
1339
- const selectors = {
1103
+ const selectors$2 = {
1340
1104
  root: { selector: '' },
1341
1105
  before: { selector: '::before' },
1342
1106
  after: { selector: '::after' },
1343
1107
  slotted: { selector: () => '::slotted(*)' }
1344
1108
  };
1345
1109
 
1346
- const { root, before, after, slotted } = selectors;
1110
+ const { root, before, after, slotted } = selectors$2;
1347
1111
 
1348
1112
  const Divider = compose(
1349
1113
  enforceNestingElementsStylesMixin({
@@ -1372,16 +1136,202 @@ const Divider = compose(
1372
1136
  componentNameValidationMixin
1373
1137
  )(RawDivider);
1374
1138
 
1375
- customElements.define(componentName$5, Divider);
1139
+ const componentName$9 = getComponentName('text');
1140
+
1141
+ class RawText extends DescopeBaseClass {
1142
+ static get componentName() {
1143
+ return componentName$9;
1144
+ }
1145
+ constructor() {
1146
+ super();
1147
+ const template = document.createElement('template');
1148
+ template.innerHTML = `<slot></slot>`;
1149
+
1150
+ this.attachShadow({ mode: 'open' });
1151
+ this.shadowRoot.appendChild(template.content.cloneNode(true));
1152
+
1153
+ this.baseSelector = ':host > slot';
1154
+ }
1155
+ }
1156
+
1157
+ const Text = compose(
1158
+ createStyleMixin({
1159
+ mappings: {
1160
+ fontFamily: {},
1161
+ lineHeight: {},
1162
+ fontStyle: {},
1163
+ fontSize: {},
1164
+ fontWeight: {},
1165
+ width: {},
1166
+ color: {},
1167
+ letterSpacing: {},
1168
+ textShadow: {},
1169
+ borderWidth: {},
1170
+ borderStyle: {},
1171
+ borderColor: {},
1172
+ textTransform: {},
1173
+ textAlign: matchHostStyle(),
1174
+ display: matchHostStyle()
1175
+ }
1176
+ }),
1177
+ draggableMixin,
1178
+ componentNameValidationMixin
1179
+ )(RawText);
1180
+
1181
+ customElements.define(componentName$9, Text);
1182
+
1183
+ customElements.define(componentName$a, Divider);
1184
+
1185
+ const componentName$8 = getComponentName('email-field');
1186
+
1187
+ let overrides$5 = ``;
1188
+
1189
+ const EmailField = compose(
1190
+ createStyleMixin({
1191
+ mappings: {
1192
+ ...textFieldMappings
1193
+ }
1194
+ }),
1195
+ draggableMixin,
1196
+ inputMixin,
1197
+ componentNameValidationMixin
1198
+ )(
1199
+ createProxy({
1200
+ slots: ['suffix'],
1201
+ wrappedEleName: 'vaadin-email-field',
1202
+ style: () => overrides$5,
1203
+ excludeAttrsSync: ['tabindex'],
1204
+ componentName: componentName$8
1205
+ })
1206
+ );
1207
+
1208
+ overrides$5 = `
1209
+ :host {
1210
+ display: inline-block;
1211
+ }
1212
+ vaadin-email-field {
1213
+ margin: 0;
1214
+ padding: 0;
1215
+ }
1216
+ vaadin-email-field::part(input-field) {
1217
+ overflow: hidden;
1218
+ }
1219
+ vaadin-email-field[readonly] > input:placeholder-shown {
1220
+ opacity: 1;
1221
+ }
1222
+ vaadin-email-field input:-webkit-autofill,
1223
+ vaadin-email-field input:-webkit-autofill::first-line,
1224
+ vaadin-email-field input:-webkit-autofill:hover,
1225
+ vaadin-email-field input:-webkit-autofill:active,
1226
+ vaadin-email-field input:-webkit-autofill:focus {
1227
+ -webkit-text-fill-color: var(${EmailField.cssVarList.color});
1228
+ box-shadow: 0 0 0 var(${EmailField.cssVarList.height}) var(${EmailField.cssVarList.backgroundColor}) inset;
1229
+ }
1230
+ vaadin-email-field > label,
1231
+ vaadin-email-field::part(input-field) {
1232
+ cursor: pointer;
1233
+ color: var(${EmailField.cssVarList.color});
1234
+ }
1235
+ vaadin-email-field::part(input-field):focus {
1236
+ cursor: text;
1237
+ }
1238
+ vaadin-email-field[required]::part(required-indicator)::after {
1239
+ font-size: "12px";
1240
+ content: "*";
1241
+ color: var(${EmailField.cssVarList.color});
1242
+ }
1243
+ vaadin-email-field[readonly]::part(input-field)::after {
1244
+ border: 0 solid;
1245
+ }
1246
+ `;
1247
+
1248
+ customElements.define(componentName$8, EmailField);
1249
+
1250
+ const componentName$7 = getComponentName('link');
1251
+ class RawLink extends DescopeBaseClass {
1252
+ static get componentName() {
1253
+ return componentName$7;
1254
+ }
1255
+ constructor() {
1256
+ super();
1257
+ const template = document.createElement('template');
1258
+
1259
+ template.innerHTML = `
1260
+ <style>
1261
+ :host {
1262
+ display: inline-block;
1263
+ }
1264
+ :host a {
1265
+ display: inline-block;
1266
+ }
1267
+ </style>
1268
+ <div>
1269
+ <a>
1270
+ <slot name="text"></slot>
1271
+ </a>
1272
+ </div>
1273
+ `;
1274
+
1275
+ this.attachShadow({ mode: 'open' });
1276
+ this.shadowRoot.appendChild(template.content.cloneNode(true));
1277
+
1278
+ forwardAttrs(this.shadowRoot.host, this.shadowRoot.querySelector('a'), {
1279
+ includeAttrs: ['href', 'target', 'tooltip'],
1280
+ mapAttrs: {
1281
+ tooltip: 'title'
1282
+ }
1283
+ });
1284
+
1285
+ this.baseSelector = ':host > div';
1286
+ }
1287
+ }
1288
+
1289
+ const selectors$1 = {
1290
+ anchor: { selector: '> a' }
1291
+ };
1292
+
1293
+ const { anchor } = selectors$1;
1294
+
1295
+ const Link = compose(
1296
+ enforceNestingElementsStylesMixin({
1297
+ nestingElementTagName: 'descope-text',
1298
+ nestingElementDestSlotName: 'text',
1299
+ forwardAttrOptions: {
1300
+ includeAttrs: ['variant', 'italic', 'uppercase', 'lowercase']
1301
+ }
1302
+ }),
1303
+ createStyleMixin({
1304
+ mappings: {
1305
+ width: matchHostStyle(),
1306
+ textAlign: {},
1307
+ color: anchor,
1308
+ cursor: anchor,
1309
+ borderBottomWidth: anchor,
1310
+ borderBottomStyle: anchor,
1311
+ borderBottomColor: anchor
1312
+ },
1313
+ nestedMappings: {
1314
+ color: {
1315
+ selector: ` ${Text.componentName}`,
1316
+ property: Text.cssVarList.color
1317
+ }
1318
+ }
1319
+ }),
1320
+ hoverableMixin(anchor.selector),
1321
+ draggableMixin,
1322
+ componentNameValidationMixin
1323
+ )(RawLink);
1324
+
1325
+ customElements.define(componentName$7, Link);
1376
1326
 
1377
- const componentName$4 = getComponentName('logo');
1327
+ const componentName$6 = getComponentName('logo');
1378
1328
 
1379
1329
  let style;
1380
1330
  const getStyle = () => style;
1381
1331
 
1382
1332
  class RawLogo extends DescopeBaseClass {
1383
1333
  static get componentName() {
1384
- return componentName$4;
1334
+ return componentName$6;
1385
1335
  }
1386
1336
  constructor() {
1387
1337
  super();
@@ -1422,15 +1372,16 @@ style = `
1422
1372
  }
1423
1373
  `;
1424
1374
 
1425
- customElements.define(componentName$4, Logo);
1375
+ customElements.define(componentName$6, Logo);
1426
1376
 
1427
- const componentName$3 = getComponentName('checkbox');
1377
+ const componentName$5 = getComponentName('number-field');
1428
1378
 
1429
- const Checkbox = compose(
1379
+ let overrides$4 = ``;
1380
+
1381
+ const NumberField = compose(
1430
1382
  createStyleMixin({
1431
1383
  mappings: {
1432
- width: matchHostStyle(),
1433
- cursor: [{}, { selector: '> label' }]
1384
+ ...textFieldMappings
1434
1385
  }
1435
1386
  }),
1436
1387
  draggableMixin,
@@ -1438,19 +1389,617 @@ const Checkbox = compose(
1438
1389
  componentNameValidationMixin
1439
1390
  )(
1440
1391
  createProxy({
1441
- slots: [],
1442
- wrappedEleName: 'vaadin-checkbox',
1443
- style: `
1444
- :host {
1445
- display: inline-block;
1446
- }
1447
- `,
1392
+ slots: ['prefix', 'suffix'],
1393
+ wrappedEleName: 'vaadin-number-field',
1394
+ style: () => overrides$4,
1448
1395
  excludeAttrsSync: ['tabindex'],
1449
- componentName: componentName$3
1396
+ componentName: componentName$5
1450
1397
  })
1451
1398
  );
1452
1399
 
1453
- customElements.define(componentName$3, Checkbox);
1400
+ overrides$4 = `
1401
+ :host {
1402
+ display: inline-block;
1403
+ }
1404
+ vaadin-number-field {
1405
+ margin: 0;
1406
+ padding: 0;
1407
+ }
1408
+ vaadin-number-field::part(input-field) {
1409
+ overflow: hidden;
1410
+ }
1411
+ vaadin-number-field[readonly] > input:placeholder-shown {
1412
+ opacity: 1;
1413
+ }
1414
+ vaadin-number-field input:-webkit-autofill,
1415
+ vaadin-number-field input:-webkit-autofill::first-line,
1416
+ vaadin-number-field input:-webkit-autofill:hover,
1417
+ vaadin-number-field input:-webkit-autofill:active,
1418
+ vaadin-number-field input:-webkit-autofill:focus {
1419
+ -webkit-text-fill-color: var(${NumberField.cssVarList.color});
1420
+ box-shadow: 0 0 0 var(${NumberField.cssVarList.height}) var(${NumberField.cssVarList.backgroundColor}) inset;
1421
+ }
1422
+ vaadin-number-field > label,
1423
+ vaadin-number-field::part(input-field) {
1424
+ cursor: pointer;
1425
+ color: var(${NumberField.cssVarList.color});
1426
+ }
1427
+ vaadin-number-field::part(input-field):focus {
1428
+ cursor: text;
1429
+ }
1430
+ vaadin-number-field[required]::part(required-indicator)::after {
1431
+ font-size: "12px";
1432
+ content: "*";
1433
+ color: var(${NumberField.cssVarList.color});
1434
+ }
1435
+ vaadin-number-field[readonly]::part(input-field)::after {
1436
+ border: 0 solid;
1437
+ }
1438
+ `;
1439
+
1440
+ customElements.define(componentName$5, NumberField);
1441
+
1442
+ const focusElement = (ele) => {
1443
+ ele?.focus();
1444
+ ele?.setSelectionRange(1, 1);
1445
+ };
1446
+
1447
+ const getSanitizedCharacters = (str) => {
1448
+ const pin = str.replace(/\s/g, ''); // sanitize string
1449
+
1450
+ // accept only numbers
1451
+ if (!pin.match(/^\d+$/)) return [];
1452
+
1453
+ return [...pin]; // creating array of chars
1454
+ };
1455
+
1456
+ const componentName$4 = getComponentName('passcode-internal');
1457
+
1458
+ class PasscodeInternal extends HTMLElement {
1459
+ static get observedAttributes() {
1460
+ return [
1461
+ 'disabled',
1462
+ 'bordered',
1463
+ 'size'
1464
+ ];
1465
+ }
1466
+
1467
+ static get componentName() {
1468
+ return componentName$4;
1469
+ }
1470
+
1471
+ static get formAssociated() {
1472
+ return true;
1473
+ }
1474
+
1475
+ #internals
1476
+
1477
+ constructor() {
1478
+ super();
1479
+ const template = document.createElement('template');
1480
+
1481
+ const inputs = [...Array(this.digits).keys()].map((idx) => `
1482
+ <descope-text-field
1483
+ st-width="35px"
1484
+ data-id=${idx}
1485
+ type="tel"
1486
+ autocomplete="none"
1487
+ ></descope-text-field>
1488
+ `);
1489
+
1490
+ template.innerHTML = `
1491
+ <div>
1492
+ ${inputs.join('')}
1493
+ </div>
1494
+ `;
1495
+
1496
+ this.appendChild(template.content.cloneNode(true));
1497
+
1498
+ this.baseSelector = ':host > div';
1499
+
1500
+ this.#internals = this.attachInternals();
1501
+
1502
+ this.inputs = Array.from(this.querySelectorAll('descope-text-field'));
1503
+ }
1504
+
1505
+ checkValidity() {
1506
+ // we need to toggle the has-error-message so the text inside the digits will become red when there is an error
1507
+ if (this.#internals.validity.valid) {
1508
+ this.inputs.forEach(input => input.removeAttribute('has-error-message'));
1509
+ } else {
1510
+ this.inputs.forEach(input => input.setAttribute('has-error-message', 'true'));
1511
+ // we need to call it so the has-error-message with have the correct format (="true")
1512
+ this.oninvalid?.();
1513
+ }
1514
+ return this.#internals.validity.valid
1515
+ }
1516
+
1517
+ get digits() {
1518
+ return Number.parseInt(this.getAttribute('digits')) || 6
1519
+ }
1520
+
1521
+ get value() {
1522
+ return this.inputs.map(({ value }) => value).join('')
1523
+ }
1524
+
1525
+ set value(val) { }
1526
+
1527
+ get isRequired() {
1528
+ return this.hasAttribute('required') && this.getAttribute('required') !== 'false'
1529
+ }
1530
+
1531
+ get pattern() {
1532
+ return `^$|^\\d{${this.digits},}$`
1533
+ }
1534
+
1535
+ get valueMissingErrMsg() {
1536
+ return 'Please fill out this field.'
1537
+ }
1538
+
1539
+ get patternMismatchErrMsg() {
1540
+ return `Must be a ${this.digits} digits number.`
1541
+ }
1542
+
1543
+ get validity() {
1544
+ return this.#internals.validity;
1545
+ }
1546
+
1547
+ get validationMessage() {
1548
+ return this.#internals.validationMessage;
1549
+ }
1550
+
1551
+ reportValidity() {
1552
+ this.#internals.reportValidity();
1553
+ }
1554
+
1555
+ formAssociatedCallback() {
1556
+ this.setValidity?.();
1557
+ }
1558
+
1559
+ setValidity = () => {
1560
+ if (this.isRequired && !this.value) {
1561
+ this.#internals.setValidity({ valueMissing: true }, this.valueMissingErrMsg);
1562
+ }
1563
+ else if (this.pattern && !new RegExp(this.pattern).test(this.value)) {
1564
+ this.#internals.setValidity({ patternMismatch: true }, this.patternMismatchErrMsg);
1565
+ }
1566
+ else {
1567
+ this.#internals.setValidity({});
1568
+ }
1569
+ };
1570
+
1571
+ async connectedCallback() {
1572
+ this.setValidity();
1573
+ this.initInputs();
1574
+
1575
+ this.onfocus = () => {
1576
+ this.inputs[0].focus();
1577
+ };
1578
+ }
1579
+
1580
+ getInputIdx(inputEle) {
1581
+ return Number.parseInt(inputEle.getAttribute('data-id'), 10)
1582
+ }
1583
+
1584
+ getNextInput(currInput) {
1585
+ const currentIdx = this.getInputIdx(currInput);
1586
+ const newIdx = Math.min(currentIdx + 1, this.inputs.length - 1);
1587
+ return this.inputs[newIdx]
1588
+ }
1589
+
1590
+ getPrevInput(currInput) {
1591
+ const currentIdx = this.getInputIdx(currInput);
1592
+ const newIdx = Math.max(currentIdx - 1, 0);
1593
+ return this.inputs[newIdx]
1594
+ }
1595
+
1596
+ fillDigits(charArr, currentInput) {
1597
+ for (let i = 0; i < charArr.length; i += 1) {
1598
+ currentInput.value = charArr[i] ?? '';
1599
+
1600
+ const nextInput = this.getNextInput(currentInput);
1601
+ if (nextInput === currentInput) break;
1602
+ currentInput = nextInput;
1603
+ }
1604
+
1605
+ !currentInput.hasAttribute('focused') && focusElement(currentInput);
1606
+ };
1607
+
1608
+ initInputs() {
1609
+ this.inputs.forEach((input) => {
1610
+
1611
+ // in order to simulate blur on the input
1612
+ // we are checking if focus on one of the digits happened immediately after blur on another digit
1613
+ // if not, the component is no longer focused and we should simulate blur
1614
+ input.addEventListener('blur', () => {
1615
+ const timerId = setTimeout(() => {
1616
+ this.dispatchEvent(new Event('blur'));
1617
+ });
1618
+
1619
+ this.inputs.forEach((ele) =>
1620
+ ele.addEventListener('focus', () => clearTimeout(timerId), { once: true })
1621
+ );
1622
+ });
1623
+
1624
+ input.oninput = (e) => {
1625
+ const charArr = getSanitizedCharacters(input.value);
1626
+
1627
+ if (!charArr.length) input.value = ''; // if we got an invalid value we want to clear the input
1628
+ else this.fillDigits(charArr, input);
1629
+
1630
+ this.setValidity();
1631
+ };
1632
+
1633
+ input.onkeydown = ({ key }) => {
1634
+ if (key === 'Backspace') {
1635
+ input.value = '';
1636
+
1637
+ // if the user deleted the digit we want to focus the previous digit
1638
+ const prevInput = this.getPrevInput(input);
1639
+
1640
+ !prevInput.hasAttribute('focused') && setTimeout(() => {
1641
+ focusElement(prevInput);
1642
+ });
1643
+ } else if (key.match(/^(\d)$/g)) { // if input is a digit
1644
+ input.value = ''; // we are clearing the previous value so we can override it with the new value
1645
+ }
1646
+
1647
+ this.setValidity();
1648
+ };
1649
+ });
1650
+ }
1651
+
1652
+ attributeChangedCallback(
1653
+ attrName,
1654
+ oldValue,
1655
+ newValue
1656
+ ) {
1657
+ if (oldValue !== newValue &&
1658
+ PasscodeInternal.observedAttributes.includes(attrName)) {
1659
+ this.inputs.forEach((input) => input.setAttribute(attrName, newValue));
1660
+ }
1661
+ }
1662
+ }
1663
+
1664
+ const componentName$3 = getComponentName('passcode');
1665
+
1666
+ const customMixin = (superclass) =>
1667
+ class DraggableMixinClass extends superclass {
1668
+ constructor() {
1669
+ super();
1670
+ }
1671
+
1672
+ get digits() {
1673
+ return Number.parseInt(this.getAttribute('digits')) || 6
1674
+ }
1675
+
1676
+ connectedCallback() {
1677
+ super.connectedCallback?.();
1678
+ const template = document.createElement('template');
1679
+
1680
+ //forward required & pattern TODO use forwardAttrs
1681
+ template.innerHTML = `
1682
+ <${componentName$4}
1683
+ bordered="true"
1684
+ name="code"
1685
+ tabindex="0"
1686
+ slot="input"
1687
+ required="${this.shadowRoot.host.getAttribute('required')}"
1688
+ pattern="${this.shadowRoot.host.getAttribute('pattern')}"
1689
+ ></${componentName$4}>
1690
+ `;
1691
+
1692
+ // we are adding a slot under vaadin-text-field, it should reflect all descope-passcode children to be under vaadin-text-field, this is why it has a name & slot
1693
+ const slotEle = Object.assign(document.createElement('slot'), { name: 'input', slot: 'input', part: 'input' });
1694
+ this.proxyElement.appendChild(slotEle);
1695
+
1696
+ // we want to control when the element is out of focus
1697
+ // so the validations will be triggered blur event is dispatched from descope-passcode internal (and not every time focusing a digit)
1698
+ this.proxyElement._setFocused = () => { };
1699
+
1700
+ this.shadowRoot.host.appendChild(template.content.cloneNode(true));
1701
+ this.inputElement = this.querySelector(componentName$4);
1702
+
1703
+ // we want to trigger validation only when dispatching a blur event from the descope-passcode-internal
1704
+ this.inputElement.addEventListener('blur', () => {
1705
+ this.proxyElement.validate();
1706
+ });
1707
+ }
1708
+ };
1709
+
1710
+ const { borderStyle, borderWidth, ...restTextFieldMappings } = textFieldMappings;
1711
+
1712
+ const Passcode = compose(
1713
+ createStyleMixin({
1714
+ mappings: {
1715
+ ...restTextFieldMappings,
1716
+ },
1717
+ nestedMappings: {
1718
+ borderColor: {
1719
+ selector: ` ${TextField.componentName}`,
1720
+ property: TextField.cssVarList.borderColor
1721
+ }
1722
+ }
1723
+ }),
1724
+ draggableMixin,
1725
+ inputMixin,
1726
+ componentNameValidationMixin,
1727
+ customMixin
1728
+ )(
1729
+ createProxy({
1730
+ slots: [],
1731
+ wrappedEleName: 'vaadin-text-field',
1732
+ style: () => `
1733
+ :host {
1734
+ --vaadin-field-default-width: auto;
1735
+ }
1736
+
1737
+ ::slotted([slot='input']) {
1738
+ -webkit-mask-image: none;
1739
+ display: flex;
1740
+ gap: 2px;
1741
+ align-items: center;
1742
+ padding: 0;
1743
+ }
1744
+
1745
+ vaadin-text-field::part(input-field) {
1746
+ background-color: transparent;
1747
+ padding: 0;
1748
+ }
1749
+
1750
+ ${overrides$3}
1751
+ `,
1752
+ excludeAttrsSync: ['tabindex'],
1753
+ componentName: componentName$3
1754
+ })
1755
+ );
1756
+
1757
+ const overrides$3 = `
1758
+ :host {
1759
+ display: inline-block;
1760
+ }
1761
+
1762
+ vaadin-text-field {
1763
+ margin: 0;
1764
+ padding: 0;
1765
+ }
1766
+ vaadin-text-field::part(input-field) {
1767
+ overflow: hidden;
1768
+ }
1769
+ vaadin-text-field[readonly] > input:placeholder-shown {
1770
+ opacity: 1;
1771
+ }
1772
+
1773
+ vaadin-text-field > label,
1774
+ vaadin-text-field::part(input-field) {
1775
+ cursor: pointer;
1776
+ color: var(${Passcode.cssVarList.color});
1777
+ }
1778
+ vaadin-text-field::part(input-field):focus {
1779
+ cursor: text;
1780
+ }
1781
+ vaadin-text-field[required]::part(required-indicator)::after {
1782
+ font-size: "12px";
1783
+ content: "*";
1784
+ color: var(${Passcode.cssVarList.color});
1785
+ }
1786
+ vaadin-text-field[readonly]::part(input-field)::after {
1787
+ border: 0 solid;
1788
+ }
1789
+ `;
1790
+
1791
+ customElements.define(componentName$4, PasscodeInternal);
1792
+
1793
+ customElements.define(componentName$3, Passcode);
1794
+
1795
+ const componentName$2 = getComponentName('password-field');
1796
+
1797
+ let overrides$2 = ``;
1798
+
1799
+ const PasswordField = compose(
1800
+ createStyleMixin({
1801
+ mappings: {
1802
+ ...textFieldMappings,
1803
+ revealCursor: [
1804
+ {
1805
+ selector: '::part(reveal-button)::before',
1806
+ property: 'cursor'
1807
+ }
1808
+ ]
1809
+ }
1810
+ }),
1811
+ draggableMixin,
1812
+ inputMixin,
1813
+ componentNameValidationMixin
1814
+ )(
1815
+ createProxy({
1816
+ slots: ['suffix'],
1817
+ wrappedEleName: 'vaadin-password-field',
1818
+ style: () => overrides$2,
1819
+ excludeAttrsSync: ['tabindex'],
1820
+ componentName: componentName$2
1821
+ })
1822
+ );
1823
+
1824
+ overrides$2 = `
1825
+ :host {
1826
+ display: inline-block;
1827
+ }
1828
+ vaadin-password-field {
1829
+ margin: 0;
1830
+ padding: 0;
1831
+ }
1832
+ vaadin-password-field::part(input-field) {
1833
+ overflow: hidden;
1834
+ }
1835
+ vaadin-password-field[readonly] > input:placeholder-shown {
1836
+ opacity: 1;
1837
+ }
1838
+ vaadin-password-field input:-webkit-autofill,
1839
+ vaadin-password-field input:-webkit-autofill::first-line,
1840
+ vaadin-password-field input:-webkit-autofill:hover,
1841
+ vaadin-password-field input:-webkit-autofill:active,
1842
+ vaadin-password-field input:-webkit-autofill:focus {
1843
+ -webkit-text-fill-color: var(${PasswordField.cssVarList.color});
1844
+ box-shadow: 0 0 0 var(${PasswordField.cssVarList.height}) var(${PasswordField.cssVarList.backgroundColor}) inset;
1845
+ }
1846
+ vaadin-password-field > label,
1847
+ vaadin-password-field::part(input-field) {
1848
+ cursor: pointer;
1849
+ color: var(${PasswordField.cssVarList.color});
1850
+ }
1851
+ vaadin-password-field::part(input-field):focus {
1852
+ cursor: text;
1853
+ }
1854
+ vaadin-password-field[required]::part(required-indicator)::after {
1855
+ font-size: "12px";
1856
+ content: "*";
1857
+ color: var(${PasswordField.cssVarList.color});
1858
+ }
1859
+ vaadin-password-field[readonly]::part(input-field)::after {
1860
+ border: 0 solid;
1861
+ }
1862
+ `;
1863
+
1864
+ customElements.define(componentName$2, PasswordField);
1865
+
1866
+ const componentName$1 = getComponentName('switch-toggle');
1867
+
1868
+ let overrides$1 = ``;
1869
+
1870
+ const SwitchToggle = compose(
1871
+ createStyleMixin({
1872
+ mappings: {
1873
+ width: matchHostStyle(),
1874
+ cursor: [{}, { selector: '> label' }]
1875
+ }
1876
+ }),
1877
+ draggableMixin,
1878
+ inputMixin,
1879
+ componentNameValidationMixin
1880
+ )(
1881
+ createProxy({
1882
+ slots: [],
1883
+ wrappedEleName: 'vaadin-checkbox',
1884
+ style: () => overrides$1,
1885
+ excludeAttrsSync: ['tabindex'],
1886
+ componentName: componentName$1
1887
+ })
1888
+ );
1889
+
1890
+ overrides$1 = `
1891
+ :host {
1892
+ display: inline-block;
1893
+ }
1894
+
1895
+ :host {
1896
+ --margin: 7px;
1897
+ --width: var(${SwitchToggle.cssVarList.width});
1898
+ --height: calc(var(--width) / 2);
1899
+ --radius: var(--height);
1900
+ --knobSize: calc(var(--height) - 5px);
1901
+ --bgColor: #fff;
1902
+ --knobBgColor: #000;
1903
+ }
1904
+ vaadin-checkbox>label {
1905
+ cursor: pointer;
1906
+ border: 1px solid;
1907
+ text-indent: -99999px;
1908
+ display: block;
1909
+ position: relative;
1910
+ width: var(--width);
1911
+ height: var(--height);
1912
+ background: var(--bgColor);
1913
+ border-radius: var(--radius);
1914
+ }
1915
+ vaadin-checkbox>label::after {
1916
+ content: '';
1917
+ position: absolute;
1918
+ transition: 0.3s;
1919
+ top: var(--margin);
1920
+ left: var(--margin);
1921
+ width: var(--knobSize);
1922
+ height: var(--knobSize);
1923
+ background: var(--knobBgColor);
1924
+ border-radius: var(--knobSize);
1925
+ }
1926
+ vaadin-checkbox::part(checkbox) {
1927
+ height: 0;
1928
+ width: 0;
1929
+ visibility: hidden;
1930
+ }
1931
+ vaadin-checkbox[checked]>label::after {
1932
+ transform: translateX(-100%);
1933
+ left: calc(100% - var(--margin));
1934
+ }
1935
+ vaadin-checkbox[active]>label::after {
1936
+ width: calc(var(--knobSize) + 15px);
1937
+ }
1938
+ `;
1939
+
1940
+ customElements.define(componentName$1, SwitchToggle);
1941
+
1942
+ const componentName = getComponentName('text-area');
1943
+
1944
+ const selectors = {
1945
+ label: '::part(label)',
1946
+ input: '::part(input-field)',
1947
+ required: '::part(required-indicator)::after'
1948
+ };
1949
+
1950
+ let overrides = ``;
1951
+
1952
+ const TextArea = compose(
1953
+ createStyleMixin({
1954
+ mappings: {
1955
+ resize: { selector: '> textarea' },
1956
+ color: { selector: selectors.label },
1957
+ cursor: {},
1958
+ width: matchHostStyle(),
1959
+ backgroundColor: { selector: selectors.input },
1960
+ borderWidth: { selector: selectors.input },
1961
+ borderStyle: { selector: selectors.input },
1962
+ borderColor: { selector: selectors.input },
1963
+ borderRadius: { selector: selectors.input },
1964
+ outline: { selector: selectors.input },
1965
+ outlineOffset: { selector: selectors.input }
1966
+ }
1967
+ }),
1968
+ draggableMixin,
1969
+ inputMixin,
1970
+ componentNameValidationMixin
1971
+ )(
1972
+ createProxy({
1973
+ slots: [],
1974
+ wrappedEleName: 'vaadin-text-area',
1975
+ style: () => overrides,
1976
+ excludeAttrsSync: ['tabindex'],
1977
+ componentName
1978
+ })
1979
+ );
1980
+
1981
+ overrides = `
1982
+ :host {
1983
+ display: inline-block;
1984
+ }
1985
+
1986
+ vaadin-text-area {
1987
+ margin: 0;
1988
+ }
1989
+ vaadin-text-area > label,
1990
+ vaadin-text-area::part(input-field) {
1991
+ cursor: pointer;
1992
+ }
1993
+ vaadin-text-area[focused]::part(input-field) {
1994
+ cursor: text;
1995
+ }
1996
+ vaadin-text-area::part(required-indicator)::after {
1997
+ font-size: "12px";
1998
+ content: "*";
1999
+ }
2000
+ `;
2001
+
2002
+ customElements.define(componentName, TextArea);
1454
2003
 
1455
2004
  const getVarName = (path) => getCssVarName(DESCOPE_PREFIX, ...path);
1456
2005
 
@@ -1690,150 +2239,146 @@ var globals = {
1690
2239
  fonts
1691
2240
  };
1692
2241
 
1693
- const globalRefs$5 = getThemeRefs(globals);
1694
- const vars$a = Button.cssVarList;
2242
+ const globalRefs$7 = getThemeRefs(globals);
2243
+ const vars$c = Button.cssVarList;
1695
2244
 
1696
2245
  const mode = {
1697
- primary: globalRefs$5.colors.primary,
1698
- secondary: globalRefs$5.colors.secondary,
1699
- success: globalRefs$5.colors.success,
1700
- error: globalRefs$5.colors.error,
1701
- surface: globalRefs$5.colors.surface
2246
+ primary: globalRefs$7.colors.primary,
2247
+ secondary: globalRefs$7.colors.secondary,
2248
+ success: globalRefs$7.colors.success,
2249
+ error: globalRefs$7.colors.error,
2250
+ surface: globalRefs$7.colors.surface
1702
2251
  };
1703
2252
 
1704
- const [helperTheme$1, helperRefs$1] = createHelperVars({ mode }, componentName$g);
2253
+ const [helperTheme$1, helperRefs$1] = createHelperVars({ mode }, componentName$i);
1705
2254
 
1706
2255
  const button = {
1707
2256
  ...helperTheme$1,
1708
2257
 
1709
2258
  size: {
1710
2259
  xs: {
1711
- [vars$a.height]: '10px',
1712
- [vars$a.fontSize]: '10px',
1713
- [vars$a.padding]: `0 ${globalRefs$5.spacing.xs}`
2260
+ [vars$c.height]: '10px',
2261
+ [vars$c.fontSize]: '10px',
2262
+ [vars$c.padding]: `0 ${globalRefs$7.spacing.xs}`
1714
2263
  },
1715
2264
  sm: {
1716
- [vars$a.height]: '20px',
1717
- [vars$a.fontSize]: '10px',
1718
- [vars$a.padding]: `0 ${globalRefs$5.spacing.sm}`
2265
+ [vars$c.height]: '20px',
2266
+ [vars$c.fontSize]: '10px',
2267
+ [vars$c.padding]: `0 ${globalRefs$7.spacing.sm}`
1719
2268
  },
1720
2269
  md: {
1721
- [vars$a.height]: '30px',
1722
- [vars$a.fontSize]: '14px',
1723
- [vars$a.padding]: `0 ${globalRefs$5.spacing.md}`
2270
+ [vars$c.height]: '30px',
2271
+ [vars$c.fontSize]: '14px',
2272
+ [vars$c.padding]: `0 ${globalRefs$7.spacing.md}`
1724
2273
  },
1725
2274
  lg: {
1726
- [vars$a.height]: '40px',
1727
- [vars$a.fontSize]: '20px',
1728
- [vars$a.padding]: `0 ${globalRefs$5.spacing.lg}`
2275
+ [vars$c.height]: '40px',
2276
+ [vars$c.fontSize]: '20px',
2277
+ [vars$c.padding]: `0 ${globalRefs$7.spacing.lg}`
1729
2278
  },
1730
2279
  xl: {
1731
- [vars$a.height]: '50px',
1732
- [vars$a.fontSize]: '25px',
1733
- [vars$a.padding]: `0 ${globalRefs$5.spacing.xl}`
2280
+ [vars$c.height]: '50px',
2281
+ [vars$c.fontSize]: '25px',
2282
+ [vars$c.padding]: `0 ${globalRefs$7.spacing.xl}`
1734
2283
  }
1735
2284
  },
1736
2285
 
1737
- [vars$a.borderRadius]: globalRefs$5.radius.lg,
1738
- [vars$a.cursor]: 'pointer',
1739
- [vars$a.borderWidth]: '2px',
1740
- [vars$a.borderStyle]: 'solid',
1741
- [vars$a.borderColor]: 'transparent',
2286
+ [vars$c.borderRadius]: globalRefs$7.radius.lg,
2287
+ [vars$c.cursor]: 'pointer',
2288
+ [vars$c.borderWidth]: '2px',
2289
+ [vars$c.borderStyle]: 'solid',
2290
+ [vars$c.borderColor]: 'transparent',
1742
2291
 
1743
2292
  _fullWidth: {
1744
- [vars$a.width]: '100%'
2293
+ [vars$c.width]: '100%'
1745
2294
  },
1746
2295
  _loading: {
1747
- [vars$a.cursor]: 'wait'
2296
+ [vars$c.cursor]: 'wait'
1748
2297
  },
1749
2298
 
1750
2299
  variant: {
1751
2300
  contained: {
1752
- [vars$a.color]: helperRefs$1.contrast,
1753
- [vars$a.backgroundColor]: helperRefs$1.main,
2301
+ [vars$c.color]: helperRefs$1.contrast,
2302
+ [vars$c.backgroundColor]: helperRefs$1.main,
1754
2303
  _hover: {
1755
- [vars$a.backgroundColor]: helperRefs$1.dark
2304
+ [vars$c.backgroundColor]: helperRefs$1.dark
1756
2305
  },
1757
2306
  _loading: {
1758
- [vars$a.backgroundColor]: helperRefs$1.main
2307
+ [vars$c.backgroundColor]: helperRefs$1.main
1759
2308
  }
1760
2309
  },
1761
2310
  outline: {
1762
- [vars$a.color]: helperRefs$1.main,
1763
- [vars$a.borderColor]: helperRefs$1.main,
2311
+ [vars$c.color]: helperRefs$1.main,
2312
+ [vars$c.borderColor]: helperRefs$1.main,
1764
2313
  _hover: {
1765
- [vars$a.color]: helperRefs$1.dark,
1766
- [vars$a.borderColor]: helperRefs$1.dark,
2314
+ [vars$c.color]: helperRefs$1.dark,
2315
+ [vars$c.borderColor]: helperRefs$1.dark,
1767
2316
  _error: {
1768
- [vars$a.color]: helperRefs$1.error
2317
+ [vars$c.color]: helperRefs$1.error
1769
2318
  }
1770
2319
  }
1771
2320
  },
1772
2321
  link: {
1773
- [vars$a.color]: helperRefs$1.main,
1774
- [vars$a.padding]: 0,
1775
- [vars$a.margin]: 0,
1776
- [vars$a.lineHeight]: helperRefs$1.height,
1777
- [vars$a.borderRadius]: 0,
2322
+ [vars$c.color]: helperRefs$1.main,
2323
+ [vars$c.padding]: 0,
2324
+ [vars$c.margin]: 0,
2325
+ [vars$c.lineHeight]: helperRefs$1.height,
2326
+ [vars$c.borderRadius]: 0,
1778
2327
  _hover: {
1779
- [vars$a.color]: helperRefs$1.main,
1780
- [vars$a.textDecoration]: 'underline'
2328
+ [vars$c.color]: helperRefs$1.main,
2329
+ [vars$c.textDecoration]: 'underline'
1781
2330
  }
1782
2331
  }
1783
2332
  }
1784
2333
  };
1785
2334
 
1786
- const globalRefs$4 = getThemeRefs(globals);
2335
+ const globalRefs$6 = getThemeRefs(globals);
1787
2336
 
1788
- const vars$9 = TextField.cssVarList;
2337
+ const vars$b = TextField.cssVarList;
1789
2338
 
1790
2339
  const textField = (vars) => ({
1791
2340
  size: {
1792
2341
  xs: {
1793
2342
  [vars.height]: '14px',
1794
2343
  [vars.fontSize]: '8px',
1795
- [vars.padding]: `0 ${globalRefs$4.spacing.xs}`
2344
+ [vars.padding]: `0 ${globalRefs$6.spacing.xs}`
1796
2345
  },
1797
2346
  sm: {
1798
2347
  [vars.height]: '20px',
1799
2348
  [vars.fontSize]: '10px',
1800
- [vars.padding]: `0 ${globalRefs$4.spacing.sm}`
2349
+ [vars.padding]: `0 ${globalRefs$6.spacing.sm}`
1801
2350
  },
1802
2351
  md: {
1803
2352
  [vars.height]: '30px',
1804
2353
  [vars.fontSize]: '14px',
1805
- [vars.padding]: `0 ${globalRefs$4.spacing.md}`
2354
+ [vars.padding]: `0 ${globalRefs$6.spacing.md}`
1806
2355
  },
1807
2356
  lg: {
1808
2357
  [vars.height]: '40px',
1809
2358
  [vars.fontSize]: '16px',
1810
- [vars.padding]: `0 ${globalRefs$4.spacing.lg}`
2359
+ [vars.padding]: `0 ${globalRefs$6.spacing.lg}`
1811
2360
  },
1812
2361
  xl: {
1813
2362
  [vars.height]: '50px',
1814
2363
  [vars.fontSize]: '25px',
1815
- [vars.padding]: `0 ${globalRefs$4.spacing.xl}`
2364
+ [vars.padding]: `0 ${globalRefs$6.spacing.xl}`
1816
2365
  }
1817
2366
  },
1818
2367
 
1819
- [vars.color]: globalRefs$4.colors.surface.contrast,
1820
- [vars.placeholderColor]: globalRefs$4.colors.surface.contrast,
2368
+ [vars.color]: globalRefs$6.colors.surface.contrast,
2369
+ [vars.placeholderColor]: globalRefs$6.colors.surface.contrast,
1821
2370
 
1822
- [vars.backgroundColor]: globalRefs$4.colors.surface.light,
2371
+ [vars.backgroundColor]: globalRefs$6.colors.surface.light,
1823
2372
 
1824
2373
  [vars.borderWidth]: '1px',
1825
2374
  [vars.borderStyle]: 'solid',
1826
2375
  [vars.borderColor]: 'transparent',
1827
- [vars.borderRadius]: globalRefs$4.radius.sm,
1828
-
1829
- _borderOffset: {
1830
- [vars.outlineOffset]: '2px'
1831
- },
2376
+ [vars.borderRadius]: globalRefs$6.radius.sm,
1832
2377
 
1833
2378
  _disabled: {
1834
- [vars.color]: globalRefs$4.colors.surface.dark,
1835
- [vars.placeholderColor]: globalRefs$4.colors.surface.light,
1836
- [vars.backgroundColor]: globalRefs$4.colors.surface.main
2379
+ [vars.color]: globalRefs$6.colors.surface.dark,
2380
+ [vars.placeholderColor]: globalRefs$6.colors.surface.light,
2381
+ [vars.backgroundColor]: globalRefs$6.colors.surface.main
1837
2382
  },
1838
2383
 
1839
2384
  _fullWidth: {
@@ -1841,27 +2386,27 @@ const textField = (vars) => ({
1841
2386
  },
1842
2387
 
1843
2388
  _focused: {
1844
- [vars.outline]: `2px solid ${globalRefs$4.colors.surface.main}`
2389
+ [vars.outline]: `2px solid ${globalRefs$6.colors.surface.main}`
1845
2390
  },
1846
2391
 
1847
2392
  _bordered: {
1848
- [vars.borderColor]: globalRefs$4.colors.surface.main
2393
+ [vars.borderColor]: globalRefs$6.colors.surface.main
1849
2394
  },
1850
2395
 
1851
2396
  _hasErrorMessage: {
1852
- [vars.borderColor]: globalRefs$4.colors.error.main,
1853
- [vars.color]: globalRefs$4.colors.error.main,
1854
- [vars.placeholderColor]: globalRefs$4.colors.error.light
2397
+ [vars.borderColor]: globalRefs$6.colors.error.main,
2398
+ [vars.color]: globalRefs$6.colors.error.main,
2399
+ [vars.placeholderColor]: globalRefs$6.colors.error.light
1855
2400
  }
1856
2401
  });
1857
2402
 
1858
- var textField$1 = textField(vars$9);
2403
+ var textField$1 = textField(vars$b);
1859
2404
 
1860
- const vars$8 = PasswordField.cssVarList;
2405
+ const vars$a = PasswordField.cssVarList;
1861
2406
 
1862
2407
  const passwordField = {
1863
- ...textField(vars$8),
1864
- [vars$8.revealCursor]: 'pointer'
2408
+ ...textField(vars$a),
2409
+ [vars$a.revealCursor]: 'pointer'
1865
2410
  };
1866
2411
 
1867
2412
  const numberField = {
@@ -1872,134 +2417,56 @@ const emailField = {
1872
2417
  ...textField(EmailField.cssVarList)
1873
2418
  };
1874
2419
 
1875
- const globalRefs$3 = getThemeRefs(globals);
1876
- const vars$7 = TextArea.cssVarList;
2420
+ const globalRefs$5 = getThemeRefs(globals);
2421
+ const vars$9 = TextArea.cssVarList;
1877
2422
 
1878
2423
  const textArea = {
1879
- [vars$7.color]: globalRefs$3.colors.primary.main,
1880
- [vars$7.backgroundColor]: globalRefs$3.colors.surface.light,
1881
- [vars$7.resize]: 'vertical',
1882
-
1883
- [vars$7.borderRadius]: globalRefs$3.radius.sm,
1884
- [vars$7.borderWidth]: '1px',
1885
- [vars$7.borderStyle]: 'solid',
1886
- [vars$7.borderColor]: 'transparent',
2424
+ [vars$9.color]: globalRefs$5.colors.primary.main,
2425
+ [vars$9.backgroundColor]: globalRefs$5.colors.surface.light,
2426
+ [vars$9.resize]: 'vertical',
1887
2427
 
1888
- _borderOffset: {
1889
- [vars$7.outlineOffset]: '2px'
1890
- },
2428
+ [vars$9.borderRadius]: globalRefs$5.radius.sm,
2429
+ [vars$9.borderWidth]: '1px',
2430
+ [vars$9.borderStyle]: 'solid',
2431
+ [vars$9.borderColor]: 'transparent',
1891
2432
 
1892
2433
  _bordered: {
1893
- [vars$7.borderColor]: globalRefs$3.colors.surface.main
2434
+ [vars$9.borderColor]: globalRefs$5.colors.surface.main
1894
2435
  },
1895
2436
 
1896
2437
  _focused: {
1897
- [vars$7.outline]: `2px solid ${globalRefs$3.colors.surface.main}`
2438
+ [vars$9.outline]: `2px solid ${globalRefs$5.colors.surface.main}`
1898
2439
  },
1899
2440
 
1900
2441
  _fullWidth: {
1901
- [vars$7.width]: '100%'
2442
+ [vars$9.width]: '100%'
1902
2443
  },
1903
2444
 
1904
2445
  _disabled: {
1905
- [vars$7.cursor]: 'not-allowed'
2446
+ [vars$9.cursor]: 'not-allowed'
1906
2447
  },
1907
2448
 
1908
2449
  _invalid: {
1909
- [vars$7.outline]: `2px solid ${globalRefs$3.colors.error.main}`
2450
+ [vars$9.outline]: `2px solid ${globalRefs$5.colors.error.main}`
1910
2451
  }
1911
2452
  };
1912
2453
 
1913
- const vars$6 = Checkbox.cssVarList;
2454
+ const vars$8 = Checkbox.cssVarList;
1914
2455
 
1915
2456
  const checkbox = {
1916
- [vars$6.cursor]: 'pointer'
2457
+ [vars$8.cursor]: 'pointer'
1917
2458
  };
1918
2459
 
1919
- const componentName$2 = getComponentName('switch-toggle');
1920
-
1921
- let overrides$1 = ``;
1922
-
1923
- const SwitchToggle = compose(
1924
- createStyleMixin({
1925
- mappings: {
1926
- width: matchHostStyle(),
1927
- cursor: [{}, { selector: '> label' }]
1928
- }
1929
- }),
1930
- draggableMixin,
1931
- inputMixin,
1932
- componentNameValidationMixin
1933
- )(
1934
- createProxy({
1935
- slots: [],
1936
- wrappedEleName: 'vaadin-checkbox',
1937
- style: () => overrides$1,
1938
- excludeAttrsSync: ['tabindex'],
1939
- componentName: componentName$2
1940
- })
1941
- );
1942
-
1943
- overrides$1 = `
1944
- :host {
1945
- display: inline-block;
1946
- }
1947
-
1948
- :host {
1949
- --margin: 7px;
1950
- --width: var(${SwitchToggle.cssVarList.width});
1951
- --height: calc(var(--width) / 2);
1952
- --radius: var(--height);
1953
- --knobSize: calc(var(--height) - 5px);
1954
- --bgColor: #fff;
1955
- --knobBgColor: #000;
1956
- }
1957
- vaadin-checkbox>label {
1958
- cursor: pointer;
1959
- border: 1px solid;
1960
- text-indent: -99999px;
1961
- display: block;
1962
- position: relative;
1963
- width: var(--width);
1964
- height: var(--height);
1965
- background: var(--bgColor);
1966
- border-radius: var(--radius);
1967
- }
1968
- vaadin-checkbox>label::after {
1969
- content: '';
1970
- position: absolute;
1971
- transition: 0.3s;
1972
- top: var(--margin);
1973
- left: var(--margin);
1974
- width: var(--knobSize);
1975
- height: var(--knobSize);
1976
- background: var(--knobBgColor);
1977
- border-radius: var(--knobSize);
1978
- }
1979
- vaadin-checkbox::part(checkbox) {
1980
- height: 0;
1981
- width: 0;
1982
- visibility: hidden;
1983
- }
1984
- vaadin-checkbox[checked]>label::after {
1985
- transform: translateX(-100%);
1986
- left: calc(100% - var(--margin));
1987
- }
1988
- vaadin-checkbox[active]>label::after {
1989
- width: calc(var(--knobSize) + 15px);
1990
- }
1991
- `;
1992
-
1993
- const vars$5 = SwitchToggle.cssVarList;
2460
+ const vars$7 = SwitchToggle.cssVarList;
1994
2461
 
1995
2462
  const swtichToggle = {
1996
- [vars$5.width]: '70px',
1997
- [vars$5.cursor]: [{}, { selector: '> label' }]
2463
+ [vars$7.width]: '70px',
2464
+ [vars$7.cursor]: [{}, { selector: '> label' }]
1998
2465
  };
1999
2466
 
2000
- const globalRefs$2 = getThemeRefs(globals);
2467
+ const globalRefs$4 = getThemeRefs(globals);
2001
2468
 
2002
- const vars$4 = Container.cssVarList;
2469
+ const vars$6 = Container.cssVarList;
2003
2470
 
2004
2471
  const verticalAlignment = {
2005
2472
  start: { verticalAlignment: 'start' },
@@ -2022,31 +2489,31 @@ const [helperTheme, helperRefs, helperVars] =
2022
2489
 
2023
2490
  const container = {
2024
2491
  ...helperTheme,
2025
- [vars$4.display]: 'flex',
2492
+ [vars$6.display]: 'flex',
2026
2493
  verticalPadding: {
2027
- sm: { [vars$4.verticalPadding]: '5px' },
2028
- md: { [vars$4.verticalPadding]: '10px' },
2029
- lg: { [vars$4.verticalPadding]: '20px' },
2494
+ sm: { [vars$6.verticalPadding]: '5px' },
2495
+ md: { [vars$6.verticalPadding]: '10px' },
2496
+ lg: { [vars$6.verticalPadding]: '20px' },
2030
2497
  },
2031
2498
  horizontalPadding: {
2032
- sm: { [vars$4.horizontalPadding]: '5px' },
2033
- md: { [vars$4.horizontalPadding]: '10px' },
2034
- lg: { [vars$4.horizontalPadding]: '20px' },
2499
+ sm: { [vars$6.horizontalPadding]: '5px' },
2500
+ md: { [vars$6.horizontalPadding]: '10px' },
2501
+ lg: { [vars$6.horizontalPadding]: '20px' },
2035
2502
  },
2036
2503
  direction: {
2037
2504
  row: {
2038
- [vars$4.flexDirection]: 'row',
2039
- [vars$4.alignItems]: helperRefs.verticalAlignment,
2040
- [vars$4.justifyContent]: helperRefs.horizontalAlignment,
2505
+ [vars$6.flexDirection]: 'row',
2506
+ [vars$6.alignItems]: helperRefs.verticalAlignment,
2507
+ [vars$6.justifyContent]: helperRefs.horizontalAlignment,
2041
2508
  horizontalAlignment: {
2042
2509
  spaceBetween: { [helperVars.horizontalAlignment]: 'space-between' },
2043
2510
  }
2044
2511
  },
2045
2512
 
2046
2513
  column: {
2047
- [vars$4.flexDirection]: 'column',
2048
- [vars$4.alignItems]: helperRefs.horizontalAlignment,
2049
- [vars$4.justifyContent]: helperRefs.verticalAlignment,
2514
+ [vars$6.flexDirection]: 'column',
2515
+ [vars$6.alignItems]: helperRefs.horizontalAlignment,
2516
+ [vars$6.justifyContent]: helperRefs.verticalAlignment,
2050
2517
  verticalAlignment: {
2051
2518
  spaceBetween: { [helperVars.verticalAlignment]: 'space-between' }
2052
2519
  }
@@ -2055,338 +2522,310 @@ const container = {
2055
2522
 
2056
2523
  spaceBetween: {
2057
2524
  sm: {
2058
- [vars$4.gap]: '10px'
2525
+ [vars$6.gap]: '10px'
2059
2526
  },
2060
2527
  md: {
2061
- [vars$4.gap]: '20px'
2528
+ [vars$6.gap]: '20px'
2062
2529
  },
2063
2530
  lg: {
2064
- [vars$4.gap]: '30px'
2531
+ [vars$6.gap]: '30px'
2065
2532
  }
2066
2533
  },
2067
2534
 
2068
2535
  shadow: {
2069
2536
  sm: {
2070
- [vars$4.boxShadow]: `${globalRefs$2.shadow.wide.sm} ${helperRefs.shadowColor}, ${globalRefs$2.shadow.narrow.sm} ${helperRefs.shadowColor}`
2537
+ [vars$6.boxShadow]: `${globalRefs$4.shadow.wide.sm} ${helperRefs.shadowColor}, ${globalRefs$4.shadow.narrow.sm} ${helperRefs.shadowColor}`
2071
2538
  },
2072
2539
  md: {
2073
- [vars$4.boxShadow]: `${globalRefs$2.shadow.wide.md} ${helperRefs.shadowColor}, ${globalRefs$2.shadow.narrow.md} ${helperRefs.shadowColor}`
2540
+ [vars$6.boxShadow]: `${globalRefs$4.shadow.wide.md} ${helperRefs.shadowColor}, ${globalRefs$4.shadow.narrow.md} ${helperRefs.shadowColor}`
2074
2541
  },
2075
2542
  lg: {
2076
- [vars$4.boxShadow]: `${globalRefs$2.shadow.wide.lg} ${helperRefs.shadowColor}, ${globalRefs$2.shadow.narrow.lg} ${helperRefs.shadowColor}`
2543
+ [vars$6.boxShadow]: `${globalRefs$4.shadow.wide.lg} ${helperRefs.shadowColor}, ${globalRefs$4.shadow.narrow.lg} ${helperRefs.shadowColor}`
2077
2544
  },
2078
2545
  xl: {
2079
- [vars$4.boxShadow]: `${globalRefs$2.shadow.wide.xl} ${helperRefs.shadowColor}, ${globalRefs$2.shadow.narrow.xl} ${helperRefs.shadowColor}`
2546
+ [vars$6.boxShadow]: `${globalRefs$4.shadow.wide.xl} ${helperRefs.shadowColor}, ${globalRefs$4.shadow.narrow.xl} ${helperRefs.shadowColor}`
2080
2547
  },
2081
2548
  '2xl': {
2082
2549
  [helperVars.shadowColor]: '#00000050',
2083
- [vars$4.boxShadow]: `${globalRefs$2.shadow.wide['2xl']} ${helperRefs.shadowColor}`
2550
+ [vars$6.boxShadow]: `${globalRefs$4.shadow.wide['2xl']} ${helperRefs.shadowColor}`
2084
2551
  },
2085
2552
  },
2086
2553
 
2087
2554
  borderRadius: {
2088
2555
  sm: {
2089
- [vars$4.borderRadius]: globalRefs$2.radius.sm
2556
+ [vars$6.borderRadius]: globalRefs$4.radius.sm
2090
2557
  },
2091
2558
  md: {
2092
- [vars$4.borderRadius]: globalRefs$2.radius.md
2559
+ [vars$6.borderRadius]: globalRefs$4.radius.md
2093
2560
  },
2094
2561
  lg: {
2095
- [vars$4.borderRadius]: globalRefs$2.radius.lg
2562
+ [vars$6.borderRadius]: globalRefs$4.radius.lg
2096
2563
  },
2097
2564
  }
2098
2565
  };
2099
2566
 
2100
- const vars$3 = Logo.cssVarList;
2567
+ const vars$5 = Logo.cssVarList;
2101
2568
 
2102
2569
  const logo = {
2103
- [vars$3.fallbackUrl]: 'url(https://content.app.descope.com/assets/flows/noLogoPlaceholder.svg)'
2570
+ [vars$5.fallbackUrl]: 'url(https://content.app.descope.com/assets/flows/noLogoPlaceholder.svg)'
2104
2571
  };
2105
2572
 
2106
- const globalRefs$1 = getThemeRefs(globals);
2573
+ const globalRefs$3 = getThemeRefs(globals);
2107
2574
 
2108
- const vars$2 = Text.cssVarList;
2575
+ const vars$4 = Text.cssVarList;
2109
2576
 
2110
2577
  const text = {
2111
- [vars$2.lineHeight]: '1em',
2112
- [vars$2.display]: 'inline-block',
2113
- [vars$2.textAlign]: 'left',
2114
- [vars$2.color]: globalRefs$1.colors.surface.dark,
2578
+ [vars$4.lineHeight]: '1em',
2579
+ [vars$4.display]: 'inline-block',
2580
+ [vars$4.textAlign]: 'left',
2581
+ [vars$4.color]: globalRefs$3.colors.surface.dark,
2115
2582
  variant: {
2116
2583
  h1: {
2117
- [vars$2.fontSize]: globalRefs$1.typography.h1.size,
2118
- [vars$2.fontWeight]: globalRefs$1.typography.h1.weight,
2119
- [vars$2.fontFamily]: globalRefs$1.typography.h1.font
2584
+ [vars$4.fontSize]: globalRefs$3.typography.h1.size,
2585
+ [vars$4.fontWeight]: globalRefs$3.typography.h1.weight,
2586
+ [vars$4.fontFamily]: globalRefs$3.typography.h1.font
2120
2587
  },
2121
2588
  h2: {
2122
- [vars$2.fontSize]: globalRefs$1.typography.h2.size,
2123
- [vars$2.fontWeight]: globalRefs$1.typography.h2.weight,
2124
- [vars$2.fontFamily]: globalRefs$1.typography.h2.font
2589
+ [vars$4.fontSize]: globalRefs$3.typography.h2.size,
2590
+ [vars$4.fontWeight]: globalRefs$3.typography.h2.weight,
2591
+ [vars$4.fontFamily]: globalRefs$3.typography.h2.font
2125
2592
  },
2126
2593
  h3: {
2127
- [vars$2.fontSize]: globalRefs$1.typography.h3.size,
2128
- [vars$2.fontWeight]: globalRefs$1.typography.h3.weight,
2129
- [vars$2.fontFamily]: globalRefs$1.typography.h3.font
2594
+ [vars$4.fontSize]: globalRefs$3.typography.h3.size,
2595
+ [vars$4.fontWeight]: globalRefs$3.typography.h3.weight,
2596
+ [vars$4.fontFamily]: globalRefs$3.typography.h3.font
2130
2597
  },
2131
2598
  subtitle1: {
2132
- [vars$2.fontSize]: globalRefs$1.typography.subtitle1.size,
2133
- [vars$2.fontWeight]: globalRefs$1.typography.subtitle1.weight,
2134
- [vars$2.fontFamily]: globalRefs$1.typography.subtitle1.font
2599
+ [vars$4.fontSize]: globalRefs$3.typography.subtitle1.size,
2600
+ [vars$4.fontWeight]: globalRefs$3.typography.subtitle1.weight,
2601
+ [vars$4.fontFamily]: globalRefs$3.typography.subtitle1.font
2135
2602
  },
2136
2603
  subtitle2: {
2137
- [vars$2.fontSize]: globalRefs$1.typography.subtitle2.size,
2138
- [vars$2.fontWeight]: globalRefs$1.typography.subtitle2.weight,
2139
- [vars$2.fontFamily]: globalRefs$1.typography.subtitle2.font
2604
+ [vars$4.fontSize]: globalRefs$3.typography.subtitle2.size,
2605
+ [vars$4.fontWeight]: globalRefs$3.typography.subtitle2.weight,
2606
+ [vars$4.fontFamily]: globalRefs$3.typography.subtitle2.font
2140
2607
  },
2141
2608
  body1: {
2142
- [vars$2.fontSize]: globalRefs$1.typography.body1.size,
2143
- [vars$2.fontWeight]: globalRefs$1.typography.body1.weight,
2144
- [vars$2.fontFamily]: globalRefs$1.typography.body1.font
2609
+ [vars$4.fontSize]: globalRefs$3.typography.body1.size,
2610
+ [vars$4.fontWeight]: globalRefs$3.typography.body1.weight,
2611
+ [vars$4.fontFamily]: globalRefs$3.typography.body1.font
2145
2612
  },
2146
2613
  body2: {
2147
- [vars$2.fontSize]: globalRefs$1.typography.body2.size,
2148
- [vars$2.fontWeight]: globalRefs$1.typography.body2.weight,
2149
- [vars$2.fontFamily]: globalRefs$1.typography.body2.font
2614
+ [vars$4.fontSize]: globalRefs$3.typography.body2.size,
2615
+ [vars$4.fontWeight]: globalRefs$3.typography.body2.weight,
2616
+ [vars$4.fontFamily]: globalRefs$3.typography.body2.font
2150
2617
  }
2151
2618
  },
2152
2619
  mode: {
2153
2620
  primary: {
2154
- [vars$2.color]: globalRefs$1.colors.primary.main
2621
+ [vars$4.color]: globalRefs$3.colors.primary.main
2155
2622
  },
2156
2623
  secondary: {
2157
- [vars$2.color]: globalRefs$1.colors.secondary.main
2624
+ [vars$4.color]: globalRefs$3.colors.secondary.main
2158
2625
  },
2159
2626
  error: {
2160
- [vars$2.color]: globalRefs$1.colors.error.main
2627
+ [vars$4.color]: globalRefs$3.colors.error.main
2161
2628
  },
2162
2629
  success: {
2163
- [vars$2.color]: globalRefs$1.colors.success.main
2630
+ [vars$4.color]: globalRefs$3.colors.success.main
2164
2631
  }
2165
2632
  },
2166
2633
  textAlign: {
2167
- right: { [vars$2.textAlign]: 'right' },
2168
- left: { [vars$2.textAlign]: 'left' },
2169
- center: { [vars$2.textAlign]: 'center' }
2634
+ right: { [vars$4.textAlign]: 'right' },
2635
+ left: { [vars$4.textAlign]: 'left' },
2636
+ center: { [vars$4.textAlign]: 'center' }
2170
2637
  },
2171
2638
  _fullWidth: {
2172
- [vars$2.width]: '100%',
2173
- [vars$2.display]: 'block'
2639
+ [vars$4.width]: '100%',
2640
+ [vars$4.display]: 'block'
2174
2641
  },
2175
2642
  _italic: {
2176
- [vars$2.fontStyle]: 'italic'
2643
+ [vars$4.fontStyle]: 'italic'
2177
2644
  },
2178
2645
  _uppercase: {
2179
- [vars$2.textTransform]: 'uppercase'
2646
+ [vars$4.textTransform]: 'uppercase'
2180
2647
  },
2181
2648
  _lowercase: {
2182
- [vars$2.textTransform]: 'lowercase'
2649
+ [vars$4.textTransform]: 'lowercase'
2183
2650
  }
2184
2651
  };
2185
2652
 
2186
- const globalRefs = getThemeRefs(globals);
2187
- const vars$1 = Link.cssVarList;
2653
+ const globalRefs$2 = getThemeRefs(globals);
2654
+ const vars$3 = Link.cssVarList;
2188
2655
 
2189
2656
  const link = {
2190
- [vars$1.cursor]: 'pointer',
2191
- [vars$1.borderBottomWidth]: '2px',
2192
- [vars$1.borderBottomStyle]: 'solid',
2193
- [vars$1.borderBottomColor]: 'transparent',
2194
- [vars$1.color]: globalRefs.colors.primary.main,
2657
+ [vars$3.cursor]: 'pointer',
2658
+ [vars$3.borderBottomWidth]: '2px',
2659
+ [vars$3.borderBottomStyle]: 'solid',
2660
+ [vars$3.borderBottomColor]: 'transparent',
2661
+ [vars$3.color]: globalRefs$2.colors.primary.main,
2195
2662
 
2196
2663
  _hover: {
2197
- [vars$1.borderBottomColor]: globalRefs.colors.primary.main
2664
+ [vars$3.borderBottomColor]: globalRefs$2.colors.primary.main
2198
2665
  },
2199
2666
 
2200
2667
  textAlign: {
2201
- right: { [vars$1.textAlign]: 'right' },
2202
- left: { [vars$1.textAlign]: 'left' },
2203
- center: { [vars$1.textAlign]: 'center' }
2668
+ right: { [vars$3.textAlign]: 'right' },
2669
+ left: { [vars$3.textAlign]: 'left' },
2670
+ center: { [vars$3.textAlign]: 'center' }
2204
2671
  },
2205
2672
 
2206
2673
  _fullWidth: {
2207
- [vars$1.width]: '100%'
2674
+ [vars$3.width]: '100%'
2208
2675
  },
2209
2676
 
2210
2677
  mode: {
2211
2678
  primary: {
2212
- [vars$1.color]: globalRefs.colors.primary.main,
2679
+ [vars$3.color]: globalRefs$2.colors.primary.main,
2213
2680
  _hover: {
2214
- [vars$1.borderBottomColor]: globalRefs.colors.primary.main
2681
+ [vars$3.borderBottomColor]: globalRefs$2.colors.primary.main
2215
2682
  }
2216
2683
  },
2217
2684
  secondary: {
2218
- [vars$1.color]: globalRefs.colors.secondary.main,
2685
+ [vars$3.color]: globalRefs$2.colors.secondary.main,
2219
2686
  _hover: {
2220
- [vars$1.borderBottomColor]: globalRefs.colors.secondary.main
2687
+ [vars$3.borderBottomColor]: globalRefs$2.colors.secondary.main
2221
2688
  }
2222
2689
  },
2223
2690
  error: {
2224
- [vars$1.color]: globalRefs.colors.error.main,
2691
+ [vars$3.color]: globalRefs$2.colors.error.main,
2225
2692
  _hover: {
2226
- [vars$1.borderBottomColor]: globalRefs.colors.error.main
2693
+ [vars$3.borderBottomColor]: globalRefs$2.colors.error.main
2227
2694
  }
2228
2695
  },
2229
2696
  success: {
2230
- [vars$1.color]: globalRefs.colors.success.main,
2697
+ [vars$3.color]: globalRefs$2.colors.success.main,
2231
2698
  _hover: {
2232
- [vars$1.borderBottomColor]: globalRefs.colors.success.main
2699
+ [vars$3.borderBottomColor]: globalRefs$2.colors.success.main
2233
2700
  }
2234
2701
  }
2235
2702
  }
2236
2703
  };
2237
2704
 
2238
- const vars = Divider.cssVarList;
2705
+ const vars$2 = Divider.cssVarList;
2239
2706
 
2240
2707
  const divider = {
2241
- [vars.alignItems]: 'center',
2242
- [vars.height]: '2px',
2243
- [vars.backgroundColor]: 'currentColor',
2244
- [vars.opacity]: '0.2',
2245
- [vars.padding]: '0 10px',
2246
- [vars.width]: '100%',
2247
- [vars.flexDirection]: 'row',
2248
- [vars.alignSelf]: 'strech',
2249
- [vars.textWidth]: 'fit-content',
2708
+ [vars$2.alignItems]: 'center',
2709
+ [vars$2.height]: '2px',
2710
+ [vars$2.backgroundColor]: 'currentColor',
2711
+ [vars$2.opacity]: '0.2',
2712
+ [vars$2.padding]: '0 10px',
2713
+ [vars$2.width]: '100%',
2714
+ [vars$2.flexDirection]: 'row',
2715
+ [vars$2.alignSelf]: 'strech',
2716
+ [vars$2.textWidth]: 'fit-content',
2250
2717
  _vertical: {
2251
- [vars.width]: '2px',
2252
- [vars.padding]: '10px 0',
2253
- [vars.flexDirection]: 'column',
2254
- [vars.minHeight]: '200px',
2255
- [vars.textWidth]: 'max-content'
2718
+ [vars$2.width]: '2px',
2719
+ [vars$2.padding]: '10px 0',
2720
+ [vars$2.flexDirection]: 'column',
2721
+ [vars$2.minHeight]: '200px',
2722
+ [vars$2.textWidth]: 'max-content'
2256
2723
  }
2257
2724
  };
2258
2725
 
2259
- const componentName$1 = getComponentName('passcode-internal');
2260
-
2261
- const componentName = getComponentName('passcode');
2262
-
2263
- const customMixin = (superclass) =>
2264
- class DraggableMixinClass extends superclass {
2265
- constructor() {
2266
- super();
2267
- }
2268
-
2269
- get digits() {
2270
- return Number.parseInt(this.getAttribute('digits')) || 6
2271
- }
2272
-
2273
- connectedCallback() {
2274
- super.connectedCallback?.();
2275
- const template = document.createElement('template');
2276
-
2277
- //forward required & pattern TODO use forwardAttrs
2278
- template.innerHTML = `
2279
- <${componentName$1}
2280
- bordered="true"
2281
- name="code"
2282
- tabindex="0"
2283
- slot="input"
2284
- required="${this.shadowRoot.host.getAttribute('required')}"
2285
- pattern="${this.shadowRoot.host.getAttribute('pattern')}"
2286
- ></${componentName$1}>
2287
- `;
2288
-
2289
- // we are adding a slot under vaadin-text-field, it should reflect all descope-passcode children to be under vaadin-text-field, this is why it has a name & slot
2290
- const slotEle = Object.assign(document.createElement('slot'), { name: 'input', slot: 'input', part: 'input' });
2291
- this.proxyElement.appendChild(slotEle);
2292
-
2293
- // we want to control when the element is out of focus
2294
- // so the validations will be triggered blur event is dispatched from descope-passcode internal (and not every time focusing a digit)
2295
- this.proxyElement._setFocused = () => { };
2296
-
2297
- this.shadowRoot.host.appendChild(template.content.cloneNode(true));
2298
- this.inputElement = this.querySelector(componentName$1);
2299
-
2300
- // we want to trigger validation only when dispatching a blur event from the descope-passcode-internal
2301
- this.inputElement.addEventListener('blur', () => {
2302
- this.proxyElement.validate();
2303
- });
2304
- }
2305
- };
2306
-
2307
- const { borderStyle, borderWidth, ...restTextFieldMappings } = textFieldMappings;
2308
-
2309
- const Passcode = compose(
2310
- createStyleMixin({
2311
- mappings: {
2312
- ...restTextFieldMappings,
2313
- },
2314
- nestedMappings: {
2315
- borderColor: {
2316
- selector: ` ${TextField.componentName}`,
2317
- property: TextField.cssVarList.borderColor
2318
- }
2319
- }
2320
- }),
2321
- draggableMixin,
2322
- inputMixin,
2323
- componentNameValidationMixin,
2324
- customMixin
2325
- )(
2326
- createProxy({
2327
- slots: [],
2328
- wrappedEleName: 'vaadin-text-field',
2329
- style: () => `
2330
- :host {
2331
- --vaadin-field-default-width: auto;
2332
- }
2333
-
2334
- ::slotted([slot='input']) {
2335
- -webkit-mask-image: none;
2336
- display: flex;
2337
- gap: 2px;
2338
- align-items: center;
2339
- padding: 0;
2340
- }
2341
-
2342
- vaadin-text-field::part(input-field) {
2343
- background-color: transparent;
2344
- padding: 0;
2345
- }
2726
+ const passcode = {
2727
+ ...textField(Passcode.cssVarList),
2728
+ };
2346
2729
 
2347
- ${overrides}
2348
- `,
2349
- excludeAttrsSync: ['tabindex'],
2350
- componentName
2351
- })
2352
- );
2730
+ const globalRefs$1 = getThemeRefs(globals);
2353
2731
 
2354
- const overrides = `
2355
- :host {
2356
- display: inline-block;
2732
+ const vars$1 = LoaderLinear.cssVarList;
2733
+
2734
+ const loaderLinear = {
2735
+ [vars$1.display]: 'inline-block',
2736
+ [vars$1.barColor]: globalRefs$1.colors.surface.contrast,
2737
+ [vars$1.barWidth]: '20%',
2738
+ [vars$1.surfaceColor]: globalRefs$1.colors.surface.main,
2739
+ [vars$1.borderRadius]: '4px',
2740
+ [vars$1.animationDuration]: '2s',
2741
+ [vars$1.animationTimingFunction]: 'linear',
2742
+ [vars$1.animationIterationCount]: 'infinite',
2743
+ [vars$1.width]: '100%',
2744
+ size: {
2745
+ xs: {
2746
+ [vars$1.height]: '6px'
2747
+ },
2748
+ sm: {
2749
+ [vars$1.height]: '8px'
2750
+ },
2751
+ md: {
2752
+ [vars$1.height]: '10px'
2753
+ },
2754
+ lg: {
2755
+ [vars$1.height]: '12px'
2756
+ },
2757
+ xl: {
2758
+ [vars$1.height]: '14px'
2759
+ }
2760
+ },
2761
+ mode: {
2762
+ primary: {
2763
+ [vars$1.barColor]: globalRefs$1.colors.primary.main
2764
+ },
2765
+ secondary: {
2766
+ [vars$1.barColor]: globalRefs$1.colors.secondary.main
2767
+ }
2768
+ },
2769
+ _hidden: {
2770
+ [vars$1.display]: 'none'
2357
2771
  }
2772
+ };
2358
2773
 
2359
- vaadin-text-field {
2360
- margin: 0;
2361
- padding: 0;
2362
- }
2363
- vaadin-text-field::part(input-field) {
2364
- overflow: hidden;
2365
- }
2366
- vaadin-text-field[readonly] > input:placeholder-shown {
2367
- opacity: 1;
2368
- }
2774
+ const globalRefs = getThemeRefs(globals);
2369
2775
 
2370
- vaadin-text-field > label,
2371
- vaadin-text-field::part(input-field) {
2372
- cursor: pointer;
2373
- color: var(${Passcode.cssVarList.color});
2374
- }
2375
- vaadin-text-field::part(input-field):focus {
2376
- cursor: text;
2377
- }
2378
- vaadin-text-field[required]::part(required-indicator)::after {
2379
- font-size: "12px";
2380
- content: "*";
2381
- color: var(${Passcode.cssVarList.color});
2382
- }
2383
- vaadin-text-field[readonly]::part(input-field)::after {
2384
- border: 0 solid;
2776
+ const vars = LoaderRadial.cssVarList;
2777
+
2778
+ const loaderRadial = {
2779
+ [vars.display]: 'inline-block',
2780
+ [vars.color]: globalRefs.colors.surface.contrast,
2781
+ [vars.animationDuration]: '2s',
2782
+ [vars.animationTimingFunction]: 'linear',
2783
+ [vars.animationIterationCount]: 'infinite',
2784
+ [vars.spinnerStyle]: 'solid',
2785
+ [vars.spinnerWidth]: '4px',
2786
+ [vars.spinnerRadius]: '50%',
2787
+ [vars.spinnerTopColor]: 'currentColor',
2788
+ [vars.spinnerBottomColor]: 'transparent',
2789
+ [vars.spinnerRightColor]: 'currentColor',
2790
+ [vars.spinnerLeftColor]: 'transparent',
2791
+ size: {
2792
+ xs: {
2793
+ [vars.width]: '20px',
2794
+ [vars.height]: '20px',
2795
+ [vars.spinnerWidth]: '2px'
2796
+ },
2797
+ sm: {
2798
+ [vars.width]: '30px',
2799
+ [vars.height]: '30px',
2800
+ [vars.spinnerWidth]: '3px'
2801
+ },
2802
+ md: {
2803
+ [vars.width]: '40px',
2804
+ [vars.height]: '40px',
2805
+ [vars.spinnerWidth]: '4px'
2806
+ },
2807
+ lg: {
2808
+ [vars.width]: '60px',
2809
+ [vars.height]: '60px',
2810
+ [vars.spinnerWidth]: '5px'
2811
+ },
2812
+ xl: {
2813
+ [vars.width]: '80px',
2814
+ [vars.height]: '80px',
2815
+ [vars.spinnerWidth]: '6px'
2816
+ }
2817
+ },
2818
+ mode: {
2819
+ primary: {
2820
+ [vars.color]: globalRefs.colors.primary.main
2821
+ },
2822
+ secondary: {
2823
+ [vars.color]: globalRefs.colors.secondary.main
2824
+ }
2825
+ },
2826
+ _hidden: {
2827
+ [vars.display]: 'none'
2385
2828
  }
2386
- `;
2387
-
2388
- const passcode = {
2389
- ...textField(Passcode.cssVarList),
2390
2829
  };
2391
2830
 
2392
2831
  var components = {
@@ -2403,7 +2842,9 @@ var components = {
2403
2842
  text,
2404
2843
  link,
2405
2844
  divider,
2406
- passcode
2845
+ passcode,
2846
+ loaderRadial,
2847
+ loaderLinear
2407
2848
  };
2408
2849
 
2409
2850
  var index = { globals, components };