@reshape-biotech/design-system 1.2.6 → 1.2.7
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/README.md +3 -1
- package/dist/app.css +97 -97
- package/dist/components/activity/Activity.stories.svelte +104 -104
- package/dist/components/activity/Activity.svelte +112 -112
- package/dist/components/avatar/Avatar.stories.svelte +23 -23
- package/dist/components/avatar/Avatar.svelte +54 -54
- package/dist/components/banner/Banner.stories.svelte +105 -105
- package/dist/components/banner/Banner.svelte +42 -42
- package/dist/components/button/Button.stories.svelte +61 -61
- package/dist/components/button/Button.svelte +95 -95
- package/dist/components/card/Card.stories.svelte +112 -112
- package/dist/components/card/Card.svelte +18 -18
- package/dist/components/checkbox/Checkbox.stories.svelte +8 -8
- package/dist/components/checkbox/Checkbox.svelte +17 -17
- package/dist/components/collapsible/Collapsible.stories.svelte +26 -26
- package/dist/components/collapsible/components/collapsible-content.svelte +20 -20
- package/dist/components/collapsible/components/collapsible-trigger.svelte +12 -12
- package/dist/components/combobox/Combobox.stories.svelte +412 -412
- package/dist/components/combobox/components/combobox-add.svelte +8 -8
- package/dist/components/combobox/components/combobox-content.svelte +39 -39
- package/dist/components/combobox/components/combobox-indicator.svelte +1 -1
- package/dist/components/datepicker/DatePicker.stories.svelte +196 -196
- package/dist/components/datepicker/DatePicker.svelte +173 -173
- package/dist/components/divider/Divider.stories.svelte +7 -7
- package/dist/components/divider/Divider.svelte +9 -9
- package/dist/components/drawer/Drawer.stories.svelte +51 -51
- package/dist/components/drawer/Drawer.svelte +33 -33
- package/dist/components/drawer/DrawerLabel.svelte +10 -10
- package/dist/components/dropdown/Dropdown.stories.svelte +210 -210
- package/dist/components/dropdown/Dropdown.svelte +57 -57
- package/dist/components/dropdown/components/DropdownContent.svelte +16 -16
- package/dist/components/dropdown/components/DropdownMenu.svelte +10 -10
- package/dist/components/dropdown/components/DropdownTrigger.svelte +37 -37
- package/dist/components/dropdown/components/OutlinedButton.svelte +9 -9
- package/dist/components/empty-content/EmptyContent.stories.svelte +38 -38
- package/dist/components/empty-content/EmptyContent.svelte +12 -12
- package/dist/components/graphs/bar-chart/BarChart.stories.svelte +91 -91
- package/dist/components/graphs/bar-chart/BarChart.svelte +147 -147
- package/dist/components/graphs/bar-chart/StackedBarChart.stories.svelte +57 -57
- package/dist/components/graphs/bar-chart/StackedBarChart.svelte +198 -199
- package/dist/components/graphs/chart/Chart.stories.svelte +96 -96
- package/dist/components/graphs/chart/Chart.svelte +207 -207
- package/dist/components/graphs/line/LineChart.stories.svelte +138 -138
- package/dist/components/graphs/line/LineChart.svelte +140 -142
- package/dist/components/graphs/matrix/Matrix.stories.svelte +117 -117
- package/dist/components/graphs/matrix/Matrix.svelte +141 -141
- package/dist/components/graphs/multiline/MultiLineChart.stories.svelte +168 -168
- package/dist/components/graphs/multiline/MultiLineChart.svelte +236 -236
- package/dist/components/graphs/scatterplot/Scatterplot.stories.svelte +84 -84
- package/dist/components/graphs/scatterplot/Scatterplot.svelte +302 -302
- package/dist/components/graphs/utils/duration.d.ts +1 -0
- package/dist/components/graphs/utils/duration.js +33 -0
- package/dist/components/graphs/utils/tooltipFormatter.js +1 -1
- package/dist/components/icon-button/IconButton.stories.svelte +64 -64
- package/dist/components/icon-button/IconButton.svelte +88 -88
- package/dist/components/icons/AnalysisIcon.stories.svelte +18 -18
- package/dist/components/icons/AnalysisIcon.svelte +96 -96
- package/dist/components/icons/Icon.stories.svelte +111 -111
- package/dist/components/icons/Icon.svelte +17 -17
- package/dist/components/icons/PrincipalIcon.svelte +59 -59
- package/dist/components/icons/custom/Halo.svelte +31 -31
- package/dist/components/icons/custom/Well.svelte +27 -27
- package/dist/components/icons/index.js +1 -1
- package/dist/components/image/Image.svelte +42 -42
- package/dist/components/input/Input.stories.svelte +55 -55
- package/dist/components/input/Input.svelte +121 -121
- package/dist/components/label/Label.stories.svelte +18 -18
- package/dist/components/label/Label.svelte +11 -11
- package/dist/components/list/List.stories.svelte +84 -84
- package/dist/components/list/List.svelte +20 -20
- package/dist/components/logo/Logo.stories.svelte +15 -15
- package/dist/components/logo/Logo.svelte +30 -30
- package/dist/components/manual-cfu-counter/ManualCFUCounter.stories.svelte +102 -102
- package/dist/components/manual-cfu-counter/ManualCFUCounter.svelte +557 -557
- package/dist/components/manual-cfu-counter/test/ManualCFUCounterTestWrapper.svelte +11 -11
- package/dist/components/markdown/Markdown.stories.svelte +10 -10
- package/dist/components/markdown/Markdown.svelte +6 -6
- package/dist/components/modal/Modal.stories.svelte +29 -29
- package/dist/components/modal/Modal.svelte +71 -71
- package/dist/components/multi-cfu-counter/MultiCFUCounter.stories.svelte +201 -201
- package/dist/components/multi-cfu-counter/MultiCFUCounter.svelte +606 -606
- package/dist/components/multi-cfu-counter/test/MultiCFUCounterTestWrapper.svelte +17 -17
- package/dist/components/notification-popup/NotificationPopup.stories.svelte +18 -18
- package/dist/components/notification-popup/NotificationPopup.svelte +26 -26
- package/dist/components/notifications/Notifications.stories.svelte +101 -101
- package/dist/components/notifications/Notifications.svelte +9 -9
- package/dist/components/pill/Pill.stories.svelte +8 -8
- package/dist/components/pill/Pill.svelte +27 -27
- package/dist/components/progress-circle/ProgressCircle.stories.svelte +8 -8
- package/dist/components/progress-circle/ProgressCircle.svelte +54 -54
- package/dist/components/required-status-indicator/RequiredStatusIndicator.stories.svelte +18 -18
- package/dist/components/required-status-indicator/RequiredStatusIndicator.svelte +14 -14
- package/dist/components/segmented-control-buttons/ControlButton.svelte +36 -36
- package/dist/components/segmented-control-buttons/SegmentedControlButtons.stories.svelte +35 -35
- package/dist/components/segmented-control-buttons/SegmentedControlButtons.svelte +13 -13
- package/dist/components/select/Select.stories.svelte +77 -77
- package/dist/components/select/Select.svelte +114 -114
- package/dist/components/select-new/Select.stories.svelte +188 -188
- package/dist/components/select-new/components/Group.svelte +17 -17
- package/dist/components/select-new/components/MultiSelectTrigger.svelte +57 -57
- package/dist/components/select-new/components/SelectContent.svelte +22 -22
- package/dist/components/select-new/components/SelectGroupHeading.svelte +10 -10
- package/dist/components/select-new/components/SelectItem.svelte +25 -25
- package/dist/components/select-new/components/SelectTrigger.svelte +38 -38
- package/dist/components/sjsf-wrappers/SjsfNumberInputWrapper.svelte +76 -76
- package/dist/components/sjsf-wrappers/SjsfNumberInputWrapper.svelte.d.ts +1 -1
- package/dist/components/sjsf-wrappers/SjsfTextInputWrapper.svelte +53 -53
- package/dist/components/sjsf-wrappers/SjsfTextInputWrapper.svelte.d.ts +1 -1
- package/dist/components/sjsf-wrappers/sjsfCustomTheme.js +1 -1
- package/dist/components/skeleton-loader/SkeletonLoader.stories.svelte +32 -32
- package/dist/components/skeleton-loader/SkeletonLoader.svelte +10 -10
- package/dist/components/skeleton-loader/StatcardSkeleton.svelte +9 -9
- package/dist/components/skeleton-loader/components/Skeleton.svelte +7 -7
- package/dist/components/skeleton-loader/components/SkeletonImage.svelte +12 -12
- package/dist/components/slider/Slider.stories.svelte +23 -23
- package/dist/components/slider/Slider.svelte +107 -107
- package/dist/components/spinner/Spinner.stories.svelte +8 -8
- package/dist/components/spinner/Spinner.svelte +18 -18
- package/dist/components/stat-card/StatCard.stories.svelte +26 -26
- package/dist/components/stat-card/StatCard.svelte +128 -128
- package/dist/components/status-badge/StatusBadge.stories.svelte +365 -365
- package/dist/components/status-badge/StatusBadge.svelte +54 -54
- package/dist/components/stepper/Stepper.stories.svelte +219 -219
- package/dist/components/stepper/components/stepper-root.svelte +12 -12
- package/dist/components/stepper/components/stepper-step.svelte +83 -83
- package/dist/components/table/Table.stories.svelte +87 -87
- package/dist/components/table/Table.svelte +32 -32
- package/dist/components/table/components/TBody.svelte +7 -7
- package/dist/components/table/components/THead.svelte +7 -7
- package/dist/components/table/components/Td.svelte +8 -8
- package/dist/components/table/components/Th.svelte +8 -8
- package/dist/components/table/components/Tr.svelte +11 -11
- package/dist/components/tabs/Tabs.stories.svelte +20 -20
- package/dist/components/tabs/Tabs.svelte +8 -8
- package/dist/components/tabs/components/Content.svelte +8 -8
- package/dist/components/tabs/components/Tab.svelte +14 -14
- package/dist/components/tabs/components/Tabs.svelte +7 -7
- package/dist/components/tag/Tag.stories.svelte +57 -57
- package/dist/components/tag/Tag.svelte +95 -95
- package/dist/components/textarea/Textarea.stories.svelte +70 -70
- package/dist/components/textarea/Textarea.svelte +76 -76
- package/dist/components/toast/Toast.stories.svelte +204 -204
- package/dist/components/toast/Toast.svelte +53 -53
- package/dist/components/toggle/Toggle.stories.svelte +9 -9
- package/dist/components/toggle/Toggle.svelte +53 -53
- package/dist/components/toggle-icon-button/ToggleIconButton.stories.svelte +152 -152
- package/dist/components/toggle-icon-button/ToggleIconButton.svelte +99 -99
- package/dist/components/tooltip/Tooltip.stories.svelte +105 -105
- package/dist/components/tooltip/Tooltip.svelte +26 -26
- package/dist/fonts/index.js +1 -1
- package/dist/notifications.d.ts +1 -4
- package/dist/notifications.js +1 -1
- package/dist/tailwind-safelist.js +406 -406
- package/dist/tailwind.preset.js +10 -10
- package/dist/tokens/colors.js +18 -18
- package/dist/tokens/typography.js +6 -6
- package/dist/tokens.js +19 -19
- package/dist/types/fonts.d.ts +2 -2
- package/package.json +199 -198
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import { IconButton } from '../icon-button/';
|
|
4
|
+
import Icon from '../icons/Icon.svelte';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
interface Props {
|
|
7
|
+
type?: 'neutral' | 'success' | 'progress' | 'warning' | 'error';
|
|
8
|
+
show?: boolean;
|
|
9
|
+
closable?: boolean;
|
|
10
|
+
icon?: Snippet;
|
|
11
|
+
content: Snippet;
|
|
12
|
+
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
let {
|
|
15
|
+
type = 'neutral',
|
|
16
|
+
show = $bindable(true),
|
|
17
|
+
closable = true,
|
|
18
|
+
icon,
|
|
19
|
+
content,
|
|
20
|
+
}: Props = $props();
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
const color = {
|
|
23
|
+
neutral: 'neutral',
|
|
24
|
+
success: 'success',
|
|
25
|
+
progress: 'blue',
|
|
26
|
+
warning: 'warning',
|
|
27
|
+
error: 'danger',
|
|
28
|
+
}[type];
|
|
29
29
|
</script>
|
|
30
30
|
|
|
31
31
|
{#if show}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
<div class="rounded-lg bg-{color} flex w-full items-center justify-between p-3">
|
|
33
|
+
<div class="inline-flex w-full items-center justify-start gap-3">
|
|
34
|
+
{#if icon}
|
|
35
|
+
<div class="flex size-5 items-center justify-center text-icon-{color} ">
|
|
36
|
+
{@render icon?.()}
|
|
37
|
+
</div>
|
|
38
|
+
{/if}
|
|
39
|
+
<div class="content w-full text-sm">
|
|
40
|
+
{@render content?.()}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
{#if closable}
|
|
44
|
+
<IconButton size="sm" onclick={() => (show = false)}>
|
|
45
|
+
<Icon iconName="X" color="icon-secondary" weight="bold" />
|
|
46
|
+
</IconButton>
|
|
47
|
+
{/if}
|
|
48
|
+
</div>
|
|
49
49
|
{/if}
|
|
50
50
|
|
|
51
51
|
<style>
|
|
52
|
-
|
|
52
|
+
.content :global(a) {
|
|
53
53
|
font-size: 0.875rem;
|
|
54
54
|
line-height: 1.25rem;
|
|
55
55
|
--tw-text-opacity: 1;
|
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Button, { type ButtonVariant, type ButtonSize } from './Button.svelte';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
component: Button,
|
|
7
|
+
title: 'Design System/Button',
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
parameters: {
|
|
10
|
+
design: {
|
|
11
|
+
type: 'figma',
|
|
12
|
+
url: 'https://www.figma.com/design/VHTMNdy8PAXAMx43edNZGW/%F0%9F%92%A0--Reshape-Design-System%3A-V1?node-id=9-3068&t=sCuBI8dX6K6NjNR6-0',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
const variants = [
|
|
18
|
+
'primary',
|
|
19
|
+
'secondary',
|
|
20
|
+
'danger',
|
|
21
|
+
'transparent',
|
|
22
|
+
'outline',
|
|
23
|
+
'secondary-inverse',
|
|
24
|
+
];
|
|
25
|
+
const sizes = ['xs', 'sm', 'md', 'lg'];
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<Story name="Variants" asChild>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
<div class="flex flex-col gap-4">
|
|
30
|
+
{#each variants as variant}
|
|
31
|
+
{#if variant === 'secondary-inverse'}
|
|
32
|
+
<div class="bg-base-inverse p-4 text-primary-inverse">
|
|
33
|
+
<p>{variant}</p>
|
|
34
|
+
<Button variant={variant as ButtonVariant}>Button</Button>
|
|
35
|
+
</div>
|
|
36
|
+
{:else}
|
|
37
|
+
<div>
|
|
38
|
+
<p>{variant}</p>
|
|
39
|
+
<Button variant={variant as ButtonVariant}>Button</Button>
|
|
40
|
+
</div>
|
|
41
|
+
{/if}
|
|
42
|
+
{/each}
|
|
43
|
+
</div>
|
|
44
44
|
</Story>
|
|
45
45
|
|
|
46
46
|
<Story name="Sizes" asChild>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
<div class="flex flex-col gap-4">
|
|
48
|
+
{#each sizes as size}
|
|
49
|
+
<div>
|
|
50
|
+
<p>{size}</p>
|
|
51
|
+
<Button variant="primary" size={size as ButtonSize}>Button</Button>
|
|
52
|
+
</div>
|
|
53
|
+
{/each}
|
|
54
|
+
</div>
|
|
55
55
|
</Story>
|
|
56
56
|
|
|
57
57
|
<Story name="Disabled" asChild>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
<div class="flex flex-col gap-4">
|
|
59
|
+
{#each variants as variant}
|
|
60
|
+
<div>
|
|
61
|
+
<p>{variant}</p>
|
|
62
|
+
<Button variant={variant as ButtonVariant} disabled>Button</Button>
|
|
63
|
+
</div>
|
|
64
|
+
{/each}
|
|
65
|
+
</div>
|
|
66
66
|
</Story>
|
|
67
67
|
<Story name="Loading" asChild>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
<div class="flex flex-col gap-4">
|
|
69
|
+
{#each variants as variant}
|
|
70
|
+
<div>
|
|
71
|
+
<p>{variant}</p>
|
|
72
|
+
<Button variant={variant as ButtonVariant} loading>Button</Button>
|
|
73
|
+
</div>
|
|
74
|
+
{/each}
|
|
75
|
+
</div>
|
|
76
76
|
</Story>
|
|
@@ -1,83 +1,83 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
export type ButtonVariant =
|
|
3
|
+
| 'primary'
|
|
4
|
+
| 'secondary'
|
|
5
|
+
| 'transparent'
|
|
6
|
+
| 'danger'
|
|
7
|
+
| 'outline'
|
|
8
|
+
| 'secondary-inverse'
|
|
9
|
+
| 'transparent-inverse';
|
|
10
|
+
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
14
|
+
import Spinner from '../spinner/Spinner.svelte';
|
|
15
|
+
import type { Snippet } from 'svelte';
|
|
16
|
+
|
|
17
|
+
interface Props {
|
|
18
|
+
class?: string;
|
|
19
|
+
onClick?: (event?: MouseEvent) => void;
|
|
20
|
+
type?: 'button' | 'submit' | 'reset' | null | undefined;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
accessibilityLabel?: string;
|
|
24
|
+
size?: ButtonSize;
|
|
25
|
+
id?: string | undefined;
|
|
26
|
+
tabindex?: number | undefined;
|
|
27
|
+
variant?: ButtonVariant;
|
|
28
|
+
children?: Snippet;
|
|
29
|
+
dataTestId?: string;
|
|
30
|
+
rounded?: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
class: className = '',
|
|
35
|
+
onClick = () => {},
|
|
36
|
+
type = 'button',
|
|
37
|
+
loading = false,
|
|
38
|
+
disabled = false,
|
|
39
|
+
accessibilityLabel = '',
|
|
40
|
+
size = 'lg',
|
|
41
|
+
id = undefined,
|
|
42
|
+
tabindex = undefined,
|
|
43
|
+
variant = 'primary',
|
|
44
|
+
children,
|
|
45
|
+
dataTestId = undefined,
|
|
46
|
+
rounded = false,
|
|
47
|
+
}: Props = $props();
|
|
48
|
+
|
|
49
|
+
let variantClass = $derived(`btn-${variant}`);
|
|
50
|
+
let sizeClass = $derived(`btn-size-${size}`);
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<button
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
54
|
+
aria-label={accessibilityLabel}
|
|
55
|
+
onclick={(e) => {
|
|
56
|
+
if (!loading && !disabled) {
|
|
57
|
+
onClick(e);
|
|
58
|
+
} else {
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
}
|
|
61
|
+
}}
|
|
62
|
+
{type}
|
|
63
|
+
{disabled}
|
|
64
|
+
{id}
|
|
65
|
+
{tabindex}
|
|
66
|
+
class:cursor-wait={loading}
|
|
67
|
+
class="button {variantClass} {sizeClass} {className}"
|
|
68
|
+
data-testid={dataTestId}
|
|
69
|
+
class:rounded
|
|
70
|
+
class:disabled
|
|
71
71
|
>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
{#if loading}
|
|
73
|
+
<Spinner />
|
|
74
|
+
{:else}
|
|
75
|
+
{@render children?.()}
|
|
76
|
+
{/if}
|
|
77
77
|
</button>
|
|
78
78
|
|
|
79
79
|
<style>
|
|
80
|
-
|
|
80
|
+
.button {
|
|
81
81
|
|
|
82
82
|
display: inline-flex;
|
|
83
83
|
|
|
@@ -126,17 +126,17 @@
|
|
|
126
126
|
color: rgb(136 140 148 / var(--tw-text-opacity, 1))
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
.rounded {
|
|
130
130
|
|
|
131
131
|
border-radius: 9999px
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
.disabled:hover {
|
|
135
135
|
|
|
136
136
|
background-color: #12192a0A !important
|
|
137
137
|
}
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
/* Size variants */
|
|
139
|
+
.btn-size-xs {
|
|
140
140
|
|
|
141
141
|
height: 1.75rem;
|
|
142
142
|
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
|
|
145
145
|
padding: 0.5rem
|
|
146
146
|
}
|
|
147
|
-
|
|
147
|
+
.btn-size-sm {
|
|
148
148
|
|
|
149
149
|
height: 2rem;
|
|
150
150
|
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
|
|
157
157
|
padding-bottom: 0.5rem
|
|
158
158
|
}
|
|
159
|
-
|
|
159
|
+
.btn-size-md {
|
|
160
160
|
|
|
161
161
|
height: 2.5rem;
|
|
162
162
|
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
|
|
169
169
|
padding-bottom: 0.75rem
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
.btn-size-lg {
|
|
172
172
|
|
|
173
173
|
height: 3rem;
|
|
174
174
|
|
|
@@ -185,8 +185,8 @@
|
|
|
185
185
|
line-height: 1.5rem
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
/* Button variants */
|
|
189
|
+
.btn-primary {
|
|
190
190
|
|
|
191
191
|
--tw-bg-opacity: 1;
|
|
192
192
|
|
|
@@ -196,14 +196,14 @@
|
|
|
196
196
|
|
|
197
197
|
color: rgb(255 255 255 / var(--tw-text-opacity, 1))
|
|
198
198
|
}
|
|
199
|
-
|
|
199
|
+
.btn-primary:hover {
|
|
200
200
|
|
|
201
201
|
--tw-bg-opacity: 1;
|
|
202
202
|
|
|
203
203
|
background-color: rgb(71 65 193 / var(--tw-bg-opacity, 1))
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
|
|
206
|
+
.btn-secondary {
|
|
207
207
|
|
|
208
208
|
background-color: #12192a0A;
|
|
209
209
|
|
|
@@ -212,16 +212,16 @@
|
|
|
212
212
|
color: rgb(18 25 42 / var(--tw-text-opacity, 1))
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
.btn-secondary:hover {
|
|
216
216
|
|
|
217
217
|
background-color: #12192A1A
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
.btn-secondary:active {
|
|
221
221
|
|
|
222
222
|
background-color: #12192a0A
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
.btn-transparent {
|
|
225
225
|
|
|
226
226
|
background-color: transparent;
|
|
227
227
|
|
|
@@ -229,11 +229,11 @@
|
|
|
229
229
|
|
|
230
230
|
color: rgb(18 25 42 / var(--tw-text-opacity, 1))
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
.btn-transparent:hover {
|
|
233
233
|
|
|
234
234
|
background-color: #12192a0A
|
|
235
235
|
}
|
|
236
|
-
|
|
236
|
+
.btn-danger {
|
|
237
237
|
|
|
238
238
|
--tw-bg-opacity: 1;
|
|
239
239
|
|
|
@@ -243,13 +243,13 @@
|
|
|
243
243
|
|
|
244
244
|
color: rgb(255 255 255 / var(--tw-text-opacity, 1))
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
.btn-danger:hover {
|
|
247
247
|
|
|
248
248
|
--tw-bg-opacity: 1;
|
|
249
249
|
|
|
250
250
|
background-color: rgb(191 57 58 / var(--tw-bg-opacity, 1))
|
|
251
251
|
}
|
|
252
|
-
|
|
252
|
+
.btn-outline {
|
|
253
253
|
|
|
254
254
|
border-width: 1px;
|
|
255
255
|
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
|
|
262
262
|
color: rgb(18 25 42 / var(--tw-text-opacity, 1))
|
|
263
263
|
}
|
|
264
|
-
|
|
264
|
+
.btn-outline:hover {
|
|
265
265
|
|
|
266
266
|
border-color: #12192A26;
|
|
267
267
|
|
|
@@ -271,11 +271,11 @@
|
|
|
271
271
|
|
|
272
272
|
color: rgb(18 25 42 / var(--tw-text-opacity, 1))
|
|
273
273
|
}
|
|
274
|
-
|
|
274
|
+
.btn-outline:disabled {
|
|
275
275
|
|
|
276
276
|
border-style: none
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
.btn-secondary-inverse {
|
|
279
279
|
|
|
280
280
|
background-color: #FFFFFF0D;
|
|
281
281
|
|
|
@@ -283,15 +283,15 @@
|
|
|
283
283
|
|
|
284
284
|
color: rgb(255 255 255 / var(--tw-text-opacity, 1))
|
|
285
285
|
}
|
|
286
|
-
|
|
286
|
+
.btn-secondary-inverse:hover {
|
|
287
287
|
|
|
288
288
|
background-color: #FFFFFF26
|
|
289
289
|
}
|
|
290
|
-
|
|
290
|
+
.btn-secondary-inverse:active {
|
|
291
291
|
|
|
292
292
|
background-color: #FFFFFF0D
|
|
293
293
|
}
|
|
294
|
-
|
|
294
|
+
.btn-transparent-inverse {
|
|
295
295
|
|
|
296
296
|
background-color: transparent;
|
|
297
297
|
|
|
@@ -299,11 +299,11 @@
|
|
|
299
299
|
|
|
300
300
|
color: rgb(255 255 255 / var(--tw-text-opacity, 1))
|
|
301
301
|
}
|
|
302
|
-
|
|
302
|
+
.btn-transparent-inverse:hover {
|
|
303
303
|
|
|
304
304
|
background-color: #FFFFFF26
|
|
305
305
|
}
|
|
306
|
-
|
|
306
|
+
.btn-transparent-inverse:active {
|
|
307
307
|
|
|
308
308
|
background-color: #FFFFFF0D
|
|
309
309
|
}
|