@indra-inter/neobrutalism-components 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1330 -0
- package/dist/module/assets/avatar-profile.png +0 -0
- package/dist/module/components/accordion/accordion.js +203 -0
- package/dist/module/components/accordion/accordion.js.map +1 -0
- package/dist/module/components/app-bar/app-bar.js +140 -0
- package/dist/module/components/app-bar/app-bar.js.map +1 -0
- package/dist/module/components/avatar/avatar.js +184 -0
- package/dist/module/components/avatar/avatar.js.map +1 -0
- package/dist/module/components/badge/badge.js +133 -0
- package/dist/module/components/badge/badge.js.map +1 -0
- package/dist/module/components/bottom-navigation/bottom-navigation.js +166 -0
- package/dist/module/components/bottom-navigation/bottom-navigation.js.map +1 -0
- package/dist/module/components/bottom-sheet/bottom-sheet.js +285 -0
- package/dist/module/components/bottom-sheet/bottom-sheet.js.map +1 -0
- package/dist/module/components/button/button.js +253 -0
- package/dist/module/components/button/button.js.map +1 -0
- package/dist/module/components/calendar/calendar.js +458 -0
- package/dist/module/components/calendar/calendar.js.map +1 -0
- package/dist/module/components/call-item/call-item.js +128 -0
- package/dist/module/components/call-item/call-item.js.map +1 -0
- package/dist/module/components/card/card.js +189 -0
- package/dist/module/components/card/card.js.map +1 -0
- package/dist/module/components/chat-list-item/chat-list-item.js +212 -0
- package/dist/module/components/chat-list-item/chat-list-item.js.map +1 -0
- package/dist/module/components/checkbox/checkbox.js +141 -0
- package/dist/module/components/checkbox/checkbox.js.map +1 -0
- package/dist/module/components/dialog/dialog.js +342 -0
- package/dist/module/components/dialog/dialog.js.map +1 -0
- package/dist/module/components/divider/divider.js +41 -0
- package/dist/module/components/divider/divider.js.map +1 -0
- package/dist/module/components/dropdown/dropdown-menu.js +214 -0
- package/dist/module/components/dropdown/dropdown-menu.js.map +1 -0
- package/dist/module/components/dropdown/dropdown.js +616 -0
- package/dist/module/components/dropdown/dropdown.js.map +1 -0
- package/dist/module/components/dropdown/types.js +4 -0
- package/dist/module/components/dropdown/types.js.map +1 -0
- package/dist/module/components/icon-button/icon-button.js +140 -0
- package/dist/module/components/icon-button/icon-button.js.map +1 -0
- package/dist/module/components/input/currency-input.js +60 -0
- package/dist/module/components/input/currency-input.js.map +1 -0
- package/dist/module/components/input/input.js +281 -0
- package/dist/module/components/input/input.js.map +1 -0
- package/dist/module/components/input/otp-input.js +196 -0
- package/dist/module/components/input/otp-input.js.map +1 -0
- package/dist/module/components/input/password-input.js +74 -0
- package/dist/module/components/input/password-input.js.map +1 -0
- package/dist/module/components/input/phone-input.js +68 -0
- package/dist/module/components/input/phone-input.js.map +1 -0
- package/dist/module/components/input/url-input.js +43 -0
- package/dist/module/components/input/url-input.js.map +1 -0
- package/dist/module/components/list-item/list-item.js +148 -0
- package/dist/module/components/list-item/list-item.js.map +1 -0
- package/dist/module/components/pin-code-field/pin-code-field.js +164 -0
- package/dist/module/components/pin-code-field/pin-code-field.js.map +1 -0
- package/dist/module/components/progress/progress.js +261 -0
- package/dist/module/components/progress/progress.js.map +1 -0
- package/dist/module/components/radio/radio.js +135 -0
- package/dist/module/components/radio/radio.js.map +1 -0
- package/dist/module/components/skeleton/skeleton.js +328 -0
- package/dist/module/components/skeleton/skeleton.js.map +1 -0
- package/dist/module/components/switch/switch.js +170 -0
- package/dist/module/components/switch/switch.js.map +1 -0
- package/dist/module/components/tabs/tabs.js +197 -0
- package/dist/module/components/tabs/tabs.js.map +1 -0
- package/dist/module/components/toast/toast-provider.js +117 -0
- package/dist/module/components/toast/toast-provider.js.map +1 -0
- package/dist/module/components/toast/toast.js +154 -0
- package/dist/module/components/toast/toast.js.map +1 -0
- package/dist/module/index.js +38 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/theme/design-tokens.generated.js +379 -0
- package/dist/module/theme/design-tokens.generated.js.map +1 -0
- package/dist/module/theme/theme-provider.js +20 -0
- package/dist/module/theme/theme-provider.js.map +1 -0
- package/dist/module/theme/theme.js +56 -0
- package/dist/module/theme/theme.js.map +1 -0
- package/dist/typescript/components/accordion/accordion.d.ts +40 -0
- package/dist/typescript/components/accordion/accordion.d.ts.map +1 -0
- package/dist/typescript/components/app-bar/app-bar.d.ts +34 -0
- package/dist/typescript/components/app-bar/app-bar.d.ts.map +1 -0
- package/dist/typescript/components/avatar/avatar.d.ts +17 -0
- package/dist/typescript/components/avatar/avatar.d.ts.map +1 -0
- package/dist/typescript/components/badge/badge.d.ts +20 -0
- package/dist/typescript/components/badge/badge.d.ts.map +1 -0
- package/dist/typescript/components/bottom-navigation/bottom-navigation.d.ts +28 -0
- package/dist/typescript/components/bottom-navigation/bottom-navigation.d.ts.map +1 -0
- package/dist/typescript/components/bottom-sheet/bottom-sheet.d.ts +38 -0
- package/dist/typescript/components/bottom-sheet/bottom-sheet.d.ts.map +1 -0
- package/dist/typescript/components/button/button.d.ts +21 -0
- package/dist/typescript/components/button/button.d.ts.map +1 -0
- package/dist/typescript/components/calendar/calendar.d.ts +41 -0
- package/dist/typescript/components/calendar/calendar.d.ts.map +1 -0
- package/dist/typescript/components/call-item/call-item.d.ts +21 -0
- package/dist/typescript/components/call-item/call-item.d.ts.map +1 -0
- package/dist/typescript/components/card/card.d.ts +37 -0
- package/dist/typescript/components/card/card.d.ts.map +1 -0
- package/dist/typescript/components/chat-list-item/chat-list-item.d.ts +37 -0
- package/dist/typescript/components/chat-list-item/chat-list-item.d.ts.map +1 -0
- package/dist/typescript/components/checkbox/checkbox.d.ts +15 -0
- package/dist/typescript/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/typescript/components/dialog/dialog.d.ts +34 -0
- package/dist/typescript/components/dialog/dialog.d.ts.map +1 -0
- package/dist/typescript/components/divider/divider.d.ts +10 -0
- package/dist/typescript/components/divider/divider.d.ts.map +1 -0
- package/dist/typescript/components/dropdown/dropdown-menu.d.ts +27 -0
- package/dist/typescript/components/dropdown/dropdown-menu.d.ts.map +1 -0
- package/dist/typescript/components/dropdown/dropdown.d.ts +4 -0
- package/dist/typescript/components/dropdown/dropdown.d.ts.map +1 -0
- package/dist/typescript/components/dropdown/types.d.ts +52 -0
- package/dist/typescript/components/dropdown/types.d.ts.map +1 -0
- package/dist/typescript/components/icon-button/icon-button.d.ts +20 -0
- package/dist/typescript/components/icon-button/icon-button.d.ts.map +1 -0
- package/dist/typescript/components/input/currency-input.d.ts +10 -0
- package/dist/typescript/components/input/currency-input.d.ts.map +1 -0
- package/dist/typescript/components/input/input.d.ts +32 -0
- package/dist/typescript/components/input/input.d.ts.map +1 -0
- package/dist/typescript/components/input/otp-input.d.ts +23 -0
- package/dist/typescript/components/input/otp-input.d.ts.map +1 -0
- package/dist/typescript/components/input/password-input.d.ts +14 -0
- package/dist/typescript/components/input/password-input.d.ts.map +1 -0
- package/dist/typescript/components/input/phone-input.d.ts +13 -0
- package/dist/typescript/components/input/phone-input.d.ts.map +1 -0
- package/dist/typescript/components/input/url-input.d.ts +10 -0
- package/dist/typescript/components/input/url-input.d.ts.map +1 -0
- package/dist/typescript/components/list-item/list-item.d.ts +30 -0
- package/dist/typescript/components/list-item/list-item.d.ts.map +1 -0
- package/dist/typescript/components/pin-code-field/pin-code-field.d.ts +25 -0
- package/dist/typescript/components/pin-code-field/pin-code-field.d.ts.map +1 -0
- package/dist/typescript/components/progress/progress.d.ts +18 -0
- package/dist/typescript/components/progress/progress.d.ts.map +1 -0
- package/dist/typescript/components/radio/radio.d.ts +12 -0
- package/dist/typescript/components/radio/radio.d.ts.map +1 -0
- package/dist/typescript/components/skeleton/skeleton.d.ts +16 -0
- package/dist/typescript/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/typescript/components/switch/switch.d.ts +12 -0
- package/dist/typescript/components/switch/switch.d.ts.map +1 -0
- package/dist/typescript/components/tabs/tabs.d.ts +37 -0
- package/dist/typescript/components/tabs/tabs.d.ts.map +1 -0
- package/dist/typescript/components/toast/toast-provider.d.ts +22 -0
- package/dist/typescript/components/toast/toast-provider.d.ts.map +1 -0
- package/dist/typescript/components/toast/toast.d.ts +15 -0
- package/dist/typescript/components/toast/toast.d.ts.map +1 -0
- package/dist/typescript/index.d.ts +36 -0
- package/dist/typescript/index.d.ts.map +1 -0
- package/dist/typescript/package.json +1 -0
- package/dist/typescript/theme/design-tokens.generated.d.ts +375 -0
- package/dist/typescript/theme/design-tokens.generated.d.ts.map +1 -0
- package/dist/typescript/theme/theme-provider.d.ts +8 -0
- package/dist/typescript/theme/theme-provider.d.ts.map +1 -0
- package/dist/typescript/theme/theme.d.ts +52 -0
- package/dist/typescript/theme/theme.d.ts.map +1 -0
- package/package.json +88 -0
- package/tokens.css +132 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export function Tabs({
|
|
8
|
+
accessibilityLabel = 'Tabs',
|
|
9
|
+
border = 'all',
|
|
10
|
+
containerStyle,
|
|
11
|
+
contentContainerStyle,
|
|
12
|
+
defaultValue,
|
|
13
|
+
itemRadius,
|
|
14
|
+
itemRounded = 'sharp',
|
|
15
|
+
items,
|
|
16
|
+
itemStyle,
|
|
17
|
+
labelStyle,
|
|
18
|
+
layout = 'scroll',
|
|
19
|
+
onValueChange,
|
|
20
|
+
rounded = 'rounded',
|
|
21
|
+
selectedItemStyle,
|
|
22
|
+
selectedLabelStyle,
|
|
23
|
+
shadow = false,
|
|
24
|
+
style,
|
|
25
|
+
value,
|
|
26
|
+
variant = 'primary'
|
|
27
|
+
}) {
|
|
28
|
+
const activeTheme = useTheme();
|
|
29
|
+
const styles = createStyles(activeTheme);
|
|
30
|
+
const selectedBackgroundColor = resolveSelectedBackgroundColor(variant, activeTheme);
|
|
31
|
+
const selectedLabelColor = resolveSelectedLabelColor(variant, activeTheme);
|
|
32
|
+
const resolvedRadius = resolveRadius(rounded, activeTheme);
|
|
33
|
+
const resolvedItemRadius = itemRadius ?? resolveRadius(itemRounded, activeTheme);
|
|
34
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue ?? items.find(item => !item.disabled)?.value);
|
|
35
|
+
const selectedValue = value ?? uncontrolledValue;
|
|
36
|
+
function selectValue(item) {
|
|
37
|
+
if (item.disabled) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (value === undefined) {
|
|
41
|
+
setUncontrolledValue(item.value);
|
|
42
|
+
}
|
|
43
|
+
onValueChange?.(item.value);
|
|
44
|
+
}
|
|
45
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
46
|
+
style: [styles.shadowContainer, shadow && styles.shadowSpacing, containerStyle],
|
|
47
|
+
children: [shadow ? /*#__PURE__*/_jsx(View, {
|
|
48
|
+
pointerEvents: "none",
|
|
49
|
+
style: [styles.hardShadow, {
|
|
50
|
+
borderRadius: resolvedRadius
|
|
51
|
+
}]
|
|
52
|
+
}) : null, /*#__PURE__*/_jsx(ScrollView, {
|
|
53
|
+
accessibilityLabel: accessibilityLabel,
|
|
54
|
+
accessibilityRole: "tablist",
|
|
55
|
+
contentContainerStyle: [styles.list, layout === 'equal' && styles.equalList, contentContainerStyle],
|
|
56
|
+
horizontal: layout === 'scroll',
|
|
57
|
+
showsHorizontalScrollIndicator: false,
|
|
58
|
+
style: [styles.container, {
|
|
59
|
+
borderRadius: resolvedRadius
|
|
60
|
+
}, border === 'all' && styles.allBorder, border === 'bottom' && styles.bottomBorder, style],
|
|
61
|
+
testID: "tabs-list",
|
|
62
|
+
children: items.map(item => {
|
|
63
|
+
const selected = item.value === selectedValue;
|
|
64
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
65
|
+
accessibilityLabel: item.label,
|
|
66
|
+
accessibilityRole: "tab",
|
|
67
|
+
accessibilityState: {
|
|
68
|
+
disabled: item.disabled,
|
|
69
|
+
selected
|
|
70
|
+
},
|
|
71
|
+
disabled: item.disabled,
|
|
72
|
+
onPress: () => selectValue(item),
|
|
73
|
+
style: ({
|
|
74
|
+
pressed
|
|
75
|
+
}) => [styles.trigger, layout === 'equal' && styles.equalTrigger, {
|
|
76
|
+
borderRadius: resolvedItemRadius
|
|
77
|
+
}, itemStyle, selected && [styles.selectedTrigger, {
|
|
78
|
+
backgroundColor: selectedBackgroundColor,
|
|
79
|
+
borderRadius: resolvedItemRadius
|
|
80
|
+
}, selectedItemStyle], item.disabled && styles.disabledTrigger, pressed && !item.disabled && styles.pressedTrigger],
|
|
81
|
+
testID: `tab-${item.value}`,
|
|
82
|
+
children: [item.leading, /*#__PURE__*/_jsx(Text, {
|
|
83
|
+
numberOfLines: 1,
|
|
84
|
+
style: [styles.label, labelStyle, selected && [{
|
|
85
|
+
color: selectedLabelColor
|
|
86
|
+
}, selectedLabelStyle], item.disabled && styles.disabledLabel],
|
|
87
|
+
children: item.label
|
|
88
|
+
}), item.trailing]
|
|
89
|
+
}, item.value);
|
|
90
|
+
})
|
|
91
|
+
})]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function resolveSelectedBackgroundColor(variant, theme) {
|
|
95
|
+
const colors = {
|
|
96
|
+
destructive: theme.colors.destructive,
|
|
97
|
+
info: theme.colors.info,
|
|
98
|
+
neutral: theme.colors.background,
|
|
99
|
+
primary: theme.colors.primaryHover,
|
|
100
|
+
secondary: theme.colors.secondary,
|
|
101
|
+
success: theme.colors.success,
|
|
102
|
+
warning: theme.colors.warning
|
|
103
|
+
};
|
|
104
|
+
return colors[variant];
|
|
105
|
+
}
|
|
106
|
+
function resolveSelectedLabelColor(variant, theme) {
|
|
107
|
+
if (variant === 'secondary') {
|
|
108
|
+
return theme.colors.secondaryForeground;
|
|
109
|
+
}
|
|
110
|
+
if (variant === 'destructive') {
|
|
111
|
+
return theme.colors.destructiveForeground;
|
|
112
|
+
}
|
|
113
|
+
return theme.colors.foreground;
|
|
114
|
+
}
|
|
115
|
+
function resolveRadius(rounded, theme) {
|
|
116
|
+
if (rounded === 'sharp') {
|
|
117
|
+
return 0;
|
|
118
|
+
}
|
|
119
|
+
if (rounded === 'pill') {
|
|
120
|
+
return 9999;
|
|
121
|
+
}
|
|
122
|
+
return theme.border.radius;
|
|
123
|
+
}
|
|
124
|
+
function createStyles(theme) {
|
|
125
|
+
return StyleSheet.create({
|
|
126
|
+
shadowContainer: {
|
|
127
|
+
position: 'relative'
|
|
128
|
+
},
|
|
129
|
+
shadowSpacing: {
|
|
130
|
+
paddingBottom: theme.shadow.offset,
|
|
131
|
+
paddingRight: theme.shadow.offset
|
|
132
|
+
},
|
|
133
|
+
hardShadow: {
|
|
134
|
+
backgroundColor: theme.shadow.color,
|
|
135
|
+
borderRadius: theme.border.radius,
|
|
136
|
+
bottom: 0,
|
|
137
|
+
left: theme.shadow.offset,
|
|
138
|
+
position: 'absolute',
|
|
139
|
+
right: 0,
|
|
140
|
+
top: theme.shadow.offset
|
|
141
|
+
},
|
|
142
|
+
container: {
|
|
143
|
+
backgroundColor: theme.colors.surface,
|
|
144
|
+
flexGrow: 0
|
|
145
|
+
},
|
|
146
|
+
allBorder: {
|
|
147
|
+
borderColor: theme.border.color,
|
|
148
|
+
borderWidth: theme.border.width
|
|
149
|
+
},
|
|
150
|
+
bottomBorder: {
|
|
151
|
+
borderBottomColor: theme.border.color,
|
|
152
|
+
borderBottomWidth: theme.border.width
|
|
153
|
+
},
|
|
154
|
+
list: {
|
|
155
|
+
alignItems: 'center',
|
|
156
|
+
flexDirection: 'row',
|
|
157
|
+
gap: 6,
|
|
158
|
+
minHeight: 40,
|
|
159
|
+
padding: 10
|
|
160
|
+
},
|
|
161
|
+
equalList: {
|
|
162
|
+
flexGrow: 1
|
|
163
|
+
},
|
|
164
|
+
trigger: {
|
|
165
|
+
alignItems: 'center',
|
|
166
|
+
flexDirection: 'row',
|
|
167
|
+
gap: theme.spacing.xs,
|
|
168
|
+
height: 40,
|
|
169
|
+
justifyContent: 'center',
|
|
170
|
+
paddingHorizontal: 8,
|
|
171
|
+
paddingVertical: 8
|
|
172
|
+
},
|
|
173
|
+
equalTrigger: {
|
|
174
|
+
flex: 1
|
|
175
|
+
},
|
|
176
|
+
selectedTrigger: {
|
|
177
|
+
backgroundColor: theme.colors.primaryHover,
|
|
178
|
+
borderWidth: 0
|
|
179
|
+
},
|
|
180
|
+
pressedTrigger: {
|
|
181
|
+
opacity: 0.8
|
|
182
|
+
},
|
|
183
|
+
disabledTrigger: {
|
|
184
|
+
opacity: 0.6
|
|
185
|
+
},
|
|
186
|
+
label: {
|
|
187
|
+
color: theme.colors.foreground,
|
|
188
|
+
fontSize: theme.typography.sm,
|
|
189
|
+
fontWeight: '700',
|
|
190
|
+
lineHeight: 20
|
|
191
|
+
},
|
|
192
|
+
disabledLabel: {
|
|
193
|
+
color: theme.colors.mutedForeground
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","Pressable","ScrollView","StyleSheet","Text","View","useTheme","jsx","_jsx","jsxs","_jsxs","Tabs","accessibilityLabel","border","containerStyle","contentContainerStyle","defaultValue","itemRadius","itemRounded","items","itemStyle","labelStyle","layout","onValueChange","rounded","selectedItemStyle","selectedLabelStyle","shadow","style","value","variant","activeTheme","styles","createStyles","selectedBackgroundColor","resolveSelectedBackgroundColor","selectedLabelColor","resolveSelectedLabelColor","resolvedRadius","resolveRadius","resolvedItemRadius","uncontrolledValue","setUncontrolledValue","find","item","disabled","selectedValue","selectValue","undefined","shadowContainer","shadowSpacing","children","pointerEvents","hardShadow","borderRadius","accessibilityRole","list","equalList","horizontal","showsHorizontalScrollIndicator","container","allBorder","bottomBorder","testID","map","selected","label","accessibilityState","onPress","pressed","trigger","equalTrigger","selectedTrigger","backgroundColor","disabledTrigger","pressedTrigger","leading","numberOfLines","color","disabledLabel","trailing","theme","colors","destructive","info","neutral","background","primary","primaryHover","secondary","success","warning","secondaryForeground","destructiveForeground","foreground","radius","create","position","paddingBottom","offset","paddingRight","bottom","left","right","top","surface","flexGrow","borderColor","borderWidth","width","borderBottomColor","borderBottomWidth","alignItems","flexDirection","gap","minHeight","padding","spacing","xs","height","justifyContent","paddingHorizontal","paddingVertical","flex","opacity","fontSize","typography","sm","fontWeight","lineHeight","mutedForeground"],"sourceRoot":"../../../../src","sources":["components/tabs/tabs.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAwB,OAAO;AAChD,SACEC,SAAS,EACTC,UAAU,EACVC,UAAU,EACVC,IAAI,EAIJC,IAAI,QACC,cAAc;AAGrB,SAASC,QAAQ,QAAQ,+BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA6CtD,OAAO,SAASC,IAAIA,CAAC;EACnBC,kBAAkB,GAAG,MAAM;EAC3BC,MAAM,GAAG,KAAK;EACdC,cAAc;EACdC,qBAAqB;EACrBC,YAAY;EACZC,UAAU;EACVC,WAAW,GAAG,OAAO;EACrBC,KAAK;EACLC,SAAS;EACTC,UAAU;EACVC,MAAM,GAAG,QAAQ;EACjBC,aAAa;EACbC,OAAO,GAAG,SAAS;EACnBC,iBAAiB;EACjBC,kBAAkB;EAClBC,MAAM,GAAG,KAAK;EACdC,KAAK;EACLC,KAAK;EACLC,OAAO,GAAG;AACD,CAAC,EAAE;EACZ,MAAMC,WAAW,GAAGzB,QAAQ,CAAC,CAAC;EAC9B,MAAM0B,MAAM,GAAGC,YAAY,CAACF,WAAW,CAAC;EACxC,MAAMG,uBAAuB,GAAGC,8BAA8B,CAACL,OAAO,EAAEC,WAAW,CAAC;EACpF,MAAMK,kBAAkB,GAAGC,yBAAyB,CAACP,OAAO,EAAEC,WAAW,CAAC;EAC1E,MAAMO,cAAc,GAAGC,aAAa,CAACf,OAAO,EAAEO,WAAW,CAAC;EAC1D,MAAMS,kBAAkB,GAAGvB,UAAU,IAAIsB,aAAa,CA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O,EAAE;MACP0C,UAAU,EAAE,QAAQ;MACpBC,aAAa,EAAE,KAAK;MACpBC,GAAG,EAAEjC,KAAK,CAACoC,OAAO,CAACC,EAAE;MACrBC,MAAM,EAAE,EAAE;MACVC,cAAc,EAAE,QAAQ;MACxBC,iBAAiB,EAAE,CAAC;MACpBC,eAAe,EAAE;IACnB,CAAC;IACDnD,YAAY,EAAE;MACZoD,IAAI,EAAE;IACR,CAAC;IACDnD,eAAe,EAAE;MACfC,eAAe,EAAEQ,KAAK,CAACC,MAAM,CAACM,YAAY;MAC1CoB,WAAW,EAAE;IACf,CAAC;IACDjC,cAAc,EAAE;MACdiD,OAAO,EAAE;IACX,CAAC;IACDlD,eAAe,EAAE;MACfkD,OAAO,EAAE;IACX,CAAC;IACD1D,KAAK,EAAE;MACLY,KAAK,EAAEG,KAAK,CAACC,MAAM,CAACY,UAAU;MAC9B+B,QAAQ,EAAE5C,KAAK,CAAC6C,UAAU,CAACC,EAAE;MAC7BC,UAAU,EAAE,KAAK;MACjBC,UAAU,EAAE;IACd,CAAC;IACDlD,aAAa,EAAE;MACbD,KAAK,EAAEG,KAAK,CAACC,MAAM,CAACgD;IACtB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
|
+
import { Toast } from "./toast.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const DEFAULT_DURATION = 5000;
|
|
9
|
+
const MAX_VISIBLE_TOASTS = 3;
|
|
10
|
+
const ToastContext = /*#__PURE__*/createContext(null);
|
|
11
|
+
export function ToastProvider({
|
|
12
|
+
children,
|
|
13
|
+
offset,
|
|
14
|
+
position = 'top'
|
|
15
|
+
}) {
|
|
16
|
+
const insets = useSafeAreaInsets();
|
|
17
|
+
const [toasts, setToasts] = useState([]);
|
|
18
|
+
const nextId = useRef(0);
|
|
19
|
+
const timers = useRef(new Map());
|
|
20
|
+
const dismiss = useCallback(id => {
|
|
21
|
+
const timer = timers.current.get(id);
|
|
22
|
+
if (timer) {
|
|
23
|
+
clearTimeout(timer);
|
|
24
|
+
timers.current.delete(id);
|
|
25
|
+
}
|
|
26
|
+
setToasts(currentToasts => currentToasts.filter(toast => toast.id !== id));
|
|
27
|
+
}, []);
|
|
28
|
+
const show = useCallback(({
|
|
29
|
+
duration = DEFAULT_DURATION,
|
|
30
|
+
id,
|
|
31
|
+
...options
|
|
32
|
+
}) => {
|
|
33
|
+
const toastId = id ?? `toast-${nextId.current++}`;
|
|
34
|
+
const existingTimer = timers.current.get(toastId);
|
|
35
|
+
if (existingTimer) {
|
|
36
|
+
clearTimeout(existingTimer);
|
|
37
|
+
timers.current.delete(toastId);
|
|
38
|
+
}
|
|
39
|
+
setToasts(currentToasts => {
|
|
40
|
+
const nextToasts = [{
|
|
41
|
+
...options,
|
|
42
|
+
duration,
|
|
43
|
+
id: toastId
|
|
44
|
+
}, ...currentToasts.filter(toast => toast.id !== toastId)];
|
|
45
|
+
const removedToasts = nextToasts.slice(MAX_VISIBLE_TOASTS);
|
|
46
|
+
removedToasts.forEach(toast => {
|
|
47
|
+
const timer = timers.current.get(toast.id);
|
|
48
|
+
if (timer) {
|
|
49
|
+
clearTimeout(timer);
|
|
50
|
+
timers.current.delete(toast.id);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
return nextToasts.slice(0, MAX_VISIBLE_TOASTS);
|
|
54
|
+
});
|
|
55
|
+
if (duration !== null) {
|
|
56
|
+
timers.current.set(toastId, setTimeout(() => dismiss(toastId), duration));
|
|
57
|
+
}
|
|
58
|
+
return toastId;
|
|
59
|
+
}, [dismiss]);
|
|
60
|
+
useEffect(() => () => {
|
|
61
|
+
timers.current.forEach(timer => clearTimeout(timer));
|
|
62
|
+
timers.current.clear();
|
|
63
|
+
}, []);
|
|
64
|
+
const value = useMemo(() => ({
|
|
65
|
+
dismiss,
|
|
66
|
+
show
|
|
67
|
+
}), [dismiss, show]);
|
|
68
|
+
const viewportOffset = offset ?? (position === 'top' ? insets.top : insets.bottom);
|
|
69
|
+
const viewportPosition = position === 'top' ? {
|
|
70
|
+
top: viewportOffset
|
|
71
|
+
} : {
|
|
72
|
+
bottom: viewportOffset
|
|
73
|
+
};
|
|
74
|
+
return /*#__PURE__*/_jsx(ToastContext.Provider, {
|
|
75
|
+
value: value,
|
|
76
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
77
|
+
style: styles.root,
|
|
78
|
+
children: [children, /*#__PURE__*/_jsx(View, {
|
|
79
|
+
pointerEvents: "box-none",
|
|
80
|
+
style: [styles.viewport, viewportPosition],
|
|
81
|
+
testID: "toast-viewport",
|
|
82
|
+
children: toasts.map(toast => /*#__PURE__*/_jsx(Toast, {
|
|
83
|
+
action: toast.action,
|
|
84
|
+
description: toast.description,
|
|
85
|
+
onOpenChange: open => {
|
|
86
|
+
if (!open) {
|
|
87
|
+
dismiss(toast.id);
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
open: true,
|
|
91
|
+
title: toast.title,
|
|
92
|
+
type: toast.type
|
|
93
|
+
}, toast.id))
|
|
94
|
+
})]
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
export function useToast() {
|
|
99
|
+
const value = useContext(ToastContext);
|
|
100
|
+
if (value === null) {
|
|
101
|
+
throw new Error('useToast must be used within a ToastProvider.');
|
|
102
|
+
}
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
const styles = StyleSheet.create({
|
|
106
|
+
root: {
|
|
107
|
+
flex: 1
|
|
108
|
+
},
|
|
109
|
+
viewport: {
|
|
110
|
+
gap: 12,
|
|
111
|
+
left: 16,
|
|
112
|
+
position: 'absolute',
|
|
113
|
+
right: 16,
|
|
114
|
+
zIndex: 1000
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
//# sourceMappingURL=toast-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useCallback","useContext","useEffect","useMemo","useRef","useState","StyleSheet","View","useSafeAreaInsets","Toast","jsx","_jsx","jsxs","_jsxs","DEFAULT_DURATION","MAX_VISIBLE_TOASTS","ToastContext","ToastProvider","children","offset","position","insets","toasts","setToasts","nextId","timers","Map","dismiss","id","timer","current","get","clearTimeout","delete","currentToasts","filter","toast","show","duration","options","toastId","existingTimer","nextToasts","removedToasts","slice","forEach","set","setTimeout","clear","value","viewportOffset","top","bottom","viewportPosition","Provider","style","styles","root","pointerEvents","viewport","testID","map","action","description","onOpenChange","open","title","type","useToast","Error","create","flex","gap","left","right","zIndex"],"sourceRoot":"../../../../src","sources":["components/toast/toast-provider.tsx"],"mappings":";;AAAA,SACEA,aAAa,EACbC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAEH,OAAO;AACd,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,KAAK,QAA0C,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElE,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,kBAAkB,GAAG,CAAC;AAuB5B,MAAMC,YAAY,gBAAGjB,aAAa,CAA2B,IAAI,CAAC;AAElE,OAAO,SAASkB,aAAaA,CAAC;EAC5BC,QAAQ;EACRC,MAAM;EACNC,QAAQ,GAAG;AACO,CAAC,EAAE;EACrB,MAAMC,MAAM,GAAGb,iBAAiB,CAAC,CAAC;EAClC,MAAM,CAACc,MAAM,EAAEC,SAAS,CAAC,GAAGlB,QAAQ,CAAe,EAAE,CAAC;EACtD,MAAMmB,MAAM,GAAGpB,MA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
|
2
|
+
|
|
3
|
+
import * as ToastPrimitive from '@rn-primitives/toast';
|
|
4
|
+
import { Platform, StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { Check, Info, TriangleAlert, X } from 'lucide-react-native';
|
|
6
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const iconComponents = {
|
|
9
|
+
success: Check,
|
|
10
|
+
error: X,
|
|
11
|
+
info: TriangleAlert,
|
|
12
|
+
note: Info
|
|
13
|
+
};
|
|
14
|
+
export function Toast({
|
|
15
|
+
action,
|
|
16
|
+
description,
|
|
17
|
+
onOpenChange,
|
|
18
|
+
open,
|
|
19
|
+
title,
|
|
20
|
+
type = 'success'
|
|
21
|
+
}) {
|
|
22
|
+
const theme = useTheme();
|
|
23
|
+
const styles = createStyles(theme);
|
|
24
|
+
const usesAndroidHardShadow = Platform.OS === 'android';
|
|
25
|
+
const shadowColor = type === 'error' ? theme.colors.destructive : theme.shadow.color;
|
|
26
|
+
const Icon = iconComponents[type];
|
|
27
|
+
const iconColor = type === 'success' ? theme.colors.success : type === 'error' ? theme.colors.destructive : type === 'info' ? theme.colors.warning : theme.colors.info;
|
|
28
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
29
|
+
style: [styles.container, usesAndroidHardShadow && styles.androidShadowContainer],
|
|
30
|
+
children: [usesAndroidHardShadow ? /*#__PURE__*/_jsx(View, {
|
|
31
|
+
pointerEvents: "none",
|
|
32
|
+
style: [styles.androidHardShadow, {
|
|
33
|
+
backgroundColor: shadowColor
|
|
34
|
+
}],
|
|
35
|
+
testID: "toast-hard-shadow"
|
|
36
|
+
}) : null, /*#__PURE__*/_jsxs(ToastPrimitive.Root, {
|
|
37
|
+
open: open,
|
|
38
|
+
onOpenChange: onOpenChange,
|
|
39
|
+
style: [styles.surface, !usesAndroidHardShadow && {
|
|
40
|
+
shadowColor,
|
|
41
|
+
shadowOffset: {
|
|
42
|
+
width: theme.shadow.offset,
|
|
43
|
+
height: theme.shadow.offset
|
|
44
|
+
},
|
|
45
|
+
shadowOpacity: 1,
|
|
46
|
+
shadowRadius: 0
|
|
47
|
+
}],
|
|
48
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
49
|
+
color: iconColor,
|
|
50
|
+
size: 24,
|
|
51
|
+
strokeWidth: 2
|
|
52
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
53
|
+
style: styles.content,
|
|
54
|
+
children: [/*#__PURE__*/_jsx(ToastPrimitive.Title, {
|
|
55
|
+
style: styles.title,
|
|
56
|
+
children: title
|
|
57
|
+
}), /*#__PURE__*/_jsx(ToastPrimitive.Description, {
|
|
58
|
+
style: styles.description,
|
|
59
|
+
children: description
|
|
60
|
+
}), action ? /*#__PURE__*/_jsx(ToastPrimitive.Action, {
|
|
61
|
+
accessibilityLabel: action.label,
|
|
62
|
+
onPress: action.onPress,
|
|
63
|
+
style: styles.action,
|
|
64
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
65
|
+
style: styles.actionLabel,
|
|
66
|
+
children: action.label
|
|
67
|
+
})
|
|
68
|
+
}) : null]
|
|
69
|
+
}), /*#__PURE__*/_jsx(ToastPrimitive.Close, {
|
|
70
|
+
accessibilityLabel: "Close toast",
|
|
71
|
+
style: styles.close,
|
|
72
|
+
children: /*#__PURE__*/_jsx(X, {
|
|
73
|
+
color: theme.colors.foreground,
|
|
74
|
+
size: 24,
|
|
75
|
+
strokeWidth: 2
|
|
76
|
+
})
|
|
77
|
+
})]
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function createStyles(theme) {
|
|
82
|
+
return StyleSheet.create({
|
|
83
|
+
container: {
|
|
84
|
+
alignSelf: 'stretch',
|
|
85
|
+
maxWidth: 400
|
|
86
|
+
},
|
|
87
|
+
androidShadowContainer: {
|
|
88
|
+
paddingBottom: theme.shadow.offset,
|
|
89
|
+
paddingRight: theme.shadow.offset,
|
|
90
|
+
position: 'relative'
|
|
91
|
+
},
|
|
92
|
+
androidHardShadow: {
|
|
93
|
+
borderRadius: theme.border.radius,
|
|
94
|
+
bottom: 0,
|
|
95
|
+
left: theme.shadow.offset,
|
|
96
|
+
position: 'absolute',
|
|
97
|
+
right: 0,
|
|
98
|
+
top: theme.shadow.offset
|
|
99
|
+
},
|
|
100
|
+
surface: {
|
|
101
|
+
alignItems: 'flex-start',
|
|
102
|
+
backgroundColor: theme.colors.surface,
|
|
103
|
+
borderColor: theme.border.color,
|
|
104
|
+
borderRadius: theme.border.radius,
|
|
105
|
+
borderWidth: 3,
|
|
106
|
+
flexDirection: 'row',
|
|
107
|
+
gap: theme.spacing.md,
|
|
108
|
+
marginBottom: Platform.OS === 'ios' ? theme.shadow.offset : 0,
|
|
109
|
+
marginRight: Platform.OS === 'ios' ? theme.shadow.offset : 0,
|
|
110
|
+
maxWidth: 390,
|
|
111
|
+
padding: theme.spacing.md
|
|
112
|
+
},
|
|
113
|
+
content: {
|
|
114
|
+
flex: 1,
|
|
115
|
+
gap: 6,
|
|
116
|
+
minWidth: 0
|
|
117
|
+
},
|
|
118
|
+
title: {
|
|
119
|
+
color: theme.colors.foreground,
|
|
120
|
+
fontSize: theme.typography.md,
|
|
121
|
+
fontWeight: '700',
|
|
122
|
+
lineHeight: 24
|
|
123
|
+
},
|
|
124
|
+
description: {
|
|
125
|
+
color: theme.colors.foreground,
|
|
126
|
+
fontSize: theme.typography.md,
|
|
127
|
+
lineHeight: 24
|
|
128
|
+
},
|
|
129
|
+
action: {
|
|
130
|
+
alignItems: 'center',
|
|
131
|
+
alignSelf: 'flex-start',
|
|
132
|
+
backgroundColor: theme.colors.secondary,
|
|
133
|
+
borderColor: theme.border.color,
|
|
134
|
+
borderWidth: theme.border.width,
|
|
135
|
+
height: 40,
|
|
136
|
+
justifyContent: 'center',
|
|
137
|
+
marginTop: 4,
|
|
138
|
+
paddingHorizontal: 18
|
|
139
|
+
},
|
|
140
|
+
actionLabel: {
|
|
141
|
+
color: theme.colors.secondaryForeground,
|
|
142
|
+
fontSize: theme.typography.sm,
|
|
143
|
+
fontWeight: '700',
|
|
144
|
+
lineHeight: 20
|
|
145
|
+
},
|
|
146
|
+
close: {
|
|
147
|
+
alignItems: 'center',
|
|
148
|
+
height: 24,
|
|
149
|
+
justifyContent: 'center',
|
|
150
|
+
width: 24
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ToastPrimitive","Platform","StyleSheet","Text","View","Check","Info","TriangleAlert","X","useTheme","jsx","_jsx","jsxs","_jsxs","iconComponents","success","error","info","note","Toast","action","description","onOpenChange","open","title","type","theme","styles","createStyles","usesAndroidHardShadow","OS","shadowColor","colors","destructive","shadow","color","Icon","iconColor","warning","style","container","androidShadowContainer","children","pointerEvents","androidHardShadow","backgroundColor","testID","Root","surface","shadowOffset","width","offset","height","shadowOpacity","shadowRadius","size","strokeWidth","content","Title","Description","Action","accessibilityLabel","label","onPress","actionLabel","Close","close","foreground","create","alignSelf","maxWidth","paddingBottom","paddingRight","position","borderRadius","border","radius","bottom","left","right","top","alignItems","borderColor","borderWidth","flexDirection","gap","spacing","md","marginBottom","marginRight","padding","flex","minWidth","fontSize","typography","fontWeight","lineHeight","secondary","justifyContent","marginTop","paddingHorizontal","secondaryForeground","sm"],"sourceRoot":"../../../../src","sources":["components/toast/toast.tsx"],"mappings":";;AAAA,OAAO,KAAKA,cAAc,MAAM,sBAAsB;AACtD,SACEC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,IAAI,QACC,cAAc;AACrB,SAASC,KAAK,EAAEC,IAAI,EAAEC,aAAa,EAAEC,CAAC,QAAQ,qBAAqB;AAGnE,SAASC,QAAQ,QAAQ,+BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAkBtD,MAAMC,cAAc,GAAG;E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,EAAE,QAAQ;MACxBhD,KAAK,EAAE;IACT;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export { Button } from "./components/button/button.js";
|
|
4
|
+
export { IconButton } from "./components/icon-button/icon-button.js";
|
|
5
|
+
export { createTheme, theme } from "./theme/theme.js";
|
|
6
|
+
export { ThemeProvider, useTheme } from "./theme/theme-provider.js";
|
|
7
|
+
export { defaultDesignTokenModes, designTokens } from "./theme/design-tokens.generated.js";
|
|
8
|
+
export { Badge } from "./components/badge/badge.js";
|
|
9
|
+
export { Input, TextArea } from "./components/input/input.js";
|
|
10
|
+
export { PasswordInput } from "./components/input/password-input.js";
|
|
11
|
+
export { CurrencyInput } from "./components/input/currency-input.js";
|
|
12
|
+
export { OtpInput } from "./components/input/otp-input.js";
|
|
13
|
+
export { PinCodeField } from "./components/pin-code-field/pin-code-field.js";
|
|
14
|
+
export { PhoneInput } from "./components/input/phone-input.js";
|
|
15
|
+
export { UrlInput } from "./components/input/url-input.js";
|
|
16
|
+
export { Dropdown } from "./components/dropdown/dropdown.js";
|
|
17
|
+
export { DropdownMenu } from "./components/dropdown/dropdown-menu.js";
|
|
18
|
+
export { Checkbox } from "./components/checkbox/checkbox.js";
|
|
19
|
+
export { Radio } from "./components/radio/radio.js";
|
|
20
|
+
export { Switch } from "./components/switch/switch.js";
|
|
21
|
+
export { Avatar } from "./components/avatar/avatar.js";
|
|
22
|
+
export { Toast } from "./components/toast/toast.js";
|
|
23
|
+
export { ToastProvider, useToast } from "./components/toast/toast-provider.js";
|
|
24
|
+
export { ConfirmDialog, Dialog, DialogBody, DialogFooter, DialogHeader, DialogProvider } from "./components/dialog/dialog.js";
|
|
25
|
+
export { BottomSheet, BottomSheetBody, BottomSheetFooter, BottomSheetHeader } from "./components/bottom-sheet/bottom-sheet.js";
|
|
26
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./components/card/card.js";
|
|
27
|
+
export { Tabs } from "./components/tabs/tabs.js";
|
|
28
|
+
export { ListItem } from "./components/list-item/list-item.js";
|
|
29
|
+
export { Divider } from "./components/divider/divider.js";
|
|
30
|
+
export { CallItem } from "./components/call-item/call-item.js";
|
|
31
|
+
export { ChatListItem } from "./components/chat-list-item/chat-list-item.js";
|
|
32
|
+
export { Progress } from "./components/progress/progress.js";
|
|
33
|
+
export { Accordion } from "./components/accordion/accordion.js";
|
|
34
|
+
export { AppBar } from "./components/app-bar/app-bar.js";
|
|
35
|
+
export { Calendar } from "./components/calendar/calendar.js";
|
|
36
|
+
export { BottomNavigation } from "./components/bottom-navigation/bottom-navigation.js";
|
|
37
|
+
export { Skeleton } from "./components/skeleton/skeleton.js";
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Button","IconButton","createTheme","theme","ThemeProvider","useTheme","defaultDesignTokenModes","designTokens","Badge","Input","TextArea","PasswordInput","CurrencyInput","OtpInput","PinCodeField","PhoneInput","UrlInput","Dropdown","DropdownMenu","Checkbox","Radio","Switch","Avatar","Toast","ToastProvider","useToast","ConfirmDialog","Dialog","DialogBody","DialogFooter","DialogHeader","DialogProvider","BottomSheet","BottomSheetBody","BottomSheetFooter","BottomSheetHeader","Card","CardAction","CardContent","CardDescription","CardFooter","CardHeader","CardTitle","Tabs","ListItem","Divider","CallItem","ChatListItem","Progress","Accordion","AppBar","Calendar","BottomNavigation","Skeleton"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SACEA,MAAM,QAKD,+BAA4B;AACnC,SACEC,UAAU,QAIL,yCAAsC;AAC7C,SACEC,WAAW,EACXC,KAAK,QAGA,kBAAe;AACtB,SACEC,aAAa,EACbC,QAAQ,QAEH,2BAAwB;AAC/B,SACEC,uBAAuB,EACvBC,YAAY,QACP,oCAAiC;AACxC,SACEC,KAAK,QAKA,6BAA0B;AACjC,SACEC,KAAK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