@reliability-design/web 1.2.0 → 1.3.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.
@@ -1,349 +1,349 @@
1
- /*
2
- * rel-range-picker.css
3
- * Companion stylesheet for <rel-range-picker>.
4
- * All tokens reference vars-v2.css.
5
- */
6
-
7
- /* ── Host ── */
8
-
9
- :host {
10
- display: inline-block;
11
- font-family: var(--rel-fontFamilies-primary, Poppins, sans-serif);
12
- position: relative;
13
- }
14
-
15
- :host([disabled]) {
16
- opacity: 0.6;
17
- cursor: not-allowed;
18
- }
19
-
20
- :host([disabled]) * {
21
- pointer-events: none;
22
- }
23
-
24
- /* ── Trigger button ── */
25
-
26
- .trigger-button {
27
- display: flex;
28
- align-items: center;
29
- justify-content: space-between;
30
- gap: var(--rel-spacing-space-xs, 8px);
31
- padding: var(--rel-spacing-space-sm, 12px) var(--rel-spacing-space-md, 16px);
32
- background: var(--rel-color-bg-primary, #fff);
33
- border: 1px solid var(--rel-color-border-default, #ddd);
34
- border-radius: var(--rel-borders-radius-border-radius-200, 8px);
35
- font-family: var(--rel-fontFamilies-primary, Poppins, sans-serif);
36
- font-size: var(--rel-fontSizes-md, 14px);
37
- color: var(--rel-color-text-primary, #333);
38
- cursor: pointer;
39
- transition: border-color 0.15s ease;
40
- text-align: left;
41
- min-width: 260px;
42
- width: 100%;
43
- }
44
-
45
- .trigger-button:hover:not(:disabled) {
46
- border-color: var(--rel-color-border-strong, #999);
47
- }
48
-
49
- .trigger-button:focus-visible {
50
- outline: 2px solid var(--rel-color-border-focus, #0091ea);
51
- outline-offset: 2px;
52
- border-color: var(--rel-color-border-focus, #0091ea);
53
- }
54
-
55
- .trigger-button:disabled {
56
- cursor: not-allowed;
57
- }
58
-
59
- .trigger-content {
60
- flex: 1;
61
- color: var(--rel-color-text-primary, #333);
62
- }
63
-
64
- .trigger-content.placeholder {
65
- color: var(--rel-color-text-placeholder, #a9a9a9);
66
- }
67
-
68
- /* ── Popover ── */
69
-
70
- .popover {
71
- position: absolute;
72
- top: calc(100% + 4px);
73
- left: 0;
74
- z-index: 1000;
75
- border: 1px solid var(--rel-color-border-default, #ddd);
76
- border-radius: var(--rel-borders-radius-border-radius-200, 8px);
77
- background: var(--rel-color-bg-primary, #fff);
78
- box-shadow: var(--rel-shadows-shadow-200);
79
- overflow: hidden;
80
- display: none;
81
- }
82
-
83
- .popover.open {
84
- display: block;
85
- }
86
-
87
- /* ── Two-panel wrapper ── */
88
-
89
- .picker-wrapper {
90
- display: flex;
91
- flex-direction: row;
92
- align-items: stretch;
93
- min-width: 530px;
94
- }
95
-
96
- /* ── Left panel — Presets + date inputs ── */
97
-
98
- .presets {
99
- width: 225px;
100
- flex-shrink: 0;
101
- border-right: 1px solid var(--rel-color-border-default, #ddd);
102
- padding: 12px;
103
- display: flex;
104
- flex-direction: column;
105
- gap: var(--rel-spacing-space-2xs, 4px);
106
- }
107
-
108
- .preset-item {
109
- display: flex;
110
- align-items: center;
111
- justify-content: space-between;
112
- padding: var(--rel-spacing-space-xs, 8px) var(--rel-spacing-space-sm, 12px);
113
- cursor: pointer;
114
- font-size: 15px;
115
- font-weight: var(--rel-fontWeights-semibold, 600);
116
- color: var(--rel-color-text-primary, #333);
117
- background: none;
118
- border: none;
119
- font-family: var(--rel-fontFamilies-primary, Poppins, sans-serif);
120
- width: 100%;
121
- gap: var(--rel-spacing-space-xs, 8px);
122
- border-radius: var(--rel-borders-radius-border-radius-200, 8px);
123
- transition: background 0.15s ease;
124
- }
125
-
126
- .preset-item:hover {
127
- background: var(--rel-color-bg-hover, #f5f5f5);
128
- }
129
-
130
- /* ── Right panel — Calendar ── */
131
-
132
- .calendar-panel {
133
- flex: 1;
134
- min-width: 0;
135
- padding: 12px;
136
- display: flex;
137
- flex-direction: column;
138
- gap: 6px;
139
- }
140
-
141
- .calendar-header {
142
- display: flex;
143
- align-items: center;
144
- justify-content: space-between;
145
- padding: 0 var(--rel-spacing-space-xs, 8px);
146
- }
147
-
148
- .month-label {
149
- font-size: 15px;
150
- font-weight: var(--rel-fontWeights-semibold, 600);
151
- color: var(--rel-color-text-heading, #2b2b2b);
152
- }
153
-
154
- .nav-buttons {
155
- display: flex;
156
- align-items: center;
157
- gap: var(--rel-spacing-space-2xs, 4px);
158
- }
159
-
160
- .nav-btn {
161
- background: none;
162
- border: none;
163
- cursor: pointer;
164
- color: var(--rel-color-text-primary, #333);
165
- padding: var(--rel-spacing-space-2xs, 4px);
166
- border-radius: var(--rel-borders-radius-border-radius-200, 8px);
167
- display: flex;
168
- align-items: center;
169
- transition: background 0.15s ease;
170
- }
171
-
172
- .nav-btn:hover {
173
- background: var(--rel-color-bg-hover, #f5f5f5);
174
- }
175
-
176
- .nav-btn:focus-visible {
177
- outline: 2px solid var(--rel-color-border-focus, #0091ea);
178
- outline-offset: 2px;
179
- }
180
-
181
- /* ── Week header row ── */
182
-
183
- .week-header {
184
- display: grid;
185
- grid-template-columns: repeat(7, 1fr);
186
- text-align: center;
187
- }
188
-
189
- .week-day {
190
- font-size: var(--rel-fontSizes-sm, 12px);
191
- font-weight: var(--rel-fontWeights-semibold, 600);
192
- color: var(--rel-color-text-secondary, #9e9e9e);
193
- padding: 2px 0;
194
- text-align: center;
195
- }
196
-
197
- /* ── Calendar grid — day cells only ── */
198
-
199
- .calendar-grid {
200
- display: grid;
201
- grid-template-columns: repeat(7, 1fr);
202
- gap: 0;
203
- width: 100%;
204
- }
205
-
206
- /* ── Day cell ── */
207
-
208
- .day-cell {
209
- height: 32px;
210
- position: relative;
211
- display: flex;
212
- align-items: center;
213
- justify-content: center;
214
- cursor: pointer;
215
- }
216
-
217
- .day-cell.other-month {
218
- opacity: 0.35;
219
- pointer-events: none;
220
- }
221
-
222
- .day-cell.disabled {
223
- opacity: 0.4;
224
- pointer-events: none;
225
- cursor: not-allowed;
226
- }
227
-
228
- .day-cell.in-range {
229
- background: var(--rel-color-bg-selected, #eeeeee);
230
- }
231
-
232
- .day-cell.range-start:not(.range-end) {
233
- background: linear-gradient(
234
- to right,
235
- transparent 50%,
236
- var(--rel-color-bg-selected, #eeeeee) 50%
237
- );
238
- }
239
-
240
- .day-cell.range-end:not(.range-start) {
241
- background: linear-gradient(
242
- to left,
243
- transparent 50%,
244
- var(--rel-color-bg-selected, #eeeeee) 50%
245
- );
246
- }
247
-
248
- .day-cell.range-start.range-end {
249
- background: transparent;
250
- }
251
-
252
- /* ── Day inner — 28 × 28 circle ── */
253
-
254
- .day-inner {
255
- width: 28px;
256
- height: 28px;
257
- display: flex;
258
- align-items: center;
259
- justify-content: center;
260
- border-radius: 50%;
261
- font-size: 13px;
262
- font-weight: var(--rel-fontWeights-medium, 500);
263
- font-family: var(--rel-fontFamilies-primary, Poppins, sans-serif);
264
- color: var(--rel-color-text-primary, #333);
265
- cursor: pointer;
266
- position: relative;
267
- z-index: 1;
268
- transition: background 0.15s ease, border 0.15s ease, color 0.15s ease;
269
- line-height: 1;
270
- }
271
-
272
- .day-cell:not(.disabled):not(.other-month):not(.range-start):not(.range-end):hover .day-inner {
273
- background: var(--rel-color-bg-hover, #f5f5f5);
274
- }
275
-
276
- .day-cell.today:not(.range-start):not(.range-end) .day-inner {
277
- border: 2px solid var(--rel-colors-green-primary, #00f49c);
278
- }
279
-
280
- .day-cell.range-start .day-inner,
281
- .day-cell.range-end .day-inner {
282
- background: var(--rel-color-text-primary, #333333);
283
- color: var(--rel-color-bg-primary, #ffffff);
284
- font-weight: var(--rel-fontWeights-semibold, 600);
285
- }
286
-
287
- .day-cell.range-start:not(.disabled):hover .day-inner,
288
- .day-cell.range-end:not(.disabled):hover .day-inner {
289
- background: var(--rel-color-text-heading, #2b2b2b);
290
- }
291
-
292
- .day-cell.disabled .day-inner {
293
- cursor: not-allowed;
294
- }
295
-
296
- /* ── From / To display inputs (lives in left panel) ── */
297
-
298
- .date-inputs {
299
- display: flex;
300
- gap: 6px;
301
- padding-top: 10px;
302
- border-top: 1px solid var(--rel-color-border-default, #ddd);
303
- margin-top: auto;
304
- }
305
-
306
- .date-input-group {
307
- flex: 1;
308
- display: flex;
309
- flex-direction: column;
310
- gap: 2px;
311
- min-width: 0;
312
- }
313
-
314
- .date-input-label {
315
- font-size: 11px;
316
- font-weight: var(--rel-fontWeights-medium, 500);
317
- color: var(--rel-color-text-secondary, #9e9e9e);
318
- text-transform: uppercase;
319
- letter-spacing: 0.3px;
320
- }
321
-
322
- .date-input-value {
323
- border: 1px solid var(--rel-color-border-default, #ddd);
324
- border-radius: var(--rel-borders-radius-border-radius-100, 4px);
325
- padding: 3px 5px;
326
- font-size: var(--rel-fontSizes-sm, 12px);
327
- font-weight: var(--rel-fontWeights-semibold, 600);
328
- font-family: var(--rel-fontFamilies-primary, Poppins, sans-serif);
329
- color: var(--rel-color-text-primary, #333);
330
- background: var(--rel-color-bg-primary, #fff);
331
- white-space: nowrap;
332
- overflow: hidden;
333
- text-overflow: ellipsis;
334
- }
335
-
336
- .date-input-value.empty {
337
- color: var(--rel-color-text-placeholder, #a9a9a9);
338
- }
339
-
340
- /* ── Motion ── */
341
-
342
- @media (prefers-reduced-motion: reduce) {
343
- .trigger-button,
344
- .preset-item,
345
- .nav-btn,
346
- .day-inner {
347
- transition: none;
348
- }
349
- }
1
+ /*
2
+ * rel-range-picker.css
3
+ * Companion stylesheet for <rel-range-picker>.
4
+ * All tokens reference vars-v2.css.
5
+ */
6
+
7
+ /* ── Host ── */
8
+
9
+ :host {
10
+ display: inline-block;
11
+ font-family: var(--rel-fontFamilies-primary, Poppins, sans-serif);
12
+ position: relative;
13
+ }
14
+
15
+ :host([disabled]) {
16
+ opacity: 0.6;
17
+ cursor: not-allowed;
18
+ }
19
+
20
+ :host([disabled]) * {
21
+ pointer-events: none;
22
+ }
23
+
24
+ /* ── Trigger button ── */
25
+
26
+ .trigger-button {
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: space-between;
30
+ gap: var(--rel-spacing-space-xs, 8px);
31
+ padding: var(--rel-spacing-space-sm, 12px) var(--rel-spacing-space-md, 16px);
32
+ background: var(--rel-color-bg-primary, #fff);
33
+ border: 1px solid var(--rel-color-border-default, #ddd);
34
+ border-radius: var(--rel-borders-radius-border-radius-200, 8px);
35
+ font-family: var(--rel-fontFamilies-primary, Poppins, sans-serif);
36
+ font-size: var(--rel-fontSizes-md, 14px);
37
+ color: var(--rel-color-text-primary, #333);
38
+ cursor: pointer;
39
+ transition: border-color 0.15s ease;
40
+ text-align: left;
41
+ min-width: 260px;
42
+ width: 100%;
43
+ }
44
+
45
+ .trigger-button:hover:not(:disabled) {
46
+ border-color: var(--rel-color-border-strong, #999);
47
+ }
48
+
49
+ .trigger-button:focus-visible {
50
+ outline: 2px solid var(--rel-color-border-focus, #0091ea);
51
+ outline-offset: 2px;
52
+ border-color: var(--rel-color-border-focus, #0091ea);
53
+ }
54
+
55
+ .trigger-button:disabled {
56
+ cursor: not-allowed;
57
+ }
58
+
59
+ .trigger-content {
60
+ flex: 1;
61
+ color: var(--rel-color-text-primary, #333);
62
+ }
63
+
64
+ .trigger-content.placeholder {
65
+ color: var(--rel-color-text-placeholder, #a9a9a9);
66
+ }
67
+
68
+ /* ── Popover ── */
69
+
70
+ .popover {
71
+ position: absolute;
72
+ top: calc(100% + 4px);
73
+ left: 0;
74
+ z-index: 1000;
75
+ border: 1px solid var(--rel-color-border-default, #ddd);
76
+ border-radius: var(--rel-borders-radius-border-radius-200, 8px);
77
+ background: var(--rel-color-bg-primary, #fff);
78
+ box-shadow: var(--rel-shadows-shadow-200);
79
+ overflow: hidden;
80
+ display: none;
81
+ }
82
+
83
+ .popover.open {
84
+ display: block;
85
+ }
86
+
87
+ /* ── Two-panel wrapper ── */
88
+
89
+ .picker-wrapper {
90
+ display: flex;
91
+ flex-direction: row;
92
+ align-items: stretch;
93
+ min-width: 530px;
94
+ }
95
+
96
+ /* ── Left panel — Presets + date inputs ── */
97
+
98
+ .presets {
99
+ width: 225px;
100
+ flex-shrink: 0;
101
+ border-right: 1px solid var(--rel-color-border-default, #ddd);
102
+ padding: 12px;
103
+ display: flex;
104
+ flex-direction: column;
105
+ gap: var(--rel-spacing-space-2xs, 4px);
106
+ }
107
+
108
+ .preset-item {
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: space-between;
112
+ padding: var(--rel-spacing-space-xs, 8px) var(--rel-spacing-space-sm, 12px);
113
+ cursor: pointer;
114
+ font-size: 15px;
115
+ font-weight: var(--rel-fontWeights-semibold, 600);
116
+ color: var(--rel-color-text-primary, #333);
117
+ background: none;
118
+ border: none;
119
+ font-family: var(--rel-fontFamilies-primary, Poppins, sans-serif);
120
+ width: 100%;
121
+ gap: var(--rel-spacing-space-xs, 8px);
122
+ border-radius: var(--rel-borders-radius-border-radius-200, 8px);
123
+ transition: background 0.15s ease;
124
+ }
125
+
126
+ .preset-item:hover {
127
+ background: var(--rel-color-bg-hover, #f5f5f5);
128
+ }
129
+
130
+ /* ── Right panel — Calendar ── */
131
+
132
+ .calendar-panel {
133
+ flex: 1;
134
+ min-width: 0;
135
+ padding: 12px;
136
+ display: flex;
137
+ flex-direction: column;
138
+ gap: 6px;
139
+ }
140
+
141
+ .calendar-header {
142
+ display: flex;
143
+ align-items: center;
144
+ justify-content: space-between;
145
+ padding: 0 var(--rel-spacing-space-xs, 8px);
146
+ }
147
+
148
+ .month-label {
149
+ font-size: 15px;
150
+ font-weight: var(--rel-fontWeights-semibold, 600);
151
+ color: var(--rel-color-text-heading, #2b2b2b);
152
+ }
153
+
154
+ .nav-buttons {
155
+ display: flex;
156
+ align-items: center;
157
+ gap: var(--rel-spacing-space-2xs, 4px);
158
+ }
159
+
160
+ .nav-btn {
161
+ background: none;
162
+ border: none;
163
+ cursor: pointer;
164
+ color: var(--rel-color-text-primary, #333);
165
+ padding: var(--rel-spacing-space-2xs, 4px);
166
+ border-radius: var(--rel-borders-radius-border-radius-200, 8px);
167
+ display: flex;
168
+ align-items: center;
169
+ transition: background 0.15s ease;
170
+ }
171
+
172
+ .nav-btn:hover {
173
+ background: var(--rel-color-bg-hover, #f5f5f5);
174
+ }
175
+
176
+ .nav-btn:focus-visible {
177
+ outline: 2px solid var(--rel-color-border-focus, #0091ea);
178
+ outline-offset: 2px;
179
+ }
180
+
181
+ /* ── Week header row ── */
182
+
183
+ .week-header {
184
+ display: grid;
185
+ grid-template-columns: repeat(7, 1fr);
186
+ text-align: center;
187
+ }
188
+
189
+ .week-day {
190
+ font-size: var(--rel-fontSizes-sm, 12px);
191
+ font-weight: var(--rel-fontWeights-semibold, 600);
192
+ color: var(--rel-color-text-secondary, #9e9e9e);
193
+ padding: 2px 0;
194
+ text-align: center;
195
+ }
196
+
197
+ /* ── Calendar grid — day cells only ── */
198
+
199
+ .calendar-grid {
200
+ display: grid;
201
+ grid-template-columns: repeat(7, 1fr);
202
+ gap: 0;
203
+ width: 100%;
204
+ }
205
+
206
+ /* ── Day cell ── */
207
+
208
+ .day-cell {
209
+ height: 32px;
210
+ position: relative;
211
+ display: flex;
212
+ align-items: center;
213
+ justify-content: center;
214
+ cursor: pointer;
215
+ }
216
+
217
+ .day-cell.other-month {
218
+ opacity: 0.35;
219
+ pointer-events: none;
220
+ }
221
+
222
+ .day-cell.disabled {
223
+ opacity: 0.4;
224
+ pointer-events: none;
225
+ cursor: not-allowed;
226
+ }
227
+
228
+ .day-cell.in-range {
229
+ background: var(--rel-color-bg-selected, #eeeeee);
230
+ }
231
+
232
+ .day-cell.range-start:not(.range-end) {
233
+ background: linear-gradient(
234
+ to right,
235
+ transparent 50%,
236
+ var(--rel-color-bg-selected, #eeeeee) 50%
237
+ );
238
+ }
239
+
240
+ .day-cell.range-end:not(.range-start) {
241
+ background: linear-gradient(
242
+ to left,
243
+ transparent 50%,
244
+ var(--rel-color-bg-selected, #eeeeee) 50%
245
+ );
246
+ }
247
+
248
+ .day-cell.range-start.range-end {
249
+ background: transparent;
250
+ }
251
+
252
+ /* ── Day inner — 28 × 28 circle ── */
253
+
254
+ .day-inner {
255
+ width: 28px;
256
+ height: 28px;
257
+ display: flex;
258
+ align-items: center;
259
+ justify-content: center;
260
+ border-radius: 50%;
261
+ font-size: 13px;
262
+ font-weight: var(--rel-fontWeights-medium, 500);
263
+ font-family: var(--rel-fontFamilies-primary, Poppins, sans-serif);
264
+ color: var(--rel-color-text-primary, #333);
265
+ cursor: pointer;
266
+ position: relative;
267
+ z-index: 1;
268
+ transition: background 0.15s ease, border 0.15s ease, color 0.15s ease;
269
+ line-height: 1;
270
+ }
271
+
272
+ .day-cell:not(.disabled):not(.other-month):not(.range-start):not(.range-end):hover .day-inner {
273
+ background: var(--rel-color-bg-hover, #f5f5f5);
274
+ }
275
+
276
+ .day-cell.today:not(.range-start):not(.range-end) .day-inner {
277
+ border: 2px solid var(--rel-colors-green-primary, #00f49c);
278
+ }
279
+
280
+ .day-cell.range-start .day-inner,
281
+ .day-cell.range-end .day-inner {
282
+ background: var(--rel-color-text-primary, #333333);
283
+ color: var(--rel-color-bg-primary, #ffffff);
284
+ font-weight: var(--rel-fontWeights-semibold, 600);
285
+ }
286
+
287
+ .day-cell.range-start:not(.disabled):hover .day-inner,
288
+ .day-cell.range-end:not(.disabled):hover .day-inner {
289
+ background: var(--rel-color-text-heading, #2b2b2b);
290
+ }
291
+
292
+ .day-cell.disabled .day-inner {
293
+ cursor: not-allowed;
294
+ }
295
+
296
+ /* ── From / To display inputs (lives in left panel) ── */
297
+
298
+ .date-inputs {
299
+ display: flex;
300
+ gap: 6px;
301
+ padding-top: 10px;
302
+ border-top: 1px solid var(--rel-color-border-default, #ddd);
303
+ margin-top: auto;
304
+ }
305
+
306
+ .date-input-group {
307
+ flex: 1;
308
+ display: flex;
309
+ flex-direction: column;
310
+ gap: 2px;
311
+ min-width: 0;
312
+ }
313
+
314
+ .date-input-label {
315
+ font-size: 11px;
316
+ font-weight: var(--rel-fontWeights-medium, 500);
317
+ color: var(--rel-color-text-secondary, #9e9e9e);
318
+ text-transform: uppercase;
319
+ letter-spacing: 0.3px;
320
+ }
321
+
322
+ .date-input-value {
323
+ border: 1px solid var(--rel-color-border-default, #ddd);
324
+ border-radius: var(--rel-borders-radius-border-radius-100, 4px);
325
+ padding: 3px 5px;
326
+ font-size: var(--rel-fontSizes-sm, 12px);
327
+ font-weight: var(--rel-fontWeights-semibold, 600);
328
+ font-family: var(--rel-fontFamilies-primary, Poppins, sans-serif);
329
+ color: var(--rel-color-text-primary, #333);
330
+ background: var(--rel-color-bg-primary, #fff);
331
+ white-space: nowrap;
332
+ overflow: hidden;
333
+ text-overflow: ellipsis;
334
+ }
335
+
336
+ .date-input-value.empty {
337
+ color: var(--rel-color-text-placeholder, #a9a9a9);
338
+ }
339
+
340
+ /* ── Motion ── */
341
+
342
+ @media (prefers-reduced-motion: reduce) {
343
+ .trigger-button,
344
+ .preset-item,
345
+ .nav-btn,
346
+ .day-inner {
347
+ transition: none;
348
+ }
349
+ }