@stubber/ui 1.0.0
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 +17 -0
- package/dist/Typography.svelte +129 -0
- package/dist/Typography.svelte.d.ts +23 -0
- package/dist/assets/docs-icon.svg +11 -0
- package/dist/assets/stubber-icon.svg +3 -0
- package/dist/atoms/Button.svelte +70 -0
- package/dist/atoms/Button.svelte.d.ts +24 -0
- package/dist/atoms/IconButton.svelte +0 -0
- package/dist/atoms/IconButton.svelte.d.ts +23 -0
- package/dist/atoms/SpinnerMessage.svelte +7 -0
- package/dist/atoms/SpinnerMessage.svelte.d.ts +16 -0
- package/dist/atoms/TextOnlyButton.svelte +70 -0
- package/dist/atoms/TextOnlyButton.svelte.d.ts +24 -0
- package/dist/components/Accordion.svelte +47 -0
- package/dist/components/Accordion.svelte.d.ts +14 -0
- package/dist/components/AdvancedSwitch.svelte +20 -0
- package/dist/components/AdvancedSwitch.svelte.d.ts +14 -0
- package/dist/components/Alert.svelte +34 -0
- package/dist/components/Alert.svelte.d.ts +25 -0
- package/dist/components/Breadcrumbs.svelte +64 -0
- package/dist/components/Breadcrumbs.svelte.d.ts +33 -0
- package/dist/components/Chip.svelte +53 -0
- package/dist/components/Chip.svelte.d.ts +33 -0
- package/dist/components/HorizontalTabs.svelte +32 -0
- package/dist/components/HorizontalTabs.svelte.d.ts +25 -0
- package/dist/components/IconButton.svelte +165 -0
- package/dist/components/IconButton.svelte.d.ts +43 -0
- package/dist/components/Inputs/PasswordInput.svelte +76 -0
- package/dist/components/Inputs/PasswordInput.svelte.d.ts +21 -0
- package/dist/components/Inputs/SelectInput.css +143 -0
- package/dist/components/Inputs/SelectInput.svelte +18 -0
- package/dist/components/Inputs/SelectInput.svelte.d.ts +22 -0
- package/dist/components/Inputs/TextInput.svelte +76 -0
- package/dist/components/Inputs/TextInput.svelte.d.ts +21 -0
- package/dist/components/Modal.svelte +25 -0
- package/dist/components/Modal.svelte.d.ts +31 -0
- package/dist/components/ModalIcon.svelte +19 -0
- package/dist/components/ModalIcon.svelte.d.ts +17 -0
- package/dist/components/NavProfile.svelte +70 -0
- package/dist/components/NavProfile.svelte.d.ts +29 -0
- package/dist/components/OrgSwitcher.svelte +193 -0
- package/dist/components/OrgSwitcher.svelte.d.ts +33 -0
- package/dist/components/PasswordStrengthItem.svelte +10 -0
- package/dist/components/PasswordStrengthItem.svelte.d.ts +17 -0
- package/dist/components/PasswordStrengthValidator.svelte +57 -0
- package/dist/components/PasswordStrengthValidator.svelte.d.ts +17 -0
- package/dist/components/PrimaryButton.svelte +182 -0
- package/dist/components/PrimaryButton.svelte.d.ts +47 -0
- package/dist/components/ProfileMenu.svelte +58 -0
- package/dist/components/ProfileMenu.svelte.d.ts +35 -0
- package/dist/components/SideNav/SideNavExample.svelte +47 -0
- package/dist/components/SideNav/SideNavExample.svelte.d.ts +23 -0
- package/dist/components/SideNav/SideNavItem.svelte +54 -0
- package/dist/components/SideNav/SideNavItem.svelte.d.ts +35 -0
- package/dist/components/SideNav/SideNavTitle.svelte +7 -0
- package/dist/components/SideNav/SideNavTitle.svelte.d.ts +23 -0
- package/dist/components/Tabs.svelte +102 -0
- package/dist/components/Tabs.svelte.d.ts +14 -0
- package/dist/components/Toast.svelte +49 -0
- package/dist/components/Toast.svelte.d.ts +18 -0
- package/dist/components/Tooltip.svelte +80 -0
- package/dist/components/Tooltip.svelte.d.ts +29 -0
- package/dist/components/alert-dialog/alert-dialog-action.svelte +16 -0
- package/dist/components/alert-dialog/alert-dialog-action.svelte.d.ts +23 -0
- package/dist/components/alert-dialog/alert-dialog-cancel.svelte +16 -0
- package/dist/components/alert-dialog/alert-dialog-cancel.svelte.d.ts +23 -0
- package/dist/components/alert-dialog/alert-dialog-content.svelte +23 -0
- package/dist/components/alert-dialog/alert-dialog-content.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/alert-dialog-description.svelte +12 -0
- package/dist/components/alert-dialog/alert-dialog-description.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/alert-dialog-footer.svelte +11 -0
- package/dist/components/alert-dialog/alert-dialog-footer.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/alert-dialog-header.svelte +8 -0
- package/dist/components/alert-dialog/alert-dialog-header.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/alert-dialog-overlay.svelte +17 -0
- package/dist/components/alert-dialog/alert-dialog-overlay.svelte.d.ts +15 -0
- package/dist/components/alert-dialog/alert-dialog-portal.svelte +6 -0
- package/dist/components/alert-dialog/alert-dialog-portal.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/alert-dialog-title.svelte +10 -0
- package/dist/components/alert-dialog/alert-dialog-title.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/index.d.ts +13 -0
- package/dist/components/alert-dialog/index.js +15 -0
- package/dist/components/badge/badge.svelte +16 -0
- package/dist/components/badge/badge.svelte.d.ts +22 -0
- package/dist/components/badge/index.d.ts +60 -0
- package/dist/components/badge/index.js +17 -0
- package/dist/components/breadcrumb/breadcrumb-ellipsis.svelte +16 -0
- package/dist/components/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +17 -0
- package/dist/components/breadcrumb/breadcrumb-item.svelte +9 -0
- package/dist/components/breadcrumb/breadcrumb-item.svelte.d.ts +19 -0
- package/dist/components/breadcrumb/breadcrumb-link.svelte +22 -0
- package/dist/components/breadcrumb/breadcrumb-link.svelte.d.ts +22 -0
- package/dist/components/breadcrumb/breadcrumb-list.svelte +16 -0
- package/dist/components/breadcrumb/breadcrumb-list.svelte.d.ts +19 -0
- package/dist/components/breadcrumb/breadcrumb-page.svelte +16 -0
- package/dist/components/breadcrumb/breadcrumb-page.svelte.d.ts +21 -0
- package/dist/components/breadcrumb/breadcrumb-separator.svelte +17 -0
- package/dist/components/breadcrumb/breadcrumb-separator.svelte.d.ts +19 -0
- package/dist/components/breadcrumb/breadcrumb.svelte +8 -0
- package/dist/components/breadcrumb/breadcrumb.svelte.d.ts +19 -0
- package/dist/components/breadcrumb/index.d.ts +8 -0
- package/dist/components/breadcrumb/index.js +10 -0
- package/dist/components/button/button.svelte +20 -0
- package/dist/components/button/button.svelte.d.ts +16 -0
- package/dist/components/button/index.d.ts +110 -0
- package/dist/components/button/index.js +28 -0
- package/dist/components/card/card-content.svelte +8 -0
- package/dist/components/card/card-content.svelte.d.ts +17 -0
- package/dist/components/card/card-description.svelte +8 -0
- package/dist/components/card/card-description.svelte.d.ts +17 -0
- package/dist/components/card/card-footer.svelte +8 -0
- package/dist/components/card/card-footer.svelte.d.ts +17 -0
- package/dist/components/card/card-header.svelte +8 -0
- package/dist/components/card/card-header.svelte.d.ts +17 -0
- package/dist/components/card/card-title.svelte +13 -0
- package/dist/components/card/card-title.svelte.d.ts +20 -0
- package/dist/components/card/card.svelte +11 -0
- package/dist/components/card/card.svelte.d.ts +17 -0
- package/dist/components/card/index.d.ts +8 -0
- package/dist/components/card/index.js +9 -0
- package/dist/components/checkbox/checkbox.svelte +28 -0
- package/dist/components/checkbox/checkbox.svelte.d.ts +13 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.js +4 -0
- package/dist/components/dialog/dialog-content.svelte +31 -0
- package/dist/components/dialog/dialog-content.svelte.d.ts +17 -0
- package/dist/components/dialog/dialog-description.svelte +12 -0
- package/dist/components/dialog/dialog-description.svelte.d.ts +17 -0
- package/dist/components/dialog/dialog-footer.svelte +11 -0
- package/dist/components/dialog/dialog-footer.svelte.d.ts +17 -0
- package/dist/components/dialog/dialog-header.svelte +8 -0
- package/dist/components/dialog/dialog-header.svelte.d.ts +17 -0
- package/dist/components/dialog/dialog-overlay.svelte +17 -0
- package/dist/components/dialog/dialog-overlay.svelte.d.ts +15 -0
- package/dist/components/dialog/dialog-portal.svelte +6 -0
- package/dist/components/dialog/dialog-portal.svelte.d.ts +17 -0
- package/dist/components/dialog/dialog-title.svelte +12 -0
- package/dist/components/dialog/dialog-title.svelte.d.ts +17 -0
- package/dist/components/dialog/index.d.ts +12 -0
- package/dist/components/dialog/index.js +14 -0
- package/dist/components/fields/Checkbox.svelte +24 -0
- package/dist/components/fields/Checkbox.svelte.d.ts +27 -0
- package/dist/components/fields/Radio.svelte +30 -0
- package/dist/components/fields/Radio.svelte.d.ts +27 -0
- package/dist/components/fields/StandardInput.svelte +47 -0
- package/dist/components/fields/StandardInput.svelte.d.ts +31 -0
- package/dist/components/input/index.d.ts +23 -0
- package/dist/components/input/index.js +4 -0
- package/dist/components/input/input.svelte +33 -0
- package/dist/components/input/input.svelte.d.ts +14 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/index.js +4 -0
- package/dist/components/label/label.svelte +16 -0
- package/dist/components/label/label.svelte.d.ts +15 -0
- package/dist/components/radio-group/index.d.ts +5 -0
- package/dist/components/radio-group/index.js +7 -0
- package/dist/components/radio-group/radio-group-item.svelte +22 -0
- package/dist/components/radio-group/radio-group-item.svelte.d.ts +13 -0
- package/dist/components/radio-group/radio-group.svelte +10 -0
- package/dist/components/radio-group/radio-group.svelte.d.ts +17 -0
- package/dist/components/scroll-area/index.d.ts +3 -0
- package/dist/components/scroll-area/index.js +5 -0
- package/dist/components/scroll-area/scroll-area-scrollbar.svelte +21 -0
- package/dist/components/scroll-area/scroll-area-scrollbar.svelte.d.ts +23 -0
- package/dist/components/scroll-area/scroll-area.svelte +24 -0
- package/dist/components/scroll-area/scroll-area.svelte.d.ts +27 -0
- package/dist/components/select/index.d.ts +11 -0
- package/dist/components/select/index.js +13 -0
- package/dist/components/select/select-content.svelte +33 -0
- package/dist/components/select/select-content.svelte.d.ts +15 -0
- package/dist/components/select/select-item.svelte +34 -0
- package/dist/components/select/select-item.svelte.d.ts +15 -0
- package/dist/components/select/select-label.svelte +12 -0
- package/dist/components/select/select-label.svelte.d.ts +17 -0
- package/dist/components/select/select-separator.svelte +7 -0
- package/dist/components/select/select-separator.svelte.d.ts +15 -0
- package/dist/components/select/select-trigger.svelte +21 -0
- package/dist/components/select/select-trigger.svelte.d.ts +31 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/index.js +4 -0
- package/dist/components/separator/separator.svelte +18 -0
- package/dist/components/separator/separator.svelte.d.ts +15 -0
- package/dist/components/sheet/index.d.ts +114 -0
- package/dist/components/sheet/index.js +79 -0
- package/dist/components/sheet/sheet-content.svelte +38 -0
- package/dist/components/sheet/sheet-content.svelte.d.ts +29 -0
- package/dist/components/sheet/sheet-description.svelte +9 -0
- package/dist/components/sheet/sheet-description.svelte.d.ts +17 -0
- package/dist/components/sheet/sheet-footer.svelte +11 -0
- package/dist/components/sheet/sheet-footer.svelte.d.ts +17 -0
- package/dist/components/sheet/sheet-header.svelte +8 -0
- package/dist/components/sheet/sheet-header.svelte.d.ts +17 -0
- package/dist/components/sheet/sheet-overlay.svelte +23 -0
- package/dist/components/sheet/sheet-overlay.svelte.d.ts +15 -0
- package/dist/components/sheet/sheet-portal.svelte +9 -0
- package/dist/components/sheet/sheet-portal.svelte.d.ts +17 -0
- package/dist/components/sheet/sheet-title.svelte +12 -0
- package/dist/components/sheet/sheet-title.svelte.d.ts +17 -0
- package/dist/components/sonner/index.d.ts +1 -0
- package/dist/components/sonner/index.js +1 -0
- package/dist/components/sonner/sonner.svelte +16 -0
- package/dist/components/sonner/sonner.svelte.d.ts +15 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +4 -0
- package/dist/components/switch/switch.svelte +30 -0
- package/dist/components/switch/switch.svelte.d.ts +13 -0
- package/dist/components/tabs/index.d.ts +6 -0
- package/dist/components/tabs/index.js +8 -0
- package/dist/components/tabs/tabs-content.svelte +17 -0
- package/dist/components/tabs/tabs-content.svelte.d.ts +17 -0
- package/dist/components/tabs/tabs-list.svelte +15 -0
- package/dist/components/tabs/tabs-list.svelte.d.ts +17 -0
- package/dist/components/tabs/tabs-trigger.svelte +18 -0
- package/dist/components/tabs/tabs-trigger.svelte.d.ts +15 -0
- package/dist/components/textarea/index.d.ts +19 -0
- package/dist/components/textarea/index.js +4 -0
- package/dist/components/textarea/textarea.svelte +28 -0
- package/dist/components/textarea/textarea.svelte.d.ts +14 -0
- package/dist/components/tooltip/index.d.ts +5 -0
- package/dist/components/tooltip/index.js +7 -0
- package/dist/components/tooltip/tooltip-content.svelte +24 -0
- package/dist/components/tooltip/tooltip-content.svelte.d.ts +17 -0
- package/dist/decorators/DecoratorHorizontalTabs.svelte +3 -0
- package/dist/decorators/DecoratorHorizontalTabs.svelte.d.ts +27 -0
- package/dist/decorators/DecoratorTransparentButton.svelte +3 -0
- package/dist/decorators/DecoratorTransparentButton.svelte.d.ts +27 -0
- package/dist/decorators/FixedWidthDecorator.svelte +3 -0
- package/dist/decorators/FixedWidthDecorator.svelte.d.ts +27 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +29 -0
- package/dist/utils/actions.d.ts +4 -0
- package/dist/utils/actions.js +20 -0
- package/dist/utils/shadcn-utils.d.ts +13 -0
- package/dist/utils/shadcn-utils.js +119 -0
- package/package.json +68 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} BreadcrumbsProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} BreadcrumbsEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} BreadcrumbsSlots */
|
|
4
|
+
export default class Breadcrumbs extends SvelteComponent<{
|
|
5
|
+
breadcrumbs?: any[] | undefined;
|
|
6
|
+
title?: string | undefined;
|
|
7
|
+
mode?: string | undefined;
|
|
8
|
+
reload_on_redirect?: boolean | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
click: CustomEvent<any>;
|
|
11
|
+
} & {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}> {
|
|
14
|
+
}
|
|
15
|
+
export type BreadcrumbsProps = typeof __propDef.props;
|
|
16
|
+
export type BreadcrumbsEvents = typeof __propDef.events;
|
|
17
|
+
export type BreadcrumbsSlots = typeof __propDef.slots;
|
|
18
|
+
import { SvelteComponent } from "svelte";
|
|
19
|
+
declare const __propDef: {
|
|
20
|
+
props: {
|
|
21
|
+
breadcrumbs?: any[] | undefined;
|
|
22
|
+
title?: string | undefined;
|
|
23
|
+
mode?: string | undefined;
|
|
24
|
+
reload_on_redirect?: boolean | undefined;
|
|
25
|
+
};
|
|
26
|
+
events: {
|
|
27
|
+
click: CustomEvent<any>;
|
|
28
|
+
} & {
|
|
29
|
+
[evt: string]: CustomEvent<any>;
|
|
30
|
+
};
|
|
31
|
+
slots: {};
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let label = "";
|
|
3
|
+
export let icon = "";
|
|
4
|
+
export let hasX = false;
|
|
5
|
+
export let color = "primary";
|
|
6
|
+
|
|
7
|
+
let colorClass = "";
|
|
8
|
+
$: switch (color) {
|
|
9
|
+
case "primary":
|
|
10
|
+
colorClass = "bg-transparent text-primary-300 border-primary-300";
|
|
11
|
+
break;
|
|
12
|
+
case "surface":
|
|
13
|
+
colorClass = "bg-transparent text-surface-300 border-surface-300";
|
|
14
|
+
break;
|
|
15
|
+
case "success":
|
|
16
|
+
colorClass = "bg-transparent text-success-300 border-success-300";
|
|
17
|
+
break;
|
|
18
|
+
case "warning":
|
|
19
|
+
colorClass = "bg-transparent text-warning-300 border-warning-300";
|
|
20
|
+
break;
|
|
21
|
+
case "danger":
|
|
22
|
+
colorClass = "bg-transparent text-danger-300 border-danger-300";
|
|
23
|
+
break;
|
|
24
|
+
case "info":
|
|
25
|
+
colorClass = "bg-transparent text-info-300 border-info-300-600";
|
|
26
|
+
break;
|
|
27
|
+
case "highlight":
|
|
28
|
+
colorClass = "bg-transparent text-highlight-300 border-highlight-300";
|
|
29
|
+
break;
|
|
30
|
+
case "unicorn":
|
|
31
|
+
colorClass = "bg-transparent text-unicorn-300 border-unicorn-300";
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<button
|
|
37
|
+
on:click
|
|
38
|
+
class="{icon ? 'pl-2' : 'pl-2.5'} {hasX
|
|
39
|
+
? 'pr-2'
|
|
40
|
+
: 'pr-2.5'} h-[30px] flex items-center space-x-1.5 border rounded-full {colorClass}"
|
|
41
|
+
>
|
|
42
|
+
{#if icon}
|
|
43
|
+
<i class="far fa-sm fa-fw fa-{icon}" />
|
|
44
|
+
{/if}
|
|
45
|
+
<span class="flex items-center whitespace-pre text-label">
|
|
46
|
+
{label}
|
|
47
|
+
</span>
|
|
48
|
+
{#if hasX}
|
|
49
|
+
<button class="flex items-center">
|
|
50
|
+
<i class="far fa-sm fa-circle-xmark fa-fw" />
|
|
51
|
+
</button>
|
|
52
|
+
{/if}
|
|
53
|
+
</button>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} ChipProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} ChipEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} ChipSlots */
|
|
4
|
+
export default class Chip extends SvelteComponent<{
|
|
5
|
+
label?: string | undefined;
|
|
6
|
+
color?: string | undefined;
|
|
7
|
+
icon?: string | undefined;
|
|
8
|
+
hasX?: boolean | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
click: MouseEvent;
|
|
11
|
+
} & {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}> {
|
|
14
|
+
}
|
|
15
|
+
export type ChipProps = typeof __propDef.props;
|
|
16
|
+
export type ChipEvents = typeof __propDef.events;
|
|
17
|
+
export type ChipSlots = typeof __propDef.slots;
|
|
18
|
+
import { SvelteComponent } from "svelte";
|
|
19
|
+
declare const __propDef: {
|
|
20
|
+
props: {
|
|
21
|
+
label?: string | undefined;
|
|
22
|
+
color?: string | undefined;
|
|
23
|
+
icon?: string | undefined;
|
|
24
|
+
hasX?: boolean | undefined;
|
|
25
|
+
};
|
|
26
|
+
events: {
|
|
27
|
+
click: MouseEvent;
|
|
28
|
+
} & {
|
|
29
|
+
[evt: string]: CustomEvent<any>;
|
|
30
|
+
};
|
|
31
|
+
slots: {};
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let value = "";
|
|
3
|
+
export let tabs = [{}];
|
|
4
|
+
|
|
5
|
+
function isSelected(tab) {
|
|
6
|
+
return tab.value === value;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function selectTab(tab) {
|
|
10
|
+
value = tab.value;
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div class="w-full flex flex-row overflow-x-auto">
|
|
15
|
+
{#key value}
|
|
16
|
+
{#each tabs as tab}
|
|
17
|
+
<button
|
|
18
|
+
on:click={() => selectTab(tab)}
|
|
19
|
+
class="min-w-[90px] group relative flex pt-2 pb-3 grow border-b border-surface-200 justify-center"
|
|
20
|
+
>
|
|
21
|
+
<span class="text-p-body text-surface-900">
|
|
22
|
+
{tab?.label}
|
|
23
|
+
</span>
|
|
24
|
+
<span
|
|
25
|
+
class="absolute -bottom-[1px] w-[80%] h-1 rounded-t-lg {isSelected(tab)
|
|
26
|
+
? 'bg-primary-500'
|
|
27
|
+
: 'group-hover:bg-surface-100'} text-primary-300"
|
|
28
|
+
/>
|
|
29
|
+
</button>
|
|
30
|
+
{/each}
|
|
31
|
+
{/key}
|
|
32
|
+
</div>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} HorizontalTabsProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} HorizontalTabsEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} HorizontalTabsSlots */
|
|
4
|
+
export default class HorizontalTabs extends SvelteComponent<{
|
|
5
|
+
value?: string | undefined;
|
|
6
|
+
tabs?: {}[] | undefined;
|
|
7
|
+
}, {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
}, {}> {
|
|
10
|
+
}
|
|
11
|
+
export type HorizontalTabsProps = typeof __propDef.props;
|
|
12
|
+
export type HorizontalTabsEvents = typeof __propDef.events;
|
|
13
|
+
export type HorizontalTabsSlots = typeof __propDef.slots;
|
|
14
|
+
import { SvelteComponent } from "svelte";
|
|
15
|
+
declare const __propDef: {
|
|
16
|
+
props: {
|
|
17
|
+
value?: string | undefined;
|
|
18
|
+
tabs?: {}[] | undefined;
|
|
19
|
+
};
|
|
20
|
+
events: {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
};
|
|
23
|
+
slots: {};
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let color = "primary";
|
|
3
|
+
export let variant = "regular"; // "regular" | "secondary" | "ghost"
|
|
4
|
+
export let icon = "";
|
|
5
|
+
export let disabled = false;
|
|
6
|
+
export let type = "button"; // "button" | "submit" | "reset";
|
|
7
|
+
|
|
8
|
+
let colorClass = "";
|
|
9
|
+
$: switch (color) {
|
|
10
|
+
case "primary":
|
|
11
|
+
if (variant == "secondary") {
|
|
12
|
+
colorClass =
|
|
13
|
+
"text-primary-500 bg-white border border-primary-500 hover:bg-primary-50 active:bg-white";
|
|
14
|
+
} else if (variant == "ghost") {
|
|
15
|
+
colorClass = "text-primary-500 bg-white hover:bg-primary-50 active:bg-white";
|
|
16
|
+
} else if (variant == "secondary-transparent") {
|
|
17
|
+
colorClass =
|
|
18
|
+
"text-primary-500 bg-transparent border border-primary-500 hover:bg-primary-50 active:bg-transparent";
|
|
19
|
+
} else if (variant == "ghost-transparent") {
|
|
20
|
+
colorClass = "text-primary-500 hover:text-primary-400 active:text-primary-500";
|
|
21
|
+
} else {
|
|
22
|
+
colorClass = "text-white bg-primary-500 hover:bg-primary-400 active:bg-primary-500";
|
|
23
|
+
}
|
|
24
|
+
break;
|
|
25
|
+
//TODO: This is not correct
|
|
26
|
+
case "surface":
|
|
27
|
+
if (variant == "secondary") {
|
|
28
|
+
colorClass = "text-surface-900 bg-white border border-surface-50";
|
|
29
|
+
} else if (variant == "ghost") {
|
|
30
|
+
colorClass = "text-surface-900 bg-white hover:bg-surface-50 active:bg-white";
|
|
31
|
+
} else if (variant == "secondary-transparent") {
|
|
32
|
+
colorClass = "text-surface-900 bg-transparent border border-surface-50 ";
|
|
33
|
+
} else if (variant == "ghost-transparent") {
|
|
34
|
+
colorClass = "text-surface-900 hover:text-surface-700 active:text-surface-900";
|
|
35
|
+
} else {
|
|
36
|
+
colorClass = "text-surface-900 bg-surface-50";
|
|
37
|
+
}
|
|
38
|
+
break;
|
|
39
|
+
case "success":
|
|
40
|
+
if (variant == "secondary") {
|
|
41
|
+
colorClass =
|
|
42
|
+
"text-success-500 bg-white border border-success-500 hover:bg-success-50 active:bg-white";
|
|
43
|
+
} else if (variant == "ghost") {
|
|
44
|
+
colorClass = "text-success-500 bg-white hover:bg-success-50 active:bg-white";
|
|
45
|
+
} else if (variant == "secondary-transparent") {
|
|
46
|
+
colorClass =
|
|
47
|
+
"text-success-500 bg-transparent border border-success-500 hover:bg-success-50 active:bg-transparent";
|
|
48
|
+
} else if (variant == "ghost-transparent") {
|
|
49
|
+
colorClass = "text-success-500 hover:text-success-400 active:text-success-500";
|
|
50
|
+
} else {
|
|
51
|
+
colorClass = "text-white bg-success-500 hover:bg-success-400 active:bg-success-500";
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
case "warning":
|
|
55
|
+
if (variant == "secondary") {
|
|
56
|
+
colorClass =
|
|
57
|
+
"text-warning-500 bg-white border border-warning-500 hover:bg-warning-50 active:bg-white";
|
|
58
|
+
} else if (variant == "ghost") {
|
|
59
|
+
colorClass = "text-warning-500 bg-white hover:bg-warning-50 active:bg-white";
|
|
60
|
+
} else if (variant == "secondary-transparent") {
|
|
61
|
+
colorClass =
|
|
62
|
+
"text-warning-500 bg-transparent border border-warning-500 hover:bg-warning-50 active:bg-white";
|
|
63
|
+
} else if (variant == "ghost-transparent") {
|
|
64
|
+
colorClass = "text-warning-500 hover:text-warning-400 active:text-warning-500";
|
|
65
|
+
} else {
|
|
66
|
+
colorClass = "text-white bg-warning-500 hover:bg-warning-400 active:bg-warning-500";
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
case "danger":
|
|
70
|
+
if (variant == "secondary") {
|
|
71
|
+
colorClass =
|
|
72
|
+
"text-danger-500 bg-white border border-danger-500 hover:bg-danger-50 active:bg-white";
|
|
73
|
+
} else if (variant == "ghost") {
|
|
74
|
+
colorClass = "text-danger-500 bg-white hover:bg-danger-50 active:bg-white";
|
|
75
|
+
} else if (variant == "secondary-transparent") {
|
|
76
|
+
colorClass =
|
|
77
|
+
"text-danger-500 bg-white border border-danger-500 hover:bg-danger-50 active:bg-transparent";
|
|
78
|
+
} else if (variant == "ghost-transparent") {
|
|
79
|
+
colorClass = "text-danger-500 hover:text-danger-400 active:text-danger-500";
|
|
80
|
+
} else {
|
|
81
|
+
colorClass = "text-white bg-danger-500 hover:bg-danger-400 active:bg-danger-500";
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
case "info":
|
|
85
|
+
if (variant == "secondary") {
|
|
86
|
+
colorClass =
|
|
87
|
+
"text-info-500 bg-white border border-info-500 hover:bg-info-50 active:bg-white";
|
|
88
|
+
} else if (variant == "ghost") {
|
|
89
|
+
colorClass = "text-info-500 bg-white hover:bg-info-50 active:bg-white";
|
|
90
|
+
} else if (variant == "secondary-transparent") {
|
|
91
|
+
colorClass =
|
|
92
|
+
"text-info-500 bg-transparent border border-info-500 hover:bg-info-50 active:bg-transparent";
|
|
93
|
+
} else if (variant == "ghost-transparent") {
|
|
94
|
+
colorClass = "text-info-500 hover:text-info-400 active:text-info-500";
|
|
95
|
+
} else {
|
|
96
|
+
colorClass = "text-surface-900 bg-info-500 hover:bg-info-400 active:bg-info-500";
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
case "highlight":
|
|
100
|
+
if (variant == "secondary") {
|
|
101
|
+
colorClass =
|
|
102
|
+
"text-highlight-500 bg-white border border-highlight-500 hover:bg-highlight-50 active:bg-white";
|
|
103
|
+
} else if (variant == "ghost") {
|
|
104
|
+
colorClass = "text-highlight-500 bg-white hover:bg-highlight-50 active:bg-white";
|
|
105
|
+
} else if (variant == "secondary-transparent") {
|
|
106
|
+
colorClass =
|
|
107
|
+
"text-highlight-500 bg-transparent border border-highlight-500 hover:bg-highlight-50 active:bg-transparent";
|
|
108
|
+
} else if (variant == "ghost-transparent") {
|
|
109
|
+
colorClass = "text-highlight-500 hover:text-highlight-400 active:text-highlight-500";
|
|
110
|
+
} else {
|
|
111
|
+
colorClass =
|
|
112
|
+
"text-surface-900 bg-highlight-500 hover:bg-highlight-400 active:bg-highlight-500";
|
|
113
|
+
}
|
|
114
|
+
break;
|
|
115
|
+
case "unicorn":
|
|
116
|
+
if (variant == "secondary") {
|
|
117
|
+
colorClass =
|
|
118
|
+
"text-unicorn-500 bg-white border border-unicorn-500 hover:bg-unicorn-50 active:bg-white";
|
|
119
|
+
} else if (variant == "ghost") {
|
|
120
|
+
colorClass = "text-unicorn-500 bg-white hover:bg-unicorn-50 active:bg-white";
|
|
121
|
+
} else if (variant == "secondary-transparent") {
|
|
122
|
+
colorClass =
|
|
123
|
+
"text-unicorn-500 bg-transparent border border-unicorn-500 hover:bg-unicorn-50 active:bg-transparent";
|
|
124
|
+
} else if (variant == "ghost-transparent") {
|
|
125
|
+
colorClass = "text-unicorn-500 hover:text-unicorn-400 active:text-unicorn-500";
|
|
126
|
+
} else {
|
|
127
|
+
colorClass = "text-white bg-unicorn-500 hover:bg-unicorn-400 active:bg-unicorn-500";
|
|
128
|
+
}
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
let disabledClass = "";
|
|
133
|
+
$: switch (variant) {
|
|
134
|
+
case "regular":
|
|
135
|
+
disabledClass = "disabled:text-white disabled:bg-surface-100";
|
|
136
|
+
break;
|
|
137
|
+
case "secondary":
|
|
138
|
+
disabledClass =
|
|
139
|
+
"disabled:text-surface-100 disabled:bg-white disabled:border disabled:border-surface-100";
|
|
140
|
+
break;
|
|
141
|
+
case "ghost":
|
|
142
|
+
disabledClass = "disabled:text-surface-100 disabled:bg-white";
|
|
143
|
+
break;
|
|
144
|
+
case "secondary-transparent":
|
|
145
|
+
disabledClass =
|
|
146
|
+
"disabled:text-surface-100 disabled:bg-transparent disabled:border disabled:border-surface-100";
|
|
147
|
+
break;
|
|
148
|
+
case "ghost-transparent":
|
|
149
|
+
disabledClass = "disabled:text-surface-100";
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
</script>
|
|
153
|
+
|
|
154
|
+
<button
|
|
155
|
+
on:mouseout
|
|
156
|
+
on:mouseover
|
|
157
|
+
on:focus
|
|
158
|
+
on:blur
|
|
159
|
+
on:click
|
|
160
|
+
{type}
|
|
161
|
+
{disabled}
|
|
162
|
+
class="h-10 w-10 rounded-lg {colorClass} {disabledClass}"
|
|
163
|
+
>
|
|
164
|
+
<i class={icon} />
|
|
165
|
+
</button>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} IconButtonProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} IconButtonEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} IconButtonSlots */
|
|
4
|
+
export default class IconButton extends SvelteComponent<{
|
|
5
|
+
color?: string | undefined;
|
|
6
|
+
variant?: string | undefined;
|
|
7
|
+
icon?: string | undefined;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
type?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
mouseout: MouseEvent;
|
|
12
|
+
mouseover: MouseEvent;
|
|
13
|
+
focus: FocusEvent;
|
|
14
|
+
blur: FocusEvent;
|
|
15
|
+
click: MouseEvent;
|
|
16
|
+
} & {
|
|
17
|
+
[evt: string]: CustomEvent<any>;
|
|
18
|
+
}, {}> {
|
|
19
|
+
}
|
|
20
|
+
export type IconButtonProps = typeof __propDef.props;
|
|
21
|
+
export type IconButtonEvents = typeof __propDef.events;
|
|
22
|
+
export type IconButtonSlots = typeof __propDef.slots;
|
|
23
|
+
import { SvelteComponent } from "svelte";
|
|
24
|
+
declare const __propDef: {
|
|
25
|
+
props: {
|
|
26
|
+
color?: string | undefined;
|
|
27
|
+
variant?: string | undefined;
|
|
28
|
+
icon?: string | undefined;
|
|
29
|
+
disabled?: boolean | undefined;
|
|
30
|
+
type?: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
events: {
|
|
33
|
+
mouseout: MouseEvent;
|
|
34
|
+
mouseover: MouseEvent;
|
|
35
|
+
focus: FocusEvent;
|
|
36
|
+
blur: FocusEvent;
|
|
37
|
+
click: MouseEvent;
|
|
38
|
+
} & {
|
|
39
|
+
[evt: string]: CustomEvent<any>;
|
|
40
|
+
};
|
|
41
|
+
slots: {};
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<script>import { createEventDispatcher } from "svelte";
|
|
2
|
+
const dispatch = createEventDispatcher();
|
|
3
|
+
export let name;
|
|
4
|
+
export let label;
|
|
5
|
+
export let value = "";
|
|
6
|
+
export let isError = false;
|
|
7
|
+
let inputRef;
|
|
8
|
+
let containerRef;
|
|
9
|
+
let isActive = false;
|
|
10
|
+
let isFocused = false;
|
|
11
|
+
let hasValue = false;
|
|
12
|
+
$:
|
|
13
|
+
isActive = ((isFocused2, hasValue2) => {
|
|
14
|
+
if (isFocused2 || hasValue2) {
|
|
15
|
+
return true;
|
|
16
|
+
} else {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
})(isFocused, hasValue);
|
|
20
|
+
$:
|
|
21
|
+
hasValue = ((value2) => {
|
|
22
|
+
if (value2) {
|
|
23
|
+
return true;
|
|
24
|
+
} else {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
})(value);
|
|
28
|
+
function handleClick() {
|
|
29
|
+
inputRef.focus();
|
|
30
|
+
isFocused = true;
|
|
31
|
+
}
|
|
32
|
+
function handleClickOutside({ target }) {
|
|
33
|
+
assertIsNode(target);
|
|
34
|
+
if (isFocused && !hasValue && !containerRef.contains(target)) {
|
|
35
|
+
isFocused = false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function assertIsNode(e) {
|
|
39
|
+
if (!e || !("nodeType" in e)) {
|
|
40
|
+
throw new Error("Expected node EventTarget");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<svelte:window on:click={handleClickOutside} />
|
|
46
|
+
|
|
47
|
+
<div
|
|
48
|
+
on:click={handleClick}
|
|
49
|
+
on:keydown={() => {}}
|
|
50
|
+
bind:this={containerRef}
|
|
51
|
+
class="relative group w-full bg-white py-3 px-4 rounded-md cursor-text border {isError
|
|
52
|
+
? 'border-danger-500'
|
|
53
|
+
: 'border-surface-400 hover:border-surface-600 [&:is(:focus-within)]:border-primary-400'}"
|
|
54
|
+
>
|
|
55
|
+
<input
|
|
56
|
+
{name}
|
|
57
|
+
type="password"
|
|
58
|
+
bind:this={inputRef}
|
|
59
|
+
bind:value
|
|
60
|
+
on:focus={() => dispatch("focus")}
|
|
61
|
+
class="w-full text-surface-900 outline-none"
|
|
62
|
+
placeholder={label}
|
|
63
|
+
/>
|
|
64
|
+
{#if isActive}
|
|
65
|
+
<!-- TODO: group hover text-surface-600 -->
|
|
66
|
+
<fieldset aria-hidden="true">
|
|
67
|
+
<legend
|
|
68
|
+
class="absolute -top-3 left-2 px-1.5 bg-white {isError
|
|
69
|
+
? 'text-danger-500'
|
|
70
|
+
: 'text-surface-500 group-focus-within:text-primary-400'}"
|
|
71
|
+
>
|
|
72
|
+
<span class="text-label-sm">{label}</span>
|
|
73
|
+
</legend>
|
|
74
|
+
</fieldset>
|
|
75
|
+
{/if}
|
|
76
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value?: string | undefined;
|
|
7
|
+
isError?: boolean | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
focus: CustomEvent<any>;
|
|
11
|
+
} & {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
};
|
|
14
|
+
slots: {};
|
|
15
|
+
};
|
|
16
|
+
export type PasswordInputProps = typeof __propDef.props;
|
|
17
|
+
export type PasswordInputEvents = typeof __propDef.events;
|
|
18
|
+
export type PasswordInputSlots = typeof __propDef.slots;
|
|
19
|
+
export default class PasswordInput extends SvelteComponent<PasswordInputProps, PasswordInputEvents, PasswordInputSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
.svelte-select {
|
|
2
|
+
@apply border border-primary-400 rounded-md relative flex items-center pl-2 py-3.5 bg-white m-0 w-full;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.svelte-select .value-container {
|
|
6
|
+
@apply w-full flex flex-wrap items-center self-stretch;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.svelte-select input {
|
|
10
|
+
@apply cursor-default border-none text-surface-800 leading-10 pl-4 bg-transparent absolute left-0 m-0
|
|
11
|
+
focus:outline-none hover:border-surface-400;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.svelte-select.focused {
|
|
15
|
+
@apply border-primary-400 bg-white text-surface-900;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.svelte-select.disabled {
|
|
19
|
+
@apply bg-white border-surface-200 text-surface-600;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.svelte-select.disabled input {
|
|
23
|
+
@apply placeholder:text-surface-600 placeholder:opacity-100;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.svelte-select .selected-item {
|
|
27
|
+
@apply leading-10 h-10 overflow-x-hidden pr-5 text-surface-800
|
|
28
|
+
focus:outline-none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.svelte-select .hide-selected-item {
|
|
32
|
+
@apply opacity-0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.svelte-select .icons {
|
|
36
|
+
@apply absolute flex items-center right-0 translate-y-0 text-surface-200 pointer-events-none top-0 bottom-0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.svelte-select .icons > * {
|
|
40
|
+
@apply transition-colors ease-in-out duration-200;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.svelte-select .clear-select {
|
|
44
|
+
@apply pointer-events-auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.svelte-select.focused .icons,
|
|
48
|
+
.svelte-select .chevron:hover,
|
|
49
|
+
.svelte-select .clear-select:hover {
|
|
50
|
+
@apply text-surface-600;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.svelte-select .clear-select {
|
|
54
|
+
@apply px-2 h-10 text-surface-400 flex-none w-10;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.svelte-select .chevron {
|
|
58
|
+
@apply flex pt-0 pr-2 pl-2 border-l-2 w-9 h-5 text-surface-300;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.svelte-select.multi {
|
|
62
|
+
@apply pr-9 pl-4 h-auto flex-wrap items-stretch;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.svelte-select.multi input {
|
|
66
|
+
@apply p-0 relative m-0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.svelte-select.error {
|
|
70
|
+
@apply border-warning-500 bg-white;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.a11y-text {
|
|
74
|
+
@apply sr-only;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.list {
|
|
78
|
+
@apply rounded-sm max-h-64 overflow-y-auto bg-white border-none absolute z-10 w-full left-0 right-0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.list .list-group-title {
|
|
82
|
+
@apply text-surface-400 cursor-default font-medium h-10 leading-10 px-5 overflow-ellipsis whitespace-nowrap uppercase;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.svelte-select-list {
|
|
86
|
+
@apply z-10 shadow;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.svelte-select-list .empty {
|
|
90
|
+
@apply text-center rounded bg-white py-5 text-surface-500;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.item {
|
|
94
|
+
@apply cursor-default h-10 leading-10 px-5 bg-white text-surface-800 overflow-ellipsis overflow-hidden whitespace-nowrap;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.indicators {
|
|
98
|
+
@apply flex items-center;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.item.group-item {
|
|
102
|
+
@apply px-10;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.item:active {
|
|
106
|
+
@apply bg-surface-100;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.item.active {
|
|
110
|
+
@apply bg-surface-100 text-surface-800;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.item.not-selectable {
|
|
114
|
+
@apply text-surface-300;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.item.first {
|
|
118
|
+
@apply rounded-t-sm;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.item.hover:not(.active) {
|
|
122
|
+
@apply bg-surface-50;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.multi input {
|
|
126
|
+
flex: 1 1 40px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.multi-item {
|
|
130
|
+
@apply bg-surface-100 mt-1 mr-1 border border-surface-200 rounded-sm h-8 leading-8 flex cursor-default pr-1 pl-1 max-w-full items-center mr-1 overflow-hidden overflow-ellipsis whitespace-nowrap;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.multi-item.disabled {
|
|
134
|
+
@apply hover:bg-surface-300 hover:text-surface-500;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.multi-item-clear {
|
|
138
|
+
@apply flex items-center justify-center w-5;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.list-item {
|
|
142
|
+
@apply list-none;
|
|
143
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script>import "./SelectInput.css";
|
|
2
|
+
import Select from "svelte-select/no-styles/Select.svelte";
|
|
3
|
+
export let items;
|
|
4
|
+
export let value;
|
|
5
|
+
export let label;
|
|
6
|
+
export let name;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<Select
|
|
10
|
+
on:change
|
|
11
|
+
{value}
|
|
12
|
+
placeholder={label}
|
|
13
|
+
{items}
|
|
14
|
+
{name}
|
|
15
|
+
clearable={false}
|
|
16
|
+
searchable={false}
|
|
17
|
+
showChevron
|
|
18
|
+
/>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import "./SelectInput.css";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
items: any[];
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
change: CustomEvent<any>;
|
|
12
|
+
} & {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots: {};
|
|
16
|
+
};
|
|
17
|
+
export type SelectInputProps = typeof __propDef.props;
|
|
18
|
+
export type SelectInputEvents = typeof __propDef.events;
|
|
19
|
+
export type SelectInputSlots = typeof __propDef.slots;
|
|
20
|
+
export default class SelectInput extends SvelteComponent<SelectInputProps, SelectInputEvents, SelectInputSlots> {
|
|
21
|
+
}
|
|
22
|
+
export {};
|