@elcrm/form 0.0.76 → 0.0.79

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,313 +0,0 @@
1
- .o {
2
- position: fixed;
3
- z-index: 98;
4
- top: 0;
5
- left: 0;
6
- right: 0;
7
- bottom: 0;
8
- background: #0000;
9
- }
10
-
11
- /* Всплывающее окно календаря: координаты из getBoundingClientRect — привязка к вьюпорту */
12
- .c {
13
- box-shadow: 5px 7px 18px 0px #000000a8;
14
- padding: 10px 12px 12px;
15
- margin: 0;
16
- display: block;
17
- position: fixed;
18
- background: var(--select-background);
19
- z-index: 99;
20
- border-radius: 10px;
21
- max-height: min(92vh, 480px);
22
- overflow-x: hidden;
23
- overflow-y: auto;
24
- color: var(--select-color, #333);
25
- box-sizing: border-box;
26
- min-width: 259px;
27
- & [grid-calendar] {
28
- display: grid;
29
- grid-template-columns: repeat(7, 1fr);
30
- gap: 2px;
31
- /* Одинаковая высота всех строк (подписи + ряды чисел) */
32
- grid-auto-rows: 34px;
33
- }
34
- /* Подписи дней недели — первая строка сетки */
35
- & [grid-calendar] > p {
36
- font-size: 0.75rem;
37
- font-weight: 500;
38
- line-height: 1;
39
- color: var(--color-placeholder);
40
- padding: 0;
41
- margin: 0;
42
- display: flex;
43
- align-items: center;
44
- justify-content: center;
45
- box-sizing: border-box;
46
- }
47
- & [grid-month] {
48
- display: grid;
49
- grid-template-columns: 1fr 1fr 1fr 1fr;
50
- width: 250px;
51
- }
52
- & b {
53
- font-weight: normal;
54
- display: block;
55
- padding: 8px 5px;
56
- border-radius: 5px;
57
- cursor: pointer;
58
- text-align: center;
59
- &._active {
60
- background: var(--bg-select-active);
61
- }
62
- }
63
- & b:hover {
64
- background: var(--bg-select-hover);
65
- }
66
-
67
- & p {
68
- color: var(--color-placeholder);
69
- text-align: center;
70
- padding: 0;
71
- cursor: default;
72
- pointer-events: none;
73
- }
74
-
75
- & i {
76
- flex: 0 30px;
77
- padding: 9px;
78
- text-align: center;
79
- cursor: pointer;
80
- border-radius: 5px;
81
- }
82
- & i:hover {
83
- background: var(--bg-select-hover);
84
- }
85
- & i::before {
86
- cursor: pointer;
87
- display: block;
88
- }
89
- & s {
90
- display: flex;
91
- font-style: normal;
92
- text-decoration: none;
93
- padding-bottom: 6px;
94
- align-items: center;
95
- gap: 4px;
96
- }
97
- & s h2 {
98
- flex: 1 1 auto;
99
- min-width: 0;
100
- padding: 0;
101
- margin: 0;
102
- font-size: 16px;
103
- text-align: center;
104
- font-weight: normal;
105
- line-height: 1.25;
106
- color: var(--select-color, #333);
107
- cursor: default;
108
- display: flex;
109
- flex-wrap: nowrap;
110
- justify-content: center;
111
- align-items: center;
112
- gap: 8px;
113
- }
114
- /* заголовок календаря: клик по месяцу / году открывает выбор */
115
- & .dateHeaderMonth,
116
- & .dateHeaderYear {
117
- cursor: pointer;
118
- border-radius: 6px;
119
- padding: 2px 8px;
120
- user-select: none;
121
- white-space: nowrap;
122
- }
123
- & .dateHeaderMonth:hover,
124
- & .dateHeaderYear:hover {
125
- background: var(--bg-select-hover);
126
- }
127
- & .dateHeaderDisabled {
128
- cursor: not-allowed;
129
- opacity: 0.45;
130
- pointer-events: none;
131
- }
132
- & .dateHeaderDisabled[data-active="true"],
133
- & .dateHeaderDisabled[data-current="true"] {
134
- opacity: 0.45;
135
- }
136
-
137
- /* Выбранное значение поля (data-current) и «сегодня» (data-active) */
138
- & [grid-calendar] b[data-current="true"],
139
- & [grid-month] b[data-current="true"] {
140
- background: color-mix(
141
- in srgb,
142
- var(--field-background-active) 52%,
143
- transparent
144
- );
145
- font-weight: 600;
146
- }
147
- & [grid-calendar] b[data-active="true"]:not([data-current="true"]),
148
- & [grid-month] b[data-active="true"]:not([data-current="true"]) {
149
- outline: 2px solid var(--field-background-active);
150
- outline-offset: -2px;
151
- }
152
- & [grid-calendar] b[data-active="true"][data-current="true"],
153
- & [grid-month] b[data-active="true"][data-current="true"] {
154
- box-shadow: inset 0 0 0 2px var(--field-background-active);
155
- }
156
- & [grid-calendar] p[data-current="true"] {
157
- background: color-mix(
158
- in srgb,
159
- var(--field-background-active) 52%,
160
- transparent
161
- );
162
- font-weight: 600;
163
- color: inherit;
164
- border-radius: 5px;
165
- }
166
- & [grid-calendar] p[data-active="true"]:not([data-current="true"]) {
167
- outline: 2px solid var(--field-background-active);
168
- outline-offset: -2px;
169
- opacity: 0.85;
170
- }
171
- & [grid-calendar] p[data-active="true"][data-current="true"] {
172
- box-shadow: inset 0 0 0 2px var(--field-background-active);
173
- }
174
-
175
- & span {
176
- padding: 2px;
177
- text-align: center;
178
- & p {
179
- padding: 8px 5px;
180
- color: var(--color-placeholder);
181
- }
182
- }
183
- /* Ячейки дат: без лишнего padding у span — иначе первая строка «выше» остальных */
184
- & [grid-calendar] > span {
185
- padding: 0;
186
- display: flex;
187
- align-items: stretch;
188
- justify-content: stretch;
189
- min-height: 0;
190
- box-sizing: border-box;
191
- }
192
- & [grid-calendar] > span > b,
193
- & [grid-calendar] > span > p {
194
- flex: 1 1 auto;
195
- display: flex;
196
- align-items: center;
197
- justify-content: center;
198
- width: 100%;
199
- min-height: 0;
200
- margin: 0;
201
- padding: 0;
202
- box-sizing: border-box;
203
- border-radius: 5px;
204
- }
205
- & .as {
206
- cursor: ns-resize;
207
- }
208
- & .ap {
209
- cursor: pointer;
210
- }
211
- }
212
-
213
- [field="password"] dd {
214
- white-space: nowrap;
215
- font-style: unset;
216
- -webkit-text-security: disc;
217
- user-select: none;
218
- -webkit-user-select: text;
219
- }
220
-
221
- [field="password"][show] dd {
222
- -webkit-text-security: none;
223
- }
224
-
225
- [field="password"] dd::before {
226
- -webkit-text-security: none;
227
- }
228
-
229
- [field="code"] div {
230
- display: flex;
231
- gap: 8px;
232
- }
233
-
234
- [field="select"] dd {
235
- cursor: pointer;
236
- }
237
-
238
- [field] dd::before {
239
- pointer-events: none;
240
- }
241
-
242
- [field="check"] {
243
- & dd {
244
- max-width: 35px;
245
- padding: 0;
246
- cursor: pointer;
247
- }
248
- & [active]::after {
249
- content: "";
250
- background: #394264;
251
- width: 15px;
252
- height: 15px;
253
- display: block;
254
- border-radius: 5px;
255
- }
256
- }
257
-
258
- [field="file"] {
259
- & input {
260
- display: none;
261
- }
262
- & dd {
263
- aspect-ratio: 16 / 9;
264
- position: relative;
265
- cursor: pointer;
266
- }
267
- & img {
268
- aspect-ratio: 16 / 9;
269
- display: block;
270
- width: -webkit-fill-available;
271
- object-fit: contain;
272
- cursor: pointer;
273
- }
274
- & label {
275
- aspect-ratio: 16 / 9;
276
- display: block;
277
- width: -webkit-fill-available;
278
- object-fit: contain;
279
- position: absolute;
280
- cursor: pointer;
281
- }
282
- }
283
-
284
- [field="color"] {
285
- & dd {
286
- display: flex;
287
- border: 0;
288
- padding: 0;
289
- gap: 3px;
290
- & s {
291
- border: 1px solid #dde2e4;
292
- border-radius: 6px;
293
- flex: 1;
294
- cursor: pointer;
295
- opacity: 0.6;
296
- &:hover {
297
- opacity: 0.9;
298
- }
299
- &[active="true"] {
300
- opacity: 1;
301
- }
302
- }
303
- }
304
- }
305
-
306
- // p: #abb6d2
307
-
308
- // background: #394264
309
-
310
- // --bg-select-active: #0000007;
311
- // --bg-select: #394264;
312
- // --bg-select-hover: #0000007;
313
- // --color-placeholder: #abb6d2;
@@ -1,107 +0,0 @@
1
- /*
2
- Цвета списка задаются в light.css / dark.css (--select-*).
3
- Здесь только размеры; fallback на светлый фон, если тема не подключена.
4
- */
5
- :root {
6
- --select-overlay: transparent;
7
- --select-height: 52px;
8
- --select-separator: 1px solid #c6c6c8;
9
- --select-color: #000000;
10
- --select-background: #ffffff;
11
- --select-li-hover-bg: #f2f2f7;
12
- --select-li-focus-bg: #e5e5ea;
13
- --select-li-selected-bg: #e5e5ea;
14
- --select-icon: calc(var(--select-height) / 1.5);
15
- --select-icon-padding: calc((var(--select-height) - var(--select-icon)) / 2);
16
- --select-font-size: 17px;
17
- }
18
-
19
- // overlay
20
- .o {
21
- position: fixed;
22
- z-index: 98;
23
- top: 0;
24
- left: 0;
25
- right: 0;
26
- bottom: 0;
27
- background: var(--select-overlay);
28
- }
29
- // list
30
- .l {
31
- padding: 0;
32
- margin: 0;
33
- display: block;
34
- position: fixed;
35
- background: var(--select-background);
36
- z-index: 99;
37
- border-radius: 20px;
38
- overflow: scroll;
39
- max-height: 300px;
40
- &::-webkit-scrollbar {
41
- width: 0;
42
- height: 0;
43
- }
44
- }
45
- .l ul {
46
- overflow-y: auto;
47
- width: 100%;
48
- max-height: 300px;
49
- display: block;
50
- overflow-x: hidden;
51
- margin: 0;
52
- padding: 0;
53
- list-style: none;
54
- }
55
- .l li {
56
- display: block;
57
- border-bottom: var(--select-separator);
58
- cursor: pointer;
59
- display: block;
60
- margin: 0;
61
- padding: 0 14px;
62
- color: var(--select-color);
63
- border-left: 0 !important;
64
- text-align: left !important;
65
- height: var(--select-height);
66
- line-height: var(--select-height);
67
- font-size: var(--select-font-size);
68
- white-space: nowrap;
69
- overflow: hidden;
70
- text-overflow: ellipsis;
71
- opacity: 1;
72
- }
73
- /* Текущее значение в форме (role=option aria-selected) */
74
- .l li[aria-selected="true"] {
75
- background: var(--select-li-selected-bg, var(--select-li-hover-bg));
76
- }
77
- .l li:hover {
78
- background: var(--select-li-hover-bg, #f2f2f7);
79
- }
80
- .l li[data-focus="true"] {
81
- background: var(--select-li-focus-bg, #e5e5ea);
82
- }
83
- .l li:last-child {
84
- border-bottom: 0;
85
- }
86
-
87
- .i {
88
- position: absolute;
89
- width: var(--select-icon);
90
- height: var(--select-icon);
91
- color: var(--field-color);
92
- right: var(--select-icon-padding);
93
- top: var(--select-icon-padding);
94
- }
95
-
96
- /** Нет выбранного значения: текст подсказки — цвет placeholder, не --field-color (иначе как обычный label) */
97
- .placeholderValue {
98
- color: var(--field-placeholder);
99
- font-weight: 400;
100
- }
101
-
102
- .f {
103
- cursor: pointer;
104
- &[aria-disabled="true"] {
105
- cursor: not-allowed;
106
- }
107
- }