@ornikar/kitt-universal 4.2.0 → 4.4.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 (99) hide show
  1. package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +1 -1
  2. package/dist/definitions/ListItem/ListItem.d.ts.map +1 -1
  3. package/dist/definitions/Tooltip/Tooltip.d.ts.map +1 -1
  4. package/dist/definitions/forms/Checkbox/Checkbox.d.ts +13 -0
  5. package/dist/definitions/forms/Checkbox/Checkbox.d.ts.map +1 -0
  6. package/dist/definitions/forms/InputEmail/InputEmail.d.ts +7 -0
  7. package/dist/definitions/forms/InputEmail/InputEmail.d.ts.map +1 -0
  8. package/dist/definitions/forms/InputPhone/InputPhone.d.ts +7 -0
  9. package/dist/definitions/forms/InputPhone/InputPhone.d.ts.map +1 -0
  10. package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
  11. package/dist/definitions/forms/InputText/InputTextContainer.d.ts +8 -0
  12. package/dist/definitions/forms/InputText/InputTextContainer.d.ts.map +1 -0
  13. package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +11 -0
  14. package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts.map +1 -0
  15. package/dist/definitions/index.d.ts +6 -0
  16. package/dist/definitions/index.d.ts.map +1 -1
  17. package/dist/definitions/themes/default.d.ts +31 -93
  18. package/dist/definitions/themes/default.d.ts.map +1 -1
  19. package/dist/definitions/themes/late-ocean/{avatarLateOceanTheme.d.ts → avatar.d.ts} +2 -2
  20. package/dist/definitions/themes/late-ocean/avatar.d.ts.map +1 -0
  21. package/dist/definitions/themes/late-ocean/button.d.ts +6 -6
  22. package/dist/definitions/themes/late-ocean/card.d.ts +13 -0
  23. package/dist/definitions/themes/late-ocean/card.d.ts.map +1 -0
  24. package/dist/definitions/themes/late-ocean/checkbox.d.ts +13 -0
  25. package/dist/definitions/themes/late-ocean/checkbox.d.ts.map +1 -0
  26. package/dist/definitions/themes/late-ocean/{colorsLateOceanTheme.d.ts → colors.d.ts} +2 -2
  27. package/dist/definitions/themes/late-ocean/colors.d.ts.map +1 -0
  28. package/dist/definitions/themes/late-ocean/{feedbackMessage.d.ts → feedback.d.ts} +1 -1
  29. package/dist/definitions/themes/late-ocean/feedback.d.ts.map +1 -0
  30. package/dist/definitions/themes/late-ocean/forms.d.ts +13 -17
  31. package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
  32. package/dist/definitions/themes/late-ocean/{fullScreenModalLateOceanTheme.d.ts → fullScreenModal.d.ts} +2 -2
  33. package/dist/definitions/themes/late-ocean/fullScreenModal.d.ts.map +1 -0
  34. package/dist/definitions/themes/late-ocean/input.d.ts +9 -4
  35. package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -1
  36. package/dist/definitions/themes/late-ocean/inputField.d.ts +5 -0
  37. package/dist/definitions/themes/late-ocean/inputField.d.ts.map +1 -0
  38. package/dist/definitions/themes/late-ocean/listItem.d.ts +8 -0
  39. package/dist/definitions/themes/late-ocean/listItem.d.ts.map +1 -0
  40. package/dist/definitions/themes/late-ocean/{radioLateOceanTheme.d.ts → radio.d.ts} +6 -5
  41. package/dist/definitions/themes/late-ocean/radio.d.ts.map +1 -0
  42. package/dist/definitions/themes/late-ocean/shadows.d.ts +4 -0
  43. package/dist/definitions/themes/late-ocean/shadows.d.ts.map +1 -0
  44. package/dist/definitions/themes/late-ocean/{skeletonTheme.d.ts → skeleton.d.ts} +2 -2
  45. package/dist/definitions/themes/late-ocean/skeleton.d.ts.map +1 -0
  46. package/dist/definitions/themes/late-ocean/tag.d.ts +18 -0
  47. package/dist/definitions/themes/late-ocean/tag.d.ts.map +1 -0
  48. package/dist/definitions/themes/late-ocean/{typographyLateOceanTheme.d.ts → typography.d.ts} +5 -4
  49. package/dist/definitions/themes/late-ocean/typography.d.ts.map +1 -0
  50. package/dist/definitions/themes/palettes/lateOceanColorPalette.d.ts +1 -0
  51. package/dist/definitions/themes/palettes/lateOceanColorPalette.d.ts.map +1 -1
  52. package/dist/definitions/typography/Typography.d.ts +2 -2
  53. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  54. package/dist/definitions/typography/TypographyEmoji.d.ts.map +1 -1
  55. package/dist/index-browser-all.es.android.js +1127 -1020
  56. package/dist/index-browser-all.es.android.js.map +1 -1
  57. package/dist/index-browser-all.es.ios.js +1127 -1020
  58. package/dist/index-browser-all.es.ios.js.map +1 -1
  59. package/dist/index-browser-all.es.js +1127 -1020
  60. package/dist/index-browser-all.es.js.map +1 -1
  61. package/dist/index-browser-all.es.web.js +1159 -1024
  62. package/dist/index-browser-all.es.web.js.map +1 -1
  63. package/dist/index-node-14.17.cjs.js +983 -876
  64. package/dist/index-node-14.17.cjs.js.map +1 -1
  65. package/dist/index-node-14.17.cjs.web.css +1 -0
  66. package/dist/index-node-14.17.cjs.web.js +1125 -989
  67. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  68. package/dist/linaria-themes-browser-all.es.android.js +120 -100
  69. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  70. package/dist/linaria-themes-browser-all.es.ios.js +120 -100
  71. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  72. package/dist/linaria-themes-browser-all.es.js +120 -100
  73. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  74. package/dist/linaria-themes-browser-all.es.web.js +120 -100
  75. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  76. package/dist/linaria-themes-node-14.17.cjs.js +120 -100
  77. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  78. package/dist/linaria-themes-node-14.17.cjs.web.js +120 -100
  79. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  80. package/dist/styles.css +1 -0
  81. package/dist/tsbuildinfo +1 -1
  82. package/package.json +4 -4
  83. package/dist/definitions/themes/late-ocean/avatarLateOceanTheme.d.ts.map +0 -1
  84. package/dist/definitions/themes/late-ocean/cardLateOceanTheme.d.ts +0 -18
  85. package/dist/definitions/themes/late-ocean/cardLateOceanTheme.d.ts.map +0 -1
  86. package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts.map +0 -1
  87. package/dist/definitions/themes/late-ocean/feedbackMessage.d.ts.map +0 -1
  88. package/dist/definitions/themes/late-ocean/fullScreenModalLateOceanTheme.d.ts.map +0 -1
  89. package/dist/definitions/themes/late-ocean/inputFieldLateOceanTheme.d.ts +0 -5
  90. package/dist/definitions/themes/late-ocean/inputFieldLateOceanTheme.d.ts.map +0 -1
  91. package/dist/definitions/themes/late-ocean/listItemLateOceanTheme.d.ts +0 -7
  92. package/dist/definitions/themes/late-ocean/listItemLateOceanTheme.d.ts.map +0 -1
  93. package/dist/definitions/themes/late-ocean/radioLateOceanTheme.d.ts.map +0 -1
  94. package/dist/definitions/themes/late-ocean/shadowsLateOceanTheme.d.ts +0 -4
  95. package/dist/definitions/themes/late-ocean/shadowsLateOceanTheme.d.ts.map +0 -1
  96. package/dist/definitions/themes/late-ocean/skeletonTheme.d.ts.map +0 -1
  97. package/dist/definitions/themes/late-ocean/tagLateOceanTheme.d.ts +0 -41
  98. package/dist/definitions/themes/late-ocean/tagLateOceanTheme.d.ts.map +0 -1
  99. package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts.map +0 -1
@@ -175,8 +175,8 @@ const StyledTypography = /*#__PURE__*/styled__default(BabelPluginStyledComponent
175
175
  /* type */
176
176
  ${!$typeForCurrentWindowSize ? '' : `
177
177
  font-family: ${$isHeader ? headers.fontFamily[$variant] : bodies.fontFamily[$variant]};
178
- font-size: ${$isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize};
179
- line-height: ${$isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight};
178
+ font-size: ${$isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize}px;
179
+ line-height: ${$isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight}px;
180
180
  `}
181
181
 
182
182
  /* variant */
@@ -322,7 +322,7 @@ const StyledAvatarView = /*#__PURE__*/styled__default(BabelPluginStyledComponent
322
322
  $size
323
323
  }) => {
324
324
  if ($isRound) return `${$size / 2}px`;
325
- return theme.kitt.avatar.borderRadius;
325
+ return `${theme.kitt.avatar.borderRadius}px`;
326
326
  }, ({
327
327
  theme,
328
328
  $isLight
@@ -430,7 +430,7 @@ const AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/react$1.styled(
430
430
  }],
431
431
  "a1vkj3mh-7": [({
432
432
  theme
433
- }) => theme.kitt.button.borderRadius],
433
+ }) => theme.kitt.button.borderRadius, "px"],
434
434
  "a1vkj3mh-8": [({
435
435
  theme
436
436
  }) => `opacity ${theme.kitt.button.transition.duration} ${theme.kitt.button.transition.timingFunction}`],
@@ -439,20 +439,20 @@ const AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/react$1.styled(
439
439
  }) => $isDisabled ? 1 : 0],
440
440
  "a1vkj3mh-10": [({
441
441
  theme
442
- }) => `-${theme.kitt.button.borderWidth.disabled}`],
442
+ }) => `-${theme.kitt.button.borderWidth.disabled}px`],
443
443
  "a1vkj3mh-12": [({
444
444
  theme
445
- }) => `calc(100% - ${parseInt(theme.kitt.button.borderWidth.disabled, 10) * 0.5}px)`],
445
+ }) => `calc(100% - ${theme.kitt.button.borderWidth.disabled * 0.5}px)`],
446
446
  "a1vkj3mh-14": [({
447
447
  theme
448
- }) => `${theme.kitt.button.disabled.borderColor} solid ${theme.kitt.button.borderWidth.disabled}`],
448
+ }) => `${theme.kitt.button.borderWidth.disabled}px solid ${theme.kitt.button.disabled.borderColor}`],
449
449
  "a1vkj3mh-15": [({
450
450
  theme,
451
451
  $type
452
- }) => `${theme.kitt.button.borderWidth.focus} solid ${theme.kitt.button[$type].focusBorderColor}`],
452
+ }) => `${theme.kitt.button.borderWidth.focus}px solid ${theme.kitt.button[$type].focusBorderColor}`],
453
453
  "a1vkj3mh-16": [({
454
454
  theme
455
- }) => `-${theme.kitt.button.borderWidth.focus}`],
455
+ }) => `-${theme.kitt.button.borderWidth.focus}px`],
456
456
  "a1vkj3mh-18": [({
457
457
  theme,
458
458
  $type,
@@ -503,12 +503,12 @@ const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
503
503
  const BaseStyledButtonPressable = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
504
504
  displayName: "BaseStyledButtonPressable",
505
505
  componentId: "kitt-universal__sc-4k8lse-0"
506
- })(["position:relative;min-width:", ";max-width:", ";width:", ";min-height:", ";border-radius:", ";flex-direction:row;align-items:center;justify-content:center;align-self:flex-start;background-color:", ";padding:", ";"], ({
506
+ })(["position:relative;min-width:", "px;max-width:", ";width:", ";min-height:", "px;border-radius:", "px;flex-direction:row;align-items:center;justify-content:center;align-self:flex-start;background-color:", ";padding:", ";"], ({
507
507
  theme
508
508
  }) => theme.kitt.button.minWidth, ({
509
509
  theme,
510
510
  $isStretch
511
- }) => $isStretch ? '100%' : theme.kitt.button.maxWidth, ({
511
+ }) => $isStretch ? '100%' : `${theme.kitt.button.maxWidth}px`, ({
512
512
  $isStretch
513
513
  }) => $isStretch ? '100%' : 'auto', ({
514
514
  theme
@@ -780,12 +780,12 @@ const Button = /*#__PURE__*/react.forwardRef(({
780
780
  const Container$3 = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
781
781
  displayName: "Card__Container",
782
782
  componentId: "kitt-universal__sc-1n9psug-0"
783
- })(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], ({
783
+ })(["background-color:", ";padding:", "px;border-radius:", "px;border-width:", "px;border-color:", ";"], ({
784
784
  theme,
785
785
  type
786
786
  }) => theme.kitt.card[type].backgroundColor, ({
787
787
  theme
788
- }) => theme.kitt.card.padding, ({
788
+ }) => theme.kitt.spacing * 4, ({
789
789
  theme
790
790
  }) => theme.kitt.card.borderRadius, ({
791
791
  theme
@@ -853,168 +853,723 @@ function ExternalLink({
853
853
  });
854
854
  }
855
855
 
856
- const getColorFromState = state => {
857
- switch (state) {
858
- case 'invalid':
859
- return 'danger';
856
+ const lateOceanColorPalette = {
857
+ lateOcean: '#4C34E0',
858
+ lateOceanLight1: '#705DE6',
859
+ lateOceanLight2: '#9485EC',
860
+ lateOceanLight3: '#D6BAF9',
861
+ warmEmbrace: '#F4D3CE',
862
+ warmEmbraceLight1: '#FFEDE6',
863
+ black1000: '#000000',
864
+ black800: '#2C293D',
865
+ black555: '#737373',
866
+ black200: '#CCCCCC',
867
+ black100: '#E5E5E5',
868
+ black50: '#F2F2F2',
869
+ black25: '#F9F9F9',
870
+ white: '#FFFFFF',
871
+ viride: '#38836D',
872
+ englishVermillon: '#D44148',
873
+ goldCrayola: '#F8C583',
874
+ aero: '#89BDDD',
875
+ transparent: 'transparent',
876
+ moonPurple: '#DBD6F9',
877
+ moonPurpleLight1: '#EDEBFC'
878
+ };
860
879
 
861
- case 'valid':
862
- default:
863
- return 'black-light';
880
+ const colors = {
881
+ primary: lateOceanColorPalette.lateOcean,
882
+ primaryLight: lateOceanColorPalette.lateOceanLight1,
883
+ accent: lateOceanColorPalette.warmEmbrace,
884
+ accentLight: lateOceanColorPalette.warmEmbraceLight1,
885
+ success: lateOceanColorPalette.viride,
886
+ correct: lateOceanColorPalette.viride,
887
+ danger: lateOceanColorPalette.englishVermillon,
888
+ info: lateOceanColorPalette.aero,
889
+ warning: lateOceanColorPalette.goldCrayola,
890
+ separator: lateOceanColorPalette.black100,
891
+ hover: lateOceanColorPalette.black100,
892
+ black: lateOceanColorPalette.black1000,
893
+ uiBackground: lateOceanColorPalette.black25,
894
+ uiBackgroundLight: lateOceanColorPalette.white,
895
+ transparent: lateOceanColorPalette.transparent,
896
+ disabled: lateOceanColorPalette.black50,
897
+ overlay: {
898
+ dark: 'rgba(41, 48, 51, 0.25)',
899
+ light: 'rgba(255, 255, 255, 0.90)',
900
+ fullscreenLoader: 'rgba(0, 0, 0, 0.25)'
864
901
  }
865
902
  };
866
903
 
867
- function InputFeedback({
868
- state,
869
- testID,
870
- children
871
- }) {
872
- return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
873
- base: "body-small",
874
- color: getColorFromState(state),
875
- testID: testID,
876
- children: children
877
- });
878
- }
879
-
880
- const FieldContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
881
- displayName: "InputField__FieldContainer",
882
- componentId: "kitt-universal__sc-13fkixs-0"
883
- })(["padding:5px 0 10px;"]);
884
- const FeedbackContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
885
- displayName: "InputField__FeedbackContainer",
886
- componentId: "kitt-universal__sc-13fkixs-1"
887
- })(["", ";"], ({
888
- theme
889
- }) => theme.responsive.ifWindowSizeMatches({
890
- minWidth: KittBreakpoints.SMALL
891
- }, 'padding-top: 10px', 'padding-top: 5px'));
892
- const FieldLabelContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
893
- displayName: "InputField__FieldLabelContainer",
894
- componentId: "kitt-universal__sc-13fkixs-2"
895
- })(["flex-direction:row;align-items:center;padding-bottom:", "px;"], ({
896
- theme
897
- }) => theme.kitt.forms.inputField.labelContainerPaddingBottom);
898
- const LabelContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
899
- displayName: "InputField__LabelContainer",
900
- componentId: "kitt-universal__sc-13fkixs-3"
901
- })(["margin-right:", "px;"], ({
902
- theme
903
- }) => theme.kitt.forms.inputField.iconMarginLeft);
904
- function InputField({
905
- label,
906
- labelFeedback,
907
- input,
908
- feedback
909
- }) {
910
- return /*#__PURE__*/jsxRuntime.jsxs(FieldContainer, {
911
- children: [label ? /*#__PURE__*/jsxRuntime.jsxs(FieldLabelContainer, {
912
- children: [/*#__PURE__*/jsxRuntime.jsx(LabelContainer, {
913
- children: label
914
- }), labelFeedback]
915
- }) : null, input, feedback ? /*#__PURE__*/jsxRuntime.jsx(FeedbackContainer, {
916
- children: feedback
917
- }) : null]
918
- });
919
- }
920
-
921
- function getIconColor(state, disabled) {
922
- if (disabled) return 'black-light';
923
-
924
- switch (state) {
925
- case 'invalid':
926
- return 'danger';
927
-
928
- case 'valid':
929
- return 'success';
930
-
931
- default:
932
- return undefined;
904
+ const avatar = {
905
+ borderRadius: 10,
906
+ default: {
907
+ backgroundColor: colors.primary
908
+ },
909
+ light: {
910
+ backgroundColor: lateOceanColorPalette.black100
933
911
  }
934
- }
935
-
936
- function InputIcon({
937
- icon,
938
- state,
939
- disabled
940
- }) {
941
- const theme = /*#__PURE__*/styled.useTheme();
942
- const color = getIconColor(state, disabled);
943
- return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
944
- color: color,
945
- icon: icon,
946
- size: theme.kitt.forms.input.icon.size
947
- });
948
- }
949
-
950
- function InputPressable({ ...props
951
- }) {
952
- return /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.Pressable, { ...props
953
- });
954
- }
912
+ };
955
913
 
956
- const styledTextInputMixin = /*#__PURE__*/styled.css(["background-color:", ";border-width:", ";border-radius:", ";border-color:", ";font-size:", ";color:", ";font-family:", ";"], ({
957
- theme,
958
- $state
959
- }) => $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states.default.backgroundColor, ({
960
- theme
961
- }) => theme.kitt.forms.input.borderWidth, ({
962
- theme
963
- }) => theme.kitt.forms.input.borderRadius, ({
964
- theme,
965
- $state
966
- }) => theme.kitt.forms.input.states[$state].borderColor, ({
967
- theme
968
- }) => {
969
- const typeConfigKey = getTypographyTypeConfigKey(theme);
970
- return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize;
971
- }, ({
972
- theme,
973
- $state
974
- }) => theme.kitt.typography.colors[theme.kitt.forms.input.states[$state].color], ({
975
- theme
976
- }) => theme.kitt.typography.types.bodies.fontFamily.regular);
914
+ const button = {
915
+ borderRadius: 30,
916
+ borderWidth: {
917
+ disabled: 2,
918
+ focus: 3
919
+ },
920
+ minHeight: 40,
921
+ minWidth: 40,
922
+ maxWidth: 335,
923
+ scale: {
924
+ base: {
925
+ default: 1,
926
+ hover: 0.95,
927
+ active: 0.95
928
+ },
929
+ medium: {
930
+ hover: 1.05
931
+ }
932
+ },
933
+ contentPadding: {
934
+ default: '8px 16px 7px',
935
+ large: '12px 24px 11px',
936
+ disabled: '6px 14px 5px'
937
+ },
938
+ transition: {
939
+ duration: '200ms',
940
+ timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
941
+ },
942
+ default: {
943
+ backgroundColor: 'rgba(0, 0, 0, 0.05)',
944
+ pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
945
+ hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
946
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)'
947
+ },
948
+ primary: {
949
+ backgroundColor: colors.primary,
950
+ pressedBackgroundColor: colors.primaryLight,
951
+ hoverBackgroundColor: colors.primaryLight,
952
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)'
953
+ },
954
+ white: {
955
+ backgroundColor: 'rgba(255, 255, 255, 0.05)',
956
+ pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
957
+ hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
958
+ focusBorderColor: 'rgba(255, 255, 255, 0.1)'
959
+ },
960
+ subtle: {
961
+ backgroundColor: colors.transparent,
962
+ pressedBackgroundColor: colors.transparent,
963
+ hoverBackgroundColor: colors.transparent,
964
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)',
965
+ color: colors.primary,
966
+ hoverColor: 'rgba(76, 52, 224, 0.8)',
967
+ activeColor: 'rgba(76, 52, 224, 0.8)'
968
+ },
969
+ 'subtle-dark': {
970
+ backgroundColor: colors.transparent,
971
+ pressedBackgroundColor: colors.transparent,
972
+ hoverBackgroundColor: colors.transparent,
973
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)',
974
+ color: colors.black,
975
+ hoverColor: 'rgba(0, 0, 0, 0.8)',
976
+ activeColor: 'rgba(0, 0, 0, 0.8)'
977
+ },
978
+ disabled: {
979
+ backgroundColor: colors.disabled,
980
+ pressedBackgroundColor: colors.disabled,
981
+ hoverBackgroundColor: colors.disabled,
982
+ focusBorderColor: lateOceanColorPalette.black100,
983
+ borderColor: lateOceanColorPalette.black100
984
+ }
985
+ };
977
986
 
978
- function getInputUIState({
979
- isFocused,
980
- isDisabled,
981
- formState
982
- }) {
983
- if (isDisabled) return 'disabled';
984
- if (isFocused) return 'focus';
985
- if (formState === 'invalid') return 'invalid';
986
- return 'default';
987
- }
987
+ const card = {
988
+ borderRadius: 20,
989
+ borderWidth: 2,
990
+ primary: {
991
+ backgroundColor: colors.uiBackgroundLight,
992
+ borderColor: colors.primary
993
+ },
994
+ secondary: {
995
+ backgroundColor: colors.uiBackgroundLight,
996
+ borderColor: colors.separator
997
+ },
998
+ subtle: {
999
+ backgroundColor: lateOceanColorPalette.black50,
1000
+ borderColor: colors.separator
1001
+ }
1002
+ };
988
1003
 
989
- const StyledTextInput = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.TextInput).withConfig({
990
- displayName: "InputText__StyledTextInput",
991
- componentId: "kitt-universal__sc-uke279-0"
992
- })(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, ({
993
- theme,
994
- multiline
995
- }) => {
996
- if (!multiline && "web" === 'ios') {
997
- return theme.kitt.forms.input.padding.iOSSingleLine;
1004
+ const feedbackMessage = {
1005
+ danger: {
1006
+ backgroundColor: colors.danger
1007
+ },
1008
+ success: {
1009
+ backgroundColor: colors.success
1010
+ },
1011
+ info: {
1012
+ backgroundColor: colors.info
1013
+ },
1014
+ warning: {
1015
+ backgroundColor: colors.warning
998
1016
  }
1017
+ };
999
1018
 
1000
- return theme.kitt.forms.input.padding.default;
1001
- }, ({
1002
- theme,
1003
- multiline
1019
+ const checkbox = {
1020
+ borderWidth: 2,
1021
+ borderRadius: 5,
1022
+ height: 20,
1023
+ width: 20,
1024
+ iconSize: 14,
1025
+ borderColor: colors.separator,
1026
+ backgroundColor: colors.uiBackgroundLight,
1027
+ checkedBorderColor: colors.primary,
1028
+ checkedBackgroundColor: colors.primary,
1029
+ markColor: colors.uiBackgroundLight
1030
+ };
1031
+
1032
+ const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
1033
+ const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
1034
+ baseAndSmall: {
1035
+ fontSize: baseAndSmallFontSize,
1036
+ lineHeight: calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)
1037
+ },
1038
+ mediumAndWide: {
1039
+ fontSize: mediumAndWideFontSize,
1040
+ lineHeight: calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)
1041
+ }
1042
+ });
1043
+ const typography = {
1044
+ colors: {
1045
+ black: lateOceanColorPalette.black1000,
1046
+ 'black-anthracite': lateOceanColorPalette.black800,
1047
+ 'black-light': lateOceanColorPalette.black555,
1048
+ white: lateOceanColorPalette.white,
1049
+ 'white-light': lateOceanColorPalette.white,
1050
+ primary: lateOceanColorPalette.lateOcean,
1051
+ 'primary-light': lateOceanColorPalette.lateOceanLight1,
1052
+ accent: lateOceanColorPalette.warmEmbrace,
1053
+ success: lateOceanColorPalette.viride,
1054
+ danger: lateOceanColorPalette.englishVermillon
1055
+ },
1056
+ types: {
1057
+ headers: {
1058
+ fontFamily: {
1059
+ regular: 'Moderat',
1060
+ bold: 'Moderat'
1061
+ },
1062
+ fontWeight: 400,
1063
+ fontStyle: 'normal',
1064
+ configs: {
1065
+ // also known as xxlarge
1066
+ header1: createTypographyTypeConfig(1.3, 38, 62),
1067
+ // also known as xlarge
1068
+ header2: createTypographyTypeConfig(1.3, 32, 48),
1069
+ // also known as medium
1070
+ header3: createTypographyTypeConfig(1.3, 24, 36),
1071
+ // also known as xsmall
1072
+ header4: createTypographyTypeConfig(1.3, 18, 24),
1073
+ // also known as xxsmall
1074
+ header5: createTypographyTypeConfig(1.3, 18, 18)
1075
+ }
1076
+ },
1077
+ bodies: {
1078
+ fontFamily: {
1079
+ regular: 'Noto Sans',
1080
+ bold: 'Noto Sans'
1081
+ },
1082
+ fontWeight: {
1083
+ regular: 400,
1084
+ bold: 700
1085
+ },
1086
+ fontStyle: {
1087
+ regular: 'normal',
1088
+ bold: 'normal'
1089
+ },
1090
+ configs: {
1091
+ 'body-large': createTypographyTypeConfig(1.6, 18, 24),
1092
+ 'body-medium': createTypographyTypeConfig(1.6, 18, 18),
1093
+ body: createTypographyTypeConfig(1.6, 16, 16),
1094
+ 'body-small': createTypographyTypeConfig(1.6, 14, 14),
1095
+ 'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
1096
+ }
1097
+ }
1098
+ },
1099
+ link: {
1100
+ disabledColor: lateOceanColorPalette.black200
1101
+ }
1102
+ };
1103
+
1104
+ const inputStatesStyle = {
1105
+ default: {
1106
+ backgroundColor: colors.uiBackgroundLight,
1107
+ borderColor: colors.separator,
1108
+ color: 'black'
1109
+ },
1110
+ pending: {
1111
+ backgroundColor: colors.uiBackgroundLight,
1112
+ borderColor: colors.separator,
1113
+ color: 'black'
1114
+ },
1115
+ valid: {
1116
+ backgroundColor: colors.uiBackgroundLight,
1117
+ borderColor: lateOceanColorPalette.black100,
1118
+ color: 'black'
1119
+ },
1120
+ hover: {
1121
+ borderColor: lateOceanColorPalette.black200,
1122
+ color: 'black'
1123
+ },
1124
+ focus: {
1125
+ borderColor: colors.primary,
1126
+ color: 'black'
1127
+ },
1128
+ disabled: {
1129
+ backgroundColor: colors.disabled,
1130
+ borderColor: colors.separator,
1131
+ color: 'black-light'
1132
+ },
1133
+ invalid: {
1134
+ borderColor: colors.separator,
1135
+ color: 'black'
1136
+ }
1137
+ };
1138
+ const input = {
1139
+ color: {
1140
+ selection: colors.primary,
1141
+ placeholder: typography.colors['black-light']
1142
+ },
1143
+ borderWidth: 2,
1144
+ borderRadius: 10,
1145
+ icon: {
1146
+ size: 20
1147
+ },
1148
+ padding: {
1149
+ default: '5px 16px',
1150
+ iOSSingleLine: '7px 16px'
1151
+ },
1152
+ transition: {
1153
+ property: 'border-color',
1154
+ duration: '200ms',
1155
+ timingFunction: 'ease-in-out'
1156
+ },
1157
+ states: inputStatesStyle
1158
+ };
1159
+
1160
+ const inputField = {
1161
+ labelContainerPaddingBottom: 5,
1162
+ iconMarginLeft: 6
1163
+ };
1164
+
1165
+ const radio = {
1166
+ size: 18,
1167
+ unchecked: {
1168
+ backgroundColor: colors.uiBackgroundLight,
1169
+ borderWidth: 2,
1170
+ borderColor: lateOceanColorPalette.black200
1171
+ },
1172
+ checked: {
1173
+ backgroundColor: colors.primary,
1174
+ innerSize: 5,
1175
+ innerBackgroundColor: colors.uiBackgroundLight
1176
+ },
1177
+ disabled: {
1178
+ backgroundColor: colors.disabled,
1179
+ borderColor: colors.separator
1180
+ }
1181
+ };
1182
+
1183
+ const textArea = {
1184
+ minHeight: 120
1185
+ };
1186
+
1187
+ const forms = {
1188
+ input,
1189
+ radio,
1190
+ inputField,
1191
+ textArea,
1192
+ checkbox
1193
+ };
1194
+
1195
+ const fullScreenModal = {
1196
+ header: {
1197
+ paddingVertical: 12,
1198
+ paddingHorizontal: 16,
1199
+ borderColor: lateOceanColorPalette.black100
1200
+ }
1201
+ };
1202
+
1203
+ const iconButton = {
1204
+ backgroundColor: 'transparent',
1205
+ width: 40,
1206
+ height: 40,
1207
+ borderRadius: 20,
1208
+ borderWidth: 2,
1209
+ borderColor: 'transparent',
1210
+ transition: {
1211
+ property: 'all',
1212
+ duration: '200ms',
1213
+ timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1);'
1214
+ },
1215
+ scale: {
1216
+ base: {
1217
+ default: 1,
1218
+ hover: 0.95,
1219
+ active: 0.95
1220
+ },
1221
+ medium: {
1222
+ hover: 1.05
1223
+ }
1224
+ },
1225
+ disabled: {
1226
+ scale: 1,
1227
+ backgroundColor: button.disabled.backgroundColor,
1228
+ borderColor: button.disabled.borderColor
1229
+ },
1230
+ default: {
1231
+ pressedBackgroundColor: button.default.pressedBackgroundColor
1232
+ },
1233
+ white: {
1234
+ pressedBackgroundColor: button.white.hoverBackgroundColor
1235
+ }
1236
+ };
1237
+
1238
+ const listItem = {
1239
+ padding: '12px 16px',
1240
+ borderColor: colors.separator,
1241
+ borderWidth: 1,
1242
+ innerMargin: 8
1243
+ };
1244
+
1245
+ const shadows = {
1246
+ medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
1247
+ };
1248
+
1249
+ const skeleton = {
1250
+ backgroundColor: lateOceanColorPalette.black100,
1251
+ flareColor: lateOceanColorPalette.black200,
1252
+ animationDuration: 1000
1253
+ };
1254
+
1255
+ const tag = {
1256
+ borderRadius: 10,
1257
+ padding: '2px 12px',
1258
+ primary: {
1259
+ fill: {
1260
+ backgroundColor: lateOceanColorPalette.moonPurpleLight1,
1261
+ borderWidth: 0,
1262
+ borderColor: colors.transparent
1263
+ },
1264
+ outline: {
1265
+ backgroundColor: colors.transparent,
1266
+ borderWidth: 1,
1267
+ borderColor: colors.primary
1268
+ }
1269
+ },
1270
+ default: {
1271
+ fill: {
1272
+ backgroundColor: lateOceanColorPalette.black50,
1273
+ borderWidth: 0,
1274
+ borderColor: colors.transparent
1275
+ },
1276
+ outline: {
1277
+ backgroundColor: colors.transparent,
1278
+ borderWidth: 1,
1279
+ borderColor: colors.black
1280
+ }
1281
+ },
1282
+ danger: {
1283
+ fill: {
1284
+ backgroundColor: lateOceanColorPalette.warmEmbrace,
1285
+ borderWidth: 0,
1286
+ borderColor: colors.transparent
1287
+ },
1288
+ outline: {
1289
+ backgroundColor: colors.transparent,
1290
+ borderWidth: 1,
1291
+ borderColor: colors.danger
1292
+ }
1293
+ }
1294
+ };
1295
+
1296
+ const tooltip = {
1297
+ backgroundColor: colors.black,
1298
+ borderRadius: 10,
1299
+ opacity: 0.95,
1300
+ horizontalPadding: 16,
1301
+ verticalPadding: 4,
1302
+ floatingPadding: 8
1303
+ };
1304
+
1305
+ const breakpoints = {
1306
+ values: {
1307
+ base: 0,
1308
+ small: 480,
1309
+ medium: 768,
1310
+ large: 1024,
1311
+ wide: 1280
1312
+ },
1313
+ min: {
1314
+ smallBreakpoint: 'min-width: 480px',
1315
+ mediumBreakpoint: 'min-width: 768px',
1316
+ largeBreakpoint: 'min-width: 1024px',
1317
+ wideBreakpoint: 'min-width: 1280px'
1318
+ },
1319
+ max: {
1320
+ smallBreakpoint: 'max-width: 479px',
1321
+ mediumBreakpoint: 'max-width: 767px',
1322
+ largeBreakpoint: 'max-width: 1023px',
1323
+ wideBreakpoint: 'max-width: 1279px'
1324
+ }
1325
+ }; // eslint-disable-next-line unicorn/expiring-todo-comments
1326
+ // TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
1327
+
1328
+ const theme = {
1329
+ spacing: 4,
1330
+ colors,
1331
+ palettes: {
1332
+ lateOcean: lateOceanColorPalette
1333
+ },
1334
+ avatar,
1335
+ button,
1336
+ card,
1337
+ feedbackMessage,
1338
+ forms,
1339
+ typography,
1340
+ tag,
1341
+ shadows,
1342
+ fullScreenModal,
1343
+ iconButton,
1344
+ listItem,
1345
+ tooltip,
1346
+ skeleton,
1347
+ breakpoints
1348
+ };
1349
+
1350
+ function matchWindowSize({
1351
+ width,
1352
+ height
1353
+ }, {
1354
+ minWidth,
1355
+ maxWidth,
1356
+ minHeight,
1357
+ maxHeight
1358
+ }) {
1359
+ const hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
1360
+ const hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
1361
+ return hasWidthMatched && hasHeightMatched;
1362
+ }
1363
+ function useMatchWindowSize(options) {
1364
+ const {
1365
+ width,
1366
+ height
1367
+ } = BabelPluginStyledComponentsReactNative.useWindowDimensions();
1368
+ return matchWindowSize({
1369
+ width,
1370
+ height
1371
+ }, options);
1372
+ }
1373
+
1374
+ // eslint-disable-next-line no-restricted-imports
1375
+ function createWindowSizeHelper(dimensions) {
1376
+ return {
1377
+ matchWindowSize: options => matchWindowSize(dimensions, options),
1378
+ ifWindowSizeMatches: (options, valueIfTrue, valueIfFalse) => matchWindowSize(dimensions, options) ? valueIfTrue : valueIfFalse,
1379
+ mapWindowWidth: (...widthList) => {
1380
+ if ((process.env.NODE_ENV !== "production")) {
1381
+ widthList.slice(1).forEach(([minWidth], index) => {
1382
+ const previousMinWidth = widthList[index][0];
1383
+
1384
+ if (previousMinWidth > minWidth) {
1385
+ throw new Error(`mapWindowWidth: sort your values to be mobile first. ${minWidth} is < ${previousMinWidth}, so ${minWidth} should be before ${previousMinWidth}.`);
1386
+ }
1387
+ });
1388
+ }
1389
+
1390
+ const found = widthList.find(([minWidth, value]) => matchWindowSize(dimensions, {
1391
+ minWidth: Number(minWidth)
1392
+ }));
1393
+ if (!found) return null;
1394
+ return found[1];
1395
+ }
1396
+ };
1397
+ }
1398
+
1399
+ function useKittTheme() {
1400
+ const dimensions = BabelPluginStyledComponentsReactNative.useWindowDimensions();
1401
+ return react.useMemo(() => {
1402
+ return {
1403
+ kitt: theme,
1404
+ responsive: createWindowSizeHelper(dimensions)
1405
+ };
1406
+ }, [dimensions]);
1407
+ }
1408
+
1409
+ const CheckboxAndLabelPressableWrapper = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.Pressable).withConfig({
1410
+ displayName: "Checkbox__CheckboxAndLabelPressableWrapper",
1411
+ componentId: "kitt-universal__sc-1sav1n6-0"
1412
+ })(["display:flex;flex-direction:row;align-items:center;"]);
1413
+ const CheckboxContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1414
+ displayName: "Checkbox__CheckboxContainer",
1415
+ componentId: "kitt-universal__sc-1sav1n6-1"
1416
+ })(["display:flex;flex-direction:row;align-items:center;justify-content:center;height:", "px;width:", "px;position:relative;border-radius:", "px;", " margin-right:", ";"], ({
1417
+ theme
1418
+ }) => theme.kitt.forms.checkbox.height, ({
1419
+ theme
1420
+ }) => theme.kitt.forms.checkbox.width, ({
1421
+ theme
1422
+ }) => theme.kitt.forms.checkbox.borderRadius, ({
1423
+ $isChecked,
1424
+ theme
1425
+ }) => {
1426
+ const {
1427
+ checkedBackgroundColor,
1428
+ checkedBorderColor,
1429
+ borderColor,
1430
+ borderWidth,
1431
+ backgroundColor
1432
+ } = theme.kitt.forms.checkbox;
1433
+
1434
+ if ($isChecked) {
1435
+ return styled.css(["background-color:", ";border:", ";"], checkedBackgroundColor, `${borderWidth}px solid ${checkedBorderColor}`);
1436
+ }
1437
+
1438
+ return styled.css(["background-color:", ";border:", ";"], backgroundColor, `${borderWidth}px solid ${borderColor}`);
1439
+ }, ({
1440
+ theme,
1441
+ $hasLabel
1442
+ }) => {
1443
+ if (!$hasLabel) return '0px';
1444
+ return `${theme.kitt.spacing * 2.5}px;`;
1445
+ });
1446
+ function Checkbox({
1447
+ onChange,
1448
+ onBlur,
1449
+ onFocus,
1450
+ value,
1451
+ hitSlop = 40,
1452
+ id,
1453
+ children
1454
+ }) {
1455
+ const theme = useKittTheme();
1456
+ return /*#__PURE__*/jsxRuntime.jsxs(CheckboxAndLabelPressableWrapper, {
1457
+ accessibilityRole: "checkbox",
1458
+ accessibilityState: {
1459
+ checked: value
1460
+ },
1461
+ hitSlop: hitSlop,
1462
+ onPress: e => {
1463
+ if (onFocus) onFocus(e);
1464
+ if (onChange) onChange(e);
1465
+ if (onBlur) onBlur(e);
1466
+ },
1467
+ children: [/*#__PURE__*/jsxRuntime.jsx(CheckboxContainer, {
1468
+ $isChecked: value,
1469
+ $hasLabel: !!children,
1470
+ testID: id,
1471
+ children: value ? /*#__PURE__*/jsxRuntime.jsx(Icon, {
1472
+ align: "center",
1473
+ color: theme.kitt.forms.checkbox.markColor,
1474
+ size: theme.kitt.forms.checkbox.iconSize,
1475
+ icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.CheckboxMark, {})
1476
+ }) : null
1477
+ }), children]
1478
+ });
1479
+ }
1480
+
1481
+ const styledTextInputMixin = /*#__PURE__*/styled.css(["background-color:", ";border-width:", "px;border-radius:", "px;border-color:", ";font-size:", ";color:", ";font-family:", ";"], ({
1482
+ theme,
1483
+ $state
1484
+ }) => $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states.default.backgroundColor, ({
1485
+ theme
1486
+ }) => theme.kitt.forms.input.borderWidth, ({
1487
+ theme
1488
+ }) => theme.kitt.forms.input.borderRadius, ({
1489
+ theme,
1490
+ $state
1491
+ }) => theme.kitt.forms.input.states[$state].borderColor, ({
1492
+ theme
1493
+ }) => {
1494
+ const typeConfigKey = getTypographyTypeConfigKey(theme);
1495
+ return `${theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize}px`;
1496
+ }, ({
1497
+ theme,
1498
+ $state
1499
+ }) => theme.kitt.typography.colors[theme.kitt.forms.input.states[$state].color], ({
1500
+ theme
1501
+ }) => theme.kitt.typography.types.bodies.fontFamily.regular);
1502
+
1503
+ function getInputUIState({
1504
+ isFocused,
1505
+ isDisabled,
1506
+ formState
1507
+ }) {
1508
+ if (isDisabled) return 'disabled';
1509
+ if (isFocused) return 'focus';
1510
+ if (formState === 'invalid') return 'invalid';
1511
+ return 'default';
1512
+ }
1513
+
1514
+ const InputTextContainer = withTheme( /*#__PURE__*/react$1.styled("div")({
1515
+ name: "InputTextContainer",
1516
+ class: "i1encr9g",
1517
+ vars: {
1518
+ "i1encr9g-0": [({
1519
+ $isDisabled
1520
+ }) => $isDisabled ? 'not-allowed' : 'inherit'],
1521
+ "i1encr9g-1": [({
1522
+ theme
1523
+ }) => {
1524
+ const {
1525
+ property,
1526
+ duration,
1527
+ timingFunction
1528
+ } = theme.kitt.forms.input.transition;
1529
+ return `${property} ${duration} ${timingFunction}`;
1530
+ }],
1531
+ "i1encr9g-2": [({
1532
+ theme,
1533
+ $isDisabled
1534
+ }) => {
1535
+ if ($isDisabled) return theme.kitt.forms.input.states.disabled.borderColor;
1536
+ return theme.kitt.forms.input.states.hover.borderColor;
1537
+ }],
1538
+ "i1encr9g-3": [({
1539
+ theme,
1540
+ $isDisabled
1541
+ }) => {
1542
+ if ($isDisabled) return theme.kitt.forms.input.states.disabled.borderColor;
1543
+ return theme.kitt.forms.input.states.focus.borderColor;
1544
+ }]
1545
+ }
1546
+ }));
1547
+
1548
+ const StyledTextInput = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.TextInput).withConfig({
1549
+ displayName: "InputText__StyledTextInput",
1550
+ componentId: "kitt-universal__sc-uke279-0"
1551
+ })(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, ({
1552
+ theme,
1553
+ multiline
1554
+ }) => {
1555
+ if (!multiline && "web" === 'ios') {
1556
+ return theme.kitt.forms.input.padding.iOSSingleLine;
1557
+ }
1558
+
1559
+ return theme.kitt.forms.input.padding.default;
1560
+ }, ({
1561
+ theme,
1562
+ multiline
1004
1563
  }) => {
1005
1564
  if (!multiline && "web" === 'ios') return 0;
1006
1565
  const typeConfigKey = getTypographyTypeConfigKey(theme);
1007
- return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight;
1566
+ return `${theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight}px`;
1008
1567
  }, ({
1009
1568
  $minHeight
1010
1569
  }) => $minHeight);
1011
- const InputTextContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1012
- displayName: "InputText__InputTextContainer",
1013
- componentId: "kitt-universal__sc-uke279-1"
1014
- })(["position:relative;"]);
1015
1570
  const RightInputContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1016
1571
  displayName: "InputText__RightInputContainer",
1017
- componentId: "kitt-universal__sc-uke279-2"
1572
+ componentId: "kitt-universal__sc-uke279-1"
1018
1573
  })(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
1019
1574
  const InputText = /*#__PURE__*/react.forwardRef(({
1020
1575
  id,
@@ -1039,6 +1594,7 @@ const InputText = /*#__PURE__*/react.forwardRef(({
1039
1594
  formState
1040
1595
  });
1041
1596
  return /*#__PURE__*/jsxRuntime.jsxs(InputTextContainer, {
1597
+ $isDisabled: disabled,
1042
1598
  children: [/*#__PURE__*/jsxRuntime.jsx(StyledTextInput, {
1043
1599
  ref: ref,
1044
1600
  nativeID: id,
@@ -1064,7 +1620,116 @@ const InputText = /*#__PURE__*/react.forwardRef(({
1064
1620
  children: right
1065
1621
  }) : null]
1066
1622
  });
1067
- });
1623
+ });
1624
+
1625
+ function InputEmail(props) {
1626
+ return /*#__PURE__*/jsxRuntime.jsx(InputText, {
1627
+ autoCompleteType: "email",
1628
+ keyboardType: "email-address",
1629
+ textContentType: "emailAddress",
1630
+ ...props
1631
+ });
1632
+ }
1633
+
1634
+ const getColorFromState = state => {
1635
+ switch (state) {
1636
+ case 'invalid':
1637
+ return 'danger';
1638
+
1639
+ case 'valid':
1640
+ default:
1641
+ return 'black-light';
1642
+ }
1643
+ };
1644
+
1645
+ function InputFeedback({
1646
+ state,
1647
+ testID,
1648
+ children
1649
+ }) {
1650
+ return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
1651
+ base: "body-small",
1652
+ color: getColorFromState(state),
1653
+ testID: testID,
1654
+ children: children
1655
+ });
1656
+ }
1657
+
1658
+ const FieldContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1659
+ displayName: "InputField__FieldContainer",
1660
+ componentId: "kitt-universal__sc-13fkixs-0"
1661
+ })(["padding:5px 0 10px;"]);
1662
+ const FeedbackContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1663
+ displayName: "InputField__FeedbackContainer",
1664
+ componentId: "kitt-universal__sc-13fkixs-1"
1665
+ })(["", ";"], ({
1666
+ theme
1667
+ }) => theme.responsive.ifWindowSizeMatches({
1668
+ minWidth: KittBreakpoints.SMALL
1669
+ }, 'padding-top: 10px', 'padding-top: 5px'));
1670
+ const FieldLabelContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1671
+ displayName: "InputField__FieldLabelContainer",
1672
+ componentId: "kitt-universal__sc-13fkixs-2"
1673
+ })(["flex-direction:row;align-items:center;padding-bottom:", "px;"], ({
1674
+ theme
1675
+ }) => theme.kitt.forms.inputField.labelContainerPaddingBottom);
1676
+ const LabelContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1677
+ displayName: "InputField__LabelContainer",
1678
+ componentId: "kitt-universal__sc-13fkixs-3"
1679
+ })(["margin-right:", "px;"], ({
1680
+ theme
1681
+ }) => theme.kitt.forms.inputField.iconMarginLeft);
1682
+ function InputField({
1683
+ label,
1684
+ labelFeedback,
1685
+ input,
1686
+ feedback
1687
+ }) {
1688
+ return /*#__PURE__*/jsxRuntime.jsxs(FieldContainer, {
1689
+ children: [label ? /*#__PURE__*/jsxRuntime.jsxs(FieldLabelContainer, {
1690
+ children: [/*#__PURE__*/jsxRuntime.jsx(LabelContainer, {
1691
+ children: label
1692
+ }), labelFeedback]
1693
+ }) : null, input, feedback ? /*#__PURE__*/jsxRuntime.jsx(FeedbackContainer, {
1694
+ children: feedback
1695
+ }) : null]
1696
+ });
1697
+ }
1698
+
1699
+ function getIconColor(state, disabled) {
1700
+ if (disabled) return 'black-light';
1701
+
1702
+ switch (state) {
1703
+ case 'invalid':
1704
+ return 'danger';
1705
+
1706
+ case 'valid':
1707
+ return 'success';
1708
+
1709
+ default:
1710
+ return undefined;
1711
+ }
1712
+ }
1713
+
1714
+ function InputIcon({
1715
+ icon,
1716
+ state,
1717
+ disabled
1718
+ }) {
1719
+ const theme = /*#__PURE__*/styled.useTheme();
1720
+ const color = getIconColor(state, disabled);
1721
+ return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
1722
+ color: color,
1723
+ icon: icon,
1724
+ size: theme.kitt.forms.input.icon.size
1725
+ });
1726
+ }
1727
+
1728
+ function InputPressable({ ...props
1729
+ }) {
1730
+ return /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.Pressable, { ...props
1731
+ });
1732
+ }
1068
1733
 
1069
1734
  function InputPassword({
1070
1735
  isPasswordDefaultVisible,
@@ -1087,6 +1752,14 @@ function InputPassword({
1087
1752
  });
1088
1753
  }
1089
1754
 
1755
+ function InputPhone(props) {
1756
+ return /*#__PURE__*/jsxRuntime.jsx(InputText, { ...props,
1757
+ autoCompleteType: "tel",
1758
+ keyboardType: "number-pad",
1759
+ textContentType: "telephoneNumber"
1760
+ });
1761
+ }
1762
+
1090
1763
  function Label({
1091
1764
  htmlFor,
1092
1765
  children
@@ -1103,7 +1776,7 @@ function Label({
1103
1776
  const OuterRadio = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1104
1777
  displayName: "Radio__OuterRadio",
1105
1778
  componentId: "kitt-universal__sc-1mdgr2o-0"
1106
- })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", ";border-color:", ";"], ({
1779
+ })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", "px;border-color:", ";"], ({
1107
1780
  theme,
1108
1781
  disabled
1109
1782
  }) => theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].backgroundColor, ({
@@ -1518,10 +2191,10 @@ const SideContainerView = /*#__PURE__*/styled__default(BabelPluginStyledComponen
1518
2191
  })(["flex-direction:row;margin-left:", ";margin-right:", ";"], ({
1519
2192
  theme,
1520
2193
  side
1521
- }) => side === 'right' ? theme.kitt.listItem.innerMargin : 0, ({
2194
+ }) => side === 'right' ? `${theme.kitt.listItem.innerMargin}px` : 0, ({
1522
2195
  theme,
1523
2196
  side
1524
- }) => side === 'left' ? theme.kitt.listItem.innerMargin : 0); // Handles the vertical alignment of the side elements of the list item
2197
+ }) => side === 'left' ? `${theme.kitt.listItem.innerMargin}px` : 0); // Handles the vertical alignment of the side elements of the list item
1525
2198
 
1526
2199
  function ListItemSideContainer({
1527
2200
  children,
@@ -1567,15 +2240,15 @@ const ContainerView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsRe
1567
2240
  } = theme.kitt.listItem;
1568
2241
 
1569
2242
  if (borders === 'top') {
1570
- return `border-top-width: ${borderWidth}`;
2243
+ return `border-top-width: ${borderWidth}px`;
1571
2244
  }
1572
2245
 
1573
2246
  if (borders === 'bottom') {
1574
- return `border-bottom-width: ${borderWidth}`;
2247
+ return `border-bottom-width: ${borderWidth}px`;
1575
2248
  }
1576
2249
 
1577
2250
  if (borders === 'both') {
1578
- return `border-top-width: ${borderWidth}; border-bottom-width: ${borderWidth}`;
2251
+ return styled.css(["border-top-width:", "px;border-bottom-width:", "px;"], borderWidth, borderWidth);
1579
2252
  }
1580
2253
 
1581
2254
  return 'border: none';
@@ -1946,11 +2619,11 @@ const ModalView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactN
1946
2619
  const ContentView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1947
2620
  displayName: "Modal__ContentView",
1948
2621
  componentId: "kitt-universal__sc-1xy2w5u-1"
1949
- })(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", ";background-color:", ";"], ({
2622
+ })(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], ({
1950
2623
  theme
1951
2624
  }) => theme.kitt.card.borderRadius, ({
1952
2625
  theme
1953
- }) => theme.kitt.palettes.lateOcean.white);
2626
+ }) => theme.kitt.colors.uiBackgroundLight);
1954
2627
  function Modal({
1955
2628
  visible,
1956
2629
  children,
@@ -2164,800 +2837,326 @@ const StoryTitleContainer = /*#__PURE__*/styled__default(BabelPluginStyledCompon
2164
2837
  const StorySubTitleContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2165
2838
  displayName: "StoryTitle__StorySubTitleContainer",
2166
2839
  componentId: "kitt-universal__sc-sic7hb-1"
2167
- })(["margin-bottom:10px;"]);
2168
- function StoryTitle({
2169
- color,
2170
- children,
2171
- numberOfLines
2172
- }) {
2173
- return /*#__PURE__*/jsxRuntime.jsx(StoryTitleContainer, {
2174
- children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header1, {
2175
- variant: "bold",
2176
- base: "header1",
2177
- color: useStoryBlockColor(color),
2178
- numberOfLines: numberOfLines,
2179
- children: children
2180
- })
2181
- });
2182
- }
2183
-
2184
- function StoryTitleLevel2({
2185
- color,
2186
- children,
2187
- numberOfLines
2188
- }) {
2189
- return /*#__PURE__*/jsxRuntime.jsx(StoryTitleContainer, {
2190
- children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header2, {
2191
- variant: "bold",
2192
- base: "header2",
2193
- color: useStoryBlockColor(color),
2194
- numberOfLines: numberOfLines,
2195
- children: children
2196
- })
2197
- });
2198
- }
2199
-
2200
- StoryTitleLevel2.displayName = 'StoryTitle.Level2';
2201
-
2202
- function StoryTitleLevel3({
2203
- color,
2204
- children,
2205
- numberOfLines
2206
- }) {
2207
- return /*#__PURE__*/jsxRuntime.jsx(StorySubTitleContainer, {
2208
- children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header3, {
2209
- variant: "bold",
2210
- base: "header3",
2211
- medium: "header4",
2212
- color: useStoryBlockColor(color),
2213
- numberOfLines: numberOfLines,
2214
- children: children
2215
- })
2216
- });
2217
- }
2218
-
2219
- StoryTitleLevel3.displayName = 'StoryTitle.Level3';
2220
-
2221
- function StoryTitleLevel4({
2222
- color,
2223
- children,
2224
- numberOfLines
2225
- }) {
2226
- return /*#__PURE__*/jsxRuntime.jsx(StorySubTitleContainer, {
2227
- children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header4, {
2228
- variant: "bold",
2229
- base: "header4",
2230
- medium: "header5",
2231
- color: useStoryBlockColor(color),
2232
- numberOfLines: numberOfLines,
2233
- children: children
2234
- })
2235
- });
2236
- }
2237
-
2238
- StoryTitleLevel4.displayName = 'StoryTitle.Level3';
2239
- StoryTitle.Level2 = StoryTitleLevel2;
2240
- StoryTitle.Level3 = StoryTitleLevel3;
2241
- StoryTitle.Level4 = StoryTitleLevel4;
2242
-
2243
- const StoryContainer$1 = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.ScrollView).withConfig({
2244
- displayName: "Story__StoryContainer",
2245
- componentId: "kitt-universal__sc-1kwdg2p-0"
2246
- })(["padding:", "px;"], storyPadding);
2247
- function Story({
2248
- title,
2249
- contentContainerStyle,
2250
- children
2251
- }) {
2252
- return /*#__PURE__*/jsxRuntime.jsxs(StoryContainer$1, {
2253
- contentContainerStyle: contentContainerStyle,
2254
- children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle, {
2255
- children: title
2256
- }), children]
2257
- });
2258
- }
2259
-
2260
- const StyledSection = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2261
- displayName: "StorySection__StyledSection",
2262
- componentId: "kitt-universal__sc-1b3liv5-0"
2263
- })(["margin-bottom:32px;"]);
2264
- function StorySection({
2265
- title,
2266
- children,
2267
- internalIsDemoSection,
2268
- ...props
2269
- }) {
2270
- if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
2271
- return /*#__PURE__*/jsxRuntime.jsxs(StyledSection, { ...props,
2272
- children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level2, {
2273
- children: title
2274
- }), children]
2275
- });
2276
- }
2277
- const StyledSubSection = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2278
- displayName: "StorySection__StyledSubSection",
2279
- componentId: "kitt-universal__sc-1b3liv5-1"
2280
- })(["margin-bottom:16px;"]);
2281
-
2282
- function SubSection({
2283
- title,
2284
- children,
2285
- ...props
2286
- }) {
2287
- return /*#__PURE__*/jsxRuntime.jsxs(StyledSubSection, { ...props,
2288
- children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level3, {
2289
- children: title
2290
- }), children]
2291
- });
2292
- }
2293
-
2294
- const StyledBlockSection = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2295
- displayName: "StorySection__StyledBlockSection",
2296
- componentId: "kitt-universal__sc-1b3liv5-2"
2297
- })(["margin-bottom:16px;"]);
2298
-
2299
- function BlockSection({
2300
- title,
2301
- children,
2302
- ...props
2303
- }) {
2304
- return /*#__PURE__*/jsxRuntime.jsxs(StyledBlockSection, { ...props,
2305
- children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level4, {
2306
- children: title
2307
- }), children]
2308
- });
2309
- }
2310
-
2311
- const StyledDemoSection = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2312
- displayName: "StorySection__StyledDemoSection",
2313
- componentId: "kitt-universal__sc-1b3liv5-3"
2314
- })(["margin-bottom:64px;"]);
2315
-
2316
- function DemoSection({
2317
- children
2318
- }) {
2319
- return /*#__PURE__*/jsxRuntime.jsx(StyledDemoSection, {
2320
- children: /*#__PURE__*/jsxRuntime.jsx(StorySection, {
2321
- internalIsDemoSection: true,
2322
- title: "Demo",
2323
- children: children
2324
- })
2325
- });
2326
- }
2327
-
2328
- StorySection.SubSection = SubSection;
2329
- StorySection.BlockSection = BlockSection;
2330
- /** @deprecated use StorySection.Demo instead */
2331
-
2332
- StorySection.DemoSection = DemoSection;
2333
- StorySection.Demo = DemoSection;
2334
- /** @deprecated use StorySection instead */
2335
-
2336
- const DeprecatedSection = StorySection;
2337
-
2338
- function StoryContainer({
2339
- children,
2340
- state,
2341
- title,
2342
- platform
2343
- }) {
2344
- if (platform === 'native') return null;
2345
- return /*#__PURE__*/jsxRuntime.jsx(StorySection.BlockSection, {
2346
- testID: state,
2347
- title: title,
2348
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
2349
- className: state ? `kitt-${state}` : undefined,
2350
- children: children
2351
- })
2352
- });
2353
- }
2354
-
2355
- function StoryDecorator(storyFn, context) {
2356
- return /*#__PURE__*/jsxRuntime.jsx(Story, {
2357
- title: context.name,
2358
- children: storyFn()
2359
- });
2360
- }
2361
-
2362
- const SmallScreenRow = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2363
- displayName: "StoryGrid__SmallScreenRow",
2364
- componentId: "kitt-universal__sc-4z5new-0"
2365
- })(["flex-direction:column;margin:0;"]);
2366
- const SmallScreenCol = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2367
- displayName: "StoryGrid__SmallScreenCol",
2368
- componentId: "kitt-universal__sc-4z5new-1"
2369
- })(["padding:8px 0 16px;"]);
2370
- const FlexRow = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2371
- displayName: "StoryGrid__FlexRow",
2372
- componentId: "kitt-universal__sc-4z5new-2"
2373
- })(["flex-direction:row;margin:0 -4px 16px;"]);
2374
- const FlexCol = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2375
- displayName: "StoryGrid__FlexCol",
2376
- componentId: "kitt-universal__sc-4z5new-3"
2377
- })(["flex-grow:1;flex-basis:0;margin:0 8px;"]);
2378
-
2379
- function StoryGridRow({
2380
- children,
2381
- breakpoint = 'small'
2382
- }) {
2383
- // eslint-disable-next-line unicorn/expiring-todo-comments
2384
- // TODO use useBreakpoint instead
2385
- const {
2386
- width
2387
- } = BabelPluginStyledComponentsReactNative.useWindowDimensions();
2388
- const breakpointValue = breakpoint === 'small' ? 480 : 768;
2389
-
2390
- if (width < breakpointValue) {
2391
- return /*#__PURE__*/jsxRuntime.jsx(SmallScreenRow, {
2392
- children: react.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(SmallScreenCol, {
2393
- children: child
2394
- }))
2395
- });
2396
- }
2397
-
2398
- return /*#__PURE__*/jsxRuntime.jsx(FlexRow, {
2399
- children: react.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(FlexCol, {
2400
- children: child
2401
- }))
2840
+ })(["margin-bottom:10px;"]);
2841
+ function StoryTitle({
2842
+ color,
2843
+ children,
2844
+ numberOfLines
2845
+ }) {
2846
+ return /*#__PURE__*/jsxRuntime.jsx(StoryTitleContainer, {
2847
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header1, {
2848
+ variant: "bold",
2849
+ base: "header1",
2850
+ color: useStoryBlockColor(color),
2851
+ numberOfLines: numberOfLines,
2852
+ children: children
2853
+ })
2402
2854
  });
2403
2855
  }
2404
2856
 
2405
- function StoryGridCol({
2406
- title,
2407
- titleColor,
2857
+ function StoryTitleLevel2({
2858
+ color,
2408
2859
  children,
2409
- platform = 'all'
2860
+ numberOfLines
2410
2861
  }) {
2411
- if (platform === 'native') {
2412
- return null;
2413
- }
2414
-
2415
- return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2416
- children: [title ? /*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level4, {
2417
- numberOfLines: 1,
2418
- color: titleColor,
2419
- children: title
2420
- }) : null, children]
2862
+ return /*#__PURE__*/jsxRuntime.jsx(StoryTitleContainer, {
2863
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header2, {
2864
+ variant: "bold",
2865
+ base: "header2",
2866
+ color: useStoryBlockColor(color),
2867
+ numberOfLines: numberOfLines,
2868
+ children: children
2869
+ })
2421
2870
  });
2422
2871
  }
2423
2872
 
2424
- const StoryGrid = {
2425
- Row: StoryGridRow,
2426
- Col: StoryGridCol
2427
- };
2428
-
2429
- const Container = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2430
- displayName: "Tag__Container",
2431
- componentId: "kitt-universal__sc-19jmowi-0"
2432
- })(["background-color:", ";border-width:", ";border-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], ({
2433
- theme,
2434
- type,
2435
- variant
2436
- }) => theme.kitt.tag[type][variant].backgroundColor, ({
2437
- theme,
2438
- type,
2439
- variant
2440
- }) => theme.kitt.tag[type][variant].borderWidth, ({
2441
- theme,
2442
- type,
2443
- variant
2444
- }) => theme.kitt.tag[type][variant].borderColor, ({
2445
- theme
2446
- }) => theme.kitt.tag.padding, ({
2447
- theme
2448
- }) => theme.kitt.tag.borderRadius);
2449
- const getLabelColor = (type, variant) => {
2450
- switch (type) {
2451
- case 'danger':
2452
- {
2453
- return variant === 'outline' ? 'danger' : 'black';
2454
- }
2873
+ StoryTitleLevel2.displayName = 'StoryTitle.Level2';
2455
2874
 
2456
- case 'primary':
2457
- {
2458
- return 'primary';
2459
- }
2875
+ function StoryTitleLevel3({
2876
+ color,
2877
+ children,
2878
+ numberOfLines
2879
+ }) {
2880
+ return /*#__PURE__*/jsxRuntime.jsx(StorySubTitleContainer, {
2881
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header3, {
2882
+ variant: "bold",
2883
+ base: "header3",
2884
+ medium: "header4",
2885
+ color: useStoryBlockColor(color),
2886
+ numberOfLines: numberOfLines,
2887
+ children: children
2888
+ })
2889
+ });
2890
+ }
2460
2891
 
2461
- case 'default':
2462
- {
2463
- return 'black';
2464
- }
2892
+ StoryTitleLevel3.displayName = 'StoryTitle.Level3';
2465
2893
 
2466
- default:
2467
- {
2468
- return 'black';
2469
- }
2470
- }
2471
- };
2472
- function Tag({
2473
- label,
2474
- type = 'default',
2475
- variant = 'fill'
2894
+ function StoryTitleLevel4({
2895
+ color,
2896
+ children,
2897
+ numberOfLines
2476
2898
  }) {
2477
- return /*#__PURE__*/jsxRuntime.jsx(Container, {
2478
- type: type,
2479
- variant: variant,
2480
- children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
2481
- base: "body-xsmall",
2482
- color: getLabelColor(type, variant),
2483
- children: label
2899
+ return /*#__PURE__*/jsxRuntime.jsx(StorySubTitleContainer, {
2900
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Header4, {
2901
+ variant: "bold",
2902
+ base: "header4",
2903
+ medium: "header5",
2904
+ color: useStoryBlockColor(color),
2905
+ numberOfLines: numberOfLines,
2906
+ children: children
2484
2907
  })
2485
2908
  });
2486
2909
  }
2487
2910
 
2488
- const lateOceanColorPalette = {
2489
- lateOcean: '#4C34E0',
2490
- lateOceanLight1: '#705DE6',
2491
- lateOceanLight2: '#9485EC',
2492
- lateOceanLight3: '#D6BAF9',
2493
- warmEmbrace: '#F4D3CE',
2494
- warmEmbraceLight1: '#FFEDE6',
2495
- black1000: '#000000',
2496
- black555: '#737373',
2497
- black200: '#CCCCCC',
2498
- black100: '#E5E5E5',
2499
- black50: '#F2F2F2',
2500
- black25: '#F9F9F9',
2501
- white: '#FFFFFF',
2502
- viride: '#38836D',
2503
- englishVermillon: '#D44148',
2504
- goldCrayola: '#F8C583',
2505
- aero: '#89BDDD',
2506
- transparent: 'transparent',
2507
- moonPurple: '#DBD6F9',
2508
- moonPurpleLight1: '#EDEBFC'
2509
- };
2510
-
2511
- const colorsLateOceanTheme = {
2512
- primary: lateOceanColorPalette.lateOcean,
2513
- primaryLight: lateOceanColorPalette.lateOceanLight1,
2514
- accent: lateOceanColorPalette.warmEmbrace,
2515
- accentLight: lateOceanColorPalette.warmEmbraceLight1,
2516
- success: lateOceanColorPalette.viride,
2517
- correct: lateOceanColorPalette.viride,
2518
- danger: lateOceanColorPalette.englishVermillon,
2519
- info: lateOceanColorPalette.aero,
2520
- warning: lateOceanColorPalette.goldCrayola,
2521
- separator: lateOceanColorPalette.black100,
2522
- hover: lateOceanColorPalette.black100,
2523
- black: lateOceanColorPalette.black1000,
2524
- uiBackground: lateOceanColorPalette.black25,
2525
- uiBackgroundLight: lateOceanColorPalette.white,
2526
- transparent: lateOceanColorPalette.transparent,
2527
- disabled: lateOceanColorPalette.black50,
2528
- overlay: {
2529
- dark: 'rgba(41, 48, 51, 0.25)',
2530
- light: 'rgba(255, 255, 255, 0.90)',
2531
- fullscreenLoader: 'rgba(0, 0, 0, 0.25)'
2532
- }
2533
- };
2911
+ StoryTitleLevel4.displayName = 'StoryTitle.Level3';
2912
+ StoryTitle.Level2 = StoryTitleLevel2;
2913
+ StoryTitle.Level3 = StoryTitleLevel3;
2914
+ StoryTitle.Level4 = StoryTitleLevel4;
2534
2915
 
2535
- const avatar = {
2536
- borderRadius: '10px',
2537
- default: {
2538
- backgroundColor: colorsLateOceanTheme.primary
2539
- },
2540
- light: {
2541
- backgroundColor: lateOceanColorPalette.black100
2542
- }
2543
- };
2916
+ const StoryContainer$1 = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.ScrollView).withConfig({
2917
+ displayName: "Story__StoryContainer",
2918
+ componentId: "kitt-universal__sc-1kwdg2p-0"
2919
+ })(["padding:", "px;"], storyPadding);
2920
+ function Story({
2921
+ title,
2922
+ contentContainerStyle,
2923
+ children
2924
+ }) {
2925
+ return /*#__PURE__*/jsxRuntime.jsxs(StoryContainer$1, {
2926
+ contentContainerStyle: contentContainerStyle,
2927
+ children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle, {
2928
+ children: title
2929
+ }), children]
2930
+ });
2931
+ }
2544
2932
 
2545
- const button = {
2546
- borderRadius: '30px',
2547
- borderWidth: {
2548
- disabled: '2px',
2549
- focus: '3px'
2550
- },
2551
- minHeight: '40px',
2552
- minWidth: '40px',
2553
- maxWidth: '335px',
2554
- scale: {
2555
- base: {
2556
- default: 1,
2557
- hover: 0.95,
2558
- active: 0.95
2559
- },
2560
- medium: {
2561
- hover: 1.05
2562
- }
2563
- },
2564
- contentPadding: {
2565
- default: '8px 16px 7px',
2566
- large: '12px 24px 11px',
2567
- disabled: '6px 14px 5px'
2568
- },
2569
- transition: {
2570
- duration: '200ms',
2571
- timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
2572
- },
2573
- default: {
2574
- backgroundColor: 'rgba(0, 0, 0, 0.05)',
2575
- pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
2576
- hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
2577
- focusBorderColor: 'rgba(0, 0, 0, 0.1)'
2578
- },
2579
- primary: {
2580
- backgroundColor: colorsLateOceanTheme.primary,
2581
- pressedBackgroundColor: colorsLateOceanTheme.primaryLight,
2582
- hoverBackgroundColor: colorsLateOceanTheme.primaryLight,
2583
- focusBorderColor: 'rgba(76, 52, 224, 0.2)'
2584
- },
2585
- white: {
2586
- backgroundColor: 'rgba(255, 255, 255, 0.05)',
2587
- pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
2588
- hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
2589
- focusBorderColor: 'rgba(255, 255, 255, 0.1)'
2590
- },
2591
- subtle: {
2592
- backgroundColor: colorsLateOceanTheme.transparent,
2593
- pressedBackgroundColor: colorsLateOceanTheme.transparent,
2594
- hoverBackgroundColor: colorsLateOceanTheme.transparent,
2595
- focusBorderColor: 'rgba(76, 52, 224, 0.2)',
2596
- color: colorsLateOceanTheme.primary,
2597
- hoverColor: 'rgba(76, 52, 224, 0.8)',
2598
- activeColor: 'rgba(76, 52, 224, 0.8)'
2599
- },
2600
- 'subtle-dark': {
2601
- backgroundColor: colorsLateOceanTheme.transparent,
2602
- pressedBackgroundColor: colorsLateOceanTheme.transparent,
2603
- hoverBackgroundColor: colorsLateOceanTheme.transparent,
2604
- focusBorderColor: 'rgba(0, 0, 0, 0.1)',
2605
- color: colorsLateOceanTheme.black,
2606
- hoverColor: 'rgba(0, 0, 0, 0.8)',
2607
- activeColor: 'rgba(0, 0, 0, 0.8)'
2608
- },
2609
- disabled: {
2610
- backgroundColor: colorsLateOceanTheme.disabled,
2611
- pressedBackgroundColor: colorsLateOceanTheme.disabled,
2612
- hoverBackgroundColor: colorsLateOceanTheme.disabled,
2613
- focusBorderColor: lateOceanColorPalette.black100,
2614
- borderColor: lateOceanColorPalette.black100
2615
- }
2616
- };
2933
+ const StyledSection = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2934
+ displayName: "StorySection__StyledSection",
2935
+ componentId: "kitt-universal__sc-1b3liv5-0"
2936
+ })(["margin-bottom:32px;"]);
2937
+ function StorySection({
2938
+ title,
2939
+ children,
2940
+ internalIsDemoSection,
2941
+ ...props
2942
+ }) {
2943
+ if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
2944
+ return /*#__PURE__*/jsxRuntime.jsxs(StyledSection, { ...props,
2945
+ children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level2, {
2946
+ children: title
2947
+ }), children]
2948
+ });
2949
+ }
2950
+ const StyledSubSection = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2951
+ displayName: "StorySection__StyledSubSection",
2952
+ componentId: "kitt-universal__sc-1b3liv5-1"
2953
+ })(["margin-bottom:16px;"]);
2617
2954
 
2618
- const cardLateOceanTheme = {
2619
- borderRadius: '20px',
2620
- borderWidth: '2px',
2621
- padding: '16px',
2622
- primary: {
2623
- backgroundColor: lateOceanColorPalette.white,
2624
- borderColor: lateOceanColorPalette.lateOcean
2625
- },
2626
- secondary: {
2627
- backgroundColor: lateOceanColorPalette.white,
2628
- borderColor: lateOceanColorPalette.black100
2629
- },
2630
- subtle: {
2631
- backgroundColor: lateOceanColorPalette.black50,
2632
- borderColor: lateOceanColorPalette.black100
2633
- }
2634
- };
2955
+ function SubSection({
2956
+ title,
2957
+ children,
2958
+ ...props
2959
+ }) {
2960
+ return /*#__PURE__*/jsxRuntime.jsxs(StyledSubSection, { ...props,
2961
+ children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level3, {
2962
+ children: title
2963
+ }), children]
2964
+ });
2965
+ }
2635
2966
 
2636
- const feedbackMessage = {
2637
- danger: {
2638
- backgroundColor: colorsLateOceanTheme.danger
2639
- },
2640
- success: {
2641
- backgroundColor: colorsLateOceanTheme.success
2642
- },
2643
- info: {
2644
- backgroundColor: colorsLateOceanTheme.info
2645
- },
2646
- warning: {
2647
- backgroundColor: colorsLateOceanTheme.warning
2648
- }
2649
- };
2967
+ const StyledBlockSection = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2968
+ displayName: "StorySection__StyledBlockSection",
2969
+ componentId: "kitt-universal__sc-1b3liv5-2"
2970
+ })(["margin-bottom:16px;"]);
2650
2971
 
2651
- const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
2652
- const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
2653
- baseAndSmall: {
2654
- fontSize: `${baseAndSmallFontSize}px`,
2655
- lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
2656
- },
2657
- mediumAndWide: {
2658
- fontSize: `${mediumAndWideFontSize}px`,
2659
- lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
2660
- }
2661
- });
2662
- const typographyLateOceanTheme = {
2663
- colors: {
2664
- black: lateOceanColorPalette.black1000,
2665
- 'black-light': lateOceanColorPalette.black555,
2666
- white: lateOceanColorPalette.white,
2667
- 'white-light': lateOceanColorPalette.white,
2668
- primary: lateOceanColorPalette.lateOcean,
2669
- 'primary-light': lateOceanColorPalette.lateOceanLight1,
2670
- accent: lateOceanColorPalette.warmEmbrace,
2671
- success: lateOceanColorPalette.viride,
2672
- danger: lateOceanColorPalette.englishVermillon
2673
- },
2674
- types: {
2675
- headers: {
2676
- fontFamily: {
2677
- regular: 'Moderat',
2678
- bold: 'Moderat'
2679
- },
2680
- fontWeight: 400,
2681
- fontStyle: 'normal',
2682
- configs: {
2683
- // also known as xxlarge
2684
- header1: createTypographyTypeConfig(1.3, 38, 62),
2685
- // also known as xlarge
2686
- header2: createTypographyTypeConfig(1.3, 32, 48),
2687
- // also known as medium
2688
- header3: createTypographyTypeConfig(1.3, 24, 36),
2689
- // also known as xsmall
2690
- header4: createTypographyTypeConfig(1.3, 18, 24),
2691
- // also known as xxsmall
2692
- header5: createTypographyTypeConfig(1.3, 18, 18)
2693
- }
2694
- },
2695
- bodies: {
2696
- fontFamily: {
2697
- regular: 'Noto Sans',
2698
- bold: 'Noto Sans'
2699
- },
2700
- fontWeight: {
2701
- regular: 400,
2702
- bold: 700
2703
- },
2704
- fontStyle: {
2705
- regular: 'normal',
2706
- bold: 'normal'
2707
- },
2708
- configs: {
2709
- 'body-large': createTypographyTypeConfig(1.6, 18, 24),
2710
- 'body-medium': createTypographyTypeConfig(1.6, 18, 18),
2711
- body: createTypographyTypeConfig(1.6, 16, 16),
2712
- 'body-small': createTypographyTypeConfig(1.6, 14, 14),
2713
- 'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
2714
- }
2715
- }
2716
- },
2717
- link: {
2718
- disabledColor: lateOceanColorPalette.black200
2719
- }
2720
- };
2972
+ function BlockSection({
2973
+ title,
2974
+ children,
2975
+ ...props
2976
+ }) {
2977
+ return /*#__PURE__*/jsxRuntime.jsxs(StyledBlockSection, { ...props,
2978
+ children: [/*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level4, {
2979
+ children: title
2980
+ }), children]
2981
+ });
2982
+ }
2721
2983
 
2722
- const inputStatesStyle = {
2723
- default: {
2724
- backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
2725
- borderColor: colorsLateOceanTheme.separator,
2726
- color: 'black'
2727
- },
2728
- pending: {
2729
- backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
2730
- borderColor: colorsLateOceanTheme.separator,
2731
- color: 'black'
2732
- },
2733
- valid: {
2734
- backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
2735
- borderColor: lateOceanColorPalette.black100,
2736
- color: 'black'
2737
- },
2738
- hover: {
2739
- borderColor: lateOceanColorPalette.black200,
2740
- color: 'black'
2741
- },
2742
- focus: {
2743
- borderColor: colorsLateOceanTheme.primary,
2744
- color: 'black'
2745
- },
2746
- disabled: {
2747
- backgroundColor: colorsLateOceanTheme.disabled,
2748
- borderColor: colorsLateOceanTheme.separator,
2749
- color: 'black-light'
2750
- },
2751
- invalid: {
2752
- borderColor: colorsLateOceanTheme.separator,
2753
- color: 'black'
2754
- }
2755
- };
2756
- const input = {
2757
- color: {
2758
- selection: colorsLateOceanTheme.primary,
2759
- placeholder: typographyLateOceanTheme.colors['black-light']
2760
- },
2761
- borderWidth: '2px',
2762
- borderRadius: '10px',
2763
- icon: {
2764
- size: 20
2765
- },
2766
- padding: {
2767
- default: '7px 16px',
2768
- iOSSingleLine: '12px 16px'
2769
- },
2770
- states: inputStatesStyle
2771
- };
2984
+ const StyledDemoSection = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
2985
+ displayName: "StorySection__StyledDemoSection",
2986
+ componentId: "kitt-universal__sc-1b3liv5-3"
2987
+ })(["margin-bottom:64px;"]);
2772
2988
 
2773
- const inputFieldLateOceanTheme = {
2774
- labelContainerPaddingBottom: 5,
2775
- iconMarginLeft: 6
2776
- };
2989
+ function DemoSection({
2990
+ children
2991
+ }) {
2992
+ return /*#__PURE__*/jsxRuntime.jsx(StyledDemoSection, {
2993
+ children: /*#__PURE__*/jsxRuntime.jsx(StorySection, {
2994
+ internalIsDemoSection: true,
2995
+ title: "Demo",
2996
+ children: children
2997
+ })
2998
+ });
2999
+ }
2777
3000
 
2778
- const radioLateOceanTheme = {
2779
- size: 18,
2780
- unchecked: {
2781
- backgroundColor: lateOceanColorPalette.white,
2782
- borderWidth: '2px',
2783
- borderColor: lateOceanColorPalette.black200
2784
- },
2785
- checked: {
2786
- backgroundColor: lateOceanColorPalette.lateOcean,
2787
- innerSize: 5,
2788
- innerBackgroundColor: lateOceanColorPalette.white
2789
- },
2790
- disabled: {
2791
- backgroundColor: lateOceanColorPalette.black50,
2792
- borderColor: lateOceanColorPalette.black100
2793
- }
2794
- };
3001
+ StorySection.SubSection = SubSection;
3002
+ StorySection.BlockSection = BlockSection;
3003
+ /** @deprecated use StorySection.Demo instead */
2795
3004
 
2796
- const textArea = {
2797
- minHeight: 120
2798
- };
3005
+ StorySection.DemoSection = DemoSection;
3006
+ StorySection.Demo = DemoSection;
3007
+ /** @deprecated use StorySection instead */
2799
3008
 
2800
- const forms = {
2801
- input,
2802
- radio: radioLateOceanTheme,
2803
- inputField: inputFieldLateOceanTheme,
2804
- textArea
2805
- };
3009
+ const DeprecatedSection = StorySection;
2806
3010
 
2807
- const fullScreenModalLateOceanTheme = {
2808
- header: {
2809
- paddingVertical: 12,
2810
- paddingHorizontal: 16,
2811
- borderColor: lateOceanColorPalette.black100
3011
+ function StoryContainer({
3012
+ children,
3013
+ state,
3014
+ title,
3015
+ platform
3016
+ }) {
3017
+ if (platform === 'native') return null;
3018
+ return /*#__PURE__*/jsxRuntime.jsx(StorySection.BlockSection, {
3019
+ testID: state,
3020
+ title: title,
3021
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
3022
+ className: state ? `kitt-${state}` : undefined,
3023
+ children: children
3024
+ })
3025
+ });
3026
+ }
3027
+
3028
+ function StoryDecorator(storyFn, context) {
3029
+ return /*#__PURE__*/jsxRuntime.jsx(Story, {
3030
+ title: context.name,
3031
+ children: storyFn()
3032
+ });
3033
+ }
3034
+
3035
+ const SmallScreenRow = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
3036
+ displayName: "StoryGrid__SmallScreenRow",
3037
+ componentId: "kitt-universal__sc-4z5new-0"
3038
+ })(["flex-direction:column;margin:0;"]);
3039
+ const SmallScreenCol = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
3040
+ displayName: "StoryGrid__SmallScreenCol",
3041
+ componentId: "kitt-universal__sc-4z5new-1"
3042
+ })(["padding:8px 0 16px;"]);
3043
+ const FlexRow = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
3044
+ displayName: "StoryGrid__FlexRow",
3045
+ componentId: "kitt-universal__sc-4z5new-2"
3046
+ })(["flex-direction:row;margin:0 -4px 16px;"]);
3047
+ const FlexCol = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
3048
+ displayName: "StoryGrid__FlexCol",
3049
+ componentId: "kitt-universal__sc-4z5new-3"
3050
+ })(["flex-grow:1;flex-basis:0;margin:0 8px;"]);
3051
+
3052
+ function StoryGridRow({
3053
+ children,
3054
+ breakpoint = 'small'
3055
+ }) {
3056
+ // eslint-disable-next-line unicorn/expiring-todo-comments
3057
+ // TODO use useBreakpoint instead
3058
+ const {
3059
+ width
3060
+ } = BabelPluginStyledComponentsReactNative.useWindowDimensions();
3061
+ const breakpointValue = breakpoint === 'small' ? 480 : 768;
3062
+
3063
+ if (width < breakpointValue) {
3064
+ return /*#__PURE__*/jsxRuntime.jsx(SmallScreenRow, {
3065
+ children: react.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(SmallScreenCol, {
3066
+ children: child
3067
+ }))
3068
+ });
2812
3069
  }
2813
- };
2814
3070
 
2815
- const iconButton = {
2816
- backgroundColor: 'transparent',
2817
- width: 40,
2818
- height: 40,
2819
- borderRadius: 20,
2820
- borderWidth: 2,
2821
- borderColor: 'transparent',
2822
- transition: {
2823
- property: 'all',
2824
- duration: '200ms',
2825
- timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1);'
2826
- },
2827
- scale: {
2828
- base: {
2829
- default: 1,
2830
- hover: 0.95,
2831
- active: 0.95
2832
- },
2833
- medium: {
2834
- hover: 1.05
2835
- }
2836
- },
2837
- disabled: {
2838
- scale: 1,
2839
- backgroundColor: button.disabled.backgroundColor,
2840
- borderColor: button.disabled.borderColor
2841
- },
2842
- default: {
2843
- pressedBackgroundColor: button.default.pressedBackgroundColor
2844
- },
2845
- white: {
2846
- pressedBackgroundColor: button.white.hoverBackgroundColor
3071
+ return /*#__PURE__*/jsxRuntime.jsx(FlexRow, {
3072
+ children: react.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(FlexCol, {
3073
+ children: child
3074
+ }))
3075
+ });
3076
+ }
3077
+
3078
+ function StoryGridCol({
3079
+ title,
3080
+ titleColor,
3081
+ children,
3082
+ platform = 'all'
3083
+ }) {
3084
+ if (platform === 'native') {
3085
+ return null;
2847
3086
  }
2848
- };
2849
3087
 
2850
- const listItemLateOceanTheme = {
2851
- padding: '12px 16px',
2852
- borderColor: colorsLateOceanTheme.separator,
2853
- borderWidth: '1px',
2854
- innerMargin: '8px'
2855
- };
3088
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
3089
+ children: [title ? /*#__PURE__*/jsxRuntime.jsx(StoryTitle.Level4, {
3090
+ numberOfLines: 1,
3091
+ color: titleColor,
3092
+ children: title
3093
+ }) : null, children]
3094
+ });
3095
+ }
2856
3096
 
2857
- const shadowsLateOceanTheme = {
2858
- medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
3097
+ const StoryGrid = {
3098
+ Row: StoryGridRow,
3099
+ Col: StoryGridCol
2859
3100
  };
2860
3101
 
2861
- const skeletonTheme = {
2862
- backgroundColor: lateOceanColorPalette.black100,
2863
- flareColor: lateOceanColorPalette.black200,
2864
- animationDuration: 1000
2865
- };
3102
+ const Container = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
3103
+ displayName: "Tag__Container",
3104
+ componentId: "kitt-universal__sc-19jmowi-0"
3105
+ })(["background-color:", ";border-width:", "px;border-color:", ";padding:", ";border-radius:", "px;align-self:flex-start;"], ({
3106
+ theme,
3107
+ type,
3108
+ variant
3109
+ }) => theme.kitt.tag[type][variant].backgroundColor, ({
3110
+ theme,
3111
+ type,
3112
+ variant
3113
+ }) => theme.kitt.tag[type][variant].borderWidth, ({
3114
+ theme,
3115
+ type,
3116
+ variant
3117
+ }) => theme.kitt.tag[type][variant].borderColor, ({
3118
+ theme
3119
+ }) => theme.kitt.tag.padding, ({
3120
+ theme
3121
+ }) => theme.kitt.tag.borderRadius);
3122
+ const getLabelColor = (type, variant) => {
3123
+ switch (type) {
3124
+ case 'danger':
3125
+ {
3126
+ return variant === 'outline' ? 'danger' : 'black';
3127
+ }
2866
3128
 
2867
- const tagLateOceanTheme = {
2868
- borderRadius: '10px',
2869
- padding: '2px 12px',
2870
- primary: {
2871
- fill: {
2872
- backgroundColor: lateOceanColorPalette.moonPurpleLight1,
2873
- borderWidth: '0',
2874
- borderColor: lateOceanColorPalette.transparent
2875
- },
2876
- outline: {
2877
- backgroundColor: lateOceanColorPalette.transparent,
2878
- borderWidth: '1px',
2879
- borderColor: lateOceanColorPalette.lateOcean
2880
- }
2881
- },
2882
- default: {
2883
- fill: {
2884
- backgroundColor: lateOceanColorPalette.black50,
2885
- borderWidth: '0',
2886
- borderColor: lateOceanColorPalette.transparent
2887
- },
2888
- outline: {
2889
- backgroundColor: lateOceanColorPalette.transparent,
2890
- borderWidth: '1px',
2891
- borderColor: lateOceanColorPalette.black1000
2892
- }
2893
- },
2894
- danger: {
2895
- fill: {
2896
- backgroundColor: lateOceanColorPalette.warmEmbrace,
2897
- borderWidth: '0',
2898
- borderColor: lateOceanColorPalette.transparent
2899
- },
2900
- outline: {
2901
- backgroundColor: lateOceanColorPalette.transparent,
2902
- borderWidth: '1px',
2903
- borderColor: colorsLateOceanTheme.danger
2904
- }
2905
- }
2906
- };
3129
+ case 'primary':
3130
+ {
3131
+ return 'primary';
3132
+ }
2907
3133
 
2908
- const tooltip = {
2909
- backgroundColor: colorsLateOceanTheme.black,
2910
- borderRadius: 10,
2911
- opacity: 0.95,
2912
- horizontalPadding: 16,
2913
- verticalPadding: 4,
2914
- floatingPadding: 8
2915
- };
3134
+ case 'default':
3135
+ {
3136
+ return 'black';
3137
+ }
2916
3138
 
2917
- const breakpoints = {
2918
- values: {
2919
- base: 0,
2920
- small: 480,
2921
- medium: 768,
2922
- large: 1024,
2923
- wide: 1280
2924
- },
2925
- min: {
2926
- smallBreakpoint: 'min-width: 480px',
2927
- mediumBreakpoint: 'min-width: 768px',
2928
- largeBreakpoint: 'min-width: 1024px',
2929
- wideBreakpoint: 'min-width: 1280px'
2930
- },
2931
- max: {
2932
- smallBreakpoint: 'max-width: 479px',
2933
- mediumBreakpoint: 'max-width: 767px',
2934
- largeBreakpoint: 'max-width: 1023px',
2935
- wideBreakpoint: 'max-width: 1279px'
3139
+ default:
3140
+ {
3141
+ return 'black';
3142
+ }
2936
3143
  }
2937
- }; // eslint-disable-next-line unicorn/expiring-todo-comments
2938
- // TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
2939
-
2940
- const theme = {
2941
- spacing: 4,
2942
- colors: colorsLateOceanTheme,
2943
- palettes: {
2944
- lateOcean: lateOceanColorPalette
2945
- },
2946
- avatar,
2947
- button,
2948
- card: cardLateOceanTheme,
2949
- feedbackMessage,
2950
- forms,
2951
- typography: typographyLateOceanTheme,
2952
- tag: tagLateOceanTheme,
2953
- shadows: shadowsLateOceanTheme,
2954
- fullScreenModal: fullScreenModalLateOceanTheme,
2955
- iconButton,
2956
- listItem: listItemLateOceanTheme,
2957
- tooltip,
2958
- skeleton: skeletonTheme,
2959
- breakpoints
2960
3144
  };
3145
+ function Tag({
3146
+ label,
3147
+ type = 'default',
3148
+ variant = 'fill'
3149
+ }) {
3150
+ return /*#__PURE__*/jsxRuntime.jsx(Container, {
3151
+ type: type,
3152
+ variant: variant,
3153
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
3154
+ base: "body-xsmall",
3155
+ color: getLabelColor(type, variant),
3156
+ children: label
3157
+ })
3158
+ });
3159
+ }
2961
3160
 
2962
3161
  function TimePicker() {
2963
3162
  return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
@@ -3169,13 +3368,8 @@ function TypographyEmoji({
3169
3368
  const {
3170
3369
  fontSize
3171
3370
  } = typeConfig[typeConfigKey];
3172
-
3173
- if ((process.env.NODE_ENV !== "production")) {
3174
- if (!fontSize.endsWith('px')) throw new Error(`Unexpected font-size value: ${fontSize}`);
3175
- }
3176
-
3177
3371
  return /*#__PURE__*/jsxRuntime.jsx(StyledTypographyEmoji, {
3178
- size: parseInt(fontSize.slice(0, -2), 10),
3372
+ size: fontSize,
3179
3373
  emoji: emoji
3180
3374
  });
3181
3375
  }
@@ -3240,65 +3434,6 @@ function TypographyLink({
3240
3434
  });
3241
3435
  }
3242
3436
 
3243
- function matchWindowSize({
3244
- width,
3245
- height
3246
- }, {
3247
- minWidth,
3248
- maxWidth,
3249
- minHeight,
3250
- maxHeight
3251
- }) {
3252
- const hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
3253
- const hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
3254
- return hasWidthMatched && hasHeightMatched;
3255
- }
3256
- function useMatchWindowSize(options) {
3257
- const {
3258
- width,
3259
- height
3260
- } = BabelPluginStyledComponentsReactNative.useWindowDimensions();
3261
- return matchWindowSize({
3262
- width,
3263
- height
3264
- }, options);
3265
- }
3266
-
3267
- // eslint-disable-next-line no-restricted-imports
3268
- function createWindowSizeHelper(dimensions) {
3269
- return {
3270
- matchWindowSize: options => matchWindowSize(dimensions, options),
3271
- ifWindowSizeMatches: (options, valueIfTrue, valueIfFalse) => matchWindowSize(dimensions, options) ? valueIfTrue : valueIfFalse,
3272
- mapWindowWidth: (...widthList) => {
3273
- if ((process.env.NODE_ENV !== "production")) {
3274
- widthList.slice(1).forEach(([minWidth], index) => {
3275
- const previousMinWidth = widthList[index][0];
3276
-
3277
- if (previousMinWidth > minWidth) {
3278
- throw new Error(`mapWindowWidth: sort your values to be mobile first. ${minWidth} is < ${previousMinWidth}, so ${minWidth} should be before ${previousMinWidth}.`);
3279
- }
3280
- });
3281
- }
3282
-
3283
- const found = widthList.find(([minWidth, value]) => matchWindowSize(dimensions, {
3284
- minWidth: Number(minWidth)
3285
- }));
3286
- if (!found) return null;
3287
- return found[1];
3288
- }
3289
- };
3290
- }
3291
-
3292
- function useKittTheme() {
3293
- const dimensions = BabelPluginStyledComponentsReactNative.useWindowDimensions();
3294
- return react.useMemo(() => {
3295
- return {
3296
- kitt: theme,
3297
- responsive: createWindowSizeHelper(dimensions)
3298
- };
3299
- }, [dimensions]);
3300
- }
3301
-
3302
3437
  const hex2rgba = (hex, alpha = 1) => {
3303
3438
  const r = parseInt(hex.slice(1, 3), 16);
3304
3439
  const g = parseInt(hex.slice(3, 5), 16);
@@ -3334,25 +3469,26 @@ function MatchWindowSize({
3334
3469
  }) {
3335
3470
  const match = useMatchWindowSize(matchWindowSizeOptions);
3336
3471
  if (!match) return null;
3337
- return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
3338
- children: children
3339
- });
3472
+ return children;
3340
3473
  }
3341
3474
 
3342
3475
  exports.useWindowSize = BabelPluginStyledComponentsReactNative.useWindowDimensions;
3343
3476
  exports.Avatar = Avatar;
3344
3477
  exports.Button = Button;
3345
3478
  exports.Card = Card;
3479
+ exports.Checkbox = Checkbox;
3346
3480
  exports.Emoji = Emoji;
3347
3481
  exports.ExternalLink = ExternalLink;
3348
3482
  exports.Flex = Flex;
3349
3483
  exports.FullScreenModal = FullScreenModal;
3350
3484
  exports.Icon = Icon;
3351
3485
  exports.IconButton = IconButton;
3486
+ exports.InputEmail = InputEmail;
3352
3487
  exports.InputFeedback = InputFeedback;
3353
3488
  exports.InputField = InputField;
3354
3489
  exports.InputIcon = InputIcon;
3355
3490
  exports.InputPassword = InputPassword;
3491
+ exports.InputPhone = InputPhone;
3356
3492
  exports.InputPressable = InputPressable;
3357
3493
  exports.InputText = InputText;
3358
3494
  exports.KittBreakpoints = KittBreakpoints;