@sc-360-v2/storefront-cms-library 0.3.6 → 0.3.8

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.
@@ -1,116 +1,9 @@
1
1
  @use "sass:map";
2
2
  @use "sass:list";
3
-
3
+ @use "./fb-dropdown.scss";
4
4
  /**************************************************************
5
5
  * Preview Form Styles
6
6
  **************************************************************/
7
-
8
- // $list: ("checkbox", "radio");
9
-
10
- // .preview-form-main {
11
- // --color-primary: #4f46e5;
12
- // --color-primary-hover: #4338ca;
13
- // --color-danger: #dc3545;
14
- // --color-danger-hover: #b02a37;
15
- // --color-success: #10b981;
16
- // --color-success-hover: #0c8a67;
17
- // --color-text: #111827;
18
- // --color-muted: #6b7280;
19
- // --color-border: #e5e7eb;
20
- // --font-family-base: "Inter", system-ui, -apple-system, sans-serif;
21
- // display: flex;
22
- // flex-direction: column;
23
- // gap: 1rem;
24
- // padding: 1.5rem;
25
- // background: #ffffff;
26
- // border: 1px solid var(--color-border);
27
- // border-radius: 6px;
28
-
29
- // input {
30
- // --_sp-vl: var(--_width-15);
31
- // @each $value in $list {
32
- // &:is([type="#{$value}"]) {
33
- // width: var(--_sp-vl);
34
- // height: var(--_sp-vl);
35
- // }
36
- // }
37
- // }
38
-
39
- // .preview-field {
40
- // display: flex;
41
- // flex-direction: column;
42
- // gap: 0.3rem;
43
- // }
44
-
45
- // .preview-label {
46
- // font-weight: 500;
47
- // }
48
-
49
- // .input {
50
- // background: #fff;
51
- // border: 1px solid var(--color-border);
52
- // border-radius: 4px;
53
- // padding: 0.4rem 0.6rem;
54
- // font-size: 0.95rem;
55
- // transition: border-color 0.2s ease;
56
- // color: var(--color-text);
57
- // width: 100%;
58
- // box-sizing: border-box;
59
- // }
60
-
61
- // .input:focus {
62
- // outline: none;
63
- // border-color: var(--color-primary);
64
- // }
65
-
66
- // .option {
67
- // display: flex;
68
- // gap: 5px;
69
- // align-items: center;
70
- // }
71
- // /* Select & Checkbox */
72
- // .select,
73
- // .radio,
74
- // .checkbox {
75
- // display: flex;
76
- // align-items: center;
77
- // gap: 1rem;
78
- // }
79
-
80
- // /* Error Messages */
81
- // .error {
82
- // color: var(--color-danger);
83
- // font-size: 0.85rem;
84
- // margin-top: 0.2rem;
85
- // }
86
-
87
- // /* Buttons */
88
- // .test-button {
89
- // background-color: var(--_primary-500);
90
- // color: #fff;
91
- // border: 1px solid vvar(--_primary-500);
92
- // border-radius: 4px;
93
- // padding: 0.5rem 1rem;
94
- // font-weight: 500;
95
- // cursor: pointer;
96
- // transition:
97
- // background-color 0.2s ease,
98
- // border-color 0.2s ease;
99
- // }
100
-
101
- // /* Animations */
102
- // @keyframes fadeIn {
103
- // from {
104
- // opacity: 0;
105
- // transform: translateY(-2%);
106
- // }
107
- // to {
108
- // opacity: 1;
109
- // transform: translateY(0);
110
- // }
111
- // }
112
- // }
113
-
114
7
  .new-form-template {
115
8
  display: flex;
116
9
  flex-direction: column;
@@ -157,3 +50,165 @@
157
50
  }
158
51
  }
159
52
  }
53
+
54
+ .fb_field {
55
+ width: 100%;
56
+
57
+ input:not([type="checkbox"][type="radio"]),
58
+ select {
59
+ border: 1px solid var(--_gray-300);
60
+ border-radius: 6px;
61
+ padding-inline: 12px;
62
+ width: 100%;
63
+ height: 38px;
64
+ }
65
+ input[type="tel"] {
66
+ border-top-left-radius: 0px !important;
67
+ border-bottom-left-radius: 0px !important;
68
+ border-left: 0 !important;
69
+ background-color: var(--_base-white);
70
+ height: 38px;
71
+ }
72
+ textarea {
73
+ width: 100%;
74
+ resize: vertical;
75
+ border-radius: 6px;
76
+ background-color: var(--_base-white);
77
+ padding: 12px;
78
+ }
79
+ .error_styles {
80
+ min-height: 20px;
81
+ }
82
+ .label_with_radio {
83
+ display: flex;
84
+ label {
85
+ margin-right: 12px;
86
+ display: flex;
87
+ align-items: center;
88
+ gap: 12px;
89
+ text-wrap: nowrap;
90
+ }
91
+ }
92
+
93
+ .custom-input {
94
+ display: inline-flex;
95
+ align-items: center;
96
+ gap: 0.5rem;
97
+ font-size: 16px;
98
+ cursor: pointer;
99
+ user-select: none;
100
+
101
+ input {
102
+ display: none;
103
+ }
104
+
105
+ .custom-mark {
106
+ width: 20px;
107
+ height: 20px;
108
+ background-color: #fff;
109
+ border: 2px solid #ccc;
110
+ position: relative;
111
+ transition: all 0.2s ease;
112
+
113
+ &::after {
114
+ content: "";
115
+ position: absolute;
116
+ opacity: 0;
117
+ transition: opacity 0.2s ease;
118
+ }
119
+ }
120
+
121
+ &.checkbox {
122
+ .custom-mark {
123
+ border-radius: 4px;
124
+
125
+ &::after {
126
+ left: 6px;
127
+ top: 2px;
128
+ width: 5px;
129
+ height: 10px;
130
+ border: solid #fff;
131
+ border-width: 0 2px 2px 0;
132
+ transform: rotate(45deg);
133
+ }
134
+ }
135
+
136
+ input:checked + .custom-mark {
137
+ background-color: #4caf50;
138
+ border-color: #4caf50;
139
+
140
+ &::after {
141
+ opacity: 1;
142
+ }
143
+ }
144
+ }
145
+
146
+ &.radio {
147
+ .custom-mark {
148
+ border-radius: 50%;
149
+
150
+ &::after {
151
+ top: 50%;
152
+ left: 50%;
153
+ width: 10px;
154
+ height: 10px;
155
+ background-color: #fff;
156
+ border-radius: 50%;
157
+ transform: translate(-50%, -50%);
158
+ }
159
+ }
160
+
161
+ input:checked + .custom-mark {
162
+ background-color: #4caf50;
163
+ border-color: #4caf50;
164
+
165
+ &::after {
166
+ opacity: 1;
167
+ }
168
+ }
169
+ }
170
+ }
171
+ .label_styles {
172
+ display: block;
173
+ margin-bottom: 4px;
174
+ }
175
+ &:has(input[type="checkbox"]) {
176
+ display: flex;
177
+ align-items: center;
178
+ gap: 8px;
179
+ }
180
+ input[type="checkbox"] {
181
+ width: 20px !important;
182
+ height: 20px !important;
183
+ }
184
+
185
+ .react-international-phone-country-selector-button {
186
+ height: 38px;
187
+ padding-inline: 4px;
188
+ }
189
+ }
190
+ .fb_file_upload {
191
+ label {
192
+ display: block;
193
+ margin-bottom: 6px;
194
+ }
195
+ }
196
+ .fb_btn {
197
+ height: 38px;
198
+ text-align: center;
199
+ border-radius: 6px;
200
+ background-color: var(--_primary-400);
201
+ color: var(--_base-white);
202
+ width: 100%;
203
+ padding-inline: 16px;
204
+ cursor: pointer;
205
+ transition: opacity 0.2s ease;
206
+
207
+ &:disabled,
208
+ &[disabled] {
209
+ background-color: var(--_primary-400);
210
+ color: var(--_base-white);
211
+ cursor: not-allowed;
212
+ opacity: 0.6;
213
+ }
214
+ }
package/dist/globals.scss CHANGED
@@ -92,3 +92,9 @@ a {
92
92
  color-scheme: dark;
93
93
  }
94
94
  }
95
+
96
+ .text-ellipsis {
97
+ white-space: nowrap;
98
+ overflow: hidden;
99
+ text-overflow: ellipsis;
100
+ }