@cdx-ui/components 0.0.1-beta.76 → 0.0.1-beta.77
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/lib/commonjs/components/BottomSheet/index.js +68 -25
- package/lib/commonjs/components/BottomSheet/index.js.map +1 -1
- package/lib/commonjs/components/BottomSheet/styles.js +5 -42
- package/lib/commonjs/components/BottomSheet/styles.js.map +1 -1
- package/lib/commonjs/components/CurrencyInput/index.js +157 -0
- package/lib/commonjs/components/CurrencyInput/index.js.map +1 -0
- package/lib/commonjs/components/CurrencyInput/styles.js +31 -0
- package/lib/commonjs/components/CurrencyInput/styles.js.map +1 -0
- package/lib/commonjs/components/Link/styles.js +1 -1
- package/lib/commonjs/components/Select/styles.js +1 -1
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/index.js +12 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/module/components/BottomSheet/index.js +70 -27
- package/lib/module/components/BottomSheet/index.js.map +1 -1
- package/lib/module/components/BottomSheet/styles.js +4 -42
- package/lib/module/components/BottomSheet/styles.js.map +1 -1
- package/lib/module/components/CurrencyInput/index.js +154 -0
- package/lib/module/components/CurrencyInput/index.js.map +1 -0
- package/lib/module/components/CurrencyInput/styles.js +27 -0
- package/lib/module/components/CurrencyInput/styles.js.map +1 -0
- package/lib/module/components/Link/styles.js +1 -1
- package/lib/module/components/Select/styles.js +1 -1
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet/styles.d.ts +0 -5
- package/lib/typescript/components/BottomSheet/styles.d.ts.map +1 -1
- package/lib/typescript/components/CurrencyInput/index.d.ts +15 -0
- package/lib/typescript/components/CurrencyInput/index.d.ts.map +1 -0
- package/lib/typescript/components/CurrencyInput/styles.d.ts +9 -0
- package/lib/typescript/components/CurrencyInput/styles.d.ts.map +1 -0
- package/lib/typescript/components/Select/styles.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/BottomSheet/index.tsx +99 -42
- package/src/components/BottomSheet/styles.ts +7 -47
- package/src/components/CurrencyInput/index.tsx +192 -0
- package/src/components/CurrencyInput/styles.ts +44 -0
- package/src/components/Link/styles.ts +1 -1
- package/src/components/Select/styles.ts +0 -2
- package/src/components/index.ts +1 -0
|
@@ -8,11 +8,12 @@ exports.useBottomSheet = useBottomSheet;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _reactNative = require("react-native");
|
|
10
10
|
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
11
|
+
var _uniwind = require("uniwind");
|
|
11
12
|
var _bottomSheet = require("@gorhom/bottom-sheet");
|
|
12
13
|
var _utils = require("@cdx-ui/utils");
|
|
13
14
|
var _icons = require("@cdx-ui/icons");
|
|
14
15
|
var _Heading = require("../Heading");
|
|
15
|
-
var
|
|
16
|
+
var _IconButton = require("../IconButton");
|
|
16
17
|
var _Text = require("../Text");
|
|
17
18
|
var _styles = require("./styles");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -37,29 +38,27 @@ function BottomSheetHeaderComponent({
|
|
|
37
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
38
39
|
ref: ref,
|
|
39
40
|
className: computedClassName,
|
|
40
|
-
children: [
|
|
41
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(BottomSheetBackButton, {
|
|
42
|
+
className: (0, _utils.cn)(!onBack && 'opacity-0'),
|
|
41
43
|
onPress: onBack,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
accessibilityLabel: backAccessibilityLabel,
|
|
45
|
-
className: (0, _utils.cn)((0, _styles.bottomSheetBackButtonVariants)()),
|
|
46
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
47
|
-
as: _icons.ArrowBackIosNew,
|
|
48
|
-
className: (0, _styles.bottomSheetBackIconVariants)()
|
|
44
|
+
...(backAccessibilityLabel !== undefined && {
|
|
45
|
+
accessibilityLabel: backAccessibilityLabel
|
|
49
46
|
})
|
|
50
47
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
51
48
|
className: "flex-1",
|
|
52
49
|
children: children ?? (hasTitle ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
53
50
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Heading.Heading, {
|
|
54
|
-
size: "
|
|
55
|
-
className: "text-
|
|
51
|
+
size: "md",
|
|
52
|
+
className: "text-center",
|
|
56
53
|
children: title
|
|
57
54
|
}), subtitle ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Text, {
|
|
58
|
-
|
|
55
|
+
size: "sm",
|
|
56
|
+
className: "text-center text-content-secondary",
|
|
59
57
|
children: subtitle
|
|
60
58
|
}) : null]
|
|
61
59
|
}) : null)
|
|
62
|
-
}),
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(BottomSheetCloseButton, {
|
|
61
|
+
className: (0, _utils.cn)(!onClose && 'opacity-0'),
|
|
63
62
|
onPress: onClose,
|
|
64
63
|
...(closeAccessibilityLabel !== undefined && {
|
|
65
64
|
accessibilityLabel: closeAccessibilityLabel
|
|
@@ -71,6 +70,28 @@ BottomSheetHeaderComponent.displayName = 'BottomSheet.Header';
|
|
|
71
70
|
const BottomSheetHeader = /*#__PURE__*/(0, _react.forwardRef)(BottomSheetHeaderComponent);
|
|
72
71
|
BottomSheetHeader.displayName = 'BottomSheet.Header';
|
|
73
72
|
|
|
73
|
+
// =============================================================================
|
|
74
|
+
// BACKBUTTON
|
|
75
|
+
// =============================================================================
|
|
76
|
+
|
|
77
|
+
function BottomSheetBackButton({
|
|
78
|
+
onPress,
|
|
79
|
+
className,
|
|
80
|
+
accessibilityLabel = 'Go back'
|
|
81
|
+
}) {
|
|
82
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.IconButton, {
|
|
83
|
+
as: _icons.ArrowBack,
|
|
84
|
+
variant: "solid",
|
|
85
|
+
color: "neutral",
|
|
86
|
+
size: "default",
|
|
87
|
+
onPress: onPress,
|
|
88
|
+
hitSlop: 12,
|
|
89
|
+
accessibilityLabel: accessibilityLabel,
|
|
90
|
+
className: className
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
BottomSheetBackButton.displayName = 'BottomSheet.BackButton';
|
|
94
|
+
|
|
74
95
|
// =============================================================================
|
|
75
96
|
// CLOSEBUTTON
|
|
76
97
|
// =============================================================================
|
|
@@ -80,16 +101,15 @@ function BottomSheetCloseButton({
|
|
|
80
101
|
className,
|
|
81
102
|
accessibilityLabel = 'Close'
|
|
82
103
|
}) {
|
|
83
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
104
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.IconButton, {
|
|
105
|
+
as: _icons.Close,
|
|
106
|
+
variant: "solid",
|
|
107
|
+
color: "neutral",
|
|
108
|
+
size: "default",
|
|
84
109
|
onPress: onPress,
|
|
85
110
|
hitSlop: 12,
|
|
86
|
-
accessibilityRole: "button",
|
|
87
111
|
accessibilityLabel: accessibilityLabel,
|
|
88
|
-
className:
|
|
89
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
90
|
-
as: _icons.Close,
|
|
91
|
-
className: (0, _styles.bottomSheetCloseIconVariants)()
|
|
92
|
-
})
|
|
112
|
+
className: className
|
|
93
113
|
});
|
|
94
114
|
}
|
|
95
115
|
BottomSheetCloseButton.displayName = 'BottomSheet.CloseButton';
|
|
@@ -148,6 +168,12 @@ BottomSheetFooter.displayName = 'BottomSheet.Footer';
|
|
|
148
168
|
// =============================================================================
|
|
149
169
|
|
|
150
170
|
const MAX_DYNAMIC_CONTENT_SIZE = _reactNative.Dimensions.get('window').height * 0.9;
|
|
171
|
+
const SHEET_BORDER_RADIUS = 24;
|
|
172
|
+
const sheetContainerStyle = {
|
|
173
|
+
overflow: 'hidden',
|
|
174
|
+
borderTopLeftRadius: SHEET_BORDER_RADIUS,
|
|
175
|
+
borderTopRightRadius: SHEET_BORDER_RADIUS
|
|
176
|
+
};
|
|
151
177
|
const CustomBackdrop = props => {
|
|
152
178
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_bottomSheet.BottomSheetBackdrop, {
|
|
153
179
|
...props,
|
|
@@ -157,27 +183,44 @@ const CustomBackdrop = props => {
|
|
|
157
183
|
pressBehavior: "close"
|
|
158
184
|
});
|
|
159
185
|
};
|
|
186
|
+
const CustomBackground = props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
187
|
+
...props,
|
|
188
|
+
className: (0, _utils.cn)((0, _styles.bottomSheetContainerVariants)())
|
|
189
|
+
});
|
|
160
190
|
const BottomSheetModalStyled = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
161
191
|
handleVisible = true,
|
|
162
192
|
footer,
|
|
193
|
+
onDismiss,
|
|
194
|
+
onChange,
|
|
163
195
|
...rest
|
|
164
196
|
}, ref) => {
|
|
165
197
|
const renderFooter = (0, _react.useCallback)(props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_bottomSheet.BottomSheetFooter, {
|
|
166
198
|
...props,
|
|
167
199
|
children: footer
|
|
168
200
|
}), [footer]);
|
|
201
|
+
const dismissedRef = (0, _react.useRef)(false);
|
|
202
|
+
const handleDismiss = (0, _react.useCallback)(() => {
|
|
203
|
+
if (dismissedRef.current) return;
|
|
204
|
+
dismissedRef.current = true;
|
|
205
|
+
onDismiss?.();
|
|
206
|
+
}, [onDismiss]);
|
|
207
|
+
const handleChange = (0, _react.useCallback)((...args) => {
|
|
208
|
+
dismissedRef.current = false;
|
|
209
|
+
onChange?.(...args);
|
|
210
|
+
}, [onChange]);
|
|
211
|
+
const handleIndicatorStyle = (0, _uniwind.useResolveClassNames)('bg-surface-neutral-subtle w-9 h-1 rounded-full');
|
|
169
212
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_bottomSheet.BottomSheetModal, {
|
|
170
213
|
ref: ref,
|
|
171
214
|
enableDynamicSizing: true,
|
|
172
215
|
maxDynamicContentSize: MAX_DYNAMIC_CONTENT_SIZE,
|
|
216
|
+
style: sheetContainerStyle,
|
|
173
217
|
handleComponent: handleVisible ? undefined : null,
|
|
174
|
-
handleIndicatorStyle: handleVisible ?
|
|
218
|
+
handleIndicatorStyle: handleVisible ? handleIndicatorStyle : undefined,
|
|
175
219
|
backdropComponent: CustomBackdrop,
|
|
176
|
-
backgroundComponent:
|
|
177
|
-
...backgroundProps,
|
|
178
|
-
className: (0, _utils.cn)((0, _styles.bottomSheetContainerVariants)())
|
|
179
|
-
}),
|
|
220
|
+
backgroundComponent: CustomBackground,
|
|
180
221
|
...rest,
|
|
222
|
+
onDismiss: handleDismiss,
|
|
223
|
+
onChange: handleChange,
|
|
181
224
|
...(footer != null && {
|
|
182
225
|
footerComponent: renderFooter
|
|
183
226
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeSafeAreaContext","_bottomSheet","_utils","_icons","_Heading","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeSafeAreaContext","_uniwind","_bottomSheet","_utils","_icons","_Heading","_IconButton","_Text","_styles","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BottomSheetHeaderComponent","title","subtitle","children","className","onClose","closeAccessibilityLabel","onBack","backAccessibilityLabel","ref","hasTitle","undefined","hasContent","computedClassName","cn","bottomSheetHeaderVariants","jsxs","View","jsx","BottomSheetBackButton","onPress","accessibilityLabel","Heading","size","Text","BottomSheetCloseButton","displayName","BottomSheetHeader","forwardRef","IconButton","as","ArrowBack","variant","color","hitSlop","Close","BottomSheetContent","hasSafeAreaInset","style","insets","useSafeAreaInsets","bottomSheetContentVariants","paddingBottom","bottom","pointerEvents","BottomSheetFooter","bottomSheetFooterVariants","Math","max","MAX_DYNAMIC_CONTENT_SIZE","Dimensions","height","SHEET_BORDER_RADIUS","sheetContainerStyle","overflow","borderTopLeftRadius","borderTopRightRadius","CustomBackdrop","props","BottomSheetBackdrop","disappearsOnIndex","appearsOnIndex","opacity","pressBehavior","CustomBackground","bottomSheetContainerVariants","BottomSheetModalStyled","handleVisible","footer","onDismiss","onChange","rest","renderFooter","useCallback","dismissedRef","useRef","handleDismiss","current","handleChange","args","handleIndicatorStyle","useResolveClassNames","BottomSheetModal","enableDynamicSizing","maxDynamicContentSize","handleComponent","backdropComponent","backgroundComponent","footerComponent","BottomSheetScrollViewStyled","enableFooterMarginAdjustment","BottomSheetScrollView","BottomSheetViewStyled","BottomSheetView","BottomSheetModalProvider","BottomSheet","exports","Modal","Header","Content","Footer","Provider","ScrollView","useBottomSheet","present","dismiss"],"sourceRoot":"../../../../src","sources":["components/BottomSheet/index.tsx"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAUA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAKkB,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAD,wBAAAa,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MA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exports.bottomSheetHeaderVariants = exports.bottomSheetFooterVariants = exports.bottomSheetContentVariants = exports.bottomSheetContainerVariants = exports.bottomSheetCloseIconVariants = exports.bottomSheetBackIconVariants = void 0;
|
|
7
7
|
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const bottomSheetContainerVariants = exports.bottomSheetContainerVariants = (0, _classVarianceAuthority.cva)(['rounded-t-3xl border-t border-x overflow-hidden', _primitives.COLOR_BG_PRIMARY, _primitives.COLOR_BORDER_DEFAULT]);
|
|
12
|
-
|
|
13
|
-
// ── Header ─────────────────────────────────────────────────
|
|
14
|
-
|
|
15
|
-
const bottomSheetHeaderVariants = exports.bottomSheetHeaderVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center justify-between min-h-12 px-4 pt-3 pb-2', _primitives.COLOR_BG_PRIMARY, _primitives.COLOR_TEXT_PRIMARY], {
|
|
8
|
+
const bottomSheetContainerVariants = exports.bottomSheetContainerVariants = (0, _classVarianceAuthority.cva)(['rounded-t-3xl overflow-hidden', 'bg-surface-primary']);
|
|
9
|
+
const bottomSheetHeaderVariants = exports.bottomSheetHeaderVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center justify-between min-h-12 px-4 pt-3 pb-2', 'bg-surface-primary', 'text-content-primary'], {
|
|
16
10
|
variants: {
|
|
17
11
|
hasTitle: {
|
|
18
12
|
true: '',
|
|
@@ -23,39 +17,8 @@ const bottomSheetHeaderVariants = exports.bottomSheetHeaderVariants = (0, _class
|
|
|
23
17
|
hasTitle: true
|
|
24
18
|
}
|
|
25
19
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const bottomSheetContentVariants = exports.bottomSheetContentVariants = (0, _classVarianceAuthority.cva)([_primitives.COLOR_BG_PRIMARY, 'px-4 pb-6']);
|
|
30
|
-
|
|
31
|
-
// ── Footer ─────────────────────────────────────────────────
|
|
32
|
-
|
|
33
|
-
const bottomSheetFooterVariants = exports.bottomSheetFooterVariants = (0, _classVarianceAuthority.cva)(['px-4 pt-3 pb-4 border-t', _primitives.COLOR_BG_PRIMARY, _primitives.COLOR_BORDER_DEFAULT]);
|
|
34
|
-
|
|
35
|
-
// ── Subtitle ────────────────────────────────────────────────
|
|
36
|
-
|
|
37
|
-
const bottomSheetSubtitleVariants = exports.bottomSheetSubtitleVariants = (0, _classVarianceAuthority.cva)(['text-sm', _primitives.COLOR_TEXT_SECONDARY]);
|
|
38
|
-
|
|
39
|
-
// ── Back Button ─────────────────────────────────────────────
|
|
40
|
-
|
|
41
|
-
const bottomSheetBackButtonVariants = exports.bottomSheetBackButtonVariants = (0, _classVarianceAuthority.cva)(['p-1 -m-1 mr-2 rounded-full active:opacity-70']);
|
|
20
|
+
const bottomSheetContentVariants = exports.bottomSheetContentVariants = (0, _classVarianceAuthority.cva)(['bg-surface-primary', 'p-5 pb-6']);
|
|
21
|
+
const bottomSheetFooterVariants = exports.bottomSheetFooterVariants = (0, _classVarianceAuthority.cva)(['px-4 pt-3 pb-4 border-t', 'bg-surface-primary', 'border-stroke-secondary']);
|
|
42
22
|
const bottomSheetBackIconVariants = exports.bottomSheetBackIconVariants = (0, _classVarianceAuthority.cva)(['size-5 text-slate-500']);
|
|
43
|
-
|
|
44
|
-
// ── Close Button ───────────────────────────────────────────
|
|
45
|
-
|
|
46
|
-
const bottomSheetCloseButtonVariants = exports.bottomSheetCloseButtonVariants = (0, _classVarianceAuthority.cva)(['p-1 -m-1 rounded-full active:opacity-70']);
|
|
47
|
-
|
|
48
|
-
// ── Close Icon ─────────────────────────────────────────────
|
|
49
|
-
|
|
50
23
|
const bottomSheetCloseIconVariants = exports.bottomSheetCloseIconVariants = (0, _classVarianceAuthority.cva)(['size-5 text-slate-500']);
|
|
51
|
-
|
|
52
|
-
// ── Handle indicator ────────────────────────────────────────
|
|
53
|
-
// Plain ViewStyle — gorhom's handleIndicatorStyle doesn't accept classNames.
|
|
54
|
-
// slate-300 (#cbd5e1) maps to COLOR_BORDER_STRONG; update when raw token palette is available (TODO).
|
|
55
|
-
const handleIndicatorStyle = exports.handleIndicatorStyle = {
|
|
56
|
-
backgroundColor: '#cbd5e1',
|
|
57
|
-
width: 36,
|
|
58
|
-
height: 4,
|
|
59
|
-
borderRadius: 2
|
|
60
|
-
};
|
|
61
24
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classVarianceAuthority","require","
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","bottomSheetContainerVariants","exports","cva","bottomSheetHeaderVariants","variants","hasTitle","true","false","defaultVariants","bottomSheetContentVariants","bottomSheetFooterVariants","bottomSheetBackIconVariants","bottomSheetCloseIconVariants"],"sourceRoot":"../../../../src","sources":["components/BottomSheet/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAEO,MAAMC,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,IAAAE,2BAAG,EAAC,CAC9C,+BAA+B,EAC/B,oBAAoB,CACrB,CAAC;AAEK,MAAMC,yBAAyB,GAAAF,OAAA,CAAAE,yBAAA,GAAG,IAAAD,2BAAG,EAC1C,CACE,+DAA+D,EAC/D,oBAAoB,EACpB,sBAAsB,CACvB,EACD;EACEE,QAAQ,EAAE;IACRC,QAAQ,EAAE;MACRC,IAAI,EAAE,EAAE;MACRC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,QAAQ,EAAE;EACZ;AACF,CACF,CAAC;AAEM,MAAMI,0BAA0B,GAAAR,OAAA,CAAAQ,0BAAA,GAAG,IAAAP,2BAAG,EAAC,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;AAE1E,MAAMQ,yBAAyB,GAAAT,OAAA,CAAAS,yBAAA,GAAG,IAAAR,2BAAG,EAAC,CAC3C,yBAAyB,EACzB,oBAAoB,EACpB,yBAAyB,CAC1B,CAAC;AAEK,MAAMS,2BAA2B,GAAAV,OAAA,CAAAU,2BAAA,GAAG,IAAAT,2BAAG,EAAC,CAAC,uBAAuB,CAAC,CAAC;AAElE,MAAMU,4BAA4B,GAAAX,OAAA,CAAAW,4BAAA,GAAG,IAAAV,2BAAG,EAAC,CAAC,uBAAuB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CurrencyInput = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _primitives = require("@cdx-ui/primitives");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
// Hoisted at module scope — Intl instantiation is expensive (parses locale data).
|
|
13
|
+
const currencyFormatter = new Intl.NumberFormat('en-US', {
|
|
14
|
+
minimumFractionDigits: 2,
|
|
15
|
+
maximumFractionDigits: 2
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// Cap the accumulated cents to 15 digits so the integer stays below
|
|
19
|
+
// Number.MAX_SAFE_INTEGER (16 digits). Past that, parsing loses precision and the
|
|
20
|
+
// amount garbles or resets — 15 digits already allows up to $9,999,999,999,999.99.
|
|
21
|
+
const MAX_DIGITS = 15;
|
|
22
|
+
function centsToAmountDisplay(cents) {
|
|
23
|
+
return currencyFormatter.format(cents / 100);
|
|
24
|
+
}
|
|
25
|
+
function valueToCents(value) {
|
|
26
|
+
return Math.round((value ?? 0) * 100);
|
|
27
|
+
}
|
|
28
|
+
const CurrencyInput = exports.CurrencyInput = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
29
|
+
value,
|
|
30
|
+
onChangeValue,
|
|
31
|
+
currencySymbol = '$',
|
|
32
|
+
size = 'default',
|
|
33
|
+
isDisabled,
|
|
34
|
+
isInvalid,
|
|
35
|
+
isReadOnly,
|
|
36
|
+
isRequired,
|
|
37
|
+
isFocused,
|
|
38
|
+
isHovered,
|
|
39
|
+
isFullWidth,
|
|
40
|
+
className,
|
|
41
|
+
style,
|
|
42
|
+
accessibilityLabel,
|
|
43
|
+
accessibilityHint,
|
|
44
|
+
testID,
|
|
45
|
+
onFocus,
|
|
46
|
+
onBlur
|
|
47
|
+
}, ref) => {
|
|
48
|
+
// null = display mode; number = active editing cents.
|
|
49
|
+
// Calculator-style cents accumulation: digits are always extracted from whatever
|
|
50
|
+
// the user types, interpreted as integer cents, then reformatted. The caret is
|
|
51
|
+
// kept at the end at all times so entry behaves like a banking amount pad — new
|
|
52
|
+
// digits append, backspace removes the rightmost digit.
|
|
53
|
+
const [editingCents, setEditingCents] = (0, _react.useState)(null);
|
|
54
|
+
|
|
55
|
+
// Controlled caret, pinned to the end of the formatted string. `undefined` in
|
|
56
|
+
// display mode so we never fight the platform when the field is not being edited.
|
|
57
|
+
const [selection, setSelection] = (0, _react.useState)();
|
|
58
|
+
const displayCents = editingCents !== null ? editingCents : valueToCents(value);
|
|
59
|
+
const amountDisplay = centsToAmountDisplay(displayCents);
|
|
60
|
+
const fullDisplay = `${currencySymbol}${amountDisplay}`;
|
|
61
|
+
const isEmpty = displayCents === 0;
|
|
62
|
+
|
|
63
|
+
// Index just past the last character of the formatted string for a given cents.
|
|
64
|
+
// Computed from `cents` (not the render-closure `fullDisplay`) so the caret is
|
|
65
|
+
// correct in the same commit as a value change, even when a reformat adds or
|
|
66
|
+
// removes a grouping comma (e.g. 444.44 → 3,444.44) and changes the length.
|
|
67
|
+
const caretIndexFor = cents => `${currencySymbol}${centsToAmountDisplay(cents)}`.length;
|
|
68
|
+
const pinCaret = end => setSelection({
|
|
69
|
+
start: end,
|
|
70
|
+
end
|
|
71
|
+
});
|
|
72
|
+
const handleFocus = e => {
|
|
73
|
+
// Initialise from the current value so existing amounts are preserved on focus.
|
|
74
|
+
const cents = valueToCents(value);
|
|
75
|
+
setEditingCents(cents);
|
|
76
|
+
pinCaret(caretIndexFor(cents));
|
|
77
|
+
onFocus?.(e);
|
|
78
|
+
};
|
|
79
|
+
const handleBlur = e => {
|
|
80
|
+
setEditingCents(null);
|
|
81
|
+
setSelection(undefined);
|
|
82
|
+
onBlur?.(e);
|
|
83
|
+
};
|
|
84
|
+
const handleChangeText = text => {
|
|
85
|
+
// Extract only digit characters, interpret the resulting integer as cents.
|
|
86
|
+
// e.g. user typing '1' after '0.00' → digits '0001' → 1 cent → 0.01
|
|
87
|
+
// Backspace on '1.23' → '1.2' → digits '12' → 12 cents → 0.12
|
|
88
|
+
// Digits past the cap are dropped, so extra keystrokes are ignored rather
|
|
89
|
+
// than overflowing into an unsafe integer.
|
|
90
|
+
const digits = text.replace(/\D/g, '').slice(0, MAX_DIGITS);
|
|
91
|
+
const cents = parseInt(digits || '0', 10);
|
|
92
|
+
setEditingCents(cents);
|
|
93
|
+
pinCaret(caretIndexFor(cents));
|
|
94
|
+
onChangeValue?.(cents / 100);
|
|
95
|
+
};
|
|
96
|
+
const handleSelectionChange = e => {
|
|
97
|
+
// Re-pin the caret to the end ONLY when it drifts to the LEFT of the end while
|
|
98
|
+
// editing — e.g. web hardware-keyboard arrow keys or a click/tap into the middle
|
|
99
|
+
// (native decimal-pad keyboards have no arrow keys, so those platforms rarely
|
|
100
|
+
// trigger this). Value-driven changes already pin the caret via
|
|
101
|
+
// `handleChangeText`/`handleFocus`.
|
|
102
|
+
//
|
|
103
|
+
// Crucially we do NOT touch the caret when it sits at or past the last-rendered
|
|
104
|
+
// end. While typing, the native caret momentarily lands one past our last render
|
|
105
|
+
// (the new value hasn't committed yet); re-pinning there would tug it back to the
|
|
106
|
+
// stale, one-shorter end and yank it one position left — the classic controlled-
|
|
107
|
+
// selection race. Ignoring forward positions sidesteps that entirely, and also
|
|
108
|
+
// prevents a feedback loop (the pin re-emits a selectionChange already at the end).
|
|
109
|
+
if (editingCents === null) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const end = fullDisplay.length;
|
|
113
|
+
const {
|
|
114
|
+
selection: current
|
|
115
|
+
} = e.nativeEvent;
|
|
116
|
+
if (current.end < end) {
|
|
117
|
+
pinCaret(end);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.InputRoot, {
|
|
121
|
+
isDisabled: isDisabled,
|
|
122
|
+
isInvalid: isInvalid,
|
|
123
|
+
isReadOnly: isReadOnly,
|
|
124
|
+
isRequired: isRequired,
|
|
125
|
+
isFocused: isFocused,
|
|
126
|
+
isHovered: isHovered,
|
|
127
|
+
isFullWidth: isFullWidth,
|
|
128
|
+
className: (0, _utils.cn)((0, _styles.currencyInputRootVariants)({
|
|
129
|
+
size
|
|
130
|
+
}), className),
|
|
131
|
+
style: style,
|
|
132
|
+
...(0, _primitives.dataAttributes)({
|
|
133
|
+
slot: 'currency-input'
|
|
134
|
+
}),
|
|
135
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.InputField, {
|
|
136
|
+
ref: ref,
|
|
137
|
+
value: fullDisplay,
|
|
138
|
+
selection: selection,
|
|
139
|
+
onChangeText: handleChangeText,
|
|
140
|
+
onSelectionChange: handleSelectionChange,
|
|
141
|
+
keyboardType: "decimal-pad",
|
|
142
|
+
accessibilityLabel: accessibilityLabel,
|
|
143
|
+
accessibilityHint: accessibilityHint,
|
|
144
|
+
accessibilityValue: {
|
|
145
|
+
text: fullDisplay
|
|
146
|
+
},
|
|
147
|
+
testID: testID,
|
|
148
|
+
onFocus: handleFocus,
|
|
149
|
+
onBlur: handleBlur,
|
|
150
|
+
className: (0, _utils.cn)((0, _styles.currencyInputFieldVariants)({
|
|
151
|
+
size
|
|
152
|
+
}), isEmpty ? 'text-content-tertiary' : 'text-content-primary')
|
|
153
|
+
})
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
CurrencyInput.displayName = 'CurrencyInput';
|
|
157
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_primitives","_utils","_styles","_jsxRuntime","currencyFormatter","Intl","NumberFormat","minimumFractionDigits","maximumFractionDigits","MAX_DIGITS","centsToAmountDisplay","cents","format","valueToCents","value","Math","round","CurrencyInput","exports","forwardRef","onChangeValue","currencySymbol","size","isDisabled","isInvalid","isReadOnly","isRequired","isFocused","isHovered","isFullWidth","className","style","accessibilityLabel","accessibilityHint","testID","onFocus","onBlur","ref","editingCents","setEditingCents","useState","selection","setSelection","displayCents","amountDisplay","fullDisplay","isEmpty","caretIndexFor","length","pinCaret","end","start","handleFocus","e","handleBlur","undefined","handleChangeText","text","digits","replace","slice","parseInt","handleSelectionChange","current","nativeEvent","jsx","InputRoot","cn","currencyInputRootVariants","dataAttributes","slot","children","InputField","onChangeText","onSelectionChange","keyboardType","accessibilityValue","currencyInputFieldVariants","displayName"],"sourceRoot":"../../../../src","sources":["components/CurrencyInput/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAMA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAIkB,IAAAI,WAAA,GAAAJ,OAAA;AAElB;AACA,MAAMK,iBAAiB,GAAG,IAAIC,IAAI,CAACC,YAAY,CAAC,OAAO,EAAE;EACvDC,qBAAqB,EAAE,CAAC;EACxBC,qBAAqB,EAAE;AACzB,CAAC,CAAC;;AAEF;AACA;AACA;AACA,MAAMC,UAAU,GAAG,EAAE;AAErB,SAASC,oBAAoBA,CAACC,KAAa,EAAU;EACnD,OAAOP,iBAAiB,CAACQ,MAAM,CAACD,KAAK,GAAG,GAAG,CAAC;AAC9C;AAEA,SAASE,YAAYA,CAACC,KAAgC,EAAU;EAC9D,OAAOC,IAAI,CAACC,KAAK,CAAC,CAACF,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC;AACvC;AAoBO,MAAMG,aAAa,GAAAC,OAAA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;IAAK,CAAC,CAAC,EAAEQ,SAAS,CAAE;IAC9DC,KAAK,EAAEA,KAAM;IAAA,GACT,IAAAsC,0BAAc,EAAC;MAAEC,IAAI,EAAE;IAAiB,CAAC,CAAC;IAAAC,QAAA,eAE9C,IAAApE,WAAA,CAAA8D,GAAA,EAACjE,WAAA,CAAAwE,UAAmB;MAClBnC,GAAG,EAAEA,GAAI;MACTvB,KAAK,EAAE+B,WAAY;MACnBJ,SAAS,EAAEA,SAAU;MACrBgC,YAAY,EAAEjB,gBAAiB;MAC/BkB,iBAAiB,EAAEZ,qBAAsB;MACzCa,YAAY,EAAC,aAAa;MAC1B3C,kBAAkB,EAAEA,kBAAmB;MACvCC,iBAAiB,EAAEA,iBAAkB;MACrC2C,kBAAkB,EAAE;QAAEnB,IAAI,EAAEZ;MAAY,CAAE;MAC1CX,MAAM,EAAEA,MAAO;MACfC,OAAO,EAAEiB,WAAY;MACrBhB,MAAM,EAAEkB,UAAW;MACnBxB,SAAS,EAAE,IAAAqC,SAAE,EACX,IAAAU,kCAA0B,EAAC;QAAEvD;MAAK,CAAC,CAAC,EACpCwB,OAAO,GAAG,uBAAuB,GAAG,sBACtC;IAAE,CACH;EAAC,CACgB,CAAC;AAEzB,CACF,CAAC;AAED7B,aAAa,CAAC6D,WAAW,GAAG,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.currencyInputRootVariants = exports.currencyInputFieldVariants = void 0;
|
|
7
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
+
var _primitives = require("../../styles/primitives");
|
|
9
|
+
const currencyInputRootVariants = exports.currencyInputRootVariants = (0, _classVarianceAuthority.cva)(['w-full items-center justify-center', 'data-[disabled=true]:opacity-[var(--opacity-disabled)]', _primitives.DISABLED_CURSOR, 'data-[readonly=true]:cursor-default'], {
|
|
10
|
+
variants: {
|
|
11
|
+
size: {
|
|
12
|
+
default: 'py-1',
|
|
13
|
+
small: 'py-0.5'
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
size: 'default'
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const currencyInputFieldVariants = exports.currencyInputFieldVariants = (0, _classVarianceAuthority.cva)(['w-full bg-transparent p-0 text-center', 'placeholder:text-content-tertiary', 'web:outline-none', 'data-[invalid=true]:text-content-danger'], {
|
|
21
|
+
variants: {
|
|
22
|
+
size: {
|
|
23
|
+
default: 'heading-xl',
|
|
24
|
+
small: 'heading-lg'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
size: 'default'
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","_primitives","currencyInputRootVariants","exports","cva","DISABLED_CURSOR","variants","size","default","small","defaultVariants","currencyInputFieldVariants"],"sourceRoot":"../../../../src","sources":["components/CurrencyInput/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEO,MAAME,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,IAAAE,2BAAG,EAC1C,CACE,oCAAoC,EACpC,wDAAwD,EACxDC,2BAAe,EACf,qCAAqC,CACtC,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,MAAM;MACfC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAEM,MAAMI,0BAA0B,GAAAR,OAAA,CAAAQ,0BAAA,GAAG,IAAAP,2BAAG,EAC3C,CACE,uCAAuC,EACvC,mCAAmC,EACnC,kBAAkB,EAClB,yCAAyC,CAC1C,EACD;EACEE,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,YAAY;MACrBC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -45,7 +45,7 @@ const linkNativeUnderlineVariants = exports.linkNativeUnderlineVariants = (0, _c
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
const linkIconVariants = exports.linkIconVariants = (0, _classVarianceAuthority.cva)(['size-4', _reactNative.Platform.select({
|
|
48
|
-
web: 'text-
|
|
48
|
+
web: 'text-current',
|
|
49
49
|
default: 'text-content-link'
|
|
50
50
|
})], {
|
|
51
51
|
variants: {
|
|
@@ -9,7 +9,7 @@ var _classVarianceAuthority = require("class-variance-authority");
|
|
|
9
9
|
var _primitives = require("../../styles/primitives");
|
|
10
10
|
// ── Trigger ─────────────────────────────────────────────────
|
|
11
11
|
|
|
12
|
-
const selectTriggerVariants = exports.selectTriggerVariants = (0, _classVarianceAuthority.cva)(['flex w-full min-w-0 flex-row items-center justify-between text-start', 'bg-surface-primary', 'border border-stroke-primary', 'rounded-[var(--border-radius-default)]', _primitives.TRANSITION_COLORS, 'data-[disabled=true]:bg-surface-secondary', 'data-[disabled=true]:opacity-[var(--opacity-disabled)]', _primitives.DISABLED_CURSOR, 'data-[readonly=true]:cursor-default', 'data-[readonly=true]:bg-surface-secondary', 'web:hover:data-[focus=false]:data-[invalid=false]:border-stroke-hover', 'data-[focus=true]:border-[length:var(--border-width-focused)]', 'data-[focus=true]:data-[invalid=false]:border-stroke-action', 'data-[
|
|
12
|
+
const selectTriggerVariants = exports.selectTriggerVariants = (0, _classVarianceAuthority.cva)(['flex w-full min-w-0 flex-row items-center justify-between text-start', 'bg-surface-primary', 'border border-stroke-primary', 'rounded-[var(--border-radius-default)]', _primitives.TRANSITION_COLORS, 'data-[disabled=true]:bg-surface-secondary', 'data-[disabled=true]:opacity-[var(--opacity-disabled)]', _primitives.DISABLED_CURSOR, 'data-[readonly=true]:cursor-default', 'data-[readonly=true]:bg-surface-secondary', 'web:hover:data-[focus=false]:data-[invalid=false]:border-stroke-hover', 'data-[focus=true]:border-[length:var(--border-width-focused)]', 'data-[focus=true]:data-[invalid=false]:border-stroke-action', 'data-[state=open]:border-[length:var(--border-width-focused)]', 'data-[state=open]:data-[invalid=false]:border-stroke-action', 'data-[invalid=true]:border-stroke-danger'], {
|
|
13
13
|
variants: {
|
|
14
14
|
variant: {
|
|
15
15
|
outline: []
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","_primitives","selectTriggerVariants","exports","cva","TRANSITION_COLORS","DISABLED_CURSOR","variants","variant","outline","size","default","small","defaultVariants","selectValueVariants","selectIconVariants","selectContentVariants","Platform","select","web","selectItemVariants","selectItemLabelVariants"],"sourceRoot":"../../../../src","sources":["components/Select/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA;;AAEO,MAAMG,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,IAAAE,2BAAG,EACtC,CACE,sEAAsE,EACtE,oBAAoB,EACpB,8BAA8B,EAC9B,wCAAwC,EACxCC,6BAAiB,EACjB,2CAA2C,EAC3C,wDAAwD,EACxDC,2BAAe,EACf,qCAAqC,EACrC,2CAA2C,EAC3C,uEAAuE,EACvE,+DAA+D,EAC/D,6DAA6D,EAC7D
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","_primitives","selectTriggerVariants","exports","cva","TRANSITION_COLORS","DISABLED_CURSOR","variants","variant","outline","size","default","small","defaultVariants","selectValueVariants","selectIconVariants","selectContentVariants","Platform","select","web","selectItemVariants","selectItemLabelVariants"],"sourceRoot":"../../../../src","sources":["components/Select/styles.ts"],"mappings":";;;;;;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|
});
|
|
130
|
+
var _CurrencyInput = require("./CurrencyInput");
|
|
131
|
+
Object.keys(_CurrencyInput).forEach(function (key) {
|
|
132
|
+
if (key === "default" || key === "__esModule") return;
|
|
133
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
134
|
+
if (key in exports && exports[key] === _CurrencyInput[key]) return;
|
|
135
|
+
Object.defineProperty(exports, key, {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function () {
|
|
138
|
+
return _CurrencyInput[key];
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
});
|
|
130
142
|
var _Dialog = require("./Dialog");
|
|
131
143
|
Object.keys(_Dialog).forEach(function (key) {
|
|
132
144
|
if (key === "default" || key === "__esModule") return;
|