@solostylist/ui-kit-native 1.0.1 → 1.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 (150) hide show
  1. package/dist/hooks/use-count-down.d.ts +0 -2
  2. package/dist/hooks/use-count-down.d.ts.map +1 -1
  3. package/dist/hooks/use-count-down.js +0 -1
  4. package/dist/index.d.ts +5 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +4 -0
  7. package/dist/s-avatar/s-avatar.d.ts +4 -8
  8. package/dist/s-avatar/s-avatar.d.ts.map +1 -1
  9. package/dist/s-avatar/s-avatar.js +49 -42
  10. package/dist/s-button/s-button.d.ts +0 -2
  11. package/dist/s-button/s-button.d.ts.map +1 -1
  12. package/dist/s-button/s-button.js +27 -24
  13. package/dist/s-button-link/s-button-link.d.ts +0 -2
  14. package/dist/s-button-link/s-button-link.d.ts.map +1 -1
  15. package/dist/s-button-link/s-button-link.js +21 -26
  16. package/dist/s-chat-input/index.d.ts +1 -1
  17. package/dist/s-chat-input/index.d.ts.map +1 -1
  18. package/dist/s-chat-input/s-chat-input.d.ts +19 -8
  19. package/dist/s-chat-input/s-chat-input.d.ts.map +1 -1
  20. package/dist/s-chat-input/s-chat-input.js +115 -46
  21. package/dist/s-chat-message/s-chat-message.d.ts +5 -7
  22. package/dist/s-chat-message/s-chat-message.d.ts.map +1 -1
  23. package/dist/s-chat-message/s-chat-message.js +100 -175
  24. package/dist/s-checkbox/s-checkbox.d.ts +0 -2
  25. package/dist/s-checkbox/s-checkbox.d.ts.map +1 -1
  26. package/dist/s-checkbox/s-checkbox.js +11 -18
  27. package/dist/s-chip/s-chip.d.ts +0 -2
  28. package/dist/s-chip/s-chip.d.ts.map +1 -1
  29. package/dist/s-chip/s-chip.js +35 -54
  30. package/dist/s-code-block/s-code-block.d.ts +0 -2
  31. package/dist/s-code-block/s-code-block.d.ts.map +1 -1
  32. package/dist/s-code-block/s-code-block.js +28 -40
  33. package/dist/s-comment-message/s-comment-message.d.ts +3 -5
  34. package/dist/s-comment-message/s-comment-message.d.ts.map +1 -1
  35. package/dist/s-comment-message/s-comment-message.js +54 -167
  36. package/dist/s-copyable-text/s-copyable-text.d.ts +0 -2
  37. package/dist/s-copyable-text/s-copyable-text.d.ts.map +1 -1
  38. package/dist/s-copyable-text/s-copyable-text.js +20 -45
  39. package/dist/s-countdown/index.d.ts +0 -1
  40. package/dist/s-countdown/index.d.ts.map +1 -1
  41. package/dist/s-countdown/index.js +0 -1
  42. package/dist/s-countdown/s-count-box.d.ts +5 -3
  43. package/dist/s-countdown/s-count-box.d.ts.map +1 -1
  44. package/dist/s-countdown/s-count-box.js +69 -60
  45. package/dist/s-countdown/s-countdown.d.ts +6 -3
  46. package/dist/s-countdown/s-countdown.d.ts.map +1 -1
  47. package/dist/s-countdown/s-countdown.js +11 -10
  48. package/dist/s-data-table/s-data-table.d.ts +0 -3
  49. package/dist/s-data-table/s-data-table.d.ts.map +1 -1
  50. package/dist/s-data-table/s-data-table.js +27 -50
  51. package/dist/s-date-picker/s-date-picker.d.ts +0 -2
  52. package/dist/s-date-picker/s-date-picker.d.ts.map +1 -1
  53. package/dist/s-date-picker/s-date-picker.js +51 -110
  54. package/dist/s-date-time-picker/s-date-time-picker.d.ts +0 -2
  55. package/dist/s-date-time-picker/s-date-time-picker.d.ts.map +1 -1
  56. package/dist/s-date-time-picker/s-date-time-picker.js +111 -203
  57. package/dist/s-divider/index.d.ts +2 -0
  58. package/dist/s-divider/index.d.ts.map +1 -0
  59. package/dist/s-divider/index.js +1 -0
  60. package/dist/s-divider/s-divider.d.ts +24 -0
  61. package/dist/s-divider/s-divider.d.ts.map +1 -0
  62. package/dist/s-divider/s-divider.js +30 -0
  63. package/dist/s-file-dropzone/s-file-dropzone.d.ts +0 -35
  64. package/dist/s-file-dropzone/s-file-dropzone.d.ts.map +1 -1
  65. package/dist/s-file-dropzone/s-file-dropzone.js +46 -120
  66. package/dist/s-file-icon/s-file-icon.d.ts +0 -2
  67. package/dist/s-file-icon/s-file-icon.d.ts.map +1 -1
  68. package/dist/s-file-icon/s-file-icon.js +11 -12
  69. package/dist/s-form/s-form.d.ts +0 -1
  70. package/dist/s-form/s-form.d.ts.map +1 -1
  71. package/dist/s-form/s-form.js +0 -1
  72. package/dist/s-icon-button/s-icon-button.d.ts +9 -9
  73. package/dist/s-icon-button/s-icon-button.d.ts.map +1 -1
  74. package/dist/s-icon-button/s-icon-button.js +38 -4
  75. package/dist/s-image-comparison/s-image-comparison.d.ts +3 -5
  76. package/dist/s-image-comparison/s-image-comparison.d.ts.map +1 -1
  77. package/dist/s-image-comparison/s-image-comparison.js +75 -102
  78. package/dist/s-label/s-label.d.ts +0 -1
  79. package/dist/s-label/s-label.d.ts.map +1 -1
  80. package/dist/s-label/s-label.js +8 -24
  81. package/dist/s-language-switcher/s-language-switcher.d.ts +2 -5
  82. package/dist/s-language-switcher/s-language-switcher.d.ts.map +1 -1
  83. package/dist/s-language-switcher/s-language-switcher.js +14 -25
  84. package/dist/s-lazy-image/s-lazy-image.d.ts +4 -6
  85. package/dist/s-lazy-image/s-lazy-image.d.ts.map +1 -1
  86. package/dist/s-lazy-image/s-lazy-image.js +37 -34
  87. package/dist/s-moving-border/s-moving-border.d.ts +0 -2
  88. package/dist/s-moving-border/s-moving-border.d.ts.map +1 -1
  89. package/dist/s-moving-border/s-moving-border.js +19 -24
  90. package/dist/s-multi-select/s-multi-select.d.ts +0 -2
  91. package/dist/s-multi-select/s-multi-select.d.ts.map +1 -1
  92. package/dist/s-multi-select/s-multi-select.js +54 -105
  93. package/dist/s-pagination/s-pagination.d.ts +12 -6
  94. package/dist/s-pagination/s-pagination.d.ts.map +1 -1
  95. package/dist/s-pagination/s-pagination.js +69 -43
  96. package/dist/s-rating/s-rating.d.ts +0 -2
  97. package/dist/s-rating/s-rating.d.ts.map +1 -1
  98. package/dist/s-rating/s-rating.js +31 -29
  99. package/dist/s-review/s-review.d.ts +6 -8
  100. package/dist/s-review/s-review.d.ts.map +1 -1
  101. package/dist/s-review/s-review.js +66 -153
  102. package/dist/s-scroll-to-top/s-scroll-to-top.d.ts +0 -2
  103. package/dist/s-scroll-to-top/s-scroll-to-top.d.ts.map +1 -1
  104. package/dist/s-scroll-to-top/s-scroll-to-top.js +17 -32
  105. package/dist/s-select/s-select.d.ts +5 -5
  106. package/dist/s-select/s-select.d.ts.map +1 -1
  107. package/dist/s-select/s-select.js +54 -94
  108. package/dist/s-select-list/s-select-list.d.ts +0 -2
  109. package/dist/s-select-list/s-select-list.d.ts.map +1 -1
  110. package/dist/s-select-list/s-select-list.js +24 -38
  111. package/dist/s-skeleton/index.d.ts +3 -0
  112. package/dist/s-skeleton/index.d.ts.map +1 -0
  113. package/dist/s-skeleton/index.js +1 -0
  114. package/dist/s-skeleton/s-skeleton.d.ts +27 -0
  115. package/dist/s-skeleton/s-skeleton.d.ts.map +1 -0
  116. package/dist/s-skeleton/s-skeleton.js +126 -0
  117. package/dist/s-switch/index.d.ts +3 -0
  118. package/dist/s-switch/index.d.ts.map +1 -0
  119. package/dist/s-switch/index.js +1 -0
  120. package/dist/s-switch/s-switch.d.ts +30 -0
  121. package/dist/s-switch/s-switch.d.ts.map +1 -0
  122. package/dist/s-switch/s-switch.js +44 -0
  123. package/dist/s-text-field/s-text-field.d.ts +0 -2
  124. package/dist/s-text-field/s-text-field.d.ts.map +1 -1
  125. package/dist/s-text-field/s-text-field.js +10 -23
  126. package/dist/s-text-shimmer/s-text-shimmer.d.ts +0 -14
  127. package/dist/s-text-shimmer/s-text-shimmer.d.ts.map +1 -1
  128. package/dist/s-text-shimmer/s-text-shimmer.js +28 -46
  129. package/dist/s-text-truncation/s-text-truncation.d.ts +4 -7
  130. package/dist/s-text-truncation/s-text-truncation.d.ts.map +1 -1
  131. package/dist/s-text-truncation/s-text-truncation.js +74 -34
  132. package/dist/s-tip/s-tip.d.ts +0 -1
  133. package/dist/s-tip/s-tip.d.ts.map +1 -1
  134. package/dist/s-tip/s-tip.js +9 -16
  135. package/dist/s-tooltip/index.d.ts +2 -0
  136. package/dist/s-tooltip/index.d.ts.map +1 -0
  137. package/dist/s-tooltip/index.js +1 -0
  138. package/dist/s-tooltip/s-tooltip.d.ts +23 -0
  139. package/dist/s-tooltip/s-tooltip.d.ts.map +1 -0
  140. package/dist/s-tooltip/s-tooltip.js +17 -0
  141. package/dist/s-zoom-image/s-zoom-image.d.ts +3 -5
  142. package/dist/s-zoom-image/s-zoom-image.d.ts.map +1 -1
  143. package/dist/s-zoom-image/s-zoom-image.js +16 -21
  144. package/dist/theme/theme-primitives.d.ts +10 -0
  145. package/dist/theme/theme-primitives.d.ts.map +1 -1
  146. package/dist/theme/theme-primitives.js +11 -0
  147. package/dist/utils/bytes-to-size.d.ts +0 -1
  148. package/dist/utils/bytes-to-size.d.ts.map +1 -1
  149. package/dist/utils/bytes-to-size.js +0 -1
  150. package/package.json +3 -2
@@ -1,12 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Color from 'color';
3
3
  import React, { useEffect, useState } from 'react';
4
- import { Animated, Platform, Pressable, StyleSheet, View } from 'react-native';
4
+ import { Animated, Platform, Pressable, View } from 'react-native';
5
5
  import { RadioButton } from 'react-native-paper';
6
6
  import { useSTheme } from '../theme';
7
7
  /**
8
8
  * A selectable list component with radio buttons and optional expandable content.
9
- * Synced with web SSelectList from @solostylist/ui-kit.
10
9
  */
11
10
  export const SSelectList = ({ items, selectedId, onSelect, renderItem, renderBelow, showRadio = true, style, }) => {
12
11
  const { theme } = useSTheme();
@@ -31,39 +30,12 @@ export const SSelectList = ({ items, selectedId, onSelect, renderItem, renderBel
31
30
  });
32
31
  }
33
32
  };
34
- const styles = StyleSheet.create({
35
- container: {
36
- gap: theme.spacing.md, // MUI Stack spacing={2} = 16px
37
- },
38
- itemContainer: {
39
- width: '100%',
40
- },
41
- itemBox: {
42
- flexDirection: 'row',
43
- alignItems: 'center',
44
- justifyContent: 'space-between',
45
- borderRadius: theme.borderRadius.md, // 8px to match web
46
- paddingVertical: theme.spacing.sm, // MUI spacing(1) = 8px
47
- paddingLeft: theme.spacing.md, // MUI spacing(2) = 16px
48
- paddingRight: theme.spacing.md,
49
- borderWidth: 1,
50
- borderStyle: 'solid',
51
- },
52
- itemContent: {
53
- flexDirection: 'row',
54
- alignItems: 'center',
55
- gap: theme.spacing.md, // MUI gap: 2 = 16px
56
- flex: 1,
57
- borderRadius: theme.borderRadius.md,
58
- },
59
- belowContent: {
60
- marginTop: theme.spacing.md, // MUI mt={2} = 16px
61
- },
62
- radio: {
63
- marginLeft: theme.spacing.xs,
64
- },
65
- });
66
- return (_jsx(View, { style: [styles.container, style], children: items.map((item, index) => {
33
+ return (_jsx(View, { style: [
34
+ {
35
+ gap: theme.spacing.md,
36
+ },
37
+ style,
38
+ ], children: items.map((item, index) => {
67
39
  const isSelected = item.id === selectedId;
68
40
  const hasBelowContent = renderBelow && isSelected;
69
41
  const isExpanded = expandedItems[item.id] ?? false;
@@ -80,17 +52,31 @@ export const SSelectList = ({ items, selectedId, onSelect, renderItem, renderBel
80
52
  ? Color(theme.colors.secondary[600]).alpha(0.1).rgb().string()
81
53
  : Color(theme.colors.secondary[300]).alpha(0.1).rgb().string()
82
54
  : 'transparent';
83
- return (_jsxs(View, { style: styles.itemContainer, children: [_jsxs(Pressable, { onPress: () => handleSelect(item.id), onPressIn: () => setHoveredIndex(index), onPressOut: () => setHoveredIndex(null), ...(Platform.OS === 'web' && {
55
+ return (_jsxs(View, { style: { width: '100%' }, children: [_jsxs(Pressable, { onPress: () => handleSelect(item.id), onPressIn: () => setHoveredIndex(index), onPressOut: () => setHoveredIndex(null), ...(Platform.OS === 'web' && {
84
56
  onMouseEnter: () => setHoveredIndex(index),
85
57
  onMouseLeave: () => setHoveredIndex(null),
86
58
  }), style: ({ pressed }) => [
87
- styles.itemBox,
88
59
  {
60
+ flexDirection: 'row',
61
+ alignItems: 'center',
62
+ justifyContent: 'space-between',
63
+ borderRadius: theme.borderRadius.md,
64
+ paddingVertical: theme.spacing.sm,
65
+ paddingLeft: theme.spacing.md,
66
+ paddingRight: theme.spacing.md,
67
+ borderWidth: 1,
68
+ borderStyle: 'solid',
89
69
  borderColor,
90
70
  backgroundColor: pressed ? backgroundColor : backgroundColor,
91
71
  cursor: 'pointer',
92
72
  },
93
- ], children: [_jsx(View, { style: styles.itemContent, children: renderItem(item, isSelected) }), showRadio && (_jsx(RadioButton.Android, { value: item.id, status: isSelected ? 'checked' : 'unchecked', color: theme.dark ? theme.colors.primary[400] : theme.colors.primary[600], uncheckedColor: theme.colors.divider, style: styles.radio }))] }), hasBelowContent && _jsx(CollapseView, { isExpanded: isExpanded, children: renderBelow(item) })] }, item.id));
73
+ ], children: [_jsx(View, { style: {
74
+ flexDirection: 'row',
75
+ alignItems: 'center',
76
+ gap: theme.spacing.md,
77
+ flex: 1,
78
+ borderRadius: theme.borderRadius.md,
79
+ }, children: renderItem(item, isSelected) }), showRadio && (_jsx(RadioButton.Android, { value: item.id, status: isSelected ? 'checked' : 'unchecked', color: theme.dark ? theme.colors.primary[400] : theme.colors.primary[600], uncheckedColor: theme.colors.divider, style: { marginLeft: theme.spacing.xs } }))] }), hasBelowContent && _jsx(CollapseView, { isExpanded: isExpanded, children: renderBelow(item) })] }, item.id));
94
80
  }) }));
95
81
  };
96
82
  const CollapseView = ({ isExpanded, children }) => {
@@ -0,0 +1,3 @@
1
+ export { SSkeleton, default } from './s-skeleton';
2
+ export type { SSkeletonProps } from './s-skeleton';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/s-skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export { SSkeleton, default } from './s-skeleton';
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ /**
4
+ * Props interface for SSkeleton component
5
+ */
6
+ export interface SSkeletonProps {
7
+ /** Visual variant of the skeleton */
8
+ variant?: 'circular' | 'rectangular' | 'rounded' | 'text';
9
+ /** Height of the skeleton (number for px, string for percentage/dimensions) */
10
+ height?: number | string;
11
+ /** Width of the skeleton (number for px, string for percentage/dimensions) */
12
+ width?: number | string;
13
+ /** Additional styles */
14
+ style?: StyleProp<ViewStyle>;
15
+ /** Pre-defined component preset for common UI elements */
16
+ component?: 'button' | 'checkbox' | 'radio-button' | 'avatar' | 'rounded-avatar' | 'icon-button' | 'typography' | 'title-typography';
17
+ }
18
+ /**
19
+ * An enhanced skeleton loading component with pre-defined component presets for consistent loading states.
20
+ * Uses a pulse animation to mimic the web skeleton behavior.
21
+ */
22
+ export declare const SSkeleton: {
23
+ ({ variant, width, height, style, component }: SSkeletonProps): React.JSX.Element;
24
+ displayName: string;
25
+ };
26
+ export default SSkeleton;
27
+ //# sourceMappingURL=s-skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s-skeleton.d.ts","sourceRoot":"","sources":["../../src/s-skeleton/s-skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAoC,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhG;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,OAAO,CAAC,EAAE,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC;IAC1D,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,wBAAwB;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,0DAA0D;IAC1D,SAAS,CAAC,EACN,QAAQ,GACR,UAAU,GACV,cAAc,GACd,QAAQ,GACR,gBAAgB,GAChB,aAAa,GACb,YAAY,GACZ,kBAAkB,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS;mDAA2D,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;CAwHlH,CAAC;AAIF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,126 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { Animated, Easing } from 'react-native';
4
+ import { useSTheme } from '../theme';
5
+ /**
6
+ * An enhanced skeleton loading component with pre-defined component presets for consistent loading states.
7
+ * Uses a pulse animation to mimic the web skeleton behavior.
8
+ */
9
+ export const SSkeleton = ({ variant = 'text', width, height, style, component }) => {
10
+ const { theme } = useSTheme();
11
+ // Pulse animation state
12
+ const [pulseAnim] = useState(() => new Animated.Value(0.4));
13
+ useEffect(() => {
14
+ const pulse = Animated.loop(Animated.sequence([
15
+ Animated.timing(pulseAnim, {
16
+ toValue: 1,
17
+ duration: 800,
18
+ easing: Easing.inOut(Easing.ease),
19
+ useNativeDriver: true,
20
+ }),
21
+ Animated.timing(pulseAnim, {
22
+ toValue: 0.4,
23
+ duration: 800,
24
+ easing: Easing.inOut(Easing.ease),
25
+ useNativeDriver: true,
26
+ }),
27
+ ]));
28
+ pulse.start();
29
+ return () => pulse.stop();
30
+ }, [pulseAnim]);
31
+ // Determine actual dimensions and variant based on component prop if present
32
+ let finalVariant = variant;
33
+ let finalWidth;
34
+ let finalHeight;
35
+ if (component) {
36
+ switch (component) {
37
+ case 'button':
38
+ finalHeight = 36; // Matches native button height (small/medium avg)
39
+ finalVariant = 'rounded';
40
+ break;
41
+ case 'checkbox':
42
+ finalHeight = 24;
43
+ finalWidth = 24;
44
+ finalVariant = 'rounded';
45
+ break;
46
+ case 'radio-button':
47
+ finalHeight = 24;
48
+ finalWidth = 24;
49
+ finalVariant = 'circular';
50
+ break;
51
+ case 'avatar':
52
+ finalHeight = 54;
53
+ finalWidth = 54;
54
+ finalVariant = 'rectangular'; // Web uses rectangular for 'avatar' preset, likely intended for square avatar
55
+ break;
56
+ case 'rounded-avatar':
57
+ finalHeight = 48;
58
+ finalWidth = 48;
59
+ finalVariant = 'circular';
60
+ break;
61
+ case 'icon-button':
62
+ finalHeight = 32;
63
+ finalWidth = 32;
64
+ finalVariant = 'circular';
65
+ break;
66
+ case 'typography':
67
+ finalWidth = '100%';
68
+ finalVariant = 'text';
69
+ // Height will be determined by text variant logic below if not set
70
+ break;
71
+ case 'title-typography':
72
+ finalWidth = 200;
73
+ finalVariant = 'text';
74
+ break;
75
+ }
76
+ }
77
+ // Apply prop overrides if provided (taking precedence over component presets)
78
+ if (width !== undefined)
79
+ finalWidth = width;
80
+ if (height !== undefined)
81
+ finalHeight = height;
82
+ // Set defaults if not set by component or props
83
+ if (finalWidth === undefined)
84
+ finalWidth = '100%';
85
+ if (finalHeight === undefined) {
86
+ if (finalVariant === 'text') {
87
+ finalHeight = 16; // Default text height
88
+ }
89
+ else {
90
+ finalHeight = 32; // Default block height
91
+ }
92
+ }
93
+ // Calculate border radius based on variant
94
+ let borderRadius = 0;
95
+ if (finalVariant === 'circular') {
96
+ // For circular, try to use half of height or width if they are numbers
97
+ if (typeof finalHeight === 'number') {
98
+ borderRadius = finalHeight / 2;
99
+ }
100
+ else if (typeof finalWidth === 'number') {
101
+ borderRadius = finalWidth / 2;
102
+ }
103
+ else {
104
+ borderRadius = 9999; // Fallback for percentages
105
+ }
106
+ }
107
+ else if (finalVariant === 'rounded') {
108
+ borderRadius = theme.borderRadius.md;
109
+ }
110
+ else if (finalVariant === 'text') {
111
+ borderRadius = theme.borderRadius.sm;
112
+ }
113
+ // rectangular stays 0
114
+ return (_jsx(Animated.View, { style: [
115
+ {
116
+ width: finalWidth,
117
+ height: finalHeight,
118
+ borderRadius,
119
+ backgroundColor: theme.dark ? theme.colors.secondary[700] : theme.colors.secondary[300],
120
+ opacity: pulseAnim,
121
+ },
122
+ style,
123
+ ] }));
124
+ };
125
+ SSkeleton.displayName = 'SSkeleton';
126
+ export default SSkeleton;
@@ -0,0 +1,3 @@
1
+ export { SSwitch, default } from './s-switch';
2
+ export type { SSwitchProps } from './s-switch';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/s-switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ export { SSwitch, default } from './s-switch';
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ import { type SwitchProps } from 'react-native-paper';
4
+ /**
5
+ * Props interface for SSwitch component
6
+ */
7
+ export interface SSwitchProps extends Omit<SwitchProps, 'theme'> {
8
+ /** Current toggle state (on/off) */
9
+ value: boolean;
10
+ /** Callback fired when switch state changes */
11
+ onValueChange: (value: boolean) => void;
12
+ /** Content displayed as a label next to the switch */
13
+ label?: string | React.ReactNode;
14
+ /** Whether the switch is disabled */
15
+ disabled?: boolean;
16
+ /** Additional styles for the switch container */
17
+ style?: StyleProp<ViewStyle>;
18
+ /** Additional styles for the label text */
19
+ labelStyle?: StyleProp<ViewStyle>;
20
+ }
21
+ /**
22
+ * A toggle switch component for binary on/off state selection.
23
+ * Built on React Native Paper Switch with consistent theming.
24
+ */
25
+ export declare const SSwitch: {
26
+ ({ value, onValueChange, label, disabled, style, labelStyle, ...props }: SSwitchProps): React.JSX.Element;
27
+ displayName: string;
28
+ };
29
+ export default SSwitch;
30
+ //# sourceMappingURL=s-switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s-switch.d.ts","sourceRoot":"","sources":["../../src/s-switch/s-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAa,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAI9D;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9D,oCAAoC;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,+CAA+C;IAC/C,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,2CAA2C;IAC3C,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACnC;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO;6EAQjB,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;CAyDlC,CAAC;AAIF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import { Pressable } from 'react-native';
4
+ import { Switch } from 'react-native-paper';
5
+ import { SText } from '../s-text';
6
+ import { useSTheme } from '../theme';
7
+ /**
8
+ * A toggle switch component for binary on/off state selection.
9
+ * Built on React Native Paper Switch with consistent theming.
10
+ */
11
+ export const SSwitch = ({ value = false, onValueChange, label, disabled = false, style, labelStyle, ...props }) => {
12
+ const { theme } = useSTheme();
13
+ // Calculate colors based on theme mode
14
+ const colors = useMemo(() => {
15
+ const isDark = theme.dark;
16
+ // Track colors - on/off states
17
+ const trackColorOn = isDark ? theme.colors.primary[400] : theme.colors.primary[600];
18
+ const trackColorOff = isDark ? theme.colors.secondary[600] : theme.colors.secondary[400];
19
+ const disabledTrackColor = isDark ? theme.colors.secondary[700] : theme.colors.secondary[300];
20
+ // Label color
21
+ const labelColor = disabled ? theme.colors.text.disabled : theme.colors.text.primary;
22
+ return {
23
+ trackColorOn: disabled ? disabledTrackColor : trackColorOn,
24
+ trackColorOff: disabled ? disabledTrackColor : trackColorOff,
25
+ labelColor,
26
+ };
27
+ }, [theme.dark, theme.colors, disabled]);
28
+ const handleValueChange = (newValue) => {
29
+ if (!disabled && onValueChange) {
30
+ onValueChange(newValue);
31
+ }
32
+ };
33
+ return (_jsxs(Pressable, { style: [
34
+ {
35
+ flexDirection: 'row',
36
+ alignItems: 'center',
37
+ justifyContent: 'space-between',
38
+ width: '100%',
39
+ },
40
+ style,
41
+ ], onPress: () => handleValueChange(!value), disabled: disabled, children: [label && (_jsx(SText, { variant: "body2", style: [{ color: colors.labelColor }, labelStyle], children: label })), _jsx(Switch, { value: value, onValueChange: handleValueChange, disabled: disabled, color: colors.trackColorOn, ...props })] }));
42
+ };
43
+ SSwitch.displayName = 'SSwitch';
44
+ export default SSwitch;
@@ -3,7 +3,6 @@ import { type KeyboardTypeOptions } from 'react-native';
3
3
  import { type TextInputProps } from 'react-native-paper';
4
4
  /**
5
5
  * Props interface for STextField component
6
- * Synced with web STextField from @solostylist/ui-kit
7
6
  */
8
7
  export interface STextFieldProps extends Omit<TextInputProps, 'error' | 'theme'> {
9
8
  /** Field label displayed above the input */
@@ -43,7 +42,6 @@ export interface STextFieldProps extends Omit<TextInputProps, 'error' | 'theme'>
43
42
  }
44
43
  /**
45
44
  * An enhanced text field component with integrated form labeling, error handling, and password visibility toggle.
46
- * Synced with web STextField from @solostylist/ui-kit.
47
45
  */
48
46
  export declare const STextField: {
49
47
  ({ label, placeholder, value, onChangeText, onBlur, error, required, type, disabled, keyboardType, maxLength, hint, multiline, numberOfLines, size, variant, autoFocus, ...props }: STextFieldProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file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,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yBAAyB;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,2BAA2B;IAC3B,OAAO,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC9B,qCAAqC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;wLAmBpB,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;CAyFrC,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -1,12 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { StyleSheet } from 'react-native';
4
3
  import { TextInput } from 'react-native-paper';
5
4
  import { SForm } from '../s-form';
6
5
  import { useSTheme } from '../theme';
7
6
  /**
8
7
  * An enhanced text field component with integrated form labeling, error handling, and password visibility toggle.
9
- * Synced with web STextField from @solostylist/ui-kit.
10
8
  */
11
9
  export const STextField = ({ label, placeholder, value, onChangeText, onBlur, error, required = false, type = 'text', disabled = false, keyboardType, maxLength, hint, multiline = false, numberOfLines, size = 'medium', variant = 'outlined', autoFocus = false, ...props }) => {
12
10
  const { theme } = useSTheme();
@@ -39,31 +37,20 @@ export const STextField = ({ label, placeholder, value, onChangeText, onBlur, er
39
37
  const handleTogglePasswordVisibility = () => {
40
38
  setIsPasswordVisible(!isPasswordVisible);
41
39
  };
42
- const styles = StyleSheet.create({
43
- input: {
44
- // Match web sizes: small = 36px (2.25rem), medium = 40px (2.5rem)
45
- ...(size === 'small' && !multiline
46
- ? {
47
- height: 36,
48
- }
49
- : size === 'medium' && !multiline
50
- ? {
51
- height: 40,
52
- }
53
- : {}),
54
- },
55
- content: {
56
- // contentStyle is used for text content styling (input text and placeholder)
57
- fontFamily: theme.typography.fontFamily,
58
- // fontSize controls both input text and placeholder text size
59
- fontSize: size === 'small' ? theme.typography.fontSize.sm : theme.typography.fontSize.md,
60
- },
61
- });
62
40
  const inputType = isPassword && isPasswordVisible ? 'text' : type;
63
41
  const secureTextEntry = inputType === 'password';
64
42
  // Extract left prop from props if provided (for start icon support)
65
43
  const { left, ...restProps } = props;
66
- return (_jsx(SForm, { label: label, hint: hint, error: error, required: required, children: _jsx(TextInput, { mode: variant, placeholder: placeholder, placeholderTextColor: theme.colors.divider, value: value, onChangeText: onChangeText, onBlur: onBlur, error: !!error, disabled: disabled, secureTextEntry: secureTextEntry, keyboardType: getKeyboardType(), autoCapitalize: getAutoCapitalize(), maxLength: maxLength, multiline: multiline, numberOfLines: numberOfLines, autoFocus: autoFocus, dense: size === 'small', left: left, right: isPassword ? (_jsx(TextInput.Icon, { icon: isPasswordVisible ? 'eye-off' : 'eye', onPress: handleTogglePasswordVisibility, forceTextInputFocus: false, size: theme.iconSize.xs })) : undefined, style: styles.input, contentStyle: styles.content, ...restProps }) }));
44
+ return (_jsx(SForm, { label: label, hint: hint, error: error, required: required, children: _jsx(TextInput, { mode: variant, placeholder: placeholder, placeholderTextColor: theme.colors.divider, value: value, onChangeText: onChangeText, onBlur: onBlur, error: !!error, disabled: disabled, secureTextEntry: secureTextEntry, keyboardType: getKeyboardType(), autoCapitalize: getAutoCapitalize(), maxLength: maxLength, multiline: multiline, numberOfLines: numberOfLines, autoFocus: autoFocus, dense: size === 'small', left: left, right: isPassword ? (_jsx(TextInput.Icon, { icon: isPasswordVisible ? 'eye-off' : 'eye', onPress: handleTogglePasswordVisibility, forceTextInputFocus: false, size: theme.iconSize.xs })) : undefined, ...restProps, style: {
45
+ ...(!multiline && { height: theme.typography.input.height[size] }),
46
+ ...props.style,
47
+ }, contentStyle: {
48
+ fontFamily: theme.typography.fontFamily,
49
+ fontSize: theme.typography.input.fontSize[size],
50
+ ...props.contentStyle,
51
+ }, outlineStyle: disabled && variant === 'outlined'
52
+ ? { borderColor: theme.colors.divider, ...props.outlineStyle }
53
+ : props.outlineStyle }) }));
67
54
  };
68
55
  STextField.displayName = 'STextField';
69
56
  export default STextField;
@@ -13,20 +13,6 @@ export interface STextShimmerProps extends Omit<STextProps, 'children'> {
13
13
  }
14
14
  /**
15
15
  * A text component that creates an animated shimmer effect.
16
- * Synced with web STextShimmer from @solostylist/ui-kit.
17
- *
18
- * Web implementation details:
19
- * - Uses CSS linear-gradient with background-clip: text
20
- * - backgroundSize: '250% 100%' (gradient is 2.5x container width)
21
- * - Gradient pattern: transparent → (50% - spread) → primary color → (50% + spread) → transparent
22
- * - Animates background-position from 100% (right) to 0% (left)
23
- * - Base color: text.disabled, Highlight color: text.primary
24
- *
25
- * React Native implementation:
26
- * - Uses layered text with Animated.View
27
- * - Base layer: text.disabled (always visible)
28
- * - Highlight layer: text.primary with moving clip window
29
- * - Matches web's animation direction, duration, and spread behavior
30
16
  */
31
17
  export declare const STextShimmer: {
32
18
  ({ children, duration, spread, variant, style, ...textProps }: STextShimmerProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"s-text-shimmer.d.ts","sourceRoot":"","sources":["../../src/s-text-shimmer/s-text-shimmer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAS,UAAU,EAAE,MAAM,WAAW,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IACrE,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,YAAY;mEAOtB,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;CA6IvC,CAAC;AAIF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"s-text-shimmer.d.ts","sourceRoot":"","sources":["../../src/s-text-shimmer/s-text-shimmer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAS,UAAU,EAAE,MAAM,WAAW,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IACrE,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;mEAOtB,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;CAuIvC,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -1,23 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useRef, useState } from 'react';
3
- import { Animated, Easing, StyleSheet, View } from 'react-native';
3
+ import { Animated, Easing, View } from 'react-native';
4
4
  import { SText } from '../s-text';
5
5
  /**
6
6
  * A text component that creates an animated shimmer effect.
7
- * Synced with web STextShimmer from @solostylist/ui-kit.
8
- *
9
- * Web implementation details:
10
- * - Uses CSS linear-gradient with background-clip: text
11
- * - backgroundSize: '250% 100%' (gradient is 2.5x container width)
12
- * - Gradient pattern: transparent → (50% - spread) → primary color → (50% + spread) → transparent
13
- * - Animates background-position from 100% (right) to 0% (left)
14
- * - Base color: text.disabled, Highlight color: text.primary
15
- *
16
- * React Native implementation:
17
- * - Uses layered text with Animated.View
18
- * - Base layer: text.disabled (always visible)
19
- * - Highlight layer: text.primary with moving clip window
20
- * - Matches web's animation direction, duration, and spread behavior
21
7
  */
22
8
  export const STextShimmer = ({ children, duration = 2, spread = 2, variant = 'body1', style, ...textProps }) => {
23
9
  // Animated value for shimmer position (0 to 1)
@@ -84,37 +70,33 @@ export const STextShimmer = ({ children, duration = 2, spread = 2, variant = 'bo
84
70
  inputRange: [0, 1],
85
71
  outputRange: [highlightWidth, -textWidth],
86
72
  });
87
- const styles = useMemo(() => StyleSheet.create({
88
- container: {
89
- overflow: 'hidden',
90
- },
91
- textContainer: {
92
- position: 'relative',
93
- },
94
- shimmerContainer: {
95
- position: 'absolute',
96
- top: 0,
97
- left: 0,
98
- right: 0,
99
- bottom: 0,
100
- overflow: 'hidden',
101
- },
102
- highlightWindow: {
103
- position: 'absolute',
104
- top: 0,
105
- overflow: 'hidden',
106
- },
107
- }), []);
108
- return (_jsx(View, { style: [styles.container, style], children: _jsxs(View, { style: styles.textContainer, onLayout: handleLayout, children: [_jsx(SText, { variant: variant, color: "text.disabled", ...textProps, children: children }), textWidth > 0 && (_jsx(View, { style: styles.shimmerContainer, children: _jsx(Animated.View, { style: [
109
- styles.highlightWindow,
110
- {
111
- width: highlightWidth,
112
- transform: [{ translateX: highlightPositionX }],
113
- },
114
- ], children: _jsx(Animated.View, { style: {
115
- width: textWidth,
116
- transform: [{ translateX: textOffsetX }],
117
- }, children: _jsx(SText, { variant: variant, color: "text.primary", ...textProps, children: children }) }) }) }))] }) }));
73
+ return (_jsxs(View, { style: [
74
+ {
75
+ overflow: 'hidden',
76
+ position: 'relative',
77
+ },
78
+ style,
79
+ ], onLayout: handleLayout, children: [_jsx(SText, { variant: variant, color: "text.disabled", ...textProps, children: children }), textWidth > 0 && (_jsx(View, { style: {
80
+ position: 'absolute',
81
+ top: 0,
82
+ left: 0,
83
+ right: 0,
84
+ bottom: 0,
85
+ overflow: 'hidden',
86
+ }, children: _jsx(Animated.View, { style: [
87
+ {
88
+ position: 'absolute',
89
+ top: 0,
90
+ overflow: 'hidden',
91
+ },
92
+ {
93
+ width: highlightWidth,
94
+ transform: [{ translateX: highlightPositionX }],
95
+ },
96
+ ], children: _jsx(Animated.View, { style: {
97
+ width: textWidth,
98
+ transform: [{ translateX: textOffsetX }],
99
+ }, children: _jsx(SText, { variant: variant, color: "text.primary", ...textProps, children: children }) }) }) }))] }));
118
100
  };
119
101
  STextShimmer.displayName = 'STextShimmer';
120
102
  export default STextShimmer;
@@ -3,12 +3,11 @@ import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
3
3
  /**
4
4
  * Display variant for STextTruncation
5
5
  * - 'expandable': Shows See more/less link to toggle text expansion
6
- * - 'tooltip': Shows ellipsis only (tooltip functionality not available in RN)
6
+ * - 'tooltip': Shows ellipsis with tooltip on long press
7
7
  */
8
8
  export type STextTruncationVariant = 'expandable' | 'tooltip';
9
9
  /**
10
10
  * Props interface for STextTruncation component
11
- * Synced with web STextTruncation from @solostylist/ui-kit
12
11
  */
13
12
  export interface STextTruncationProps {
14
13
  /** The text content to display and potentially truncate */
@@ -21,8 +20,6 @@ export interface STextTruncationProps {
21
20
  seeMoreText?: string;
22
21
  /** Text to show for collapsing (default: 'See less') */
23
22
  seeLessText?: string;
24
- /** Minimum word count to show toggle link (default: 20) */
25
- minWordsForToggle?: number;
26
23
  /** Additional styles for the container */
27
24
  style?: StyleProp<ViewStyle>;
28
25
  /** Additional styles for the text */
@@ -34,11 +31,11 @@ export interface STextTruncationProps {
34
31
  }
35
32
  /**
36
33
  * A text truncation component with expandable See more/less functionality.
37
- * Built for React Native with consistent theming.
38
- * Synced with web STextTruncation from @solostylist/ui-kit.
34
+ * Uses JS-based binary search truncation so "See more/less" appears inline
35
+ * at the end of the last line, matching the web ui-kit behavior.
39
36
  */
40
37
  export declare const STextTruncation: {
41
- ({ text, variant, lines, seeMoreText, seeLessText, minWordsForToggle, style, textStyle, linkStyle, onExpandChange, }: STextTruncationProps): React.JSX.Element;
38
+ ({ text, variant, lines, seeMoreText, seeLessText, style, textStyle, linkStyle, onExpandChange, }: STextTruncationProps): React.JSX.Element;
42
39
  displayName: string;
43
40
  };
44
41
  export default STextTruncation;
@@ -1 +1 @@
1
- {"version":3,"file":"s-text-truncation.d.ts","sourceRoot":"","sources":["../../src/s-text-truncation/s-text-truncation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAA+B,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI3G;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,SAAS,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0CAA0C;IAC1C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,qCAAqC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,4CAA4C;IAC5C,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,4CAA4C;IAC5C,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe;0HAWzB,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;CA6D1C,CAAC;AAIF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"s-text-truncation.d.ts","sourceRoot":"","sources":["../../src/s-text-truncation/s-text-truncation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAA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