@helpwave/hightide-native 0.0.8 → 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 (125) hide show
  1. package/README.md +4 -4
  2. package/package.json +8 -19
  3. package/src/components/card/Card.tsx +41 -0
  4. package/src/components/card/index.ts +1 -0
  5. package/src/components/chat/ChatAttachmentMessageBubble.tsx +246 -0
  6. package/src/components/chat/ChatConversationRow.tsx +21 -16
  7. package/src/components/chat/ChatDateDivider.tsx +2 -2
  8. package/src/components/chat/ChatMessageBubble.tsx +62 -52
  9. package/src/components/chat/ChatMessageComposer.tsx +16 -14
  10. package/src/components/chat/ChatQuickReplyChip.tsx +41 -43
  11. package/src/components/chat/ChatSystemLine.tsx +14 -7
  12. package/src/components/chat/ChatThreadHeader.tsx +60 -6
  13. package/src/components/chat/index.ts +1 -2
  14. package/src/components/index.ts +3 -1
  15. package/src/components/layout/Divider.tsx +60 -0
  16. package/src/components/layout/index.ts +1 -0
  17. package/src/components/list/ListActionItem.tsx +99 -0
  18. package/src/components/list/ListItem.tsx +96 -0
  19. package/src/components/list/ListNavigationItem.tsx +102 -0
  20. package/src/components/list/index.ts +3 -0
  21. package/src/components/user-interaction/Button.tsx +80 -31
  22. package/src/components/user-interaction/Checkbox.tsx +72 -32
  23. package/src/components/user-interaction/IconButton.tsx +68 -30
  24. package/src/components/user-interaction/Input.tsx +61 -14
  25. package/src/components/user-interaction/MultiSelect.tsx +142 -75
  26. package/src/components/user-interaction/SearchBar.tsx +222 -0
  27. package/src/components/user-interaction/Select.tsx +129 -58
  28. package/src/components/user-interaction/Switch.tsx +110 -80
  29. package/src/components/user-interaction/ThemedPressable.tsx +136 -0
  30. package/src/components/user-interaction/index.ts +2 -0
  31. package/src/components/visualization-and-display/Avatar.tsx +112 -93
  32. package/src/components/visualization-and-display/Chip.tsx +22 -22
  33. package/src/components/visualization-and-display/ThemedIcon.tsx +72 -0
  34. package/src/components/visualization-and-display/ThemedText.tsx +38 -0
  35. package/src/components/visualization-and-display/index.ts +2 -1
  36. package/src/global-contexts/HightideProvider.tsx +19 -10
  37. package/src/global-contexts/content-theme/ContentThemeContext.ts +22 -0
  38. package/src/global-contexts/content-theme/ContentThemeProvider.tsx +32 -0
  39. package/src/global-contexts/content-theme/index.ts +2 -0
  40. package/src/global-contexts/debug/forward-exports.ts +10 -0
  41. package/src/global-contexts/debug/index.ts +1 -0
  42. package/src/global-contexts/index.ts +2 -0
  43. package/src/global-contexts/theme/ThemeProvider.tsx +7 -1
  44. package/src/icons/HightideIconRegistry.ts +33 -0
  45. package/src/icons/index.ts +2 -0
  46. package/src/icons/types.ts +11 -0
  47. package/src/theme/adapters/container-adapter.ts +323 -0
  48. package/src/theme/adapters/defined.ts +11 -0
  49. package/src/theme/adapters/icon-style-adapter.ts +10 -0
  50. package/src/theme/adapters/index.ts +4 -0
  51. package/src/theme/adapters/text-style-adapter.ts +16 -0
  52. package/src/theme/index.ts +1 -0
  53. package/src/theme/resolvers/avatar.ts +385 -186
  54. package/src/theme/resolvers/button.ts +50 -82
  55. package/src/theme/resolvers/card.ts +27 -0
  56. package/src/theme/resolvers/chat/attachment-message-bubble.ts +163 -0
  57. package/src/theme/resolvers/chat/chat-theme.ts +69 -0
  58. package/src/theme/resolvers/chat/conversation-list.ts +35 -0
  59. package/src/theme/resolvers/chat/conversation-row.ts +64 -0
  60. package/src/theme/resolvers/chat/date-divider.ts +31 -0
  61. package/src/theme/resolvers/chat/index.ts +11 -0
  62. package/src/theme/resolvers/chat/message-bubble.ts +57 -0
  63. package/src/theme/resolvers/chat/message-composer.ts +38 -0
  64. package/src/theme/resolvers/chat/message-list.ts +27 -0
  65. package/src/theme/resolvers/chat/quick-reply-chip.ts +80 -0
  66. package/src/theme/resolvers/chat/system-line.ts +41 -0
  67. package/src/theme/resolvers/chat/thread-header.ts +85 -0
  68. package/src/theme/resolvers/checkbox.ts +87 -74
  69. package/src/theme/resolvers/chip.ts +30 -67
  70. package/src/theme/resolvers/colorScheme.ts +136 -0
  71. package/src/theme/resolvers/divider.ts +34 -0
  72. package/src/theme/resolvers/icon.ts +21 -0
  73. package/src/theme/resolvers/iconButton.ts +45 -61
  74. package/src/theme/resolvers/index.ts +7 -2
  75. package/src/theme/resolvers/input.ts +64 -42
  76. package/src/theme/resolvers/listItem.ts +115 -0
  77. package/src/theme/resolvers/multiSelect.ts +159 -84
  78. package/src/theme/resolvers/searchBar.ts +121 -0
  79. package/src/theme/resolvers/select.ts +141 -66
  80. package/src/theme/resolvers/switch.ts +59 -53
  81. package/src/theme/resolvers/themedPressable.ts +54 -0
  82. package/src/theme/themes/createHightideTheme.ts +214 -51
  83. package/src/theme/themes/hightideThemes.ts +10 -6
  84. package/src/theme/types/color.ts +2 -59
  85. package/src/theme/types/components/avatar.ts +37 -36
  86. package/src/theme/types/components/button.ts +13 -14
  87. package/src/theme/types/components/card.ts +9 -0
  88. package/src/theme/types/components/chat.ts +124 -103
  89. package/src/theme/types/components/checkbox.ts +11 -12
  90. package/src/theme/types/components/chip.ts +8 -14
  91. package/src/theme/types/components/divider.ts +18 -0
  92. package/src/theme/types/components/hightide.ts +41 -42
  93. package/src/theme/types/components/iconButton.ts +19 -14
  94. package/src/theme/types/components/index.ts +5 -1
  95. package/src/theme/types/components/input.ts +17 -8
  96. package/src/theme/types/components/listItem.ts +86 -0
  97. package/src/theme/types/components/multiSelect.ts +14 -12
  98. package/src/theme/types/components/searchBar.ts +28 -0
  99. package/src/theme/types/components/select.ts +21 -9
  100. package/src/theme/types/components/switch.ts +12 -5
  101. package/src/theme/types/components/themedPressable.ts +31 -0
  102. package/src/theme/types/decoration.ts +1 -11
  103. package/src/theme/types/icongraphy.ts +8 -0
  104. package/src/theme/types/index.ts +2 -0
  105. package/src/theme/types/layout.ts +25 -57
  106. package/src/theme/types/resolver.ts +54 -1
  107. package/src/theme/types/semantics.ts +72 -0
  108. package/src/theme/types/theme.ts +26 -13
  109. package/src/theme/types/typography.ts +16 -17
  110. package/src/utils/hitBoxOverlay.ts +44 -0
  111. package/src/utils/index.ts +2 -0
  112. package/src/utils/minimumTouchTargetHitSlop.ts +68 -0
  113. package/src/components/chat/ChatAttachmentCard.tsx +0 -110
  114. package/src/components/chat/ChatMessageCard.tsx +0 -118
  115. package/src/components/menu/Menu.tsx +0 -61
  116. package/src/components/menu/MenuActionItem.tsx +0 -90
  117. package/src/components/menu/MenuItem.tsx +0 -73
  118. package/src/components/menu/MenuNavigationItem.tsx +0 -90
  119. package/src/components/menu/index.ts +0 -4
  120. package/src/components/visualization-and-display/Icon.tsx +0 -27
  121. package/src/storybook/helper.tsx +0 -36
  122. package/src/theme/resolvers/chat.ts +0 -418
  123. package/src/theme/resolvers/coloring.ts +0 -94
  124. package/src/theme/resolvers/menu.ts +0 -120
  125. package/src/theme/types/components/menu.ts +0 -57
@@ -3,13 +3,19 @@ import type {
3
3
  ViewStyle
4
4
  } from 'react-native'
5
5
 
6
- import type { ColoringType } from '@helpwave/hightide-design/utils'
6
+ import type { ColorPairToken } from '@helpwave/hightide-design/theme-tokens'
7
7
 
8
- import type { Color } from '../color'
9
8
  import type {
10
9
  InteractionState,
10
+ SimpleStyleResolver,
11
11
  StyleResolverFunction
12
12
  } from '../resolver'
13
+ import type { IconStyle } from '../../../icons'
14
+ import type { ThemedPressableState } from './themedPressable'
15
+ import type {
16
+ AvatarState,
17
+ AvatarThemeResolvers
18
+ } from './avatar'
13
19
 
14
20
  export type ChatMessageDirection = 'incoming' | 'outgoing'
15
21
 
@@ -30,6 +36,7 @@ export type ChatConversationListHeaderStyle = ViewStyle
30
36
  export type ChatConversationListFooterStyle = ViewStyle
31
37
 
32
38
  export type ChatThreadHeaderStyle = ViewStyle
39
+ export type ChatThreadHeaderContentRowStyle = ViewStyle
33
40
  export type ChatThreadHeaderTitleStyle = TextStyle
34
41
  export type ChatThreadHeaderSubtitleStyle = TextStyle
35
42
 
@@ -40,159 +47,173 @@ export type ChatMessageBubbleState = {
40
47
  }
41
48
 
42
49
  export type ChatMessageBubbleContainerStyle = ViewStyle
43
- export type ChatMessageBubbleStyle = ViewStyle
44
- export type ChatMessageBubbleContentStyle = TextStyle
45
- export type ChatMessageBubbleTimestampStyle = TextStyle
46
- export type ChatMessageBubbleReceiptStyle = ViewStyle
47
- export type ChatMessageBubbleReceiptTextStyle = TextStyle
48
-
49
- export type ChatMessageBubbleReceiptIconStyle = {
50
- color: Color,
51
- }
52
-
53
- export type ChatMessageCardState = {
54
- direction: ChatMessageDirection,
55
- color?: ColoringType,
56
- }
57
-
58
- export type ChatMessageCardStyle = ViewStyle
59
- export type ChatMessageCardHeaderStyle = ViewStyle
60
- export type ChatMessageCardIconStyle = ViewStyle
61
-
62
- export type ChatMessageCardIconColor = {
63
- color: Color,
64
- }
65
-
66
- export type ChatMessageCardTitleStyle = TextStyle
67
- export type ChatMessageCardSubtitleStyle = TextStyle
68
- export type ChatMessageCardBodyStyle = ViewStyle
69
- export type ChatMessageCardActionsStyle = ViewStyle
70
-
71
- export type ChatAttachmentCardState = {
50
+ export type ChatMessageBubbleBodyStyle = ViewStyle
51
+ export type ChatMessageBubbleBodyTextStyle = TextStyle
52
+ export type ChatMessageBubbleMetaDataContainerStyle = ViewStyle
53
+ export type ChatMessageBubbleMetaDataStatusContainerStyle = ViewStyle
54
+ export type ChatMessageBubbleMetaDataTextStyle = TextStyle
55
+ export type ChatMessageBubbleMetaDataIconStyle = IconStyle
56
+
57
+ export type ChatAttachmentMessageBubbleState = {
72
58
  direction: ChatMessageDirection,
73
59
  }
74
60
 
75
- export type ChatAttachmentCardStyle = ViewStyle
76
- export type ChatAttachmentCardIconStyle = ViewStyle
61
+ export type PressableContainerStyle = ViewStyle
62
+ export type PressableStateLayerStyle = ViewStyle
63
+ export type PressableTextStyle = TextStyle
77
64
 
78
- export type ChatAttachmentCardIconColor = {
79
- color: Color,
80
- }
65
+ export type PressableState = ThemedPressableState
81
66
 
82
- export type ChatAttachmentCardNameStyle = TextStyle
83
- export type ChatAttachmentCardMetadataStyle = TextStyle
67
+ export type ChatAttachmentMessageBubbleFileIconContainerStyle = ViewStyle
68
+ export type ChatAttachmentMessageBubbleFileIconStyle = IconStyle
69
+ export type ChatAttachmentMessageBubbleDownloadIconContainerStyle = ViewStyle
70
+ export type ChatAttachmentMessageBubbleDownloadIconStyle = IconStyle
71
+ export type ChatAttachmentMessageBubbleFileNameTextStyle = TextStyle
72
+ export type ChatAttachmentMessageBubbleFileMetadataTextStyle = TextStyle
84
73
 
85
74
  export type ChatSystemLineState = {
86
- color?: ColoringType,
75
+ color?: ColorPairToken,
87
76
  }
88
77
 
89
78
  export type ChatSystemLineStyle = ViewStyle
90
79
  export type ChatSystemLineTextStyle = TextStyle
91
80
 
92
- export type ChatSystemLineIconStyle = {
93
- color: Color,
94
- }
81
+ export type ChatSystemLineIconStyle = IconStyle
95
82
 
96
83
  export type ChatDateDividerStyle = ViewStyle
97
84
  export type ChatDateDividerTextStyle = TextStyle
98
85
 
99
- export type ChatQuickReplyChipState = InteractionState & {
86
+ export type ChatQuickReplyChipState = {
100
87
  isActive?: boolean,
101
88
  }
102
89
 
103
- export type ChatQuickReplyChipStyle = ViewStyle
104
- export type ChatQuickReplyChipTextStyle = TextStyle
105
-
106
90
  export type ChatMessageComposerStyle = ViewStyle
107
- export type ChatMessageComposerInputStyle = TextStyle
91
+ export type ChatMessageComposerInputStyle = ViewStyle & TextStyle
108
92
 
109
- export type ChatConversationRowTheme = {
93
+ export type ChatConversationRowThemeResolvers = {
110
94
  container: StyleResolverFunction<ChatConversationRowState, ChatConversationRowStyle>,
111
95
  title: StyleResolverFunction<ChatConversationRowState, ChatConversationRowTitleStyle>,
112
96
  timestamp: StyleResolverFunction<ChatConversationRowState, ChatConversationRowTimestampStyle>,
113
97
  preview: StyleResolverFunction<ChatConversationRowState, ChatConversationRowPreviewStyle>,
114
98
  unreadBadge: StyleResolverFunction<Record<string, never>, ChatConversationRowUnreadBadgeStyle>,
115
99
  unreadBadgeText: StyleResolverFunction<Record<string, never>, ChatConversationRowUnreadBadgeTextStyle>,
116
- sentIndicator: StyleResolverFunction<Record<string, never>, ChatMessageBubbleReceiptIconStyle>,
100
+ sentIndicator: StyleResolverFunction<Record<string, never>, ChatMessageBubbleMetaDataIconStyle>,
117
101
  }
118
102
 
119
- export type ChatConversationListTheme = {
103
+ export type ChatConversationListThemeResolvers = {
120
104
  container: StyleResolverFunction<Record<string, never>, ChatConversationListStyle>,
121
105
  header: StyleResolverFunction<Record<string, never>, ChatConversationListHeaderStyle>,
122
106
  footer: StyleResolverFunction<Record<string, never>, ChatConversationListFooterStyle>,
123
107
  }
124
108
 
125
- export type ChatThreadHeaderTheme = {
109
+ export type ChatThreadHeaderThemeResolvers = {
126
110
  container: StyleResolverFunction<Record<string, never>, ChatThreadHeaderStyle>,
111
+ contentRow: StyleResolverFunction<Record<string, never>, ChatThreadHeaderContentRowStyle>,
127
112
  title: StyleResolverFunction<Record<string, never>, ChatThreadHeaderTitleStyle>,
128
113
  subtitle: StyleResolverFunction<Record<string, never>, ChatThreadHeaderSubtitleStyle>,
114
+ avatar: StyleResolverFunction<
115
+ AvatarState,
116
+ AvatarThemeResolvers
117
+ >,
129
118
  }
130
119
 
131
- export type ChatMessageListTheme = {
120
+ export type ChatMessageListThemeResolvers = {
132
121
  container: StyleResolverFunction<Record<string, never>, ChatMessageListStyle>,
133
122
  }
134
123
 
135
- export type ChatMessageBubbleTheme = {
124
+ export type ChatMessageBubbleThemeResolvers = {
136
125
  container: StyleResolverFunction<ChatMessageBubbleState, ChatMessageBubbleContainerStyle>,
137
- bubble: StyleResolverFunction<ChatMessageBubbleState, ChatMessageBubbleStyle>,
138
- content: StyleResolverFunction<ChatMessageBubbleState, ChatMessageBubbleContentStyle>,
139
- timestamp: StyleResolverFunction<ChatMessageBubbleState, ChatMessageBubbleTimestampStyle>,
140
- receipt: StyleResolverFunction<Record<string, never>, ChatMessageBubbleReceiptStyle>,
141
- receiptText: StyleResolverFunction<Record<string, never>, ChatMessageBubbleReceiptTextStyle>,
142
- receiptIcon: StyleResolverFunction<Record<string, never>, ChatMessageBubbleReceiptIconStyle>,
143
- }
144
-
145
- export type ChatMessageCardTheme = {
146
- container: StyleResolverFunction<ChatMessageCardState, ChatMessageCardStyle>,
147
- header: StyleResolverFunction<Record<string, never>, ChatMessageCardHeaderStyle>,
148
- icon: StyleResolverFunction<ChatMessageCardState, ChatMessageCardIconStyle>,
149
- iconColor: StyleResolverFunction<ChatMessageCardState, ChatMessageCardIconColor>,
150
- title: StyleResolverFunction<ChatMessageCardState, ChatMessageCardTitleStyle>,
151
- subtitle: StyleResolverFunction<Record<string, never>, ChatMessageCardSubtitleStyle>,
152
- body: StyleResolverFunction<Record<string, never>, ChatMessageCardBodyStyle>,
153
- actions: StyleResolverFunction<Record<string, never>, ChatMessageCardActionsStyle>,
154
- }
155
-
156
- export type ChatAttachmentCardTheme = {
157
- container: StyleResolverFunction<ChatAttachmentCardState, ChatAttachmentCardStyle>,
158
- icon: StyleResolverFunction<Record<string, never>, ChatAttachmentCardIconStyle>,
159
- iconColor: StyleResolverFunction<Record<string, never>, ChatAttachmentCardIconColor>,
160
- name: StyleResolverFunction<Record<string, never>, ChatAttachmentCardNameStyle>,
161
- metadata: StyleResolverFunction<Record<string, never>, ChatAttachmentCardMetadataStyle>,
162
- }
163
-
164
- export type ChatSystemLineTheme = {
126
+ body: StyleResolverFunction<ChatMessageBubbleState, ChatMessageBubbleBodyStyle>,
127
+ bodyText: StyleResolverFunction<ChatMessageBubbleState, ChatMessageBubbleBodyTextStyle>,
128
+ metaDataContainer: StyleResolverFunction<ChatMessageBubbleState, ChatMessageBubbleMetaDataContainerStyle>,
129
+ metaDataStatusContainer: StyleResolverFunction<ChatMessageBubbleState, ChatMessageBubbleMetaDataStatusContainerStyle>,
130
+ metaDataText: StyleResolverFunction<ChatMessageBubbleState, ChatMessageBubbleMetaDataTextStyle>,
131
+ metaDataIcon: StyleResolverFunction<ChatMessageBubbleState, ChatMessageBubbleMetaDataIconStyle>,
132
+ }
133
+
134
+ export type ChatAttachmentMessageBubbleOverridesThemeResolvers = {
135
+ container: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatMessageBubbleContainerStyle>,
136
+ body: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatMessageBubbleBodyStyle>,
137
+ bodyText: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatMessageBubbleBodyTextStyle>,
138
+ metaDataContainer: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatMessageBubbleMetaDataContainerStyle>,
139
+ metaDataStatusContainer: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatMessageBubbleMetaDataStatusContainerStyle>,
140
+ metaDataText: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatMessageBubbleMetaDataTextStyle>,
141
+ metaDataIcon: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatMessageBubbleMetaDataIconStyle>,
142
+ }
143
+
144
+ export type ChatAttachmentMessageBubbleThemeResolvers = {
145
+ chatMessageBubbleOverrides: ChatAttachmentMessageBubbleOverridesThemeResolvers,
146
+ contentContainer: StyleResolverFunction<
147
+ ChatAttachmentMessageBubbleState,
148
+ {
149
+ container: StyleResolverFunction<
150
+ PressableState,
151
+ PressableContainerStyle
152
+ >,
153
+ stateLayer: StyleResolverFunction<
154
+ PressableState,
155
+ PressableStateLayerStyle
156
+ >,
157
+ text: StyleResolverFunction<
158
+ PressableState,
159
+ PressableTextStyle
160
+ >,
161
+ }
162
+ >,
163
+ fileIconContainer: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatAttachmentMessageBubbleFileIconContainerStyle>,
164
+ fileIcon: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatAttachmentMessageBubbleFileIconStyle>,
165
+ downloadIconContainer: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatAttachmentMessageBubbleDownloadIconContainerStyle>,
166
+ downloadIcon: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatAttachmentMessageBubbleDownloadIconStyle>,
167
+ fileNameText: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatAttachmentMessageBubbleFileNameTextStyle>,
168
+ fileMetadataText: StyleResolverFunction<ChatAttachmentMessageBubbleState, ChatAttachmentMessageBubbleFileMetadataTextStyle>,
169
+ }
170
+
171
+ export type ChatSystemLineThemeResolvers = {
165
172
  container: StyleResolverFunction<ChatSystemLineState, ChatSystemLineStyle>,
166
173
  text: StyleResolverFunction<ChatSystemLineState, ChatSystemLineTextStyle>,
167
174
  icon: StyleResolverFunction<ChatSystemLineState, ChatSystemLineIconStyle>,
168
175
  }
169
176
 
170
- export type ChatDateDividerTheme = {
177
+ export type ChatDateDividerThemeResolvers = {
171
178
  container: StyleResolverFunction<Record<string, never>, ChatDateDividerStyle>,
172
179
  text: StyleResolverFunction<Record<string, never>, ChatDateDividerTextStyle>,
173
180
  }
174
181
 
175
- export type ChatQuickReplyChipTheme = {
176
- container: StyleResolverFunction<ChatQuickReplyChipState, ChatQuickReplyChipStyle>,
177
- text: StyleResolverFunction<ChatQuickReplyChipState, ChatQuickReplyChipTextStyle>,
178
- }
179
-
180
- export type ChatMessageComposerTheme = {
182
+ export type ChatQuickReplyChipThemeResolvers = {
183
+ pressable: StyleResolverFunction<
184
+ ChatQuickReplyChipState,
185
+ {
186
+ container: StyleResolverFunction<
187
+ PressableState,
188
+ PressableContainerStyle
189
+ >,
190
+ stateLayer: StyleResolverFunction<
191
+ PressableState,
192
+ PressableStateLayerStyle
193
+ >,
194
+ text: StyleResolverFunction<
195
+ PressableState,
196
+ PressableTextStyle
197
+ >,
198
+ }
199
+ >,
200
+ }
201
+
202
+ export type ChatMessageComposerThemeResolvers = {
181
203
  container: StyleResolverFunction<Record<string, never>, ChatMessageComposerStyle>,
182
204
  input: StyleResolverFunction<Record<string, never>, ChatMessageComposerInputStyle>,
183
- placeholderColor: StyleResolverFunction<Record<string, never>, Color>,
184
- }
185
-
186
- export type ChatTheme = {
187
- conversationRow: ChatConversationRowTheme,
188
- conversationList: ChatConversationListTheme,
189
- threadHeader: ChatThreadHeaderTheme,
190
- messageList: ChatMessageListTheme,
191
- messageBubble: ChatMessageBubbleTheme,
192
- messageCard: ChatMessageCardTheme,
193
- attachmentCard: ChatAttachmentCardTheme,
194
- systemLine: ChatSystemLineTheme,
195
- dateDivider: ChatDateDividerTheme,
196
- quickReplyChip: ChatQuickReplyChipTheme,
197
- messageComposer: ChatMessageComposerTheme,
205
+ placeholderColor: SimpleStyleResolver<TextStyle>,
206
+ }
207
+
208
+ export type ChatThemeResolvers = {
209
+ conversationRow: ChatConversationRowThemeResolvers,
210
+ conversationList: ChatConversationListThemeResolvers,
211
+ threadHeader: ChatThreadHeaderThemeResolvers,
212
+ messageList: ChatMessageListThemeResolvers,
213
+ messageBubble: ChatMessageBubbleThemeResolvers,
214
+ attachmentMessageBubble: ChatAttachmentMessageBubbleThemeResolvers,
215
+ systemLine: ChatSystemLineThemeResolvers,
216
+ dateDivider: ChatDateDividerThemeResolvers,
217
+ quickReplyChip: ChatQuickReplyChipThemeResolvers,
218
+ messageComposer: ChatMessageComposerThemeResolvers,
198
219
  }
@@ -1,33 +1,32 @@
1
1
  import type { ViewStyle } from 'react-native'
2
2
 
3
- import type { ElementSize } from '@helpwave/hightide-design/types'
3
+ import type { ColorPairToken } from '@helpwave/hightide-design/theme-tokens'
4
+ import type { ComponentSize } from '@helpwave/hightide-design/semantic-token-resolvers'
4
5
 
5
- import type { Color } from '../color'
6
6
  import type {
7
7
  InteractionState,
8
8
  StyleResolverFunction
9
9
  } from '../resolver'
10
+ import type { IconStyle } from '../../../icons'
10
11
 
11
- export type CheckboxSize = 'sm' | 'md' | 'lg'
12
+ export type CheckboxSize = ComponentSize
12
13
 
13
14
  export type CheckboxState = InteractionState & {
14
15
  size?: CheckboxSize,
16
+ color?: ColorPairToken,
15
17
  isChecked?: boolean,
16
18
  isIndeterminate?: boolean,
17
- isInvalid?: boolean,
18
19
  isRounded?: boolean,
19
- alwaysShowCheckIcon?: boolean,
20
20
  }
21
21
 
22
22
  export type CheckboxStyle = ViewStyle
23
23
 
24
- export type CheckboxIconStyle = {
25
- color: Color,
26
- size: Exclude<ElementSize, 'xs'>,
27
- visible: boolean,
28
- }
24
+ export type CheckboxStateLayerStyle = ViewStyle
25
+
26
+ export type CheckboxIconStyle = IconStyle
29
27
 
30
- export type CheckboxTheme = {
31
- checkbox: StyleResolverFunction<CheckboxState, CheckboxStyle>,
28
+ export type CheckboxThemeResolvers = {
29
+ container: StyleResolverFunction<CheckboxState, CheckboxStyle>,
30
+ stateLayer: StyleResolverFunction<CheckboxState, CheckboxStateLayerStyle>,
32
31
  icon: StyleResolverFunction<CheckboxState, CheckboxIconStyle>,
33
32
  }
@@ -3,28 +3,22 @@ import type {
3
3
  ViewStyle
4
4
  } from 'react-native'
5
5
 
6
- import type { ColoringType } from '@helpwave/hightide-design/utils'
7
- import type {
8
- ChipColoringStyle,
9
- ElementSize
10
- } from '@helpwave/hightide-design/types'
6
+ import type { ColorPairToken } from '@helpwave/hightide-design/theme-tokens'
7
+ import type { ChipVariant, ComponentSize } from '@helpwave/hightide-design/semantic-token-resolvers'
11
8
 
12
- import type {
13
- InteractionState,
14
- StyleResolverFunction
15
- } from '../resolver'
9
+ import type { StyleResolverFunction } from '../resolver'
16
10
 
17
- export type ChipState = InteractionState & {
18
- size?: ElementSize,
19
- color?: ColoringType,
20
- coloringStyle?: ChipColoringStyle,
11
+ export type ChipState = {
12
+ size?: ComponentSize,
13
+ color?: ColorPairToken,
14
+ variant?: ChipVariant,
21
15
  }
22
16
 
23
17
  export type ChipStyle = ViewStyle
24
18
 
25
19
  export type ChipTextStyle = TextStyle
26
20
 
27
- export type ChipTheme = {
21
+ export type ChipThemeResolvers = {
28
22
  chip: StyleResolverFunction<ChipState, ChipStyle>,
29
23
  text: StyleResolverFunction<ChipState, ChipTextStyle>,
30
24
  }
@@ -0,0 +1,18 @@
1
+ import type { ColorToken } from '@helpwave/hightide-design/primitive-tokens'
2
+ import type { DividerDirection } from '@helpwave/hightide-design/component-token-resolvers'
3
+ import type { ViewStyle } from 'react-native'
4
+
5
+ import type { StyleResolverFunction } from '../resolver'
6
+
7
+ export type DividerState = {
8
+ direction?: DividerDirection,
9
+ color?: ColorToken,
10
+ width?: number,
11
+ margin?: number,
12
+ }
13
+
14
+ export type DividerStyle = ViewStyle
15
+
16
+ export type DividerThemeResolvers = {
17
+ container: StyleResolverFunction<DividerState, DividerStyle>,
18
+ }
@@ -1,46 +1,45 @@
1
- import type { Color } from '../color'
2
- import type { AvatarTheme } from './avatar'
3
- import type { ButtonTheme } from './button'
4
- import type { ChatTheme } from './chat'
5
- import type { CheckboxTheme } from './checkbox'
6
- import type { ChipTheme } from './chip'
7
- import type { IconButtonTheme } from './iconButton'
8
- import type { InputTheme } from './input'
9
- import type { MenuTheme } from './menu'
10
- import type { MultiSelectTheme } from './multiSelect'
11
- import type { SelectTheme } from './select'
12
- import type { SwitchTheme } from './switch'
1
+ import type { IconSize } from '@helpwave/hightide-design/theme-tokens'
2
+ import type { IconTokens } from '@helpwave/hightide-design/component-token-resolvers'
13
3
 
14
- export type ColoringDefinition = {
15
- color: Color,
16
- onColor: Color,
17
- hover: Color,
18
- text?: Color,
19
- textHover?: Color,
20
- outline?: Color,
21
- outlineHover?: Color,
22
- tonalText?: Color,
23
- tonalBackground?: Color,
24
- }
4
+ import type {
5
+ AvatarGroupThemeResolvers,
6
+ AvatarThemeResolvers,
7
+ AvatarWithStatusThemeResolvers
8
+ } from './avatar'
9
+ import type { ButtonThemeResolvers } from './button'
10
+ import type { ChatThemeResolvers } from './chat'
11
+ import type { CheckboxThemeResolvers } from './checkbox'
12
+ import type { ChipThemeResolvers } from './chip'
13
+ import type { IconButtonThemeResolvers } from './iconButton'
14
+ import type { InputThemeResolvers } from './input'
15
+ import type { SearchBarThemeResolvers } from './searchBar'
16
+ import type { CardThemeResolvers } from './card'
17
+ import type { DividerThemeResolvers } from './divider'
18
+ import type { ListItemThemeResolvers } from './listItem'
19
+ import type { MultiSelectThemeResolvers } from './multiSelect'
20
+ import type { SelectThemeResolvers } from './select'
21
+ import type { SwitchThemeResolvers } from './switch'
22
+ import type { ThemedPressableThemeResolvers } from './themedPressable'
23
+
24
+ export type IconThemeResolvers = Record<IconSize, IconTokens>
25
25
 
26
26
  export type HightideComponentThemes = {
27
- coloring: {
28
- primary: ColoringDefinition,
29
- secondary: ColoringDefinition,
30
- positive: ColoringDefinition,
31
- warning: ColoringDefinition,
32
- negative: ColoringDefinition,
33
- neutral: ColoringDefinition,
34
- } & Record<string, ColoringDefinition>,
35
- button: ButtonTheme,
36
- iconButton: IconButtonTheme,
37
- chip: ChipTheme,
38
- checkbox: CheckboxTheme,
39
- switch: SwitchTheme,
40
- input: InputTheme,
41
- select: SelectTheme,
42
- multiSelect: MultiSelectTheme,
43
- chat: ChatTheme,
44
- menu: MenuTheme,
45
- avatar: AvatarTheme,
27
+ button: ButtonThemeResolvers,
28
+ iconButton: IconButtonThemeResolvers,
29
+ themedPressable: ThemedPressableThemeResolvers,
30
+ chip: ChipThemeResolvers,
31
+ checkbox: CheckboxThemeResolvers,
32
+ switch: SwitchThemeResolvers,
33
+ input: InputThemeResolvers,
34
+ searchBar: SearchBarThemeResolvers,
35
+ select: SelectThemeResolvers,
36
+ multiSelect: MultiSelectThemeResolvers,
37
+ chat: ChatThemeResolvers,
38
+ card: CardThemeResolvers,
39
+ divider: DividerThemeResolvers,
40
+ listItem: ListItemThemeResolvers,
41
+ avatar: AvatarThemeResolvers,
42
+ avatarWithStatus: AvatarWithStatusThemeResolvers,
43
+ avatarGroup: AvatarGroupThemeResolvers,
44
+ icon: IconThemeResolvers,
46
45
  }
@@ -1,30 +1,35 @@
1
- import type { ViewStyle } from 'react-native'
1
+ import type {
2
+ TextStyle,
3
+ ViewStyle
4
+ } from 'react-native'
2
5
 
3
- import type { ColoringType } from '@helpwave/hightide-design/utils'
6
+ import type { ColorPairToken } from '@helpwave/hightide-design/theme-tokens'
4
7
  import type {
5
- ButtonColoringStyle,
6
- ElementSize
7
- } from '@helpwave/hightide-design/types'
8
+ ComponentSize,
9
+ IconButtonVariant
10
+ } from '@helpwave/hightide-design/semantic-token-resolvers'
8
11
 
9
- import type { Color } from '../color'
10
12
  import type {
11
13
  InteractionState,
12
14
  StyleResolverFunction
13
15
  } from '../resolver'
16
+ import type { IconStyle } from '../../../icons'
14
17
 
15
18
  export type IconButtonState = InteractionState & {
16
- size?: ElementSize,
17
- color?: ColoringType,
18
- coloringStyle?: ButtonColoringStyle,
19
+ size?: ComponentSize,
20
+ color?: ColorPairToken,
21
+ variant?: IconButtonVariant,
19
22
  }
20
23
 
21
24
  export type IconButtonStyle = ViewStyle
22
25
 
23
- export type IconButtonIconStyle = {
24
- color: Color,
25
- }
26
+ export type IconButtonIconStyle = IconStyle
27
+
28
+ export type IconButtonTextStyle = TextStyle
26
29
 
27
- export type IconButtonTheme = {
28
- button: StyleResolverFunction<IconButtonState, IconButtonStyle>,
30
+ export type IconButtonThemeResolvers = {
31
+ container: StyleResolverFunction<IconButtonState, IconButtonStyle>,
32
+ stateLayer: StyleResolverFunction<IconButtonState, IconButtonStyle>,
29
33
  icon: StyleResolverFunction<IconButtonState, IconButtonIconStyle>,
34
+ text: StyleResolverFunction<IconButtonState, IconButtonTextStyle>,
30
35
  }
@@ -1,12 +1,16 @@
1
1
  export * from './avatar'
2
2
  export * from './button'
3
+ export * from './card'
3
4
  export * from './chat'
4
5
  export * from './checkbox'
5
6
  export * from './chip'
7
+ export * from './divider'
6
8
  export * from './hightide'
7
9
  export * from './iconButton'
8
10
  export * from './input'
9
- export * from './menu'
11
+ export * from './listItem'
10
12
  export * from './multiSelect'
13
+ export * from './searchBar'
11
14
  export * from './select'
12
15
  export * from './switch'
16
+ export * from './themedPressable'
@@ -1,19 +1,28 @@
1
- import type { TextStyle } from 'react-native'
1
+ import type { TextStyle, ViewStyle } from 'react-native'
2
+
3
+ import type { ColorPairToken } from '@helpwave/hightide-design/theme-tokens'
2
4
 
3
- import type { Color } from '../color'
4
5
  import type {
5
6
  InteractionState,
6
7
  StyleResolverFunction
7
8
  } from '../resolver'
9
+ import type { IconStyle } from '../../../icons'
8
10
 
9
11
  export type InputState = InteractionState & {
10
- isInvalid?: boolean,
11
- isReadOnly?: boolean,
12
+ color?: ColorPairToken,
12
13
  }
13
14
 
14
- export type InputStyle = TextStyle
15
+ export type InputContainerStyle = ViewStyle
16
+
17
+ export type InputTextStyle = TextStyle
18
+
19
+ export type InputPlaceholderStyle = TextStyle
20
+
21
+ export type InputIconStyle = IconStyle
15
22
 
16
- export type InputTheme = {
17
- input: StyleResolverFunction<InputState, InputStyle>,
18
- placeholderColor: StyleResolverFunction<InputState, Color>,
23
+ export type InputThemeResolvers = {
24
+ container: StyleResolverFunction<InputState, InputContainerStyle>,
25
+ text: StyleResolverFunction<InputState, InputTextStyle>,
26
+ placeholder: StyleResolverFunction<InputState, InputPlaceholderStyle>,
27
+ icon: StyleResolverFunction<InputState, InputIconStyle>,
19
28
  }