@stonecrop/aform 0.2.22 → 0.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,10 +10,10 @@
10
10
  <form @submit="onSubmit">
11
11
  <div class="login-form-container">
12
12
  <div class="login-form-email login-form-element">
13
- <label id="login-email" for="email" class="login-label">Email</label>
13
+ <label id="login-email" for="email" class="aform__field-label">Email</label>
14
14
  <input
15
15
  id="email"
16
- class="login-field"
16
+ class="aform__input-field"
17
17
  name="email"
18
18
  placeholder="name@example.com"
19
19
  type="email"
@@ -90,5 +90,5 @@ function onSubmit(event: Event) {
90
90
  </script>
91
91
 
92
92
  <style>
93
- @import url('../../theme/login.css');
93
+ @import url('@/theme/login.css');
94
94
  </style>
@@ -1,28 +1 @@
1
- @import url('https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');
2
- @import url('@stonecrop/themes/default/default.css');
3
- @import url('custom_themes.css');
4
-
5
- :root {
6
- font-family: var(--font-family);
7
- }
8
-
9
- .aform-primary-action {
10
- font-size: 100%;
11
- text-align: center;
12
- min-height: 2em;
13
- padding: 0.25rem 1rem 0.25rem 1rem;
14
- border: 1px solid var(--primary-color);
15
- color: var(--primary-text-color);
16
- background-color: var(--primary-color);
17
- outline: 2px solid var(--primary-text-color);
18
- transition: outline-offset 200ms ease;
19
- font-size: var(--font-size);
20
- margin: 0.5ch;
21
- }
22
-
23
- .aform-primary-action:hover,
24
- .aform-primary-action:active {
25
- outline: 2px solid var(--primary-text-color);
26
- outline-offset: -4px;
27
- transition: outline-offset 200ms ease;
28
- }
1
+ @import url('@stonecrop/themes/default/default.css');
@@ -0,0 +1,85 @@
1
+ /* Styles for all types of fields: Text and Number Inputs, Radios, Checkboxes, etc. */
2
+ .form-element{
3
+ min-width:40ch;
4
+ border:1px solid transparent;
5
+ padding:0;
6
+ margin:0;
7
+ margin-right:.5rem;
8
+ margin-bottom:.5rem;
9
+ }
10
+ .input-field{
11
+ outline: 1px solid transparent;
12
+ border: 1px solid var(--input-border-color);
13
+ padding:.25rem;
14
+ margin: 0 0 0 0;
15
+ border-radius: 0 0 0.25rem .25rem;
16
+ box-sizing:border-box;
17
+ width:100%;
18
+ }
19
+ .field-label{
20
+ color: var(--input-label-color);
21
+ display: block;
22
+ min-height: 1.15rem;
23
+ padding: .25rem;
24
+ margin: 0rem;
25
+ z-index: 2;
26
+ font-size: 1rem;
27
+ font-weight:bold;
28
+ background: white;
29
+ width:100%;
30
+ box-sizing:border-box;
31
+ background:var(--gray-5);
32
+ border:1px solid var(--input-border-color);
33
+ border-bottom:none;
34
+
35
+ }
36
+ p.error{
37
+ display: block;
38
+ min-height: 1.15rem;
39
+ padding: 0rem;
40
+ padding-left:.5rem;
41
+ margin: .5rem 0 .25rem 0rem;
42
+ border: 1px solid transparent;
43
+ width: 100%;
44
+ color: var(--brand-danger);
45
+ font-size: .8rem;
46
+ }
47
+
48
+ .input-field:focus {
49
+ border: 1px solid var(--input-active-border-color);
50
+ }
51
+
52
+ .input-field:focus + .field-label {
53
+ color: var(--input-active-label-color);
54
+ }
55
+
56
+ /** CHECKBOX **/
57
+ .checkbox {
58
+ visibility: hidden;
59
+ display:none;
60
+ }
61
+
62
+ .checkbox + .custom-checkbox:before {
63
+ content: '⬡';
64
+ font-size: 1.2rem;
65
+ cursor: pointer;
66
+ margin-right:.25rem;
67
+ }
68
+
69
+ .checkbox:checked + .custom-checkbox:before {
70
+ content: '⬣';
71
+ }
72
+
73
+ .custom-checkbox {
74
+ display: inline-block;
75
+ line-height:0;
76
+ }
77
+
78
+ .checkbox-container {
79
+ width:100%;
80
+ display:inline-block;
81
+ }
82
+
83
+ .checkbox-container:hover + .field-label {
84
+ color: var(--input-active-label-color);
85
+ }
@@ -1,132 +1,4 @@
1
- @import url('https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');
2
1
  @import url('@stonecrop/themes/default/default.css');
3
2
  @import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');
4
3
 
5
- :root {
6
- /* BTNS */
7
- --btn-color: white;
8
- --btn-border: #cccccc;
9
- --btn-hover: #f2f2f2;
10
- --btn-label-color: black;
11
- }
12
4
 
13
- .login-container {
14
- width: 100%;
15
- position: relative;
16
- display: flex;
17
- flex-direction: column;
18
- align-items: center;
19
- justify-content: center;
20
- font-family: var(--font-family);
21
- }
22
-
23
- .account-container {
24
- width: 100%;
25
- margin-left: auto;
26
- margin-top: 0.5rem;
27
- margin-right: auto;
28
- display: flex;
29
- flex-direction: column;
30
- justify-content: center;
31
- }
32
-
33
- .account-header {
34
- display: flex;
35
- flex-direction: column;
36
- text-align: center;
37
- margin-top: 0.5rem;
38
- }
39
-
40
- #account-title {
41
- font-size: 1.5rem;
42
- line-height: 2rem;
43
- font-weight: 600;
44
- letter-spacing: -0.025em;
45
- margin: 0;
46
- }
47
-
48
- #account-subtitle {
49
- font-size: 0.875rem;
50
- line-height: 1.25rem;
51
- margin: 1rem;
52
- }
53
-
54
- .login-form-container {
55
- display: grid;
56
- gap: 0.5rem;
57
- }
58
-
59
- .login-form-email,
60
- .login-form-password {
61
- display: grid;
62
- gap: 0.25rem;
63
- }
64
- .login-form-element {
65
- margin: 0.5rem 0;
66
- }
67
- .login-field {
68
- padding: 0.5rem 0.25rem 0.25rem 0.5rem;
69
- outline: 1px solid transparent;
70
- border: 1px solid var(--input-border-color);
71
- border-radius: 0.25rem;
72
-
73
- &:focus {
74
- border: 1px solid black;
75
- }
76
- }
77
- .login-label {
78
- position: absolute;
79
- padding: 0;
80
- background: white;
81
- white-space: nowrap;
82
- border-width: 0;
83
- font-size: 0.7rem;
84
- margin-left: 0.5rem;
85
- margin-top: -0.7rem;
86
- padding: 0.3rem;
87
- }
88
-
89
- #login-form-button {
90
- margin-right: 0.5rem;
91
- height: 1rem;
92
- width: 1rem;
93
- }
94
- .btn {
95
- background-color: var(--btn-color);
96
- color: var(--btn-label-color);
97
- border: 1px solid var(--btn-border);
98
- margin: 0.5rem 0;
99
- padding: 0.25rem;
100
- position: relative;
101
-
102
- &:hover {
103
- background-color: var(--btn-hover);
104
- }
105
- &:disabled {
106
- background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3));
107
- color: light-dark(rgb(84, 84, 84), rgb(170, 170, 170));
108
- }
109
- }
110
- .disabled {
111
- opacity: 0.5;
112
- }
113
- .loading-icon {
114
- animation: spin 1s linear infinite forwards;
115
- display: inline-block;
116
- margin-right: 0.2rem;
117
- line-height: 0;
118
- font-size: 1rem;
119
- position: relative;
120
- top: 0.2rem;
121
- }
122
-
123
- /* ANIMATION */
124
- @keyframes spin {
125
- from {
126
- transform: rotate(0deg);
127
- }
128
-
129
- to {
130
- transform: rotate(360deg);
131
- }
132
- }