@ornikar/kitt-universal 2.3.0 → 3.0.0-beta.1

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 (156) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/dist/definitions/Avatar/Avatar.d.ts.map +1 -1
  3. package/dist/definitions/Button/Button.d.ts +4 -4
  4. package/dist/definitions/Button/Button.d.ts.map +1 -1
  5. package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
  6. package/dist/definitions/Button/ButtonPressable.d.ts +4 -3
  7. package/dist/definitions/Button/ButtonPressable.d.ts.map +1 -1
  8. package/dist/definitions/Card/Card.d.ts.map +1 -1
  9. package/dist/definitions/Emoji/Emoji.d.ts +8 -0
  10. package/dist/definitions/Emoji/Emoji.d.ts.map +1 -0
  11. package/dist/definitions/ExternalLink/ExternalLink.d.ts +3 -3
  12. package/dist/definitions/ExternalLink/ExternalLink.d.ts.map +1 -1
  13. package/dist/definitions/ExternalLink/ExternalLink.web.d.ts.map +1 -1
  14. package/dist/definitions/FullScreenModal/Body.d.ts.map +1 -1
  15. package/dist/definitions/FullScreenModal/FullScreenModal.d.ts.map +1 -1
  16. package/dist/definitions/FullScreenModal/Header.d.ts.map +1 -1
  17. package/dist/definitions/Icon/Icon.d.ts.map +1 -1
  18. package/dist/definitions/Icon/SpinningIcon.web.d.ts +3 -2
  19. package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
  20. package/dist/definitions/IconButton/IconButton.d.ts.map +1 -1
  21. package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts.map +1 -1
  22. package/dist/definitions/IconButton/PressableAnimatedContainer.web.d.ts.map +1 -1
  23. package/dist/definitions/IconButton/PressableIconButton.d.ts +4 -4
  24. package/dist/definitions/IconButton/PressableIconButton.d.ts.map +1 -1
  25. package/dist/definitions/ListItem/ListItem.d.ts +3 -4
  26. package/dist/definitions/ListItem/ListItem.d.ts.map +1 -1
  27. package/dist/definitions/ListItem/ListItemContent.d.ts +2 -2
  28. package/dist/definitions/ListItem/ListItemContent.d.ts.map +1 -1
  29. package/dist/definitions/ListItem/ListItemSideContent.d.ts +3 -4
  30. package/dist/definitions/ListItem/ListItemSideContent.d.ts.map +1 -1
  31. package/dist/definitions/Loader/LargeLoader.d.ts.map +1 -1
  32. package/dist/definitions/Loader/LargeLoader.web.d.ts.map +1 -1
  33. package/dist/definitions/Loader/Loader.d.ts.map +1 -1
  34. package/dist/definitions/Loader/Loader.web.d.ts.map +1 -1
  35. package/dist/definitions/Message/Message.d.ts.map +1 -1
  36. package/dist/definitions/Modal/Body.d.ts.map +1 -1
  37. package/dist/definitions/Modal/Footer.d.ts.map +1 -1
  38. package/dist/definitions/Modal/Header.d.ts.map +1 -1
  39. package/dist/definitions/Modal/Modal.d.ts.map +1 -1
  40. package/dist/definitions/Notification/Notification.d.ts.map +1 -1
  41. package/dist/definitions/Overlay/Overlay.d.ts +2 -2
  42. package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
  43. package/dist/definitions/Tag/Tag.d.ts.map +1 -1
  44. package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts +12 -0
  45. package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts.map +1 -0
  46. package/dist/definitions/TimePicker/TimePicker.d.ts +15 -0
  47. package/dist/definitions/TimePicker/TimePicker.d.ts.map +1 -0
  48. package/dist/definitions/TimePicker/TimePicker.web.d.ts +3 -0
  49. package/dist/definitions/TimePicker/TimePicker.web.d.ts.map +1 -0
  50. package/dist/definitions/TimePicker/useTimePicker.d.ts +14 -0
  51. package/dist/definitions/TimePicker/useTimePicker.d.ts.map +1 -0
  52. package/dist/definitions/Tooltip/Tooltip.d.ts +23 -3
  53. package/dist/definitions/Tooltip/Tooltip.d.ts.map +1 -1
  54. package/dist/definitions/Tooltip/Tooltip.web.d.ts +8 -0
  55. package/dist/definitions/Tooltip/Tooltip.web.d.ts.map +1 -0
  56. package/dist/definitions/Tooltip/TooltipView.d.ts +8 -0
  57. package/dist/definitions/Tooltip/TooltipView.d.ts.map +1 -0
  58. package/dist/definitions/Tooltip/tooltipUtils.d.ts +5 -0
  59. package/dist/definitions/Tooltip/tooltipUtils.d.ts.map +1 -0
  60. package/dist/definitions/forms/InputFeedback/InputFeedback.d.ts.map +1 -1
  61. package/dist/definitions/forms/InputField/InputField.d.ts.map +1 -1
  62. package/dist/definitions/forms/InputText/InputText.d.ts +3 -2
  63. package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
  64. package/dist/definitions/forms/Label/Label.d.ts.map +1 -1
  65. package/dist/definitions/forms/Radio/Radio.d.ts.map +1 -1
  66. package/dist/definitions/forms/TextArea/TextArea.d.ts.map +1 -1
  67. package/dist/definitions/index.d.ts +7 -13
  68. package/dist/definitions/index.d.ts.map +1 -1
  69. package/dist/definitions/story-components/Flex.d.ts +2 -2
  70. package/dist/definitions/story-components/Flex.d.ts.map +1 -1
  71. package/dist/definitions/story-components/Story.d.ts.map +1 -1
  72. package/dist/definitions/story-components/StoryBlock.d.ts +1 -2
  73. package/dist/definitions/story-components/StoryBlock.d.ts.map +1 -1
  74. package/dist/definitions/story-components/StoryContainer.d.ts.map +1 -1
  75. package/dist/definitions/story-components/StoryContainer.web.d.ts.map +1 -1
  76. package/dist/definitions/story-components/StoryDecorator.d.ts +3 -3
  77. package/dist/definitions/story-components/StoryDecorator.d.ts.map +1 -1
  78. package/dist/definitions/story-components/StoryGrid.d.ts.map +1 -1
  79. package/dist/definitions/story-components/StorySection.d.ts +7 -9
  80. package/dist/definitions/story-components/StorySection.d.ts.map +1 -1
  81. package/dist/definitions/story-components/StoryTitle.d.ts.map +1 -1
  82. package/dist/definitions/themes/default.d.ts +3 -6
  83. package/dist/definitions/themes/default.d.ts.map +1 -1
  84. package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts +1 -0
  85. package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts.map +1 -1
  86. package/dist/definitions/themes/late-ocean/tooltip.d.ts +10 -0
  87. package/dist/definitions/themes/late-ocean/tooltip.d.ts.map +1 -0
  88. package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts +6 -8
  89. package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts.map +1 -1
  90. package/dist/definitions/typography/Typography.d.ts +19 -7
  91. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  92. package/dist/definitions/typography/TypographyEmoji.d.ts +7 -0
  93. package/dist/definitions/typography/TypographyEmoji.d.ts.map +1 -0
  94. package/dist/definitions/typography/TypographyIcon.d.ts.map +1 -1
  95. package/dist/definitions/typography/TypographyLink.d.ts +6 -9
  96. package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
  97. package/dist/definitions/useKittTheme.d.ts +8 -1
  98. package/dist/definitions/useKittTheme.d.ts.map +1 -1
  99. package/dist/definitions/utils/StyleWebWrapper.d.ts +7 -0
  100. package/dist/definitions/utils/StyleWebWrapper.d.ts.map +1 -0
  101. package/dist/definitions/utils/storybook/{decorators/KittThemeDecorator.d.ts → KittThemeDecorator.d.ts} +1 -1
  102. package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts.map +1 -0
  103. package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts +2 -2
  104. package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts.map +1 -1
  105. package/dist/definitions/utils/tests/styled-component-typing-test.d.ts +1 -0
  106. package/dist/definitions/utils/tests/styled-component-typing-test.d.ts.map +1 -1
  107. package/dist/definitions/utils/windowSize/MatchWindowSize.d.ts.map +1 -1
  108. package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts +2 -2
  109. package/dist/definitions/utils/withTheme.d.ts +7 -0
  110. package/dist/definitions/utils/withTheme.d.ts.map +1 -0
  111. package/dist/index-browser-all.es.android.js +1347 -595
  112. package/dist/index-browser-all.es.android.js.map +1 -1
  113. package/dist/index-browser-all.es.css +2 -0
  114. package/dist/index-browser-all.es.ios.js +1348 -596
  115. package/dist/index-browser-all.es.ios.js.map +1 -1
  116. package/dist/index-browser-all.es.js +1318 -672
  117. package/dist/index-browser-all.es.js.map +1 -1
  118. package/dist/index-browser-all.es.web.js +1173 -812
  119. package/dist/index-browser-all.es.web.js.map +1 -1
  120. package/dist/index-node-14.17.cjs.css +2 -0
  121. package/dist/index-node-14.17.cjs.js +1168 -591
  122. package/dist/index-node-14.17.cjs.js.map +1 -1
  123. package/dist/styles.css +4 -0
  124. package/dist/tsbuildinfo +1 -1
  125. package/package.json +18 -7
  126. package/translations/es-ES.json +3 -0
  127. package/translations/fr-FR.json +3 -0
  128. package/dist/definitions/primitives/PrimitiveLink.d.ts +0 -13
  129. package/dist/definitions/primitives/PrimitiveLink.d.ts.map +0 -1
  130. package/dist/definitions/primitives/PrimitiveLink.web.d.ts +0 -4
  131. package/dist/definitions/primitives/PrimitiveLink.web.d.ts.map +0 -1
  132. package/dist/definitions/primitives/PrimitivePressable.d.ts +0 -18
  133. package/dist/definitions/primitives/PrimitivePressable.d.ts.map +0 -1
  134. package/dist/definitions/primitives/PrimitivePressable.web.d.ts +0 -4
  135. package/dist/definitions/primitives/PrimitivePressable.web.d.ts.map +0 -1
  136. package/dist/definitions/primitives/PrimitiveScrollView.d.ts +0 -8
  137. package/dist/definitions/primitives/PrimitiveScrollView.d.ts.map +0 -1
  138. package/dist/definitions/primitives/PrimitiveScrollView.web.d.ts +0 -4
  139. package/dist/definitions/primitives/PrimitiveScrollView.web.d.ts.map +0 -1
  140. package/dist/definitions/primitives/PrimitiveText.d.ts +0 -14
  141. package/dist/definitions/primitives/PrimitiveText.d.ts.map +0 -1
  142. package/dist/definitions/primitives/PrimitiveText.web.d.ts +0 -6
  143. package/dist/definitions/primitives/PrimitiveText.web.d.ts.map +0 -1
  144. package/dist/definitions/primitives/PrimitiveView.d.ts +0 -23
  145. package/dist/definitions/primitives/PrimitiveView.d.ts.map +0 -1
  146. package/dist/definitions/primitives/PrimitiveView.web.d.ts +0 -27
  147. package/dist/definitions/primitives/PrimitiveView.web.d.ts.map +0 -1
  148. package/dist/definitions/primitives/helpers.d.ts +0 -7
  149. package/dist/definitions/primitives/helpers.d.ts.map +0 -1
  150. package/dist/definitions/primitives/reset.d.ts +0 -2
  151. package/dist/definitions/primitives/reset.d.ts.map +0 -1
  152. package/dist/definitions/utils/storybook/decorators/KittThemeDecorator.d.ts.map +0 -1
  153. package/dist/definitions/utils/storybook/decorators/SafeAreaProviderDecorator.d.ts +0 -2
  154. package/dist/definitions/utils/storybook/decorators/SafeAreaProviderDecorator.d.ts.map +0 -1
  155. package/dist/definitions/utils/storybook/setup-global-decorators.d.ts +0 -2
  156. package/dist/definitions/utils/storybook/setup-global-decorators.d.ts.map +0 -1
@@ -2,34 +2,36 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const _extends = require('@babel/runtime/helpers/extends');
6
5
  const kittIcons = require('@ornikar/kitt-icons');
7
- const React = require('react');
8
6
  const reactNative = require('react-native');
9
- const styled = require('styled-components');
7
+ const styled = require('styled-components/native');
8
+ const react = require('react');
9
+ const jsxRuntime = require('react/jsx-runtime');
10
+ const twemojiParser = require('twemoji-parser');
10
11
  const WebBrowser = require('expo-web-browser');
11
12
  const reactNativeSafeAreaContext = require('react-native-safe-area-context');
12
13
  const Animated = require('react-native-reanimated');
14
+ const react$1 = require('@linaria/react');
15
+ const DateTimePicker = require('@react-native-community/datetimepicker');
16
+ const reactIntl = require('react-intl');
17
+ const reactNative$1 = require('@floating-ui/react-native');
13
18
  const addons = require('@storybook/addons');
14
19
 
15
20
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
16
21
 
17
- const _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
18
- const React__default = /*#__PURE__*/_interopDefaultLegacy(React);
19
22
  const styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
20
23
  const Animated__default = /*#__PURE__*/_interopDefaultLegacy(Animated);
21
-
22
- const PrimitiveView = reactNative.View;
24
+ const DateTimePicker__default = /*#__PURE__*/_interopDefaultLegacy(DateTimePicker);
23
25
 
24
26
  function SpinningIcon({
25
27
  children
26
28
  }) {
27
- const animationRef = React.useRef(new reactNative.Animated.Value(0));
29
+ const animationRef = react.useRef(new reactNative.Animated.Value(0));
28
30
  const rotation = animationRef.current.interpolate({
29
31
  inputRange: [0, 1],
30
32
  outputRange: ['0deg', '360deg']
31
33
  });
32
- React.useEffect(() => {
34
+ react.useEffect(() => {
33
35
  if (process.env.TESTS) return undefined;
34
36
  const animation = reactNative.Animated.loop(reactNative.Animated.timing(animationRef.current, {
35
37
  toValue: 1,
@@ -44,16 +46,17 @@ function SpinningIcon({
44
46
  return undefined;
45
47
  };
46
48
  }, []);
47
- return /*#__PURE__*/React__default.createElement(reactNative.Animated.View, {
49
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.Animated.View, {
48
50
  style: {
49
51
  transform: [{
50
52
  rotate: rotation
51
53
  }]
52
- }
53
- }, children);
54
+ },
55
+ children: children
56
+ });
54
57
  }
55
58
 
56
- const IconContainer$2 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
59
+ const IconContainer$2 = /*#__PURE__*/styled__default.View.withConfig({
57
60
  displayName: "Icon__IconContainer",
58
61
  componentId: "kitt-universal__sc-usm0ol-0"
59
62
  })(["color:", ";width:", "px;height:", "px;align-self:", ";"], ({
@@ -72,118 +75,198 @@ function Icon({
72
75
  align,
73
76
  color
74
77
  }) {
75
- const clonedIcon = /*#__PURE__*/React__default.cloneElement(icon, {
78
+ const clonedIcon = /*#__PURE__*/react.cloneElement(icon, {
76
79
  color
77
80
  });
78
- return /*#__PURE__*/React__default.createElement(IconContainer$2, {
81
+ return /*#__PURE__*/jsxRuntime.jsx(IconContainer$2, {
79
82
  align: align,
80
83
  size: size,
81
- color: color
82
- }, spin ? /*#__PURE__*/React__default.createElement(SpinningIcon, null, clonedIcon) : clonedIcon);
84
+ color: color,
85
+ children: spin ? /*#__PURE__*/jsxRuntime.jsx(SpinningIcon, {
86
+ children: clonedIcon
87
+ }) : clonedIcon
88
+ });
83
89
  }
84
90
 
85
- const PrimitiveText = reactNative.Text;
91
+ const KittBreakpoints = {
92
+ /**
93
+ * min-width: 0
94
+ */
95
+ BASE: 0,
96
+
97
+ /**
98
+ * min-width: 480px
99
+ */
100
+ SMALL: 480,
101
+
102
+ /**
103
+ * min-width: 768px
104
+ */
105
+ MEDIUM: 768,
106
+
107
+ /**
108
+ * min-width: 1024px
109
+ */
110
+ LARGE: 1024,
111
+
112
+ /**
113
+ * min-width: 1280px
114
+ */
115
+ WIDE: 1280
116
+ };
117
+ const KittBreakpointsMax = {
118
+ /**
119
+ * max-width: 479px
120
+ */
121
+ BASE: KittBreakpoints.SMALL - 1,
122
+
123
+ /**
124
+ * max-width: 767px
125
+ */
126
+ SMALL: KittBreakpoints.MEDIUM - 1,
127
+
128
+ /**
129
+ * max-width: 1023px
130
+ */
131
+ MEDIUM: KittBreakpoints.LARGE - 1,
132
+
133
+ /**
134
+ * max-width: 1279px
135
+ */
136
+ LARGE: KittBreakpoints.WIDE - 1
137
+ };
86
138
 
87
- const TypographyTypeContext = /*#__PURE__*/React.createContext(undefined);
88
- const TypographyColorContext = /*#__PURE__*/React.createContext('black');
139
+ const IsHeaderTypographyContext = /*#__PURE__*/react.createContext(undefined);
140
+ const TypographyColorContext = /*#__PURE__*/react.createContext('black');
89
141
  function useTypographyColor() {
90
- return React.useContext(TypographyColorContext);
142
+ return react.useContext(TypographyColorContext);
91
143
  }
92
- const StyledTypography = /*#__PURE__*/styled__default(PrimitiveText).withConfig({
144
+ const getTypographyTypeConfigKey = theme => {
145
+ const isMediumOrAbove = theme.responsive.matchWindowSize({
146
+ minWidth: KittBreakpoints.MEDIUM
147
+ });
148
+ return isMediumOrAbove ? 'mediumAndWide' : 'baseAndSmall';
149
+ };
150
+
151
+ const isTypeHeader = type => type.startsWith('header');
152
+
153
+ const isTypographyHeader = (type, typographyIsHeaderInContext) => {
154
+ if (type) return isTypeHeader(type);
155
+ if (typographyIsHeaderInContext != null) return typographyIsHeaderInContext;
156
+ throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
157
+ };
158
+ function getTypographyTypeConfig(type, theme) {
159
+ if (isTypographyHeader(type, undefined)) {
160
+ return theme.kitt.typography.types.headers.configs[type];
161
+ }
162
+
163
+ return theme.kitt.typography.types.bodies.configs[type];
164
+ }
165
+ const StyledTypography = /*#__PURE__*/styled__default.Text.withConfig({
93
166
  displayName: "Typography__StyledTypography",
94
167
  componentId: "kitt-universal__sc-1dz700q-0"
95
168
  })(["", " ", ""], ({
96
169
  theme,
97
- isHeader,
98
- type,
99
- variant
170
+ $isHeader,
171
+ $typeForCurrentWindowSize,
172
+ $variant
100
173
  }) => {
101
174
  const {
102
175
  headers,
103
176
  bodies
104
177
  } = theme.kitt.typography.types;
178
+ const typeConfigKey = getTypographyTypeConfigKey(theme);
105
179
  return `
106
180
  /* type */
107
- ${!type ? '' : `
108
- font-family: ${isHeader ? headers.fontFamily[variant] : bodies.fontFamily[variant]};
109
- font-size: ${isHeader ? headers.configs[type].baseAndSmall.fontSize : bodies.configs[type].baseAndSmall.fontSize};
110
- line-height: ${isHeader ? headers.configs[type].baseAndSmall.lineHeight : bodies.configs[type].baseAndSmall.lineHeight};
181
+ ${!$typeForCurrentWindowSize ? '' : `
182
+ font-family: ${$isHeader ? headers.fontFamily[$variant] : bodies.fontFamily[$variant]};
183
+ font-size: ${$isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize};
184
+ line-height: ${$isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight};
111
185
  `}
112
186
 
113
187
  /* variant */
114
- font-weight: ${isHeader ? headers.fontWeight : bodies.fontWeight[variant]};
115
- font-style: ${isHeader ? headers.fontStyle : bodies.fontStyle[variant]};
188
+ font-weight: ${$isHeader ? headers.fontWeight : bodies.fontWeight[$variant]};
189
+ font-style: ${$isHeader ? headers.fontStyle : bodies.fontStyle[$variant]};
116
190
  `;
117
191
  }, ({
118
192
  theme,
119
- color
120
- }) => !color ? '' : `
121
- color: ${theme.kitt.typography.colors[color]};
122
- text-decoration-color: ${theme.kitt.typography.colors[color]};
193
+ $color
194
+ }) => !$color ? '' : `
195
+ color: ${theme.kitt.typography.colors[$color]};
196
+ text-decoration-color: ${theme.kitt.typography.colors[$color]};
123
197
  `);
124
-
125
- const isTypeHeader = type => type.startsWith('header');
126
-
127
- const isTypographyHeader = (base, typeInContext) => {
128
- if (base) return isTypeHeader(base);
129
- if (typeInContext) return isTypeHeader(typeInContext);
130
- throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
131
- };
132
-
198
+ function useTypographyTypeForCurrentWindowSize(base, small, medium, large) {
199
+ const {
200
+ width
201
+ } = reactNative.useWindowDimensions();
202
+ if (large && width >= KittBreakpoints.LARGE) return large;
203
+ if (medium && width >= KittBreakpoints.MEDIUM) return medium;
204
+ if (small && width >= KittBreakpoints.SMALL) return small;
205
+ return base;
206
+ }
133
207
  function Typography({
134
208
  accessibilityRole,
135
209
  base,
210
+ small,
211
+ medium,
212
+ large,
136
213
  variant,
137
214
  color,
138
215
  ...otherProps
139
216
  }) {
140
- const typeInContext = React.useContext(TypographyTypeContext);
141
- const isHeader = isTypographyHeader(base, typeInContext);
142
- const nonNullableVariant = variant ?? (isHeader ? 'bold' : 'regular');
143
- const colorWithDefaultToBlack = color ?? (typeInContext ? undefined : 'black');
144
- const content = base ?
145
- /*#__PURE__*/
146
- // use the type and pass the type to the context for children
147
- React__default.createElement(TypographyTypeContext.Provider, {
148
- value: base
149
- }, /*#__PURE__*/React__default.createElement(StyledTypography, _extends__default({
150
- color: colorWithDefaultToBlack,
151
- isHeader: isHeader,
152
- type: base,
153
- variant: nonNullableVariant,
154
- accessibilityRole: accessibilityRole || undefined
155
- }, otherProps))) : /*#__PURE__*/React__default.createElement(StyledTypography, _extends__default({
156
- color: colorWithDefaultToBlack,
157
- isHeader: isHeader,
158
- variant: nonNullableVariant,
159
- accessibilityRole: accessibilityRole || undefined
160
- }, otherProps));
161
- return color ? /*#__PURE__*/React__default.createElement(TypographyColorContext.Provider, {
162
- value: color
163
- }, content) : content;
217
+ const isHeaderTypographyInContext = react.useContext(IsHeaderTypographyContext);
218
+ const typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
219
+ const isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
220
+ const nonNullableVariant = variant ?? (isHeader ? 'bold' : 'regular'); // if isHeaderTypographyInContext exists, it means we are inside another typography so we don't want to
221
+ // redefine the color, just inherit from it
222
+
223
+ const colorWithDefaultToBlack = color ?? (isHeaderTypographyInContext !== undefined ? undefined : 'black');
224
+ const content = base ? /*#__PURE__*/jsxRuntime.jsx(IsHeaderTypographyContext.Provider, {
225
+ value: isHeader,
226
+ children: /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
227
+ $color: colorWithDefaultToBlack,
228
+ $isHeader: isHeader,
229
+ $typeForCurrentWindowSize: typeForCurrentWindowSize,
230
+ $variant: nonNullableVariant,
231
+ accessibilityRole: accessibilityRole || undefined,
232
+ ...otherProps
233
+ })
234
+ }) : /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
235
+ $color: colorWithDefaultToBlack,
236
+ $isHeader: isHeader,
237
+ $variant: nonNullableVariant,
238
+ accessibilityRole: accessibilityRole || undefined,
239
+ ...otherProps
240
+ });
241
+ return color ? /*#__PURE__*/jsxRuntime.jsx(TypographyColorContext.Provider, {
242
+ value: color,
243
+ children: content
244
+ }) : content;
164
245
  }
165
246
 
166
247
  function TypographyText(props) {
167
- return /*#__PURE__*/React__default.createElement(Typography, _extends__default({
168
- accessibilityRole: null
169
- }, props));
248
+ return /*#__PURE__*/jsxRuntime.jsx(Typography, {
249
+ accessibilityRole: null,
250
+ ...props
251
+ });
170
252
  }
171
253
 
172
254
  function TypographyParagraph(props) {
173
- return /*#__PURE__*/React__default.createElement(Typography, _extends__default({
174
- accessibilityRole: "paragraph"
175
- }, props));
255
+ return /*#__PURE__*/jsxRuntime.jsx(Typography, {
256
+ accessibilityRole: "paragraph",
257
+ ...props
258
+ });
176
259
  }
177
260
 
178
261
  const createHeading = (level, defaultBase) => {
179
262
  // https://github.com/necolas/react-native-web/issues/401
180
263
  function TypographyHeading(props) {
181
- return /*#__PURE__*/React__default.createElement(Typography, _extends__default({
264
+ return /*#__PURE__*/jsxRuntime.jsx(Typography, {
182
265
  accessibilityRole: "header",
183
- base: defaultBase
184
- }, props, {
266
+ base: defaultBase,
267
+ ...props,
185
268
  accessibilityLevel: level
186
- }));
269
+ });
187
270
  }
188
271
 
189
272
  TypographyHeading.displayName = `TypographyHeading${level}`;
@@ -218,7 +301,7 @@ const getFirstCharacter = string => string ? string[0] : '';
218
301
 
219
302
  const getInitials = (firstname, lastname) => (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
220
303
 
221
- const StyledAvatarView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
304
+ const StyledAvatarView = /*#__PURE__*/styled__default.View.withConfig({
222
305
  displayName: "Avatar__StyledAvatarView",
223
306
  componentId: "kitt-universal__sc-9miubv-0"
224
307
  })(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
@@ -241,7 +324,7 @@ function AvatarContent({
241
324
  light
242
325
  }) {
243
326
  if (src) {
244
- return /*#__PURE__*/React__default.createElement(reactNative.Image, {
327
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.Image, {
245
328
  source: {
246
329
  uri: src
247
330
  },
@@ -253,15 +336,16 @@ function AvatarContent({
253
336
  }
254
337
 
255
338
  if (firstname && lastname) {
256
- return /*#__PURE__*/React__default.createElement(Typography.Text, {
339
+ return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
257
340
  base: "body-small",
258
341
  variant: "bold",
259
- color: light ? 'black' : 'white'
260
- }, getInitials(firstname, lastname));
342
+ color: light ? 'black' : 'white',
343
+ children: getInitials(firstname, lastname)
344
+ });
261
345
  }
262
346
 
263
- return /*#__PURE__*/React__default.createElement(Icon, {
264
- icon: /*#__PURE__*/React__default.createElement(kittIcons.UserIcon, null),
347
+ return /*#__PURE__*/jsxRuntime.jsx(Icon, {
348
+ icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.UserIcon, {}),
265
349
  color: light ? 'black' : 'white',
266
350
  size: size / 2
267
351
  });
@@ -271,19 +355,20 @@ function Avatar({
271
355
  size = 40,
272
356
  ...rest
273
357
  }) {
274
- return /*#__PURE__*/React__default.createElement(StyledAvatarView, _extends__default({}, rest, {
275
- size: size
276
- }), /*#__PURE__*/React__default.createElement(AvatarContent, _extends__default({}, rest, {
277
- size: size
278
- })));
358
+ return /*#__PURE__*/jsxRuntime.jsx(StyledAvatarView, { ...rest,
359
+ size: size,
360
+ children: /*#__PURE__*/jsxRuntime.jsx(AvatarContent, { ...rest,
361
+ size: size
362
+ })
363
+ });
279
364
  }
280
365
 
281
366
  function TypographyIconInheritColor(props) {
282
367
  const color = useTypographyColor();
283
368
  const theme = /*#__PURE__*/styled.useTheme();
284
- return /*#__PURE__*/React__default.createElement(Icon, _extends__default({}, props, {
369
+ return /*#__PURE__*/jsxRuntime.jsx(Icon, { ...props,
285
370
  color: theme.kitt.typography.colors[color]
286
- }));
371
+ });
287
372
  }
288
373
 
289
374
  function TypographyIconSpecifiedColor({
@@ -291,9 +376,9 @@ function TypographyIconSpecifiedColor({
291
376
  ...otherProps
292
377
  }) {
293
378
  const theme = /*#__PURE__*/styled.useTheme();
294
- return /*#__PURE__*/React__default.createElement(Icon, _extends__default({}, otherProps, {
379
+ return /*#__PURE__*/jsxRuntime.jsx(Icon, { ...otherProps,
295
380
  color: theme.kitt.typography.colors[color]
296
- }));
381
+ });
297
382
  }
298
383
 
299
384
  function TypographyIcon({
@@ -301,12 +386,14 @@ function TypographyIcon({
301
386
  ...otherProps
302
387
  }) {
303
388
  if (color) {
304
- return /*#__PURE__*/React__default.createElement(TypographyIconSpecifiedColor, _extends__default({
305
- color: color
306
- }, otherProps));
389
+ return /*#__PURE__*/jsxRuntime.jsx(TypographyIconSpecifiedColor, {
390
+ color: color,
391
+ ...otherProps
392
+ });
307
393
  }
308
394
 
309
- return /*#__PURE__*/React__default.createElement(TypographyIconInheritColor, otherProps);
395
+ return /*#__PURE__*/jsxRuntime.jsx(TypographyIconInheritColor, { ...otherProps
396
+ });
310
397
  }
311
398
 
312
399
  const getTextColorByType = (type, isPressed, disabled) => {
@@ -332,14 +419,14 @@ const ButtonText = /*#__PURE__*/styled__default(Typography.Text).withConfig({
332
419
  displayName: "ButtonContent__ButtonText",
333
420
  componentId: "kitt-universal__sc-dnyw3n-0"
334
421
  })(["text-align:center;"]);
335
- const Content$1 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
422
+ const Content$1 = /*#__PURE__*/styled__default.View.withConfig({
336
423
  displayName: "ButtonContent__Content",
337
424
  componentId: "kitt-universal__sc-dnyw3n-1"
338
425
  })(["flex-direction:row;align-items:center;justify-content:center;flex:", ";"], ({
339
426
  stretch,
340
427
  iconOnly
341
428
  }) => `${stretch || iconOnly ? 1 : 0} 1 auto`);
342
- const IconContainer$1 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
429
+ const IconContainer$1 = /*#__PURE__*/styled__default.View.withConfig({
343
430
  displayName: "ButtonContent__IconContainer",
344
431
  componentId: "kitt-universal__sc-dnyw3n-2"
345
432
  })(["", ""], ({
@@ -363,15 +450,16 @@ function ButtonIcon({
363
450
  iconPosition,
364
451
  testID
365
452
  }) {
366
- return /*#__PURE__*/React__default.createElement(IconContainer$1, {
367
- iconPosition: iconPosition
368
- }, /*#__PURE__*/React__default.createElement(TypographyIcon, {
369
- icon: icon,
370
- spin: spin,
371
- color: color,
372
- size: size,
373
- testID: testID
374
- }));
453
+ return /*#__PURE__*/jsxRuntime.jsx(IconContainer$1, {
454
+ iconPosition: iconPosition,
455
+ children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
456
+ icon: icon,
457
+ spin: spin,
458
+ color: color,
459
+ size: size,
460
+ testID: testID
461
+ })
462
+ });
375
463
  }
376
464
 
377
465
  function ButtonContent({
@@ -399,33 +487,34 @@ function ButtonContent({
399
487
  }
400
488
 
401
489
  if (!children) {
402
- return /*#__PURE__*/React__default.createElement(Content$1, {
490
+ return /*#__PURE__*/jsxRuntime.jsx(Content$1, {
403
491
  iconOnly: true,
404
- stretch: stretch
405
- }, /*#__PURE__*/React__default.createElement(TypographyIcon, _extends__default({}, sharedIconProps, {
406
- icon: icon
407
- })));
492
+ stretch: stretch,
493
+ children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, { ...sharedIconProps,
494
+ icon: icon
495
+ })
496
+ });
408
497
  }
409
498
 
410
- return /*#__PURE__*/React__default.createElement(Content$1, {
411
- stretch: stretch
412
- }, icon && iconPosition === 'left' ? /*#__PURE__*/React__default.createElement(ButtonIcon, _extends__default({}, sharedIconProps, {
413
- icon: icon,
414
- iconPosition: iconPosition,
415
- testID: "button-left-icon"
416
- })) : null, /*#__PURE__*/React__default.createElement(ButtonText, {
417
- base: "body",
418
- color: color,
419
- variant: "bold"
420
- }, children), icon && iconPosition === 'right' ? /*#__PURE__*/React__default.createElement(ButtonIcon, _extends__default({}, sharedIconProps, {
421
- icon: icon,
422
- iconPosition: iconPosition
423
- })) : null);
499
+ return /*#__PURE__*/jsxRuntime.jsxs(Content$1, {
500
+ stretch: stretch,
501
+ children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsxRuntime.jsx(ButtonIcon, { ...sharedIconProps,
502
+ icon: icon,
503
+ iconPosition: iconPosition,
504
+ testID: "button-left-icon"
505
+ }) : null, /*#__PURE__*/jsxRuntime.jsx(ButtonText, {
506
+ base: "body",
507
+ color: color,
508
+ variant: "bold",
509
+ children: children
510
+ }), icon && iconPosition === 'right' ? /*#__PURE__*/jsxRuntime.jsx(ButtonIcon, { ...sharedIconProps,
511
+ icon: icon,
512
+ iconPosition: iconPosition
513
+ }) : null]
514
+ });
424
515
  }
425
516
 
426
- const PrimitivePressable = reactNative.Pressable;
427
-
428
- const ButtonPressable = /*#__PURE__*/styled__default(PrimitivePressable).withConfig({
517
+ const ButtonPressable = /*#__PURE__*/styled__default.Pressable.withConfig({
429
518
  displayName: "ButtonPressable",
430
519
  componentId: "kitt-universal__sc-7ckel6-0"
431
520
  })(["min-width:", ";max-width:", ";width:", ";min-height:", ";background-color:", ";padding:", ";flex-direction:row;align-self:flex-start;border-radius:", ";border-color:", ";border-width:", ";"], ({
@@ -473,16 +562,16 @@ function Button({
473
562
  hrefAttrs,
474
563
  onPress
475
564
  }) {
476
- const [isPressed, setIsPressed] = React.useState(false);
565
+ const [isPressed, setIsPressed] = react.useState(false);
477
566
  const sharedProps = {
478
567
  type,
479
568
  stretch,
480
569
  disabled
481
570
  };
482
- return /*#__PURE__*/React__default.createElement(ButtonPressable // eslint-disable-next-line unicorn/expiring-todo-comments
571
+ return /*#__PURE__*/jsxRuntime.jsx(ButtonPressable // eslint-disable-next-line unicorn/expiring-todo-comments
483
572
  // TODO: When designs are defined, update with the proper onPress styles to mimic TouchableHighlight
484
573
  // underlayColor={globalTheme.button[type].pressedBackgroundColor}
485
- , _extends__default({}, sharedProps, {
574
+ , { ...sharedProps,
486
575
  isPressed: isPressed,
487
576
  accessibilityRole: "button",
488
577
  testID: testID,
@@ -490,15 +579,17 @@ function Button({
490
579
  hrefAttrs: hrefAttrs,
491
580
  onPress: onPress,
492
581
  onPressIn: () => setIsPressed(true),
493
- onPressOut: () => setIsPressed(false)
494
- }), /*#__PURE__*/React__default.createElement(ButtonContent, _extends__default({}, sharedProps, {
495
- icon: icon,
496
- iconPosition: iconPosition,
497
- iconSpin: iconSpin
498
- }), children));
582
+ onPressOut: () => setIsPressed(false),
583
+ children: /*#__PURE__*/jsxRuntime.jsx(ButtonContent, { ...sharedProps,
584
+ icon: icon,
585
+ iconPosition: iconPosition,
586
+ iconSpin: iconSpin,
587
+ children: children
588
+ })
589
+ });
499
590
  }
500
591
 
501
- const Container$5 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
592
+ const Container$6 = /*#__PURE__*/styled__default.View.withConfig({
502
593
  displayName: "Card__Container",
503
594
  componentId: "kitt-universal__sc-1n9psug-0"
504
595
  })(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], ({
@@ -518,9 +609,38 @@ function Card({
518
609
  children,
519
610
  type
520
611
  }) {
521
- return /*#__PURE__*/React__default.createElement(Container$5, {
522
- type: type
523
- }, children);
612
+ return /*#__PURE__*/jsxRuntime.jsx(Container$6, {
613
+ type: type,
614
+ children: children
615
+ });
616
+ }
617
+
618
+ const StyledEmoji = /*#__PURE__*/styled__default.Image.withConfig({
619
+ displayName: "Emoji__StyledEmoji",
620
+ componentId: "kitt-universal__sc-ggl6wj-0"
621
+ })(["width:", "px;height:", "px;"], ({
622
+ size
623
+ }) => size, ({
624
+ size
625
+ }) => size);
626
+ function Emoji({
627
+ emoji,
628
+ size,
629
+ style
630
+ }) {
631
+ const [emojiData] = react.useMemo(() => twemojiParser.parse(emoji, {
632
+ // on native plaforms, you can't display svg as Image
633
+ assetType: 'svg'
634
+ }), [emoji]);
635
+ if (!emojiData) return null;
636
+ return /*#__PURE__*/jsxRuntime.jsx(StyledEmoji, {
637
+ size: size,
638
+ accessibilityLabel: emojiData.text,
639
+ source: {
640
+ uri: emojiData.url
641
+ },
642
+ style: style
643
+ });
524
644
  }
525
645
 
526
646
  const defaultOpenLinkBehavior = {
@@ -535,7 +655,7 @@ function ExternalLink({
535
655
  onPress,
536
656
  ...rest
537
657
  }) {
538
- return /*#__PURE__*/React__default.createElement(Component, _extends__default({}, rest, {
658
+ return /*#__PURE__*/jsxRuntime.jsx(Component, { ...rest,
539
659
  onPress: () => {
540
660
  if (onPress) onPress();
541
661
  if (!href) return;
@@ -543,13 +663,13 @@ function ExternalLink({
543
663
  switch (openLinkBehavior.native) {
544
664
  case 'openInModal':
545
665
  case undefined:
546
- reactNative.Linking.openURL(href).catch(err => {
666
+ WebBrowser.openBrowserAsync(href).catch(err => {
547
667
  console.error(`An error occurred while opening ${href}`, err);
548
668
  });
549
669
  break;
550
670
 
551
671
  case 'openBrowserApp':
552
- WebBrowser.openBrowserAsync(href).catch(err => {
672
+ reactNative.Linking.openURL(href).catch(err => {
553
673
  console.error(`An error occurred while opening ${href}`, err);
554
674
  });
555
675
  break;
@@ -561,7 +681,7 @@ function ExternalLink({
561
681
 
562
682
  }
563
683
  }
564
- }));
684
+ });
565
685
  }
566
686
 
567
687
  const getColorFromState = state => {
@@ -579,66 +699,19 @@ function InputFeedback({
579
699
  testID,
580
700
  children
581
701
  }) {
582
- return /*#__PURE__*/React__default.createElement(Typography.Text, {
702
+ return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
583
703
  base: "body-small",
584
704
  color: getColorFromState(state),
585
- testID: testID
586
- }, children);
705
+ testID: testID,
706
+ children: children
707
+ });
587
708
  }
588
709
 
589
- const KittBreakpoints = {
590
- /**
591
- * min-width: 0
592
- */
593
- BASE: 0,
594
-
595
- /**
596
- * min-width: 480px
597
- */
598
- SMALL: 480,
599
-
600
- /**
601
- * min-width: 768px
602
- */
603
- MEDIUM: 768,
604
-
605
- /**
606
- * min-width: 1024px
607
- */
608
- LARGE: 1024,
609
-
610
- /**
611
- * min-width: 1280px
612
- */
613
- WIDE: 1280
614
- };
615
- const KittBreakpointsMax = {
616
- /**
617
- * max-width: 479px
618
- */
619
- BASE: KittBreakpoints.SMALL - 1,
620
-
621
- /**
622
- * max-width: 767px
623
- */
624
- SMALL: KittBreakpoints.MEDIUM - 1,
625
-
626
- /**
627
- * max-width: 1023px
628
- */
629
- MEDIUM: KittBreakpoints.LARGE - 1,
630
-
631
- /**
632
- * max-width: 1279px
633
- */
634
- LARGE: KittBreakpoints.WIDE - 1
635
- };
636
-
637
- const FieldContainer = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
710
+ const FieldContainer = /*#__PURE__*/styled__default.View.withConfig({
638
711
  displayName: "InputField__FieldContainer",
639
712
  componentId: "kitt-universal__sc-13fkixs-0"
640
713
  })(["padding:5px 0 10px;"]);
641
- const FeedbackContainer = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
714
+ const FeedbackContainer = /*#__PURE__*/styled__default.View.withConfig({
642
715
  displayName: "InputField__FeedbackContainer",
643
716
  componentId: "kitt-universal__sc-13fkixs-1"
644
717
  })(["", ";"], ({
@@ -646,13 +719,13 @@ const FeedbackContainer = /*#__PURE__*/styled__default(PrimitiveView).withConfig
646
719
  }) => theme.responsive.ifWindowSizeMatches({
647
720
  minWidth: KittBreakpoints.SMALL
648
721
  }, 'padding-top: 10px', 'padding-top: 5px'));
649
- const FieldLabelContainer = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
722
+ const FieldLabelContainer = /*#__PURE__*/styled__default.View.withConfig({
650
723
  displayName: "InputField__FieldLabelContainer",
651
724
  componentId: "kitt-universal__sc-13fkixs-2"
652
725
  })(["flex-direction:row;align-items:center;padding-bottom:", "px;"], ({
653
726
  theme
654
727
  }) => theme.kitt.forms.inputField.labelContainerPaddingBottom);
655
- const LabelContainer = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
728
+ const LabelContainer = /*#__PURE__*/styled__default.View.withConfig({
656
729
  displayName: "InputField__LabelContainer",
657
730
  componentId: "kitt-universal__sc-13fkixs-3"
658
731
  })(["margin-right:", "px;"], ({
@@ -664,12 +737,20 @@ function InputField({
664
737
  input,
665
738
  feedback
666
739
  }) {
667
- return /*#__PURE__*/React__default.createElement(FieldContainer, null, label ? /*#__PURE__*/React__default.createElement(FieldLabelContainer, null, /*#__PURE__*/React__default.createElement(LabelContainer, null, label), labelFeedback) : null, input, feedback ? /*#__PURE__*/React__default.createElement(FeedbackContainer, null, feedback) : null);
740
+ return /*#__PURE__*/jsxRuntime.jsxs(FieldContainer, {
741
+ children: [label ? /*#__PURE__*/jsxRuntime.jsxs(FieldLabelContainer, {
742
+ children: [/*#__PURE__*/jsxRuntime.jsx(LabelContainer, {
743
+ children: label
744
+ }), labelFeedback]
745
+ }) : null, input, feedback ? /*#__PURE__*/jsxRuntime.jsx(FeedbackContainer, {
746
+ children: feedback
747
+ }) : null]
748
+ });
668
749
  }
669
750
 
670
751
  const useInputText = () => {
671
- const [isFocused, setIsFocused] = React.useState(false);
672
- const [isPasswordVisible, setIsPasswordVisible] = React.useState(false);
752
+ const [isFocused, setIsFocused] = react.useState(false);
753
+ const [isPasswordVisible, setIsPasswordVisible] = react.useState(false);
673
754
  return {
674
755
  isFocused,
675
756
  handleInputFocus: () => setIsFocused(true),
@@ -691,7 +772,10 @@ const styledTextInputMixin = /*#__PURE__*/styled.css(["background-color:", ";bor
691
772
  state
692
773
  }) => theme.kitt.forms.input.states[state].borderColor, ({
693
774
  theme
694
- }) => theme.kitt.typography.types.bodies.configs.body.baseAndSmall.fontSize, ({
775
+ }) => {
776
+ const typeConfigKey = getTypographyTypeConfigKey(theme);
777
+ return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize;
778
+ }, ({
695
779
  theme,
696
780
  state
697
781
  }) => theme.kitt.typography.colors[theme.kitt.forms.input.states[state].color], ({
@@ -703,13 +787,17 @@ const Input = /*#__PURE__*/styled__default(reactNative.TextInput).withConfig({
703
787
  })(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, ({
704
788
  theme,
705
789
  multiline
706
- }) => !multiline && reactNative.Platform.OS === 'ios' ? theme.kitt.forms.input.paddingSingleLineIOS : theme.kitt.forms.input.padding, ({
790
+ }) => !multiline && "web" === 'ios' ? theme.kitt.forms.input.paddingSingleLineIOS : theme.kitt.forms.input.padding, ({
707
791
  theme,
708
792
  multiline
709
- }) => !multiline && reactNative.Platform.OS === 'ios' ? 0 : theme.kitt.typography.types.bodies.configs.body.baseAndSmall.lineHeight, ({
793
+ }) => {
794
+ if (!multiline && "web" === 'ios') return 0;
795
+ const typeConfigKey = getTypographyTypeConfigKey(theme);
796
+ return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight;
797
+ }, ({
710
798
  minHeight
711
799
  }) => minHeight);
712
- const Container$4 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
800
+ const Container$5 = /*#__PURE__*/styled__default.View.withConfig({
713
801
  displayName: "InputText__Container",
714
802
  componentId: "kitt-universal__sc-uke279-1"
715
803
  })(["margin-top:", ";margin-bottom:", ";"], ({
@@ -717,7 +805,7 @@ const Container$4 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
717
805
  }) => theme.kitt.forms.input.marginTop, ({
718
806
  theme
719
807
  }) => theme.kitt.forms.input.marginBottom);
720
- const PasswordButtonContainer = /*#__PURE__*/styled__default(PrimitivePressable).withConfig({
808
+ const PasswordButtonContainer = /*#__PURE__*/styled__default.Pressable.withConfig({
721
809
  displayName: "InputText__PasswordButtonContainer",
722
810
  componentId: "kitt-universal__sc-uke279-2"
723
811
  })(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:", "px;"], ({
@@ -759,7 +847,7 @@ const textContentTypeByType = {
759
847
  password: 'password',
760
848
  username: 'username'
761
849
  };
762
- const InputText = /*#__PURE__*/React.forwardRef(({
850
+ const InputText = /*#__PURE__*/react.forwardRef(({
763
851
  id,
764
852
  minHeight = 0,
765
853
  type,
@@ -783,50 +871,55 @@ const InputText = /*#__PURE__*/React.forwardRef(({
783
871
  isDisabled: disabled,
784
872
  formState
785
873
  });
786
- return /*#__PURE__*/React__default.createElement(Container$4, null, /*#__PURE__*/React__default.createElement(Input, _extends__default({
787
- ref: ref,
788
- nativeID: id,
789
- editable: !disabled,
790
- keyboardType: keyboardTypeByTextInputType[type],
791
- autoCompleteType: autoCompleteTypeByType[type],
792
- autoCorrect: autoCorrectByType[type],
793
- minHeight: minHeight,
794
- textContentType: textContentTypeByType[type],
795
- placeholderTextColor: theme.kitt.typography.colors[theme.kitt.forms.input.placeholderColor],
796
- selectionColor: theme.kitt.forms.input.selectionColor,
797
- secureTextEntry: type === 'password' && !isPasswordVisible
798
- }, props, {
799
- state: state,
800
- onFocus: e => {
801
- handleInputFocus();
802
- if (onFocus) onFocus(e);
803
- },
804
- onBlur: e => {
805
- handleInputBlur();
806
- if (onBlur) onBlur(e);
807
- }
808
- })), type === 'password' && !disabled && /*#__PURE__*/React__default.createElement(PasswordButtonContainer, {
809
- accessibilityRole: "button",
810
- onPress: togglePasswordVisibility
811
- }, /*#__PURE__*/React__default.createElement(TypographyIcon, {
812
- icon: isPasswordVisible ? /*#__PURE__*/React__default.createElement(kittIcons.EyeIcon, null) : /*#__PURE__*/React__default.createElement(kittIcons.EyeOffIcon, null),
813
- size: theme.kitt.forms.input.passwordButtonIconSize,
814
- color: theme.kitt.forms.input.states[state].passwordButtonIconColor
815
- })));
874
+ return /*#__PURE__*/jsxRuntime.jsxs(Container$5, {
875
+ children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
876
+ ref: ref,
877
+ nativeID: id,
878
+ editable: !disabled,
879
+ keyboardType: keyboardTypeByTextInputType[type],
880
+ autoCompleteType: autoCompleteTypeByType[type],
881
+ autoCorrect: autoCorrectByType[type],
882
+ minHeight: minHeight,
883
+ textContentType: textContentTypeByType[type],
884
+ placeholderTextColor: theme.kitt.typography.colors[theme.kitt.forms.input.placeholderColor],
885
+ selectionColor: theme.kitt.forms.input.selectionColor,
886
+ secureTextEntry: type === 'password' && !isPasswordVisible,
887
+ ...props,
888
+ state: state,
889
+ onFocus: e => {
890
+ handleInputFocus();
891
+ if (onFocus) onFocus(e);
892
+ },
893
+ onBlur: e => {
894
+ handleInputBlur();
895
+ if (onBlur) onBlur(e);
896
+ }
897
+ }), type === 'password' && !disabled && /*#__PURE__*/jsxRuntime.jsx(PasswordButtonContainer, {
898
+ accessibilityRole: "button",
899
+ onPress: togglePasswordVisibility,
900
+ children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
901
+ icon: isPasswordVisible ? /*#__PURE__*/jsxRuntime.jsx(kittIcons.EyeIcon, {}) : /*#__PURE__*/jsxRuntime.jsx(kittIcons.EyeOffIcon, {}),
902
+ size: theme.kitt.forms.input.passwordButtonIconSize,
903
+ color: theme.kitt.forms.input.states[state].passwordButtonIconColor
904
+ })
905
+ })]
906
+ });
816
907
  });
817
908
 
818
909
  function Label({
819
910
  htmlFor,
820
911
  children
821
912
  }) {
822
- return /*#__PURE__*/React__default.createElement(Typography.Text, {
823
- base: "body"
824
- }, reactNative.Platform.OS === 'web' ? /*#__PURE__*/React__default.createElement("label", {
825
- htmlFor: htmlFor
826
- }, children) : children);
913
+ return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
914
+ base: "body",
915
+ children: /*#__PURE__*/jsxRuntime.jsx("label", {
916
+ htmlFor: htmlFor,
917
+ children: children
918
+ })
919
+ });
827
920
  }
828
921
 
829
- const OuterRadio = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
922
+ const OuterRadio = /*#__PURE__*/styled__default.View.withConfig({
830
923
  displayName: "Radio__OuterRadio",
831
924
  componentId: "kitt-universal__sc-1mdgr2o-0"
832
925
  })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", ";border-color:", ";"], ({
@@ -844,7 +937,7 @@ const OuterRadio = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
844
937
  theme,
845
938
  disabled
846
939
  }) => theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor);
847
- const SelectedOuterRadio = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
940
+ const SelectedOuterRadio = /*#__PURE__*/styled__default.View.withConfig({
848
941
  displayName: "Radio__SelectedOuterRadio",
849
942
  componentId: "kitt-universal__sc-1mdgr2o-1"
850
943
  })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], ({
@@ -856,7 +949,7 @@ const SelectedOuterRadio = /*#__PURE__*/styled__default(PrimitiveView).withConfi
856
949
  }) => theme.kitt.forms.radio.size, ({
857
950
  theme
858
951
  }) => theme.kitt.forms.radio.size / 2);
859
- const SelectedInnerRadio = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
952
+ const SelectedInnerRadio = /*#__PURE__*/styled__default.View.withConfig({
860
953
  displayName: "Radio__SelectedInnerRadio",
861
954
  componentId: "kitt-universal__sc-1mdgr2o-2"
862
955
  })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], ({
@@ -868,7 +961,7 @@ const SelectedInnerRadio = /*#__PURE__*/styled__default(PrimitiveView).withConfi
868
961
  }) => theme.kitt.forms.radio.checked.innerSize, ({
869
962
  theme
870
963
  }) => theme.kitt.forms.radio.checked.innerSize / 2);
871
- const Container$3 = /*#__PURE__*/styled__default(PrimitivePressable).withConfig({
964
+ const Container$4 = /*#__PURE__*/styled__default.Pressable.withConfig({
872
965
  displayName: "Radio__Container",
873
966
  componentId: "kitt-universal__sc-1mdgr2o-3"
874
967
  })(["flex-direction:row;align-items:center;"]);
@@ -886,7 +979,7 @@ function Radio({
886
979
  disabled = false,
887
980
  children
888
981
  }) {
889
- return /*#__PURE__*/React__default.createElement(Container$3, {
982
+ return /*#__PURE__*/jsxRuntime.jsxs(Container$4, {
890
983
  nativeID: id,
891
984
  disabled: disabled,
892
985
  accessibilityRole: "radio",
@@ -894,27 +987,31 @@ function Radio({
894
987
  focusable: checked && !disabled,
895
988
  onPress: () => {
896
989
  onChange(value);
897
- }
898
- }, checked && !disabled ? /*#__PURE__*/React__default.createElement(SelectedOuterRadio, null, /*#__PURE__*/React__default.createElement(SelectedInnerRadio, null)) : /*#__PURE__*/React__default.createElement(OuterRadio, {
899
- disabled: disabled
900
- }), /*#__PURE__*/React__default.createElement(Text, {
901
- base: "body",
902
- color: disabled ? 'black-light' : 'black'
903
- }, children));
990
+ },
991
+ children: [checked && !disabled ? /*#__PURE__*/jsxRuntime.jsx(SelectedOuterRadio, {
992
+ children: /*#__PURE__*/jsxRuntime.jsx(SelectedInnerRadio, {})
993
+ }) : /*#__PURE__*/jsxRuntime.jsx(OuterRadio, {
994
+ disabled: disabled
995
+ }), /*#__PURE__*/jsxRuntime.jsx(Text, {
996
+ base: "body",
997
+ color: disabled ? 'black-light' : 'black',
998
+ children: children
999
+ })]
1000
+ });
904
1001
  }
905
1002
 
906
1003
  function TextArea({ ...props
907
1004
  }) {
908
1005
  const theme = /*#__PURE__*/styled.useTheme();
909
- return /*#__PURE__*/React__default.createElement(InputText, _extends__default({
910
- multiline: true
911
- }, props, {
1006
+ return /*#__PURE__*/jsxRuntime.jsx(InputText, {
1007
+ multiline: true,
1008
+ ...props,
912
1009
  type: "text",
913
1010
  minHeight: theme.kitt.forms.input.textAreaMinHeight
914
- }));
1011
+ });
915
1012
  }
916
1013
 
917
- const Body = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1014
+ const Body = /*#__PURE__*/styled__default.View.withConfig({
918
1015
  displayName: "Body",
919
1016
  componentId: "kitt-universal__sc-1ofncfn-0"
920
1017
  })(["", " background-color:", ";flex:1;"], ({
@@ -929,10 +1026,12 @@ const Body = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
929
1026
  function FullScreenModalBody({
930
1027
  children
931
1028
  }) {
932
- return /*#__PURE__*/React__default.createElement(Body, null, children);
1029
+ return /*#__PURE__*/jsxRuntime.jsx(Body, {
1030
+ children: children
1031
+ });
933
1032
  }
934
1033
 
935
- const SideContainer = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1034
+ const SideContainer = /*#__PURE__*/styled__default.View.withConfig({
936
1035
  displayName: "Header__SideContainer",
937
1036
  componentId: "kitt-universal__sc-dfmxi1-0"
938
1037
  })(["", ""], ({
@@ -952,7 +1051,7 @@ function getHeaderHorizontalMediumPadding(spacing) {
952
1051
  return spacing * 6;
953
1052
  }
954
1053
 
955
- const Header = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1054
+ const Header = /*#__PURE__*/styled__default.View.withConfig({
956
1055
  displayName: "Header",
957
1056
  componentId: "kitt-universal__sc-dfmxi1-1"
958
1057
  })(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], ({
@@ -970,7 +1069,7 @@ const Header = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
970
1069
  }, ({
971
1070
  theme
972
1071
  }) => theme.kitt.fullScreenModal.header.borderColor);
973
- const HeaderContent = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1072
+ const HeaderContent = /*#__PURE__*/styled__default.View.withConfig({
974
1073
  displayName: "Header__HeaderContent",
975
1074
  componentId: "kitt-universal__sc-dfmxi1-2"
976
1075
  })(["", ";", ";justify-content:center;align-items:center;"], ({
@@ -1014,8 +1113,8 @@ function FullScreenModalHeader({
1014
1113
  top
1015
1114
  } = reactNativeSafeAreaContext.useSafeAreaInsets();
1016
1115
  const dimensions = reactNative.useWindowDimensions();
1017
- const [leftWidth, setLeftWidth] = React.useState(0);
1018
- const [rightWidth, setRightWidth] = React.useState(0);
1116
+ const [leftWidth, setLeftWidth] = react.useState(0);
1117
+ const [rightWidth, setRightWidth] = react.useState(0);
1019
1118
 
1020
1119
  const handleLayoutChange = (event, side) => {
1021
1120
  // Prevents react to nullify event on rerenders
@@ -1029,21 +1128,25 @@ function FullScreenModalHeader({
1029
1128
  setRightWidth(event.nativeEvent.layout.width);
1030
1129
  };
1031
1130
 
1032
- return /*#__PURE__*/React__default.createElement(Header, {
1033
- insetTop: reactNative.Platform.OS === 'ios' ? undefined : top
1034
- }, left ? /*#__PURE__*/React__default.createElement(SideContainer, {
1035
- onLayout: e => handleLayoutChange(e, 'left')
1036
- }, left) : null, /*#__PURE__*/React__default.createElement(HeaderContent, {
1037
- windowWidth: dimensions.width,
1038
- leftWidth: leftWidth,
1039
- rightWidth: rightWidth
1040
- }, children), right ? /*#__PURE__*/React__default.createElement(SideContainer, {
1041
- side: "right",
1042
- onLayout: e => handleLayoutChange(e, 'right')
1043
- }, right) : null);
1044
- }
1045
-
1046
- const Container$2 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1131
+ return /*#__PURE__*/jsxRuntime.jsxs(Header, {
1132
+ insetTop: top,
1133
+ children: [left ? /*#__PURE__*/jsxRuntime.jsx(SideContainer, {
1134
+ onLayout: e => handleLayoutChange(e, 'left'),
1135
+ children: left
1136
+ }) : null, /*#__PURE__*/jsxRuntime.jsx(HeaderContent, {
1137
+ windowWidth: dimensions.width,
1138
+ leftWidth: leftWidth,
1139
+ rightWidth: rightWidth,
1140
+ children: children
1141
+ }), right ? /*#__PURE__*/jsxRuntime.jsx(SideContainer, {
1142
+ side: "right",
1143
+ onLayout: e => handleLayoutChange(e, 'right'),
1144
+ children: right
1145
+ }) : null]
1146
+ });
1147
+ }
1148
+
1149
+ const Container$3 = /*#__PURE__*/styled__default.View.withConfig({
1047
1150
  displayName: "FullScreenModal__Container",
1048
1151
  componentId: "kitt-universal__sc-11qpbe3-0"
1049
1152
  })(["flex:1;background-color:", ";"], ({
@@ -1052,13 +1155,71 @@ const Container$2 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1052
1155
  function FullScreenModal({
1053
1156
  children
1054
1157
  }) {
1055
- return /*#__PURE__*/React__default.createElement(Container$2, null, children);
1158
+ return /*#__PURE__*/jsxRuntime.jsx(Container$3, {
1159
+ children: children
1160
+ });
1056
1161
  }
1057
1162
  FullScreenModal.Header = FullScreenModalHeader;
1058
1163
  FullScreenModal.Body = FullScreenModalBody;
1059
1164
 
1060
- const PressableIconButton = /*#__PURE__*/styled__default(PrimitivePressable).withConfig({
1061
- displayName: "PressableIconButton",
1165
+ function StyleWebWrapper({
1166
+ as,
1167
+ children,
1168
+ ...props
1169
+ }) {
1170
+ // as or default to div. If as is undefined, T is div but typescript is not sure
1171
+ return /*#__PURE__*/jsxRuntime.jsx(as || 'div', { ...props,
1172
+ children: children
1173
+ });
1174
+ }
1175
+
1176
+ // type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
1177
+ // type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
1178
+ // export function withTheme<Props extends { theme: DefaultTheme }, C>(
1179
+ // WrappedComponent: ComponentType<Props> & C,
1180
+ // ): ComponentType<SetOptional<Props, 'theme'>> & hoistNonReactStatics.NonReactStatics<typeof WrappedComponent> {
1181
+ // return function ThemedComponent(props) {
1182
+ // const theme = useTheme();
1183
+ // return (<WrappedComponent theme={theme} {...(props as any)} />) as any;
1184
+ // };
1185
+ // }
1186
+ function withTheme( // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
1187
+ WrappedComponent) {
1188
+ return function (props) {
1189
+ const theme = /*#__PURE__*/styled.useTheme();
1190
+ return /*#__PURE__*/jsxRuntime.jsx(WrappedComponent, {
1191
+ theme: theme,
1192
+ ...props
1193
+ });
1194
+ };
1195
+ }
1196
+
1197
+ const PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/react$1.styled("div")({
1198
+ name: "PressableIconButtonWebWrapper",
1199
+ class: "p1nlccvg",
1200
+ vars: {
1201
+ "p1nlccvg-0": [({
1202
+ theme
1203
+ }) => theme.kitt.iconButton.scale.base.hover],
1204
+ "p1nlccvg-1": [({
1205
+ theme
1206
+ }) => theme.breakpoints.min.mediumBreakpoint],
1207
+ "p1nlccvg-2": [({
1208
+ theme
1209
+ }) => theme.kitt.iconButton.scale.medium.hover],
1210
+ "p1nlccvg-3": [({
1211
+ theme
1212
+ }) => theme.kitt.iconButton.scale.base.active],
1213
+ "p1nlccvg-4": [({
1214
+ theme
1215
+ }) => theme.kitt.iconButton.default.pressedBackgroundColor],
1216
+ "p1nlccvg-5": [({
1217
+ theme
1218
+ }) => theme.kitt.iconButton.white.pressedBackgroundColor]
1219
+ }
1220
+ }));
1221
+ const StyledPressableIconButton = /*#__PURE__*/styled__default.Pressable.withConfig({
1222
+ displayName: "PressableIconButton__StyledPressableIconButton",
1062
1223
  componentId: "kitt-universal__sc-1m6jo3s-0"
1063
1224
  })(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], ({
1064
1225
  theme
@@ -1068,20 +1229,13 @@ const PressableIconButton = /*#__PURE__*/styled__default(PrimitivePressable).wit
1068
1229
  theme
1069
1230
  }) => theme.kitt.iconButton.height, ({
1070
1231
  theme,
1071
- color,
1072
1232
  disabled
1073
1233
  }) => {
1074
1234
  const {
1075
1235
  iconButton
1076
1236
  } = theme.kitt;
1077
-
1078
- if (reactNative.Platform.OS !== 'web') {
1079
- return undefined;
1080
- }
1081
-
1082
1237
  const {
1083
- transition,
1084
- scale
1238
+ transition
1085
1239
  } = iconButton;
1086
1240
 
1087
1241
  if (disabled) {
@@ -1092,33 +1246,19 @@ const PressableIconButton = /*#__PURE__*/styled__default(PrimitivePressable).wit
1092
1246
 
1093
1247
  return `
1094
1248
  transition: ${transition.property} ${transition.duration} ${transition.timingFunction};
1095
-
1096
- &:hover,
1097
- .kitt-hover & {
1098
- @media (hover: none) and (pointer: coarse) {
1099
- transform: scale(${scale.base.hover});
1100
- }
1101
-
1102
- @media(${theme.breakpoints.min.mediumBreakpoint}) {
1103
- transform: scale(${scale.medium.hover});
1104
- }
1105
- }
1106
-
1107
- &:active,
1108
- .kitt-active & {
1109
- transform: scale(${scale.base.active});
1110
- }
1111
-
1112
- &:hover,
1113
- .kitt-hover &,
1114
- &:focus,
1115
- .kitt-focus &,
1116
- &:active,
1117
- .kitt-active & {
1118
- background-color: ${color === 'white' ? iconButton.white.pressedBackgroundColor : iconButton.default.pressedBackgroundColor};
1119
- }
1120
1249
  `;
1121
1250
  });
1251
+ function PressableIconButton({
1252
+ color,
1253
+ ...props
1254
+ }) {
1255
+ return /*#__PURE__*/jsxRuntime.jsx(StyleWebWrapper, {
1256
+ as: PressableIconButtonWebWrapper,
1257
+ "data-color-white": color === 'white' ? true : undefined,
1258
+ children: /*#__PURE__*/jsxRuntime.jsx(StyledPressableIconButton, { ...props
1259
+ })
1260
+ });
1261
+ }
1122
1262
 
1123
1263
  const AnimatedIconButtonBackground = /*#__PURE__*/styled__default(Animated__default.View).withConfig({
1124
1264
  displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground",
@@ -1166,7 +1306,7 @@ function PressableAnimatedContainer({
1166
1306
  };
1167
1307
  _f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
1168
1308
  _f.__workletHash = 10645190329247;
1169
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (55:41)";
1309
+ _f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (54:41)";
1170
1310
  _f.__optimalization = 2;
1171
1311
 
1172
1312
  global.__reanimatedWorkletInit(_f);
@@ -1200,14 +1340,14 @@ function PressableAnimatedContainer({
1200
1340
  };
1201
1341
  _f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{transform:[{scale:withSpring(pressed.value?theme.kitt.iconButton.scale.base.active:theme.kitt.iconButton.scale.base.default)}]};}}";
1202
1342
  _f.__workletHash = 13861998831411;
1203
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (61:39)";
1343
+ _f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (60:39)";
1204
1344
  _f.__optimalization = 2;
1205
1345
 
1206
1346
  global.__reanimatedWorkletInit(_f);
1207
1347
 
1208
1348
  return _f;
1209
1349
  }());
1210
- return /*#__PURE__*/React__default.createElement(PressableIconButton, {
1350
+ return /*#__PURE__*/jsxRuntime.jsx(PressableIconButton, {
1211
1351
  accessibilityRole: "button",
1212
1352
  disabled: disabled,
1213
1353
  color: color,
@@ -1217,23 +1357,25 @@ function PressableAnimatedContainer({
1217
1357
  },
1218
1358
  onPressOut: () => {
1219
1359
  pressed.value = false;
1220
- }
1221
- }, /*#__PURE__*/React__default.createElement(AnimatedViewContainer, {
1222
- style: disabled ? [{
1223
- transform: [{
1224
- scale: 1
1225
- }]
1226
- }] : [scaleStyles]
1227
- }, /*#__PURE__*/React__default.createElement(AnimatedIconButtonBackground, {
1228
- disabled: disabled,
1229
- color: color,
1230
- style: disabled ? [{
1231
- opacity: 1
1232
- }] : [opacityStyles]
1233
- }), children));
1360
+ },
1361
+ children: /*#__PURE__*/jsxRuntime.jsxs(AnimatedViewContainer, {
1362
+ style: disabled ? [{
1363
+ transform: [{
1364
+ scale: 1
1365
+ }]
1366
+ }] : [scaleStyles],
1367
+ children: [/*#__PURE__*/jsxRuntime.jsx(AnimatedIconButtonBackground, {
1368
+ disabled: disabled,
1369
+ color: color,
1370
+ style: disabled ? [{
1371
+ opacity: 1
1372
+ }] : [opacityStyles]
1373
+ }), children]
1374
+ })
1375
+ });
1234
1376
  }
1235
1377
 
1236
- const IconButtonContentBorder = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1378
+ const IconButtonContentBorder = /*#__PURE__*/styled__default.View.withConfig({
1237
1379
  displayName: "IconButton__IconButtonContentBorder",
1238
1380
  componentId: "kitt-universal__sc-swelbf-0"
1239
1381
  })(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], ({
@@ -1254,12 +1396,13 @@ function IconButtonContent({
1254
1396
  color,
1255
1397
  icon
1256
1398
  }) {
1257
- return /*#__PURE__*/React__default.createElement(IconButtonContentBorder, {
1258
- disabled: disabled
1259
- }, /*#__PURE__*/React__default.createElement(TypographyIcon, {
1260
- color: disabled ? 'black-light' : color,
1261
- icon: icon
1262
- }));
1399
+ return /*#__PURE__*/jsxRuntime.jsx(IconButtonContentBorder, {
1400
+ disabled: disabled,
1401
+ children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
1402
+ color: disabled ? 'black-light' : color,
1403
+ icon: icon
1404
+ })
1405
+ });
1263
1406
  }
1264
1407
 
1265
1408
  function IconButton({
@@ -1268,18 +1411,19 @@ function IconButton({
1268
1411
  disabled,
1269
1412
  onPress
1270
1413
  }) {
1271
- return /*#__PURE__*/React__default.createElement(PressableAnimatedContainer, {
1414
+ return /*#__PURE__*/jsxRuntime.jsx(PressableAnimatedContainer, {
1272
1415
  color: color,
1273
1416
  disabled: disabled,
1274
- onPress: onPress
1275
- }, /*#__PURE__*/React__default.createElement(IconButtonContent, {
1276
- disabled: disabled,
1277
- color: color,
1278
- icon: icon
1279
- }));
1417
+ onPress: onPress,
1418
+ children: /*#__PURE__*/jsxRuntime.jsx(IconButtonContent, {
1419
+ disabled: disabled,
1420
+ color: color,
1421
+ icon: icon
1422
+ })
1423
+ });
1280
1424
  }
1281
1425
 
1282
- const ContentView$1 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1426
+ const ContentView$1 = /*#__PURE__*/styled__default.View.withConfig({
1283
1427
  displayName: "ListItemContent__ContentView",
1284
1428
  componentId: "kitt-universal__sc-57q0u9-0"
1285
1429
  })(["flex:1 0 0%;align-self:center;"]);
@@ -1287,10 +1431,12 @@ function ListItemContent({
1287
1431
  children,
1288
1432
  ...rest
1289
1433
  }) {
1290
- return /*#__PURE__*/React__default.createElement(ContentView$1, rest, children);
1434
+ return /*#__PURE__*/jsxRuntime.jsx(ContentView$1, { ...rest,
1435
+ children: children
1436
+ });
1291
1437
  }
1292
1438
 
1293
- const SideContainerView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1439
+ const SideContainerView = /*#__PURE__*/styled__default.View.withConfig({
1294
1440
  displayName: "ListItemSideContent__SideContainerView",
1295
1441
  componentId: "kitt-universal__sc-1vajiw-0"
1296
1442
  })(["flex-direction:row;margin-left:", ";margin-right:", ";"], ({
@@ -1306,11 +1452,13 @@ function ListItemSideContainer({
1306
1452
  side = 'left',
1307
1453
  ...rest
1308
1454
  }) {
1309
- return /*#__PURE__*/React__default.createElement(SideContainerView, _extends__default({
1310
- side: side
1311
- }, rest), children);
1455
+ return /*#__PURE__*/jsxRuntime.jsx(SideContainerView, {
1456
+ side: side,
1457
+ ...rest,
1458
+ children: children
1459
+ });
1312
1460
  }
1313
- const SideContentView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1461
+ const SideContentView = /*#__PURE__*/styled__default.View.withConfig({
1314
1462
  displayName: "ListItemSideContent__SideContentView",
1315
1463
  componentId: "kitt-universal__sc-1vajiw-1"
1316
1464
  })(["align-self:", ";"], ({
@@ -1321,12 +1469,14 @@ function ListItemSideContent({
1321
1469
  align = 'auto',
1322
1470
  ...rest
1323
1471
  }) {
1324
- return /*#__PURE__*/React__default.createElement(SideContentView, _extends__default({
1325
- align: align
1326
- }, rest), children);
1472
+ return /*#__PURE__*/jsxRuntime.jsx(SideContentView, {
1473
+ align: align,
1474
+ ...rest,
1475
+ children: children
1476
+ });
1327
1477
  }
1328
1478
 
1329
- const ContainerView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1479
+ const ContainerView = /*#__PURE__*/styled__default.View.withConfig({
1330
1480
  displayName: "ListItem__ContainerView",
1331
1481
  componentId: "kitt-universal__sc-2afp9s-0"
1332
1482
  })(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], ({
@@ -1367,28 +1517,35 @@ function ListItem({
1367
1517
  onPress,
1368
1518
  ...rest
1369
1519
  }) {
1370
- const Wrapper = onPress ? PrimitivePressable : React.Fragment;
1520
+ const Wrapper = onPress ? reactNative.Pressable : react.Fragment;
1371
1521
  const wrapperProps = onPress ? {
1372
1522
  accessibilityRole: 'button',
1373
1523
  onPress,
1374
1524
  ...rest
1375
1525
  } : undefined;
1376
1526
  const containerProps = onPress ? undefined : rest;
1377
- return /*#__PURE__*/React__default.createElement(Wrapper, wrapperProps, /*#__PURE__*/React__default.createElement(ContainerView, _extends__default({
1378
- withPadding: withPadding,
1379
- borders: borders
1380
- }, containerProps), left ? /*#__PURE__*/React__default.createElement(ListItemSideContainer, {
1381
- side: "left"
1382
- }, left) : null, /*#__PURE__*/React__default.createElement(ListItemContent, null, children), right ? /*#__PURE__*/React__default.createElement(ListItemSideContainer, {
1383
- side: "right"
1384
- }, right) : null));
1527
+ return /*#__PURE__*/jsxRuntime.jsx(Wrapper, { ...wrapperProps,
1528
+ children: /*#__PURE__*/jsxRuntime.jsxs(ContainerView, {
1529
+ withPadding: withPadding,
1530
+ borders: borders,
1531
+ ...containerProps,
1532
+ children: [left ? /*#__PURE__*/jsxRuntime.jsx(ListItemSideContainer, {
1533
+ side: "left",
1534
+ children: left
1535
+ }) : null, /*#__PURE__*/jsxRuntime.jsx(ListItemContent, {
1536
+ children: children
1537
+ }), right ? /*#__PURE__*/jsxRuntime.jsx(ListItemSideContainer, {
1538
+ side: "right",
1539
+ children: right
1540
+ }) : null]
1541
+ })
1542
+ });
1385
1543
  }
1386
1544
  ListItem.Content = ListItemContent;
1387
1545
  ListItem.SideContent = ListItemSideContent;
1388
1546
  ListItem.SideContainer = ListItemSideContainer;
1389
1547
 
1390
1548
  function getActivityIndicatorSize(size) {
1391
- if (reactNative.Platform.OS === 'android') return size;
1392
1549
  return size < 36 ? 'small' : 'large';
1393
1550
  }
1394
1551
 
@@ -1398,7 +1555,7 @@ function Loader({
1398
1555
  }) {
1399
1556
  const theme = /*#__PURE__*/styled.useTheme();
1400
1557
  const colorHex = theme.kitt.typography.colors[color];
1401
- return /*#__PURE__*/React__default.createElement(reactNative.ActivityIndicator, {
1558
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.ActivityIndicator, {
1402
1559
  testID: "ActivityIndicator",
1403
1560
  color: colorHex,
1404
1561
  size: getActivityIndicatorSize(size)
@@ -1408,7 +1565,7 @@ function Loader({
1408
1565
  function LargeLoader({
1409
1566
  color = 'primary'
1410
1567
  }) {
1411
- return /*#__PURE__*/React__default.createElement(Loader, {
1568
+ return /*#__PURE__*/jsxRuntime.jsx(Loader, {
1412
1569
  color: color,
1413
1570
  size: 60
1414
1571
  });
@@ -1416,7 +1573,7 @@ function LargeLoader({
1416
1573
 
1417
1574
  const xIconSize = 14;
1418
1575
  const mainIconSize = 20;
1419
- const Container$1 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1576
+ const Container$2 = /*#__PURE__*/styled__default.View.withConfig({
1420
1577
  displayName: "Message__Container",
1421
1578
  componentId: "kitt-universal__sc-c6400e-0"
1422
1579
  })(["border-radius:", "px;background-color:", ";padding-bottom:", "px;padding-left:", "px;padding-right:", "px;padding-top:", "px;flex-direction:row;align-items:flex-start;justify-content:space-between;"], ({
@@ -1443,13 +1600,13 @@ const CloseContainer = /*#__PURE__*/styled__default(reactNative.TouchableOpacity
1443
1600
  }) => theme.kitt.spacing * 4, ({
1444
1601
  theme
1445
1602
  }) => theme.kitt.spacing);
1446
- const IconContainer = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1603
+ const IconContainer = /*#__PURE__*/styled__default.View.withConfig({
1447
1604
  displayName: "Message__IconContainer",
1448
1605
  componentId: "kitt-universal__sc-c6400e-2"
1449
1606
  })(["margin-right:", "px;"], ({
1450
1607
  theme
1451
1608
  }) => theme.kitt.spacing * 4);
1452
- const Content = /*#__PURE__*/styled__default(PrimitiveText).withConfig({
1609
+ const Content = /*#__PURE__*/styled__default.Text.withConfig({
1453
1610
  displayName: "Message__Content",
1454
1611
  componentId: "kitt-universal__sc-c6400e-3"
1455
1612
  })(["text-align:", ";flex:1;"], ({
@@ -1473,16 +1630,16 @@ const getColorByType = type => {
1473
1630
  function getIconContent(type) {
1474
1631
  switch (type) {
1475
1632
  case 'warning':
1476
- return /*#__PURE__*/React__default.createElement(kittIcons.AlertCircleIcon, null);
1633
+ return /*#__PURE__*/jsxRuntime.jsx(kittIcons.AlertCircleIcon, {});
1477
1634
 
1478
1635
  case 'success':
1479
- return /*#__PURE__*/React__default.createElement(kittIcons.CheckIcon, null);
1636
+ return /*#__PURE__*/jsxRuntime.jsx(kittIcons.CheckIcon, {});
1480
1637
 
1481
1638
  case 'danger':
1482
- return /*#__PURE__*/React__default.createElement(kittIcons.AlertTriangleIcon, null);
1639
+ return /*#__PURE__*/jsxRuntime.jsx(kittIcons.AlertTriangleIcon, {});
1483
1640
 
1484
1641
  default:
1485
- return /*#__PURE__*/React__default.createElement(kittIcons.InfoIcon, null);
1642
+ return /*#__PURE__*/jsxRuntime.jsx(kittIcons.InfoIcon, {});
1486
1643
  }
1487
1644
  }
1488
1645
 
@@ -1495,30 +1652,37 @@ function Message({
1495
1652
  insets
1496
1653
  }) {
1497
1654
  const color = getColorByType(type);
1498
- return /*#__PURE__*/React__default.createElement(Container$1, {
1655
+ return /*#__PURE__*/jsxRuntime.jsxs(Container$2, {
1499
1656
  type: type,
1500
1657
  noRadius: noRadius,
1501
- insets: insets
1502
- }, !centeredText ? /*#__PURE__*/React__default.createElement(IconContainer, null, /*#__PURE__*/React__default.createElement(Icon, {
1503
- size: mainIconSize,
1504
- color: color,
1505
- icon: getIconContent(type)
1506
- })) : null, /*#__PURE__*/React__default.createElement(Content, {
1507
- type: type,
1508
- centeredText: centeredText
1509
- }, /*#__PURE__*/React__default.createElement(Typography.Text, {
1510
- base: "body-small",
1511
- color: color
1512
- }, children)), onDismiss ? /*#__PURE__*/React__default.createElement(CloseContainer, {
1513
- onPress: onDismiss
1514
- }, /*#__PURE__*/React__default.createElement(Icon, {
1515
- icon: /*#__PURE__*/React__default.createElement(kittIcons.XIcon, null),
1516
- size: xIconSize,
1517
- color: color
1518
- })) : null);
1658
+ insets: insets,
1659
+ children: [!centeredText ? /*#__PURE__*/jsxRuntime.jsx(IconContainer, {
1660
+ children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
1661
+ size: mainIconSize,
1662
+ color: color,
1663
+ icon: getIconContent(type)
1664
+ })
1665
+ }) : null, /*#__PURE__*/jsxRuntime.jsx(Content, {
1666
+ type: type,
1667
+ centeredText: centeredText,
1668
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
1669
+ base: "body-small",
1670
+ color: color,
1671
+ children: children
1672
+ })
1673
+ }), onDismiss ? /*#__PURE__*/jsxRuntime.jsx(CloseContainer, {
1674
+ onPress: onDismiss,
1675
+ children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
1676
+ icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.XIcon, {}),
1677
+ size: xIconSize,
1678
+ color: color
1679
+ })
1680
+ }) : null]
1681
+ });
1519
1682
  }
1520
1683
 
1521
- const OverlayPressable = /*#__PURE__*/styled__default(PrimitivePressable).withConfig({
1684
+ // Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
1685
+ const OverlayPressable = /*#__PURE__*/styled__default(reactNative.Pressable).withConfig({
1522
1686
  displayName: "Overlay__OverlayPressable",
1523
1687
  componentId: "kitt-universal__sc-1cz1gbr-0"
1524
1688
  })(({
@@ -1529,15 +1693,14 @@ const OverlayPressable = /*#__PURE__*/styled__default(PrimitivePressable).withCo
1529
1693
  function Overlay({
1530
1694
  onPress
1531
1695
  }) {
1532
- return /*#__PURE__*/React__default.createElement(OverlayPressable, {
1696
+ return /*#__PURE__*/jsxRuntime.jsx(OverlayPressable, {
1533
1697
  accessibilityRole: "none",
1534
- onPress: onPress
1535
- }, /*#__PURE__*/React__default.createElement(PrimitiveView, null));
1698
+ onPress: onPress,
1699
+ children: /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {})
1700
+ });
1536
1701
  }
1537
1702
 
1538
- const PrimitiveScrollView = reactNative.ScrollView;
1539
-
1540
- const BodyView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1703
+ const BodyView = /*#__PURE__*/styled__default.View.withConfig({
1541
1704
  displayName: "Body__BodyView",
1542
1705
  componentId: "kitt-universal__sc-17fwpo4-0"
1543
1706
  })(["padding:", "px ", "px;"], ({
@@ -1548,10 +1711,14 @@ const BodyView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1548
1711
  function ModalBody({
1549
1712
  children
1550
1713
  }) {
1551
- return /*#__PURE__*/React__default.createElement(PrimitiveScrollView, null, /*#__PURE__*/React__default.createElement(BodyView, null, children));
1714
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
1715
+ children: /*#__PURE__*/jsxRuntime.jsx(BodyView, {
1716
+ children: children
1717
+ })
1718
+ });
1552
1719
  }
1553
1720
 
1554
- const FooterView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1721
+ const FooterView = /*#__PURE__*/styled__default.View.withConfig({
1555
1722
  displayName: "Footer__FooterView",
1556
1723
  componentId: "kitt-universal__sc-1ujq2dc-0"
1557
1724
  })(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], ({
@@ -1562,12 +1729,14 @@ const FooterView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1562
1729
  function ModalFooter({
1563
1730
  children
1564
1731
  }) {
1565
- return /*#__PURE__*/React__default.createElement(FooterView, null, children);
1732
+ return /*#__PURE__*/jsxRuntime.jsx(FooterView, {
1733
+ children: children
1734
+ });
1566
1735
  }
1567
1736
 
1568
- const OnCloseContext = /*#__PURE__*/React.createContext(() => {});
1737
+ const OnCloseContext = /*#__PURE__*/react.createContext(() => {});
1569
1738
 
1570
- const HeaderView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1739
+ const HeaderView = /*#__PURE__*/styled__default.View.withConfig({
1571
1740
  displayName: "Header__HeaderView",
1572
1741
  componentId: "kitt-universal__sc-1iwabch-0"
1573
1742
  })(["position:relative;padding:", "px;display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;align-items:center;border-bottom-width:1px;border-bottom-color:", ";min-height:57px;"], ({
@@ -1575,19 +1744,19 @@ const HeaderView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1575
1744
  }) => theme.kitt.spacing * 2, ({
1576
1745
  theme
1577
1746
  }) => theme.kitt.colors.separator);
1578
- const LeftIconView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1747
+ const LeftIconView = /*#__PURE__*/styled__default.View.withConfig({
1579
1748
  displayName: "Header__LeftIconView",
1580
1749
  componentId: "kitt-universal__sc-1iwabch-1"
1581
1750
  })(["align-self:flex-start;margin-right:", "px;"], ({
1582
1751
  theme
1583
1752
  }) => theme.kitt.spacing * 2);
1584
- const RightIconView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1753
+ const RightIconView = /*#__PURE__*/styled__default.View.withConfig({
1585
1754
  displayName: "Header__RightIconView",
1586
1755
  componentId: "kitt-universal__sc-1iwabch-2"
1587
1756
  })(["align-self:flex-start;margin-left:", "px;"], ({
1588
1757
  theme
1589
1758
  }) => theme.kitt.spacing * 2);
1590
- const TitleView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1759
+ const TitleView = /*#__PURE__*/styled__default.View.withConfig({
1591
1760
  displayName: "Header__TitleView",
1592
1761
  componentId: "kitt-universal__sc-1iwabch-3"
1593
1762
  })(["padding-left:", "px;flex-shrink:1;"], ({
@@ -1599,18 +1768,25 @@ function ModalHeader({
1599
1768
  right,
1600
1769
  children
1601
1770
  }) {
1602
- const onClose = React.useContext(OnCloseContext);
1771
+ const onClose = react.useContext(OnCloseContext);
1603
1772
  const isIconLeft = !!left;
1604
- return /*#__PURE__*/React__default.createElement(HeaderView, null, isIconLeft && /*#__PURE__*/React__default.createElement(LeftIconView, null, left), /*#__PURE__*/React__default.createElement(TitleView, {
1605
- isIconLeft: isIconLeft
1606
- }, children), right !== undefined ? right : /*#__PURE__*/React__default.createElement(RightIconView, null, /*#__PURE__*/React__default.createElement(Button, {
1607
- type: "subtle-dark",
1608
- icon: /*#__PURE__*/React__default.createElement(kittIcons.XIcon, null),
1609
- onPress: onClose
1610
- })));
1773
+ return /*#__PURE__*/jsxRuntime.jsxs(HeaderView, {
1774
+ children: [isIconLeft && /*#__PURE__*/jsxRuntime.jsx(LeftIconView, {
1775
+ children: left
1776
+ }), /*#__PURE__*/jsxRuntime.jsx(TitleView, {
1777
+ isIconLeft: isIconLeft,
1778
+ children: children
1779
+ }), right !== undefined ? right : /*#__PURE__*/jsxRuntime.jsx(RightIconView, {
1780
+ children: /*#__PURE__*/jsxRuntime.jsx(Button, {
1781
+ type: "subtle-dark",
1782
+ icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.XIcon, {}),
1783
+ onPress: onClose
1784
+ })
1785
+ })]
1786
+ });
1611
1787
  }
1612
1788
 
1613
- const ModalView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1789
+ const ModalView = /*#__PURE__*/styled__default.View.withConfig({
1614
1790
  displayName: "Modal__ModalView",
1615
1791
  componentId: "kitt-universal__sc-1xy2w5u-0"
1616
1792
  })(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], ({
@@ -1618,7 +1794,7 @@ const ModalView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1618
1794
  }) => theme.kitt.spacing * 20, ({
1619
1795
  theme
1620
1796
  }) => theme.kitt.spacing * 4);
1621
- const ContentView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1797
+ const ContentView = /*#__PURE__*/styled__default.View.withConfig({
1622
1798
  displayName: "Modal__ContentView",
1623
1799
  componentId: "kitt-universal__sc-1xy2w5u-1"
1624
1800
  })(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", ";background-color:", ";"], ({
@@ -1633,18 +1809,24 @@ function Modal({
1633
1809
  onEntered,
1634
1810
  onExited
1635
1811
  }) {
1636
- return /*#__PURE__*/React__default.createElement(OnCloseContext.Provider, {
1637
- value: onClose
1638
- }, /*#__PURE__*/React__default.createElement(reactNative.Modal, {
1639
- transparent: true,
1640
- animationType: "fade",
1641
- visible: visible,
1642
- onShow: onEntered,
1643
- onDismiss: onExited,
1644
- onRequestClose: onClose
1645
- }, /*#__PURE__*/React__default.createElement(ModalView, null, /*#__PURE__*/React__default.createElement(Overlay, {
1646
- onPress: onClose
1647
- }), /*#__PURE__*/React__default.createElement(ContentView, null, children))));
1812
+ return /*#__PURE__*/jsxRuntime.jsx(OnCloseContext.Provider, {
1813
+ value: onClose,
1814
+ children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Modal, {
1815
+ transparent: true,
1816
+ animationType: "fade",
1817
+ visible: visible,
1818
+ onShow: onEntered,
1819
+ onDismiss: onExited,
1820
+ onRequestClose: onClose,
1821
+ children: /*#__PURE__*/jsxRuntime.jsxs(ModalView, {
1822
+ children: [/*#__PURE__*/jsxRuntime.jsx(Overlay, {
1823
+ onPress: onClose
1824
+ }), /*#__PURE__*/jsxRuntime.jsx(ContentView, {
1825
+ children: children
1826
+ })]
1827
+ })
1828
+ })
1829
+ });
1648
1830
  }
1649
1831
  Modal.Header = ModalHeader;
1650
1832
  Modal.Body = ModalBody;
@@ -1659,20 +1841,19 @@ function Notification({
1659
1841
  const {
1660
1842
  top
1661
1843
  } = reactNativeSafeAreaContext.useSafeAreaInsets();
1662
- return /*#__PURE__*/React__default.createElement(Message, {
1844
+ return /*#__PURE__*/jsxRuntime.jsx(Message, {
1663
1845
  noRadius: true,
1664
1846
  type: type,
1665
1847
  centeredText: centeredText,
1666
1848
  insets: {
1667
1849
  top
1668
1850
  },
1669
- onDismiss: onDelete
1670
- }, children);
1851
+ onDismiss: onDelete,
1852
+ children: children
1853
+ });
1671
1854
  }
1672
1855
 
1673
- const PrimitiveLink = reactNative.Text;
1674
-
1675
- const Flex = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1856
+ const Flex = /*#__PURE__*/styled__default.View.withConfig({
1676
1857
  shouldForwardProp: (prop, defaultValidatorFn) => !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop)
1677
1858
  }).withConfig({
1678
1859
  displayName: "Flex",
@@ -1714,13 +1895,13 @@ const getTypographyColorFromBlockColor = (color = 'transparent') => {
1714
1895
  }
1715
1896
  };
1716
1897
 
1717
- const StoryBlockBackgroundContext = /*#__PURE__*/React.createContext('transparent');
1718
- const StoryBlockColorContext = /*#__PURE__*/React.createContext('black');
1898
+ const StoryBlockBackgroundContext = /*#__PURE__*/react.createContext('transparent');
1899
+ const StoryBlockColorContext = /*#__PURE__*/react.createContext('black');
1719
1900
  const useStoryBlockColor = color => {
1720
- const storyBlockColor = React.useContext(StoryBlockColorContext);
1901
+ const storyBlockColor = react.useContext(StoryBlockColorContext);
1721
1902
  return color || storyBlockColor;
1722
1903
  };
1723
- const StyledStoryBlockView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1904
+ const StyledStoryBlockView = /*#__PURE__*/styled__default.View.withConfig({
1724
1905
  displayName: "StoryBlock__StyledStoryBlockView",
1725
1906
  componentId: "kitt-universal__sc-3w4hdm-0"
1726
1907
  })(["padding:16px ", "px 0;margin:0 -", "px;background:", ";"], storyPadding, storyPadding, ({
@@ -1731,20 +1912,23 @@ function StoryBlock({
1731
1912
  children,
1732
1913
  background
1733
1914
  }) {
1734
- return /*#__PURE__*/React__default.createElement(StyledStoryBlockView, {
1735
- background: background
1736
- }, /*#__PURE__*/React__default.createElement(StoryBlockColorContext.Provider, {
1737
- value: getTypographyColorFromBlockColor(background)
1738
- }, /*#__PURE__*/React__default.createElement(StoryBlockBackgroundContext.Provider, {
1739
- value: background
1740
- }, children)));
1915
+ return /*#__PURE__*/jsxRuntime.jsx(StyledStoryBlockView, {
1916
+ background: background,
1917
+ children: /*#__PURE__*/jsxRuntime.jsx(StoryBlockColorContext.Provider, {
1918
+ value: getTypographyColorFromBlockColor(background),
1919
+ children: /*#__PURE__*/jsxRuntime.jsx(StoryBlockBackgroundContext.Provider, {
1920
+ value: background,
1921
+ children: children
1922
+ })
1923
+ })
1924
+ });
1741
1925
  }
1742
1926
 
1743
- const StoryTitleContainer = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1927
+ const StoryTitleContainer = /*#__PURE__*/styled__default.View.withConfig({
1744
1928
  displayName: "StoryTitle__StoryTitleContainer",
1745
1929
  componentId: "kitt-universal__sc-sic7hb-0"
1746
1930
  })(["margin-bottom:30px;"]);
1747
- const StorySubTitleContainer = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
1931
+ const StorySubTitleContainer = /*#__PURE__*/styled__default.View.withConfig({
1748
1932
  displayName: "StoryTitle__StorySubTitleContainer",
1749
1933
  componentId: "kitt-universal__sc-sic7hb-1"
1750
1934
  })(["margin-bottom:10px;"]);
@@ -1753,12 +1937,15 @@ function StoryTitle({
1753
1937
  children,
1754
1938
  numberOfLines
1755
1939
  }) {
1756
- return /*#__PURE__*/React__default.createElement(StoryTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.Header1, {
1757
- variant: "bold",
1758
- base: "header1",
1759
- color: useStoryBlockColor(color),
1760
- numberOfLines: numberOfLines
1761
- }, children));
1940
+ return /*#__PURE__*/jsxRuntime.jsx(StoryTitleContainer, {
1941
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header1, {
1942
+ variant: "bold",
1943
+ base: "header1",
1944
+ color: useStoryBlockColor(color),
1945
+ numberOfLines: numberOfLines,
1946
+ children: children
1947
+ })
1948
+ });
1762
1949
  }
1763
1950
 
1764
1951
  function StoryTitleLevel2({
@@ -1766,12 +1953,15 @@ function StoryTitleLevel2({
1766
1953
  children,
1767
1954
  numberOfLines
1768
1955
  }) {
1769
- return /*#__PURE__*/React__default.createElement(StoryTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.Header2, {
1770
- variant: "bold",
1771
- base: "header2",
1772
- color: useStoryBlockColor(color),
1773
- numberOfLines: numberOfLines
1774
- }, children));
1956
+ return /*#__PURE__*/jsxRuntime.jsx(StoryTitleContainer, {
1957
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header2, {
1958
+ variant: "bold",
1959
+ base: "header2",
1960
+ color: useStoryBlockColor(color),
1961
+ numberOfLines: numberOfLines,
1962
+ children: children
1963
+ })
1964
+ });
1775
1965
  }
1776
1966
 
1777
1967
  StoryTitleLevel2.displayName = 'StoryTitle.Level2';
@@ -1781,13 +1971,16 @@ function StoryTitleLevel3({
1781
1971
  children,
1782
1972
  numberOfLines
1783
1973
  }) {
1784
- return /*#__PURE__*/React__default.createElement(StorySubTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.Header3, {
1785
- variant: "bold",
1786
- base: "header3",
1787
- medium: "header4",
1788
- color: useStoryBlockColor(color),
1789
- numberOfLines: numberOfLines
1790
- }, children));
1974
+ return /*#__PURE__*/jsxRuntime.jsx(StorySubTitleContainer, {
1975
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header3, {
1976
+ variant: "bold",
1977
+ base: "header3",
1978
+ medium: "header4",
1979
+ color: useStoryBlockColor(color),
1980
+ numberOfLines: numberOfLines,
1981
+ children: children
1982
+ })
1983
+ });
1791
1984
  }
1792
1985
 
1793
1986
  StoryTitleLevel3.displayName = 'StoryTitle.Level3';
@@ -1797,13 +1990,16 @@ function StoryTitleLevel4({
1797
1990
  children,
1798
1991
  numberOfLines
1799
1992
  }) {
1800
- return /*#__PURE__*/React__default.createElement(StorySubTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.Header4, {
1801
- variant: "bold",
1802
- base: "header4",
1803
- medium: "header5",
1804
- color: useStoryBlockColor(color),
1805
- numberOfLines: numberOfLines
1806
- }, children));
1993
+ return /*#__PURE__*/jsxRuntime.jsx(StorySubTitleContainer, {
1994
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header4, {
1995
+ variant: "bold",
1996
+ base: "header4",
1997
+ medium: "header5",
1998
+ color: useStoryBlockColor(color),
1999
+ numberOfLines: numberOfLines,
2000
+ children: children
2001
+ })
2002
+ });
1807
2003
  }
1808
2004
 
1809
2005
  StoryTitleLevel4.displayName = 'StoryTitle.Level3';
@@ -1811,7 +2007,7 @@ StoryTitle.Level2 = StoryTitleLevel2;
1811
2007
  StoryTitle.Level3 = StoryTitleLevel3;
1812
2008
  StoryTitle.Level4 = StoryTitleLevel4;
1813
2009
 
1814
- const StoryContainer$1 = /*#__PURE__*/styled__default(PrimitiveScrollView).withConfig({
2010
+ const StoryContainer$1 = /*#__PURE__*/styled__default.ScrollView.withConfig({
1815
2011
  displayName: "Story__StoryContainer",
1816
2012
  componentId: "kitt-universal__sc-1kwdg2p-0"
1817
2013
  })(["padding:", "px;"], storyPadding);
@@ -1820,54 +2016,66 @@ function Story({
1820
2016
  contentContainerStyle,
1821
2017
  children
1822
2018
  }) {
1823
- return /*#__PURE__*/React__default.createElement(StoryContainer$1, {
1824
- contentContainerStyle: contentContainerStyle
1825
- }, /*#__PURE__*/React__default.createElement(StoryTitle, null, title), children);
2019
+ return /*#__PURE__*/jsxRuntime.jsxs(StoryContainer$1, {
2020
+ contentContainerStyle: contentContainerStyle,
2021
+ children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle, {
2022
+ children: title
2023
+ }), children]
2024
+ });
1826
2025
  }
1827
2026
 
1828
- const StyledSection = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
2027
+ const StyledSection = /*#__PURE__*/styled__default.View.withConfig({
1829
2028
  displayName: "StorySection__StyledSection",
1830
2029
  componentId: "kitt-universal__sc-1b3liv5-0"
1831
2030
  })(["margin-bottom:32px;"]);
1832
2031
  function StorySection({
1833
2032
  title,
1834
- className,
1835
2033
  children,
1836
2034
  internalIsDemoSection,
1837
2035
  ...props
1838
2036
  }) {
1839
2037
  if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
1840
- return /*#__PURE__*/React__default.createElement(StyledSection, props, /*#__PURE__*/React__default.createElement(StoryTitle.Level2, null, title), children);
2038
+ return /*#__PURE__*/jsxRuntime.jsxs(StyledSection, { ...props,
2039
+ children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level2, {
2040
+ children: title
2041
+ }), children]
2042
+ });
1841
2043
  }
1842
- const StyledSubSection = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
2044
+ const StyledSubSection = /*#__PURE__*/styled__default.View.withConfig({
1843
2045
  displayName: "StorySection__StyledSubSection",
1844
2046
  componentId: "kitt-universal__sc-1b3liv5-1"
1845
2047
  })(["margin-bottom:16px;"]);
1846
2048
 
1847
2049
  function SubSection({
1848
2050
  title,
1849
- className,
1850
2051
  children,
1851
2052
  ...props
1852
2053
  }) {
1853
- return /*#__PURE__*/React__default.createElement(StyledSubSection, props, /*#__PURE__*/React__default.createElement(StoryTitle.Level3, null, title), children);
2054
+ return /*#__PURE__*/jsxRuntime.jsxs(StyledSubSection, { ...props,
2055
+ children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level3, {
2056
+ children: title
2057
+ }), children]
2058
+ });
1854
2059
  }
1855
2060
 
1856
- const StyledBlockSection = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
2061
+ const StyledBlockSection = /*#__PURE__*/styled__default.View.withConfig({
1857
2062
  displayName: "StorySection__StyledBlockSection",
1858
2063
  componentId: "kitt-universal__sc-1b3liv5-2"
1859
2064
  })(["margin-bottom:16px;"]);
1860
2065
 
1861
2066
  function BlockSection({
1862
2067
  title,
1863
- className,
1864
2068
  children,
1865
2069
  ...props
1866
2070
  }) {
1867
- return /*#__PURE__*/React__default.createElement(StyledBlockSection, props, /*#__PURE__*/React__default.createElement(StoryTitle.Level4, null, title), children);
2071
+ return /*#__PURE__*/jsxRuntime.jsxs(StyledBlockSection, { ...props,
2072
+ children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level4, {
2073
+ children: title
2074
+ }), children]
2075
+ });
1868
2076
  }
1869
2077
 
1870
- const StyledDemoSection = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
2078
+ const StyledDemoSection = /*#__PURE__*/styled__default.View.withConfig({
1871
2079
  displayName: "StorySection__StyledDemoSection",
1872
2080
  componentId: "kitt-universal__sc-1b3liv5-3"
1873
2081
  })(["margin-bottom:64px;"]);
@@ -1875,10 +2083,13 @@ const StyledDemoSection = /*#__PURE__*/styled__default(PrimitiveView).withConfig
1875
2083
  function DemoSection({
1876
2084
  children
1877
2085
  }) {
1878
- return /*#__PURE__*/React__default.createElement(StyledDemoSection, null, /*#__PURE__*/React__default.createElement(StorySection, {
1879
- internalIsDemoSection: true,
1880
- title: "Demo"
1881
- }, children));
2086
+ return /*#__PURE__*/jsxRuntime.jsx(StyledDemoSection, {
2087
+ children: /*#__PURE__*/jsxRuntime.jsx(StorySection, {
2088
+ internalIsDemoSection: true,
2089
+ title: "Demo",
2090
+ children: children
2091
+ })
2092
+ });
1882
2093
  }
1883
2094
 
1884
2095
  StorySection.SubSection = SubSection;
@@ -1898,31 +2109,33 @@ function StoryContainer({
1898
2109
  platform = 'all'
1899
2110
  }) {
1900
2111
  if (platform === 'web') return null;
1901
- return /*#__PURE__*/React__default.createElement(StorySection.BlockSection, {
2112
+ return /*#__PURE__*/jsxRuntime.jsx(StorySection.BlockSection, {
1902
2113
  testID: state,
1903
- title: title
1904
- }, children);
2114
+ title: title,
2115
+ children: children
2116
+ });
1905
2117
  }
1906
2118
 
1907
2119
  function StoryDecorator(storyFn, context) {
1908
- return /*#__PURE__*/React__default.createElement(Story, {
1909
- title: context.name
1910
- }, storyFn());
2120
+ return /*#__PURE__*/jsxRuntime.jsx(Story, {
2121
+ title: context.name,
2122
+ children: storyFn()
2123
+ });
1911
2124
  }
1912
2125
 
1913
- const SmallScreenRow = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
2126
+ const SmallScreenRow = /*#__PURE__*/styled__default.View.withConfig({
1914
2127
  displayName: "StoryGrid__SmallScreenRow",
1915
2128
  componentId: "kitt-universal__sc-4z5new-0"
1916
2129
  })(["flex-direction:column;margin:0;"]);
1917
- const SmallScreenCol = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
2130
+ const SmallScreenCol = /*#__PURE__*/styled__default.View.withConfig({
1918
2131
  displayName: "StoryGrid__SmallScreenCol",
1919
2132
  componentId: "kitt-universal__sc-4z5new-1"
1920
2133
  })(["padding:8px 0 16px;"]);
1921
- const FlexRow = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
2134
+ const FlexRow = /*#__PURE__*/styled__default.View.withConfig({
1922
2135
  displayName: "StoryGrid__FlexRow",
1923
2136
  componentId: "kitt-universal__sc-4z5new-2"
1924
2137
  })(["flex-direction:row;margin:0 -4px 16px;"]);
1925
- const FlexCol = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
2138
+ const FlexCol = /*#__PURE__*/styled__default.View.withConfig({
1926
2139
  displayName: "StoryGrid__FlexCol",
1927
2140
  componentId: "kitt-universal__sc-4z5new-3"
1928
2141
  })(["flex-grow:1;flex-basis:0;margin:0 8px;"]);
@@ -1939,10 +2152,18 @@ function StoryGridRow({
1939
2152
  const breakpointValue = breakpoint === 'small' ? 480 : 768;
1940
2153
 
1941
2154
  if (width < breakpointValue) {
1942
- return /*#__PURE__*/React__default.createElement(SmallScreenRow, null, React__default.Children.map(children, child => /*#__PURE__*/React__default.createElement(SmallScreenCol, null, child)));
2155
+ return /*#__PURE__*/jsxRuntime.jsx(SmallScreenRow, {
2156
+ children: react.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(SmallScreenCol, {
2157
+ children: child
2158
+ }))
2159
+ });
1943
2160
  }
1944
2161
 
1945
- return /*#__PURE__*/React__default.createElement(FlexRow, null, React__default.Children.map(children, child => /*#__PURE__*/React__default.createElement(FlexCol, null, child)));
2162
+ return /*#__PURE__*/jsxRuntime.jsx(FlexRow, {
2163
+ children: react.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(FlexCol, {
2164
+ children: child
2165
+ }))
2166
+ });
1946
2167
  }
1947
2168
 
1948
2169
  function StoryGridCol({
@@ -1951,20 +2172,17 @@ function StoryGridCol({
1951
2172
  children,
1952
2173
  platform = 'all'
1953
2174
  }) {
1954
- const isNative = reactNative.Platform.OS === 'ios' || reactNative.Platform.OS === 'android';
1955
-
1956
- if (reactNative.Platform.OS === 'web' && platform === 'native') {
2175
+ if (platform === 'native') {
1957
2176
  return null;
1958
2177
  }
1959
2178
 
1960
- if (isNative && platform === 'web') {
1961
- return null;
1962
- }
1963
-
1964
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, title ? /*#__PURE__*/React__default.createElement(StoryTitle.Level4, {
1965
- numberOfLines: 1,
1966
- color: titleColor
1967
- }, title) : null, children);
2179
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2180
+ children: [title ? /*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level4, {
2181
+ numberOfLines: 1,
2182
+ color: titleColor,
2183
+ children: title
2184
+ }) : null, children]
2185
+ });
1968
2186
  }
1969
2187
 
1970
2188
  const StoryGrid = {
@@ -1972,7 +2190,7 @@ const StoryGrid = {
1972
2190
  Col: StoryGridCol
1973
2191
  };
1974
2192
 
1975
- const Container = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
2193
+ const Container$1 = /*#__PURE__*/styled__default.View.withConfig({
1976
2194
  displayName: "Tag__Container",
1977
2195
  componentId: "kitt-universal__sc-19jmowi-0"
1978
2196
  })(["background-color:", ";border-width:", ";border-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], ({
@@ -2020,13 +2238,15 @@ function Tag({
2020
2238
  type = 'default',
2021
2239
  variant = 'fill'
2022
2240
  }) {
2023
- return /*#__PURE__*/React__default.createElement(Container, {
2241
+ return /*#__PURE__*/jsxRuntime.jsx(Container$1, {
2024
2242
  type: type,
2025
- variant: variant
2026
- }, /*#__PURE__*/React__default.createElement(Typography.Text, {
2027
- base: "body-xsmall",
2028
- color: getLabelColor(type, variant)
2029
- }, label));
2243
+ variant: variant,
2244
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
2245
+ base: "body-xsmall",
2246
+ color: getLabelColor(type, variant),
2247
+ children: label
2248
+ })
2249
+ });
2030
2250
  }
2031
2251
 
2032
2252
  const lateOceanColorPalette = {
@@ -2135,6 +2355,7 @@ const colorsLateOceanTheme = {
2135
2355
  danger: lateOceanColorPalette.englishVermillon,
2136
2356
  separator: lateOceanColorPalette.black100,
2137
2357
  hover: lateOceanColorPalette.black100,
2358
+ black: lateOceanColorPalette.black1000,
2138
2359
  uiBackground: lateOceanColorPalette.black25,
2139
2360
  uiBackgroundLight: lateOceanColorPalette.white,
2140
2361
  overlay: {
@@ -2320,6 +2541,15 @@ const tagLateOceanTheme = {
2320
2541
  }
2321
2542
  };
2322
2543
 
2544
+ const tooltip = {
2545
+ backgroundColor: colorsLateOceanTheme.black,
2546
+ borderRadius: 10,
2547
+ opacity: 0.95,
2548
+ horizontalPadding: 16,
2549
+ verticalPadding: 4,
2550
+ floatingPadding: 8
2551
+ };
2552
+
2323
2553
  const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
2324
2554
 
2325
2555
  const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
@@ -2348,8 +2578,8 @@ const typographyLateOceanTheme = {
2348
2578
  types: {
2349
2579
  headers: {
2350
2580
  fontFamily: {
2351
- regular: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
2352
- bold: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
2581
+ regular: 'Moderat',
2582
+ bold: 'Moderat'
2353
2583
  },
2354
2584
  fontWeight: 400,
2355
2585
  fontStyle: 'normal',
@@ -2368,8 +2598,8 @@ const typographyLateOceanTheme = {
2368
2598
  },
2369
2599
  bodies: {
2370
2600
  fontFamily: {
2371
- regular: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans',
2372
- bold: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
2601
+ regular: 'Noto Sans',
2602
+ bold: 'Noto Sans'
2373
2603
  },
2374
2604
  fontWeight: {
2375
2605
  regular: 400,
@@ -2432,38 +2662,384 @@ const theme = {
2432
2662
  shadows: shadowsLateOceanTheme,
2433
2663
  fullScreenModal: fullScreenModalLateOceanTheme,
2434
2664
  iconButton,
2435
- listItem: listItemLateOceanTheme
2665
+ listItem: listItemLateOceanTheme,
2666
+ tooltip
2436
2667
  };
2437
2668
 
2438
- function Tooltip({
2669
+ function Title({
2439
2670
  children
2440
2671
  }) {
2441
- return /*#__PURE__*/React__default.createElement(PrimitiveView, null, children);
2672
+ return /*#__PURE__*/jsxRuntime.jsx(Modal.Header, {
2673
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
2674
+ base: "body",
2675
+ variant: "bold",
2676
+ children: children
2677
+ })
2678
+ });
2442
2679
  }
2443
2680
 
2444
- const StyledLink = /*#__PURE__*/styled__default(PrimitiveLink).withConfig({
2445
- shouldForwardProp: prop => !['disabled', 'noUnderline'].includes(prop)
2446
- }).withConfig({
2447
- displayName: "TypographyLink__StyledLink",
2448
- componentId: "kitt-universal__sc-1o1zy30-0"
2449
- })(["text-decoration:", ";", ""], ({
2450
- noUnderline
2451
- }) => noUnderline ? 'none' : 'underline', ({
2452
- disabled,
2453
- theme,
2454
- noUnderline
2455
- }) => `
2456
- ${disabled ? `color: ${theme.kitt.typography.link.disabledColor};` : ''}
2457
- ${reactNative.Platform.OS === 'web' ? `
2458
- text-decoration-color: inherit;
2459
- transition: color 0.2s ease-in-out;
2460
- cursor: ${disabled ? 'not-allowed' : 'pointer'};
2681
+ function ModalDateTimePicker({
2682
+ title,
2683
+ visible,
2684
+ value,
2685
+ validateButtonLabel,
2686
+ onChange,
2687
+ onClose
2688
+ }) {
2689
+ const [currentValue, setCurrentValue] = react.useState(value); // Prevent unsynced value between the modal and its parent state
2690
+
2691
+ return /*#__PURE__*/jsxRuntime.jsx(Modal, {
2692
+ visible: Boolean(visible),
2693
+ onClose: () => {
2694
+ setCurrentValue(value);
2695
+ onClose();
2696
+ },
2697
+ children: visible ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2698
+ children: [title ? /*#__PURE__*/jsxRuntime.jsx(Title, {
2699
+ children: title
2700
+ }) : null, /*#__PURE__*/jsxRuntime.jsx(Modal.Body, {
2701
+ children: /*#__PURE__*/jsxRuntime.jsx(DateTimePicker__default, {
2702
+ is24Hour: true,
2703
+ testID: "date-picker-native-element",
2704
+ value: currentValue,
2705
+ mode: "time",
2706
+ display: 'default',
2707
+ onChange: (_event, date) => setCurrentValue(prev => {
2708
+ return date || prev;
2709
+ })
2710
+ })
2711
+ }), /*#__PURE__*/jsxRuntime.jsx(Modal.Footer, {
2712
+ children: /*#__PURE__*/jsxRuntime.jsx(Button, {
2713
+ stretch: true,
2714
+ type: "primary",
2715
+ onPress: () => {
2716
+ onChange(currentValue);
2717
+ },
2718
+ children: validateButtonLabel ? /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
2719
+ children: validateButtonLabel
2720
+ }) : /*#__PURE__*/jsxRuntime.jsx(reactIntl.FormattedMessage, {
2721
+ id: "kitt-universal.ModalDateTimePicker.confirm"
2722
+ })
2723
+ })
2724
+ })]
2725
+ }) : null
2726
+ });
2727
+ }
2728
+
2729
+ const timePickerPlaceholder = '--:--';
2730
+ const useTimePicker = (value, onChange, onBlur, disabled, defaultValue) => {
2731
+ const [isTimePickerModalVisible, setIsTimePickerModalVisible] = react.useState(false);
2732
+ const todayAtNoon = react.useMemo(() => {
2733
+ const now = new Date(2000, 0, 1, 12);
2734
+ return new Date(now.getFullYear(), now.getMonth(), now.getDay(), 12);
2735
+ }, []);
2736
+ const defaultDate = defaultValue || todayAtNoon;
2737
+ const dateTimePickerValue = value || defaultDate;
2738
+ const displayedValue = value === null ? timePickerPlaceholder : Intl.DateTimeFormat('fr-FR', {
2739
+ minute: 'numeric',
2740
+ hour: 'numeric'
2741
+ }).format(dateTimePickerValue);
2742
+ const timePickerState = isTimePickerModalVisible ? 'focus' : 'default';
2743
+ return {
2744
+ dateTimePickerValue,
2745
+ displayedValue,
2746
+ timePickerState,
2747
+ isTimePickerModalVisible,
2748
+ handleInputPress: () => {
2749
+ if (disabled) {
2750
+ return;
2751
+ }
2752
+
2753
+ setIsTimePickerModalVisible(true);
2754
+ },
2755
+ handleTimeChange: date => {
2756
+ setIsTimePickerModalVisible(false);
2757
+ onChange(date || defaultDate);
2758
+ onBlur();
2759
+ },
2760
+ handleModalClose: () => setIsTimePickerModalVisible(false)
2761
+ };
2762
+ };
2763
+
2764
+ const Container = /*#__PURE__*/styled__default.Pressable.withConfig({
2765
+ displayName: "TimePicker__Container",
2766
+ componentId: "kitt-universal__sc-18zhpwp-0"
2767
+ })(["", " width:100px;height:40px;justify-content:center;align-items:center;"], styledTextInputMixin);
2768
+ function TimePicker({
2769
+ title,
2770
+ state = 'default',
2771
+ disabled = false,
2772
+ forceDefaultValue,
2773
+ value,
2774
+ validateButtonLabel,
2775
+ onChange,
2776
+ onBlur
2777
+ }) {
2778
+ const {
2779
+ dateTimePickerValue,
2780
+ displayedValue,
2781
+ timePickerState,
2782
+ handleInputPress,
2783
+ handleModalClose,
2784
+ handleTimeChange,
2785
+ isTimePickerModalVisible
2786
+ } = useTimePicker(value || null, onChange, onBlur, disabled, forceDefaultValue);
2787
+ return /*#__PURE__*/jsxRuntime.jsxs(Container, {
2788
+ state: timePickerState === 'default' ? state : timePickerState,
2789
+ accessibilityRole: "button",
2790
+ onPress: handleInputPress,
2791
+ children: [/*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
2792
+ base: "body",
2793
+ color: displayedValue === timePickerPlaceholder ? 'black-light' : 'black',
2794
+ children: displayedValue
2795
+ }), null, /*#__PURE__*/jsxRuntime.jsx(ModalDateTimePicker, {
2796
+ title: title,
2797
+ visible: isTimePickerModalVisible,
2798
+ value: dateTimePickerValue,
2799
+ validateButtonLabel: validateButtonLabel,
2800
+ onChange: handleTimeChange,
2801
+ onClose: handleModalClose
2802
+ })]
2803
+ });
2804
+ }
2805
+
2806
+ var Arrow = function (props) {
2807
+ return /*#__PURE__*/jsxRuntime.jsx("svg", { ...props,
2808
+ children: /*#__PURE__*/jsxRuntime.jsx("path", {
2809
+ fillRule: "evenodd",
2810
+ clipRule: "evenodd",
2811
+ d: "M22.399 6.128C20.939 7.722 19.767 9 18 9s-2.938-1.278-4.399-2.872C11.187 3.494 7.984 0 0 0h36c-7.984 0-11.187 3.494-13.601 6.128z",
2812
+ fill: "currentColor"
2813
+ })
2814
+ });
2815
+ };
2816
+
2817
+ Arrow.defaultProps = {
2818
+ width: "36",
2819
+ height: "8",
2820
+ viewBox: "0 0 36 9",
2821
+ fill: "none",
2822
+ xmlns: "http://www.w3.org/2000/svg"
2823
+ };
2824
+ const StyledTooltipView = /*#__PURE__*/styled__default.View.withConfig({
2825
+ displayName: "TooltipView__StyledTooltipView",
2826
+ componentId: "kitt-universal__sc-156zm6m-0"
2827
+ })(["align-items:center;"]);
2828
+ const StyledTooltipContent = /*#__PURE__*/styled__default.View.withConfig({
2829
+ displayName: "TooltipView__StyledTooltipContent",
2830
+ componentId: "kitt-universal__sc-156zm6m-1"
2831
+ })(["background-color:", ";border-radius:", "px;opacity:", ";padding:", ";"], ({
2832
+ theme
2833
+ }) => theme.kitt.tooltip.backgroundColor, ({
2834
+ theme
2835
+ }) => theme.kitt.tooltip.borderRadius, ({
2836
+ theme
2837
+ }) => theme.kitt.tooltip.opacity, ({
2838
+ theme
2839
+ }) => `${theme.kitt.tooltip.verticalPadding}px ${theme.kitt.tooltip.horizontalPadding}px`);
2840
+
2841
+ function ArrowView(props) {
2842
+ const theme = /*#__PURE__*/styled.useTheme();
2843
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, { ...props,
2844
+ children: /*#__PURE__*/jsxRuntime.jsx(Arrow, {
2845
+ color: theme.kitt.tooltip.backgroundColor
2846
+ })
2847
+ });
2848
+ }
2849
+
2850
+ const StyledArrow = /*#__PURE__*/styled__default(ArrowView).withConfig({
2851
+ displayName: "TooltipView__StyledArrow",
2852
+ componentId: "kitt-universal__sc-156zm6m-2"
2853
+ })(["color:", ";transform:", ";"], ({
2854
+ theme
2855
+ }) => theme.kitt.tooltip.backgroundColor, ({
2856
+ $position
2857
+ }) => `rotate(${$position === 'bottom' ? 180 : 0}deg)`);
2858
+ function TooltipView({
2859
+ children,
2860
+ position
2861
+ }) {
2862
+ return /*#__PURE__*/jsxRuntime.jsxs(StyledTooltipView, {
2863
+ children: [position === 'bottom' ? /*#__PURE__*/jsxRuntime.jsx(StyledArrow, {
2864
+ $position: position
2865
+ }) : null, /*#__PURE__*/jsxRuntime.jsx(StyledTooltipContent, {
2866
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
2867
+ base: "body",
2868
+ color: "white",
2869
+ children: children
2870
+ })
2871
+ }), position === 'top' ? /*#__PURE__*/jsxRuntime.jsx(StyledArrow, {
2872
+ $position: position
2873
+ }) : null]
2874
+ });
2875
+ }
2876
+
2877
+ const tooltipDefaultPosition = 'top';
2878
+
2879
+ // Since the tooltip use absolute positionning, we need a parent to provide the relative root
2880
+ const TooltipContainer = /*#__PURE__*/styled__default.View.withConfig({
2881
+ displayName: "Tooltip__TooltipContainer",
2882
+ componentId: "kitt-universal__sc-7ja8gx-0"
2883
+ })(["position:relative;align-self:baseline;"]);
2884
+ // eslint-disable-next-line unicorn/expiring-todo-comments
2885
+ // TODO : update position on scroll in future iteration
2886
+ function Tooltip({
2887
+ children,
2888
+ defaultVisible,
2889
+ position = tooltipDefaultPosition,
2890
+ content,
2891
+ floatingPadding,
2892
+ onUpdate
2893
+ }) {
2894
+ const theme = /*#__PURE__*/styled.useTheme();
2895
+ const padding = floatingPadding || theme.kitt.tooltip.floatingPadding;
2896
+ const pressed = Animated.useSharedValue(defaultVisible);
2897
+ const opacityStyles = Animated.useAnimatedStyle(function () {
2898
+ const _f = function () {
2899
+ return {
2900
+ opacity: Animated.withSpring(pressed.value ? theme.kitt.tooltip.opacity : 0)
2901
+ };
2902
+ };
2461
2903
 
2904
+ _f._closure = {
2905
+ withSpring: Animated.withSpring,
2906
+ pressed,
2907
+ theme: {
2908
+ kitt: {
2909
+ tooltip: {
2910
+ opacity: theme.kitt.tooltip.opacity
2911
+ }
2912
+ }
2913
+ }
2914
+ };
2915
+ _f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{opacity:withSpring(pressed.value?theme.kitt.tooltip.opacity:0)};}}";
2916
+ _f.__workletHash = 15953928507970;
2917
+ _f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/Tooltip/Tooltip.tsx (57:41)";
2918
+ _f.__optimalization = 2;
2462
2919
 
2463
- &:hover, &:active, .kitt-hover & {
2464
- text-decoration: ${noUnderline ? 'underline' : 'none'};
2920
+ global.__reanimatedWorkletInit(_f);
2921
+
2922
+ return _f;
2923
+ }());
2924
+ const {
2925
+ x,
2926
+ y,
2927
+ reference,
2928
+ floating,
2929
+ update,
2930
+ refs,
2931
+ middlewareData
2932
+ } = reactNative$1.useFloating({
2933
+ placement: position,
2934
+ middleware: [reactNative$1.offset(padding), reactNative$1.shift(), reactNative$1.flip({
2935
+ padding
2936
+ })]
2937
+ });
2938
+ react.useEffect(() => {
2939
+ if (!onUpdate) return;
2940
+ onUpdate({
2941
+ x,
2942
+ y,
2943
+ reference,
2944
+ floating,
2945
+ strategy: 'absolute',
2946
+ update,
2947
+ refs,
2948
+ middlewareData
2949
+ });
2950
+ }, [x, y, reference, floating, update, refs, middlewareData, onUpdate]);
2951
+ return /*#__PURE__*/jsxRuntime.jsxs(TooltipContainer, {
2952
+ children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
2953
+ ref: reference,
2954
+ children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Pressable, {
2955
+ accessibilityRole: "button",
2956
+ onPress: () => {
2957
+ pressed.value = !pressed.value;
2958
+ },
2959
+ children: children
2960
+ })
2961
+ }), /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
2962
+ ref: floating,
2963
+ accessibilityElementsHidden: !pressed.value,
2964
+ importantForAccessibility: pressed.value === true ? 'auto' : 'no-hide-descendants',
2965
+ style: { ...reactNative.StyleSheet.absoluteFillObject,
2966
+ top: y && position === 'bottom' ? y : undefined,
2967
+ bottom: y && position === 'top' ? y : undefined,
2968
+ left: x ?? 0
2969
+ },
2970
+ children: /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
2971
+ style: [opacityStyles],
2972
+ children: /*#__PURE__*/jsxRuntime.jsx(TooltipView, {
2973
+ position: position,
2974
+ children: content
2975
+ })
2976
+ })
2977
+ })]
2978
+ });
2979
+ }
2980
+ Tooltip.View = TooltipView;
2981
+
2982
+ const StyledTypographyEmoji = /*#__PURE__*/styled__default(Emoji).withConfig({
2983
+ displayName: "TypographyEmoji__StyledTypographyEmoji",
2984
+ componentId: "kitt-universal__sc-1if5guu-0"
2985
+ })(["align-self:center;", ""], ({
2986
+ size
2987
+ }) => {
2988
+ /* Style Twemoji: https://github.com/twitter/twemoji#inline-styles */
2989
+ return `
2990
+ margin: 0 ${size / 20}px 0 ${size / 10}px;
2991
+ transform: translateY(${size / 10 * 2}px);
2992
+ `;
2993
+ });
2994
+ function TypographyEmoji({
2995
+ emoji,
2996
+ base,
2997
+ small,
2998
+ medium,
2999
+ large
3000
+ }) {
3001
+ const theme = /*#__PURE__*/styled.useTheme();
3002
+ const typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
3003
+ const typeConfig = getTypographyTypeConfig(typeForCurrentWindowSize || 'body', theme);
3004
+ const typeConfigKey = getTypographyTypeConfigKey(theme);
3005
+ const {
3006
+ fontSize
3007
+ } = typeConfig[typeConfigKey];
3008
+
3009
+ if ((process.env.NODE_ENV !== "production")) {
3010
+ if (!fontSize.endsWith('px')) throw new Error(`Unexpected font-size value: ${fontSize}`);
2465
3011
  }
2466
- ` : ''}`);
3012
+
3013
+ return /*#__PURE__*/jsxRuntime.jsx(StyledTypographyEmoji, {
3014
+ size: parseInt(fontSize.slice(0, -2), 10),
3015
+ emoji: emoji
3016
+ });
3017
+ }
3018
+
3019
+ const TypographyLinkWebWrapper = withTheme( /*#__PURE__*/react$1.styled("span")({
3020
+ name: "TypographyLinkWebWrapper",
3021
+ class: "tcwz3nt"
3022
+ }));
3023
+ const StyledLink = /*#__PURE__*/styled__default.Text.withConfig({
3024
+ displayName: "TypographyLink__StyledLink",
3025
+ componentId: "kitt-universal__sc-1o1zy30-0"
3026
+ })(["text-decoration:", ";", ";", ";"], ({
3027
+ $noUnderline
3028
+ }) => $noUnderline ? 'none' : 'underline', ({
3029
+ $disabled
3030
+ }) => {
3031
+ return `
3032
+ text-decoration-color: inherit;
3033
+ transition: color 0.2s ease-in-out;
3034
+ cursor: ${$disabled ? 'not-allowed' : 'pointer'};
3035
+ `;
3036
+ }, ({
3037
+ $disabled,
3038
+ theme
3039
+ }) => {
3040
+ if (!$disabled) return undefined;
3041
+ return `color: ${theme.kitt.typography.link.disabledColor};`;
3042
+ });
2467
3043
  function TypographyLink({
2468
3044
  children,
2469
3045
  disabled,
@@ -2473,16 +3049,26 @@ function TypographyLink({
2473
3049
  onPress,
2474
3050
  ...otherProps
2475
3051
  }) {
2476
- return /*#__PURE__*/React__default.createElement(Typography, _extends__default({}, otherProps, {
2477
- accessibilityRole: "none"
2478
- }), /*#__PURE__*/React__default.createElement(StyledLink, {
2479
- disabled: disabled,
2480
- noUnderline: noUnderline,
2481
- href: href,
2482
- hrefAttrs: hrefAttrs,
2483
- accessibilityRole: "link",
2484
- onPress: disabled ? undefined : onPress
2485
- }, children));
3052
+ return /*#__PURE__*/jsxRuntime.jsx(Typography, { ...otherProps,
3053
+ accessibilityRole: "none",
3054
+ children: /*#__PURE__*/jsxRuntime.jsx(StyleWebWrapper, {
3055
+ as: TypographyLinkWebWrapper,
3056
+ "data-nounderline": noUnderline,
3057
+ children: /*#__PURE__*/jsxRuntime.jsx(StyledLink, {
3058
+ $disabled: disabled,
3059
+ $noUnderline: noUnderline,
3060
+ href: href,
3061
+ hrefAttrs: hrefAttrs,
3062
+ accessibilityRole: "link",
3063
+ dataSet: {
3064
+ // remove data-kitt-universal when we delete kitt web. See See :global(a) in Link styles.module.css
3065
+ 'kitt-universal': 'true'
3066
+ },
3067
+ onPress: disabled ? undefined : onPress,
3068
+ children: children
3069
+ })
3070
+ })
3071
+ });
2486
3072
  }
2487
3073
 
2488
3074
  function matchWindowSize(currentWidth, {
@@ -2526,7 +3112,7 @@ function useKittTheme() {
2526
3112
  const {
2527
3113
  width
2528
3114
  } = reactNative.useWindowDimensions();
2529
- return React.useMemo(() => {
3115
+ return react.useMemo(() => {
2530
3116
  return {
2531
3117
  kitt: theme,
2532
3118
  responsive: createWindowSizeHelper(width),
@@ -2539,9 +3125,10 @@ function KittThemeProvider({
2539
3125
  children
2540
3126
  }) {
2541
3127
  const theme = useKittTheme();
2542
- return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
2543
- theme: theme
2544
- }, children);
3128
+ return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
3129
+ theme: theme,
3130
+ children: children
3131
+ });
2545
3132
  }
2546
3133
  const KittThemeDecorator = addons.makeDecorator({
2547
3134
  name: 'ThemeDecorator',
@@ -2550,18 +3137,9 @@ const KittThemeDecorator = addons.makeDecorator({
2550
3137
  options = {},
2551
3138
  parameters = {}
2552
3139
  }) => {
2553
- return /*#__PURE__*/React__default.createElement(KittThemeProvider, null, storyFn(context));
2554
- }
2555
- });
2556
-
2557
- const SafeAreaProviderDecorator = addons.makeDecorator({
2558
- name: 'SafeAreaProviderDecorator',
2559
- parameterName: 'safeAreaProvider',
2560
- wrapper: (storyFn, context, {
2561
- options = {},
2562
- parameters = {}
2563
- }) => {
2564
- return /*#__PURE__*/React__default.createElement(reactNativeSafeAreaContext.SafeAreaProvider, null, storyFn(context));
3140
+ return /*#__PURE__*/jsxRuntime.jsx(KittThemeProvider, {
3141
+ children: storyFn(context)
3142
+ });
2565
3143
  }
2566
3144
  });
2567
3145
 
@@ -2571,13 +3149,16 @@ function MatchWindowSize({
2571
3149
  }) {
2572
3150
  const match = useMatchWindowSize(matchWindowSizeOptions);
2573
3151
  if (!match) return null;
2574
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children);
3152
+ return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
3153
+ children: children
3154
+ });
2575
3155
  }
2576
3156
 
2577
3157
  exports.useWindowSize = reactNative.useWindowDimensions;
2578
3158
  exports.Avatar = Avatar;
2579
3159
  exports.Button = Button;
2580
3160
  exports.Card = Card;
3161
+ exports.Emoji = Emoji;
2581
3162
  exports.ExternalLink = ExternalLink;
2582
3163
  exports.Flex = Flex;
2583
3164
  exports.FullScreenModal = FullScreenModal;
@@ -2598,13 +3179,7 @@ exports.MatchWindowSize = MatchWindowSize;
2598
3179
  exports.Message = Message;
2599
3180
  exports.Modal = Modal;
2600
3181
  exports.Notification = Notification;
2601
- exports.PrimitiveLink = PrimitiveLink;
2602
- exports.PrimitivePressable = PrimitivePressable;
2603
- exports.PrimitiveScrollView = PrimitiveScrollView;
2604
- exports.PrimitiveText = PrimitiveText;
2605
- exports.PrimitiveView = PrimitiveView;
2606
3182
  exports.Radio = Radio;
2607
- exports.SafeAreaProviderDecorator = SafeAreaProviderDecorator;
2608
3183
  exports.Section = DeprecatedSection;
2609
3184
  exports.Story = Story;
2610
3185
  exports.StoryBlock = StoryBlock;
@@ -2615,8 +3190,10 @@ exports.StorySection = StorySection;
2615
3190
  exports.StoryTitle = StoryTitle;
2616
3191
  exports.Tag = Tag;
2617
3192
  exports.TextArea = TextArea;
3193
+ exports.TimePicker = TimePicker;
2618
3194
  exports.Tooltip = Tooltip;
2619
3195
  exports.Typography = Typography;
3196
+ exports.TypographyEmoji = TypographyEmoji;
2620
3197
  exports.TypographyIcon = TypographyIcon;
2621
3198
  exports.TypographyLink = TypographyLink;
2622
3199
  exports.createWindowSizeHelper = createWindowSizeHelper;