recurrence_ui 0.3.3 → 0.4.0

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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -12
  3. data/app/assets/stylesheets/recurrence_ui/application.css +962 -12
  4. data/app/components/recurrence_ui/recurrence_picker_component.html.erb +85 -83
  5. data/app/javascript/recurrence_ui/recurrence_ui_controller.js +53 -42
  6. data/app/views/recurrence_ui/_daily.html.erb +3 -3
  7. data/app/views/recurrence_ui/_duration.html.erb +33 -36
  8. data/app/views/recurrence_ui/_end_at.html.erb +5 -4
  9. data/app/views/recurrence_ui/_exceptions.html.erb +22 -22
  10. data/app/views/recurrence_ui/_footer_actions.html.erb +1 -1
  11. data/app/views/recurrence_ui/_monthly_by_day_of_month.html.erb +5 -5
  12. data/app/views/recurrence_ui/_monthly_by_weekday.html.erb +12 -12
  13. data/app/views/recurrence_ui/_rdates.html.erb +22 -22
  14. data/app/views/recurrence_ui/_rule_card.html.erb +9 -9
  15. data/app/views/recurrence_ui/_single_rule.html.erb +13 -11
  16. data/app/views/recurrence_ui/_start_at.html.erb +17 -21
  17. data/app/views/recurrence_ui/_summary_link.html.erb +4 -4
  18. data/app/views/recurrence_ui/_termination.html.erb +13 -12
  19. data/app/views/recurrence_ui/_time_zone.html.erb +11 -9
  20. data/app/views/recurrence_ui/_weekly.html.erb +19 -24
  21. data/app/views/recurrence_ui/_yearly_by_day_of_month.html.erb +9 -10
  22. data/app/views/recurrence_ui/_yearly_by_weekday.html.erb +11 -12
  23. data/config/locales/recurrence_ui.ru.yml +2 -2
  24. data/config/routes.rb +0 -3
  25. data/lib/generators/recurrence_ui/install/install_generator.rb +29 -23
  26. data/lib/generators/recurrence_ui/install/templates/recurrence_ui.rb +40 -0
  27. data/lib/recurrence_ui/engine.rb +1 -0
  28. data/lib/recurrence_ui/version.rb +1 -1
  29. metadata +3 -4
  30. data/app/assets/stylesheets/recurrence_ui/components.css +0 -295
  31. data/app/assets/stylesheets/recurrence_ui/tokens.css +0 -102
@@ -1,15 +1,965 @@
1
- /*
2
- * RecurrenceUI CSS Manifest
3
- * This file brings together design tokens and component styles.
4
- */
1
+ /* ==========================================================================
2
+ RecurrenceUI CSS Manifest & Design Tokens
3
+ ========================================================================== */
5
4
 
6
- /* 1. Tell Tailwind CSS v4 to index classes used inside the RecurrenceUI gem files */
7
- @source "../../views/recurrence_ui/**/*.html.erb";
8
- @source "../../components/recurrence_ui/**/*.html.erb";
9
- @source "../../views/**/*.html.erb";
5
+ /* ==========================================================================
6
+ 1. Design Tokens & Theme Configuration
7
+ ========================================================================== */
10
8
 
11
- /* 2. Import CSS variables (theme tokens) */
12
- @import "./tokens.css";
9
+ /* Light Theme (Default Values) */
10
+ :root {
11
+ /* Backgrounds & Text */
12
+ --rui-bg-main: #ffffff;
13
+ --rui-text-main: #111827; /* gray-900 */
14
+ --rui-text-muted: #6b7280; /* gray-500 */
15
+ --rui-border-color: #d1d5db; /* gray-300 */
16
+
17
+ /* Forms & Inputs */
18
+ --rui-input-bg: #ffffff;
19
+ --rui-input-disabled-bg: #f3f4f6;
13
20
 
14
- /* 3. Import component styles (UI classes) */
15
- @import "./components.css";
21
+ /* Primary Accents */
22
+ --rui-primary-bg: #2563eb; /* blue-600 */
23
+ --rui-primary-hover: #1d4ed8; /* blue-700 */
24
+ --rui-primary-active: #1e40af; /* blue-800 */
25
+ --rui-primary-text: #ffffff;
26
+
27
+ /* Secondary Elements */
28
+ --rui-secondary-bg: #f3f4f6; /* gray-100 */
29
+ --rui-secondary-hover: #e5e7eb; /* gray-200 */
30
+ --rui-secondary-text: #374151; /* gray-700 */
31
+ --rui-secondary-border: #d1d5db;
32
+
33
+ /* Interactivity & States */
34
+ --rui-hover-bg-soft: #eff6ff; /* blue-50 */
35
+ --rui-error-text: #dc2626; /* red-600 */
36
+
37
+ /* Rule-specific Text Colors */
38
+ --rui-rule-main-text: #1e293b;
39
+ --rui-rule-exception-text: #b91c1c; /* red-700 */
40
+ --rui-rule-rdate-text: #047857; /* emerald-700 */
41
+ /* Chips */
42
+ --rui-chip-exdate-border: #fecaca; /* red-300 */
43
+ --rui-chip-exdate-bg: #fef2f2; /* red-50 */
44
+ --rui-chip-rdate-border: #a7f3d0; /* emerald-300 */
45
+ --rui-chip-rdate-bg: #ecfdf5; /* emerald-50 */
46
+
47
+ /* Border Radii */
48
+ --rui-radius: 0.375rem;
49
+ --rui-radius-lg: 0.5rem;
50
+ }
51
+
52
+ /* Dark Theme (System Preference or Manual Toggle) */
53
+ @media (prefers-color-scheme: dark) {
54
+ :root:not([data-rui-theme="light"]) {
55
+ --is-dark: true;
56
+ --rui-bg-main: #1f2937; /* gray-800 */
57
+ --rui-text-main: #f9fafb; /* gray-100 */
58
+ --rui-text-muted: #9ca3af; /* gray-400 */
59
+ --rui-border-color: #374151; /* gray-700 */
60
+
61
+ --rui-input-bg: #1f2937;
62
+ --rui-input-disabled-bg: #111827;
63
+
64
+ --rui-primary-bg: #3b82f6; /* blue-500 */
65
+ --rui-primary-hover: #2563eb; /* blue-600 */
66
+ --rui-primary-active: #1d4ed8;
67
+
68
+ --rui-secondary-bg: #1f2937;
69
+ --rui-secondary-hover: #374151;
70
+ --rui-secondary-text: #e5e7eb;
71
+ --rui-secondary-border: #4b5563;
72
+
73
+ --rui-hover-bg-soft: #374151; /* gray-700 */
74
+ --rui-rule-main-text: #f8fafc; /* slate-50 */
75
+ --rui-rule-exception-text: #fca5a5; /* red-300 */
76
+ --rui-rule-rdate-text: #6ee7b7; /* emerald-300 */
77
+ }
78
+ }
79
+
80
+ html.dark:not([data-rui-theme="light"]),
81
+ .dark:not([data-rui-theme="light"]),
82
+ [data-rui-theme="dark"] {
83
+ --rui-bg-main: #1f2937; /* gray-800 */
84
+ --rui-text-main: #f9fafb; /* gray-100 */
85
+ --rui-text-muted: #9ca3af; /* gray-400 */
86
+ --rui-border-color: #374151; /* gray-700 */
87
+
88
+ --rui-input-bg: #1f2937;
89
+ --rui-input-disabled-bg: #111827;
90
+
91
+ --rui-primary-bg: #3b82f6; /* blue-500 */
92
+ --rui-primary-hover: #2563eb; /* blue-600 */
93
+ --rui-primary-active: #1d4ed8;
94
+
95
+ --rui-secondary-bg: #1f2937;
96
+ --rui-secondary-hover: #374151;
97
+ --rui-secondary-text: #e5e7eb;
98
+ --rui-secondary-border: #4b5563;
99
+
100
+ --rui-hover-bg-soft: #374151; /* gray-700 */
101
+ --rui-rule-main-text: #f8fafc; /* slate-50 */
102
+ --rui-rule-exception-text: #fca5a5; /* red-300 */
103
+ --rui-rule-rdate-text: #6ee7b7; /* emerald-300 */
104
+
105
+ /* Chips */
106
+ --rui-chip-exdate-border: #fca5a5; /* red-300 */
107
+ --rui-chip-exdate-bg: #1f2937; /* red-50 */
108
+ --rui-chip-rdate-border: #6ee7b7; /* emerald-300 */
109
+ --rui-chip-rdate-bg: #1f2937; /* emerald-50 */
110
+
111
+
112
+ }
113
+
114
+ /* Forced Light Theme (Highest Priority) */
115
+ [data-rui-theme="light"] {
116
+ --rui-bg-main: #ffffff;
117
+ --rui-text-main: #111827;
118
+ --rui-text-muted: #6b7280;
119
+ --rui-border-color: #d1d5db;
120
+ --rui-input-bg: #ffffff;
121
+ --rui-input-disabled-bg: #f3f4f6;
122
+ --rui-primary-bg: #2563eb;
123
+ --rui-primary-hover: #1d4ed8;
124
+ --rui-primary-active: #1e40af;
125
+ --rui-primary-text: #ffffff;
126
+ --rui-secondary-bg: #f3f4f6;
127
+ --rui-secondary-hover: #e5e7eb;
128
+ --rui-secondary-text: #374151;
129
+ --rui-secondary-border: #d1d5db;
130
+ --rui-hover-bg-soft: #eff6ff;
131
+ --rui-rule-main-text: #1e293b;
132
+ --rui-rule-exception-text: #b91c1c;
133
+ --rui-rule-rdate-text: #047857;
134
+ --rui-error-text: #dc2626;
135
+ }
136
+
137
+
138
+ /* ==========================================================================
139
+ 2. Layout & Containers
140
+ ========================================================================== */
141
+
142
+ .rui-container {
143
+ background-color: var(--rui-bg-main);
144
+ color: var(--rui-text-main);
145
+ width: 100%;
146
+ display: flex;
147
+ flex-direction: column;
148
+ gap: 0.75rem;
149
+ padding: 1rem;
150
+ border-radius: var(--rui-radius-lg);
151
+ box-sizing: border-box;
152
+ }
153
+
154
+ .rui-grid-row {
155
+ display: flex;
156
+ flex-wrap: wrap;
157
+ gap: 1rem;
158
+ margin-top: 1rem;
159
+ margin-bottom: 1rem;
160
+ }
161
+
162
+ .rui-grid-col {
163
+ flex: 1 1 280px;
164
+ min-width: 280px;
165
+ padding: 0.5rem;
166
+ box-sizing: border-box;
167
+ }
168
+
169
+ .rui-grid-2 {
170
+ display: grid;
171
+ grid-template-columns: 1fr;
172
+ align-items: stretch;
173
+ }
174
+
175
+ @media (min-width: 900px) {
176
+ .rui-grid-2 {
177
+ grid-template-columns: repeat(2, minmax(0, 1fr));
178
+ }
179
+ }
180
+
181
+ .rui-duration-end-wrapper {
182
+ display: flex;
183
+ flex-wrap: wrap;
184
+ gap: 1rem;
185
+ margin-top: 1rem;
186
+ margin-bottom: 1rem;
187
+ }
188
+
189
+ .rui-edit-mode-container {
190
+ display: flex;
191
+ flex-direction: column;
192
+ gap: 0.75rem;
193
+ padding-top: 0.5rem;
194
+ }
195
+
196
+ .rui-visual-editor-stack {
197
+ display: flex;
198
+ flex-direction: column;
199
+ gap: 0.75rem;
200
+ }
201
+
202
+ .rui-display-mode-section {
203
+ display: flex;
204
+ flex-direction: column;
205
+ gap: 0.25rem;
206
+ }
207
+
208
+
209
+ /* ==========================================================================
210
+ 3. Typography & Headers
211
+ ========================================================================== */
212
+
213
+ .rui-label {
214
+ color: var(--rui-text-muted);
215
+ display: block;
216
+ font-weight: 600;
217
+ font-size: 1rem;
218
+ letter-spacing: 0.05em;
219
+ user-select: none;
220
+ }
221
+
222
+ .rui-header-title {
223
+ color: var(--rui-text-muted);
224
+ display: block;
225
+ font-weight: 600;
226
+ font-size: 0.8rem;
227
+ letter-spacing: 0.05em;
228
+ text-transform: uppercase;
229
+ user-select: none;
230
+ }
231
+
232
+ .rui-panel-header {
233
+ display: flex;
234
+ align-items: center;
235
+ justify-content: space-between;
236
+ }
237
+
238
+
239
+ /* ==========================================================================
240
+ 4. Form Controls & Inputs
241
+ ========================================================================== */
242
+
243
+ .rui-field-group {
244
+ display: flex;
245
+ flex-direction: column;
246
+ justify-content: space-between;
247
+ height: 100%;
248
+ box-sizing: border-box;
249
+ }
250
+
251
+ .rui-input,
252
+ .rui-select,
253
+ .rui-textarea {
254
+ background-color: var(--rui-input-bg);
255
+ color: var(--rui-text-main);
256
+ border: 1px solid var(--rui-border-color);
257
+ border-radius: var(--rui-radius);
258
+ font-size: 0.875rem;
259
+ height: 2.25rem;
260
+ padding: 0 0.625rem;
261
+ line-height: 1.25rem;
262
+ width: 100%;
263
+ box-sizing: border-box;
264
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
265
+ }
266
+
267
+ .rui-input-date,
268
+ .rui-input-time {
269
+ box-sizing: border-box;
270
+ }
271
+
272
+ .rui-input-date { width: 9rem; flex-shrink: 0; }
273
+ .rui-input-time { width: 6rem; flex-shrink: 0; }
274
+
275
+ .rui-input:focus,
276
+ .rui-select:focus,
277
+ .rui-textarea:focus {
278
+ outline: none;
279
+ border-color: var(--rui-primary-bg);
280
+ box-shadow: 0 0 0 1px var(--rui-primary-bg);
281
+ }
282
+
283
+ .rui-input:disabled,
284
+ .rui-select:disabled,
285
+ .rui-textarea:disabled {
286
+ background-color: var(--rui-input-disabled-bg);
287
+ opacity: 0.5;
288
+ cursor: not-allowed;
289
+ }
290
+
291
+ .rui-textarea {
292
+ font-family: monospace;
293
+ font-size: 0.75rem;
294
+ }
295
+
296
+ .rui-input-error {
297
+ border-color: var(--rui-error-text) !important;
298
+ box-shadow: 0 0 0 1px var(--rui-error-text) !important;
299
+ }
300
+
301
+ .rui-daily-input { width: 4rem; }
302
+
303
+ .rui-start-at-row,
304
+ .rui-end-at-row,
305
+ .rui-daily-row,
306
+ .rui-timezone-at-row
307
+ {
308
+ display: flex;
309
+ align-items: center;
310
+ gap: 0.5rem;
311
+ }
312
+
313
+ .rui-timezone-container {
314
+ display: flex;
315
+ flex-direction: column;
316
+ width: 100%;
317
+ }
318
+
319
+ .rui-timezone-select {
320
+ width: 100%;
321
+ cursor: pointer;
322
+ }
323
+
324
+ .rui-radio {
325
+ margin-top: 0.25rem;
326
+ flex-shrink: 0;
327
+ accent-color: var(--rui-primary-bg);
328
+ }
329
+
330
+
331
+ /* ==========================================================================
332
+ 5. Buttons & Actions
333
+ ========================================================================== */
334
+
335
+ .rui-btn-primary {
336
+ background-color: var(--rui-primary-bg);
337
+ color: var(--rui-primary-text);
338
+ border: none;
339
+ padding: 0.375rem 0.75rem;
340
+ font-size: 0.75rem;
341
+ font-weight: 500;
342
+ border-radius: var(--rui-radius);
343
+ cursor: pointer;
344
+ transition: background-color 0.15s ease;
345
+ }
346
+
347
+ .rui-btn-primary:hover:not(:disabled) {
348
+ background-color: var(--rui-primary-hover);
349
+ }
350
+
351
+ .rui-btn-secondary {
352
+ background-color: var(--rui-secondary-bg);
353
+ color: var(--rui-secondary-text);
354
+ border: 1px solid var(--rui-secondary-border);
355
+ padding: 0.375rem 0.75rem;
356
+ font-size: 0.75rem;
357
+ font-weight: 500;
358
+ border-radius: var(--rui-radius);
359
+ cursor: pointer;
360
+ transition: background-color 0.15s ease;
361
+ }
362
+
363
+ .rui-btn-secondary:hover:not(:disabled) {
364
+ background-color: var(--rui-secondary-hover);
365
+ }
366
+
367
+ .rui-link-action {
368
+ color: var(--rui-primary-bg);
369
+ background: none;
370
+ border: none;
371
+ cursor: pointer;
372
+ font-size: 0.75rem;
373
+ font-weight: 500;
374
+ padding: 0;
375
+ text-decoration: underline;
376
+ text-decoration-style: dashed;
377
+ text-underline-offset: 4px;
378
+ }
379
+
380
+ .rui-link-action:hover {
381
+ opacity: 0.8;
382
+ }
383
+
384
+ .rui-footer-actions {
385
+ display: flex;
386
+ justify-content: flex-end;
387
+ gap: 0.5rem;
388
+ padding-top: 0.75rem;
389
+ margin-top: 0.75rem;
390
+ }
391
+
392
+ /* Disabled button state styling */
393
+ .rui-btn-primary:disabled,
394
+ .rui-btn-secondary:disabled,
395
+ .rui-btn:disabled {
396
+ opacity: 0.5;
397
+ cursor: not-allowed;
398
+ pointer-events: none;
399
+ }
400
+
401
+ /* ==========================================================================
402
+ 6. Summary Component
403
+ ========================================================================== */
404
+
405
+ .rui-summary-wrapper {
406
+ cursor: pointer;
407
+ padding: 0.125rem 0;
408
+ }
409
+
410
+ .rui-summary-row {
411
+ display: flex;
412
+ align-items: center;
413
+ gap: 0.5rem;
414
+ }
415
+
416
+ .rui-summary-link {
417
+ color: var(--rui-text-main);
418
+ font-size: 0.875rem;
419
+ font-weight: 500;
420
+ text-decoration: underline;
421
+ text-decoration-style: dashed;
422
+ text-underline-offset: 4px;
423
+ text-decoration-color: var(--rui-border-color);
424
+ transition: color 0.15s ease;
425
+ }
426
+
427
+ .rui-summary-link:hover {
428
+ color: var(--rui-primary-bg);
429
+ text-decoration-color: var(--rui-primary-bg);
430
+ }
431
+
432
+ .rui-summary-icon {
433
+ color: var(--rui-text-muted);
434
+ display: flex;
435
+ align-items: center;
436
+ justify-content: center;
437
+ padding: 0.25rem;
438
+ border-radius: var(--rui-radius);
439
+ transition: color 0.15s ease, background-color 0.15s ease;
440
+ }
441
+
442
+ .rui-summary-wrapper:hover .rui-summary-icon {
443
+ color: var(--rui-text-main);
444
+ background-color: var(--rui-secondary-hover);
445
+ }
446
+ .rui-summary-link {
447
+ display: block;
448
+ text-decoration: none;
449
+ }
450
+
451
+ .rui-meta-info {
452
+ display: block;
453
+ margin-top: 0.25rem;
454
+ font-size: 0.875rem;
455
+ text-decoration: none;
456
+ transition: color 0.2s ease, text-decoration-color 0.2s ease;
457
+ }
458
+
459
+ .rui-meta-info:first-child {
460
+ margin-top: 0;
461
+ }
462
+
463
+ .rui-meta-info--main {
464
+ color: var(--rui-rule-main-text);
465
+ }
466
+
467
+ .rui-meta-info--exceptions {
468
+ color: var(--rui-rule-exception-text);
469
+ }
470
+
471
+ .rui-meta-info--rdates {
472
+ color: var(--rui-rule-rdate-text);
473
+ }
474
+
475
+ /* Кликабельный блок саммари: убираем лишнее подчёркивание с самой обёртки */
476
+ .rui-summary-link {
477
+ text-decoration: none;
478
+ cursor: pointer;
479
+ }
480
+
481
+ /* Подчёркиваем каждый элемент внутри кликабельного саммари своим цветом */
482
+ .rui-summary-link .rui-meta-info--main {
483
+ text-decoration: underline;
484
+ text-decoration-style: dashed;
485
+ text-underline-offset: 4px;
486
+ text-decoration-color: var(--rui-border-color);
487
+ }
488
+
489
+ .rui-summary-link .rui-meta-info--exceptions {
490
+ text-decoration: underline;
491
+ text-decoration-style: dashed;
492
+ text-underline-offset: 4px;
493
+ text-decoration-color: var(--rui-border-color);
494
+ }
495
+
496
+ .rui-summary-link .rui-meta-info--rdates {
497
+ text-decoration: underline;
498
+ text-decoration-style: dashed;
499
+ text-underline-offset: 4px;
500
+ text-decoration-color: var(--rui-border-color);
501
+ }
502
+
503
+ /* При наведении на кликабельное саммари */
504
+ .rui-summary-link:hover .rui-meta-info--main {
505
+ color: var(--rui-primary-bg);
506
+ text-decoration-color: var(--rui-primary-bg);
507
+ }
508
+
509
+ .rui-summary-link:hover .rui-meta-info--exceptions {
510
+ text-decoration-color: var(--rui-rule-exception-text);
511
+
512
+ }
513
+
514
+ .rui-summary-link:hover .rui-meta-info--rdates {
515
+ text-decoration-color: var(--rui-rule-rdate-text);
516
+ }
517
+ /* ==========================================================================
518
+ 7. Cards & Rule Containers
519
+ ========================================================================== */
520
+
521
+ .rui-card-group { width: 100%; }
522
+
523
+ .rui-card-container {
524
+ background-color: var(--rui-bg-main);
525
+ border: 1px solid var(--rui-border-color);
526
+ border-radius: var(--rui-radius-lg);
527
+ margin-bottom: 0.75rem;
528
+ overflow: hidden;
529
+ transition: border-color 0.15s ease;
530
+ }
531
+
532
+ .rui-card-header {
533
+ display: flex;
534
+ align-items: center;
535
+ justify-content: space-between;
536
+ padding: 0.75rem 1rem;
537
+ cursor: pointer;
538
+ background-color: var(--rui-secondary-bg);
539
+ transition: background-color 0.15s ease;
540
+ }
541
+
542
+ .rui-card-header:hover { background-color: var(--rui-secondary-hover); }
543
+
544
+ .rui-accordion-link {
545
+ color: var(--rui-text-main);
546
+ font-size: 0.875rem;
547
+ font-weight: 500;
548
+ text-decoration: underline;
549
+ text-decoration-style: dashed;
550
+ text-underline-offset: 4px;
551
+ }
552
+
553
+ .rui-card-body {
554
+ padding: 1rem;
555
+ display: flex;
556
+ flex-direction: column;
557
+ gap: 0.75rem;
558
+ border-top: 1px solid var(--rui-border-color);
559
+ }
560
+
561
+ .rui-card-footer { padding-top: 0.25rem; text-align: right; }
562
+
563
+ .rui-btn-remove-card {
564
+ background: transparent;
565
+ border: none;
566
+ color: var(--rui-text-muted);
567
+ cursor: pointer;
568
+ font-size: 1rem;
569
+ padding: 0.25rem 0.5rem;
570
+ border-radius: var(--rui-radius);
571
+ transition: color 0.15s ease, background-color 0.15s ease;
572
+ }
573
+
574
+ .rui-btn-remove-card:hover {
575
+ color: var(--rui-rule-exception-text);
576
+ background-color: var(--rui-secondary-hover);
577
+ }
578
+
579
+ .rui-card-option {
580
+ display: flex;
581
+ align-items: flex-start;
582
+ gap: 0.75rem;
583
+ padding: 0.5rem;
584
+ border-radius: var(--rui-radius-lg);
585
+ cursor: pointer;
586
+ transition: background-color 0.15s ease;
587
+ }
588
+
589
+ .rui-card-option:hover { background-color: var(--rui-hover-bg-soft); }
590
+
591
+ .rui-duration-card {
592
+ flex: 1;
593
+ min-width: 280px;
594
+ margin-top: 0.3rem;
595
+ }
596
+
597
+ .rui-single-option-block {
598
+ flex: 1;
599
+ min-width: 280px;
600
+ }
601
+
602
+ .rui-card-content {
603
+ flex: 1;
604
+ min-width: 0;
605
+ }
606
+
607
+ .rui-multiple-rules-wrapper {
608
+ display: flex;
609
+ flex-direction: column;
610
+ gap: 0.25rem;
611
+ }
612
+
613
+ .rui-rules-container {
614
+ display: flex;
615
+ flex-direction: column;
616
+ gap: 0.5rem;
617
+ }
618
+
619
+ .rui-add-rule-wrapper {
620
+ padding-top: 0.25rem;
621
+ }
622
+
623
+
624
+ /* ==========================================================================
625
+ 8. Recurrence Rule Builders (Weekly, Monthly, Yearly, Duration)
626
+ ========================================================================== */
627
+
628
+ /* Weekly Recurrence */
629
+ .rui-weekly-interval-row {
630
+ display: flex;
631
+ align-items: center;
632
+ gap: 0.5rem;
633
+ margin-bottom: 0.75rem;
634
+ }
635
+
636
+ .rui-weekly-interval-input { width: 4rem; text-align: center; }
637
+
638
+ .rui-weekly-grid {
639
+ display: grid;
640
+ grid-template-columns: repeat(7, minmax(0, 1fr));
641
+ gap: 0.25rem;
642
+ }
643
+
644
+ /* Day Toggle Button Component */
645
+ .rui-day-btn {
646
+ background-color: var(--rui-bg-main);
647
+ color: var(--rui-secondary-text);
648
+ border-color: var(--rui-border-color);
649
+ width: 100%;
650
+ padding-top: 0.375rem;
651
+ padding-bottom: 0.375rem;
652
+ border-radius: var(--rui-radius, 0.375rem);
653
+ font-size: 0.75rem;
654
+ font-weight: 500;
655
+ border-width: 1px;
656
+ border-style: solid;
657
+ transition: all 0.15s ease;
658
+ cursor: pointer;
659
+ display: inline-flex;
660
+ align-items: center;
661
+ justify-content: center;
662
+ box-sizing: border-box;
663
+ }
664
+
665
+ .rui-day-btn:hover {
666
+ background-color: var(--rui-hover-bg-soft);
667
+ color: var(--rui-text-main);
668
+ }
669
+
670
+ .rui-day-btn[data-selected='true'] {
671
+ background-color: var(--rui-primary-bg);
672
+ color: var(--rui-primary-text);
673
+ border-color: var(--rui-primary-bg);
674
+ }
675
+
676
+ /* Monthly Recurrence (By Day of Month) */
677
+ .rui-monthly-container {
678
+ display: flex;
679
+ flex-direction: column;
680
+ gap: 0.75rem;
681
+ }
682
+
683
+ .rui-monthly-interval-row {
684
+ display: flex;
685
+ align-items: center;
686
+ gap: 0.5rem;
687
+ }
688
+
689
+ .rui-monthly-interval-input {
690
+ width: 4rem;
691
+ text-align: center;
692
+ }
693
+
694
+ .rui-monthly-days-label {
695
+ margin-bottom: 0.5rem;
696
+ }
697
+
698
+ .rui-monthly-grid {
699
+ display: grid;
700
+ grid-template-columns: repeat(7, minmax(0, 1fr));
701
+ gap: 0.25rem;
702
+ }
703
+
704
+ /* Monthly & Yearly Recurrence (By Weekday / Nth Day) */
705
+ .rui-nth-container {
706
+ display: flex;
707
+ flex-direction: column;
708
+ gap: 0.5rem;
709
+ }
710
+
711
+ .rui-nth-row {
712
+ display: grid;
713
+ grid-template-columns: repeat(8, minmax(0, 1fr));
714
+ gap: 0.25rem;
715
+ align-items: center;
716
+ }
717
+
718
+ .rui-nth-label-col {
719
+ grid-column: span 1 / span 1;
720
+ text-align: right;
721
+ padding-right: 0.25rem;
722
+ }
723
+
724
+ .rui-nth-label {
725
+ font-size: 0.625rem;
726
+ font-weight: 700;
727
+ text-transform: uppercase;
728
+ margin-bottom: 0;
729
+ }
730
+
731
+ .rui-nth-grid {
732
+ grid-column: span 7 / span 7;
733
+ display: grid;
734
+ grid-template-columns: repeat(7, minmax(0, 1fr));
735
+ gap: 0.25rem;
736
+ }
737
+
738
+ /* Month Selector */
739
+ .rui-month-selector-row {
740
+ display: flex;
741
+ align-items: center;
742
+ gap: 0.75rem;
743
+ }
744
+
745
+ .rui-month-select {
746
+ width: 100%;
747
+ }
748
+
749
+ @media (min-width: 640px) {
750
+ .rui-month-select {
751
+ width: auto;
752
+ }
753
+ }
754
+
755
+ /* Duration Component */
756
+ .rui-duration-container {
757
+ display: flex;
758
+ flex-wrap: nowrap;
759
+ align-items: center;
760
+ gap: 0.5rem;
761
+ }
762
+
763
+ .rui-duration-field-group {
764
+ display: flex;
765
+ align-items: center;
766
+ gap: 0.25rem;
767
+ flex-shrink: 0;
768
+ }
769
+
770
+ .rui-duration-days-group,
771
+ .rui-duration-hours-group,
772
+ .rui-duration-minutes-group,
773
+ .rui-termination-count-input {
774
+ width: 5rem;
775
+ text-align: center;
776
+ }
777
+
778
+ .rui-duration-unit,
779
+ .rui-termination-times-label {
780
+ color: var(--rui-text-muted);
781
+ font-size: 0.75rem;
782
+ text-transform: uppercase;
783
+ font-weight: 600;
784
+ }
785
+
786
+ /* Termination Section */
787
+ .rui-termination-container { padding-top: 0.75rem; }
788
+ .rui-termination-label { margin-bottom: 0.5rem; }
789
+ .rui-termination-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
790
+ .rui-termination-select {
791
+ width: 14rem;
792
+ flex-grow: 0;
793
+ }.rui-termination-date { font-size: 0.75rem; }
794
+ .rui-termination-count-group { display: flex; align-items: center; gap: 0.5rem; }
795
+
796
+
797
+ /* ==========================================================================
798
+ 9. Exceptions & Rdates (Chips Component)
799
+ ========================================================================== */
800
+
801
+ .rui-exceptions-container,
802
+ .rui-rdates-container {
803
+ display: flex;
804
+ flex-direction: column;
805
+ gap: 0.375rem;
806
+ }
807
+
808
+ .rui-exceptions-label,
809
+ .rui-rdates-label {
810
+ display: flex;
811
+ align-items: center;
812
+ gap: 0.25rem;
813
+ }
814
+
815
+ .rui-chip-container {
816
+ display: flex;
817
+ flex-wrap: wrap;
818
+ gap: 0.25rem;
819
+ }
820
+
821
+ .rui-exceptions-input-group,
822
+ .rui-rdates-input-group {
823
+ display: flex;
824
+ align-items: center;
825
+ gap: 0.375rem;
826
+ }
827
+
828
+ .rui-exceptions-date-input,
829
+ .rui-rdates-date-input {
830
+ font-size: 0.75rem;
831
+ padding: 0.25rem 0.5rem;
832
+ }
833
+
834
+ .rui-exceptions-add-btn,
835
+ .rui-rdates-add-btn {
836
+ padding: 0.25rem 0.5rem;
837
+ font-size: 0.75rem;
838
+ font-weight: bold;
839
+ flex-shrink: 0;
840
+ }
841
+
842
+ .rui-chip {
843
+ display: inline-flex;
844
+ align-items: center;
845
+ gap: 0.25rem;
846
+ padding: 0.125rem 0.5rem;
847
+ border-radius: 0.375rem;
848
+ font-size: 0.75rem;
849
+ line-height: 1rem;
850
+ font-weight: 400;
851
+ }
852
+
853
+ .rui-chip--exdate {
854
+ border: 1px solid var(--rui-chip-exdate-border, #fecaca);
855
+ background-color: var(--rui-chip-exdate-bg, #fef2f2);
856
+ color: var(--rui-rule-exception-text);
857
+ }
858
+
859
+ .rui-chip--rdate {
860
+ border: 1px solid var(--rui-chip-rdate-border, #a7f3d0);
861
+ background-color: var(--rui-chip-rdate-bg, #ecfdf5);
862
+ color: var(--rui-rule-rdate-text);
863
+ }
864
+
865
+ .rui-chip__remove-btn {
866
+ background: transparent;
867
+ border: none;
868
+ cursor: pointer;
869
+ padding-right: 0.125rem;
870
+ color: inherit;
871
+ font-size: 0.875rem;
872
+ transition: opacity 150ms ease-in-out;
873
+ }
874
+
875
+ .rui-chip__remove-btn:hover { opacity: 0.75; }
876
+
877
+ /* ONE RULE MODE: Adjustments for compact layout */
878
+ .rui-single-rule-block {
879
+ display: flex;
880
+ flex-direction: column;
881
+ gap: 0.375rem;
882
+ }
883
+
884
+ .rui-single-rule-header {
885
+ display: flex;
886
+ align-items: center;
887
+ justify-content: space-between;
888
+ gap: 0.5rem;
889
+ flex-wrap: wrap;
890
+ }
891
+
892
+ .rui-single-rule-label {
893
+ margin-bottom: 0;
894
+ }
895
+
896
+ .rui-rule-preview-badge {
897
+ display: inline-flex;
898
+ align-items: center;
899
+ padding: 0.1875rem 0.5rem;
900
+ border-radius: var(--rui-radius);
901
+ background-color: var(--rui-secondary-bg);
902
+ border: 1px solid var(--rui-border-color);
903
+ color: var(--rui-primary-bg);
904
+ font-size: 0.75rem;
905
+ font-weight: 500;
906
+ line-height: 1.25rem;
907
+ max-width: 100%;
908
+ transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
909
+ }
910
+
911
+ /* ==========================================================================
912
+ 10. Utilities & Helpers
913
+ ========================================================================== */
914
+
915
+ .rui-hidden { display: none !important; }
916
+ .rui-w-full { width: 100%; }
917
+ .rui-select-none { user-select: none; }
918
+ .rui-nowrap { white-space: nowrap; }
919
+ .rui-font-bold { font-weight: bold; }
920
+ .rui-pt-2 { padding-top: 0.5rem; }
921
+
922
+ .rui-divider {
923
+ border-top: 1px solid var(--rui-border-color);
924
+ margin-top: 0.5rem;
925
+ margin-bottom: 0.5rem;
926
+ }
927
+
928
+ .rui-code-textarea {
929
+ font-family: monospace;
930
+ font-size: 0.75rem;
931
+ width: 100%;
932
+ }
933
+
934
+ .rui-flex-between {
935
+ display: flex;
936
+ align-items: center;
937
+ justify-content: space-between;
938
+ }
939
+
940
+ .rui-flex-end-gap {
941
+ display: flex;
942
+ align-items: center;
943
+ justify-content: flex-end;
944
+ gap: 0.5rem;
945
+ }
946
+
947
+ .rui-code-btn {
948
+ font-family: monospace;
949
+ font-size: 0.75rem;
950
+ padding: 0.25rem 0.5rem;
951
+ }
952
+
953
+ .rui-block-label {
954
+ display: block;
955
+ margin-bottom: 0.25rem;
956
+ }
957
+
958
+ .rui-subcontent-spacing {
959
+ margin-top: 0.25rem;
960
+ }
961
+
962
+ .rui-radio-spacing {
963
+ margin-top: 0.25rem;
964
+ flex-shrink: 0;
965
+ }