@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.
Files changed (105) hide show
  1. package/dist/components/DTAccordion.d.ts +75 -0
  2. package/dist/components/DTAccordion.d.ts.map +1 -0
  3. package/dist/components/DTAccordion.js +147 -0
  4. package/dist/components/DTAccordion.js.map +1 -0
  5. package/dist/components/DTButton.d.ts +68 -0
  6. package/dist/components/DTButton.d.ts.map +1 -0
  7. package/dist/components/DTButton.js +59 -0
  8. package/dist/components/DTButton.js.map +1 -0
  9. package/dist/components/DTCard.d.ts +97 -0
  10. package/dist/components/DTCard.d.ts.map +1 -0
  11. package/dist/components/DTCard.js +81 -0
  12. package/dist/components/DTCard.js.map +1 -0
  13. package/dist/components/DTCheckbox.d.ts +63 -0
  14. package/dist/components/DTCheckbox.d.ts.map +1 -0
  15. package/dist/components/DTCheckbox.js +55 -0
  16. package/dist/components/DTCheckbox.js.map +1 -0
  17. package/dist/components/DTChip.d.ts +40 -0
  18. package/dist/components/DTChip.d.ts.map +1 -0
  19. package/dist/components/DTChip.js +55 -0
  20. package/dist/components/DTChip.js.map +1 -0
  21. package/dist/components/DTDrawer.d.ts +82 -0
  22. package/dist/components/DTDrawer.d.ts.map +1 -0
  23. package/dist/components/DTDrawer.js +146 -0
  24. package/dist/components/DTDrawer.js.map +1 -0
  25. package/dist/components/DTGallery.d.ts +83 -0
  26. package/dist/components/DTGallery.d.ts.map +1 -0
  27. package/dist/components/DTGallery.js +160 -0
  28. package/dist/components/DTGallery.js.map +1 -0
  29. package/dist/components/DTHexagon.d.ts +81 -0
  30. package/dist/components/DTHexagon.d.ts.map +1 -0
  31. package/dist/components/DTHexagon.js +110 -0
  32. package/dist/components/DTHexagon.js.map +1 -0
  33. package/dist/components/DTLabel.d.ts +100 -0
  34. package/dist/components/DTLabel.d.ts.map +1 -0
  35. package/dist/components/DTLabel.js +189 -0
  36. package/dist/components/DTLabel.js.map +1 -0
  37. package/dist/components/DTMediaFrame.d.ts +77 -0
  38. package/dist/components/DTMediaFrame.d.ts.map +1 -0
  39. package/dist/components/DTMediaFrame.js +84 -0
  40. package/dist/components/DTMediaFrame.js.map +1 -0
  41. package/dist/components/DTMenu.d.ts +119 -0
  42. package/dist/components/DTMenu.d.ts.map +1 -0
  43. package/dist/components/DTMenu.js +188 -0
  44. package/dist/components/DTMenu.js.map +1 -0
  45. package/dist/components/DTModal.d.ts +64 -0
  46. package/dist/components/DTModal.d.ts.map +1 -0
  47. package/dist/components/DTModal.js +45 -0
  48. package/dist/components/DTModal.js.map +1 -0
  49. package/dist/components/DTProgressBar.d.ts +66 -0
  50. package/dist/components/DTProgressBar.d.ts.map +1 -0
  51. package/dist/components/DTProgressBar.js +82 -0
  52. package/dist/components/DTProgressBar.js.map +1 -0
  53. package/dist/components/DTQuantityStepper.d.ts +76 -0
  54. package/dist/components/DTQuantityStepper.d.ts.map +1 -0
  55. package/dist/components/DTQuantityStepper.js +108 -0
  56. package/dist/components/DTQuantityStepper.js.map +1 -0
  57. package/dist/components/DTRadioGroup.d.ts +79 -0
  58. package/dist/components/DTRadioGroup.d.ts.map +1 -0
  59. package/dist/components/DTRadioGroup.js +107 -0
  60. package/dist/components/DTRadioGroup.js.map +1 -0
  61. package/dist/components/DTSearchInput.d.ts +72 -0
  62. package/dist/components/DTSearchInput.d.ts.map +1 -0
  63. package/dist/components/DTSearchInput.js +71 -0
  64. package/dist/components/DTSearchInput.js.map +1 -0
  65. package/dist/components/DTSwitch.d.ts +52 -0
  66. package/dist/components/DTSwitch.d.ts.map +1 -0
  67. package/dist/components/DTSwitch.js +85 -0
  68. package/dist/components/DTSwitch.js.map +1 -0
  69. package/dist/components/DTTextInput.d.ts +58 -0
  70. package/dist/components/DTTextInput.d.ts.map +1 -0
  71. package/dist/components/DTTextInput.js +85 -0
  72. package/dist/components/DTTextInput.js.map +1 -0
  73. package/dist/index.d.ts +40 -0
  74. package/dist/index.d.ts.map +1 -0
  75. package/dist/index.js +40 -0
  76. package/dist/index.js.map +1 -0
  77. package/dist/theme/DTThemeProvider.d.ts +49 -0
  78. package/dist/theme/DTThemeProvider.d.ts.map +1 -0
  79. package/dist/theme/DTThemeProvider.js +52 -0
  80. package/dist/theme/DTThemeProvider.js.map +1 -0
  81. package/dist/theme/colors.d.ts +42 -0
  82. package/dist/theme/colors.d.ts.map +1 -0
  83. package/dist/theme/colors.js +59 -0
  84. package/dist/theme/colors.js.map +1 -0
  85. package/dist/theme/paperTheme.d.ts +39 -0
  86. package/dist/theme/paperTheme.d.ts.map +1 -0
  87. package/dist/theme/paperTheme.js +116 -0
  88. package/dist/theme/paperTheme.js.map +1 -0
  89. package/dist/theme/typography.d.ts +57 -0
  90. package/dist/theme/typography.d.ts.map +1 -0
  91. package/dist/theme/typography.js +170 -0
  92. package/dist/theme/typography.js.map +1 -0
  93. package/dist/utils/bevelPaths.d.ts +42 -0
  94. package/dist/utils/bevelPaths.d.ts.map +1 -0
  95. package/dist/utils/bevelPaths.js +105 -0
  96. package/dist/utils/bevelPaths.js.map +1 -0
  97. package/dist/utils/useComponentLayout.d.ts +18 -0
  98. package/dist/utils/useComponentLayout.d.ts.map +1 -0
  99. package/dist/utils/useComponentLayout.js +24 -0
  100. package/dist/utils/useComponentLayout.js.map +1 -0
  101. package/dist/utils/variantColors.d.ts +12 -0
  102. package/dist/utils/variantColors.d.ts.map +1 -0
  103. package/dist/utils/variantColors.js +20 -0
  104. package/dist/utils/variantColors.js.map +1 -0
  105. package/package.json +49 -0
@@ -0,0 +1,52 @@
1
+ /**
2
+ * DT Switch Component
3
+ *
4
+ * Custom-built angular toggle switch following the Dangerous Things design language.
5
+ * RNP Switch delegates to native <NativeSwitch> with no shape control,
6
+ * so we build a rectangular toggle from scratch.
7
+ */
8
+ import { ViewStyle, StyleProp } from 'react-native';
9
+ import { type DTVariant } from '../utils/variantColors';
10
+ interface DTSwitchProps {
11
+ /**
12
+ * Whether the switch is on
13
+ */
14
+ value: boolean;
15
+ /**
16
+ * Called when the value changes
17
+ */
18
+ onValueChange: (value: boolean) => void;
19
+ /**
20
+ * Visual variant
21
+ * @default 'normal'
22
+ */
23
+ variant?: DTVariant;
24
+ /**
25
+ * Whether the switch is disabled
26
+ */
27
+ disabled?: boolean;
28
+ /**
29
+ * Label text displayed beside the switch
30
+ */
31
+ label?: string;
32
+ /**
33
+ * Custom color (overrides variant)
34
+ */
35
+ color?: string;
36
+ /**
37
+ * Additional styles for the container
38
+ */
39
+ style?: StyleProp<ViewStyle>;
40
+ }
41
+ /**
42
+ * DT-styled angular Switch/Toggle
43
+ *
44
+ * @example
45
+ * <DTSwitch value={enabled} onValueChange={setEnabled} label="Enable NFC" />
46
+ *
47
+ * @example
48
+ * <DTSwitch value={true} onValueChange={toggle} variant="success" />
49
+ */
50
+ export declare function DTSwitch({ value, onValueChange, variant, disabled, label, color, style, }: DTSwitchProps): import("react/jsx-runtime").JSX.Element;
51
+ export {};
52
+ //# sourceMappingURL=DTSwitch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DTSwitch.d.ts","sourceRoot":"","sources":["../../src/components/DTSwitch.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAEL,SAAS,EACT,SAAS,EAGV,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAC,KAAK,SAAS,EAAkB,MAAM,wBAAwB,CAAC;AAOvE,UAAU,aAAa;IACrB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,aAAa,EACb,OAAkB,EAClB,QAAgB,EAChB,KAAK,EACL,KAAK,EACL,KAAK,GACN,EAAE,aAAa,2CAsDf"}
@@ -0,0 +1,85 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * DT Switch Component
4
+ *
5
+ * Custom-built angular toggle switch following the Dangerous Things design language.
6
+ * RNP Switch delegates to native <NativeSwitch> with no shape control,
7
+ * so we build a rectangular toggle from scratch.
8
+ */
9
+ import { useRef, useEffect } from 'react';
10
+ import { StyleSheet, Pressable, Animated, } from 'react-native';
11
+ import { Text } from 'react-native-paper';
12
+ import { DTColors } from '../theme/colors';
13
+ import { getVariantColor } from '../utils/variantColors';
14
+ const TRACK_WIDTH = 48;
15
+ const TRACK_HEIGHT = 26;
16
+ const THUMB_SIZE = 20;
17
+ const THUMB_MARGIN = 3;
18
+ /**
19
+ * DT-styled angular Switch/Toggle
20
+ *
21
+ * @example
22
+ * <DTSwitch value={enabled} onValueChange={setEnabled} label="Enable NFC" />
23
+ *
24
+ * @example
25
+ * <DTSwitch value={true} onValueChange={toggle} variant="success" />
26
+ */
27
+ export function DTSwitch({ value, onValueChange, variant = 'normal', disabled = false, label, color, style, }) {
28
+ const accentColor = getVariantColor(variant, color);
29
+ const thumbAnim = useRef(new Animated.Value(value ? 1 : 0)).current;
30
+ useEffect(() => {
31
+ Animated.timing(thumbAnim, {
32
+ toValue: value ? 1 : 0,
33
+ duration: 150,
34
+ useNativeDriver: false,
35
+ }).start();
36
+ }, [value, thumbAnim]);
37
+ const thumbTranslateX = thumbAnim.interpolate({
38
+ inputRange: [0, 1],
39
+ outputRange: [THUMB_MARGIN, TRACK_WIDTH - THUMB_SIZE - THUMB_MARGIN],
40
+ });
41
+ const trackColor = thumbAnim.interpolate({
42
+ inputRange: [0, 1],
43
+ outputRange: [DTColors.disabledBackground, accentColor],
44
+ });
45
+ return (_jsxs(Pressable, { onPress: () => !disabled && onValueChange(!value), style: ({ pressed }) => [
46
+ styles.container,
47
+ { opacity: disabled ? 0.5 : pressed ? 0.7 : 1 },
48
+ style,
49
+ ], children: [label && (_jsx(Text, { style: [styles.label, { color: DTColors.light }], children: label })), _jsx(Animated.View, { style: [
50
+ styles.track,
51
+ {
52
+ backgroundColor: trackColor,
53
+ borderColor: accentColor,
54
+ },
55
+ ], children: _jsx(Animated.View, { style: [
56
+ styles.thumb,
57
+ {
58
+ backgroundColor: value ? DTColors.dark : DTColors.light,
59
+ transform: [{ translateX: thumbTranslateX }],
60
+ },
61
+ ] }) })] }));
62
+ }
63
+ const styles = StyleSheet.create({
64
+ container: {
65
+ flexDirection: 'row',
66
+ alignItems: 'center',
67
+ gap: 12,
68
+ paddingVertical: 8,
69
+ },
70
+ label: {
71
+ fontSize: 14,
72
+ letterSpacing: 0.3,
73
+ },
74
+ track: {
75
+ width: TRACK_WIDTH,
76
+ height: TRACK_HEIGHT,
77
+ borderWidth: 2,
78
+ justifyContent: 'center',
79
+ },
80
+ thumb: {
81
+ width: THUMB_SIZE,
82
+ height: THUMB_SIZE,
83
+ },
84
+ });
85
+ //# sourceMappingURL=DTSwitch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DTSwitch.js","sourceRoot":"","sources":["../../src/components/DTSwitch.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,MAAM,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AACxC,OAAO,EACL,UAAU,EAGV,SAAS,EACT,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAiB,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAEvE,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,YAA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QACjB,MAAM,EAAE,UAAU;KACnB;CACF,CAAC,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * DT TextInput Component
3
+ *
4
+ * A themed text input wrapping React Native Paper's TextInput
5
+ * with the Dangerous Things angular aesthetic.
6
+ *
7
+ * Web CSS reference (.mode-input):
8
+ * - 2px solid border in mode color
9
+ * - Focus: box-shadow 0 4px 0 1px var(--mode)
10
+ * - border-radius: 0
11
+ */
12
+ import { ViewStyle, TextStyle, StyleProp } from 'react-native';
13
+ import { TextInputProps } from 'react-native-paper';
14
+ import { type DTVariant } from '../utils/variantColors';
15
+ interface DTTextInputProps extends Omit<TextInputProps, 'mode' | 'theme' | 'error' | 'ref'> {
16
+ /**
17
+ * Visual variant
18
+ * @default 'normal'
19
+ */
20
+ variant?: DTVariant;
21
+ /**
22
+ * Custom color (overrides variant)
23
+ */
24
+ color?: string;
25
+ /**
26
+ * Border width
27
+ * @default 2
28
+ */
29
+ borderWidth?: number;
30
+ /**
31
+ * Whether the input is in error state
32
+ */
33
+ error?: boolean;
34
+ /**
35
+ * Error message text displayed below input
36
+ */
37
+ errorMessage?: string;
38
+ /**
39
+ * Additional styles for the outer wrapper
40
+ */
41
+ containerStyle?: StyleProp<ViewStyle>;
42
+ /**
43
+ * Additional styles for the input text
44
+ */
45
+ inputStyle?: StyleProp<TextStyle>;
46
+ }
47
+ /**
48
+ * DT-styled TextInput wrapping React Native Paper TextInput
49
+ *
50
+ * @example
51
+ * <DTTextInput variant="normal" label="Username" value={name} onChangeText={setName} />
52
+ *
53
+ * @example
54
+ * <DTTextInput variant="warning" error errorMessage="Required field" label="Email" />
55
+ */
56
+ export declare function DTTextInput({ variant, color, borderWidth, error, errorMessage, containerStyle, inputStyle, onFocus, onBlur, style, ...props }: DTTextInputProps): import("react/jsx-runtime").JSX.Element;
57
+ export {};
58
+ //# sourceMappingURL=DTTextInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DTTextInput.d.ts","sourceRoot":"","sources":["../../src/components/DTTextInput.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAGL,SAAS,EACT,SAAS,EACT,SAAS,EAEV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAY,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAC,KAAK,SAAS,EAAkB,MAAM,wBAAwB,CAAC;AAEvE,UAAU,gBACR,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;IAChE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAkB,EAClB,KAAK,EACL,WAAe,EACf,KAAa,EACb,YAAY,EACZ,cAAc,EACd,UAAU,EACV,OAAO,EACP,MAAM,EACN,KAAK,EACL,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAsElB"}
@@ -0,0 +1,85 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * DT TextInput Component
4
+ *
5
+ * A themed text input wrapping React Native Paper's TextInput
6
+ * with the Dangerous Things angular aesthetic.
7
+ *
8
+ * Web CSS reference (.mode-input):
9
+ * - 2px solid border in mode color
10
+ * - Focus: box-shadow 0 4px 0 1px var(--mode)
11
+ * - border-radius: 0
12
+ */
13
+ import { useState, useRef, useEffect } from 'react';
14
+ import { StyleSheet, View, Animated, } from 'react-native';
15
+ import { TextInput } from 'react-native-paper';
16
+ import { DTColors } from '../theme/colors';
17
+ import { getVariantColor } from '../utils/variantColors';
18
+ /**
19
+ * DT-styled TextInput wrapping React Native Paper TextInput
20
+ *
21
+ * @example
22
+ * <DTTextInput variant="normal" label="Username" value={name} onChangeText={setName} />
23
+ *
24
+ * @example
25
+ * <DTTextInput variant="warning" error errorMessage="Required field" label="Email" />
26
+ */
27
+ export function DTTextInput({ variant = 'normal', color, borderWidth = 2, error = false, errorMessage, containerStyle, inputStyle, onFocus, onBlur, style, ...props }) {
28
+ const [focused, setFocused] = useState(false);
29
+ const focusAnim = useRef(new Animated.Value(0)).current;
30
+ const accentColor = error
31
+ ? DTColors.modeWarning
32
+ : getVariantColor(variant, color);
33
+ useEffect(() => {
34
+ const anim = Animated.timing(focusAnim, {
35
+ toValue: focused ? 1 : 0,
36
+ duration: 150,
37
+ useNativeDriver: false,
38
+ });
39
+ anim.start();
40
+ return () => anim.stop();
41
+ }, [focused, focusAnim]);
42
+ return (_jsxs(View, { style: containerStyle, children: [_jsx(View, { style: [
43
+ styles.inputWrapper,
44
+ { borderColor: accentColor, borderWidth },
45
+ ], children: _jsx(TextInput, { ...props, mode: "flat", error: false, onFocus: e => {
46
+ setFocused(true);
47
+ onFocus?.(e);
48
+ }, onBlur: e => {
49
+ setFocused(false);
50
+ onBlur?.(e);
51
+ }, style: [styles.input, inputStyle, style], textColor: DTColors.light, placeholderTextColor: DTColors.disabled, activeUnderlineColor: "transparent", underlineColor: "transparent", theme: {
52
+ colors: {
53
+ primary: accentColor,
54
+ onSurfaceVariant: accentColor,
55
+ },
56
+ roundness: 0,
57
+ } }) }), _jsx(Animated.View, { style: [
58
+ styles.focusBar,
59
+ {
60
+ backgroundColor: accentColor,
61
+ opacity: focusAnim,
62
+ },
63
+ ] }), error && errorMessage && (_jsx(View, { style: styles.errorContainer, children: _jsx(Animated.Text, { style: [styles.errorText, { color: DTColors.modeWarning }], children: errorMessage }) }))] }));
64
+ }
65
+ const styles = StyleSheet.create({
66
+ inputWrapper: {
67
+ backgroundColor: DTColors.dark,
68
+ },
69
+ input: {
70
+ backgroundColor: 'transparent',
71
+ },
72
+ focusBar: {
73
+ height: 4,
74
+ marginTop: 1,
75
+ },
76
+ errorContainer: {
77
+ marginTop: 4,
78
+ paddingHorizontal: 4,
79
+ },
80
+ errorText: {
81
+ fontSize: 12,
82
+ letterSpacing: 0.5,
83
+ },
84
+ });
85
+ //# sourceMappingURL=DTTextInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DTTextInput.js","sourceRoot":"","sources":["../../src/components/DTTextInput.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EACL,UAAU,EACV,IAAI,EAIJ,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,SAAS,EAAiB,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAiB,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAoCvE;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,OAAO,GAAG,QAAQ,EAClB,KAAK,EACL,WAAW,GAAG,CAAC,EACf,KAAK,GAAG,KAAK,EACb,YAAY,EACZ,cAAc,EACd,UAAU,EACV,OAAO,EACP,MAAM,EACN,KAAK,EACL,GAAG,KAAK,EACS;IACjB,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,MAAM,WAAW,GAAG,KAAK;QACvB,CAAC,CAAC,QAAQ,CAAC,WAAW;QACtB,CAAC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ACD,SAAS,EAAE,CAAC;qBACb,GACD,GACG,EAEP,KAAC,QAAQ,CAAC,IAAI,IACZ,KAAK,EAAE;oBACL,MAAM,CAAC,QAAQ;oBACf;wBACE,eAAe,EAAE,WAAW;wBAC5B,OAAO,EAAE,SAAS;qBACnB;iBACF,GACD,EACD,KAAK,IAAI,YAAY,IAAI,CACxB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,cAAc,YAChC,KAAC,QAAQ,CAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,EAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,EAAC,CAAC,YACpE,YAAY,GACC,GACX,CACR,IACI,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,YAAY,EAAE;QACZ,eAAe,EAAE,QAAQ,CAAC,IAAI;KAC/B;IACD,KAAK,EAAE;QACL,eAAe,EAAE,aAAa;KAC/B;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,CAAC;KACb;IACD,cAAc,EAAE;QACd,SAAS,EAAE,CAAC;QACZ,iBAAiB,EAAE,CAAC;KACrB;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,EAAE;QACZ,aAAa,EAAE,GAAG;KACnB;CACF,CAAC,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @anthropic-dangerous-things/react-native-theme
3
+ *
4
+ * Dangerous Things design system for React Native with React Native Paper.
5
+ * Cyberpunk aesthetic with high-contrast neon colors.
6
+ */
7
+ export { DTColors, getColor } from './theme/colors';
8
+ export type { DTColorKey } from './theme/colors';
9
+ export { DTTypography, DTFonts, DTFontWeights, } from './theme/typography';
10
+ export type { DTTypographyKey } from './theme/typography';
11
+ export { DTDarkTheme, DTExtendedDarkTheme, usePaperTheme, } from './theme/paperTheme';
12
+ export type { DTExtendedTheme } from './theme/paperTheme';
13
+ export { DTThemeProvider, useDTTheme } from './theme/DTThemeProvider';
14
+ export type { DTVariant } from './utils/variantColors';
15
+ export { variantColorMap, getVariantColor } from './utils/variantColors';
16
+ export { buildBeveledRectPath } from './utils/bevelPaths';
17
+ export { useComponentLayout } from './utils/useComponentLayout';
18
+ export { DTCard, DTCardClipPath } from './components/DTCard';
19
+ export { DTButton } from './components/DTButton';
20
+ export { DTChip } from './components/DTChip';
21
+ export { DTLabel, DTLabelClipPath } from './components/DTLabel';
22
+ export { DTTextInput } from './components/DTTextInput';
23
+ export { DTCheckbox } from './components/DTCheckbox';
24
+ export { DTSwitch } from './components/DTSwitch';
25
+ export { DTRadioGroup, DTRadioOption } from './components/DTRadioGroup';
26
+ export { DTQuantityStepper } from './components/DTQuantityStepper';
27
+ export { DTProgressBar } from './components/DTProgressBar';
28
+ export { DTMediaFrame } from './components/DTMediaFrame';
29
+ export { DTAccordion } from './components/DTAccordion';
30
+ export type { DTAccordionSection } from './components/DTAccordion';
31
+ export { DTModal } from './components/DTModal';
32
+ export { DTDrawer } from './components/DTDrawer';
33
+ export { DTGallery } from './components/DTGallery';
34
+ export type { DTGalleryItem } from './components/DTGallery';
35
+ export { DTSearchInput } from './components/DTSearchInput';
36
+ export { DTMenu, DTMenuDropdown } from './components/DTMenu';
37
+ export type { DTMenuItem } from './components/DTMenu';
38
+ export { DTHexagon } from './components/DTHexagon';
39
+ export { Text, Surface, IconButton, ActivityIndicator, Divider, List, Portal, Modal, Snackbar, TextInput, } from 'react-native-paper';
40
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,OAAO,EACP,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B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AE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,EACL,IAAI,EACJ,OAAO,EACP,UAAU,EACV,iBAAiB,EACjB,OAAO,EACP,IAAI,EACJ,MAAM,EACN,KAAK,EACL,QAAQ,EACR,SAAS,GACV,MAAM,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @anthropic-dangerous-things/react-native-theme
3
+ *
4
+ * Dangerous Things design system for React Native with React Native Paper.
5
+ * Cyberpunk aesthetic with high-contrast neon colors.
6
+ */
7
+ // Theme exports
8
+ export { DTColors, getColor } from './theme/colors';
9
+ export { DTTypography, DTFonts, DTFontWeights, } from './theme/typography';
10
+ export { DTDarkTheme, DTExtendedDarkTheme, usePaperTheme, } from './theme/paperTheme';
11
+ export { DTThemeProvider, useDTTheme } from './theme/DTThemeProvider';
12
+ export { variantColorMap, getVariantColor } from './utils/variantColors';
13
+ export { buildBeveledRectPath } from './utils/bevelPaths';
14
+ export { useComponentLayout } from './utils/useComponentLayout';
15
+ // Component exports — existing
16
+ export { DTCard, DTCardClipPath } from './components/DTCard';
17
+ export { DTButton } from './components/DTButton';
18
+ export { DTChip } from './components/DTChip';
19
+ export { DTLabel, DTLabelClipPath } from './components/DTLabel';
20
+ // Component exports — form primitives
21
+ export { DTTextInput } from './components/DTTextInput';
22
+ export { DTCheckbox } from './components/DTCheckbox';
23
+ export { DTSwitch } from './components/DTSwitch';
24
+ export { DTRadioGroup, DTRadioOption } from './components/DTRadioGroup';
25
+ export { DTQuantityStepper } from './components/DTQuantityStepper';
26
+ // Component exports — layout & containers
27
+ export { DTProgressBar } from './components/DTProgressBar';
28
+ export { DTMediaFrame } from './components/DTMediaFrame';
29
+ export { DTAccordion } from './components/DTAccordion';
30
+ // Component exports — complex interactive
31
+ export { DTModal } from './components/DTModal';
32
+ export { DTDrawer } from './components/DTDrawer';
33
+ export { DTGallery } from './components/DTGallery';
34
+ export { DTSearchInput } from './components/DTSearchInput';
35
+ // Component exports — navigation & decorative
36
+ export { DTMenu, DTMenuDropdown } from './components/DTMenu';
37
+ export { DTHexagon } from './components/DTHexagon';
38
+ // Re-export commonly used Paper components for convenience
39
+ export { Text, Surface, IconButton, ActivityIndicator, Divider, List, Portal, Modal, Snackbar, TextInput, } from 'react-native-paper';
40
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,gBAAgB;AAChB,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGpD,OAAO,EACL,YAAY,EACZ,OAAO,EACP,aAAa,GACd,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,aAAa,GACd,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAItE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,+BAA+B;AAC/B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEhE,sCAAsC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,0CAA0C;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,0CAA0C;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,8CAA8C;AAC9C,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,2DAA2D;AAC3D,OAAO,EACL,IAAI,EACJ,OAAO,EACP,UAAU,EACV,iBAAiB,EACjB,OAAO,EACP,IAAI,EACJ,MAAM,EACN,KAAK,EACL,QAAQ,EACR,SAAS,GACV,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * DT Theme Provider
3
+ *
4
+ * Wraps your app with the Dangerous Things theme.
5
+ * Combines React Native Paper's PaperProvider with
6
+ * custom theme context for extended DT colors.
7
+ */
8
+ import { ReactNode } from 'react';
9
+ import { DTExtendedTheme } from './paperTheme';
10
+ /**
11
+ * Hook to access the full DT theme including custom properties
12
+ *
13
+ * @example
14
+ * const theme = useDTTheme();
15
+ * const successColor = theme.custom.success;
16
+ */
17
+ export declare function useDTTheme(): DTExtendedTheme;
18
+ interface DTThemeProviderProps {
19
+ children: ReactNode;
20
+ /**
21
+ * Override the default theme (useful for testing or custom variants)
22
+ */
23
+ theme?: DTExtendedTheme;
24
+ /**
25
+ * Include SafeAreaProvider wrapper (default: true)
26
+ * Set to false if you already have SafeAreaProvider higher in tree
27
+ */
28
+ includeSafeArea?: boolean;
29
+ }
30
+ /**
31
+ * Theme provider component
32
+ *
33
+ * @example
34
+ * // In your App.tsx
35
+ * import { DTThemeProvider } from '@anthropic-dangerous-things/react-native-theme';
36
+ *
37
+ * export default function App() {
38
+ * return (
39
+ * <DTThemeProvider>
40
+ * <NavigationContainer>
41
+ * <YourApp />
42
+ * </NavigationContainer>
43
+ * </DTThemeProvider>
44
+ * );
45
+ * }
46
+ */
47
+ export declare function DTThemeProvider({ children, theme, includeSafeArea, }: DTThemeProviderProps): import("react/jsx-runtime").JSX.Element;
48
+ export {};
49
+ //# sourceMappingURL=DTThemeProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DTThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/DTThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAuB,eAAe,EAAE,MAAM,cAAc,CAAC;AAOpE;;;;;;GAMG;AACH,wBAAgB,UAAU,IAAI,eAAe,CAE5C;AAED,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAA2B,EAC3B,eAAsB,GACvB,EAAE,oBAAoB,2CAetB"}
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * DT Theme Provider
4
+ *
5
+ * Wraps your app with the Dangerous Things theme.
6
+ * Combines React Native Paper's PaperProvider with
7
+ * custom theme context for extended DT colors.
8
+ */
9
+ import { createContext, useContext } from 'react';
10
+ import { PaperProvider } from 'react-native-paper';
11
+ import { SafeAreaProvider } from 'react-native-safe-area-context';
12
+ import { StatusBar } from 'react-native';
13
+ import { DTExtendedDarkTheme } from './paperTheme';
14
+ /**
15
+ * Context for accessing extended theme properties
16
+ */
17
+ const DTThemeContext = createContext(DTExtendedDarkTheme);
18
+ /**
19
+ * Hook to access the full DT theme including custom properties
20
+ *
21
+ * @example
22
+ * const theme = useDTTheme();
23
+ * const successColor = theme.custom.success;
24
+ */
25
+ export function useDTTheme() {
26
+ return useContext(DTThemeContext);
27
+ }
28
+ /**
29
+ * Theme provider component
30
+ *
31
+ * @example
32
+ * // In your App.tsx
33
+ * import { DTThemeProvider } from '@anthropic-dangerous-things/react-native-theme';
34
+ *
35
+ * export default function App() {
36
+ * return (
37
+ * <DTThemeProvider>
38
+ * <NavigationContainer>
39
+ * <YourApp />
40
+ * </NavigationContainer>
41
+ * </DTThemeProvider>
42
+ * );
43
+ * }
44
+ */
45
+ export function DTThemeProvider({ children, theme = DTExtendedDarkTheme, includeSafeArea = true, }) {
46
+ const content = (_jsx(DTThemeContext.Provider, { value: theme, children: _jsxs(PaperProvider, { theme: theme, children: [_jsx(StatusBar, { barStyle: "light-content", backgroundColor: "#000000" }), children] }) }));
47
+ if (includeSafeArea) {
48
+ return _jsx(SafeAreaProvider, { children: content });
49
+ }
50
+ return content;
51
+ }
52
+ //# sourceMappingURL=DTThemeProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DTThemeProvider.js","sourceRoot":"","sources":["../../src/theme/DTThemeProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAa,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAmB,MAAM,cAAc,CAAC;AAEpE;;GAEG;AACH,MAAM,cAAc,GAAG,aAAa,CAAkB,mBAAmB,CAAC,CAAC;AAE3E;;;;;;GAMG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC;AACpC,CAAC;AAeD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,GAAG,mBAAmB,EAC3B,eAAe,GAAG,IAAI,GACD;IACrB,MAAM,OAAO,GAAG,CACd,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACnC,MAAC,aAAa,IAAC,KAAK,EAAE,KAAK,aACzB,KAAC,SAAS,IAAC,QAAQ,EAAC,eAAe,EAAC,eAAe,EAAC,SAAS,GAAG,EAC/D,QAAQ,IACK,GACQ,CAC3B,CAAC;IAEF,IAAI,eAAe,EAAE,CAAC;QACpB,OAAO,KAAC,gBAAgB,cAAE,OAAO,GAAoB,CAAC;IACxD,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Dangerous Things Color Palette
3
+ *
4
+ * Based on the dt-shopify-storefront design system.
5
+ * Cyberpunk aesthetic with high-contrast neon colors on dark backgrounds.
6
+ */
7
+ export declare const DTColors: {
8
+ readonly dark: "#000000";
9
+ readonly light: "#FFFFFF";
10
+ readonly modeNormal: "#00FFFF";
11
+ readonly modeNormalSelected: "rgba(0, 255, 255, 0.7)";
12
+ readonly modeEmphasis: "#FFFF00";
13
+ readonly modeEmphasisSelected: "rgba(255, 255, 0, 0.7)";
14
+ readonly modeWarning: "#FF0000";
15
+ readonly modeSuccess: "#00FF00";
16
+ readonly modeOther: "#FF00FF";
17
+ readonly primary: "#00FFFF";
18
+ readonly primaryVariant: "rgba(0, 255, 255, 0.7)";
19
+ readonly secondary: "#FFFF00";
20
+ readonly secondaryVariant: "rgba(255, 255, 0, 0.7)";
21
+ readonly error: "#FF0000";
22
+ readonly success: "#00FF00";
23
+ readonly background: "#000000";
24
+ readonly surface: "#000000";
25
+ readonly surfaceVariant: "#070707";
26
+ readonly onBackground: "#FFFFFF";
27
+ readonly onSurface: "#FFFFFF";
28
+ readonly onPrimary: "#000000";
29
+ readonly onSecondary: "#000000";
30
+ readonly onError: "#000000";
31
+ readonly border: "#00FFFF";
32
+ readonly borderEmphasis: "#FFFF00";
33
+ readonly overlay: "rgba(0, 0, 0, 0.7)";
34
+ readonly disabled: "rgba(255, 255, 255, 0.3)";
35
+ readonly disabledBackground: "rgba(255, 255, 255, 0.1)";
36
+ };
37
+ export type DTColorKey = keyof typeof DTColors;
38
+ /**
39
+ * Get a color with optional opacity override
40
+ */
41
+ export declare function getColor(color: DTColorKey, opacity?: number): string;
42
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/theme/colors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CX,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,QAAQ,CAAC;AAE/C;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAYpE"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Dangerous Things Color Palette
3
+ *
4
+ * Based on the dt-shopify-storefront design system.
5
+ * Cyberpunk aesthetic with high-contrast neon colors on dark backgrounds.
6
+ */
7
+ export const DTColors = {
8
+ // Base colors
9
+ dark: '#000000',
10
+ light: '#FFFFFF',
11
+ // Mode colors (primary semantic palette)
12
+ modeNormal: '#00FFFF', // Cyan - primary actions, links, borders
13
+ modeNormalSelected: 'rgba(0, 255, 255, 0.7)',
14
+ modeEmphasis: '#FFFF00', // Yellow - highlights, emphasis, headers
15
+ modeEmphasisSelected: 'rgba(255, 255, 0, 0.7)',
16
+ modeWarning: '#FF0000', // Red - errors, warnings, destructive actions
17
+ modeSuccess: '#00FF00', // Green - success states, confirmations
18
+ modeOther: '#FF00FF', // Magenta - miscellaneous, secondary info
19
+ // Semantic aliases
20
+ primary: '#00FFFF',
21
+ primaryVariant: 'rgba(0, 255, 255, 0.7)',
22
+ secondary: '#FFFF00',
23
+ secondaryVariant: 'rgba(255, 255, 0, 0.7)',
24
+ error: '#FF0000',
25
+ success: '#00FF00',
26
+ // Surface colors
27
+ background: '#000000',
28
+ surface: '#000000',
29
+ surfaceVariant: '#070707',
30
+ // Text colors
31
+ onBackground: '#FFFFFF',
32
+ onSurface: '#FFFFFF',
33
+ onPrimary: '#000000',
34
+ onSecondary: '#000000',
35
+ onError: '#000000',
36
+ // Border colors
37
+ border: '#00FFFF',
38
+ borderEmphasis: '#FFFF00',
39
+ // Transparency variants (for overlays, disabled states)
40
+ overlay: 'rgba(0, 0, 0, 0.7)',
41
+ disabled: 'rgba(255, 255, 255, 0.3)',
42
+ disabledBackground: 'rgba(255, 255, 255, 0.1)',
43
+ };
44
+ /**
45
+ * Get a color with optional opacity override
46
+ */
47
+ export function getColor(color, opacity) {
48
+ const baseColor = DTColors[color];
49
+ if (opacity === undefined || baseColor.startsWith('rgba')) {
50
+ return baseColor;
51
+ }
52
+ // Convert hex to rgba
53
+ const hex = baseColor.replace('#', '');
54
+ const r = parseInt(hex.substring(0, 2), 16);
55
+ const g = parseInt(hex.substring(2, 4), 16);
56
+ const b = parseInt(hex.substring(4, 6), 16);
57
+ return `rgba(${r}, ${g}, ${b}, ${opacity})`;
58
+ }
59
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/theme/colors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,cAAc;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAEhB,yCAAyC;IACzC,UAAU,EAAE,SAAS,EAAE,yCAAyC;IAChE,kBAAkB,EAAE,wBAAwB;IAC5C,YAAY,EAAE,SAAS,EAAE,yCAAyC;IAClE,oBAAoB,EAAE,wBAAwB;IAC9C,WAAW,EAAE,SAAS,EAAE,8CAA8C;IACtE,WAAW,EAAE,SAAS,EAAE,wCAAwC;IAChE,SAAS,EAAE,SAAS,EAAE,0CAA0C;IAEhE,mBAAmB;IACnB,OAAO,EAAE,SAAS;IAClB,cAAc,EAAE,wBAAwB;IACxC,SAAS,EAAE,SAAS;IACpB,gBAAgB,EAAE,wBAAwB;IAC1C,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,SAAS;IAElB,iBAAiB;IACjB,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,SAAS;IAClB,cAAc,EAAE,SAAS;IAEzB,cAAc;IACd,YAAY,EAAE,SAAS;IACvB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,SAAS;IAElB,gBAAgB;IAChB,MAAM,EAAE,SAAS;IACjB,cAAc,EAAE,SAAS;IAEzB,wDAAwD;IACxD,OAAO,EAAE,oBAAoB;IAC7B,QAAQ,EAAE,0BAA0B;IACpC,kBAAkB,EAAE,0BAA0B;CACtC,CAAC;AAIX;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAiB,EAAE,OAAgB;IAC1D,MAAM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