@getmicdrop/svelte-components 5.3.2 → 5.3.6

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.
Files changed (93) hide show
  1. package/dist/calendar/Calendar/MiniMonthCalendar.svelte +10 -10
  2. package/dist/calendar/Calendar/MiniMonthCalendar.svelte.d.ts +6 -6
  3. package/dist/calendar/OrderSummary/OrderSummary.svelte +2 -2
  4. package/dist/calendar/OrderSummary/OrderSummary.svelte.d.ts +2 -2
  5. package/dist/calendar/PublicCard/PublicCard.svelte +2 -2
  6. package/dist/calendar/PublicCard/PublicCard.svelte.d.ts +2 -2
  7. package/dist/calendar/ShowCard/ShowCard.svelte +2 -2
  8. package/dist/calendar/ShowCard/ShowCard.svelte.d.ts +2 -2
  9. package/dist/patterns/navigation/Header.svelte +38 -27
  10. package/dist/patterns/page/PageLayout.svelte +1 -1
  11. package/dist/primitives/Accordion/Accordion.stories.svelte +75 -0
  12. package/dist/primitives/Accordion/Accordion.stories.svelte.d.ts +28 -0
  13. package/dist/primitives/Accordion/Accordion.stories.svelte.d.ts.map +1 -0
  14. package/dist/primitives/Alert/Alert.stories.svelte +88 -0
  15. package/dist/primitives/Alert/Alert.stories.svelte.d.ts +28 -0
  16. package/dist/primitives/Alert/Alert.stories.svelte.d.ts.map +1 -0
  17. package/dist/primitives/Avatar/Avatar.stories.svelte +94 -0
  18. package/dist/primitives/Avatar/Avatar.stories.svelte.d.ts +28 -0
  19. package/dist/primitives/Avatar/Avatar.stories.svelte.d.ts.map +1 -0
  20. package/dist/primitives/Breadcrumb/Breadcrumb.svelte +1 -1
  21. package/dist/primitives/Button/Button.svelte +87 -22
  22. package/dist/primitives/Button/Button.svelte.d.ts +4 -0
  23. package/dist/primitives/Button/Button.svelte.d.ts.map +1 -1
  24. package/dist/primitives/Checkbox/Checkbox.stories.svelte +84 -0
  25. package/dist/primitives/Checkbox/Checkbox.stories.svelte.d.ts +28 -0
  26. package/dist/primitives/Checkbox/Checkbox.stories.svelte.d.ts.map +1 -0
  27. package/dist/primitives/Drawer/Drawer.stories.svelte +100 -0
  28. package/dist/primitives/Drawer/Drawer.stories.svelte.d.ts +28 -0
  29. package/dist/primitives/Drawer/Drawer.stories.svelte.d.ts.map +1 -0
  30. package/dist/primitives/Dropdown/Dropdown.stories.svelte +137 -0
  31. package/dist/primitives/Dropdown/Dropdown.stories.svelte.d.ts +28 -0
  32. package/dist/primitives/Dropdown/Dropdown.stories.svelte.d.ts.map +1 -0
  33. package/dist/primitives/Dropdown/Dropdown.svelte +13 -15
  34. package/dist/primitives/Dropdown/Dropdown.svelte.d.ts.map +1 -1
  35. package/dist/primitives/Icons/Icon.svelte +2 -1
  36. package/dist/primitives/Icons/Icon.svelte.d.ts.map +1 -1
  37. package/dist/primitives/Input/Select.stories.svelte +112 -0
  38. package/dist/primitives/Input/Select.stories.svelte.d.ts +28 -0
  39. package/dist/primitives/Input/Select.stories.svelte.d.ts.map +1 -0
  40. package/dist/primitives/Input/Textarea.stories.svelte +137 -0
  41. package/dist/primitives/Input/Textarea.stories.svelte.d.ts +28 -0
  42. package/dist/primitives/Input/Textarea.stories.svelte.d.ts.map +1 -0
  43. package/dist/primitives/Pagination/Pagination.stories.svelte +76 -0
  44. package/dist/primitives/Pagination/Pagination.stories.svelte.d.ts +28 -0
  45. package/dist/primitives/Pagination/Pagination.stories.svelte.d.ts.map +1 -0
  46. package/dist/primitives/Pagination/Pagination.svelte +3 -3
  47. package/dist/primitives/Pagination/Pagination.svelte.d.ts +1 -1
  48. package/dist/primitives/Radio/Radio.stories.svelte +80 -0
  49. package/dist/primitives/Radio/Radio.stories.svelte.d.ts +28 -0
  50. package/dist/primitives/Radio/Radio.stories.svelte.d.ts.map +1 -0
  51. package/dist/primitives/Skeleton/Skeleton.stories.svelte +151 -0
  52. package/dist/primitives/Skeleton/Skeleton.stories.svelte.d.ts +28 -0
  53. package/dist/primitives/Skeleton/Skeleton.stories.svelte.d.ts.map +1 -0
  54. package/dist/primitives/Tabs/Tabs.stories.svelte +112 -0
  55. package/dist/primitives/Tabs/Tabs.stories.svelte.d.ts +28 -0
  56. package/dist/primitives/Tabs/Tabs.stories.svelte.d.ts.map +1 -0
  57. package/dist/primitives/Tabs/Tabs.svelte +1 -1
  58. package/dist/primitives/Toggle.svelte +4 -4
  59. package/dist/primitives/ValidationError.spec.js +25 -1
  60. package/dist/primitives/ValidationError.stories.svelte +24 -0
  61. package/dist/primitives/ValidationError.stories.svelte.d.ts.map +1 -1
  62. package/dist/primitives/ValidationError.svelte +8 -4
  63. package/dist/primitives/ValidationError.svelte.d.ts +2 -0
  64. package/dist/primitives/ValidationError.svelte.d.ts.map +1 -1
  65. package/dist/recipes/CropImage/CropImage.svelte +3 -3
  66. package/dist/recipes/SuperLogin/SuperLogin.svelte +34 -23
  67. package/dist/recipes/SuperLogin/SuperLogin.svelte.d.ts.map +1 -1
  68. package/dist/recipes/feedback/EmptyState/EmptyState.svelte +2 -1
  69. package/dist/recipes/feedback/EmptyState/EmptyState.svelte.d.ts.map +1 -1
  70. package/dist/recipes/inputs/MultiSelect.svelte +2 -2
  71. package/dist/recipes/modals/InputModal.svelte +2 -1
  72. package/dist/recipes/modals/InputModal.svelte.d.ts.map +1 -1
  73. package/dist/stories/ComponentConsolidation.stories.svelte +276 -188
  74. package/dist/stories/ComponentConsolidation.stories.svelte.d.ts.map +1 -1
  75. package/dist/stories/PatternsGallery.stories.svelte +19 -0
  76. package/dist/stories/PatternsGallery.stories.svelte.d.ts +28 -0
  77. package/dist/stories/PatternsGallery.stories.svelte.d.ts.map +1 -0
  78. package/dist/stories/PatternsGallery.svelte +388 -0
  79. package/dist/stories/PatternsGallery.svelte.d.ts +4 -0
  80. package/dist/stories/PatternsGallery.svelte.d.ts.map +1 -0
  81. package/dist/stories/PrimitivesGallery.stories.svelte +19 -0
  82. package/dist/stories/PrimitivesGallery.stories.svelte.d.ts +28 -0
  83. package/dist/stories/PrimitivesGallery.stories.svelte.d.ts.map +1 -0
  84. package/dist/stories/PrimitivesGallery.svelte +752 -0
  85. package/dist/stories/PrimitivesGallery.svelte.d.ts +4 -0
  86. package/dist/stories/PrimitivesGallery.svelte.d.ts.map +1 -0
  87. package/dist/stories/RecipesGallery.stories.svelte +19 -0
  88. package/dist/stories/RecipesGallery.stories.svelte.d.ts +28 -0
  89. package/dist/stories/RecipesGallery.stories.svelte.d.ts.map +1 -0
  90. package/dist/stories/RecipesGallery.svelte +441 -0
  91. package/dist/stories/RecipesGallery.svelte.d.ts +4 -0
  92. package/dist/stories/RecipesGallery.svelte.d.ts.map +1 -0
  93. package/package.json +3 -2
@@ -0,0 +1,4 @@
1
+ declare const PrimitivesGallery: import("svelte").Component<Record<string, never>, {}, "">;
2
+ type PrimitivesGallery = ReturnType<typeof PrimitivesGallery>;
3
+ export default PrimitivesGallery;
4
+ //# sourceMappingURL=PrimitivesGallery.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrimitivesGallery.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/stories/PrimitivesGallery.svelte.ts"],"names":[],"mappings":"AAuxBA,QAAA,MAAM,iBAAiB,2DAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,19 @@
1
+ <script module>
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import RecipesGallery from './RecipesGallery.svelte';
4
+
5
+ const { Story } = defineMeta({
6
+ title: 'Visual Galleries/Recipes',
7
+ component: RecipesGallery,
8
+ parameters: {
9
+ layout: 'fullscreen',
10
+ docs: {
11
+ description: {
12
+ component: 'Complete visual gallery of all recipe components (Layer 2) - Domain-agnostic compositions.',
13
+ },
14
+ },
15
+ },
16
+ });
17
+ </script>
18
+
19
+ <Story name="All Recipes" />
@@ -0,0 +1,28 @@
1
+ export default RecipesGallery;
2
+ type RecipesGallery = SvelteComponent<{
3
+ [x: string]: never;
4
+ }, {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {}> & {
7
+ $$bindings?: string | undefined;
8
+ };
9
+ declare const RecipesGallery: $$__sveltets_2_IsomorphicComponent<{
10
+ [x: string]: never;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {}, {}, string>;
14
+ import RecipesGallery from './RecipesGallery.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=RecipesGallery.stories.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecipesGallery.stories.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/stories/RecipesGallery.stories.svelte.js"],"names":[],"mappings":";;;;;;;;AAiCA;;;;mBAA0H;2BA7B7F,yBAAyB;6CAoBT,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"}
@@ -0,0 +1,441 @@
1
+ <script lang="ts">
2
+ // ============================================================================
3
+ // RECIPES VISUAL GALLERY
4
+ // Displays ALL recipe components (Layer 2) - Domain-agnostic compositions
5
+ // ============================================================================
6
+
7
+ // Feedback
8
+ import EmptyState from '../recipes/feedback/EmptyState/EmptyState.svelte';
9
+ import ErrorDisplay from '../recipes/feedback/ErrorDisplay.svelte';
10
+ import StatusIndicator from '../recipes/feedback/StatusIndicator/StatusIndicator.svelte';
11
+
12
+ // Inputs
13
+ import MultiSelect from '../recipes/inputs/MultiSelect.svelte';
14
+ import OTPInput from '../recipes/inputs/OTPInput.svelte';
15
+ import PasswordInput from '../recipes/inputs/PasswordInput.svelte';
16
+ import PasswordStrengthIndicator from '../recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte';
17
+ import Search from '../recipes/inputs/Search.svelte';
18
+ import SelectDropdown from '../recipes/inputs/SelectDropdown.svelte';
19
+
20
+ // Modals
21
+ import AlertModal from '../recipes/modals/AlertModal.svelte';
22
+ import ConfirmationModal from '../recipes/modals/ConfirmationModal.svelte';
23
+ import InputModal from '../recipes/modals/InputModal.svelte';
24
+ import StatusModal from '../recipes/modals/StatusModal.svelte';
25
+
26
+ // Fields
27
+ import CheckboxField from '../recipes/fields/CheckboxField.svelte';
28
+ import FormField from '../recipes/fields/FormField.svelte';
29
+ import RadioGroup from '../recipes/fields/RadioGroup.svelte';
30
+ import SelectField from '../recipes/fields/SelectField.svelte';
31
+ import TextareaField from '../recipes/fields/TextareaField.svelte';
32
+ import ToggleField from '../recipes/fields/ToggleField.svelte';
33
+
34
+ // Primitives for demos
35
+ import Button from '../primitives/Button/Button.svelte';
36
+ import Card from '../primitives/Card.svelte';
37
+
38
+ // State
39
+ let isDark = $state(false);
40
+
41
+ // Modal states
42
+ let showAlertModal = $state(false);
43
+ let showConfirmModal = $state(false);
44
+ let showInputModal = $state(false);
45
+ let showStatusModal = $state(false);
46
+ let statusModalType = $state<'success' | 'error' | 'loading'>('success');
47
+
48
+ // Input states
49
+ let otpValue = $state('');
50
+ let passwordValue = $state('');
51
+ let searchValue = $state('');
52
+ let multiSelectValue = $state<string[]>([]);
53
+ let selectDropdownValue = $state('');
54
+
55
+ // Field states
56
+ let checkboxChecked = $state(false);
57
+ let toggleChecked = $state(false);
58
+ let radioValue = $state('');
59
+ let textareaValue = $state('');
60
+ let selectFieldValue = $state('');
61
+ let formFieldValue = $state('');
62
+
63
+ function toggleDark() {
64
+ isDark = !isDark;
65
+ document.documentElement.classList.toggle('dark', isDark);
66
+ }
67
+
68
+ // Section styling
69
+ const sectionClass = (dark: boolean) =>
70
+ `rounded-xl p-6 ${dark ? 'bg-gray-800 border-gray-700' : 'bg-white border-gray-200'} border`;
71
+
72
+ const headingClass = (dark: boolean) =>
73
+ `text-xl font-semibold mb-1 ${dark ? 'text-white' : 'text-gray-900'}`;
74
+
75
+ const subheadingClass = (dark: boolean) =>
76
+ `text-sm mb-4 ${dark ? 'text-gray-400' : 'text-gray-500'}`;
77
+
78
+ // Demo data
79
+ const multiSelectOptions = [
80
+ { value: 'react', label: 'React' },
81
+ { value: 'vue', label: 'Vue' },
82
+ { value: 'svelte', label: 'Svelte' },
83
+ { value: 'angular', label: 'Angular' },
84
+ { value: 'solid', label: 'Solid' },
85
+ ];
86
+
87
+ const selectOptions = [
88
+ { value: 'sm', label: 'Small' },
89
+ { value: 'md', label: 'Medium' },
90
+ { value: 'lg', label: 'Large' },
91
+ { value: 'xl', label: 'Extra Large' },
92
+ ];
93
+
94
+ const radioOptions = [
95
+ { value: 'daily', label: 'Daily', description: 'Get updates every day' },
96
+ { value: 'weekly', label: 'Weekly', description: 'Get updates once a week' },
97
+ { value: 'monthly', label: 'Monthly', description: 'Get updates once a month' },
98
+ ];
99
+ </script>
100
+
101
+ <div class="min-h-screen p-6 space-y-8 {isDark ? 'bg-gray-900' : 'bg-gray-50'}">
102
+ <!-- Header -->
103
+ <div class="flex items-center justify-between mb-8">
104
+ <div>
105
+ <h1 class="text-3xl font-bold {isDark ? 'text-white' : 'text-gray-900'}">Recipes Gallery</h1>
106
+ <p class="{isDark ? 'text-gray-400' : 'text-gray-600'}">Domain-agnostic compositions (Layer 2)</p>
107
+ </div>
108
+ <button
109
+ onclick={toggleDark}
110
+ class="px-4 py-2 rounded-lg font-medium {isDark ? 'bg-yellow-500 text-black' : 'bg-gray-800 text-white'}"
111
+ >
112
+ {isDark ? '☀️ Light' : '🌙 Dark'}
113
+ </button>
114
+ </div>
115
+
116
+ <!-- ========== FEEDBACK COMPONENTS ========== -->
117
+ <section class={sectionClass(isDark)}>
118
+ <h2 class={headingClass(isDark)}>Feedback Components</h2>
119
+ <p class={subheadingClass(isDark)}>EmptyState, ErrorDisplay, StatusIndicator</p>
120
+
121
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
122
+ <Card>
123
+ <p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">EmptyState</p>
124
+ <EmptyState
125
+ title="No items yet"
126
+ description="Get started by creating your first item"
127
+ >
128
+ <Button size="sm">Create Item</Button>
129
+ </EmptyState>
130
+ </Card>
131
+
132
+ <Card>
133
+ <p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">ErrorDisplay</p>
134
+ <ErrorDisplay
135
+ title="Something went wrong"
136
+ message="We couldn't load the data. Please try again."
137
+ >
138
+ <Button size="sm" variant="outline">Retry</Button>
139
+ </ErrorDisplay>
140
+ </Card>
141
+ </div>
142
+
143
+ <div class="mt-6">
144
+ <p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-3">StatusIndicator</p>
145
+ <div class="flex flex-wrap gap-6">
146
+ <div class="flex items-center gap-2">
147
+ <StatusIndicator status="active" />
148
+ <span class={isDark ? 'text-white' : 'text-gray-900'}>Active</span>
149
+ </div>
150
+ <div class="flex items-center gap-2">
151
+ <StatusIndicator status="pending" />
152
+ <span class={isDark ? 'text-white' : 'text-gray-900'}>Pending</span>
153
+ </div>
154
+ <div class="flex items-center gap-2">
155
+ <StatusIndicator status="inactive" />
156
+ <span class={isDark ? 'text-white' : 'text-gray-900'}>Inactive</span>
157
+ </div>
158
+ <div class="flex items-center gap-2">
159
+ <StatusIndicator status="error" />
160
+ <span class={isDark ? 'text-white' : 'text-gray-900'}>Error</span>
161
+ </div>
162
+ <div class="flex items-center gap-2">
163
+ <StatusIndicator status="success" />
164
+ <span class={isDark ? 'text-white' : 'text-gray-900'}>Success</span>
165
+ </div>
166
+ </div>
167
+ </div>
168
+ </section>
169
+
170
+ <!-- ========== FORM FIELDS ========== -->
171
+ <section class={sectionClass(isDark)}>
172
+ <h2 class={headingClass(isDark)}>Form Fields</h2>
173
+ <p class={subheadingClass(isDark)}>Composed field components with labels, validation, and help text</p>
174
+
175
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
176
+ <div>
177
+ <FormField
178
+ label="Full Name"
179
+ placeholder="John Doe"
180
+ helperText="Enter your legal name"
181
+ bind:value={formFieldValue}
182
+ />
183
+ </div>
184
+
185
+ <div>
186
+ <FormField
187
+ label="Email (with error)"
188
+ placeholder="email@example.com"
189
+ error="Please enter a valid email address"
190
+ />
191
+ </div>
192
+
193
+ <div>
194
+ <SelectField
195
+ label="Size"
196
+ options={selectOptions}
197
+ bind:value={selectFieldValue}
198
+ placeholder="Choose a size"
199
+ />
200
+ </div>
201
+
202
+ <div>
203
+ <TextareaField
204
+ label="Bio"
205
+ placeholder="Tell us about yourself..."
206
+ bind:value={textareaValue}
207
+ helperText="Maximum 500 characters"
208
+ />
209
+ </div>
210
+ </div>
211
+
212
+ <div class="mt-6 space-y-4">
213
+ <CheckboxField
214
+ label="I agree to the terms and conditions"
215
+ description="You must agree to continue"
216
+ bind:checked={checkboxChecked}
217
+ />
218
+
219
+ <ToggleField
220
+ label="Enable notifications"
221
+ description="Receive email updates about your account"
222
+ bind:checked={toggleChecked}
223
+ />
224
+
225
+ <div class="max-w-md">
226
+ <RadioGroup
227
+ label="Update frequency"
228
+ options={radioOptions}
229
+ bind:value={radioValue}
230
+ />
231
+ </div>
232
+ </div>
233
+ </section>
234
+
235
+ <!-- ========== SPECIAL INPUTS ========== -->
236
+ <section class={sectionClass(isDark)}>
237
+ <h2 class={headingClass(isDark)}>Special Inputs</h2>
238
+ <p class={subheadingClass(isDark)}>Password, OTP, Search, MultiSelect, SelectDropdown</p>
239
+
240
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
241
+ <div>
242
+ <p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">PasswordInput</p>
243
+ <PasswordInput
244
+ label="Password"
245
+ placeholder="Enter password"
246
+ bind:value={passwordValue}
247
+ />
248
+ </div>
249
+
250
+ <div>
251
+ <p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">PasswordStrengthIndicator</p>
252
+ <PasswordStrengthIndicator password={passwordValue} />
253
+ </div>
254
+
255
+ <div>
256
+ <p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">OTPInput (6 digits)</p>
257
+ <OTPInput
258
+ length={6}
259
+ bind:value={otpValue}
260
+ />
261
+ <p class="text-sm text-gray-500 mt-2">Value: {otpValue || '(empty)'}</p>
262
+ </div>
263
+
264
+ <div>
265
+ <p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Search</p>
266
+ <Search
267
+ placeholder="Search..."
268
+ bind:value={searchValue}
269
+ />
270
+ </div>
271
+
272
+ <div>
273
+ <p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">MultiSelect</p>
274
+ <MultiSelect
275
+ label="Frameworks"
276
+ options={multiSelectOptions}
277
+ bind:selected={multiSelectValue}
278
+ placeholder="Select frameworks"
279
+ />
280
+ </div>
281
+
282
+ <div>
283
+ <p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">SelectDropdown</p>
284
+ <SelectDropdown
285
+ label="Priority"
286
+ options={[
287
+ { value: 'low', label: 'Low Priority' },
288
+ { value: 'medium', label: 'Medium Priority' },
289
+ { value: 'high', label: 'High Priority' },
290
+ ]}
291
+ bind:value={selectDropdownValue}
292
+ />
293
+ </div>
294
+ </div>
295
+ </section>
296
+
297
+ <!-- ========== MODALS ========== -->
298
+ <section class={sectionClass(isDark)}>
299
+ <h2 class={headingClass(isDark)}>Modals</h2>
300
+ <p class={subheadingClass(isDark)}>AlertModal, ConfirmationModal, InputModal, StatusModal</p>
301
+
302
+ <div class="flex flex-wrap gap-4">
303
+ <Button onclick={() => showAlertModal = true}>
304
+ Open AlertModal
305
+ </Button>
306
+
307
+ <Button variant="alternative" onclick={() => showConfirmModal = true}>
308
+ Open ConfirmationModal
309
+ </Button>
310
+
311
+ <Button variant="outline" onclick={() => showInputModal = true}>
312
+ Open InputModal
313
+ </Button>
314
+
315
+ <Button variant="ghost" onclick={() => {
316
+ statusModalType = 'success';
317
+ showStatusModal = true;
318
+ setTimeout(() => showStatusModal = false, 2000);
319
+ }}>
320
+ StatusModal (Success)
321
+ </Button>
322
+
323
+ <Button variant="ghost" onclick={() => {
324
+ statusModalType = 'error';
325
+ showStatusModal = true;
326
+ setTimeout(() => showStatusModal = false, 2000);
327
+ }}>
328
+ StatusModal (Error)
329
+ </Button>
330
+
331
+ <Button variant="ghost" onclick={() => {
332
+ statusModalType = 'loading';
333
+ showStatusModal = true;
334
+ setTimeout(() => showStatusModal = false, 2000);
335
+ }}>
336
+ StatusModal (Loading)
337
+ </Button>
338
+ </div>
339
+ </section>
340
+
341
+ <!-- AlertModal -->
342
+ <AlertModal
343
+ bind:open={showAlertModal}
344
+ title="Alert"
345
+ message="This is an alert message that requires your attention."
346
+ confirmText="OK"
347
+ onconfirm={() => showAlertModal = false}
348
+ />
349
+
350
+ <!-- ConfirmationModal -->
351
+ <ConfirmationModal
352
+ bind:open={showConfirmModal}
353
+ title="Confirm Action"
354
+ message="Are you sure you want to proceed? This action cannot be undone."
355
+ confirmText="Yes, proceed"
356
+ cancelText="Cancel"
357
+ onconfirm={() => {
358
+ showConfirmModal = false;
359
+ console.log('Confirmed!');
360
+ }}
361
+ oncancel={() => showConfirmModal = false}
362
+ />
363
+
364
+ <!-- InputModal -->
365
+ <InputModal
366
+ bind:open={showInputModal}
367
+ title="Enter Information"
368
+ label="Name"
369
+ placeholder="Enter your name"
370
+ confirmText="Submit"
371
+ onconfirm={(value) => {
372
+ console.log('Submitted:', value);
373
+ showInputModal = false;
374
+ }}
375
+ oncancel={() => showInputModal = false}
376
+ />
377
+
378
+ <!-- StatusModal -->
379
+ <StatusModal
380
+ bind:open={showStatusModal}
381
+ type={statusModalType}
382
+ title={statusModalType === 'loading' ? 'Processing...' : statusModalType === 'success' ? 'Success!' : 'Error'}
383
+ message={statusModalType === 'loading' ? 'Please wait...' : statusModalType === 'success' ? 'Operation completed successfully.' : 'Something went wrong.'}
384
+ />
385
+
386
+ <!-- ========== COMMON PATTERNS ========== -->
387
+ <section class={sectionClass(isDark)}>
388
+ <h2 class={headingClass(isDark)}>Common Recipe Patterns</h2>
389
+ <p class={subheadingClass(isDark)}>How recipes compose together</p>
390
+
391
+ <div class="space-y-6">
392
+ <Card>
393
+ <h4 class="font-medium mb-4">Registration Form Pattern</h4>
394
+ <div class="space-y-4 max-w-md">
395
+ <FormField
396
+ label="Email"
397
+ type="email"
398
+ placeholder="email@example.com"
399
+ />
400
+ <PasswordInput
401
+ label="Password"
402
+ placeholder="Create a password"
403
+ bind:value={passwordValue}
404
+ />
405
+ <PasswordStrengthIndicator password={passwordValue} />
406
+ <CheckboxField
407
+ label="I agree to the Terms of Service"
408
+ />
409
+ <Button size="full">Create Account</Button>
410
+ </div>
411
+ </Card>
412
+
413
+ <Card>
414
+ <h4 class="font-medium mb-4">Settings Form Pattern</h4>
415
+ <div class="space-y-4 max-w-md">
416
+ <ToggleField
417
+ label="Email notifications"
418
+ description="Receive updates via email"
419
+ />
420
+ <ToggleField
421
+ label="Push notifications"
422
+ description="Receive mobile push notifications"
423
+ />
424
+ <SelectField
425
+ label="Language"
426
+ options={[
427
+ { value: 'en', label: 'English' },
428
+ { value: 'es', label: 'Spanish' },
429
+ { value: 'fr', label: 'French' },
430
+ ]}
431
+ placeholder="Select language"
432
+ />
433
+ <div class="flex justify-end gap-2 pt-4">
434
+ <Button variant="ghost">Cancel</Button>
435
+ <Button>Save Changes</Button>
436
+ </div>
437
+ </div>
438
+ </Card>
439
+ </div>
440
+ </section>
441
+ </div>
@@ -0,0 +1,4 @@
1
+ declare const RecipesGallery: import("svelte").Component<Record<string, never>, {}, "">;
2
+ type RecipesGallery = ReturnType<typeof RecipesGallery>;
3
+ export default RecipesGallery;
4
+ //# sourceMappingURL=RecipesGallery.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecipesGallery.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/stories/RecipesGallery.svelte.ts"],"names":[],"mappings":"AAoXA,QAAA,MAAM,cAAc,2DAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getmicdrop/svelte-components",
3
- "version": "5.3.2",
3
+ "version": "5.3.6",
4
4
  "description": "Shared component library for Micdrop applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -145,7 +145,7 @@
145
145
  "filepond-plugin-image-preview": "^4.6.12",
146
146
  "jwt-decode": "^4.0.0",
147
147
  "sortablejs": "^1.15.6",
148
- "svelte-easy-crop": "^3.0.0",
148
+ "svelte-easy-crop": "^5.0.0",
149
149
  "svelte-filepond": "^0.2.2",
150
150
  "svelte-sonner": "^0.3.28",
151
151
  "tailwind-merge": "^2.5.4",
@@ -166,6 +166,7 @@
166
166
  "@sveltejs/kit": "^2.49.0",
167
167
  "@sveltejs/package": "^2.5.7",
168
168
  "@sveltejs/vite-plugin-svelte": "^5.1.1",
169
+ "@tailwindcss/forms": "^0.5.11",
169
170
  "@testing-library/jest-dom": "^6.4.6",
170
171
  "@testing-library/svelte": "^5.2.0",
171
172
  "@types/cookie": "^1.0.0",