@getmicdrop/svelte-components 5.3.3 → 5.3.10
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/calendar/AboutShow/AboutShow.svelte +9 -8
- package/dist/calendar/AboutShow/AboutShow.svelte.d.ts.map +1 -1
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte +19 -18
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte.d.ts +6 -6
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte.d.ts.map +1 -1
- package/dist/calendar/FAQs/FAQs.svelte +6 -5
- package/dist/calendar/FAQs/FAQs.svelte.d.ts.map +1 -1
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte +3 -2
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte.d.ts.map +1 -1
- package/dist/calendar/OrderSummary/OrderSummary.svelte +21 -20
- package/dist/calendar/OrderSummary/OrderSummary.svelte.d.ts +2 -2
- package/dist/calendar/OrderSummary/OrderSummary.svelte.d.ts.map +1 -1
- package/dist/calendar/PublicCard/PublicCard.svelte +9 -11
- package/dist/calendar/PublicCard/PublicCard.svelte.d.ts +2 -2
- package/dist/calendar/PublicCard/PublicCard.svelte.d.ts.map +1 -1
- package/dist/calendar/ShowCard/ShowCard.svelte +13 -12
- package/dist/calendar/ShowCard/ShowCard.svelte.d.ts +2 -2
- package/dist/calendar/ShowCard/ShowCard.svelte.d.ts.map +1 -1
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte +5 -3
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte.d.ts.map +1 -1
- package/dist/components/Layout/Section.svelte +4 -4
- package/dist/components/Layout/Section.svelte.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +9 -0
- package/dist/patterns/data/DataTable.svelte +4 -2
- package/dist/patterns/data/DataTable.svelte.d.ts.map +1 -1
- package/dist/patterns/forms/FormSection.svelte +4 -2
- package/dist/patterns/forms/FormSection.svelte.d.ts.map +1 -1
- package/dist/patterns/navigation/BottomNav.svelte +4 -3
- package/dist/patterns/navigation/BottomNav.svelte.d.ts.map +1 -1
- package/dist/patterns/navigation/Header.svelte +49 -37
- package/dist/patterns/navigation/Header.svelte.d.ts.map +1 -1
- package/dist/patterns/page/PageHeader.svelte +3 -2
- package/dist/patterns/page/PageHeader.svelte.d.ts.map +1 -1
- package/dist/patterns/page/PageLayout.svelte +3 -2
- package/dist/patterns/page/PageLayout.svelte.d.ts.map +1 -1
- package/dist/patterns/page/PageLoader.svelte +2 -1
- package/dist/patterns/page/PageLoader.svelte.d.ts.map +1 -1
- package/dist/patterns/page/SectionHeader.svelte +5 -3
- package/dist/patterns/page/SectionHeader.svelte.d.ts.map +1 -1
- package/dist/primitives/Accordion/Accordion.stories.svelte +75 -0
- package/dist/primitives/Accordion/Accordion.stories.svelte.d.ts +28 -0
- package/dist/primitives/Accordion/Accordion.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/Accordion/Accordion.svelte +2 -1
- package/dist/primitives/Accordion/Accordion.svelte.d.ts.map +1 -1
- package/dist/primitives/Accordion/AccordionItem.svelte +5 -4
- package/dist/primitives/Accordion/AccordionItem.svelte.d.ts.map +1 -1
- package/dist/primitives/Alert/Alert.stories.svelte +88 -0
- package/dist/primitives/Alert/Alert.stories.svelte.d.ts +28 -0
- package/dist/primitives/Alert/Alert.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/Avatar/Avatar.stories.svelte +94 -0
- package/dist/primitives/Avatar/Avatar.stories.svelte.d.ts +28 -0
- package/dist/primitives/Avatar/Avatar.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/BottomSheet/BottomSheet.svelte +2 -1
- package/dist/primitives/BottomSheet/BottomSheet.svelte.d.ts.map +1 -1
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte +7 -6
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte.d.ts.map +1 -1
- package/dist/primitives/Button/Button.svelte +94 -43
- package/dist/primitives/Button/Button.svelte.d.ts +5 -3
- package/dist/primitives/Button/Button.svelte.d.ts.map +1 -1
- package/dist/primitives/Button/ButtonSaveDemo.svelte +2 -1
- package/dist/primitives/Button/ButtonSaveDemo.svelte.d.ts.map +1 -1
- package/dist/primitives/Card.svelte +1 -1
- package/dist/primitives/Checkbox/Checkbox.stories.svelte +84 -0
- package/dist/primitives/Checkbox/Checkbox.stories.svelte.d.ts +28 -0
- package/dist/primitives/Checkbox/Checkbox.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/DarkModeToggle.svelte +43 -44
- package/dist/primitives/DarkModeToggle.svelte.d.ts.map +1 -1
- package/dist/primitives/Drawer/Drawer.stories.svelte +100 -0
- package/dist/primitives/Drawer/Drawer.stories.svelte.d.ts +28 -0
- package/dist/primitives/Drawer/Drawer.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/Drawer/Drawer.svelte +121 -47
- package/dist/primitives/Drawer/Drawer.svelte.d.ts +4 -0
- package/dist/primitives/Drawer/Drawer.svelte.d.ts.map +1 -1
- package/dist/primitives/Dropdown/Dropdown.stories.svelte +137 -0
- package/dist/primitives/Dropdown/Dropdown.stories.svelte.d.ts +28 -0
- package/dist/primitives/Dropdown/Dropdown.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/Dropdown/Dropdown.svelte +13 -15
- package/dist/primitives/Dropdown/Dropdown.svelte.d.ts.map +1 -1
- package/dist/primitives/Icons/Icon.svelte +2 -1
- package/dist/primitives/Icons/Icon.svelte.d.ts.map +1 -1
- package/dist/primitives/Input/Input.svelte +41 -80
- package/dist/primitives/Input/Input.svelte.d.ts +4 -6
- package/dist/primitives/Input/Input.svelte.d.ts.map +1 -1
- package/dist/primitives/Input/Select.stories.svelte +112 -0
- package/dist/primitives/Input/Select.stories.svelte.d.ts +28 -0
- package/dist/primitives/Input/Select.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/Input/Select.svelte +66 -13
- package/dist/primitives/Input/Select.svelte.d.ts +2 -0
- package/dist/primitives/Input/Select.svelte.d.ts.map +1 -1
- package/dist/primitives/Input/Textarea.stories.svelte +137 -0
- package/dist/primitives/Input/Textarea.stories.svelte.d.ts +28 -0
- package/dist/primitives/Input/Textarea.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/Input/Textarea.svelte +5 -3
- package/dist/primitives/Input/Textarea.svelte.d.ts.map +1 -1
- package/dist/primitives/Modal/Modal.svelte +13 -1
- package/dist/primitives/Modal/Modal.svelte.d.ts.map +1 -1
- package/dist/primitives/Pagination/Pagination.stories.svelte +76 -0
- package/dist/primitives/Pagination/Pagination.stories.svelte.d.ts +28 -0
- package/dist/primitives/Pagination/Pagination.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/Pagination/Pagination.svelte +6 -5
- package/dist/primitives/Pagination/Pagination.svelte.d.ts +1 -1
- package/dist/primitives/Pagination/Pagination.svelte.d.ts.map +1 -1
- package/dist/primitives/Radio/Radio.stories.svelte +80 -0
- package/dist/primitives/Radio/Radio.stories.svelte.d.ts +28 -0
- package/dist/primitives/Radio/Radio.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/Skeleton/Skeleton.stories.svelte +151 -0
- package/dist/primitives/Skeleton/Skeleton.stories.svelte.d.ts +28 -0
- package/dist/primitives/Skeleton/Skeleton.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/Tabs/Tabs.stories.svelte +112 -0
- package/dist/primitives/Tabs/Tabs.stories.svelte.d.ts +28 -0
- package/dist/primitives/Tabs/Tabs.stories.svelte.d.ts.map +1 -0
- package/dist/primitives/Tabs/Tabs.svelte +5 -4
- package/dist/primitives/Tabs/Tabs.svelte.d.ts.map +1 -1
- package/dist/primitives/Toggle.svelte +4 -4
- package/dist/primitives/ValidationError.spec.js +25 -1
- package/dist/primitives/ValidationError.stories.svelte +24 -0
- package/dist/primitives/ValidationError.stories.svelte.d.ts.map +1 -1
- package/dist/primitives/ValidationError.svelte +8 -4
- package/dist/primitives/ValidationError.svelte.d.ts +2 -0
- package/dist/primitives/ValidationError.svelte.d.ts.map +1 -1
- package/dist/recipes/CropImage/CropImage.svelte +12 -7
- package/dist/recipes/CropImage/CropImage.svelte.d.ts.map +1 -1
- package/dist/recipes/ImageUploader/ImageUploader.stories.svelte +125 -0
- package/dist/recipes/ImageUploader/ImageUploader.stories.svelte.d.ts +28 -0
- package/dist/recipes/ImageUploader/ImageUploader.stories.svelte.d.ts.map +1 -0
- package/dist/recipes/ImageUploader/ImageUploader.svelte +939 -0
- package/dist/recipes/ImageUploader/ImageUploader.svelte.d.ts +60 -0
- package/dist/recipes/ImageUploader/ImageUploader.svelte.d.ts.map +1 -0
- package/dist/recipes/SuperLogin/SuperLogin.svelte +71 -63
- package/dist/recipes/SuperLogin/SuperLogin.svelte.d.ts.map +1 -1
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte +5 -3
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte.d.ts.map +1 -1
- package/dist/recipes/fields/CheckboxField.svelte +3 -2
- package/dist/recipes/fields/CheckboxField.svelte.d.ts.map +1 -1
- package/dist/recipes/fields/FormField.svelte +12 -4
- package/dist/recipes/fields/FormField.svelte.d.ts +3 -1
- package/dist/recipes/fields/FormField.svelte.d.ts.map +1 -1
- package/dist/recipes/fields/RadioGroup.svelte +13 -4
- package/dist/recipes/fields/RadioGroup.svelte.d.ts +4 -1
- package/dist/recipes/fields/RadioGroup.svelte.d.ts.map +1 -1
- package/dist/recipes/fields/SelectField.svelte +12 -3
- package/dist/recipes/fields/SelectField.svelte.d.ts +4 -1
- package/dist/recipes/fields/SelectField.svelte.d.ts.map +1 -1
- package/dist/recipes/fields/TextareaField.svelte +2 -1
- package/dist/recipes/fields/TextareaField.svelte.d.ts.map +1 -1
- package/dist/recipes/fields/ToggleField.svelte +3 -2
- package/dist/recipes/fields/ToggleField.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/MultiSelect.svelte +8 -7
- package/dist/recipes/inputs/MultiSelect.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte +9 -9
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/Search.svelte +7 -6
- package/dist/recipes/inputs/Search.svelte.d.ts.map +1 -1
- package/dist/recipes/modals/AlertModal.svelte +3 -2
- package/dist/recipes/modals/AlertModal.svelte.d.ts.map +1 -1
- package/dist/recipes/modals/ConfirmationModal.svelte +4 -3
- package/dist/recipes/modals/ConfirmationModal.svelte.d.ts.map +1 -1
- package/dist/recipes/modals/InputModal.svelte +10 -8
- package/dist/recipes/modals/InputModal.svelte.d.ts.map +1 -1
- package/dist/recipes/modals/ModalStateManager.svelte +4 -3
- package/dist/recipes/modals/ModalStateManager.svelte.d.ts.map +1 -1
- package/dist/recipes/modals/StatusModal.svelte +5 -4
- package/dist/recipes/modals/StatusModal.svelte.d.ts.map +1 -1
- package/dist/stories/ButtonAuditReview.svelte +361 -397
- package/dist/stories/ButtonAuditReview.svelte.d.ts +24 -4
- package/dist/stories/ButtonAuditReview.svelte.d.ts.map +1 -1
- package/dist/stories/ComponentConsolidation.stories.svelte +276 -188
- package/dist/stories/ComponentConsolidation.stories.svelte.d.ts.map +1 -1
- package/dist/stories/PatternsGallery.stories.svelte +19 -0
- package/dist/stories/PatternsGallery.stories.svelte.d.ts +28 -0
- package/dist/stories/PatternsGallery.stories.svelte.d.ts.map +1 -0
- package/dist/stories/PatternsGallery.svelte +388 -0
- package/dist/stories/PatternsGallery.svelte.d.ts +4 -0
- package/dist/stories/PatternsGallery.svelte.d.ts.map +1 -0
- package/dist/stories/PrimitivesGallery.stories.svelte +19 -0
- package/dist/stories/PrimitivesGallery.stories.svelte.d.ts +28 -0
- package/dist/stories/PrimitivesGallery.stories.svelte.d.ts.map +1 -0
- package/dist/stories/PrimitivesGallery.svelte +752 -0
- package/dist/stories/PrimitivesGallery.svelte.d.ts +4 -0
- package/dist/stories/PrimitivesGallery.svelte.d.ts.map +1 -0
- package/dist/stories/RecipesGallery.stories.svelte +19 -0
- package/dist/stories/RecipesGallery.stories.svelte.d.ts +28 -0
- package/dist/stories/RecipesGallery.stories.svelte.d.ts.map +1 -0
- package/dist/stories/RecipesGallery.svelte +441 -0
- package/dist/stories/RecipesGallery.svelte.d.ts +4 -0
- package/dist/stories/RecipesGallery.svelte.d.ts.map +1 -0
- package/dist/tokens/index.d.ts +4 -8
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +4 -8
- package/dist/tokens/typography.d.ts +76 -169
- package/dist/tokens/typography.d.ts.map +1 -1
- package/dist/tokens/typography.js +93 -62
- package/package.json +6 -3
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Dropdown from './Dropdown.svelte';
|
|
4
|
+
import DropdownItem from './DropdownItem.svelte';
|
|
5
|
+
import Button from '../Button/Button.svelte';
|
|
6
|
+
|
|
7
|
+
const { Story } = defineMeta({
|
|
8
|
+
title: 'Primitives/Dropdown',
|
|
9
|
+
component: Dropdown,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: 'Dropdown menu component for actions and navigation.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
let open1 = $state(false);
|
|
21
|
+
let open2 = $state(false);
|
|
22
|
+
let open3 = $state(false);
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<Story name="Default">
|
|
26
|
+
{#snippet template()}
|
|
27
|
+
<div class="relative inline-block">
|
|
28
|
+
<Button onclick={() => open1 = !open1}>
|
|
29
|
+
Options ▼
|
|
30
|
+
</Button>
|
|
31
|
+
{#if open1}
|
|
32
|
+
<Dropdown class="absolute mt-1 z-10">
|
|
33
|
+
<DropdownItem onclick={() => { console.log('Edit'); open1 = false; }}>Edit</DropdownItem>
|
|
34
|
+
<DropdownItem onclick={() => { console.log('Duplicate'); open1 = false; }}>Duplicate</DropdownItem>
|
|
35
|
+
<DropdownItem onclick={() => { console.log('Archive'); open1 = false; }}>Archive</DropdownItem>
|
|
36
|
+
</Dropdown>
|
|
37
|
+
{/if}
|
|
38
|
+
</div>
|
|
39
|
+
{/snippet}
|
|
40
|
+
</Story>
|
|
41
|
+
|
|
42
|
+
<Story name="With Dividers">
|
|
43
|
+
{#snippet template()}
|
|
44
|
+
<div class="relative inline-block">
|
|
45
|
+
<Button onclick={() => open2 = !open2}>
|
|
46
|
+
Actions ▼
|
|
47
|
+
</Button>
|
|
48
|
+
{#if open2}
|
|
49
|
+
<Dropdown class="absolute mt-1 z-10">
|
|
50
|
+
<DropdownItem onclick={() => open2 = false}>View Details</DropdownItem>
|
|
51
|
+
<DropdownItem onclick={() => open2 = false}>Edit</DropdownItem>
|
|
52
|
+
<div class="border-t my-1"></div>
|
|
53
|
+
<DropdownItem onclick={() => open2 = false}>Share</DropdownItem>
|
|
54
|
+
<DropdownItem onclick={() => open2 = false}>Export</DropdownItem>
|
|
55
|
+
<div class="border-t my-1"></div>
|
|
56
|
+
<DropdownItem onclick={() => open2 = false} class="text-red-600">Delete</DropdownItem>
|
|
57
|
+
</Dropdown>
|
|
58
|
+
{/if}
|
|
59
|
+
</div>
|
|
60
|
+
{/snippet}
|
|
61
|
+
</Story>
|
|
62
|
+
|
|
63
|
+
<Story name="Right Aligned">
|
|
64
|
+
{#snippet template()}
|
|
65
|
+
<div class="flex justify-end">
|
|
66
|
+
<div class="relative inline-block">
|
|
67
|
+
<Button onclick={() => open3 = !open3}>
|
|
68
|
+
Menu ▼
|
|
69
|
+
</Button>
|
|
70
|
+
{#if open3}
|
|
71
|
+
<Dropdown class="absolute mt-1 right-0 z-10">
|
|
72
|
+
<DropdownItem onclick={() => open3 = false}>Profile</DropdownItem>
|
|
73
|
+
<DropdownItem onclick={() => open3 = false}>Settings</DropdownItem>
|
|
74
|
+
<DropdownItem onclick={() => open3 = false}>Help</DropdownItem>
|
|
75
|
+
<div class="border-t my-1"></div>
|
|
76
|
+
<DropdownItem onclick={() => open3 = false}>Sign Out</DropdownItem>
|
|
77
|
+
</Dropdown>
|
|
78
|
+
{/if}
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
{/snippet}
|
|
82
|
+
</Story>
|
|
83
|
+
|
|
84
|
+
<Story name="With Icons">
|
|
85
|
+
{#snippet template()}
|
|
86
|
+
<div class="relative inline-block">
|
|
87
|
+
<Button onclick={() => open1 = !open1}>
|
|
88
|
+
User Menu ▼
|
|
89
|
+
</Button>
|
|
90
|
+
{#if open1}
|
|
91
|
+
<Dropdown class="absolute mt-1 z-10 min-w-[180px]">
|
|
92
|
+
<DropdownItem onclick={() => open1 = false}>
|
|
93
|
+
<span class="mr-2">👤</span> Profile
|
|
94
|
+
</DropdownItem>
|
|
95
|
+
<DropdownItem onclick={() => open1 = false}>
|
|
96
|
+
<span class="mr-2">⚙️</span> Settings
|
|
97
|
+
</DropdownItem>
|
|
98
|
+
<DropdownItem onclick={() => open1 = false}>
|
|
99
|
+
<span class="mr-2">📊</span> Analytics
|
|
100
|
+
</DropdownItem>
|
|
101
|
+
<div class="border-t my-1"></div>
|
|
102
|
+
<DropdownItem onclick={() => open1 = false}>
|
|
103
|
+
<span class="mr-2">🚪</span> Sign Out
|
|
104
|
+
</DropdownItem>
|
|
105
|
+
</Dropdown>
|
|
106
|
+
{/if}
|
|
107
|
+
</div>
|
|
108
|
+
{/snippet}
|
|
109
|
+
</Story>
|
|
110
|
+
|
|
111
|
+
<Story name="In Card Context">
|
|
112
|
+
{#snippet template()}
|
|
113
|
+
<div class="border rounded-lg p-4 max-w-sm">
|
|
114
|
+
<div class="flex justify-between items-center mb-4">
|
|
115
|
+
<h3 class="font-medium">Card Title</h3>
|
|
116
|
+
<div class="relative">
|
|
117
|
+
<button
|
|
118
|
+
class="p-1 hover:bg-gray-100 rounded"
|
|
119
|
+
onclick={() => open1 = !open1}
|
|
120
|
+
>
|
|
121
|
+
⋮
|
|
122
|
+
</button>
|
|
123
|
+
{#if open1}
|
|
124
|
+
<Dropdown class="absolute mt-1 right-0 z-10">
|
|
125
|
+
<DropdownItem onclick={() => open1 = false}>Edit</DropdownItem>
|
|
126
|
+
<DropdownItem onclick={() => open1 = false}>Share</DropdownItem>
|
|
127
|
+
<DropdownItem onclick={() => open1 = false} class="text-red-600">Delete</DropdownItem>
|
|
128
|
+
</Dropdown>
|
|
129
|
+
{/if}
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
<p class="text-gray-600 text-sm">
|
|
133
|
+
This is a card with a dropdown menu in the header for common actions.
|
|
134
|
+
</p>
|
|
135
|
+
</div>
|
|
136
|
+
{/snippet}
|
|
137
|
+
</Story>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default Dropdown;
|
|
2
|
+
type Dropdown = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const Dropdown: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
import Dropdown from './Dropdown.svelte';
|
|
15
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
+
$$bindings?: Bindings;
|
|
18
|
+
} & Exports;
|
|
19
|
+
(internal: unknown, props: {
|
|
20
|
+
$$events?: Events;
|
|
21
|
+
$$slots?: Slots;
|
|
22
|
+
}): Exports & {
|
|
23
|
+
$set?: any;
|
|
24
|
+
$on?: any;
|
|
25
|
+
};
|
|
26
|
+
z_$$bindings?: Bindings;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=Dropdown.stories.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.stories.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/primitives/Dropdown/Dropdown.stories.svelte.js"],"names":[],"mappings":";;;;;;;;AAoJA;;;;mBAAoH;qBAhJ7F,mBAAmB;6CAuIG,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,OAAO,OAAO,QAAQ;IAC3L,cAAc,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,WAAW,OAAO,SAAS;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtG,eAAe,QAAQ,CAAC"}
|
|
@@ -133,18 +133,16 @@
|
|
|
133
133
|
};
|
|
134
134
|
</script>
|
|
135
135
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
>
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
{/if}
|
|
150
|
-
</div>
|
|
136
|
+
{#if open}
|
|
137
|
+
<div
|
|
138
|
+
bind:this={containerRef}
|
|
139
|
+
class="absolute z-10 bg-white divide-y divide-gray-100 rounded-lg shadow-lg w-44 dark:bg-gray-700 dark:divide-gray-600 {className}"
|
|
140
|
+
role="menu"
|
|
141
|
+
aria-label={ariaLabel}
|
|
142
|
+
{...restProps}
|
|
143
|
+
>
|
|
144
|
+
<ul bind:this={dropdownRef} class="py-2 text-sm text-gray-700 dark:text-gray-200">
|
|
145
|
+
{#if typeof children === 'function'}{@render children()}{:else if children}{children}{/if}
|
|
146
|
+
</ul>
|
|
147
|
+
</div>
|
|
148
|
+
{/if}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/primitives/Dropdown/Dropdown.svelte.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"Dropdown.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/primitives/Dropdown/Dropdown.svelte.js"],"names":[],"mappings":";;;;;AAsJA;WA9I4B,OAAO;gBAAc,MAAM;gBAAc,MAAM;YAAU,MAAM;gBAAc,MAAM;aAAW,GAAG;cAAY,GAAG;qCA8IrF;wBA9IpC;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/primitives/Icons/Icon.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Icon.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/primitives/Icons/Icon.svelte.ts"],"names":[],"mappings":"AA8FA,QAAA,MAAM,IAAI;;WAhByD,MAAM;YAAU,MAAM;UAgBvC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Input Component - Flowbite Native
|
|
4
4
|
* Migrated to Svelte 5 runes
|
|
5
|
+
*
|
|
6
|
+
* NOTE: This component does NOT perform any validation.
|
|
7
|
+
* All validation should be handled externally (e.g., via Zod schemas).
|
|
8
|
+
* Use the `errorText` prop to display validation errors.
|
|
9
|
+
* Use the `color` prop ('red' | 'base') to style the border.
|
|
5
10
|
*/
|
|
6
11
|
import { slide } from "svelte/transition";
|
|
7
12
|
import { cubicOut } from "svelte/easing";
|
|
8
13
|
import { onDestroy } from "svelte";
|
|
9
14
|
import { EyeOutline, EyeSlashOutline, CloseCircleOutline, ExclamationCircleOutline } from "../Icons";
|
|
15
|
+
import { typography } from "../../tokens/typography";
|
|
10
16
|
|
|
11
17
|
/** @type {{
|
|
12
18
|
required?: boolean,
|
|
@@ -26,6 +32,7 @@
|
|
|
26
32
|
size?: 'sm' | 'md' | 'lg',
|
|
27
33
|
textareaSize?: string,
|
|
28
34
|
errorText?: string,
|
|
35
|
+
color?: 'base' | 'red',
|
|
29
36
|
helperText?: string,
|
|
30
37
|
helperIcon?: string,
|
|
31
38
|
hintText?: string,
|
|
@@ -34,7 +41,7 @@
|
|
|
34
41
|
readonly?: boolean,
|
|
35
42
|
controlled?: boolean,
|
|
36
43
|
onButtonClick?: ((value: string) => void) | null,
|
|
37
|
-
value?: string,
|
|
44
|
+
value?: string | number | null,
|
|
38
45
|
autocomplete?: string | null,
|
|
39
46
|
autofocus?: boolean,
|
|
40
47
|
showPasswordToggle?: boolean,
|
|
@@ -43,8 +50,6 @@
|
|
|
43
50
|
statusType?: string,
|
|
44
51
|
buttonDisabled?: boolean,
|
|
45
52
|
inputmode?: string | null,
|
|
46
|
-
showErrors?: boolean,
|
|
47
|
-
disableBuiltInValidation?: boolean,
|
|
48
53
|
instantSearch?: boolean,
|
|
49
54
|
debounceMs?: number,
|
|
50
55
|
minSearchChars?: number,
|
|
@@ -74,6 +79,7 @@
|
|
|
74
79
|
size = "md",
|
|
75
80
|
textareaSize = "",
|
|
76
81
|
errorText = "",
|
|
82
|
+
color = "base",
|
|
77
83
|
helperText = "",
|
|
78
84
|
helperIcon = "",
|
|
79
85
|
hintText = "",
|
|
@@ -91,8 +97,6 @@
|
|
|
91
97
|
statusType = "",
|
|
92
98
|
buttonDisabled = false,
|
|
93
99
|
inputmode = null,
|
|
94
|
-
showErrors = false,
|
|
95
|
-
disableBuiltInValidation = false,
|
|
96
100
|
instantSearch = false,
|
|
97
101
|
debounceMs = 250,
|
|
98
102
|
minSearchChars = 2,
|
|
@@ -136,10 +140,11 @@
|
|
|
136
140
|
}
|
|
137
141
|
}
|
|
138
142
|
|
|
139
|
-
let touched = $state(false);
|
|
140
|
-
let displayErrorText = $state("");
|
|
141
143
|
let isPasswordVisible = $state(false);
|
|
142
144
|
|
|
145
|
+
// Error state derived from color prop or errorText
|
|
146
|
+
let hasError = $derived(color === 'red' || Boolean(errorText));
|
|
147
|
+
|
|
143
148
|
let inputType = $derived(showPasswordToggle && isPasswordVisible ? "text" : type);
|
|
144
149
|
let shouldAnimate = $derived(animateFocus && !disabled && !readonly);
|
|
145
150
|
|
|
@@ -157,16 +162,16 @@
|
|
|
157
162
|
|
|
158
163
|
const handleInput = (event) => {
|
|
159
164
|
inputValue = event.target.value;
|
|
160
|
-
let rawInput = inputValue;
|
|
161
165
|
|
|
166
|
+
// Format special input types
|
|
162
167
|
if (type === "creditCardNumber") {
|
|
163
|
-
rawInput = inputValue.replace(/\D/g, "");
|
|
168
|
+
const rawInput = inputValue.replace(/\D/g, "");
|
|
164
169
|
inputValue = formatCreditCardNumber(rawInput);
|
|
165
170
|
event.target.value = inputValue;
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
if (type === "phoneNumber") {
|
|
169
|
-
rawInput = inputValue.replace(/\D/g, "");
|
|
174
|
+
const rawInput = inputValue.replace(/\D/g, "");
|
|
170
175
|
inputValue = formatPhoneNumber(rawInput);
|
|
171
176
|
event.target.value = inputValue;
|
|
172
177
|
}
|
|
@@ -182,35 +187,6 @@
|
|
|
182
187
|
sanitized = sanitized.replace(/[^A-Za-z0-9._]/g, "");
|
|
183
188
|
inputValue = sanitized;
|
|
184
189
|
event.target.value = inputValue;
|
|
185
|
-
rawInput = sanitized;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
if (type === "email") {
|
|
189
|
-
if (!isValidEmail(inputValue)) {
|
|
190
|
-
displayErrorText = errorText;
|
|
191
|
-
} else {
|
|
192
|
-
displayErrorText = "";
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (type === "password") {
|
|
197
|
-
if (!isStrongPassword(inputValue)) {
|
|
198
|
-
displayErrorText = "Password must be at least 8 characters long and include uppercase, lowercase, a number, and a special character.";
|
|
199
|
-
} else {
|
|
200
|
-
displayErrorText = "";
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
if (minlength !== null && rawInput.length < minlength) {
|
|
205
|
-
displayErrorText = errorText;
|
|
206
|
-
} else {
|
|
207
|
-
displayErrorText = "";
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (!disableBuiltInValidation && required && !inputValue.trim()) {
|
|
211
|
-
displayErrorText = "This field is required.";
|
|
212
|
-
} else if (!disableBuiltInValidation) {
|
|
213
|
-
displayErrorText = "";
|
|
214
190
|
}
|
|
215
191
|
|
|
216
192
|
value = inputValue;
|
|
@@ -218,13 +194,15 @@
|
|
|
218
194
|
// Call oninputchange callback if provided
|
|
219
195
|
oninputchange?.(inputValue);
|
|
220
196
|
|
|
197
|
+
// Handle instant search
|
|
221
198
|
if (instantSearch) {
|
|
199
|
+
const inputValueStr = inputValue ?? '';
|
|
222
200
|
clearTimeout(debounceTimer);
|
|
223
|
-
if (
|
|
201
|
+
if (inputValueStr.length === 0) {
|
|
224
202
|
onsearch?.({ query: '' });
|
|
225
203
|
return;
|
|
226
204
|
}
|
|
227
|
-
if (
|
|
205
|
+
if (inputValueStr.length >= minSearchChars) {
|
|
228
206
|
debounceTimer = setTimeout(() => {
|
|
229
207
|
onsearch?.({ query: inputValue });
|
|
230
208
|
}, debounceMs);
|
|
@@ -260,15 +238,6 @@
|
|
|
260
238
|
clearTimeout(debounceTimer);
|
|
261
239
|
});
|
|
262
240
|
|
|
263
|
-
const isStrongPassword = (password) => {
|
|
264
|
-
const minLength = 8;
|
|
265
|
-
const hasUpperCase = /[A-Z]/.test(password);
|
|
266
|
-
const hasLowerCase = /[a-z]/.test(password);
|
|
267
|
-
const hasNumber = /[0-9]/.test(password);
|
|
268
|
-
const hasSpecialChar = /[!@#$%^&*]/.test(password);
|
|
269
|
-
return password.length >= minLength && hasUpperCase && hasLowerCase && hasNumber && hasSpecialChar;
|
|
270
|
-
};
|
|
271
|
-
|
|
272
241
|
const formatCreditCardNumber = (value) => {
|
|
273
242
|
return value.replace(/\D/g, "").replace(/(.{4})/g, "$1 ").trim();
|
|
274
243
|
};
|
|
@@ -283,29 +252,13 @@
|
|
|
283
252
|
};
|
|
284
253
|
|
|
285
254
|
const handleBlur = () => {
|
|
286
|
-
touched = true;
|
|
287
255
|
onblur?.();
|
|
288
|
-
if (disableBuiltInValidation) return;
|
|
289
|
-
if (required && !inputValue.trim()) {
|
|
290
|
-
displayErrorText = "This field is required.";
|
|
291
|
-
} else if (type === "email" && !isValidEmail(inputValue)) {
|
|
292
|
-
displayErrorText = errorText;
|
|
293
|
-
} else if (minlength !== null && inputValue.length < minlength) {
|
|
294
|
-
displayErrorText = errorText;
|
|
295
|
-
} else {
|
|
296
|
-
displayErrorText = "";
|
|
297
|
-
}
|
|
298
256
|
};
|
|
299
257
|
|
|
300
258
|
const handleFocus = () => {
|
|
301
259
|
onfocus?.();
|
|
302
260
|
};
|
|
303
261
|
|
|
304
|
-
const isValidEmail = (email) => {
|
|
305
|
-
const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
306
|
-
return re.test(String(email).toLowerCase());
|
|
307
|
-
};
|
|
308
|
-
|
|
309
262
|
const getContentFloatClass = () => {
|
|
310
263
|
switch (contentFloat) {
|
|
311
264
|
case "center": return "text-center";
|
|
@@ -328,23 +281,19 @@
|
|
|
328
281
|
onButtonClick(inputValue);
|
|
329
282
|
}
|
|
330
283
|
};
|
|
331
|
-
|
|
332
|
-
$effect(() => {
|
|
333
|
-
displayErrorText = errorText || (touched && !disableBuiltInValidation && (errorText || (required && !inputValue.trim() ? "This field is required." : "")));
|
|
334
|
-
});
|
|
335
284
|
</script>
|
|
336
285
|
|
|
337
286
|
<div class="flex flex-col gap-2 {className}" {...restProps}>
|
|
338
287
|
{#if label}
|
|
339
288
|
<div class="flex justify-start items-center gap-1">
|
|
340
|
-
<label for={id} class=
|
|
289
|
+
<label for={id} class={`${typography.label} leading-tight sm:leading-none`}>
|
|
341
290
|
{label}{#if required}<span class="text-red-500 font-medium text-sm ml-0.5">*</span>{/if}
|
|
342
291
|
</label>
|
|
343
292
|
{#if statusText}
|
|
344
293
|
<span class="text-sm font-medium {statusType === 'success' ? 'text-green-600' : statusType === 'error' ? 'text-red-500' : ''}">({statusText})</span>
|
|
345
294
|
{/if}
|
|
346
295
|
{#if optional}
|
|
347
|
-
<span class=
|
|
296
|
+
<span class={typography.smMuted}>(optional)</span>
|
|
348
297
|
{/if}
|
|
349
298
|
</div>
|
|
350
299
|
{/if}
|
|
@@ -360,7 +309,7 @@
|
|
|
360
309
|
onfocus={handleFocus}
|
|
361
310
|
{maxlength}
|
|
362
311
|
{minlength}
|
|
363
|
-
class="w-full px-3 py-2 bg-gray-50 dark:bg-gray-700 border rounded-lg
|
|
312
|
+
class="{typography.sm} w-full px-3 py-2 bg-gray-50 dark:bg-gray-700 border rounded-lg font-medium placeholder-gray-500 dark:placeholder-gray-400 transition-all focus:outline-none focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800 resize-y {hasError ? 'border-red-500' : 'border-gray-300 dark:border-gray-600 hover:border-blue-500 focus:border-blue-500'} {getContentFloatClass()} {getTextareaSizeClass()} {shouldAnimate ? 'focus:scale-[1.01]' : ''}"
|
|
364
313
|
required={false}
|
|
365
314
|
{disabled}
|
|
366
315
|
{readonly}
|
|
@@ -368,7 +317,7 @@
|
|
|
368
317
|
aria-required={required}
|
|
369
318
|
></textarea>
|
|
370
319
|
{:else if type === "password" && showPasswordToggle}
|
|
371
|
-
<div class="flex items-center w-full bg-gray-50 dark:bg-gray-700 border rounded-lg transition-all outline-none focus-within:ring-4 focus-within:ring-blue-300 dark:focus-within:ring-blue-800 {
|
|
320
|
+
<div class="flex items-center w-full bg-gray-50 dark:bg-gray-700 border rounded-lg transition-all outline-none focus-within:ring-4 focus-within:ring-blue-300 dark:focus-within:ring-blue-800 {hasError ? 'border-red-500' : 'border-gray-300 dark:border-gray-600 hover:border-blue-500 focus-within:border-blue-500'} {shouldAnimate ? 'focus-within:scale-[1.01]' : ''}">
|
|
372
321
|
<input
|
|
373
322
|
bind:this={inputElement}
|
|
374
323
|
{id}
|
|
@@ -382,7 +331,7 @@
|
|
|
382
331
|
onfocus={handleFocus}
|
|
383
332
|
{maxlength}
|
|
384
333
|
{minlength}
|
|
385
|
-
class="flex-1 w-full {sizeClass} bg-transparent border-none
|
|
334
|
+
class="{typography.sm} flex-1 w-full {sizeClass} bg-transparent border-none font-medium placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-0 {getContentFloatClass()}"
|
|
386
335
|
required={false}
|
|
387
336
|
{disabled}
|
|
388
337
|
{readonly}
|
|
@@ -426,7 +375,7 @@
|
|
|
426
375
|
onkeydown={handleSearchKeyDown}
|
|
427
376
|
{maxlength}
|
|
428
377
|
{minlength}
|
|
429
|
-
class="w-full {sizeClass} bg-gray-50 dark:bg-gray-700 border rounded-lg font-medium
|
|
378
|
+
class="{typography.body} w-full {sizeClass} bg-gray-50 dark:bg-gray-700 border rounded-lg font-medium placeholder-gray-500 dark:placeholder-gray-400 transition-all focus:outline-none focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800 {hasError ? 'border-red-500' : 'border-gray-300 dark:border-gray-600 hover:border-blue-500 focus:border-blue-500'} {icon || (showClearButton && inputValue) ? 'pr-10' : ''} {leftIcon ? 'pl-10' : ''} {getContentFloatClass()} {shouldAnimate ? 'focus:scale-[1.01]' : ''} {disabled ? 'opacity-50 cursor-not-allowed' : ''}"
|
|
430
379
|
required={false}
|
|
431
380
|
{disabled}
|
|
432
381
|
{readonly}
|
|
@@ -450,7 +399,7 @@
|
|
|
450
399
|
type="button"
|
|
451
400
|
onclick={handleButtonClick}
|
|
452
401
|
disabled={buttonDisabled}
|
|
453
|
-
class="absolute inset-y-0 right-0 gap-1 flex items-center justify-center px-4 text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 disabled:opacity-50 disabled:cursor-not-allowed {helperText || hintText ||
|
|
402
|
+
class="absolute inset-y-0 right-0 gap-1 flex items-center justify-center px-4 text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 disabled:opacity-50 disabled:cursor-not-allowed {helperText || hintText || errorText ? 'mb-7' : ''}"
|
|
454
403
|
>
|
|
455
404
|
{#if buttonIcon}
|
|
456
405
|
<img src={buttonIcon} alt="Button Icon" class="w-5 h-5" />
|
|
@@ -466,13 +415,13 @@
|
|
|
466
415
|
</div>
|
|
467
416
|
{/if}
|
|
468
417
|
|
|
469
|
-
{#if
|
|
418
|
+
{#if errorText}
|
|
470
419
|
<div transition:slide={{ duration: 300, easing: cubicOut }} class="flex items-start gap-1.5 mt-2" role="alert" aria-live="assertive">
|
|
471
420
|
<ExclamationCircleOutline class="w-4 h-4 shrink-0 text-red-500 mt-0.5" />
|
|
472
|
-
<p class=
|
|
421
|
+
<p class={typography.error}>{errorText}</p>
|
|
473
422
|
</div>
|
|
474
423
|
{:else if helperText || hintText}
|
|
475
|
-
<div class=
|
|
424
|
+
<div class={`mt-2 flex items-center ${typography.xsMuted} opacity-65`}>
|
|
476
425
|
{#if helperIcon || hintIcon}
|
|
477
426
|
<img src={helperIcon || hintIcon} alt="Helper icon" class="w-4 h-4 mr-2" />
|
|
478
427
|
{/if}
|
|
@@ -481,3 +430,15 @@
|
|
|
481
430
|
{/if}
|
|
482
431
|
</div>
|
|
483
432
|
</div>
|
|
433
|
+
|
|
434
|
+
<style>
|
|
435
|
+
/* Hide number input spinners globally */
|
|
436
|
+
:global(input[type="number"]::-webkit-outer-spin-button),
|
|
437
|
+
:global(input[type="number"]::-webkit-inner-spin-button) {
|
|
438
|
+
-webkit-appearance: none;
|
|
439
|
+
margin: 0;
|
|
440
|
+
}
|
|
441
|
+
:global(input[type="number"]) {
|
|
442
|
+
-moz-appearance: textfield;
|
|
443
|
+
}
|
|
444
|
+
</style>
|
|
@@ -20,6 +20,7 @@ type Input = {
|
|
|
20
20
|
size?: "sm" | "md" | "lg" | undefined;
|
|
21
21
|
textareaSize?: string | undefined;
|
|
22
22
|
errorText?: string | undefined;
|
|
23
|
+
color?: "red" | "base" | undefined;
|
|
23
24
|
helperText?: string | undefined;
|
|
24
25
|
helperIcon?: string | undefined;
|
|
25
26
|
hintText?: string | undefined;
|
|
@@ -28,7 +29,7 @@ type Input = {
|
|
|
28
29
|
readonly?: boolean | undefined;
|
|
29
30
|
controlled?: boolean | undefined;
|
|
30
31
|
onButtonClick?: ((value: string) => void) | null | undefined;
|
|
31
|
-
value?: string | undefined;
|
|
32
|
+
value?: string | number | null | undefined;
|
|
32
33
|
autocomplete?: string | null | undefined;
|
|
33
34
|
autofocus?: boolean | undefined;
|
|
34
35
|
showPasswordToggle?: boolean | undefined;
|
|
@@ -37,8 +38,6 @@ type Input = {
|
|
|
37
38
|
statusType?: string | undefined;
|
|
38
39
|
buttonDisabled?: boolean | undefined;
|
|
39
40
|
inputmode?: string | null | undefined;
|
|
40
|
-
showErrors?: boolean | undefined;
|
|
41
|
-
disableBuiltInValidation?: boolean | undefined;
|
|
42
41
|
instantSearch?: boolean | undefined;
|
|
43
42
|
debounceMs?: number | undefined;
|
|
44
43
|
minSearchChars?: number | undefined;
|
|
@@ -71,6 +70,7 @@ declare const Input: import("svelte").Component<{
|
|
|
71
70
|
size?: "sm" | "md" | "lg";
|
|
72
71
|
textareaSize?: string;
|
|
73
72
|
errorText?: string;
|
|
73
|
+
color?: "base" | "red";
|
|
74
74
|
helperText?: string;
|
|
75
75
|
helperIcon?: string;
|
|
76
76
|
hintText?: string;
|
|
@@ -79,7 +79,7 @@ declare const Input: import("svelte").Component<{
|
|
|
79
79
|
readonly?: boolean;
|
|
80
80
|
controlled?: boolean;
|
|
81
81
|
onButtonClick?: ((value: string) => void) | null;
|
|
82
|
-
value?: string;
|
|
82
|
+
value?: string | number | null;
|
|
83
83
|
autocomplete?: string | null;
|
|
84
84
|
autofocus?: boolean;
|
|
85
85
|
showPasswordToggle?: boolean;
|
|
@@ -88,8 +88,6 @@ declare const Input: import("svelte").Component<{
|
|
|
88
88
|
statusType?: string;
|
|
89
89
|
buttonDisabled?: boolean;
|
|
90
90
|
inputmode?: string | null;
|
|
91
|
-
showErrors?: boolean;
|
|
92
|
-
disableBuiltInValidation?: boolean;
|
|
93
91
|
instantSearch?: boolean;
|
|
94
92
|
debounceMs?: number;
|
|
95
93
|
minSearchChars?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/primitives/Input/Input.svelte.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/primitives/Input/Input.svelte.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiaA;;eA9Ce,OAAO;eACP,OAAO;eACP,OAAO;WACX,MAAM,GAAG,IAAI;iBACP,MAAM,GAAG,IAAI;iBACb,MAAM,GAAG,IAAI;gBACd,MAAM,GAAG,IAAI;gBACb,MAAM,GAAG,IAAI;WAClB,MAAM;kBACC,MAAM;YACZ,MAAM;SACT,MAAM;WACJ,MAAM;gBACD,MAAM;WACX,IAAI,GAAG,IAAI,GAAG,IAAI;mBACV,MAAM;gBACT,MAAM;YACV,MAAM,GAAG,KAAK;iBACT,MAAM;iBACN,MAAM;eACR,MAAM;eACN,MAAM;mBACF,MAAM;eACV,OAAO;iBACL,OAAO;oBACJ,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI;YACxC,MAAM,GAAG,MAAM,GAAG,IAAI;mBACf,MAAM,GAAG,IAAI;gBAChB,OAAO;yBACE,OAAO;mBACb,OAAO;iBACT,MAAM;iBACN,MAAM;qBACF,OAAO;gBACZ,MAAM,GAAG,IAAI;oBACT,OAAO;iBACV,MAAM;qBACF,MAAM;sBACL,OAAO;eACd,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;cACpC,MAAM,IAAI;aACX,MAAM,IAAI;oBACH,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;eAC5B,GAAG;gBAGkC"}
|