@conalog/ds-svelte 0.0.0-stage → 1.0.0-alpha.2

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 (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -2
  3. package/SUPPORT.json +387 -0
  4. package/dist/ActionButton.svelte +11 -0
  5. package/dist/Badge.svelte +49 -0
  6. package/dist/Button.svelte +107 -0
  7. package/dist/Card.svelte +76 -0
  8. package/dist/Checkbox.svelte +60 -0
  9. package/dist/Chip.svelte +133 -0
  10. package/dist/CircularSpinner.svelte +30 -0
  11. package/dist/DashboardWidget.svelte +875 -0
  12. package/dist/Divider.svelte +29 -0
  13. package/dist/DsTheme.svelte +14 -0
  14. package/dist/IconButton.svelte +7 -0
  15. package/dist/Menu.svelte +277 -0
  16. package/dist/Modal.svelte +86 -0
  17. package/dist/Navigation.svelte +87 -0
  18. package/dist/PageHeader.svelte +81 -0
  19. package/dist/ScopePicker.svelte +271 -0
  20. package/dist/SearchField.svelte +7 -0
  21. package/dist/SegmentedControl.svelte +154 -0
  22. package/dist/StatusBanner.svelte +48 -0
  23. package/dist/Table.svelte +180 -0
  24. package/dist/Tabs.svelte +121 -0
  25. package/dist/TextField.svelte +122 -0
  26. package/dist/Tooltip.svelte +147 -0
  27. package/dist/button-options.mjs +1 -0
  28. package/dist/button.css +514 -0
  29. package/dist/dashboard-widget-drag.mjs +148 -0
  30. package/dist/display.css +53 -0
  31. package/dist/draft-overlay.mjs +67 -0
  32. package/dist/draft.css +248 -0
  33. package/dist/icon-provenance.json +62 -0
  34. package/dist/icons/check/filled.d.mts +3 -0
  35. package/dist/icons/check/filled.mjs +1 -0
  36. package/dist/icons/check/filled.svelte +10 -0
  37. package/dist/icons/check.d.mts +1 -0
  38. package/dist/icons/check.mjs +1 -0
  39. package/dist/icons/headset/filled.d.mts +3 -0
  40. package/dist/icons/headset/filled.mjs +1 -0
  41. package/dist/icons/headset/filled.svelte +10 -0
  42. package/dist/icons/headset.d.mts +1 -0
  43. package/dist/icons/headset.mjs +1 -0
  44. package/dist/icons/notification-bell/filled.d.mts +3 -0
  45. package/dist/icons/notification-bell/filled.mjs +1 -0
  46. package/dist/icons/notification-bell/filled.svelte +10 -0
  47. package/dist/icons/notification-bell-off/filled.d.mts +3 -0
  48. package/dist/icons/notification-bell-off/filled.mjs +1 -0
  49. package/dist/icons/notification-bell-off/filled.svelte +10 -0
  50. package/dist/icons/notification-bell-off.d.mts +1 -0
  51. package/dist/icons/notification-bell-off.mjs +1 -0
  52. package/dist/icons/notification-bell.d.mts +1 -0
  53. package/dist/icons/notification-bell.mjs +1 -0
  54. package/dist/icons/plant/filled.d.mts +3 -0
  55. package/dist/icons/plant/filled.mjs +1 -0
  56. package/dist/icons/plant/filled.svelte +13 -0
  57. package/dist/icons/plant.d.mts +1 -0
  58. package/dist/icons/plant.mjs +1 -0
  59. package/dist/icons/search/outlined.d.mts +3 -0
  60. package/dist/icons/search/outlined.mjs +1 -0
  61. package/dist/icons/search/outlined.svelte +10 -0
  62. package/dist/icons/search.d.mts +1 -0
  63. package/dist/icons/search.mjs +1 -0
  64. package/dist/icons.d.mts +6 -0
  65. package/dist/icons.mjs +6 -0
  66. package/dist/index.d.ts +288 -0
  67. package/dist/index.mjs +22 -0
  68. package/dist/licenses/check/filled.txt +202 -0
  69. package/dist/licenses/headset/filled.txt +21 -0
  70. package/dist/licenses/notification-bell/filled.txt +21 -0
  71. package/dist/licenses/notification-bell-off/filled.txt +21 -0
  72. package/dist/licenses/plant/filled.txt +24 -0
  73. package/dist/licenses/search/outlined.txt +21 -0
  74. package/package.json +58 -4
  75. package/release-source.json +5 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Conalog
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,7 @@
1
- # Temporary Holding Version
1
+ # Svelte 디자인 시스템
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `@conalog/ds-svelte`는 `DsTheme`과 등록된 SVG 아이콘을 제공한다. 패키지의 [지원 정보](SUPPORT.json)에서 등록 범위를 확인한다.
4
+
5
+ `DsTheme`의 `theme`에 등록된 이름을 전달하면 하위 영역이 해당 테마의 CSS 변수를 상속한다. 아이콘은 `@conalog/ds-svelte/icons`에서 `PlantFilled`처럼 이름으로 가져오거나, `import * as Icon from '@conalog/ds-svelte/icons'`로 가져와 `<Icon.PlantFilled />`로 표시한다. 개별 경로는 `icons/<name>`와 `icons/<name>/<style>`이다. 단색은 글자색을 따르며 `label`을 생략하면 장식으로 표시한다.
6
+
7
+ 소스 저장소에서 `npm run packages:build`로 패키지를 생성한다. Svelte 검증은 패키지의 `test`와 `test:consumer` 스크립트로 실행한다.
package/SUPPORT.json ADDED
@@ -0,0 +1,387 @@
1
+ {
2
+ "package": "@conalog/ds-svelte",
3
+ "coreVersion": "1.0.0-alpha.1",
4
+ "packageVersion": "1.0.0-alpha.2",
5
+ "fixtureOnly": true,
6
+ "platforms": [
7
+ "web"
8
+ ],
9
+ "components": [
10
+ {
11
+ "id": "component.button.action",
12
+ "availability": "experimental",
13
+ "options": {
14
+ "color": [
15
+ "primary",
16
+ "neutral",
17
+ "critical"
18
+ ],
19
+ "variant": [
20
+ "solid",
21
+ "weak",
22
+ "outline",
23
+ "clear",
24
+ "quiet"
25
+ ],
26
+ "size": [
27
+ "xs",
28
+ "sm",
29
+ "md",
30
+ "lg"
31
+ ]
32
+ },
33
+ "variantColors": {
34
+ "quiet": [
35
+ "neutral"
36
+ ]
37
+ },
38
+ "platforms": [
39
+ "web"
40
+ ],
41
+ "media": [
42
+ "screen"
43
+ ]
44
+ },
45
+ {
46
+ "id": "component.button.icon",
47
+ "availability": "experimental",
48
+ "options": {
49
+ "color": [
50
+ "primary",
51
+ "neutral",
52
+ "critical"
53
+ ],
54
+ "variant": [
55
+ "weak",
56
+ "outline",
57
+ "clear",
58
+ "quiet"
59
+ ],
60
+ "size": [
61
+ "xs",
62
+ "sm",
63
+ "md",
64
+ "lg"
65
+ ]
66
+ },
67
+ "variantColors": {
68
+ "quiet": [
69
+ "neutral"
70
+ ]
71
+ },
72
+ "platforms": [
73
+ "web"
74
+ ],
75
+ "media": [
76
+ "screen"
77
+ ]
78
+ },
79
+ {
80
+ "id": "component.badge",
81
+ "availability": "experimental",
82
+ "options": {
83
+ "size": [
84
+ "sm",
85
+ "md"
86
+ ],
87
+ "role": [
88
+ "neutral",
89
+ "primary",
90
+ "critical",
91
+ "warning",
92
+ "positive"
93
+ ],
94
+ "variant": [
95
+ "weak",
96
+ "solid",
97
+ "outline"
98
+ ]
99
+ },
100
+ "platforms": [
101
+ "web"
102
+ ],
103
+ "media": [
104
+ "screen"
105
+ ]
106
+ },
107
+ {
108
+ "id": "component.card",
109
+ "availability": "experimental",
110
+ "options": {
111
+ "layout": [
112
+ "block",
113
+ "list",
114
+ "canvas"
115
+ ]
116
+ },
117
+ "platforms": [
118
+ "web"
119
+ ],
120
+ "media": [
121
+ "screen"
122
+ ]
123
+ },
124
+ {
125
+ "id": "component.checkbox",
126
+ "availability": "experimental",
127
+ "options": {},
128
+ "platforms": [
129
+ "web"
130
+ ],
131
+ "media": [
132
+ "screen"
133
+ ]
134
+ },
135
+ {
136
+ "id": "component.circular-spinner",
137
+ "availability": "experimental",
138
+ "options": {},
139
+ "platforms": [
140
+ "web"
141
+ ],
142
+ "media": [
143
+ "screen"
144
+ ]
145
+ },
146
+ {
147
+ "id": "component.dashboard-widget",
148
+ "availability": "experimental",
149
+ "options": {
150
+ "layout": [
151
+ "standard",
152
+ "canvas",
153
+ "control"
154
+ ],
155
+ "mode": [
156
+ "view",
157
+ "edit"
158
+ ]
159
+ },
160
+ "platforms": [
161
+ "web"
162
+ ],
163
+ "media": [
164
+ "screen"
165
+ ]
166
+ },
167
+ {
168
+ "id": "component.page-header",
169
+ "availability": "experimental",
170
+ "options": {},
171
+ "platforms": [
172
+ "web"
173
+ ],
174
+ "media": [
175
+ "screen"
176
+ ]
177
+ },
178
+ {
179
+ "id": "component.status-banner",
180
+ "availability": "experimental",
181
+ "options": {
182
+ "tone": [
183
+ "neutral",
184
+ "accent"
185
+ ]
186
+ },
187
+ "platforms": [
188
+ "web"
189
+ ],
190
+ "media": [
191
+ "screen"
192
+ ]
193
+ },
194
+ {
195
+ "id": "component.tab",
196
+ "availability": "experimental",
197
+ "options": {
198
+ "size": [
199
+ "sm",
200
+ "md"
201
+ ]
202
+ },
203
+ "platforms": [
204
+ "web"
205
+ ],
206
+ "media": [
207
+ "screen"
208
+ ]
209
+ },
210
+ {
211
+ "id": "component.text-field",
212
+ "availability": "experimental",
213
+ "options": {
214
+ "size": [
215
+ "sm",
216
+ "md"
217
+ ]
218
+ },
219
+ "platforms": [
220
+ "web"
221
+ ],
222
+ "media": [
223
+ "screen"
224
+ ]
225
+ },
226
+ {
227
+ "id": "component.divider",
228
+ "availability": "experimental",
229
+ "options": {
230
+ "orientation": [
231
+ "horizontal",
232
+ "vertical"
233
+ ],
234
+ "tone": [
235
+ "neutral",
236
+ "weak"
237
+ ],
238
+ "inset": [
239
+ "none",
240
+ "spacing.card-edge",
241
+ "spacing-x.global-gutter"
242
+ ]
243
+ },
244
+ "provisional": true,
245
+ "platforms": [
246
+ "web"
247
+ ],
248
+ "media": [
249
+ "screen"
250
+ ]
251
+ },
252
+ {
253
+ "id": "component.chip",
254
+ "availability": "experimental",
255
+ "options": {
256
+ "kind": [
257
+ "toggle",
258
+ "dropdown"
259
+ ]
260
+ },
261
+ "provisional": true,
262
+ "platforms": [
263
+ "web"
264
+ ],
265
+ "media": [
266
+ "screen"
267
+ ]
268
+ },
269
+ {
270
+ "id": "component.menu",
271
+ "availability": "experimental",
272
+ "options": {
273
+ "size": [
274
+ "sm",
275
+ "md"
276
+ ]
277
+ },
278
+ "provisional": true,
279
+ "platforms": [
280
+ "web"
281
+ ],
282
+ "media": [
283
+ "screen"
284
+ ]
285
+ },
286
+ {
287
+ "id": "component.modal",
288
+ "availability": "experimental",
289
+ "options": {},
290
+ "provisional": true,
291
+ "platforms": [
292
+ "web"
293
+ ],
294
+ "media": [
295
+ "screen"
296
+ ]
297
+ },
298
+ {
299
+ "id": "component.navigation",
300
+ "availability": "experimental",
301
+ "options": {},
302
+ "provisional": true,
303
+ "platforms": [
304
+ "web"
305
+ ],
306
+ "media": [
307
+ "screen"
308
+ ]
309
+ },
310
+ {
311
+ "id": "component.scope-picker",
312
+ "availability": "experimental",
313
+ "options": {
314
+ "kind": [
315
+ "organization",
316
+ "plant"
317
+ ]
318
+ },
319
+ "provisional": true,
320
+ "platforms": [
321
+ "web"
322
+ ],
323
+ "media": [
324
+ "screen"
325
+ ]
326
+ },
327
+ {
328
+ "id": "component.segmented-control",
329
+ "availability": "experimental",
330
+ "options": {
331
+ "size": [
332
+ "sm",
333
+ "md",
334
+ "lg"
335
+ ]
336
+ },
337
+ "provisional": true,
338
+ "platforms": [
339
+ "web"
340
+ ],
341
+ "media": [
342
+ "screen"
343
+ ]
344
+ },
345
+ {
346
+ "id": "component.table",
347
+ "availability": "experimental",
348
+ "options": {
349
+ "mode": [
350
+ "data",
351
+ "property",
352
+ "entry"
353
+ ]
354
+ },
355
+ "provisional": true,
356
+ "platforms": [
357
+ "web"
358
+ ],
359
+ "media": [
360
+ "screen"
361
+ ]
362
+ },
363
+ {
364
+ "id": "component.tooltip",
365
+ "availability": "experimental",
366
+ "options": {},
367
+ "provisional": true,
368
+ "platforms": [
369
+ "web"
370
+ ],
371
+ "media": [
372
+ "screen"
373
+ ]
374
+ }
375
+ ],
376
+ "themes": [
377
+ "light"
378
+ ],
379
+ "icons": {
380
+ "source": "dist/icon-provenance.json",
381
+ "exports": "icons (named exports), icons/<name>[/<style>]"
382
+ },
383
+ "evidence": [
384
+ "npm test -w @conalog/ds-svelte",
385
+ "npm run test:consumer -w @conalog/ds-svelte"
386
+ ]
387
+ }
@@ -0,0 +1,11 @@
1
+ <script>
2
+ import Button from './Button.svelte';
3
+
4
+ let {
5
+ label, icon, iconPosition = 'prefix', color, variant = 'solid', size = 'md',
6
+ presentation = 'enabled', type = 'button', onclick,
7
+ } = $props();
8
+ </script>
9
+
10
+ <Button kind="action-button" {label} {icon} {iconPosition} color={color ?? (variant === 'quiet' ? 'neutral' : 'primary')}
11
+ {variant} {size} {presentation} {type} {onclick} />
@@ -0,0 +1,49 @@
1
+ <script>
2
+ import './display.css';
3
+
4
+ let { label, role = 'neutral', variant = 'weak', size = 'md', icon: Icon } = $props();
5
+
6
+ let kind = $derived.by(() => {
7
+ if (typeof label !== 'string' || !label.trim()) throw new TypeError('Badge label is required');
8
+ if (!['neutral', 'primary', 'critical', 'warning', 'positive'].includes(role) ||
9
+ !['weak', 'solid', 'outline'].includes(variant) || !['sm', 'md'].includes(size)) {
10
+ throw new RangeError('Unsupported Badge options');
11
+ }
12
+ return ['badge', role, size, variant].join('-');
13
+ });
14
+ </script>
15
+
16
+ <span class="badge" data-ds-component="badge" data-ds-size={size} data-ds-display={kind}>
17
+ {#if Icon}<span class="icon" aria-hidden="true"><Icon /></span>{/if}
18
+ <span>{label}</span>
19
+ </span>
20
+
21
+ <style>
22
+ .badge {
23
+ display: inline-flex;
24
+ box-sizing: border-box;
25
+ align-items: center;
26
+ gap: var(--ds-display-container-column-gap);
27
+ min-height: var(--ds-display-container-min-height);
28
+ padding-inline: var(--ds-display-container-padding-inline);
29
+ border-radius: var(--ds-display-container-border-radius);
30
+ background: var(--ds-display-container-background-color);
31
+ box-shadow: inset 0 0 0 var(--ds-display-container-border-width, 0px) var(--ds-display-container-border-color, transparent);
32
+ color: var(--ds-display-label-color);
33
+ font-family: var(--ds-display-label-font-family);
34
+ font-size: var(--ds-display-label-font-size);
35
+ font-weight: var(--ds-display-label-font-weight);
36
+ letter-spacing: var(--ds-display-label-letter-spacing);
37
+ line-height: var(--ds-display-label-line-height);
38
+ overflow-wrap: anywhere;
39
+ }
40
+
41
+ .icon {
42
+ display: inline-flex;
43
+ flex: none;
44
+ width: var(--ds-display-icon-width);
45
+ height: var(--ds-display-icon-height);
46
+ }
47
+
48
+ .icon :global(svg) { width: 100%; height: 100%; }
49
+ </style>
@@ -0,0 +1,107 @@
1
+ <script>
2
+ import { buttonOptions } from './button-options.mjs';
3
+ import './button.css';
4
+
5
+ let {
6
+ kind, label, icon: Icon, iconPosition = 'prefix', color, variant, size,
7
+ presentation = 'enabled', type = 'button', onclick,
8
+ } = $props();
9
+
10
+ const states = ['enabled', 'disabled', 'loading'];
11
+ let key = $derived.by(() => {
12
+ const options = buttonOptions[kind];
13
+ if (!options || !options.color.includes(color) || !options.variant.includes(variant) || !options.size.includes(size)) {
14
+ throw new RangeError('Unsupported ' + kind + ' options: ' + [color, variant, size].join('/'));
15
+ }
16
+ const colors = options.variantColors?.[variant];
17
+ if (colors && !colors.includes(color)) throw new RangeError('Unsupported ' + kind + ' color for ' + variant + ': ' + color);
18
+ if (typeof label !== 'string' || !label.trim()) throw new TypeError('Button label is required');
19
+ if (kind === 'icon-button' && !Icon) throw new TypeError('Icon Button requires an icon');
20
+ if (!states.includes(presentation)) throw new RangeError('Invalid Button presentation');
21
+ if (iconPosition !== 'prefix' && iconPosition !== 'suffix') throw new RangeError('Invalid Button icon position');
22
+ if (!['button', 'submit', 'reset'].includes(type)) throw new RangeError('Invalid HTML Button type');
23
+ return [kind, color, variant, size].join('-');
24
+ });
25
+ let loading = $derived(presentation === 'loading');
26
+
27
+ function activate(event) {
28
+ if (presentation !== 'enabled') {
29
+ event.preventDefault();
30
+ return;
31
+ }
32
+ onclick?.(event);
33
+ }
34
+ </script>
35
+
36
+ {#snippet glyph()}
37
+ {#if Icon}<span class="icon" data-ds-icon aria-hidden="true"><Icon /></span>{/if}
38
+ {/snippet}
39
+
40
+ <button
41
+ {type}
42
+ data-ds-button-kind={key}
43
+ data-ds-button={kind}
44
+ data-ds-size={size}
45
+ data-ds-has-icon={Icon ? 'true' : 'false'}
46
+ data-ds-presentation={presentation}
47
+ aria-label={label}
48
+ aria-busy={loading || undefined}
49
+ aria-disabled={loading || undefined}
50
+ disabled={presentation === 'disabled'}
51
+ tabindex={loading ? -1 : undefined}
52
+ onclick={activate}
53
+ onpointerdown={(event) => { if (loading) event.preventDefault(); }}
54
+ >
55
+ <span class={['content', { loading }]} aria-hidden="true">
56
+ {#if iconPosition === 'prefix'}{@render glyph()}{/if}
57
+ {#if kind === 'action-button'}<span class="label" data-ds-label>{label}</span>{/if}
58
+ {#if iconPosition === 'suffix'}{@render glyph()}{/if}
59
+ </span>
60
+ {#if loading}
61
+ <svg class="spinner" viewBox="0 0 16 16" aria-hidden="true">
62
+ <circle cx="3" cy="8" r="1.5" />
63
+ <circle cx="8" cy="8" r="1.5" />
64
+ <circle cx="13" cy="8" r="1.5" />
65
+ </svg>
66
+ {/if}
67
+ </button>
68
+
69
+ <style>
70
+ button {
71
+ position: relative;
72
+ display: inline-grid;
73
+ box-sizing: border-box;
74
+ place-items: center;
75
+ padding: 0;
76
+ outline: none;
77
+ cursor: pointer;
78
+ vertical-align: middle;
79
+ }
80
+ button:disabled, button[aria-disabled='true'] { cursor: default; }
81
+ .content { display: inline-flex; align-items: center; justify-content: center; gap: inherit; }
82
+ .content.loading { visibility: hidden; }
83
+ .label {
84
+ color: var(--ds-label-color);
85
+ font-family: var(--ds-label-font-family);
86
+ font-size: var(--ds-label-font-size);
87
+ font-weight: var(--ds-label-font-weight);
88
+ letter-spacing: var(--ds-label-letter-spacing);
89
+ line-height: var(--ds-label-line-height);
90
+ }
91
+ .icon, .spinner {
92
+ display: inline-flex;
93
+ flex: none;
94
+ width: var(--ds-icon-width);
95
+ height: var(--ds-icon-height);
96
+ color: var(--ds-icon-color);
97
+ }
98
+ .icon :global(svg) { width: 100%; height: 100%; }
99
+ [data-ds-button='action-button'] .icon { transform: translateY(-1px); }
100
+ .spinner { position: absolute; color: var(--ds-spinner-color); fill: currentColor; }
101
+ @media (prefers-reduced-motion: no-preference) {
102
+ .spinner circle { animation: fade 1s ease-in-out infinite; }
103
+ .spinner circle:nth-child(2) { animation-delay: 120ms; }
104
+ .spinner circle:nth-child(3) { animation-delay: 240ms; }
105
+ }
106
+ @keyframes fade { 0%, 80%, 100% { opacity: .35; } 40% { opacity: 1; } }
107
+ </style>
@@ -0,0 +1,76 @@
1
+ <script>
2
+ import './display.css';
3
+
4
+ let { heading, description, actions, layout = 'block', children } = $props();
5
+ let scope = $derived.by(() => {
6
+ if (!['block', 'list', 'canvas'].includes(layout)) throw new RangeError('Invalid Card layout');
7
+ if (heading !== undefined && (typeof heading !== 'string' || !heading.trim())) {
8
+ throw new TypeError('Card heading must contain text');
9
+ }
10
+ if ((description !== undefined || actions) && heading === undefined) throw new TypeError('Card header content requires a heading');
11
+ return 'card-' + layout;
12
+ });
13
+ </script>
14
+
15
+ <section data-ds-component="card" data-ds-display={scope}>
16
+ {#if heading !== undefined}
17
+ <header>
18
+ <div class="heading">
19
+ <h2>{heading}</h2>
20
+ {#if description}<p>{description}</p>{/if}
21
+ </div>
22
+ {#if actions}<div class="actions">{@render actions()}</div>{/if}
23
+ </header>
24
+ {/if}
25
+ <div class="body">{@render children()}</div>
26
+ </section>
27
+
28
+ <style>
29
+ section {
30
+ position: relative;
31
+ overflow: hidden;
32
+ background: var(--ds-display-container-background-color);
33
+ border-radius: var(--ds-display-container-border-radius);
34
+ }
35
+ section::after {
36
+ position: absolute;
37
+ inset: 0;
38
+ border-radius: inherit;
39
+ box-shadow: inset 0 0 0 var(--ds-display-container-border-width) var(--ds-display-container-border-color);
40
+ content: '';
41
+ pointer-events: none;
42
+ }
43
+ header {
44
+ display: flex;
45
+ flex-wrap: wrap;
46
+ justify-content: space-between;
47
+ align-items: start;
48
+ gap: var(--ds-display-header-column-gap);
49
+ padding-inline: var(--ds-display-header-padding-inline);
50
+ padding-block-start: var(--ds-display-header-padding-block-start);
51
+ padding-block-end: var(--ds-display-header-padding-block-end);
52
+ }
53
+ .heading { display: grid; min-inline-size: 0; gap: var(--ds-display-header-column-gap); }
54
+ .actions { display: flex; flex-wrap: wrap; justify-content: end; margin-inline-start: auto; gap: var(--ds-display-header-column-gap); }
55
+ h2, p { margin: 0; overflow-wrap: anywhere; }
56
+ h2 {
57
+ color: var(--ds-display-title-color);
58
+ font-family: var(--ds-display-title-font-family);
59
+ font-size: var(--ds-display-title-font-size);
60
+ font-weight: var(--ds-display-title-font-weight);
61
+ letter-spacing: var(--ds-display-title-letter-spacing);
62
+ line-height: var(--ds-display-title-line-height);
63
+ }
64
+ p {
65
+ color: var(--ds-display-description-color);
66
+ font-family: var(--ds-display-description-font-family);
67
+ font-size: var(--ds-display-description-font-size);
68
+ font-weight: var(--ds-display-description-font-weight);
69
+ letter-spacing: var(--ds-display-description-letter-spacing);
70
+ line-height: var(--ds-display-description-line-height);
71
+ }
72
+ .body {
73
+ padding-inline: var(--ds-display-body-padding-inline);
74
+ padding-block-end: var(--ds-display-body-padding-block-end);
75
+ }
76
+ </style>