@aspect-ops/exon-ui 0.0.2 → 0.0.3

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 (177) hide show
  1. package/dist/components/ActionSheet/ActionSheet.svelte +270 -0
  2. package/dist/components/ActionSheet/ActionSheet.svelte.d.ts +12 -0
  3. package/dist/components/ActionSheet/ActionSheetItem.svelte +151 -0
  4. package/dist/components/ActionSheet/ActionSheetItem.svelte.d.ts +10 -0
  5. package/dist/components/ActionSheet/index.d.ts +3 -0
  6. package/dist/components/ActionSheet/index.js +2 -0
  7. package/dist/components/Alert/Alert.svelte +165 -0
  8. package/dist/components/Alert/Alert.svelte.d.ts +11 -0
  9. package/dist/components/Alert/index.d.ts +1 -0
  10. package/dist/components/Alert/index.js +1 -0
  11. package/dist/components/AspectRatio/AspectRatio.svelte +42 -0
  12. package/dist/components/AspectRatio/AspectRatio.svelte.d.ts +9 -0
  13. package/dist/components/AspectRatio/index.d.ts +1 -0
  14. package/dist/components/AspectRatio/index.js +1 -0
  15. package/dist/components/Avatar/Avatar.svelte +147 -0
  16. package/dist/components/Avatar/Avatar.svelte.d.ts +12 -0
  17. package/dist/components/Avatar/AvatarGroup.svelte +153 -0
  18. package/dist/components/Avatar/AvatarGroup.svelte.d.ts +12 -0
  19. package/dist/components/Avatar/index.d.ts +2 -0
  20. package/dist/components/Avatar/index.js +2 -0
  21. package/dist/components/BottomSheet/BottomSheet.svelte +230 -0
  22. package/dist/components/BottomSheet/BottomSheet.svelte.d.ts +7 -0
  23. package/dist/components/BottomSheet/BottomSheetBody.svelte +20 -0
  24. package/dist/components/BottomSheet/BottomSheetBody.svelte.d.ts +7 -0
  25. package/dist/components/BottomSheet/BottomSheetHeader.svelte +27 -0
  26. package/dist/components/BottomSheet/BottomSheetHeader.svelte.d.ts +7 -0
  27. package/dist/components/BottomSheet/index.d.ts +3 -0
  28. package/dist/components/BottomSheet/index.js +3 -0
  29. package/dist/components/Box/Box.svelte +41 -0
  30. package/dist/components/Box/Box.svelte.d.ts +7 -0
  31. package/dist/components/Box/index.d.ts +1 -0
  32. package/dist/components/Box/index.js +1 -0
  33. package/dist/components/Card/Card.svelte +95 -0
  34. package/dist/components/Card/Card.svelte.d.ts +10 -0
  35. package/dist/components/Card/CardBody.svelte +32 -0
  36. package/dist/components/Card/CardBody.svelte.d.ts +7 -0
  37. package/dist/components/Card/CardFooter.svelte +34 -0
  38. package/dist/components/Card/CardFooter.svelte.d.ts +7 -0
  39. package/dist/components/Card/CardHeader.svelte +67 -0
  40. package/dist/components/Card/CardHeader.svelte.d.ts +9 -0
  41. package/dist/components/Card/index.d.ts +4 -0
  42. package/dist/components/Card/index.js +4 -0
  43. package/dist/components/Center/Center.svelte +28 -0
  44. package/dist/components/Center/Center.svelte.d.ts +8 -0
  45. package/dist/components/Center/index.d.ts +1 -0
  46. package/dist/components/Center/index.js +1 -0
  47. package/dist/components/Container/Container.svelte +58 -0
  48. package/dist/components/Container/Container.svelte.d.ts +10 -0
  49. package/dist/components/Container/index.d.ts +1 -0
  50. package/dist/components/Container/index.js +1 -0
  51. package/dist/components/Divider/Divider.svelte +38 -0
  52. package/dist/components/Divider/Divider.svelte.d.ts +9 -0
  53. package/dist/components/Divider/index.d.ts +1 -0
  54. package/dist/components/Divider/index.js +1 -0
  55. package/dist/components/EmptyState/EmptyState.svelte +164 -0
  56. package/dist/components/EmptyState/EmptyState.svelte.d.ts +12 -0
  57. package/dist/components/EmptyState/index.d.ts +1 -0
  58. package/dist/components/EmptyState/index.js +1 -0
  59. package/dist/components/FAB/FAB.svelte +242 -0
  60. package/dist/components/FAB/FAB.svelte.d.ts +9 -0
  61. package/dist/components/FAB/FABGroup.svelte +449 -0
  62. package/dist/components/FAB/FABGroup.svelte.d.ts +9 -0
  63. package/dist/components/FAB/index.d.ts +3 -0
  64. package/dist/components/FAB/index.js +2 -0
  65. package/dist/components/Grid/Grid.svelte +136 -0
  66. package/dist/components/Grid/Grid.svelte.d.ts +12 -0
  67. package/dist/components/Grid/GridItem.svelte +21 -0
  68. package/dist/components/Grid/GridItem.svelte.d.ts +7 -0
  69. package/dist/components/Grid/index.d.ts +2 -0
  70. package/dist/components/Grid/index.js +2 -0
  71. package/dist/components/List/List.svelte +42 -0
  72. package/dist/components/List/List.svelte.d.ts +18 -0
  73. package/dist/components/List/ListItem.svelte +139 -0
  74. package/dist/components/List/ListItem.svelte.d.ts +36 -0
  75. package/dist/components/List/index.d.ts +2 -0
  76. package/dist/components/List/index.js +2 -0
  77. package/dist/components/Modal/Modal.svelte +204 -0
  78. package/dist/components/Modal/Modal.svelte.d.ts +7 -0
  79. package/dist/components/Modal/ModalBody.svelte +50 -0
  80. package/dist/components/Modal/ModalBody.svelte.d.ts +7 -0
  81. package/dist/components/Modal/ModalFooter.svelte +37 -0
  82. package/dist/components/Modal/ModalFooter.svelte.d.ts +7 -0
  83. package/dist/components/Modal/ModalHeader.svelte +73 -0
  84. package/dist/components/Modal/ModalHeader.svelte.d.ts +7 -0
  85. package/dist/components/Modal/index.d.ts +4 -0
  86. package/dist/components/Modal/index.js +4 -0
  87. package/dist/components/Popover/Popover.svelte +14 -0
  88. package/dist/components/Popover/Popover.svelte.d.ts +7 -0
  89. package/dist/components/Popover/PopoverContent.svelte +63 -0
  90. package/dist/components/Popover/PopoverContent.svelte.d.ts +7 -0
  91. package/dist/components/Popover/PopoverTrigger.svelte +14 -0
  92. package/dist/components/Popover/PopoverTrigger.svelte.d.ts +7 -0
  93. package/dist/components/Popover/index.d.ts +3 -0
  94. package/dist/components/Popover/index.js +3 -0
  95. package/dist/components/Progress/ProgressBar.svelte +86 -0
  96. package/dist/components/Progress/ProgressBar.svelte.d.ts +11 -0
  97. package/dist/components/Progress/ProgressCircle.svelte +134 -0
  98. package/dist/components/Progress/ProgressCircle.svelte.d.ts +12 -0
  99. package/dist/components/Progress/Spinner.svelte +68 -0
  100. package/dist/components/Progress/Spinner.svelte.d.ts +8 -0
  101. package/dist/components/Progress/index.d.ts +3 -0
  102. package/dist/components/Progress/index.js +3 -0
  103. package/dist/components/PullToRefresh/PullToRefresh.svelte +304 -0
  104. package/dist/components/PullToRefresh/PullToRefresh.svelte.d.ts +20 -0
  105. package/dist/components/PullToRefresh/index.d.ts +1 -0
  106. package/dist/components/PullToRefresh/index.js +1 -0
  107. package/dist/components/SafeArea/SafeArea.svelte +33 -0
  108. package/dist/components/SafeArea/SafeArea.svelte.d.ts +7 -0
  109. package/dist/components/Select/Select.svelte +55 -12
  110. package/dist/components/Skeleton/Skeleton.svelte +59 -0
  111. package/dist/components/Skeleton/Skeleton.svelte.d.ts +10 -0
  112. package/dist/components/Skeleton/index.d.ts +1 -0
  113. package/dist/components/Skeleton/index.js +1 -0
  114. package/dist/components/Spacer/Spacer.svelte +56 -0
  115. package/dist/components/Spacer/Spacer.svelte.d.ts +6 -0
  116. package/dist/components/Spacer/index.d.ts +1 -0
  117. package/dist/components/Spacer/index.js +1 -0
  118. package/dist/components/Stack/Stack.svelte +117 -0
  119. package/dist/components/Stack/Stack.svelte.d.ts +13 -0
  120. package/dist/components/Stack/index.d.ts +1 -0
  121. package/dist/components/Stack/index.js +1 -0
  122. package/dist/components/SwipeActions/SwipeAction.svelte +43 -0
  123. package/dist/components/SwipeActions/SwipeAction.svelte.d.ts +8 -0
  124. package/dist/components/SwipeActions/SwipeActions.svelte +193 -0
  125. package/dist/components/SwipeActions/SwipeActions.svelte.d.ts +9 -0
  126. package/dist/components/SwipeActions/index.d.ts +2 -0
  127. package/dist/components/SwipeActions/index.js +2 -0
  128. package/dist/components/Switch/Switch.svelte +29 -9
  129. package/dist/components/Table/Table.svelte +175 -0
  130. package/dist/components/Table/Table.svelte.d.ts +38 -0
  131. package/dist/components/Table/TableBody.svelte +26 -0
  132. package/dist/components/Table/TableBody.svelte.d.ts +13 -0
  133. package/dist/components/Table/TableCell.svelte +85 -0
  134. package/dist/components/Table/TableCell.svelte.d.ts +28 -0
  135. package/dist/components/Table/TableHead.svelte +36 -0
  136. package/dist/components/Table/TableHead.svelte.d.ts +13 -0
  137. package/dist/components/Table/TableHeader.svelte +217 -0
  138. package/dist/components/Table/TableHeader.svelte.d.ts +32 -0
  139. package/dist/components/Table/TableRow.svelte +92 -0
  140. package/dist/components/Table/TableRow.svelte.d.ts +28 -0
  141. package/dist/components/Table/index.d.ts +6 -0
  142. package/dist/components/Table/index.js +6 -0
  143. package/dist/components/Tag/Tag.svelte +189 -0
  144. package/dist/components/Tag/Tag.svelte.d.ts +13 -0
  145. package/dist/components/Tag/index.d.ts +1 -0
  146. package/dist/components/Tag/index.js +1 -0
  147. package/dist/components/Toast/Toast.svelte +241 -0
  148. package/dist/components/Toast/Toast.svelte.d.ts +18 -0
  149. package/dist/components/Toast/ToastContainer.svelte +110 -0
  150. package/dist/components/Toast/ToastContainer.svelte.d.ts +8 -0
  151. package/dist/components/Toast/index.d.ts +3 -0
  152. package/dist/components/Toast/index.js +3 -0
  153. package/dist/components/Toast/toast.d.ts +13 -0
  154. package/dist/components/Toast/toast.js +55 -0
  155. package/dist/components/Tooltip/Tooltip.svelte +71 -0
  156. package/dist/components/Tooltip/Tooltip.svelte.d.ts +7 -0
  157. package/dist/components/Tooltip/index.d.ts +2 -0
  158. package/dist/components/Tooltip/index.js +1 -0
  159. package/dist/index.d.ts +29 -1
  160. package/dist/index.js +32 -0
  161. package/dist/styles/tokens.css +5 -0
  162. package/dist/types/data-display.d.ts +93 -0
  163. package/dist/types/data-display.js +1 -0
  164. package/dist/types/feedback.d.ts +92 -0
  165. package/dist/types/feedback.js +1 -0
  166. package/dist/types/index.d.ts +4 -0
  167. package/dist/types/layout.d.ts +57 -0
  168. package/dist/types/layout.js +1 -0
  169. package/dist/types/mobile.d.ts +91 -0
  170. package/dist/types/mobile.js +1 -0
  171. package/dist/utils/gestures.d.ts +219 -0
  172. package/dist/utils/gestures.js +492 -0
  173. package/dist/utils/haptics.d.ts +89 -0
  174. package/dist/utils/haptics.js +198 -0
  175. package/dist/utils/platform.d.ts +47 -0
  176. package/dist/utils/platform.js +156 -0
  177. package/package.json +1 -1
@@ -0,0 +1,270 @@
1
+ <script lang="ts">
2
+ import type { ActionSheetProps } from '../../types/index.js';
3
+ import { Dialog } from 'bits-ui';
4
+
5
+ interface Props extends ActionSheetProps {
6
+ /** Bindable open state */
7
+ open?: boolean;
8
+ /** Slot for ActionSheetItem children */
9
+ actions?: import('svelte').Snippet;
10
+ /** Default slot for custom content */
11
+ children?: import('svelte').Snippet;
12
+ }
13
+
14
+ let {
15
+ open = $bindable(false),
16
+ title,
17
+ description,
18
+ cancelLabel = 'Cancel',
19
+ showCancel = true,
20
+ closeOnSelect = true,
21
+ class: className = '',
22
+ actions,
23
+ children
24
+ }: Props = $props();
25
+
26
+ function handleOpenChange(value: boolean) {
27
+ open = value;
28
+ }
29
+
30
+ function handleBackdropClick() {
31
+ open = false;
32
+ }
33
+
34
+ function handleCancel() {
35
+ open = false;
36
+ }
37
+
38
+ // Provide context for ActionSheetItem to access closeOnSelect
39
+ import { setContext } from 'svelte';
40
+
41
+ setContext('actionsheet', {
42
+ get closeOnSelect() {
43
+ return closeOnSelect;
44
+ },
45
+ close: () => {
46
+ open = false;
47
+ }
48
+ });
49
+ </script>
50
+
51
+ <Dialog.Root {open} onOpenChange={handleOpenChange}>
52
+ <Dialog.Portal>
53
+ <Dialog.Overlay class="actionsheet-overlay" onclick={handleBackdropClick} />
54
+ <Dialog.Content
55
+ class="actionsheet-content {className}"
56
+ aria-labelledby={title ? 'actionsheet-title' : undefined}
57
+ >
58
+ <!-- Header section (optional) -->
59
+ {#if title || description}
60
+ <div class="actionsheet-header">
61
+ {#if title}
62
+ <Dialog.Title id="actionsheet-title" class="actionsheet-title">{title}</Dialog.Title>
63
+ {/if}
64
+ {#if description}
65
+ <Dialog.Description class="actionsheet-description">{description}</Dialog.Description>
66
+ {/if}
67
+ </div>
68
+ {/if}
69
+
70
+ <!-- Actions section -->
71
+ <div class="actionsheet-actions" role="group">
72
+ {#if actions}
73
+ {@render actions()}
74
+ {/if}
75
+ {#if children}
76
+ {@render children()}
77
+ {/if}
78
+ </div>
79
+
80
+ <!-- Cancel button (separated) -->
81
+ {#if showCancel}
82
+ <div class="actionsheet-cancel-container">
83
+ <button
84
+ type="button"
85
+ class="actionsheet-cancel"
86
+ onclick={handleCancel}
87
+ aria-label="Cancel"
88
+ >
89
+ {cancelLabel}
90
+ </button>
91
+ </div>
92
+ {/if}
93
+ </Dialog.Content>
94
+ </Dialog.Portal>
95
+ </Dialog.Root>
96
+
97
+ <style>
98
+ /* Overlay */
99
+ :global(.actionsheet-overlay) {
100
+ position: fixed;
101
+ inset: 0;
102
+ background: rgba(0, 0, 0, 0.4);
103
+ z-index: 100;
104
+ }
105
+
106
+ :global(.actionsheet-overlay[data-state='open']) {
107
+ animation: actionsheet-fade-in 200ms ease-out;
108
+ }
109
+
110
+ :global(.actionsheet-overlay[data-state='closed']) {
111
+ animation: actionsheet-fade-out 150ms ease-in;
112
+ }
113
+
114
+ @keyframes -global-actionsheet-fade-in {
115
+ from {
116
+ opacity: 0;
117
+ }
118
+ to {
119
+ opacity: 1;
120
+ }
121
+ }
122
+
123
+ @keyframes -global-actionsheet-fade-out {
124
+ from {
125
+ opacity: 1;
126
+ }
127
+ to {
128
+ opacity: 0;
129
+ }
130
+ }
131
+
132
+ /* Content */
133
+ :global(.actionsheet-content) {
134
+ /* F33: Must set font-family explicitly - portal doesn't inherit */
135
+ font-family: var(--font-family, system-ui, -apple-system, sans-serif);
136
+ position: fixed;
137
+ bottom: 0;
138
+ left: 0;
139
+ right: 0;
140
+ z-index: 101;
141
+ display: flex;
142
+ flex-direction: column;
143
+ max-height: 90vh;
144
+ padding: var(--space-sm, 0.5rem);
145
+ padding-bottom: calc(var(--space-sm, 0.5rem) + env(safe-area-inset-bottom, 0px));
146
+ }
147
+
148
+ :global(.actionsheet-content[data-state='open']) {
149
+ animation: actionsheet-slide-up 250ms cubic-bezier(0.32, 0.72, 0, 1);
150
+ }
151
+
152
+ :global(.actionsheet-content[data-state='closed']) {
153
+ animation: actionsheet-slide-down 200ms cubic-bezier(0.32, 0.72, 0, 1);
154
+ }
155
+
156
+ @keyframes -global-actionsheet-slide-up {
157
+ from {
158
+ opacity: 0;
159
+ transform: translateY(100%);
160
+ }
161
+ to {
162
+ opacity: 1;
163
+ transform: translateY(0);
164
+ }
165
+ }
166
+
167
+ @keyframes -global-actionsheet-slide-down {
168
+ from {
169
+ opacity: 1;
170
+ transform: translateY(0);
171
+ }
172
+ to {
173
+ opacity: 0;
174
+ transform: translateY(100%);
175
+ }
176
+ }
177
+
178
+ /* Header */
179
+ :global(.actionsheet-header) {
180
+ text-align: center;
181
+ padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
182
+ background: var(--color-bg, #ffffff);
183
+ border-radius: var(--radius-lg, 0.75rem) var(--radius-lg, 0.75rem) 0 0;
184
+ border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
185
+ }
186
+
187
+ :global(.actionsheet-title) {
188
+ margin: 0;
189
+ font-size: var(--text-sm, 0.875rem);
190
+ font-weight: 600;
191
+ color: var(--color-text-secondary, #6b7280);
192
+ }
193
+
194
+ :global(.actionsheet-description) {
195
+ margin: var(--space-xs, 0.25rem) 0 0;
196
+ font-size: var(--text-xs, 0.75rem);
197
+ color: var(--color-text-muted, #9ca3af);
198
+ }
199
+
200
+ /* Actions container */
201
+ :global(.actionsheet-actions) {
202
+ display: flex;
203
+ flex-direction: column;
204
+ background: var(--color-bg, #ffffff);
205
+ border-radius: var(--radius-lg, 0.75rem);
206
+ overflow: hidden;
207
+ }
208
+
209
+ /* When there's a header, remove top border radius from actions */
210
+ :global(.actionsheet-header + .actionsheet-actions) {
211
+ border-radius: 0 0 var(--radius-lg, 0.75rem) var(--radius-lg, 0.75rem);
212
+ }
213
+
214
+ /* Cancel button container */
215
+ :global(.actionsheet-cancel-container) {
216
+ margin-top: var(--space-sm, 0.5rem);
217
+ }
218
+
219
+ /* Cancel button - iOS style */
220
+ :global(.actionsheet-cancel) {
221
+ /* F33: Font inheritance for portal */
222
+ font-family: var(--font-family, system-ui, -apple-system, sans-serif);
223
+ width: 100%;
224
+ /* F20: Minimum touch target */
225
+ min-height: 56px;
226
+ padding: var(--space-md, 1rem);
227
+ border: none;
228
+ border-radius: var(--radius-lg, 0.75rem);
229
+ background: var(--color-bg, #ffffff);
230
+ color: var(--color-primary, #3b82f6);
231
+ font-size: var(--text-lg, 1.125rem);
232
+ font-weight: 600;
233
+ cursor: pointer;
234
+ transition: background-color var(--transition-fast, 150ms ease);
235
+ -webkit-tap-highlight-color: transparent;
236
+ }
237
+
238
+ :global(.actionsheet-cancel:hover) {
239
+ background: var(--color-bg-hover, #f9fafb);
240
+ }
241
+
242
+ :global(.actionsheet-cancel:active) {
243
+ background: var(--color-bg-active, #f3f4f6);
244
+ }
245
+
246
+ :global(.actionsheet-cancel:focus-visible) {
247
+ outline: 2px solid var(--color-primary, #3b82f6);
248
+ outline-offset: 2px;
249
+ }
250
+
251
+ /* Platform-specific styling */
252
+ :global([data-platform='ios']) :global(.actionsheet-content) {
253
+ padding: var(--space-sm, 0.5rem);
254
+ }
255
+
256
+ :global([data-platform='android']) :global(.actionsheet-content) {
257
+ padding: 0;
258
+ padding-bottom: env(safe-area-inset-bottom, 0px);
259
+ }
260
+
261
+ :global([data-platform='android']) :global(.actionsheet-actions),
262
+ :global([data-platform='android']) :global(.actionsheet-cancel) {
263
+ border-radius: 0;
264
+ }
265
+
266
+ :global([data-platform='android']) :global(.actionsheet-cancel-container) {
267
+ margin-top: 0;
268
+ border-top: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
269
+ }
270
+ </style>
@@ -0,0 +1,12 @@
1
+ import type { ActionSheetProps } from '../../types/index.js';
2
+ interface Props extends ActionSheetProps {
3
+ /** Bindable open state */
4
+ open?: boolean;
5
+ /** Slot for ActionSheetItem children */
6
+ actions?: import('svelte').Snippet;
7
+ /** Default slot for custom content */
8
+ children?: import('svelte').Snippet;
9
+ }
10
+ declare const ActionSheet: import("svelte").Component<Props, {}, "open">;
11
+ type ActionSheet = ReturnType<typeof ActionSheet>;
12
+ export default ActionSheet;
@@ -0,0 +1,151 @@
1
+ <script lang="ts">
2
+ import type { ActionSheetItemProps } from '../../types/index.js';
3
+ import { getContext } from 'svelte';
4
+ import Icon from '../Icon/Icon.svelte';
5
+
6
+ interface Props extends ActionSheetItemProps {
7
+ /** Click handler */
8
+ onclick?: (e: MouseEvent) => void;
9
+ /** Button content */
10
+ children?: import('svelte').Snippet;
11
+ }
12
+
13
+ let {
14
+ destructive = false,
15
+ disabled = false,
16
+ icon,
17
+ class: className = '',
18
+ onclick,
19
+ children
20
+ }: Props = $props();
21
+
22
+ // Get context from parent ActionSheet
23
+ const actionsheet = getContext<{
24
+ closeOnSelect: boolean;
25
+ close: () => void;
26
+ }>('actionsheet');
27
+
28
+ function handleClick(e: MouseEvent) {
29
+ if (disabled) return;
30
+
31
+ onclick?.(e);
32
+
33
+ // Close action sheet if closeOnSelect is enabled
34
+ if (actionsheet?.closeOnSelect) {
35
+ actionsheet.close();
36
+ }
37
+ }
38
+ </script>
39
+
40
+ <button
41
+ type="button"
42
+ class="actionsheet-item {destructive ? 'actionsheet-item--destructive' : ''} {disabled
43
+ ? 'actionsheet-item--disabled'
44
+ : ''} {className}"
45
+ {disabled}
46
+ aria-disabled={disabled}
47
+ onclick={handleClick}
48
+ >
49
+ {#if icon}
50
+ <span class="actionsheet-item__icon">
51
+ <Icon name={icon} size="md" />
52
+ </span>
53
+ {/if}
54
+ <span class="actionsheet-item__label">
55
+ {#if children}
56
+ {@render children()}
57
+ {/if}
58
+ </span>
59
+ </button>
60
+
61
+ <style>
62
+ .actionsheet-item {
63
+ /* F33: Font inheritance for portal */
64
+ font-family: var(--font-family, system-ui, -apple-system, sans-serif);
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ gap: var(--space-sm, 0.5rem);
69
+ width: 100%;
70
+ /* F20: Minimum 48px touch target */
71
+ min-height: 48px;
72
+ padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
73
+ border: none;
74
+ background: transparent;
75
+ color: var(--color-primary, #3b82f6);
76
+ font-size: var(--text-lg, 1.125rem);
77
+ font-weight: 400;
78
+ text-align: center;
79
+ cursor: pointer;
80
+ transition: background-color var(--transition-fast, 150ms ease);
81
+ -webkit-tap-highlight-color: transparent;
82
+ }
83
+
84
+ /* Divider between items */
85
+ .actionsheet-item:not(:last-child) {
86
+ border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
87
+ }
88
+
89
+ /* Hover state */
90
+ .actionsheet-item:hover:not(:disabled) {
91
+ background: var(--color-bg-hover, rgba(0, 0, 0, 0.04));
92
+ }
93
+
94
+ /* Active/pressed state */
95
+ .actionsheet-item:active:not(:disabled) {
96
+ background: var(--color-bg-active, rgba(0, 0, 0, 0.08));
97
+ }
98
+
99
+ /* Focus state - F15 accessibility */
100
+ .actionsheet-item:focus-visible {
101
+ outline: 2px solid var(--color-primary, #3b82f6);
102
+ outline-offset: -2px;
103
+ z-index: 1;
104
+ }
105
+
106
+ /* Destructive variant */
107
+ .actionsheet-item--destructive {
108
+ color: var(--color-error, #ef4444);
109
+ }
110
+
111
+ .actionsheet-item--destructive:focus-visible {
112
+ outline-color: var(--color-error, #ef4444);
113
+ }
114
+
115
+ /* Disabled state */
116
+ .actionsheet-item--disabled,
117
+ .actionsheet-item:disabled {
118
+ opacity: 0.5;
119
+ cursor: not-allowed;
120
+ pointer-events: none;
121
+ }
122
+
123
+ /* Icon */
124
+ .actionsheet-item__icon {
125
+ display: flex;
126
+ align-items: center;
127
+ justify-content: center;
128
+ flex-shrink: 0;
129
+ }
130
+
131
+ /* Label */
132
+ .actionsheet-item__label {
133
+ flex: 1;
134
+ text-align: center;
135
+ }
136
+
137
+ /* When icon present, left-align content */
138
+ .actionsheet-item__icon + .actionsheet-item__label {
139
+ text-align: left;
140
+ }
141
+
142
+ /* Platform-specific styling */
143
+ :global([data-platform='android']) .actionsheet-item {
144
+ justify-content: flex-start;
145
+ font-weight: 500;
146
+ }
147
+
148
+ :global([data-platform='android']) .actionsheet-item__label {
149
+ text-align: left;
150
+ }
151
+ </style>
@@ -0,0 +1,10 @@
1
+ import type { ActionSheetItemProps } from '../../types/index.js';
2
+ interface Props extends ActionSheetItemProps {
3
+ /** Click handler */
4
+ onclick?: (e: MouseEvent) => void;
5
+ /** Button content */
6
+ children?: import('svelte').Snippet;
7
+ }
8
+ declare const ActionSheetItem: import("svelte").Component<Props, {}, "">;
9
+ type ActionSheetItem = ReturnType<typeof ActionSheetItem>;
10
+ export default ActionSheetItem;
@@ -0,0 +1,3 @@
1
+ export { default as ActionSheet } from './ActionSheet.svelte';
2
+ export { default as ActionSheetItem } from './ActionSheetItem.svelte';
3
+ export type { ActionSheetAction, ActionSheetProps, ActionSheetItemProps } from '../../types/index.js';
@@ -0,0 +1,2 @@
1
+ export { default as ActionSheet } from './ActionSheet.svelte';
2
+ export { default as ActionSheetItem } from './ActionSheetItem.svelte';
@@ -0,0 +1,165 @@
1
+ <script lang="ts">
2
+ import type { AlertVariant } from '../../types/index.js';
3
+
4
+ interface Props {
5
+ variant?: AlertVariant;
6
+ dismissible?: boolean;
7
+ icon?: string;
8
+ class?: string;
9
+ children?: import('svelte').Snippet;
10
+ }
11
+
12
+ let {
13
+ variant = 'info',
14
+ dismissible = false,
15
+ icon,
16
+ class: className = '',
17
+ children
18
+ }: Props = $props();
19
+
20
+ let dismissed = $state(false);
21
+
22
+ function handleDismiss() {
23
+ dismissed = true;
24
+ }
25
+ </script>
26
+
27
+ {#if !dismissed}
28
+ <div class="alert alert--{variant} {className}" role="alert">
29
+ <div class="alert__content">
30
+ {#if icon}
31
+ <span class="alert__icon" aria-hidden="true">{icon}</span>
32
+ {/if}
33
+ <div class="alert__message">
34
+ {#if children}
35
+ {@render children()}
36
+ {/if}
37
+ </div>
38
+ </div>
39
+ {#if dismissible}
40
+ <button type="button" class="alert__close" onclick={handleDismiss} aria-label="Dismiss alert">
41
+ ×
42
+ </button>
43
+ {/if}
44
+ </div>
45
+ {/if}
46
+
47
+ <style>
48
+ .alert {
49
+ position: relative;
50
+ display: flex;
51
+ align-items: flex-start;
52
+ justify-content: space-between;
53
+ padding: var(--space-md, 1rem);
54
+ border-radius: var(--radius-md, 0.375rem);
55
+ border-left: 0.25rem solid;
56
+ font-family: inherit;
57
+ font-size: var(--text-sm, 0.875rem);
58
+ line-height: 1.5;
59
+ }
60
+
61
+ .alert__content {
62
+ display: flex;
63
+ align-items: flex-start;
64
+ gap: var(--space-sm, 0.5rem);
65
+ flex: 1;
66
+ }
67
+
68
+ .alert__icon {
69
+ flex-shrink: 0;
70
+ font-size: var(--text-lg, 1.125rem);
71
+ line-height: 1;
72
+ }
73
+
74
+ .alert__message {
75
+ flex: 1;
76
+ }
77
+
78
+ .alert__close {
79
+ flex-shrink: 0;
80
+ display: flex;
81
+ align-items: center;
82
+ justify-content: center;
83
+ width: 2.75rem;
84
+ height: 2.75rem;
85
+ margin: -0.5rem -0.5rem -0.5rem 0.5rem;
86
+ padding: 0;
87
+ border: none;
88
+ border-radius: var(--radius-sm, 0.25rem);
89
+ background: transparent;
90
+ font-family: inherit;
91
+ font-size: 1.5rem;
92
+ line-height: 1;
93
+ cursor: pointer;
94
+ transition: background-color 0.2s ease;
95
+ }
96
+
97
+ .alert__close:hover {
98
+ background-color: rgba(0, 0, 0, 0.05);
99
+ }
100
+
101
+ .alert__close:focus-visible {
102
+ outline: 2px solid currentColor;
103
+ outline-offset: 2px;
104
+ }
105
+
106
+ /* Info variant */
107
+ .alert--info {
108
+ background-color: var(--color-info-bg, #eff6ff);
109
+ border-left-color: var(--color-info-border, #3b82f6);
110
+ color: var(--color-info, #3b82f6);
111
+ }
112
+
113
+ .alert--info .alert__message {
114
+ color: var(--color-text, #1f2937);
115
+ }
116
+
117
+ .alert--info .alert__close {
118
+ color: var(--color-info, #3b82f6);
119
+ }
120
+
121
+ /* Success variant */
122
+ .alert--success {
123
+ background-color: var(--color-success-bg, #ecfdf5);
124
+ border-left-color: var(--color-success-border, #10b981);
125
+ color: var(--color-success, #10b981);
126
+ }
127
+
128
+ .alert--success .alert__message {
129
+ color: var(--color-text, #1f2937);
130
+ }
131
+
132
+ .alert--success .alert__close {
133
+ color: var(--color-success, #10b981);
134
+ }
135
+
136
+ /* Warning variant */
137
+ .alert--warning {
138
+ background-color: var(--color-warning-bg, #fffbeb);
139
+ border-left-color: var(--color-warning-border, #f59e0b);
140
+ color: var(--color-warning, #f59e0b);
141
+ }
142
+
143
+ .alert--warning .alert__message {
144
+ color: var(--color-text, #1f2937);
145
+ }
146
+
147
+ .alert--warning .alert__close {
148
+ color: var(--color-warning, #f59e0b);
149
+ }
150
+
151
+ /* Error variant */
152
+ .alert--error {
153
+ background-color: var(--color-error-bg, #fef2f2);
154
+ border-left-color: var(--color-error-border, #ef4444);
155
+ color: var(--color-error, #ef4444);
156
+ }
157
+
158
+ .alert--error .alert__message {
159
+ color: var(--color-text, #1f2937);
160
+ }
161
+
162
+ .alert--error .alert__close {
163
+ color: var(--color-error, #ef4444);
164
+ }
165
+ </style>
@@ -0,0 +1,11 @@
1
+ import type { AlertVariant } from '../../types/index.js';
2
+ interface Props {
3
+ variant?: AlertVariant;
4
+ dismissible?: boolean;
5
+ icon?: string;
6
+ class?: string;
7
+ children?: import('svelte').Snippet;
8
+ }
9
+ declare const Alert: import("svelte").Component<Props, {}, "">;
10
+ type Alert = ReturnType<typeof Alert>;
11
+ export default Alert;
@@ -0,0 +1 @@
1
+ export { default as Alert } from './Alert.svelte';
@@ -0,0 +1 @@
1
+ export { default as Alert } from './Alert.svelte';
@@ -0,0 +1,42 @@
1
+ <script lang="ts">
2
+ import type { AspectRatioPreset } from '../../types/index.js';
3
+
4
+ interface Props {
5
+ ratio?: number | AspectRatioPreset;
6
+ class?: string;
7
+ children?: import('svelte').Snippet;
8
+ }
9
+
10
+ let { ratio = 16 / 9, class: className = '', children }: Props = $props();
11
+
12
+ function parseRatio(r: number | AspectRatioPreset): number {
13
+ if (typeof r === 'number') return r;
14
+ const [w, h] = r.split(':').map(Number);
15
+ return w / h;
16
+ }
17
+
18
+ const computedRatio = $derived(parseRatio(ratio));
19
+ </script>
20
+
21
+ <div class="aspect-ratio {className}" style="aspect-ratio: {computedRatio}">
22
+ {#if children}
23
+ {@render children()}
24
+ {/if}
25
+ </div>
26
+
27
+ <style>
28
+ .aspect-ratio {
29
+ position: relative;
30
+ width: 100%;
31
+ font-family: inherit;
32
+ }
33
+
34
+ .aspect-ratio > :global(*) {
35
+ position: absolute;
36
+ top: 0;
37
+ left: 0;
38
+ width: 100%;
39
+ height: 100%;
40
+ object-fit: cover;
41
+ }
42
+ </style>
@@ -0,0 +1,9 @@
1
+ import type { AspectRatioPreset } from '../../types/index.js';
2
+ interface Props {
3
+ ratio?: number | AspectRatioPreset;
4
+ class?: string;
5
+ children?: import('svelte').Snippet;
6
+ }
7
+ declare const AspectRatio: import("svelte").Component<Props, {}, "">;
8
+ type AspectRatio = ReturnType<typeof AspectRatio>;
9
+ export default AspectRatio;
@@ -0,0 +1 @@
1
+ export { default as AspectRatio } from './AspectRatio.svelte';
@@ -0,0 +1 @@
1
+ export { default as AspectRatio } from './AspectRatio.svelte';