@helpwave/hightide-native 0.0.2 → 0.0.6

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 (71) hide show
  1. package/package.json +4 -3
  2. package/src/components/chat/ChatAttachmentCard.tsx +26 -13
  3. package/src/components/chat/ChatConversationList.tsx +12 -8
  4. package/src/components/chat/ChatConversationRow.tsx +21 -13
  5. package/src/components/chat/ChatDateDivider.tsx +18 -8
  6. package/src/components/chat/ChatMessageBubble.tsx +23 -13
  7. package/src/components/chat/ChatMessageCard.tsx +25 -14
  8. package/src/components/chat/ChatMessageComposer.tsx +14 -9
  9. package/src/components/chat/ChatMessageList.tsx +12 -5
  10. package/src/components/chat/ChatQuickReplyChip.tsx +7 -6
  11. package/src/components/chat/ChatSystemLine.tsx +21 -10
  12. package/src/components/chat/ChatThreadHeader.tsx +19 -9
  13. package/src/components/menu/Menu.tsx +16 -6
  14. package/src/components/menu/MenuActionItem.tsx +10 -5
  15. package/src/components/menu/MenuItem.tsx +16 -6
  16. package/src/components/menu/MenuNavigationItem.tsx +11 -6
  17. package/src/components/user-interaction/Button.tsx +18 -11
  18. package/src/components/user-interaction/Checkbox.tsx +26 -7
  19. package/src/components/user-interaction/IconButton.tsx +23 -9
  20. package/src/components/user-interaction/Input.tsx +22 -5
  21. package/src/components/user-interaction/MultiSelect.tsx +14 -7
  22. package/src/components/user-interaction/Select.tsx +11 -4
  23. package/src/components/visualization-and-display/Chip.tsx +21 -9
  24. package/src/components/visualization-and-display/Icon.tsx +27 -0
  25. package/src/components/visualization-and-display/index.ts +1 -0
  26. package/src/global-contexts/HightideContext.ts +4 -1
  27. package/src/global-contexts/HightideProvider.tsx +21 -9
  28. package/src/global-contexts/hightide-config/HightideConfigUtils.ts +15 -12
  29. package/src/global-contexts/localization/LocalizationProvider.tsx +3 -1
  30. package/src/global-contexts/localization/forward-exports.ts +1 -0
  31. package/src/global-contexts/theme/ThemeContext.ts +11 -6
  32. package/src/global-contexts/theme/ThemeProvider.tsx +34 -37
  33. package/src/hooks/useMultiSelect.ts +1 -0
  34. package/src/hooks/useNativeKeyValueStore.ts +7 -1
  35. package/src/hooks/useSelect.ts +1 -0
  36. package/src/theme/resolvers/button.ts +33 -20
  37. package/src/theme/resolvers/chat.ts +370 -336
  38. package/src/theme/resolvers/checkbox.ts +22 -18
  39. package/src/theme/resolvers/chip.ts +27 -19
  40. package/src/theme/resolvers/coloring.ts +21 -17
  41. package/src/theme/resolvers/iconButton.ts +25 -17
  42. package/src/theme/resolvers/input.ts +25 -18
  43. package/src/theme/resolvers/menu.ts +37 -29
  44. package/src/theme/resolvers/multiSelect.ts +20 -16
  45. package/src/theme/resolvers/select.ts +20 -16
  46. package/src/theme/themes/createTheme.ts +42 -17
  47. package/src/theme/themes/nativeThemes.ts +7 -6
  48. package/src/theme/types/color.ts +60 -0
  49. package/src/theme/types/components/button.ts +30 -0
  50. package/src/theme/types/components/chat.ts +198 -0
  51. package/src/theme/types/{checkbox.ts → components/checkbox.ts} +11 -5
  52. package/src/theme/types/components/chip.ts +30 -0
  53. package/src/theme/types/{components.ts → components/hightide.ts} +22 -1
  54. package/src/theme/types/components/iconButton.ts +30 -0
  55. package/src/theme/types/components/index.ts +10 -0
  56. package/src/theme/types/components/input.ts +19 -0
  57. package/src/theme/types/{menu.ts → components/menu.ts} +21 -14
  58. package/src/theme/types/{multiSelect.ts → components/multiSelect.ts} +13 -9
  59. package/src/theme/types/{select.ts → components/select.ts} +18 -11
  60. package/src/theme/types/decoration.ts +11 -0
  61. package/src/theme/types/index.ts +4 -9
  62. package/src/theme/types/layout.ts +46 -0
  63. package/src/theme/types/theme.ts +14 -10
  64. package/src/theme/types/typography.ts +18 -0
  65. package/src/icons/Icon.tsx +0 -35
  66. package/src/icons/index.ts +0 -1
  67. package/src/theme/types/button.ts +0 -18
  68. package/src/theme/types/chat.ts +0 -141
  69. package/src/theme/types/chip.ts +0 -18
  70. package/src/theme/types/iconButton.ts +0 -20
  71. package/src/theme/types/input.ts +0 -15
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "access": "public"
11
11
  },
12
12
  "license": "AGPL-3.0-only",
13
- "version": "0.0.2",
13
+ "version": "0.0.6",
14
14
  "type": "module",
15
15
  "files": [
16
16
  "src"
@@ -43,8 +43,8 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "lucide-react-native": "0.561.0",
46
- "@helpwave/hightide-utils": "0.0.1",
47
- "@helpwave/hightide-design": "0.0.1"
46
+ "@helpwave/hightide-design": "0.0.4",
47
+ "@helpwave/hightide-utils": "0.0.4"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@react-native-async-storage/async-storage": ">=2.0.0",
@@ -61,6 +61,7 @@
61
61
  "@types/react": "19.2.3",
62
62
  "@types/react-dom": "19.2.3",
63
63
  "eslint": "9.31.0",
64
+ "eslint-plugin-import": "2.32.0",
64
65
  "eslint-plugin-storybook": "10.4.5",
65
66
  "react": "19.2.3",
66
67
  "react-dom": "19.2.3",
@@ -1,16 +1,29 @@
1
- import { useMemo, type ReactNode } from 'react'
2
- import { Text, View, type StyleProp, type ViewProps, type ViewStyle } from 'react-native'
3
- import { Download, FileText } from 'lucide-react-native'
4
- import { useTheme } from '../../global-contexts/theme'
1
+ import {
2
+ useMemo,
3
+ type ReactNode
4
+ } from 'react'
5
+ import {
6
+ Text,
7
+ View,
8
+ type StyleProp,
9
+ type ViewProps,
10
+ type ViewStyle
11
+ } from 'react-native'
12
+ import {
13
+ Download,
14
+ FileText
15
+ } from 'lucide-react-native'
16
+
17
+ import { IconButton } from '../user-interaction/IconButton'
18
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
5
19
  import type {
6
20
  ChatAttachmentCardMetadataStyle,
7
21
  ChatAttachmentCardNameStyle,
8
22
  ChatAttachmentCardState,
9
23
  ChatAttachmentCardStyle,
10
- ChatMessageDirection,
11
- StyleOverwrite
12
- } from '../../theme'
13
- import { IconButton } from '../user-interaction'
24
+ ChatMessageDirection
25
+ } from '../../theme/types/components/chat'
26
+ import type { StyleOverwrite } from '../../theme/types/resolver'
14
27
 
15
28
  export type ChatAttachmentCardProps = Omit<ViewProps, 'style'> & {
16
29
  name: ReactNode,
@@ -43,23 +56,23 @@ export const ChatAttachmentCard = ({
43
56
  const staticState = useMemo(() => ({}), [])
44
57
 
45
58
  const resolvedCardStyle = useMemo(
46
- () => theme.components.chat.attachmentCard(state, cardStyle),
59
+ () => theme.components.chat.attachmentCard.container(state, cardStyle),
47
60
  [theme, state, cardStyle]
48
61
  )
49
62
  const resolvedIconStyle = useMemo(
50
- () => theme.components.chat.attachmentCardIcon(staticState),
63
+ () => theme.components.chat.attachmentCard.icon(staticState),
51
64
  [theme, staticState]
52
65
  )
53
66
  const resolvedIconColor = useMemo(
54
- () => theme.components.chat.attachmentCardIconColor(staticState),
67
+ () => theme.components.chat.attachmentCard.iconColor(staticState),
55
68
  [theme, staticState]
56
69
  )
57
70
  const resolvedNameStyle = useMemo(
58
- () => theme.components.chat.attachmentCardName(staticState, nameStyle),
71
+ () => theme.components.chat.attachmentCard.name(staticState, nameStyle),
59
72
  [theme, staticState, nameStyle]
60
73
  )
61
74
  const resolvedMetadataStyle = useMemo(
62
- () => theme.components.chat.attachmentCardMetadata(staticState, metadataStyle),
75
+ () => theme.components.chat.attachmentCard.metadata(staticState, metadataStyle),
63
76
  [theme, staticState, metadataStyle]
64
77
  )
65
78
 
@@ -1,4 +1,7 @@
1
- import { useMemo, type ReactNode } from 'react'
1
+ import {
2
+ useMemo,
3
+ type ReactNode
4
+ } from 'react'
2
5
  import {
3
6
  ScrollView,
4
7
  View,
@@ -6,13 +9,14 @@ import {
6
9
  type ViewProps,
7
10
  type ViewStyle
8
11
  } from 'react-native'
9
- import { useTheme } from '../../global-contexts/theme'
12
+
13
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
10
14
  import type {
11
15
  ChatConversationListFooterStyle,
12
16
  ChatConversationListHeaderStyle,
13
- ChatConversationListStyle,
14
- StyleOverwrite
15
- } from '../../theme'
17
+ ChatConversationListStyle
18
+ } from '../../theme/types/components/chat'
19
+ import type { StyleOverwrite } from '../../theme/types/resolver'
16
20
 
17
21
  export type ChatConversationListProps = Omit<ViewProps, 'children' | 'style'> & {
18
22
  header?: ReactNode,
@@ -40,15 +44,15 @@ export const ChatConversationList = ({
40
44
  const state = useMemo(() => ({}), [])
41
45
 
42
46
  const resolvedListStyle = useMemo(
43
- () => theme.components.chat.conversationList(state, listStyle),
47
+ () => theme.components.chat.conversationList.container(state, listStyle),
44
48
  [theme, state, listStyle]
45
49
  )
46
50
  const resolvedHeaderStyle = useMemo(
47
- () => theme.components.chat.conversationListHeader(state, headerStyle),
51
+ () => theme.components.chat.conversationList.header(state, headerStyle),
48
52
  [theme, state, headerStyle]
49
53
  )
50
54
  const resolvedFooterStyle = useMemo(
51
- () => theme.components.chat.conversationListFooter(state, footerStyle),
55
+ () => theme.components.chat.conversationList.footer(state, footerStyle),
52
56
  [theme, state, footerStyle]
53
57
  )
54
58
 
@@ -1,4 +1,8 @@
1
- import { Fragment, useMemo, type ReactNode } from 'react'
1
+ import {
2
+ Fragment,
3
+ useMemo,
4
+ type ReactNode
5
+ } from 'react'
2
6
  import {
3
7
  Pressable,
4
8
  Text,
@@ -7,16 +11,20 @@ import {
7
11
  type StyleProp,
8
12
  type ViewStyle
9
13
  } from 'react-native'
10
- import { Check, CheckCheck } from 'lucide-react-native'
11
- import { useTheme } from '../../global-contexts/theme'
14
+ import {
15
+ Check,
16
+ CheckCheck
17
+ } from 'lucide-react-native'
18
+
19
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
12
20
  import type {
13
21
  ChatConversationRowPreviewStyle,
14
22
  ChatConversationRowState,
15
23
  ChatConversationRowStyle,
16
24
  ChatConversationRowTimestampStyle,
17
- ChatConversationRowTitleStyle,
18
- StyleOverwrite
19
- } from '../../theme'
25
+ ChatConversationRowTitleStyle
26
+ } from '../../theme/types/components/chat'
27
+ import type { StyleOverwrite } from '../../theme/types/resolver'
20
28
 
21
29
  export type ChatConversationSentIndicator = 'sent' | 'sentAndReceived'
22
30
 
@@ -72,15 +80,15 @@ export const ChatConversationRow = ({
72
80
 
73
81
  const staticState = useMemo(() => ({}), [])
74
82
  const unreadBadge = useMemo(
75
- () => theme.components.chat.conversationRowUnreadBadge(staticState),
83
+ () => theme.components.chat.conversationRow.unreadBadge(staticState),
76
84
  [theme, staticState]
77
85
  )
78
86
  const unreadBadgeText = useMemo(
79
- () => theme.components.chat.conversationRowUnreadBadgeText(staticState),
87
+ () => theme.components.chat.conversationRow.unreadBadgeText(staticState),
80
88
  [theme, staticState]
81
89
  )
82
90
  const sentIndicatorColor = useMemo(
83
- () => theme.components.chat.conversationRowSentIndicator(staticState).color,
91
+ () => theme.components.chat.conversationRow.sentIndicator(staticState).color,
84
92
  [theme, staticState]
85
93
  )
86
94
 
@@ -90,14 +98,14 @@ export const ChatConversationRow = ({
90
98
  disabled={disabled}
91
99
  style={(pressableState) => {
92
100
  const state = resolveState(pressableState as PressableInteraction)
93
- return [theme.components.chat.conversationRow(state, rowStyle), style]
101
+ return [theme.components.chat.conversationRow.container(state, rowStyle), style]
94
102
  }}
95
103
  >
96
104
  {(pressableState) => {
97
105
  const state = resolveState(pressableState as PressableInteraction)
98
- const resolvedTitle = theme.components.chat.conversationRowTitle(state, titleStyle)
99
- const resolvedTimestamp = theme.components.chat.conversationRowTimestamp(state, timestampStyle)
100
- const resolvedPreview = theme.components.chat.conversationRowPreview(state, previewStyle)
106
+ const resolvedTitle = theme.components.chat.conversationRow.title(state, titleStyle)
107
+ const resolvedTimestamp = theme.components.chat.conversationRow.timestamp(state, timestampStyle)
108
+ const resolvedPreview = theme.components.chat.conversationRow.preview(state, previewStyle)
101
109
 
102
110
  return (
103
111
  <Fragment>
@@ -1,11 +1,21 @@
1
- import { useMemo, type ReactNode } from 'react'
2
- import { Text, View, type StyleProp, type ViewProps, type ViewStyle } from 'react-native'
3
- import { useTheme } from '../../global-contexts/theme'
1
+ import {
2
+ useMemo,
3
+ type ReactNode
4
+ } from 'react'
5
+ import {
6
+ Text,
7
+ View,
8
+ type StyleProp,
9
+ type ViewProps,
10
+ type ViewStyle
11
+ } from 'react-native'
12
+
13
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
4
14
  import type {
5
15
  ChatDateDividerStyle,
6
- ChatDateDividerTextStyle,
7
- StyleOverwrite
8
- } from '../../theme'
16
+ ChatDateDividerTextStyle
17
+ } from '../../theme/types/components/chat'
18
+ import type { StyleOverwrite } from '../../theme/types/resolver'
9
19
 
10
20
  export type ChatDateDividerProps = Omit<ViewProps, 'children' | 'style'> & {
11
21
  children?: ReactNode,
@@ -25,11 +35,11 @@ export const ChatDateDivider = ({
25
35
  const state = useMemo(() => ({}), [])
26
36
 
27
37
  const resolvedDividerStyle = useMemo(
28
- () => theme.components.chat.dateDivider(state, dividerStyle),
38
+ () => theme.components.chat.dateDivider.container(state, dividerStyle),
29
39
  [theme, state, dividerStyle]
30
40
  )
31
41
  const resolvedTextStyle = useMemo(
32
- () => theme.components.chat.dateDividerText(state, textStyle),
42
+ () => theme.components.chat.dateDivider.text(state, textStyle),
33
43
  [theme, state, textStyle]
34
44
  )
35
45
 
@@ -1,16 +1,26 @@
1
- import { useMemo, type ReactNode } from 'react'
2
- import { Text, View, type StyleProp, type ViewProps, type ViewStyle } from 'react-native'
1
+ import {
2
+ useMemo,
3
+ type ReactNode
4
+ } from 'react'
5
+ import {
6
+ Text,
7
+ View,
8
+ type StyleProp,
9
+ type ViewProps,
10
+ type ViewStyle
11
+ } from 'react-native'
3
12
  import { CheckCheck } from 'lucide-react-native'
4
- import { useTheme } from '../../global-contexts/theme'
13
+
14
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
5
15
  import type {
6
16
  ChatMessageBubbleContainerStyle,
7
17
  ChatMessageBubbleContentStyle,
8
18
  ChatMessageBubbleState,
9
19
  ChatMessageBubbleStyle,
10
20
  ChatMessageBubbleTimestampStyle,
11
- ChatMessageDirection,
12
- StyleOverwrite
13
- } from '../../theme'
21
+ ChatMessageDirection
22
+ } from '../../theme/types/components/chat'
23
+ import type { StyleOverwrite } from '../../theme/types/resolver'
14
24
 
15
25
  export type { ChatMessageDirection }
16
26
 
@@ -43,31 +53,31 @@ export const ChatMessageBubble = ({
43
53
  const staticState = useMemo(() => ({}), [])
44
54
 
45
55
  const resolvedContainerStyle = useMemo(
46
- () => theme.components.chat.messageBubbleContainer(state, containerStyle),
56
+ () => theme.components.chat.messageBubble.container(state, containerStyle),
47
57
  [theme, state, containerStyle]
48
58
  )
49
59
  const resolvedBubbleStyle = useMemo(
50
- () => theme.components.chat.messageBubble(state, bubbleStyle),
60
+ () => theme.components.chat.messageBubble.bubble(state, bubbleStyle),
51
61
  [theme, state, bubbleStyle]
52
62
  )
53
63
  const resolvedContentStyle = useMemo(
54
- () => theme.components.chat.messageBubbleContent(state, contentStyle),
64
+ () => theme.components.chat.messageBubble.content(state, contentStyle),
55
65
  [theme, state, contentStyle]
56
66
  )
57
67
  const resolvedTimestampStyle = useMemo(
58
- () => theme.components.chat.messageBubbleTimestamp(state, timestampStyle),
68
+ () => theme.components.chat.messageBubble.timestamp(state, timestampStyle),
59
69
  [theme, state, timestampStyle]
60
70
  )
61
71
  const resolvedReceiptStyle = useMemo(
62
- () => theme.components.chat.messageBubbleReceipt(staticState),
72
+ () => theme.components.chat.messageBubble.receipt(staticState),
63
73
  [theme, staticState]
64
74
  )
65
75
  const resolvedReceiptTextStyle = useMemo(
66
- () => theme.components.chat.messageBubbleReceiptText(staticState),
76
+ () => theme.components.chat.messageBubble.receiptText(staticState),
67
77
  [theme, staticState]
68
78
  )
69
79
  const resolvedReceiptIcon = useMemo(
70
- () => theme.components.chat.messageBubbleReceiptIcon(staticState),
80
+ () => theme.components.chat.messageBubble.receiptIcon(staticState),
71
81
  [theme, staticState]
72
82
  )
73
83
 
@@ -1,15 +1,26 @@
1
- import { useMemo, type ReactNode } from 'react'
2
- import { Text, View, type StyleProp, type ViewProps, type ViewStyle } from 'react-native'
3
- import type { ColoringType } from '@helpwave/hightide-design'
4
- import { useTheme } from '../../global-contexts/theme'
1
+ import {
2
+ useMemo,
3
+ type ReactNode
4
+ } from 'react'
5
+ import {
6
+ Text,
7
+ View,
8
+ type StyleProp,
9
+ type ViewProps,
10
+ type ViewStyle
11
+ } from 'react-native'
12
+
13
+ import type { ColoringType } from '@helpwave/hightide-design/helpers'
14
+
15
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
5
16
  import type {
6
17
  ChatMessageCardState,
7
18
  ChatMessageCardStyle,
8
19
  ChatMessageCardSubtitleStyle,
9
20
  ChatMessageCardTitleStyle,
10
- ChatMessageDirection,
11
- StyleOverwrite
12
- } from '../../theme'
21
+ ChatMessageDirection
22
+ } from '../../theme/types/components/chat'
23
+ import type { StyleOverwrite } from '../../theme/types/resolver'
13
24
 
14
25
  export type ChatMessageCardProps = Omit<ViewProps, 'children' | 'style'> & {
15
26
  icon?: ReactNode,
@@ -46,31 +57,31 @@ export const ChatMessageCard = ({
46
57
  const staticState = useMemo(() => ({}), [])
47
58
 
48
59
  const resolvedCardStyle = useMemo(
49
- () => theme.components.chat.messageCard(state, cardStyle),
60
+ () => theme.components.chat.messageCard.container(state, cardStyle),
50
61
  [theme, state, cardStyle]
51
62
  )
52
63
  const resolvedHeaderStyle = useMemo(
53
- () => theme.components.chat.messageCardHeader(staticState),
64
+ () => theme.components.chat.messageCard.header(staticState),
54
65
  [theme, staticState]
55
66
  )
56
67
  const resolvedIconStyle = useMemo(
57
- () => theme.components.chat.messageCardIcon(state),
68
+ () => theme.components.chat.messageCard.icon(state),
58
69
  [theme, state]
59
70
  )
60
71
  const resolvedTitleStyle = useMemo(
61
- () => theme.components.chat.messageCardTitle(state, titleStyle),
72
+ () => theme.components.chat.messageCard.title(state, titleStyle),
62
73
  [theme, state, titleStyle]
63
74
  )
64
75
  const resolvedSubtitleStyle = useMemo(
65
- () => theme.components.chat.messageCardSubtitle(staticState, subtitleStyle),
76
+ () => theme.components.chat.messageCard.subtitle(staticState, subtitleStyle),
66
77
  [theme, staticState, subtitleStyle]
67
78
  )
68
79
  const resolvedBodyStyle = useMemo(
69
- () => theme.components.chat.messageCardBody(staticState),
80
+ () => theme.components.chat.messageCard.body(staticState),
70
81
  [theme, staticState]
71
82
  )
72
83
  const resolvedActionsStyle = useMemo(
73
- () => theme.components.chat.messageCardActions(staticState),
84
+ () => theme.components.chat.messageCard.actions(staticState),
74
85
  [theme, staticState]
75
86
  )
76
87
 
@@ -1,4 +1,7 @@
1
- import { useMemo, type ReactNode } from 'react'
1
+ import {
2
+ useMemo,
3
+ type ReactNode
4
+ } from 'react'
2
5
  import {
3
6
  TextInput,
4
7
  View,
@@ -7,14 +10,16 @@ import {
7
10
  type ViewStyle
8
11
  } from 'react-native'
9
12
  import { SendHorizontal } from 'lucide-react-native'
13
+
10
14
  import { useControlledState } from '@helpwave/hightide-utils/hooks'
15
+
11
16
  import { IconButton } from '../user-interaction/IconButton'
12
- import { useTheme } from '../../global-contexts/theme'
17
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
13
18
  import type {
14
19
  ChatMessageComposerInputStyle,
15
- ChatMessageComposerStyle,
16
- StyleOverwrite
17
- } from '../../theme'
20
+ ChatMessageComposerStyle
21
+ } from '../../theme/types/components/chat'
22
+ import type { StyleOverwrite } from '../../theme/types/resolver'
18
23
 
19
24
  export type ChatMessageComposerProps = Omit<ViewProps, 'style'> & {
20
25
  value?: string,
@@ -55,15 +60,15 @@ export const ChatMessageComposer = ({
55
60
  const state = useMemo(() => ({}), [])
56
61
 
57
62
  const resolvedComposerStyle = useMemo(
58
- () => theme.components.chat.messageComposer(state, composerStyle),
63
+ () => theme.components.chat.messageComposer.container(state, composerStyle),
59
64
  [theme, state, composerStyle]
60
65
  )
61
66
  const resolvedInputStyle = useMemo(
62
- () => theme.components.chat.messageComposerInput(state, inputStyle),
67
+ () => theme.components.chat.messageComposer.input(state, inputStyle),
63
68
  [theme, state, inputStyle]
64
69
  )
65
70
  const placeholderColor = useMemo(
66
- () => theme.components.chat.messageComposerPlaceholderColor(state),
71
+ () => theme.components.chat.messageComposer.placeholderColor(state),
67
72
  [theme, state]
68
73
  )
69
74
 
@@ -103,7 +108,7 @@ export const ChatMessageComposer = ({
103
108
  size="md"
104
109
  onPress={send}
105
110
  icon={SendHorizontal}
106
- buttonStyle={(prev) => [prev, { borderRadius: 999 }]}
111
+ buttonStyle={(prev) => ({ ...prev, borderRadius: 999 })}
107
112
  />
108
113
  </View>
109
114
  )
@@ -1,4 +1,9 @@
1
- import { useEffect, useMemo, useRef, type ReactNode } from 'react'
1
+ import {
2
+ useEffect,
3
+ useMemo,
4
+ useRef,
5
+ type ReactNode
6
+ } from 'react'
2
7
  import {
3
8
  ScrollView,
4
9
  type NativeScrollEvent,
@@ -6,8 +11,10 @@ import {
6
11
  type StyleProp,
7
12
  type ViewStyle
8
13
  } from 'react-native'
9
- import { useTheme } from '../../global-contexts/theme'
10
- import type { ChatMessageListStyle, StyleOverwrite } from '../../theme'
14
+
15
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
16
+ import type { ChatMessageListStyle } from '../../theme/types/components/chat'
17
+ import type { StyleOverwrite } from '../../theme/types/resolver'
11
18
 
12
19
  export type ChatMessageListProps = {
13
20
  autoScroll?: boolean,
@@ -31,11 +38,11 @@ export const ChatMessageList = ({
31
38
  const state = useMemo(() => ({}), [])
32
39
 
33
40
  const resolvedListStyle = useMemo(
34
- () => theme.components.chat.messageList(state, listStyle),
41
+ () => theme.components.chat.messageList.container(state, listStyle),
35
42
  [theme, state, listStyle]
36
43
  )
37
44
  const listGap = useMemo(
38
- () => (theme.components.chat.messageList(state) as ViewStyle).gap,
45
+ () => (theme.components.chat.messageList.container(state) as ViewStyle).gap,
39
46
  [theme, state]
40
47
  )
41
48
 
@@ -6,13 +6,14 @@ import {
6
6
  type StyleProp,
7
7
  type ViewStyle
8
8
  } from 'react-native'
9
- import { useTheme } from '../../global-contexts/theme'
9
+
10
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
10
11
  import type {
11
12
  ChatQuickReplyChipState,
12
13
  ChatQuickReplyChipStyle,
13
- ChatQuickReplyChipTextStyle,
14
- StyleOverwrite
15
- } from '../../theme'
14
+ ChatQuickReplyChipTextStyle
15
+ } from '../../theme/types/components/chat'
16
+ import type { StyleOverwrite } from '../../theme/types/resolver'
16
17
 
17
18
  export type ChatQuickReplyChipProps = Omit<PressableProps, 'children' | 'style'> & {
18
19
  isActive?: boolean,
@@ -53,12 +54,12 @@ export const ChatQuickReplyChip = ({
53
54
  disabled={disabled}
54
55
  style={(pressableState) => {
55
56
  const state = resolveState(pressableState as PressableInteraction)
56
- return [theme.components.chat.quickReplyChip(state, chipStyle), style]
57
+ return [theme.components.chat.quickReplyChip.container(state, chipStyle), style]
57
58
  }}
58
59
  >
59
60
  {(pressableState) => {
60
61
  const state = resolveState(pressableState as PressableInteraction)
61
- const resolvedText = theme.components.chat.quickReplyChipText(state, textStyle)
62
+ const resolvedText = theme.components.chat.quickReplyChip.text(state, textStyle)
62
63
 
63
64
  if (typeof children === 'string' || typeof children === 'number') {
64
65
  return <Text style={resolvedText}>{children}</Text>
@@ -1,14 +1,25 @@
1
- import { useMemo, type ReactNode } from 'react'
2
- import { Text, View, type StyleProp, type ViewProps, type ViewStyle } from 'react-native'
1
+ import {
2
+ useMemo,
3
+ type ReactNode
4
+ } from 'react'
5
+ import {
6
+ Text,
7
+ View,
8
+ type StyleProp,
9
+ type ViewProps,
10
+ type ViewStyle
11
+ } from 'react-native'
3
12
  import { CheckCheck } from 'lucide-react-native'
4
- import type { ColoringType } from '@helpwave/hightide-design'
5
- import { useTheme } from '../../global-contexts/theme'
13
+
14
+ import type { ColoringType } from '@helpwave/hightide-design/helpers'
15
+
16
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
6
17
  import type {
7
18
  ChatSystemLineState,
8
19
  ChatSystemLineStyle,
9
- ChatSystemLineTextStyle,
10
- StyleOverwrite
11
- } from '../../theme'
20
+ ChatSystemLineTextStyle
21
+ } from '../../theme/types/components/chat'
22
+ import type { StyleOverwrite } from '../../theme/types/resolver'
12
23
 
13
24
  export type ChatSystemLineProps = Omit<ViewProps, 'children' | 'style'> & {
14
25
  icon?: ReactNode,
@@ -32,15 +43,15 @@ export const ChatSystemLine = ({
32
43
  const state = useMemo(() => ({ color }), [color])
33
44
 
34
45
  const resolvedLineStyle = useMemo(
35
- () => theme.components.chat.systemLine(state, lineStyle),
46
+ () => theme.components.chat.systemLine.container(state, lineStyle),
36
47
  [theme, state, lineStyle]
37
48
  )
38
49
  const resolvedTextStyle = useMemo(
39
- () => theme.components.chat.systemLineText(state, textStyle),
50
+ () => theme.components.chat.systemLine.text(state, textStyle),
40
51
  [theme, state, textStyle]
41
52
  )
42
53
  const resolvedIcon = useMemo(
43
- () => theme.components.chat.systemLineIcon(state),
54
+ () => theme.components.chat.systemLine.icon(state),
44
55
  [theme, state]
45
56
  )
46
57
 
@@ -1,12 +1,22 @@
1
- import { useMemo, type ReactNode } from 'react'
2
- import { Text, View, type StyleProp, type ViewProps, type ViewStyle } from 'react-native'
3
- import { useTheme } from '../../global-contexts/theme'
1
+ import {
2
+ useMemo,
3
+ type ReactNode
4
+ } from 'react'
5
+ import {
6
+ Text,
7
+ View,
8
+ type StyleProp,
9
+ type ViewProps,
10
+ type ViewStyle
11
+ } from 'react-native'
12
+
13
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
4
14
  import type {
5
15
  ChatThreadHeaderStyle,
6
16
  ChatThreadHeaderSubtitleStyle,
7
- ChatThreadHeaderTitleStyle,
8
- StyleOverwrite
9
- } from '../../theme'
17
+ ChatThreadHeaderTitleStyle
18
+ } from '../../theme/types/components/chat'
19
+ import type { StyleOverwrite } from '../../theme/types/resolver'
10
20
 
11
21
  export type ChatThreadHeaderProps = Omit<ViewProps, 'style'> & {
12
22
  avatar?: ReactNode,
@@ -36,15 +46,15 @@ export const ChatThreadHeader = ({
36
46
  const state = useMemo(() => ({}), [])
37
47
 
38
48
  const resolvedHeaderStyle = useMemo(
39
- () => theme.components.chat.threadHeader(state, headerStyle),
49
+ () => theme.components.chat.threadHeader.container(state, headerStyle),
40
50
  [theme, state, headerStyle]
41
51
  )
42
52
  const resolvedTitleStyle = useMemo(
43
- () => theme.components.chat.threadHeaderTitle(state, titleStyle),
53
+ () => theme.components.chat.threadHeader.title(state, titleStyle),
44
54
  [theme, state, titleStyle]
45
55
  )
46
56
  const resolvedSubtitleStyle = useMemo(
47
- () => theme.components.chat.threadHeaderSubtitle(state, subtitleStyle),
57
+ () => theme.components.chat.threadHeader.subtitle(state, subtitleStyle),
48
58
  [theme, state, subtitleStyle]
49
59
  )
50
60
 
@@ -1,12 +1,22 @@
1
- import { useMemo, type ReactNode } from 'react'
2
- import { Text, View, type StyleProp, type ViewProps, type ViewStyle } from 'react-native'
3
- import { useTheme } from '../../global-contexts/theme'
1
+ import {
2
+ useMemo,
3
+ type ReactNode
4
+ } from 'react'
5
+ import {
6
+ Text,
7
+ View,
8
+ type StyleProp,
9
+ type ViewProps,
10
+ type ViewStyle
11
+ } from 'react-native'
12
+
13
+ import { useTheme } from '../../global-contexts/theme/ThemeContext'
4
14
  import type {
5
15
  MenuCardStyle,
6
16
  MenuSectionStyle,
7
- MenuSectionTitleStyle,
8
- StyleOverwrite
9
- } from '../../theme'
17
+ MenuSectionTitleStyle
18
+ } from '../../theme/types/components/menu'
19
+ import type { StyleOverwrite } from '../../theme/types/resolver'
10
20
 
11
21
  export type MenuProps = Omit<ViewProps, 'children' | 'style'> & {
12
22
  title: string,