@usefillo/dom 0.24.0 → 0.25.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/index.js +12 -15
- package/dist/standalone.global.js +1 -1
- package/dist/styles.css +72 -15
- package/dist/styles.unlayered.css +72 -15
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -43,6 +43,12 @@
|
|
|
43
43
|
--fillo-font-size: 1em;
|
|
44
44
|
--fillo-control-bg: #ffffff;
|
|
45
45
|
--fillo-control-bg: light-dark(#ffffff, #18181b);
|
|
46
|
+
/* Text-entry outlines (inputs, selects, phone): a mix of the text and
|
|
47
|
+
field colors, so a field stays findable in any palette — about 3:1
|
|
48
|
+
(WCAG 1.4.11) with typical dark text. On white, where the field fill
|
|
49
|
+
matches the page, the outline is the only thing marking it. Option
|
|
50
|
+
rows, cards, and dividers keep the lighter --fillo-border. */
|
|
51
|
+
--fillo-control-border: color-mix(in srgb, var(--fillo-text) 50%, var(--fillo-control-bg));
|
|
46
52
|
|
|
47
53
|
/* Unthemed forms follow the host's CSS color-scheme. The first value for
|
|
48
54
|
each token above is a safe light fallback for browsers without
|
|
@@ -74,6 +80,7 @@
|
|
|
74
80
|
--fillo-border: #3f3f46;
|
|
75
81
|
--fillo-error: #f87171;
|
|
76
82
|
--fillo-control-bg: #18181b;
|
|
83
|
+
--fillo-control-border: color-mix(in srgb, var(--fillo-text) 40%, var(--fillo-control-bg));
|
|
77
84
|
|
|
78
85
|
color-scheme: dark;
|
|
79
86
|
}
|
|
@@ -87,11 +94,24 @@
|
|
|
87
94
|
--fillo-border: #3f3f46;
|
|
88
95
|
--fillo-error: #f87171;
|
|
89
96
|
--fillo-control-bg: #18181b;
|
|
97
|
+
--fillo-control-border: color-mix(in srgb, var(--fillo-text) 40%, var(--fillo-control-bg));
|
|
90
98
|
|
|
91
99
|
color-scheme: dark;
|
|
92
100
|
}
|
|
93
101
|
}
|
|
94
102
|
|
|
103
|
+
/* A custom accent names the text tone that reads on it (core's
|
|
104
|
+
resolveThemeDom), so a dark accent in dark mode keeps a readable button.
|
|
105
|
+
Placed after the scheme rules so it wins at the same specificity. */
|
|
106
|
+
.fillo-form[data-fillo-on-primary="light"] { --fillo-primary-contrast: #ffffff; }
|
|
107
|
+
.fillo-form[data-fillo-on-primary="dark"] { --fillo-primary-contrast: #18181b; }
|
|
108
|
+
.fillo-form[data-fillo-on-primary="light"][data-fillo-on-primary-dark="dark"] {
|
|
109
|
+
--fillo-primary-contrast: light-dark(#ffffff, #18181b);
|
|
110
|
+
}
|
|
111
|
+
.fillo-form[data-fillo-on-primary="dark"][data-fillo-on-primary-dark="light"] {
|
|
112
|
+
--fillo-primary-contrast: light-dark(#18181b, #ffffff);
|
|
113
|
+
}
|
|
114
|
+
|
|
95
115
|
.fillo-header { display: flex; flex-direction: column; gap: 0.5rem; }
|
|
96
116
|
/* Text roles: title 1.5em, heading 1.125em, body 1em, helper 0.875em,
|
|
97
117
|
metadata 0.75em. Nested helper text inherits its container size.
|
|
@@ -119,7 +139,7 @@
|
|
|
119
139
|
font: inherit;
|
|
120
140
|
color: var(--fillo-text);
|
|
121
141
|
background: var(--fillo-control-bg);
|
|
122
|
-
border: 1px solid var(--fillo-border);
|
|
142
|
+
border: 1px solid var(--fillo-control-border);
|
|
123
143
|
border-radius: var(--fillo-radius);
|
|
124
144
|
min-height: 2.5rem;
|
|
125
145
|
padding: 0.6rem 0.8rem;
|
|
@@ -151,7 +171,7 @@
|
|
|
151
171
|
box-sizing: border-box;
|
|
152
172
|
min-height: 2.5rem;
|
|
153
173
|
background: var(--fillo-control-bg);
|
|
154
|
-
border: 1px solid var(--fillo-border);
|
|
174
|
+
border: 1px solid var(--fillo-control-border);
|
|
155
175
|
border-radius: var(--fillo-radius);
|
|
156
176
|
padding: 0.6rem 0.8rem;
|
|
157
177
|
transition: border-color 120ms ease, box-shadow 120ms ease;
|
|
@@ -186,7 +206,7 @@
|
|
|
186
206
|
height: 100%; min-height: 2.5rem; padding: 0 0.6rem;
|
|
187
207
|
font: inherit; color: var(--fillo-text);
|
|
188
208
|
background: var(--fillo-control-bg);
|
|
189
|
-
border: 1px solid var(--fillo-border); border-radius: var(--fillo-radius);
|
|
209
|
+
border: 1px solid var(--fillo-control-border); border-radius: var(--fillo-radius);
|
|
190
210
|
cursor: pointer; white-space: nowrap;
|
|
191
211
|
transition: border-color 120ms ease, box-shadow 120ms ease;
|
|
192
212
|
}
|
|
@@ -216,7 +236,7 @@
|
|
|
216
236
|
.fillo-phone-search {
|
|
217
237
|
appearance: none; font: inherit; width: 100%; box-sizing: border-box;
|
|
218
238
|
color: var(--fillo-text); background: var(--fillo-bg);
|
|
219
|
-
border: 1px solid var(--fillo-border);
|
|
239
|
+
border: 1px solid var(--fillo-control-border);
|
|
220
240
|
border-radius: calc(var(--fillo-radius) - 3px); padding: 0.45rem 0.6rem;
|
|
221
241
|
}
|
|
222
242
|
.fillo-phone-search:focus-visible { outline: none; border-color: var(--fillo-primary); }
|
|
@@ -1048,28 +1068,60 @@
|
|
|
1048
1068
|
justify-content: space-between;
|
|
1049
1069
|
gap: 0.5rem;
|
|
1050
1070
|
}
|
|
1051
|
-
|
|
1071
|
+
/* The instance title captions a card inside the field, so it sits below the
|
|
1072
|
+
field's own label in the hierarchy (helper size, muted), never above it. */
|
|
1073
|
+
.fillo-group-instance-title {
|
|
1074
|
+
margin: 0;
|
|
1075
|
+
font-size: 0.875em;
|
|
1076
|
+
font-weight: 500;
|
|
1077
|
+
color: var(--fillo-muted);
|
|
1078
|
+
font-variant-numeric: tabular-nums;
|
|
1079
|
+
}
|
|
1080
|
+
/* Add is a tinted secondary button: filled, so it never reads as another
|
|
1081
|
+
input or option row, and quieter than the primary Next/Submit. */
|
|
1052
1082
|
.fillo-group-add {
|
|
1053
1083
|
align-self: flex-start;
|
|
1084
|
+
gap: 0.4rem;
|
|
1054
1085
|
font: inherit;
|
|
1055
|
-
|
|
1056
|
-
|
|
1086
|
+
font-weight: 500;
|
|
1087
|
+
padding: 0.5rem 0.95rem 0.5rem 0.75rem;
|
|
1088
|
+
border: 1px solid transparent;
|
|
1057
1089
|
border-radius: var(--fillo-radius);
|
|
1058
|
-
background: var(--fillo-
|
|
1090
|
+
background: color-mix(in srgb, var(--fillo-primary) 10%, transparent);
|
|
1059
1091
|
color: var(--fillo-text);
|
|
1060
1092
|
cursor: pointer;
|
|
1093
|
+
transition: background-color 120ms ease;
|
|
1094
|
+
}
|
|
1095
|
+
.fillo-group-add:hover:where(:not(:disabled)) {
|
|
1096
|
+
background: color-mix(in srgb, var(--fillo-primary) 16%, transparent);
|
|
1061
1097
|
}
|
|
1062
1098
|
.fillo-group-add:disabled { opacity: 0.5; cursor: default; }
|
|
1063
1099
|
.fillo-group-remove {
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1100
|
+
appearance: none;
|
|
1101
|
+
padding: 0;
|
|
1102
|
+
/* The 2rem target overhangs the header instead of growing it. */
|
|
1103
|
+
margin: -0.375rem -0.375rem -0.375rem 0;
|
|
1067
1104
|
border: none;
|
|
1105
|
+
border-radius: var(--fillo-radius);
|
|
1068
1106
|
background: none;
|
|
1069
1107
|
color: var(--fillo-muted);
|
|
1070
1108
|
cursor: pointer;
|
|
1109
|
+
transition: background-color 120ms ease, color 120ms ease;
|
|
1110
|
+
}
|
|
1111
|
+
.fillo-group-remove:hover:where(:not(:disabled)) {
|
|
1112
|
+
color: var(--fillo-text);
|
|
1113
|
+
background: color-mix(in srgb, var(--fillo-text) 8%, transparent);
|
|
1114
|
+
}
|
|
1115
|
+
.fillo-group-remove:disabled { opacity: 0.4; cursor: default; }
|
|
1116
|
+
.fillo-group-icon {
|
|
1117
|
+
display: block;
|
|
1118
|
+
flex: none;
|
|
1119
|
+
width: 1rem;
|
|
1120
|
+
height: 1rem;
|
|
1121
|
+
stroke: currentColor;
|
|
1122
|
+
stroke-width: 2;
|
|
1123
|
+
stroke-linecap: round;
|
|
1071
1124
|
}
|
|
1072
|
-
.fillo-group-remove:disabled { opacity: 0.5; cursor: default; }
|
|
1073
1125
|
/* ---------- Accessibility: focus rings, pointer targets, forced-colors
|
|
1074
1126
|
(input-quality audit P1.1-P1.3) ---------- */
|
|
1075
1127
|
/* Focus visibility: controls without a compensating border swap get a
|
|
@@ -1093,15 +1145,20 @@
|
|
|
1093
1145
|
/* Minimum pointer targets (WCAG 2.2 AA 24px; 1.5rem = 24px @16px root). */
|
|
1094
1146
|
.fillo-ranking-move,
|
|
1095
1147
|
.fillo-signature-clear,
|
|
1096
|
-
.fillo-group-add
|
|
1097
|
-
.fillo-group-remove {
|
|
1148
|
+
.fillo-group-add {
|
|
1098
1149
|
min-width: 1.5rem;
|
|
1099
1150
|
min-height: 1.5rem;
|
|
1100
1151
|
display: inline-flex;
|
|
1101
1152
|
align-items: center;
|
|
1102
1153
|
justify-content: center;
|
|
1103
1154
|
}
|
|
1104
|
-
/* Upload row actions use a calmer, easier 32px target. */
|
|
1155
|
+
/* Upload row and group instance actions use a calmer, easier 32px target. */
|
|
1156
|
+
.fillo-group-remove {
|
|
1157
|
+
display: inline-flex;
|
|
1158
|
+
align-items: center;
|
|
1159
|
+
justify-content: center;
|
|
1160
|
+
}
|
|
1161
|
+
.fillo-group-remove,
|
|
1105
1162
|
.fillo-file-remove,
|
|
1106
1163
|
.fillo-file-retry {
|
|
1107
1164
|
min-width: 2rem;
|
|
@@ -43,6 +43,12 @@
|
|
|
43
43
|
--fillo-font-size: 1em;
|
|
44
44
|
--fillo-control-bg: #ffffff;
|
|
45
45
|
--fillo-control-bg: light-dark(#ffffff, #18181b);
|
|
46
|
+
/* Text-entry outlines (inputs, selects, phone): a mix of the text and
|
|
47
|
+
field colors, so a field stays findable in any palette — about 3:1
|
|
48
|
+
(WCAG 1.4.11) with typical dark text. On white, where the field fill
|
|
49
|
+
matches the page, the outline is the only thing marking it. Option
|
|
50
|
+
rows, cards, and dividers keep the lighter --fillo-border. */
|
|
51
|
+
--fillo-control-border: color-mix(in srgb, var(--fillo-text) 50%, var(--fillo-control-bg));
|
|
46
52
|
|
|
47
53
|
/* Unthemed forms follow the host's CSS color-scheme. The first value for
|
|
48
54
|
each token above is a safe light fallback for browsers without
|
|
@@ -74,6 +80,7 @@
|
|
|
74
80
|
--fillo-border: #3f3f46;
|
|
75
81
|
--fillo-error: #f87171;
|
|
76
82
|
--fillo-control-bg: #18181b;
|
|
83
|
+
--fillo-control-border: color-mix(in srgb, var(--fillo-text) 40%, var(--fillo-control-bg));
|
|
77
84
|
|
|
78
85
|
color-scheme: dark;
|
|
79
86
|
}
|
|
@@ -87,11 +94,24 @@
|
|
|
87
94
|
--fillo-border: #3f3f46;
|
|
88
95
|
--fillo-error: #f87171;
|
|
89
96
|
--fillo-control-bg: #18181b;
|
|
97
|
+
--fillo-control-border: color-mix(in srgb, var(--fillo-text) 40%, var(--fillo-control-bg));
|
|
90
98
|
|
|
91
99
|
color-scheme: dark;
|
|
92
100
|
}
|
|
93
101
|
}
|
|
94
102
|
|
|
103
|
+
/* A custom accent names the text tone that reads on it (core's
|
|
104
|
+
resolveThemeDom), so a dark accent in dark mode keeps a readable button.
|
|
105
|
+
Placed after the scheme rules so it wins at the same specificity. */
|
|
106
|
+
.fillo-form[data-fillo-on-primary="light"] { --fillo-primary-contrast: #ffffff; }
|
|
107
|
+
.fillo-form[data-fillo-on-primary="dark"] { --fillo-primary-contrast: #18181b; }
|
|
108
|
+
.fillo-form[data-fillo-on-primary="light"][data-fillo-on-primary-dark="dark"] {
|
|
109
|
+
--fillo-primary-contrast: light-dark(#ffffff, #18181b);
|
|
110
|
+
}
|
|
111
|
+
.fillo-form[data-fillo-on-primary="dark"][data-fillo-on-primary-dark="light"] {
|
|
112
|
+
--fillo-primary-contrast: light-dark(#18181b, #ffffff);
|
|
113
|
+
}
|
|
114
|
+
|
|
95
115
|
.fillo-header { display: flex; flex-direction: column; gap: 0.5rem; }
|
|
96
116
|
/* Text roles: title 1.5em, heading 1.125em, body 1em, helper 0.875em,
|
|
97
117
|
metadata 0.75em. Nested helper text inherits its container size.
|
|
@@ -119,7 +139,7 @@
|
|
|
119
139
|
font: inherit;
|
|
120
140
|
color: var(--fillo-text);
|
|
121
141
|
background: var(--fillo-control-bg);
|
|
122
|
-
border: 1px solid var(--fillo-border);
|
|
142
|
+
border: 1px solid var(--fillo-control-border);
|
|
123
143
|
border-radius: var(--fillo-radius);
|
|
124
144
|
min-height: 2.5rem;
|
|
125
145
|
padding: 0.6rem 0.8rem;
|
|
@@ -151,7 +171,7 @@
|
|
|
151
171
|
box-sizing: border-box;
|
|
152
172
|
min-height: 2.5rem;
|
|
153
173
|
background: var(--fillo-control-bg);
|
|
154
|
-
border: 1px solid var(--fillo-border);
|
|
174
|
+
border: 1px solid var(--fillo-control-border);
|
|
155
175
|
border-radius: var(--fillo-radius);
|
|
156
176
|
padding: 0.6rem 0.8rem;
|
|
157
177
|
transition: border-color 120ms ease, box-shadow 120ms ease;
|
|
@@ -186,7 +206,7 @@
|
|
|
186
206
|
height: 100%; min-height: 2.5rem; padding: 0 0.6rem;
|
|
187
207
|
font: inherit; color: var(--fillo-text);
|
|
188
208
|
background: var(--fillo-control-bg);
|
|
189
|
-
border: 1px solid var(--fillo-border); border-radius: var(--fillo-radius);
|
|
209
|
+
border: 1px solid var(--fillo-control-border); border-radius: var(--fillo-radius);
|
|
190
210
|
cursor: pointer; white-space: nowrap;
|
|
191
211
|
transition: border-color 120ms ease, box-shadow 120ms ease;
|
|
192
212
|
}
|
|
@@ -216,7 +236,7 @@
|
|
|
216
236
|
.fillo-phone-search {
|
|
217
237
|
appearance: none; font: inherit; width: 100%; box-sizing: border-box;
|
|
218
238
|
color: var(--fillo-text); background: var(--fillo-bg);
|
|
219
|
-
border: 1px solid var(--fillo-border);
|
|
239
|
+
border: 1px solid var(--fillo-control-border);
|
|
220
240
|
border-radius: calc(var(--fillo-radius) - 3px); padding: 0.45rem 0.6rem;
|
|
221
241
|
}
|
|
222
242
|
.fillo-phone-search:focus-visible { outline: none; border-color: var(--fillo-primary); }
|
|
@@ -1048,28 +1068,60 @@
|
|
|
1048
1068
|
justify-content: space-between;
|
|
1049
1069
|
gap: 0.5rem;
|
|
1050
1070
|
}
|
|
1051
|
-
|
|
1071
|
+
/* The instance title captions a card inside the field, so it sits below the
|
|
1072
|
+
field's own label in the hierarchy (helper size, muted), never above it. */
|
|
1073
|
+
.fillo-group-instance-title {
|
|
1074
|
+
margin: 0;
|
|
1075
|
+
font-size: 0.875em;
|
|
1076
|
+
font-weight: 500;
|
|
1077
|
+
color: var(--fillo-muted);
|
|
1078
|
+
font-variant-numeric: tabular-nums;
|
|
1079
|
+
}
|
|
1080
|
+
/* Add is a tinted secondary button: filled, so it never reads as another
|
|
1081
|
+
input or option row, and quieter than the primary Next/Submit. */
|
|
1052
1082
|
.fillo-group-add {
|
|
1053
1083
|
align-self: flex-start;
|
|
1084
|
+
gap: 0.4rem;
|
|
1054
1085
|
font: inherit;
|
|
1055
|
-
|
|
1056
|
-
|
|
1086
|
+
font-weight: 500;
|
|
1087
|
+
padding: 0.5rem 0.95rem 0.5rem 0.75rem;
|
|
1088
|
+
border: 1px solid transparent;
|
|
1057
1089
|
border-radius: var(--fillo-radius);
|
|
1058
|
-
background: var(--fillo-
|
|
1090
|
+
background: color-mix(in srgb, var(--fillo-primary) 10%, transparent);
|
|
1059
1091
|
color: var(--fillo-text);
|
|
1060
1092
|
cursor: pointer;
|
|
1093
|
+
transition: background-color 120ms ease;
|
|
1094
|
+
}
|
|
1095
|
+
.fillo-group-add:hover:where(:not(:disabled)) {
|
|
1096
|
+
background: color-mix(in srgb, var(--fillo-primary) 16%, transparent);
|
|
1061
1097
|
}
|
|
1062
1098
|
.fillo-group-add:disabled { opacity: 0.5; cursor: default; }
|
|
1063
1099
|
.fillo-group-remove {
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1100
|
+
appearance: none;
|
|
1101
|
+
padding: 0;
|
|
1102
|
+
/* The 2rem target overhangs the header instead of growing it. */
|
|
1103
|
+
margin: -0.375rem -0.375rem -0.375rem 0;
|
|
1067
1104
|
border: none;
|
|
1105
|
+
border-radius: var(--fillo-radius);
|
|
1068
1106
|
background: none;
|
|
1069
1107
|
color: var(--fillo-muted);
|
|
1070
1108
|
cursor: pointer;
|
|
1109
|
+
transition: background-color 120ms ease, color 120ms ease;
|
|
1110
|
+
}
|
|
1111
|
+
.fillo-group-remove:hover:where(:not(:disabled)) {
|
|
1112
|
+
color: var(--fillo-text);
|
|
1113
|
+
background: color-mix(in srgb, var(--fillo-text) 8%, transparent);
|
|
1114
|
+
}
|
|
1115
|
+
.fillo-group-remove:disabled { opacity: 0.4; cursor: default; }
|
|
1116
|
+
.fillo-group-icon {
|
|
1117
|
+
display: block;
|
|
1118
|
+
flex: none;
|
|
1119
|
+
width: 1rem;
|
|
1120
|
+
height: 1rem;
|
|
1121
|
+
stroke: currentColor;
|
|
1122
|
+
stroke-width: 2;
|
|
1123
|
+
stroke-linecap: round;
|
|
1071
1124
|
}
|
|
1072
|
-
.fillo-group-remove:disabled { opacity: 0.5; cursor: default; }
|
|
1073
1125
|
/* ---------- Accessibility: focus rings, pointer targets, forced-colors
|
|
1074
1126
|
(input-quality audit P1.1-P1.3) ---------- */
|
|
1075
1127
|
/* Focus visibility: controls without a compensating border swap get a
|
|
@@ -1093,15 +1145,20 @@
|
|
|
1093
1145
|
/* Minimum pointer targets (WCAG 2.2 AA 24px; 1.5rem = 24px @16px root). */
|
|
1094
1146
|
.fillo-ranking-move,
|
|
1095
1147
|
.fillo-signature-clear,
|
|
1096
|
-
.fillo-group-add
|
|
1097
|
-
.fillo-group-remove {
|
|
1148
|
+
.fillo-group-add {
|
|
1098
1149
|
min-width: 1.5rem;
|
|
1099
1150
|
min-height: 1.5rem;
|
|
1100
1151
|
display: inline-flex;
|
|
1101
1152
|
align-items: center;
|
|
1102
1153
|
justify-content: center;
|
|
1103
1154
|
}
|
|
1104
|
-
/* Upload row actions use a calmer, easier 32px target. */
|
|
1155
|
+
/* Upload row and group instance actions use a calmer, easier 32px target. */
|
|
1156
|
+
.fillo-group-remove {
|
|
1157
|
+
display: inline-flex;
|
|
1158
|
+
align-items: center;
|
|
1159
|
+
justify-content: center;
|
|
1160
|
+
}
|
|
1161
|
+
.fillo-group-remove,
|
|
1105
1162
|
.fillo-file-remove,
|
|
1106
1163
|
.fillo-file-retry {
|
|
1107
1164
|
min-width: 2rem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usefillo/dom",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Framework-agnostic DOM renderer and web component for embedding Fillo forms.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@usefillo/core": "^0.
|
|
48
|
+
"@usefillo/core": "^0.25.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"axe-core": "^4.10.0",
|