@sentropic/design-system-svelte 0.10.1 → 0.10.3
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/Accordion.svelte +11 -3
- package/dist/Alert.svelte +46 -7
- package/dist/Badge.svelte +16 -7
- package/dist/Breadcrumb.svelte +11 -1
- package/dist/Button.svelte +11 -2
- package/dist/Checkbox.svelte +7 -2
- package/dist/ForceGraph.svelte +483 -0
- package/dist/ForceGraph.svelte.d.ts +75 -0
- package/dist/ForceGraph.svelte.d.ts.map +1 -0
- package/dist/Header.svelte +241 -2
- package/dist/Header.svelte.d.ts +37 -0
- package/dist/Header.svelte.d.ts.map +1 -1
- package/dist/Pagination.svelte +24 -6
- package/dist/Radio.svelte +10 -2
- package/dist/Search.svelte +13 -1
- package/dist/Switch.svelte +11 -9
- package/dist/Tabs.svelte +4 -1
- package/dist/Tag.svelte +18 -10
- package/dist/Toggle.svelte +17 -6
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/package.json +4 -4
package/dist/Accordion.svelte
CHANGED
|
@@ -115,14 +115,22 @@
|
|
|
115
115
|
align-items: center;
|
|
116
116
|
background: transparent;
|
|
117
117
|
border: 0;
|
|
118
|
-
|
|
118
|
+
/* Trigger colour (P-B): per theme. Default = primary text (inherited base
|
|
119
|
+
render); DSFR = Bleu France, Carbon = primary. */
|
|
120
|
+
color: var(--st-component-accordion-text, inherit);
|
|
119
121
|
cursor: pointer;
|
|
120
122
|
display: flex;
|
|
121
123
|
font: inherit;
|
|
122
|
-
|
|
124
|
+
/* Per-theme trigger typography (P-B). Defaults reproduce the prior render:
|
|
125
|
+
font-size inherits the heading size (≈18.72px), weight 600, normal
|
|
126
|
+
line-height. DSFR pins 16px / 500 / 24px, Carbon 13.33px / 400. */
|
|
127
|
+
font-size: var(--st-component-accordion-fontSize, inherit);
|
|
128
|
+
font-weight: var(--st-component-accordion-fontWeight, 600);
|
|
129
|
+
line-height: var(--st-component-accordion-lineHeight, normal);
|
|
123
130
|
gap: 0.75rem;
|
|
124
131
|
justify-content: space-between;
|
|
125
|
-
padding: 0.875rem
|
|
132
|
+
padding: var(--st-component-accordion-paddingBlock, 0.875rem)
|
|
133
|
+
var(--st-component-accordion-paddingInline, 0.5rem);
|
|
126
134
|
text-align: start;
|
|
127
135
|
transition: background-color var(--st-motion-fast, 120ms) var(--st-motion-easing, ease);
|
|
128
136
|
width: 100%;
|
package/dist/Alert.svelte
CHANGED
|
@@ -41,30 +41,69 @@
|
|
|
41
41
|
<style>
|
|
42
42
|
.st-alert {
|
|
43
43
|
background: var(--st-component-alert-background, var(--st-semantic-surface-raised));
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
/* Per-side box border (P-B): top/right/bottom resolve per theme (base = 1px
|
|
45
|
+
subtle box; DSFR = none; Carbon = none — its only visible edge is the left
|
|
46
|
+
bar). Fallbacks reproduce the prior 1px subtle box. */
|
|
47
|
+
border-top: var(
|
|
48
|
+
--st-component-alert-borderTop,
|
|
49
|
+
1px solid var(--st-component-alert-border, var(--st-semantic-border-subtle))
|
|
50
|
+
);
|
|
51
|
+
border-right: var(
|
|
52
|
+
--st-component-alert-borderRight,
|
|
53
|
+
1px solid var(--st-component-alert-border, var(--st-semantic-border-subtle))
|
|
54
|
+
);
|
|
55
|
+
border-bottom: var(
|
|
56
|
+
--st-component-alert-borderBottom,
|
|
57
|
+
1px solid var(--st-component-alert-border, var(--st-semantic-border-subtle))
|
|
58
|
+
);
|
|
59
|
+
/* Left accent edge: a real left border of `accentWidth` (base 4px / Carbon
|
|
60
|
+
3px), coloured per severity via --alert-accent. DSFR sets accentWidth 0 and
|
|
61
|
+
draws the accent as a ::before filet instead (see below). */
|
|
62
|
+
border-left-style: solid;
|
|
63
|
+
border-left-width: var(--st-component-alert-accentWidth, 0.25rem);
|
|
64
|
+
border-left-color: var(--alert-accent, var(--st-semantic-feedback-info));
|
|
46
65
|
border-radius: 0;
|
|
47
66
|
color: var(--st-component-alert-text, var(--st-semantic-text-primary));
|
|
48
67
|
display: flex;
|
|
68
|
+
font-size: var(--st-component-alert-fontSize, inherit);
|
|
69
|
+
line-height: var(--st-component-alert-lineHeight, normal);
|
|
70
|
+
letter-spacing: var(--st-component-alert-letterSpacing, normal);
|
|
49
71
|
gap: var(--st-spacing-4, 1rem);
|
|
50
72
|
justify-content: space-between;
|
|
51
|
-
|
|
73
|
+
position: relative;
|
|
74
|
+
padding: var(--st-component-alert-paddingTop, var(--st-spacing-4, 1rem))
|
|
75
|
+
var(--st-component-alert-paddingRight, var(--st-spacing-4, 1rem))
|
|
76
|
+
var(--st-component-alert-paddingBottom, var(--st-spacing-4, 1rem))
|
|
77
|
+
var(--st-component-alert-paddingLeft, var(--st-spacing-4, 1rem));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Severity filet (DSFR): a left bar drawn as a ::before INSIDE the box, so it
|
|
81
|
+
adds NO measured border (the real `.fr-alert` accent technique). Width 0 by
|
|
82
|
+
default (base/Carbon use a real left border) → the bar is invisible. */
|
|
83
|
+
.st-alert::before {
|
|
84
|
+
background: var(--alert-accent, var(--st-semantic-feedback-info));
|
|
85
|
+
bottom: 0;
|
|
86
|
+
content: "";
|
|
87
|
+
left: 0;
|
|
88
|
+
position: absolute;
|
|
89
|
+
top: 0;
|
|
90
|
+
width: var(--st-component-alert-filetWidth, 0);
|
|
52
91
|
}
|
|
53
92
|
|
|
54
93
|
.st-alert--info {
|
|
55
|
-
|
|
94
|
+
--alert-accent: var(--st-component-alert-infoBorder, var(--st-semantic-feedback-info));
|
|
56
95
|
}
|
|
57
96
|
|
|
58
97
|
.st-alert--success {
|
|
59
|
-
|
|
98
|
+
--alert-accent: var(--st-component-alert-successBorder, var(--st-semantic-feedback-success));
|
|
60
99
|
}
|
|
61
100
|
|
|
62
101
|
.st-alert--warning {
|
|
63
|
-
|
|
102
|
+
--alert-accent: var(--st-component-alert-warningBorder, var(--st-semantic-feedback-warning));
|
|
64
103
|
}
|
|
65
104
|
|
|
66
105
|
.st-alert--error {
|
|
67
|
-
|
|
106
|
+
--alert-accent: var(--st-component-alert-errorBorder, var(--st-semantic-feedback-error));
|
|
68
107
|
}
|
|
69
108
|
|
|
70
109
|
.st-alert__content {
|
package/dist/Badge.svelte
CHANGED
|
@@ -18,14 +18,20 @@
|
|
|
18
18
|
</span>
|
|
19
19
|
|
|
20
20
|
<style>
|
|
21
|
+
/* P-C: per-theme badge anatomy. Every var falls back to the prior base literal,
|
|
22
|
+
so a theme that emits no `--st-component-badge-*` renders byte-identically. */
|
|
21
23
|
.st-badge {
|
|
22
24
|
display: inline-flex;
|
|
23
25
|
align-items: center;
|
|
24
|
-
border-radius: var(--st-radius-pill, 999px);
|
|
25
|
-
font-size: 0.75rem;
|
|
26
|
-
font-weight: 650;
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
border-radius: var(--st-component-badge-radius, var(--st-radius-pill, 999px));
|
|
27
|
+
font-size: var(--st-component-badge-fontSize, 0.75rem);
|
|
28
|
+
font-weight: var(--st-component-badge-fontWeight, 650);
|
|
29
|
+
letter-spacing: var(--st-component-badge-letterSpacing, normal);
|
|
30
|
+
line-height: var(--st-component-badge-lineHeight, 1);
|
|
31
|
+
min-height: var(--st-component-badge-minHeight, 0);
|
|
32
|
+
padding: var(--st-component-badge-paddingBlock, 0.25rem)
|
|
33
|
+
var(--st-component-badge-paddingInline, 0.5rem);
|
|
34
|
+
text-transform: var(--st-component-badge-textTransform, none);
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
.st-badge--neutral {
|
|
@@ -49,7 +55,10 @@
|
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
.st-badge--info {
|
|
52
|
-
background:
|
|
53
|
-
|
|
58
|
+
background: var(
|
|
59
|
+
--st-component-badge-infoBackground,
|
|
60
|
+
color-mix(in srgb, var(--st-semantic-feedback-info) 14%, white)
|
|
61
|
+
);
|
|
62
|
+
color: var(--st-component-badge-infoText, var(--st-semantic-feedback-info));
|
|
54
63
|
}
|
|
55
64
|
</style>
|
package/dist/Breadcrumb.svelte
CHANGED
|
@@ -35,6 +35,16 @@
|
|
|
35
35
|
</nav>
|
|
36
36
|
|
|
37
37
|
<style>
|
|
38
|
+
/* F10: breadcrumb typography on the root so the trail/link/separator inherit
|
|
39
|
+
the per-theme size/line-height/tracking. Defaults (inherit / normal) keep
|
|
40
|
+
the base Sent Tech render byte-identical; DSFR/Carbon pin their real metrics
|
|
41
|
+
(DSFR 12px/20px, Carbon 14px/18px/0.16px). */
|
|
42
|
+
.st-breadcrumb {
|
|
43
|
+
font-size: var(--st-component-breadcrumb-fontSize, inherit);
|
|
44
|
+
letter-spacing: var(--st-component-breadcrumb-letterSpacing, normal);
|
|
45
|
+
line-height: var(--st-component-breadcrumb-lineHeight, normal);
|
|
46
|
+
}
|
|
47
|
+
|
|
38
48
|
.st-breadcrumb ol {
|
|
39
49
|
align-items: center;
|
|
40
50
|
display: flex;
|
|
@@ -58,7 +68,7 @@
|
|
|
58
68
|
|
|
59
69
|
.st-breadcrumb [aria-current="page"] {
|
|
60
70
|
color: var(--st-component-breadcrumb-currentText, var(--st-semantic-text-primary));
|
|
61
|
-
font-weight: 600;
|
|
71
|
+
font-weight: var(--st-component-breadcrumb-currentWeight, 600);
|
|
62
72
|
}
|
|
63
73
|
|
|
64
74
|
.st-breadcrumb__separator {
|
package/dist/Button.svelte
CHANGED
|
@@ -97,10 +97,15 @@
|
|
|
97
97
|
color: var(--st-component-button-primaryText, var(--st-semantic-action-primaryText));
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/* Secondary (G1): the surface is per-theme. Base/Carbon = filled neutral with
|
|
101
|
+
a subtle stroke; DSFR « Bouton secondaire » = transparent fill + a 1px Bleu
|
|
102
|
+
France border + Bleu France text (outlined, not a light-blue fill). The
|
|
103
|
+
border colour reads its own component token so a theme can paint it Bleu
|
|
104
|
+
France; the fallback (--st-semantic-border-subtle) keeps the base render. */
|
|
100
105
|
.st-button--secondary {
|
|
101
106
|
background: var(--st-component-button-secondaryBackground, var(--st-semantic-action-secondary));
|
|
102
107
|
color: var(--st-component-button-secondaryText, var(--st-semantic-action-secondaryText));
|
|
103
|
-
border-color: var(--st-semantic-border-subtle);
|
|
108
|
+
border-color: var(--st-component-button-secondaryBorder, var(--st-semantic-border-subtle));
|
|
104
109
|
}
|
|
105
110
|
|
|
106
111
|
/* Anatomy v1.1.0: hover bg sourced from states.hover.bg (= primaryHover).
|
|
@@ -109,8 +114,12 @@
|
|
|
109
114
|
background: var(--st-component-button-anatomy-states-hover-bg, var(--st-semantic-action-primary));
|
|
110
115
|
}
|
|
111
116
|
|
|
117
|
+
/* Secondary hover (G1): a per-theme hover surface — DSFR puts a LIGHT Bleu
|
|
118
|
+
France fill on its otherwise-transparent outlined button. The component
|
|
119
|
+
token falls back to the base secondary hover surface so Sent Tech is
|
|
120
|
+
unchanged. */
|
|
112
121
|
.st-button--secondary:not(:disabled):hover {
|
|
113
|
-
background: var(--st-semantic-action-secondaryHover, var(--st-semantic-action-secondary));
|
|
122
|
+
background: var(--st-component-button-secondaryHoverBackground, var(--st-semantic-action-secondaryHover, var(--st-semantic-action-secondary)));
|
|
114
123
|
}
|
|
115
124
|
|
|
116
125
|
.st-button--ghost {
|
package/dist/Checkbox.svelte
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
let { label, helperText, invalid = false, class: className, ...rest }: CheckboxProps = $props();
|
|
12
|
-
const classes = () => ["st-choice", className].filter(Boolean).join(" ");
|
|
12
|
+
const classes = () => ["st-choice", "st-choice--checkbox", className].filter(Boolean).join(" ");
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<label class={classes()}>
|
|
@@ -69,7 +69,12 @@
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.st-choice__label {
|
|
72
|
-
|
|
72
|
+
/* P-D: label typography per theme (base = 15px / normal / inherited colour).
|
|
73
|
+
The checked control colour + focus stay on the native input above. */
|
|
74
|
+
color: var(--st-component-selection-choiceLabelColor, inherit);
|
|
75
|
+
font-size: var(--st-component-selection-choiceLabelFontSize, 0.9375rem);
|
|
76
|
+
line-height: var(--st-component-selection-choiceLabelLineHeight, normal);
|
|
77
|
+
letter-spacing: var(--st-component-selection-choiceLabelLetterSpacing, normal);
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
.st-choice__help {
|