@vectoriox/iox-builder 4.31.2 → 4.32.1
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.
|
@@ -10075,18 +10075,6 @@ const QUIET = {
|
|
|
10075
10075
|
backgroundColor: 'transparent', color: TOKEN$1('inkMuted', '#4a453f'),
|
|
10076
10076
|
fontSize: '11px', fontWeight: '400', padding: '2px 4px', textDecoration: 'underline',
|
|
10077
10077
|
};
|
|
10078
|
-
const SMALL_ALLOW = {
|
|
10079
|
-
backgroundColor: 'transparent', color: TOKEN$1('ink', '#1f1d1b'),
|
|
10080
|
-
borderWidth: '1px', borderStyle: 'solid', borderColor: TOKEN$1('ink', '#1f1d1b'),
|
|
10081
|
-
fontSize: '11px', fontWeight: '600', padding: '5px 10px',
|
|
10082
|
-
borderRadius: TOKEN$1('radius-control', '4px'),
|
|
10083
|
-
};
|
|
10084
|
-
const SMALL_REFUSE = {
|
|
10085
|
-
backgroundColor: 'transparent', color: TOKEN$1('inkMuted', '#6b6560'),
|
|
10086
|
-
borderWidth: '1px', borderStyle: 'solid', borderColor: TOKEN$1('line', '#d8d4d1'),
|
|
10087
|
-
fontSize: '11px', fontWeight: '600', padding: '5px 10px',
|
|
10088
|
-
borderRadius: TOKEN$1('radius-control', '4px'),
|
|
10089
|
-
};
|
|
10090
10078
|
function row(createConfig, styles, children) {
|
|
10091
10079
|
const container = createConfig('Container');
|
|
10092
10080
|
if (!container || children.some(c => !c))
|
|
@@ -10166,15 +10154,19 @@ function buildConsentPreset(createConfig) {
|
|
|
10166
10154
|
textColOf('Necessary', 'Keeps the site working: your session, your language, this very choice. Always on.'),
|
|
10167
10155
|
alwaysOn,
|
|
10168
10156
|
]);
|
|
10157
|
+
// Board C2's switches, for real: a Field in switch clothing whose NAME carries the
|
|
10158
|
+
// category ('consent-<category>') — the engine's consent runtime binds checked-state to
|
|
10159
|
+
// the decision and records on change. State lives in the cookie, never in the tree.
|
|
10169
10160
|
const categoryCard = (category, name, desc) => {
|
|
10170
|
-
const
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10161
|
+
const sw = createConfig('Field');
|
|
10162
|
+
if (!sw)
|
|
10163
|
+
return null;
|
|
10164
|
+
setTrait(sw, 'label', name);
|
|
10165
|
+
setTrait(sw, 'labelHidden', true); // the card's own texts carry the words
|
|
10166
|
+
setTrait(sw, 'control', 'switch');
|
|
10167
|
+
setTrait(sw, 'name', `consent-${category}`);
|
|
10168
|
+
setStyleTrait(sw, 'width', 'auto');
|
|
10169
|
+
return row(createConfig, CARD, [textColOf(name, desc), sw]);
|
|
10178
10170
|
};
|
|
10179
10171
|
const analyticsCard = categoryCard('analytics', 'Analytics', 'Anonymous counts of visits and pages. Off means the analytics script never loads.');
|
|
10180
10172
|
const marketingCard = categoryCard('marketing', 'Marketing', 'Ads measurement and remarketing. Off means no ad cookies and no data shared.');
|
|
@@ -10624,7 +10616,9 @@ class FieldComponentConfig extends ComponentConfig {
|
|
|
10624
10616
|
{ label: 'Long text', value: 'textarea' },
|
|
10625
10617
|
{ label: 'Dropdown', value: 'select' },
|
|
10626
10618
|
{ label: 'Checkbox', value: 'checkbox' },
|
|
10619
|
+
{ label: 'Switch', value: 'switch' },
|
|
10627
10620
|
{ label: 'Radio group', value: 'radio' },
|
|
10621
|
+
{ label: 'Slider', value: 'range' },
|
|
10628
10622
|
{ label: 'Date', value: 'date' },
|
|
10629
10623
|
{ label: 'Time', value: 'time' },
|
|
10630
10624
|
// ⚠️ 'file' is DELIBERATELY ABSENT until uploads are implemented. A file input's
|
|
@@ -10637,6 +10631,9 @@ class FieldComponentConfig extends ComponentConfig {
|
|
|
10637
10631
|
new TraitConfig('placeholder', 'Hint inside the box', TraitInputType.Text, undefined, '', false, { trait: 'control', values: ['text', 'email', 'tel', 'url', 'number', 'password', 'textarea', 'select'] }),
|
|
10638
10632
|
new TraitConfig('help', 'Help text', TraitInputType.Text, undefined, ''),
|
|
10639
10633
|
new TraitConfig('rows', 'Rows', TraitInputType.Number, undefined, 4, false, { trait: 'control', values: 'textarea' }),
|
|
10634
|
+
new TraitConfig('rangeMin', 'Min', TraitInputType.Number, undefined, 0, false, { trait: 'control', values: 'range' }),
|
|
10635
|
+
new TraitConfig('rangeMax', 'Max', TraitInputType.Number, undefined, 100, false, { trait: 'control', values: 'range' }),
|
|
10636
|
+
new TraitConfig('rangeStep', 'Step', TraitInputType.Number, undefined, 1, false, { trait: 'control', values: 'range' }),
|
|
10640
10637
|
new TraitConfig('labelHidden', 'Hide label (screen readers still read it)', TraitInputType.Checkbox, undefined, false),
|
|
10641
10638
|
// The submitted key. Derived from the label; editable for external integrations.
|
|
10642
10639
|
new TraitConfig('name', 'Submitted key', TraitInputType.Text, undefined, ''),
|