@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,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform, Pressable, StyleSheet, Text, View } from 'react-native';
|
|
4
|
+
import { cssInterop } from 'nativewind';
|
|
5
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
export function PinCodeField({
|
|
8
|
+
accessibilityLabel = 'PIN code',
|
|
9
|
+
active = false,
|
|
10
|
+
activeSlotStyle,
|
|
11
|
+
disabled,
|
|
12
|
+
dotStyle,
|
|
13
|
+
error = false,
|
|
14
|
+
length = 6,
|
|
15
|
+
masked = true,
|
|
16
|
+
onPress,
|
|
17
|
+
radius,
|
|
18
|
+
rounded = 'rounded',
|
|
19
|
+
shadow = true,
|
|
20
|
+
shadowColor,
|
|
21
|
+
shadowOffset,
|
|
22
|
+
slotStyle,
|
|
23
|
+
style,
|
|
24
|
+
textStyle,
|
|
25
|
+
value,
|
|
26
|
+
...props
|
|
27
|
+
}) {
|
|
28
|
+
const theme = useTheme();
|
|
29
|
+
const styles = createStyles(theme);
|
|
30
|
+
const isDisabled = disabled ?? false;
|
|
31
|
+
const resolvedLength = Math.max(1, length);
|
|
32
|
+
const visibleValue = value.slice(0, length);
|
|
33
|
+
const resolvedRadius = radius ?? (rounded === 'rounded' ? theme.border.radius : 0);
|
|
34
|
+
const resolvedShadowColor = shadowColor ?? theme.shadow.color;
|
|
35
|
+
const resolvedShadowOffset = shadowOffset ?? theme.shadow.offset;
|
|
36
|
+
const hasShadow = shadow && !isDisabled && !error;
|
|
37
|
+
const usesAndroidHardShadow = Platform.OS === 'android' && hasShadow;
|
|
38
|
+
const usesIOSNativeShadow = Platform.OS === 'ios' && hasShadow;
|
|
39
|
+
const rootStyle = [styles.root, isDisabled && styles.disabled, style];
|
|
40
|
+
const field = /*#__PURE__*/_jsx(_Fragment, {
|
|
41
|
+
children: Array.from({
|
|
42
|
+
length: resolvedLength
|
|
43
|
+
}).map((_, index) => {
|
|
44
|
+
const character = visibleValue[index];
|
|
45
|
+
const isFilled = character !== undefined;
|
|
46
|
+
const isActiveSlot = active && index === visibleValue.length && !isFilled;
|
|
47
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
48
|
+
style: [styles.slotShadowContainer, usesAndroidHardShadow && {
|
|
49
|
+
paddingBottom: resolvedShadowOffset,
|
|
50
|
+
paddingRight: resolvedShadowOffset
|
|
51
|
+
}],
|
|
52
|
+
children: [usesAndroidHardShadow ? /*#__PURE__*/_jsx(View, {
|
|
53
|
+
pointerEvents: "none",
|
|
54
|
+
style: [styles.androidShadowLayer, {
|
|
55
|
+
backgroundColor: resolvedShadowColor,
|
|
56
|
+
borderRadius: resolvedRadius,
|
|
57
|
+
left: resolvedShadowOffset,
|
|
58
|
+
top: resolvedShadowOffset
|
|
59
|
+
}]
|
|
60
|
+
}) : null, /*#__PURE__*/_jsxs(View, {
|
|
61
|
+
style: [styles.slot, {
|
|
62
|
+
borderRadius: resolvedRadius
|
|
63
|
+
}, usesIOSNativeShadow && {
|
|
64
|
+
shadowColor: resolvedShadowColor,
|
|
65
|
+
shadowOffset: {
|
|
66
|
+
height: resolvedShadowOffset,
|
|
67
|
+
width: resolvedShadowOffset
|
|
68
|
+
},
|
|
69
|
+
shadowOpacity: 1,
|
|
70
|
+
shadowRadius: 0
|
|
71
|
+
}, slotStyle, isActiveSlot && styles.activeSlot, isActiveSlot && activeSlotStyle, error && styles.errorSlot],
|
|
72
|
+
children: [isFilled && masked ? /*#__PURE__*/_jsx(View, {
|
|
73
|
+
style: [styles.dot, error && styles.errorDot, dotStyle]
|
|
74
|
+
}) : null, isFilled && !masked ? /*#__PURE__*/_jsx(Text, {
|
|
75
|
+
style: [styles.character, error && styles.errorCharacter, textStyle],
|
|
76
|
+
children: character
|
|
77
|
+
}) : null]
|
|
78
|
+
})]
|
|
79
|
+
}, index);
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
if (!onPress) {
|
|
83
|
+
return /*#__PURE__*/_jsx(View, {
|
|
84
|
+
accessibilityLabel: accessibilityLabel,
|
|
85
|
+
style: rootStyle,
|
|
86
|
+
...props,
|
|
87
|
+
children: field
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
91
|
+
accessibilityLabel: accessibilityLabel,
|
|
92
|
+
accessibilityRole: "button",
|
|
93
|
+
accessibilityState: {
|
|
94
|
+
disabled: isDisabled
|
|
95
|
+
},
|
|
96
|
+
disabled: isDisabled,
|
|
97
|
+
onPress: onPress,
|
|
98
|
+
style: rootStyle,
|
|
99
|
+
...props,
|
|
100
|
+
children: field
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
cssInterop(PinCodeField, {
|
|
104
|
+
className: 'style',
|
|
105
|
+
slotClassName: 'slotStyle',
|
|
106
|
+
activeSlotClassName: 'activeSlotStyle',
|
|
107
|
+
dotClassName: 'dotStyle'
|
|
108
|
+
});
|
|
109
|
+
function createStyles(theme) {
|
|
110
|
+
return StyleSheet.create({
|
|
111
|
+
androidShadowLayer: {
|
|
112
|
+
bottom: 0,
|
|
113
|
+
position: 'absolute',
|
|
114
|
+
right: 0
|
|
115
|
+
},
|
|
116
|
+
root: {
|
|
117
|
+
flexDirection: 'row',
|
|
118
|
+
gap: theme.spacing.sm,
|
|
119
|
+
justifyContent: 'space-between'
|
|
120
|
+
},
|
|
121
|
+
slot: {
|
|
122
|
+
alignItems: 'center',
|
|
123
|
+
backgroundColor: theme.colors.disabled,
|
|
124
|
+
height: 56,
|
|
125
|
+
justifyContent: 'center',
|
|
126
|
+
minWidth: 0
|
|
127
|
+
},
|
|
128
|
+
slotShadowContainer: {
|
|
129
|
+
flex: 1,
|
|
130
|
+
minWidth: 0,
|
|
131
|
+
position: 'relative'
|
|
132
|
+
},
|
|
133
|
+
activeSlot: {
|
|
134
|
+
borderColor: theme.colors.primary,
|
|
135
|
+
borderWidth: theme.border.width
|
|
136
|
+
},
|
|
137
|
+
errorSlot: {
|
|
138
|
+
borderColor: theme.colors.destructive,
|
|
139
|
+
borderWidth: theme.border.width
|
|
140
|
+
},
|
|
141
|
+
dot: {
|
|
142
|
+
backgroundColor: theme.colors.primary,
|
|
143
|
+
borderRadius: 6,
|
|
144
|
+
height: 12,
|
|
145
|
+
width: 12
|
|
146
|
+
},
|
|
147
|
+
errorDot: {
|
|
148
|
+
backgroundColor: theme.colors.destructive
|
|
149
|
+
},
|
|
150
|
+
character: {
|
|
151
|
+
color: theme.colors.foreground,
|
|
152
|
+
fontSize: theme.typography.lg,
|
|
153
|
+
fontWeight: '700',
|
|
154
|
+
lineHeight: 28
|
|
155
|
+
},
|
|
156
|
+
errorCharacter: {
|
|
157
|
+
color: theme.colors.destructive
|
|
158
|
+
},
|
|
159
|
+
disabled: {
|
|
160
|
+
opacity: 0.6
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=pin-code-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","Pressable","StyleSheet","Text","View","cssInterop","useTheme","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","PinCodeField","accessibilityLabel","active","activeSlotStyle","disabled","dotStyle","error","length","masked","onPress","radius","rounded","shadow","shadowColor","shadowOffset","slotStyle","style","textStyle","value","props","theme","styles","createStyles","isDisabled","resolvedLength","Math","max","visibleValue","slice","resolvedRadius","border","resolvedShadowColor","color","resolvedShadowOffset","offset","hasShadow","usesAndroidHardShadow","OS","usesIOSNativeShadow","rootStyle","root","field","children","Array","from","map","_","index","character","isFilled","undefined","isActiveSlot","slotShadowContainer","paddingBottom","paddingRight","pointerEvents","androidShadowLayer","backgroundColor","borderRadius","left","top","slot","height","width","shadowOpacity","shadowRadius","activeSlot","errorSlot","dot","errorDot","errorCharacter","accessibilityRole","accessibilityState","className","slotClassName","activeSlotClassName","dotClassName","create","bottom","position","right","flexDirection","gap","spacing","sm","justifyContent","alignItems","colors","minWidth","flex","borderColor","primary","borderWidth","destructive","foreground","fontSize","typography","lg","fontWeight","lineHeight","opacity"],"sourceRoot":"../../../../src","sources":["components/pin-code-field/pin-code-field.tsx"],"mappings":";;AAAA,SACEA,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,IAAI,EACJC,IAAI,QAKC,cAAc;AACrB,SAASC,UAAU,QAAQ,YAAY;AAGvC,SAASC,QAAQ,QAAQ,+BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AA0BtD,OAAO,SAASC,YAAYA,CAAC;EAC3BC,kBAAkB,GAAG,UAAU;EAC/BC,MAAM,GAAG,KAAK;EACdC,eAAe;EACfC,QAAQ;EACRC,QAAQ;EACRC,KAAK,GAAG,KAAK;EACbC,MAAM,GAAG,CAAC;EACVC,MAAM,GAAG,IAAI;EACbC,OAAO;EACPC,MAAM;EACNC,OAAO,GAAG,SAAS;EACnBC,MAAM,GAAG,IAAI;EACbC,WAAW;EACXC,YAAY;EACZC,SAAS;EACTC,KAAK;EACLC,SAAS;EACTC,KAAK;EACL,GAAGC;AACc,CAAC,EAAE;EACpB,MAAMC,KAAK,GAAG3B,QAAQ,CAAC,CAAC;EACxB,MAAM4B,MAAM,GAAGC,YAAY,CAACF,KA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AQ;MACxBG,QAAQ,EAAE;IACZ,CAAC;IACDpC,mBAAmB,EAAE;MACnBqC,IAAI,EAAE,CAAC;MACPD,QAAQ,EAAE,CAAC;MACXT,QAAQ,EAAE;IACZ,CAAC;IACDb,UAAU,EAAE;MACVwB,WAAW,EAAEtE,KAAK,CAACmE,MAAM,CAACI,OAAO;MACjCC,WAAW,EAAExE,KAAK,CAACU,MAAM,CAACiC;IAC5B,CAAC;IACDI,SAAS,EAAE;MACTuB,WAAW,EAAEtE,KAAK,CAACmE,MAAM,CAACM,WAAW;MACrCD,WAAW,EAAExE,KAAK,CAACU,MAAM,CAACiC;IAC5B,CAAC;IACDK,GAAG,EAAE;MACHX,eAAe,EAAErC,KAAK,CAACmE,MAAM,CAACI,OAAO;MACrCjC,YAAY,EAAE,CAAC;MACfI,MAAM,EAAE,EAAE;MACVC,KAAK,EAAE;IACT,CAAC;IACDM,QAAQ,EAAE;MACRZ,eAAe,EAAErC,KAAK,CAACmE,MAAM,CAACM;IAChC,CAAC;IACD7C,SAAS,EAAE;MACThB,KAAK,EAAEZ,KAAK,CAACmE,MAAM,CAACO,UAAU;MAC9BC,QAAQ,EAAE3E,KAAK,CAAC4E,UAAU,CAACC,EAAE;MAC7BC,UAAU,EAAE,KAAK;MACjBC,UAAU,EAAE;IACd,CAAC;IACD7B,cAAc,EAAE;MACdtC,KAAK,EAAEZ,KAAK,CAACmE,MAAM,CAACM;IACtB,CAAC;IACDzF,QAAQ,EAAE;MACRgG,OAAO,EAAE;IACX;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
4
|
+
import Svg, { Circle } from 'react-native-svg';
|
|
5
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
const DEFAULT_BAR_HEIGHT = 15;
|
|
8
|
+
const DEFAULT_CIRCULAR_SIZE = 80;
|
|
9
|
+
export function Progress({
|
|
10
|
+
accessibilityLabel,
|
|
11
|
+
barHeight = DEFAULT_BAR_HEIGHT,
|
|
12
|
+
containerStyle,
|
|
13
|
+
indicatorStyle,
|
|
14
|
+
labelStyle,
|
|
15
|
+
max,
|
|
16
|
+
showLabel,
|
|
17
|
+
size = DEFAULT_CIRCULAR_SIZE,
|
|
18
|
+
style,
|
|
19
|
+
trackStyle,
|
|
20
|
+
type = 'bar',
|
|
21
|
+
value
|
|
22
|
+
}) {
|
|
23
|
+
const theme = useTheme();
|
|
24
|
+
const styles = createStyles(theme);
|
|
25
|
+
const {
|
|
26
|
+
percentage,
|
|
27
|
+
resolvedMax,
|
|
28
|
+
resolvedValue
|
|
29
|
+
} = normalizeProgress(value, max);
|
|
30
|
+
const percentLabel = `${Math.round(percentage * 100)}%`;
|
|
31
|
+
const resolvedShowLabel = showLabel ?? type === 'circular';
|
|
32
|
+
const accessibilityProps = {
|
|
33
|
+
accessibilityLabel: accessibilityLabel ?? 'Progress',
|
|
34
|
+
accessibilityRole: 'progressbar',
|
|
35
|
+
accessibilityValue: {
|
|
36
|
+
max: resolvedMax,
|
|
37
|
+
min: 0,
|
|
38
|
+
now: resolvedValue,
|
|
39
|
+
text: percentLabel
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
if (type === 'circular') {
|
|
43
|
+
return /*#__PURE__*/_jsx(CircularProgress, {
|
|
44
|
+
accessibilityProps: accessibilityProps,
|
|
45
|
+
containerStyle: containerStyle,
|
|
46
|
+
label: percentLabel,
|
|
47
|
+
labelStyle: labelStyle,
|
|
48
|
+
percentage: percentage,
|
|
49
|
+
showLabel: resolvedShowLabel,
|
|
50
|
+
size: size,
|
|
51
|
+
style: style,
|
|
52
|
+
trackStyle: trackStyle,
|
|
53
|
+
theme: theme
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return /*#__PURE__*/_jsx(BarProgress, {
|
|
57
|
+
accessibilityProps: accessibilityProps,
|
|
58
|
+
barHeight: barHeight,
|
|
59
|
+
containerStyle: containerStyle,
|
|
60
|
+
indicatorStyle: indicatorStyle,
|
|
61
|
+
percentage: percentage,
|
|
62
|
+
style: style,
|
|
63
|
+
styles: styles,
|
|
64
|
+
trackStyle: trackStyle,
|
|
65
|
+
theme: theme
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function BarProgress({
|
|
69
|
+
accessibilityProps,
|
|
70
|
+
barHeight,
|
|
71
|
+
containerStyle,
|
|
72
|
+
indicatorStyle,
|
|
73
|
+
percentage,
|
|
74
|
+
style,
|
|
75
|
+
styles,
|
|
76
|
+
theme,
|
|
77
|
+
trackStyle
|
|
78
|
+
}) {
|
|
79
|
+
const radius = Math.min(theme.border.radius, barHeight / 2);
|
|
80
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
81
|
+
...accessibilityProps,
|
|
82
|
+
style: [styles.barContainer, containerStyle],
|
|
83
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
84
|
+
pointerEvents: "none",
|
|
85
|
+
style: [styles.barHardShadow, {
|
|
86
|
+
borderRadius: radius
|
|
87
|
+
}],
|
|
88
|
+
testID: "progress-bar-hard-shadow"
|
|
89
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
90
|
+
style: [styles.barTrack, {
|
|
91
|
+
borderRadius: radius,
|
|
92
|
+
height: barHeight
|
|
93
|
+
}, style, trackStyle],
|
|
94
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
95
|
+
style: [styles.barIndicator, percentage === 0 && styles.emptyIndicator, {
|
|
96
|
+
width: `${percentage * 100}%`
|
|
97
|
+
}, indicatorStyle],
|
|
98
|
+
testID: "progress-bar-indicator"
|
|
99
|
+
})
|
|
100
|
+
})]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function CircularProgress({
|
|
104
|
+
accessibilityProps,
|
|
105
|
+
containerStyle,
|
|
106
|
+
label,
|
|
107
|
+
labelStyle,
|
|
108
|
+
percentage,
|
|
109
|
+
showLabel,
|
|
110
|
+
size,
|
|
111
|
+
style,
|
|
112
|
+
theme,
|
|
113
|
+
trackStyle
|
|
114
|
+
}) {
|
|
115
|
+
const styles = createStyles(theme);
|
|
116
|
+
const resolvedSize = Math.max(1, size);
|
|
117
|
+
const borderWidth = theme.border.width;
|
|
118
|
+
const innerSize = resolvedSize * 0.75;
|
|
119
|
+
const strokeWidth = Math.max(4, resolvedSize * 0.06);
|
|
120
|
+
const ringRadius = Math.max(0, (resolvedSize - borderWidth * 2 - strokeWidth) / 2);
|
|
121
|
+
const circumference = 2 * Math.PI * ringRadius;
|
|
122
|
+
const center = resolvedSize / 2;
|
|
123
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
124
|
+
...accessibilityProps,
|
|
125
|
+
style: [styles.circularContainer, {
|
|
126
|
+
height: resolvedSize + theme.shadow.offset,
|
|
127
|
+
width: resolvedSize + theme.shadow.offset
|
|
128
|
+
}, containerStyle],
|
|
129
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
130
|
+
pointerEvents: "none",
|
|
131
|
+
style: [styles.circularHardShadow, {
|
|
132
|
+
borderRadius: resolvedSize / 2,
|
|
133
|
+
height: resolvedSize,
|
|
134
|
+
width: resolvedSize
|
|
135
|
+
}],
|
|
136
|
+
testID: "progress-circular-hard-shadow"
|
|
137
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
138
|
+
style: [styles.circularSurface, {
|
|
139
|
+
borderRadius: resolvedSize / 2,
|
|
140
|
+
height: resolvedSize,
|
|
141
|
+
width: resolvedSize
|
|
142
|
+
}, style],
|
|
143
|
+
testID: "progress-circular",
|
|
144
|
+
children: [/*#__PURE__*/_jsxs(Svg, {
|
|
145
|
+
height: resolvedSize,
|
|
146
|
+
pointerEvents: "none",
|
|
147
|
+
style: styles.circularSvg,
|
|
148
|
+
width: resolvedSize,
|
|
149
|
+
children: [/*#__PURE__*/_jsx(Circle, {
|
|
150
|
+
cx: center,
|
|
151
|
+
cy: center,
|
|
152
|
+
fill: "none",
|
|
153
|
+
r: ringRadius,
|
|
154
|
+
stroke: theme.colors.surface,
|
|
155
|
+
strokeWidth: strokeWidth,
|
|
156
|
+
testID: "progress-circular-track"
|
|
157
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
158
|
+
cx: center,
|
|
159
|
+
cy: center,
|
|
160
|
+
fill: "none",
|
|
161
|
+
r: ringRadius,
|
|
162
|
+
stroke: theme.colors.primary,
|
|
163
|
+
strokeDasharray: `${circumference} ${circumference}`,
|
|
164
|
+
strokeDashoffset: circumference * (1 - percentage),
|
|
165
|
+
strokeLinecap: "butt",
|
|
166
|
+
strokeWidth: strokeWidth,
|
|
167
|
+
transform: `rotate(-90 ${center} ${center})`
|
|
168
|
+
})]
|
|
169
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
170
|
+
style: [styles.circularInner, {
|
|
171
|
+
borderRadius: innerSize / 2,
|
|
172
|
+
height: innerSize,
|
|
173
|
+
width: innerSize
|
|
174
|
+
}, trackStyle],
|
|
175
|
+
children: showLabel ? /*#__PURE__*/_jsx(Text, {
|
|
176
|
+
style: [styles.circularLabel, labelStyle],
|
|
177
|
+
children: label
|
|
178
|
+
}) : null
|
|
179
|
+
})]
|
|
180
|
+
})]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function normalizeProgress(value, max) {
|
|
184
|
+
const hasValidMax = typeof max === 'number' && Number.isFinite(max) && max > 0;
|
|
185
|
+
const hasInvalidExplicitMax = max !== undefined && !hasValidMax;
|
|
186
|
+
const resolvedMax = hasValidMax ? max : 100;
|
|
187
|
+
const resolvedValue = !hasInvalidExplicitMax && Number.isFinite(value) ? Math.min(Math.max(value, 0), resolvedMax) : 0;
|
|
188
|
+
return {
|
|
189
|
+
percentage: resolvedValue / resolvedMax,
|
|
190
|
+
resolvedMax,
|
|
191
|
+
resolvedValue
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function createStyles(theme) {
|
|
195
|
+
return StyleSheet.create({
|
|
196
|
+
barContainer: {
|
|
197
|
+
paddingBottom: theme.shadow.offset,
|
|
198
|
+
paddingRight: theme.shadow.offset,
|
|
199
|
+
position: 'relative',
|
|
200
|
+
width: '100%'
|
|
201
|
+
},
|
|
202
|
+
barHardShadow: {
|
|
203
|
+
backgroundColor: theme.shadow.color,
|
|
204
|
+
bottom: 0,
|
|
205
|
+
left: theme.shadow.offset,
|
|
206
|
+
position: 'absolute',
|
|
207
|
+
right: 0,
|
|
208
|
+
top: theme.shadow.offset
|
|
209
|
+
},
|
|
210
|
+
barTrack: {
|
|
211
|
+
backgroundColor: theme.colors.surface,
|
|
212
|
+
borderColor: theme.border.color,
|
|
213
|
+
borderWidth: theme.border.width,
|
|
214
|
+
overflow: 'hidden',
|
|
215
|
+
width: '100%'
|
|
216
|
+
},
|
|
217
|
+
barIndicator: {
|
|
218
|
+
backgroundColor: theme.colors.primary,
|
|
219
|
+
borderRightColor: theme.border.color,
|
|
220
|
+
borderRightWidth: theme.border.width,
|
|
221
|
+
height: '100%'
|
|
222
|
+
},
|
|
223
|
+
circularContainer: {
|
|
224
|
+
position: 'relative'
|
|
225
|
+
},
|
|
226
|
+
circularHardShadow: {
|
|
227
|
+
backgroundColor: theme.shadow.color,
|
|
228
|
+
bottom: 0,
|
|
229
|
+
left: theme.shadow.offset,
|
|
230
|
+
position: 'absolute'
|
|
231
|
+
},
|
|
232
|
+
circularSurface: {
|
|
233
|
+
alignItems: 'center',
|
|
234
|
+
backgroundColor: theme.colors.surface,
|
|
235
|
+
borderColor: theme.border.color,
|
|
236
|
+
borderWidth: theme.border.width,
|
|
237
|
+
justifyContent: 'center',
|
|
238
|
+
overflow: 'hidden'
|
|
239
|
+
},
|
|
240
|
+
circularSvg: {
|
|
241
|
+
position: 'absolute'
|
|
242
|
+
},
|
|
243
|
+
circularInner: {
|
|
244
|
+
alignItems: 'center',
|
|
245
|
+
backgroundColor: theme.colors.surface,
|
|
246
|
+
borderColor: theme.border.color,
|
|
247
|
+
borderWidth: theme.border.width,
|
|
248
|
+
justifyContent: 'center'
|
|
249
|
+
},
|
|
250
|
+
circularLabel: {
|
|
251
|
+
color: theme.colors.foreground,
|
|
252
|
+
fontSize: theme.typography.md,
|
|
253
|
+
fontWeight: '700',
|
|
254
|
+
lineHeight: 24
|
|
255
|
+
},
|
|
256
|
+
emptyIndicator: {
|
|
257
|
+
borderRightWidth: 0
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","Text","View","Svg","Circle","useTheme","jsx","_jsx","jsxs","_jsxs","DEFAULT_BAR_HEIGHT","DEFAULT_CIRCULAR_SIZE","Progress","accessibilityLabel","barHeight","containerStyle","indicatorStyle","labelStyle","max","showLabel","size","style","trackStyle","type","value","theme","styles","createStyles","percentage","resolvedMax","resolvedValue","normalizeProgress","percentLabel","Math","round","resolvedShowLabel","accessibilityProps","accessibilityRole","accessibilityValue","min","now","text","CircularProgress","label","BarProgress","radius","border","barContainer","children","pointerEvents","barHardShadow","borderRadius","testID","barTrack","height","barIndicator","emptyIndicator","width","resolvedSize","borderWidth","innerSize","strokeWidth","ringRadius","circumference","PI","center","circularContainer","shadow","offset","circularHardShadow","circularSurface","circularSvg","cx","cy","fill","r","stroke","colors","surface","primary","strokeDasharray","strokeDashoffset","strokeLinecap","transform","circularInner","circularLabel","hasValidMax","Number","isFinite","hasInvalidExplicitMax","undefined","create","paddingBottom","paddingRight","position","backgroundColor","color","bottom","left","right","top","borderColor","overflow","borderRightColor","borderRightWidth","alignItems","justifyContent","foreground","fontSize","typography","md","fontWeight","lineHeight"],"sourceRoot":"../../../../src","sources":["components/progress/progress.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAwD,cAAc;AACrG,OAAOC,GAAG,IAAIC,MAAM,QAAQ,kBAAkB;AAG9C,S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AAO;MACrCuB,WAAW,EAAE5E,KAAK,CAACqB,MAAM,CAACkD,KAAK;MAC/BrC,WAAW,EAAElC,KAAK,CAACqB,MAAM,CAACW,KAAK;MAC/BiD,cAAc,EAAE,QAAQ;MACxBJ,QAAQ,EAAE;IACZ,CAAC;IACD/B,WAAW,EAAE;MACXuB,QAAQ,EAAE;IACZ,CAAC;IACDV,aAAa,EAAE;MACbqB,UAAU,EAAE,QAAQ;MACpBV,eAAe,EAAEtE,KAAK,CAACoD,MAAM,CAACC,OAAO;MACrCuB,WAAW,EAAE5E,KAAK,CAACqB,MAAM,CAACkD,KAAK;MAC/BrC,WAAW,EAAElC,KAAK,CAACqB,MAAM,CAACW,KAAK;MAC/BiD,cAAc,EAAE;IAClB,CAAC;IACDrB,aAAa,EAAE;MACbW,KAAK,EAAEvE,KAAK,CAACoD,MAAM,CAAC8B,UAAU;MAC9BC,QAAQ,EAAEnF,KAAK,CAACoF,UAAU,CAACC,EAAE;MAC7BC,UAAU,EAAE,KAAK;MACjBC,UAAU,EAAE;IACd,CAAC;IACDxD,cAAc,EAAE;MACdgD,gBAAgB,EAAE;IACpB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform, Pressable, StyleSheet, Text, View } from 'react-native';
|
|
4
|
+
import { cssInterop } from 'nativewind';
|
|
5
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export function Radio({
|
|
8
|
+
accessibilityLabel,
|
|
9
|
+
description,
|
|
10
|
+
disabled,
|
|
11
|
+
label,
|
|
12
|
+
labelPosition = 'right',
|
|
13
|
+
selected = false,
|
|
14
|
+
style,
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
const theme = useTheme();
|
|
18
|
+
const styles = createStyles(theme);
|
|
19
|
+
const isDisabled = disabled ?? false;
|
|
20
|
+
const hasShadow = !isDisabled;
|
|
21
|
+
const usesAndroidHardShadow = Platform.OS === 'android' && hasShadow;
|
|
22
|
+
const usesIOSNativeShadow = Platform.OS === 'ios' && hasShadow;
|
|
23
|
+
const labelContent = label ? /*#__PURE__*/_jsxs(View, {
|
|
24
|
+
style: [styles.labelContainer, isDisabled && styles.disabledLabel],
|
|
25
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
26
|
+
style: styles.label,
|
|
27
|
+
children: label
|
|
28
|
+
}), description ? /*#__PURE__*/_jsx(Text, {
|
|
29
|
+
style: styles.description,
|
|
30
|
+
children: description
|
|
31
|
+
}) : null]
|
|
32
|
+
}) : null;
|
|
33
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
34
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
35
|
+
accessibilityRole: "radio",
|
|
36
|
+
accessibilityState: {
|
|
37
|
+
disabled: isDisabled,
|
|
38
|
+
selected
|
|
39
|
+
},
|
|
40
|
+
disabled: isDisabled,
|
|
41
|
+
style: [styles.root, style],
|
|
42
|
+
...props,
|
|
43
|
+
children: [labelPosition === 'left' ? labelContent : null, /*#__PURE__*/_jsxs(View, {
|
|
44
|
+
style: usesAndroidHardShadow && styles.androidShadowContainer,
|
|
45
|
+
children: [usesAndroidHardShadow ? /*#__PURE__*/_jsx(View, {
|
|
46
|
+
pointerEvents: "none",
|
|
47
|
+
style: styles.androidHardShadow,
|
|
48
|
+
testID: "radio-hard-shadow"
|
|
49
|
+
}) : null, /*#__PURE__*/_jsx(View, {
|
|
50
|
+
style: [styles.circle, selected && styles.selectedCircle, isDisabled && styles.disabledCircle, usesIOSNativeShadow && styles.iosShadow],
|
|
51
|
+
children: selected ? /*#__PURE__*/_jsx(View, {
|
|
52
|
+
style: styles.dot
|
|
53
|
+
}) : null
|
|
54
|
+
})]
|
|
55
|
+
}), labelPosition === 'right' ? labelContent : null]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
cssInterop(Radio, {
|
|
59
|
+
className: 'style'
|
|
60
|
+
});
|
|
61
|
+
function createStyles(theme) {
|
|
62
|
+
return StyleSheet.create({
|
|
63
|
+
root: {
|
|
64
|
+
alignItems: 'flex-start',
|
|
65
|
+
flexDirection: 'row',
|
|
66
|
+
gap: 6
|
|
67
|
+
},
|
|
68
|
+
labelContainer: {
|
|
69
|
+
flex: 1,
|
|
70
|
+
gap: 2,
|
|
71
|
+
paddingTop: 1
|
|
72
|
+
},
|
|
73
|
+
label: {
|
|
74
|
+
color: theme.colors.foreground,
|
|
75
|
+
fontSize: theme.typography.md,
|
|
76
|
+
fontWeight: theme.typography.weight,
|
|
77
|
+
lineHeight: 24
|
|
78
|
+
},
|
|
79
|
+
description: {
|
|
80
|
+
color: theme.colors.mutedForeground,
|
|
81
|
+
fontSize: theme.typography.sm,
|
|
82
|
+
lineHeight: 20
|
|
83
|
+
},
|
|
84
|
+
disabledLabel: {
|
|
85
|
+
opacity: 0.6
|
|
86
|
+
},
|
|
87
|
+
circle: {
|
|
88
|
+
alignItems: 'center',
|
|
89
|
+
backgroundColor: theme.colors.surface,
|
|
90
|
+
borderColor: theme.border.color,
|
|
91
|
+
borderRadius: 12,
|
|
92
|
+
borderWidth: theme.border.width,
|
|
93
|
+
height: 24,
|
|
94
|
+
justifyContent: 'center',
|
|
95
|
+
width: 24
|
|
96
|
+
},
|
|
97
|
+
selectedCircle: {
|
|
98
|
+
backgroundColor: theme.colors.primary
|
|
99
|
+
},
|
|
100
|
+
disabledCircle: {
|
|
101
|
+
borderColor: theme.colors.mutedForeground,
|
|
102
|
+
opacity: 0.6
|
|
103
|
+
},
|
|
104
|
+
dot: {
|
|
105
|
+
backgroundColor: theme.border.color,
|
|
106
|
+
borderRadius: 6,
|
|
107
|
+
height: 12,
|
|
108
|
+
width: 12
|
|
109
|
+
},
|
|
110
|
+
androidShadowContainer: {
|
|
111
|
+
paddingBottom: theme.shadow.xsOffset,
|
|
112
|
+
paddingRight: theme.shadow.xsOffset,
|
|
113
|
+
position: 'relative'
|
|
114
|
+
},
|
|
115
|
+
androidHardShadow: {
|
|
116
|
+
backgroundColor: theme.shadow.color,
|
|
117
|
+
borderRadius: 12,
|
|
118
|
+
bottom: 0,
|
|
119
|
+
left: theme.shadow.xsOffset,
|
|
120
|
+
position: 'absolute',
|
|
121
|
+
right: 0,
|
|
122
|
+
top: theme.shadow.xsOffset
|
|
123
|
+
},
|
|
124
|
+
iosShadow: {
|
|
125
|
+
shadowColor: theme.shadow.color,
|
|
126
|
+
shadowOffset: {
|
|
127
|
+
width: theme.shadow.xsOffset,
|
|
128
|
+
height: theme.shadow.xsOffset
|
|
129
|
+
},
|
|
130
|
+
shadowOpacity: 1,
|
|
131
|
+
shadowRadius: 0
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","Pressable","StyleSheet","Text","View","cssInterop","useTheme","jsx","_jsx","jsxs","_jsxs","Radio","accessibilityLabel","description","disabled","label","labelPosition","selected","style","props","theme","styles","createStyles","isDisabled","hasShadow","usesAndroidHardShadow","OS","usesIOSNativeShadow","labelContent","labelContainer","disabledLabel","children","accessibilityRole","accessibilityState","root","androidShadowContainer","pointerEvents","androidHardShadow","testID","circle","selectedCircle","disabledCircle","iosShadow","dot","className","create","alignItems","flexDirection","gap","flex","paddingTop","color","colors","foreground","fontSize","typography","md","fontWeight","weight","lineHeight","mutedForeground","sm","opacity","backgroundColor","surface","borderColor","border","borderRadius","borderWidth","width","height","justifyContent","primary","paddingBottom","shadow","xsOffset","paddingRight","position","bottom","left","right","top","shadowColor","shadowOffset","shadowOpacity","shadowRadius"],"sourceRoot":"../../../../src","sources":["components/radio/radio.tsx"],"mappings":";;AAAA,SACEA,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,IAAI,EACJC,IAAI,QAIC,cAAc;AACrB,SAASC,UAAU,QAAQ,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