@soyio/soyio-widget 2.16.3 → 2.18.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/README.md +231 -17
- package/dist/index.d.ts +105 -8
- package/dist/index.js +159 -159
- package/dist/index.umd.cjs +14 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -164,6 +164,10 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
164
164
|
// Feature flags (optional)
|
|
165
165
|
enabledFeatures: ["DataSubjectRequest", "ConsentManagement"],
|
|
166
166
|
|
|
167
|
+
// DSR rights to show (optional)
|
|
168
|
+
// When omitted, the DSR form will use arsop right as default
|
|
169
|
+
enabledRights: ["arsop"],
|
|
170
|
+
|
|
167
171
|
// Request reference (optional)
|
|
168
172
|
// Will be attached to data subject requests
|
|
169
173
|
requestReference: "<reference>", // e.g. some uuid or id to match our created records with your frontend flows
|
|
@@ -197,6 +201,7 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
197
201
|
- `sessionToken`: Use this to authenticate a session directly.
|
|
198
202
|
- `companyId`: The company identifier. Must start with `com_`. Use this when Privacy Center is mounted in a non authenticated environment.
|
|
199
203
|
- `enabledFeatures`: Optional array of features to show. Supported values: `"DataSubjectRequest"`, `"ConsentManagement"`.
|
|
204
|
+
- `enabledRights`: Optional array of rights for the Data Subject Request (DSR) form. Supported values: `"arsop"`, `"redec"`. When multiple values are provided, the form starts with a right selection step. When a single value is provided, the selection step is skipped. When omitted, the form defaults to arsop rights.
|
|
200
205
|
- `requestReference`: Optional string, intended to be a reference of the current session. It will be attached to created data subject requests.
|
|
201
206
|
- `dataSubjects`: Optional array of data subject categories. When present, the consent management view only shows consent for the specified categories. Supported values include: `"anonymous_user"`, `"citizen_voter"`, `"commuter"`, `"consultant"`, `"customer"`, `"employee"`, `"job_applicant"`, `"next_of_kin"`, `"passenger"`, `"patient"`, `"prospect"`, `"shareholder"`, `"supplier_vendor"`, `"trainee"`, `"visitor"`.
|
|
202
207
|
- `fileRequisites`: Optional object to configure file upload constraints.
|
|
@@ -460,21 +465,145 @@ Customize the look and feel of Soyio UI components by passing an `appearance` ob
|
|
|
460
465
|
|
|
461
466
|
### Structure
|
|
462
467
|
|
|
463
|
-
The appearance object consists of
|
|
468
|
+
The appearance object consists of four main sections:
|
|
464
469
|
|
|
465
470
|
```javascript
|
|
466
471
|
const appearance = {
|
|
467
472
|
theme: string,
|
|
468
473
|
variables: Variables,
|
|
469
474
|
rules: Rules,
|
|
475
|
+
config: Config,
|
|
470
476
|
};
|
|
471
477
|
```
|
|
472
478
|
|
|
473
479
|
### Themes
|
|
474
480
|
|
|
475
|
-
|
|
481
|
+
Built-in themes provide pre-configured color palettes and component styles:
|
|
482
|
+
|
|
483
|
+
| Theme | Description |
|
|
484
|
+
| ----- | ----------- |
|
|
485
|
+
| `"soyio"` | Default light theme with Soyio brand colors (purple/indigo), uppercase titles |
|
|
486
|
+
| `"night"` | Dark mode theme with deep blues, muted colors, and subtle borders |
|
|
487
|
+
| `"flat"` | Minimal theme with square corners, normal-case titles, thicker borders |
|
|
488
|
+
|
|
489
|
+
**Theme style differences:**
|
|
490
|
+
|
|
491
|
+
- **soyio**: Standard styling with rounded corners and uppercase card titles
|
|
492
|
+
- **night**: Dark backgrounds, lighter text, borders using theme variables
|
|
493
|
+
- **flat**: No border radius, sentence-case titles (no uppercase), 2px borders, lighter font weights
|
|
494
|
+
|
|
495
|
+
**Example:**
|
|
496
|
+
```javascript
|
|
497
|
+
const appearance = {
|
|
498
|
+
theme: "night", // Use the dark theme
|
|
499
|
+
variables: {
|
|
500
|
+
// You can still override specific variables
|
|
501
|
+
colorPrimary: "#FF6B6B",
|
|
502
|
+
},
|
|
503
|
+
rules: {
|
|
504
|
+
// You can also override theme rules
|
|
505
|
+
".CardTitle": { fontWeight: "700" },
|
|
506
|
+
},
|
|
507
|
+
};
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
Theme variables and rules are applied first, then your custom overrides take precedence.
|
|
511
|
+
|
|
512
|
+
### Config
|
|
513
|
+
|
|
514
|
+
The `config` object allows you to adjust component behavior settings.
|
|
515
|
+
|
|
516
|
+
```javascript
|
|
517
|
+
interface Config {
|
|
518
|
+
helperTextPosition?: 'top' | 'bottom';
|
|
519
|
+
hintIcon?: string;
|
|
520
|
+
icon?: {
|
|
521
|
+
weight?: 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';
|
|
522
|
+
size?: number;
|
|
523
|
+
};
|
|
524
|
+
iconRules?: Record<string, { weight?: IconWeight; size?: number }>;
|
|
525
|
+
mainPageColumns?: 1 | 2 | 3 | 4;
|
|
526
|
+
}
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
| Property | Description | Default |
|
|
530
|
+
| -------- | ----------- | ------- |
|
|
531
|
+
| `helperTextPosition` | Position of helper/description text relative to form inputs | `"bottom"` |
|
|
532
|
+
| `hintIcon` | Icon name for hint/help tooltips on input labels (see available icons below) | `"Question"` |
|
|
533
|
+
| `icon.weight` | Global icon weight/style variant (see below) | `"regular"` |
|
|
534
|
+
| `icon.size` | Global default icon size in pixels | `24` |
|
|
535
|
+
| `iconRules` | Per-component icon style overrides | `{}` |
|
|
536
|
+
| `mainPageColumns` | Number of columns in the main page feature cards grid (1-4) | `2` |
|
|
537
|
+
|
|
538
|
+
#### Icons
|
|
539
|
+
|
|
540
|
+
Soyio uses [Phosphor Icons](https://phosphoricons.com/), a flexible icon family with multiple weight variants. You can customize the icon appearance globally using the `config.icon` settings, or override icons for specific components using `config.iconRules`.
|
|
476
541
|
|
|
477
|
-
|
|
542
|
+
**Available icon weights:**
|
|
543
|
+
|
|
544
|
+
| Weight | Description |
|
|
545
|
+
| ------ | ----------- |
|
|
546
|
+
| `thin` | Thinnest stroke width |
|
|
547
|
+
| `light` | Light stroke width |
|
|
548
|
+
| `regular` | Default stroke width |
|
|
549
|
+
| `bold` | Bold stroke width |
|
|
550
|
+
| `fill` | Filled/solid icons |
|
|
551
|
+
| `duotone` | Two-tone icons with opacity |
|
|
552
|
+
|
|
553
|
+
**Global icon example:**
|
|
554
|
+
|
|
555
|
+
```javascript
|
|
556
|
+
const appearance = {
|
|
557
|
+
config: {
|
|
558
|
+
icon: {
|
|
559
|
+
weight: "bold",
|
|
560
|
+
size: 20,
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
};
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
**Per-component icon overrides:**
|
|
567
|
+
|
|
568
|
+
Use `iconRules` to customize icons for specific components. The key is the component name (e.g., `Alert`, `Switch`) or a variant-specific key (e.g., `Alert.error`):
|
|
569
|
+
|
|
570
|
+
> **Note:** For variant-specific icon rules, use dot notation (`Alert.error`) rather than the CSS double-dash syntax (`Alert--error`).
|
|
571
|
+
|
|
572
|
+
```javascript
|
|
573
|
+
const appearance = {
|
|
574
|
+
config: {
|
|
575
|
+
icon: {
|
|
576
|
+
weight: "regular", // Global default
|
|
577
|
+
},
|
|
578
|
+
iconRules: {
|
|
579
|
+
Alert: { weight: "fill" }, // All alerts use filled icons
|
|
580
|
+
Switch: { weight: "bold", size: 16 }, // Switch icons are bold and smaller
|
|
581
|
+
"Alert.error": { weight: "fill" }, // Error alerts specifically
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
};
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
**Hint icon customization:**
|
|
588
|
+
|
|
589
|
+
The hint icon appears next to input labels when a tooltip/hint is available. You can change which icon is displayed using `hintIcon`:
|
|
590
|
+
|
|
591
|
+
| Icon Name | Description |
|
|
592
|
+
| --------- | ----------- |
|
|
593
|
+
| `Question` | Question mark in circle (default) |
|
|
594
|
+
| `Info` | Information "i" icon |
|
|
595
|
+
| `QuestionMark` | Simple question mark |
|
|
596
|
+
| `Warning` | Warning/exclamation icon |
|
|
597
|
+
|
|
598
|
+
```javascript
|
|
599
|
+
const appearance = {
|
|
600
|
+
config: {
|
|
601
|
+
hintIcon: "Info", // Use info icon instead of question mark
|
|
602
|
+
},
|
|
603
|
+
};
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
You can also style the hint icon using the `.HintIcon` rule (see [Supported rules](#supported-rules)).
|
|
478
607
|
|
|
479
608
|
### Variables
|
|
480
609
|
|
|
@@ -483,21 +612,28 @@ Use variables to adjust common visual attributes across all components.
|
|
|
483
612
|
```javascript
|
|
484
613
|
interface Variables {
|
|
485
614
|
fontFamily?: string;
|
|
615
|
+
fontFamilyBody?: string;
|
|
616
|
+
fontFamilyTitle?: string;
|
|
486
617
|
fontSizeBase?: string;
|
|
487
618
|
colorPrimary?: string;
|
|
619
|
+
colorPrimarySurface?: string;
|
|
488
620
|
colorSecondary?: string;
|
|
489
621
|
colorBackground?: string;
|
|
490
|
-
colorText?: string;
|
|
491
|
-
colorTextSecondary?: string;
|
|
492
|
-
colorTextSubtle?: string;
|
|
493
|
-
colorTextInverted?: string;
|
|
494
|
-
colorPrimarySurface?: string;
|
|
495
622
|
colorSurface?: string;
|
|
496
623
|
colorSurfaceMuted?: string;
|
|
497
624
|
colorSurfaceStrong?: string;
|
|
498
625
|
colorBorder?: string;
|
|
499
626
|
colorBorderMuted?: string;
|
|
500
627
|
colorSwitchBorder?: string;
|
|
628
|
+
colorText?: string;
|
|
629
|
+
colorTextSecondary?: string;
|
|
630
|
+
colorTextSubtle?: string;
|
|
631
|
+
colorTextInverted?: string;
|
|
632
|
+
colorTextTitle?: string;
|
|
633
|
+
colorLink?: string;
|
|
634
|
+
colorInputFocus?: string;
|
|
635
|
+
colorInputErrorFocus?: string;
|
|
636
|
+
colorSelectArrow?: string;
|
|
501
637
|
colorInfo?: string;
|
|
502
638
|
colorInfoBg?: string;
|
|
503
639
|
colorSuccess?: string;
|
|
@@ -517,7 +653,10 @@ interface Variables {
|
|
|
517
653
|
|
|
518
654
|
| Variable | Description | Default |
|
|
519
655
|
| ----------------- | ---------------------------------------- | ------------------------- |
|
|
520
|
-
| `fontFamily` |
|
|
656
|
+
| `fontFamily` | Base font stack (fallback for body and title) | `"system-ui, sans-serif"` |
|
|
657
|
+
| `fontFamilyBody` | Font stack for body/paragraph text (falls back to `fontFamily`) | `var(--fontFamily)` |
|
|
658
|
+
| `fontFamilyTitle` | Font stack for titles and headings (falls back to `fontFamily`) | `var(--fontFamily)` |
|
|
659
|
+
| `fontSizeBase` | Base font size for text | `"1rem"` |
|
|
521
660
|
| `colorPrimary` | Primary color for interactive elements | `"#0570DE"` |
|
|
522
661
|
| `colorPrimarySurface` | Background color for primary elements (e.g. active tab) | `"#EEF2FF"` |
|
|
523
662
|
| `colorSecondary` | Secondary color for interactive elements | `"#A180F0"` |
|
|
@@ -532,6 +671,11 @@ interface Variables {
|
|
|
532
671
|
| `colorTextSecondary` | Secondary text color | `"#6B7280"` |
|
|
533
672
|
| `colorTextSubtle` | Subtle text color | `"#9CA3AF"` |
|
|
534
673
|
| `colorTextInverted` | Inverted text color | `"#FFFFFF"` |
|
|
674
|
+
| `colorTextTitle` | Title/heading text color (falls back to `colorText`) | `var(--colorText)` |
|
|
675
|
+
| `colorLink` | Color for link elements | `"#0570DE"` |
|
|
676
|
+
| `colorInputFocus` | Focus border/ring color for input elements | `"#0570DE"` |
|
|
677
|
+
| `colorInputErrorFocus`| Focus border/ring color for input elements in error state | `"#EF4444"` |
|
|
678
|
+
| `colorSelectArrow` | Color for select dropdown arrow icon | `"#6B7280"` |
|
|
535
679
|
| `colorInfo` | Info status color | `"#1E40AF"` |
|
|
536
680
|
| `colorInfoBg` | Info status background color | `"#E0E7FF"` |
|
|
537
681
|
| `colorSuccess` | Success status color | `"#15803D"` |
|
|
@@ -553,26 +697,56 @@ The `rules` object allows you to apply custom CSS to specific elements. Soyio su
|
|
|
553
697
|
|
|
554
698
|
#### Supported rules
|
|
555
699
|
|
|
556
|
-
The rules are grouped by component category:
|
|
700
|
+
The rules are grouped by component category. Most rules support **pseudo-classes** and **pseudo-elements** that can be appended to style different states:
|
|
701
|
+
|
|
702
|
+
**Supported pseudo-classes:**
|
|
703
|
+
- `:hover` - When the element is hovered
|
|
704
|
+
- `:focus` - When the element is focused
|
|
705
|
+
- `:active` - When the element is active/pressed
|
|
706
|
+
- `:disabled` - When the element is disabled
|
|
707
|
+
- `:autofill` - When the input is autofilled
|
|
708
|
+
- `:focus-visible` - When focused via keyboard navigation
|
|
709
|
+
|
|
710
|
+
**Supported pseudo-elements:**
|
|
711
|
+
- `::placeholder` - Placeholder text in inputs
|
|
712
|
+
- `::selection` - Selected text
|
|
713
|
+
|
|
714
|
+
**Example usage:**
|
|
715
|
+
```javascript
|
|
716
|
+
rules: {
|
|
717
|
+
".Button": { backgroundColor: "blue" }, // Base style
|
|
718
|
+
".Button:hover": { backgroundColor: "darkblue" }, // Hover state
|
|
719
|
+
".Button:disabled": { opacity: "0.5" }, // Disabled state
|
|
720
|
+
".Input::placeholder": { color: "gray" }, // Placeholder text
|
|
721
|
+
".RadioCard:hover": { borderColor: "var(--colorPrimary)" }, // Card hover
|
|
722
|
+
}
|
|
723
|
+
```
|
|
557
724
|
|
|
558
725
|
##### Layout
|
|
559
726
|
- `.MainContainer` - The main container.
|
|
560
727
|
- `.Card` - Card containers.
|
|
728
|
+
- `.CardTitle` - Card title text.
|
|
561
729
|
- `.Dialog` - Dialog containers.
|
|
562
730
|
- `.DialogOverlay` - Dialog overlays.
|
|
563
731
|
- `.DialogContent` - Dialog content areas.
|
|
564
732
|
|
|
565
733
|
##### Typography
|
|
566
|
-
- `.Title` - Title text.
|
|
734
|
+
- `.Title` - Title text (base class for all titles).
|
|
735
|
+
- `.StepTitle` - Step indicator title text (also inherits from `.Title`).
|
|
567
736
|
- `.Description` - Description text.
|
|
568
737
|
|
|
569
738
|
##### Inputs
|
|
570
739
|
- `.Input` - Input fields.
|
|
740
|
+
- `.Input--error` - Input fields in error state.
|
|
571
741
|
- `.Label` - Labels.
|
|
742
|
+
- `.HintIcon` - Hint/help icons next to input labels.
|
|
572
743
|
- `.TextArea` - Text area inputs.
|
|
573
744
|
- `.Select` - Select dropdowns.
|
|
574
745
|
- `.Combobox` - Combobox inputs.
|
|
575
746
|
- `.NinInput` - Styles the input field for national identity numbers.
|
|
747
|
+
- `.TrackingCodeInput` - Styles the tracking code input component.
|
|
748
|
+
- `.TrackingCodeInputCell` - Styles individual cells in the tracking code input.
|
|
749
|
+
- `.TrackingCodeInputSeparator` - Styles the separator between tracking code cells.
|
|
576
750
|
|
|
577
751
|
##### Buttons & Links
|
|
578
752
|
- `.Button` - The button component.
|
|
@@ -587,13 +761,15 @@ The rules are grouped by component category:
|
|
|
587
761
|
- `.CheckboxInput` - The styled checkbox element (supports `borderRadius`, `borderColor`, `backgroundColor`).
|
|
588
762
|
- `.CheckboxLabel` - The checkbox label.
|
|
589
763
|
- `.CheckboxCheck` - The checkmark icon inside the checkbox.
|
|
590
|
-
- `.CheckboxInput--checked` - The checked state of the checkbox
|
|
591
|
-
- `.CheckboxInput--focus` - Focus state of the checkbox (visible focus ring)
|
|
592
|
-
- `.CheckboxInput:hover` - Hover state of the checkbox
|
|
764
|
+
- `.CheckboxInput--checked` - The checked state of the checkbox.
|
|
593
765
|
|
|
594
766
|
|
|
595
767
|
**Radio**
|
|
596
768
|
- `.Radio` - Radio button containers.
|
|
769
|
+
- `.RadioButton` - The radio button element (the clickable circle).
|
|
770
|
+
- `.RadioButton--checked` - Checked state of the radio button.
|
|
771
|
+
- `.RadioIndicator` - The inner indicator point of the radio button.
|
|
772
|
+
- `.RadioIndicator--checked` - Checked state of the radio indicator (visible when selected).
|
|
597
773
|
- `.RadioLabel` - Radio button labels.
|
|
598
774
|
|
|
599
775
|
**Switch**
|
|
@@ -606,8 +782,30 @@ The rules are grouped by component category:
|
|
|
606
782
|
|
|
607
783
|
**Radio Card**
|
|
608
784
|
- `.RadioCard` - Styles the wrapper card element of a radio card item.
|
|
609
|
-
- `.
|
|
610
|
-
- `.
|
|
785
|
+
- `.RadioCard--checked` - Checked state of the radio card.
|
|
786
|
+
- `.RadioCardButton` - The radio button element inside a radio card.
|
|
787
|
+
- `.RadioCardButton--checked` - Checked state of the radio card button.
|
|
788
|
+
- `.RadioCardIndicator` - The inner indicator point inside a radio card.
|
|
789
|
+
- `.RadioCardIndicator--checked` - Checked state of the radio card indicator.
|
|
790
|
+
- `.RadioCardTitle` - The title text inside a radio card (also inherits from `.CardTitle`).
|
|
791
|
+
|
|
792
|
+
> **Note:** `.RadioCardTitle` elements also have the `.CardTitle` class, so you can style all card titles together with `.CardTitle` and override specifically for radio cards with `.RadioCardTitle`.
|
|
793
|
+
|
|
794
|
+
##### Step Indicator
|
|
795
|
+
|
|
796
|
+
The step indicator shows progress through multi-step forms.
|
|
797
|
+
|
|
798
|
+
- `.StepIndicatorContainer` - The container wrapping all step indicators.
|
|
799
|
+
- `.StepIndicator` - Individual step indicator item.
|
|
800
|
+
- `.StepIndicator--active` - The currently active step.
|
|
801
|
+
- `.StepIndicator--completed` - Steps that have been completed.
|
|
802
|
+
- `.StepIndicator--pending` - Steps that are not yet reached.
|
|
803
|
+
- `.StepIndicatorLine` - The connecting line between steps.
|
|
804
|
+
- `.StepIndicatorLine--top` - The line segment above a step indicator.
|
|
805
|
+
- `.StepIndicatorLine--bottom` - The line segment below a step indicator.
|
|
806
|
+
- `.StepIndicatorIcon` - Icon displayed inside a step indicator (for completed steps).
|
|
807
|
+
- `.StepIndicatorDot` - The dot marker in a step indicator.
|
|
808
|
+
- `.StepIndicatorNumber` - The step number displayed in the indicator.
|
|
611
809
|
|
|
612
810
|
##### Feedback
|
|
613
811
|
- `.Loader` - Loading indicators.
|
|
@@ -618,8 +816,10 @@ The rules are grouped by component category:
|
|
|
618
816
|
- `.Alert` - Alert boxes.
|
|
619
817
|
- `.Alert--error` - Error alert variant.
|
|
620
818
|
- `.Alert--warning` - Warning alert variant.
|
|
621
|
-
- `.Alert--
|
|
819
|
+
- `.Alert--info` - Information alert variant.
|
|
622
820
|
- `.Alert--success` - Success alert variant.
|
|
821
|
+
- `.AlertIcon` - The icon inside an alert.
|
|
822
|
+
- `.AlertContent` - The content/text area inside an alert.
|
|
623
823
|
|
|
624
824
|
**Chip**
|
|
625
825
|
- `.Chip` - Chips/Tags.
|
|
@@ -693,6 +893,9 @@ const appearance = {
|
|
|
693
893
|
display: "none", // Hide the check/cross icons
|
|
694
894
|
},
|
|
695
895
|
},
|
|
896
|
+
config: {
|
|
897
|
+
helperTextPosition: "top", // Position helper text above inputs
|
|
898
|
+
},
|
|
696
899
|
};
|
|
697
900
|
```
|
|
698
901
|
|
|
@@ -836,3 +1039,14 @@ VITE_PRIVACY_CENTER_URL=http://localhost:5173
|
|
|
836
1039
|
VITE_CONSENT_URL=http://localhost:5173
|
|
837
1040
|
VITE_CONSENT_TEMPLATE_ID=constpl_test
|
|
838
1041
|
```
|
|
1042
|
+
|
|
1043
|
+
### Presets Management
|
|
1044
|
+
|
|
1045
|
+
The smoke test includes preset management functionality that allows you to save, load, and share widget configurations:
|
|
1046
|
+
|
|
1047
|
+
- **Save Presets**: Save your current widget configuration with a custom name
|
|
1048
|
+
- **Load Presets**: Quickly switch between saved configurations
|
|
1049
|
+
- **Export Presets**: Download all presets as a JSON file for backup or sharing
|
|
1050
|
+
- **Import Presets**: Load presets from a previously exported JSON file
|
|
1051
|
+
|
|
1052
|
+
All presets are automatically saved to your browser's localStorage. Use the export feature to persist presets to disk and share them with your team. See [smoke-test/PRESETS.md](./smoke-test/PRESETS.md) for detailed documentation.
|
package/dist/index.d.ts
CHANGED
|
@@ -137,7 +137,36 @@ declare type CSSProperties = {
|
|
|
137
137
|
WebkitAppearance?: string;
|
|
138
138
|
webkitFontSmoothing?: 'auto' | 'antialiased' | 'subpixel-antialiased';
|
|
139
139
|
webkitTextFillColor?: string;
|
|
140
|
+
textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase';
|
|
140
141
|
width?: string;
|
|
142
|
+
display?: 'block' | 'inline' | 'inline-block' | 'flex' | 'inline-flex' | 'grid' | 'inline-grid' | 'none';
|
|
143
|
+
justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
144
|
+
alignItems?: 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
|
|
145
|
+
flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
146
|
+
flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
147
|
+
flex?: string;
|
|
148
|
+
gap?: string;
|
|
149
|
+
position?: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';
|
|
150
|
+
top?: string;
|
|
151
|
+
right?: string;
|
|
152
|
+
bottom?: string;
|
|
153
|
+
left?: string;
|
|
154
|
+
zIndex?: number | string;
|
|
155
|
+
transition?: string;
|
|
156
|
+
transitionProperty?: string;
|
|
157
|
+
transitionDuration?: string;
|
|
158
|
+
transitionTimingFunction?: string;
|
|
159
|
+
transitionDelay?: string;
|
|
160
|
+
transform?: string;
|
|
161
|
+
transformOrigin?: string;
|
|
162
|
+
visibility?: 'visible' | 'hidden' | 'collapse';
|
|
163
|
+
overflow?: 'visible' | 'hidden' | 'scroll' | 'auto';
|
|
164
|
+
overflowX?: 'visible' | 'hidden' | 'scroll' | 'auto';
|
|
165
|
+
overflowY?: 'visible' | 'hidden' | 'scroll' | 'auto';
|
|
166
|
+
textAlign?: 'left' | 'right' | 'center' | 'justify';
|
|
167
|
+
textDecoration?: string;
|
|
168
|
+
whiteSpace?: 'normal' | 'nowrap' | 'pre' | 'pre-wrap' | 'pre-line';
|
|
169
|
+
wordBreak?: 'normal' | 'break-all' | 'keep-all' | 'break-word';
|
|
141
170
|
};
|
|
142
171
|
|
|
143
172
|
declare type DataSubject = 'anonymous_user' | 'citizen_voter' | 'commuter' | 'consultant' | 'customer' | 'employee' | 'job_applicant' | 'next_of_kin' | 'passenger' | 'patient' | 'prospect' | 'shareholder' | 'supplier_vendor' | 'trainee' | 'visitor';
|
|
@@ -172,6 +201,8 @@ declare interface IBaseEventData {
|
|
|
172
201
|
eventName: string;
|
|
173
202
|
}
|
|
174
203
|
|
|
204
|
+
declare type IconWeight = 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';
|
|
205
|
+
|
|
175
206
|
declare type IframeCSSConfig = {
|
|
176
207
|
minWidth?: string;
|
|
177
208
|
};
|
|
@@ -210,6 +241,7 @@ export declare class PrivacyCenterBox extends BaseIframeBox<PrivacyCenterConfig>
|
|
|
210
241
|
|
|
211
242
|
declare type PrivacyCenterConfig = BaseConfig & {
|
|
212
243
|
enabledFeatures?: PrivacyManagerFeature[];
|
|
244
|
+
enabledRights?: PrivacyCenterRight[];
|
|
213
245
|
dataSubjects?: DataSubject[];
|
|
214
246
|
requestReference?: string;
|
|
215
247
|
fileRequisites?: {
|
|
@@ -224,6 +256,8 @@ declare type PrivacyCenterConfig = BaseConfig & {
|
|
|
224
256
|
companyId?: never;
|
|
225
257
|
});
|
|
226
258
|
|
|
259
|
+
declare type PrivacyCenterRight = 'arsop' | 'redec';
|
|
260
|
+
|
|
227
261
|
declare type PrivacyManagerFeature = 'DataSubjectRequest' | 'ConsentManagement' | 'RequestTracking';
|
|
228
262
|
|
|
229
263
|
declare type Request_2 = 'disclosure' | 'signature' | 'authentication';
|
|
@@ -249,28 +283,70 @@ declare interface SoyioAppearance {
|
|
|
249
283
|
theme?: SoyioTheme;
|
|
250
284
|
variables?: SoyioAppearanceVariables;
|
|
251
285
|
rules?: SoyioRule;
|
|
286
|
+
config?: SoyioAppearanceConfig;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
declare interface SoyioAppearanceConfig {
|
|
290
|
+
helperTextPosition?: 'top' | 'bottom';
|
|
291
|
+
/**
|
|
292
|
+
* Icon name to use for hint/help tooltips on input labels.
|
|
293
|
+
* Available icons: 'Question' (default), 'Info', 'QuestionMark', etc.
|
|
294
|
+
* @default 'Question'
|
|
295
|
+
*/
|
|
296
|
+
hintIcon?: string;
|
|
297
|
+
/**
|
|
298
|
+
* Global icon appearance configuration.
|
|
299
|
+
* Controls default weight and size for all icons.
|
|
300
|
+
*/
|
|
301
|
+
icon?: SoyioIconConfig;
|
|
302
|
+
/**
|
|
303
|
+
* Per-component icon overrides.
|
|
304
|
+
* Allows customizing icon styles for specific components.
|
|
305
|
+
*
|
|
306
|
+
* @example
|
|
307
|
+
* ```ts
|
|
308
|
+
* iconRules: {
|
|
309
|
+
* Alert: { weight: 'fill' },
|
|
310
|
+
* Switch: { weight: 'bold' },
|
|
311
|
+
* 'Alert.error': { weight: 'fill', size: 20 },
|
|
312
|
+
* }
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
315
|
+
iconRules?: Record<string, SoyioIconConfig>;
|
|
316
|
+
/**
|
|
317
|
+
* Number of columns in the main page feature cards grid.
|
|
318
|
+
* @default 2
|
|
319
|
+
*/
|
|
320
|
+
mainPageColumns?: 1 | 2 | 3 | 4;
|
|
252
321
|
}
|
|
253
322
|
|
|
254
323
|
declare interface SoyioAppearanceVariables {
|
|
255
324
|
fontFamily?: string;
|
|
325
|
+
fontFamilyBody?: string;
|
|
326
|
+
fontFamilyTitle?: string;
|
|
256
327
|
fontSizeBase?: string;
|
|
257
328
|
borderRadius?: string;
|
|
258
329
|
borderWidth?: string;
|
|
259
330
|
borderStyle?: string;
|
|
260
331
|
colorPrimary?: string;
|
|
332
|
+
colorPrimarySurface?: string;
|
|
261
333
|
colorSecondary?: string;
|
|
262
334
|
colorBackground?: string;
|
|
263
|
-
colorText?: string;
|
|
264
|
-
colorTextSecondary?: string;
|
|
265
|
-
colorTextSubtle?: string;
|
|
266
|
-
colorTextInverted?: string;
|
|
267
|
-
colorPrimarySurface?: string;
|
|
268
335
|
colorSurface?: string;
|
|
269
336
|
colorSurfaceMuted?: string;
|
|
270
337
|
colorSurfaceStrong?: string;
|
|
271
338
|
colorBorder?: string;
|
|
272
339
|
colorBorderMuted?: string;
|
|
273
340
|
colorSwitchBorder?: string;
|
|
341
|
+
colorText?: string;
|
|
342
|
+
colorTextSecondary?: string;
|
|
343
|
+
colorTextSubtle?: string;
|
|
344
|
+
colorTextInverted?: string;
|
|
345
|
+
colorTextTitle?: string;
|
|
346
|
+
colorLink?: string;
|
|
347
|
+
colorInputFocus?: string;
|
|
348
|
+
colorInputErrorFocus?: string;
|
|
349
|
+
colorSelectArrow?: string;
|
|
274
350
|
colorInfo?: string;
|
|
275
351
|
colorInfoBg?: string;
|
|
276
352
|
colorSuccess?: string;
|
|
@@ -282,10 +358,29 @@ declare interface SoyioAppearanceVariables {
|
|
|
282
358
|
colorOverlay?: string;
|
|
283
359
|
}
|
|
284
360
|
|
|
285
|
-
declare type SoyioBaseRule = '.MainContainer' | '.Button' | '.Checkbox' | '.CheckboxInput' | '.CheckboxLabel' | '.Input' | '.Label' | '.Title' | '.Link' | '.Card' | '.Select' | '.Loader' | '.TextArea' | '.ErrorMessage' | '.Description' | '.Switch' | '.SwitchRoot' | '.SwitchThumb' | '.SwitchIcon' | '.Alert' | '.
|
|
361
|
+
declare type SoyioBaseRule = '.MainContainer' | '.Button' | '.Checkbox' | '.CheckboxInput' | '.CheckboxLabel' | '.Input' | '.Label' | '.HintIcon' | '.Title' | '.StepTitle' | '.Link' | '.Card' | '.CardTitle' | '.Select' | '.Loader' | '.TextArea' | '.ErrorMessage' | '.Description' | '.Switch' | '.SwitchRoot' | '.SwitchThumb' | '.SwitchIcon' | '.Alert' | '.AlertIcon' | '.AlertContent' | '.Radio' | '.RadioButton' | '.RadioIndicator' | '.RadioLabel' | '.Chip' | '.Dialog' | '.DialogOverlay' | '.DialogContent' | '.DialogTitle' | '.DialogDescription' | '.Combobox' | '.NinInput' | '.TrackingCodeInput' | '.TrackingCodeInputCell' | '.TrackingCodeInputSeparator' | '.RadioCard' | '.RadioCardButton' | '.RadioCardIndicator' | '.RadioCardTitle' | '.StepIndicatorContainer' | '.StepIndicator' | '.StepIndicatorLine' | '.StepIndicatorIcon' | '.StepIndicatorDot' | '.StepIndicatorNumber' | '.TooltipContent';
|
|
286
362
|
|
|
287
363
|
declare type SoyioElementState = '--checked';
|
|
288
364
|
|
|
365
|
+
declare interface SoyioIconConfig {
|
|
366
|
+
/**
|
|
367
|
+
* Icon weight/style variant.
|
|
368
|
+
* - thin: Thinnest stroke
|
|
369
|
+
* - light: Light stroke
|
|
370
|
+
* - regular: Default stroke (default)
|
|
371
|
+
* - bold: Bold stroke
|
|
372
|
+
* - fill: Filled/solid icons
|
|
373
|
+
* - duotone: Two-tone icons with opacity
|
|
374
|
+
* @default 'regular'
|
|
375
|
+
*/
|
|
376
|
+
weight?: IconWeight;
|
|
377
|
+
/**
|
|
378
|
+
* Default icon size in pixels.
|
|
379
|
+
* @default 24
|
|
380
|
+
*/
|
|
381
|
+
size?: number;
|
|
382
|
+
}
|
|
383
|
+
|
|
289
384
|
declare type SoyioPseudoClass = ':hover' | ':focus' | ':active' | ':disabled' | ':autofill' | ':focus-visible';
|
|
290
385
|
|
|
291
386
|
declare type SoyioPseudoElement = '::placeholder' | '::selection';
|
|
@@ -294,9 +389,11 @@ declare type SoyioRule = {
|
|
|
294
389
|
[K in SoyioRuleKey]?: CSSProperties;
|
|
295
390
|
};
|
|
296
391
|
|
|
297
|
-
declare type SoyioRuleKey = `${SoyioBaseRule}${SoyioElementState | SoyioPseudoClass | SoyioPseudoElement | ''}
|
|
392
|
+
declare type SoyioRuleKey = `${SoyioBaseRule}${SoyioElementState | SoyioPseudoClass | SoyioPseudoElement | ''}` | SoyioStateRule;
|
|
393
|
+
|
|
394
|
+
declare type SoyioStateRule = '.Input--error' | '.Alert--error' | '.Alert--warning' | '.Alert--info' | '.Alert--success' | '.Chip--info' | '.Chip--green' | '.Chip--red' | '.Chip--amber' | '.RadioCard--checked' | '.RadioCardIndicator--checked' | '.StepIndicator--active' | '.StepIndicator--completed' | '.StepIndicator--pending' | '.StepIndicatorLine--top' | '.StepIndicatorLine--bottom';
|
|
298
395
|
|
|
299
|
-
declare type SoyioTheme = 'soyio';
|
|
396
|
+
declare type SoyioTheme = 'soyio' | 'night' | 'flat';
|
|
300
397
|
|
|
301
398
|
declare namespace SoyioTypes {
|
|
302
399
|
export {
|