@helpwave/hightide-native 0.3.2 → 0.5.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 (27) hide show
  1. package/package.json +6 -2
  2. package/src/components/chat/ChatAttachmentMessageBubble.tsx +6 -6
  3. package/src/components/chat/ChatConversationRow.tsx +28 -31
  4. package/src/components/chat/ChatMessageComposer.tsx +3 -2
  5. package/src/components/chat/ChatQuickReplyChip.tsx +6 -10
  6. package/src/components/chat/ChatThreadHeader.tsx +8 -8
  7. package/src/components/user-interaction/Button.tsx +7 -12
  8. package/src/components/user-interaction/IconButton.tsx +7 -12
  9. package/src/components/user-interaction/MultiSelect.tsx +8 -5
  10. package/src/components/user-interaction/Select.tsx +14 -15
  11. package/src/components/user-interaction/ThemedPressable.tsx +7 -10
  12. package/src/components/visualization-and-display/Avatar.tsx +8 -8
  13. package/src/components/visualization-and-display/Chip.tsx +1 -0
  14. package/src/components/visualization-and-display/ThemedIcon.tsx +13 -8
  15. package/src/components/visualization-and-display/ThemedText.tsx +9 -10
  16. package/src/global-contexts/content-theme/ContentThemeContext.ts +9 -6
  17. package/src/global-contexts/content-theme/ContentThemeProvider.tsx +46 -15
  18. package/src/global-contexts/theme/ThemeProvider.tsx +1 -0
  19. package/src/icons/types.ts +2 -1
  20. package/src/theme/adapters/style-adapter-utils.ts +40 -10
  21. package/src/theme/resolvers/chat/conversation-row.ts +5 -11
  22. package/src/theme/resolvers/input.ts +1 -1
  23. package/src/theme/resolvers/searchBar.ts +1 -1
  24. package/src/theme/types/resolver.ts +3 -3
  25. package/src/theme/types/semantics.ts +3 -3
  26. package/src/utils/hex.ts +193 -0
  27. package/src/utils/index.ts +1 -0
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "access": "public"
11
11
  },
12
12
  "license": "AGPL-3.0-only",
13
- "version": "0.3.2",
13
+ "version": "0.5.0",
14
14
  "type": "module",
15
15
  "files": [
16
16
  "src"
@@ -39,11 +39,15 @@
39
39
  "./types": {
40
40
  "types": "./src/types/index.ts",
41
41
  "default": "./src/types/index.ts"
42
+ },
43
+ "./utils": {
44
+ "types": "./src/utils/index.ts",
45
+ "default": "./src/utils/index.ts"
42
46
  }
43
47
  },
44
48
  "dependencies": {
45
49
  "lucide-react-native": "0.561.0",
46
- "@helpwave/hightide-design": "0.3.1",
50
+ "@helpwave/hightide-design": "0.5.0",
47
51
  "@helpwave/hightide-utils": "0.1.0"
48
52
  },
49
53
  "peerDependencies": {
@@ -57,7 +57,7 @@ const mergeBubbleStyleOverwrite = <TStyle extends StyleProp<ViewStyle> | object>
57
57
  tokenOverride: TStyle,
58
58
  userOverwrite?: StyleOverwrite<ChatMessageBubbleState, TStyle>
59
59
  ): StyleOverwrite<ChatMessageBubbleState, TStyle> => (
60
- (prev, state) => {
60
+ (state, prev) => {
61
61
  const withTokenOverride = {
62
62
  ...(prev as object),
63
63
  ...(tokenOverride as object),
@@ -68,7 +68,7 @@ const mergeBubbleStyleOverwrite = <TStyle extends StyleProp<ViewStyle> | object>
68
68
  }
69
69
 
70
70
  if (typeof userOverwrite === 'function') {
71
- return userOverwrite(withTokenOverride, state)
71
+ return userOverwrite(state, withTokenOverride)
72
72
  }
73
73
 
74
74
  return {
@@ -196,16 +196,16 @@ export const ChatAttachmentMessageBubble = ({
196
196
  accessibilityLabel={downloadLabel}
197
197
  disabled={onDownload == null}
198
198
  onPress={onDownload}
199
- containerStyle={(_, pressableState) => (
199
+ style={(pressableState) => (
200
200
  contentResolvers.container(pressableState, contentContainerStyle)
201
201
  )}
202
- stateLayerStyle={(_, pressableState) => (
202
+ stateLayerStyle={(pressableState) => (
203
203
  contentResolvers.stateLayer(pressableState)
204
204
  )}
205
- textStyle={(_, pressableState) => (
205
+ textStyle={(pressableState) => (
206
206
  contentResolvers.text(pressableState)
207
207
  )}
208
- iconStyle={(_, pressableState) => (
208
+ iconStyle={(pressableState) => (
209
209
  contentResolvers.icon(pressableState)
210
210
  )}
211
211
  >
@@ -8,9 +8,7 @@ import {
8
8
  } from 'react'
9
9
  import {
10
10
  View,
11
- type PressableProps,
12
- type StyleProp,
13
- type ViewStyle
11
+ type PressableProps
14
12
  } from 'react-native'
15
13
  import { HightideIconRegistry } from '../../icons/HightideIconRegistry'
16
14
  import { ThemedIcon } from '../visualization-and-display/ThemedIcon'
@@ -46,8 +44,7 @@ export type ChatConversationRowProps = Omit<PressableProps, 'children' | 'style'
46
44
  unreadCount?: number,
47
45
  isSelected?: boolean,
48
46
  sentIndicator?: ChatConversationSentIndicator,
49
- style?: StyleProp<ViewStyle>,
50
- rowStyle?: StyleOverwrite<PressableState, PressableContainerStyle>,
47
+ style?: StyleOverwrite<PressableState, PressableContainerStyle>,
51
48
  contentContainerStyle?: StyleOverwrite<ChatConversationRowState, ChatConversationRowContentContainerStyle>,
52
49
  headerRowStyle?: StyleOverwrite<ChatConversationRowState, ChatConversationRowHeaderRowStyle>,
53
50
  messageRowStyle?: StyleOverwrite<ChatConversationRowState, ChatConversationRowMessageRowStyle>,
@@ -83,7 +80,6 @@ export const ChatConversationRow = ({
83
80
  sentIndicator,
84
81
  disabled,
85
82
  style,
86
- rowStyle,
87
83
  contentContainerStyle,
88
84
  headerRowStyle,
89
85
  messageRowStyle,
@@ -141,28 +137,28 @@ export const ChatConversationRow = ({
141
137
 
142
138
  return cloneElement(avatarElement, {
143
139
  size: avatarSize,
144
- avatarStyle: (_, avatarState) => avatarTheme.container(
140
+ avatarStyle: (avatarState) => avatarTheme.container(
145
141
  {
146
142
  ...avatarState,
147
143
  size: avatarSize,
148
144
  },
149
145
  avatarStyle ?? avatarElement.props.avatarStyle
150
146
  ),
151
- imageStyle: (_, avatarState) => avatarTheme.image(
147
+ imageStyle: (avatarState) => avatarTheme.image(
152
148
  {
153
149
  ...avatarState,
154
150
  size: avatarSize,
155
151
  },
156
152
  avatarElement.props.imageStyle
157
153
  ),
158
- textStyle: (_, avatarState) => avatarTheme.text(
154
+ textStyle: (avatarState) => avatarTheme.text(
159
155
  {
160
156
  ...avatarState,
161
157
  size: avatarSize,
162
158
  },
163
159
  avatarElement.props.textStyle
164
160
  ),
165
- iconStyle: (_, avatarState) => avatarTheme.icon(
161
+ iconStyle: (avatarState) => avatarTheme.icon(
166
162
  {
167
163
  ...avatarState,
168
164
  size: avatarSize,
@@ -176,23 +172,22 @@ export const ChatConversationRow = ({
176
172
  <ThemedPressable
177
173
  {...props}
178
174
  disabled={disabled}
179
- style={style}
180
- containerStyle={(_, pressableState) => {
175
+ style={(pressableState) => {
181
176
  const state = resolveState(pressableState as PressableInteraction)
182
177
  return theme.components.chat.conversationRow.pressable(state).container(
183
178
  pressableState,
184
- rowStyle
179
+ style
185
180
  )
186
181
  }}
187
- stateLayerStyle={(_, pressableState) => {
182
+ stateLayerStyle={(pressableState) => {
188
183
  const state = resolveState(pressableState as PressableInteraction)
189
184
  return theme.components.chat.conversationRow.pressable(state).stateLayer(pressableState)
190
185
  }}
191
- textStyle={(_, pressableState) => {
186
+ textStyle={(pressableState) => {
192
187
  const state = resolveState(pressableState as PressableInteraction)
193
188
  return theme.components.chat.conversationRow.pressable(state).text(pressableState)
194
189
  }}
195
- iconStyle={(_, pressableState) => {
190
+ iconStyle={(pressableState) => {
196
191
  const state = resolveState(pressableState as PressableInteraction)
197
192
  return theme.components.chat.conversationRow.pressable(state).icon(pressableState)
198
193
  }}
@@ -228,21 +223,23 @@ export const ChatConversationRow = ({
228
223
  )}
229
224
  </View>
230
225
  <View style={resolvedMessageRow}>
231
- {sentIndicator && (
232
- <ThemedIcon
233
- icon={sentIndicatorIcon}
234
- size={resolvedSentIndicator.size}
235
- strokeWidth={resolvedSentIndicator.strokeWidth}
236
- color={resolvedSentIndicator.color}
237
- />
238
- )}
239
- {preview != null && (
240
- typeof preview === 'string' || typeof preview === 'number' ? (
241
- <ThemedText style={resolvedPreview} numberOfLines={1}>{preview}</ThemedText>
242
- ) : (
243
- preview
244
- )
245
- )}
226
+ <View style={{ flexDirection: 'row', alignItems: 'center', flex: 1, gap: theme.spacing.xs /* TODO replace this with a theme style */ }}>
227
+ {sentIndicator && (
228
+ <ThemedIcon
229
+ icon={sentIndicatorIcon}
230
+ size={resolvedSentIndicator.size}
231
+ strokeWidth={resolvedSentIndicator.strokeWidth}
232
+ color={resolvedSentIndicator.color}
233
+ />
234
+ )}
235
+ {preview != null && (
236
+ typeof preview === 'string' || typeof preview === 'number' ? (
237
+ <ThemedText style={resolvedPreview} numberOfLines={1}>{preview}</ThemedText>
238
+ ) : (
239
+ preview
240
+ )
241
+ )}
242
+ </View>
246
243
  {isUnread && (
247
244
  <View style={unreadBadge}>
248
245
  <ThemedText style={unreadBadgeText}>{unreadCount}</ThemedText>
@@ -20,6 +20,7 @@ import type {
20
20
  ChatMessageComposerStyle
21
21
  } from '../../theme/types/components/chat'
22
22
  import type { StyleOverwrite } from '../../theme/types/resolver'
23
+ import { StyleAdapterUtils } from '../../theme'
23
24
 
24
25
  export type ChatMessageComposerProps = Omit<ViewProps, 'style'> & {
25
26
  value?: string,
@@ -108,8 +109,8 @@ export const ChatMessageComposer = ({
108
109
  disabled={disabled || !(value ?? '').trim()}
109
110
  size="sm"
110
111
  onPress={send}
111
- containerStyle={(prev) => ({ ...prev, borderRadius: 999 })}
112
- stateLayerStyle={(prev) => ({ ...prev, borderRadius: 999 })}
112
+ style={{ ...StyleAdapterUtils.borderRadius({ type: 'all', value: 999 }) }}
113
+ stateLayerStyle={{ ...StyleAdapterUtils.borderRadius({ type: 'all', value: 999 }) }}
113
114
  />
114
115
  </View>
115
116
  </View>
@@ -2,7 +2,6 @@ import {
2
2
  useMemo,
3
3
  type ReactNode
4
4
  } from 'react'
5
- import type { StyleProp, ViewStyle } from 'react-native'
6
5
 
7
6
  import { useTheme } from '../../global-contexts/theme/ThemeContext'
8
7
  import {
@@ -25,8 +24,7 @@ export type ChatQuickReplyChipProps = Omit<
25
24
  > & {
26
25
  isActive?: boolean,
27
26
  children?: ReactNode,
28
- style?: StyleProp<ViewStyle>,
29
- containerStyle?: StyleOverwrite<PressableState, PressableContainerStyle>,
27
+ style?: StyleOverwrite<PressableState, PressableContainerStyle>,
30
28
  textStyle?: StyleOverwrite<PressableState, PressableTextStyle>,
31
29
  iconStyle?: StyleOverwrite<PressableState, PressableIconStyle>,
32
30
  }
@@ -36,7 +34,6 @@ export const ChatQuickReplyChip = ({
36
34
  children,
37
35
  disabled,
38
36
  style,
39
- containerStyle,
40
37
  textStyle,
41
38
  iconStyle,
42
39
  ...props
@@ -52,17 +49,16 @@ export const ChatQuickReplyChip = ({
52
49
  <ThemedPressable
53
50
  {...props}
54
51
  disabled={disabled}
55
- style={style}
56
- containerStyle={(_, pressableState) => (
57
- pressableResolvers.container(pressableState, containerStyle)
52
+ style={(pressableState) => (
53
+ pressableResolvers.container(pressableState, style)
58
54
  )}
59
- stateLayerStyle={(_, pressableState) => (
55
+ stateLayerStyle={(pressableState) => (
60
56
  pressableResolvers.stateLayer(pressableState)
61
57
  )}
62
- textStyle={(_, pressableState) => (
58
+ textStyle={(pressableState) => (
63
59
  pressableResolvers.text(pressableState, textStyle)
64
60
  )}
65
- iconStyle={(_, pressableState) => (
61
+ iconStyle={(pressableState) => (
66
62
  pressableResolvers.icon(pressableState, iconStyle)
67
63
  )}
68
64
  >
@@ -114,44 +114,44 @@ export const ChatThreadHeader = ({
114
114
  <ThemedPressable
115
115
  onPress={onPress}
116
116
  disabled={disabled}
117
- containerStyle={(_, pressableState) => (
117
+ style={(pressableState) => (
118
118
  pressableResolvers.container(pressableState, pressableContainerStyle)
119
119
  )}
120
- stateLayerStyle={(_, pressableState) => (
120
+ stateLayerStyle={(pressableState) => (
121
121
  pressableResolvers.stateLayer(pressableState)
122
122
  )}
123
- textStyle={(_, pressableState) => (
123
+ textStyle={(pressableState) => (
124
124
  pressableResolvers.text(pressableState)
125
125
  )}
126
- iconStyle={(_, pressableState) => (
126
+ iconStyle={(pressableState) => (
127
127
  pressableResolvers.icon(pressableState)
128
128
  )}
129
129
  >
130
130
  <Avatar
131
131
  {...resolvedAvatar}
132
132
  size={avatarSize}
133
- avatarStyle={(_, avatarState) => avatarTheme.container(
133
+ avatarStyle={(avatarState) => avatarTheme.container(
134
134
  {
135
135
  ...avatarState,
136
136
  size: avatarSize,
137
137
  },
138
138
  resolvedAvatar.avatarStyle
139
139
  )}
140
- imageStyle={(_, avatarState) => avatarTheme.image(
140
+ imageStyle={(avatarState) => avatarTheme.image(
141
141
  {
142
142
  ...avatarState,
143
143
  size: avatarSize,
144
144
  },
145
145
  resolvedAvatar.imageStyle
146
146
  )}
147
- textStyle={(_, avatarState) => avatarTheme.text(
147
+ textStyle={(avatarState) => avatarTheme.text(
148
148
  {
149
149
  ...avatarState,
150
150
  size: avatarSize,
151
151
  },
152
152
  resolvedAvatar.textStyle
153
153
  )}
154
- iconStyle={(_, avatarState) => avatarTheme.icon(
154
+ iconStyle={(avatarState) => avatarTheme.icon(
155
155
  {
156
156
  ...avatarState,
157
157
  size: avatarSize,
@@ -2,9 +2,7 @@ import { Fragment, forwardRef } from 'react'
2
2
  import {
3
3
  Pressable,
4
4
  View,
5
- type PressableProps,
6
- type StyleProp,
7
- type ViewStyle
5
+ type PressableProps
8
6
  } from 'react-native'
9
7
 
10
8
  import type { ColorPairToken } from '@helpwave/hightide-design/theme-tokens'
@@ -13,7 +11,7 @@ import type { ComponentSize, ButtonVariant } from '@helpwave/hightide-design/sem
13
11
  import { ContentThemeOverrideProvider } from '../../global-contexts/content-theme/ContentThemeProvider'
14
12
  import { useDebugContext } from '../../global-contexts/debug'
15
13
  import { useTheme } from '../../global-contexts/theme/ThemeContext'
16
- import type { IconComponent } from '../../icons/types'
14
+ import type { IconComponent, IconStyle } from '../../icons/types'
17
15
  import type {
18
16
  ButtonState,
19
17
  ButtonStyle,
@@ -41,10 +39,10 @@ export type ButtonProps = Omit<PressableProps, 'children' | 'style'> & {
41
39
  children: string,
42
40
  leadingIcon?: IconComponent,
43
41
  trailingIcon?: IconComponent,
44
- style?: StyleProp<ViewStyle>,
45
- containerStyle?: StyleOverwrite<ButtonState, ButtonStyle>,
42
+ style?: StyleOverwrite<ButtonState, ButtonStyle>,
46
43
  stateLayerStyle?: StyleOverwrite<ButtonState, ButtonStyle>,
47
44
  textStyle?: StyleOverwrite<ButtonState, ButtonTextStyle>,
45
+ iconStyle?: StyleOverwrite<ButtonState, IconStyle>,
48
46
  }
49
47
 
50
48
  type PressableInteraction = {
@@ -63,9 +61,9 @@ export const Button = forwardRef<React.ComponentRef<typeof Pressable>, ButtonPro
63
61
  leadingIcon,
64
62
  trailingIcon,
65
63
  style,
66
- containerStyle,
67
64
  stateLayerStyle,
68
65
  textStyle,
66
+ iconStyle,
69
67
  hitSlop: providedHitSlop,
70
68
  onLayout: providedOnLayout,
71
69
  ...props
@@ -98,16 +96,13 @@ export const Button = forwardRef<React.ComponentRef<typeof Pressable>, ButtonPro
98
96
  onLayout={onLayout}
99
97
  style={(pressableState) => {
100
98
  const state = resolveState(pressableState as PressableInteraction)
101
- return [
102
- theme.components.button.container(state, containerStyle),
103
- style,
104
- ]
99
+ return theme.components.button.container(state, style)
105
100
  }}
106
101
  >
107
102
  {(pressableState) => {
108
103
  const state = resolveState(pressableState as PressableInteraction)
109
104
  const resolvedText = theme.components.button.text(state, textStyle)
110
- const resolvedIcon = theme.components.button.icon(state)
105
+ const resolvedIcon = theme.components.button.icon(state, iconStyle)
111
106
 
112
107
  return (
113
108
  <Fragment>
@@ -2,9 +2,7 @@ import { Fragment, forwardRef } from 'react'
2
2
  import {
3
3
  Pressable,
4
4
  View,
5
- type PressableProps,
6
- type StyleProp,
7
- type ViewStyle
5
+ type PressableProps
8
6
  } from 'react-native'
9
7
  import type { ColorPairToken } from '@helpwave/hightide-design/theme-tokens'
10
8
  import type {
@@ -20,7 +18,7 @@ import type {
20
18
  IconButtonStyle
21
19
  } from '../../theme/types/components/iconButton'
22
20
  import type { StyleOverwrite } from '../../theme/types/resolver'
23
- import type { IconComponent } from '../../icons'
21
+ import type { IconComponent, IconStyle } from '../../icons'
24
22
  import { createHitBoxOverlayStyle } from '../../utils/hitBoxOverlay'
25
23
  import { useMinimumTouchTargetHitSlop } from '../../utils/minimumTouchTargetHitSlop'
26
24
  import { ThemedIcon } from '../visualization-and-display'
@@ -40,9 +38,9 @@ export type IconButtonProps = Omit<PressableProps, 'children' | 'style'> & {
40
38
  variant?: IconButtonVariant,
41
39
  icon: IconComponent,
42
40
  accessibilityLabel: string,
43
- style?: StyleProp<ViewStyle>,
44
- containerStyle?: StyleOverwrite<IconButtonState, IconButtonStyle>,
41
+ style?: StyleOverwrite<IconButtonState, IconButtonStyle>,
45
42
  stateLayerStyle?: StyleOverwrite<IconButtonState, IconButtonStyle>,
43
+ iconStyle?: StyleOverwrite<IconButtonState, IconStyle>,
46
44
  }
47
45
 
48
46
  type PressableInteraction = {
@@ -60,8 +58,8 @@ export const IconButton = forwardRef<React.ComponentRef<typeof Pressable>, IconB
60
58
  disabled,
61
59
  accessibilityLabel,
62
60
  style,
63
- containerStyle,
64
61
  stateLayerStyle,
62
+ iconStyle,
65
63
  hitSlop: providedHitSlop,
66
64
  onLayout: providedOnLayout,
67
65
  ...props
@@ -96,15 +94,12 @@ export const IconButton = forwardRef<React.ComponentRef<typeof Pressable>, IconB
96
94
  onLayout={onLayout}
97
95
  style={(pressableState) => {
98
96
  const state = resolveState(pressableState as PressableInteraction)
99
- return [
100
- theme.components.iconButton.container(state, containerStyle),
101
- style,
102
- ]
97
+ return theme.components.iconButton.container(state, style)
103
98
  }}
104
99
  >
105
100
  {(pressableState) => {
106
101
  const state = resolveState(pressableState as PressableInteraction)
107
- const resolvedIcon = theme.components.iconButton.icon(state)
102
+ const resolvedIcon = theme.components.iconButton.icon(state, iconStyle)
108
103
 
109
104
  return (
110
105
  <Fragment>
@@ -67,6 +67,8 @@ export const MultiSelect = ({
67
67
  onEditComplete,
68
68
  })
69
69
 
70
+ const isSearchVisible = showSearch && options.length >= 6
71
+
70
72
  const selectedOptions = useMemo(() => {
71
73
  return options.filter((option) => multiSelect.isSelected(option.id))
72
74
  }, [multiSelect, options])
@@ -88,8 +90,8 @@ export const MultiSelect = ({
88
90
  [multiSelectTheme]
89
91
  )
90
92
  const resolvedMenuStyle = useMemo(
91
- () => multiSelectTheme.menu({ hasSearch: showSearch }),
92
- [multiSelectTheme, showSearch]
93
+ () => multiSelectTheme.menu({ hasSearch: isSearchVisible }),
94
+ [multiSelectTheme, isSearchVisible]
93
95
  )
94
96
  const resolvedHeaderStyle = useMemo(
95
97
  () => multiSelectTheme.header({}),
@@ -103,7 +105,7 @@ export const MultiSelect = ({
103
105
  () => options.filter((option) => multiSelect.visibleOptionIds.includes(option.id)),
104
106
  [options, multiSelect.visibleOptionIds]
105
107
  )
106
- const showEmptySearchResults = showSearch
108
+ const showEmptySearchResults = isSearchVisible
107
109
  && multiSelect.searchQuery.trim().length > 0
108
110
  && visibleOptions.length === 0
109
111
 
@@ -210,7 +212,7 @@ export const MultiSelect = ({
210
212
  style={resolvedMenuStyle}
211
213
  onPress={(event) => event.stopPropagation()}
212
214
  >
213
- {showSearch && (
215
+ {isSearchVisible && (
214
216
  <View style={resolvedHeaderStyle}>
215
217
  <SearchBar
216
218
  value={multiSelect.searchQuery}
@@ -260,7 +262,8 @@ export const MultiSelect = ({
260
262
  <View style={multiSelectTheme.checkbox(optionState)}>
261
263
  <ThemedIcon
262
264
  icon={HightideIconRegistry.Check}
263
- size="sm"
265
+ size={checkboxIcon.size}
266
+ strokeWidth={checkboxIcon.strokeWidth}
264
267
  color={checkboxIcon.color}
265
268
  />
266
269
  </View>
@@ -20,7 +20,6 @@ import {
20
20
  type UseSelectOption
21
21
  } from '../../hooks/useSelect'
22
22
  import type { SelectState } from '../../theme/types/components/select'
23
- import type { Color } from '../../theme/types/color'
24
23
  import type {
25
24
  FormFieldDataHandling,
26
25
  FormFieldInteractionStates
@@ -69,6 +68,8 @@ export const Select = ({
69
68
  onEditComplete,
70
69
  })
71
70
 
71
+ const isSearchVisible = showSearch && options.length >= 6
72
+
72
73
  const selectedLabel = useMemo(() => {
73
74
  const selected = options.find((option) => option.id === select.value)
74
75
  return selected?.label ?? placeholder
@@ -95,8 +96,8 @@ export const Select = ({
95
96
  [selectTheme]
96
97
  )
97
98
  const resolvedMenuStyle = useMemo(
98
- () => selectTheme.menu({ hasSearch: showSearch }),
99
- [selectTheme, showSearch]
99
+ () => selectTheme.menu({ hasSearch: isSearchVisible }),
100
+ [selectTheme, isSearchVisible]
100
101
  )
101
102
  const resolvedHeaderStyle = useMemo(
102
103
  () => selectTheme.header({}),
@@ -106,7 +107,7 @@ export const Select = ({
106
107
  () => selectTheme.emptyText({}),
107
108
  [selectTheme]
108
109
  )
109
- const showEmptySearchResults = showSearch
110
+ const showEmptySearchResults = isSearchVisible
110
111
  && select.searchQuery.trim().length > 0
111
112
  && visibleOptions.length === 0
112
113
 
@@ -181,7 +182,7 @@ export const Select = ({
181
182
  style={resolvedMenuStyle}
182
183
  onPress={(event) => event.stopPropagation()}
183
184
  >
184
- {showSearch && (
185
+ {isSearchVisible && (
185
186
  <View style={resolvedHeaderStyle}>
186
187
  <SearchBar
187
188
  value={select.searchQuery}
@@ -220,16 +221,14 @@ export const Select = ({
220
221
  color={optionColor}
221
222
  disabled={item.disabled}
222
223
  onPress={() => select.selectValue(item.id)}
223
- trailing={isSelected
224
- ? (
225
- <ThemedIcon
226
- icon={HightideIconRegistry.Check}
227
- size={checkIcon.size}
228
- strokeWidth={checkIcon.strokeWidth}
229
- color={checkIcon.color as Color | undefined}
230
- />
231
- )
232
- : undefined}
224
+ leading={(
225
+ <ThemedIcon
226
+ icon={HightideIconRegistry.Check}
227
+ size={checkIcon.size}
228
+ strokeWidth={checkIcon.strokeWidth}
229
+ color={isSelected ? theme.colors.primary.color : 'transparent'}
230
+ />
231
+ )}
233
232
  />
234
233
  )
235
234
  }}
@@ -33,13 +33,13 @@ export const ThemedPressableUtil = {
33
33
  coloringColorVariants: ['normal', 'tonal', 'transparent'] as const satisfies readonly ColoringColorVariant[],
34
34
  }
35
35
 
36
- export type ThemedPressableProps = PressableProps & {
36
+ export type ThemedPressableProps = Omit<PressableProps, 'style'> & {
37
37
  size?: ThemedPressableSize,
38
38
  color?: ColorPairToken,
39
39
  coloringStyle?: ColoringStyle,
40
40
  coloringColorVariant?: ColoringColorVariant,
41
41
  hasAdditionalHorizontalPadding?: boolean,
42
- containerStyle?: StyleOverwrite<ThemedPressableState, ThemedPressableStyle>,
42
+ style?: StyleOverwrite<ThemedPressableState, ThemedPressableStyle>,
43
43
  stateLayerStyle?: StyleOverwrite<ThemedPressableState, ThemedPressableStyle>,
44
44
  iconStyle?: StyleOverwrite<ThemedPressableState, ThemedPressableIconStyle>,
45
45
  textStyle?: StyleOverwrite<ThemedPressableState, ThemedPressableTextStyle>,
@@ -61,7 +61,6 @@ export const ThemedPressable = forwardRef<React.ComponentRef<typeof Pressable>,
61
61
  hasAdditionalHorizontalPadding = false,
62
62
  disabled,
63
63
  style,
64
- containerStyle,
65
64
  stateLayerStyle,
66
65
  iconStyle,
67
66
  textStyle,
@@ -98,21 +97,18 @@ export const ThemedPressable = forwardRef<React.ComponentRef<typeof Pressable>,
98
97
  hitSlop={hitSlop}
99
98
  onLayout={onLayout}
100
99
  style={(pressableState) => {
101
- const state = resolveState(pressableState as PressableInteraction)
102
- const resolvedStyle = typeof style === 'function' ? style(pressableState) : style
103
- return [
104
- theme.components.themedPressable.container(state, containerStyle),
105
- resolvedStyle,
106
- ]
100
+ const state = resolveState(pressableState)
101
+ return theme.components.themedPressable.container(state, style)
107
102
  }}
108
103
  >
109
104
  {(pressableState) => {
110
- const state = resolveState(pressableState as PressableInteraction)
105
+ const state = resolveState(pressableState)
111
106
  const resolvedText = theme.components.themedPressable.text(state, textStyle)
112
107
  const resolvedIcon = theme.components.themedPressable.icon(state, iconStyle)
113
108
  const resolvedChildren = typeof children === 'function'
114
109
  ? children(pressableState)
115
110
  : children
111
+ const backroundColor = theme.components.themedPressable.container(state, style).backgroundColor
116
112
 
117
113
  return (
118
114
  <Fragment>
@@ -128,6 +124,7 @@ export const ThemedPressable = forwardRef<React.ComponentRef<typeof Pressable>,
128
124
  />
129
125
  <ContentThemeOverrideProvider
130
126
  foreground={resolvedText.color}
127
+ background={backroundColor}
131
128
  textStyle={resolvedText}
132
129
  iconStyle={resolvedIcon}
133
130
  >
@@ -226,19 +226,19 @@ export const AvatarGroup = ({
226
226
  isGrouped
227
227
  groupIndex={index}
228
228
  ImageComponent={avatar.ImageComponent ?? ImageComponent}
229
- avatarStyle={(_, state) => avatarResolvers.container({
229
+ avatarStyle={(state) => avatarResolvers.container({
230
230
  ...state,
231
231
  ...avatarState,
232
232
  })}
233
- imageStyle={(_, state) => avatarResolvers.image({
233
+ imageStyle={(state) => avatarResolvers.image({
234
234
  ...state,
235
235
  ...avatarState,
236
236
  })}
237
- textStyle={(_, state) => avatarResolvers.text({
237
+ textStyle={(state) => avatarResolvers.text({
238
238
  ...state,
239
239
  ...avatarState,
240
240
  })}
241
- iconStyle={(_, state) => avatarResolvers.icon({
241
+ iconStyle={(state) => avatarResolvers.icon({
242
242
  ...state,
243
243
  ...avatarState,
244
244
  })}
@@ -294,10 +294,10 @@ export const AvatarWithStatus = ({
294
294
  {...avatarProps}
295
295
  size={size}
296
296
  color={color}
297
- avatarStyle={(_, state) => avatarResolvers.container(state, avatarStyle)}
298
- imageStyle={(_, state) => avatarResolvers.image(state, imageStyle)}
299
- textStyle={(_, state) => avatarResolvers.text(state, textStyle)}
300
- iconStyle={(_, state) => avatarResolvers.icon(state, iconStyle)}
297
+ avatarStyle={(state) => avatarResolvers.container(state, avatarStyle)}
298
+ imageStyle={(state) => avatarResolvers.image(state, imageStyle)}
299
+ textStyle={(state) => avatarResolvers.text(state, textStyle)}
300
+ iconStyle={(state) => avatarResolvers.icon(state, iconStyle)}
301
301
  />
302
302
  <View style={resolvedStatusDot} />
303
303
  </View>
@@ -82,6 +82,7 @@ export const Chip = ({
82
82
  >
83
83
  <ContentThemeOverrideProvider
84
84
  foreground={resolvedTextStyle.color}
85
+ background={resolvedChipStyle.backgroundColor}
85
86
  textStyle={resolvedTextStyle}
86
87
  iconStyle={resolvedIconStyle}
87
88
  >