@reshape-biotech/design-system 2.7.35 → 2.7.37
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/app.css +2 -2
- package/dist/components/activity/Activity.svelte +6 -4
- package/dist/components/button/Button.stories.svelte +27 -7
- package/dist/components/button/Button.svelte +109 -25
- package/dist/components/card/Card.svelte +7 -5
- package/dist/components/card/CardWrapper.svelte +10 -13
- package/dist/components/checkbox/Checkbox.svelte +3 -2
- package/dist/components/combobox/Combobox.stories.svelte +386 -115
- package/dist/components/combobox/components/combobox-add.svelte +10 -4
- package/dist/components/combobox/components/combobox-content.svelte +36 -60
- package/dist/components/combobox/components/combobox-indicator.svelte +1 -1
- package/dist/components/combobox/types.d.ts +1 -0
- package/dist/components/datepicker/DatePicker.svelte +8 -5
- package/dist/components/divider/Divider.svelte +7 -3
- package/dist/components/drawer/components/drawer-content.svelte +2 -1
- package/dist/components/drawer/components/drawer-title.svelte +2 -1
- package/dist/components/dropdown/Dropdown.stories.svelte +17 -17
- package/dist/components/dropdown/components/dropdown-content.svelte +6 -3
- package/dist/components/dropdown/components/dropdown-item.svelte +9 -1
- package/dist/components/dropdown/components/dropdown-separator.svelte +10 -0
- package/dist/components/dropdown/components/dropdown-separator.svelte.d.ts +5 -0
- package/dist/components/dropdown/components/dropdown-sub-content.svelte +4 -2
- package/dist/components/dropdown/components/dropdown-sub-trigger.svelte +11 -3
- package/dist/components/dropdown/index.d.ts +2 -2
- package/dist/components/dropdown/index.js +2 -2
- package/dist/components/dropdown/types.d.ts +1 -0
- package/dist/components/icon-button/IconButton.svelte +4 -3
- package/dist/components/icons/AnalysisIcon.svelte +7 -7
- package/dist/components/input/Input.svelte +2 -1
- package/dist/components/label/Label.svelte +3 -1
- package/dist/components/list/List.svelte +4 -1
- package/dist/components/markdown/Markdown.svelte +2 -1
- package/dist/components/modal/Modal.stories.svelte +3 -0
- package/dist/components/modal/components/modal-title.svelte +7 -2
- package/dist/components/modal/types.d.ts +1 -0
- package/dist/components/segmented-control-buttons/ControlButton.svelte +7 -1
- package/dist/components/segmented-control-buttons/SegmentedControlButtons.svelte +2 -1
- package/dist/components/select/Select.stories.svelte +89 -14
- package/dist/components/select/components/MultiSelectTrigger.svelte +5 -2
- package/dist/components/select/components/SelectContent.svelte +1 -1
- package/dist/components/select/components/SelectGroupHeading.svelte +1 -1
- package/dist/components/select/components/SelectItem.svelte +3 -2
- package/dist/components/select/components/SelectTrigger.svelte +14 -5
- package/dist/components/select/components/SelectTrigger.svelte.d.ts +1 -0
- package/dist/components/skeleton-loader/SkeletonLoader.svelte +6 -1
- package/dist/components/slider/Slider.svelte +6 -3
- package/dist/components/stat-card/StatCard.stories.svelte +113 -47
- package/dist/components/stat-card/StatCard.svelte +27 -6
- package/dist/components/stat-card/StatCard.svelte.d.ts +4 -0
- package/dist/components/status-badge/StatusBadge.svelte +8 -5
- package/dist/components/status-badge/StatusBadge.svelte.d.ts +1 -0
- package/dist/components/stepper/components/stepper-step.svelte +3 -3
- package/dist/components/table/Table.svelte +2 -1
- package/dist/components/table/components/TBody.svelte +2 -1
- package/dist/components/table/components/THead.svelte +2 -1
- package/dist/components/table/components/Td.svelte +2 -1
- package/dist/components/table/components/Th.svelte +2 -1
- package/dist/components/table/components/Tr.svelte +2 -1
- package/dist/components/tabs/components/Tab.svelte +2 -1
- package/dist/components/tabs/components/Tabs.svelte +2 -1
- package/dist/components/tag/Tag.svelte +3 -2
- package/dist/components/tooltip/Tooltip.svelte +2 -1
- package/package.json +1 -1
package/dist/app.css
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
font-style: normal;
|
|
60
60
|
font-weight: 600;
|
|
61
61
|
line-height: 4.5rem;
|
|
62
|
-
letter-spacing: -0.
|
|
62
|
+
letter-spacing: -0.025em;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
h2 {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
font-style: normal;
|
|
69
69
|
font-weight: 600;
|
|
70
70
|
line-height: 3rem;
|
|
71
|
-
letter-spacing: -0.
|
|
71
|
+
letter-spacing: -0.025em;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
h3 {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import ActivityIcon from './ActivityIcon.svelte';
|
|
4
4
|
import type { ActivityIconType } from './ActivityIcon.svelte';
|
|
5
5
|
import { DateTime } from 'luxon';
|
|
6
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
7
|
|
|
7
8
|
type Activity = {
|
|
8
9
|
activity_type?: string;
|
|
@@ -54,13 +55,14 @@
|
|
|
54
55
|
let { class: className = '', activity }: Props = $props();
|
|
55
56
|
</script>
|
|
56
57
|
|
|
57
|
-
<div class={
|
|
58
|
+
<div class={twMerge('group flex items-stretch gap-3', className)}>
|
|
58
59
|
<div class="flex min-h-12 flex-col items-center gap-1.5">
|
|
59
60
|
<div class="bg-neutral w-0.5 grow group-first:invisible"></div>
|
|
60
61
|
<div
|
|
61
|
-
class=
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
class={twMerge(
|
|
63
|
+
'text-secondary flex h-5 w-5 shrink-0 items-center justify-center rounded p-0.5',
|
|
64
|
+
ACTIVITY_BACKGROUND[activity.icon]
|
|
65
|
+
)}
|
|
64
66
|
>
|
|
65
67
|
<ActivityIcon icon={activity.icon} />
|
|
66
68
|
</div>
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
'transparent',
|
|
22
22
|
'outline',
|
|
23
23
|
'secondary-inverse',
|
|
24
|
+
'transparent-inverse',
|
|
24
25
|
];
|
|
25
26
|
const sizes = ['xs', 'sm', 'md', 'lg'];
|
|
26
27
|
</script>
|
|
@@ -28,15 +29,21 @@
|
|
|
28
29
|
<Story name="Variants" asChild>
|
|
29
30
|
<div class="flex flex-col gap-4">
|
|
30
31
|
{#each variants as variant}
|
|
31
|
-
{#if variant === 'secondary-inverse'}
|
|
32
|
+
{#if variant === 'secondary-inverse' || variant === 'transparent-inverse'}
|
|
32
33
|
<div class="bg-base-inverse p-4 text-primary-inverse">
|
|
33
34
|
<p>{variant}</p>
|
|
34
|
-
<
|
|
35
|
+
<div class="flex gap-4">
|
|
36
|
+
<Button variant={variant as ButtonVariant}>Button</Button>
|
|
37
|
+
<Button variant={variant as ButtonVariant} rounded>Button</Button>
|
|
38
|
+
</div>
|
|
35
39
|
</div>
|
|
36
40
|
{:else}
|
|
37
41
|
<div>
|
|
38
42
|
<p>{variant}</p>
|
|
39
|
-
<
|
|
43
|
+
<div class="flex gap-4">
|
|
44
|
+
<Button variant={variant as ButtonVariant}>Button</Button>
|
|
45
|
+
<Button variant={variant as ButtonVariant} rounded>Button</Button>
|
|
46
|
+
</div>
|
|
40
47
|
</div>
|
|
41
48
|
{/if}
|
|
42
49
|
{/each}
|
|
@@ -57,10 +64,23 @@
|
|
|
57
64
|
<Story name="Disabled" asChild>
|
|
58
65
|
<div class="flex flex-col gap-4">
|
|
59
66
|
{#each variants as variant}
|
|
60
|
-
|
|
61
|
-
<p>
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
{#if variant === 'secondary-inverse' || variant === 'transparent-inverse'}
|
|
68
|
+
<div class="bg-base-inverse p-4 text-primary-inverse">
|
|
69
|
+
<p>{variant}</p>
|
|
70
|
+
<div class="flex gap-4">
|
|
71
|
+
<Button variant={variant as ButtonVariant} disabled>Button</Button>
|
|
72
|
+
<Button variant={variant as ButtonVariant} rounded disabled>Button</Button>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
{:else}
|
|
76
|
+
<div>
|
|
77
|
+
<p>{variant}</p>
|
|
78
|
+
<div class="flex gap-4">
|
|
79
|
+
<Button variant={variant as ButtonVariant} disabled>Button</Button>
|
|
80
|
+
<Button variant={variant as ButtonVariant} rounded disabled>Button</Button>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
{/if}
|
|
64
84
|
{/each}
|
|
65
85
|
</div>
|
|
66
86
|
</Story>
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<script lang="ts">
|
|
15
|
+
import { twMerge } from 'tailwind-merge';
|
|
15
16
|
import Spinner from '../spinner/Spinner.svelte';
|
|
16
17
|
import type { Snippet } from 'svelte';
|
|
17
18
|
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
{id}
|
|
67
68
|
{tabindex}
|
|
68
69
|
class:cursor-wait={loading}
|
|
69
|
-
class=
|
|
70
|
+
class={twMerge('button', variantClass, sizeClass, className)}
|
|
70
71
|
data-testid={dataTestId}
|
|
71
72
|
class:rounded
|
|
72
73
|
class:disabled
|
|
@@ -119,35 +120,14 @@
|
|
|
119
120
|
|
|
120
121
|
.button:disabled {
|
|
121
122
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
background-color: #12192a0A;
|
|
125
|
-
|
|
126
|
-
--tw-text-opacity: 1;
|
|
127
|
-
|
|
128
|
-
color: rgb(136 140 148 / var(--tw-text-opacity, 1))
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.button:hover:disabled {
|
|
132
|
-
|
|
133
|
-
cursor: not-allowed;
|
|
134
|
-
|
|
135
|
-
background-color: #12192a0A;
|
|
136
|
-
|
|
137
|
-
--tw-text-opacity: 1;
|
|
138
|
-
|
|
139
|
-
color: rgb(136 140 148 / var(--tw-text-opacity, 1))
|
|
123
|
+
cursor: not-allowed
|
|
140
124
|
}
|
|
141
125
|
|
|
142
126
|
.rounded {
|
|
143
127
|
|
|
144
|
-
border-radius: 9999px
|
|
128
|
+
border-radius: 9999px !important
|
|
145
129
|
}
|
|
146
130
|
|
|
147
|
-
.disabled:hover {
|
|
148
|
-
|
|
149
|
-
background-color: #12192a0A !important
|
|
150
|
-
}
|
|
151
131
|
/* Size variants */
|
|
152
132
|
.btn-size-xs {
|
|
153
133
|
|
|
@@ -220,6 +200,20 @@
|
|
|
220
200
|
|
|
221
201
|
background-color: rgb(71 65 193 / var(--tw-bg-opacity, 1))
|
|
222
202
|
}
|
|
203
|
+
.btn-primary:disabled {
|
|
204
|
+
|
|
205
|
+
border-color: transparent;
|
|
206
|
+
|
|
207
|
+
background-color: #12192a0A;
|
|
208
|
+
|
|
209
|
+
--tw-text-opacity: 1;
|
|
210
|
+
|
|
211
|
+
color: rgb(136 140 148 / var(--tw-text-opacity, 1))
|
|
212
|
+
}
|
|
213
|
+
.btn-primary:hover:disabled {
|
|
214
|
+
|
|
215
|
+
background-color: #12192a0A
|
|
216
|
+
}
|
|
223
217
|
|
|
224
218
|
.btn-secondary {
|
|
225
219
|
|
|
@@ -239,6 +233,22 @@
|
|
|
239
233
|
|
|
240
234
|
background-color: #12192a0A
|
|
241
235
|
}
|
|
236
|
+
|
|
237
|
+
.btn-secondary:disabled {
|
|
238
|
+
|
|
239
|
+
border-color: transparent;
|
|
240
|
+
|
|
241
|
+
background-color: #12192a0A;
|
|
242
|
+
|
|
243
|
+
--tw-text-opacity: 1;
|
|
244
|
+
|
|
245
|
+
color: rgb(136 140 148 / var(--tw-text-opacity, 1))
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.btn-secondary:hover:disabled {
|
|
249
|
+
|
|
250
|
+
background-color: #12192a0A
|
|
251
|
+
}
|
|
242
252
|
.btn-transparent {
|
|
243
253
|
|
|
244
254
|
background-color: transparent;
|
|
@@ -248,6 +258,18 @@
|
|
|
248
258
|
.btn-transparent:hover {
|
|
249
259
|
|
|
250
260
|
background-color: #12192a0A
|
|
261
|
+
}
|
|
262
|
+
.btn-transparent:disabled {
|
|
263
|
+
|
|
264
|
+
background-color: transparent;
|
|
265
|
+
|
|
266
|
+
--tw-text-opacity: 1;
|
|
267
|
+
|
|
268
|
+
color: rgb(136 140 148 / var(--tw-text-opacity, 1))
|
|
269
|
+
}
|
|
270
|
+
.btn-transparent:hover:disabled {
|
|
271
|
+
|
|
272
|
+
background-color: transparent
|
|
251
273
|
}
|
|
252
274
|
.btn-danger {
|
|
253
275
|
|
|
@@ -272,6 +294,20 @@
|
|
|
272
294
|
--tw-bg-opacity: 1;
|
|
273
295
|
|
|
274
296
|
background-color: rgb(191 57 58 / var(--tw-bg-opacity, 1))
|
|
297
|
+
}
|
|
298
|
+
.btn-danger:disabled {
|
|
299
|
+
|
|
300
|
+
border-color: transparent;
|
|
301
|
+
|
|
302
|
+
background-color: #12192a0A;
|
|
303
|
+
|
|
304
|
+
--tw-text-opacity: 1;
|
|
305
|
+
|
|
306
|
+
color: rgb(136 140 148 / var(--tw-text-opacity, 1))
|
|
307
|
+
}
|
|
308
|
+
.btn-danger:hover:disabled {
|
|
309
|
+
|
|
310
|
+
background-color: #12192a0A
|
|
275
311
|
}
|
|
276
312
|
.btn-outline {
|
|
277
313
|
|
|
@@ -303,7 +339,29 @@
|
|
|
303
339
|
}
|
|
304
340
|
.btn-outline:disabled {
|
|
305
341
|
|
|
306
|
-
border-
|
|
342
|
+
border-color: #12192a14;
|
|
343
|
+
|
|
344
|
+
--tw-bg-opacity: 1;
|
|
345
|
+
|
|
346
|
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
347
|
+
|
|
348
|
+
--tw-text-opacity: 1;
|
|
349
|
+
|
|
350
|
+
color: rgb(136 140 148 / var(--tw-text-opacity, 1));
|
|
351
|
+
|
|
352
|
+
--tw-shadow: 0 0 #0000;
|
|
353
|
+
|
|
354
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
355
|
+
|
|
356
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
|
|
357
|
+
}
|
|
358
|
+
.btn-outline:hover:disabled {
|
|
359
|
+
|
|
360
|
+
border-color: #12192a14;
|
|
361
|
+
|
|
362
|
+
--tw-bg-opacity: 1;
|
|
363
|
+
|
|
364
|
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1))
|
|
307
365
|
}
|
|
308
366
|
.btn-secondary-inverse {
|
|
309
367
|
|
|
@@ -321,6 +379,20 @@
|
|
|
321
379
|
|
|
322
380
|
background-color: #FFFFFF0D
|
|
323
381
|
}
|
|
382
|
+
.btn-secondary-inverse:disabled {
|
|
383
|
+
|
|
384
|
+
border-color: transparent;
|
|
385
|
+
|
|
386
|
+
background-color: #FFFFFF0D;
|
|
387
|
+
|
|
388
|
+
--tw-text-opacity: 1;
|
|
389
|
+
|
|
390
|
+
color: rgb(136 140 148 / var(--tw-text-opacity, 1))
|
|
391
|
+
}
|
|
392
|
+
.btn-secondary-inverse:hover:disabled {
|
|
393
|
+
|
|
394
|
+
background-color: #FFFFFF0D
|
|
395
|
+
}
|
|
324
396
|
.btn-transparent-inverse {
|
|
325
397
|
|
|
326
398
|
background-color: transparent;
|
|
@@ -336,5 +408,17 @@
|
|
|
336
408
|
.btn-transparent-inverse:active {
|
|
337
409
|
|
|
338
410
|
background-color: #FFFFFF0D
|
|
411
|
+
}
|
|
412
|
+
.btn-transparent-inverse:disabled {
|
|
413
|
+
|
|
414
|
+
background-color: transparent;
|
|
415
|
+
|
|
416
|
+
--tw-text-opacity: 1;
|
|
417
|
+
|
|
418
|
+
color: rgb(136 140 148 / var(--tw-text-opacity, 1))
|
|
419
|
+
}
|
|
420
|
+
.btn-transparent-inverse:hover:disabled {
|
|
421
|
+
|
|
422
|
+
background-color: transparent
|
|
339
423
|
}
|
|
340
424
|
</style>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
4
|
|
|
4
5
|
type Props = {
|
|
5
6
|
Header?: Snippet;
|
|
@@ -19,19 +20,20 @@
|
|
|
19
20
|
</script>
|
|
20
21
|
|
|
21
22
|
<div
|
|
22
|
-
class=
|
|
23
|
+
class={twMerge(
|
|
24
|
+
'overflow-hidden rounded-[10px] border border-static bg-surface shadow-container',
|
|
25
|
+
additionalClasses
|
|
26
|
+
)}
|
|
23
27
|
>
|
|
24
28
|
{#if Header}
|
|
25
29
|
<header
|
|
26
|
-
class=
|
|
27
|
-
class:border-b={headerBorder}
|
|
28
|
-
class:border-static={headerBorder}
|
|
30
|
+
class={twMerge('flex min-h-12 items-center px-4', headerBorder && 'border-b border-static')}
|
|
29
31
|
>
|
|
30
32
|
{@render Header()}
|
|
31
33
|
</header>
|
|
32
34
|
{/if}
|
|
33
35
|
{#if children}
|
|
34
|
-
<div class={`p-${padding}`}>
|
|
36
|
+
<div class={twMerge(`p-${padding}`)}>
|
|
35
37
|
{@render children()}
|
|
36
38
|
</div>
|
|
37
39
|
{/if}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { ClassValue } from 'svelte/elements';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
5
|
|
|
5
6
|
type Props = {
|
|
6
7
|
Header?: Snippet;
|
|
@@ -19,28 +20,24 @@
|
|
|
19
20
|
}: Props = $props();
|
|
20
21
|
</script>
|
|
21
22
|
|
|
22
|
-
<div class={
|
|
23
|
+
<div class={twMerge('wrapper', variant, additionalClasses)}>
|
|
23
24
|
{#if Header}
|
|
24
25
|
<header
|
|
25
|
-
class={
|
|
26
|
+
class={twMerge(
|
|
26
27
|
'flex w-full items-center justify-between',
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
]}
|
|
28
|
+
variant === 'default' && 'min-h-10 px-4',
|
|
29
|
+
variant === 'compact' && 'min-h-8 px-3'
|
|
30
|
+
)}
|
|
32
31
|
>
|
|
33
32
|
{@render Header()}
|
|
34
33
|
</header>
|
|
35
34
|
{/if}
|
|
36
35
|
<div
|
|
37
|
-
class={
|
|
36
|
+
class={twMerge(
|
|
38
37
|
'flex w-full flex-col !overflow-hidden [&>*]:w-full',
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
]}
|
|
38
|
+
variant === 'default' && 'gap-1 [&>*]:rounded-xl',
|
|
39
|
+
variant === 'compact' && 'gap-0.5 [&>*]:rounded-[10px]'
|
|
40
|
+
)}
|
|
44
41
|
>
|
|
45
42
|
{@render children()}
|
|
46
43
|
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
2
3
|
import Check from 'phosphor-svelte/lib/Check';
|
|
3
4
|
import Minus from 'phosphor-svelte/lib/Minus';
|
|
4
5
|
import { Icon } from '../icons/index.js';
|
|
@@ -6,13 +7,13 @@
|
|
|
6
7
|
|
|
7
8
|
export type CheckboxProps = CheckboxRootProps;
|
|
8
9
|
|
|
9
|
-
let { checked = $bindable(false), onCheckedChange, name, ...props }: CheckboxProps = $props();
|
|
10
|
+
let { checked = $bindable(false), onCheckedChange, name, class: className, ...props }: CheckboxProps = $props();
|
|
10
11
|
</script>
|
|
11
12
|
|
|
12
13
|
<Checkbox.Root bind:checked {onCheckedChange} {...props}>
|
|
13
14
|
{#snippet children({ checked, indeterminate })}
|
|
14
15
|
<div
|
|
15
|
-
class={
|
|
16
|
+
class={twMerge('flex items-center justify-center rounded border border-static', checked && 'bg-dark-accent-inverse-hover', className)}
|
|
16
17
|
>
|
|
17
18
|
{#if checked}
|
|
18
19
|
<Icon class="text-primary-inverse" icon={Check} />
|