@ornikar/kitt-universal 31.0.2-canary.e53cdb7e12a8aa3be6ae21c546ec9bcaca9b660c.0 → 31.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts +0 -3
  3. package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts.map +1 -1
  4. package/dist/definitions/index.d.ts +1 -0
  5. package/dist/definitions/index.d.ts.map +1 -1
  6. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +93 -0
  7. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  8. package/dist/definitions/themes/default.d.ts +93 -0
  9. package/dist/definitions/themes/default.d.ts.map +1 -1
  10. package/dist/definitions/themes/late-ocean/colors.d.ts +93 -0
  11. package/dist/definitions/themes/late-ocean/colors.d.ts.map +1 -1
  12. package/dist/definitions/utils/storybook/ChromaticReducedMotionDecorator.d.ts +2 -0
  13. package/dist/definitions/utils/storybook/ChromaticReducedMotionDecorator.d.ts.map +1 -0
  14. package/dist/index-metro.es.android.js +111 -5
  15. package/dist/index-metro.es.android.js.map +1 -1
  16. package/dist/index-metro.es.ios.js +111 -5
  17. package/dist/index-metro.es.ios.js.map +1 -1
  18. package/dist/index-node-22.17.cjs.js +111 -3
  19. package/dist/index-node-22.17.cjs.js.map +1 -1
  20. package/dist/index-node-22.17.cjs.web.js +109 -0
  21. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  22. package/dist/index-node-22.17.es.mjs +111 -5
  23. package/dist/index-node-22.17.es.mjs.map +1 -1
  24. package/dist/index-node-22.17.es.web.mjs +109 -2
  25. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  26. package/dist/index.es.js +113 -6
  27. package/dist/index.es.js.map +1 -1
  28. package/dist/index.es.web.js +111 -2
  29. package/dist/index.es.web.js.map +1 -1
  30. package/dist/linaria-themes-metro.es.android.js +96 -0
  31. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  32. package/dist/linaria-themes-metro.es.ios.js +96 -0
  33. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  34. package/dist/linaria-themes-node-22.17.cjs.js +96 -0
  35. package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
  36. package/dist/linaria-themes-node-22.17.cjs.web.js +96 -0
  37. package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
  38. package/dist/linaria-themes-node-22.17.es.mjs +96 -0
  39. package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
  40. package/dist/linaria-themes-node-22.17.es.web.mjs +96 -0
  41. package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
  42. package/dist/linaria-themes.es.js +96 -0
  43. package/dist/linaria-themes.es.js.map +1 -1
  44. package/dist/linaria-themes.es.web.js +96 -0
  45. package/dist/linaria-themes.es.web.js.map +1 -1
  46. package/dist/tsbuildinfo +1 -1
  47. package/package.json +2 -1
@@ -2,7 +2,7 @@ import React, { useContext, createContext, forwardRef, useMemo, cloneElement, us
2
2
  import { View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, Image as Image$1, FlatList as FlatList$1, SectionList as SectionList$1, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Center as Center$1, useBreakpointValue as useBreakpointValue$1, useSx, Text, Input, NativeBaseProvider, extendTheme, useMediaQuery } from 'native-base';
3
3
  export { useClipboard, useContrastText, useMediaQuery, useSx, useToken } from 'native-base';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
- import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate } from 'react-native-reanimated';
5
+ import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate, ReducedMotionConfig, ReduceMotion } from 'react-native-reanimated';
6
6
  import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal, ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, Keyboard, Text as Text$1, useWindowDimensions, PixelRatio } from 'react-native';
7
7
  export { useWindowDimensions as useWindowSize } from 'react-native';
8
8
  import { SpinnerGapRegularIcon, UserRegularIcon, XRegularIcon, ArrowLeftRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
@@ -22,6 +22,7 @@ import { Picker as Picker$1 } from '@react-native-picker/picker';
22
22
  import { LinearGradient } from 'expo-linear-gradient';
23
23
  import { useFloating, offset, autoPlacement } from '@floating-ui/react-native';
24
24
  import { makeDecorator } from '@storybook/addons';
25
+ import isChromatic from 'chromatic/isChromatic';
25
26
 
26
27
  const View = View$1;
27
28
  const ScrollView = ScrollView$1;
@@ -161,6 +162,102 @@ const colors = {
161
162
  overlay: {
162
163
  dark: deepPurpleColorPalette['grey-alpha.50'],
163
164
  light: deepPurpleColorPalette['white-alpha.80']
165
+ },
166
+ // Bumper semantic tokens
167
+ // Should be kept in sync with the light theme in bumper
168
+ // https://github.com/ornikar/kitt/blob/79e367e962c957c016c4df67dbcf515c8f45ff0e/@ornikar/bumper/src/themes/light.ts#L6
169
+ bumper: {
170
+ content: {
171
+ base: {
172
+ hi: deepPurpleColorPalette['grey.9'],
173
+ mid: deepPurpleColorPalette['grey.7'],
174
+ low: deepPurpleColorPalette['grey.5'],
175
+ onContrasted: {
176
+ hi: deepPurpleColorPalette['grey.0'],
177
+ mid: deepPurpleColorPalette['white-alpha.80'],
178
+ low: deepPurpleColorPalette['white-alpha.60']
179
+ }
180
+ },
181
+ accent: deepPurpleColorPalette['deepPurple.8'],
182
+ promo: deepPurpleColorPalette['lightning.9'],
183
+ info: deepPurpleColorPalette['blue.7'],
184
+ success: deepPurpleColorPalette['green.7'],
185
+ warning: deepPurpleColorPalette['yellow.7'],
186
+ danger: deepPurpleColorPalette['red.7'],
187
+ muted: deepPurpleColorPalette['beige.6'],
188
+ disabled: deepPurpleColorPalette['grey.3']
189
+ },
190
+ bg: {
191
+ base: {
192
+ hi: {
193
+ default: deepPurpleColorPalette['beige.2'],
194
+ pressed: deepPurpleColorPalette['beige.3']
195
+ },
196
+ mid: {
197
+ default: deepPurpleColorPalette['beige.1'],
198
+ pressed: deepPurpleColorPalette['beige.2']
199
+ },
200
+ low: {
201
+ default: deepPurpleColorPalette['grey.0'],
202
+ pressed: deepPurpleColorPalette['beige.1']
203
+ }
204
+ },
205
+ accent: {
206
+ default: deepPurpleColorPalette['deepPurple.8'],
207
+ pressed: deepPurpleColorPalette['deepPurple.7']
208
+ },
209
+ promo: {
210
+ hi: {
211
+ default: deepPurpleColorPalette['lightning.9'],
212
+ pressed: deepPurpleColorPalette['lightning.8']
213
+ },
214
+ mid: {
215
+ default: deepPurpleColorPalette['lightning.5'],
216
+ pressed: deepPurpleColorPalette['lightning.4']
217
+ }
218
+ },
219
+ highlight: {
220
+ default: deepPurpleColorPalette['blue.1'],
221
+ pressed: deepPurpleColorPalette['blue.2']
222
+ },
223
+ info: {
224
+ hi: deepPurpleColorPalette['blue.6'],
225
+ mid: deepPurpleColorPalette['blue.1']
226
+ },
227
+ success: {
228
+ hi: deepPurpleColorPalette['green.6'],
229
+ mid: deepPurpleColorPalette['green.1']
230
+ },
231
+ warning: {
232
+ hi: deepPurpleColorPalette['yellow.6'],
233
+ mid: deepPurpleColorPalette['yellow.1']
234
+ },
235
+ danger: {
236
+ hi: deepPurpleColorPalette['red.6'],
237
+ mid: deepPurpleColorPalette['red.1']
238
+ },
239
+ disabled: {
240
+ hi: deepPurpleColorPalette['grey.3'],
241
+ mid: deepPurpleColorPalette['grey.1']
242
+ },
243
+ overlay: deepPurpleColorPalette['grey-alpha.50']
244
+ },
245
+ border: {
246
+ base: {
247
+ hi: deepPurpleColorPalette['grey.9'],
248
+ mid: deepPurpleColorPalette['beige.3'],
249
+ onContrasted: {
250
+ hi: deepPurpleColorPalette['grey.0'],
251
+ mid: deepPurpleColorPalette['white-alpha.20']
252
+ }
253
+ },
254
+ accent: deepPurpleColorPalette['deepPurple.8'],
255
+ info: deepPurpleColorPalette['blue.6'],
256
+ success: deepPurpleColorPalette['green.6'],
257
+ warning: deepPurpleColorPalette['yellow.6'],
258
+ danger: deepPurpleColorPalette['red.6'],
259
+ disabled: deepPurpleColorPalette['grey.2']
260
+ }
164
261
  }
165
262
  };
166
263
 
@@ -11589,7 +11686,7 @@ function NavigationBottomSheet({
11589
11686
  snapPoints,
11590
11687
  maxDynamicContentSize,
11591
11688
  isVisible,
11592
- isExpanded = false,
11689
+ isExpanded,
11593
11690
  onClose
11594
11691
  }) {
11595
11692
  const bottomSheetRef = useBottomSheet();
@@ -11601,8 +11698,7 @@ function NavigationBottomSheet({
11601
11698
  }
11602
11699
  }, [bottomSheetRef, isVisible]);
11603
11700
  useEffect(() => {
11604
- if (!isVisible) return;
11605
- if (isExpanded) {
11701
+ if (isVisible && isExpanded) {
11606
11702
  bottomSheetRef.current?.expand();
11607
11703
  } else {
11608
11704
  bottomSheetRef.current?.collapse();
@@ -13853,6 +13949,16 @@ const TypographyLink = /*#__PURE__*/forwardRef(({
13853
13949
  });
13854
13950
  });
13855
13951
 
13952
+ const ChromaticReducedMotionDecorator = makeDecorator({
13953
+ name: 'ChromaticReducedMotionDecorator',
13954
+ parameterName: 'chromaticReducedMotion',
13955
+ wrapper: (storyFn, context) => /*#__PURE__*/jsxs(Fragment, {
13956
+ children: [isChromatic() ? /*#__PURE__*/jsx(ReducedMotionConfig, {
13957
+ mode: ReduceMotion.Always
13958
+ }) : null, storyFn(context)]
13959
+ })
13960
+ });
13961
+
13856
13962
  function KittThemeProvider({
13857
13963
  isSSR,
13858
13964
  children,
@@ -14210,5 +14316,5 @@ function VerticalSteps({
14210
14316
  VerticalSteps.Step = Step;
14211
14317
  VerticalSteps.BorderlessStep = BorderlessStep;
14212
14318
 
14213
- export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, ButtonBadge, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, NavigationBottomSheet, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Sticker, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, TopNavBar, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
14319
+ export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, ButtonBadge, CardModal, Center, Checkbox, ChoicesElements, ChromaticReducedMotionDecorator, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, NavigationBottomSheet, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Sticker, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, TopNavBar, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
14214
14320
  //# sourceMappingURL=index-node-22.17.es.mjs.map