@getmicdrop/svelte-components 5.12.0 → 5.14.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.
Files changed (86) hide show
  1. package/dist/calendar/OrderSummary/OrderSummary.svelte +67 -7
  2. package/dist/calendar/OrderSummary/OrderSummary.svelte.d.ts +2 -0
  3. package/dist/calendar/OrderSummary/OrderSummary.svelte.d.ts.map +1 -1
  4. package/dist/index.spec.js +0 -1
  5. package/dist/patterns/navigation/Header.svelte +23 -27
  6. package/dist/patterns/navigation/Header.svelte.d.ts.map +1 -1
  7. package/dist/primitives/AvatarButton/AvatarButton.svelte +57 -0
  8. package/dist/primitives/AvatarButton/AvatarButton.svelte.d.ts +18 -0
  9. package/dist/primitives/AvatarButton/AvatarButton.svelte.d.ts.map +1 -0
  10. package/dist/primitives/BottomSheet/BottomSheet.spec.js +19 -19
  11. package/dist/primitives/BottomSheet/BottomSheet.svelte +5 -5
  12. package/dist/primitives/BottomSheet/BottomSheet.svelte.d.ts +2 -2
  13. package/dist/primitives/BottomSheet/BottomSheet.svelte.d.ts.map +1 -1
  14. package/dist/primitives/BottomSheet/BottomSheetWrapper.test.svelte +3 -3
  15. package/dist/primitives/BottomSheet/BottomSheetWrapper.test.svelte.d.ts +1 -1
  16. package/dist/primitives/Button/Button.spec.js +16 -14
  17. package/dist/primitives/Button/Button.svelte +9 -45
  18. package/dist/primitives/Button/Button.svelte.d.ts.map +1 -1
  19. package/dist/primitives/CardAction/CardAction.svelte +68 -0
  20. package/dist/primitives/CardAction/CardAction.svelte.d.ts +20 -0
  21. package/dist/primitives/CardAction/CardAction.svelte.d.ts.map +1 -0
  22. package/dist/primitives/Drawer/Drawer.spec.js +33 -33
  23. package/dist/primitives/Drawer/Drawer.svelte +5 -9
  24. package/dist/primitives/Drawer/Drawer.svelte.d.ts +2 -3
  25. package/dist/primitives/Drawer/Drawer.svelte.d.ts.map +1 -1
  26. package/dist/primitives/Input/Input.svelte +1 -1
  27. package/dist/primitives/LandingButton/LandingButton.svelte +92 -0
  28. package/dist/primitives/LandingButton/LandingButton.svelte.d.ts +22 -0
  29. package/dist/primitives/LandingButton/LandingButton.svelte.d.ts.map +1 -0
  30. package/dist/primitives/MenuItem/MenuItem.svelte +85 -0
  31. package/dist/primitives/MenuItem/MenuItem.svelte.d.ts +24 -0
  32. package/dist/primitives/MenuItem/MenuItem.svelte.d.ts.map +1 -0
  33. package/dist/primitives/Modal/Modal.spec.js +7 -7
  34. package/dist/primitives/Modal/Modal.stories.svelte +3 -3
  35. package/dist/primitives/Modal/Modal.svelte +25 -18
  36. package/dist/primitives/Modal/Modal.svelte.d.ts +5 -5
  37. package/dist/primitives/Modal/Modal.svelte.d.ts.map +1 -1
  38. package/dist/primitives/Modal/ModalTestWrapper.svelte +3 -3
  39. package/dist/primitives/Modal/ModalTestWrapper.svelte.d.ts +2 -2
  40. package/dist/primitives/NavItem/NavItem.svelte +75 -0
  41. package/dist/primitives/NavItem/NavItem.svelte.d.ts +20 -0
  42. package/dist/primitives/NavItem/NavItem.svelte.d.ts.map +1 -0
  43. package/dist/primitives/SearchResultItem/SearchResultItem.svelte +109 -0
  44. package/dist/primitives/SearchResultItem/SearchResultItem.svelte.d.ts +26 -0
  45. package/dist/primitives/SearchResultItem/SearchResultItem.svelte.d.ts.map +1 -0
  46. package/dist/primitives/SidebarToggle/SidebarToggle.svelte +55 -0
  47. package/dist/primitives/SidebarToggle/SidebarToggle.svelte.d.ts +18 -0
  48. package/dist/primitives/SidebarToggle/SidebarToggle.svelte.d.ts.map +1 -0
  49. package/dist/primitives/index.d.ts +7 -0
  50. package/dist/primitives/index.js +21 -0
  51. package/dist/recipes/SuperLogin/SuperLogin.svelte +3 -3
  52. package/dist/recipes/SuperLogin/SuperLogin.svelte.d.ts.map +1 -1
  53. package/dist/recipes/inputs/index.d.ts +0 -1
  54. package/dist/recipes/inputs/index.js +0 -1
  55. package/dist/recipes/modals/AlertModal.spec.js +2 -2
  56. package/dist/recipes/modals/AlertModal.svelte +6 -6
  57. package/dist/recipes/modals/AlertModal.svelte.d.ts +3 -3
  58. package/dist/recipes/modals/ConfirmationModal.spec.js +2 -2
  59. package/dist/recipes/modals/ConfirmationModal.svelte +5 -5
  60. package/dist/recipes/modals/ConfirmationModal.svelte.d.ts +3 -3
  61. package/dist/recipes/modals/InputModal.spec.js +2 -2
  62. package/dist/recipes/modals/InputModal.svelte +4 -4
  63. package/dist/recipes/modals/InputModal.svelte.d.ts +3 -3
  64. package/dist/recipes/modals/ModalTestWrapper.spec.js +49 -49
  65. package/dist/recipes/modals/ModalTestWrapper.svelte +3 -3
  66. package/dist/recipes/modals/ModalTestWrapper.svelte.d.ts +2 -2
  67. package/dist/recipes/modals/StatusModal.spec.js +2 -2
  68. package/dist/recipes/modals/StatusModal.svelte +4 -4
  69. package/dist/recipes/modals/StatusModal.svelte.d.ts +3 -3
  70. package/dist/stories/ComponentConsolidation.stories.svelte +10 -10
  71. package/dist/stories/PrimitivesGallery.svelte +25 -21
  72. package/dist/stories/PrimitivesGallery.svelte.d.ts.map +1 -1
  73. package/dist/stories/RecipesGallery.spec.js +9 -18
  74. package/dist/stories/RecipesGallery.svelte +5 -22
  75. package/dist/stories/RecipesGallery.svelte.d.ts.map +1 -1
  76. package/dist/tokens/__tests__/sizing.test.js +5 -7
  77. package/dist/tokens/sizing.d.ts +20 -19
  78. package/dist/tokens/sizing.d.ts.map +1 -1
  79. package/dist/tokens/sizing.js +20 -19
  80. package/package.json +1 -1
  81. package/dist/recipes/inputs/SelectDropdown.spec.d.ts +0 -2
  82. package/dist/recipes/inputs/SelectDropdown.spec.d.ts.map +0 -1
  83. package/dist/recipes/inputs/SelectDropdown.spec.js +0 -518
  84. package/dist/recipes/inputs/SelectDropdown.svelte +0 -171
  85. package/dist/recipes/inputs/SelectDropdown.svelte.d.ts +0 -16
  86. package/dist/recipes/inputs/SelectDropdown.svelte.d.ts.map +0 -1
@@ -0,0 +1,109 @@
1
+ <script lang="ts">
2
+ /**
3
+ * SearchResultItem Component
4
+ * Search dropdown result item with blue hover.
5
+ *
6
+ * Two modes:
7
+ * - Simple (no type): Blue hover, no border - for basic dropdowns
8
+ * - Typed (with type): Colored left border by entity type - matches global search styling
9
+ *
10
+ * Replaces: Button variant="search-result"
11
+ */
12
+ import { twMerge } from 'tailwind-merge';
13
+ import type { Snippet } from 'svelte';
14
+ import { buttonMenuItemSizes } from '../../tokens/sizing.js';
15
+
16
+ /** Entity type for colored border mode */
17
+ export type SearchResultType = 'event' | 'order' | 'performer' | 'venue' | 'collection' | 'series';
18
+
19
+ interface Props {
20
+ /** Size variant */
21
+ size?: 'sm' | 'md' | 'lg';
22
+ /** Entity type - when provided, shows colored left border instead of blue hover */
23
+ type?: SearchResultType;
24
+ /** Disabled state */
25
+ disabled?: boolean;
26
+ /** Selected/highlighted state (alias: isActive) */
27
+ selected?: boolean;
28
+ /** Content */
29
+ children?: Snippet;
30
+ /** Trailing content (icons, badges) */
31
+ trailing?: Snippet;
32
+ /** Additional classes */
33
+ class?: string;
34
+ /** Click handler */
35
+ onclick?: (e: MouseEvent) => void;
36
+ [key: string]: unknown;
37
+ }
38
+
39
+ let {
40
+ size = 'md',
41
+ type,
42
+ disabled = false,
43
+ selected = false,
44
+ children,
45
+ trailing,
46
+ class: className = '',
47
+ onclick,
48
+ ...restProps
49
+ }: Props = $props();
50
+
51
+ // Border colors by entity type - matches micdrop-frontend SearchResultItem
52
+ const borderColors: Record<SearchResultType, string> = {
53
+ event: 'border-l-blue-500',
54
+ order: 'border-l-yellow-500',
55
+ performer: 'border-l-pink-500',
56
+ venue: 'border-l-indigo-500',
57
+ collection: 'border-l-purple-500',
58
+ series: 'border-l-blue-500',
59
+ };
60
+
61
+ // Simple mode (no type): rounded with blue hover
62
+ const simpleBaseClasses = 'w-full text-left rounded-lg font-medium leading-none focus:outline-hidden transition-all duration-150 ease-out select-none';
63
+ const simpleDefaultClasses = 'text-gray-900 bg-transparent border-transparent hover:bg-blue-50 focus:bg-blue-50 dark:text-white dark:hover:bg-blue-900/20 dark:focus:bg-blue-900/20';
64
+ const simpleSelectedClasses = 'text-gray-900 bg-blue-50 dark:text-white dark:bg-blue-900/20';
65
+
66
+ // Typed mode (with type): colored left border, gray hover
67
+ const typedBaseClasses = 'w-full text-left font-medium leading-none focus:outline-hidden transition-all duration-150 ease-out select-none border-l-3';
68
+ const typedDefaultClasses = 'text-gray-900 bg-transparent hover:bg-gray-50 hover:border-l-4 dark:text-white dark:hover:bg-gray-700';
69
+ const typedSelectedClasses = 'text-gray-900 bg-primary-100 border-l-primary-600 border-l-4 dark:text-white dark:bg-gray-700';
70
+
71
+ const disabledClasses = 'text-gray-400 cursor-not-allowed dark:text-gray-500';
72
+
73
+ let sizeClass = $derived(buttonMenuItemSizes[size] || buttonMenuItemSizes.md);
74
+ let hasTrailing = $derived(typeof trailing === 'function' || trailing);
75
+ let isTypedMode = $derived(!!type);
76
+
77
+ let variantClass = $derived(() => {
78
+ if (disabled) return disabledClasses;
79
+ if (isTypedMode) {
80
+ return selected ? typedSelectedClasses : typedDefaultClasses;
81
+ }
82
+ return selected ? simpleSelectedClasses : simpleDefaultClasses;
83
+ });
84
+
85
+ let borderClass = $derived(isTypedMode && type ? borderColors[type] : '');
86
+
87
+ let classes = $derived(twMerge(
88
+ isTypedMode ? typedBaseClasses : simpleBaseClasses,
89
+ hasTrailing ? 'flex items-center justify-between' : 'flex items-center justify-start',
90
+ sizeClass,
91
+ borderClass,
92
+ variantClass(),
93
+ disabled ? 'cursor-not-allowed' : 'cursor-pointer active:scale-[0.97] active:opacity-90',
94
+ className
95
+ ));
96
+ </script>
97
+
98
+ <button
99
+ type="button"
100
+ class={classes}
101
+ {disabled}
102
+ {onclick}
103
+ {...restProps}
104
+ >
105
+ <span class="inline-flex items-center gap-1.5">
106
+ {#if typeof children === 'function'}{@render children()}{:else if children}{children}{/if}
107
+ </span>
108
+ {#if typeof trailing === 'function'}{@render trailing()}{:else if trailing}{trailing}{/if}
109
+ </button>
@@ -0,0 +1,26 @@
1
+ import type { Snippet } from 'svelte';
2
+ /** Entity type for colored border mode */
3
+ export type SearchResultType = 'event' | 'order' | 'performer' | 'venue' | 'collection' | 'series';
4
+ interface Props {
5
+ /** Size variant */
6
+ size?: 'sm' | 'md' | 'lg';
7
+ /** Entity type - when provided, shows colored left border instead of blue hover */
8
+ type?: SearchResultType;
9
+ /** Disabled state */
10
+ disabled?: boolean;
11
+ /** Selected/highlighted state (alias: isActive) */
12
+ selected?: boolean;
13
+ /** Content */
14
+ children?: Snippet;
15
+ /** Trailing content (icons, badges) */
16
+ trailing?: Snippet;
17
+ /** Additional classes */
18
+ class?: string;
19
+ /** Click handler */
20
+ onclick?: (e: MouseEvent) => void;
21
+ [key: string]: unknown;
22
+ }
23
+ declare const SearchResultItem: import("svelte").Component<Props, {}, "">;
24
+ type SearchResultItem = ReturnType<typeof SearchResultItem>;
25
+ export default SearchResultItem;
26
+ //# sourceMappingURL=SearchResultItem.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchResultItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/primitives/SearchResultItem/SearchResultItem.svelte.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAIpC,0CAA0C;AAC1C,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;AAEnG,UAAU,KAAK;IACb,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,mFAAmF;IACnF,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AA6EH,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,55 @@
1
+ <script lang="ts">
2
+ /**
3
+ * SidebarToggle Component
4
+ * Compact pill button for sidebar expand/collapse.
5
+ *
6
+ * Replaces: Button variant="sidebar-toggle"
7
+ */
8
+ import { twMerge } from 'tailwind-merge';
9
+ import type { Snippet } from 'svelte';
10
+
11
+ interface Props {
12
+ /** Expanded state (affects icon direction if using chevron) */
13
+ expanded?: boolean;
14
+ /** Disabled state */
15
+ disabled?: boolean;
16
+ /** Content (typically a chevron icon) */
17
+ children?: Snippet;
18
+ /** Additional classes */
19
+ class?: string;
20
+ /** Click handler */
21
+ onclick?: (e: MouseEvent) => void;
22
+ [key: string]: unknown;
23
+ }
24
+
25
+ let {
26
+ expanded = false,
27
+ disabled = false,
28
+ children,
29
+ class: className = '',
30
+ onclick,
31
+ ...restProps
32
+ }: Props = $props();
33
+
34
+ const baseClasses = 'w-6 h-7 inline-flex items-center justify-center rounded-lg font-medium leading-none focus:outline-hidden transition-all duration-150 ease-out select-none';
35
+ const defaultClasses = 'text-gray-900 bg-blue-100 border border-blue-200 hover:bg-blue-200 shadow-lg dark:text-white dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700';
36
+ const disabledClasses = 'bg-gray-200 border-gray-200 text-gray-400 cursor-not-allowed dark:bg-gray-700 dark:border-gray-700 dark:text-gray-500';
37
+
38
+ let classes = $derived(twMerge(
39
+ baseClasses,
40
+ disabled ? disabledClasses : defaultClasses,
41
+ disabled ? 'cursor-not-allowed' : 'cursor-pointer active:scale-[0.95] active:opacity-90',
42
+ className
43
+ ));
44
+ </script>
45
+
46
+ <button
47
+ type="button"
48
+ class={classes}
49
+ {disabled}
50
+ aria-expanded={expanded}
51
+ {onclick}
52
+ {...restProps}
53
+ >
54
+ {#if typeof children === 'function'}{@render children()}{:else if children}{children}{/if}
55
+ </button>
@@ -0,0 +1,18 @@
1
+ import type { Snippet } from 'svelte';
2
+ interface Props {
3
+ /** Expanded state (affects icon direction if using chevron) */
4
+ expanded?: boolean;
5
+ /** Disabled state */
6
+ disabled?: boolean;
7
+ /** Content (typically a chevron icon) */
8
+ children?: Snippet;
9
+ /** Additional classes */
10
+ class?: string;
11
+ /** Click handler */
12
+ onclick?: (e: MouseEvent) => void;
13
+ [key: string]: unknown;
14
+ }
15
+ declare const SidebarToggle: import("svelte").Component<Props, {}, "">;
16
+ type SidebarToggle = ReturnType<typeof SidebarToggle>;
17
+ export default SidebarToggle;
18
+ //# sourceMappingURL=SidebarToggle.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarToggle.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/primitives/SidebarToggle/SidebarToggle.svelte.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGpC,UAAU,KAAK;IACb,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAkCH,QAAA,MAAM,aAAa,2CAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
@@ -33,4 +33,11 @@ export { default as Toggle } from "./Toggle.svelte";
33
33
  export { default as Tooltip } from "./Tooltip/Tooltip.svelte";
34
34
  export { default as Typography } from "./Typography/Typography.svelte";
35
35
  export { default as ValidationError } from "./ValidationError.svelte";
36
+ export { default as MenuItem } from "./MenuItem/MenuItem.svelte";
37
+ export { default as AvatarButton } from "./AvatarButton/AvatarButton.svelte";
38
+ export { default as NavItem } from "./NavItem/NavItem.svelte";
39
+ export { default as CardAction } from "./CardAction/CardAction.svelte";
40
+ export { default as SearchResultItem } from "./SearchResultItem/SearchResultItem.svelte";
41
+ export { default as LandingButton } from "./LandingButton/LandingButton.svelte";
42
+ export { default as SidebarToggle } from "./SidebarToggle/SidebarToggle.svelte";
36
43
  //# sourceMappingURL=index.d.ts.map
@@ -90,3 +90,24 @@ export { default as Typography } from './Typography/Typography.svelte';
90
90
 
91
91
  // ValidationError
92
92
  export { default as ValidationError } from './ValidationError.svelte';
93
+
94
+ // MenuItem
95
+ export { default as MenuItem } from './MenuItem/MenuItem.svelte';
96
+
97
+ // AvatarButton
98
+ export { default as AvatarButton } from './AvatarButton/AvatarButton.svelte';
99
+
100
+ // NavItem
101
+ export { default as NavItem } from './NavItem/NavItem.svelte';
102
+
103
+ // CardAction
104
+ export { default as CardAction } from './CardAction/CardAction.svelte';
105
+
106
+ // SearchResultItem
107
+ export { default as SearchResultItem } from './SearchResultItem/SearchResultItem.svelte';
108
+
109
+ // LandingButton
110
+ export { default as LandingButton } from './LandingButton/LandingButton.svelte';
111
+
112
+ // SidebarToggle
113
+ export { default as SidebarToggle } from './SidebarToggle/SidebarToggle.svelte';
@@ -8,6 +8,7 @@
8
8
  import PasswordStrengthIndicator from "../inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte";
9
9
  import Input from "../../primitives/Input/Input.svelte";
10
10
  import Button from "../../primitives/Button/Button.svelte";
11
+ import CardAction from "../../primitives/CardAction/CardAction.svelte";
11
12
  import Checkbox from "../../primitives/Checkbox/Checkbox.svelte";
12
13
  import { typography } from '../../tokens/typography';
13
14
 
@@ -795,8 +796,7 @@
795
796
 
796
797
  <div class="space-y-3">
797
798
  {#each accounts as account}
798
- <Button
799
- variant="card"
799
+ <CardAction
800
800
  size="md"
801
801
  class="group"
802
802
  onclick={() => handleAccountSelectInternal(account)}
@@ -844,7 +844,7 @@
844
844
  />
845
845
  </svg>
846
846
  </div>
847
- </Button>
847
+ </CardAction>
848
848
  {/each}
849
849
  </div>
850
850
 
@@ -1 +1 @@
1
- {"version":3,"file":"SuperLogin.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/recipes/SuperLogin/SuperLogin.svelte.js"],"names":[],"mappings":";;;;;AAo+BA;iBAp7BkC,MAAM;cAAY,MAAM;cAAY,MAAM;kBAAgB,MAAM;kBAAgB,OAAO;gBAAc,MAAM;gBAAc,MAAM;iBAAe,MAAM;0BAAwB,MAAM;wBAAsB,MAAM;aAAW,MAAM;;;;;yBAAoI,OAAO;mBAAiB,MAAM;WAo7B1W;wBAp7BtC;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,WAAW;IAAC,eAAe,CAAC,WAAW;IAAC,UAAU,CAAC,WAAW;IAAC,kBAAkB,CAAC,WAAW;IAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE"}
1
+ {"version":3,"file":"SuperLogin.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/recipes/SuperLogin/SuperLogin.svelte.js"],"names":[],"mappings":";;;;;AAs+BA;iBAp7BkC,MAAM;cAAY,MAAM;cAAY,MAAM;kBAAgB,MAAM;kBAAgB,OAAO;gBAAc,MAAM;gBAAc,MAAM;iBAAe,MAAM;0BAAwB,MAAM;wBAAsB,MAAM;aAAW,MAAM;;;;;yBAAoI,OAAO;mBAAiB,MAAM;WAo7B1W;wBAp7BtC;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,WAAW;IAAC,eAAe,CAAC,WAAW;IAAC,UAAU,CAAC,WAAW;IAAC,kBAAkB,CAAC,WAAW;IAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE"}
@@ -4,5 +4,4 @@ export { default as PasswordInput } from "./PasswordInput.svelte";
4
4
  export { default as PasswordStrengthIndicator } from "./PasswordStrengthIndicator/PasswordStrengthIndicator.svelte";
5
5
  export { default as PlaceAutocomplete } from "./PlaceAutocomplete/PlaceAutocomplete.svelte";
6
6
  export { default as Search } from "./Search.svelte";
7
- export { default as SelectDropdown } from "./SelectDropdown.svelte";
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -5,4 +5,3 @@ export { default as PasswordInput } from './PasswordInput.svelte';
5
5
  export { default as PasswordStrengthIndicator } from './PasswordStrengthIndicator/PasswordStrengthIndicator.svelte';
6
6
  export { default as PlaceAutocomplete } from './PlaceAutocomplete/PlaceAutocomplete.svelte';
7
7
  export { default as Search } from './Search.svelte';
8
- export { default as SelectDropdown } from './SelectDropdown.svelte';
@@ -7,7 +7,7 @@ function setupTest(args = {}) {
7
7
  const user = userEvent.setup();
8
8
  const { component } = render(AlertModal, {
9
9
  props: {
10
- show: true,
10
+ open: true,
11
11
  title: "Test Alert",
12
12
  message: "This is a test message",
13
13
  ...args,
@@ -26,7 +26,7 @@ describe("AlertModal Component Tests", () => {
26
26
  // Use getAllByText/queryAllByText and check length or first element
27
27
 
28
28
  test("Does not render when show is false", () => {
29
- render(AlertModal, { props: { show: false } });
29
+ render(AlertModal, { props: { open: false } });
30
30
  expect(screen.queryByText("Test Alert")).not.toBeInTheDocument();
31
31
  });
32
32
 
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * @example
9
9
  * <AlertModal
10
- * bind:show={showAlert}
10
+ * bind:open={showAlert}
11
11
  * variant="success"
12
12
  * title="Changes saved"
13
13
  * message="Your changes have been saved successfully."
@@ -21,7 +21,7 @@
21
21
 
22
22
  let {
23
23
  /** Whether the modal is visible */
24
- show = $bindable(false),
24
+ open = $bindable(false),
25
25
  /** Alert variant */
26
26
  variant = 'info',
27
27
  /** Alert title */
@@ -33,7 +33,7 @@
33
33
  /** Auto-close delay in milliseconds (0 to disable) */
34
34
  autoClose = 0,
35
35
  /** Modal size */
36
- size = 'small',
36
+ size = 'sm',
37
37
  /** Callbacks */
38
38
  onclose,
39
39
  onconfirm,
@@ -66,7 +66,7 @@
66
66
  let styles = $derived(variantStyles[variant] || variantStyles.info);
67
67
 
68
68
  function closeModal() {
69
- show = false;
69
+ open = false;
70
70
  onclose?.();
71
71
  }
72
72
 
@@ -77,7 +77,7 @@
77
77
 
78
78
  // Start auto-close timer when modal opens
79
79
  $effect(() => {
80
- if (show && autoClose > 0) {
80
+ if (open && autoClose > 0) {
81
81
  const timer = setTimeout(() => {
82
82
  closeModal();
83
83
  }, autoClose);
@@ -86,7 +86,7 @@
86
86
  });
87
87
  </script>
88
88
 
89
- <Modal bind:show {size}>
89
+ <Modal bind:open {size}>
90
90
  {#snippet header()}
91
91
  <div class="text-center">
92
92
  <div class="flex justify-center items-center">
@@ -4,7 +4,7 @@ type AlertModal = {
4
4
  $set?(props: Partial<$$ComponentProps>): void;
5
5
  };
6
6
  declare const AlertModal: import("svelte").Component<{
7
- show?: boolean;
7
+ open?: boolean;
8
8
  variant?: string;
9
9
  title?: string;
10
10
  message?: string;
@@ -13,9 +13,9 @@ declare const AlertModal: import("svelte").Component<{
13
13
  size?: string;
14
14
  onclose: any;
15
15
  onconfirm: any;
16
- }, {}, "show">;
16
+ }, {}, "open">;
17
17
  type $$ComponentProps = {
18
- show?: boolean;
18
+ open?: boolean;
19
19
  variant?: string;
20
20
  title?: string;
21
21
  message?: string;
@@ -12,7 +12,7 @@ function setupTest(args = {}) {
12
12
  const user = userEvent.setup();
13
13
  const { component } = render(ConfirmationModal, {
14
14
  props: {
15
- show: true,
15
+ open: true,
16
16
  title: "Test Modal",
17
17
  description: "This is a test description",
18
18
  actions: defaultActions.map((a) => ({ ...a, onClick: vi.fn() })),
@@ -28,7 +28,7 @@ describe("ConfirmationModal Component Tests", () => {
28
28
  // Use getAllByText/queryAllByText and check length or first element
29
29
 
30
30
  test("Does not render when show is false", () => {
31
- render(ConfirmationModal, { props: { show: false } });
31
+ render(ConfirmationModal, { props: { open: false } });
32
32
  expect(screen.queryByText("Test Modal")).not.toBeInTheDocument();
33
33
  });
34
34
 
@@ -6,8 +6,8 @@
6
6
  import { triggerHaptic } from '../../utils/haptic.js';
7
7
 
8
8
  let {
9
- show = $bindable(false),
10
- size = "default",
9
+ open = $bindable(false),
10
+ size = "md",
11
11
  title = "",
12
12
  description = "",
13
13
  warningText = "",
@@ -66,13 +66,13 @@
66
66
  }
67
67
 
68
68
  action.onClick?.();
69
- show = false;
69
+ open = false;
70
70
  };
71
71
 
72
72
  const handleClose = () => {
73
73
  if (disabled || loading) return;
74
74
  onclose?.();
75
- show = false;
75
+ open = false;
76
76
  };
77
77
 
78
78
  const getVariant = (action) => {
@@ -107,7 +107,7 @@
107
107
  };
108
108
  </script>
109
109
 
110
- <Modal bind:show {size} oncancel={handleClose} {...restProps}>
110
+ <Modal bind:open {size} oncancel={handleClose} {...restProps}>
111
111
  {#snippet header()}
112
112
  <div>
113
113
  {#if closeBtn}
@@ -4,7 +4,7 @@ type ConfirmationModal = {
4
4
  $set?(props: Partial<$$ComponentProps>): void;
5
5
  };
6
6
  declare const ConfirmationModal: import("svelte").Component<{
7
- show?: boolean;
7
+ open?: boolean;
8
8
  size?: string;
9
9
  title?: string;
10
10
  description?: string;
@@ -22,9 +22,9 @@ declare const ConfirmationModal: import("svelte").Component<{
22
22
  onconfirm: any;
23
23
  oncancel: any;
24
24
  onclose: any;
25
- } & Record<string, any>, {}, "show">;
25
+ } & Record<string, any>, {}, "open">;
26
26
  type $$ComponentProps = {
27
- show?: boolean;
27
+ open?: boolean;
28
28
  size?: string;
29
29
  title?: string;
30
30
  description?: string;
@@ -8,7 +8,7 @@ function setupTest(args = {}) {
8
8
  const user = userEvent.setup();
9
9
  const { component } = render(InputModal, {
10
10
  props: {
11
- show: true,
11
+ open: true,
12
12
  title: "Test Input Modal",
13
13
  ...args,
14
14
  },
@@ -27,7 +27,7 @@ describe("InputModal Component Tests", () => {
27
27
 
28
28
  // Basic rendering tests
29
29
  test("Does not render when show is false", () => {
30
- render(InputModal, { props: { show: false } });
30
+ render(InputModal, { props: { open: false } });
31
31
  expect(screen.queryByText("Test Input Modal")).not.toBeInTheDocument();
32
32
  });
33
33
 
@@ -6,8 +6,8 @@
6
6
  import { typography } from '../../tokens/typography';
7
7
 
8
8
  let {
9
- show = $bindable(false),
10
- size = "default", // "small" | "default" | "large"
9
+ open = $bindable(false),
10
+ size = "md", // "sm" | "md" | "lg" | "xl"
11
11
  title = "",
12
12
  description = "",
13
13
  closeBtn = false, // To show close button
@@ -68,7 +68,7 @@
68
68
  };
69
69
 
70
70
  const closeModal = () => {
71
- show = false;
71
+ open = false;
72
72
  onclose?.();
73
73
  };
74
74
 
@@ -78,7 +78,7 @@
78
78
  };
79
79
  </script>
80
80
 
81
- <Modal bind:show {size} {persistent}>
81
+ <Modal bind:open {size} {persistent}>
82
82
  {#snippet header()}
83
83
  <div class="text-left">
84
84
  {#if closeBtn}
@@ -4,7 +4,7 @@ type InputModal = {
4
4
  $set?(props: Partial<$$ComponentProps>): void;
5
5
  };
6
6
  declare const InputModal: import("svelte").Component<{
7
- show?: boolean;
7
+ open?: boolean;
8
8
  size?: string;
9
9
  title?: string;
10
10
  description?: string;
@@ -29,9 +29,9 @@ declare const InputModal: import("svelte").Component<{
29
29
  onconfirm: any;
30
30
  oncancel: any;
31
31
  onclose: any;
32
- }, {}, "show" | "inputValue">;
32
+ }, {}, "open" | "inputValue">;
33
33
  type $$ComponentProps = {
34
- show?: boolean;
34
+ open?: boolean;
35
35
  size?: string;
36
36
  title?: string;
37
37
  description?: string;