@sentropic/design-system-svelte 0.34.50 → 0.34.51

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 (74) hide show
  1. package/README.md +62 -0
  2. package/dist/AnomalySwimLaneChart.svelte +10 -1
  3. package/dist/AnomalySwimLaneChart.svelte.d.ts +2 -0
  4. package/dist/AnomalySwimLaneChart.svelte.d.ts.map +1 -1
  5. package/dist/CalendarHeatmapChart.svelte +11 -1
  6. package/dist/CalendarHeatmapChart.svelte.d.ts +2 -0
  7. package/dist/CalendarHeatmapChart.svelte.d.ts.map +1 -1
  8. package/dist/Combobox.svelte +5 -1
  9. package/dist/Combobox.svelte.d.ts.map +1 -1
  10. package/dist/ContourChart.svelte +76 -13
  11. package/dist/ContourChart.svelte.d.ts +3 -1
  12. package/dist/ContourChart.svelte.d.ts.map +1 -1
  13. package/dist/Dashboard.svelte +155 -0
  14. package/dist/Dashboard.svelte.d.ts +21 -0
  15. package/dist/Dashboard.svelte.d.ts.map +1 -0
  16. package/dist/DashboardGrid.svelte +237 -0
  17. package/dist/DashboardGrid.svelte.d.ts +24 -0
  18. package/dist/DashboardGrid.svelte.d.ts.map +1 -0
  19. package/dist/DataTable.svelte +3 -1
  20. package/dist/DataTable.svelte.d.ts +1 -0
  21. package/dist/DataTable.svelte.d.ts.map +1 -1
  22. package/dist/DatePicker.svelte +33 -28
  23. package/dist/DatePicker.svelte.d.ts.map +1 -1
  24. package/dist/Density2DChart.svelte +10 -1
  25. package/dist/Density2DChart.svelte.d.ts +2 -0
  26. package/dist/Density2DChart.svelte.d.ts.map +1 -1
  27. package/dist/Dropdown.svelte +33 -9
  28. package/dist/Dropdown.svelte.d.ts.map +1 -1
  29. package/dist/EventFeedPanel.svelte +3 -3
  30. package/dist/EventFeedPanel.svelte.d.ts +1 -1
  31. package/dist/EventFeedPanel.svelte.d.ts.map +1 -1
  32. package/dist/FileUploader.svelte +7 -3
  33. package/dist/Footer.svelte +75 -11
  34. package/dist/Footer.svelte.d.ts +16 -6
  35. package/dist/Footer.svelte.d.ts.map +1 -1
  36. package/dist/ForceGraph.svelte +9 -3
  37. package/dist/ForceGraph.svelte.d.ts +4 -0
  38. package/dist/ForceGraph.svelte.d.ts.map +1 -1
  39. package/dist/HeatmapChart.svelte +39 -3
  40. package/dist/HeatmapChart.svelte.d.ts +4 -1
  41. package/dist/HeatmapChart.svelte.d.ts.map +1 -1
  42. package/dist/KanbanBoard.svelte +144 -0
  43. package/dist/KanbanBoard.svelte.d.ts +23 -0
  44. package/dist/KanbanBoard.svelte.d.ts.map +1 -0
  45. package/dist/ListReportPage.svelte +184 -0
  46. package/dist/ListReportPage.svelte.d.ts +46 -0
  47. package/dist/ListReportPage.svelte.d.ts.map +1 -0
  48. package/dist/MasterDetail.svelte +267 -0
  49. package/dist/MasterDetail.svelte.d.ts +35 -0
  50. package/dist/MasterDetail.svelte.d.ts.map +1 -0
  51. package/dist/ObjectPage.svelte +222 -0
  52. package/dist/ObjectPage.svelte.d.ts +46 -0
  53. package/dist/ObjectPage.svelte.d.ts.map +1 -0
  54. package/dist/OrderedList.svelte +7 -12
  55. package/dist/OrderedList.svelte.d.ts.map +1 -1
  56. package/dist/PointAndFigureChart.svelte +18 -11
  57. package/dist/PointAndFigureChart.svelte.d.ts +1 -1
  58. package/dist/PointAndFigureChart.svelte.d.ts.map +1 -1
  59. package/dist/RenkoChart.svelte +40 -13
  60. package/dist/RenkoChart.svelte.d.ts +1 -1
  61. package/dist/RenkoChart.svelte.d.ts.map +1 -1
  62. package/dist/VectorFieldChart.svelte +5 -5
  63. package/dist/VectorFieldChart.svelte.d.ts +1 -1
  64. package/dist/VectorFieldChart.svelte.d.ts.map +1 -1
  65. package/dist/WindBarbChart.svelte +5 -5
  66. package/dist/WindBarbChart.svelte.d.ts +1 -1
  67. package/dist/WindBarbChart.svelte.d.ts.map +1 -1
  68. package/dist/Wizard.svelte +125 -0
  69. package/dist/Wizard.svelte.d.ts +25 -0
  70. package/dist/Wizard.svelte.d.ts.map +1 -0
  71. package/dist/index.d.ts +24 -10
  72. package/dist/index.d.ts.map +1 -1
  73. package/dist/index.js +7 -0
  74. package/package.json +1 -1
@@ -0,0 +1,237 @@
1
+ <script lang="ts" module>
2
+ export type DashboardGridTile = {
3
+ id: string;
4
+ x: number;
5
+ y: number;
6
+ w: number;
7
+ h: number;
8
+ title?: string;
9
+ description?: string;
10
+ value?: string;
11
+ };
12
+
13
+ export type DashboardGridProps = {
14
+ tiles: DashboardGridTile[];
15
+ columns?: number;
16
+ rowHeight?: number;
17
+ gap?: number;
18
+ editable?: boolean;
19
+ label?: string;
20
+ onLayout?: (tiles: DashboardGridTile[]) => void;
21
+ class?: string;
22
+ };
23
+ </script>
24
+
25
+ <script lang="ts">
26
+ let {
27
+ tiles,
28
+ columns = 12,
29
+ rowHeight = 88,
30
+ gap = 16,
31
+ editable = false,
32
+ label = "Dashboard grid",
33
+ onLayout,
34
+ class: className
35
+ }: DashboardGridProps = $props();
36
+
37
+ const safeColumns = $derived(Math.max(1, Math.floor(columns || 12)));
38
+ const safeRowHeight = $derived(Math.max(32, Math.floor(rowHeight || 88)));
39
+ const safeGap = $derived(Math.max(0, Math.floor(gap || 0)));
40
+ let localTiles = $state<DashboardGridTile[]>([]);
41
+ let lastInputKey = $state("");
42
+
43
+ function cloneTile(tile: DashboardGridTile): DashboardGridTile {
44
+ return { ...tile };
45
+ }
46
+
47
+ function normalizeTile(tile: DashboardGridTile, colCount: number): DashboardGridTile {
48
+ const w = Math.max(1, Math.min(colCount, Math.floor(tile.w || 1)));
49
+ const x = Math.max(0, Math.min(colCount - w, Math.floor(tile.x || 0)));
50
+ return {
51
+ ...tile,
52
+ id: String(tile.id),
53
+ x,
54
+ y: Math.max(0, Math.floor(tile.y || 0)),
55
+ w,
56
+ h: Math.max(1, Math.floor(tile.h || 1))
57
+ };
58
+ }
59
+
60
+ function normalizeTiles(nextTiles: DashboardGridTile[], colCount = safeColumns): DashboardGridTile[] {
61
+ return nextTiles.map((tile) => normalizeTile(cloneTile(tile), colCount));
62
+ }
63
+
64
+ $effect(() => {
65
+ const key = JSON.stringify({ tiles, columns: safeColumns });
66
+ if (key !== lastInputKey) {
67
+ lastInputKey = key;
68
+ localTiles = normalizeTiles(tiles, safeColumns);
69
+ }
70
+ });
71
+
72
+ const layout = $derived(normalizeTiles(localTiles, safeColumns));
73
+
74
+ function commit(nextTiles: DashboardGridTile[]) {
75
+ const normalized = normalizeTiles(nextTiles, safeColumns);
76
+ localTiles = normalized;
77
+ onLayout?.(normalized.map(cloneTile));
78
+ }
79
+
80
+ function changeTile(id: string, patch: Partial<DashboardGridTile>) {
81
+ commit(layout.map((tile) => (tile.id === id ? { ...tile, ...patch } : tile)));
82
+ }
83
+
84
+ function moveTile(id: string, dx: number, dy: number) {
85
+ const tile = layout.find((candidate) => candidate.id === id);
86
+ if (!tile) return;
87
+ changeTile(id, { x: tile.x + dx, y: tile.y + dy });
88
+ }
89
+
90
+ function resizeTile(id: string, dw: number, dh: number) {
91
+ const tile = layout.find((candidate) => candidate.id === id);
92
+ if (!tile) return;
93
+ changeTile(id, { w: tile.w + dw, h: tile.h + dh });
94
+ }
95
+
96
+ function tileStyle(tile: DashboardGridTile): string {
97
+ return `grid-column: ${tile.x + 1} / span ${tile.w}; grid-row: ${tile.y + 1} / span ${tile.h};`;
98
+ }
99
+
100
+ const rootStyle = $derived(`--st-dashboardGrid-columns: ${safeColumns}; --st-dashboardGrid-row-height: ${safeRowHeight}px; --st-dashboardGrid-gap: ${safeGap}px;`);
101
+ const classes = () => ["st-dashboardGrid", editable ? "st-dashboardGrid--editable" : undefined, className].filter(Boolean).join(" ");
102
+ </script>
103
+
104
+ <section class={classes()} style={rootStyle} aria-label={label}>
105
+ {#each layout as tile (tile.id)}
106
+ <article class="st-dashboardGrid__tile" style={tileStyle(tile)}>
107
+ <div class="st-dashboardGrid__content">
108
+ {#if tile.title}
109
+ <h3 class="st-dashboardGrid__title">{tile.title}</h3>
110
+ {/if}
111
+ {#if tile.value}
112
+ <p class="st-dashboardGrid__value">{tile.value}</p>
113
+ {/if}
114
+ {#if tile.description}
115
+ <p class="st-dashboardGrid__description">{tile.description}</p>
116
+ {/if}
117
+ </div>
118
+
119
+ {#if editable}
120
+ <div class="st-dashboardGrid__controls" aria-label="Layout controls for {tile.title ?? tile.id}">
121
+ <button type="button" onclick={() => moveTile(tile.id, 0, -1)} aria-label="Move {tile.title ?? tile.id} up">↑</button>
122
+ <button type="button" onclick={() => moveTile(tile.id, -1, 0)} aria-label="Move {tile.title ?? tile.id} left">←</button>
123
+ <button type="button" onclick={() => moveTile(tile.id, 1, 0)} aria-label="Move {tile.title ?? tile.id} right">→</button>
124
+ <button type="button" onclick={() => moveTile(tile.id, 0, 1)} aria-label="Move {tile.title ?? tile.id} down">↓</button>
125
+ <button type="button" onclick={() => resizeTile(tile.id, 1, 0)} aria-label="Widen {tile.title ?? tile.id}">W+</button>
126
+ <button type="button" onclick={() => resizeTile(tile.id, -1, 0)} aria-label="Narrow {tile.title ?? tile.id}">W-</button>
127
+ <button type="button" onclick={() => resizeTile(tile.id, 0, 1)} aria-label="Taller {tile.title ?? tile.id}">H+</button>
128
+ <button type="button" onclick={() => resizeTile(tile.id, 0, -1)} aria-label="Shorter {tile.title ?? tile.id}">H-</button>
129
+ </div>
130
+ {/if}
131
+ </article>
132
+ {/each}
133
+ </section>
134
+
135
+ <style>
136
+ .st-dashboardGrid {
137
+ --st-component-dashboardGrid-tile-background: var(--st-semantic-surface-default);
138
+ --st-component-dashboardGrid-tile-border-color: var(--st-semantic-border-subtle);
139
+ --st-component-dashboardGrid-tile-border-width: var(--st-component-card-anatomy-shape-borderWidth);
140
+ --st-component-dashboardGrid-tile-radius: var(--st-radius-lg);
141
+ --st-component-dashboardGrid-tile-shadow: var(--st-shadow-sm);
142
+ --st-component-dashboardGrid-title-fontSize: var(--st-component-field-labelTypography-size);
143
+ --st-component-dashboardGrid-title-fontWeight: var(--st-component-field-labelTypography-weight);
144
+ --st-component-dashboardGrid-title-letterSpacing: var(--st-component-field-labelTypography-letterSpacing);
145
+ --st-component-dashboardGrid-value-fontSize: var(--st-component-button-anatomy-density-lg-fontSize);
146
+ --st-component-dashboardGrid-value-fontWeight: var(--st-component-button-anatomy-typography-weight);
147
+ --st-component-dashboardGrid-value-lineHeight: var(--st-component-field-labelTypography-lineHeight);
148
+ --st-component-dashboardGrid-description-fontSize: var(--st-component-field-labelTypography-size);
149
+ --st-component-dashboardGrid-control-fontSize: var(--st-component-button-anatomy-density-sm-fontSize);
150
+ --st-component-dashboardGrid-control-fontWeight: var(--st-component-button-anatomy-typography-weight);
151
+ --st-component-dashboardGrid-control-size: var(--st-component-button-anatomy-density-sm-controlHeight);
152
+ --st-component-dashboardGrid-control-paddingInline: var(--st-spacing-2);
153
+ --st-component-dashboardGrid-control-focusWidth: var(--st-component-card-anatomy-shape-borderWidth);
154
+ display: grid;
155
+ gap: var(--st-dashboardGrid-gap);
156
+ grid-auto-rows: var(--st-dashboardGrid-row-height);
157
+ grid-template-columns: repeat(var(--st-dashboardGrid-columns), minmax(0, 1fr));
158
+ width: 100%;
159
+ }
160
+
161
+ .st-dashboardGrid__tile {
162
+ background: var(--st-component-dashboardGrid-tile-background);
163
+ border: var(--st-component-dashboardGrid-tile-border-width) solid var(--st-component-dashboardGrid-tile-border-color);
164
+ border-radius: var(--st-component-dashboardGrid-tile-radius);
165
+ box-shadow: var(--st-component-dashboardGrid-tile-shadow);
166
+ color: var(--st-semantic-text-primary);
167
+ min-width: 0;
168
+ overflow: hidden;
169
+ padding: var(--st-spacing-4);
170
+ position: relative;
171
+ }
172
+
173
+ .st-dashboardGrid--editable .st-dashboardGrid__tile {
174
+ outline: var(--st-component-dashboardGrid-tile-border-width) dashed var(--st-semantic-border-strong);
175
+ outline-offset: calc(-1 * var(--st-spacing-2));
176
+ }
177
+
178
+ .st-dashboardGrid__content {
179
+ display: grid;
180
+ gap: var(--st-spacing-2);
181
+ }
182
+
183
+ .st-dashboardGrid__title {
184
+ color: var(--st-semantic-text-secondary);
185
+ font-size: var(--st-component-dashboardGrid-title-fontSize);
186
+ font-weight: var(--st-component-dashboardGrid-title-fontWeight);
187
+ letter-spacing: var(--st-component-dashboardGrid-title-letterSpacing);
188
+ margin: 0;
189
+ text-transform: uppercase;
190
+ }
191
+
192
+ .st-dashboardGrid__value {
193
+ color: var(--st-semantic-text-primary);
194
+ font-size: var(--st-component-dashboardGrid-value-fontSize);
195
+ font-weight: var(--st-component-dashboardGrid-value-fontWeight);
196
+ line-height: var(--st-component-dashboardGrid-value-lineHeight);
197
+ margin: 0;
198
+ }
199
+
200
+ .st-dashboardGrid__description {
201
+ color: var(--st-semantic-text-secondary);
202
+ font-size: var(--st-component-dashboardGrid-description-fontSize);
203
+ margin: 0;
204
+ }
205
+
206
+ .st-dashboardGrid__controls {
207
+ align-items: center;
208
+ bottom: var(--st-spacing-2);
209
+ display: flex;
210
+ flex-wrap: wrap;
211
+ gap: var(--st-spacing-1);
212
+ position: absolute;
213
+ right: var(--st-spacing-2);
214
+ }
215
+
216
+ .st-dashboardGrid__controls button {
217
+ align-items: center;
218
+ background: var(--st-semantic-surface-raised);
219
+ border: var(--st-component-dashboardGrid-tile-border-width) solid var(--st-semantic-border-subtle);
220
+ border-radius: var(--st-radius-sm);
221
+ color: var(--st-semantic-text-primary);
222
+ cursor: pointer;
223
+ display: inline-flex;
224
+ font: inherit;
225
+ font-size: var(--st-component-dashboardGrid-control-fontSize);
226
+ font-weight: var(--st-component-dashboardGrid-control-fontWeight);
227
+ justify-content: center;
228
+ min-height: var(--st-component-dashboardGrid-control-size);
229
+ min-width: var(--st-component-dashboardGrid-control-size);
230
+ padding: 0 var(--st-component-dashboardGrid-control-paddingInline);
231
+ }
232
+
233
+ .st-dashboardGrid__controls button:focus-visible {
234
+ outline: var(--st-component-dashboardGrid-control-focusWidth) solid var(--st-semantic-border-interactive);
235
+ outline-offset: var(--st-component-control-anatomy-focus-offset);
236
+ }
237
+ </style>
@@ -0,0 +1,24 @@
1
+ export type DashboardGridTile = {
2
+ id: string;
3
+ x: number;
4
+ y: number;
5
+ w: number;
6
+ h: number;
7
+ title?: string;
8
+ description?: string;
9
+ value?: string;
10
+ };
11
+ export type DashboardGridProps = {
12
+ tiles: DashboardGridTile[];
13
+ columns?: number;
14
+ rowHeight?: number;
15
+ gap?: number;
16
+ editable?: boolean;
17
+ label?: string;
18
+ onLayout?: (tiles: DashboardGridTile[]) => void;
19
+ class?: string;
20
+ };
21
+ declare const DashboardGrid: import("svelte").Component<DashboardGridProps, {}, "">;
22
+ type DashboardGrid = ReturnType<typeof DashboardGrid>;
23
+ export default DashboardGrid;
24
+ //# sourceMappingURL=DashboardGrid.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DashboardGrid.svelte.d.ts","sourceRoot":"","sources":["../src/lib/DashboardGrid.svelte.ts"],"names":[],"mappings":"AAGE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAsHJ,QAAA,MAAM,aAAa,wDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
@@ -59,6 +59,7 @@
59
59
  sortNoneLabel?: string;
60
60
  previousLabel?: string;
61
61
  nextLabel?: string;
62
+ paginationLabel?: string;
62
63
  rangeLabel?: (range: { start: number; end: number; total: number }) => string;
63
64
  emptyLabel?: string;
64
65
  onRowClick?: (row: DataTableRow) => void;
@@ -84,6 +85,7 @@
84
85
  sortNoneLabel = "Not sorted",
85
86
  previousLabel = "Previous",
86
87
  nextLabel = "Next",
88
+ paginationLabel = "Pagination",
87
89
  rangeLabel = ({ start, end, total }) => `${start}–${end} of ${total}`,
88
90
  emptyLabel = "No data",
89
91
  onRowClick,
@@ -372,7 +374,7 @@
372
374
  {#if pageSize && pageSize > 0}
373
375
  <div class="st-dataTable__footer">
374
376
  <span class="st-dataTable__range" aria-live="polite">{rangeLabel(range)}</span>
375
- <nav class="st-dataTable__pager" aria-label="Pagination">
377
+ <nav class="st-dataTable__pager" aria-label={paginationLabel}>
376
378
  <button
377
379
  type="button"
378
380
  class="st-dataTable__pagerBtn"
@@ -47,6 +47,7 @@ type DataTableProps = Omit<HTMLTableAttributes, "class"> & {
47
47
  sortNoneLabel?: string;
48
48
  previousLabel?: string;
49
49
  nextLabel?: string;
50
+ paginationLabel?: string;
50
51
  rangeLabel?: (range: {
51
52
  start: number;
52
53
  end: number;
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.svelte.d.ts","sourceRoot":"","sources":["../src/lib/DataTable.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhF,MAAM,WAAW,eAAe,CAAC,CA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Q,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAwSJ,QAAA,MAAM,SAAS,mFAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
@@ -303,33 +303,34 @@
303
303
  </script>
304
304
 
305
305
  <div class={fieldClasses()} bind:this={hostEl} {...rest}>
306
- <label class="st-field__control" for={fieldId}>
307
- {#if label}<span class="st-field__label">{label}</span>{/if}
308
- <span class={groupClasses()}>
309
- <input
310
- id={fieldId}
311
- type="text"
312
- readonly
313
- class="st-datepicker__control"
314
- value={formattedValue()}
315
- placeholder={resolvedPlaceholder}
316
- {disabled}
317
- aria-invalid={isInvalid() ? "true" : undefined}
318
- onclick={toggleOpen}
319
- />
320
- <button
321
- type="button"
322
- class="st-datepicker__trigger"
323
- aria-label={resolvedOpenLabel}
324
- aria-haspopup="dialog"
325
- aria-expanded={open ? "true" : "false"}
326
- {disabled}
327
- onclick={toggleOpen}
328
- >
329
- <span aria-hidden="true">📅</span>
330
- </button>
331
- </span>
332
- </label>
306
+ <div class="st-field__anchor">
307
+ <label class="st-field__control" for={fieldId}>
308
+ {#if label}<span class="st-field__label">{label}</span>{/if}
309
+ <span class={groupClasses()}>
310
+ <input
311
+ id={fieldId}
312
+ type="text"
313
+ readonly
314
+ class="st-datepicker__control"
315
+ value={formattedValue()}
316
+ placeholder={resolvedPlaceholder}
317
+ {disabled}
318
+ aria-invalid={isInvalid() ? "true" : undefined}
319
+ onclick={toggleOpen}
320
+ />
321
+ <button
322
+ type="button"
323
+ class="st-datepicker__trigger"
324
+ aria-label={resolvedOpenLabel}
325
+ aria-haspopup="dialog"
326
+ aria-expanded={open ? "true" : "false"}
327
+ {disabled}
328
+ onclick={toggleOpen}
329
+ >
330
+ <span aria-hidden="true">📅</span>
331
+ </button>
332
+ </span>
333
+ </label>
333
334
  {#if open}
334
335
  <div
335
336
  class="st-datepicker__panel"
@@ -397,6 +398,7 @@
397
398
  </div>
398
399
  </div>
399
400
  {/if}
401
+ </div>
400
402
  {#if errorText}
401
403
  <span class="st-field__error">{errorText}</span>
402
404
  {:else if helperText}
@@ -405,12 +407,15 @@
405
407
  </div>
406
408
 
407
409
  <style>
410
+ .st-field__anchor {
411
+ position: relative;
412
+ }
413
+
408
414
  .st-field {
409
415
  color: var(--st-component-field-labelText, var(--st-semantic-text-primary));
410
416
  display: grid;
411
417
  gap: var(--st-component-field-gap, 0.5rem);
412
418
  max-width: var(--st-component-field-maxWidth, 28rem);
413
- position: relative;
414
419
  }
415
420
 
416
421
  .st-field__control {
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.svelte.d.ts","sourceRoot":"","sources":["../src/lib/DatePicker.svelte.ts"],"names":[],"mappings":"AAGE,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,GAAG,EAAE,IAAI,GAAG,IAAI,CAAC;CAClB,CAAC;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,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGpD,KAAK,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,GAAG;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,IAAI,GAAG,eAAe,GAAG,IAAI,CAAC;IACtC,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AA8UJ,QAAA,MAAM,UAAU,0DAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
@@ -23,6 +23,8 @@
23
23
  | "category1" | "category2" | "category3" | "category4"
24
24
  | "category5" | "category6" | "category7" | "category8";
25
25
 
26
+ export type Density2DChartScale = "categorical" | "sequential";
27
+
26
28
  export type Density2DPoint = {
27
29
  x: number;
28
30
  y: number;
@@ -36,6 +38,7 @@
36
38
  type Density2DChartProps = {
37
39
  data: Density2DPoint[];
38
40
  bins?: number;
41
+ scale?: Density2DChartScale;
39
42
  label?: string;
40
43
  width?: number;
41
44
  height?: number;
@@ -46,6 +49,7 @@
46
49
  let {
47
50
  data = [],
48
51
  bins = 12,
52
+ scale = "sequential",
49
53
  label,
50
54
  width,
51
55
  height = 320,
@@ -69,6 +73,10 @@
69
73
  return TONES[index];
70
74
  }
71
75
 
76
+ function normalizedScale(value: Density2DChartScale | undefined): Density2DChartScale {
77
+ return value === "categorical" ? "categorical" : "sequential";
78
+ }
79
+
72
80
  function niceTicks(min: number, max: number, target = 5): number[] {
73
81
  if (!Number.isFinite(min) || !Number.isFinite(max) || min === max) {
74
82
  return [Number.isFinite(max) ? max : 0];
@@ -100,6 +108,7 @@
100
108
  }
101
109
 
102
110
  let hoveredKey: string | null = $state(null);
111
+ const resolvedScale = $derived(normalizedScale(scale));
103
112
 
104
113
  const plotWidth = $derived(Math.max(resolvedWidth - MARGIN.left - MARGIN.right, 1));
105
114
  const plotHeight = $derived(Math.max(height - MARGIN.top - MARGIN.bottom, 1));
@@ -246,7 +255,7 @@
246
255
  return binCells.find((b) => b.key === hoveredKey) ?? null;
247
256
  });
248
257
 
249
- const classes = () => ["st-density2DChart", className].filter(Boolean).join(" ");
258
+ const classes = () => ["st-density2DChart", `st-density2DChart--${resolvedScale}`, className].filter(Boolean).join(" ");
250
259
  </script>
251
260
 
252
261
  <div class={classes()}>
@@ -19,6 +19,7 @@
19
19
  * class string
20
20
  */
21
21
  export type Density2DTone = "category1" | "category2" | "category3" | "category4" | "category5" | "category6" | "category7" | "category8";
22
+ export type Density2DChartScale = "categorical" | "sequential";
22
23
  export type Density2DPoint = {
23
24
  x: number;
24
25
  y: number;
@@ -27,6 +28,7 @@ export type Density2DPoint = {
27
28
  type Density2DChartProps = {
28
29
  data: Density2DPoint[];
29
30
  bins?: number;
31
+ scale?: Density2DChartScale;
30
32
  label?: string;
31
33
  width?: number;
32
34
  height?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Density2DChart.svelte.d.ts","sourceRoot":"","sources":["../src/lib/Density2DChart.svelte.ts"],"names":[],"mappings":"AAGE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,aAAa,GACrB,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GACrD,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAE1D,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA6QJ,QAAA,MAAM,cAAc,yDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"Density2DChart.svelte.d.ts","sourceRoot":"","sources":["../src/lib/Density2DChart.svelte.ts"],"names":[],"mappings":"AAGE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,aAAa,GACrB,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GACrD,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAE1D,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,YAAY,CAAC;AAE/D,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAmRJ,QAAA,MAAM,cAAc,yDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
@@ -30,12 +30,22 @@
30
30
  }: DropdownProps = $props();
31
31
 
32
32
  let host: HTMLDivElement | undefined = $state();
33
+ let buttonEl: HTMLButtonElement | undefined = $state();
33
34
  let expanded = $state(false);
34
35
  let currentValue = $state<string | undefined>(undefined);
35
36
  let syncedOpen = $state<boolean | undefined>(undefined);
36
37
  let syncedValue = $state<string | undefined>(undefined);
38
+ let listPos = $state({ top: 0, left: 0, width: 0 });
39
+
37
40
  const classes = () => ["st-dropdown", className].filter(Boolean).join(" ");
38
41
  const selectedLabel = () => options.find((option) => option.value === currentValue)?.label ?? placeholder;
42
+
43
+ function updateListPos() {
44
+ if (!buttonEl) return;
45
+ const r = buttonEl.getBoundingClientRect();
46
+ listPos = { top: r.bottom + 4, left: r.left, width: r.width };
47
+ }
48
+
39
49
  const selectOption = (option: DropdownOption) => {
40
50
  if (option.disabled) return;
41
51
  currentValue = option.value;
@@ -60,6 +70,14 @@
60
70
  if (host && target && !host.contains(target)) close();
61
71
  }
62
72
 
73
+ function onWindowScroll() {
74
+ if (expanded) updateListPos();
75
+ }
76
+
77
+ function onWindowResize() {
78
+ if (expanded) updateListPos();
79
+ }
80
+
63
81
  $effect(() => {
64
82
  if (syncedOpen !== open) {
65
83
  expanded = open;
@@ -73,19 +91,24 @@
73
91
  syncedValue = value;
74
92
  }
75
93
  });
94
+
95
+ $effect(() => {
96
+ if (expanded) updateListPos();
97
+ });
76
98
  </script>
77
99
 
78
- <svelte:window onkeydown={onWindowKeydown} onpointerdown={onWindowPointerDown} />
100
+ <svelte:window onkeydown={onWindowKeydown} onpointerdown={onWindowPointerDown} onscroll={onWindowScroll} onresize={onWindowResize} />
79
101
 
80
102
  <div {...rest} bind:this={host} class={classes()}>
81
103
  <button
104
+ bind:this={buttonEl}
82
105
  class="st-dropdown__button"
83
106
  type="button"
84
107
  aria-haspopup="listbox"
85
108
  aria-expanded={expanded}
86
- onclick={() => (expanded = !expanded)}
109
+ onclick={() => { expanded = !expanded; if (expanded) updateListPos(); }}
87
110
  >
88
- <span>{label}: {selectedLabel()}</span>
111
+ <span class="st-dropdown__label">{label}</span>: <span class="st-dropdown__value">{selectedLabel()}</span>
89
112
  <ChevronDown
90
113
  class={`st-dropdown__icon ${expanded ? "st-dropdown__icon--open" : ""}`}
91
114
  size={18}
@@ -94,7 +117,12 @@
94
117
  />
95
118
  </button>
96
119
  {#if expanded}
97
- <div class="st-dropdown__list" role="listbox" aria-label={label}>
120
+ <div
121
+ class="st-dropdown__list"
122
+ role="listbox"
123
+ aria-label={label}
124
+ style="top:{listPos.top}px;left:{listPos.left}px;min-width:{listPos.width}px"
125
+ >
98
126
  {#each options as option (option.value)}
99
127
  <button
100
128
  class="st-dropdown__option"
@@ -154,12 +182,8 @@
154
182
  border-radius: var(--st-component-dropdown-radius, 0.375rem);
155
183
  box-shadow: var(--st-component-dropdown-shadow, 0 8px 24px rgb(15 23 42 / 0.14));
156
184
  display: grid;
157
- left: 0;
158
- margin-top: var(--st-spacing-1, 0.25rem);
159
- min-width: 100%;
160
185
  overflow: hidden;
161
- position: absolute;
162
- top: 100%;
186
+ position: fixed;
163
187
  z-index: var(--st-component-popover-zIndex, 80);
164
188
  }
165
189
 
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.svelte.d.ts","source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MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AA4GJ,QAAA,MAAM,QAAQ,mDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
@@ -39,17 +39,17 @@
39
39
  /** Message principal affiché. */
40
40
  message: string;
41
41
  };
42
- </script>
43
42
 
44
- <script lang="ts">
45
- type EventFeedPanelProps = {
43
+ export type EventFeedPanelProps = {
46
44
  data: EventFeedPanelEvent[];
47
45
  label?: string;
48
46
  maxHeight?: number;
49
47
  height?: number;
50
48
  class?: string;
51
49
  };
50
+ </script>
52
51
 
52
+ <script lang="ts">
53
53
  let {
54
54
  data = [],
55
55
  label,
@@ -32,7 +32,7 @@ export type EventFeedPanelEvent = {
32
32
  /** Message principal affiché. */
33
33
  message: string;
34
34
  };
35
- type EventFeedPanelProps = {
35
+ export type EventFeedPanelProps = {
36
36
  data: EventFeedPanelEvent[];
37
37
  label?: string;
38
38
  maxHeight?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"EventFeedPanel.svelte.d.ts","sourceRoot":"","sources":["../src/lib/EventFeedPanel.svelte.ts"],"names":[],"mappings":"AAGE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,sBAAsB,GAC9B,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,GACP,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,MAAM,mBAAmB,GAAG;IAChC,oEAAoE;IACpE,EAAE,EAAE,MAAM,CAAC;IACX,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,QAAQ,EAAE,sBAAsB,CAAC;IACjC,i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,7 +236,7 @@
236
236
  {/if}
237
237
  </span>
238
238
  <span class="st-fileUploader__itemMeta">
239
- <span class="st-fileUploader__itemName">{item.file.name}</span>
239
+ <span class="st-fileUploader__itemName st-fileUploader__name">{item.file.name}</span>
240
240
  <span class="st-fileUploader__itemSize">{formatSize(item.file.size)}</span>
241
241
  {#if item.status === "error" && item.error}
242
242
  <span class="st-fileUploader__itemError">{item.error}</span>
@@ -274,7 +274,7 @@
274
274
  {/if}
275
275
  </span>
276
276
  <span class="st-fileUploader__itemMeta">
277
- <span class="st-fileUploader__itemName">{file.name}</span>
277
+ <span class="st-fileUploader__itemName st-fileUploader__name">{file.name}</span>
278
278
  <span class="st-fileUploader__itemSize">{formatSize(file.size)}</span>
279
279
  {#if itemError}
280
280
  <span class="st-fileUploader__itemError">{itemError}</span>
@@ -407,7 +407,10 @@
407
407
  }
408
408
 
409
409
  .st-fileUploader__trigger:hover:not(:disabled) {
410
- background: var(--st-component-control-hoverBackground, var(--st-semantic-surface-subtle));
410
+ background: var(
411
+ --st-component-button-anatomy-states-hover-bg,
412
+ color-mix(in srgb, var(--st-semantic-action-primary) 85%, black)
413
+ );
411
414
  }
412
415
 
413
416
  .st-fileUploader__trigger:focus-visible {
@@ -491,6 +494,7 @@
491
494
 
492
495
  .st-fileUploader__itemMeta {
493
496
  display: grid;
497
+ flex: 1 1 0;
494
498
  gap: 0.125rem;
495
499
  min-width: 0;
496
500
  }