@umituz/react-native-design-system 2.6.62 → 2.6.64
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/package.json +1 -1
- package/src/atoms/AtomicIcon.tsx +2 -6
- package/src/atoms/AtomicIcon.types.ts +5 -0
- package/src/atoms/AtomicInput.tsx +34 -154
- package/src/atoms/AtomicPicker.tsx +31 -123
- package/src/atoms/index.ts +6 -4
- package/src/atoms/input/components/InputHelper.tsx +49 -0
- package/src/atoms/input/components/InputIcon.tsx +44 -0
- package/src/atoms/input/components/InputLabel.tsx +20 -0
- package/src/atoms/input/styles/inputStylesHelper.ts +1 -1
- package/src/atoms/input/types.ts +72 -0
- package/src/atoms/picker/hooks/usePickerState.ts +139 -0
- package/src/exports/atoms.ts +69 -0
- package/src/exports/device.ts +58 -0
- package/src/exports/layouts.ts +19 -0
- package/src/exports/molecules.ts +166 -0
- package/src/exports/organisms.ts +9 -0
- package/src/exports/responsive.ts +36 -0
- package/src/exports/safe-area.ts +6 -0
- package/src/exports/theme.ts +47 -0
- package/src/exports/typography.ts +22 -0
- package/src/exports/utilities.ts +6 -0
- package/src/exports/variants.ts +22 -0
- package/src/index.ts +11 -417
- package/src/molecules/avatar/Avatar.constants.ts +103 -0
- package/src/molecules/avatar/Avatar.types.ts +64 -0
- package/src/molecules/avatar/Avatar.utils.ts +8 -160
- package/src/molecules/calendar/index.ts +4 -9
- package/src/molecules/calendar/infrastructure/storage/CalendarStore.ts +103 -302
- package/src/molecules/calendar/infrastructure/storage/CalendarStore.ts.bak +116 -0
- package/src/molecules/calendar/infrastructure/storage/CalendarStore.types.ts +64 -0
- package/src/molecules/calendar/infrastructure/storage/CalendarStore.utils.ts +56 -0
- package/src/molecules/calendar/infrastructure/storage/EventActions.ts +140 -0
- package/src/molecules/calendar/infrastructure/storage/NavigationActions.ts +118 -0
- package/src/molecules/calendar/infrastructure/stores/storageAdapter.ts +34 -0
- package/src/molecules/calendar/infrastructure/stores/useCalendarEvents.ts +168 -0
- package/src/molecules/calendar/infrastructure/stores/useCalendarNavigation.ts +47 -0
- package/src/molecules/calendar/infrastructure/stores/useCalendarView.ts +24 -0
- package/src/molecules/calendar/presentation/hooks/useCalendar.ts +7 -11
- package/src/responsive/compute/computeDeviceInfo.ts +22 -0
- package/src/responsive/compute/computeResponsivePositioning.ts +42 -0
- package/src/responsive/compute/computeResponsiveSizes.ts +48 -0
- package/src/responsive/padding/paddingUtils.ts +65 -0
- package/src/responsive/positioning/positioningUtils.ts +61 -0
- package/src/responsive/responsiveLayout.ts +11 -264
- package/src/responsive/screen/screenLayoutConfig.ts +38 -0
- package/src/responsive/tabbar/tabBarConfig.ts +88 -0
- package/src/responsive/types/responsiveTypes.ts +69 -0
- package/src/responsive/useResponsive.ts +69 -158
package/src/index.ts
CHANGED
|
@@ -15,460 +15,54 @@
|
|
|
15
15
|
// =============================================================================
|
|
16
16
|
// THEME EXPORTS
|
|
17
17
|
// =============================================================================
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
useAppDesignTokens,
|
|
21
|
-
useCommonStyles,
|
|
22
|
-
useDesignSystemTheme,
|
|
23
|
-
useTheme,
|
|
24
|
-
useThemedStyles,
|
|
25
|
-
useThemedStyleSheet,
|
|
26
|
-
DesignSystemProvider,
|
|
27
|
-
lightColors,
|
|
28
|
-
darkColors,
|
|
29
|
-
getColorPalette,
|
|
30
|
-
withAlpha,
|
|
31
|
-
BASE_TOKENS,
|
|
32
|
-
BASE_TOKENS as STATIC_TOKENS,
|
|
33
|
-
spacing,
|
|
34
|
-
typography,
|
|
35
|
-
borders,
|
|
36
|
-
createDesignTokens,
|
|
37
|
-
lightTheme,
|
|
38
|
-
darkTheme,
|
|
39
|
-
createResponsiveValue,
|
|
40
|
-
ThemeStorage,
|
|
41
|
-
createNavigationTheme,
|
|
42
|
-
applyCustomColors,
|
|
43
|
-
type ColorPalette,
|
|
44
|
-
type ThemeMode,
|
|
45
|
-
type CustomThemeColors,
|
|
46
|
-
type Spacing,
|
|
47
|
-
type Typography,
|
|
48
|
-
type Borders,
|
|
49
|
-
type BaseTokens,
|
|
50
|
-
type IconSizes,
|
|
51
|
-
type Opacity,
|
|
52
|
-
type AvatarSizes,
|
|
53
|
-
type ComponentSizes,
|
|
54
|
-
type DesignTokens,
|
|
55
|
-
type ResponsiveSpacing,
|
|
56
|
-
type ResponsiveTypography,
|
|
57
|
-
type Theme,
|
|
58
|
-
type ExtendedColorPalette,
|
|
59
|
-
type NavigationTheme,
|
|
60
|
-
} from './theme';
|
|
18
|
+
export * from './exports/theme';
|
|
61
19
|
|
|
62
20
|
// =============================================================================
|
|
63
21
|
// TYPOGRAPHY EXPORTS
|
|
64
22
|
// =============================================================================
|
|
65
|
-
|
|
66
|
-
export {
|
|
67
|
-
getTextColor,
|
|
68
|
-
getTextStyle,
|
|
69
|
-
isTextStyleVariant,
|
|
70
|
-
getAllTextStyleVariants,
|
|
71
|
-
clearTypographyCache,
|
|
72
|
-
clearColorCache,
|
|
73
|
-
isValidHexColor,
|
|
74
|
-
isValidRgbColor,
|
|
75
|
-
isValidHslColor,
|
|
76
|
-
isValidNamedColor,
|
|
77
|
-
isValidColor,
|
|
78
|
-
getColorFormat,
|
|
79
|
-
normalizeColor,
|
|
80
|
-
type TextStyleVariant,
|
|
81
|
-
type ColorVariant,
|
|
82
|
-
} from './typography';
|
|
23
|
+
export * from './exports/typography';
|
|
83
24
|
|
|
84
25
|
// =============================================================================
|
|
85
26
|
// RESPONSIVE EXPORTS
|
|
86
27
|
// =============================================================================
|
|
87
|
-
|
|
88
|
-
export {
|
|
89
|
-
useResponsive,
|
|
90
|
-
getResponsiveLogoSize,
|
|
91
|
-
getResponsiveInputHeight,
|
|
92
|
-
getResponsiveHorizontalPadding,
|
|
93
|
-
getResponsiveBottomPosition,
|
|
94
|
-
getResponsiveFABPosition,
|
|
95
|
-
getResponsiveModalMaxHeight,
|
|
96
|
-
getResponsiveMinModalHeight,
|
|
97
|
-
getResponsiveModalWidth,
|
|
98
|
-
getResponsiveModalHeight,
|
|
99
|
-
getResponsiveModalBorderRadius,
|
|
100
|
-
getResponsiveModalMaxWidth,
|
|
101
|
-
getResponsiveBackdropOpacity,
|
|
102
|
-
getResponsiveModalLayout,
|
|
103
|
-
getResponsiveBottomSheetLayout,
|
|
104
|
-
getResponsiveDialogLayout,
|
|
105
|
-
getResponsiveIconContainerSize,
|
|
106
|
-
getResponsiveGridColumns,
|
|
107
|
-
getResponsiveMaxWidth,
|
|
108
|
-
getResponsiveFontSize,
|
|
109
|
-
getMinTouchTarget,
|
|
110
|
-
IOS_HIG,
|
|
111
|
-
PLATFORM_CONSTANTS,
|
|
112
|
-
isValidTouchTarget,
|
|
113
|
-
DEVICE_BREAKPOINTS,
|
|
114
|
-
type ResponsiveModalLayout,
|
|
115
|
-
type ResponsiveBottomSheetLayout,
|
|
116
|
-
type ResponsiveDialogLayout,
|
|
117
|
-
type UseResponsiveReturn,
|
|
118
|
-
} from './responsive';
|
|
28
|
+
export * from './exports/responsive';
|
|
119
29
|
|
|
120
30
|
// =============================================================================
|
|
121
31
|
// DEVICE EXPORTS
|
|
122
32
|
// =============================================================================
|
|
123
|
-
|
|
124
|
-
export {
|
|
125
|
-
// Device detection
|
|
126
|
-
DeviceType,
|
|
127
|
-
getScreenDimensions,
|
|
128
|
-
isPhone,
|
|
129
|
-
isSmallPhone,
|
|
130
|
-
isLargePhone,
|
|
131
|
-
isTablet,
|
|
132
|
-
isLandscape,
|
|
133
|
-
getDeviceType,
|
|
134
|
-
getSpacingMultiplier,
|
|
135
|
-
// iPad detection
|
|
136
|
-
isIPad,
|
|
137
|
-
isIPadMini,
|
|
138
|
-
isIPadPro,
|
|
139
|
-
isIPadLandscape,
|
|
140
|
-
IPAD_BREAKPOINTS,
|
|
141
|
-
TOUCH_TARGETS,
|
|
142
|
-
CONTENT_WIDTH_CONSTRAINTS,
|
|
143
|
-
IPAD_LAYOUT_CONFIG,
|
|
144
|
-
// iPad utilities
|
|
145
|
-
getContentMaxWidth,
|
|
146
|
-
getIPadGridColumns,
|
|
147
|
-
getTouchTargetSize,
|
|
148
|
-
getIPadScreenPadding,
|
|
149
|
-
getIPadFontScale,
|
|
150
|
-
getIPadLayoutInfo,
|
|
151
|
-
getIPadModalDimensions,
|
|
152
|
-
getPaywallDimensions,
|
|
153
|
-
type IPadLayoutInfo,
|
|
154
|
-
type ModalDimensions,
|
|
155
|
-
type PaywallDimensions,
|
|
156
|
-
// Device info
|
|
157
|
-
DEVICE_CONSTANTS,
|
|
158
|
-
DeviceUtils,
|
|
159
|
-
DeviceTypeUtils,
|
|
160
|
-
DeviceMemoryUtils,
|
|
161
|
-
DeviceService,
|
|
162
|
-
UserFriendlyIdService,
|
|
163
|
-
PersistentDeviceIdService,
|
|
164
|
-
useDeviceInfo,
|
|
165
|
-
useDeviceCapabilities,
|
|
166
|
-
useDeviceId,
|
|
167
|
-
useAnonymousUser,
|
|
168
|
-
getAnonymousUserId,
|
|
169
|
-
collectDeviceExtras,
|
|
170
|
-
type DeviceInfo,
|
|
171
|
-
type ApplicationInfo,
|
|
172
|
-
type SystemInfo,
|
|
173
|
-
type AnonymousUser,
|
|
174
|
-
type UseAnonymousUserOptions,
|
|
175
|
-
type DeviceExtras,
|
|
176
|
-
} from './device';
|
|
33
|
+
export * from './exports/device';
|
|
177
34
|
|
|
178
35
|
// =============================================================================
|
|
179
36
|
// ATOMS EXPORTS
|
|
180
37
|
// =============================================================================
|
|
181
|
-
|
|
182
|
-
export {
|
|
183
|
-
AtomicText,
|
|
184
|
-
AtomicIcon,
|
|
185
|
-
AtomicButton,
|
|
186
|
-
AtomicInput,
|
|
187
|
-
AtomicCard,
|
|
188
|
-
AtomicFab,
|
|
189
|
-
AtomicAvatar,
|
|
190
|
-
AtomicChip,
|
|
191
|
-
AtomicProgress,
|
|
192
|
-
AtomicPicker,
|
|
193
|
-
AtomicDatePicker,
|
|
194
|
-
AtomicSkeleton,
|
|
195
|
-
AtomicBadge,
|
|
196
|
-
AtomicSpinner,
|
|
197
|
-
LoadingSpinner,
|
|
198
|
-
EmptyState,
|
|
199
|
-
type IconName,
|
|
200
|
-
type IconSize,
|
|
201
|
-
type IconColor,
|
|
202
|
-
type AtomicTextProps,
|
|
203
|
-
type AtomicIconProps,
|
|
204
|
-
type AtomicButtonProps,
|
|
205
|
-
type ButtonVariant,
|
|
206
|
-
type ButtonSize,
|
|
207
|
-
type AtomicInputProps,
|
|
208
|
-
type AtomicInputVariant,
|
|
209
|
-
type AtomicInputState,
|
|
210
|
-
type AtomicInputSize,
|
|
211
|
-
type AtomicCardProps,
|
|
212
|
-
type AtomicCardVariant,
|
|
213
|
-
type AtomicCardPadding,
|
|
214
|
-
type AtomicFabProps,
|
|
215
|
-
type FabSize,
|
|
216
|
-
type FabVariant,
|
|
217
|
-
type AtomicAvatarProps,
|
|
218
|
-
type AtomicChipProps,
|
|
219
|
-
type AtomicProgressProps,
|
|
220
|
-
type AtomicPickerProps,
|
|
221
|
-
type PickerOption,
|
|
222
|
-
type PickerSize,
|
|
223
|
-
type AtomicDatePickerProps,
|
|
224
|
-
type AtomicSkeletonProps,
|
|
225
|
-
type SkeletonPattern,
|
|
226
|
-
type SkeletonConfig,
|
|
227
|
-
SKELETON_PATTERNS,
|
|
228
|
-
type AtomicBadgeProps,
|
|
229
|
-
type BadgeVariant,
|
|
230
|
-
type BadgeSize,
|
|
231
|
-
type AtomicSpinnerProps,
|
|
232
|
-
type SpinnerSize,
|
|
233
|
-
type SpinnerColor,
|
|
234
|
-
type EmptyStateProps,
|
|
235
|
-
AtomicTextArea,
|
|
236
|
-
type AtomicTextAreaProps,
|
|
237
|
-
AtomicSwitch,
|
|
238
|
-
type AtomicSwitchProps,
|
|
239
|
-
AtomicTouchable,
|
|
240
|
-
type AtomicTouchableProps,
|
|
241
|
-
AtomicStatusBar,
|
|
242
|
-
type AtomicStatusBarProps,
|
|
243
|
-
AtomicKeyboardAvoidingView,
|
|
244
|
-
type AtomicKeyboardAvoidingViewProps,
|
|
245
|
-
} from './atoms';
|
|
38
|
+
export * from './exports/atoms';
|
|
246
39
|
|
|
247
40
|
// =============================================================================
|
|
248
41
|
// LAYOUTS EXPORTS
|
|
249
42
|
// =============================================================================
|
|
250
|
-
|
|
251
|
-
export {
|
|
252
|
-
ScreenLayout,
|
|
253
|
-
AppHeader,
|
|
254
|
-
ScreenHeader,
|
|
255
|
-
Grid,
|
|
256
|
-
Container,
|
|
257
|
-
FormLayout,
|
|
258
|
-
type ScreenLayoutProps,
|
|
259
|
-
type AppHeaderProps,
|
|
260
|
-
type ScreenHeaderProps,
|
|
261
|
-
type GridProps,
|
|
262
|
-
type ContainerProps,
|
|
263
|
-
type FormLayoutProps,
|
|
264
|
-
} from './layouts';
|
|
43
|
+
export * from './exports/layouts';
|
|
265
44
|
|
|
266
45
|
// =============================================================================
|
|
267
46
|
// MOLECULES EXPORTS
|
|
268
47
|
// =============================================================================
|
|
269
|
-
|
|
270
|
-
export {
|
|
271
|
-
FormField,
|
|
272
|
-
ListItem,
|
|
273
|
-
SearchBar,
|
|
274
|
-
IconContainer,
|
|
275
|
-
BaseModal,
|
|
276
|
-
ConfirmationModal,
|
|
277
|
-
useConfirmationModal,
|
|
278
|
-
StepProgress,
|
|
279
|
-
List,
|
|
280
|
-
Avatar,
|
|
281
|
-
AvatarGroup,
|
|
282
|
-
AvatarUtils,
|
|
283
|
-
type AvatarProps,
|
|
284
|
-
type AvatarGroupProps,
|
|
285
|
-
type AvatarGroupItem,
|
|
286
|
-
type AvatarSize,
|
|
287
|
-
type AvatarShape,
|
|
288
|
-
type AvatarConfig,
|
|
289
|
-
type AvatarType,
|
|
290
|
-
// Media Card
|
|
291
|
-
MediaCard,
|
|
292
|
-
type MediaCardProps,
|
|
293
|
-
type MediaCardSize,
|
|
294
|
-
type MediaCardOverlayPosition,
|
|
295
|
-
// Bottom Sheet
|
|
296
|
-
BottomSheet,
|
|
297
|
-
BottomSheetModal,
|
|
298
|
-
SafeBottomSheetModalProvider,
|
|
299
|
-
FilterBottomSheet,
|
|
300
|
-
FilterSheet,
|
|
301
|
-
useBottomSheet,
|
|
302
|
-
useBottomSheetModal,
|
|
303
|
-
useListFilters,
|
|
304
|
-
type BottomSheetProps,
|
|
305
|
-
type BottomSheetModalProps,
|
|
306
|
-
type BottomSheetRef,
|
|
307
|
-
type BottomSheetModalRef,
|
|
308
|
-
type FilterOption,
|
|
309
|
-
type FilterCategory,
|
|
310
|
-
// Alerts
|
|
311
|
-
AlertBanner,
|
|
312
|
-
AlertToast,
|
|
313
|
-
AlertInline,
|
|
314
|
-
AlertModal,
|
|
315
|
-
AlertContainer,
|
|
316
|
-
AlertProvider,
|
|
317
|
-
AlertService,
|
|
318
|
-
useAlert,
|
|
319
|
-
alertService,
|
|
320
|
-
AlertType,
|
|
321
|
-
AlertMode,
|
|
322
|
-
AlertPosition,
|
|
323
|
-
type BaseModalProps,
|
|
324
|
-
type ListProps,
|
|
325
|
-
type Alert,
|
|
326
|
-
type AlertAction,
|
|
327
|
-
type AlertOptions,
|
|
328
|
-
// Calendar
|
|
329
|
-
AtomicCalendar,
|
|
330
|
-
useCalendar,
|
|
331
|
-
useCalendarNavigation,
|
|
332
|
-
useCalendarEvents,
|
|
333
|
-
CalendarService,
|
|
334
|
-
CalendarGeneration,
|
|
335
|
-
DateUtilities,
|
|
336
|
-
useCalendarStore,
|
|
337
|
-
type AtomicCalendarProps,
|
|
338
|
-
type UseCalendarReturn,
|
|
339
|
-
type CalendarEvent,
|
|
340
|
-
type CreateCalendarEventRequest,
|
|
341
|
-
type UpdateCalendarEventRequest,
|
|
342
|
-
type CalendarDay,
|
|
343
|
-
type CalendarMonth,
|
|
344
|
-
type CalendarWeek,
|
|
345
|
-
type ICalendarRepository,
|
|
346
|
-
type CalendarViewMode,
|
|
347
|
-
// Swipe Actions
|
|
348
|
-
SwipeActionButton,
|
|
349
|
-
SwipeActionUtils,
|
|
350
|
-
ACTION_PRESETS,
|
|
351
|
-
DEFAULT_SWIPE_CONFIG,
|
|
352
|
-
type SwipeActionButtonProps,
|
|
353
|
-
type SwipeActionType,
|
|
354
|
-
type SwipeActionConfig,
|
|
355
|
-
type SwipeDirection,
|
|
356
|
-
type SwipeableConfig,
|
|
357
|
-
// Navigation
|
|
358
|
-
TabsNavigator,
|
|
359
|
-
StackNavigator,
|
|
360
|
-
createTabNavigator,
|
|
361
|
-
createStackNavigator,
|
|
362
|
-
FabButton,
|
|
363
|
-
NavigationCleanupManager,
|
|
364
|
-
AppNavigation,
|
|
365
|
-
TabLabel,
|
|
366
|
-
useTabBarStyles,
|
|
367
|
-
useTabConfig,
|
|
368
|
-
type TabsNavigatorProps,
|
|
369
|
-
type StackNavigatorProps,
|
|
370
|
-
type FabButtonProps,
|
|
371
|
-
type TabScreen,
|
|
372
|
-
type TabNavigatorConfig,
|
|
373
|
-
type StackScreen,
|
|
374
|
-
type StackNavigatorConfig,
|
|
375
|
-
type BaseScreen,
|
|
376
|
-
type BaseNavigatorConfig,
|
|
377
|
-
type IconRendererProps,
|
|
378
|
-
type LabelProcessorProps,
|
|
379
|
-
type FabConfig,
|
|
380
|
-
type NavigationCleanup,
|
|
381
|
-
type BottomTabNavigationOptions,
|
|
382
|
-
type BottomTabScreenProps,
|
|
383
|
-
type StackNavigationOptions,
|
|
384
|
-
type TabLabelProps,
|
|
385
|
-
type TabBarConfig,
|
|
386
|
-
// Long Press Menu
|
|
387
|
-
type MenuAction,
|
|
388
|
-
type MenuActionTypeValue,
|
|
389
|
-
MenuActionType,
|
|
390
|
-
// Emoji
|
|
391
|
-
EmojiPicker,
|
|
392
|
-
useEmojiPicker,
|
|
393
|
-
EmojiCategory,
|
|
394
|
-
EmojiUtils,
|
|
395
|
-
type EmojiObject,
|
|
396
|
-
type EmojiPickerConfig,
|
|
397
|
-
type EmojiSelectCallback,
|
|
398
|
-
type EmojiPickerState,
|
|
399
|
-
type EmojiPickerProps,
|
|
400
|
-
type UseEmojiPickerOptions,
|
|
401
|
-
type UseEmojiPickerReturn,
|
|
402
|
-
// Countdown
|
|
403
|
-
Countdown,
|
|
404
|
-
TimeUnit,
|
|
405
|
-
CountdownHeader,
|
|
406
|
-
useCountdown,
|
|
407
|
-
calculateTimeRemaining,
|
|
408
|
-
padNumber,
|
|
409
|
-
getNextDayStart,
|
|
410
|
-
getNextYearStart,
|
|
411
|
-
type CountdownProps,
|
|
412
|
-
type TimeUnitProps,
|
|
413
|
-
type CountdownHeaderProps,
|
|
414
|
-
type UseCountdownOptions,
|
|
415
|
-
type UseCountdownReturn,
|
|
416
|
-
type TimeRemaining,
|
|
417
|
-
type CountdownTarget,
|
|
418
|
-
type CountdownFormatOptions,
|
|
419
|
-
type CountdownDisplayConfig,
|
|
420
|
-
// Step Header
|
|
421
|
-
StepHeader,
|
|
422
|
-
type StepHeaderProps,
|
|
423
|
-
type StepHeaderConfig,
|
|
424
|
-
// Splash
|
|
425
|
-
SplashScreen,
|
|
426
|
-
useSplashFlow,
|
|
427
|
-
type SplashScreenProps,
|
|
428
|
-
type SplashColors,
|
|
429
|
-
type UseSplashFlowOptions,
|
|
430
|
-
type UseSplashFlowResult,
|
|
431
|
-
} from './molecules';
|
|
48
|
+
export * from './exports/molecules';
|
|
432
49
|
|
|
433
50
|
// =============================================================================
|
|
434
51
|
// ORGANISMS EXPORTS
|
|
435
52
|
// =============================================================================
|
|
436
|
-
|
|
437
|
-
export {
|
|
438
|
-
FormContainer,
|
|
439
|
-
type FormContainerProps,
|
|
440
|
-
} from './organisms';
|
|
53
|
+
export * from './exports/organisms';
|
|
441
54
|
|
|
442
55
|
// =============================================================================
|
|
443
56
|
// SAFE AREA EXPORTS
|
|
444
57
|
// =============================================================================
|
|
445
|
-
|
|
446
|
-
export * from './safe-area';
|
|
58
|
+
export * from './exports/safe-area';
|
|
447
59
|
|
|
448
60
|
// =============================================================================
|
|
449
61
|
// VARIANT UTILITIES
|
|
450
62
|
// =============================================================================
|
|
451
|
-
|
|
452
|
-
export {
|
|
453
|
-
createVariants,
|
|
454
|
-
type VariantConfig,
|
|
455
|
-
type VariantProps,
|
|
456
|
-
} from './presentation/utils/variants/core';
|
|
457
|
-
|
|
458
|
-
export {
|
|
459
|
-
createAdvancedVariants,
|
|
460
|
-
type AdvancedVariantConfig,
|
|
461
|
-
type CompoundVariant,
|
|
462
|
-
} from './presentation/utils/variants/compound';
|
|
463
|
-
|
|
464
|
-
export {
|
|
465
|
-
conditionalStyle,
|
|
466
|
-
responsiveStyle,
|
|
467
|
-
combineStyles,
|
|
468
|
-
} from './presentation/utils/variants/helpers';
|
|
63
|
+
export * from './exports/variants';
|
|
469
64
|
|
|
470
65
|
// =============================================================================
|
|
471
66
|
// UTILITIES
|
|
472
67
|
// =============================================================================
|
|
473
|
-
|
|
474
|
-
export * from './utilities';
|
|
68
|
+
export * from './exports/utilities';
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Avatar Constants
|
|
3
|
+
* Configuration constants for avatar component
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { AvatarSize, AvatarShape, AvatarType, SizeConfig } from './Avatar.types';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Size configurations (px)
|
|
10
|
+
*/
|
|
11
|
+
export const SIZE_CONFIGS: Record<AvatarSize, SizeConfig> = {
|
|
12
|
+
xs: {
|
|
13
|
+
size: 24,
|
|
14
|
+
fontSize: 10,
|
|
15
|
+
iconSize: 12,
|
|
16
|
+
statusSize: 6,
|
|
17
|
+
borderWidth: 1,
|
|
18
|
+
},
|
|
19
|
+
sm: {
|
|
20
|
+
size: 32,
|
|
21
|
+
fontSize: 12,
|
|
22
|
+
iconSize: 16,
|
|
23
|
+
statusSize: 8,
|
|
24
|
+
borderWidth: 1.5,
|
|
25
|
+
},
|
|
26
|
+
md: {
|
|
27
|
+
size: 40,
|
|
28
|
+
fontSize: 14,
|
|
29
|
+
iconSize: 20,
|
|
30
|
+
statusSize: 10,
|
|
31
|
+
borderWidth: 2,
|
|
32
|
+
},
|
|
33
|
+
lg: {
|
|
34
|
+
size: 56,
|
|
35
|
+
fontSize: 18,
|
|
36
|
+
iconSize: 28,
|
|
37
|
+
statusSize: 12,
|
|
38
|
+
borderWidth: 2,
|
|
39
|
+
},
|
|
40
|
+
xl: {
|
|
41
|
+
size: 80,
|
|
42
|
+
fontSize: 24,
|
|
43
|
+
iconSize: 40,
|
|
44
|
+
statusSize: 16,
|
|
45
|
+
borderWidth: 2.5,
|
|
46
|
+
},
|
|
47
|
+
xxl: {
|
|
48
|
+
size: 120,
|
|
49
|
+
fontSize: 36,
|
|
50
|
+
iconSize: 60,
|
|
51
|
+
statusSize: 20,
|
|
52
|
+
borderWidth: 3,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Avatar background colors
|
|
58
|
+
* Vibrant, accessible colors with good contrast
|
|
59
|
+
*/
|
|
60
|
+
export const AVATAR_COLORS = [
|
|
61
|
+
'#EF4444', // Red
|
|
62
|
+
'#F59E0B', // Orange
|
|
63
|
+
'#10B981', // Green
|
|
64
|
+
'#3B82F6', // Blue
|
|
65
|
+
'#8B5CF6', // Purple
|
|
66
|
+
'#EC4899', // Pink
|
|
67
|
+
'#14B8A6', // Teal
|
|
68
|
+
'#F97316', // Orange-Red
|
|
69
|
+
'#06B6D4', // Cyan
|
|
70
|
+
'#84CC16', // Lime
|
|
71
|
+
] as const;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Status indicator colors
|
|
75
|
+
*/
|
|
76
|
+
export const STATUS_COLORS = {
|
|
77
|
+
online: '#10B981', // Green
|
|
78
|
+
offline: '#9CA3AF', // Gray
|
|
79
|
+
away: '#F59E0B', // Orange
|
|
80
|
+
busy: '#EF4444', // Red
|
|
81
|
+
} as const;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Border radius configurations
|
|
85
|
+
*/
|
|
86
|
+
export const SHAPE_CONFIGS = {
|
|
87
|
+
circle: 9999, // Full circle
|
|
88
|
+
square: 0, // No radius
|
|
89
|
+
rounded: 8, // Rounded corners
|
|
90
|
+
} as const;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Avatar constants
|
|
94
|
+
*/
|
|
95
|
+
export const AVATAR_CONSTANTS = {
|
|
96
|
+
DEFAULT_SIZE: 'md' as AvatarSize,
|
|
97
|
+
DEFAULT_SHAPE: 'circle' as AvatarShape,
|
|
98
|
+
DEFAULT_TYPE: 'initials' as AvatarType,
|
|
99
|
+
DEFAULT_ICON: 'user',
|
|
100
|
+
MAX_GROUP_VISIBLE: 3,
|
|
101
|
+
GROUP_SPACING: -8, // Negative for overlap
|
|
102
|
+
FALLBACK_INITIALS: '?',
|
|
103
|
+
} as const;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Avatar Types
|
|
3
|
+
* Type definitions for avatar component
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Avatar size preset
|
|
8
|
+
*/
|
|
9
|
+
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Avatar shape
|
|
13
|
+
*/
|
|
14
|
+
export type AvatarShape = 'circle' | 'square' | 'rounded';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Avatar type
|
|
18
|
+
*/
|
|
19
|
+
export type AvatarType = 'image' | 'initials' | 'icon';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Avatar configuration
|
|
23
|
+
*/
|
|
24
|
+
export interface AvatarConfig {
|
|
25
|
+
/** Avatar type */
|
|
26
|
+
type: AvatarType;
|
|
27
|
+
/** Size preset */
|
|
28
|
+
size: AvatarSize;
|
|
29
|
+
/** Shape */
|
|
30
|
+
shape: AvatarShape;
|
|
31
|
+
/** Image URI */
|
|
32
|
+
uri?: string;
|
|
33
|
+
/** User name for initials */
|
|
34
|
+
name?: string;
|
|
35
|
+
/** Icon name (if type is icon) */
|
|
36
|
+
icon?: string;
|
|
37
|
+
/** Custom background color */
|
|
38
|
+
backgroundColor?: string;
|
|
39
|
+
/** Show status indicator */
|
|
40
|
+
showStatus?: boolean;
|
|
41
|
+
/** Status (online/offline) */
|
|
42
|
+
status?: 'online' | 'offline' | 'away' | 'busy';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Size configuration
|
|
47
|
+
*/
|
|
48
|
+
export interface SizeConfig {
|
|
49
|
+
size: number;
|
|
50
|
+
fontSize: number;
|
|
51
|
+
iconSize: number;
|
|
52
|
+
statusSize: number;
|
|
53
|
+
borderWidth: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Avatar group configuration
|
|
58
|
+
*/
|
|
59
|
+
export interface AvatarGroupConfig {
|
|
60
|
+
maxVisible: number;
|
|
61
|
+
spacing: number;
|
|
62
|
+
size: AvatarSize;
|
|
63
|
+
shape: AvatarShape;
|
|
64
|
+
}
|