@sentropic/design-system-svelte 0.10.2 → 0.10.4
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/AreaChart.svelte +38 -26
- package/dist/AreaChart.svelte.d.ts.map +1 -1
- package/dist/BackToTop.svelte +157 -0
- package/dist/BackToTop.svelte.d.ts +14 -0
- package/dist/BackToTop.svelte.d.ts.map +1 -0
- package/dist/BarChart.svelte +38 -39
- package/dist/BarChart.svelte.d.ts.map +1 -1
- package/dist/Card.svelte +2 -0
- package/dist/ChartDataList.svelte +33 -0
- package/dist/ChartDataList.svelte.d.ts +9 -0
- package/dist/ChartDataList.svelte.d.ts.map +1 -0
- package/dist/ChatComposer.svelte +20 -3
- package/dist/ChatComposer.svelte.d.ts +6 -30
- package/dist/ChatComposer.svelte.d.ts.map +1 -1
- package/dist/Checkbox.svelte +4 -0
- package/dist/Combobox.svelte +1 -1
- package/dist/ContentSwitcher.svelte +1 -0
- package/dist/DataTable.svelte +4 -1
- package/dist/DatePicker.svelte +1 -1
- package/dist/DisplaySettings.svelte +210 -0
- package/dist/DisplaySettings.svelte.d.ts +24 -0
- package/dist/DisplaySettings.svelte.d.ts.map +1 -0
- package/dist/DonutChart.svelte +44 -29
- package/dist/DonutChart.svelte.d.ts.map +1 -1
- package/dist/Dropdown.svelte +1 -1
- package/dist/FileUploader.svelte +2 -2
- package/dist/ForceGraph.svelte +485 -22
- package/dist/ForceGraph.svelte.d.ts +48 -0
- package/dist/ForceGraph.svelte.d.ts.map +1 -1
- package/dist/GraphLegend.svelte +142 -0
- package/dist/GraphLegend.svelte.d.ts +12 -0
- package/dist/GraphLegend.svelte.d.ts.map +1 -0
- package/dist/Header.svelte +2 -1
- package/dist/IconButton.svelte +1 -1
- package/dist/InlineLoading.svelte +10 -1
- package/dist/InlineLoading.svelte.d.ts.map +1 -1
- package/dist/Input.svelte +3 -2
- package/dist/LanguageSelector.svelte +2 -1
- package/dist/LineChart.svelte +38 -26
- package/dist/LineChart.svelte.d.ts.map +1 -1
- package/dist/Link.svelte +7 -1
- package/dist/MediaContent.svelte +124 -0
- package/dist/MediaContent.svelte.d.ts +22 -0
- package/dist/MediaContent.svelte.d.ts.map +1 -0
- package/dist/Menu.svelte +56 -3
- package/dist/Menu.svelte.d.ts.map +1 -1
- package/dist/MessageStatusBadge.svelte +1 -1
- package/dist/MultiSelect.svelte +2 -2
- package/dist/Notification.svelte +150 -0
- package/dist/Notification.svelte.d.ts +17 -0
- package/dist/Notification.svelte.d.ts.map +1 -0
- package/dist/NumberInput.svelte +1 -0
- package/dist/OverflowMenu.svelte +84 -13
- package/dist/OverflowMenu.svelte.d.ts.map +1 -1
- package/dist/Pagination.svelte +7 -0
- package/dist/PaginationNav.svelte +2 -2
- package/dist/ProgressIndicator.svelte +13 -1
- package/dist/ProgressIndicator.svelte.d.ts +1 -0
- package/dist/ProgressIndicator.svelte.d.ts.map +1 -1
- package/dist/Radio.svelte +7 -3
- package/dist/ScatterPlot.svelte +64 -45
- package/dist/ScatterPlot.svelte.d.ts.map +1 -1
- package/dist/Search.svelte +6 -3
- package/dist/Select.svelte +8 -2
- package/dist/SideNav.svelte +6 -0
- package/dist/StackedBarChart.svelte +51 -30
- package/dist/StackedBarChart.svelte.d.ts.map +1 -1
- package/dist/StreamingMessage.svelte +2 -2
- package/dist/Switch.svelte +4 -0
- package/dist/Table.svelte +4 -1
- package/dist/TableOfContents.svelte +109 -0
- package/dist/TableOfContents.svelte.d.ts +16 -0
- package/dist/TableOfContents.svelte.d.ts.map +1 -0
- package/dist/Tag.svelte +1 -1
- package/dist/Textarea.svelte +3 -2
- package/dist/Tile.svelte +4 -0
- package/dist/TileGroup.svelte +4 -0
- package/dist/Toggle.svelte +4 -0
- package/dist/Toggletip.svelte +1 -1
- package/dist/Transcription.svelte +135 -0
- package/dist/Transcription.svelte.d.ts +19 -0
- package/dist/Transcription.svelte.d.ts.map +1 -0
- package/dist/TreeView.svelte +2 -2
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/package.json +2 -2
package/dist/ScatterPlot.svelte
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<script lang="ts">
|
|
15
|
+
import ChartDataList from "./ChartDataList.svelte";
|
|
16
|
+
|
|
15
17
|
type ScatterPlotProps = {
|
|
16
18
|
data: ScatterPlotDatum[];
|
|
17
19
|
width?: number;
|
|
@@ -95,51 +97,69 @@
|
|
|
95
97
|
}));
|
|
96
98
|
});
|
|
97
99
|
|
|
100
|
+
const dataValueItems = $derived(
|
|
101
|
+
data.map((d) => (d.label ? `${d.label}: x ${d.x}, y ${d.y}` : `x ${d.x}, y ${d.y}`))
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
function handleVisualPointerMove(event: PointerEvent) {
|
|
105
|
+
const target = event.target;
|
|
106
|
+
if (!(target instanceof Element)) {
|
|
107
|
+
hoveredIndex = null;
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const index = Number(target.getAttribute("data-chart-index"));
|
|
111
|
+
hoveredIndex = Number.isInteger(index) ? index : null;
|
|
112
|
+
}
|
|
113
|
+
|
|
98
114
|
const classes = () => ["st-scatterPlot", className].filter(Boolean).join(" ");
|
|
99
115
|
</script>
|
|
100
116
|
|
|
101
|
-
<div class={classes()}
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
117
|
+
<div class={classes()}>
|
|
118
|
+
<div
|
|
119
|
+
class="st-scatterPlot__visual"
|
|
120
|
+
role="img"
|
|
121
|
+
aria-label={label}
|
|
122
|
+
onpointermove={handleVisualPointerMove}
|
|
123
|
+
onpointerleave={() => (hoveredIndex = null)}
|
|
124
|
+
>
|
|
125
|
+
<svg viewBox="0 0 {width} {height}" preserveAspectRatio="xMidYMid meet" width="100%" height="100%" focusable="false" aria-hidden="true">
|
|
126
|
+
<!-- gridlines + ticks Y -->
|
|
127
|
+
{#each scales.yTicks as t (t)}
|
|
128
|
+
{@const y = MARGIN.top + scaleLinear(t, scales.yMin, scales.yMax, scales.plotH, 0)}
|
|
129
|
+
<line class="st-scatterPlot__grid" x1={MARGIN.left} x2={width - MARGIN.right} y1={y} y2={y} />
|
|
130
|
+
<text class="st-scatterPlot__tick" x={MARGIN.left - 6} y={y} text-anchor="end" dominant-baseline="middle">{fmt(t)}</text>
|
|
131
|
+
{/each}
|
|
132
|
+
<!-- ticks X -->
|
|
133
|
+
{#each scales.xTicks as t (t)}
|
|
134
|
+
{@const x = MARGIN.left + scaleLinear(t, scales.xMin, scales.xMax, 0, scales.plotW)}
|
|
135
|
+
<text class="st-scatterPlot__tick" x={x} y={height - MARGIN.bottom + 16} text-anchor="middle">{fmt(t)}</text>
|
|
136
|
+
{/each}
|
|
137
|
+
|
|
138
|
+
<!-- axes -->
|
|
139
|
+
<line class="st-scatterPlot__axis" x1={MARGIN.left} x2={MARGIN.left} y1={MARGIN.top} y2={height - MARGIN.bottom} />
|
|
140
|
+
<line class="st-scatterPlot__axis" x1={MARGIN.left} x2={width - MARGIN.right} y1={height - MARGIN.bottom} y2={height - MARGIN.bottom} />
|
|
141
|
+
|
|
142
|
+
{#if xLabel}
|
|
143
|
+
<text class="st-scatterPlot__axisLabel" x={MARGIN.left + scales.plotW / 2} y={height - 4} text-anchor="middle">{xLabel}</text>
|
|
144
|
+
{/if}
|
|
145
|
+
{#if yLabel}
|
|
146
|
+
<text class="st-scatterPlot__axisLabel" x={12} y={MARGIN.top + scales.plotH / 2} text-anchor="middle" transform="rotate(-90 12 {MARGIN.top + scales.plotH / 2})">{yLabel}</text>
|
|
147
|
+
{/if}
|
|
148
|
+
|
|
149
|
+
<!-- points -->
|
|
150
|
+
{#each points as p, i (i)}
|
|
151
|
+
<circle
|
|
152
|
+
class="st-scatterPlot__point st-scatterPlot__point--{p.tone}"
|
|
153
|
+
cx={p.cx}
|
|
154
|
+
cy={p.cy}
|
|
155
|
+
r={radius}
|
|
156
|
+
data-chart-index={i}
|
|
157
|
+
/>
|
|
158
|
+
{/each}
|
|
159
|
+
</svg>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<ChartDataList {label} items={dataValueItems} />
|
|
143
163
|
|
|
144
164
|
{#if hoveredIndex !== null && points[hoveredIndex]}
|
|
145
165
|
{@const p = points[hoveredIndex]}
|
|
@@ -152,14 +172,13 @@
|
|
|
152
172
|
|
|
153
173
|
<style>
|
|
154
174
|
.st-scatterPlot { color: var(--st-semantic-text-secondary); display: block; font-family: inherit; position: relative; width: 100%; }
|
|
155
|
-
.st-scatterPlot svg { display: block; overflow: visible; }
|
|
175
|
+
.st-scatterPlot svg, .st-scatterPlot__visual { display: block; overflow: visible; }
|
|
156
176
|
.st-scatterPlot__grid { stroke: var(--st-semantic-border-subtle); stroke-dasharray: 2 3; stroke-width: 1; opacity: 0.7; }
|
|
157
177
|
.st-scatterPlot__axis { stroke: var(--st-semantic-border-subtle); stroke-width: 1; }
|
|
158
178
|
.st-scatterPlot__tick { fill: var(--st-semantic-text-secondary); font-size: 0.6875rem; }
|
|
159
179
|
.st-scatterPlot__axisLabel { fill: var(--st-semantic-text-secondary); font-size: 0.75rem; font-weight: 600; }
|
|
160
180
|
.st-scatterPlot__point { cursor: pointer; fill-opacity: 0.85; transition: fill-opacity 120ms ease, r 120ms ease; }
|
|
161
|
-
.st-scatterPlot__point:hover
|
|
162
|
-
.st-scatterPlot__point:focus-visible { outline: 2px solid var(--st-semantic-border-interactive); outline-offset: 1px; }
|
|
181
|
+
.st-scatterPlot__point:hover { fill-opacity: 1; }
|
|
163
182
|
.st-scatterPlot__point--category1 { fill: var(--st-semantic-data-category1); }
|
|
164
183
|
.st-scatterPlot__point--category2 { fill: var(--st-semantic-data-category2); }
|
|
165
184
|
.st-scatterPlot__point--category3 { fill: var(--st-semantic-data-category3); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScatterPlot.svelte.d.ts","sourceRoot":"","sources":["../src/lib/ScatterPlot.svelte.ts"],"names":[],"mappings":"AAGE,MAAM,MAAM,eAAe,GACvB,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GACrD,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"ScatterPlot.svelte.d.ts","sourceRoot":"","sources":["../src/lib/ScatterPlot.svelte.ts"],"names":[],"mappings":"AAGE,MAAM,MAAM,eAAe,GACvB,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GACrD,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB,CAAC;AAMF,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,gBAAgB,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAgJJ,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
package/dist/Search.svelte
CHANGED
|
@@ -121,14 +121,17 @@
|
|
|
121
121
|
the Input field box); bottom corners keep the field shape radius. */
|
|
122
122
|
border-top-left-radius: var(--st-component-control-anatomy-field-radiusTop, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
123
123
|
border-top-right-radius: var(--st-component-control-anatomy-field-radiusTop, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
124
|
-
border-bottom-right-radius: var(--st-component-control-anatomy-shape-radius, 0.375rem);
|
|
125
|
-
border-bottom-left-radius: var(--st-component-control-anatomy-shape-radius, 0.375rem);
|
|
124
|
+
border-bottom-right-radius: var(--st-component-control-anatomy-field-radiusBottom, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
125
|
+
border-bottom-left-radius: var(--st-component-control-anatomy-field-radiusBottom, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
126
126
|
color: var(--st-component-control-text, var(--st-semantic-text-primary));
|
|
127
127
|
display: inline-flex;
|
|
128
128
|
/* P-D: field-box padding + input typography per theme. Default = the prior
|
|
129
129
|
render (0 padding on the wrapper, inherited 16px / `normal` typography);
|
|
130
130
|
DSFR pads 8/16px, Carbon 0/40px to match the measured reference input. */
|
|
131
|
-
padding: var(--st-component-search-paddingBlock, 0)
|
|
131
|
+
padding: var(--st-component-search-paddingBlock, 0)
|
|
132
|
+
var(--st-component-search-paddingRight, var(--st-component-search-paddingInline, 0))
|
|
133
|
+
var(--st-component-search-paddingBlock, 0)
|
|
134
|
+
var(--st-component-search-paddingLeft, var(--st-component-search-paddingInline, 0));
|
|
132
135
|
font-size: var(--st-component-search-fontSize, 1rem);
|
|
133
136
|
line-height: var(--st-component-search-lineHeight, normal);
|
|
134
137
|
letter-spacing: var(--st-component-search-letterSpacing, normal);
|
package/dist/Select.svelte
CHANGED
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
rounded box with no underline shadow → base Sent Tech unchanged. */
|
|
110
110
|
border-top-left-radius: var(--st-component-control-anatomy-field-radiusTop, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
111
111
|
border-top-right-radius: var(--st-component-control-anatomy-field-radiusTop, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
112
|
-
border-bottom-right-radius: var(--st-component-control-anatomy-shape-radius, 0.375rem);
|
|
113
|
-
border-bottom-left-radius: var(--st-component-control-anatomy-shape-radius, 0.375rem);
|
|
112
|
+
border-bottom-right-radius: var(--st-component-control-anatomy-field-radiusBottom, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
113
|
+
border-bottom-left-radius: var(--st-component-control-anatomy-field-radiusBottom, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
114
114
|
box-shadow: var(--st-component-control-anatomy-field-underline, none);
|
|
115
115
|
color: var(--st-component-control-text, var(--st-semantic-text-primary));
|
|
116
116
|
font-family: var(--st-component-control-anatomy-typography-family, inherit);
|
|
@@ -136,6 +136,12 @@
|
|
|
136
136
|
width: 100%;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
.st-select:hover {
|
|
140
|
+
background:
|
|
141
|
+
var(--st-component-control-anatomy-field-selectChevron, none),
|
|
142
|
+
var(--st-component-control-hoverBackground, var(--st-component-control-anatomy-field-fillBg, var(--st-component-control-background, var(--st-semantic-surface-default))));
|
|
143
|
+
}
|
|
144
|
+
|
|
139
145
|
.st-select--sm {
|
|
140
146
|
min-height: var(--st-component-control-smHeight, 2rem);
|
|
141
147
|
}
|
package/dist/SideNav.svelte
CHANGED
|
@@ -55,6 +55,12 @@
|
|
|
55
55
|
text-decoration: none;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
.st-sidenav a:hover:not(:focus-visible):not(.st-sidenav__link--active),
|
|
59
|
+
.st-sidenav a:focus-visible:not(.st-sidenav__link--active) {
|
|
60
|
+
background: var(--st-component-control-hoverBackground, var(--st-semantic-surface-subtle));
|
|
61
|
+
outline: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
58
64
|
.st-sidenav__link--active {
|
|
59
65
|
background: var(--st-component-sideNav-activeBackground, var(--st-semantic-surface-subtle));
|
|
60
66
|
color: var(--st-component-sideNav-activeText, var(--st-semantic-text-primary));
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<script lang="ts">
|
|
19
|
+
import ChartDataList from "./ChartDataList.svelte";
|
|
20
|
+
|
|
19
21
|
type StackedBarChartProps = {
|
|
20
22
|
data: StackedBarDatum[];
|
|
21
23
|
width?: number;
|
|
@@ -98,38 +100,58 @@
|
|
|
98
100
|
});
|
|
99
101
|
});
|
|
100
102
|
|
|
103
|
+
const dataValueItems = $derived(
|
|
104
|
+
data.flatMap((bar) => bar.segments.map((seg) => `${bar.label}, ${seg.label}: ${seg.value}`))
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
function handleVisualPointerMove(event: PointerEvent) {
|
|
108
|
+
const target = event.target;
|
|
109
|
+
if (!(target instanceof Element)) {
|
|
110
|
+
hovered = null;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const bar = Number(target.getAttribute("data-bar-index"));
|
|
114
|
+
const seg = Number(target.getAttribute("data-segment-index"));
|
|
115
|
+
hovered = Number.isInteger(bar) && Number.isInteger(seg) ? { bar, seg } : null;
|
|
116
|
+
}
|
|
117
|
+
|
|
101
118
|
const classes = () => ["st-stackedBar", className].filter(Boolean).join(" ");
|
|
102
119
|
</script>
|
|
103
120
|
|
|
104
|
-
<div class={classes()}
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
{
|
|
111
|
-
|
|
112
|
-
<
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
{#each bar.segs as s, si (s.seg.label)}
|
|
118
|
-
<rect
|
|
119
|
-
class="st-stackedBar__seg st-stackedBar__seg--{s.tone}"
|
|
120
|
-
class:st-stackedBar__seg--dim={hovered !== null && !(hovered.bar === bi && hovered.seg === si)}
|
|
121
|
-
x={s.x} y={s.y} width={s.width} height={s.height}
|
|
122
|
-
tabindex="0"
|
|
123
|
-
role="img"
|
|
124
|
-
aria-label="{bar.label} — {s.seg.label}: {s.seg.value}"
|
|
125
|
-
onmouseenter={() => (hovered = { bar: bi, seg: si })}
|
|
126
|
-
onmouseleave={() => (hovered = null)}
|
|
127
|
-
onfocus={() => (hovered = { bar: bi, seg: si })}
|
|
128
|
-
onblur={() => (hovered = null)}
|
|
129
|
-
/>
|
|
121
|
+
<div class={classes()}>
|
|
122
|
+
<div
|
|
123
|
+
class="st-stackedBar__visual"
|
|
124
|
+
role="img"
|
|
125
|
+
aria-label={label}
|
|
126
|
+
onpointermove={handleVisualPointerMove}
|
|
127
|
+
onpointerleave={() => (hovered = null)}
|
|
128
|
+
>
|
|
129
|
+
<svg viewBox="0 0 {width} {height}" preserveAspectRatio="xMidYMid meet" width="100%" height="100%" focusable="false" aria-hidden="true">
|
|
130
|
+
{#each scales.ticks as t (t)}
|
|
131
|
+
{@const y = MARGIN.top + scaleLinear(t, 0, scales.domainMax, scales.plotH, 0)}
|
|
132
|
+
<line class="st-stackedBar__grid" x1={MARGIN.left} x2={width - MARGIN.right} y1={y} y2={y} />
|
|
133
|
+
<text class="st-stackedBar__tick" x={MARGIN.left - 6} y={y} text-anchor="end" dominant-baseline="middle">{fmt(t)}</text>
|
|
130
134
|
{/each}
|
|
131
|
-
|
|
132
|
-
|
|
135
|
+
|
|
136
|
+
<line class="st-stackedBar__axis" x1={MARGIN.left} x2={MARGIN.left} y1={MARGIN.top} y2={height - MARGIN.bottom} />
|
|
137
|
+
<line class="st-stackedBar__axis" x1={MARGIN.left} x2={width - MARGIN.right} y1={height - MARGIN.bottom} y2={height - MARGIN.bottom} />
|
|
138
|
+
|
|
139
|
+
{#each bars as bar, bi (bar.label)}
|
|
140
|
+
<text class="st-stackedBar__categoryLabel" x={bar.cxLabel} y={height - MARGIN.bottom + 16} text-anchor="middle">{bar.label}</text>
|
|
141
|
+
{#each bar.segs as s, si (s.seg.label)}
|
|
142
|
+
<rect
|
|
143
|
+
class="st-stackedBar__seg st-stackedBar__seg--{s.tone}"
|
|
144
|
+
class:st-stackedBar__seg--dim={hovered !== null && !(hovered.bar === bi && hovered.seg === si)}
|
|
145
|
+
x={s.x} y={s.y} width={s.width} height={s.height}
|
|
146
|
+
data-bar-index={bi}
|
|
147
|
+
data-segment-index={si}
|
|
148
|
+
/>
|
|
149
|
+
{/each}
|
|
150
|
+
{/each}
|
|
151
|
+
</svg>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
<ChartDataList {label} items={dataValueItems} />
|
|
133
155
|
|
|
134
156
|
{#if hovered && bars[hovered.bar]?.segs[hovered.seg]}
|
|
135
157
|
{@const s = bars[hovered.bar].segs[hovered.seg]}
|
|
@@ -153,13 +175,12 @@
|
|
|
153
175
|
|
|
154
176
|
<style>
|
|
155
177
|
.st-stackedBar { color: var(--st-semantic-text-secondary); display: block; font-family: inherit; position: relative; width: 100%; }
|
|
156
|
-
.st-stackedBar svg { display: block; overflow: visible; }
|
|
178
|
+
.st-stackedBar svg, .st-stackedBar__visual { display: block; overflow: visible; }
|
|
157
179
|
.st-stackedBar__grid { stroke: var(--st-semantic-border-subtle); stroke-dasharray: 2 3; stroke-width: 1; opacity: 0.7; }
|
|
158
180
|
.st-stackedBar__axis { stroke: var(--st-semantic-border-subtle); stroke-width: 1; }
|
|
159
181
|
.st-stackedBar__tick, .st-stackedBar__categoryLabel { fill: var(--st-semantic-text-secondary); font-size: 0.6875rem; }
|
|
160
182
|
.st-stackedBar__seg { cursor: pointer; stroke: var(--st-semantic-surface-default, #fff); stroke-width: 1; transition: opacity 120ms ease; }
|
|
161
183
|
.st-stackedBar__seg--dim { opacity: 0.45; }
|
|
162
|
-
.st-stackedBar__seg:focus-visible { outline: 2px solid var(--st-semantic-border-interactive); outline-offset: 1px; }
|
|
163
184
|
.st-stackedBar__seg--category1 { fill: var(--st-semantic-data-category1); }
|
|
164
185
|
.st-stackedBar__seg--category2 { fill: var(--st-semantic-data-category2); }
|
|
165
186
|
.st-stackedBar__seg--category3 { fill: var(--st-semantic-data-category3); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedBarChart.svelte.d.ts","sourceRoot":"","sources":["../src/lib/StackedBarChart.svelte.ts"],"names":[],"mappings":"AAGE,MAAM,MAAM,cAAc,GACtB,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GACrD,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B,CAAC;
|
|
1
|
+
{"version":3,"file":"StackedBarChart.svelte.d.ts","sourceRoot":"","sources":["../src/lib/StackedBarChart.svelte.ts"],"names":[],"mappings":"AAGE,MAAM,MAAM,cAAc,GACtB,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GACrD,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B,CAAC;AAMF,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAiJJ,QAAA,MAAM,eAAe,0DAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
{#each toolCalls() as toolCall}
|
|
201
201
|
<li>
|
|
202
202
|
<span>{toolCall.toolName}</span>
|
|
203
|
-
<span
|
|
203
|
+
<span>: {toolCall.status}</span>
|
|
204
204
|
</li>
|
|
205
205
|
{/each}
|
|
206
206
|
</ul>
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
</ChatMessage>
|
|
246
246
|
|
|
247
247
|
<style>
|
|
248
|
-
.st-streamingMessage {
|
|
248
|
+
:global(.st-streamingMessage) {
|
|
249
249
|
position: relative;
|
|
250
250
|
}
|
|
251
251
|
|
package/dist/Switch.svelte
CHANGED
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
background: var(--st-component-selection-switchTrackChecked, var(--st-semantic-action-primary));
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
.st-switch__input:not(:disabled):not(:checked):hover + .st-switch__track {
|
|
70
|
+
background: var(--st-component-control-hoverBackground, var(--st-component-selection-switchTrack));
|
|
71
|
+
}
|
|
72
|
+
|
|
69
73
|
.st-switch__input:checked + .st-switch__track .st-switch__thumb {
|
|
70
74
|
transform: translateX(calc(var(--st-component-selection-toggleTrackWidth, 2.25rem) - var(--st-component-selection-toggleThumbSize, 1rem) - 2 * var(--st-component-selection-toggleTrackPadding, 0.125rem)));
|
|
71
75
|
}
|
package/dist/Table.svelte
CHANGED
|
@@ -87,7 +87,10 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.st-table tbody tr:hover {
|
|
90
|
-
background: var(
|
|
90
|
+
background: var(
|
|
91
|
+
--st-component-control-hoverBackground,
|
|
92
|
+
var(--st-component-dataTable-rowHoverBackground, var(--st-semantic-surface-subtle))
|
|
93
|
+
);
|
|
91
94
|
}
|
|
92
95
|
|
|
93
96
|
.st-table tbody tr:last-child td {
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
|
|
4
|
+
export interface TableOfContentsItem {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
level?: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type TableOfContentsProps = Omit<HTMLAttributes<HTMLElement>, "class" | "items"> & {
|
|
11
|
+
title?: string;
|
|
12
|
+
items: TableOfContentsItem[];
|
|
13
|
+
activeId?: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const normalizeItemId = (value: string) => value.replace(/^#/, "");
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
title,
|
|
21
|
+
items,
|
|
22
|
+
activeId = "",
|
|
23
|
+
class: className,
|
|
24
|
+
...rest
|
|
25
|
+
}: TableOfContentsProps = $props();
|
|
26
|
+
|
|
27
|
+
const normalizedActive = () => normalizeItemId(activeId);
|
|
28
|
+
const normalizedItems = () =>
|
|
29
|
+
items.map((item) => ({
|
|
30
|
+
...item,
|
|
31
|
+
id: normalizeItemId(item.id),
|
|
32
|
+
level: Math.max(item.level ?? 1, 1)
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
const classes = () => ["st-tableOfContents", className].filter(Boolean).join(" ");
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<nav {...rest} class={classes()} aria-label={title ?? "Table des matières"}>
|
|
39
|
+
{#if title}
|
|
40
|
+
<p class="st-tableOfContents__title">{title}</p>
|
|
41
|
+
{/if}
|
|
42
|
+
<ol class="st-tableOfContents__list">
|
|
43
|
+
{#each normalizedItems() as item (item.id)}
|
|
44
|
+
{@const isActive = item.id === normalizedActive()}
|
|
45
|
+
<li
|
|
46
|
+
class="st-tableOfContents__item"
|
|
47
|
+
style={`--st-tableOfContents-level:${item.level - 1}`}
|
|
48
|
+
>
|
|
49
|
+
<a
|
|
50
|
+
class="st-tableOfContents__link"
|
|
51
|
+
href={`#${item.id}`}
|
|
52
|
+
aria-current={isActive ? "location" : undefined}
|
|
53
|
+
>
|
|
54
|
+
{item.label}
|
|
55
|
+
</a>
|
|
56
|
+
</li>
|
|
57
|
+
{/each}
|
|
58
|
+
</ol>
|
|
59
|
+
</nav>
|
|
60
|
+
|
|
61
|
+
<style>
|
|
62
|
+
.st-tableOfContents {
|
|
63
|
+
border: 1px solid var(--st-semantic-border-subtle);
|
|
64
|
+
border-radius: 0.5rem;
|
|
65
|
+
padding: 0.75rem 0.875rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.st-tableOfContents__title {
|
|
69
|
+
color: var(--st-semantic-text-primary);
|
|
70
|
+
font-size: 0.8125rem;
|
|
71
|
+
font-weight: 600;
|
|
72
|
+
margin-bottom: 0.5rem;
|
|
73
|
+
text-transform: uppercase;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.st-tableOfContents__list {
|
|
77
|
+
list-style: none;
|
|
78
|
+
margin: 0;
|
|
79
|
+
padding-left: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.st-tableOfContents__item {
|
|
83
|
+
padding-inline-start: calc(var(--st-tableOfContents-level) * var(--st-spacing-4, 1rem));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.st-tableOfContents__item + .st-tableOfContents__item {
|
|
87
|
+
margin-top: 0.125rem;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.st-tableOfContents__link {
|
|
91
|
+
color: var(--st-semantic-text-secondary);
|
|
92
|
+
display: inline-block;
|
|
93
|
+
padding: 0.25rem 0;
|
|
94
|
+
text-decoration: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.st-tableOfContents__link:hover,
|
|
98
|
+
.st-tableOfContents__link:focus-visible {
|
|
99
|
+
color: var(--st-semantic-text-primary);
|
|
100
|
+
text-decoration: underline;
|
|
101
|
+
text-underline-offset: 0.15em;
|
|
102
|
+
background: var(--st-component-control-hoverBackground, var(--st-semantic-surface-subtle));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.st-tableOfContents__link[aria-current="location"] {
|
|
106
|
+
color: var(--st-semantic-text-primary);
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
}
|
|
109
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
export interface TableOfContentsItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
level?: number;
|
|
6
|
+
}
|
|
7
|
+
type TableOfContentsProps = Omit<HTMLAttributes<HTMLElement>, "class" | "items"> & {
|
|
8
|
+
title?: string;
|
|
9
|
+
items: TableOfContentsItem[];
|
|
10
|
+
activeId?: string;
|
|
11
|
+
class?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const TableOfContents: import("svelte").Component<TableOfContentsProps, {}, "">;
|
|
14
|
+
type TableOfContents = ReturnType<typeof TableOfContents>;
|
|
15
|
+
export default TableOfContents;
|
|
16
|
+
//# sourceMappingURL=TableOfContents.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableOfContents.svelte.d.ts","sourceRoot":"","sources":["../src/lib/TableOfContents.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGpD,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,KAAK,oBAAoB,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA+CJ,QAAA,MAAM,eAAe,0DAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
package/dist/Tag.svelte
CHANGED
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
.st-tag__dismiss:hover:not(:disabled) {
|
|
138
|
-
background:
|
|
138
|
+
background: var(--st-component-control-hoverBackground, var(--st-semantic-surface-subtle));
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.st-tag__dismiss:focus-visible {
|
package/dist/Textarea.svelte
CHANGED
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
rounded box with no underline shadow → base Sent Tech unchanged. */
|
|
94
94
|
border-top-left-radius: var(--st-component-control-anatomy-field-radiusTop, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
95
95
|
border-top-right-radius: var(--st-component-control-anatomy-field-radiusTop, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
96
|
-
border-bottom-right-radius: var(--st-component-control-anatomy-shape-radius, 0.375rem);
|
|
97
|
-
border-bottom-left-radius: var(--st-component-control-anatomy-shape-radius, 0.375rem);
|
|
96
|
+
border-bottom-right-radius: var(--st-component-control-anatomy-field-radiusBottom, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
97
|
+
border-bottom-left-radius: var(--st-component-control-anatomy-field-radiusBottom, var(--st-component-control-anatomy-shape-radius, 0.375rem));
|
|
98
98
|
box-shadow: var(--st-component-control-anatomy-field-underline, none);
|
|
99
99
|
color: var(--st-component-control-text, var(--st-semantic-text-primary));
|
|
100
100
|
font-family: var(--st-component-control-anatomy-typography-family, inherit);
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
.st-textarea:hover:not(:disabled) {
|
|
120
|
+
background: var(--st-component-control-hoverBackground, var(--st-semantic-surface-subtle));
|
|
120
121
|
border-color: var(--st-component-control-hoverBorder, var(--st-semantic-border-strong));
|
|
121
122
|
}
|
|
122
123
|
|
package/dist/Tile.svelte
CHANGED
|
@@ -115,6 +115,10 @@
|
|
|
115
115
|
|
|
116
116
|
.st-tile--clickable:hover:not(.st-tile--disabled),
|
|
117
117
|
.st-tile--selectable:hover:not(.st-tile--disabled) {
|
|
118
|
+
background: var(
|
|
119
|
+
--st-component-control-hoverBackground,
|
|
120
|
+
var(--st-semantic-surface-subtle)
|
|
121
|
+
);
|
|
118
122
|
border-color: var(--st-component-control-hoverBorder, var(--st-semantic-border-strong));
|
|
119
123
|
}
|
|
120
124
|
|
package/dist/TileGroup.svelte
CHANGED
|
@@ -134,6 +134,10 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.st-tileGroup__tile:hover:not(.st-tileGroup__tile--disabled) {
|
|
137
|
+
background: var(
|
|
138
|
+
--st-component-control-hoverBackground,
|
|
139
|
+
var(--st-semantic-surface-subtle)
|
|
140
|
+
);
|
|
137
141
|
border-color: var(
|
|
138
142
|
--st-component-control-hoverBorder,
|
|
139
143
|
var(--st-semantic-border-strong)
|
package/dist/Toggle.svelte
CHANGED
|
@@ -106,6 +106,10 @@
|
|
|
106
106
|
background: var(--st-component-selection-switchTrackChecked, var(--st-semantic-action-primary));
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
.st-toggle__input:not(:disabled):not(:checked):hover + .st-toggle__track {
|
|
110
|
+
background: var(--st-component-control-hoverBackground, var(--st-component-selection-switchTrack));
|
|
111
|
+
}
|
|
112
|
+
|
|
109
113
|
.st-toggle__input:checked + .st-toggle__track .st-toggle__thumb {
|
|
110
114
|
transform: translateX(calc(var(--st-toggle-trackWidth, 2.25rem) - var(--st-toggle-thumbSize, 1rem) - 2 * var(--st-component-selection-toggleTrackPadding, 0.125rem)));
|
|
111
115
|
}
|
package/dist/Toggletip.svelte
CHANGED
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
.st-toggletip__trigger:hover {
|
|
93
|
-
background: var(--st-semantic-
|
|
93
|
+
background: var(--st-component-control-hoverBackground, var(--st-semantic-surface-subtle));
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/* Focus = stratégie d'anatomie partagée (outline DSFR / inset Carbon / ring base). */
|