@dangerousthings/react-native 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/dist/components/DTAccordion.d.ts +75 -0
- package/dist/components/DTAccordion.d.ts.map +1 -0
- package/dist/components/DTAccordion.js +147 -0
- package/dist/components/DTAccordion.js.map +1 -0
- package/dist/components/DTButton.d.ts +68 -0
- package/dist/components/DTButton.d.ts.map +1 -0
- package/dist/components/DTButton.js +59 -0
- package/dist/components/DTButton.js.map +1 -0
- package/dist/components/DTCard.d.ts +97 -0
- package/dist/components/DTCard.d.ts.map +1 -0
- package/dist/components/DTCard.js +81 -0
- package/dist/components/DTCard.js.map +1 -0
- package/dist/components/DTCheckbox.d.ts +63 -0
- package/dist/components/DTCheckbox.d.ts.map +1 -0
- package/dist/components/DTCheckbox.js +55 -0
- package/dist/components/DTCheckbox.js.map +1 -0
- package/dist/components/DTChip.d.ts +40 -0
- package/dist/components/DTChip.d.ts.map +1 -0
- package/dist/components/DTChip.js +55 -0
- package/dist/components/DTChip.js.map +1 -0
- package/dist/components/DTDrawer.d.ts +82 -0
- package/dist/components/DTDrawer.d.ts.map +1 -0
- package/dist/components/DTDrawer.js +146 -0
- package/dist/components/DTDrawer.js.map +1 -0
- package/dist/components/DTGallery.d.ts +83 -0
- package/dist/components/DTGallery.d.ts.map +1 -0
- package/dist/components/DTGallery.js +160 -0
- package/dist/components/DTGallery.js.map +1 -0
- package/dist/components/DTHexagon.d.ts +81 -0
- package/dist/components/DTHexagon.d.ts.map +1 -0
- package/dist/components/DTHexagon.js +110 -0
- package/dist/components/DTHexagon.js.map +1 -0
- package/dist/components/DTLabel.d.ts +100 -0
- package/dist/components/DTLabel.d.ts.map +1 -0
- package/dist/components/DTLabel.js +189 -0
- package/dist/components/DTLabel.js.map +1 -0
- package/dist/components/DTMediaFrame.d.ts +77 -0
- package/dist/components/DTMediaFrame.d.ts.map +1 -0
- package/dist/components/DTMediaFrame.js +84 -0
- package/dist/components/DTMediaFrame.js.map +1 -0
- package/dist/components/DTMenu.d.ts +119 -0
- package/dist/components/DTMenu.d.ts.map +1 -0
- package/dist/components/DTMenu.js +188 -0
- package/dist/components/DTMenu.js.map +1 -0
- package/dist/components/DTModal.d.ts +64 -0
- package/dist/components/DTModal.d.ts.map +1 -0
- package/dist/components/DTModal.js +45 -0
- package/dist/components/DTModal.js.map +1 -0
- package/dist/components/DTProgressBar.d.ts +66 -0
- package/dist/components/DTProgressBar.d.ts.map +1 -0
- package/dist/components/DTProgressBar.js +82 -0
- package/dist/components/DTProgressBar.js.map +1 -0
- package/dist/components/DTQuantityStepper.d.ts +76 -0
- package/dist/components/DTQuantityStepper.d.ts.map +1 -0
- package/dist/components/DTQuantityStepper.js +108 -0
- package/dist/components/DTQuantityStepper.js.map +1 -0
- package/dist/components/DTRadioGroup.d.ts +79 -0
- package/dist/components/DTRadioGroup.d.ts.map +1 -0
- package/dist/components/DTRadioGroup.js +107 -0
- package/dist/components/DTRadioGroup.js.map +1 -0
- package/dist/components/DTSearchInput.d.ts +72 -0
- package/dist/components/DTSearchInput.d.ts.map +1 -0
- package/dist/components/DTSearchInput.js +71 -0
- package/dist/components/DTSearchInput.js.map +1 -0
- package/dist/components/DTSwitch.d.ts +52 -0
- package/dist/components/DTSwitch.d.ts.map +1 -0
- package/dist/components/DTSwitch.js +85 -0
- package/dist/components/DTSwitch.js.map +1 -0
- package/dist/components/DTTextInput.d.ts +58 -0
- package/dist/components/DTTextInput.d.ts.map +1 -0
- package/dist/components/DTTextInput.js +85 -0
- package/dist/components/DTTextInput.js.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/theme/DTThemeProvider.d.ts +49 -0
- package/dist/theme/DTThemeProvider.d.ts.map +1 -0
- package/dist/theme/DTThemeProvider.js +52 -0
- package/dist/theme/DTThemeProvider.js.map +1 -0
- package/dist/theme/colors.d.ts +42 -0
- package/dist/theme/colors.d.ts.map +1 -0
- package/dist/theme/colors.js +59 -0
- package/dist/theme/colors.js.map +1 -0
- package/dist/theme/paperTheme.d.ts +39 -0
- package/dist/theme/paperTheme.d.ts.map +1 -0
- package/dist/theme/paperTheme.js +116 -0
- package/dist/theme/paperTheme.js.map +1 -0
- package/dist/theme/typography.d.ts +57 -0
- package/dist/theme/typography.d.ts.map +1 -0
- package/dist/theme/typography.js +170 -0
- package/dist/theme/typography.js.map +1 -0
- package/dist/utils/bevelPaths.d.ts +42 -0
- package/dist/utils/bevelPaths.d.ts.map +1 -0
- package/dist/utils/bevelPaths.js +105 -0
- package/dist/utils/bevelPaths.js.map +1 -0
- package/dist/utils/useComponentLayout.d.ts +18 -0
- package/dist/utils/useComponentLayout.d.ts.map +1 -0
- package/dist/utils/useComponentLayout.js +24 -0
- package/dist/utils/useComponentLayout.js.map +1 -0
- package/dist/utils/variantColors.d.ts +12 -0
- package/dist/utils/variantColors.d.ts.map +1 -0
- package/dist/utils/variantColors.js +20 -0
- package/dist/utils/variantColors.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* DT ProgressBar Component
|
|
4
|
+
*
|
|
5
|
+
* A themed progress bar wrapping React Native Paper's ProgressBar
|
|
6
|
+
* with the Dangerous Things angular aesthetic.
|
|
7
|
+
*
|
|
8
|
+
* Web CSS reference (.progress / .progress-indicator):
|
|
9
|
+
* - Vertical or horizontal bar showing progress 0-100%
|
|
10
|
+
* - Mode-colored fill
|
|
11
|
+
*/
|
|
12
|
+
import { StyleSheet, View } from 'react-native';
|
|
13
|
+
import { ProgressBar, Text } from 'react-native-paper';
|
|
14
|
+
import { DTColors } from '../theme/colors';
|
|
15
|
+
import { getVariantColor } from '../utils/variantColors';
|
|
16
|
+
import { useComponentLayout } from '../utils/useComponentLayout';
|
|
17
|
+
/**
|
|
18
|
+
* DT-styled ProgressBar wrapping React Native Paper ProgressBar
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <DTProgressBar value={0.75} variant="normal" />
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <DTProgressBar value={0.5} variant="emphasis" showLabel />
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* <DTProgressBar value={0.3} orientation="vertical" height={100} variant="success" />
|
|
28
|
+
*/
|
|
29
|
+
export function DTProgressBar({ value, variant = 'normal', orientation = 'horizontal', height = 4, animated: _animated = true, showLabel = false, color, style, }) {
|
|
30
|
+
const accentColor = getVariantColor(variant, color);
|
|
31
|
+
const clampedValue = Math.max(0, Math.min(1, value));
|
|
32
|
+
if (orientation === 'vertical') {
|
|
33
|
+
return (_jsx(VerticalProgressBar, { value: clampedValue, color: accentColor, width: height, showLabel: showLabel, style: style }));
|
|
34
|
+
}
|
|
35
|
+
return (_jsxs(View, { style: [styles.horizontalContainer, style], children: [_jsx(ProgressBar, { progress: clampedValue, color: accentColor, style: [styles.bar, { height }], theme: {
|
|
36
|
+
colors: {
|
|
37
|
+
surfaceVariant: DTColors.disabledBackground,
|
|
38
|
+
},
|
|
39
|
+
} }), showLabel && (_jsxs(Text, { style: [styles.label, { color: accentColor }], children: [Math.round(clampedValue * 100), "%"] }))] }));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Vertical progress bar using measured pixel height instead of
|
|
43
|
+
* percentage strings (which don't animate smoothly in RN).
|
|
44
|
+
*/
|
|
45
|
+
function VerticalProgressBar({ value, color, width, showLabel, style, }) {
|
|
46
|
+
const { dimensions, onLayout, hasDimensions } = useComponentLayout();
|
|
47
|
+
const fillHeight = hasDimensions ? dimensions.height * value : 0;
|
|
48
|
+
return (_jsxs(View, { style: [styles.verticalContainer, { width }, style], children: [_jsx(View, { style: styles.verticalTrack, onLayout: onLayout, children: _jsx(View, { style: [
|
|
49
|
+
styles.verticalFill,
|
|
50
|
+
{
|
|
51
|
+
backgroundColor: color,
|
|
52
|
+
height: fillHeight,
|
|
53
|
+
},
|
|
54
|
+
] }) }), showLabel && (_jsxs(Text, { style: [styles.label, { color }], children: [Math.round(value * 100), "%"] }))] }));
|
|
55
|
+
}
|
|
56
|
+
const styles = StyleSheet.create({
|
|
57
|
+
horizontalContainer: {
|
|
58
|
+
gap: 8,
|
|
59
|
+
},
|
|
60
|
+
bar: {
|
|
61
|
+
borderRadius: 0,
|
|
62
|
+
},
|
|
63
|
+
verticalContainer: {
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
gap: 8,
|
|
66
|
+
},
|
|
67
|
+
verticalTrack: {
|
|
68
|
+
flex: 1,
|
|
69
|
+
width: '100%',
|
|
70
|
+
backgroundColor: DTColors.disabledBackground,
|
|
71
|
+
justifyContent: 'flex-end',
|
|
72
|
+
},
|
|
73
|
+
verticalFill: {
|
|
74
|
+
width: '100%',
|
|
75
|
+
},
|
|
76
|
+
label: {
|
|
77
|
+
fontSize: 11,
|
|
78
|
+
fontWeight: '600',
|
|
79
|
+
letterSpacing: 0.5,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
//# sourceMappingURL=DTProgressBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DTProgressBar.js","sourceRoot":"","sources":["../../src/components/DTProgressBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAC,UAAU,EAAE,IAAI,EAAuB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAiB,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAC,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AA0C/D;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,KAAK,EACL,OA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
|
|
1
|
+
/**
|
|
2
|
+
* DT QuantityStepper Component
|
|
3
|
+
*
|
|
4
|
+
* Custom-built quantity increment/decrement control following the
|
|
5
|
+
* Dangerous Things design language. No RNP equivalent exists.
|
|
6
|
+
*
|
|
7
|
+
* Web CSS reference (AddOnOptionItem quantity controls):
|
|
8
|
+
* - Plus/minus buttons with beveled corners
|
|
9
|
+
* - Quantity display between buttons
|
|
10
|
+
*/
|
|
11
|
+
import { ViewStyle, StyleProp } from 'react-native';
|
|
12
|
+
import { type DTVariant } from '../utils/variantColors';
|
|
13
|
+
type DTStepperSize = 'small' | 'medium' | 'large';
|
|
14
|
+
interface DTQuantityStepperProps {
|
|
15
|
+
/**
|
|
16
|
+
* Current quantity value
|
|
17
|
+
*/
|
|
18
|
+
value: number;
|
|
19
|
+
/**
|
|
20
|
+
* Called when value changes
|
|
21
|
+
*/
|
|
22
|
+
onValueChange: (value: number) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Minimum value
|
|
25
|
+
* @default 0
|
|
26
|
+
*/
|
|
27
|
+
min?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Maximum value
|
|
30
|
+
* @default 99
|
|
31
|
+
*/
|
|
32
|
+
max?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Step increment
|
|
35
|
+
* @default 1
|
|
36
|
+
*/
|
|
37
|
+
step?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Visual variant
|
|
40
|
+
* @default 'normal'
|
|
41
|
+
*/
|
|
42
|
+
variant?: DTVariant;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the stepper is disabled
|
|
45
|
+
*/
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Label text displayed above the stepper
|
|
49
|
+
*/
|
|
50
|
+
label?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Size preset
|
|
53
|
+
* @default 'medium'
|
|
54
|
+
*/
|
|
55
|
+
size?: DTStepperSize;
|
|
56
|
+
/**
|
|
57
|
+
* Custom color (overrides variant)
|
|
58
|
+
*/
|
|
59
|
+
color?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Additional styles
|
|
62
|
+
*/
|
|
63
|
+
style?: StyleProp<ViewStyle>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* DT-styled QuantityStepper with beveled +/- buttons
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* <DTQuantityStepper value={qty} onValueChange={setQty} label="Quantity" />
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* <DTQuantityStepper value={qty} onValueChange={setQty} min={1} max={10} variant="emphasis" />
|
|
73
|
+
*/
|
|
74
|
+
export declare function DTQuantityStepper({ value, onValueChange, min, max, step, variant, disabled, label, size, color, style, }: DTQuantityStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=DTQuantityStepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DTQuantityStepper.d.ts","sourceRoot":"","sources":["../../src/components/DTQuantityStepper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAmB,SAAS,EAAE,SAAS,EAAY,MAAM,cAAc,CAAC;AAI/E,OAAO,EAAC,KAAK,SAAS,EAAkB,MAAM,wBAAwB,CAAC;AAGvE,KAAK,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAkClD,UAAU,sBAAsB;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,aAAa,EACb,GAAO,EACP,GAAQ,EACR,IAAQ,EACR,OAAkB,EAClB,QAAgB,EAChB,KAAK,EACL,IAAe,EACf,KAAK,EACL,KAAK,GACN,EAAE,sBAAsB,2CAoFxB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* DT QuantityStepper Component
|
|
4
|
+
*
|
|
5
|
+
* Custom-built quantity increment/decrement control following the
|
|
6
|
+
* Dangerous Things design language. No RNP equivalent exists.
|
|
7
|
+
*
|
|
8
|
+
* Web CSS reference (AddOnOptionItem quantity controls):
|
|
9
|
+
* - Plus/minus buttons with beveled corners
|
|
10
|
+
* - Quantity display between buttons
|
|
11
|
+
*/
|
|
12
|
+
import { StyleSheet, View, Pressable } from 'react-native';
|
|
13
|
+
import { Text } from 'react-native-paper';
|
|
14
|
+
import Svg, { Path } from 'react-native-svg';
|
|
15
|
+
import { DTColors } from '../theme/colors';
|
|
16
|
+
import { getVariantColor } from '../utils/variantColors';
|
|
17
|
+
import { buildButtonBevelPath } from '../utils/bevelPaths';
|
|
18
|
+
const sizeConfigs = {
|
|
19
|
+
small: {
|
|
20
|
+
buttonSize: 28,
|
|
21
|
+
fontSize: 12,
|
|
22
|
+
bevelSize: 4,
|
|
23
|
+
iconStrokeWidth: 1.5,
|
|
24
|
+
minWidth: 28,
|
|
25
|
+
},
|
|
26
|
+
medium: {
|
|
27
|
+
buttonSize: 36,
|
|
28
|
+
fontSize: 16,
|
|
29
|
+
bevelSize: 6,
|
|
30
|
+
iconStrokeWidth: 2,
|
|
31
|
+
minWidth: 36,
|
|
32
|
+
},
|
|
33
|
+
large: {
|
|
34
|
+
buttonSize: 44,
|
|
35
|
+
fontSize: 20,
|
|
36
|
+
bevelSize: 8,
|
|
37
|
+
iconStrokeWidth: 2.5,
|
|
38
|
+
minWidth: 44,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* DT-styled QuantityStepper with beveled +/- buttons
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* <DTQuantityStepper value={qty} onValueChange={setQty} label="Quantity" />
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* <DTQuantityStepper value={qty} onValueChange={setQty} min={1} max={10} variant="emphasis" />
|
|
49
|
+
*/
|
|
50
|
+
export function DTQuantityStepper({ value, onValueChange, min = 0, max = 99, step = 1, variant = 'normal', disabled = false, label, size = 'medium', color, style, }) {
|
|
51
|
+
const accentColor = getVariantColor(variant, color);
|
|
52
|
+
const config = sizeConfigs[size];
|
|
53
|
+
const atMin = value <= min;
|
|
54
|
+
const atMax = value >= max;
|
|
55
|
+
const borderWidth = 2;
|
|
56
|
+
const handleDecrement = () => {
|
|
57
|
+
const next = Math.max(min, value - step);
|
|
58
|
+
onValueChange(next);
|
|
59
|
+
};
|
|
60
|
+
const handleIncrement = () => {
|
|
61
|
+
const next = Math.min(max, value + step);
|
|
62
|
+
onValueChange(next);
|
|
63
|
+
};
|
|
64
|
+
const renderStepButton = (type, onPress, isDisabled) => {
|
|
65
|
+
const s = config.buttonSize;
|
|
66
|
+
const center = s / 2;
|
|
67
|
+
const iconSize = s * 0.35;
|
|
68
|
+
const sw = config.iconStrokeWidth;
|
|
69
|
+
// Minus: horizontal line; Plus: cross
|
|
70
|
+
const iconPath = type === 'minus'
|
|
71
|
+
? `M ${center - iconSize} ${center} L ${center + iconSize} ${center}`
|
|
72
|
+
: `M ${center - iconSize} ${center} L ${center + iconSize} ${center} M ${center} ${center - iconSize} L ${center} ${center + iconSize}`;
|
|
73
|
+
// Expand touch target to at least 44px
|
|
74
|
+
const hitSlopSize = Math.max(0, (44 - s) / 2);
|
|
75
|
+
const hitSlop = hitSlopSize > 0 ? hitSlopSize : undefined;
|
|
76
|
+
return (_jsx(Pressable, { onPress: onPress, disabled: disabled || isDisabled, hitSlop: hitSlop, style: ({ pressed }) => ({
|
|
77
|
+
opacity: disabled || isDisabled ? 0.3 : pressed ? 0.7 : 1,
|
|
78
|
+
}), children: _jsxs(Svg, { width: s, height: s, viewBox: `0 0 ${s} ${s}`, children: [_jsx(Path, { d: buildButtonBevelPath(s, s, config.bevelSize, borderWidth), fill: "transparent", stroke: accentColor, strokeWidth: borderWidth }), _jsx(Path, { d: iconPath, fill: "none", stroke: accentColor, strokeWidth: sw, strokeLinecap: "round" })] }) }));
|
|
79
|
+
};
|
|
80
|
+
return (_jsxs(View, { style: [styles.wrapper, style], children: [label && (_jsx(Text, { style: [styles.label, { color: DTColors.light }], children: label })), _jsxs(View, { style: styles.container, children: [renderStepButton('minus', handleDecrement, atMin), _jsx(View, { style: [styles.valueContainer, { minWidth: config.minWidth }], children: _jsx(Text, { style: [
|
|
81
|
+
styles.valueText,
|
|
82
|
+
{ fontSize: config.fontSize, color: accentColor },
|
|
83
|
+
], children: value }) }), renderStepButton('plus', handleIncrement, atMax)] })] }));
|
|
84
|
+
}
|
|
85
|
+
const styles = StyleSheet.create({
|
|
86
|
+
wrapper: {
|
|
87
|
+
gap: 8,
|
|
88
|
+
},
|
|
89
|
+
container: {
|
|
90
|
+
flexDirection: 'row',
|
|
91
|
+
alignItems: 'center',
|
|
92
|
+
gap: 4,
|
|
93
|
+
},
|
|
94
|
+
label: {
|
|
95
|
+
fontSize: 14,
|
|
96
|
+
letterSpacing: 0.3,
|
|
97
|
+
},
|
|
98
|
+
valueContainer: {
|
|
99
|
+
alignItems: 'center',
|
|
100
|
+
justifyContent: 'center',
|
|
101
|
+
paddingHorizontal: 8,
|
|
102
|
+
},
|
|
103
|
+
valueText: {
|
|
104
|
+
fontWeight: '700',
|
|
105
|
+
letterSpacing: 0.5,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
//# sourceMappingURL=DTQuantityStepper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DTQuantityStepper.js","sourceRoot":"","sources":["../../src/components/DTQuantityStepper.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAC,UAAU,EAAE,IAAI,EAAwB,SAAS,EAAC,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,GAAG,EAAE,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAiB,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAYzD,MAAM,WAAW,GAAsC;IACrD,KAAK,EAAE;QACL,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,CAAC;QACZ,eAAe,EAAE,GAAG;QACpB,QAAQ,EAAE,EAAE;KACb;IACD,MAAM,EAAE;QACN,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,CAAC;QACZ,eAAe,EAAE,CAAC;QAClB,QAAQ,EAAE,EAAE;KACb;IACD,KAAK,EAAE;QACL,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,CAAC;QACZ,eAAe,EAAE,GAAG;QACpB,QAAQ,EAAE,EAAE;KACb;CACF,CAAC;AAsDF;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,KAAK,EACL,a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ption Components
|
|
3
|
+
*
|
|
4
|
+
* Custom-built angular radio selection following the Dangerous Things design language.
|
|
5
|
+
* RNP RadioButton uses circular geometry with animated SVG circles,
|
|
6
|
+
* so we build hexagonal indicators from scratch.
|
|
7
|
+
*
|
|
8
|
+
* Web CSS reference (AddOnSelector single-select):
|
|
9
|
+
* - Selected: border highlight + semi-transparent fill (var(--selected) at 70% opacity)
|
|
10
|
+
* - Hexagon indicator instead of circular radio button
|
|
11
|
+
*/
|
|
12
|
+
import { ViewStyle, StyleProp } from 'react-native';
|
|
13
|
+
import { type DTVariant } from '../utils/variantColors';
|
|
14
|
+
interface DTRadioGroupProps {
|
|
15
|
+
/**
|
|
16
|
+
* Currently selected value
|
|
17
|
+
*/
|
|
18
|
+
value: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Called when selection changes
|
|
21
|
+
*/
|
|
22
|
+
onValueChange: (value: string) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Visual variant
|
|
25
|
+
* @default 'normal'
|
|
26
|
+
*/
|
|
27
|
+
variant?: DTVariant;
|
|
28
|
+
/**
|
|
29
|
+
* Radio option children
|
|
30
|
+
*/
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Additional styles for the container
|
|
34
|
+
*/
|
|
35
|
+
style?: StyleProp<ViewStyle>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* DT-styled RadioGroup container
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <DTRadioGroup value={selected} onValueChange={setSelected} variant="normal">
|
|
42
|
+
* <DTRadioOption value="a" label="Option A" />
|
|
43
|
+
* <DTRadioOption value="b" label="Option B" description="With description" />
|
|
44
|
+
* </DTRadioGroup>
|
|
45
|
+
*/
|
|
46
|
+
export declare function DTRadioGroup({ value, onValueChange, variant, children, style, }: DTRadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
interface DTRadioOptionProps {
|
|
48
|
+
/**
|
|
49
|
+
* Value identifier for this option
|
|
50
|
+
*/
|
|
51
|
+
value: string;
|
|
52
|
+
/**
|
|
53
|
+
* Label text
|
|
54
|
+
*/
|
|
55
|
+
label: string;
|
|
56
|
+
/**
|
|
57
|
+
* Optional description text
|
|
58
|
+
*/
|
|
59
|
+
description?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Whether this option is disabled
|
|
62
|
+
*/
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Additional styles
|
|
66
|
+
*/
|
|
67
|
+
style?: StyleProp<ViewStyle>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* DT-styled RadioOption with hexagonal indicator
|
|
71
|
+
*
|
|
72
|
+
* Must be used inside a DTRadioGroup.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* <DTRadioOption value="option1" label="First option" />
|
|
76
|
+
*/
|
|
77
|
+
export declare function DTRadioOption({ value, label, description, disabled, style, }: DTRadioOptionProps): import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=DTRadioGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DTRadioGroup.d.ts","sourceRoot":"","sources":["../../src/components/DTRadioGroup.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAmB,SAAS,EAAE,SAAS,EAAY,MAAM,cAAc,CAAC;AAI/E,OAAO,EAAC,KAAK,SAAS,EAAkB,MAAM,wBAAwB,CAAC;AAcvE,UAAU,iBAAiB;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,aAAa,EACb,OAAkB,EAClB,QAAQ,EACR,KAAK,GACN,EAAE,iBAAiB,2CAMnB;AAID,UAAU,kBAAkB;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAgBD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,WAAW,EACX,QAAgB,EAChB,KAAK,GACN,EAAE,kBAAkB,2CAuEpB"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* DT RadioGroup + RadioOption Components
|
|
4
|
+
*
|
|
5
|
+
* Custom-built angular radio selection following the Dangerous Things design language.
|
|
6
|
+
* RNP RadioButton uses circular geometry with animated SVG circles,
|
|
7
|
+
* so we build hexagonal indicators from scratch.
|
|
8
|
+
*
|
|
9
|
+
* Web CSS reference (AddOnSelector single-select):
|
|
10
|
+
* - Selected: border highlight + semi-transparent fill (var(--selected) at 70% opacity)
|
|
11
|
+
* - Hexagon indicator instead of circular radio button
|
|
12
|
+
*/
|
|
13
|
+
import { createContext, useContext } from 'react';
|
|
14
|
+
import { StyleSheet, View, Pressable } from 'react-native';
|
|
15
|
+
import { Text } from 'react-native-paper';
|
|
16
|
+
import Svg, { Polygon } from 'react-native-svg';
|
|
17
|
+
import { DTColors, getColor } from '../theme/colors';
|
|
18
|
+
import { getVariantColor } from '../utils/variantColors';
|
|
19
|
+
const RadioContext = createContext(null);
|
|
20
|
+
/**
|
|
21
|
+
* DT-styled RadioGroup container
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <DTRadioGroup value={selected} onValueChange={setSelected} variant="normal">
|
|
25
|
+
* <DTRadioOption value="a" label="Option A" />
|
|
26
|
+
* <DTRadioOption value="b" label="Option B" description="With description" />
|
|
27
|
+
* </DTRadioGroup>
|
|
28
|
+
*/
|
|
29
|
+
export function DTRadioGroup({ value, onValueChange, variant = 'normal', children, style, }) {
|
|
30
|
+
return (_jsx(RadioContext.Provider, { value: { value, onValueChange, variant }, children: _jsx(View, { style: [styles.group, style], children: children }) }));
|
|
31
|
+
}
|
|
32
|
+
const INDICATOR_SIZE = 22;
|
|
33
|
+
const INDICATOR_INNER = 12;
|
|
34
|
+
const INDICATOR_BORDER = 2;
|
|
35
|
+
/** Generate flat-top hexagon points string for SVG Polygon */
|
|
36
|
+
function hexPoints(cx, cy, r) {
|
|
37
|
+
const pts = [];
|
|
38
|
+
for (let i = 0; i < 6; i++) {
|
|
39
|
+
const angle = (Math.PI / 3) * i - Math.PI / 6; // flat-top: start at -30°
|
|
40
|
+
pts.push(`${cx + r * Math.cos(angle)},${cy + r * Math.sin(angle)}`);
|
|
41
|
+
}
|
|
42
|
+
return pts.join(' ');
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* DT-styled RadioOption with hexagonal indicator
|
|
46
|
+
*
|
|
47
|
+
* Must be used inside a DTRadioGroup.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* <DTRadioOption value="option1" label="First option" />
|
|
51
|
+
*/
|
|
52
|
+
export function DTRadioOption({ value, label, description, disabled = false, style, }) {
|
|
53
|
+
const context = useContext(RadioContext);
|
|
54
|
+
if (!context) {
|
|
55
|
+
throw new Error('DTRadioOption must be used inside DTRadioGroup');
|
|
56
|
+
}
|
|
57
|
+
const { value: selectedValue, onValueChange, variant } = context;
|
|
58
|
+
const isSelected = selectedValue === value;
|
|
59
|
+
const accentColor = getVariantColor(variant);
|
|
60
|
+
const selectedBgColor = getColor(variant === 'normal'
|
|
61
|
+
? 'modeNormalSelected'
|
|
62
|
+
: variant === 'emphasis'
|
|
63
|
+
? 'modeEmphasisSelected'
|
|
64
|
+
: 'modeNormal');
|
|
65
|
+
const opacity = disabled ? 0.5 : 1;
|
|
66
|
+
return (_jsxs(Pressable, { onPress: () => !disabled && onValueChange(value), style: ({ pressed }) => [
|
|
67
|
+
styles.option,
|
|
68
|
+
{
|
|
69
|
+
borderColor: isSelected ? accentColor : getColor('modeNormal', 0.3),
|
|
70
|
+
backgroundColor: isSelected ? selectedBgColor : 'transparent',
|
|
71
|
+
opacity: pressed ? 0.7 : opacity,
|
|
72
|
+
},
|
|
73
|
+
style,
|
|
74
|
+
], children: [_jsxs(Svg, { width: INDICATOR_SIZE, height: INDICATOR_SIZE, viewBox: `0 0 ${INDICATOR_SIZE} ${INDICATOR_SIZE}`, children: [_jsx(Polygon, { points: hexPoints(INDICATOR_SIZE / 2, INDICATOR_SIZE / 2, INDICATOR_SIZE / 2 - INDICATOR_BORDER / 2), fill: "transparent", stroke: accentColor, strokeWidth: INDICATOR_BORDER, strokeLinejoin: "miter" }), isSelected && (_jsx(Polygon, { points: hexPoints(INDICATOR_SIZE / 2, INDICATOR_SIZE / 2, INDICATOR_INNER / 2), fill: accentColor }))] }), _jsxs(View, { style: styles.optionText, children: [_jsx(Text, { style: [
|
|
75
|
+
styles.optionLabel,
|
|
76
|
+
{ color: isSelected ? DTColors.dark : DTColors.light },
|
|
77
|
+
], children: label }), description && (_jsx(Text, { variant: "bodySmall", style: [
|
|
78
|
+
styles.optionDescription,
|
|
79
|
+
{ color: isSelected ? DTColors.dark : DTColors.disabled },
|
|
80
|
+
], children: description }))] })] }));
|
|
81
|
+
}
|
|
82
|
+
const styles = StyleSheet.create({
|
|
83
|
+
group: {
|
|
84
|
+
gap: 8,
|
|
85
|
+
},
|
|
86
|
+
option: {
|
|
87
|
+
flexDirection: 'row',
|
|
88
|
+
alignItems: 'center',
|
|
89
|
+
gap: 12,
|
|
90
|
+
padding: 12,
|
|
91
|
+
borderWidth: 2,
|
|
92
|
+
},
|
|
93
|
+
optionText: {
|
|
94
|
+
flex: 1,
|
|
95
|
+
gap: 2,
|
|
96
|
+
},
|
|
97
|
+
optionLabel: {
|
|
98
|
+
fontSize: 14,
|
|
99
|
+
fontWeight: '500',
|
|
100
|
+
letterSpacing: 0.3,
|
|
101
|
+
},
|
|
102
|
+
optionDescription: {
|
|
103
|
+
fontSize: 12,
|
|
104
|
+
letterSpacing: 0.2,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
//# sourceMappingURL=DTRadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DTRadioGroup.js","sourceRoot":"","sources":["../../src/components/DTRadioGroup.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAC,aAAa,EAAE,UAAU,EAAC,MAAM,OAAO,CAAC;AAChD,OAAO,EAAC,UAAU,EAAE,IAAI,EAAwB,SAAS,EAAC,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,GAAG,EAAE,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAiB,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAUvE,MAAM,YAAY,GAAG,aAAa,CAA2B,IAAI,CAAC,CAAC;AA4BnE;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,KAAK,EACL,aAAa,EACb,OAAO,GAAG,QAAQ,EAClB,QAAQ,EACR,KAAK,GACa;IAClB,OAAO,CACL,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAC,KAAK,EAAE,aAAa,EAAE,OAAO,E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rapping React Native Paper's Searchbar
|
|
5
|
+
* with the Dangerous Things angular aesthetic.
|
|
6
|
+
*
|
|
7
|
+
* Styled input only — predictive results logic is app-specific
|
|
8
|
+
* (composable principle from CLAUDE.md).
|
|
9
|
+
*/
|
|
10
|
+
import { ViewStyle, TextStyle, StyleProp } from 'react-native';
|
|
11
|
+
import { type DTVariant } from '../utils/variantColors';
|
|
12
|
+
interface DTSearchInputProps {
|
|
13
|
+
/**
|
|
14
|
+
* Current search text
|
|
15
|
+
*/
|
|
16
|
+
value: string;
|
|
17
|
+
/**
|
|
18
|
+
* Called when text changes
|
|
19
|
+
*/
|
|
20
|
+
onChangeText: (text: string) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Called when search is submitted
|
|
23
|
+
*/
|
|
24
|
+
onSubmit?: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Placeholder text
|
|
27
|
+
* @default 'Search...'
|
|
28
|
+
*/
|
|
29
|
+
placeholder?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Visual variant
|
|
32
|
+
* @default 'normal'
|
|
33
|
+
*/
|
|
34
|
+
variant?: DTVariant;
|
|
35
|
+
/**
|
|
36
|
+
* Show loading indicator instead of search icon
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the input is disabled
|
|
42
|
+
*/
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Auto-focus the input on mount
|
|
46
|
+
*/
|
|
47
|
+
autoFocus?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Custom color (overrides variant)
|
|
50
|
+
*/
|
|
51
|
+
color?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Additional styles for the container
|
|
54
|
+
*/
|
|
55
|
+
style?: StyleProp<ViewStyle>;
|
|
56
|
+
/**
|
|
57
|
+
* Additional styles for the input text
|
|
58
|
+
*/
|
|
59
|
+
inputStyle?: StyleProp<TextStyle>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* DT-styled SearchInput wrapping React Native Paper Searchbar
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* <DTSearchInput value={query} onChangeText={setQuery} onSubmit={handleSearch} />
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* <DTSearchInput value={query} onChangeText={setQuery} loading={isSearching} variant="emphasis" />
|
|
69
|
+
*/
|
|
70
|
+
export declare function DTSearchInput({ value, onChangeText, onSubmit, placeholder, variant, loading, disabled, autoFocus, color, style, inputStyle, }: DTSearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=DTSearchInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DTSearchInput.d.ts","sourceRoot":"","sources":["../../src/components/DTSearchInput.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAmB,SAAS,EAAE,SAAS,EAAE,SAAS,EAAW,MAAM,cAAc,CAAC;AAGzF,OAAO,EAAC,KAAK,SAAS,EAAkB,MAAM,wBAAwB,CAAC;AAEvE,UAAU,kBAAkB;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAyB,EACzB,OAAkB,EAClB,OAAe,EACf,QAAgB,EAChB,SAAiB,EACjB,KAAK,EACL,KAAK,EACL,UAAU,GACX,EAAE,kBAAkB,2CA0DpB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* DT SearchInput Component
|
|
4
|
+
*
|
|
5
|
+
* A themed search input wrapping React Native Paper's Searchbar
|
|
6
|
+
* with the Dangerous Things angular aesthetic.
|
|
7
|
+
*
|
|
8
|
+
* Styled input only — predictive results logic is app-specific
|
|
9
|
+
* (composable principle from CLAUDE.md).
|
|
10
|
+
*/
|
|
11
|
+
import { useState, useRef, useEffect } from 'react';
|
|
12
|
+
import { StyleSheet, View, Animated } from 'react-native';
|
|
13
|
+
import { Searchbar, ActivityIndicator } from 'react-native-paper';
|
|
14
|
+
import { DTColors } from '../theme/colors';
|
|
15
|
+
import { getVariantColor } from '../utils/variantColors';
|
|
16
|
+
/**
|
|
17
|
+
* DT-styled SearchInput wrapping React Native Paper Searchbar
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <DTSearchInput value={query} onChangeText={setQuery} onSubmit={handleSearch} />
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <DTSearchInput value={query} onChangeText={setQuery} loading={isSearching} variant="emphasis" />
|
|
24
|
+
*/
|
|
25
|
+
export function DTSearchInput({ value, onChangeText, onSubmit, placeholder = 'Search...', variant = 'normal', loading = false, disabled = false, autoFocus = false, color, style, inputStyle, }) {
|
|
26
|
+
const accentColor = getVariantColor(variant, color);
|
|
27
|
+
const [focused, setFocused] = useState(false);
|
|
28
|
+
const focusAnim = useRef(new Animated.Value(0)).current;
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
const anim = Animated.timing(focusAnim, {
|
|
31
|
+
toValue: focused ? 1 : 0,
|
|
32
|
+
duration: 150,
|
|
33
|
+
useNativeDriver: false,
|
|
34
|
+
});
|
|
35
|
+
anim.start();
|
|
36
|
+
return () => anim.stop();
|
|
37
|
+
}, [focused, focusAnim]);
|
|
38
|
+
return (_jsxs(View, { style: [styles.container, style], children: [_jsx(Searchbar, { value: value, onChangeText: onChangeText, onSubmitEditing: onSubmit, onFocus: () => setFocused(true), onBlur: () => setFocused(false), returnKeyType: "search", placeholder: placeholder, placeholderTextColor: DTColors.disabled, editable: !disabled, autoFocus: autoFocus, icon: loading
|
|
39
|
+
? () => _jsx(ActivityIndicator, { size: 20, color: accentColor })
|
|
40
|
+
: 'magnify', iconColor: accentColor, inputStyle: [styles.input, { color: DTColors.light }, inputStyle], style: [styles.searchbar, { borderColor: accentColor }], rippleColor: accentColor, theme: {
|
|
41
|
+
colors: {
|
|
42
|
+
elevation: { level3: DTColors.dark },
|
|
43
|
+
onSurface: DTColors.light,
|
|
44
|
+
onSurfaceVariant: accentColor,
|
|
45
|
+
},
|
|
46
|
+
roundness: 0,
|
|
47
|
+
} }), _jsx(Animated.View, { style: [
|
|
48
|
+
styles.focusBar,
|
|
49
|
+
{
|
|
50
|
+
backgroundColor: accentColor,
|
|
51
|
+
opacity: focusAnim,
|
|
52
|
+
},
|
|
53
|
+
] })] }));
|
|
54
|
+
}
|
|
55
|
+
const styles = StyleSheet.create({
|
|
56
|
+
container: {},
|
|
57
|
+
searchbar: {
|
|
58
|
+
borderWidth: 2,
|
|
59
|
+
backgroundColor: DTColors.dark,
|
|
60
|
+
elevation: 0,
|
|
61
|
+
},
|
|
62
|
+
input: {
|
|
63
|
+
fontSize: 14,
|
|
64
|
+
letterSpacing: 0.3,
|
|
65
|
+
},
|
|
66
|
+
focusBar: {
|
|
67
|
+
height: 4,
|
|
68
|
+
marginTop: 1,
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
//# sourceMappingURL=DTSearchInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DTSearchInput.js","sourceRoot":"","sources":["../../src/components/DTSearchInput.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,UAAU,EAAE,IAAI,EAAmC,QAAQ,EAAC,MAAM,cAAc,CAAC;AACzF,OAAO,EAAC,SAAS,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAiB,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAoDvE;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,GAAG,WAAW,EACzB,OAAO,GAAG,QAAQ,EAClB,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,SAAS,GAAG,KAAK,EACjB,KAAK,EACL,KAAK,EACL,UAAU,GACS;IACnB,MAAM,WAAW,GAAG,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAExD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE;YACtC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACxB,QAAQ,EAAE,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