@usefillo/react 0.5.3 → 0.6.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.
package/dist/styles.css CHANGED
@@ -5,6 +5,9 @@
5
5
  * style from scratch.
6
6
  */
7
7
 
8
+ /* Specificity contract: every rule stays at single-class specificity —
9
+ * qualifiers are wrapped in :where() so one consumer class always wins.
10
+ * A lint test (packages/react/test) fails the build on regressions. */
8
11
  /* Cascade layers: these defaults live in the `components` layer so that, in
9
12
  * apps using Tailwind (or any utility CSS in the `utilities` layer), YOUR
10
13
  * classes always win over ours — className="bg-red-50" on an option just
@@ -100,7 +103,7 @@
100
103
  border-color: var(--fillo-primary);
101
104
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fillo-primary) 15%, transparent);
102
105
  }
103
- .fillo-field--error .fillo-input { border-color: var(--fillo-error); }
106
+ :where(.fillo-field--error) .fillo-input { border-color: var(--fillo-error); }
104
107
  .fillo-textarea { resize: vertical; min-height: 6rem; }
105
108
 
106
109
  /* Phone field: country picker + national input */
@@ -123,15 +126,21 @@
123
126
  .fillo-phone-dial { font-variant-numeric: tabular-nums; color: var(--fillo-muted); }
124
127
  .fillo-phone-caret { font-size: 0.65em; color: var(--fillo-muted); }
125
128
  .fillo-phone-input { flex: 1 1 auto; min-width: 0; }
126
- .fillo-field--error .fillo-phone-flag { border-color: var(--fillo-error); }
129
+ :where(.fillo-field--error) .fillo-phone-flag { border-color: var(--fillo-error); }
127
130
  .fillo-phone-popover {
128
131
  position: absolute; z-index: 30; top: calc(100% + 0.3rem); left: 0;
129
- width: 18rem; max-width: 84vw; padding: 0.4rem;
132
+ width: min(18rem, calc(100vw - 1rem));
133
+ max-width: var(--fillo-phone-popover-max-width, 84vw);
134
+ max-height: min(var(--fillo-phone-popover-max-height, 20rem), calc(100vh - 1rem));
135
+ padding: 0.4rem;
136
+ box-sizing: border-box; overflow: hidden;
137
+ transform: translateX(var(--fillo-phone-popover-offset-x, 0px));
130
138
  display: flex; flex-direction: column; gap: 0.35rem;
131
139
  background: var(--fillo-control-bg);
132
140
  border: 1px solid var(--fillo-border); border-radius: var(--fillo-radius);
133
141
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.35);
134
142
  }
143
+ .fillo-phone-popover--above { top: auto; bottom: calc(100% + 0.3rem); }
135
144
  .fillo-phone-search {
136
145
  appearance: none; font: inherit; width: 100%; box-sizing: border-box;
137
146
  color: var(--fillo-text); background: var(--fillo-bg);
@@ -139,7 +148,10 @@
139
148
  border-radius: calc(var(--fillo-radius) - 3px); padding: 0.45rem 0.6rem;
140
149
  }
141
150
  .fillo-phone-search:focus-visible { outline: none; border-color: var(--fillo-primary); }
142
- .fillo-phone-list { list-style: none; margin: 0; padding: 0; max-height: 14rem; overflow-y: auto; }
151
+ .fillo-phone-list {
152
+ flex: 1 1 auto; min-height: 0;
153
+ list-style: none; margin: 0; padding: 0; max-height: 14rem; overflow-y: auto;
154
+ }
143
155
  .fillo-phone-option {
144
156
  display: flex; align-items: center; gap: 0.5rem;
145
157
  padding: 0.45rem 0.5rem; border-radius: calc(var(--fillo-radius) - 3px);
@@ -170,7 +182,7 @@
170
182
  transform: translateY(-65%) rotate(45deg);
171
183
  transition: color 120ms ease;
172
184
  }
173
- .fillo-select-wrap:focus-within .fillo-select-icon { color: var(--fillo-primary); }
185
+ :where(.fillo-select-wrap:focus-within) .fillo-select-icon { color: var(--fillo-primary); }
174
186
 
175
187
  /* ---------- Choices ---------- */
176
188
  .fillo-options { display: flex; flex-direction: column; gap: 0.5rem; }
@@ -203,7 +215,7 @@
203
215
  margin: 0;
204
216
  }
205
217
  .fillo-option-input:focus-visible { outline: none; }
206
- .fillo-option--has-icon .fillo-option-input {
218
+ :where(.fillo-option--has-icon) .fillo-option-input {
207
219
  position: absolute;
208
220
  width: 1px;
209
221
  height: 1px;
@@ -218,7 +230,7 @@
218
230
  color: var(--fillo-muted);
219
231
  transition: color 120ms ease;
220
232
  }
221
- .fillo-option--selected .fillo-option-icon { color: var(--fillo-primary); }
233
+ :where(.fillo-option--selected) .fillo-option-icon { color: var(--fillo-primary); }
222
234
  .fillo-option-label { font-size: 0.95rem; }
223
235
 
224
236
  .fillo-option-main {
@@ -232,7 +244,7 @@
232
244
  flex-direction: column;
233
245
  gap: 0.55rem;
234
246
  }
235
- .fillo-option--with-other .fillo-option-label {
247
+ :where(.fillo-option--with-other) .fillo-option-label {
236
248
  font-weight: 550;
237
249
  }
238
250
 
@@ -282,20 +294,20 @@
282
294
  box-shadow: 0 1px 2px color-mix(in srgb, var(--fillo-text) 18%, transparent);
283
295
  transition: transform 160ms ease, background 160ms ease;
284
296
  }
285
- .fillo-toggle-input:checked + .fillo-toggle-track {
297
+ :where(.fillo-toggle-input:checked) + .fillo-toggle-track {
286
298
  background: var(--fillo-primary);
287
299
  box-shadow: inset 0 0 0 1px var(--fillo-primary);
288
300
  }
289
- .fillo-toggle-input:checked + .fillo-toggle-track .fillo-toggle-thumb {
301
+ :where(.fillo-toggle-input:checked) + :where(.fillo-toggle-track) .fillo-toggle-thumb {
290
302
  transform: translateX(1rem);
291
303
  background: var(--fillo-primary-contrast);
292
304
  }
293
- .fillo-toggle-input:focus-visible + .fillo-toggle-track {
305
+ :where(.fillo-toggle-input:focus-visible) + .fillo-toggle-track {
294
306
  box-shadow:
295
307
  inset 0 0 0 1px var(--fillo-primary),
296
308
  0 0 0 3px color-mix(in srgb, var(--fillo-primary) 15%, transparent);
297
309
  }
298
- .fillo-toggle:has(.fillo-toggle-input:checked) {
310
+ .fillo-toggle:where(:has(.fillo-toggle-input:checked)) {
299
311
  border-color: var(--fillo-primary);
300
312
  background: color-mix(in srgb, var(--fillo-primary) 5%, var(--fillo-control-bg));
301
313
  }
@@ -412,7 +424,7 @@
412
424
  /* ---------- Matrix ---------- */
413
425
  .fillo-matrix-wrap { overflow-x: auto; }
414
426
  .fillo-matrix { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
415
- .fillo-matrix th, .fillo-matrix td {
427
+ :where(.fillo-matrix) th, :where(.fillo-matrix) td {
416
428
  padding: 0.55rem 0.7rem;
417
429
  text-align: center;
418
430
  border-bottom: 1px solid var(--fillo-border);
@@ -571,6 +583,7 @@
571
583
  overflow: hidden;
572
584
  }
573
585
  .fillo-progress-fill {
586
+ width: var(--fillo-progress-value, 0%);
574
587
  height: 100%;
575
588
  background: var(--fillo-primary);
576
589
  border-radius: inherit;