@sentropic/design-system-svelte 0.10.3 → 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.
Files changed (87) hide show
  1. package/dist/AreaChart.svelte +38 -26
  2. package/dist/AreaChart.svelte.d.ts.map +1 -1
  3. package/dist/BackToTop.svelte +157 -0
  4. package/dist/BackToTop.svelte.d.ts +14 -0
  5. package/dist/BackToTop.svelte.d.ts.map +1 -0
  6. package/dist/BarChart.svelte +38 -39
  7. package/dist/BarChart.svelte.d.ts.map +1 -1
  8. package/dist/Card.svelte +2 -0
  9. package/dist/ChartDataList.svelte +33 -0
  10. package/dist/ChartDataList.svelte.d.ts +9 -0
  11. package/dist/ChartDataList.svelte.d.ts.map +1 -0
  12. package/dist/ChatComposer.svelte +20 -3
  13. package/dist/ChatComposer.svelte.d.ts +6 -30
  14. package/dist/ChatComposer.svelte.d.ts.map +1 -1
  15. package/dist/Checkbox.svelte +4 -0
  16. package/dist/Combobox.svelte +1 -1
  17. package/dist/ContentSwitcher.svelte +1 -0
  18. package/dist/DataTable.svelte +4 -1
  19. package/dist/DatePicker.svelte +1 -1
  20. package/dist/DisplaySettings.svelte +210 -0
  21. package/dist/DisplaySettings.svelte.d.ts +24 -0
  22. package/dist/DisplaySettings.svelte.d.ts.map +1 -0
  23. package/dist/DonutChart.svelte +44 -29
  24. package/dist/DonutChart.svelte.d.ts.map +1 -1
  25. package/dist/Dropdown.svelte +1 -1
  26. package/dist/FileUploader.svelte +2 -2
  27. package/dist/ForceGraph.svelte +428 -26
  28. package/dist/ForceGraph.svelte.d.ts +27 -0
  29. package/dist/ForceGraph.svelte.d.ts.map +1 -1
  30. package/dist/GraphLegend.svelte +142 -0
  31. package/dist/GraphLegend.svelte.d.ts +12 -0
  32. package/dist/GraphLegend.svelte.d.ts.map +1 -0
  33. package/dist/Header.svelte +2 -1
  34. package/dist/IconButton.svelte +1 -1
  35. package/dist/InlineLoading.svelte +10 -1
  36. package/dist/InlineLoading.svelte.d.ts.map +1 -1
  37. package/dist/Input.svelte +3 -2
  38. package/dist/LanguageSelector.svelte +2 -1
  39. package/dist/LineChart.svelte +38 -26
  40. package/dist/LineChart.svelte.d.ts.map +1 -1
  41. package/dist/Link.svelte +7 -1
  42. package/dist/MediaContent.svelte +124 -0
  43. package/dist/MediaContent.svelte.d.ts +22 -0
  44. package/dist/MediaContent.svelte.d.ts.map +1 -0
  45. package/dist/Menu.svelte +56 -3
  46. package/dist/Menu.svelte.d.ts.map +1 -1
  47. package/dist/MessageStatusBadge.svelte +1 -1
  48. package/dist/MultiSelect.svelte +2 -2
  49. package/dist/Notification.svelte +150 -0
  50. package/dist/Notification.svelte.d.ts +17 -0
  51. package/dist/Notification.svelte.d.ts.map +1 -0
  52. package/dist/NumberInput.svelte +1 -0
  53. package/dist/OverflowMenu.svelte +84 -13
  54. package/dist/OverflowMenu.svelte.d.ts.map +1 -1
  55. package/dist/Pagination.svelte +7 -0
  56. package/dist/PaginationNav.svelte +2 -2
  57. package/dist/ProgressIndicator.svelte +13 -1
  58. package/dist/ProgressIndicator.svelte.d.ts +1 -0
  59. package/dist/ProgressIndicator.svelte.d.ts.map +1 -1
  60. package/dist/Radio.svelte +7 -3
  61. package/dist/ScatterPlot.svelte +64 -45
  62. package/dist/ScatterPlot.svelte.d.ts.map +1 -1
  63. package/dist/Search.svelte +6 -3
  64. package/dist/Select.svelte +8 -2
  65. package/dist/SideNav.svelte +6 -0
  66. package/dist/StackedBarChart.svelte +51 -30
  67. package/dist/StackedBarChart.svelte.d.ts.map +1 -1
  68. package/dist/StreamingMessage.svelte +2 -2
  69. package/dist/Switch.svelte +4 -0
  70. package/dist/Table.svelte +4 -1
  71. package/dist/TableOfContents.svelte +109 -0
  72. package/dist/TableOfContents.svelte.d.ts +16 -0
  73. package/dist/TableOfContents.svelte.d.ts.map +1 -0
  74. package/dist/Tag.svelte +1 -1
  75. package/dist/Textarea.svelte +3 -2
  76. package/dist/Tile.svelte +4 -0
  77. package/dist/TileGroup.svelte +4 -0
  78. package/dist/Toggle.svelte +4 -0
  79. package/dist/Toggletip.svelte +1 -1
  80. package/dist/Transcription.svelte +135 -0
  81. package/dist/Transcription.svelte.d.ts +19 -0
  82. package/dist/Transcription.svelte.d.ts.map +1 -0
  83. package/dist/TreeView.svelte +2 -2
  84. package/dist/index.d.ts +12 -1
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +8 -0
  87. package/package.json +1 -1
@@ -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
  }
@@ -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()} role="img" aria-label={label}>
105
- <svg viewBox="0 0 {width} {height}" preserveAspectRatio="xMidYMid meet" width="100%" height="100%" focusable="false" aria-hidden="true">
106
- {#each scales.ticks as t (t)}
107
- {@const y = MARGIN.top + scaleLinear(t, 0, scales.domainMax, scales.plotH, 0)}
108
- <line class="st-stackedBar__grid" x1={MARGIN.left} x2={width - MARGIN.right} y1={y} y2={y} />
109
- <text class="st-stackedBar__tick" x={MARGIN.left - 6} y={y} text-anchor="end" dominant-baseline="middle">{fmt(t)}</text>
110
- {/each}
111
-
112
- <line class="st-stackedBar__axis" x1={MARGIN.left} x2={MARGIN.left} y1={MARGIN.top} y2={height - MARGIN.bottom} />
113
- <line class="st-stackedBar__axis" x1={MARGIN.left} x2={width - MARGIN.right} y1={height - MARGIN.bottom} y2={height - MARGIN.bottom} />
114
-
115
- {#each bars as bar, bi (bar.label)}
116
- <text class="st-stackedBar__categoryLabel" x={bar.cxLabel} y={height - MARGIN.bottom + 16} text-anchor="middle">{bar.label}</text>
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
- {/each}
132
- </svg>
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;AAEF,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;AA6HJ,QAAA,MAAM,eAAe,0DAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,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> {toolCall.status}</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
 
@@ -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(--st-component-dataTable-rowHoverBackground, var(--st-semantic-surface-subtle));
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: color-mix(in srgb, currentColor 18%, transparent);
138
+ background: var(--st-component-control-hoverBackground, var(--st-semantic-surface-subtle));
139
139
  }
140
140
 
141
141
  .st-tag__dismiss:focus-visible {
@@ -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
 
@@ -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)
@@ -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
  }
@@ -90,7 +90,7 @@
90
90
  }
91
91
 
92
92
  .st-toggletip__trigger:hover {
93
- background: var(--st-semantic-border-strong);
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). */
@@ -0,0 +1,135 @@
1
+ <script lang="ts">
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+
4
+ export type TranscriptionSegment = {
5
+ speaker?: string;
6
+ startTime?: string;
7
+ endTime?: string;
8
+ text: string;
9
+ };
10
+
11
+ type TranscriptionProps = Omit<HTMLAttributes<HTMLElement>, "class"> & {
12
+ title?: string;
13
+ segments?: TranscriptionSegment[];
14
+ text?: string;
15
+ class?: string;
16
+ open?: boolean;
17
+ showTimestamps?: boolean;
18
+ };
19
+
20
+ let {
21
+ title = "Transcription",
22
+ segments,
23
+ text,
24
+ open = false,
25
+ showTimestamps = true,
26
+ class: className,
27
+ ...rest
28
+ }: TranscriptionProps = $props();
29
+
30
+ const resolvedSegments = $derived((segments ?? []).filter((segment) => Boolean(segment.text?.trim())));
31
+ const hasSegments = $derived(resolvedSegments.length > 0);
32
+ const hasText = $derived(Boolean(text && text.trim().length));
33
+
34
+ const formatInterval = (segment: TranscriptionSegment) => {
35
+ if (!showTimestamps || (!segment.startTime && !segment.endTime)) return "";
36
+ if (!segment.startTime) return segment.endTime ? `- ${segment.endTime}` : "";
37
+ if (!segment.endTime) return `${segment.startTime} -`;
38
+ return `${segment.startTime} - ${segment.endTime}`;
39
+ };
40
+
41
+ const classes = () => ["st-transcription", className].filter(Boolean).join(" ");
42
+ </script>
43
+
44
+ <details {open} class={classes()} {...rest}>
45
+ <summary>{title}</summary>
46
+
47
+ <div class="st-transcription__content">
48
+ {#if hasSegments}
49
+ <ol class="st-transcription__list">
50
+ {#each resolvedSegments as segment, index (index)}
51
+ <li class="st-transcription__item">
52
+ <p class="st-transcription__meta">
53
+ {#if segment.speaker}
54
+ <span class="st-transcription__speaker">{segment.speaker}</span>
55
+ {/if}
56
+ {#if segment.speaker && formatInterval(segment)}
57
+ <span aria-hidden="true">&nbsp;•&nbsp;</span>
58
+ {/if}
59
+ {#if formatInterval(segment)}
60
+ <time>
61
+ <span class="st-transcription__sr-only">Horodatage {formatInterval(segment)}</span>
62
+ <span aria-hidden="true">{formatInterval(segment)}</span>
63
+ </time>
64
+ {/if}
65
+ </p>
66
+ <p class="st-transcription__text">{segment.text}</p>
67
+ </li>
68
+ {/each}
69
+ </ol>
70
+ {:else if hasText}
71
+ <p class="st-transcription__text">{text}</p>
72
+ {:else}
73
+ <p class="st-transcription__text">Aucun contenu de transcription fourni.</p>
74
+ {/if}
75
+ </div>
76
+ </details>
77
+
78
+ <style>
79
+ .st-transcription {
80
+ border: 1px solid var(--st-semantic-border-subtle);
81
+ border-radius: 0.5rem;
82
+ padding: 0.75rem 1rem;
83
+ }
84
+
85
+ .st-transcription summary {
86
+ color: var(--st-semantic-text-primary);
87
+ cursor: var(--st-cursor-interactive, pointer);
88
+ font-weight: 600;
89
+ list-style: none;
90
+ }
91
+
92
+ .st-transcription summary::marker {
93
+ color: var(--st-semantic-text-secondary);
94
+ }
95
+
96
+ .st-transcription__content {
97
+ margin-top: 0.75rem;
98
+ }
99
+
100
+ .st-transcription__list {
101
+ margin: 0;
102
+ padding-left: 1rem;
103
+ }
104
+
105
+ .st-transcription__item + .st-transcription__item {
106
+ margin-top: 0.625rem;
107
+ }
108
+
109
+ .st-transcription__meta {
110
+ color: var(--st-semantic-text-secondary);
111
+ font-size: 0.8125rem;
112
+ margin: 0;
113
+ }
114
+
115
+ .st-transcription__speaker {
116
+ font-weight: 600;
117
+ }
118
+
119
+ .st-transcription__text {
120
+ color: var(--st-semantic-text-primary);
121
+ margin: 0.2rem 0 0;
122
+ }
123
+
124
+ .st-transcription__sr-only {
125
+ position: absolute;
126
+ width: 1px;
127
+ height: 1px;
128
+ padding: 0;
129
+ margin: -1px;
130
+ overflow: hidden;
131
+ clip: rect(0, 0, 0, 0);
132
+ white-space: nowrap;
133
+ border: 0;
134
+ }
135
+ </style>
@@ -0,0 +1,19 @@
1
+ import type { HTMLAttributes } from "svelte/elements";
2
+ export type TranscriptionSegment = {
3
+ speaker?: string;
4
+ startTime?: string;
5
+ endTime?: string;
6
+ text: string;
7
+ };
8
+ type TranscriptionProps = Omit<HTMLAttributes<HTMLElement>, "class"> & {
9
+ title?: string;
10
+ segments?: TranscriptionSegment[];
11
+ text?: string;
12
+ class?: string;
13
+ open?: boolean;
14
+ showTimestamps?: boolean;
15
+ };
16
+ declare const Transcription: import("svelte").Component<TranscriptionProps, {}, "">;
17
+ type Transcription = ReturnType<typeof Transcription>;
18
+ export default Transcription;
19
+ //# sourceMappingURL=Transcription.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Transcription.svelte.d.ts","sourceRoot":"","sources":["../src/lib/Transcription.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGpD,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,GAAG;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAoEJ,QAAA,MAAM,aAAa,wDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
@@ -164,7 +164,7 @@
164
164
  }
165
165
 
166
166
  .st-treeView__row:hover:not(.st-treeView__row--disabled) {
167
- background: var(--st-semantic-surface-subtle);
167
+ background: var(--st-component-control-hoverBackground, var(--st-semantic-surface-subtle));
168
168
  }
169
169
 
170
170
  .st-treeView__row:focus-visible {
@@ -173,7 +173,7 @@
173
173
  }
174
174
 
175
175
  .st-treeView__row--selected {
176
- background: var(--st-semantic-surface-subtle);
176
+ background: var(--st-component-control-hoverBackground, var(--st-semantic-surface-subtle));
177
177
  color: var(--st-semantic-action-primary);
178
178
  font-weight: 600;
179
179
  }
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export { default as AreaChart } from "./AreaChart.svelte";
4
4
  export { default as AspectRatio } from "./AspectRatio.svelte";
5
5
  export { default as Badge } from "./Badge.svelte";
6
6
  export { default as BarChart } from "./BarChart.svelte";
7
+ export { default as BackToTop } from "./BackToTop.svelte";
7
8
  export { default as Breadcrumb } from "./Breadcrumb.svelte";
8
9
  export { default as Button } from "./Button.svelte";
9
10
  export { default as Card } from "./Card.svelte";
@@ -27,10 +28,14 @@ export { default as EmptyState } from "./EmptyState.svelte";
27
28
  export { default as FileUploader } from "./FileUploader.svelte";
28
29
  export { default as Footer } from "./Footer.svelte";
29
30
  export { default as ForceGraph } from "./ForceGraph.svelte";
31
+ export { default as GraphLegend } from "./GraphLegend.svelte";
30
32
  export { default as Form } from "./Form.svelte";
31
33
  export { default as FormGroup } from "./FormGroup.svelte";
32
34
  export { default as Header } from "./Header.svelte";
33
35
  export { default as Highlight } from "./Highlight.svelte";
36
+ export { default as DisplaySettings } from "./DisplaySettings.svelte";
37
+ export { default as MediaContent } from "./MediaContent.svelte";
38
+ export { default as Transcription } from "./Transcription.svelte";
34
39
  export { default as IconButton } from "./IconButton.svelte";
35
40
  export { default as InlineLoading } from "./InlineLoading.svelte";
36
41
  export { default as Input } from "./Input.svelte";
@@ -42,6 +47,7 @@ export { default as Menu } from "./Menu.svelte";
42
47
  export { default as MenuPopover } from "./MenuPopover.svelte";
43
48
  export { default as MenuTriggerButton } from "./MenuTriggerButton.svelte";
44
49
  export { default as Modal } from "./Modal.svelte";
50
+ export { default as Notification } from "./Notification.svelte";
45
51
  export { default as MultiSelect } from "./MultiSelect.svelte";
46
52
  export { default as NumberInput } from "./NumberInput.svelte";
47
53
  export { default as OrderedList } from "./OrderedList.svelte";
@@ -76,6 +82,7 @@ export { default as Toast } from "./Toast.svelte";
76
82
  export { default as Toggle } from "./Toggle.svelte";
77
83
  export { default as Toggletip } from "./Toggletip.svelte";
78
84
  export { default as Tooltip } from "./Tooltip.svelte";
85
+ export { default as TableOfContents } from "./TableOfContents.svelte";
79
86
  export { default as TreeView } from "./TreeView.svelte";
80
87
  export { default as UnorderedList } from "./UnorderedList.svelte";
81
88
  export type { AccordionItem } from "./Accordion.svelte";
@@ -92,7 +99,8 @@ export type { ComboboxOption } from "./Combobox.svelte";
92
99
  export type { DataTableColumn, DataTableRow, DataTableSelectMode, DataTableSort } from "./DataTable.svelte";
93
100
  export type { DatePickerRange } from "./DatePicker.svelte";
94
101
  export type { DonutChartDatum, DonutChartTone } from "./DonutChart.svelte";
95
- export type { ForceGraphNode, ForceGraphEdge, ForceGraphTone } from "./ForceGraph.svelte";
102
+ export type { ForceGraphNode, ForceGraphEdge, ForceGraphTone, ForceGraphNodeShape, ForceGraphLegendEntry } from "./ForceGraph.svelte";
103
+ export { nodeShapePath } from "./ForceGraph.svelte";
96
104
  export type { DropdownOption } from "./Dropdown.svelte";
97
105
  export type { HeaderAccount } from "./Header.svelte";
98
106
  export { deriveInitials } from "./Header.svelte";
@@ -103,7 +111,10 @@ export type { OverflowMenuItem } from "./OverflowMenu.svelte";
103
111
  export type { ProgressIndicatorItem, ProgressIndicatorStatus } from "./ProgressIndicator.svelte";
104
112
  export type { SideNavItem } from "./SideNav.svelte";
105
113
  export type { StructuredListItem } from "./StructuredList.svelte";
114
+ export type { DisplayFontScale, DisplayContrast, DisplayLineSpacing, DisplaySettingsState } from "./DisplaySettings.svelte";
115
+ export type { TranscriptionSegment } from "./Transcription.svelte";
106
116
  export type { TableColumn, TableRow } from "./Table.svelte";
117
+ export type { TableOfContentsItem } from "./TableOfContents.svelte";
107
118
  export type { TabItem } from "./Tabs.svelte";
108
119
  export type { HighlightTone } from "./Highlight.svelte";
109
120
  export type { LanguageOption } from "./LanguageSelector.svelte";