@reshape-biotech/design-system 0.0.45 → 0.0.48
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 +43 -31
- package/dist/components/activity/Activity.stories.svelte +100 -0
- package/dist/components/activity/Activity.stories.svelte.d.ts +19 -0
- package/dist/components/activity/Activity.svelte +80 -0
- package/dist/components/activity/Activity.svelte.d.ts +18 -0
- package/dist/components/activity/index.d.ts +1 -0
- package/dist/components/activity/index.js +1 -0
- package/dist/components/avatar/Avatar.svelte +3 -3
- package/dist/components/banner/Banner.svelte +2 -2
- package/dist/components/button/Button.svelte +94 -7
- package/dist/components/button/Button.svelte.d.ts +8 -5
- package/dist/components/collapsible/Collapsible.stories.svelte +40 -0
- package/dist/components/collapsible/Collapsible.stories.svelte.d.ts +19 -0
- package/dist/components/collapsible/components/collapsible-content.svelte +26 -0
- package/dist/components/collapsible/components/collapsible-content.svelte.d.ts +10 -0
- package/dist/components/collapsible/components/collapsible-trigger.svelte +36 -0
- package/dist/components/collapsible/components/collapsible-trigger.svelte.d.ts +4 -0
- package/dist/components/collapsible/index.d.ts +5 -0
- package/dist/components/collapsible/index.js +4 -0
- package/dist/components/collapsible/types.d.ts +9 -0
- package/dist/components/collapsible/types.js +1 -0
- package/dist/components/combobox/Combobox.stories.svelte +119 -0
- package/dist/components/combobox/Combobox.stories.svelte.d.ts +19 -0
- package/dist/components/combobox/components/combobox-add.svelte +30 -0
- package/dist/components/combobox/components/combobox-add.svelte.d.ts +8 -0
- package/dist/components/combobox/components/combobox-content.svelte +137 -0
- package/dist/components/combobox/components/combobox-content.svelte.d.ts +4 -0
- package/dist/components/combobox/components/combobox-indicator.svelte +5 -0
- package/dist/components/combobox/components/combobox-indicator.svelte.d.ts +18 -0
- package/dist/components/combobox/index.d.ts +14 -0
- package/dist/components/combobox/index.js +15 -0
- package/dist/components/combobox/types.d.ts +20 -0
- package/dist/components/combobox/types.js +1 -0
- package/dist/components/datepicker/DatePicker.svelte +158 -97
- package/dist/components/divider/Divider.svelte +1 -1
- package/dist/components/drawer/Drawer.svelte +1 -1
- package/dist/components/drawer/DrawerLabel.svelte +2 -2
- package/dist/components/dropdown/components/DropdownContent.svelte +4 -1
- package/dist/components/dropdown/components/DropdownMenu.svelte +1 -1
- package/dist/components/dropdown/components/DropdownTrigger.svelte +4 -2
- package/dist/components/dropdown/components/DropdownTrigger.svelte.d.ts +1 -0
- package/dist/components/dropdown/components/OutlinedButton.svelte +2 -2
- package/dist/components/empty-content/EmptyContent.svelte +19 -0
- package/dist/components/empty-content/EmptyContent.svelte.d.ts +8 -0
- package/dist/components/graphs/chart/Chart.stories.svelte +128 -0
- package/dist/components/graphs/chart/Chart.stories.svelte.d.ts +19 -0
- package/dist/components/graphs/chart/Chart.svelte +145 -0
- package/dist/components/graphs/chart/Chart.svelte.d.ts +17 -0
- package/dist/components/graphs/index.d.ts +4 -0
- package/dist/components/graphs/index.js +4 -0
- package/dist/components/graphs/line/LineChart.stories.svelte +73 -0
- package/dist/components/graphs/line/LineChart.stories.svelte.d.ts +19 -0
- package/dist/components/graphs/line/LineChart.svelte +102 -0
- package/dist/components/graphs/line/LineChart.svelte.d.ts +18 -0
- package/dist/components/graphs/multiline/MultiLineChart.stories.svelte +77 -0
- package/dist/components/graphs/multiline/MultiLineChart.stories.svelte.d.ts +19 -0
- package/dist/components/graphs/multiline/MultiLineChart.svelte +108 -0
- package/dist/components/graphs/multiline/MultiLineChart.svelte.d.ts +22 -0
- package/dist/components/graphs/scatterplot/Scatterplot.stories.svelte +78 -0
- package/dist/components/graphs/scatterplot/Scatterplot.stories.svelte.d.ts +19 -0
- package/dist/components/graphs/scatterplot/Scatterplot.svelte +67 -0
- package/dist/components/graphs/scatterplot/Scatterplot.svelte.d.ts +16 -0
- package/dist/components/icon-button/IconButton.svelte +18 -5
- package/dist/components/icon-button/IconButton.svelte.d.ts +2 -2
- package/dist/components/icons/AnalysisIcon.stories.svelte +38 -0
- package/dist/components/icons/AnalysisIcon.stories.svelte.d.ts +27 -0
- package/dist/components/icons/AnalysisIcon.svelte +110 -0
- package/dist/components/icons/AnalysisIcon.svelte.d.ts +10 -0
- package/dist/components/icons/Icon.svelte +23 -0
- package/dist/components/icons/Icon.svelte.d.ts +4 -0
- package/dist/components/icons/custom/Halo.svelte +32 -0
- package/dist/components/icons/custom/Halo.svelte.d.ts +26 -0
- package/dist/components/icons/custom/Well.svelte +26 -0
- package/dist/components/icons/custom/Well.svelte.d.ts +26 -0
- package/dist/components/icons/index.d.ts +17 -0
- package/dist/components/icons/index.js +21 -0
- package/dist/components/icons/types.d.ts +0 -0
- package/dist/components/icons/types.js +1 -0
- package/dist/components/image/Image.svelte +5 -6
- package/dist/components/input/Input.svelte +63 -41
- package/dist/components/input/Input.svelte.d.ts +7 -4
- package/dist/components/list/List.svelte +4 -10
- package/dist/components/logo/Logo.svelte +8 -5
- package/dist/components/logo/Logo.svelte.d.ts +1 -0
- package/dist/components/modal/Modal.svelte +1 -1
- package/dist/components/notification-popup/NotificationPopup.stories.svelte +2 -2
- package/dist/components/notification-popup/NotificationPopup.svelte +4 -2
- package/dist/components/segmented-control-buttons/ControlButton.svelte +2 -4
- package/dist/components/select/Select.svelte +7 -4
- package/dist/components/skeleton-loader/StatcardSkeleton.svelte +2 -5
- package/dist/components/slider/Slider.svelte +32 -23
- package/dist/components/slider/Slider.svelte.d.ts +2 -0
- package/dist/components/stat-card/StatCard.svelte +6 -6
- package/dist/components/table/Table.svelte +1 -1
- package/dist/components/table/components/Th.svelte +1 -1
- package/dist/components/tag/Tag.svelte +3 -5
- package/dist/components/tag/Tag.svelte.d.ts +5 -4
- package/dist/components/toggle/Toggle.svelte.d.ts +3 -2
- package/dist/fonts/afAnotherSans-Medium.woff2 +0 -0
- package/dist/fonts/afAnotherSans-Regular.woff2 +0 -0
- package/dist/fonts/afAnotherSans-SemiBold.woff2 +0 -0
- package/dist/fonts/afAnotherSans.woff2 +0 -0
- package/dist/fonts/index.d.ts +1 -3
- package/dist/fonts/index.js +2 -6
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/tailwind-safelist.js +1 -1
- package/dist/tailwind.preset.d.ts +19 -6
- package/dist/tailwind.preset.js +5 -4
- package/dist/tokens.d.ts +39 -11
- package/dist/tokens.js +34 -16
- package/package.json +18 -15
- package/dist/fonts/MDSystem-Medium.woff +0 -0
- package/dist/fonts/MDSystem-Medium.woff2 +0 -0
- package/dist/fonts/MDSystem-Regular.woff +0 -0
- package/dist/fonts/MDSystem-Regular.woff2 +0 -0
- package/dist/fonts/MDSystem-Semibold.woff +0 -0
- package/dist/fonts/MDSystem-Semibold.woff2 +0 -0
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
label?: string | null;
|
|
6
6
|
value: string | number;
|
|
7
7
|
type?: 'text' | 'password' | 'textarea' | 'number';
|
|
8
|
+
name?: string;
|
|
8
9
|
required?: boolean;
|
|
9
10
|
autofocus?: boolean;
|
|
10
11
|
placeholder?: string;
|
|
@@ -17,7 +18,8 @@
|
|
|
17
18
|
error?: Snippet;
|
|
18
19
|
input?: HTMLInputElement | HTMLTextAreaElement;
|
|
19
20
|
maxlength?: number | null;
|
|
20
|
-
size?: 'xs' | 'sm' | 'md';
|
|
21
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'dynamic';
|
|
22
|
+
readonly?: boolean;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
let {
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
autofocus = false,
|
|
29
31
|
placeholder = '',
|
|
30
32
|
id = undefined,
|
|
33
|
+
name,
|
|
31
34
|
validator = (_) => {
|
|
32
35
|
return true;
|
|
33
36
|
},
|
|
@@ -38,7 +41,8 @@
|
|
|
38
41
|
error,
|
|
39
42
|
input = $bindable(),
|
|
40
43
|
maxlength = null,
|
|
41
|
-
size = 'md'
|
|
44
|
+
size = 'md',
|
|
45
|
+
readonly = false
|
|
42
46
|
}: Props = $props();
|
|
43
47
|
|
|
44
48
|
let valid = $state(true);
|
|
@@ -46,6 +50,7 @@
|
|
|
46
50
|
const inputId = Math.random().toString(36).substring(7); // used for A11y
|
|
47
51
|
|
|
48
52
|
function handleInput(event: Event) {
|
|
53
|
+
if (readonly) return;
|
|
49
54
|
const target = event.target as HTMLTextAreaElement | HTMLInputElement;
|
|
50
55
|
value = target.value;
|
|
51
56
|
|
|
@@ -54,8 +59,21 @@
|
|
|
54
59
|
}
|
|
55
60
|
}
|
|
56
61
|
function autoResizeTextarea(textarea: HTMLTextAreaElement) {
|
|
62
|
+
// Set a maximum height for the textarea (e.g., 200px)
|
|
63
|
+
const maxHeight = 200;
|
|
64
|
+
|
|
65
|
+
// Reset height to auto to get the correct scrollHeight
|
|
57
66
|
textarea.style.height = 'auto';
|
|
58
|
-
|
|
67
|
+
|
|
68
|
+
// If scrollHeight is less than maxHeight, set height to scrollHeight
|
|
69
|
+
// Otherwise, set height to maxHeight and enable scrolling
|
|
70
|
+
if (textarea.scrollHeight < maxHeight) {
|
|
71
|
+
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
72
|
+
textarea.style.overflowY = 'hidden';
|
|
73
|
+
} else {
|
|
74
|
+
textarea.style.height = `${maxHeight}px`;
|
|
75
|
+
textarea.style.overflowY = 'auto';
|
|
76
|
+
}
|
|
59
77
|
}
|
|
60
78
|
|
|
61
79
|
function handleBlur(event: Event) {
|
|
@@ -88,6 +106,8 @@
|
|
|
88
106
|
{autofocus}
|
|
89
107
|
{placeholder}
|
|
90
108
|
{maxlength}
|
|
109
|
+
{name}
|
|
110
|
+
{readonly}
|
|
91
111
|
></textarea>
|
|
92
112
|
{:else}
|
|
93
113
|
<div class="whitespace-nowrap text-secondary">
|
|
@@ -100,6 +120,7 @@
|
|
|
100
120
|
class:has-placeholder={placeholder}
|
|
101
121
|
aria-label={label}
|
|
102
122
|
{type}
|
|
123
|
+
{name}
|
|
103
124
|
{required}
|
|
104
125
|
oninput={handleInput}
|
|
105
126
|
onblur={handleBlur}
|
|
@@ -109,6 +130,7 @@
|
|
|
109
130
|
{autofocus}
|
|
110
131
|
{placeholder}
|
|
111
132
|
{maxlength}
|
|
133
|
+
{readonly}
|
|
112
134
|
/>
|
|
113
135
|
<div class="whitespace-nowrap text-secondary">
|
|
114
136
|
{@render suffix?.()}
|
|
@@ -123,60 +145,60 @@
|
|
|
123
145
|
<style>
|
|
124
146
|
input,
|
|
125
147
|
textarea {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
overflow: hidden;
|
|
132
|
-
|
|
133
|
-
outline: 2px solid transparent;
|
|
134
|
-
|
|
135
|
-
outline-offset: 2px
|
|
148
|
+
width: 100%;
|
|
149
|
+
outline: 2px solid transparent;
|
|
150
|
+
outline-offset: 2px;
|
|
151
|
+
/* Remove the resize-none class to allow scrolling */
|
|
152
|
+
resize: none
|
|
136
153
|
}
|
|
137
154
|
|
|
138
155
|
div:not(:focus-within):hover {
|
|
139
|
-
|
|
140
|
-
border-color: #5750ee40
|
|
156
|
+
border-color: #5750ee40
|
|
141
157
|
}
|
|
142
158
|
|
|
143
159
|
div:focus-within {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
border-color: rgb(87 80 238 / var(--tw-border-opacity, 1))
|
|
160
|
+
--tw-border-opacity: 1;
|
|
161
|
+
border-color: rgb(87 80 238 / var(--tw-border-opacity, 1))
|
|
148
162
|
}
|
|
149
163
|
|
|
150
164
|
.size-xs {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
line-height: 1rem
|
|
165
|
+
height: 1.5rem;
|
|
166
|
+
padding: 0.5rem;
|
|
167
|
+
font-size: 0.75rem;
|
|
168
|
+
line-height: 1rem
|
|
157
169
|
}
|
|
158
170
|
|
|
159
171
|
.size-sm {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
padding-top: 0.5rem;
|
|
166
|
-
|
|
167
|
-
padding-bottom: 0.5rem;
|
|
168
|
-
|
|
169
|
-
font-size: 0.875rem;
|
|
170
|
-
|
|
171
|
-
line-height: 1.25rem
|
|
172
|
+
height: 2rem;
|
|
173
|
+
padding-left: 0.75rem;
|
|
174
|
+
padding-right: 0.75rem;
|
|
175
|
+
padding-top: 0.5rem;
|
|
176
|
+
padding-bottom: 0.5rem
|
|
172
177
|
}
|
|
173
178
|
|
|
174
179
|
.size-md {
|
|
180
|
+
height: 2.5rem;
|
|
181
|
+
padding-left: 0.75rem;
|
|
182
|
+
padding-right: 0.75rem;
|
|
183
|
+
padding-top: 0.5rem;
|
|
184
|
+
padding-bottom: 0.5rem
|
|
185
|
+
}
|
|
175
186
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
187
|
+
.size-lg {
|
|
188
|
+
height: 3rem;
|
|
189
|
+
padding-left: 0.75rem;
|
|
190
|
+
padding-right: 0.75rem;
|
|
191
|
+
padding-top: 0.75rem;
|
|
192
|
+
padding-bottom: 0.75rem;
|
|
193
|
+
font-size: 1rem;
|
|
194
|
+
line-height: 1.5rem
|
|
195
|
+
}
|
|
179
196
|
|
|
180
|
-
|
|
197
|
+
.size-dynamic {
|
|
198
|
+
height: auto;
|
|
199
|
+
padding-left: 0.75rem;
|
|
200
|
+
padding-right: 0.75rem;
|
|
201
|
+
padding-top: 0.5rem;
|
|
202
|
+
padding-bottom: 0.5rem
|
|
181
203
|
}
|
|
182
204
|
</style>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
|
|
2
|
+
interface Props {
|
|
3
3
|
label?: string | null;
|
|
4
4
|
value: string | number;
|
|
5
|
-
type?:
|
|
5
|
+
type?: 'text' | 'password' | 'textarea' | 'number';
|
|
6
|
+
name?: string;
|
|
6
7
|
required?: boolean;
|
|
7
8
|
autofocus?: boolean;
|
|
8
9
|
placeholder?: string;
|
|
@@ -15,7 +16,9 @@ declare const Input: import("svelte").Component<{
|
|
|
15
16
|
error?: Snippet;
|
|
16
17
|
input?: HTMLInputElement | HTMLTextAreaElement;
|
|
17
18
|
maxlength?: number | null;
|
|
18
|
-
size?:
|
|
19
|
-
|
|
19
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'dynamic';
|
|
20
|
+
readonly?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const Input: import("svelte").Component<Props, {}, "value" | "input">;
|
|
20
23
|
type Input = ReturnType<typeof Input>;
|
|
21
24
|
export default Input;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
.listStyles.default {
|
|
39
39
|
|
|
40
|
-
gap:
|
|
40
|
+
gap: 1rem
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.listStyles.compact {
|
|
@@ -48,13 +48,9 @@
|
|
|
48
48
|
|
|
49
49
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
50
50
|
|
|
51
|
-
padding-
|
|
51
|
+
padding-left: 1rem;
|
|
52
52
|
|
|
53
|
-
padding-
|
|
54
|
-
|
|
55
|
-
padding-right: 1.5rem;
|
|
56
|
-
|
|
57
|
-
padding-top: 0.5rem
|
|
53
|
+
padding-right: 1rem
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
.listStyles.compact :global(> .item:not(:last-child)) {
|
|
@@ -63,9 +59,7 @@
|
|
|
63
59
|
|
|
64
60
|
border-style: solid;
|
|
65
61
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
border-color: var(--fallback-n,oklch(var(--n)/var(--tw-border-opacity, 1)))
|
|
62
|
+
border-color: #12192a14
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
.listStyles :global(.item) {
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
type Props = {
|
|
3
3
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
color?: 'default' | 'white';
|
|
4
5
|
};
|
|
5
6
|
|
|
6
|
-
let { size = 'md' }: Props = $props();
|
|
7
|
+
let { size = 'md', color = 'default' }: Props = $props();
|
|
8
|
+
|
|
9
|
+
const colorMap = {
|
|
10
|
+
default: '#ff7a00',
|
|
11
|
+
white: '#ffffff'
|
|
12
|
+
};
|
|
7
13
|
|
|
8
14
|
const sizeMap = {
|
|
9
15
|
xs: 16,
|
|
@@ -18,19 +24,16 @@
|
|
|
18
24
|
width={sizeMap[size]}
|
|
19
25
|
height={sizeMap[size]}
|
|
20
26
|
viewBox={`0 0 24 24`}
|
|
21
|
-
fill=
|
|
27
|
+
fill={colorMap[color]}
|
|
22
28
|
xmlns="http://www.w3.org/2000/svg"
|
|
23
29
|
>
|
|
24
30
|
<path
|
|
25
31
|
d="M5.25 10.5C2.3511 10.5 0 8.1489 0 5.25C0 2.3511 2.3511 0 5.25 0C8.1489 0 10.5 2.3511 10.5 5.25C10.5034 8.1489 8.1523 10.5 5.25 10.5Z"
|
|
26
|
-
fill="#FF7A00"
|
|
27
32
|
/>
|
|
28
33
|
<path
|
|
29
34
|
d="M18.75 10.5C15.8511 10.5 13.5 8.1489 13.5 5.25C13.5 2.3511 15.8511 0 18.75 0C21.6489 0 24 2.3511 24 5.25C24.0034 8.1489 21.6523 10.5 18.75 10.5Z"
|
|
30
|
-
fill="#FF7A00"
|
|
31
35
|
/>
|
|
32
36
|
<path
|
|
33
37
|
d="M0 18.75C0 15.8511 2.3511 13.5 5.25 13.5C8.1489 13.5 10.5 15.8511 10.5 18.75C10.5 21.6489 8.1489 24 5.25 24C2.3511 24 0 21.6489 0 18.75Z"
|
|
34
|
-
fill="#FF7A00"
|
|
35
38
|
/>
|
|
36
39
|
</svg>
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
|
|
20
20
|
<Story name="Primary">
|
|
21
21
|
<NotificationPopup onClose={handleClick} title="See what's new" {visible}>
|
|
22
|
-
<a href="_blank" color="transparent" class="flex items-center gap-
|
|
23
|
-
<Sparkle />
|
|
22
|
+
<a href="_blank" color="transparent" class="flex items-center gap-2">
|
|
23
|
+
<Sparkle weight="bold" />
|
|
24
24
|
<p>Product updates</p>
|
|
25
25
|
</a>
|
|
26
26
|
</NotificationPopup>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{#if visible}
|
|
19
19
|
<div
|
|
20
20
|
{id}
|
|
21
|
-
class="flex w-[
|
|
21
|
+
class="flex w-[200px] justify-between rounded-lg bg-surface p-3 shadow-menu"
|
|
22
22
|
in:fly={{ y: 100, duration: 1000 }}
|
|
23
23
|
out:fade
|
|
24
24
|
>
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
<h6 class="flex h-6 items-center">{title}</h6>
|
|
27
27
|
{@render children?.()}
|
|
28
28
|
</div>
|
|
29
|
-
<IconButton size="xs" onclick={onClose}
|
|
29
|
+
<IconButton size="xs" variant="transparent" rounded={false} onclick={onClose}
|
|
30
|
+
><X class="text-icon-tertiary" weight="bold" /></IconButton
|
|
31
|
+
>
|
|
30
32
|
</div>
|
|
31
33
|
{/if}
|
|
@@ -23,10 +23,8 @@
|
|
|
23
23
|
children
|
|
24
24
|
}: Props = $props();
|
|
25
25
|
const colors: Record<Color, string> = {
|
|
26
|
-
primary:
|
|
27
|
-
|
|
28
|
-
secondary:
|
|
29
|
-
'bg-transparent text-primary hover:bg-neutral disabled:bg-neutral disabled:text-tertiary'
|
|
26
|
+
primary: 'bg-transparent text-primary hover:bg-neutral disabled:text-tertiary',
|
|
27
|
+
secondary: 'bg-transparent text-primary hover:bg-neutral disabled:text-tertiary'
|
|
30
28
|
};
|
|
31
29
|
</script>
|
|
32
30
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
dispatch('change', e.detail);
|
|
47
47
|
onChange(e.detail);
|
|
48
48
|
}}
|
|
49
|
-
class={`select ${className}`}
|
|
49
|
+
class={`select ${className} h-10`}
|
|
50
50
|
{required}
|
|
51
51
|
bind:value
|
|
52
52
|
bind:listOpen
|
|
@@ -75,9 +75,10 @@
|
|
|
75
75
|
--border-hover="1px solid {borderColor['hover']}"
|
|
76
76
|
--border-focused="1px solid {borderColor['focus']}"
|
|
77
77
|
--border-radius="8px"
|
|
78
|
+
--font-size="text-sm"
|
|
78
79
|
>
|
|
79
80
|
<div slot="chevron-icon" class="">
|
|
80
|
-
<CaretDown weight="bold" size="1rem" />
|
|
81
|
+
<CaretDown weight="bold" size="1rem" class="text-icon-secondary" />
|
|
81
82
|
</div>
|
|
82
83
|
|
|
83
84
|
<div slot="selection" let:selection>
|
|
@@ -112,9 +113,11 @@
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
:global(.svelte-select) {
|
|
115
|
-
box-shadow: 0px 4px 17px 0px rgba(0, 0, 0, 0.02);
|
|
116
116
|
width: 100%;
|
|
117
|
-
|
|
117
|
+
--tw-shadow: 0 1px 4px 0 rgba(18, 25, 42, 0.04);
|
|
118
|
+
--tw-shadow-colored: 0 1px 4px 0 var(--tw-shadow-color);
|
|
119
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
120
|
+
}
|
|
118
121
|
|
|
119
122
|
:global(.svelte-select .item.active) {
|
|
120
123
|
background-color: #5750ee1A;
|
|
@@ -4,13 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
<SkeletonLoader>
|
|
6
6
|
{#snippet children({ Skeleton })}
|
|
7
|
-
<div
|
|
8
|
-
class="flex h-24 flex-1 flex-col justify-between gap-2 rounded-lg bg-surface p-4 shadow-field"
|
|
9
|
-
>
|
|
7
|
+
<div class="flex h-[92px] flex-1 flex-col justify-between gap-2 rounded-lg bg-neutral p-4">
|
|
10
8
|
<Skeleton class="h-4 w-1/2 "></Skeleton>
|
|
11
9
|
<div class="flex items-baseline gap-2">
|
|
12
|
-
<Skeleton class="h-8 w-
|
|
13
|
-
<Skeleton class="h-4 w-16 " />
|
|
10
|
+
<Skeleton class="h-8 w-16" />
|
|
14
11
|
</div>
|
|
15
12
|
</div>
|
|
16
13
|
{/snippet}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { CaretUpDown } from 'phosphor-svelte';
|
|
3
3
|
let className = '';
|
|
4
4
|
export { className as class };
|
|
5
5
|
export let value = 0;
|
|
6
6
|
export let max: number;
|
|
7
7
|
export let buffer = 0;
|
|
8
8
|
export let bufferMin = 0;
|
|
9
|
-
export let bufferColorClass = 'bg-
|
|
9
|
+
export let bufferColorClass = 'bg-neutral';
|
|
10
|
+
export let filledColorClass = 'bg-accent-inverse';
|
|
11
|
+
export let showFilled = false;
|
|
10
12
|
export let showSteps = false;
|
|
11
13
|
export let onMousedown: () => void = () => {};
|
|
12
14
|
export let onMouseup: () => void = () => {};
|
|
@@ -22,25 +24,31 @@
|
|
|
22
24
|
$: buffer = Math.min(buffer, visualMax);
|
|
23
25
|
|
|
24
26
|
function calculatePosition(positionFactor: number): string {
|
|
25
|
-
return `calc((${positionFactor / visualMax} * (100% -
|
|
27
|
+
return `calc((${positionFactor / visualMax} * (100% - 1rem))`;
|
|
26
28
|
}
|
|
27
29
|
</script>
|
|
28
30
|
|
|
29
31
|
<div class={`relative flex h-10 items-center ${className}`}>
|
|
30
32
|
<div class="track-overlay"></div>
|
|
31
33
|
<div
|
|
32
|
-
class="pointer-events-none absolute h-2 rounded-full {bufferColorClass}"
|
|
34
|
+
class="pointer-events-none absolute h-2.5 rounded-full {bufferColorClass}"
|
|
33
35
|
style="
|
|
34
|
-
width: {calculatePosition(buffer - bufferMin)} +
|
|
35
|
-
left: {calculatePosition(bufferMin)}
|
|
36
|
+
width: {calculatePosition(buffer - bufferMin)} + 1rem);
|
|
37
|
+
left: {calculatePosition(bufferMin)}
|
|
36
38
|
"
|
|
37
39
|
></div>
|
|
40
|
+
{#if showFilled}
|
|
41
|
+
<div
|
|
42
|
+
class="absolute h-2.5 rounded-full {filledColorClass}"
|
|
43
|
+
style="width: {calculatePosition(value)} + 1rem);left: 0;"
|
|
44
|
+
></div>
|
|
45
|
+
{/if}
|
|
38
46
|
{#if showSteps}
|
|
39
|
-
<div class="h-2">
|
|
47
|
+
<div class="h-2.5">
|
|
40
48
|
{#each Array(visualMax + 1) as _, index}
|
|
41
49
|
<div
|
|
42
|
-
class="absolute h-1 w-1 translate-y-
|
|
43
|
-
style="left: {calculatePosition(index)} +
|
|
50
|
+
class="absolute h-1.5 w-1.5 translate-y-[2px] rounded-full bg-surface ring ring-1 ring-gray-950/10"
|
|
51
|
+
style="left: {calculatePosition(index)} + 0.25rem"
|
|
44
52
|
></div>
|
|
45
53
|
{/each}
|
|
46
54
|
</div>
|
|
@@ -54,24 +62,23 @@
|
|
|
54
62
|
on:mousedown={onMousedown}
|
|
55
63
|
on:mouseup={onMouseup}
|
|
56
64
|
/>
|
|
57
|
-
<div class="thumb-overlay" style="left: {calculatePosition(value)} +
|
|
58
|
-
<
|
|
59
|
-
<CaretRight class="text-primary" size="0.75rem" weight="bold" />
|
|
65
|
+
<div class="thumb-overlay" style="left: {calculatePosition(value)} + 0.5rem)">
|
|
66
|
+
<CaretUpDown class="rotate-90 text-primary" size="1rem" weight="bold" />
|
|
60
67
|
</div>
|
|
61
68
|
</div>
|
|
62
69
|
|
|
63
70
|
<style>
|
|
64
71
|
.track-overlay {
|
|
65
|
-
width: calc(100% - 2rem);
|
|
66
|
-
cursor: pointer;
|
|
67
72
|
pointer-events: none;
|
|
68
73
|
position: absolute;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
74
|
+
height: 0.625rem;
|
|
75
|
+
width: 100%;
|
|
76
|
+
cursor: pointer;
|
|
72
77
|
border-radius: 9999px;
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
border-width: 1px;
|
|
79
|
+
border-color: #12192a14;
|
|
80
|
+
background-color: #12192a0d;
|
|
81
|
+
}
|
|
75
82
|
|
|
76
83
|
.thumb-overlay {
|
|
77
84
|
transform: translate(-50%, 50%);
|
|
@@ -79,15 +86,17 @@
|
|
|
79
86
|
position: absolute;
|
|
80
87
|
bottom: 1.25rem;
|
|
81
88
|
display: inline-flex;
|
|
82
|
-
height:
|
|
83
|
-
width:
|
|
89
|
+
height: 2rem;
|
|
90
|
+
width: 2rem;
|
|
84
91
|
align-items: center;
|
|
85
92
|
justify-content: center;
|
|
86
93
|
border-radius: 9999px;
|
|
94
|
+
border-width: 1px;
|
|
95
|
+
border-color: #12192A26;
|
|
87
96
|
--tw-bg-opacity: 1;
|
|
88
97
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
89
|
-
--tw-shadow: 0
|
|
90
|
-
--tw-shadow-colored: 0
|
|
98
|
+
--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
99
|
+
--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
|
|
91
100
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
92
101
|
}
|
|
93
102
|
|
|
@@ -18,6 +18,8 @@ declare const Slider: $$__sveltets_2_IsomorphicComponent<{
|
|
|
18
18
|
buffer?: number;
|
|
19
19
|
bufferMin?: number;
|
|
20
20
|
bufferColorClass?: string;
|
|
21
|
+
filledColorClass?: string;
|
|
22
|
+
showFilled?: boolean;
|
|
21
23
|
showSteps?: boolean;
|
|
22
24
|
onMousedown?: () => void;
|
|
23
25
|
onMouseup?: () => void;
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<div
|
|
25
|
-
class="flex
|
|
25
|
+
class="flex w-full flex-shrink-0 flex-grow basis-0 flex-col items-start gap-2 overflow-clip rounded-lg bg-neutral p-4"
|
|
26
26
|
>
|
|
27
|
-
<
|
|
27
|
+
<p class="flex items-center justify-start gap-2 truncate font-medium text-secondary">
|
|
28
28
|
{title}
|
|
29
29
|
{#if titleTooltip && showTitleTooltip}
|
|
30
30
|
<Tooltip>
|
|
31
31
|
{#snippet trigger()}
|
|
32
|
-
<Info class="icon" size="1rem" weight="bold" />
|
|
32
|
+
<Info class="icon text-icon-tertiary" size="1rem" weight="bold" />
|
|
33
33
|
{/snippet}
|
|
34
34
|
{#snippet content()}
|
|
35
35
|
<span>
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
{/snippet}
|
|
39
39
|
</Tooltip>
|
|
40
40
|
{/if}
|
|
41
|
-
</
|
|
41
|
+
</p>
|
|
42
42
|
<div class="flex items-baseline gap-1">
|
|
43
43
|
{#if value !== null}
|
|
44
|
-
<
|
|
44
|
+
<p class="text-2xl font-medium">{formattedValue}</p>
|
|
45
45
|
{#if unit}
|
|
46
|
-
<
|
|
46
|
+
<p class="truncate text-2xl font-medium text-tertiary">{unit}</p>
|
|
47
47
|
{/if}
|
|
48
48
|
{:else}
|
|
49
49
|
<Spinner />
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
};
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
|
-
<div class="w-full rounded-lg bg-surface px-
|
|
34
|
+
<div class="w-full rounded-lg border border-static bg-surface px-5 py-2 shadow-container">
|
|
35
35
|
<table class={`w-full table-fixed sm:table-auto xl:table-${tableLayout}`}>
|
|
36
36
|
{@render children?.({ THead: THead, TBody: TBody, Tr: Tr, Th: Th, Td: Td })}
|
|
37
37
|
</table>
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
let { class: className = '', children }: Props = $props();
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
|
-
<th class={`text-left text-xs font-
|
|
13
|
+
<th class={`text-left text-xs font-medium text-tertiary ${className}`}>
|
|
14
14
|
{@render children?.()}
|
|
15
15
|
</th>
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
}: Props = $props();
|
|
22
22
|
|
|
23
23
|
const sizes = {
|
|
24
|
-
sm: 'h-6
|
|
25
|
-
md: 'h-
|
|
24
|
+
sm: 'h-6 text-xs p-1.5',
|
|
25
|
+
md: 'h-7 text-sm p-2'
|
|
26
26
|
};
|
|
27
27
|
let sizeClassName = $derived(sizes[size]);
|
|
28
28
|
|
|
@@ -86,9 +86,7 @@
|
|
|
86
86
|
|
|
87
87
|
white-space: nowrap;
|
|
88
88
|
|
|
89
|
-
border-radius: 0.25rem
|
|
90
|
-
|
|
91
|
-
padding: 0.25rem
|
|
89
|
+
border-radius: 0.25rem
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
svg {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
|
|
2
|
+
interface Props {
|
|
3
3
|
children: Snippet;
|
|
4
|
-
variant?:
|
|
5
|
-
size?:
|
|
4
|
+
variant?: 'default' | 'outline' | 'transparent';
|
|
5
|
+
size?: 'sm' | 'md';
|
|
6
6
|
tooltip?: string;
|
|
7
7
|
onclick?: (event: MouseEvent) => void;
|
|
8
8
|
class?: string;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
|
+
declare const Tag: import("svelte").Component<Props, {}, "">;
|
|
10
11
|
type Tag = ReturnType<typeof Tag>;
|
|
11
12
|
export default Tag;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface Props {
|
|
2
2
|
value?: boolean;
|
|
3
3
|
onclick?: (event?: MouseEvent) => void;
|
|
4
4
|
id: string;
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
|
+
declare const Toggle: import("svelte").Component<Props, {}, "value">;
|
|
6
7
|
type Toggle = ReturnType<typeof Toggle>;
|
|
7
8
|
export default Toggle;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/fonts/index.d.ts
CHANGED
package/dist/fonts/index.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import MDSystemMonoRegular from './MDSystemMono-Regular.woff2';
|
|
2
|
-
import
|
|
3
|
-
import MDSystemMedium from './MDSystem-Medium.woff2';
|
|
4
|
-
import MDSystemSemibold from './MDSystem-Semibold.woff2';
|
|
2
|
+
import afAnotherSans from './afAnotherSans.woff2';
|
|
5
3
|
export const fonts = {
|
|
6
4
|
MDSystemMonoRegular,
|
|
7
|
-
|
|
8
|
-
MDSystemMedium,
|
|
9
|
-
MDSystemSemibold
|
|
5
|
+
afAnotherSans
|
|
10
6
|
};
|